Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f9636d50
Kaydet (Commit)
f9636d50
authored
Nis 03, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pivot: duplicate data field handling
Change-Id: I3d367b8b638217f18143118df00324f21a0470f2
üst
d2356918
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
11 deletions
+48
-11
PivotLayoutTreeListData.cxx
sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
+46
-11
PivotLayoutTreeListData.hxx
sc/source/ui/inc/PivotLayoutTreeListData.hxx
+2
-0
No files found.
sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
Dosyayı görüntüle @
f9636d50
...
...
@@ -88,15 +88,15 @@ bool ScPivotLayoutTreeListData::DoubleClickHdl()
if
(
pDialog
->
Execute
()
==
RET_OK
)
{
if
(
rCurrentFunctionData
.
mnFuncMask
!=
pDialog
->
GetFuncMask
())
{
rCurrentFunctionData
.
mnDupCount
=
rCurrentFunctionData
.
mnDupCount
+
1
;
}
rCurrentFunctionData
.
mnFuncMask
=
pCurrentLabelData
->
mnFuncMask
=
pDialog
->
GetFuncMask
();
rCurrentFunctionData
.
mnFuncMask
=
pDialog
->
GetFuncMask
();
pCurrentLabelData
->
mnFuncMask
=
pDialog
->
GetFuncMask
();
rCurrentFunctionData
.
maFieldRef
=
pDialog
->
GetFieldRef
();
ScDPLabelData
*
pDFData
=
mpParent
->
GetLabelData
(
rCurrentFunctionData
.
mnCol
);
AdjustDuplicateCount
(
pCurrentItemValue
);
OUString
sDataItemName
=
lclCreateDataItemName
(
rCurrentFunctionData
.
mnFuncMask
,
pDFData
->
maName
,
...
...
@@ -132,15 +132,15 @@ void ScPivotLayoutTreeListData::FillDataField(ScPivotFieldVector& rDataFields)
pItemValue
->
mpOriginalItemValue
=
pOriginalItemValue
;
pItemValue
->
maFunctionData
.
mnOriginalDim
=
rField
.
mnOriginalDim
;
pItemValue
->
maFunctionData
.
mnDupCount
=
rField
.
mnDupCount
;
pItemValue
->
maFunctionData
.
maFieldRef
=
rField
.
maFieldRef
;
maDataItemValues
.
push_back
(
pItemValue
);
OUString
sDataItemName
=
lclCreateDataItemName
(
rField
.
nFuncMask
,
pItemValue
->
maName
,
rField
.
mnDupCount
);
AdjustDuplicateCount
(
pItemValue
);
OUString
sDataItemName
=
lclCreateDataItemName
(
pItemValue
->
maFunctionData
.
mnFuncMask
,
pItemValue
->
maName
,
pItemValue
->
maFunctionData
.
mnDupCount
);
SvTreeListEntry
*
pEntry
=
InsertEntry
(
sDataItemNam
e
);
pEntry
->
SetUserData
(
pItemValue
);
maDataItemValues
.
push_back
(
pItemValu
e
);
InsertEntry
(
sDataItemName
,
NULL
,
false
,
TREELIST_APPEND
,
pItemValue
);
}
}
...
...
@@ -205,6 +205,8 @@ void ScPivotLayoutTreeListData::InsertEntryForItem(ScItemValue* pItemValue, sal_
rFunctionData
.
mnFuncMask
=
PIVOT_FUNC_SUM
;
}
AdjustDuplicateCount
(
pDataItemValue
);
OUString
sDataName
=
lclCreateDataItemName
(
rFunctionData
.
mnFuncMask
,
pDataItemValue
->
maName
,
...
...
@@ -213,6 +215,39 @@ void ScPivotLayoutTreeListData::InsertEntryForItem(ScItemValue* pItemValue, sal_
InsertEntry
(
sDataName
,
NULL
,
false
,
nPosition
,
pDataItemValue
);
}
void
ScPivotLayoutTreeListData
::
AdjustDuplicateCount
(
ScItemValue
*
pInputItemValue
)
{
ScPivotFuncData
&
rInputFunctionData
=
pInputItemValue
->
maFunctionData
;
bool
bFoundDuplicate
=
false
;
rInputFunctionData
.
mnDupCount
=
0
;
sal_uInt8
nMaxDuplicateCount
=
0
;
SvTreeListEntry
*
pEachEntry
;
for
(
pEachEntry
=
First
();
pEachEntry
!=
NULL
;
pEachEntry
=
Next
(
pEachEntry
))
{
ScItemValue
*
pItemValue
=
(
ScItemValue
*
)
pEachEntry
->
GetUserData
();
if
(
pItemValue
==
pInputItemValue
)
continue
;
ScPivotFuncData
&
rFunctionData
=
pItemValue
->
maFunctionData
;
if
(
rFunctionData
.
mnCol
==
rInputFunctionData
.
mnCol
&&
rFunctionData
.
mnFuncMask
==
rInputFunctionData
.
mnFuncMask
)
{
bFoundDuplicate
=
true
;
if
(
rFunctionData
.
mnDupCount
>
nMaxDuplicateCount
)
nMaxDuplicateCount
=
rFunctionData
.
mnDupCount
;
}
}
if
(
bFoundDuplicate
)
{
rInputFunctionData
.
mnDupCount
=
nMaxDuplicateCount
+
1
;
}
}
void
ScPivotLayoutTreeListData
::
KeyInput
(
const
KeyEvent
&
rKeyEvent
)
{
KeyCode
aCode
=
rKeyEvent
.
GetKeyCode
();
...
...
sc/source/ui/inc/PivotLayoutTreeListData.hxx
Dosyayı görüntüle @
f9636d50
...
...
@@ -31,6 +31,8 @@ protected:
virtual
void
InsertEntryForSourceTarget
(
SvTreeListEntry
*
pSource
,
SvTreeListEntry
*
pTarget
)
SAL_OVERRIDE
;
virtual
void
InsertEntryForItem
(
ScItemValue
*
pItemValue
,
sal_uLong
nPosition
)
SAL_OVERRIDE
;
void
AdjustDuplicateCount
(
ScItemValue
*
pInputItemValue
);
virtual
void
KeyInput
(
const
KeyEvent
&
rKeyEvent
)
SAL_OVERRIDE
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment