[Libreoffice-commits] .: 3 commits - framework/inc svtools/source unusedcode.easy vcl/inc vcl/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Aug 22 06:40:27 PDT 2011


 framework/inc/protocols.h                 |  107 ++++++++++++++++++------------
 svtools/source/config/extcolorcfg.cxx     |    7 -
 svtools/source/control/toolbarmenu.cxx    |   11 ---
 svtools/source/control/toolbarmenuimp.hxx |    1 
 unusedcode.easy                           |    6 +
 vcl/inc/vcl/graph.hxx                     |    1 
 vcl/source/gdi/graph.cxx                  |    7 -
 7 files changed, 70 insertions(+), 70 deletions(-)

New commits:
commit 496ccc46d645aa7648155477a241acab4b58ab53
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 22 13:47:43 2011 +0100

    regenerate up to date list

diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index 57a6a91..fed1326 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -132,8 +132,6 @@ public:
 
     const rtl::OUString&            GetLoadedScheme() const {return m_sLoadedScheme;}
 
-    uno::Sequence< ::rtl::OUString> GetSchemeNames();
-
     sal_Bool                        AddScheme(const rtl::OUString& rNode);
     sal_Bool                        RemoveScheme(const rtl::OUString& rNode);
     void                            SetModified(){ConfigItem::SetModified();}
@@ -512,11 +510,6 @@ void ExtendedColorConfig_Impl::SetColorConfigValue(const ::rtl::OUString& _sName
     }
 }
 
-uno::Sequence< ::rtl::OUString> ExtendedColorConfig_Impl::GetSchemeNames()
-{
-    return GetNodeNames(C2U("ExtendedColorScheme/ColorSchemes"));
-}
-
 sal_Bool ExtendedColorConfig_Impl::AddScheme(const rtl::OUString& rScheme)
 {
     if(ConfigItem::AddNode(C2U("ExtendedColorScheme/ColorSchemes"), rScheme))
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index deffceb..39055f1 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -105,17 +105,6 @@ ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const Stri
 
 // --------------------------------------------------------------------
 
-ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const Image& rImage, MenuItemBits nBits )
-: mrMenu( rMenu )
-{
-    init( nEntryId, nBits );
-
-    maImage = rImage;
-    mbHasImage = true;
-}
-
-// --------------------------------------------------------------------
-
 ToolbarMenuEntry::ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const Image& rImage, const String& rText, MenuItemBits nBits )
 : mrMenu( rMenu )
 {
diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx
index f732f3d..e487483 100644
--- a/svtools/source/control/toolbarmenuimp.hxx
+++ b/svtools/source/control/toolbarmenuimp.hxx
@@ -92,7 +92,6 @@ public:
 
 public:
     ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const String& rText, MenuItemBits nBits );
-    ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const Image& rImage, MenuItemBits nBits );
     ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, const Image& rImage, const String& rText, MenuItemBits nBits );
     ToolbarMenuEntry( ToolbarMenu& rMenu, int nEntryId, Control* pControl, MenuItemBits nBits );
     ~ToolbarMenuEntry();
diff --git a/unusedcode.easy b/unusedcode.easy
index a979058..6b5984c 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -240,6 +240,9 @@ Graphic::GetGraphicsCompressMode(SvStream&)
 Graphic::StartAnimation(OutputDevice*, Point const&, long, OutputDevice*)
 Graphic::WriteEmbedded(SvStream&)
 GraphicConverter::ImplConvert(unsigned long, void*, unsigned long, void**, unsigned long)
+GraphicHelper::convertAppFontToHmm(com::sun::star::awt::Point const&) const
+GraphicHelper::convertAppFontToHmm(com::sun::star::awt::Size const&) const
+GraphicHelper::getDeviceInfo() const
 GraphicReader::IsPreviewModeEnabled() const
 GroupTable::SkipCurrentGroup()
 HTMLControls::Insert(HTMLControl const*&, unsigned short&)
@@ -3036,8 +3039,7 @@ oox::AttributeList::getHyperHex(int, long) const
 oox::AttributeList::getUnsignedHex(int, unsigned int) const
 oox::BinaryInputStream::readNulCharArrayUC(unsigned short)
 oox::ContainerHelper::insertByIndex(com::sun::star::uno::Reference<com::sun::star::container::XIndexContainer> const&, int, com::sun::star::uno::Any const&)
-oox::GraphicHelper::convertAppFontToHmm(com::sun::star::awt::Point const&) const
-oox::GraphicHelper::convertAppFontToHmm(com::sun::star::awt::Size const&) const
+oox::GraphicHelper::convertScreenPixelToHmm(com::sun::star::awt::Point const&) const
 oox::ObjectContainer::getObject(rtl::OUString const&) const
 oox::PropertyMap::dump()
 oox::PropertyMap::dumpCode()
