diff options
author | Petr Vorel <petr.vorel@gmail.com> | 2012-04-02 11:40:06 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-05 13:01:22 +0200 |
commit | 07ff032c805835355ff0dff75b8ad534dfb770e9 (patch) | |
tree | 29b07f110b63b130377e5befc085e87fa07129fa /oox/source/dump | |
parent | 45d1ebeca54c22d35777c57cdbb6b3a9dad55632 (diff) |
remove unused code (oox)
Diffstat (limited to 'oox/source/dump')
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 107 | ||||
-rw-r--r-- | oox/source/dump/oledumper.cxx | 114 |
2 files changed, 0 insertions, 221 deletions
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index d7f8910994e4..d529d7203cd2 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -616,13 +616,6 @@ void StringHelper::appendToken( OUStringBuffer& rStr, const OUString& rToken, sa rStr.append( rToken ); } -void StringHelper::appendToken( OUStringBuffer& rStr, sal_Int64 nToken, sal_Unicode cSep ) -{ - OUStringBuffer aToken; - appendDec( aToken, nToken ); - appendToken( rStr, aToken.makeStringAndClear(), cSep ); -} - void StringHelper::appendIndex( OUStringBuffer& rStr, const OUString& rIdx ) { rStr.append( sal_Unicode( '[' ) ).append( rIdx ).append( sal_Unicode( ']' ) ); @@ -1878,21 +1871,6 @@ void Output::writeRowRange( sal_Int32 nRow1, sal_Int32 nRow2 ) writeRowIndex( nRow2 ); } -void Output::writeAddress( const Address& rPos ) -{ - StringHelper::appendAddress( maLine, rPos ); -} - -void Output::writeRange( const Range& rRange ) -{ - StringHelper::appendRange( maLine, rRange ); -} - -void Output::writeRangeList( const RangeList& rRanges ) -{ - StringHelper::appendRangeList( maLine, rRanges ); -} - // ---------------------------------------------------------------------------- bool Output::implIsValid() const @@ -2222,85 +2200,6 @@ void OutputObjectBase::writeGuidItem( const String& rName, const OUString& rGuid mxOut->writeString( cfg().getStringOption( rGuid, OUString() ) ); } -void OutputObjectBase::writeColIndexItem( const String& rName, sal_Int32 nCol ) -{ - ItemGuard aItem( mxOut, rName ); - mxOut->writeDec( nCol ); - aItem.cont(); - mxOut->writeColIndex( nCol ); -} - -void OutputObjectBase::writeRowIndexItem( const String& rName, sal_Int32 nRow ) -{ - ItemGuard aItem( mxOut, rName ); - mxOut->writeDec( nRow ); - aItem.cont(); - mxOut->writeRowIndex( nRow ); -} - -void OutputObjectBase::writeColRangeItem( const String& rName, sal_Int32 nCol1, sal_Int32 nCol2 ) -{ - ItemGuard aItem( mxOut, rName ); - mxOut->writeColRowRange( nCol1, nCol2 ); - aItem.cont(); - mxOut->writeColRange( nCol1, nCol2 ); -} - -void OutputObjectBase::writeRowRangeItem( const String& rName, sal_Int32 nRow1, sal_Int32 nRow2 ) -{ - ItemGuard aItem( mxOut, rName ); - mxOut->writeColRowRange( nRow1, nRow2 ); - aItem.cont(); - mxOut->writeRowRange( nRow1, nRow2 ); -} - -void OutputObjectBase::writeAddressItem( const String& rName, const Address& rPos ) -{ - ItemGuard aItem( mxOut, rName ); - StringHelper::appendAddress( mxOut->getLine(), rPos ); -} - -void OutputObjectBase::writeRangeItem( const String& rName, const Range& rRange ) -{ - ItemGuard aItem( mxOut, rName ); - StringHelper::appendRange( mxOut->getLine(), rRange ); -} - -void OutputObjectBase::writeRangeListItem( const String& rName, const RangeList& rRanges ) -{ - MultiItemsGuard aMultiGuard( mxOut ); - writeEmptyItem( rName ); - writeDecItem( "count", static_cast< sal_uInt16 >( rRanges.size() ) ); - ItemGuard aItem( mxOut, "ranges" ); - StringHelper::appendRangeList( mxOut->getLine(), rRanges ); -} - -void OutputObjectBase::writeTokenAddressItem( const String& rName, const TokenAddress& rPos, bool bNameMode ) -{ - ItemGuard aItem( mxOut, rName ); - StringHelper::appendAddress( mxOut->getLine(), rPos, bNameMode ); -} - -void OutputObjectBase::writeTokenAddress3dItem( const String& rName, const OUString& rRef, const TokenAddress& rPos, bool bNameMode ) -{ - ItemGuard aItem( mxOut, rName ); - mxOut->writeString( rRef ); - StringHelper::appendAddress( mxOut->getLine(), rPos, bNameMode ); -} - -void OutputObjectBase::writeTokenRangeItem( const String& rName, const TokenRange& rRange, bool bNameMode ) -{ - ItemGuard aItem( mxOut, rName ); - StringHelper::appendRange( mxOut->getLine(), rRange, bNameMode ); -} - -void OutputObjectBase::writeTokenRange3dItem( const String& rName, const OUString& rRef, const TokenRange& rRange, bool bNameMode ) -{ - ItemGuard aItem( mxOut, rName ); - mxOut->writeString( rRef ); - StringHelper::appendRange( mxOut->getLine(), rRange, bNameMode ); -} - // ============================================================================ // ============================================================================ @@ -2645,12 +2544,6 @@ void TextStreamObjectBase::construct( const OutputObjectBase& rParent, constructTextStrmObj( eTextEnc ); } -void TextStreamObjectBase::construct( const InputObjectBase& rParent, rtl_TextEncoding eTextEnc ) -{ - InputObjectBase::construct( rParent ); - constructTextStrmObj( eTextEnc ); -} - bool TextStreamObjectBase::implIsValid() const { return InputObjectBase::implIsValid() && mxTextStrm.get(); diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx index 6a22a438eeab..1aa62161f745 100644 --- a/oox/source/dump/oledumper.cxx +++ b/oox/source/dump/oledumper.cxx @@ -143,120 +143,6 @@ const sal_uInt32 STDHLINK_ASSTRING = 0x00000100; /// Hyperlink as sim } // namespace -StdHlinkObject::StdHlinkObject( const InputObjectBase& rParent ) -{ - construct( rParent ); -} - -void StdHlinkObject::implDump() -{ - dumpDec< sal_uInt32 >( "stream-version" ); - sal_uInt32 nFlags = dumpHex< sal_uInt32 >( "flags", "STDHLINK-FLAGS" ); - if( getFlag( nFlags, STDHLINK_HASDISPLAY ) ) - dumpHyperlinkString( "display", true ); - if( getFlag( nFlags, STDHLINK_HASFRAME ) ) - dumpHyperlinkString( "frame", true ); - if( getFlag( nFlags, STDHLINK_HASTARGET ) ) - { - if( getFlag( nFlags, STDHLINK_ASSTRING ) ) - dumpHyperlinkString( "filename", true ); - else if( !dumpGuidAndMoniker() ) - return; - } - if( getFlag( nFlags, STDHLINK_HASLOCATION ) ) - dumpHyperlinkString( "location", true ); - if( getFlag( nFlags, STDHLINK_HASGUID ) ) - dumpGuid( "id-guid" ); - if( getFlag( nFlags, STDHLINK_HASTIME ) ) - dumpFileTime( "creation-time" ); -} - -OUString StdHlinkObject::dumpHyperlinkString( const String& rName, bool bUnicode ) -{ - return bUnicode ? dumpUniString32( rName ) : dumpAnsiString32( rName ); -} - -bool StdHlinkObject::dumpGuidAndMoniker() -{ - bool bValidMoniker = true; - OUString aGuid = cfg().getStringOption( dumpGuid( "moniker" ), OUString() ); - IndentGuard aIndGuard( mxOut ); - if( aGuid.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URLMoniker" ) ) ) - dumpUrlMoniker(); - else if( aGuid.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FileMoniker" ) ) ) - dumpFileMoniker(); - else if( aGuid.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemMoniker" ) ) ) - dumpItemMoniker(); - else if( aGuid.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AntiMoniker" ) ) ) - dumpAntiMoniker(); - else if( aGuid.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CompositeMoniker" ) ) ) - dumpCompositeMoniker(); - else - bValidMoniker = false; - return bValidMoniker; -} - -void StdHlinkObject::dumpUrlMoniker() -{ - sal_Int32 nBytes = dumpDec< sal_Int32 >( "url-bytes" ); - sal_Int64 nEndPos = mxStrm->tell() + ::std::max< sal_Int32 >( nBytes, 0 ); - dumpNullUnicodeArray( "url" ); - if( mxStrm->tell() + 24 == nEndPos ) - { - dumpGuid( "implementation-id" ); - dumpDec< sal_uInt32 >( "version" ); - dumpHex< sal_uInt32 >( "flags", "STDHLINK-URL-FLAGS" ); - } - dumpRemainingTo( nEndPos ); -} - -void StdHlinkObject::dumpFileMoniker() -{ - dumpDec< sal_Int16 >( "up-levels" ); - dumpHyperlinkString( "ansi-filename", false ); - dumpDec< sal_Int16 >( "server-path-len" ); - dumpHex< sal_uInt16 >( "version" ); - dumpUnused( 20 ); - sal_Int32 nBytes = dumpDec< sal_Int32 >( "total-bytes" ); - sal_Int64 nEndPos = mxStrm->tell() + ::std::max< sal_Int32 >( nBytes, 0 ); - if( nBytes > 0 ) - { - sal_Int32 nFileBytes = dumpDec< sal_Int32 >( "uni-filename-bytes" ); - dumpDec< sal_uInt16 >( "key-value" ); - dumpUnicodeArray( "unicode-filename", nFileBytes / 2 ); - } - dumpRemainingTo( nEndPos ); -} - -void StdHlinkObject::dumpItemMoniker() -{ - sal_Int32 nBytes = dumpDec< sal_Int32 >( "delimiter-bytes" ); - sal_Int64 nEndPos = mxStrm->tell() + ::std::max< sal_Int32 >( nBytes, 0 ); - dumpNullCharArray( "ansi-delimiter", RTL_TEXTENCODING_MS_1252 ); - if( mxStrm->tell() < nEndPos ) - dumpUnicodeArray( "unicode-delimiter", (nEndPos - mxStrm->tell()) / 2 ); - mxStrm->seek( nEndPos ); - - nBytes = dumpDec< sal_Int32 >( "item-bytes" ); - nEndPos = mxStrm->tell() + ::std::max< sal_Int32 >( nBytes, 0 ); - dumpNullCharArray( "ansi-item", RTL_TEXTENCODING_MS_1252 ); - if( mxStrm->tell() < nEndPos ) - dumpUnicodeArray( "unicode-item", (nEndPos - mxStrm->tell()) / 2 ); - mxStrm->seek( nEndPos ); -} - -void StdHlinkObject::dumpAntiMoniker() -{ - dumpDec< sal_Int32 >( "count" ); -} - -void StdHlinkObject::dumpCompositeMoniker() -{ - sal_Int32 nCount = dumpDec< sal_Int32 >( "moniker-count" ); - for( sal_Int32 nIndex = 0; !mxStrm->isEof() && (nIndex < nCount); ++nIndex ) - dumpGuidAndMoniker(); -} - // ============================================================================ // ============================================================================ |