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>
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index a591402..98fc175 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 c695f4f..0ddaaa1 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;