Kaydet (Commit) 2bfeabde authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Eike Rathke

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/17701Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 65aa35fb
......@@ -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 )) );
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment