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
2fb0b401
Kaydet (Commit)
2fb0b401
authored
Kas 05, 2013
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix STL debug build again
Change-Id: Ic616a83adcdf12c64ee3f5a00bf254be847b3c7e
üst
206dfc89
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
9 deletions
+29
-9
documentimport.cxx
sc/source/core/data/documentimport.cxx
+29
-9
No files found.
sc/source/core/data/documentimport.cxx
Dosyayı görüntüle @
2fb0b401
...
@@ -403,19 +403,39 @@ namespace {
...
@@ -403,19 +403,39 @@ namespace {
class
CellStoreInitializer
class
CellStoreInitializer
{
{
// The pimpl pattern here is intentional.
//
// The problem with having the attributes in CellStoreInitializer
// directly is that, as a functor, it might be copied around. In
// that case miPos in _copied_ object points ot maAttrs in the
// original object, not in the copy. So later, deep in mdds, we end
// up comparing iterators from different sequences.
//
// This could be solved by defining copy constructor and operator=,
// but given the limited usage of the class, I think it is simpler
// to let copies share the state.
struct
Impl
{
sc
::
CellTextAttrStoreType
maAttrs
;
sc
::
CellTextAttrStoreType
::
iterator
miPos
;
sal_uInt16
mnScriptNumeric
;
Impl
(
const
sal_uInt32
nMaxRowCount
,
const
sal_uInt16
nScriptNumeric
)
:
maAttrs
(
nMaxRowCount
),
miPos
(
maAttrs
.
begin
()),
mnScriptNumeric
(
nScriptNumeric
)
{}
};
ScDocument
&
mrDoc
;
ScDocument
&
mrDoc
;
sc
::
StartListeningContext
&
mrListenCxt
;
sc
::
StartListeningContext
&
mrListenCxt
;
sc
::
CellTextAttrStoreType
maAttrs
;
sc
::
CellTextAttrStoreType
::
iterator
miPos
;
sal_uInt16
mnScriptNumeric
;
public
:
public
:
CellStoreInitializer
(
ScDocument
&
rDoc
,
sc
::
StartListeningContext
&
rCxt
,
sal_uInt16
nScriptNumeric
)
:
CellStoreInitializer
(
ScDocument
&
rDoc
,
sc
::
StartListeningContext
&
rCxt
,
sal_uInt16
nScriptNumeric
)
:
mrDoc
(
rDoc
),
mrDoc
(
rDoc
),
mrListenCxt
(
rCxt
),
mrListenCxt
(
rCxt
),
maAttrs
(
MAXROWCOUNT
),
mpImpl
(
new
Impl
(
MAXROWCOUNT
,
nScriptNumeric
))
miPos
(
maAttrs
.
begin
()),
{}
mnScriptNumeric
(
nScriptNumeric
)
{}
boost
::
shared_ptr
<
Impl
>
mpImpl
;
void
operator
()
(
const
sc
::
CellStoreType
::
value_type
&
node
)
void
operator
()
(
const
sc
::
CellStoreType
::
value_type
&
node
)
{
{
...
@@ -425,9 +445,9 @@ public:
...
@@ -425,9 +445,9 @@ public:
// Fill with default values for non-empty cell segments.
// Fill with default values for non-empty cell segments.
sc
::
CellTextAttr
aDefault
;
sc
::
CellTextAttr
aDefault
;
if
(
node
.
type
==
sc
::
element_type_numeric
)
if
(
node
.
type
==
sc
::
element_type_numeric
)
aDefault
.
mnScriptType
=
mnScriptNumeric
;
aDefault
.
mnScriptType
=
m
pImpl
->
m
nScriptNumeric
;
std
::
vector
<
sc
::
CellTextAttr
>
aDefaults
(
node
.
size
,
aDefault
);
std
::
vector
<
sc
::
CellTextAttr
>
aDefaults
(
node
.
size
,
aDefault
);
m
iPos
=
maAttrs
.
set
(
miPos
,
node
.
position
,
aDefaults
.
begin
(),
aDefaults
.
end
());
m
pImpl
->
miPos
=
mpImpl
->
maAttrs
.
set
(
mpImpl
->
miPos
,
node
.
position
,
aDefaults
.
begin
(),
aDefaults
.
end
());
if
(
node
.
type
==
sc
::
element_type_formula
)
if
(
node
.
type
==
sc
::
element_type_formula
)
{
{
...
@@ -444,7 +464,7 @@ public:
...
@@ -444,7 +464,7 @@ public:
void
swap
(
sc
::
CellTextAttrStoreType
&
rAttrs
)
void
swap
(
sc
::
CellTextAttrStoreType
&
rAttrs
)
{
{
maAttrs
.
swap
(
rAttrs
);
m
pImpl
->
m
aAttrs
.
swap
(
rAttrs
);
}
}
};
};
...
...
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