[Libreoffice-commits] .: 10 commits - basic/source canvas/source cui/source dbaccess/source desktop/source dtrans/source framework/inc framework/source reportdesign/source svtools/inc svtools/source svx/inc svx/Library_svx.mk svx/source tools/inc tools/source unusedcode.easy vcl/generic vcl/inc

Caolán McNamara caolan at kemper.freedesktop.org
Fri Jan 13 01:06:43 PST 2012


 basic/source/sbx/sbxdec.cxx                                   |    6 
 canvas/source/cairo/cairo_win32_cairo.cxx                     |    1 
 cui/source/dialogs/insrc.cxx                                  |   17 --
 cui/source/inc/insrc.hxx                                      |    9 -
 dbaccess/source/ui/app/AppController.cxx                      |    6 
 dbaccess/source/ui/app/AppController.hxx                      |    2 
 desktop/source/app/cmdlinehelp.cxx                            |    2 
 desktop/source/app/lockfile.hxx                               |   15 -
 desktop/source/app/lockfile2.cxx                              |    8 -
 desktop/source/deployment/registry/component/dp_component.cxx |    8 -
 desktop/source/deployment/registry/package/dp_package.cxx     |    4 
 dtrans/source/win32/ftransl/ftransl.cxx                       |    2 
 framework/inc/helper/shareablemutex.hxx                       |    1 
 framework/source/fwi/helper/shareablemutex.cxx                |    5 
 reportdesign/source/ui/inc/ReportController.hxx               |    2 
 reportdesign/source/ui/report/ReportController.cxx            |    6 
 svtools/inc/svtools/indexentryres.hxx                         |    4 
 svtools/source/control/indexentryres.cxx                      |   25 +--
 svx/Library_svx.mk                                            |    1 
 svx/inc/svxempty.hxx                                          |   46 ------
 svx/source/engine3d/scene3d.cxx                               |    4 
 svx/source/items/svxempty.cxx                                 |   40 -----
 tools/inc/tools/stream.hxx                                    |    5 
 tools/source/stream/stream.cxx                                |    3 
 unusedcode.easy                                               |   12 -
 vcl/generic/fontmanager/fontmanager.cxx                       |   76 ----------
 vcl/inc/vcl/fontmanager.hxx                                   |    1 
 27 files changed, 59 insertions(+), 252 deletions(-)

New commits:
commit 6008c3f547a8cfa5f8c97f4084dfbab8fd263b6f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 13 09:04:24 2012 +0000

    WaE: unused i

diff --git a/canvas/source/cairo/cairo_win32_cairo.cxx b/canvas/source/cairo/cairo_win32_cairo.cxx
index 93520cd..ee4aea8 100644
--- a/canvas/source/cairo/cairo_win32_cairo.cxx
+++ b/canvas/source/cairo/cairo_win32_cairo.cxx
@@ -291,7 +291,6 @@ namespace cairo
         wchar_t unicode[2];
         WORD glyph_index;
         HDC hdc = NULL;
-        int i = 0;
 
         hdc = CreateCompatibleDC (NULL);
 
commit 26712ff5a60428f94d45b20b8f01900da52f5e4e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 13 09:03:06 2012 +0000

    WaE: d shadows another d

diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index 14833cf..992bff0 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -696,10 +696,12 @@ start:
             }
             break;
         case SbxBYREF | SbxCURRENCY:
+            {
             double d;
             if( !pDec->getDouble( d ) )
                 SbxBase::SetError( SbxERR_OVERFLOW );
             *p->pnInt64 = ImpDoubleToCurrency( d );
+            }
             break;
         case SbxBYREF | SbxSALINT64:
             {
@@ -708,8 +710,8 @@ start:
                 SbxBase::SetError( SbxERR_OVERFLOW );
             else
                 *p->pnInt64 = ImpDoubleToSalInt64( d );
-            break;
             }
+            break;
         case SbxBYREF | SbxSALUINT64:
             {
             double d;
@@ -717,8 +719,8 @@ start:
                 SbxBase::SetError( SbxERR_OVERFLOW );
             else
                 *p->puInt64 = ImpDoubleToSalUInt64( d );
-            break;
             }
