[Libreoffice-commits] .: connectivity/source dbaccess/source extensions/source framework/inc idl/inc sc/source tools/inc ucb/source UnoControls/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Sun Aug 5 11:32:32 PDT 2012


 UnoControls/source/base/registercontrols.cxx             |   20 ----------
 connectivity/source/drivers/postgresql/pq_connection.hxx |    5 --
 dbaccess/source/inc/apitools.hxx                         |   28 ---------------
 dbaccess/source/ui/misc/TokenWriter.cxx                  |    5 --
 extensions/source/scanner/sane.cxx                       |    8 ----
 framework/inc/macros/generic.hxx                         |    4 --
 framework/inc/macros/xserviceinfo.hxx                    |   13 ------
 idl/inc/basobj.hxx                                       |    8 ----
 sc/source/filter/html/htmlexp.cxx                        |    6 ---
 sc/source/ui/inc/reffact.hxx                             |    8 ----
 sc/source/ui/view/formatsh.cxx                           |   19 ----------
 tools/inc/tools/link.hxx                                 |    3 -
 tools/inc/tools/pstm.hxx                                 |    4 --
 tools/inc/tools/ref.hxx                                  |    7 ---
 tools/inc/tools/string.hxx                               |    5 --
 ucb/source/ucp/ftp/ftpurl.cxx                            |   14 -------
 16 files changed, 157 deletions(-)

New commits:
commit c04c2114d9159646dddd4807d026c9fee6953817
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun Aug 5 20:31:29 2012 +0200

    Remove unused macros
    
    Change-Id: I184a7f9c65dd762407b2431d9c6557e718b954b2

diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx
index 5389f3e..50dd26c 100644
--- a/UnoControls/source/base/registercontrols.cxx
+++ b/UnoControls/source/base/registercontrols.cxx
@@ -67,18 +67,6 @@ using namespace ::com::sun::star::registry                      ;
     }
 
 //******************************************************************************************************************************
-#define CREATEFACTORY_ONEINSTANCE(CLASS)                                                                                \
-                                                                                                                        \
-    /* Create right factory ... */                                                                                      \
-    xFactory = Reference< XSingleServiceFactory >                                                                       \
-                    (                                                                                                   \
-                        cppu::createOneInstanceFactory  (   xServiceManager                                     ,       \
-                                                            CLASS::impl_getStaticImplementationName     ()  ,       \
-                                                            CLASS##_createInstance                              ,       \
-                                                            CLASS::impl_getStaticSupportedServiceNames  ()  )       \
-                    ) ;                                                                                                 \
-
-//******************************************************************************************************************************
 #define CREATEFACTORY_SINGLE(CLASS)                                                                                     \
                                                                                                                         \
     /* Create right factory ... */                                                                                      \
@@ -91,14 +79,6 @@ using namespace ::com::sun::star::registry                      ;
                     ) ;                                                                                                 \
 
 //******************************************************************************************************************************
-#define IF_NAME_CREATECOMPONENTFACTORY_ONEINSTANCE(CLASS)                                                               \
-                                                                                                                        \
-    if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) )     \
-    {                                                                                                                   \
-        CREATEFACTORY_ONEINSTANCE ( CLASS )                                                                         \
-    }
-
-//******************************************************************************************************************************
 #define IF_NAME_CREATECOMPONENTFACTORY_SINGLE(CLASS)                                                                    \
                                                                                                                         \
     if ( CLASS::impl_getStaticImplementationName().equals( OUString::createFromAscii( pImplementationName ) ) )     \
diff --git a/connectivity/source/drivers/postgresql/pq_connection.hxx b/connectivity/source/drivers/postgresql/pq_connection.hxx
index 1ff8a1a..bf35688 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.hxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.hxx
@@ -59,11 +59,8 @@
 #define _PQ_CONNECTION_HXX_
 #include <boost/unordered_map.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
-
 #include <com/sun/star/lang/XInitialization.hpp>
-
 #include <com/sun/star/script/XTypeConverter.hpp>
-
 #include <com/sun/star/sdbc/XWarningsSupplier.hpp>
 #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
 #include <com/sun/star/sdbcx/XUsersSupplier.hpp>
@@ -87,10 +84,8 @@ namespace pq_sdbc_driver
 {
 #ifdef POSTGRE_TRACE
 #define POSTGRE_TRACE( x ) printf( "%s\n" , x )
-#define POSTGRE_TRACE_1( x ,y) printf( "%s %s\n" , x ,y )
 #else
 #define POSTGRE_TRACE(x) ((void)0)
-#define POSTGRE_TRACE_1(x,y) ((void)0)
 #endif
 
 class RefCountedMutex : public salhelper::SimpleReferenceObject
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx
index c7843b1..11fff17 100644
--- a/dbaccess/source/inc/apitools.hxx
+++ b/dbaccess/source/inc/apitools.hxx
@@ -395,34 +395,6 @@ public:
     }                                                                             \
     _rGuard.reset();
 
