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
16bbecab
Kaydet (Commit)
16bbecab
authored
Mar 24, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ScDPDateGroupHelper class is no more.
üst
7a1401e9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
113 deletions
+25
-113
dpgroup.hxx
sc/inc/dpgroup.hxx
+5
-28
dpdimsave.cxx
sc/source/core/data/dpdimsave.cxx
+2
-2
dpgroup.cxx
sc/source/core/data/dpgroup.cxx
+17
-82
xepivot.cxx
sc/source/filter/excel/xepivot.cxx
+1
-1
No files found.
sc/inc/dpgroup.hxx
Dosyayı görüntüle @
16bbecab
...
@@ -41,28 +41,6 @@
...
@@ -41,28 +41,6 @@
class
ScDocument
;
class
ScDocument
;
class
SvNumberFormatter
;
class
SvNumberFormatter
;
// ScDPDateGroupHelper is used as part of ScDPGroupDimension (additional dim.)
// or ScDPNumGroupDimension (innermost, replaces the original dim.).
// Source index, name and result collection are stored at the parent.
class
ScDPDateGroupHelper
{
ScDPNumGroupInfo
aNumInfo
;
// only start and end (incl. auto flags) are used
sal_Int32
nDatePart
;
// single part
long
mnGroupDim
;
public
:
ScDPDateGroupHelper
(
const
ScDPNumGroupInfo
&
rInfo
,
long
nDim
,
sal_Int32
nPart
);
~
ScDPDateGroupHelper
();
void
SetGroupDim
(
long
nDim
);
sal_Int32
GetDatePart
()
const
{
return
nDatePart
;
}
const
ScDPNumGroupInfo
&
GetNumInfo
()
const
{
return
aNumInfo
;
}
void
FillColumnEntries
(
const
ScDPCache
*
pCache
,
std
::
vector
<
SCROW
>&
rEntries
)
const
;
};
typedef
::
std
::
vector
<
ScDPItemData
>
ScDPItemDataVec
;
typedef
::
std
::
vector
<
ScDPItemData
>
ScDPItemDataVec
;
class
ScDPGroupItem
class
ScDPGroupItem
...
@@ -90,9 +68,9 @@ class ScDPGroupDimension
...
@@ -90,9 +68,9 @@ class ScDPGroupDimension
long
nSourceDim
;
long
nSourceDim
;
long
nGroupDim
;
long
nGroupDim
;
rtl
::
OUString
aGroupName
;
rtl
::
OUString
aGroupName
;
ScDPDateGroupHelper
*
pDateHelper
;
ScDPGroupItemVec
aItems
;
ScDPGroupItemVec
aItems
;
mutable
::
std
::
vector
<
SCROW
>
maMemberEntries
;
mutable
std
::
vector
<
SCROW
>
maMemberEntries
;
bool
mbDateDimension
;
public
:
public
:
ScDPGroupDimension
(
long
nSource
,
const
String
&
rNewName
);
ScDPGroupDimension
(
long
nSource
,
const
String
&
rNewName
);
ScDPGroupDimension
(
const
ScDPGroupDimension
&
rOther
);
ScDPGroupDimension
(
const
ScDPGroupDimension
&
rOther
);
...
@@ -112,12 +90,11 @@ public:
...
@@ -112,12 +90,11 @@ public:
const
ScDPGroupItem
*
GetGroupForName
(
const
ScDPItemData
&
rName
)
const
;
// rName = entry in group dim.
const
ScDPGroupItem
*
GetGroupForName
(
const
ScDPItemData
&
rName
)
const
;
// rName = entry in group dim.
const
ScDPGroupItem
*
GetGroupByIndex
(
size_t
nIndex
)
const
;
const
ScDPGroupItem
*
GetGroupByIndex
(
size_t
nIndex
)
const
;
void
MakeDateHelper
(
const
ScDPNumGroupInfo
&
rInfo
,
sal_Int32
nPart
);
void
DisposeData
();
void
DisposeData
();
size_t
GetItemCount
()
const
{
return
aItems
.
size
();
}
size_t
GetItemCount
()
const
{
return
aItems
.
size
();
}
void
SetDateDimension
();
bool
IsDateDimension
()
const
;
bool
IsDateDimension
()
const
;
};
};
...
@@ -126,8 +103,8 @@ typedef ::std::vector<ScDPGroupDimension> ScDPGroupDimensionVec;
...
@@ -126,8 +103,8 @@ typedef ::std::vector<ScDPGroupDimension> ScDPGroupDimensionVec;
class
SC_DLLPUBLIC
ScDPNumGroupDimension
class
SC_DLLPUBLIC
ScDPNumGroupDimension
{
{
mutable
ScDPNumGroupInfo
aGroupInfo
;
// settings
mutable
ScDPNumGroupInfo
aGroupInfo
;
// settings
ScDPDateGroupHelper
*
pDateHelper
;
mutable
std
::
vector
<
SCROW
>
maMemberEntries
;
mutable
std
::
vector
<
SCROW
>
maMemberEntries
;
bool
mbDateDimension
;
public
:
public
:
ScDPNumGroupDimension
();
ScDPNumGroupDimension
();
...
@@ -141,7 +118,7 @@ public:
...
@@ -141,7 +118,7 @@ public:
const
std
::
vector
<
SCROW
>&
GetNumEntries
(
SCCOL
nSourceDim
,
const
ScDPCache
*
pCache
)
const
;
const
std
::
vector
<
SCROW
>&
GetNumEntries
(
SCCOL
nSourceDim
,
const
ScDPCache
*
pCache
)
const
;
void
MakeDateHelper
(
const
ScDPNumGroupInfo
&
rInfo
,
long
nDim
,
sal_Int32
nPart
);
void
SetDateDimension
(
);
void
DisposeData
();
void
DisposeData
();
...
...
sc/source/core/data/dpdimsave.cxx
Dosyayı görüntüle @
16bbecab
...
@@ -379,7 +379,7 @@ void ScDPSaveGroupDimension::AddToData( ScDPGroupTableData& rData ) const
...
@@ -379,7 +379,7 @@ void ScDPSaveGroupDimension::AddToData( ScDPGroupTableData& rData ) const
{
{
// date grouping
// date grouping
aDim
.
MakeDateHelper
(
aDateInfo
,
nDatePart
);
aDim
.
SetDateDimension
(
);
}
}
else
else
{
{
...
@@ -459,7 +459,7 @@ void ScDPSaveNumGroupDimension::AddToData( ScDPGroupTableData& rData ) const
...
@@ -459,7 +459,7 @@ void ScDPSaveNumGroupDimension::AddToData( ScDPGroupTableData& rData ) const
{
{
ScDPNumGroupDimension
aDim
(
aGroupInfo
);
// aGroupInfo: value grouping
ScDPNumGroupDimension
aDim
(
aGroupInfo
);
// aGroupInfo: value grouping
if
(
nDatePart
)
if
(
nDatePart
)
aDim
.
MakeDateHelper
(
aDateInfo
,
nSource
,
nDatePart
);
// date grouping
aDim
.
SetDateDimension
();
rData
.
SetNumGroupDimension
(
nSource
,
aDim
);
rData
.
SetNumGroupDimension
(
nSource
,
aDim
);
}
}
...
...
sc/source/core/data/dpgroup.cxx
Dosyayı görüntüle @
16bbecab
...
@@ -240,19 +240,6 @@ bool ScDPGroupDateFilter::match( const ScDPItemData & rCellData ) const
...
@@ -240,19 +240,6 @@ bool ScDPGroupDateFilter::match( const ScDPItemData & rCellData ) const
return
false
;
return
false
;
}
}
// -----------------------------------------------------------------------
ScDPDateGroupHelper
::
ScDPDateGroupHelper
(
const
ScDPNumGroupInfo
&
rInfo
,
long
nDim
,
sal_Int32
nPart
)
:
aNumInfo
(
rInfo
),
nDatePart
(
nPart
),
mnGroupDim
(
nDim
)
{
}
ScDPDateGroupHelper
::~
ScDPDateGroupHelper
()
{
}
namespace
{
namespace
{
...
@@ -304,18 +291,6 @@ bool isDateInGroup(const ScDPItemData& rGroupItem, const ScDPItemData& rChildIte
...
@@ -304,18 +291,6 @@ bool isDateInGroup(const ScDPItemData& rGroupItem, const ScDPItemData& rChildIte
}
}
void
ScDPDateGroupHelper
::
SetGroupDim
(
long
nDim
)
{
mnGroupDim
=
nDim
;
}
void
ScDPDateGroupHelper
::
FillColumnEntries
(
const
ScDPCache
*
pCache
,
std
::
vector
<
SCROW
>&
rEntries
)
const
{
pCache
->
GetGroupDimMemberIds
(
mnGroupDim
,
rEntries
);
}
// -----------------------------------------------------------------------
ScDPGroupItem
::
ScDPGroupItem
(
const
ScDPItemData
&
rName
)
:
ScDPGroupItem
::
ScDPGroupItem
(
const
ScDPItemData
&
rName
)
:
aGroupName
(
rName
)
aGroupName
(
rName
)
{
{
...
@@ -361,13 +336,12 @@ ScDPGroupDimension::ScDPGroupDimension( long nSource, const String& rNewName ) :
...
@@ -361,13 +336,12 @@ ScDPGroupDimension::ScDPGroupDimension( long nSource, const String& rNewName ) :
nSourceDim
(
nSource
),
nSourceDim
(
nSource
),
nGroupDim
(
-
1
),
nGroupDim
(
-
1
),
aGroupName
(
rNewName
),
aGroupName
(
rNewName
),
pDateHelper
(
NULL
)
mbDateDimension
(
false
)
{
{
}
}
ScDPGroupDimension
::~
ScDPGroupDimension
()
ScDPGroupDimension
::~
ScDPGroupDimension
()
{
{
delete
pDateHelper
;
maMemberEntries
.
clear
();
maMemberEntries
.
clear
();
}
}
...
@@ -375,11 +349,9 @@ ScDPGroupDimension::ScDPGroupDimension( const ScDPGroupDimension& rOther ) :
...
@@ -375,11 +349,9 @@ ScDPGroupDimension::ScDPGroupDimension( const ScDPGroupDimension& rOther ) :
nSourceDim
(
rOther
.
nSourceDim
),
nSourceDim
(
rOther
.
nSourceDim
),
nGroupDim
(
rOther
.
nGroupDim
),
nGroupDim
(
rOther
.
nGroupDim
),
aGroupName
(
rOther
.
aGroupName
),
aGroupName
(
rOther
.
aGroupName
),
pDateHelper
(
NULL
),
aItems
(
rOther
.
aItems
),
aItems
(
rOther
.
aItems
)
mbDateDimension
(
rOther
.
mbDateDimension
)
{
{
if
(
rOther
.
pDateHelper
)
pDateHelper
=
new
ScDPDateGroupHelper
(
*
rOther
.
pDateHelper
);
}
}
ScDPGroupDimension
&
ScDPGroupDimension
::
operator
=
(
const
ScDPGroupDimension
&
rOther
)
ScDPGroupDimension
&
ScDPGroupDimension
::
operator
=
(
const
ScDPGroupDimension
&
rOther
)
...
@@ -388,22 +360,10 @@ ScDPGroupDimension& ScDPGroupDimension::operator=( const ScDPGroupDimension& rOt
...
@@ -388,22 +360,10 @@ ScDPGroupDimension& ScDPGroupDimension::operator=( const ScDPGroupDimension& rOt
nGroupDim
=
rOther
.
nGroupDim
;
nGroupDim
=
rOther
.
nGroupDim
;
aGroupName
=
rOther
.
aGroupName
;
aGroupName
=
rOther
.
aGroupName
;
aItems
=
rOther
.
aItems
;
aItems
=
rOther
.
aItems
;
mbDateDimension
=
rOther
.
mbDateDimension
;
delete
pDateHelper
;
if
(
rOther
.
pDateHelper
)
pDateHelper
=
new
ScDPDateGroupHelper
(
*
rOther
.
pDateHelper
);
else
pDateHelper
=
NULL
;
return
*
this
;
return
*
this
;
}
}
void
ScDPGroupDimension
::
MakeDateHelper
(
const
ScDPNumGroupInfo
&
rInfo
,
sal_Int32
nPart
)
{
delete
pDateHelper
;
pDateHelper
=
new
ScDPDateGroupHelper
(
rInfo
,
nGroupDim
,
nPart
);
}
void
ScDPGroupDimension
::
AddItem
(
const
ScDPGroupItem
&
rItem
)
void
ScDPGroupDimension
::
AddItem
(
const
ScDPGroupItem
&
rItem
)
{
{
aItems
.
push_back
(
rItem
);
aItems
.
push_back
(
rItem
);
...
@@ -412,8 +372,6 @@ void ScDPGroupDimension::AddItem( const ScDPGroupItem& rItem )
...
@@ -412,8 +372,6 @@ void ScDPGroupDimension::AddItem( const ScDPGroupItem& rItem )
void
ScDPGroupDimension
::
SetGroupDim
(
long
nDim
)
void
ScDPGroupDimension
::
SetGroupDim
(
long
nDim
)
{
{
nGroupDim
=
nDim
;
nGroupDim
=
nDim
;
if
(
pDateHelper
)
pDateHelper
->
SetGroupDim
(
nDim
);
}
}
const
std
::
vector
<
SCROW
>&
ScDPGroupDimension
::
GetColumnEntries
(
const
std
::
vector
<
SCROW
>&
ScDPGroupDimension
::
GetColumnEntries
(
...
@@ -422,12 +380,6 @@ const std::vector<SCROW>& ScDPGroupDimension::GetColumnEntries(
...
@@ -422,12 +380,6 @@ const std::vector<SCROW>& ScDPGroupDimension::GetColumnEntries(
if
(
!
maMemberEntries
.
empty
())
if
(
!
maMemberEntries
.
empty
())
return
maMemberEntries
;
return
maMemberEntries
;
if
(
pDateHelper
)
{
pDateHelper
->
FillColumnEntries
(
rCacheTable
.
getCache
(),
maMemberEntries
);
return
maMemberEntries
;
}
rCacheTable
.
getCache
()
->
GetGroupDimMemberIds
(
nGroupDim
,
maMemberEntries
);
rCacheTable
.
getCache
()
->
GetGroupDimMemberIds
(
nGroupDim
,
maMemberEntries
);
return
maMemberEntries
;
return
maMemberEntries
;
}
}
...
@@ -465,37 +417,30 @@ void ScDPGroupDimension::DisposeData()
...
@@ -465,37 +417,30 @@ void ScDPGroupDimension::DisposeData()
maMemberEntries
.
clear
();
maMemberEntries
.
clear
();
}
}
void
ScDPGroupDimension
::
SetDateDimension
()
{
mbDateDimension
=
true
;
}
bool
ScDPGroupDimension
::
IsDateDimension
()
const
bool
ScDPGroupDimension
::
IsDateDimension
()
const
{
{
return
pDateHelper
!=
NULL
;
return
mbDateDimension
;
}
}
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
ScDPNumGroupDimension
::
ScDPNumGroupDimension
()
:
ScDPNumGroupDimension
::
ScDPNumGroupDimension
()
:
mbDateDimension
(
false
)
{}
pDateHelper
(
NULL
)
{}
ScDPNumGroupDimension
::
ScDPNumGroupDimension
(
const
ScDPNumGroupInfo
&
rInfo
)
:
ScDPNumGroupDimension
::
ScDPNumGroupDimension
(
const
ScDPNumGroupInfo
&
rInfo
)
:
aGroupInfo
(
rInfo
),
pDateHelper
(
NULL
)
{}
aGroupInfo
(
rInfo
),
mbDateDimension
(
false
)
{}
ScDPNumGroupDimension
::
ScDPNumGroupDimension
(
const
ScDPNumGroupDimension
&
rOther
)
:
ScDPNumGroupDimension
::
ScDPNumGroupDimension
(
const
ScDPNumGroupDimension
&
rOther
)
:
aGroupInfo
(
rOther
.
aGroupInfo
),
aGroupInfo
(
rOther
.
aGroupInfo
),
mbDateDimension
(
rOther
.
mbDateDimension
)
{}
pDateHelper
(
NULL
)
{
if
(
rOther
.
pDateHelper
)
pDateHelper
=
new
ScDPDateGroupHelper
(
*
rOther
.
pDateHelper
);
}
ScDPNumGroupDimension
&
ScDPNumGroupDimension
::
operator
=
(
const
ScDPNumGroupDimension
&
rOther
)
ScDPNumGroupDimension
&
ScDPNumGroupDimension
::
operator
=
(
const
ScDPNumGroupDimension
&
rOther
)
{
{
aGroupInfo
=
rOther
.
aGroupInfo
;
aGroupInfo
=
rOther
.
aGroupInfo
;
mbDateDimension
=
rOther
.
mbDateDimension
;
delete
pDateHelper
;
if
(
rOther
.
pDateHelper
)
pDateHelper
=
new
ScDPDateGroupHelper
(
*
rOther
.
pDateHelper
);
else
pDateHelper
=
NULL
;
return
*
this
;
return
*
this
;
}
}
...
@@ -507,20 +452,17 @@ void ScDPNumGroupDimension::DisposeData()
...
@@ -507,20 +452,17 @@ void ScDPNumGroupDimension::DisposeData()
bool
ScDPNumGroupDimension
::
IsDateDimension
()
const
bool
ScDPNumGroupDimension
::
IsDateDimension
()
const
{
{
return
pDateHelper
!=
NULL
;
return
mbDateDimension
;
}
}
ScDPNumGroupDimension
::~
ScDPNumGroupDimension
()
ScDPNumGroupDimension
::~
ScDPNumGroupDimension
()
{
{
delete
pDateHelper
;
}
}
void
ScDPNumGroupDimension
::
MakeDateHelper
(
const
ScDPNumGroupInfo
&
rInfo
,
long
nDim
,
sal_Int32
nPart
)
void
ScDPNumGroupDimension
::
SetDateDimension
(
)
{
{
delete
pDateHelper
;
pDateHelper
=
new
ScDPDateGroupHelper
(
rInfo
,
nDim
,
nPart
);
aGroupInfo
.
mbEnable
=
true
;
//! or query both?
aGroupInfo
.
mbEnable
=
true
;
//! or query both?
mbDateDimension
=
true
;
}
}
const
std
::
vector
<
SCROW
>&
ScDPNumGroupDimension
::
GetNumEntries
(
const
std
::
vector
<
SCROW
>&
ScDPNumGroupDimension
::
GetNumEntries
(
...
@@ -529,13 +471,6 @@ const std::vector<SCROW>& ScDPNumGroupDimension::GetNumEntries(
...
@@ -529,13 +471,6 @@ const std::vector<SCROW>& ScDPNumGroupDimension::GetNumEntries(
if
(
!
maMemberEntries
.
empty
())
if
(
!
maMemberEntries
.
empty
())
return
maMemberEntries
;
return
maMemberEntries
;
if
(
pDateHelper
)
{
// Grouped by dates.
pDateHelper
->
FillColumnEntries
(
pCache
,
maMemberEntries
);
return
maMemberEntries
;
}
pCache
->
GetGroupDimMemberIds
(
nSourceDim
,
maMemberEntries
);
pCache
->
GetGroupDimMemberIds
(
nSourceDim
,
maMemberEntries
);
return
maMemberEntries
;
return
maMemberEntries
;
}
}
...
...
sc/source/filter/excel/xepivot.cxx
Dosyayı görüntüle @
16bbecab
...
@@ -553,7 +553,7 @@ void XclExpPCField::InsertNumDateGroupItems( const ScDPObject& rDPObj, const ScD
...
@@ -553,7 +553,7 @@ void XclExpPCField::InsertNumDateGroupItems( const ScDPObject& rDPObj, const ScD
// get the string collection with generated grouping elements
// get the string collection with generated grouping elements
ScDPNumGroupDimension
aTmpDim
(
rNumInfo
);
ScDPNumGroupDimension
aTmpDim
(
rNumInfo
);
if
(
nDatePart
!=
0
)
if
(
nDatePart
!=
0
)
aTmpDim
.
MakeDateHelper
(
rNumInfo
,
mnFieldIdx
,
nDatePart
);
aTmpDim
.
SetDateDimension
(
);
const
std
::
vector
<
SCROW
>&
aMemberIds
=
aTmpDim
.
GetNumEntries
(
const
std
::
vector
<
SCROW
>&
aMemberIds
=
aTmpDim
.
GetNumEntries
(
static_cast
<
SCCOL
>
(
nDim
),
pCache
);
static_cast
<
SCCOL
>
(
nDim
),
pCache
);
for
(
size_t
nIdx
=
0
;
nIdx
<
aMemberIds
.
size
();
nIdx
++
)
for
(
size_t
nIdx
=
0
;
nIdx
<
aMemberIds
.
size
();
nIdx
++
)
...
...
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