[ooo-build-commit] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Oct 4 13:41:28 PDT 2010
sc/source/filter/excel/impop.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 3662d82718f30fdc26a48e7918b5cfd3e7460f2d
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Oct 4 16:39:57 2010 -0400
Ported calc-xls-import-biff2-file-sheet-name.diff from ooo-build.
When importing an old Excel 2.1 worksheet file, the file name should
become the sheet name.
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index cea2a9d..0438194 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -47,6 +47,7 @@
#include <svl/zforlist.hxx>
#include <sfx2/objsh.hxx>
+#include "tools/urlobj.hxx"
#include "docuno.hxx"
#include "cell.hxx"
@@ -1158,6 +1159,14 @@ void ImportExcel::NeueTabelle( void )
if( nTab > 0 && !pD->HasTable( nTab ) )
pD->MakeTable( nTab );
+ if (nTab == 0 && GetBiff() == EXC_BIFF2)
+ {
+ // For Excel 2.1 Worksheet file, we need to set the file name as the
+ // sheet name.
+ INetURLObject aURL(GetDocUrl());
+ pD->RenameTab(0, aURL.getBase(), false);
+ }
+
pExcRoot->pShrfmlaBuff->Clear();
InitializeTable( nTab );
More information about the ooo-build-commit
mailing list