[Libreoffice-commits] .: 5 commits - svl/inc svl/source svtools/inc svtools/source toolkit/inc toolkit/source tools/inc tools/source unotools/inc unotools/source vcl/inc vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Aug 2 03:09:19 PDT 2011


 svl/inc/svl/brdcst.hxx                          |    3 
 svl/source/notify/brdcst.cxx                    |   21 ----
 svtools/inc/svtools/htmlout.hxx                 |    5 -
 svtools/inc/svtools/scriptedtext.hxx            |   15 ---
 svtools/source/contnr/templwin.cxx              |   40 --------
 svtools/source/control/scriptedtext.cxx         |    7 -
 svtools/source/svhtml/htmlout.cxx               |   32 +++---
 toolkit/inc/toolkit/controls/unocontrolbase.hxx |    2 
 toolkit/source/controls/unocontrolbase.cxx      |   22 ----
 tools/inc/tools/color.hxx                       |    4 
 tools/inc/tools/stream.hxx                      |    2 
 tools/inc/tools/string.hxx                      |    6 -
 tools/source/generic/color.cxx                  |   49 ----------
 tools/source/stream/stream.cxx                  |    7 -
 tools/source/string/tstring.cxx                 |   13 --
 unotools/inc/unotools/lingucfg.hxx              |    9 -
 unotools/source/config/lingucfg.cxx             |  110 ------------------------
 vcl/inc/vcl/bmpacc.hxx                          |    2 
 vcl/inc/vcl/outdev.hxx                          |    8 -
 vcl/source/gdi/bmpacc3.cxx                      |   28 ------
 vcl/source/gdi/print2.cxx                       |   69 ---------------
 21 files changed, 29 insertions(+), 425 deletions(-)

New commits:
commit 3b91e8175383a804fa21f04c0eaeb47feee05cb1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 1 23:00:24 2011 +0100

    shrink api: long version can be private

diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index a424ed9..b38551d 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -164,6 +164,9 @@ private:
     TOOLS_DLLPRIVATE void ImplStringConvert(
         rtl_TextEncoding, rtl_TextEncoding, sal_Bool);
 
+    TOOLS_DLLPRIVATE static sal_Unicode	ConvertToUnicode(
+        const sal_Char* pChar, sal_Size* pLen, rtl_TextEncoding eTextEncoding);
+
                         ByteString( const int* pDummy ); // not implemented: to prevent ByteString( NULL )
                         ByteString(int); // not implemented; to detect misuses
                                          // of ByteString(sal_Char);
@@ -263,8 +266,6 @@ public:
     static sal_Char 	ConvertFromUnicode( sal_Unicode c,
                                             rtl_TextEncoding eTextEncoding,
                                             sal_Bool bReplace = sal_True );
-    static sal_Unicode	ConvertToUnicode( const sal_Char* pChar, sal_Size* pLen,
-                                          rtl_TextEncoding eTextEncoding );
     static sal_Size 	ConvertFromUnicode( sal_Unicode c, sal_Char* pBuf, sal_Size nBufLen,
                                             rtl_TextEncoding eTextEncoding,
                                             sal_Bool bReplace = sal_True );
commit 4de8b1eac8ed69f6de65c4bde0e3568ee1a959ab
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jul 31 23:49:35 2011 +0100

    callcatcher: remove unused code

diff --git a/svl/inc/svl/brdcst.hxx b/svl/inc/svl/brdcst.hxx
index f312726..d017a79 100644
--- a/svl/inc/svl/brdcst.hxx
+++ b/svl/inc/svl/brdcst.hxx
@@ -64,9 +64,6 @@ public:
     virtual 				~SfxBroadcaster();
 
     void					Broadcast( const SfxHint &rHint );
-    void					BroadcastDelayed( const SfxHint& rHint );
-    void					BroadcastInIdle( const SfxHint& rHint );
-
     sal_Bool					HasListeners() const;
     sal_uInt16					GetListenerCount() const { return aListeners.Count(); }
     SfxListener*			GetListener( sal_uInt16 nNo ) const
diff --git a/svl/source/notify/brdcst.cxx b/svl/source/notify/brdcst.cxx
index 63da41f..7665284 100644
--- a/svl/source/notify/brdcst.cxx
+++ b/svl/source/notify/brdcst.cxx
@@ -68,27 +68,6 @@ void SfxBroadcaster::Broadcast( const SfxHint &rHint )
     }
 }
 
