summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/qa/unit/data/slk/pass/ofz14093-1.slk1
-rw-r--r--sc/source/core/data/table2.cxx10
2 files changed, 7 insertions, 4 deletions
diff --git a/sc/qa/unit/data/slk/pass/ofz14093-1.slk b/sc/qa/unit/data/slk/pass/ofz14093-1.slk
new file mode 100644
index 000000000000..7667ddb0a00a
--- /dev/null
+++ b/sc/qa/unit/data/slk/pass/ofz14093-1.slk
@@ -0,0 +1 @@
+C;X152;K" \ No newline at end of file
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index a74fc3a9a289..b049ff193b66 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1405,11 +1405,13 @@ bool ScTable::TestCopyScenarioTo( const ScTable* pDestTab ) const
bool ScTable::SetString( SCCOL nCol, SCROW nRow, SCTAB nTabP, const OUString& rString,
const ScSetStringParam * pParam )
{
- if (ValidColRow(nCol,nRow))
- return aCol[nCol].SetString(
- nRow, nTabP, rString, pDocument->GetAddressConvention(), pParam );
- else
+ if (!ValidColRow(nCol,nRow))
+ {
return false;
+ }
+
+ return CreateColumnIfNotExists(nCol).SetString(
+ nRow, nTabP, rString, pDocument->GetAddressConvention(), pParam);
}
bool ScTable::SetEditText( SCCOL nCol, SCROW nRow, std::unique_ptr<EditTextObject> pEditText )