[Libreoffice-commits] core.git: 3 commits - basic/source cui/source include/basic

Stephan Bergmann sbergman at redhat.com
Fri Mar 28 07:20:39 PDT 2014


 basic/source/basmgr/basmgr.cxx |   44 -----------------------------------------
 basic/source/sbx/sbxarray.cxx  |   14 -------------
 basic/source/sbx/sbxbase.cxx   |   21 -------------------
 basic/source/uno/namecont.cxx  |    8 -------
 cui/source/inc/cuitabarea.hxx  |    1 
 cui/source/tabpages/tparea.cxx |    5 +---
 include/basic/sbxcore.hxx      |   29 +++++++++++----------------
 7 files changed, 14 insertions(+), 108 deletions(-)

New commits:
commit 355b31fe347479f63906e41300042ec5cb38837c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 28 15:20:10 2014 +0100

    loplugin:literaltoboolconversion
    
    Change-Id: I6c411254865bad6d951ee8dd16e25eeeeeb525a7

diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 1fcd7dc..4b8c2cc 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -2193,7 +2193,7 @@ IMPL_LINK_NOARG( SvxAreaTabPage, ClickImportHdl_Impl )
 {
     ResMgr& rMgr = CUI_MGR();
     SvxOpenGraphicDialog aDlg("Import");
-    aDlg.EnableLink(sal_False);
+    aDlg.EnableLink(false);
 
     if(!aDlg.Execute())
     {
@@ -2444,7 +2444,7 @@ void SvxAreaTabPage::PageCreated (SfxAllItemSet aSet)
     SFX_ITEMSET_ARG (&aSet,pDlgTypeItem,SfxUInt16Item,SID_DLG_TYPE,false);
     SFX_ITEMSET_ARG (&aSet,pPosItem,SfxUInt16Item,SID_TABPAGE_POS,false);
     //UUUU
-    SFX_ITEMSET_ARG (&aSet, pOfferImportItem, SfxBoolItem, SID_OFFER_IMPORT, sal_False);
+    SFX_ITEMSET_ARG (&aSet, pOfferImportItem, SfxBoolItem, SID_OFFER_IMPORT, false);
 
     if (pColorListItem)
         SetColorList(pColorListItem->GetColorList());
commit df9d13dd2e754184a4c6e321b8910ee1bc0cafa1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 28 15:19:23 2014 +0100

    -Werror,-Wunused-private-field
    
    Change-Id: I8f7c00013d9fbf4d05d4c217d6f211c185ce1c9c

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index a5c1a49..32c82f1 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -262,7 +262,6 @@ private:
 
     //UUUU
     bool                mbOfferImportButton;
-    bool                mbPositionsAdapted;
     bool                mbDirectGraphicSet;
     Graphic             maDirectGraphic;
     OUString            maDirectName;
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 0005b0f..1fcd7dc 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -617,7 +617,6 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) :
 
     //UUUU
     mbOfferImportButton(false),
-    mbPositionsAdapted(false),
     mbDirectGraphicSet(false),
     maDirectGraphic()
 {
commit 77fd24afc6b51091c917fe6e98d1f0110acfc616
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 28 15:15:26 2014 +0100

    Remove remaining DBG_CTOR etc. remnants from basic
    
    Change-Id: Ia714029c2e32e28c1bb6f4f59d0c7f357eccc236

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 3247f82..9413b79 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -99,7 +99,6 @@ static const char szCryptingKey[] = "CryptedBasic";
 static const char szScriptLanguage[] = "StarBasic";
 
 TYPEINIT1( BasicManager, SfxBroadcaster );
-DBG_NAME( BasicManager );
 
 StreamMode eStreamReadMode = STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL;
 StreamMode eStorageReadMode = STREAM_READ | STREAM_SHARE_DENYWRITE;
@@ -583,8 +582,6 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
 
 BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, StarBASIC* pParentFromStdLib, OUString* pLibPath, bool bDocMgr ) : mbDocMgr( bDocMgr )
 {
-    DBG_CTOR( BasicManager, 0 );
-
     Init();
 
     if( pLibPath )
@@ -777,7 +774,6 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo )
 
 BasicManager::BasicManager( StarBASIC* pSLib, OUString* pLibPath, bool bDocMgr ) : mbDocMgr( bDocMgr )
 {
-    DBG_CTOR( BasicManager, 0 );
     Init();
     DBG_ASSERT( pSLib, "BasicManager cannot be created with a NULL-Pointer!" );
 
@@ -826,9 +822,6 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib )
 
 void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL, bool bLoadLibs )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
-
     SotStorageStreamRef xManagerStream = rStorage.OpenSotStream( OUString(szManagerStream), eStreamReadMode );
 
     OUString aStorName( rStorage.GetName() );
