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
8f6e3118
Kaydet (Commit)
8f6e3118
authored
Ara 10, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Allow dumping of internal states of pivot table objects for debugging.
Change-Id: I5021ef61d9238da352e13bdd81a2f3607d0fb4aa
üst
eebc75ea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
128 additions
and
0 deletions
+128
-0
dpobject.hxx
sc/inc/dpobject.hxx
+4
-0
dpsave.hxx
sc/inc/dpsave.hxx
+13
-0
dpobject.cxx
sc/source/core/data/dpobject.cxx
+28
-0
dpsave.cxx
sc/source/core/data/dpsave.cxx
+83
-0
No files found.
sc/inc/dpobject.hxx
Dosyayı görüntüle @
8f6e3118
...
@@ -406,6 +406,10 @@ public:
...
@@ -406,6 +406,10 @@ public:
bool
IntersectsTableByRows
(
SCCOL
nCol
,
SCROW
nRow1
,
SCROW
nRow2
,
SCTAB
nTab
)
const
;
bool
IntersectsTableByRows
(
SCCOL
nCol
,
SCROW
nRow1
,
SCROW
nRow2
,
SCTAB
nTab
)
const
;
bool
HasTable
(
const
ScRange
&
rRange
)
const
;
bool
HasTable
(
const
ScRange
&
rRange
)
const
;
#if DEBUG_PIVOT_TABLE
void
DumpTables
()
const
;
#endif
private
:
private
:
/** Only to be called from ScDPCache::RemoveReference(). */
/** Only to be called from ScDPCache::RemoveReference(). */
void
RemoveCache
(
const
ScDPCache
*
pCache
);
void
RemoveCache
(
const
ScDPCache
*
pCache
);
...
...
sc/inc/dpsave.hxx
Dosyayı görüntüle @
8f6e3118
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include <sal/types.h>
#include <sal/types.h>
#include "scdllapi.h"
#include "scdllapi.h"
#include "calcmacros.hxx"
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
sheet
{
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
sheet
{
struct
DataPilotFieldReference
;
struct
DataPilotFieldReference
;
...
@@ -85,6 +86,10 @@ public:
...
@@ -85,6 +86,10 @@ public:
void
WriteToSource
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XInterface
>&
xMember
,
void
WriteToSource
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XInterface
>&
xMember
,
sal_Int32
nPosition
);
sal_Int32
nPosition
);
#if DEBUG_PIVOT_TABLE
void
Dump
(
int
nIndent
=
0
)
const
;
#endif
};
};
...
@@ -222,6 +227,10 @@ public:
...
@@ -222,6 +227,10 @@ public:
bool
HasInvisibleMember
()
const
;
bool
HasInvisibleMember
()
const
;
void
RemoveObsoleteMembers
(
const
MemberSetType
&
rMembers
);
void
RemoveObsoleteMembers
(
const
MemberSetType
&
rMembers
);
#if DEBUG_PIVOT_TABLE
void
Dump
(
int
nIndent
=
0
)
const
;
#endif
};
};
...
@@ -357,6 +366,10 @@ public:
...
@@ -357,6 +366,10 @@ public:
*/
*/
SC_DLLPUBLIC
bool
HasInvisibleMember
(
const
OUString
&
rDimName
)
const
;
SC_DLLPUBLIC
bool
HasInvisibleMember
(
const
OUString
&
rDimName
)
const
;
#if DEBUG_PIVOT_TABLE
void
Dump
()
const
;
#endif
private
:
private
:
void
CheckDuplicateName
(
ScDPSaveDimension
&
rDim
);
void
CheckDuplicateName
(
ScDPSaveDimension
&
rDim
);
void
RemoveDuplicateNameCount
(
const
OUString
&
rName
);
void
RemoveDuplicateNameCount
(
const
OUString
&
rName
);
...
...
sc/source/core/data/dpobject.cxx
Dosyayı görüntüle @
8f6e3118
...
@@ -3640,6 +3640,34 @@ bool ScDPCollection::HasTable( const ScRange& rRange ) const
...
@@ -3640,6 +3640,34 @@ bool ScDPCollection::HasTable( const ScRange& rRange ) const
maTables
.
begin
(),
maTables
.
end
(),
FindIntersectingTable
(
rRange
))
!=
maTables
.
end
();
maTables
.
begin
(),
maTables
.
end
(),
FindIntersectingTable
(
rRange
))
!=
maTables
.
end
();
}
}
#if DEBUG_PIVOT_TABLE
namespace
{
struct
DumpTable
:
std
::
unary_function
<
ScDPObject
,
void
>
{
void
operator
()
(
const
ScDPObject
&
rObj
)
const
{
cout
<<
"-- '"
<<
rObj
.
GetName
()
<<
"'"
<<
endl
;
ScDPSaveData
*
pSaveData
=
rObj
.
GetSaveData
();
if
(
!
pSaveData
)
return
;
pSaveData
->
Dump
();
cout
<<
endl
;
// blank line
}
};
}
void
ScDPCollection
::
DumpTables
()
const
{
std
::
for_each
(
maTables
.
begin
(),
maTables
.
end
(),
DumpTable
());
}
#endif
void
ScDPCollection
::
RemoveCache
(
const
ScDPCache
*
pCache
)
void
ScDPCollection
::
RemoveCache
(
const
ScDPCache
*
pCache
)
{
{
if
(
maSheetCaches
.
remove
(
pCache
))
if
(
maSheetCaches
.
remove
(
pCache
))
...
...
sc/source/core/data/dpsave.cxx
Dosyayı görüntüle @
8f6e3118
...
@@ -164,6 +164,30 @@ void ScDPSaveMember::WriteToSource( const uno::Reference<uno::XInterface>& xMemb
...
@@ -164,6 +164,30 @@ void ScDPSaveMember::WriteToSource( const uno::Reference<uno::XInterface>& xMemb
}
}
}
}
#if DEBUG_PIVOT_TABLE
void
ScDPSaveMember
::
Dump
(
int
nIndent
)
const
{
std
::
string
aIndent
(
nIndent
*
4
,
' '
);
cout
<<
aIndent
<<
"* member name: '"
<<
aName
<<
"'"
<<
endl
;
cout
<<
aIndent
<<
" + layout name: "
;
if
(
mpLayoutName
)
cout
<<
"'"
<<
*
mpLayoutName
<<
"'"
;
else
cout
<<
"(none)"
;
cout
<<
endl
;
cout
<<
aIndent
<<
" + visibility: "
;
if
(
nVisibleMode
==
SC_DPSAVEMODE_DONTKNOW
)
cout
<<
"(unknown)"
;
else
cout
<<
(
nVisibleMode
?
"visible"
:
"hidden"
);
cout
<<
endl
;
}
#endif
ScDPSaveDimension
::
ScDPSaveDimension
(
const
OUString
&
rName
,
bool
bDataLayout
)
:
ScDPSaveDimension
::
ScDPSaveDimension
(
const
OUString
&
rName
,
bool
bDataLayout
)
:
aName
(
rName
),
aName
(
rName
),
mpLayoutName
(
NULL
),
mpLayoutName
(
NULL
),
...
@@ -702,6 +726,51 @@ void ScDPSaveDimension::RemoveObsoleteMembers(const MemberSetType& rMembers)
...
@@ -702,6 +726,51 @@ void ScDPSaveDimension::RemoveObsoleteMembers(const MemberSetType& rMembers)
maMemberList
.
swap
(
aNew
);
maMemberList
.
swap
(
aNew
);
}
}
#if DEBUG_PIVOT_TABLE
void
ScDPSaveDimension
::
Dump
(
int
nIndent
)
const
{
static
const
char
*
pOrientNames
[]
=
{
"hidden"
,
"column"
,
"row"
,
"page"
,
"data"
};
std
::
string
aIndent
(
nIndent
*
4
,
' '
);
cout
<<
aIndent
<<
"* dimension name: '"
<<
aName
<<
"'"
<<
endl
;
cout
<<
aIndent
<<
" + orientation: "
;
if
(
nOrientation
<=
4
)
cout
<<
pOrientNames
[
nOrientation
];
else
cout
<<
"(invalid)"
;
cout
<<
endl
;
cout
<<
aIndent
<<
" + layout name: "
;
if
(
mpLayoutName
)
cout
<<
"'"
<<
*
mpLayoutName
<<
"'"
;
else
cout
<<
"(none)"
;
cout
<<
endl
;
cout
<<
aIndent
<<
" + subtotal name: "
;
if
(
mpSubtotalName
)
cout
<<
"'"
<<
*
mpSubtotalName
<<
"'"
;
else
cout
<<
"(none)"
;
cout
<<
endl
;
cout
<<
aIndent
<<
" + is data layout: "
<<
(
bIsDataLayout
?
"yes"
:
"no"
)
<<
endl
;
cout
<<
aIndent
<<
" + is duplicate: "
<<
(
bDupFlag
?
"yes"
:
"no"
)
<<
endl
;
MemberList
::
const_iterator
itMem
=
maMemberList
.
begin
(),
itMemEnd
=
maMemberList
.
end
();
for
(;
itMem
!=
itMemEnd
;
++
itMem
)
{
ScDPSaveMember
*
pMem
=
*
itMem
;
pMem
->
Dump
(
nIndent
+
1
);
}
cout
<<
endl
;
// blank line
}
#endif
ScDPSaveData
::
ScDPSaveData
()
:
ScDPSaveData
::
ScDPSaveData
()
:
pDimensionData
(
NULL
),
pDimensionData
(
NULL
),
nColumnGrandMode
(
SC_DPSAVEMODE_DONTKNOW
),
nColumnGrandMode
(
SC_DPSAVEMODE_DONTKNOW
),
...
@@ -1354,6 +1423,20 @@ bool ScDPSaveData::HasInvisibleMember(const OUString& rDimName) const
...
@@ -1354,6 +1423,20 @@ bool ScDPSaveData::HasInvisibleMember(const OUString& rDimName) const
return
pDim
->
HasInvisibleMember
();
return
pDim
->
HasInvisibleMember
();
}
}
#if DEBUG_PIVOT_TABLE
void
ScDPSaveData
::
Dump
()
const
{
DimsType
::
const_iterator
itDim
=
aDimList
.
begin
(),
itDimEnd
=
aDimList
.
end
();
for
(;
itDim
!=
itDimEnd
;
++
itDim
)
{
const
ScDPSaveDimension
&
rDim
=
*
itDim
;
rDim
.
Dump
();
}
}
#endif
void
ScDPSaveData
::
CheckDuplicateName
(
ScDPSaveDimension
&
rDim
)
void
ScDPSaveData
::
CheckDuplicateName
(
ScDPSaveDimension
&
rDim
)
{
{
const
OUString
aName
=
ScDPUtil
::
getSourceDimensionName
(
rDim
.
GetName
());
const
OUString
aName
=
ScDPUtil
::
getSourceDimensionName
(
rDim
.
GetName
());
...
...
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