-//--------------------------------------------------------------------
-
-// broadcast after a timeout
-
-
-void SfxBroadcaster::BroadcastDelayed( const SfxHint& rHint )
-{
-    DBG_WARNING( "not implemented" );
-    Broadcast(rHint);
-}
-//--------------------------------------------------------------------
-
-// broadcast in idle-handler
-
-void SfxBroadcaster::BroadcastInIdle( const SfxHint& rHint )
-{
-    DBG_WARNING( "not implemented" );
-    Broadcast(rHint);
-}
-//--------------------------------------------------------------------
-
 // unregister all listeners
 
 SfxBroadcaster::~SfxBroadcaster()
diff --git a/svtools/inc/svtools/scriptedtext.hxx b/svtools/inc/svtools/scriptedtext.hxx
index 5f2f1e8..c5cecc1 100644
--- a/svtools/inc/svtools/scriptedtext.hxx
+++ b/svtools/inc/svtools/scriptedtext.hxx
@@ -59,21 +59,6 @@ public:
                                     A reference to an output device. */
                                 SvtScriptedTextHelper( OutputDevice& _rOutDevice );
 
-                                /** Constructor sets an output device and fonts for all script types.
-                                    @param  _rOutDevice
-                                    A reference to an output device.
-                                    @param  _pLatinFont
-                                    The font for latin characters.
-                                    @param  _pAsianFont
-                                    The font for asian characters.
-                                    @param  _pCmplxFont
-                                    The font for complex text layout. */
-                                SvtScriptedTextHelper(
-                                    OutputDevice& _rOutDevice,
-                                    Font* _pLatinFont,
-                                    Font* _pAsianFont,
-                                    Font* _pCmplxFont );
-
                                 /** Copy constructor. */
                                 SvtScriptedTextHelper(
                                     const SvtScriptedTextHelper& _rCopy );
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index a6035fc..8b69233 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -1639,7 +1639,6 @@ void SvtTemplateWindow::SelectFolder(sal_Int32 nFolderPosition)
 {
     pIconWin->SelectFolder(nFolderPosition);
 }
-// struct SvtTmplDlg_Impl ------------------------------------------------
 
 struct SvtTmplDlg_Impl
 {
@@ -1654,47 +1653,8 @@ struct SvtTmplDlg_Impl
     SvtTmplDlg_Impl( Window* pParent ) : pWin( new SvtTemplateWindow( pParent ) ) ,bSelectNoOpen( sal_False ) {}
 
     ~SvtTmplDlg_Impl() { delete pWin; }
-
-    uno::Reference< util::XOfficeInstallationDirectories > getOfficeInstDirs();
 };
 
-uno::Reference< util::XOfficeInstallationDirectories > SvtTmplDlg_Impl::getOfficeInstDirs()
-{
-    if ( !m_xOfficeInstDirs.is() )
-    {
-        try
-        {
-            uno::Reference< lang::XMultiServiceFactory > xSMgr = comphelper::getProcessServiceFactory();
-
-            uno::Reference< beans::XPropertySet > xPropSet( xSMgr, uno::UNO_QUERY );
-            if ( xPropSet.is() )
-            {
-                uno::Reference< uno::XComponentContext > xCtx;
-                xPropSet->getPropertyValue(
-                    rtl::OUString(
-                        RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) )
-                >>= xCtx;
-
-                if ( xCtx.is() )
-                {
-                    xCtx->getValueByName(
-                        rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
-                            "/singletons/com.sun.star.util.theOfficeInstallationDirectories" ) ) )
-                    >>= m_xOfficeInstDirs;
-                }
-            }
-        }
-        catch( uno::Exception& )
-        {}
-    }
-
-    return m_xOfficeInstDirs;
-}
-
-// class SvtDocumentTemplateDialog ---------------------------------------
-
-// ------------------------------------------------------------------------
-
 SvtDocumentTemplateDialog::SvtDocumentTemplateDialog( Window* pParent ) :
 
     ModalDialog( pParent, SvtResId( DLG_DOCTEMPLATE ) ),
diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx
index 699b0a9..3dc5a2e 100644
--- a/svtools/source/control/scriptedtext.cxx
+++ b/svtools/source/control/scriptedtext.cxx
@@ -331,13 +331,6 @@ SvtScriptedTextHelper::SvtScriptedTextHelper( OutputDevice& _rOutDevice ) :
 {
 }
 
