summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index 3ea979fe59c6..97aa9a5e0e0e 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -186,10 +186,12 @@ void ScMyTables::NewSheet(const rtl::OUString& sTableName, const rtl::OUString&
maProtectionData = rProtectData;
ScDocument *pDoc = ScXMLConverter::GetScDocument(rImport.GetModel());
+ // The document contains one sheet when created. So for the first
+ // sheet, we only need to set its name.
if (nCurrentSheet > 0)
- {
pDoc->AppendTabOnLoad(sTableName);
- }
+ else
+ pDoc->SetTabNameOnLoad(nCurrentSheet, sTableName);
rImport.SetTableStyle(sStyleName);
SetTableStyle(sStyleName);