summaryrefslogtreecommitdiffstats
path: root/sc/source/filter/oox
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-08-13 13:13:16 +0200
committerEike Rathke <erack@redhat.com>2015-08-14 11:47:52 +0000
commit077c8838ace23cfe5c54ae222153dbef815b56b0 (patch)
treef6cce5419c258c6844ce12c3188daff8e5c47b5e /sc/source/filter/oox
parenttdf#92256: Save ref syntax when different from native one (diff)
downloadcore-077c8838ace23cfe5c54ae222153dbef815b56b0.tar.gz
core-077c8838ace23cfe5c54ae222153dbef815b56b0.zip
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/17702 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx22
1 files changed, 7 insertions, 15 deletions
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 5b01085c9a31..883a58d1a7ab 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -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));