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
343ec4b7
Kaydet (Commit)
343ec4b7
authored
Kas 13, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I21fdb9f503241c2fa38f3de059a1f674a6631c78
üst
280553e3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
16 deletions
+18
-16
pivot.hxx
sc/inc/pivot.hxx
+5
-4
dpobject.cxx
sc/source/core/data/dpobject.cxx
+3
-3
pivot2.cxx
sc/source/core/data/pivot2.cxx
+2
-1
PivotLayoutDialog.cxx
sc/source/ui/dbgui/PivotLayoutDialog.cxx
+2
-2
PivotLayoutTreeListLabel.cxx
sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
+1
-1
pvfundlg.cxx
sc/source/ui/dbgui/pvfundlg.cxx
+5
-5
No files found.
sc/inc/pivot.hxx
Dosyayı görüntüle @
343ec4b7
...
@@ -42,20 +42,21 @@
...
@@ -42,20 +42,21 @@
#include "calcmacros.hxx"
#include "calcmacros.hxx"
#include <vector>
#include <vector>
#include <
boost/ptr_container/ptr_vector.hpp
>
#include <
memory
>
#define PIVOT_DATA_FIELD (MAXCOLCOUNT)
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/sheet/DataPilotFieldReference.hpp>
#include <com/sun/star/sheet/DataPilotFieldReference.hpp>
#include <com/sun/star/sheet/DataPilotFieldSortInfo.hpp>
#include <com/sun/star/sheet/DataPilotFieldSortInfo.hpp>
#include <com/sun/star/sheet/DataPilotFieldLayoutInfo.hpp>
#include <com/sun/star/sheet/DataPilotFieldLayoutInfo.hpp>
#include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
#include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
#define PIVOT_DATA_FIELD (MAXCOLCOUNT)
struct
SC_DLLPUBLIC
ScDPName
struct
SC_DLLPUBLIC
ScDPName
{
{
OUString
maName
;
///< Original name of the dimension.
OUString
maName
;
///< Original name of the dimension.
OUString
maLayoutName
;
///< Layout name (display name)
OUString
maLayoutName
;
///< Layout name (display name)
sal_uInt8
mnDupCount
;
sal_uInt8
mnDupCount
;
ScDPName
();
ScDPName
();
explicit
ScDPName
(
const
OUString
&
rName
,
const
OUString
&
rLayoutName
,
sal_uInt8
nDupCount
);
explicit
ScDPName
(
const
OUString
&
rName
,
const
OUString
&
rLayoutName
,
sal_uInt8
nDupCount
);
...
@@ -108,7 +109,7 @@ struct ScDPLabelData
...
@@ -108,7 +109,7 @@ struct ScDPLabelData
OUString
SC_DLLPUBLIC
getDisplayName
()
const
;
OUString
SC_DLLPUBLIC
getDisplayName
()
const
;
};
};
typedef
boost
::
ptr_vector
<
ScDPLabelData
>
ScDPLabelDataVector
;
typedef
std
::
vector
<
std
::
unique_ptr
<
ScDPLabelData
>
>
ScDPLabelDataVector
;
struct
ScPivotField
struct
ScPivotField
{
{
...
...
sc/source/core/data/dpobject.cxx
Dosyayı görüntüle @
343ec4b7
...
@@ -2385,9 +2385,9 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam)
...
@@ -2385,9 +2385,9 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam)
for
(
sal_Int32
nDim
=
0
;
nDim
<
nDimCount
;
++
nDim
)
for
(
sal_Int32
nDim
=
0
;
nDim
<
nDimCount
;
++
nDim
)
{
{
std
::
unique_ptr
<
ScDPLabelData
>
pNewLabel
(
new
ScDPLabelData
)
;
ScDPLabelData
*
pNewLabel
=
new
ScDPLabelData
;
FillLabelDataForDimension
(
xDims
,
nDim
,
*
pNewLabel
);
FillLabelDataForDimension
(
xDims
,
nDim
,
*
pNewLabel
);
o3tl
::
ptr_container
::
push_back
(
rParam
.
maLabelArray
,
std
::
move
(
pNewLabel
));
rParam
.
maLabelArray
.
push_back
(
std
::
unique_ptr
<
ScDPLabelData
>
(
pNewLabel
));
}
}
return
true
;
return
true
;
...
@@ -2625,7 +2625,7 @@ void ScDPObject::ConvertOrientation(
...
@@ -2625,7 +2625,7 @@ void ScDPObject::ConvertOrientation(
pDim
->
RemoveSubtotalName
();
pDim
->
RemoveSubtotalName
();
if
(
nDimIndex
<
rLabels
.
size
())
if
(
nDimIndex
<
rLabels
.
size
())
{
{
const
ScDPLabelData
&
rLabel
=
rLabels
[
nDimIndex
]
;
const
ScDPLabelData
&
rLabel
=
*
rLabels
[
nDimIndex
].
get
()
;
if
(
!
rLabel
.
maLayoutName
.
isEmpty
())
if
(
!
rLabel
.
maLayoutName
.
isEmpty
())
pDim
->
SetLayoutName
(
rLabel
.
maLayoutName
);
pDim
->
SetLayoutName
(
rLabel
.
maLayoutName
);
if
(
!
rLabel
.
maSubtotalName
.
isEmpty
())
if
(
!
rLabel
.
maSubtotalName
.
isEmpty
())
...
...
sc/source/core/data/pivot2.cxx
Dosyayı görüntüle @
343ec4b7
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include "refupdat.hxx"
#include "refupdat.hxx"
#include "stlpool.hxx"
#include "stlpool.hxx"
#include "stlsheet.hxx"
#include "stlsheet.hxx"
#include <o3tl/make_unique.hxx>
#if DEBUG_PIVOT_TABLE
#if DEBUG_PIVOT_TABLE
using
std
::
cout
;
using
std
::
cout
;
...
@@ -166,7 +167,7 @@ void ScPivotParam::SetLabelData(const ScDPLabelDataVector& rVector)
...
@@ -166,7 +167,7 @@ void ScPivotParam::SetLabelData(const ScDPLabelDataVector& rVector)
ScDPLabelDataVector
::
const_iterator
it
;
ScDPLabelDataVector
::
const_iterator
it
;
for
(
it
=
rVector
.
begin
();
it
!=
rVector
.
end
();
++
it
)
for
(
it
=
rVector
.
begin
();
it
!=
rVector
.
end
();
++
it
)
{
{
aNewArray
.
push_back
(
new
ScDPLabelData
(
*
it
));
aNewArray
.
push_back
(
o3tl
::
make_unique
<
ScDPLabelData
>
(
*
it
->
get
()
));
}
}
maLabelArray
.
swap
(
aNewArray
);
maLabelArray
.
swap
(
aNewArray
);
}
}
...
...
sc/source/ui/dbgui/PivotLayoutDialog.cxx
Dosyayı görüntüle @
343ec4b7
...
@@ -560,7 +560,7 @@ void ScPivotLayoutDialog::ApplyLabelData(ScDPSaveData& rSaveData)
...
@@ -560,7 +560,7 @@ void ScPivotLayoutDialog::ApplyLabelData(ScDPSaveData& rSaveData)
for
(
it
=
rLabelDataVector
.
begin
();
it
!=
rLabelDataVector
.
end
();
++
it
)
for
(
it
=
rLabelDataVector
.
begin
();
it
!=
rLabelDataVector
.
end
();
++
it
)
{
{
const
ScDPLabelData
&
pLabelData
=
*
it
;
const
ScDPLabelData
&
pLabelData
=
*
it
->
get
()
;
OUString
aUnoName
=
ScDPUtil
::
createDuplicateDimensionName
(
pLabelData
.
maName
,
pLabelData
.
mnDupCount
);
OUString
aUnoName
=
ScDPUtil
::
createDuplicateDimensionName
(
pLabelData
.
maName
,
pLabelData
.
mnDupCount
);
ScDPSaveDimension
*
pSaveDimensions
=
rSaveData
.
GetExistingDimensionByName
(
aUnoName
);
ScDPSaveDimension
*
pSaveDimensions
=
rSaveData
.
GetExistingDimensionByName
(
aUnoName
);
...
@@ -629,7 +629,7 @@ bool ScPivotLayoutDialog::IsDataElement(SCCOL nColumn)
...
@@ -629,7 +629,7 @@ bool ScPivotLayoutDialog::IsDataElement(SCCOL nColumn)
ScDPLabelData
&
ScPivotLayoutDialog
::
GetLabelData
(
SCCOL
nColumn
)
ScDPLabelData
&
ScPivotLayoutDialog
::
GetLabelData
(
SCCOL
nColumn
)
{
{
return
maPivotParameters
.
maLabelArray
[
nColumn
]
;
return
*
maPivotParameters
.
maLabelArray
[
nColumn
].
get
()
;
}
}
void
ScPivotLayoutDialog
::
PushDataFieldNames
(
std
::
vector
<
ScDPName
>&
rDataFieldNames
)
void
ScPivotLayoutDialog
::
PushDataFieldNames
(
std
::
vector
<
ScDPName
>&
rDataFieldNames
)
...
...
sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx
Dosyayı görüntüle @
343ec4b7
...
@@ -40,7 +40,7 @@ void ScPivotLayoutTreeListLabel::FillLabelFields(ScDPLabelDataVector& rLabelVect
...
@@ -40,7 +40,7 @@ void ScPivotLayoutTreeListLabel::FillLabelFields(ScDPLabelDataVector& rLabelVect
ScDPLabelDataVector
::
iterator
it
;
ScDPLabelDataVector
::
iterator
it
;
for
(
it
=
rLabelVector
.
begin
();
it
!=
rLabelVector
.
end
();
++
it
)
for
(
it
=
rLabelVector
.
begin
();
it
!=
rLabelVector
.
end
();
++
it
)
{
{
const
ScDPLabelData
&
rLabelData
=
*
it
;
const
ScDPLabelData
&
rLabelData
=
*
it
->
get
()
;
ScItemValue
*
pValue
=
new
ScItemValue
(
rLabelData
.
maName
,
rLabelData
.
mnCol
,
rLabelData
.
mnFuncMask
);
ScItemValue
*
pValue
=
new
ScItemValue
(
rLabelData
.
maName
,
rLabelData
.
mnCol
,
rLabelData
.
mnFuncMask
);
maItemValues
.
push_back
(
std
::
unique_ptr
<
ScItemValue
>
(
pValue
));
maItemValues
.
push_back
(
std
::
unique_ptr
<
ScItemValue
>
(
pValue
));
...
...
sc/source/ui/dbgui/pvfundlg.cxx
Dosyayı görüntüle @
343ec4b7
...
@@ -282,11 +282,11 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncDa
...
@@ -282,11 +282,11 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncDa
OUString
aSelectedEntry
;
OUString
aSelectedEntry
;
for
(
ScDPLabelDataVector
::
const_iterator
aIt
=
mrLabelVec
.
begin
(),
aEnd
=
mrLabelVec
.
end
();
aIt
!=
aEnd
;
++
aIt
)
for
(
ScDPLabelDataVector
::
const_iterator
aIt
=
mrLabelVec
.
begin
(),
aEnd
=
mrLabelVec
.
end
();
aIt
!=
aEnd
;
++
aIt
)
{
{
mpLbBaseField
->
InsertEntry
(
aIt
->
getDisplayName
());
mpLbBaseField
->
InsertEntry
(
(
*
aIt
)
->
getDisplayName
());
maBaseFieldNameMap
.
insert
(
maBaseFieldNameMap
.
insert
(
NameMapType
::
value_type
(
aIt
->
getDisplayName
(),
aIt
->
maName
));
NameMapType
::
value_type
(
(
*
aIt
)
->
getDisplayName
(),
(
*
aIt
)
->
maName
));
if
(
aIt
->
maName
==
rFuncData
.
maFieldRef
.
ReferenceField
)
if
(
(
*
aIt
)
->
maName
==
rFuncData
.
maFieldRef
.
ReferenceField
)
aSelectedEntry
=
aIt
->
getDisplayName
();
aSelectedEntry
=
(
*
aIt
)
->
getDisplayName
();
}
}
// base item list box
// base item list box
...
@@ -402,7 +402,7 @@ IMPL_LINK_TYPED( ScDPFunctionDlg, SelectHdl, ListBox&, rLBox, void )
...
@@ -402,7 +402,7 @@ IMPL_LINK_TYPED( ScDPFunctionDlg, SelectHdl, ListBox&, rLBox, void )
size_t
nBasePos
=
mpLbBaseField
->
GetSelectEntryPos
();
size_t
nBasePos
=
mpLbBaseField
->
GetSelectEntryPos
();
if
(
nBasePos
<
mrLabelVec
.
size
()
)
if
(
nBasePos
<
mrLabelVec
.
size
()
)
{
{
const
vector
<
ScDPLabelData
::
Member
>&
rMembers
=
mrLabelVec
[
nBasePos
]
.
maMembers
;
const
vector
<
ScDPLabelData
::
Member
>&
rMembers
=
mrLabelVec
[
nBasePos
]
->
maMembers
;
mbEmptyItem
=
lclFillListBox
(
*
mpLbBaseItem
,
rMembers
,
SC_BASEITEM_USER_POS
);
mbEmptyItem
=
lclFillListBox
(
*
mpLbBaseItem
,
rMembers
,
SC_BASEITEM_USER_POS
);
// build cache for base names.
// build cache for base names.
NameMapType
aMap
;
NameMapType
aMap
;
...
...
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