-#define NOTIFY_LISTERNERS1(_rListeners,T,method,arg1)                             \
-    Sequence< Reference< XInterface > > aListenerSeq = _rListeners.getElements(); \
-                                                                                  \
-    const Reference< XInterface >* pxIntBegin = aListenerSeq.getConstArray();     \
-    const Reference< XInterface >* pxInt = pxIntBegin + aListenerSeq.getLength(); \
-                                                                                  \
-    _rGuard.clear();                                                              \
-    while( pxInt > pxIntBegin )                                                   \
-    {                                                                             \
-        try                                                                       \
-        {                                                                         \
-            while( pxInt > pxIntBegin )                                           \
-            {                                                                     \
-                --pxInt;                                                          \
-                static_cast< T* >( pxInt->get() )->method(aEvt,arg1);             \
-            }                                                                     \
-        }                                                                         \
-        catch( RuntimeException& )                                                \
-        {                                                                         \
-        }                                                                         \
-    }                                                                             \
-    _rGuard.reset();
-
-
-//==================================================================================
-// miscellaneous
-#define UNUSED(x)   x;
-
 #endif // _DBASHARED_APITOOLS_HXX_
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 261a57d..bd83538 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -661,17 +661,12 @@ const char OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\
 //========================================================================
 // Macros for HTML-Export
 //========================================================================
-#define OUT_PROLOGUE()      ((*m_pStream) << sHTML30_Prologue << ODatabaseImportExport::sNewLine << ODatabaseImportExport::sNewLine)
 #define TAG_ON( tag )       HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag )
 #define TAG_OFF( tag )      HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag, sal_False )
 #define OUT_STR( str )      HTMLOutFuncs::Out_String( (*m_pStream), str )
 #define OUT_LF()            (*m_pStream) << ODatabaseImportExport::sNewLine << GetIndentStr()
-#define lcl_OUT_LF()        (*m_pStream) << ODatabaseImportExport::sNewLine
 #define TAG_ON_LF( tag )    (TAG_ON( tag ) << ODatabaseImportExport::sNewLine << GetIndentStr())
 #define TAG_OFF_LF( tag )   (TAG_OFF( tag ) << ODatabaseImportExport::sNewLine << GetIndentStr())
-#define OUT_HR()            TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_horzrule )
-#define OUT_COMMENT( comment )  ((*m_pStream) << sMyBegComment, OUT_STR( comment ) << sMyEndComment << ODatabaseImportExport::sNewLine << GetIndentStr())
-#define lcl_OUT_COMMENT( comment )  ((*m_pStream) << sMyBegComment, OUT_STR( comment ) << sMyEndComment << ODatabaseImportExport::sNewLine)
 
 //-------------------------------------------------------------------
 OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataDescriptor,
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index 8159b1a..8c97ae0 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -81,14 +81,6 @@ inline void dbg_msg( const char* pString, ... )
                  y, x, p_strstatus( x ) );                  \
     }
 
-#define CHECK_STATE( x, y ) \
-    if( x != SANE_STATUS_GOOD )                             \
-    {                                                       \
-        dump_state( "%s returned error %d (%s)\n",          \
-                 y, x, p_strstatus( x ) );                  \
-    }                                                       \
-    else
-
 int             Sane::nRefCount = 0;
 oslModule       Sane::pSaneLib = 0;
 SANE_Int        Sane::nVersion = 0;