diff --git a/vcl/inc/vcl/graph.hxx b/vcl/inc/vcl/graph.hxx
index 2ca801c..8373935 100644
--- a/vcl/inc/vcl/graph.hxx
+++ b/vcl/inc/vcl/graph.hxx
@@ -176,7 +176,6 @@ public:
     Link                GetAnimationNotifyHdl() const;
 
     sal_uLong               GetAnimationLoopCount() const;
-    void                ResetAnimationLoopCount();
 
     sal_uLong               GetChecksum() const;
 
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 8fa11e9..1bb208b 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -655,13 +655,6 @@ sal_uLong Graphic::GetAnimationLoopCount() const
 
 // ------------------------------------------------------------------------
 
-void Graphic::ResetAnimationLoopCount()
-{
-    mpImpGraphic->ImplResetAnimationLoopCount();
-}
-
-// ------------------------------------------------------------------------
-
 GraphicReader* Graphic::GetContext()
 {
     return mpImpGraphic->ImplGetContext();
commit 04d567d42980584b726e43ead6190ba7b5435fc7
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 22 13:27:30 2011 +0100

    get rid of interim OUStrings

diff --git a/framework/inc/protocols.h b/framework/inc/protocols.h
index 3b30a3d..11ccfd4 100644
--- a/framework/inc/protocols.h
+++ b/framework/inc/protocols.h
@@ -31,15 +31,7 @@
 #ifndef __FRAMEWORK_PROTOCOLS_H_
 #define __FRAMEWORK_PROTOCOLS_H_
 
-//_________________________________________________________________________________________________________________
-//  includes
-//_________________________________________________________________________________________________________________
-
-#include <macros/generic.hxx>
-
-//_________________________________________________________________________________________________________________
-//  namespace
-//_________________________________________________________________________________________________________________
+#include <rtl/ustring.hxx>
 
 namespace framework{
 
@@ -50,16 +42,26 @@ namespace framework{
     a real visible component.
  */
 
-#define SPECIALPROTOCOL_PRIVATE           DECLARE_ASCII("private:"       )       // indicates a loadable content in general!
-#define SPECIALPROTOCOL_PRIVATE_OBJECT    DECLARE_ASCII("private:object" )       // indicates loading of components using a model directly
-#define SPECIALPROTOCOL_PRIVATE_STREAM    DECLARE_ASCII("private:stream" )       // indicates loading of components using a stream only
-#define SPECIALPROTOCOL_PRIVATE_FACTORY   DECLARE_ASCII("private:factory")       // indicates creation of empty documents
-#define SPECIALPROTOCOL_SLOT              DECLARE_ASCII("slot:"          )       // internal protocol of the sfx project for generic dispatch funtionality
-#define SPECIALPROTOCOL_UNO               DECLARE_ASCII(".uno:"          )       // external representation of the slot protocol using names instead of id's
-#define SPECIALPROTOCOL_MACRO             DECLARE_ASCII("macro:"         )       // special sfx protocol to execute macros
-#define SPECIALPROTOCOL_SERVICE           DECLARE_ASCII("service:"       )       // generic way to start uno services during dispatch
-#define SPECIALPROTOCOL_MAILTO            DECLARE_ASCII("mailto:"        )       // for sending mails
-#define SPECIALPROTOCOL_NEWS              DECLARE_ASCII("news:"          )       // for sending news
+// indicates a loadable content in general!
+#define SPECIALPROTOCOL_PRIVATE           "private:"
+// indicates loading of components using a model directly
+#define SPECIALPROTOCOL_PRIVATE_OBJECT    "private:object"
+// indicates loading of components using a stream only
+#define SPECIALPROTOCOL_PRIVATE_STREAM    "private:stream"
+// indicates creation of empty documents
+#define SPECIALPROTOCOL_PRIVATE_FACTORY   "private:factory"
+// internal protocol of the sfx project for generic dispatch funtionality
+#define SPECIALPROTOCOL_SLOT              "slot:"
+// external representation of the slot protocol using names instead of id's
+#define SPECIALPROTOCOL_UNO               ".uno:"
+// special sfx protocol to execute macros
+#define SPECIALPROTOCOL_MACRO             "macro:"
+// generic way to start uno services during dispatch
+#define SPECIALPROTOCOL_SERVICE           "service:"
+// for sending mails
+#define SPECIALPROTOCOL_MAILTO            "mailto:"
+// for sending news
+#define SPECIALPROTOCOL_NEWS              "news:"
 
 class ProtocolCheck
 {
@@ -94,34 +96,34 @@ class ProtocolCheck
     {
         // because "private:" is part of e.g. "private:object" too ...
         // we must check it before all other ones!!!
-        if (sURL.compareTo(SPECIALPROTOCOL_PRIVATE,SPECIALPROTOCOL_PRIVATE.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE)))
             return E_PRIVATE;
         else
-        if (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_OBJECT,SPECIALPROTOCOL_PRIVATE_OBJECT.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE_OBJECT)))
             return E_PRIVATE_OBJECT;
         else
-        if (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_STREAM,SPECIALPROTOCOL_PRIVATE_STREAM.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE_STREAM)))
             return E_PRIVATE_STREAM;
         else
