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
f697d7aa
Kaydet (Commit)
f697d7aa
authored
Mar 15, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix the UNO API for creating a new group dimension.
üst
859f601e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
dapiuno.hxx
sc/inc/dapiuno.hxx
+1
-0
dapiuno.cxx
sc/source/ui/unoobj/dapiuno.cxx
+14
-10
No files found.
sc/inc/dapiuno.hxx
Dosyayı görüntüle @
f697d7aa
...
@@ -422,6 +422,7 @@ protected:
...
@@ -422,6 +422,7 @@ protected:
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
GetMembers
()
const
;
GetMembers
()
const
;
ScDocShell
*
GetDocShell
()
const
;
protected
:
protected
:
ScDataPilotDescriptorBase
&
mrParent
;
ScDataPilotDescriptorBase
&
mrParent
;
ScFieldIdentifier
maFieldId
;
ScFieldIdentifier
maFieldId
;
...
...
sc/source/ui/unoobj/dapiuno.cxx
Dosyayı görüntüle @
f697d7aa
...
@@ -1193,7 +1193,7 @@ void ScDataPilotTableObj::SetDPObject( ScDPObject* pDPObject )
...
@@ -1193,7 +1193,7 @@ void ScDataPilotTableObj::SetDPObject( ScDPObject* pDPObject )
if
(
pDPObj
&&
pDocSh
)
if
(
pDPObj
&&
pDocSh
)
{
{
ScDBDocFunc
aFunc
(
*
pDocSh
);
ScDBDocFunc
aFunc
(
*
pDocSh
);
aFunc
.
DataPilotUpdate
(
pDPObj
,
pDPObject
,
sal_True
,
sal_T
rue
);
aFunc
.
DataPilotUpdate
(
pDPObj
,
pDPObject
,
true
,
t
rue
);
}
}
}
}
...
@@ -1565,6 +1565,11 @@ Reference< XNameAccess > ScDataPilotChildObjBase::GetMembers() const
...
@@ -1565,6 +1565,11 @@ Reference< XNameAccess > ScDataPilotChildObjBase::GetMembers() const
return
xMembersNA
;
return
xMembersNA
;
}
}
ScDocShell
*
ScDataPilotChildObjBase
::
GetDocShell
()
const
{
return
mrParent
.
GetDocShell
();
}
// ============================================================================
// ============================================================================
ScDataPilotFieldsObj
::
ScDataPilotFieldsObj
(
ScDataPilotDescriptorBase
&
rParent
)
:
ScDataPilotFieldsObj
::
ScDataPilotFieldsObj
(
ScDataPilotDescriptorBase
&
rParent
)
:
...
@@ -2569,13 +2574,13 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
...
@@ -2569,13 +2574,13 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
ScDPObject
*
pDPObj
=
0
;
ScDPObject
*
pDPObj
=
0
;
if
(
ScDPSaveDimension
*
pDim
=
GetDPDimension
(
&
pDPObj
)
)
if
(
ScDPSaveDimension
*
pDim
=
GetDPDimension
(
&
pDPObj
)
)
{
{
String
aDimName
=
pDim
->
GetName
();
rtl
::
OU
String
aDimName
=
pDim
->
GetName
();
ScDPSaveData
aSaveData
=
*
pDPObj
->
GetSaveData
();
ScDPSaveData
aSaveData
=
*
pDPObj
->
GetSaveData
();
ScDPDimensionSaveData
*
pDimData
=
aSaveData
.
GetDimensionData
();
// created if not there
ScDPDimensionSaveData
*
pDimData
=
aSaveData
.
GetDimensionData
();
// created if not there
// find original base
// find original base
String
aBaseDimName
(
aDimName
);
rtl
::
OU
String
aBaseDimName
(
aDimName
);
const
ScDPSaveGroupDimension
*
pBaseGroupDim
=
pDimData
->
GetNamedGroupDim
(
aDimName
);
const
ScDPSaveGroupDimension
*
pBaseGroupDim
=
pDimData
->
GetNamedGroupDim
(
aDimName
);
if
(
pBaseGroupDim
)
if
(
pBaseGroupDim
)
{
{
...
@@ -2595,7 +2600,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
...
@@ -2595,7 +2600,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
{
{
for
(
nEntry
=
0
;
nEntry
<
nEntryCount
;
nEntry
++
)
for
(
nEntry
=
0
;
nEntry
<
nEntryCount
;
nEntry
++
)
{
{
String
aEntryName
(
rItems
[
nEntry
])
;
const
rtl
::
OUString
&
aEntryName
=
rItems
[
nEntry
]
;
if
(
pBaseGroupDim
)
if
(
pBaseGroupDim
)
{
{
// for each selected (intermediate) group, remove all its items
// for each selected (intermediate) group, remove all its items
...
@@ -2615,9 +2620,8 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
...
@@ -2615,9 +2620,8 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
if
(
!
pGroupDimension
)
if
(
!
pGroupDimension
)
{
{
// create a new group dimension
// create a new group dimension
String
aGroupDimName
=
pDimData
->
CreateGroupDimName
(
aBaseDimName
,
*
pDPObj
,
false
,
NULL
);
sNewDim
=
pDimData
->
CreateGroupDimName
(
aBaseDimName
,
*
pDPObj
,
false
,
NULL
);
pNewGroupDim
=
new
ScDPSaveGroupDimension
(
aBaseDimName
,
aGroupDimName
);
pNewGroupDim
=
new
ScDPSaveGroupDimension
(
aBaseDimName
,
sNewDim
);
sNewDim
=
aGroupDimName
;
pGroupDimension
=
pNewGroupDim
;
// make changes to the new dim if none existed
pGroupDimension
=
pNewGroupDim
;
// make changes to the new dim if none existed
...
@@ -2645,10 +2649,10 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
...
@@ -2645,10 +2649,10 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
}
}
}
}
}
}
String
aGroupDimName
=
pGroupDimension
->
GetGroupDimName
();
rtl
::
OU
String
aGroupDimName
=
pGroupDimension
->
GetGroupDimName
();
//! localized prefix string
//! localized prefix string
String
aGroupName
=
pGroupDimension
->
CreateGroupName
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"Group"
)
)
);
rtl
::
OU
String
aGroupName
=
pGroupDimension
->
CreateGroupName
(
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"Group"
)
)
);
ScDPSaveGroupItem
aGroup
(
aGroupName
);
ScDPSaveGroupItem
aGroup
(
aGroupName
);
Reference
<
XNameAccess
>
xMembers
=
GetMembers
();
Reference
<
XNameAccess
>
xMembers
=
GetMembers
();
if
(
!
xMembers
.
is
())
if
(
!
xMembers
.
is
())
...
@@ -2702,7 +2706,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
...
@@ -2702,7 +2706,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
// apply changes
// apply changes
pDPObj
->
SetSaveData
(
aSaveData
);
pDPObj
->
SetSaveData
(
aSaveData
);
S
etDPObject
(
pDPObj
);
S
cDBDocFunc
(
*
GetDocShell
()).
RefreshPivotTableGroups
(
pDPObj
);
}
}
// if new grouping field has been created (on first group), return it
// if new grouping field has been created (on first group), return it
...
...
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