-SvtScriptedTextHelper::SvtScriptedTextHelper(
-        OutputDevice& _rOutDevice,
-        Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ) :
-    mpImpl( new SvtScriptedTextHelper_Impl( _rOutDevice, _pLatinFont, _pAsianFont, _pCmplxFont ) )
-{
-}
-
 SvtScriptedTextHelper::SvtScriptedTextHelper( const SvtScriptedTextHelper& _rCopy ) :
     mpImpl( new SvtScriptedTextHelper_Impl( *_rCopy.mpImpl ) )
 {
diff --git a/toolkit/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
index fb53439..906d486 100644
--- a/toolkit/inc/toolkit/controls/unocontrolbase.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
@@ -56,9 +56,7 @@ protected:
 
     sal_Bool		ImplGetPropertyValue_BOOL( sal_uInt16 nProp );
     sal_Int16 		ImplGetPropertyValue_INT16( sal_uInt16 nProp );
-    sal_uInt16 		ImplGetPropertyValue_UINT16( sal_uInt16 nProp );
     sal_Int32 		ImplGetPropertyValue_INT32( sal_uInt16 nProp );
-    sal_uInt32 		ImplGetPropertyValue_UINT32( sal_uInt16 nProp );
     double 			ImplGetPropertyValue_DOUBLE( sal_uInt16 nProp );
     ::rtl::OUString	ImplGetPropertyValue_UString( sal_uInt16 nProp );
 
diff --git a/toolkit/source/controls/unocontrolbase.cxx b/toolkit/source/controls/unocontrolbase.cxx
index 2a40a91..bea2af3 100644
--- a/toolkit/source/controls/unocontrolbase.cxx
+++ b/toolkit/source/controls/unocontrolbase.cxx
@@ -153,17 +153,6 @@ sal_Int16 UnoControlBase::ImplGetPropertyValue_INT16( sal_uInt16 nProp )
     return n;
 }
 
-sal_uInt16 UnoControlBase::ImplGetPropertyValue_UINT16( sal_uInt16 nProp )
-{
-    sal_uInt16 n = 0;
-    if ( mxModel.is() )
-    {
-        ::com::sun::star::uno::Any aVal = ImplGetPropertyValue( GetPropertyName( nProp ) );
-        aVal >>= n;
-    }
-    return n;
-}
-
 sal_Int32 UnoControlBase::ImplGetPropertyValue_INT32( sal_uInt16 nProp )
 {
     sal_Int32 n = 0;
@@ -175,17 +164,6 @@ sal_Int32 UnoControlBase::ImplGetPropertyValue_INT32( sal_uInt16 nProp )
     return n;
 }
 
-sal_uInt32 UnoControlBase::ImplGetPropertyValue_UINT32( sal_uInt16 nProp )
-{
-    sal_uInt32 n = 0;
-    if ( mxModel.is() )
-    {
-        ::com::sun::star::uno::Any aVal = ImplGetPropertyValue( GetPropertyName( nProp ) );
-        aVal >>= n;
-    }
-    return n;
-}
-
 double UnoControlBase::ImplGetPropertyValue_DOUBLE( sal_uInt16 nProp )
 {
     double n = 0;
diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx
index e06f962..23b1a78 100644
--- a/tools/inc/tools/color.hxx
+++ b/tools/inc/tools/color.hxx
@@ -177,10 +177,6 @@ public:
     static ColorData    HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri );
     void                RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const;
 
-    // the range for cymk is 0 to 1.0
-    static ColorData    CMYKtoRGB( double fCyan, double fMagenta, double fYellow, double fKey );
-    void                RGBtoCMYK( double& fCyan, double& fMagenta, double& fYellow, double& fKey );
-
     sal_Bool            operator==( const Color& rColor ) const
                         { return (mnColor == rColor.mnColor); }
     sal_Bool            operator!=( const Color& rColor ) const
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index c97cf77..7defdef 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -445,8 +445,6 @@ public:
     sal_Bool		WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding eDestCharSet );
     sal_Bool		WriteUnicodeOrByteText( const String& rStr )
                     { return WriteUnicodeOrByteText( rStr, GetStreamCharSet() ); }
-                /// Write a line of Unicode and append line end (endlu())
-    sal_Bool		WriteUniStringLine( const String& rStr );
 
                 /// Write a Unicode character if eDestCharSet==RTL_TEXTENCODING_UNICODE,
                 /// otherwise write as Bytecode converted to eDestCharSet.
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index c1984af..993abe0 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -259,55 +259,6 @@ ColorData Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri )
     return RGB_COLORDATA( cR, cG, cB );
 }
 