-        if (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_FACTORY,SPECIALPROTOCOL_PRIVATE_FACTORY.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE_FACTORY)))
             return E_PRIVATE_FACTORY;
         else
-        if (sURL.compareTo(SPECIALPROTOCOL_SLOT,SPECIALPROTOCOL_SLOT.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SLOT)))
             return E_SLOT;
         else
-        if (sURL.compareTo(SPECIALPROTOCOL_UNO,SPECIALPROTOCOL_UNO.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_UNO)))
             return E_UNO;
         else
-        if (sURL.compareTo(SPECIALPROTOCOL_MACRO,SPECIALPROTOCOL_MACRO.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MACRO)))
             return E_MACRO;
         else
-        if (sURL.compareTo(SPECIALPROTOCOL_SERVICE,SPECIALPROTOCOL_SERVICE.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SERVICE)))
             return E_SERVICE;
         else
-        if (sURL.compareTo(SPECIALPROTOCOL_MAILTO,SPECIALPROTOCOL_MAILTO.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MAILTO)))
             return E_MAILTO;
         else
-        if (sURL.compareTo(SPECIALPROTOCOL_NEWS,SPECIALPROTOCOL_NEWS.getLength()) == 0)
+        if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_NEWS)))
             return E_NEWS;
         else
             return E_UNKNOWN_PROTOCOL;
@@ -139,34 +141,34 @@ class ProtocolCheck
         switch(eRequired)
         {
             case E_PRIVATE:
-                bRet = (sURL.equalsAsciiL(SPECIALPROTOCOL_PRIVATE        ,SPECIALPROTOCOL_PRIVATE.getLength()        ) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE));
                 break;
             case E_PRIVATE_OBJECT:
-                bRet = (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_OBJECT ,SPECIALPROTOCOL_PRIVATE_OBJECT.getLength() ) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE_OBJECT));
                 break;
             case E_PRIVATE_STREAM:
-                bRet = (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_STREAM ,SPECIALPROTOCOL_PRIVATE_STREAM.getLength() ) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE_STREAM));
                 break;
             case E_PRIVATE_FACTORY:
-                bRet = (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_FACTORY,SPECIALPROTOCOL_PRIVATE_FACTORY.getLength()) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE_FACTORY));
                 break;
             case E_SLOT:
-                bRet = (sURL.compareTo(SPECIALPROTOCOL_SLOT           ,SPECIALPROTOCOL_SLOT.getLength()           ) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SLOT));
                 break;
             case E_UNO:
-                bRet = (sURL.compareTo(SPECIALPROTOCOL_UNO            ,SPECIALPROTOCOL_UNO.getLength()            ) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_UNO));
                 break;
             case E_MACRO:
-                bRet = (sURL.compareTo(SPECIALPROTOCOL_MACRO          ,SPECIALPROTOCOL_MACRO.getLength()          ) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MACRO));
                 break;
             case E_SERVICE:
-                bRet = (sURL.compareTo(SPECIALPROTOCOL_SERVICE        ,SPECIALPROTOCOL_SERVICE.getLength()        ) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SERVICE));
                 break;
             case E_MAILTO:
-                bRet = (sURL.compareTo(SPECIALPROTOCOL_MAILTO         ,SPECIALPROTOCOL_MAILTO.getLength()         ) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MAILTO));
                 break;
             case E_NEWS:
-                bRet = (sURL.compareTo(SPECIALPROTOCOL_NEWS           ,SPECIALPROTOCOL_NEWS.getLength()           ) == 0);
+                bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_NEWS));
                 break;
             default:
                 bRet = sal_False;
commit 86340f0a476cb19677dcf7991cae75049fd88579
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 22 12:19:04 2011 +0100

    WaE: keep simple minded compiler happy

