ooo-build r11257 - in branches/sled-10-ooo-build-2-3: . patches/src680



Author: kyoshida
Date: Mon Jan 14 19:29:27 2008
New Revision: 11257
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11257&view=rev

Log:
2008-01-14  Kohei Yoshida  <kyoshida novell com>

	* patches/src680/sc-lotus123-import-sheetname.diff: added to properly
	import sheet names from Lotus-1-2-3 document (WK2 variant).
	
	* patches/src680/apply: apply the patch.


Added:
   branches/sled-10-ooo-build-2-3/patches/src680/sc-lotus123-import-sheetname.diff
Modified:
   branches/sled-10-ooo-build-2-3/ChangeLog
   branches/sled-10-ooo-build-2-3/patches/src680/apply

Modified: branches/sled-10-ooo-build-2-3/patches/src680/apply
==============================================================================
--- branches/sled-10-ooo-build-2-3/patches/src680/apply	(original)
+++ branches/sled-10-ooo-build-2-3/patches/src680/apply	Mon Jan 14 19:29:27 2008
@@ -648,6 +648,9 @@
 # Allow biffdump.cxx to compile on 64-bit platforms
 # sc-biffdump.diff, i#82184, jonp
 
+# Import sheet names properly from Lotus 1-2-3 document.
+sc-lotus123-import-sheetname.diff, i#84496, kohei
+
 [ LinuxOnly ]
 # accelerate linking, by extreme cunning i#63927
 speed-local-link-except.diff, i#63927, michael

Added: branches/sled-10-ooo-build-2-3/patches/src680/sc-lotus123-import-sheetname.diff
==============================================================================
--- (empty file)
+++ branches/sled-10-ooo-build-2-3/patches/src680/sc-lotus123-import-sheetname.diff	Mon Jan 14 19:29:27 2008
@@ -0,0 +1,95 @@
+? sc/sc.vpj
+Index: sc/source/filter/inc/op.h
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/inc/op.h,v
+retrieving revision 1.3
+diff -u -r1.3 op.h
+--- sc/source/filter/inc/op.h	8 Sep 2005 19:23:16 -0000	1.3
++++ sc/source/filter/inc/op.h	11 Dec 2007 22:18:18 -0000
+@@ -70,6 +70,7 @@
+ void OP_IEEENumber123(SvStream& r, UINT16 n);
+ void OP_Note123(SvStream &aStream, USHORT nLaenge);
+ void OP_CreatePattern123(SvStream &aStream, USHORT nLaenge);
++void OP_SheetName123( SvStream &rStream, USHORT nLength );
+ void OP_HorAlign123(BYTE nAlignPattern, SfxItemSet& rPattern /*  const ScPatternAttr& rPattern*/  );
+ void OP_VerAlign123(BYTE nAlignPattern, SfxItemSet& rPattern /*  const ScPatternAttr& rPattern*/  );
+ void OP_ApplyPatternArea123(SvStream& r);
+Index: sc/source/filter/lotus/op.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/lotus/op.cxx,v
+retrieving revision 1.16
+diff -u -r1.16 op.cxx
+--- sc/source/filter/lotus/op.cxx	6 Jul 2007 12:39:08 -0000	1.16
++++ sc/source/filter/lotus/op.cxx	11 Dec 2007 22:18:18 -0000
+@@ -76,6 +76,8 @@
+ #include "ftools.hxx"
+ #endif
+ 
++#include <vector>
++
+ extern sal_Char*	pAnsi;			// -> memory.cxx, Puffer zum Umwandeln von OEM->ANSI
+ extern sal_Char*	pErgebnis;		// -> memory.cxx, Ergebnispuffer
+ extern WKTYP		eTyp;			// -> filter.cxx, aktueller Dateityp
+@@ -85,6 +87,7 @@
+ extern BYTE			nDefaultFormat;	// -> tool.cxx, Default-Zellenformat
+ extern ScDocument*	pDoc;			// -> filter.cxx, Aufhaenger zum Dokumentzugriff
+ extern BYTE*		pFormelBuffer;	// -> memory.cxx, fuer
++extern CharSet		eCharVon;       // -> filter.cxx, character set specified
+ 
+ static UINT16		nDefWidth = ( UINT16 ) ( TWIPS_PER_CHAR * 10 );
+ 
+@@ -575,6 +578,38 @@
+     r.SeekRel(n);
+ }
+ 
++void OP_SheetName123( SvStream& rStream, USHORT nLength )
++{
++    if (nLength <= 4)
++    {
++        rStream.SeekRel(nLength);
++        return;
++    }
++
++    // B0 36 [sheet number (2 bytes?)] [sheet name (null terminated char array)]
++
++    sal_uInt16 nDummy;
++    rStream >> nDummy; // ignore the first 2 bytes (B0 36).
++    rStream >> nDummy;
++    SCTAB nSheetNum = static_cast<SCTAB>(nDummy);
++    pDoc->MakeTable(nSheetNum);
++
++    ::std::vector<sal_Char> sSheetName;
++    sSheetName.reserve(nLength-4);
++    for (USHORT i = 4; i < nLength; ++i)
++    {
++        sal_Char c;
++        rStream >> c;
++        sSheetName.push_back(c);
++    }
++
++    if (!sSheetName.empty())
++    {
++        String aName(&sSheetName[0], eCharVon);
++        pDoc->RenameTab(nSheetNum, aName);
++    }
++}
++
+ void OP_ApplyPatternArea123( SvStream& rStream )
+ {
+     UINT16 nOpcode, nLength;
+Index: sc/source/filter/lotus/optab.cxx
+===================================================================
+RCS file: /cvs/sc/sc/source/filter/lotus/optab.cxx,v
+retrieving revision 1.4
+diff -u -r1.4 optab.cxx
+--- sc/source/filter/lotus/optab.cxx	21 Jul 2006 12:29:29 -0000	1.4
++++ sc/source/filter/lotus/optab.cxx	11 Dec 2007 22:18:18 -0000
+@@ -186,7 +186,7 @@
+ 	NI,					//   32
+ 	NI,					//   33
+ 	NI,					//   34
+-	NI,					//   35
++    OP_SheetName123,    //   35
+ 	NI,					//   36
+ 	OP_Number123,  			        //   37
+ 	OP_Note123,			//   38



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]