@@ -913,9 +906,6 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase
 
 void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
-
     SotStorageStreamRef xManagerStream = rStorage.OpenSotStream( OUString(szOldManagerStream), eStreamReadMode );
 
     OUString aStorName( rStorage.GetName() );
@@ -996,8 +986,6 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage )
 
 BasicManager::~BasicManager()
 {
-    DBG_DTOR( BasicManager, 0 );
-
     // Notify listener if something needs to be saved
     Broadcast( SfxSimpleHint( SFX_HINT_DYING) );
 
@@ -1034,16 +1022,12 @@ bool BasicManager::HasExeCode( const OUString& sLib )
 
 void BasicManager::Init()
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     pLibs = new BasicLibs;
     mpImpl = new BasicManagerImpl();
 }
 
 BasicLibInfo* BasicManager::CreateLibInfo()
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     BasicLibInfo* pInf = new BasicLibInfo;
     pLibs->Insert( pInf );
     return pInf;
@@ -1051,8 +1035,6 @@ BasicLibInfo* BasicManager::CreateLibInfo()
 
 bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStorage, bool bInfosOnly )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     DBG_ASSERT( pLibInfo, "LibInfo!?" );
 
     OUString aStorageName( pLibInfo->GetStorageName() );
@@ -1239,8 +1221,6 @@ void BasicManager::CheckModules( StarBASIC* pLib, bool bReference ) const
 
 StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName, bool bReference )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     OUString aStorName( rStorage.GetName() );
     DBG_ASSERT( !aStorName.isEmpty(), "No Storage Name!" );
 
@@ -1292,8 +1272,6 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName,
 
 bool BasicManager::IsReference( sal_uInt16 nLib )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     BasicLibInfo* pLibInfo = pLibs->GetObject( nLib );
     DBG_ASSERT( pLibInfo, "Lib?!" );
     if ( pLibInfo )
@@ -1311,7 +1289,6 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib )
 
 bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
     DBG_ASSERT( nLib, "Standard-Lib cannot be removed!" );
 
     BasicLibInfo* pLibInfo = pLibs->GetObject( nLib );