-// -----------------------------------------------------------------------
-
-// CMYK values from 0 to 1
-ColorData Color::CMYKtoRGB( double fCyan, double fMagenta, double fYellow, double fKey )
-{
-    fCyan = (fCyan * ( 1.0 - fKey )) + fKey;
-    fMagenta = (fMagenta * ( 1.0 - fKey )) + fKey;
-    fYellow = (fYellow * ( 1.0 - fKey )) + fKey;
-
-    sal_uInt8 nRed = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fCyan ) * 255.0, 255.0), 0.0 ) );
-    sal_uInt8 nGreen = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fMagenta ) * 255.0, 255.0), 0.0 ) );
-    sal_uInt8 nBlue = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fYellow ) * 255.0, 255.0), 0.0 ) );
-
-    return RGB_COLORDATA( nRed, nGreen, nBlue );
-}
-
-// -----------------------------------------------------------------------
-
-// RGB values from 0 to 255
-// CMY results from 0 to 1
-void Color::RGBtoCMYK( double& fCyan, double& fMagenta, double& fYellow, double& fKey )
-{
-    fCyan = 1 - ( GetRed() / 255.0 );
-    fMagenta = 1 - ( GetGreen() / 255.0 );
-    fYellow = 1 - ( GetBlue() / 255.0 );
-
-    //CMYK and CMY values from 0 to 1
-    fKey = 1.0;
-    if( fCyan < fKey ) fKey = fCyan;
-    if( fMagenta < fKey ) fKey = fMagenta;
-    if( fYellow < fKey ) fKey = fYellow;
-
-    if ( fKey == 1.0 )
-    {
-       //Black
-       fCyan = 0.0;
-       fMagenta = 0.0;
-       fYellow = 0.0;
-    }
-    else
-    {
-       fCyan = ( fCyan - fKey ) / ( 1.0 - fKey );
-       fMagenta = ( fMagenta - fKey ) / ( 1.0 - fKey );
-       fYellow = ( fYellow - fKey ) / ( 1.0 - fKey );
-    }
-}
-
-// -----------------------------------------------------------------------
-
 SvStream& Color::Read( SvStream& rIStm, sal_Bool bNewFormat )
 {
     if ( bNewFormat )
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 1a3f406..f0bcbbd 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -920,13 +920,6 @@ sal_Bool SvStream::WriteLine( const ByteString& rStr )
     return nError == SVSTREAM_OK;
 }
 
