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
c4878470
Kaydet (Commit)
c4878470
authored
Tem 08, 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
Fix problem with cached matrix formula results that contain errors
Change-Id: I9277714780e00e311e6e81a9de6e4d39409d5c9b
üst
2fbe6e30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
xmlcelli.cxx
sc/source/filter/xml/xmlcelli.cxx
+17
-14
No files found.
sc/source/filter/xml/xmlcelli.cxx
Dosyayı görüntüle @
c4878470
...
@@ -795,7 +795,10 @@ void ScXMLTableRowCellContext::AddNumberCellToDoc( const ScAddress& rCurrentPos
...
@@ -795,7 +795,10 @@ void ScXMLTableRowCellContext::AddNumberCellToDoc( const ScAddress& rCurrentPos
if
(
pCell
&&
pCell
->
GetCellType
()
==
CELLTYPE_FORMULA
)
if
(
pCell
&&
pCell
->
GetCellType
()
==
CELLTYPE_FORMULA
)
{
{
ScFormulaCell
*
pFCell
=
static_cast
<
ScFormulaCell
*>
(
pCell
);
ScFormulaCell
*
pFCell
=
static_cast
<
ScFormulaCell
*>
(
pCell
);
pFCell
->
SetHybridDouble
(
fValue
);
if
(
bFormulaTextResult
&&
pOUTextValue
&&
!
pOUTextValue
->
isEmpty
()
)
pFCell
->
SetHybridString
(
*
pOUTextValue
);
else
pFCell
->
SetHybridDouble
(
fValue
);
pFCell
->
ResetDirty
();
pFCell
->
ResetDirty
();
}
}
}
}
...
@@ -1052,15 +1055,6 @@ void ScXMLTableRowCellContext::AddNonMatrixFormulaCell( const ScAddress& rCellPo
...
@@ -1052,15 +1055,6 @@ void ScXMLTableRowCellContext::AddNonMatrixFormulaCell( const ScAddress& rCellPo
}
}
}
}
namespace
{
bool
isErrOrNA
(
const
rtl
::
OUString
&
rStr
)
{
return
(
rStr
.
indexOf
(
"Err:"
)
>
-
1
)
||
(
rStr
.
indexOf
(
"#N/A"
)
>
-
1
);
}
}
void
ScXMLTableRowCellContext
::
AddFormulaCell
(
const
ScAddress
&
rCellPos
)
void
ScXMLTableRowCellContext
::
AddFormulaCell
(
const
ScAddress
&
rCellPos
)
{
{
if
(
cellExists
(
rCellPos
)
)
if
(
cellExists
(
rCellPos
)
)
...
@@ -1069,10 +1063,6 @@ void ScXMLTableRowCellContext::AddFormulaCell( const ScAddress& rCellPos )
...
@@ -1069,10 +1063,6 @@ void ScXMLTableRowCellContext::AddFormulaCell( const ScAddress& rCellPos )
OSL_ENSURE
(((
nColsRepeated
==
1
)
&&
(
nRepeatedRows
==
1
)),
"repeated cells with formula not possible now"
);
OSL_ENSURE
(((
nColsRepeated
==
1
)
&&
(
nRepeatedRows
==
1
)),
"repeated cells with formula not possible now"
);
rXMLImport
.
GetStylesImportHelper
()
->
AddCell
(
rCellPos
);
rXMLImport
.
GetStylesImportHelper
()
->
AddCell
(
rCellPos
);
//if this is an "Err:###" or "#N/A" then use text:p value
if
(
bFormulaTextResult
&&
pOUTextContent
&&
isErrOrNA
(
*
pOUTextContent
)
)
pOUTextValue
.
reset
(
*
pOUTextContent
);
//add matrix
//add matrix
if
(
bIsMatrix
)
if
(
bIsMatrix
)
{
{
...
@@ -1115,6 +1105,15 @@ void ScXMLTableRowCellContext::AddFormulaCell( const ScAddress& rCellPos )
...
@@ -1115,6 +1105,15 @@ void ScXMLTableRowCellContext::AddFormulaCell( const ScAddress& rCellPos )
}
}
}
}
namespace
{
bool
isErrOrNA
(
const
rtl
::
OUString
&
rStr
)
{
return
(
rStr
.
indexOf
(
"Err:"
)
>
-
1
)
||
(
rStr
.
indexOf
(
"#N/A"
)
>
-
1
);
}
}
void
ScXMLTableRowCellContext
::
EndElement
()
void
ScXMLTableRowCellContext
::
EndElement
()
{
{
if
(
bHasTextImport
&&
rXMLImport
.
GetRemoveLastChar
()
)
if
(
bHasTextImport
&&
rXMLImport
.
GetRemoveLastChar
()
)
...
@@ -1131,6 +1130,10 @@ void ScXMLTableRowCellContext::EndElement()
...
@@ -1131,6 +1130,10 @@ void ScXMLTableRowCellContext::EndElement()
}
}
}
}
//if this is an "Err:###" or "#N/A" then use text:p value
if
(
bFormulaTextResult
&&
pOUTextContent
&&
isErrOrNA
(
*
pOUTextContent
)
)
pOUTextValue
.
reset
(
*
pOUTextContent
);
ScAddress
aCellPos
=
rXMLImport
.
GetTables
().
GetCurrentCellPos
();
ScAddress
aCellPos
=
rXMLImport
.
GetTables
().
GetCurrentCellPos
();
if
(
aCellPos
.
Col
()
>
0
&&
nRepeatedRows
>
1
)
if
(
aCellPos
.
Col
()
>
0
&&
nRepeatedRows
>
1
)
aCellPos
.
SetRow
(
aCellPos
.
Row
()
-
(
nRepeatedRows
-
1
)
);
aCellPos
.
SetRow
(
aCellPos
.
Row
()
-
(
nRepeatedRows
-
1
)
);
...
...
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