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
62ec7f9e
Kaydet (Commit)
62ec7f9e
authored
Ara 02, 2011
tarafından
Laurent Godard
Kaydeden (comit)
Markus Mohrhard
Ara 03, 2011
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cells creation : do not use uno calls at loading time
üst
3b0d01a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
8 deletions
+58
-8
xmlcelli.cxx
sc/source/filter/xml/xmlcelli.cxx
+58
-8
No files found.
sc/source/filter/xml/xmlcelli.cxx
Dosyayı görüntüle @
62ec7f9e
...
...
@@ -1078,16 +1078,66 @@ void ScXMLTableRowCellContext::EndElement()
if
(
!
bIsMatrix
)
{
LockSolarMutex
();
ScCellObj
*
pCellObj
=
static_cast
<
ScCellObj
*>
(
ScCellRangesBase
::
getImplementation
(
xCell
));
if
(
pCellObj
)
ScAddress
aScAddress
;
ScUnoConversion
::
FillScAddress
(
aScAddress
,
aCellPos
);
ScDocument
*
pDoc
=
rXMLImport
.
GetDocument
();
rtl
::
OUString
aText
=
pOUFormula
->
first
;
rtl
::
OUString
aFormulaNmsp
=
pOUFormula
->
second
;
::
boost
::
scoped_ptr
<
ScExternalRefManager
::
ApiGuard
>
pExtRefGuard
;
pExtRefGuard
.
reset
(
new
ScExternalRefManager
::
ApiGuard
(
pDoc
));
ScBaseCell
*
pNewCell
=
NULL
;
if
(
!
aText
.
isEmpty
()
)
{
pCellObj
->
SetFormulaWithGrammar
(
pOUFormula
->
first
,
pOUFormula
->
second
,
eGrammar
);
if
(
bFormulaTextResult
&&
pOUTextValue
&&
pOUTextValue
->
getLength
())
pCellObj
->
SetFormulaResultString
(
*
pOUTextValue
);
if
(
aText
[
0
]
==
'='
&&
aText
.
getLength
()
>
1
)
{
// temporary formula string as string tokens
ScTokenArray
*
pCode
=
new
ScTokenArray
;
pCode
->
AddStringXML
(
aText
);
if
(
(
eGrammar
==
formula
::
FormulaGrammar
::
GRAM_EXTERNAL
)
&&
(
aFormulaNmsp
.
getLength
()
>
0
)
)
pCode
->
AddStringXML
(
aFormulaNmsp
);
pDoc
->
IncXMLImportedFormulaCount
(
aText
.
getLength
()
);
pNewCell
=
new
ScFormulaCell
(
pDoc
,
aScAddress
,
pCode
,
eGrammar
,
MM_NONE
);
delete
pCode
;
}
else
if
(
aText
[
0
]
==
'\''
)
{
// for bEnglish, "'" at the beginning is always interpreted as text
// marker and stripped
pNewCell
=
ScBaseCell
::
CreateTextCell
(
aText
.
copy
(
1
),
pDoc
);
}
else
pCellObj
->
SetFormulaResultDouble
(
fValue
);
{
SvNumberFormatter
*
pFormatter
=
pDoc
->
GetFormatTable
();
sal_uInt32
nEnglish
=
pFormatter
->
GetStandardIndex
(
LANGUAGE_ENGLISH_US
);
double
fVal
;
if
(
pFormatter
->
IsNumberFormat
(
aText
,
nEnglish
,
fVal
)
)
{
pNewCell
=
new
ScValueCell
(
fVal
);
}
else
pNewCell
=
ScBaseCell
::
CreateTextCell
(
aText
,
pDoc
);
// das (englische) Zahlformat wird nicht gesetzt
//! passendes lokales Format suchen und setzen???
}
if
(
pNewCell
)
pDoc
->
PutCell
(
aScAddress
,
pNewCell
);
ScBaseCell
*
pCell
=
rXMLImport
.
GetDocument
()
->
GetCell
(
aScAddress
);
if
(
pCell
&&
pCell
->
GetCellType
()
==
CELLTYPE_FORMULA
)
{
if
(
bFormulaTextResult
&&
pOUTextValue
&&
pOUTextValue
->
getLength
())
static_cast
<
ScFormulaCell
*>
(
pCell
)
->
SetHybridString
(
*
pOUTextValue
);
else
static_cast
<
ScFormulaCell
*>
(
pCell
)
->
SetHybridDouble
(
fValue
);
}
}
}
else
...
...
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