[ooo-build-commit] .: Branch 'ooo-build-3-2-1' - patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Jun 22 11:55:09 PDT 2010


 patches/dev300/apply                                      |    5 ++
 patches/dev300/calc-xls-import-biff2-file-sheet-name.diff |   27 ++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

New commits:
commit 34e3324a3274317586eb14f2add722b6372f95bc
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Jun 22 14:52:43 2010 -0400

    [experimental] Use the file name as sheet name when loading Excel 2.1 docs.
    
    The patch is in the CalcExperimental section, hence is not enabled in the
    default build.
    
    * patches/dev300/apply:
    * patches/dev300/calc-xls-import-biff2-file-sheet-name.diff: fixes n#612902.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 924de29..4b94a84 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3445,7 +3445,10 @@ SectionOwner => kohei
                                                                            
 # when reading csv file, don't read multiple physical lines for one logical
 # line even if matching quotes are on separate lines.                      
-stream-read-csv-always-single-line.diff, n#523517, kohei                   
+#stream-read-csv-always-single-line.diff, n#523517, kohei                   
+
+# Set file name as the sheet name when importing Excel 2.1 worksheet file.
+calc-xls-import-biff2-file-sheet-name.diff, n#612902, kohei
 
 
 [ AutoLayout ]
diff --git a/patches/dev300/calc-xls-import-biff2-file-sheet-name.diff b/patches/dev300/calc-xls-import-biff2-file-sheet-name.diff
new file mode 100644
index 0000000..68ffe3d
--- /dev/null
+++ b/patches/dev300/calc-xls-import-biff2-file-sheet-name.diff
@@ -0,0 +1,27 @@
+diff --git sc/source/filter/excel/impop.cxx sc/source/filter/excel/impop.cxx
+index a351de3..e9e3a39 100644
+--- sc/source/filter/excel/impop.cxx
++++ sc/source/filter/excel/impop.cxx
+@@ -47,6 +47,7 @@
+ #include <svtools/zforlist.hxx>
+ 
+ #include <sfx2/objsh.hxx>
++#include "tools/urlobj.hxx"
+ #include "docuno.hxx"
+ 
+ #include "cell.hxx"
+@@ -1157,6 +1158,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