+            break;
         case SbxBYREF | SbxSINGLE:
             if( !pDec->getSingle( *p->pSingle ) )
             {
commit d271080853675dbc0e16b0788410dc5caed21a01
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 13 09:00:05 2012 +0000

    WaE: clipformat may be used uninitialized

diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index aa67ce3..7bd6966 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -206,7 +206,7 @@ DataFlavor SAL_CALL CDataFormatTranslator::getDataFlavorFromSystemDataType( cons
 
     if ( aSysDataType.getValueType( ) == CPPUTYPE_SALINT32 )
     {
-        sal_Int32 clipformat;
+        sal_Int32 clipformat = CF_INVALID;
         aSysDataType >>= clipformat;
         if ( CF_INVALID != clipformat )
             findDataFlavorForStandardFormatId( clipformat, aFlavor );
commit 5678e845cc58933964729b908d649e10a11c220a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 13 08:59:03 2012 +0000

    callcatcher: update list, getXLFD is now unused

diff --git a/unusedcode.easy b/unusedcode.easy
index 3c824f0..b906bb9 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -4,6 +4,7 @@ AtomPubSession::getCollectionUrl(Collection::Type)
 ByteString::Assign(char const*, unsigned short)
 ByteString::Assign(char)
 ByteString::ByteString(char const*, unsigned short)
+ByteString::SetToken(unsigned short, char, ByteString const&, unsigned short)
 CIccCLUT::Interp3dTetra(float*, float const*)
 CIccCLUT::Iterate(IIccCLUTExec*)
 CIccFormulaCurveSegment::SetFunction(unsigned short, unsigned char, float*)
@@ -471,13 +472,6 @@ SvPersistStream::InsertObj(SvPersistBase*)
 SvPersistStream::RemoveObj(SvPersistBase*)
 SvPersistStream::SvPersistStream(SvClassManager&, SvStream*, SvPersistStream const&)
 SvPtrarr::Replace(void* const*, unsigned short, unsigned short)
-SvStringsISort::DeleteAndDestroy(unsigned short, unsigned short)
-SvStringsISort::Insert(String* const&)
-SvStringsISort::Insert(String* const&, unsigned short&)
-SvStringsISort::Insert(String* const*, unsigned short)
-SvStringsISort::Insert(SvStringsISort const*, unsigned short, unsigned short)
-SvStringsISort::Remove(String* const&, unsigned short)
-SvStringsISort::Remove(unsigned short, unsigned short)
 SvStringsISortDtor::Insert(String* const*, unsigned short)
 SvTabListBox::GetTabJustify(unsigned short) const
 SvUnoAttributeContainer::getImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>)
@@ -1755,6 +1749,7 @@ pdfi::PDFIProcessor::sortDocument(bool)
 pdfi::PDFIRawAdaptor::odfConvert(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> const&, com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator> const&)
 pdfparse::PDFReader::read(char const*, unsigned int)
 psp::GetCommandLineTokenCount(rtl::OString const&)
+psp::PrintFontManager::getXLFD(psp::PrintFontManager::PrintFont*) const
 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&)
 psp::PrinterGfx::GetGlyphBoundRect(unsigned short, Rectangle&)
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 63145f9..450a9ce 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1734,82 +1734,6 @@ void PrintFontManager::getFontAttributesFromXLFD( PrintFont* pFont, const std::l
 
 // -------------------------------------------------------------------------
 
-OString PrintFontManager::getXLFD( PrintFont* pFont ) const
-{
-    if( pFont->m_eType == fonttype::Type1 )
-    {
-        if( static_cast<Type1FontFile*>(pFont)->m_aXLFD.getLength() )
-            return static_cast<Type1FontFile*>(pFont)->m_aXLFD;
-    }
-    if( pFont->m_eType == fonttype::TrueType )
-    {
-        if( static_cast<TrueTypeFontFile*>(pFont)->m_aXLFD.getLength() )
-            return static_cast<TrueTypeFontFile*>(pFont)->m_aXLFD;
-    }
-
-    OStringBuffer aXLFD( 128 );
-
-    aXLFD.append( "-misc-" );
-    ByteString aFamily(rtl::OUStringToOString(m_pAtoms->getString( ATOM_FAMILYNAME, pFont->m_nFamilyName ), RTL_TEXTENCODING_UTF8));
-    aFamily.SearchAndReplaceAll( '-',' ' );
-    aFamily.SearchAndReplaceAll( '?',' ' );
-    aFamily.SearchAndReplaceAll( '*',' ' );
-    aXLFD.append( OString( aFamily ) );
-    aXLFD.append( '-' );
-    switch( pFont->m_eWeight )
-    {
-        case WEIGHT_THIN:          aXLFD.append("thin");break;
-        case WEIGHT_ULTRALIGHT:    aXLFD.append("ultralight");break;
-        case WEIGHT_LIGHT:         aXLFD.append("light");break;
-        case WEIGHT_SEMILIGHT:     aXLFD.append("semilight");break;
-        case WEIGHT_NORMAL:        aXLFD.append("normal");break;
-        case WEIGHT_MEDIUM:        aXLFD.append("medium");break;
-        case WEIGHT_SEMIBOLD:      aXLFD.append("semibold");break;
-        case WEIGHT_BOLD:          aXLFD.append("bold");break;
-        case WEIGHT_ULTRABOLD:     aXLFD.append("ultrabold");break;
-        case WEIGHT_BLACK:         aXLFD.append("black");break;
-        default: break;
-    }
-    aXLFD.append('-');
-    switch( pFont->m_eItalic )
-    {
-        case ITALIC_NONE:       aXLFD.append('r');break;
-        case ITALIC_OBLIQUE:       aXLFD.append('o');break;
-        case ITALIC_NORMAL:        aXLFD.append('i');break;
-        default: break;
-    }
-    aXLFD.append('-');
-    switch( pFont->m_eWidth )
-    {
-        case WIDTH_ULTRA_CONDENSED: aXLFD.append("ultracondensed");break;
-        case WIDTH_EXTRA_CONDENSED: aXLFD.append("extracondensed");break;
-        case WIDTH_CONDENSED:       aXLFD.append("condensed");break;
-        case WIDTH_SEMI_CONDENSED:  aXLFD.append("semicondensed");break;
-        case WIDTH_NORMAL:          aXLFD.append("normal");break;
-        case WIDTH_SEMI_EXPANDED:   aXLFD.append("semiexpanded");break;
-        case WIDTH_EXPANDED:        aXLFD.append("expanded");break;
-        case WIDTH_EXTRA_EXPANDED:  aXLFD.append("extraexpanded");break;
-        case WIDTH_ULTRA_EXPANDED:  aXLFD.append("ultraexpanded");break;
-        default: break;
-    }
-    aXLFD.append("-utf8-0-0-0-0-");
-    aXLFD.append( pFont->m_ePitch == PITCH_FIXED ? "m" : "p" );
-    aXLFD.append("-0-");
-    const char* pEnc = rtl_getBestUnixCharsetFromTextEncoding( pFont->m_aEncoding );
-    if( ! pEnc )
-    {
-        if( pFont->m_aEncoding == RTL_TEXTENCODING_ADOBE_STANDARD )
-            pEnc = "adobe-standard";
-        else
-            pEnc = "iso8859-1";
-    }
-    aXLFD .append( pEnc );
-
-    return aXLFD.makeStringAndClear();
-}
-
-// -------------------------------------------------------------------------
-
 OUString PrintFontManager::convertTrueTypeName( void* pRecord ) const
 {
     NameRecord* pNameRecord = (NameRecord*)pRecord;
diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index adbe7d2..b5edccd 100644
--- a/vcl/inc/vcl/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -359,7 +359,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
         it = m_aFonts.find( nID );
         return it == m_aFonts.end() ? NULL : it->second;
     }
-    rtl::OString getXLFD( PrintFont* pFont ) const;
     void fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& rInfo ) const;
     void fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo ) const;
 
