update ooo310-m15
[ooovba.git] / applied_patches / 0169-sc-biffdump.diff
blob7636210ba1599d09d67d5c5d8557fb8e6861322c
1 Index: sc/source/filter/excel/biffdump.cxx
2 ===================================================================
3 RCS file: /cvs/sc/sc/source/filter/excel/biffdump.cxx,v
4 retrieving revision 1.89
5 diff -u -p -r1.89 biffdump.cxx
6 --- sc/source/filter/excel/biffdump.cxx 3 Jul 2007 15:50:04 -0000 1.89
7 +++ sc/source/filter/excel/biffdump.cxx 1 Oct 2007 20:00:49 -0000
8 @@ -140,6 +140,16 @@ inline void lclAppendDec( ByteString& rS
9 rStr.Append( ByteString::CreateFromInt32( nData ) );
12 +inline void lclAppendDec( ByteString& rStr, sal_uInt64 nData )
14 + rStr.Append( ByteString::CreateFromInt64( nData ) );
17 +inline void lclAppendDec( ByteString& rStr, sal_Int64 nData )
19 + rStr.Append( ByteString::CreateFromInt64( nData ) );
22 inline void lclAppendDec( ByteString& rStr, float fData )
24 rStr.Append( ByteString( ::rtl::math::doubleToString( fData, rtl_math_StringFormat_G, 15, '.', true ) ) );
25 @@ -189,6 +199,17 @@ inline void lclAppendHex( ByteString& rS
26 lclAppendHex( rStr, static_cast< sal_uInt32 >( nData ), bPrefix );
29 +void lclAppendHex( ByteString& rStr, sal_uInt64 nData, bool bPrefix = true )
31 + lclAppendHex( rStr, static_cast< sal_uInt32 >( nData >> 32 ), bPrefix );
32 + lclAppendHex( rStr, static_cast< sal_uInt32 >( nData ), false );
35 +inline void lclAppendHex( ByteString& rStr, sal_Int64 nData, bool bPrefix = true )
37 + lclAppendHex( rStr, static_cast< sal_uInt64 >( nData ), bPrefix );
40 inline void lclAppendHex( ByteString& rStr, double fData, bool bPrefix = true )
42 const sal_uInt32* pnData = reinterpret_cast< const sal_uInt32* >( &fData );
43 @@ -298,6 +319,34 @@ static void __AddHex( ByteString& r, INT
47 +static void __AddHex( ByteString& r, UINT64 nVal )
49 + r += __pHexPrefix;
50 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 60 ) );
51 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 56 ) );
52 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 52 ) );
53 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 48 ) );
54 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 44 ) );
55 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 40 ) );
56 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 36 ) );
57 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 32 ) );
58 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 28 ) );
59 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 24 ) );
60 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 20 ) );
61 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 16 ) );
62 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 12 ) );
63 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 8 ) );
64 + __AddHexNibble( r, ( UINT8 ) ( nVal >> 4 ) );
65 + __AddHexNibble( r, ( UINT8 ) nVal );
69 +static void __AddHex( ByteString& r, INT64 nVal )
71 + __AddHex( r, (UINT64) nVal );
75 static void __AddPureBinNibble( ByteString& r, UINT8 nVal )
77 nVal <<= 4;
78 @@ -339,6 +388,14 @@ static void __AddPureBin( ByteString& r,
82 +inline static void __AddDec( ByteString& r, UINT64 n )
84 + // FIXME: need "%llu" for ILP32 platforms, "%lu" for LP64 platforms,
85 + // and I have no idea for Win32.
86 + __AddDec( r, static_cast<UINT32>(n) );
90 inline static void __AddDec( ByteString& r, UINT32 n )
92 sal_Char p[ 32 ];
93 @@ -367,6 +424,14 @@ inline static void __AddDec( ByteString&
97 +inline static void __AddDec( ByteString& r, INT64 n )
99 + // FIXME: need "%lld" for ILP32 platforms, "%ld" for LP64 platforms,
100 + // and I have no idea for Win32.
101 + __AddDec( r, static_cast<INT32>(n) );
105 inline static void __AddDec( ByteString& r, INT16 n )
107 __AddDec( r, ( INT32 ) n );
108 @@ -1063,8 +1128,8 @@ UINT16 Biff8RecDumper::DumpXF( XclImpStr
109 ADDTEXT( "diag-line=" ); __AddDec( t, nTmp );
110 ::extract_value( nTmp, nBorder2, 14, 7 );
111 ADDTEXT( " color=" ); __AddDec( t, nTmp );
112 - ADDTEXT( " diag-tl-to-br=" ); lcl_AddOnOff( t, ::get_flag( nBorder1, 0x40000000UL ) );
113 - ADDTEXT( " diag-bl-to-tr=" ); lcl_AddOnOff( t, ::get_flag( nBorder1, 0x80000000UL ) );
114 + ADDTEXT( " diag-tl-to-br=" ); lcl_AddOnOff( t, ::get_flag( nBorder1, static_cast< sal_Size >( 0x40000000U ) ) );
115 + ADDTEXT( " diag-bl-to-tr=" ); lcl_AddOnOff( t, ::get_flag( nBorder1, static_cast< sal_Size >( 0x80000000U ) ) );
116 PRINT();
117 LINESTART();
118 ::extract_value( nTmp, nBorder2, 26, 6 );
119 @@ -9820,7 +9885,7 @@ BOOL Biff8RecDumper::Dump( XclImpStream&
120 SvFileStream aBook( String::CreateFromAscii( aBookOutName.GetBuffer() ), STREAM_WRITE|STREAM_SHARE_DENYWRITE|STREAM_TRUNC );
121 if( aBook.IsOpen() )
123 - const sal_uInt32 nBufLen = 0xFFFF;
124 + const sal_Size nBufLen = 0xFFFF;
125 sal_uInt8 pBuffer[ nBufLen ];
126 r.StoreGlobalPosition();
127 while( r.StartNextRecord() )