-sal_Bool SvStream::WriteUniStringLine( const String& rStr )
-{
-    WriteUnicodeText( rStr );
-    endlu(*this);
-    return nError == SVSTREAM_OK;
-}
-
 /*************************************************************************
 |*
 |*    Stream::WriteLines()
diff --git a/unotools/inc/unotools/lingucfg.hxx b/unotools/inc/unotools/lingucfg.hxx
index ca56cc1..2d807f6 100644
--- a/unotools/inc/unotools/lingucfg.hxx
+++ b/unotools/inc/unotools/lingucfg.hxx
@@ -217,14 +217,11 @@ public:
     sal_Bool GetElementNamesFor( const rtl::OUString &rNodeName, com::sun::star::uno::Sequence< rtl::OUString > &rElementNames ) const;
     //
     sal_Bool GetSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, com::sun::star::uno::Sequence< rtl::OUString > &rFormatList ) const;
-    void SetOrCreateSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, const com::sun::star::uno::Sequence< rtl::OUString > &rFormatList  ) const;
-    //
+
     sal_Bool GetDictionaryEntry( const rtl::OUString &rNodeName, SvtLinguConfigDictionaryEntry &rDicEntry ) const;
-    void SetOrCreateDictionaryEntry( const rtl::OUString &rNodeName, const SvtLinguConfigDictionaryEntry &rDicEntry ) const;
-    //
+
     com::sun::star::uno::Sequence< rtl::OUString > GetDisabledDictionaries() const;
-    void SetDisabledDictionaries( const com::sun::star::uno::Sequence< rtl::OUString > &rDictionaries ) const;
-    //
+
     std::vector< SvtLinguConfigDictionaryEntry > GetActiveDictionariesByFormat( const rtl::OUString &rFormatName );
 
     // functions returning file URLs to the respective images (if found) and empty string otherwise
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index da685ec..7451de1 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -972,28 +972,6 @@ sal_Bool SvtLinguConfig::GetElementNamesFor(
     return bSuccess;
 }
 
-static uno::Reference< container::XNameAccess > GetOrCreateSetEntry_Impl(
-    const uno::Reference< container::XNameAccess > &rxSetNameAccess,
-    const rtl::OUString &rEntryName )
-{
-    uno::Reference< container::XNameAccess > xResult;
-    try
-    {
-        if (!rxSetNameAccess->hasByName( rEntryName ))
-        {
-            uno::Reference< lang::XSingleServiceFactory > xFactory( rxSetNameAccess, uno::UNO_QUERY_THROW);
-            uno::Reference< uno::XInterface > xNewEntry( xFactory->createInstance() );
-            uno::Reference< container::XNameContainer > xNC( rxSetNameAccess, uno::UNO_QUERY_THROW );
-            xNC->insertByName( rEntryName, makeAny( xNewEntry ) );
-        }
-        xResult.set( rxSetNameAccess->getByName( rEntryName ), uno::UNO_QUERY_THROW );
-    }
-    catch (uno::Exception &)
-    {
-    }
-    return xResult;
-}
-
 sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor(
     const rtl::OUString &rSetName,
     const rtl::OUString &rSetEntry,
@@ -1018,38 +996,10 @@ sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor(
     return bSuccess;
 }
 
-void SvtLinguConfig::SetOrCreateSupportedDictionaryFormatsFor(
-    const rtl::OUString &rSetName,
-    const rtl::OUString &rSetEntry,
-    const uno::Sequence< rtl::OUString > &rFormatList  ) const
-{
-    if (rSetName.getLength() == 0 || rSetEntry.getLength() == 0)
-        return;
-    try
-    {
-        DBG_ASSERT( rFormatList.getLength(), "applying empty format list. Really??" );
-
-        uno::Reference< util::XChangesBatch > xUpdateAccess( GetMainUpdateAccess() );
-        uno::Reference< container::XNameAccess > xNA( xUpdateAccess, uno::UNO_QUERY_THROW );
-        xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW );
-        xNA.set( xNA->getByName( rSetName ), uno::UNO_QUERY_THROW );
-        xNA = GetOrCreateSetEntry_Impl( xNA, rSetEntry );
-
-        uno::Reference< container::XNameReplace > xNR( xNA, uno::UNO_QUERY_THROW );
-        xNR->replaceByName( aG_SupportedDictionaryFormats, uno::makeAny( rFormatList ) );
-
-        xUpdateAccess->commitChanges();
-    }
-    catch (uno::Exception &)
-    {
-    }
-}
-
-
-static uno::WeakReference< util::XMacroExpander > aG_xMacroExpander;
-
 static uno::Reference< util::XMacroExpander > lcl_GetMacroExpander()
 {
+    static uno::WeakReference< util::XMacroExpander > aG_xMacroExpander;
+
     uno::Reference< util::XMacroExpander > xMacroExpander( aG_xMacroExpander );
     if ( !xMacroExpander.is() )
     {
@@ -1163,36 +1113,6 @@ sal_Bool SvtLinguConfig::GetDictionaryEntry(
     return bSuccess;
 }
 
-void SvtLinguConfig::SetOrCreateDictionaryEntry(
-    const rtl::OUString &rNodeName,
-    const SvtLinguConfigDictionaryEntry &rDicEntry ) const
-{
-    if (rNodeName.getLength() == 0)
-        return;
-    try
-    {
-        uno::Reference< util::XChangesBatch > xUpdateAccess( GetMainUpdateAccess() );
-        uno::Reference< container::XNameAccess > xNA( xUpdateAccess, uno::UNO_QUERY_THROW );
-        xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW );
-        xNA.set( xNA->getByName( aG_Dictionaries ), uno::UNO_QUERY_THROW );
-        xNA = GetOrCreateSetEntry_Impl( xNA, rNodeName );
-
-        DBG_ASSERT( rDicEntry.aLocations.getLength(), "Applying empty dictionary locations. Really correct??" );
-        DBG_ASSERT( rDicEntry.aFormatName.getLength(), "Applying empty dictionary format name. Really correct??" );
-        DBG_ASSERT( rDicEntry.aLocaleNames.getLength(), "Applying empty list of locales for the dictionary. Really correct??" );
-
-        uno::Reference< container::XNameReplace > xNR( xNA, uno::UNO_QUERY_THROW );
-        xNR->replaceByName( aG_Locations, uno::makeAny( rDicEntry.aLocations ) );
-        xNR->replaceByName( aG_Format,    uno::makeAny( rDicEntry.aFormatName ) );
-        xNR->replaceByName( aG_Locales,   uno::makeAny( rDicEntry.aLocaleNames ) );
-
-        xUpdateAccess->commitChanges();
-    }
-    catch (uno::Exception &)
-    {
-    }
-}
-
 uno::Sequence< rtl::OUString > SvtLinguConfig::GetDisabledDictionaries() const
 {
     uno::Sequence< rtl::OUString > aResult;
@@ -1208,32 +1128,6 @@ uno::Sequence< rtl::OUString > SvtLinguConfig::GetDisabledDictionaries() const
     return aResult;
 }
 
-void SvtLinguConfig::SetDisabledDictionaries(
-    const uno::Sequence< rtl::OUString > &rDictionaries ) const
-{
-    try
-    {
-        uno::Reference< util::XChangesBatch > xUpdateAccess( GetMainUpdateAccess() );
-        uno::Reference< container::XNameAccess > xNA( xUpdateAccess, uno::UNO_QUERY_THROW );
-        xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW );
-        if (xNA->hasByName( aG_DisabledDictionaries ))
-        {
-            uno::Reference< container::XNameReplace > xNR( xNA, uno::UNO_QUERY_THROW );
-            xNR->replaceByName( aG_DisabledDictionaries, makeAny( rDictionaries ) );
-        }
-        else
-        {
-            uno::Reference< container::XNameContainer > xNC( xNA, uno::UNO_QUERY_THROW );
-            xNC->insertByName( aG_DisabledDictionaries, makeAny( rDictionaries ) );
-        }
-
-        xUpdateAccess->commitChanges();
-    }
-    catch (uno::Exception &)
-    {
-    }
-}
-
 std::vector< SvtLinguConfigDictionaryEntry > SvtLinguConfig::GetActiveDictionariesByFormat(
     const rtl::OUString &rFormatName )
 {
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index b808f1b..0e8fbb4 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -1193,14 +1193,6 @@ public:
     Bitmap              GetDownsampledBitmap( const Size& rDstSz,
                                               const Point& rSrcPt, const Size& rSrcSz,
                                               const Bitmap& rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY );
-    /** Retrieve downsampled and cropped bitmapEx
-
-        @attention This method ignores negative rDstSz values, thus
-        mirroring must happen outside this method (e.g. in DrawBitmapEx)
-     */
-    BitmapEx            GetDownsampledBitmapEx( const Size& rDstSz,
-                                                const Point& rSrcPt, const Size& rSrcSz,
-                                                const BitmapEx& rBmpEx, long nMaxBmpDPIX, long nMaxBmpDPIY );
 
     //-------------------------------------
     //  Native Widget Rendering functions
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index ac406ad..ee4dc26 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -1470,75 +1470,6 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
 
 // -----------------------------------------------------------------------------
 
