summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/interpr1.cxx7
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx10
-rw-r--r--sc/source/ui/unoobj/confuno.cxx10
3 files changed, 23 insertions, 4 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 365812d8f813..5d423ce21bfc 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7081,10 +7081,9 @@ void ScInterpreter::ScIndirect()
// Use the current address syntax if unspecified.
eConv = pDok->GetAddressConvention();
- // either CONV_A1_XL_A1 was explicitly configured, or nothing at all
- // was configured
- bool bTryXlA1 = (eConv == FormulaGrammar::CONV_A1_XL_A1 ||
- !maCalcConfig.mbHasStringRefSyntax);
+ // either CONV_A1_XL_A1 was explicitly configured, or it wasn't possible
+ // to determine which syntax to use during doc import
+ bool bTryXlA1 = (eConv == FormulaGrammar::CONV_A1_XL_A1);
if (nParamCount == 2 && 0.0 == ::rtl::math::approxFloor( GetDouble()))
{
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 250a129ae623..a4cb2f63ab90 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -796,6 +796,16 @@ void WorkbookHelper::finalizeWorkbookImport()
sheets. Automatic numbering is set by passing the value 0. */
PropertySet aDefPageStyle( getStyleObject( "Default", true ) );
aDefPageStyle.setProperty< sal_Int16 >( PROP_FirstPageNumber, 0 );
+
+ // Has any string ref syntax been imported?
+ // If not, we need to take action
+ ScCalcConfig aCalcConfig = getScDocument().GetCalcConfig();
+
+ if ( !aCalcConfig.mbHasStringRefSyntax )
+ {
+ aCalcConfig.meStringRefAddressSyntax = formula::FormulaGrammar::CONV_A1_XL_A1;
+ getScDocument().SetCalcConfig(aCalcConfig);
+ }
}
// document model -------------------------------------------------------------
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 3c9277c1f3fa..8b9d4a789772 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -355,6 +355,16 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
pDocShell->PostPaint(ScRange(0, 0, nTab, MAXCOL, MAXROW, nTab), PAINT_GRID);
pDocShell->SetDocumentModified();
}
+
+ ScCalcConfig aCalcConfig = rDoc.GetCalcConfig();
+
+ // Has any string ref syntax been imported?
+ // If not, we need to take action
+ if ( !aCalcConfig.mbHasStringRefSyntax )
+ {
+ aCalcConfig.meStringRefAddressSyntax = formula::FormulaGrammar::CONV_A1_XL_A1;
+ rDoc.SetCalcConfig(aCalcConfig);
+ }
}
else
throw uno::RuntimeException();