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
6a348503
Kaydet (Commit)
6a348503
authored
Şub 13, 2015
tarafından
Ursache Vladimir
Kaydeden (comit)
Markus Mohrhard
Şub 14, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#89004 improve performance of document data collection
Change-Id: Ie74495745b48d721c7dda0b447fc59066c869874
üst
10e3e75c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
42 deletions
+16
-42
document10.cxx
sc/source/core/data/document10.cxx
+16
-42
No files found.
sc/source/core/data/document10.cxx
Dosyayı görüntüle @
6a348503
...
...
@@ -19,6 +19,7 @@
#include <poolhelp.hxx>
#include <bcaslot.hxx>
#include <cellvalues.hxx>
#include <docpool.hxx>
#include "dociter.hxx"
#include "patattr.hxx"
...
...
@@ -157,53 +158,26 @@ void ScDocument::CopyCellValuesFrom( const ScAddress& rTopPos, const sc::CellVal
std
::
vector
<
Color
>
ScDocument
::
GetDocColors
()
{
std
::
vector
<
Color
>
docColors
;
for
(
unsigned
int
nTabIx
=
0
;
nTabIx
<
maTabs
.
size
();
++
nTabIx
)
std
::
vector
<
Color
>
aDocColors
;
ScDocumentPool
*
pPool
=
GetPool
();
const
sal_uInt16
pAttribs
[]
=
{
ATTR_BACKGROUND
,
ATTR_FONT_COLOR
};
for
(
size_t
i
=
0
;
i
<
SAL_N_ELEMENTS
(
pAttribs
);
i
++
)
{
ScUsedAreaIterator
aIt
(
this
,
nTabIx
,
0
,
0
,
MAXCOLCOUNT
-
1
,
MAXROWCOUNT
-
1
)
;
for
(
bool
bIt
=
aIt
.
GetNext
();
bIt
;
bIt
=
aIt
.
GetNext
()
)
const
sal_uInt16
nAttrib
=
pAttribs
[
i
]
;
const
sal_uInt32
nCount
=
pPool
->
GetItemCount2
(
nAttrib
);
for
(
sal_uInt32
j
=
0
;
j
<
nCount
;
j
++
)
{
const
ScPatternAttr
*
pPattern
=
aIt
.
GetPattern
();
if
(
pPattern
==
0
)
const
SvxColorItem
*
pItem
=
static_cast
<
const
SvxColorItem
*>
(
pPool
->
GetItem2
(
nAttrib
,
j
));
if
(
pItem
==
0
)
continue
;
const
SfxItemSet
&
rItemSet
=
pPattern
->
GetItemSet
();
SfxWhichIter
aIter
(
rItemSet
);
sal_uInt16
nWhich
=
aIter
.
FirstWhich
();
while
(
nWhich
)
{
const
SfxPoolItem
*
pItem
;
if
(
SfxItemState
::
SET
==
rItemSet
.
GetItemState
(
nWhich
,
false
,
&
pItem
)
)
{
sal_uInt16
aWhich
=
pItem
->
Which
();
switch
(
aWhich
)
{
// attributes we want to collect
case
ATTR_FONT_COLOR
:
case
ATTR_BACKGROUND
:
{
Color
aColor
(
static_cast
<
const
SvxColorItem
*>
(
pItem
)
->
GetValue
()
);
if
(
COL_AUTO
!=
aColor
.
GetColor
()
&&
std
::
find
(
docColors
.
begin
(),
docColors
.
end
(),
aColor
)
==
docColors
.
end
()
)
{
docColors
.
push_back
(
aColor
);
}
}
break
;
default
:
break
;
}
}
nWhich
=
aIter
.
NextWhich
();
}
Color
aColor
(
pItem
->
GetValue
()
);
if
(
COL_AUTO
==
aColor
.
GetColor
())
continue
;
if
(
std
::
find
(
aDocColors
.
begin
(),
aDocColors
.
end
(),
aColor
)
==
aDocColors
.
end
())
aDocColors
.
push_back
(
aColor
);
}
}
return
d
ocColors
;
return
aD
ocColors
;
}
void
ScDocument
::
SetCalcConfig
(
const
ScCalcConfig
&
rConfig
)
...
...
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