-BitmapEx OutputDevice::GetDownsampledBitmapEx( const Size& rDstSz,
-                                               const Point& rSrcPt, const Size& rSrcSz,
-                                               const BitmapEx& rBmpEx, long nMaxBmpDPIX, long nMaxBmpDPIY )
-{
-    BitmapEx aBmpEx( rBmpEx );
-
-    if( !aBmpEx.IsEmpty() )
-    {
-        Point           aPoint;
-        const Rectangle aBmpRect( aPoint, aBmpEx.GetSizePixel() );
-        Rectangle       aSrcRect( rSrcPt, rSrcSz );
-
-        // do cropping if neccessary
-        if( aSrcRect.Intersection( aBmpRect ) != aBmpRect )
-        {
-            if( !aSrcRect.IsEmpty() )
-                aBmpEx.Crop( aSrcRect );
-            else
-                aBmpEx.SetEmpty();
-        }
-
-        if( !aBmpEx.IsEmpty() )
-        {
-            // do downsampling if neccessary
-            Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) );
-
-            // #103209# Normalize size (mirroring has to happen outside of this method)
-            aDstSizeTwip = Size( labs(aDstSizeTwip.Width()), labs(aDstSizeTwip.Height()) );
-
-            const Size      aBmpSize( aBmpEx.GetSizePixel() );
-            const double    fBmpPixelX = aBmpSize.Width();
-            const double    fBmpPixelY = aBmpSize.Height();
-            const double    fMaxPixelX = aDstSizeTwip.Width() * nMaxBmpDPIX / 1440.0;
-            const double    fMaxPixelY = aDstSizeTwip.Height() * nMaxBmpDPIY / 1440.0;
-
-            // check, if the bitmap DPI exceeds the maximum DPI (allow 4 pixel rounding tolerance)
-            if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
-                  ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
-                ( fBmpPixelY > 0.0 ) && ( fMaxPixelY > 0.0 ) )
-            {
-                // do scaling
-                Size            aNewBmpSize;
-                const double    fBmpWH = fBmpPixelX / fBmpPixelY;
-                const double    fMaxWH = fMaxPixelX / fMaxPixelY;
-
-                if( fBmpWH < fMaxWH )
-                {
-                    aNewBmpSize.Width() = FRound( fMaxPixelY * fBmpWH );
-                    aNewBmpSize.Height() = FRound( fMaxPixelY );
-                }
-                else if( fBmpWH > 0.0 )
-                {
-                    aNewBmpSize.Width() = FRound( fMaxPixelX );
-                    aNewBmpSize.Height() = FRound( fMaxPixelX / fBmpWH);
-                }
-
-                if( aNewBmpSize.Width() && aNewBmpSize.Height() )
-                    aBmpEx.Scale( aNewBmpSize );
-                else
-                    aBmpEx.SetEmpty();
-            }
-        }
-    }
-
-    return aBmpEx;
-}
-
-// -----------------------------------------------------------------------------
-
 void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient )
 {
     const PrinterOptions& rPrinterOptions = GetPrinterOptions();
commit 12d9f453a1bfe1400c852464401a81b80b0b0a73
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jul 31 15:47:15 2011 +0100

    ditch ByteString::CreateFromInt32

diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 4e02879..a424ed9 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -203,7 +203,6 @@ public:
         return rtl::OString (reinterpret_cast<rtl_String*>(mpData));
     }
 
