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
2d5c1a3f
Kaydet (Commit)
2d5c1a3f
authored
Mar 09, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Even more cleanup and fixing.
üst
d049b05a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
61 deletions
+29
-61
dptabdat.hxx
sc/inc/dptabdat.hxx
+2
-2
dptablecache.hxx
sc/inc/dptablecache.hxx
+0
-3
dptablecache.cxx
sc/source/core/data/dptablecache.cxx
+0
-50
dptabsrc.cxx
sc/source/core/data/dptabsrc.cxx
+27
-6
No files found.
sc/inc/dptabdat.hxx
Dosyayı görüntüle @
2d5c1a3f
...
...
@@ -60,8 +60,8 @@ namespace com { namespace sun { namespace star { namespace sheet {
#define SC_DAPI_LEVEL_QUARTER 1
#define SC_DAPI_LEVEL_MONTH 2
#define SC_DAPI_LEVEL_DAY 3
#define SC_DAPI_LEVEL_WEEK
1
#define SC_DAPI_LEVEL_WEEKDAY
2
#define SC_DAPI_LEVEL_WEEK
4
#define SC_DAPI_LEVEL_WEEKDAY
5
//
...
...
sc/inc/dptablecache.hxx
Dosyayı görüntüle @
2d5c1a3f
...
...
@@ -128,7 +128,6 @@ public:
void
RemoveReference
(
ScDPObject
*
pObj
)
const
;
const
ObjectSetType
&
GetAllReferences
()
const
;
SCROW
GetIdByItemData
(
long
nDim
,
const
rtl
::
OUString
&
sItemData
)
const
;
SCROW
GetIdByItemData
(
long
nDim
,
const
ScDPItemData
&
rItem
)
const
;
rtl
::
OUString
GetFormattedString
(
long
nDim
,
const
ScDPItemData
&
rItem
)
const
;
long
AppendGroupField
();
...
...
@@ -138,8 +137,6 @@ public:
void
GetGroupDimMemberIds
(
long
nDim
,
std
::
vector
<
SCROW
>&
rIds
)
const
;
void
ClearGroupFields
();
SCROW
GetAdditionalItemID
(
const
ScDPItemData
&
rData
)
const
;
SCCOL
GetDimensionIndex
(
const
rtl
::
OUString
&
sName
)
const
;
sal_uLong
GetNumberFormat
(
long
nDim
)
const
;
bool
IsDateDimension
(
long
nDim
)
const
;
...
...
sc/source/core/data/dptablecache.cxx
Dosyayı görüntüle @
2d5c1a3f
...
...
@@ -872,49 +872,6 @@ const ScDPCache::ObjectSetType& ScDPCache::GetAllReferences() const
return
maRefObjects
;
}
SCROW
ScDPCache
::
GetIdByItemData
(
long
nDim
,
const
rtl
::
OUString
&
sItemData
)
const
{
if
(
nDim
<
0
)
return
-
1
;
if
(
nDim
<
mnColumnCount
)
{
// source field.
const
DataListType
&
rItems
=
maFields
[
nDim
].
maItems
;
for
(
size_t
i
=
0
,
n
=
rItems
.
size
();
i
<
n
;
++
i
)
{
if
(
rItems
[
i
].
GetString
()
==
sItemData
)
return
i
;
}
if
(
!
maFields
[
nDim
].
mpGroup
)
return
-
1
;
// grouped source field.
const
DataListType
&
rGI
=
maFields
[
nDim
].
mpGroup
->
maItems
;
for
(
size_t
i
=
0
,
n
=
rGI
.
size
();
i
<
n
;
++
i
)
{
if
(
rGI
[
i
].
GetString
()
==
sItemData
)
return
rItems
.
size
()
+
i
;
}
return
-
1
;
}
// group field.
nDim
-=
mnColumnCount
;
if
(
static_cast
<
size_t
>
(
nDim
)
<
maGroupFields
.
size
())
{
const
DataListType
&
rGI
=
maGroupFields
[
nDim
].
maItems
;
for
(
size_t
i
=
0
,
n
=
rGI
.
size
();
i
<
n
;
++
i
)
{
if
(
rGI
[
i
].
GetString
()
==
sItemData
)
return
i
;
}
}
return
-
1
;
}
SCROW
ScDPCache
::
GetIdByItemData
(
long
nDim
,
const
ScDPItemData
&
rItem
)
const
{
if
(
nDim
<
0
)
...
...
@@ -1125,13 +1082,6 @@ void ScDPCache::ClearGroupFields()
std
::
for_each
(
maFields
.
begin
(),
maFields
.
end
(),
ClearGroupItems
());
}
SCROW
ScDPCache
::
GetAdditionalItemID
(
const
ScDPItemData
&
)
const
{
fprintf
(
stdout
,
"ScDPCache::GetAdditionalItemID: FIXME
\n
"
);
return
-
1
;
}
SCROW
ScDPCache
::
GetOrder
(
long
nDim
,
SCROW
nIndex
)
const
{
OSL_ENSURE
(
IsValid
(),
" IsValid() == false "
);
...
...
sc/source/core/data/dptabsrc.cxx
Dosyayı görüntüle @
2d5c1a3f
...
...
@@ -66,6 +66,7 @@
#include <com/sun/star/sheet/DataPilotFieldFilter.hpp>
#include <com/sun/star/sheet/DataPilotFieldReferenceType.hpp>
#include <com/sun/star/sheet/DataPilotFieldSortMode.hpp>
#include <com/sun/star/sheet/DataPilotFieldGroupBy.hpp>
#include <com/sun/star/sheet/DataPilotFieldAutoShowInfo.hpp>
#include <com/sun/star/table/CellAddress.hpp>
...
...
@@ -2490,7 +2491,8 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
}
else
if
(
nHier
!=
SC_DAPI_HIERARCHY_FLAT
&&
pSource
->
IsDateDimension
(
nSrcDim
)
)
{
long
nVal
=
0
;
sal_Int32
nGroupBy
=
0
;
sal_Int32
nVal
=
0
;
rtl
::
OUString
aName
;
if
(
nLev
==
SC_DAPI_LEVEL_YEAR
)
// YEAR is in both hierarchies
...
...
@@ -2521,14 +2523,33 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
else
nVal
=
nIndex
+
1
;
// Quarter, Day, Week are 1-based
switch
(
nLev
)
{
case
SC_DAPI_LEVEL_YEAR
:
nGroupBy
=
sheet
::
DataPilotFieldGroupBy
::
YEARS
;
break
;
case
SC_DAPI_LEVEL_QUARTER
:
case
SC_DAPI_LEVEL_WEEK
:
nGroupBy
=
sheet
::
DataPilotFieldGroupBy
::
QUARTERS
;
break
;
case
SC_DAPI_LEVEL_MONTH
:
case
SC_DAPI_LEVEL_WEEKDAY
:
nGroupBy
=
sheet
::
DataPilotFieldGroupBy
::
MONTHS
;
break
;
case
SC_DAPI_LEVEL_DAY
:
nGroupBy
=
sheet
::
DataPilotFieldGroupBy
::
DAYS
;
break
;
nGroupBy
=
sheet
::
DataPilotFieldGroupBy
::
YEARS
;
break
;
default
:
;
}
if
(
aName
.
isEmpty
())
aName
=
rtl
::
OUString
::
valueOf
(
nVal
);
// TODO: This needs fixing.
fprintf
(
stdout
,
"ScDPMembers::getByIndex: FIXME
\n
"
);
ScDPItemData
aData
(
nVal
);
pNew
=
new
ScDPMember
(
pSource
,
nDim
,
nHier
,
nLev
,
pSource
->
GetCache
()
->
GetAdditionalItemID
(
aData
));
ScDPItemData
aData
(
nGroupBy
,
nVal
);
SCROW
nId
=
pSource
->
GetCache
()
->
GetIdByItemData
(
nDim
,
aData
);
pNew
=
new
ScDPMember
(
pSource
,
nDim
,
nHier
,
nLev
,
nId
);
}
else
{
...
...
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