@@ -1389,13 +1366,11 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage )
 
 sal_uInt16 BasicManager::GetLibCount() const
 {
-    DBG_CHKTHIS( BasicManager, 0 );
     return (sal_uInt16)pLibs->Count();
 }
 
 StarBASIC* BasicManager::GetLib( sal_uInt16 nLib ) const
 {
-    DBG_CHKTHIS( BasicManager, 0 );
     BasicLibInfo* pInf = pLibs->GetObject( nLib );
     DBG_ASSERT( pInf, "Lib does not exist!" );
     if ( pInf )
@@ -1407,15 +1382,12 @@ StarBASIC* BasicManager::GetLib( sal_uInt16 nLib ) const
 
 StarBASIC* BasicManager::GetStdLib() const
 {
-    DBG_CHKTHIS( BasicManager, 0 );
     StarBASIC* pLib = GetLib( 0 );
     return pLib;
 }
 
 StarBASIC* BasicManager::GetLib( const OUString& rName ) const
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     BasicLibInfo* pInf = pLibs->First();
     while ( pInf )
     {
@@ -1430,8 +1402,6 @@ StarBASIC* BasicManager::GetLib( const OUString& rName ) const
 
 sal_uInt16 BasicManager::GetLibId( const OUString& rName ) const
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     BasicLibInfo* pInf = pLibs->First();
     while ( pInf )
     {
@@ -1446,8 +1416,6 @@ sal_uInt16 BasicManager::GetLibId( const OUString& rName ) const
 
 bool BasicManager::HasLib( const OUString& rName ) const
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     BasicLibInfo* pInf = pLibs->First();
     while ( pInf )
     {
@@ -1462,8 +1430,6 @@ bool BasicManager::HasLib( const OUString& rName ) const
 
 bool BasicManager::SetLibName( sal_uInt16 nLib, const OUString& rName )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     BasicLibInfo* pLibInfo = pLibs->GetObject( nLib );
     DBG_ASSERT( pLibInfo, "Lib?!" );
     if ( pLibInfo )
@@ -1482,8 +1448,6 @@ bool BasicManager::SetLibName( sal_uInt16 nLib, const OUString& rName )
 
 OUString BasicManager::GetLibName( sal_uInt16 nLib )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     BasicLibInfo* pLibInfo = pLibs->GetObject( nLib );
     DBG_ASSERT( pLibInfo, "Lib?!" );
     if ( pLibInfo )
@@ -1495,8 +1459,6 @@ OUString BasicManager::GetLibName( sal_uInt16 nLib )
 
 bool BasicManager::LoadLib( sal_uInt16 nLib )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     bool bDone = false;
     BasicLibInfo* pLibInfo = pLibs->GetObject( nLib );
     DBG_ASSERT( pLibInfo, "Lib?!" );
@@ -1530,7 +1492,6 @@ bool BasicManager::LoadLib( sal_uInt16 nLib )
 
 StarBASIC* BasicManager::CreateLib( const OUString& rLibName )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
     if ( GetLib( rLibName ) )
     {
         return 0;
@@ -1580,7 +1541,6 @@ StarBASIC* BasicManager::CreateLib( const OUString& rLibName, const OUString& Pa
 StarBASIC* BasicManager::CreateLibForLibContainer( const OUString& rLibName,
     const uno::Reference< script::XLibraryContainer >& xScriptCont )
 {
-    DBG_CHKTHIS( BasicManager, 0 );
     if ( GetLib( rLibName ) )
     {
         return 0;
@@ -1599,8 +1559,6 @@ StarBASIC* BasicManager::CreateLibForLibContainer( const OUString& rLibName,
 
 BasicLibInfo* BasicManager::FindLibInfo( StarBASIC* pBasic ) const
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     BasicLibInfo* pInf = ((BasicManager*)this)->pLibs->First();
     while ( pInf )
     {
@@ -1616,8 +1574,6 @@ BasicLibInfo* BasicManager::FindLibInfo( StarBASIC* pBasic ) const
 
 bool BasicManager::IsBasicModified() const
 {
-    DBG_CHKTHIS( BasicManager, 0 );
-
     BasicLibInfo* pInf = pLibs->First();
     while ( pInf )
     {
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index ece2d3c..5ed2fde 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -186,10 +186,6 @@ SbxVariable* SbxArray::Get32( sal_uInt32 nIdx )
 
     if ( !rRef.Is() )
         rRef = new SbxVariable( eType );
-#ifdef DBG_UTIL
-    else
-        DBG_CHKOBJ( rRef, SbxBase, 0 );
-#endif
 
     return rRef;
 }
@@ -205,10 +201,6 @@ SbxVariable* SbxArray::Get( sal_uInt16 nIdx )
 
     if ( !rRef.Is() )
         rRef = new SbxVariable( eType );
-#ifdef DBG_UTIL
-    else
-        DBG_CHKOBJ( rRef, SbxBase, 0 );
-#endif
 
     return rRef;
 }
@@ -268,12 +260,6 @@ static const OUString sEmpty("");
     {
         return sEmpty;
     }
-#ifdef DBG_UTIL
-    else
-    {
-        DBG_CHKOBJ( rRef, SbxBase, 0 );
-    }
-#endif
 
     return *rRef.pAlias;
 }
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 1d45969..ed0c030 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -47,62 +47,48 @@ SbxAppData::~SbxAppData()
     delete pBasicFormater;
 }
 
-
-//////////////////////////////// SbxBase
-
-DBG_NAME(SbxBase);
-
 SbxBase::SbxBase()
 {
-    DBG_CTOR( SbxBase, 0 );
     nFlags  = SBX_READWRITE;
 }
 
 SbxBase::SbxBase( const SbxBase& r )
     : SvRefBase( r )
 {
-    DBG_CTOR( SbxBase, 0 );
     nFlags  = r.nFlags;
 }
 
 SbxBase::~SbxBase()
 {
-    DBG_DTOR(SbxBase,0);
 }
 
 SbxBase& SbxBase::operator=( const SbxBase& r )
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     nFlags = r.nFlags;
     return *this;
 }
 
 SbxDataType SbxBase::GetType() const
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     return SbxEMPTY;
 }
 
 SbxClassType SbxBase::GetClass() const
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     return SbxCLASS_DONTCARE;
 }
 
 void SbxBase::Clear()
 {
-    DBG_CHKTHIS( SbxBase, 0 );
 }
 
 bool SbxBase::IsFixed() const
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     return IsSet( SBX_FIXED );
 }
 
 void SbxBase::SetModified( bool b )
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     if( IsSet( SBX_NO_MODIFY ) )
         return;
     if( b )
@@ -270,7 +256,6 @@ void SbxBase::Skip( SvStream& rStrm )
 
 bool SbxBase::Store( SvStream& rStrm )
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     if( !( nFlags & SBX_DONTSTORE ) )
     {
         rStrm.WriteUInt32( (sal_uInt32) GetCreator() )
@@ -296,37 +281,31 @@ bool SbxBase::Store( SvStream& rStrm )
 
 bool SbxBase::LoadData( SvStream&, sal_uInt16 )
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     return false;
 }
 
 bool SbxBase::StoreData( SvStream& ) const
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     return false;
 }
 
 bool SbxBase::LoadPrivateData( SvStream&, sal_uInt16 )
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     return true;
 }
 
 bool SbxBase::StorePrivateData( SvStream& ) const
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     return true;
 }
 
 bool SbxBase::LoadCompleted()
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     return true;
 }
 
 bool SbxBase::StoreCompleted()
 {
-    DBG_CHKTHIS( SbxBase, 0 );
     return true;
 }
 
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index cdc3c52..6376b9d 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -364,11 +364,6 @@ bool VBAScriptListenerContainer::implTypedNotify( const Reference< vba::XVBAScri
     return true;    // notify all other listeners too
 }
 