-    static ByteString	CreateFromInt32( sal_Int32 n, sal_Int16 nRadix = 10 );
     sal_Int32			ToInt32() const;
     sal_Int64			ToInt64() const;
 
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index f3b53a8..c4c21be 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -31,8 +31,6 @@
 
 #include <string.h>
 
-#include "boost/static_assert.hpp"
-
 #include "osl/diagnose.h"
 #include <osl/interlck.h>
 #include <rtl/alloc.h>
@@ -92,17 +90,6 @@ xub_StrLen ImplStringLen( const sal_Unicode* pStr )
 
 // -----------------------------------------------------------------------
 
-ByteString ByteString::CreateFromInt32( sal_Int32 n, sal_Int16 nRadix )
-{
-    sal_Char aBuf[RTL_STR_MAX_VALUEOFINT32];
-    BOOST_STATIC_ASSERT(RTL_STR_MAX_VALUEOFINT32 <= STRING_MAXLEN);
-    return ByteString(
-        aBuf,
-        static_cast< xub_StrLen >(rtl_str_valueOfInt32( aBuf, n, nRadix )) );
-}
-
-// -----------------------------------------------------------------------
-
 sal_Int32 ByteString::ToInt32() const
 {
     DBG_CHKTHIS( ByteString, DbgCheckByteString );
commit 3112b9367784a622ef4436c5231ac9b91a77e5c1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 29 23:22:28 2011 +0100

    simply this and return a new string

diff --git a/svtools/inc/svtools/htmlout.hxx b/svtools/inc/svtools/htmlout.hxx
index 98ea069..9fcb10b 100644
--- a/svtools/inc/svtools/htmlout.hxx
+++ b/svtools/inc/svtools/htmlout.hxx
@@ -32,6 +32,7 @@
 #include "svtools/svtdllapi.h"
 #include <tools/solar.h>
 #include <rtl/textenc.h>
+#include <rtl/string.hxx>
 #include <svl/macitem.hxx>
 
 class Color;
@@ -113,11 +114,11 @@ struct HTMLOutFuncs
                         String *pNonConvertableChars = 0 );
 
     // <TD SDVAL="..." SDNUM="...">
-    SVT_DLLPUBLIC static ByteString&	CreateTableDataOptionsValNum( ByteString& aStrTD,
+    SVT_DLLPUBLIC static rtl::OString CreateTableDataOptionsValNum(
                 sal_Bool bValue, double fVal, sal_uLong nFormat,
                 SvNumberFormatter& rFormatter,
                 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
-                String *pNonConvertableChars = 0 );
+                String *pNonConvertableChars = 0);
 
     SVT_DLLPUBLIC static sal_Bool PrivateURLToInternalImg( String& rURL );
 };
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index 2e57391..e2c2ab9 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -44,10 +44,6 @@
 #include <svtools/imappoly.hxx>
 #include "svl/urihelper.hxx"
 
-#ifndef RTL_CONSTASCII_STRINGPARAM
-#define RTL_CONSTASCII_STRINGPARAM( c ) c, sizeof(c)-1
-#endif
-
 #if defined(UNX)
 const sal_Char HTMLOutFuncs::sNewLine = '\012';
 #else
@@ -939,25 +935,32 @@ SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm,
     return rStrm;
 }
 
