summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-08-13 12:22:05 +0200
committerEike Rathke <erack@redhat.com>2015-08-14 11:47:48 +0000
commit2bfeabde75d1e99879465fee6fe6a97357739ae2 (patch)
tree9e42551b0529aff73476cbfe02a57baa0fb1f67f
parent65aa35fbeeb837c229209daf558da74d8237dab5 (diff)
tdf#92256: Save ref syntax when different from native one
that is, CalcA1 for ODF and ExcelA1 for OOXML Change-Id: Ie4df23c5787531677c4533776d489991d413a8d6 Reviewed-on: https://gerrit.libreoffice.org/17701 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-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;