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
99314cb0
Kaydet (Commit)
99314cb0
authored
Tem 10, 2012
tarafından
Daniel Bankston
Kaydeden (comit)
Kohei Yoshida
Tem 12, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reduce some redundant code
Change-Id: I23bf34793c8a1409c8753f572a6122dee2f4128f
üst
d880f3d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
21 deletions
+18
-21
xmlcelli.cxx
sc/source/filter/xml/xmlcelli.cxx
+16
-21
xmlcelli.hxx
sc/source/filter/xml/xmlcelli.hxx
+2
-0
No files found.
sc/source/filter/xml/xmlcelli.cxx
Dosyayı görüntüle @
99314cb0
...
...
@@ -741,6 +741,19 @@ void ScXMLTableRowCellContext::SetCellRangeSource( const ScAddress& rPosition )
}
}
void
ScXMLTableRowCellContext
::
SetFormulaCell
(
ScFormulaCell
*
pFCell
)
const
{
if
(
pFCell
)
{
if
(
bFormulaTextResult
&&
pOUTextValue
&&
!
pOUTextValue
->
isEmpty
()
)
pFCell
->
SetHybridString
(
*
pOUTextValue
);
else
pFCell
->
SetHybridDouble
(
fValue
);
if
(
!
pFCell
->
GetCode
()
->
IsRecalcModeAlways
()
)
pFCell
->
ResetDirty
();
}
}
void
ScXMLTableRowCellContext
::
AddTextCellToDoc
(
const
ScAddress
&
rCurrentPos
,
const
SCCOL
nCurrentCol
,
const
::
boost
::
optional
<
rtl
::
OUString
>&
pOUText
)
{
...
...
@@ -795,12 +808,7 @@ void ScXMLTableRowCellContext::AddNumberCellToDoc( const ScAddress& rCurrentPos
if
(
pCell
&&
pCell
->
GetCellType
()
==
CELLTYPE_FORMULA
)
{
ScFormulaCell
*
pFCell
=
static_cast
<
ScFormulaCell
*>
(
pCell
);
if
(
bFormulaTextResult
&&
pOUTextValue
&&
!
pOUTextValue
->
isEmpty
()
)
pFCell
->
SetHybridString
(
*
pOUTextValue
);
else
pFCell
->
SetHybridDouble
(
fValue
);
if
(
!
pFCell
->
GetCode
()
->
IsRecalcModeAlways
()
)
pFCell
->
ResetDirty
();
SetFormulaCell
(
pFCell
);
}
}
else
...
...
@@ -1027,12 +1035,7 @@ void ScXMLTableRowCellContext::AddNonMatrixFormulaCell( const ScAddress& rCellPo
delete
pCode
;
ScFormulaCell
*
pFCell
=
static_cast
<
ScFormulaCell
*>
(
pNewCell
);
if
(
bFormulaTextResult
&&
pOUTextValue
&&
!
pOUTextValue
->
isEmpty
()
)
pFCell
->
SetHybridString
(
*
pOUTextValue
);
else
pFCell
->
SetHybridDouble
(
fValue
);
if
(
!
(
pFCell
->
GetCode
()
->
IsRecalcModeOnLoad
()
||
!
pFCell
->
GetCode
()
->
IsRecalcModeOnLoadOnce
())
)
pFCell
->
ResetDirty
();
SetFormulaCell
(
pFCell
);
}
else
if
(
aText
[
0
]
==
'\''
&&
aText
.
getLength
()
>
1
)
{
...
...
@@ -1078,15 +1081,7 @@ void ScXMLTableRowCellContext::AddFormulaCell( const ScAddress& rCellPos )
//add the cached formula result of the first matrix position
ScFormulaCell
*
pFCell
=
static_cast
<
ScFormulaCell
*>
(
rXMLImport
.
GetDocument
()
->
GetCell
(
rCellPos
)
);
if
(
pFCell
)
{
if
(
bFormulaTextResult
&&
pOUTextValue
&&
!
pOUTextValue
->
isEmpty
()
)
pFCell
->
SetHybridString
(
*
pOUTextValue
);
else
pFCell
->
SetHybridDouble
(
fValue
);
if
(
!
pFCell
->
GetCode
()
->
IsRecalcModeAlways
()
)
pFCell
->
ResetDirty
();
}
SetFormulaCell
(
pFCell
);
}
}
else
...
...
sc/source/filter/xml/xmlcelli.hxx
Dosyayı görüntüle @
99314cb0
...
...
@@ -45,6 +45,7 @@
#include <boost/optional.hpp>
class
ScXMLImport
;
class
ScFormulaCell
;
struct
ScXMLAnnotationData
;
class
ScXMLTableRowCellContext
:
public
SvXMLImportContext
...
...
@@ -90,6 +91,7 @@ class ScXMLTableRowCellContext : public SvXMLImportContext
bool
HasSpecialContent
()
const
;
bool
CellsAreRepeated
()
const
;
void
SetFormulaCell
(
ScFormulaCell
*
pFCell
)
const
;
void
AddTextCellToDoc
(
const
ScAddress
&
rScCurrentPos
,
const
SCCOL
nCurrentCol
,
const
::
boost
::
optional
<
rtl
::
OUString
>&
pOUText
);
void
AddNumberCellToDoc
(
const
ScAddress
&
rScCurrentPos
);
...
...
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