From 07ff032c805835355ff0dff75b8ad534dfb770e9 Mon Sep 17 00:00:00 2001 From: Petr Vorel Date: Mon, 2 Apr 2012 11:40:06 +0200 Subject: remove unused code (oox) --- oox/inc/oox/dump/dumperbase.hxx | 18 ------- oox/inc/oox/dump/oledumper.hxx | 21 -------- oox/source/dump/dumperbase.cxx | 107 ------------------------------------- oox/source/dump/oledumper.cxx | 114 ---------------------------------------- unusedcode.easy | 17 ------ 5 files changed, 277 deletions(-) diff --git a/oox/inc/oox/dump/dumperbase.hxx b/oox/inc/oox/dump/dumperbase.hxx index 7f1822058efe..a09988633b38 100644 --- a/oox/inc/oox/dump/dumperbase.hxx +++ b/oox/inc/oox/dump/dumperbase.hxx @@ -395,7 +395,6 @@ public: // token list ------------------------------------------------------------- static void appendToken( ::rtl::OUStringBuffer& rStr, const ::rtl::OUString& rToken, sal_Unicode cSep = OOX_DUMP_LISTSEP ); - static void appendToken( ::rtl::OUStringBuffer& rStr, sal_Int64 nToken, sal_Unicode cSep = OOX_DUMP_LISTSEP ); static void appendIndex( ::rtl::OUStringBuffer& rStr, const ::rtl::OUString& rIdx ); static void appendIndex( ::rtl::OUStringBuffer& rStr, sal_Int64 nIdx ); @@ -1074,9 +1073,6 @@ public: void writeColRowRange( sal_Int32 nColRow1, sal_Int32 nColRow2 ); void writeColRange( sal_Int32 nCol1, sal_Int32 nCol2 ); void writeRowRange( sal_Int32 nRow1, sal_Int32 nRow2 ); - void writeAddress( const Address& rPos ); - void writeRange( const Range& rRange ); - void writeRangeList( const RangeList& rRanges ); template< typename Type > inline void writeDec( Type nData, sal_Int32 nWidth = 0, sal_Unicode cFill = ' ' ) @@ -1349,17 +1345,6 @@ protected: void writeArrayItem( const String& rName, const sal_uInt8* pnData, sal_Size nSize, sal_Unicode cSep = OOX_DUMP_LISTSEP ); void writeDateTimeItem( const String& rName, const ::com::sun::star::util::DateTime& rDateTime ); void writeGuidItem( const String& rName, const ::rtl::OUString& rGuid ); - void writeColIndexItem( const String& rName, sal_Int32 nCol ); - void writeRowIndexItem( const String& rName, sal_Int32 nRow ); - void writeColRangeItem( const String& rName, sal_Int32 nCol1, sal_Int32 nCol2 ); - void writeRowRangeItem( const String& rName, sal_Int32 nRow1, sal_Int32 nRow2 ); - void writeAddressItem( const String& rName, const Address& rPos ); - void writeRangeItem( const String& rName, const Range& rRange ); - void writeRangeListItem( const String& rName, const RangeList& rRanges ); - void writeTokenAddressItem( const String& rName, const TokenAddress& rPos, bool bNameMode ); - void writeTokenAddress3dItem( const String& rName, const ::rtl::OUString& rRef, const TokenAddress& rPos, bool bNameMode ); - void writeTokenRangeItem( const String& rName, const TokenRange& rRange, bool bNameMode ); - void writeTokenRange3dItem( const String& rName, const ::rtl::OUString& rRef, const TokenRange& rRange, bool bNameMode ); template< typename Type > void addNameToItem( Type nData, const NameListWrapper& rListWrp ); @@ -1753,9 +1738,6 @@ protected: const OutputObjectBase& rParent, const BinaryInputStreamRef& rxStrm, rtl_TextEncoding eTextEnc ); - void construct( - const InputObjectBase& rParent, - rtl_TextEncoding eTextEnc ); virtual bool implIsValid() const; virtual void implDump(); diff --git a/oox/inc/oox/dump/oledumper.hxx b/oox/inc/oox/dump/oledumper.hxx index 4d3ceaaa2f26..64d3d5cea399 100644 --- a/oox/inc/oox/dump/oledumper.hxx +++ b/oox/inc/oox/dump/oledumper.hxx @@ -83,27 +83,6 @@ protected: virtual void implDump(); }; -// ============================================================================ - -class StdHlinkObject : public OleInputObjectBase -{ -public: - explicit StdHlinkObject( const InputObjectBase& rParent ); - -protected: - virtual void implDump(); - -private: - ::rtl::OUString dumpHyperlinkString( const String& rName, bool bUnicode ); - - bool dumpGuidAndMoniker(); - void dumpUrlMoniker(); - void dumpFileMoniker(); - void dumpItemMoniker(); - void dumpAntiMoniker(); - void dumpCompositeMoniker(); -}; - // ============================================================================ // ============================================================================ 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(); -} - // ============================================================================ // ============================================================================ diff --git a/unusedcode.easy b/unusedcode.easy index 0e84d5b83bfb..4765225df108 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -815,23 +815,6 @@ nullcanvas::SpriteCanvasHelper::genericUpdate(basegfx::B2DConnectedRanges::ConnectedComponents const&) nullcanvas::SpriteCanvasHelper::scrollUpdate(basegfx::B2DRange const&, basegfx::B2DRange const&, basegfx::B2DConnectedRanges::ConnectedComponents const&) ooo::vba::extractIntFromAny(com::sun::star::uno::Any const&) -oox::dump::Output::writeAddress(oox::dump::Address const&) -oox::dump::Output::writeRange(oox::dump::Range const&) -oox::dump::Output::writeRangeList(std::__debug::vector > const&) -oox::dump::OutputObjectBase::writeAddressItem(oox::dump::String const&, oox::dump::Address const&) -oox::dump::OutputObjectBase::writeColIndexItem(oox::dump::String const&, int) -oox::dump::OutputObjectBase::writeColRangeItem(oox::dump::String const&, int, int) -oox::dump::OutputObjectBase::writeRangeItem(oox::dump::String const&, oox::dump::Range const&) -oox::dump::OutputObjectBase::writeRangeListItem(oox::dump::String const&, std::__debug::vector > const&) -oox::dump::OutputObjectBase::writeRowIndexItem(oox::dump::String const&, int) -oox::dump::OutputObjectBase::writeRowRangeItem(oox::dump::String const&, int, int) -oox::dump::OutputObjectBase::writeTokenAddress3dItem(oox::dump::String const&, rtl::OUString const&, oox::dump::TokenAddress const&, bool) -oox::dump::OutputObjectBase::writeTokenAddressItem(oox::dump::String const&, oox::dump::TokenAddress const&, bool) -oox::dump::OutputObjectBase::writeTokenRange3dItem(oox::dump::String const&, rtl::OUString const&, oox::dump::TokenRange const&, bool) -oox::dump::OutputObjectBase::writeTokenRangeItem(oox::dump::String const&, oox::dump::TokenRange const&, bool) -oox::dump::StdHlinkObject::StdHlinkObject(oox::dump::InputObjectBase const&) -oox::dump::StringHelper::appendToken(rtl::OUStringBuffer&, long, unsigned short) -oox::dump::TextStreamObjectBase::construct(oox::dump::InputObjectBase const&, unsigned short) oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange const&, int) psp::PrinterGfx::DrawBitmap(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterBmp const&) psp::PrinterGfx::DrawMask(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterColor&) -- cgit