diff --git a/framework/inc/protocols.h b/framework/inc/protocols.h
index 88ec160..3b30a3d 100644
--- a/framework/inc/protocols.h
+++ b/framework/inc/protocols.h
@@ -135,21 +135,44 @@ class ProtocolCheck
      */
     static sal_Bool isProtocol( const ::rtl::OUString& sURL, EProtocol eRequired )
     {
+        sal_Bool bRet = sal_False;
         switch(eRequired)
         {
-            case E_PRIVATE           : return (sURL.compareTo(SPECIALPROTOCOL_PRIVATE        ,SPECIALPROTOCOL_PRIVATE.getLength()        ) == 0);
-            case E_PRIVATE_OBJECT    : return (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_OBJECT ,SPECIALPROTOCOL_PRIVATE_OBJECT.getLength() ) == 0);
-            case E_PRIVATE_STREAM    : return (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_STREAM ,SPECIALPROTOCOL_PRIVATE_STREAM.getLength() ) == 0);
-            case E_PRIVATE_FACTORY   : return (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_FACTORY,SPECIALPROTOCOL_PRIVATE_FACTORY.getLength()) == 0);
-            case E_SLOT              : return (sURL.compareTo(SPECIALPROTOCOL_SLOT           ,SPECIALPROTOCOL_SLOT.getLength()           ) == 0);
-            case E_UNO               : return (sURL.compareTo(SPECIALPROTOCOL_UNO            ,SPECIALPROTOCOL_UNO.getLength()            ) == 0);
-            case E_MACRO             : return (sURL.compareTo(SPECIALPROTOCOL_MACRO          ,SPECIALPROTOCOL_MACRO.getLength()          ) == 0);
-            case E_SERVICE           : return (sURL.compareTo(SPECIALPROTOCOL_SERVICE        ,SPECIALPROTOCOL_SERVICE.getLength()        ) == 0);
-            case E_MAILTO            : return (sURL.compareTo(SPECIALPROTOCOL_MAILTO         ,SPECIALPROTOCOL_MAILTO.getLength()         ) == 0);
-            case E_NEWS              : return (sURL.compareTo(SPECIALPROTOCOL_NEWS           ,SPECIALPROTOCOL_NEWS.getLength()           ) == 0);
-            default                  : return sal_False;
+            case E_PRIVATE:
+                bRet = (sURL.equalsAsciiL(SPECIALPROTOCOL_PRIVATE        ,SPECIALPROTOCOL_PRIVATE.getLength()        ) == 0);
+                break;
+            case E_PRIVATE_OBJECT:
+                bRet = (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_OBJECT ,SPECIALPROTOCOL_PRIVATE_OBJECT.getLength() ) == 0);
+                break;
+            case E_PRIVATE_STREAM:
+                bRet = (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_STREAM ,SPECIALPROTOCOL_PRIVATE_STREAM.getLength() ) == 0);
+                break;
+            case E_PRIVATE_FACTORY:
+                bRet = (sURL.compareTo(SPECIALPROTOCOL_PRIVATE_FACTORY,SPECIALPROTOCOL_PRIVATE_FACTORY.getLength()) == 0);
+                break;
+            case E_SLOT:
+                bRet = (sURL.compareTo(SPECIALPROTOCOL_SLOT           ,SPECIALPROTOCOL_SLOT.getLength()           ) == 0);
+                break;
+            case E_UNO:
+                bRet = (sURL.compareTo(SPECIALPROTOCOL_UNO            ,SPECIALPROTOCOL_UNO.getLength()            ) == 0);
+                break;
+            case E_MACRO:
+                bRet = (sURL.compareTo(SPECIALPROTOCOL_MACRO          ,SPECIALPROTOCOL_MACRO.getLength()          ) == 0);
+                break;
+            case E_SERVICE:
+                bRet = (sURL.compareTo(SPECIALPROTOCOL_SERVICE        ,SPECIALPROTOCOL_SERVICE.getLength()        ) == 0);
+                break;
+            case E_MAILTO:
+                bRet = (sURL.compareTo(SPECIALPROTOCOL_MAILTO         ,SPECIALPROTOCOL_MAILTO.getLength()         ) == 0);
+                break;
+            case E_NEWS:
+                bRet = (sURL.compareTo(SPECIALPROTOCOL_NEWS           ,SPECIALPROTOCOL_NEWS.getLength()           ) == 0);
+                break;
+            default:
+                bRet = sal_False;
+                break;
         }
-        return sal_False;
+        return bRet;
     }
 };
 


More information about the Libreoffice-commits mailing list