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

tdf#92256: Don't force CalcA1 syntax on all !Microsoft xlsx docs

in other words, don't override user's configuration of string ref
syntax

Change-Id: I70281f6869663ccdaabacf506f6effcaf4b5a3fa
Reviewed-on: https://gerrit.libreoffice.org/17702Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 2bfeabde
......@@ -532,18 +532,6 @@ void WorkbookGlobals::useInternalChartDataTable( bool bInternal )
// private --------------------------------------------------------------------
namespace {
formula::FormulaGrammar::AddressConvention getConvention(css::uno::Reference<XDocumentProperties> xDocProps)
{
if (xDocProps->getGenerator().startsWithIgnoreAsciiCase("Microsoft"))
return formula::FormulaGrammar::CONV_XL_A1;
return formula::FormulaGrammar::CONV_OOO;
}
}
void WorkbookGlobals::initialize( bool bWorkbookFile )
{
maCellStyles = "CellStyles";
......@@ -573,9 +561,13 @@ void WorkbookGlobals::initialize( bool bWorkbookFile )
Reference< XDocumentPropertiesSupplier > xPropSupplier( mxDoc, UNO_QUERY);
Reference< XDocumentProperties > xDocProps = xPropSupplier->getDocumentProperties();
ScCalcConfig aCalcConfig = mpDoc->GetCalcConfig();
aCalcConfig.SetStringRefSyntax( getConvention(xDocProps) );
mpDoc->SetCalcConfig(aCalcConfig);
if (xDocProps->getGenerator().startsWithIgnoreAsciiCase("Microsoft"))
{
ScCalcConfig aCalcConfig = mpDoc->GetCalcConfig();
aCalcConfig.SetStringRefSyntax( formula::FormulaGrammar::CONV_XL_A1 ) ;
mpDoc->SetCalcConfig(aCalcConfig);
}
mxDocImport.reset(new ScDocumentImport(*mpDoc));
......
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