-ByteString& HTMLOutFuncs::CreateTableDataOptionsValNum( ByteString& aStrTD,
+rtl::OString HTMLOutFuncs::CreateTableDataOptionsValNum(
             sal_Bool bValue,
             double fVal, sal_uLong nFormat, SvNumberFormatter& rFormatter,
-            rtl_TextEncoding eDestEnc, String* pNonConvertableChars )
+            rtl_TextEncoding eDestEnc, String* pNonConvertableChars)
 {
+    rtl::OStringBuffer aStrTD;
+
     if ( bValue )
     {
         // printf / scanf ist zu ungenau
         String aValStr;
         rFormatter.GetInputLineString( fVal, 0, aValStr );
         ByteString sTmp( aValStr, eDestEnc );
-        ((((aStrTD += ' ') += OOO_STRING_SVTOOLS_HTML_O_SDval) += "=\"") += sTmp) += '\"';
+        aStrTD.append(' ').
+            append(OOO_STRING_SVTOOLS_HTML_O_SDval).
+            append(RTL_CONSTASCII_STRINGPARAM("=\"")).
+            append(sTmp).append('\"');
     }
     if ( bValue || nFormat )
     {
-        ((aStrTD += ' ') += OOO_STRING_SVTOOLS_HTML_O_SDnum) += "=\"";
-        (aStrTD += ByteString::CreateFromInt32(
-                                Application::GetSettings().GetLanguage() ))
-            += ';';	// Language fuer Format 0
+        aStrTD.append(' ').
+            append(OOO_STRING_SVTOOLS_HTML_O_SDnum).
+            append(RTL_CONSTASCII_STRINGPARAM("=\"")).
+            append(static_cast<sal_Int32>(
+                Application::GetSettings().GetLanguage())).
+            append(';'); // Language fuer Format 0
         if ( nFormat )
         {
             ByteString aNumStr;
@@ -971,11 +974,12 @@ ByteString& HTMLOutFuncs::CreateTableDataOptionsValNum( ByteString& aStrTD,
             }
             else
                 nLang = LANGUAGE_SYSTEM;
-            ((aStrTD += ByteString::CreateFromInt32(nLang)) += ';') += aNumStr;
+            aStrTD.append(static_cast<sal_Int32>(nLang)).append(';').
+                append(aNumStr);
         }
-        aStrTD += '\"';
+        aStrTD.append('\"');
     }
-    return aStrTD;
+    return aStrTD.makeStringAndClear();
 }
 
 sal_Bool HTMLOutFuncs::PrivateURLToInternalImg( String& rURL )
commit ccd90d1d7cc3ab6a42cd3a6e2f1b1329dc27073d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 29 21:42:03 2011 +0100

    callcatcher: remove unused FillPolyPolygon

diff --git a/vcl/inc/vcl/bmpacc.hxx b/vcl/inc/vcl/bmpacc.hxx
index 1b3fc78..eb0e09f 100644
--- a/vcl/inc/vcl/bmpacc.hxx
+++ b/vcl/inc/vcl/bmpacc.hxx
@@ -205,8 +205,6 @@ public:
     void                        FillPolygon( const Polygon& rPoly );
     void                        DrawPolygon( const Polygon& rPoly );
 
-    void                        FillPolyPolygon( const PolyPolygon& rPoly );
-
 private:
 
     BitmapColor*                mpLineColor;
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index fdc19f9..83a8df6 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -315,32 +315,4 @@ void BitmapWriteAccess::DrawPolygon( const Polygon& rPoly )
     }
 }
 
-// ------------------------------------------------------------------
-
-void BitmapWriteAccess::FillPolyPolygon( const PolyPolygon& rPolyPoly )
-{
-    const sal_uInt16 nCount = rPolyPoly.Count();
-
-    if( nCount && mpFillColor )
-    {
-        const BitmapColor&	rFillColor = *mpFillColor;
-        Region				aRegion( rPolyPoly );
-        Rectangle			aRect;
-
-        aRegion.Intersect( Rectangle( Point(), Size( Width(), Height() ) ) );
-
-        if( !aRegion.IsEmpty() )
-        {
-            RegionHandle aRegHandle( aRegion.BeginEnumRects() );
-            
-            while( aRegion.GetNextEnumRect( aRegHandle, aRect ) )
-                for( long nY = aRect.Top(), nEndY = aRect.Bottom(); nY <= nEndY; nY++ )
-                    for( long nX = aRect.Left(), nEndX = aRect.Right(); nX <= nEndX; nX++ )
-                        SetPixel( nY, nX, rFillColor );
-
-            aRegion.EndEnumRects( aRegHandle );
-        }
-    }
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list