commit 210177dc046e1817cb024d02fae08dd005667f6f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 12 23:45:08 2012 +0000

    ByteString->rtl::OString

diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index dd1cbfc..39f7278 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -156,7 +156,7 @@ namespace desktop
         sal_Int32 n = comphelper::string::getTokenCount(aHelpMessage_left, '\n');
         rtl::OString bsLeft(rtl::OUStringToOString(aHelpMessage_left,
             RTL_TEXTENCODING_ASCII_US));
-        ByteString bsRight(rtl::OUStringToOString(aHelpMessage_right,
+        rtl::OString bsRight(rtl::OUStringToOString(aHelpMessage_right,
             RTL_TEXTENCODING_ASCII_US));
         for ( sal_Int32 i = 0; i < n; ++i )
         {
diff --git a/desktop/source/app/lockfile.hxx b/desktop/source/app/lockfile.hxx
index 75a61d6..35deb80 100644
--- a/desktop/source/app/lockfile.hxx
+++ b/desktop/source/app/lockfile.hxx
@@ -42,17 +42,16 @@
  */
 
 #include "sal/types.h"
+#include "rtl/string.hxx"
 #include "rtl/ustring.hxx"
 
-class ByteString;
-
 #define LOCKFILE_SUFFIX   rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/.lock" ) )
-#define LOCKFILE_GROUP    ByteString( "Lockdata" )
-#define LOCKFILE_USERKEY  ByteString( "User" )
-#define LOCKFILE_HOSTKEY  ByteString( "Host" )
-#define LOCKFILE_STAMPKEY ByteString( "Stamp" )
-#define LOCKFILE_TIMEKEY  ByteString( "Time" )
-#define LOCKFILE_IPCKEY   ByteString( "IPCServer" )
+#define LOCKFILE_GROUP    rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Lockdata" ) )
+#define LOCKFILE_USERKEY  rtl::OString(RTL_CONSTASCII_STRINGPARAM( "User" ) )
+#define LOCKFILE_HOSTKEY  rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Host" ) )
+#define LOCKFILE_STAMPKEY rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Stamp" ) )
+#define LOCKFILE_TIMEKEY  rtl::OString(RTL_CONSTASCII_STRINGPARAM( "Time" ) )
+#define LOCKFILE_IPCKEY   rtl::OString(RTL_CONSTASCII_STRINGPARAM( "IPCServer" ) )
 
 namespace desktop {
 
diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx
index a4d177f..1f00d65 100644
--- a/desktop/source/app/lockfile2.cxx
+++ b/desktop/source/app/lockfile2.cxx
@@ -42,10 +42,10 @@ bool Lockfile_execWarning( Lockfile * that )
     String aLockname = that->m_aLockname;
     Config aConfig(aLockname);
     aConfig.SetGroup( LOCKFILE_GROUP );
-    ByteString aHost  = aConfig.ReadKey( LOCKFILE_HOSTKEY );
-    ByteString aUser  = aConfig.ReadKey( LOCKFILE_USERKEY );
-    ByteString aStamp = aConfig.ReadKey( LOCKFILE_STAMPKEY );
-    ByteString aTime  = aConfig.ReadKey( LOCKFILE_TIMEKEY );
+    rtl::OString aHost  = aConfig.ReadKey( LOCKFILE_HOSTKEY );
+    rtl::OString aUser  = aConfig.ReadKey( LOCKFILE_USERKEY );
+    rtl::OString aStamp = aConfig.ReadKey( LOCKFILE_STAMPKEY );
+    rtl::OString aTime  = aConfig.ReadKey( LOCKFILE_TIMEKEY );
 
     // display warning and return response
     QueryBox aBox( NULL, DesktopResId( QBX_USERDATALOCKED ) );
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index a6e2504..32ad377 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -794,7 +794,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
                 // xxx todo: probe and evaluate component xml description
 
                 INetContentTypeParameter const * param = params.find(
-                    ByteString("platform") );
+                    rtl::OString(RTL_CONSTASCII_STRINGPARAM("platform")));
                 bool bPlatformFits(param == 0);
                 String aPlatform;
                 if (!bPlatformFits) // platform is specified, we have to check
@@ -805,7 +805,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
                 // If the package is being removed, do not care whether
                 // platform fits. We won't be using it anyway.
                 if (bPlatformFits || bRemoved) {
-                    param = params.find( ByteString("type") );
+                    param = params.find(rtl::OString(RTL_CONSTASCII_STRINGPARAM("type")));
                     if (param != 0)
                     {
                         String const & value = param->m_sValue;
@@ -839,7 +839,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
                          "vnd.sun.star.uno-components"))
             {
                 INetContentTypeParameter const * param = params.find(
-                    ByteString("platform") );
+                    rtl::OString(RTL_CONSTASCII_STRINGPARAM("platform")));
                 if (param == 0 || platform_fits( param->m_sValue )) {
                     return new BackendImpl::ComponentsPackageImpl(
                         this, url, name, m_xComponentsTypeInfo, bRemoved,
@@ -850,7 +850,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
                          "vnd.sun.star.uno-typelibrary"))
             {
                 INetContentTypeParameter const * param = params.find(
-                    ByteString("type") );
+                    rtl::OString(RTL_CONSTASCII_STRINGPARAM("type")));
                 if (param != 0) {
                     String const & value = param->m_sValue;
                     if (value.EqualsIgnoreCaseAscii("RDB"))
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 0bd33e9..3fa6ba1 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1479,7 +1479,7 @@ void BackendImpl::PackageImpl::scanBundle(
             continue;
 
         INetContentTypeParameter const * param = params.find(
-            ByteString("platform") );
+            rtl::OString(RTL_CONSTASCII_STRINGPARAM("platform")));
         if (param != 0 && !platform_fits( param->m_sValue ))
             continue;
         const OUString url( makeURL( packageRootURL, fullPath ) );
@@ -1490,7 +1490,7 @@ void BackendImpl::PackageImpl::scanBundle(
                 "vnd.sun.star.package-bundle-description"))
         {
             // check locale:
-            param = params.find( ByteString("locale") );
+            param = params.find(rtl::OString(RTL_CONSTASCII_STRINGPARAM("locale")));
             if (param == 0) {
                 if (descrFile.isEmpty())
                     descrFile = url;
commit 20b750064598697c022974e07a7a9bf0452cfd95
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 12 23:26:27 2012 +0000

    noone checks the return value of ReadCsvLine

diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 2accc44..df94910 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -464,8 +464,7 @@ public:
                     field may also be escaped with a preceding backslash.
                     Normally, quotes are escaped by doubling them.
 
-                    @return
-                    sal_True if no stream error.
+                    check Stream::good() to detect IO problems during read
 
                     @ATTENTION
                     Note that the string returned may be truncated even inside
@@ -483,7 +482,7 @@ public:
                     characters will be spoiled, and a subsequent ReadCsvLine()
                     may start under false preconditions.
                   */
-    sal_Bool        ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak,
+    void            ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak,
                         const String& rFieldSeparators, sal_Unicode cFieldQuote,
                         sal_Bool bAllowBackslashEscape = sal_False);
 
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 0fb9ca0..8c0efb6 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1037,7 +1037,7 @@ inline const sal_Unicode* lcl_UnicodeStrChr( const sal_Unicode* pStr,
     return 0;
 }
 
-sal_Bool SvStream::ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak,
+void SvStream::ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak,
         const String& rFieldSeparators, sal_Unicode cFieldQuote,
         sal_Bool bAllowBackslashEscape)
 {
@@ -1102,7 +1102,6 @@ sal_Bool SvStream::ReadCsvLine( String& rStr, sal_Bool bEmbeddedLineBreak,
             }
         }
     }
-    return nError == SVSTREAM_OK;
 }
 
 /*************************************************************************
commit 5ac8641b12055ac612b81edc0699b5b546606d67
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 12 23:25:35 2012 +0000

    these OnInvalidateClipboard don't have to be LINKs

diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 89cbc28..3fd0762 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2315,16 +2315,16 @@ void OApplicationController::showPreviewFor(const ElementType _eType,const ::rtl
 //------------------------------------------------------------------------------
 IMPL_LINK( OApplicationController, OnClipboardChanged, void*, EMPTYARG )
 {
-    return OnInvalidateClipboard( NULL );
+    OnInvalidateClipboard();
+    return 0L;
 }
 //------------------------------------------------------------------------------
-IMPL_LINK(OApplicationController, OnInvalidateClipboard, void*, EMPTYARG)
+void OApplicationController::OnInvalidateClipboard()
 {
     InvalidateFeature(ID_BROWSER_CUT);
     InvalidateFeature(ID_BROWSER_COPY);
     InvalidateFeature(ID_BROWSER_PASTE);
     InvalidateFeature(SID_DB_APP_PASTE_SPECIAL);
-    return 0L;
 }
 // -----------------------------------------------------------------------------
 void OApplicationController::onCutEntry()
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index a0a13fe..644de95 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -549,7 +549,7 @@ namespace dbaui
         virtual ::com::sun::star::uno::Any
                                 getCurrentSelection( Control& _rControl ) const;
 
-        DECL_LINK( OnInvalidateClipboard, void* );
+        void OnInvalidateClipboard();
         DECL_LINK( OnClipboardChanged, void* );
         DECL_LINK( OnAsyncDrop, void* );
         DECL_LINK( OnCreateWithPilot, void* );
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index 007b42d..fa734c1 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -329,7 +329,7 @@ namespace rptui
             ,const ::com::sun::star::uno::Any& _aValue
             ,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
 
-        DECL_LINK( OnInvalidateClipboard, void* );
+        void OnInvalidateClipboard();
         DECL_LINK( OnClipboardChanged, void* );
         DECL_LINK( OnExecuteReport, void* );
         DECL_LINK( OnOpenHelpAgent, void* );
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 24a44f2..ded47ec 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2369,15 +2369,15 @@ void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGr
 //------------------------------------------------------------------------------
 IMPL_LINK( OReportController, OnClipboardChanged, void*, EMPTYARG )
 {
-    return OnInvalidateClipboard( NULL );
+    OnInvalidateClipboard();
+    return 0;
 }
 //------------------------------------------------------------------------------
-IMPL_LINK(OReportController, OnInvalidateClipboard, void*, EMPTYARG)
+void OReportController::OnInvalidateClipboard()
 {
     InvalidateFeature(SID_CUT);
     InvalidateFeature(SID_COPY);
     InvalidateFeature(SID_PASTE);
-    return 0L;
 }
 // -----------------------------------------------------------------------------
 void OReportController::openPageDialog(const uno::Reference<report::XSection>& _xSection)
diff --git a/unusedcode.easy b/unusedcode.easy
index 33bfd14..3c824f0 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1536,7 +1536,6 @@ cppcanvas::internal::TransparencyGroupActionFactory::createTransparencyGroupActi
 cppcanvas::tools::modifyClip(com::sun::star::rendering::RenderState&, cppcanvas::internal::OutDevState const&, boost::shared_ptr<cppcanvas::Canvas> const&, Point const&, basegfx::B2DVector const*, double const*)
 cppcanvas::tools::modifyClip(com::sun::star::rendering::RenderState&, cppcanvas::internal::OutDevState const&, boost::shared_ptr<cppcanvas::Canvas> const&, basegfx::B2DHomMatrix const&)
 dbaccess::OptimisticSet::getComposedTableName(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&)
-dbaui::OApplicationController::LinkStubOnInvalidateClipboard(void*, void*)
 dbaui::OFieldDescControl::LinkStubDelayedGrabFocus(void*, void*)
 dbaui::OTableDesignView::LinkStubSwitchHdl(void*, void*)
 dbaui::OTableEditorCtrl::LinkStubEntryNotFound(void*, void*)
@@ -1590,7 +1589,6 @@ formula::FormulaTokenIterator::First()
 formula::ResourceManager::loadString(unsigned short, char const*, rtl::OUString const&)
 formula::StructPage::GetSelectedEntryText()
 formula::StructPage::GetSelectedToken()
-framework::ShareableMutex::getShareableOslMutex()
 framework::TabWindow::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
 framework::UIConfigElementWrapperBase::dispose()
 framework::UIElementWrapperBase::dispose()
@@ -1771,7 +1769,6 @@ pyuno::Runtime::finalize()
 pyuno::importToGlobal(_object*, _object*, _object*)
 rptui::OFieldExpressionControl::LinkStubAsynchActivate(void*, void*)
 rptui::OFieldExpressionControl::LinkStubAsynchDeactivate(void*, void*)
-rptui::OReportController::LinkStubOnInvalidateClipboard(void*, void*)
 salhelper::ORealDynamicLoader::acquire()
 salhelper::ORealDynamicLoader::getApi() const
 salhelper::ORealDynamicLoader::newInstance(salhelper::ORealDynamicLoader**, rtl::OUString const&, rtl::OUString const&)
commit bbfc02d84aa22d051377ff0f0c82b912283b902e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 12 23:25:11 2012 +0000

    noone uses ShareableMutex::getShareableOslMutex

diff --git a/framework/inc/helper/shareablemutex.hxx b/framework/inc/helper/shareablemutex.hxx
index cd08744..c96af1a 100644
--- a/framework/inc/helper/shareablemutex.hxx
+++ b/framework/inc/helper/shareablemutex.hxx
@@ -47,7 +47,6 @@ class FWI_DLLPUBLIC ShareableMutex
 
         void acquire();
         void release();
-        ::osl::Mutex& getShareableOslMutex();
 
     private:
         struct MutexRef
diff --git a/framework/source/fwi/helper/shareablemutex.cxx b/framework/source/fwi/helper/shareablemutex.cxx
index afaf2c9..c7445a0 100644
--- a/framework/source/fwi/helper/shareablemutex.cxx
+++ b/framework/source/fwi/helper/shareablemutex.cxx
@@ -72,11 +72,6 @@ void ShareableMutex::release()
         pMutexRef->m_oslMutex.release();
 }
 
-::osl::Mutex& ShareableMutex::getShareableOslMutex()
-{
-    return pMutexRef->m_oslMutex;
-}
-
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 2e303c175c3969acdb1912c47c1c9d2fab30dfa2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 12 22:33:55 2012 +0000

    remove some tools/string.hxx

diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx
index d6bb8b2..279dba9 100644
--- a/cui/source/dialogs/insrc.cxx
+++ b/cui/source/dialogs/insrc.cxx
@@ -50,24 +50,15 @@ SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, const rtl::OString&
     aBeforeBtn( this, CUI_RES( CB_POS_BEFORE ) ),
     aAfterBtn( this, CUI_RES( CB_POS_AFTER ) ),
     aPosFL( this, CUI_RES( FL_POS ) ),
-    aRow(CUI_RES(STR_ROW)),
-    aCol(CUI_RES(STR_COL)),
+    aRow(ResId::toString(CUI_RES(STR_ROW))),
+    aCol(ResId::toString(CUI_RES(STR_COL))),
     aOKBtn( this, CUI_RES( BT_OK ) ),
     aCancelBtn( this, CUI_RES( BT_CANCEL ) ),
     aHelpBtn( this, CUI_RES( BT_HELP ) ),
     bColumn( bCol )
 {
     FreeResource();
-    String aTmp;
-    if( bColumn )
-    {
-        aTmp += aCol;
-    }
-    else
-    {
-        aTmp += aRow;
-    }
-    SetText( aTmp );
+    SetText( bColumn ? aCol : aRow );
     SetHelpId( sHelpId );
 }
 
@@ -76,6 +67,4 @@ short SvxInsRowColDlg::Execute(void)
     return ModalDialog::Execute();
 }
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx
index 33e8efa..7e4f186 100644
--- a/cui/source/inc/insrc.hxx
+++ b/cui/source/inc/insrc.hxx
@@ -28,6 +28,9 @@
 #ifndef _SVX_INSRC_HXX
 #define _SVX_INSRC_HXX
 
+#include <rtl/string.hxx>
+#include <rtl/ustring.hxx>
+
 #include <svx/stddlg.hxx>
 
 #include <vcl/fixed.hxx>
@@ -35,8 +38,6 @@
 #include <vcl/group.hxx>
 #include <vcl/button.hxx>
 
-#include <tools/string.hxx>
-
 class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog
 {
     FixedText       aCount;
@@ -47,8 +48,8 @@ class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog
     RadioButton     aAfterBtn;
     FixedLine        aPosFL;
 
-    String          aRow;
-    String          aCol;
+    rtl::OUString   aRow;
+    rtl::OUString   aCol;
 
     OKButton        aOKBtn;
     CancelButton    aCancelBtn;
diff --git a/svtools/inc/svtools/indexentryres.hxx b/svtools/inc/svtools/indexentryres.hxx
index 56424cc..1277107 100644
--- a/svtools/inc/svtools/indexentryres.hxx
+++ b/svtools/inc/svtools/indexentryres.hxx
@@ -4,7 +4,7 @@
 #define SVTOOLS_INDEXENTRYRESSOURCE_HXX
 
 #include "svtools/svtdllapi.h"
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
 
 class IndexEntryRessourceData;
 
@@ -16,7 +16,7 @@ class SVT_DLLPUBLIC IndexEntryRessource
     public:
         IndexEntryRessource ();
         ~IndexEntryRessource ();
-        const String& GetTranslation (const String& r_Algorithm);
+        const rtl::OUString& GetTranslation (const rtl::OUString& r_Algorithm);
 };
 
 #endif /* SVTOOLS_INDEXENTRYRESSOURCE_HXX */
diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx
index 8577180..3a85f03 100644
--- a/svtools/source/control/indexentryres.cxx
+++ b/svtools/source/control/indexentryres.cxx
@@ -41,17 +41,17 @@ class IndexEntryRessourceData
 {
     friend class IndexEntryRessource;
     private: /* data */
-        String  ma_Name;
-        String  ma_Translation;
+        rtl::OUString  ma_Name;
+        rtl::OUString  ma_Translation;
     private: /* member functions */
         IndexEntryRessourceData () {}
     public:
-        IndexEntryRessourceData ( const String &r_Algorithm, const String &r_Translation)
+        IndexEntryRessourceData ( const rtl::OUString &r_Algorithm, const rtl::OUString &r_Translation)
                 : ma_Name (r_Algorithm), ma_Translation (r_Translation) {}
 
-        const String&   GetAlgorithm () const { return ma_Name; }
+        const rtl::OUString& GetAlgorithm () const { return ma_Name; }
 
-        const String&   GetTranslation () const { return ma_Translation; }
+        const rtl::OUString& GetTranslation () const { return ma_Translation; }
 
         ~IndexEntryRessourceData () {}
 
@@ -75,8 +75,8 @@ IndexEntryRessource::IndexEntryRessource()
 {
         mp_Data = new IndexEntryRessourceData[INDEXENTRY_RESSOURCE_COUNT];
 
-        #define ASCSTR(str) String(RTL_CONSTASCII_USTRINGPARAM(str))
-        #define RESSTR(rid) String(SvtResId(rid))
+        #define ASCSTR(str) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(str))
+        #define RESSTR(rid) ResId::toString(SvtResId(rid))
 
         mp_Data[STR_SVT_INDEXENTRY_ALPHANUMERIC - STR_SVT_INDEXENTRY_START] =
         IndexEntryRessourceData (ASCSTR("alphanumeric"), RESSTR(STR_SVT_INDEXENTRY_ALPHANUMERIC));
@@ -109,17 +109,16 @@ IndexEntryRessource::~IndexEntryRessource()
     delete[] mp_Data;
 }
 
-const String&
-IndexEntryRessource::GetTranslation (const String &r_Algorithm)
+const rtl::OUString& IndexEntryRessource::GetTranslation(const rtl::OUString &r_Algorithm)
 {
-    xub_StrLen nIndex = r_Algorithm.Search('.');
-    String aLocaleFreeAlgorithm;
+    sal_Int32 nIndex = r_Algorithm.indexOf('.');
+    rtl::OUString aLocaleFreeAlgorithm;
 
-    if (nIndex == STRING_NOTFOUND)
+    if (nIndex == -1)
         aLocaleFreeAlgorithm = r_Algorithm;
     else {
         nIndex += 1;
-        aLocaleFreeAlgorithm = String(r_Algorithm, nIndex, r_Algorithm.Len() - nIndex);
+        aLocaleFreeAlgorithm = r_Algorithm.copy(nIndex, r_Algorithm.getLength() - nIndex);
     }
 
     for (sal_uInt32 i = 0; i < INDEXENTRY_RESSOURCE_COUNT; i++)
commit 6248f7037c6d034a352566457ebbab29ea9d817c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 12 22:29:24 2012 +0000

    svxempty.* not needed anymore

diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 2057d95..d81363a 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -166,7 +166,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
     svx/source/items/postattr \
     svx/source/items/rotmodit \
     svx/source/items/SmartTagItem \
-    svx/source/items/svxempty \
     svx/source/items/svxerr \
     svx/source/items/viewlayoutitem \
     svx/source/items/zoomitem \
diff --git a/svx/inc/svxempty.hxx b/svx/inc/svxempty.hxx
deleted file mode 100644
index 4684964..0000000
--- a/svx/inc/svxempty.hxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SVXEMPTY_HXX
-#define _SVXEMPTY_HXX
-
-
-#include <tools/string.hxx>
-
-#ifndef ICC
-extern XubString& rImplEmptyStr;
-inline const XubString& GetEmptyStr() { return rImplEmptyStr; }
-#define GetEmptySStr GetEmptyStr
-#else
-const XubString& GetEmptyStr();
-#define GetEmptySStr GetEmptyStr
-#endif
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index e5af478..b268213 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -31,10 +31,8 @@
 #include "svx/svdglob.hxx"
 #include "svx/svditer.hxx"
 
-#if defined( UNX ) || defined( ICC )
 #include <stdlib.h>
-#endif
-#include "svx/globl3d.hxx"
+#include <svx/globl3d.hxx>
 #include <svx/svdpage.hxx>
 #include <svl/style.hxx>
 #include <svx/scene3d.hxx>
diff --git a/svx/source/items/svxempty.cxx b/svx/source/items/svxempty.cxx
deleted file mode 100644
index 1c85f20..0000000
--- a/svx/source/items/svxempty.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#include "svxempty.hxx"
-
-// Statischer Empty-String -----------------------------------------------
-
-static XubString aImplSVXEmptyStr;
-XubString& rImplEmptyStr = aImplSVXEmptyStr;
-static String aImplSVXEmptySStr;
-String& rImplEmptySStr = aImplSVXEmptySStr;
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list