[Libreoffice-commits] .: svtools/source svx/source sw/source

Michael Meeks michael at kemper.freedesktop.org
Wed Feb 22 06:26:42 PST 2012


 svtools/source/graphic/grfmgr.cxx   |    5 -----
 svtools/source/graphic/provider.cxx |    3 ---
 svx/source/xml/xmlgrhlp.cxx         |    5 -----
 sw/source/core/graphic/ndgrf.cxx    |   33 ---------------------------------
 4 files changed, 46 deletions(-)

New commits:
commit fdb9d721c18fb3c3f81f7384ad544e72e969f448
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Feb 22 14:24:52 2012 +0000

    revert slew of debug code committed in error

diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 2124d62..7c2de86 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -422,17 +422,12 @@ String GraphicObject::GetLink() const
 
 void GraphicObject::SetUserData()
 {
-    fprintf (stderr, "SetUserData to null from '%s'\n",
-             mpUserData ? rtl::OUStringToOString(*mpUserData, RTL_TEXTENCODING_UTF8).getStr() : "<null>");
     if( mpUserData )
         delete mpUserData, mpUserData = NULL;
 }
 
 void GraphicObject::SetUserData( const String& rUserData )
 {
-    fprintf (stderr, "SetUserData to '%s' from '%s'\n",
-             rtl::OUStringToOString(rUserData, RTL_TEXTENCODING_UTF8).getStr(),
-             mpUserData ? rtl::OUStringToOString(*mpUserData, RTL_TEXTENCODING_UTF8).getStr() : "<null>");
     delete mpUserData, mpUserData = new String( rUserData );
 }
 
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 185e9dc..d5bcf46 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -867,7 +867,6 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
 
                 if( pGraphic && ( pGraphic->GetType() != GRAPHIC_NONE ) )
                 {
-                    fprintf (stderr, "provider.cxx - write graphic: ! 0x%lx\n", (long)pGraphic->GetChecksum() );
                     ::Graphic aGraphic( *pGraphic );
                     ImplApplyFilterData( aGraphic, aFilterDataSeq );
 
@@ -885,8 +884,6 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
                     }
                     aMemStrm.Seek( STREAM_SEEK_TO_END );
                     pOStm->Write( aMemStrm.GetData(), aMemStrm.Tell() );
-
-                    fprintf (stderr, "provider.cxx - after write graphic: ! 0x%lx\n", (long)pGraphic->GetChecksum() );
                 }
             }
         }
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 9f2c6c8..d73c19e 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -621,8 +621,6 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt
                 }
                 else if( aGraphic.GetType() == GRAPHIC_GDIMETAFILE )
                 {
-                    fprintf (stderr, "xmlgrhlp.cxx - write meta-file ! 0x%lx\n",
-                             (long)aGraphic.GetChecksum() );
                     pStream->SetVersion( SOFFICE_FILEFORMAT_8 );
                     pStream->SetCompressMode( COMPRESSMODE_ZBITMAP );
 
@@ -645,9 +643,6 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt
                         rMtf.Write( *pStream, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
 
                     bRet = ( pStream->GetError() == 0 );
-
-                    fprintf (stderr, "xmlgrhlp.cxx - done write meta-file ! 0x%lx\n",
-                             (long)aGraphic.GetChecksum() );
                 }
             }
             uno::Reference < embed::XTransactedObject > xStorage(
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 907e1f0..151d795 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -63,14 +63,6 @@
 
 using namespace com::sun::star;
 
-static void dbg (SwGrfNode *pNode)
-{
-    fprintf (stderr, "SwGrfNode created: '%s' 0x%lx\n",
-             rtl::OUStringToOString(pNode->GetGrfObj().GetUserData(),
-                                    RTL_TEXTENCODING_UTF8).getStr(),
-             (long)pNode->GetGrf().GetChecksum());
-}
-
 // --------------------
 // SwGrfNode
 // --------------------
@@ -91,7 +83,6 @@ SwGrfNode::SwGrfNode(
 
     bGrafikArrived = sal_True;
     ReRead(rGrfName,rFltName, pGraphic, 0, sal_False);
-    dbg(this);
 }
 
 SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
@@ -109,7 +100,6 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
     bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel= bLoadLowResGrf =
         bFrameInPaint = bScaleImageMap = sal_False;
     bGrafikArrived = sal_True;
-    dbg(this);
 }
 
 // Konstruktor fuer den SW/G-Reader. Dieser ctor wird verwendet,
@@ -145,7 +135,6 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
             ((SwBaseLink*)&refLink)->Connect();
         }
     }
-    dbg(this);
 }
 
 sal_Bool SwGrfNode::ReRead(
@@ -398,9 +387,6 @@ sal_Bool SwGrfNode::ImportGraphic( SvStream& rStrm )
     const String aGraphicURL( aGrfObj.GetUserData() );
     if( !GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, aGraphicURL, rStrm ) )
     {
-        fprintf (stderr, "Very curious set User Data of '%s' vs 0x%lx\n",
-                 rtl::OUStringToOString(aGraphicURL, RTL_TEXTENCODING_UTF8).getStr(),
-                 aGraphic.GetChecksum());
         aGrfObj.SetGraphic( aGraphic );
         aGrfObj.SetUserData( aGraphicURL );
         return sal_True;
@@ -514,13 +500,6 @@ short SwGrfNode::SwapOut()
                 if( !aGrfObj.SwapOut() )
                     return 0;
         }
-
-        if (HasStreamName() && aNewStrmName.Len() > 0 &&
-            aNewStrmName != aGrfObj.GetUserData())
-        {
-            fprintf (stderr, "not [!] swapping out stream with potentially bogus new name\n");
-            return 1;
-        }
         // Geschriebene Grafiken oder Links werden jetzt weggeschmissen
         return (short) aGrfObj.SwapOut( NULL );
     }
@@ -732,8 +711,6 @@ void SwGrfNode::DelStreamName()
 {
     if( HasStreamName() )
     {
-        fprintf (stderr, "FIXME: this method is -unutterably- broken - it takes no account of sharing images !\n\n\n");
-
         // Dann die Grafik im Storage loeschen
         uno::Reference < embed::XStorage > xDocStg = GetDoc()->GetDocStorage();
         if( xDocStg.is() )
@@ -821,13 +798,6 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf(
             }
         }
 
-        fprintf( stderr, "look for '%s' %d\n",
-                 rtl::OUStringToOString( _aStrmName, RTL_TEXTENCODING_UTF8 ).getStr(),
-                 _refPics->hasByName( _aStrmName ) );
-
-        fprintf( stderr, "look for [200004AD0000475F000033B381B9C98F.svm] %d\n",
-                 _refPics->hasByName( rtl::OUString::createFromAscii("200004AD0000475F000033B381B9C98F.svm" ) ) );
-
         // assure that graphic file exist in the storage.
         if ( _refPics->hasByName( _aStrmName ) &&
              _refPics->isStreamElement( _aStrmName ) )
@@ -857,9 +827,6 @@ void SwGrfNode::_GetStreamStorageNames( String& rStrmName,
     if( !aUserData.Len() )
         return;
 
-    fprintf (stderr, "UserData '%s' NewStrmName '%s'\n",
-             rtl::OUStringToOString(aUserData, RTL_TEXTENCODING_UTF8).getStr(),
-             rtl::OUStringToOString(aNewStrmName, RTL_TEXTENCODING_UTF8).getStr());
     if (aNewStrmName.Len()>0) {
         aUserData=aNewStrmName;
     }


More information about the Libreoffice-commits mailing list