summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-05-03 03:41:12 +0200
committerKohei Yoshida <kohei.yoshida@suse.de>2013-06-04 01:31:34 +0000
commit2d556a55b136b67fbc010d29ba7f98a8419d1470 (patch)
treec619e24f3c29373a946ed87e1882b3a9347ea75a /sc/source/core/data/column.cxx
parent40c21a597f7c9709c88b398ec74a401a70835b12 (diff)
remove inherited number formats, fdo#60215
Change-Id: Ia8199bdc63ee732bada51687df195c9ab9cae9aa Reviewed-on: https://gerrit.libreoffice.org/4147 Reviewed-by: Kohei Yoshida <kohei.yoshida@suse.de> Tested-by: Kohei Yoshida <kohei.yoshida@suse.de>
Diffstat (limited to 'sc/source/core/data/column.cxx')
-rw-r--r--sc/source/core/data/column.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index dfbc21d3115e..878255296911 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2183,13 +2183,13 @@ void ScColumn::CalcAll()
ScBaseCell* pCell = maItems[i].pCell;
if (pCell->GetCellType() == CELLTYPE_FORMULA)
{
+ ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
#if OSL_DEBUG_LEVEL > 1
// after F9 ctrl-F9: check the calculation for each FormulaTree
- ScFormulaCell* pFCell = (ScFormulaCell*)pCell;
double nOldVal, nNewVal;
nOldVal = pFCell->GetValue();
#endif
- ((ScFormulaCell*)pCell)->Interpret();
+ pFCell->Interpret();
#if OSL_DEBUG_LEVEL > 1
if ( pFCell->GetCode()->IsRecalcModeNormal() )
nNewVal = pFCell->GetValue();
@@ -2214,9 +2214,10 @@ void ScColumn::CompileAll()
SCROW nRow = maItems[i].nRow;
// for unconditional compilation
// bCompile=true and pCode->nError=0
- ((ScFormulaCell*)pCell)->GetCode()->SetCodeError( 0 );
- ((ScFormulaCell*)pCell)->SetCompile( true );
- ((ScFormulaCell*)pCell)->CompileTokenArray();
+ ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
+ pFCell->GetCode()->SetCodeError( 0 );
+ pFCell->SetCompile( true );
+ pFCell->CompileTokenArray();
if ( nRow != maItems[i].nRow )
Search( nRow, i ); // Listener deleted/inserted?
}
@@ -2234,7 +2235,14 @@ void ScColumn::CompileXML( ScProgress& rProgress )
if ( pCell->GetCellType() == CELLTYPE_FORMULA )
{
SCROW nRow = maItems[i].nRow;
- ((ScFormulaCell*)pCell)->CompileXML( rProgress );
+ ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
+ sal_uInt32 nCellFormat = GetNumberFormat( nRow );
+ if( (nCellFormat % SV_COUNTRY_LANGUAGE_OFFSET) != 0)
+ pFCell->SetNeedNumberFormat(false);
+ else
+ pFCell->SetDirty(true);
+
+ pFCell->CompileXML( rProgress );
if ( nRow != maItems[i].nRow )
Search( nRow, i ); // Listener deleted/inserted?
}