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
1e50a93d
Kaydet (Commit)
1e50a93d
authored
Eyl 15, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Determine data size in cache that doesn't include trailing empty rows.
Change-Id: I47632b7ae93f4e68c4512fc30f4e4fe18e1c5f4d
üst
123206d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
dpcache.hxx
sc/inc/dpcache.hxx
+4
-2
dpcache.cxx
sc/source/core/data/dpcache.cxx
+20
-0
dpcachetable.cxx
sc/source/core/data/dpcachetable.cxx
+1
-0
No files found.
sc/inc/dpcache.hxx
Dosyayı görüntüle @
1e50a93d
...
...
@@ -130,6 +130,7 @@ private:
LabelsType
maLabelNames
;
// Stores dimension names.
mdds
::
flat_segment_tree
<
SCROW
,
bool
>
maEmptyRows
;
SCROW
mnDataSize
;
bool
mbDisposing
;
...
...
@@ -159,8 +160,9 @@ public:
bool
InitFromDoc
(
ScDocument
*
pDoc
,
const
ScRange
&
rRange
);
bool
InitFromDataBase
(
DBConnector
&
rDB
);
SCROW
GetRowCount
()
const
;
SCROW
GetItemDataId
(
sal_uInt16
nDim
,
SCROW
nRow
,
bool
bRepeatIfEmpty
)
const
;
SCROW
GetRowCount
()
const
;
SCROW
GetDataSize
()
const
;
SCROW
GetItemDataId
(
sal_uInt16
nDim
,
SCROW
nRow
,
bool
bRepeatIfEmpty
)
const
;
rtl
::
OUString
GetDimensionName
(
LabelsType
::
size_type
nDim
)
const
;
bool
IsRowEmpty
(
SCROW
nRow
)
const
;
bool
ValidQuery
(
SCROW
nRow
,
const
ScQueryParam
&
rQueryParam
)
const
;
...
...
sc/source/core/data/dpcache.cxx
Dosyayı görüntüle @
1e50a93d
...
...
@@ -65,6 +65,7 @@ ScDPCache::ScDPCache(ScDocument* pDoc) :
mpDoc
(
pDoc
),
mnColumnCount
(
0
),
maEmptyRows
(
0
,
MAXROW
,
true
),
mnDataSize
(
-
1
),
mbDisposing
(
false
)
{
}
...
...
@@ -654,7 +655,21 @@ public:
void
ScDPCache
::
PostInit
()
{
OSL_ENSURE
(
!
maFields
.
empty
(),
"Cache not initialized!"
);
maEmptyRows
.
build_tree
();
typedef
mdds
::
flat_segment_tree
<
SCROW
,
bool
>::
const_reverse_iterator
itr_type
;
itr_type
it
=
maEmptyRows
.
rbegin
(),
itEnd
=
maEmptyRows
.
rend
();
OSL_ENSURE
(
it
!=
itEnd
,
"corrupt flat_segment_tree instance!"
);
mnDataSize
=
maFields
[
0
].
maItems
.
size
();
++
it
;
// Skip the first position.
OSL_ENSURE
(
it
!=
itEnd
,
"buggy version of flat_segment_tree is used."
);
if
(
it
->
second
)
{
SCROW
nLastNonEmpty
=
it
->
first
-
1
;
if
(
nLastNonEmpty
<
mnDataSize
)
mnDataSize
=
nLastNonEmpty
;
}
}
void
ScDPCache
::
Clear
()
...
...
@@ -753,6 +768,11 @@ SCROW ScDPCache::GetRowCount() const
return
maFields
[
0
].
maData
.
size
();
}
SCROW
ScDPCache
::
GetDataSize
()
const
{
return
mnDataSize
>=
0
?
mnDataSize
:
0
;
}
const
ScDPCache
::
ItemsType
&
ScDPCache
::
GetDimMemberValues
(
SCCOL
nDim
)
const
{
OSL_ENSURE
(
nDim
>=
0
&&
nDim
<
mnColumnCount
,
" nDim < mnColumnCount "
);
...
...
sc/source/core/data/dpcachetable.cxx
Dosyayı görüntüle @
1e50a93d
...
...
@@ -147,6 +147,7 @@ void ScDPCacheTable::fillTable(
const
ScQueryParam
&
rQuery
,
bool
bIgnoreEmptyRows
,
bool
bRepeatIfEmpty
)
{
const
SCROW
nRowCount
=
getRowSize
();
SCROW
nDataSize
=
mpCache
->
GetDataSize
();
const
SCCOL
nColCount
=
(
SCCOL
)
getColSize
();
if
(
nRowCount
<=
0
||
nColCount
<=
0
)
return
;
...
...
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