summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/excel/excdoc.cxx7
-rw-r--r--sc/source/ui/unoobj/confuno.cxx7
2 files changed, 10 insertions, 4 deletions
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index a591402a6ad2..98fc175cff4d 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -883,8 +883,11 @@ void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
const ScCalcConfig& rCalcConfig = GetDoc().GetCalcConfig();
- // don't write if it hasn't been read or explicitly changed
- if ( rCalcConfig.mbHasStringRefSyntax )
+ // write if it has been read|imported or explicitly changed
+ // or if ref syntax isn't what would be native for our file format
+ // i.e. ExcelA1 in this case
+ if ( rCalcConfig.mbHasStringRefSyntax ||
+ (rCalcConfig.meStringRefAddressSyntax != formula::FormulaGrammar::CONV_XL_A1) )
{
XclExtLstRef xExtLst( new XclExtLst( GetRoot() ) );
xExtLst->AddRecord( XclExpExtRef( new XclExpExtCalcPr( GetRoot(), rCalcConfig.meStringRefAddressSyntax )) );
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index c695f4fc3c81..0ddaaa114f35 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -462,8 +462,11 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
{
ScCalcConfig aCalcConfig = rDoc.GetCalcConfig();
- // if it hasn't been read or explicitly changed, don't write it
- if ( aCalcConfig.mbHasStringRefSyntax )
+ // write if it has been read|imported or explicitly changed
+ // or if ref syntax isn't what would be native for our file format
+ // i.e. CalcA1 in this case
+ if ( aCalcConfig.mbHasStringRefSyntax ||
+ (aCalcConfig.meStringRefAddressSyntax != formula::FormulaGrammar::CONV_OOO) )
{
formula::FormulaGrammar::AddressConvention aConv = aCalcConfig.meStringRefAddressSyntax;