[Libreoffice-commits] core.git: 2 commits - codemaker/source filter/source include/filter sc/source sw/source

Jan Holesovsky kendy at collabora.com
Mon Apr 14 06:46:49 PDT 2014


 codemaker/source/cppumaker/cpputype.cxx |   45 +++++++++---------
 filter/source/msfilter/mstoolbar.cxx    |   26 ++++++++++
 include/filter/msfilter/mstoolbar.hxx   |   51 ++++++++++++++++-----
 sc/source/filter/excel/xltoolbar.cxx    |   11 ++++
 sc/source/filter/excel/xltoolbar.hxx    |   20 ++++++--
 sw/source/filter/ww8/ww8par.cxx         |    6 ++
 sw/source/filter/ww8/ww8toolbar.cxx     |   46 ++++++++++++++++---
 sw/source/filter/ww8/ww8toolbar.hxx     |   76 ++++++++++++++++++++++++--------
 8 files changed, 211 insertions(+), 70 deletions(-)

New commits:
commit 893590f16e9ac10e61f2c1b37e27a11fe2205f42
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Apr 14 15:39:46 2014 +0200

    The entry points for these are hidden behind OSL_DEBUG_LEVEL > 1 too.
    
    Change-Id: I728e808ac897aa1be184fb4a8bbbf781eb816cf0

diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 0d63c51..589b7d9 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -210,6 +210,7 @@ bool TBCHeader::Read( SvStream &rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void TBCHeader::Print( FILE* fp )
 {
     Indent a;
@@ -226,6 +227,7 @@ void TBCHeader::Print( FILE* fp )
     if ( height.get() )
         indent_printf(fp,"  height 0x%d(0x%x)\n", *height, *height);
 }
+#endif
 
 TBCData::TBCData( const TBCHeader& Header ) : rHeader( Header )
 {
@@ -359,6 +361,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect
     return true; // just ignore
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void TBCData::Print( FILE* fp )
 {
     Indent a;
@@ -372,6 +375,7 @@ void TBCData::Print( FILE* fp )
         controlSpecificInfo->Print( fp );
     }
 }
+#endif
 
 bool
 WString::Read( SvStream &rS )
@@ -408,6 +412,7 @@ TBCExtraInfo::Read( SvStream &rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void
 TBCExtraInfo::Print( FILE* fp )
 {
@@ -424,8 +429,8 @@ TBCExtraInfo::Print( FILE* fp )
         OUStringToOString( wstrParam.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
     indent_printf( fp, "  tbcu 0x%x\n", tbcu );
     indent_printf( fp, "  tbmg 0x%x\n", tbmg );
-
 }
+#endif
 
 OUString
 TBCExtraInfo::getOnAction()
@@ -452,6 +457,7 @@ bool TBCGeneralInfo::Read( SvStream &rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void
 TBCGeneralInfo::Print( FILE* fp )
 {
@@ -467,6 +473,7 @@ TBCGeneralInfo::Print( FILE* fp )
     if ( bFlags & 0x4 )
         extraInfo.Print( fp );
 }
+#endif
 
 bool
 TBCGeneralInfo::ImportToolBarControlData( CustomToolBarImportHelper& helper, std::vector< beans::PropertyValue >& sControlData )
@@ -530,6 +537,7 @@ TBCMenuSpecific::Read( SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void
 TBCMenuSpecific::Print( FILE* fp )
 {
@@ -538,8 +546,8 @@ TBCMenuSpecific::Print( FILE* fp )
     indent_printf( fp, "  tbid 0x%x\n", static_cast< unsigned int >( tbid ) );
     if ( tbid == 1 )
         indent_printf( fp, "  name %s\n", OUStringToOString( name->getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
-
 }
+#endif
 
 OUString TBCMenuSpecific::Name()
 {
@@ -584,6 +592,7 @@ bool TBCBSpecific::Read( SvStream &rS)
 }
 
 
+#if OSL_DEBUG_LEVEL > 1
 void TBCBSpecific::Print( FILE* fp )
 {
     Indent a;
@@ -612,6 +621,7 @@ void TBCBSpecific::Print( FILE* fp )
     bResult = ( wstrAcc.get() != NULL );
     indent_printf( fp, "  option string present? %s ->%s<-\n", bResult ? "true" : "false", bResult ? OUStringToOString( wstrAcc->getString(), RTL_TEXTENCODING_UTF8 ).getStr() : "N/A" );
 }
+#endif
 
 TBCBitMap*
 TBCBSpecific::getIcon()
@@ -639,6 +649,7 @@ bool TBCComboDropdownSpecific::Read( SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void TBCComboDropdownSpecific::Print( FILE* fp)
 {
     Indent a;
@@ -648,6 +659,7 @@ void TBCComboDropdownSpecific::Print( FILE* fp)
     else
         indent_printf(fp," no data " );
 }
+#endif
 
 TBCCDData::TBCCDData()
     : cwstrItems(0)
@@ -681,6 +693,7 @@ bool TBCCDData::Read( SvStream &rS)
     return wstrEdit.Read( rS );
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void TBCCDData::Print( FILE* fp)
 {
     Indent a;
@@ -697,6 +710,7 @@ void TBCCDData::Print( FILE* fp)
     indent_printf(fp,"  dxWidth width in pixels 0x%d", dxWidth);
     indent_printf(fp,"  wstrEdit %s", OUStringToOString( wstrEdit.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
 }
+#endif
 
 TBCBitMap::TBCBitMap() : cbDIB( 0 )
 {
@@ -722,12 +736,14 @@ bool TBCBitMap::Read( SvStream& rS)
     return ReadDIB(mBitMap, rS, false);
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void TBCBitMap::Print( FILE* fp )
 {
     Indent a;
     indent_printf(fp, "[ 0x%x ] TBCBitMap -- dump\n", nOffSet );
     indent_printf(fp, "  TBCBitMap size of bitmap data 0x%x\n", static_cast< unsigned int > ( cbDIB ) );
 }
+#endif
 
 TB::TB() : bSignature(0x2),
 bVersion(0x1),
@@ -754,6 +770,7 @@ bool TB::IsEnabled()
     return ( bFlags & 0x01 ) != 0x01;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void TB::Print( FILE* fp )
 {
     Indent a;
@@ -767,6 +784,7 @@ void TB::Print( FILE* fp )
     indent_printf(fp,"  bFlags 0x%x\n", bFlags );
     indent_printf(fp, "  name %s\n", OUStringToOString( name.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
 }
+#endif
 
 TBVisualData::TBVisualData() : tbds(0), tbv(0), tbdsDock(0), iRow(0)
 {
@@ -782,6 +800,7 @@ bool TBVisualData::Read( SvStream& rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void SRECT::Print( FILE* fp )
 {
     Indent a;
@@ -790,7 +809,9 @@ void SRECT::Print( FILE* fp )
     indent_printf( fp, "  right 0x%x\n", right);
     indent_printf( fp, "  bottom 0x%x\n", bottom);
 }
+#endif
 
+#if OSL_DEBUG_LEVEL > 1
 void TBVisualData::Print( FILE* fp )
 {
     Indent a;
@@ -802,5 +823,6 @@ void TBVisualData::Print( FILE* fp )
     rcDock.Print( fp );
     rcFloat.Print( fp );
 }
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/filter/msfilter/mstoolbar.hxx b/include/filter/msfilter/mstoolbar.hxx
index 2a9f38d..586f655 100644
--- a/include/filter/msfilter/mstoolbar.hxx
+++ b/include/filter/msfilter/mstoolbar.hxx
@@ -79,7 +79,9 @@ public:
     virtual ~TBBase(){}
 
     virtual bool Read(SvStream &rS) = 0;
+#if OSL_DEBUG_LEVEL > 1
     virtual void Print( FILE* ) {} // #FIXME remove this an implement the debug routines in all the classes below to enable some sort of readable output
+#endif
     sal_uInt32 GetOffset() { return nOffSet; }
 };
 
@@ -125,7 +127,9 @@ public:
     TBCExtraInfo();
     virtual ~TBCExtraInfo(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     OUString getOnAction();
 };
 
@@ -141,7 +145,9 @@ public:
     TBCGeneralInfo();
     virtual ~TBCGeneralInfo() {}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     bool ImportToolBarControlData( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >& );
     OUString CustomText() { return customText.getString(); }
     OUString DescriptionText() { return descriptionText.getString(); }
@@ -157,7 +163,9 @@ public:
     TBCBitMap();
     virtual ~TBCBitMap();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     Bitmap& getBitMap();
 };
 
@@ -169,7 +177,9 @@ public:
     TBCMenuSpecific();
     virtual ~TBCMenuSpecific(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     OUString Name();
 };
 
@@ -187,7 +197,9 @@ public:
     TBCCDData();
     virtual ~TBCCDData();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class TBCComboDropdownSpecific : public TBBase
@@ -197,7 +209,9 @@ public:
     TBCComboDropdownSpecific( const TBCHeader& header );
     TBCComboDropdownSpecific(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class TBCBSpecific :  public TBBase
@@ -212,7 +226,9 @@ public:
     TBCBSpecific();
     virtual ~TBCBSpecific(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     // #TODO just add a getGraphic member here
     TBCBitMap* getIcon();
     TBCBitMap* getIconMask();
@@ -260,7 +276,9 @@ public:
     bool isVisible() { return !( bFlagsTCR & 0x1 ); }
     bool isBeginGroup() { return ( bFlagsTCR & 0x2 ); }
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     sal_uInt32 getTbct() { return tbct; };
 };
 
@@ -275,7 +293,9 @@ public:
     TBCData( const TBCHeader& Header );
     virtual ~TBCData(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     bool ImportToolBarControl( CustomToolBarImportHelper&, std::vector< css::beans::PropertyValue >&, bool& bBeginGroup, bool bIsMenuBar );
     TBCGeneralInfo& getGeneralInfo() { return controlGeneralInfo; }
     TBCMenuSpecific* getMenuSpecific();
@@ -295,7 +315,9 @@ public:
     TB();
     virtual ~TB(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     sal_Int16 getcCL(){ return cCL; }
     WString& getName(){ return name; }
     bool IsEnabled();
@@ -311,7 +333,9 @@ public:
     sal_Int16 right;
     sal_Int16 bottom;
     bool Read( SvStream &rS ) SAL_OVERRIDE { rS.ReadInt16( left ).ReadInt16( top ).ReadInt16( right ).ReadInt16( bottom ); return true; }
-    void Print( FILE* fo ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* fo ) SAL_OVERRIDE;
+#endif
 };
 
 typedef cppu::WeakImplHelper1< css::container::XIndexContainer > PropertyValueIndexContainer_BASE;
@@ -330,8 +354,11 @@ public:
     TBVisualData();
     virtual ~TBVisualData(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index 33aa2a4..468de5e 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -97,6 +97,7 @@ bool ScCTB::Read( SvStream &rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void ScCTB::Print( FILE* fp )
 {
     Indent a;
@@ -123,6 +124,7 @@ void ScCTB::Print( FILE* fp )
         it->Print( fp );
     }
 }
+#endif
 
 bool ScCTB::IsMenuToolbar()
 {
@@ -192,6 +194,7 @@ bool CTBS::Read( SvStream &rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void CTBS::Print( FILE* fp )
 {
     Indent a;
@@ -208,6 +211,7 @@ void CTBS::Print( FILE* fp )
     indent_printf( fp, "  ctbViews 0x%x\n", ctbViews );
     indent_printf( fp, "  ictbView 0x%x\n", ictbView );
 }
+#endif
 
 ScTBC::ScTBC()
 {
@@ -237,7 +241,7 @@ ScTBC::Read(SvStream &rS)
     return true;
 }
 
-
+#if OSL_DEBUG_LEVEL > 1
 void
 ScTBC::Print(FILE* fp)
 {
@@ -249,6 +253,7 @@ ScTBC::Print(FILE* fp)
     if ( tbcd.get() )
         tbcd->Print( fp );
 }
+#endif
 
 bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuToolbar )
 {
@@ -307,6 +312,7 @@ bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Refere
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void
 TBCCmd::Print(FILE* fp)
 {
@@ -319,6 +325,7 @@ TBCCmd::Print(FILE* fp)
     indent_printf( fp, "   C ( reserved - ignored ) %s\n", A ? "true" : "false" );
     indent_printf( fp, "   reserved3 0x%x\n", reserved3 );
 }
+#endif
 
 bool TBCCmd::Read( SvStream &rS )
 {
@@ -361,6 +368,7 @@ ScCTBWrapper::Read( SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void
 ScCTBWrapper::Print( FILE* fp )
 {
@@ -374,6 +382,7 @@ ScCTBWrapper::Print( FILE* fp )
         it->Print( fp );
     }
 }
+#endif
 
 ScCTB* ScCTBWrapper::GetCustomizationData( const OUString& sTBName )
 {
diff --git a/sc/source/filter/excel/xltoolbar.hxx b/sc/source/filter/excel/xltoolbar.hxx
index abb5220..d30169a 100644
--- a/sc/source/filter/excel/xltoolbar.hxx
+++ b/sc/source/filter/excel/xltoolbar.hxx
@@ -26,7 +26,9 @@ public:
     bool C:1;
     sal_uInt16 reserved3:8;
     bool Read( SvStream& rS ) SAL_OVERRIDE;
-    void Print(FILE* fp) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print(FILE* fp) SAL_OVERRIDE;
+#endif
 };
 
 class ScTBC : public TBBase
@@ -37,7 +39,9 @@ class ScTBC : public TBBase
 public:
     ScTBC();
     virtual ~ScTBC(){}
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     bool Read(SvStream &rS) SAL_OVERRIDE;
     bool ImportToolBarControl( ScCTBWrapper&, const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar );
 };
@@ -53,7 +57,9 @@ class ScCTB : public TBBase
 public:
     ScCTB(sal_uInt16);
     virtual ~ScCTB(){}
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     bool Read(SvStream &rS) SAL_OVERRIDE;
     bool IsMenuToolbar();
     bool ImportCustomToolBar( ScCTBWrapper&, CustomToolBarImportHelper& );
@@ -78,7 +84,9 @@ public:
     CTBS& operator = ( const CTBS&);
     CTBS();
     virtual ~CTBS(){}
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     bool Read(SvStream &rS) SAL_OVERRIDE;
 };
 
@@ -92,7 +100,9 @@ public:
     ScCTBWrapper();
     virtual ~ScCTBWrapper();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     bool ImportCustomToolBar( SfxObjectShell& rDocSh );
     ScCTB* GetCustomizationData( const OUString& name );
 };
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 0a8dc04..aa3c81a 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -442,7 +442,9 @@ public:
     Sttb();
     virtual ~Sttb();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* fp ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* fp ) SAL_OVERRIDE;
+#endif
     OUString getStringAtIndex( sal_uInt32 );
 };
 
@@ -474,6 +476,7 @@ bool Sttb::Read( SvStream& rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void Sttb::Print( FILE* fp )
 {
     fprintf( fp, "[ 0x%" SAL_PRIxUINT32 " ] Sttb - dump\n", nOffSet);
@@ -486,6 +489,7 @@ void Sttb::Print( FILE* fp )
             fprintf(fp,"   string dataItem[ %d(0x%x) ] has name %s\n", static_cast< int >( index ), static_cast< unsigned int >( index ), OUStringToOString( dataItems[ index ].data, RTL_TEXTENCODING_UTF8 ).getStr() );
     }
 }
+#endif
 
 OUString
 Sttb::getStringAtIndex( sal_uInt32 index )
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index f4298da..557fa78 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -176,6 +176,7 @@ SwTBC* SwCTBWrapper::GetTBCAtOffset( sal_uInt32 nStreamOffset )
     return NULL;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void SwCTBWrapper::Print( FILE* fp )
 {
     Indent a;
@@ -215,6 +216,7 @@ void SwCTBWrapper::Print( FILE* fp )
         it->Print(fp);
     }
 }
+#endif
 
 bool SwCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
 {
@@ -277,6 +279,7 @@ bool Customization::Read( SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void Customization::Print( FILE* fp )
 {
     Indent a;
@@ -307,8 +310,8 @@ void Customization::Print( FILE* fp )
         for ( sal_Int32 index = 0; index < ctbds; ++it,++index )
             it->Print( fp );
     }
-
 }
+#endif
 
 bool Customization::ImportMenu( SwCTBWrapper& rWrapper, CustomToolBarImportHelper& helper )
 {
@@ -452,6 +455,7 @@ bool TBDelta::Read(SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void TBDelta::Print( FILE* fp )
 {
     // Like most of the debug output, it's raw and little ( no )
@@ -471,6 +475,7 @@ void TBDelta::Print( FILE* fp )
         indent_printf( fp, " the menu toolbar drops the toolbar defined at index[%d] in the rCustomizations array of the CTBWRAPPER that contains this TBDelta\n", CustomizationIndex() );
     }
 }
+#endif
 
 SwCTB::SwCTB() : cbTBData( 0 )
 ,iWCTBl( 0 )
@@ -520,6 +525,7 @@ bool SwCTB::Read( SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void
 SwCTB::Print( FILE* fp )
 {
@@ -546,6 +552,7 @@ SwCTB::Print( FILE* fp )
         }
     }
 }
+#endif
 
 bool SwCTB::ImportCustomToolBar( SwCTBWrapper& rWrapper, CustomToolBarImportHelper& helper )
 {
@@ -632,6 +639,7 @@ bool SwTBC::Read( SvStream &rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void SwTBC::Print( FILE* fp )
 {
     Indent a;
@@ -646,6 +654,7 @@ void SwTBC::Print( FILE* fp )
         tbcd->Print(fp);
     }
 }
+#endif
 
 bool
 SwTBC::ImportToolBarControl( SwCTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar )
@@ -771,6 +780,7 @@ Xst::Read( SvStream& rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void
 Xst::Print( FILE* fp )
 {
@@ -778,6 +788,7 @@ Xst::Print( FILE* fp )
     indent_printf( fp, "[ 0x%x ] Xst -- dump\n", nOffSet );
     indent_printf( fp, " %s",  OUStringToOString( sString, RTL_TEXTENCODING_UTF8 ).getStr() );
 }
+#endif
 
 Tcg::Tcg() : nTcgVer( -1 )
 {
@@ -794,6 +805,7 @@ bool Tcg::Read(SvStream &rS)
     return tcg->Read( rS );
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void Tcg::Print( FILE* fp )
 {
     Indent a(true);
@@ -802,6 +814,7 @@ void Tcg::Print( FILE* fp )
     if ( tcg.get() )
         tcg->Print( fp );
 }
+#endif
 
 bool Tcg::ImportCustomToolBar( SfxObjectShell& rDocSh )
 {
@@ -904,6 +917,7 @@ bool Tcg255::Read(SvStream &rS)
     // Peek at
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void Tcg255::Print( FILE* fp)
 {
     Indent a;
@@ -919,6 +933,7 @@ void Tcg255::Print( FILE* fp)
         (*it)->Print(fp);
     }
 }
+#endif
 
 Tcg255SubStruct::Tcg255SubStruct( bool bReadId ) : mbReadId( bReadId ), ch(0)
 {
@@ -957,6 +972,7 @@ bool PlfMcd::Read(SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void PlfMcd::Print( FILE* fp )
 {
     Indent a;
@@ -968,8 +984,8 @@ void PlfMcd::Print( FILE* fp )
         indent_printf(fp, "[%d] MCD\n", static_cast< int >( count ) );
         rgmcd[ count ].Print( fp );
     }
-
 }
+#endif
 
 PlfAcd::PlfAcd( bool bReadId ) : Tcg255SubStruct( bReadId )
 ,iMac(0)
@@ -1000,6 +1016,7 @@ bool PlfAcd::Read( SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void PlfAcd::Print( FILE* fp )
 {
     Indent a;
@@ -1011,8 +1028,8 @@ void PlfAcd::Print( FILE* fp )
         indent_printf(fp, "[%d] ACD\n", static_cast< int >( count ) );
         rgacd[ count ].Print( fp );
     }
-
 }
+#endif
 
 PlfKme::PlfKme( bool bReadId ) : Tcg255SubStruct( bReadId )
 ,iMac( 0 )
@@ -1043,6 +1060,7 @@ bool PlfKme::Read(SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void PlfKme::Print( FILE* fp )
 {
     Indent a;
@@ -1054,8 +1072,8 @@ void PlfKme::Print( FILE* fp )
         indent_printf(fp, "[%d] Kme\n", static_cast< int >( count ) );
         rgkme[ count ].Print( fp );
     }
-
 }
+#endif
 
 TcgSttbf::TcgSttbf( bool bReadId ) : Tcg255SubStruct( bReadId )
 {
@@ -1069,12 +1087,14 @@ bool TcgSttbf::Read( SvStream &rS)
     return sttbf.Read( rS );
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void TcgSttbf::Print( FILE* fp )
 {
     Indent a;
     indent_printf(fp,"[ 0x%x ] TcgSttbf - dump\n", nOffSet );
     sttbf.Print( fp );
 }
+#endif
 
 TcgSttbfCore::TcgSttbfCore() : fExtend( 0 )
 ,cData( 0 )
@@ -1106,6 +1126,7 @@ bool TcgSttbfCore::Read( SvStream& rS )
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void TcgSttbfCore::Print( FILE* fp )
 {
     Indent a;
@@ -1119,8 +1140,8 @@ void TcgSttbfCore::Print( FILE* fp )
         for ( sal_Int32 index = 0; index < cData; ++index )
             indent_printf(fp,"   string dataItem[ %d(0x%x) ] has name %s and if referenced %d times.\n", static_cast< int >( index ), static_cast< unsigned int >( index ), OUStringToOString( dataItems[ index ].data, RTL_TEXTENCODING_UTF8 ).getStr(), dataItems[ index ].extraData );
     }
-
 }
+#endif
 
 MacroNames::MacroNames( bool bReadId ) : Tcg255SubStruct( bReadId )
 ,iMac( 0 )
@@ -1151,6 +1172,7 @@ bool MacroNames::Read( SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void MacroNames::Print( FILE* fp )
 {
     Indent a;
@@ -1162,8 +1184,8 @@ void MacroNames::Print( FILE* fp )
         indent_printf(fp, "[%d] MacroName\n", static_cast<int>( count ) );
         rgNames[ count ].Print( fp );
     }
-
 }
+#endif
 
 MacroName::MacroName():ibst(0)
 {
@@ -1177,6 +1199,7 @@ bool MacroName::Read(SvStream &rS)
     return xstz.Read( rS );
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void MacroName::Print( FILE* fp )
 {
     Indent a;
@@ -1184,6 +1207,7 @@ void MacroName::Print( FILE* fp )
     indent_printf( fp,"  index - 0x%x has associated following record\n", ibst );
     xstz.Print( fp );
 }
+#endif
 
 Xstz::Xstz():chTerm(0)
 {
@@ -1202,6 +1226,7 @@ Xstz::Read(SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void Xstz::Print( FILE* fp )
 {
     Indent a;
@@ -1210,6 +1235,7 @@ void Xstz::Print( FILE* fp )
     xst.Print( fp );
     indent_printf(fp,"  chterm 0x%x ( should be zero )\n", chTerm);
 }
+#endif
 
 Kme::Kme() : reserved1(0)
 ,reserved2(0)
@@ -1233,9 +1259,10 @@ Kme::Read(SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void Kme::Print( FILE* fp )
 {
-    Indent a;
+   Indent a;
 
    indent_printf( fp, "[ 0x%x ] Kme - dump\n", nOffSet );
    indent_printf( fp, " reserved1 0x%x [expected 0x0 ]\n", reserved1 );
@@ -1245,6 +1272,7 @@ void Kme::Print( FILE* fp )
    indent_printf( fp, " kt 0x%x \n", kt );
    indent_printf( fp, " param 0x%x \n", static_cast< unsigned int >( param ) );
 }
+#endif
 
 Acd::Acd() : ibst( 0 )
 , fciBasedOnABC( 0 )
@@ -1259,6 +1287,7 @@ bool Acd::Read(SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void Acd::Print( FILE* fp )
 {
     Indent a;
@@ -1267,6 +1296,7 @@ void Acd::Print( FILE* fp )
     indent_printf( fp,"  ibst 0x%x\n", ibst);
     indent_printf( fp,"  fciBaseObABC 0x%x\n", fciBasedOnABC);
 }
+#endif
 
 MCD::MCD() :  reserved1(0x56)
 ,reserved2( 0 )
@@ -1320,6 +1350,7 @@ bool MCD::Read(SvStream &rS)
     return true;
 }
 
+#if OSL_DEBUG_LEVEL > 1
 void MCD::Print( FILE* fp )
 {
     Indent a;
@@ -1335,5 +1366,6 @@ void MCD::Print( FILE* fp )
     indent_printf( fp, " reserved6 0x%x\n", static_cast< unsigned int >( reserved6 ) );
     indent_printf( fp, " reserved7 0x%x\n", static_cast< unsigned int >( reserved7 ) );
 }
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8toolbar.hxx b/sw/source/filter/ww8/ww8toolbar.hxx
index aa4dedf..4695f08 100644
--- a/sw/source/filter/ww8/ww8toolbar.hxx
+++ b/sw/source/filter/ww8/ww8toolbar.hxx
@@ -19,7 +19,9 @@ public:
     Xst(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
     OUString getString() { return sString; }
-    void Print( FILE* fp ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* fp ) SAL_OVERRIDE;
+#endif
 };
 
 class SwCTBWrapper;
@@ -34,7 +36,9 @@ public:
     SwTBC();
     virtual ~SwTBC();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     bool ImportToolBarControl( SwCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper&, bool );
     OUString GetCustomText();
 };
@@ -58,7 +62,9 @@ public:
     SwCTB();
     virtual ~SwCTB();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* fp ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* fp ) SAL_OVERRIDE;
+#endif
     bool IsMenuToolbar();
     bool ImportCustomToolBar( SwCTBWrapper&, CustomToolBarImportHelper& );
     bool ImportMenuTB( SwCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
@@ -80,7 +86,9 @@ public:
     TBDelta();
     virtual ~TBDelta(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     bool ControlIsModified();
     bool ControlIsInserted();
     bool ControlIsChanged();
@@ -129,7 +137,9 @@ public:
     bool Read(SvStream &rS) SAL_OVERRIDE;
     bool ImportCustomToolBar( SwCTBWrapper&, CustomToolBarImportHelper& );
     bool ImportMenu( SwCTBWrapper&, CustomToolBarImportHelper& );
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     sal_Int32 GetTBIDForTB(){ return tbidForTBD; }
     SwCTB*  GetCustomizationData() { return customizationDataCTB.get(); };
 };
@@ -165,7 +175,9 @@ public:
 
     Customization* GetCustomizaton( sal_Int16 index );
     SwCTB* GetCustomizationData( const OUString& name );
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class MCD : public TBBase
@@ -185,7 +197,9 @@ public:
     MCD(const MCD&);
     MCD& operator = ( const MCD&);
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class PlfMcd : public Tcg255SubStruct
@@ -198,7 +212,9 @@ class PlfMcd : public Tcg255SubStruct
 public:
     PlfMcd( bool bReadId = true );
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class Acd : public TBBase
@@ -212,7 +228,9 @@ public:
     Acd();
     virtual ~Acd(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class PlfAcd: public Tcg255SubStruct
@@ -226,7 +244,9 @@ public:
     PlfAcd( bool bReadId = true );
     virtual ~PlfAcd();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print(FILE*) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print(FILE*) SAL_OVERRIDE;
+#endif
 };
 
 class Kme : public TBBase
@@ -245,7 +265,9 @@ public:
     Kme();
     virtual ~Kme();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class PlfKme : public Tcg255SubStruct
@@ -259,7 +281,9 @@ public:
     PlfKme( bool bReadId = true );
     virtual ~PlfKme();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class TcgSttbfCore : public TBBase
@@ -283,7 +307,9 @@ public:
     TcgSttbfCore();
     virtual ~TcgSttbfCore();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* fp ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* fp ) SAL_OVERRIDE;
+#endif
 };
 
 class TcgSttbf : public Tcg255SubStruct
@@ -296,7 +322,9 @@ public:
     TcgSttbf( bool bReadId = true );
     virtual ~TcgSttbf(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* fp ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* fp ) SAL_OVERRIDE;
+#endif
 };
 
 class Xstz : public TBBase
@@ -311,7 +339,9 @@ public:
     Xstz();
     virtual ~Xstz(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* fp ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* fp ) SAL_OVERRIDE;
+#endif
 };
 
 class MacroName : public TBBase
@@ -325,7 +355,9 @@ public:
     MacroName();
     virtual ~MacroName(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class MacroNames : public Tcg255SubStruct
@@ -340,7 +372,9 @@ public:
     MacroNames( bool bReadId = true );
     virtual ~MacroNames();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 class Tcg255 : public TBBase
@@ -354,7 +388,9 @@ public:
     Tcg255();
     virtual ~Tcg255();
     bool Read(SvStream &rS) SAL_OVERRIDE;
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
     bool ImportCustomToolBar( SfxObjectShell& rDocSh );
 };
 
@@ -370,7 +406,9 @@ public:
     virtual ~Tcg(){}
     bool Read(SvStream &rS) SAL_OVERRIDE;
     bool ImportCustomToolBar( SfxObjectShell& rDocSh );
-    void Print( FILE* ) SAL_OVERRIDE;
+#if OSL_DEBUG_LEVEL > 1
+    virtual void Print( FILE* ) SAL_OVERRIDE;
+#endif
 };
 
 #endif
commit 2188a7ac2eb37aee89f8f305bdf99db9b05b20bf
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Apr 14 13:56:15 2014 +0200

    Reduce the amount of strings in the release builds.
    
    I guess even in the debug builds these strings do not add much info, but...
    
    Change-Id: I5cf765539a821513b5ce77c5484071d181459881

diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 06617bf..3ffceb2 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -3344,6 +3344,17 @@ private:
     rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity > entity_;
 };
 
+static OUString failsToSupply(const OUString& name_, const OString& baseName)
+{
+    return OUString(
+            "\n"
+            "#if OSL_DEBUG_LEVEL > 0\n"
+            "                ::rtl::OUString(\"component context fails to supply service '" + name_ + "' of type '" + OStringToOUString(baseName, RTL_TEXTENCODING_UTF8) + "'\")\n"
+            "#else\n"
+            "                ::rtl::OUString(\"service not supplied\")\n"
+            "#endif\n");
+}
+
 void ServiceType::dumpHxxFile(
     FileStream & o, codemaker::cppumaker::Includes & includes)
 {
@@ -3480,24 +3491,16 @@ void ServiceType::dumpHxxFile(
                   << ("} catch (const ::css::uno::Exception & the_exception) {\n");
                 inc();
                 o << indent()
-                  << ("throw ::css::uno::DeploymentException("
-                      "::rtl::OUString( "
-                      "\"component context fails to supply service \" ) + ")
-                  << "\"" << name_ << "\" + "
-                  << "\" of type \" + "
-                  << "\"" << baseName << "\" + "
-                  << "\": \" + the_exception.Message, the_context);\n";
+                  << "throw ::css::uno::DeploymentException("
+                  << failsToSupply(name_, baseName)
+                  << " + \": \" + the_exception.Message, the_context);\n";
                 dec();
                 o << indent() << "}\n" << indent()
                   << "if (!the_instance.is()) {\n";
                 inc();
                 o << indent()
-                  << ("throw ::css::uno::DeploymentException("
-                      "::rtl::OUString( "
-                      "\"component context fails to supply service \" ) + ")
-                  << "\"" << name_ << "\" + "
-                  << "\" of type \" + "
-                  << "\"" << baseName << "\""
+                  << "throw ::css::uno::DeploymentException("
+                  << failsToSupply(name_, baseName)
                   << ", the_context);\n";
                 dec();
                 o << indent() << "}\n" << indent() << "return the_instance;\n";
@@ -3649,22 +3652,18 @@ void ServiceType::dumpHxxFile(
                           " the_exception) {\n");
                     inc();
                     o << indent()
-                      << ("throw ::css::uno::DeploymentException("
-                          "::rtl::OUString( "
-                          "\"component context fails to supply service ")
-                      << name_ << " of type " << baseName
-                      << ": \" ) + the_exception.Message, the_context);\n";
+                      << "throw ::css::uno::DeploymentException("
+                      << failsToSupply(name_, baseName)
+                      << " + \": \" + the_exception.Message, the_context);\n";
                     dec();
                     o << indent() << "}\n";
                 }
                 o << indent() << "if (!the_instance.is()) {\n";
                 inc();
                 o << indent()
-                  << ("throw ::css::uno::DeploymentException("
-                      "::rtl::OUString( "
-                      "\"component context fails to supply service ")
-                  << name_ << " of type " << baseName
-                  << "\" ), the_context);\n";
+                  << "throw ::css::uno::DeploymentException("
+                  << failsToSupply(name_, baseName)
+                  << ", the_context);\n";
                 dec();
                 o << indent() << "}\n" << indent() << "return the_instance;\n";
                 dec();


More information about the Libreoffice-commits mailing list