-
-
-// Implementation class SfxLibraryContainer
-DBG_NAME( SfxLibraryContainer )
-
 // Ctor
 SfxLibraryContainer::SfxLibraryContainer( void )
     : SfxLibraryContainer_BASE( maMutex )
@@ -384,8 +379,6 @@ SfxLibraryContainer::SfxLibraryContainer( void )
     , mbOwnBasMgr( false )
     , meInitMode(DEFAULT)
 {
-    DBG_CTOR( SfxLibraryContainer, NULL );
-
     mxContext = comphelper::getProcessComponentContext();
 
     mxSFI = ucb::SimpleFileAccess::create( mxContext );
@@ -399,7 +392,6 @@ SfxLibraryContainer::~SfxLibraryContainer()
     {
         BasicManager::LegacyDeleteBasicManager( mpBasMgr );
     }
-    DBG_DTOR( SfxLibraryContainer, NULL );
 }
 
 void SfxLibraryContainer::checkDisposed() const
diff --git a/include/basic/sbxcore.hxx b/include/basic/sbxcore.hxx
index 4fd6cb9..5bf2b2e 100644
--- a/include/basic/sbxcore.hxx
+++ b/include/basic/sbxcore.hxx
@@ -52,8 +52,6 @@ class SbxBase;
 class SbxFactory;
 class SbxObject;
 
-DBG_NAMEEX_VISIBILITY(SbxBase, BASIC_DLLPUBLIC)
-
 class BASIC_DLLPUBLIC SbxBase : virtual public SvRefBase
 {
     virtual bool LoadData( SvStream&, sal_uInt16 );
@@ -111,43 +109,40 @@ public:
 SV_DECL_REF(SbxBase)
 
 inline void SbxBase::SetFlags( sal_uInt16 n )
-{ //DBG_CHKTHIS( SbxBase, 0 );
- nFlags = n; }
+{ nFlags = n; }
 
 inline sal_uInt16 SbxBase::GetFlags() const
-{ DBG_CHKTHIS( SbxBase, 0 ); return nFlags; }
+{ return nFlags; }
 
 inline void SbxBase::SetFlag( sal_uInt16 n )
-{ //DBG_CHKTHIS( SbxBase, 0 );
- nFlags |= n; }
+{ nFlags |= n; }
 
 inline void SbxBase::ResetFlag( sal_uInt16 n )
-{ //DBG_CHKTHIS( SbxBase, 0 );
- nFlags &= ~n; }
+{ nFlags &= ~n; }
 
 inline bool SbxBase::IsSet( sal_uInt16 n ) const
-{ DBG_CHKTHIS( SbxBase, 0 ); return ( nFlags & n ) != 0; }
+{ return ( nFlags & n ) != 0; }
 
 inline bool SbxBase::IsReset( sal_uInt16 n ) const
-{ DBG_CHKTHIS( SbxBase, 0 ); return ( nFlags & n ) == 0; }
+{ return ( nFlags & n ) == 0; }
 
 inline bool SbxBase::CanRead() const
-{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_READ ); }
+{ return IsSet( SBX_READ ); }
 
 inline bool SbxBase::CanWrite() const
-{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_WRITE ); }
+{ return IsSet( SBX_WRITE ); }
 
 inline bool SbxBase::IsModified() const
-{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_MODIFIED ); }
+{ return IsSet( SBX_MODIFIED ); }
 
 inline bool SbxBase::IsConst() const
-{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_CONST ); }
+{ return IsSet( SBX_CONST ); }
 
 inline bool SbxBase::IsHidden() const
-{ DBG_CHKTHIS( SbxBase, 0 ); return IsSet( SBX_HIDDEN ); }
+{ return IsSet( SBX_HIDDEN ); }
 
 inline bool SbxBase::IsVisible() const
-{ DBG_CHKTHIS( SbxBase, 0 ); return IsReset( SBX_INVISIBLE ); }
+{ return IsReset( SBX_INVISIBLE ); }
 
 #endif
 


More information about the Libreoffice-commits mailing list