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
3488d0a4
Kaydet (Commit)
3488d0a4
authored
Şub 06, 2015
tarafından
Markus Mohrhard
Kaydeden (comit)
Markus Mohrhard
Şub 19, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make the code easier to read
Change-Id: I8cdfe1cddf57a36054bfe850173ef6130aa608b5
üst
418b0d39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
sheetdatabuffer.cxx
sc/source/filter/oox/sheetdatabuffer.cxx
+7
-5
No files found.
sc/source/filter/oox/sheetdatabuffer.cxx
Dosyayı görüntüle @
3488d0a4
...
@@ -333,12 +333,14 @@ void SheetDataBuffer::setStandardNumFmt( const CellAddress& rCellAddr, sal_Int16
...
@@ -333,12 +333,14 @@ void SheetDataBuffer::setStandardNumFmt( const CellAddress& rCellAddr, sal_Int16
}
}
}
}
void
addIfNotInMyMap
(
StylesBuffer
&
rStyles
,
std
::
map
<
std
::
pair
<
sal_Int32
,
sal_Int32
>
,
ApiCellRangeList
>&
rMap
,
sal_Int32
nXfId
,
sal_Int32
nFormatId
,
const
ApiCellRangeList
&
rRangeList
)
typedef
std
::
pair
<
sal_Int32
,
sal_Int32
>
FormatKeyPair
;
void
addIfNotInMyMap
(
StylesBuffer
&
rStyles
,
std
::
map
<
FormatKeyPair
,
ApiCellRangeList
>&
rMap
,
sal_Int32
nXfId
,
sal_Int32
nFormatId
,
const
ApiCellRangeList
&
rRangeList
)
{
{
Xf
*
pXf1
=
rStyles
.
getCellXf
(
nXfId
).
get
();
Xf
*
pXf1
=
rStyles
.
getCellXf
(
nXfId
).
get
();
if
(
pXf1
)
if
(
pXf1
)
{
{
for
(
std
::
map
<
std
::
pair
<
sal_Int32
,
sal_Int32
>
,
ApiCellRangeList
>::
iterator
it
=
rMap
.
begin
(),
it_end
=
rMap
.
end
();
it
!=
it_end
;
++
it
)
for
(
std
::
map
<
FormatKeyPair
,
ApiCellRangeList
>::
iterator
it
=
rMap
.
begin
(),
it_end
=
rMap
.
end
();
it
!=
it_end
;
++
it
)
{
{
if
(
it
->
first
.
second
==
nFormatId
)
if
(
it
->
first
.
second
==
nFormatId
)
{
{
...
@@ -353,7 +355,7 @@ void addIfNotInMyMap( StylesBuffer& rStyles, std::map< std::pair< sal_Int32, sal
...
@@ -353,7 +355,7 @@ void addIfNotInMyMap( StylesBuffer& rStyles, std::map< std::pair< sal_Int32, sal
}
}
}
}
}
}
rMap
[
std
::
pair
<
sal_Int32
,
sal_Int32
>
(
nXfId
,
nFormatId
)
]
=
rRangeList
;
rMap
[
FormatKeyPair
(
nXfId
,
nFormatId
)
]
=
rRangeList
;
}
}
}
}
...
@@ -433,13 +435,13 @@ void SheetDataBuffer::finalizeImport()
...
@@ -433,13 +435,13 @@ void SheetDataBuffer::finalizeImport()
// write default formatting of remaining row range
// write default formatting of remaining row range
maXfIdRowRangeList
[
maXfIdRowRange
.
mnXfId
].
push_back
(
maXfIdRowRange
.
maRowRange
);
maXfIdRowRangeList
[
maXfIdRowRange
.
mnXfId
].
push_back
(
maXfIdRowRange
.
maRowRange
);
std
::
map
<
std
::
pair
<
sal_Int32
,
sal_Int32
>
,
ApiCellRangeList
>
rangeStyleListMap
;
std
::
map
<
FormatKeyPair
,
ApiCellRangeList
>
rangeStyleListMap
;
for
(
XfIdRangeListMap
::
const_iterator
aIt
=
maXfIdRangeLists
.
begin
(),
aEnd
=
maXfIdRangeLists
.
end
();
aIt
!=
aEnd
;
++
aIt
)
for
(
XfIdRangeListMap
::
const_iterator
aIt
=
maXfIdRangeLists
.
begin
(),
aEnd
=
maXfIdRangeLists
.
end
();
aIt
!=
aEnd
;
++
aIt
)
{
{
addIfNotInMyMap
(
getStyles
(),
rangeStyleListMap
,
aIt
->
first
.
first
,
aIt
->
first
.
second
,
aIt
->
second
);
addIfNotInMyMap
(
getStyles
(),
rangeStyleListMap
,
aIt
->
first
.
first
,
aIt
->
first
.
second
,
aIt
->
second
);
}
}
// gather all ranges that have the same style and apply them in bulk
// gather all ranges that have the same style and apply them in bulk
for
(
std
::
map
<
std
::
pair
<
sal_Int32
,
sal_Int32
>
,
ApiCellRangeList
>::
iterator
it
=
rangeStyleListMap
.
begin
(),
it_end
=
rangeStyleListMap
.
end
();
it
!=
it_end
;
++
it
)
for
(
std
::
map
<
FormatKeyPair
,
ApiCellRangeList
>::
iterator
it
=
rangeStyleListMap
.
begin
(),
it_end
=
rangeStyleListMap
.
end
();
it
!=
it_end
;
++
it
)
{
{
const
ApiCellRangeList
&
rRanges
(
it
->
second
);
const
ApiCellRangeList
&
rRanges
(
it
->
second
);
for
(
::
std
::
vector
<
CellRangeAddress
>::
const_iterator
it_range
=
rRanges
.
begin
(),
it_rangeend
=
rRanges
.
end
();
it_range
!=
it_rangeend
;
++
it_range
)
for
(
::
std
::
vector
<
CellRangeAddress
>::
const_iterator
it_range
=
rRanges
.
begin
(),
it_rangeend
=
rRanges
.
end
();
it_range
!=
it_rangeend
;
++
it_range
)
...
...
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