diff --git a/framework/inc/macros/generic.hxx b/framework/inc/macros/generic.hxx
index 01169a3..f30487c 100644
--- a/framework/inc/macros/generic.hxx
+++ b/framework/inc/macros/generic.hxx
@@ -52,7 +52,6 @@ ________________________________________________________________________________
 
 /*_________________________________________________________________________________________________________________
     U2B( SUNICODEVALUE )
-    B2U( SASCIIVALUE )
 
     Use it to convert unicode strings to ascii values and reverse ...
     We use UTF8 as default textencoding.
@@ -61,9 +60,6 @@ ________________________________________________________________________________
 #define U2B( SUNICODEVALUE )                                                                                    \
     ::rtl::OUStringToOString( SUNICODEVALUE, RTL_TEXTENCODING_UTF8 )
 
-#define B2U( SASCIIVALUE )                                                                                      \
-    ::rtl::OStringToOUString( SASCIIVALUE, RTL_TEXTENCODING_UTF8 )
-
 #endif  //  #ifndef __FRAMEWORK_MACROS_GENERIC_HXX_
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/macros/xserviceinfo.hxx b/framework/inc/macros/xserviceinfo.hxx
index 85f3f85..341e167 100644
--- a/framework/inc/macros/xserviceinfo.hxx
+++ b/framework/inc/macros/xserviceinfo.hxx
@@ -241,10 +241,6 @@ ________________________________________________________________________________
     PRIVATE_DEFINE_XSERVICEINFO_NEWSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME )              \
     PRIVATE_DEFINE_SINGLEFACTORY( CLASS )
 
-#define DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME )      \
-    PRIVATE_DEFINE_XSERVICEINFO_NEWSTYLE( CLASS, XINTERFACECAST, SERVICENAME, IMPLEMENTATIONNAME )              \
-    PRIVATE_DEFINE_ONEINSTANCEFACTORY( CLASS )
-
 //*****************************************************************************************************************
 //  public
 //  implementation of service initialize!
@@ -263,15 +259,6 @@ ________________________________________________________________________________
         FUNCTIONBODY                                                                                            \
     }
 
-#define DEFINE_INIT_SERVICE_WITH_BASECLASS( CLASS, BASECLASS, FUNCTIONBODY )                                    \
-    void SAL_CALL CLASS::impl_initService()                                                                     \
-    {                                                                                                           \
-        BASECLASS::impl_initService();                                                                          \
-        {                                                                                                       \
-            FUNCTIONBODY                                                                                        \
-        }                                                                                                       \
-    }
-
 }       //  namespace framework
 
 #endif  //  #ifndef __FRAMEWORK_MACROS_XSERVICEINFO_HXX_
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index 1b9302f..ce7f47b 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -49,17 +49,9 @@ enum
 };
 typedef int WriteAttribute;
 
-#define SV_DECL_META_FACTORY( Class, CLASS_ID )                         \
-    SV_DECL_PERSIST( Class, CLASS_ID )
-
-
 #define SV_DECL_META_FACTORY1( Class, Super1, CLASS_ID )                \
     SV_DECL_PERSIST1( Class, Super1, CLASS_ID )
 
-#define SV_IMPL_META_FACTORY( Class )                                   \
-    SV_IMPL_PERSIST( Class )
-
-
 #define SV_IMPL_META_FACTORY1( Class, Super1 )                          \
     SV_IMPL_PERSIST1( Class, Super1 )
 
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index a519250..fa41eec 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -122,22 +122,16 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] =
 //========================================================================
 // Makros fuer HTML-Export
 //========================================================================
-#define OUT_PROLOGUE()      (rStrm << sHTML30_Prologue << ScExportBase::sNewLine \
-                                << ScExportBase::sNewLine)
 #define TAG_ON( tag )       HTMLOutFuncs::Out_AsciiTag( rStrm, tag )
 #define TAG_OFF( tag )      HTMLOutFuncs::Out_AsciiTag( rStrm, tag, false )
 #define OUT_STR( str )      HTMLOutFuncs::Out_String( rStrm, str, eDestEnc, &aNonConvertibleChars )
-#define OUT_STR_NO_CONV( str )  HTMLOutFuncs::Out_String( rStrm, str, eDestEnc )
 #define OUT_LF()            rStrm << ScExportBase::sNewLine << GetIndentStr()
-#define lcl_OUT_LF()        rStrm << ScExportBase::sNewLine
 #define TAG_ON_LF( tag )    (TAG_ON( tag ) << ScExportBase::sNewLine << GetIndentStr())
 #define TAG_OFF_LF( tag )   (TAG_OFF( tag ) << ScExportBase::sNewLine << GetIndentStr())
 #define OUT_HR()            TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_horzrule )
 #define OUT_COMMENT( comment )  (rStrm << sMyBegComment, OUT_STR( comment ) \
                                 << sMyEndComment << ScExportBase::sNewLine \
                                 << GetIndentStr())
-#define lcl_OUT_COMMENT( comment )  (rStrm << sMyBegComment, OUT_STR_NO_CONV( comment ) \
-                                << sMyEndComment << ScExportBase::sNewLine)
 
 #define OUT_SP_CSTR_ASS( s )    rStrm << ' ' << s << '='
 #define APPEND_SPACE( s )   s.AppendAscii(" ")
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index e1db89d..e7d728f 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -33,14 +33,6 @@
 
 #include "dbfunc.hxx"
 
-#define DECL_WRAPPER(Class) \
-    class Class : public SfxChildWindow                                         \
-    {                                                                           \
-    public:                                                                     \
-        Class( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* );           \
-        SFX_DECL_CHILDWINDOW(Class);                                            \
-    };
-
 #define DECL_WRAPPER_WITHID(Class) \
     class Class : public SfxChildWindow                                         \
     {                                                                           \
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 7d2cd76..7d98e45 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1033,22 +1033,6 @@ void ScFormatShell::ExecuteNumFormat( SfxRequest& rReq )
 
 //------------------------------------------------------------------
 
-#define APPLY_HOR_JUSTIFY(j) \
-    {                                                                       \
-        if ( !pHorJustify || (eHorJustify != (j) ) )                        \
-            pTabViewShell->ApplyAttr( SvxHorJustifyItem( (j) ) );                          \
-        else                                                                \
-            pTabViewShell->ApplyAttr( SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD ) );     \
-    }
-
-#define APPLY_VER_JUSTIFY(j) \
-    {                                                                       \
-        if ( !pVerJustify || (eVerJustify != (j) ) )                        \
-            pTabViewShell->ApplyAttr( SvxVerJustifyItem( (j) ) );                          \
-        else                                                                \
-            pTabViewShell->ApplyAttr( SvxVerJustifyItem( SVX_VER_JUSTIFY_STANDARD ) );     \
-    }
-
 void ScFormatShell::ExecuteAlignment( SfxRequest& rReq )
 {
     ScTabViewShell* pTabViewShell       = GetViewData()->GetViewShell();
@@ -1396,9 +1380,6 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
 
 }
 
-#undef APPLY_HOR_JUSTIFY
-#undef APPLY_VER_JUSTIFY
-
 //------------------------------------------------------------------
 
 void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
diff --git a/tools/inc/tools/link.hxx b/tools/inc/tools/link.hxx
index fe1da4b..0a7475b 100644
--- a/tools/inc/tools/link.hxx
+++ b/tools/inc/tools/link.hxx
@@ -44,9 +44,6 @@ typedef long (*PSTUB)( void*, void* );
 #define DECL_DLLPRIVATE_STATIC_LINK(Class, Method, ArgType) \
     SAL_DLLPRIVATE static long Method(Class *, ArgType)
 
-#define IMPL_METHOD( Class, Method, ArgType, ArgName ) \
-    long Class::Method( ArgType ArgName )
-
 #define IMPL_STUB(Class, Method, ArgType) \
     long Class::LinkStub##Method( void* pThis, void* pCaller) \
     { \
diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx
index c54e864..c313b6b 100644
--- a/tools/inc/tools/pstm.hxx
+++ b/tools/inc/tools/pstm.hxx
@@ -86,10 +86,6 @@ SV_DECL_IMPL_REF(SvRttiBase)
                         return rStm;                                \
                     }
 
-#define SV_IMPL_PERSIST( Class )                                    \
-    TYPEINIT0( Class )                                              \
-    PRV_SV_IMPL_PERSIST( Class )
-
 #define SV_IMPL_PERSIST1( Class, Super1 )                           \
     TYPEINIT1( Class, Super1 )                                      \
     PRV_SV_IMPL_PERSIST( Class )
diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx
index b34d724..157cb4b 100644
--- a/tools/inc/tools/ref.hxx
+++ b/tools/inc/tools/ref.hxx
@@ -322,13 +322,6 @@ inline void      ClassName##MemberList::Append( const ClassName##MemberList & rL
 inline sal_uIntPtr   ClassName##MemberList::GetPos( const EntryName p) const\
             {return BaseList::GetPos( p );}
 
-#define SV_DECL_MEMBER_LIST(ClassName,EntryName)\
-class ClassName##MemberList : public SvRefBaseMemberList\
-{\
-public:\
-    PRV_SV_DECL_MEMBER_LIST(ClassName,EntryName)\
-};
-
 /************************** S v R e f B a s e ****************************/
 #define SV_NO_DELETE_REFCOUNT  0x80000000
 class TOOLS_DLLPUBLIC SvRefBase
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index d1768bc..e070fb5 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -53,11 +53,6 @@ class UniString;
 #define BYTESTRING_TO_UNISTRING_CVTFLAGS    (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE |\
                                              RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |\
                                              RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT)
-#define UNISTRING_TO_BYTESTRING_CVTFLAGS    (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |\
-                                             RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |\
-                                             RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE |\
-                                             RTL_UNICODETOTEXT_FLAGS_PRIVATE_MAPTO0 |\
-                                             RTL_UNICODETOTEXT_FLAGS_NOCOMPOSITE)
 
 // -----------------------------------------------------------------------
 
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 9840fa4..13b5ae8 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -398,20 +398,6 @@ namespace ftp {
                      CURLOPT_URL,                                 \
                      urlParAscii.getStr());
 
-        // Setting username:password
-#define SET_USER_PASSWORD(username,password)                      \
-   rtl::OUString combi(username  +                                \
-                       rtl::OUString(":") +      \
-                       password);                                 \
-   rtl::OString aUserPsswd(combi.getStr(),                        \
-                           combi.getLength(),                     \
-                           RTL_TEXTENCODING_UTF8);                \
-   curl_easy_setopt(curl,                                         \
-                    CURLOPT_USERPWD,                              \
-                    aUserPsswd.getStr())
-
-
-
 FILE* FTPURL::open()
     throw(curl_exception)
 {


More information about the Libreoffice-commits mailing list