[Libreoffice-commits] core.git: 13 commits - canvas/source idlc/source include/canvas include/comphelper sc/inc sc/qa sc/source sdext/source stoc/source store/source

Stephan Bergmann sbergman at redhat.com
Wed Mar 12 08:58:24 PDT 2014


 canvas/source/cairo/cairo_canvas.hxx              |   16 ++-
 canvas/source/cairo/cairo_canvasbitmap.hxx        |   14 +--
 canvas/source/cairo/cairo_canvascustomsprite.hxx  |    6 -
 canvas/source/cairo/cairo_spritecanvas.hxx        |    2 
 canvas/source/directx/dx_canvas.hxx               |   20 ++--
 canvas/source/directx/dx_canvasbitmap.hxx         |   14 +--
 canvas/source/directx/dx_canvascustomsprite.hxx   |    6 -
 canvas/source/directx/dx_spritecanvas.hxx         |    2 
 canvas/source/opengl/ogl_canvasbitmap.hxx         |   13 +--
 canvas/source/opengl/ogl_canvascustomsprite.hxx   |    6 -
 canvas/source/opengl/ogl_spritecanvas.hxx         |    2 
 canvas/source/vcl/canvas.hxx                      |   16 ++-
 canvas/source/vcl/canvasbitmap.hxx                |   11 +-
 canvas/source/vcl/canvascustomsprite.hxx          |    4 
 canvas/source/vcl/spritecanvas.hxx                |    2 
 idlc/source/scanner.l                             |    2 
 include/canvas/base/basemutexhelper.hxx           |   66 ++++++++++++++++
 include/canvas/base/bitmapcanvasbase.hxx          |   69 +++++++++-------
 include/canvas/base/bufferedgraphicdevicebase.hxx |   22 ++---
 include/canvas/base/canvasbase.hxx                |    2 
 include/canvas/base/canvascustomspritebase.hxx    |   26 +++---
 include/canvas/base/disambiguationhelper.hxx      |   21 ++---
 include/canvas/base/graphicdevicebase.hxx         |   50 ++++++------
 include/canvas/base/integerbitmapbase.hxx         |   90 +++++++---------------
 include/canvas/base/spritecanvasbase.hxx          |   14 +--
 include/comphelper/servicedecl.hxx                |    6 -
 sc/inc/dbdata.hxx                                 |    3 
 sc/qa/unit/ucalc_formula.cxx                      |    6 +
 sc/source/core/data/formulacell.cxx               |    7 +
 sc/source/core/tool/dbdata.cxx                    |    1 
 sc/source/filter/starcalc/scflt.cxx               |    5 -
 sc/source/filter/xml/xmldrani.cxx                 |    5 -
 sc/source/ui/dbgui/dbnamdlg.cxx                   |    7 +
 sc/source/ui/docshell/dbdocfun.cxx                |    3 
 sc/source/ui/docshell/docsh5.cxx                  |    7 +
 sdext/source/minimizer/optimizerdialog.cxx        |   21 -----
 sdext/source/minimizer/optimizerdialog.hxx        |   20 ----
 stoc/source/invocation/invocation.cxx             |    5 -
 store/source/object.cxx                           |    2 
 store/source/object.hxx                           |    4 
 store/source/stordir.cxx                          |    2 
 store/source/stordir.hxx                          |    2 
 store/source/storlckb.cxx                         |    2 
 store/source/storlckb.hxx                         |    2 
 store/source/storpage.cxx                         |    2 
 store/source/storpage.hxx                         |    2 
 46 files changed, 329 insertions(+), 281 deletions(-)

New commits:
commit 2acdcb2374e448371b173feb03650d8d6db8aba2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 16:05:37 2014 +0100

    coverity#1158232 Fix ownership of NamedDBs::insert argument
    
    f70d03436b7b501e0ed1d745935a204b9b97b855 "coverity#1158232 have a stab at
    silencing warning with function markup" claimed that NamedDBs::insert always
    takes ownerhip of its argument, but boost::ptr_set::insert(std::auto_ptr<U> x)
    simply calls insert(x.release()), so only takes ownership when it returns true.
    
    ScDBDocFunc::AddDBRange (sc/source/ui/docshell/dbdocfun.cxx) relies on this
    behavior, deleting the argument when insert failed.
    
    ScDBDocFunc::RenameDBRange (sc/source/ui/docshell/dbdocfun.cxx) relied on this
    behavior, deleting the argument when insert failed, until
    f55cc330dec0dec60c755e2ce28a840c7fca1956 "Fixed the fallout of the changes in
    ScDBCollection" removed the delete (presumably in error?).  I put it back in
    now.
    
    All other uses of NamedDBs::insert ignored the return value (witnessed with
    SAL_WARN_UNUSED_RESULT).  Some are insert-if-not-found cases, where I added
    asserts now (Sc10Import::LoadDataBaseCollection,
    sc/source/filter/starcalc/scflt.cxx, is not entirely clear to me, so I added a
    TODO), while others would have potentially leaked the argument, in which cases I
    fixed the code.
    
    Change-Id: Iad40fbeb625c8ce6b0a61cbf16298d71cdc7de80

diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 78525b7..50ec53c 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -177,7 +177,8 @@ public:
         const_iterator end() const;
         ScDBData* findByIndex(sal_uInt16 nIndex);
         ScDBData* findByUpperName(const OUString& rName);
-        bool insert(ScDBData* p);
+        // Takes ownership of p iff it returns true:
+        SAL_WARN_UNUSED_RESULT bool insert(ScDBData* p);
         void erase(iterator itr);
         void erase(const ScDBData& r);
         bool empty() const;
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 69fe420..3fcc896 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -145,7 +145,11 @@ void Test::testFormulaCreateStringFromTokens()
         ScDBData* pData = new ScDBData(
             OUString::createFromAscii(
                 aDBs[i].pName), aDBs[i].nTab, aDBs[i].nCol1, aDBs[i].nRow1, aDBs[i].nCol2,aDBs[i].nRow2);
-        pDBs->getNamedDBs().insert(pData);
+        bool bInserted = pDBs->getNamedDBs().insert(pData);
+        CPPUNIT_ASSERT_MESSAGE(
+            OString(
+                "Failed to insert \"" + OString(aDBs[i].pName) + "\"").getStr(),
+            bInserted);
     }
 
     const char* aTests[] = {
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 5b23770..c500fa6 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <cassert>
+
 #include "formulacell.hxx"
 #include "grouptokenconverter.hxx"
 
@@ -379,7 +383,8 @@ void adjustDBRange(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOldD
     if (!pNewDBData)
     {
         pNewDBData = new ScDBData(*pDBData);
-        aNewNamedDBs.insert(pNewDBData);
+        bool ins = aNewNamedDBs.insert(pNewDBData);
+        assert(ins); (void)ins;
     }
     pToken->SetIndex(pNewDBData->GetIndex());
 }
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 62e3a36..e8f171f 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -683,7 +683,6 @@ ScDBData* ScDBCollection::NamedDBs::findByUpperName(const OUString& rName)
     return itr == maDBs.end() ? NULL : &(*itr);
 }
 
-// coverity[+free : arg-0]
 bool ScDBCollection::NamedDBs::insert(ScDBData* p)
 {
     SAL_WNODEPRECATED_DECLARATIONS_PUSH
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 88616d3..91bcf02 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -40,6 +40,7 @@
 #include <editeng/justifyitem.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/PasswordHelper.hxx>
+#include <cassert>
 #include <stdio.h>
 #include <math.h>
 #include <string.h>
@@ -1394,7 +1395,9 @@ void Sc10Import::LoadDataBaseCollection()
                                     ( SCROW ) pOldData->DataBaseRec.Block.y2,
                                     true,
                                     ( sal_Bool) pOldData->DataBaseRec.RowHeader );
-        pDoc->GetDBCollection()->getNamedDBs().insert(pNewData);
+        bool ins = pDoc->GetDBCollection()->getNamedDBs().insert(pNewData);
+        assert(ins); (void)ins;
+            //TODO: or can this fail (and need delete pNewData)?
     }
 }
 
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index ab7e2a6..7cb8a55 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -491,7 +491,10 @@ void ScXMLDatabaseRangeContext::EndElement()
         if (pData.get())
         {
             setAutoFilterFlags(*pDoc, *pData);
-            pDoc->GetDBCollection()->getNamedDBs().insert(pData.release());
+            if (pDoc->GetDBCollection()->getNamedDBs().insert(pData.get()))
+            {
+                pData.release();
+            }
         }
     }
 }
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index b1d01b3..ba4e781 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <cassert>
+
 #include <comphelper/string.hxx>
 #include <vcl/msgbox.hxx>
 
@@ -469,7 +473,8 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl)
                     pNewEntry->SetKeepFmt( m_pBtnKeepFmt->IsChecked() );
                     pNewEntry->SetStripData( m_pBtnStripData->IsChecked() );
 
-                    aLocalDbCol.getNamedDBs().insert(pNewEntry);
+                    bool ins = aLocalDbCol.getNamedDBs().insert(pNewEntry);
+                    assert(ins); (void)ins;
                 }
 
                 UpdateNames();
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 8a590db..1698b62 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -167,7 +167,10 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew )
         rDBs.erase(*pOld);
         bool bInserted = rDBs.insert(pNewData);
         if (!bInserted)                             // Fehler -> alten Zustand wiederherstellen
+        {
+            delete pNewData;
             pDoc->SetDBCollection(pUndoColl);       // gehoert dann dem Dokument
+        }
 
         pDoc->CompileDBFormula( false );            // CompileFormulaString
 
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 0366dcc..f3c9f39 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <cassert>
+
 #include "scitems.hxx"
 #include <vcl/msgbox.hxx>
 #include <vcl/waitobj.hxx>
@@ -274,7 +278,8 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
                 pNoNameData = new ScDBData( aNewName, nTab,
                                 nStartCol,nStartRow, nEndCol,nEndRow,
                                 true, bHasHeader );
-                rDBs.insert(pNoNameData);
+                bool ins = rDBs.insert(pNoNameData);
+                assert(ins); (void)ins;
             }
             else
             {
commit 54b4add66698f94e875379bcfc6c76b72488fd7b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 14:54:30 2014 +0100

    Remove unused HelpCloseListener
    
    Change-Id: I9040a1262b31f8d0f19594b6efcf12b2c38be7be

diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index cf93265..3954851 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -756,25 +756,4 @@ void SpinListenerFormattedField0Pg1::disposing( const ::com::sun::star::lang::Ev
 {
 }
 
-
-
-void HelpCloseListener::addCloseListener( const Reference < XCloseListener >& ) throw( RuntimeException )
-{
-}
-void HelpCloseListener::removeCloseListener( const Reference < XCloseListener >& ) throw( RuntimeException )
-{
-}
-void HelpCloseListener::queryClosing( const EventObject&, sal_Bool /* bDeliverOwnership */ )
-        throw ( RuntimeException, CloseVetoException, std::exception )
-{
-}
-void HelpCloseListener::notifyClosing( const EventObject& )
-        throw ( RuntimeException, std::exception )
-{
-}
-void HelpCloseListener::disposing( const EventObject& ) throw ( RuntimeException, std::exception )
-{
-    mrXFrame = NULL;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sdext/source/minimizer/optimizerdialog.hxx b/sdext/source/minimizer/optimizerdialog.hxx
index b77400c..e69d4ec 100644
--- a/sdext/source/minimizer/optimizerdialog.hxx
+++ b/sdext/source/minimizer/optimizerdialog.hxx
@@ -37,7 +37,6 @@
 #include <com/sun/star/view/XSelectionSupplier.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/awt/XItemEventBroadcaster.hpp>
-#include <com/sun/star/util/XCloseListener.hpp>
 #include <com/sun/star/frame/XStorable.hpp>
 #include <com/sun/star/frame/XDispatch.hpp>
 #include <com/sun/star/frame/XDesktop.hpp>
@@ -214,25 +213,6 @@ private:
     OptimizerDialog& mrOptimizerDialog;
 };
 
-
-
-class HelpCloseListener : public ::cppu::WeakImplHelper1< com::sun::star::util::XCloseListener >
-{
-public:
-    HelpCloseListener( com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rXFrame ) : mrXFrame( rXFrame ){};
-
-    virtual void SAL_CALL addCloseListener(const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& ) throw( com::sun::star::uno::RuntimeException );
-    virtual void SAL_CALL removeCloseListener( const com::sun::star::uno::Reference < com::sun::star::util::XCloseListener >& xListener ) throw( com::sun::star::uno::RuntimeException );
-    virtual void SAL_CALL notifyClosing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException, std::exception) ;
-    virtual void SAL_CALL queryClosing( const com::sun::star::lang::EventObject& aEvent, sal_Bool bDeliverOwnership ) throw (com::sun::star::uno::RuntimeException, com::sun::star::util::CloseVetoException, std::exception) ;
-    virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& aEvent ) throw (com::sun::star::uno::RuntimeException, std::exception) ;
-
-private:
-
-    com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& mrXFrame;
-};
-
-
 #endif // INCLUDED_SDEXT_SOURCE_MINIMIZER_OPTIMIZERDIALOG_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0a87796793619a7c86adabc0060f224bafc157d0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 13:23:31 2014 +0100

    No need for Invocation_Impl::setMaterial to be virtual
    
    Change-Id: I5f78d97bcd55c0db71d7c5e3383678586c2cf392

diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 8db2783..91305d6 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -118,9 +118,6 @@ public:
     // Methoden von XMaterialHolder
     virtual Any         SAL_CALL getMaterial(void) throw(RuntimeException, std::exception);
 
-    // ? XTool
-    virtual void        SAL_CALL setMaterial( const Any& rMaterial );
-
     // XInvocation
     virtual Reference<XIntrospectionAccess> SAL_CALL getIntrospection(void) throw( RuntimeException, std::exception );
     virtual Any SAL_CALL invoke(const OUString& FunctionName, const Sequence< Any >& Params, Sequence< sal_Int16 >& OutParamIndex, Sequence< Any >& OutParam)
@@ -203,6 +200,8 @@ public:
 
 
 private:
+    void setMaterial( const Any& rMaterial );
+
     void getInfoSequenceImpl( Sequence< OUString >* pStringSeq, Sequence< InvocationInfo >* pInfoSeq );
     void fillInfoForNameAccess( InvocationInfo& rInfo, const OUString& aName );
     void fillInfoForProperty( InvocationInfo& rInfo, const Property& rProp );
commit a52c42ae055926fe038625a79030be2be4cead8f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 13:14:56 2014 +0100

    loplugin:literaltoboolconversion
    
    Change-Id: I513aeeabbb4d6fc48b6a95e034c311a454dd5ca7

diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l
index aca443f..aa306a9 100644
--- a/idlc/source/scanner.l
+++ b/idlc/source/scanner.l
@@ -205,7 +205,7 @@ static void parseLineAndFile(sal_Char* pBuf)
 {
 	sal_Char	*r = pBuf;
 	sal_Char    *h;
-	bool	bIsInMain = sal_False;
+	bool	bIsInMain = false;
 
 	/* Skip initial '#' */
 	if (*r != '#')
commit a3066dd78ce83c0302f70b250cc6eeb0c7eaf30c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 13:07:30 2014 +0100

    No need for isKindOf to be SAL_CALL
    
    Change-Id: Ia58af7d32904de01fdb5291203938c748cae94c6

diff --git a/store/source/object.cxx b/store/source/object.cxx
index eb56b3d..1cac71d 100644
--- a/store/source/object.cxx
+++ b/store/source/object.cxx
@@ -70,7 +70,7 @@ void OStoreObject::operator delete (void *p)
 /*
  * isKindOf.
  */
-bool SAL_CALL OStoreObject::isKindOf (sal_uInt32 nTypeId)
+bool OStoreObject::isKindOf (sal_uInt32 nTypeId)
 {
     return (nTypeId == m_nTypeId);
 }
diff --git a/store/source/object.hxx b/store/source/object.hxx
index 04a4742..a6835bd 100644
--- a/store/source/object.hxx
+++ b/store/source/object.hxx
@@ -39,7 +39,7 @@ class IStoreHandle : public rtl::IReference
 public:
     /** Replaces dynamic_cast type checking.
      */
-    virtual bool SAL_CALL isKindOf (sal_uInt32 nTypeId) = 0;
+    virtual bool isKindOf (sal_uInt32 nTypeId) = 0;
 
 protected:
     ~IStoreHandle() {}
@@ -75,7 +75,7 @@ public:
 
     /** IStoreHandle.
      */
-    virtual bool SAL_CALL isKindOf (sal_uInt32 nTypeId);
+    virtual bool isKindOf (sal_uInt32 nTypeId) SAL_OVERRIDE;
 
     /** IReference.
      */
diff --git a/store/source/stordir.cxx b/store/source/stordir.cxx
index 96bc1ca..c319b9a 100644
--- a/store/source/stordir.cxx
+++ b/store/source/stordir.cxx
@@ -91,7 +91,7 @@ OStoreDirectory_Impl::~OStoreDirectory_Impl (void)
 /*
  * isKindOf.
  */
-bool SAL_CALL OStoreDirectory_Impl::isKindOf (sal_uInt32 nTypeId)
+bool OStoreDirectory_Impl::isKindOf (sal_uInt32 nTypeId)
 {
     return (nTypeId == m_nTypeId);
 }
diff --git a/store/source/stordir.hxx b/store/source/stordir.hxx
index 0a4a036..97c3afa 100644
--- a/store/source/stordir.hxx
+++ b/store/source/stordir.hxx
@@ -70,7 +70,7 @@ public:
 
     /** IStoreHandle.
      */
-    virtual bool SAL_CALL isKindOf (sal_uInt32 nTypeId);
+    virtual bool isKindOf (sal_uInt32 nTypeId) SAL_OVERRIDE;
 
 protected:
     /** Destruction.
diff --git a/store/source/storlckb.cxx b/store/source/storlckb.cxx
index 29cfd84..986e049 100644
--- a/store/source/storlckb.cxx
+++ b/store/source/storlckb.cxx
@@ -65,7 +65,7 @@ OStoreLockBytes::~OStoreLockBytes (void)
 /*
  * isKindOf.
  */
-bool SAL_CALL OStoreLockBytes::isKindOf (sal_uInt32 nTypeId)
+bool OStoreLockBytes::isKindOf (sal_uInt32 nTypeId)
 {
     return (nTypeId == m_nTypeId);
 }
diff --git a/store/source/storlckb.hxx b/store/source/storlckb.hxx
index d5b1e40..416176f 100644
--- a/store/source/storlckb.hxx
+++ b/store/source/storlckb.hxx
@@ -105,7 +105,7 @@ public:
 
     /** IStoreHandle.
      */
-    virtual bool SAL_CALL isKindOf (sal_uInt32 nMagic);
+    virtual bool isKindOf (sal_uInt32 nMagic) SAL_OVERRIDE;
 
 protected:
     /** Destruction (OReference).
diff --git a/store/source/storpage.cxx b/store/source/storpage.cxx
index fa5abde..2d222fd 100644
--- a/store/source/storpage.cxx
+++ b/store/source/storpage.cxx
@@ -60,7 +60,7 @@ OStorePageManager::~OStorePageManager (void)
 /*
  * isKindOf.
  */
-bool SAL_CALL OStorePageManager::isKindOf (sal_uInt32 nTypeId)
+bool OStorePageManager::isKindOf (sal_uInt32 nTypeId)
 {
     return (nTypeId == m_nTypeId);
 }
diff --git a/store/source/storpage.hxx b/store/source/storpage.hxx
index 384a1b9..6dc579e 100644
--- a/store/source/storpage.hxx
+++ b/store/source/storpage.hxx
@@ -130,7 +130,7 @@ public:
 
     /** IStoreHandle.
      */
-    virtual bool SAL_CALL isKindOf (sal_uInt32 nTypeId);
+    virtual bool isKindOf (sal_uInt32 nTypeId) SAL_OVERRIDE;
 
 protected:
     /** Destruction.
commit 3228e1f7dfe5956461ab05e529012d4bd6137ca5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 12:47:14 2014 +0100

    Mark overriding OwnServiceImpl class template member functions as SAL_OVERRIDE
    
    Change-Id: I767c60733b39de02935de8be8dd9d3e351a38cab

diff --git a/include/comphelper/servicedecl.hxx b/include/comphelper/servicedecl.hxx
index 894a57a..436bb74 100644
--- a/include/comphelper/servicedecl.hxx
+++ b/include/comphelper/servicedecl.hxx
@@ -166,15 +166,15 @@ public:
 
     // XServiceInfo
     virtual OUString SAL_CALL getImplementationName()
-        throw (css::uno::RuntimeException) {
+        throw (css::uno::RuntimeException) SAL_OVERRIDE {
         return m_rServiceDecl.getImplementationName();
     }
     virtual sal_Bool SAL_CALL supportsService( OUString const& name )
-        throw (css::uno::RuntimeException) {
+        throw (css::uno::RuntimeException) SAL_OVERRIDE {
         return m_rServiceDecl.supportsService(name);
     }
     virtual css::uno::Sequence< OUString>
-    SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) {
+    SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) SAL_OVERRIDE {
         return m_rServiceDecl.getSupportedServiceNames();
     }
 
commit 4b60d33f88480c2e3a092a678a12669ff8a25d3b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 12:17:07 2014 +0100

    Mark overriding CanvasCustomSpriteBase class template mem funs as SAL_OVERRIDE
    
    Change-Id: I6c64d1b1caae27a1e1eac3a743aec078bc652d96

diff --git a/include/canvas/base/canvascustomspritebase.hxx b/include/canvas/base/canvascustomspritebase.hxx
index 8caa258..e0ff272 100644
--- a/include/canvas/base/canvascustomspritebase.hxx
+++ b/include/canvas/base/canvascustomspritebase.hxx
@@ -105,7 +105,7 @@ namespace canvas
         }
 
         // XCanvas: selectively override base's methods here, for opacity tracking
-        virtual void SAL_CALL clear() throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL clear() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
@@ -119,7 +119,7 @@ namespace canvas
             drawBitmap( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >& xBitmap,
                         const ::com::sun::star::rendering::ViewState&                                   viewState,
                         const ::com::sun::star::rendering::RenderState&                                 renderState ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                             ::com::sun::star::uno::RuntimeException)
+                                                                                                                             ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(xBitmap, viewState, renderState,
                               BOOST_CURRENT_FUNCTION,
@@ -144,7 +144,7 @@ namespace canvas
 
         // XSprite
         virtual void SAL_CALL setAlpha( double alpha ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                              ::com::sun::star::uno::RuntimeException)
+                                                              ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyRange( alpha, 0.0, 1.0 );
 
@@ -156,7 +156,7 @@ namespace canvas
         virtual void SAL_CALL move( const ::com::sun::star::geometry::RealPoint2D&  aNewPos,
                                     const ::com::sun::star::rendering::ViewState&   viewState,
                                     const ::com::sun::star::rendering::RenderState& renderState ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                         ::com::sun::star::uno::RuntimeException)
+                                                                                                         ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(aNewPos, viewState, renderState,
                               BOOST_CURRENT_FUNCTION,
@@ -168,7 +168,7 @@ namespace canvas
         }
 
         virtual void SAL_CALL transform( const ::com::sun::star::geometry::AffineMatrix2D& aTransformation ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                    ::com::sun::star::uno::RuntimeException)
+                                                                                                                    ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(aTransformation,
                               BOOST_CURRENT_FUNCTION,
@@ -179,7 +179,7 @@ namespace canvas
             maSpriteHelper.transform( this, aTransformation );
         }
 
-        virtual void SAL_CALL clip( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& aClip ) throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL clip( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& aClip ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             // NULL xClip explicitly allowed here (to clear clipping)
 
@@ -188,21 +188,21 @@ namespace canvas
             maSpriteHelper.clip( this, aClip );
         }
 
-        virtual void SAL_CALL setPriority( double nPriority ) throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL setPriority( double nPriority ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
             maSpriteHelper.setPriority( this, nPriority );
         }
 
-        virtual void SAL_CALL show() throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL show() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
             maSpriteHelper.show( this );
         }
 
-        virtual void SAL_CALL hide() throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL hide() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
@@ -211,7 +211,7 @@ namespace canvas
 
         // XCustomSprite
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas > SAL_CALL
-            getContentCanvas() throw (::com::sun::star::uno::RuntimeException)
+            getContentCanvas() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
commit e40ceb8111746fbe641ea84a84d575f3f06b240a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 12:11:59 2014 +0100

    Mark overriding BufferedGraphicDeviceBase class templ mem funs as SAL_OVERRIDE
    
    Change-Id: I707fea8100c686ab8232eaf6e4d9a348abdb5236

diff --git a/include/canvas/base/bufferedgraphicdevicebase.hxx b/include/canvas/base/bufferedgraphicdevicebase.hxx
index f7ba97c..683cf43 100644
--- a/include/canvas/base/bufferedgraphicdevicebase.hxx
+++ b/include/canvas/base/bufferedgraphicdevicebase.hxx
@@ -94,14 +94,14 @@ namespace canvas
         }
 
         // XGraphicDevice
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBufferController > SAL_CALL getBufferController(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBufferController > SAL_CALL getBufferController(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             return this;
         }
 
         // XBufferController
         virtual ::sal_Int32 SAL_CALL createBuffers( ::sal_Int32 nBuffers ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                  ::com::sun::star::uno::RuntimeException)
+                                                                                  ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyRange( nBuffers, (sal_Int32)1 );
 
@@ -110,7 +110,7 @@ namespace canvas
             return BaseType::maDeviceHelper.createBuffers( nBuffers );
         }
 
-        virtual void SAL_CALL destroyBuffers(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL destroyBuffers(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
@@ -119,14 +119,14 @@ namespace canvas
 
         virtual ::sal_Bool SAL_CALL showBuffer( ::sal_Bool bUpdateAll )
             throw (::com::sun::star::uno::RuntimeException,
-                   std::exception)
+                   std::exception) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
             return BaseType::maDeviceHelper.showBuffer( mbIsVisible, bUpdateAll );
         }
 
-        virtual ::sal_Bool SAL_CALL switchBuffer( ::sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::sal_Bool SAL_CALL switchBuffer( ::sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
@@ -234,24 +234,24 @@ namespace canvas
             BaseType::disposeEventSource(Source);
         }
 
-        virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL windowResized( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             boundsChanged( e );
         }
 
-        virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL windowMoved( const ::com::sun::star::awt::WindowEvent& e ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             boundsChanged( e );
         }
 
-        virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
             mbIsVisible = true;
         }
 
-        virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
commit 288a6d8901803231c2d562b2cc5201ddf67f1a15
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 12:06:45 2014 +0100

    Mark overriding GraphicDeviceBase class template member funs as SAL_OVERRIDE
    
    Change-Id: Idfac26bb0f436799c3431062238e46b1a50d9f14

diff --git a/include/canvas/base/graphicdevicebase.hxx b/include/canvas/base/graphicdevicebase.hxx
index 69a4c2f..e9e3c83 100644
--- a/include/canvas/base/graphicdevicebase.hxx
+++ b/include/canvas/base/graphicdevicebase.hxx
@@ -147,40 +147,40 @@ namespace canvas
         }
 
         // XGraphicDevice
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBufferController > SAL_CALL getBufferController(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBufferController > SAL_CALL getBufferController(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             return ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBufferController >();
         }
 
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace > SAL_CALL getDeviceColorSpace(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace > SAL_CALL getDeviceColorSpace(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
             return maDeviceHelper.getColorSpace();
         }
 
-        virtual ::com::sun::star::geometry::RealSize2D SAL_CALL getPhysicalResolution(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::geometry::RealSize2D SAL_CALL getPhysicalResolution(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
             return maDeviceHelper.getPhysicalResolution();
         }
 
-        virtual ::com::sun::star::geometry::RealSize2D SAL_CALL getPhysicalSize(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::geometry::RealSize2D SAL_CALL getPhysicalSize(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
             return maDeviceHelper.getPhysicalSize();
         }
 
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XLinePolyPolygon2D > SAL_CALL createCompatibleLinePolyPolygon( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& points ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XLinePolyPolygon2D > SAL_CALL createCompatibleLinePolyPolygon( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& points ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
             return maDeviceHelper.createCompatibleLinePolyPolygon( this, points );
         }
 
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBezierPolyPolygon2D > SAL_CALL createCompatibleBezierPolyPolygon( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& points ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBezierPolyPolygon2D > SAL_CALL createCompatibleBezierPolyPolygon( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& points ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
@@ -188,7 +188,7 @@ namespace canvas
         }
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > SAL_CALL createCompatibleBitmap( const ::com::sun::star::geometry::IntegerSize2D& size ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                                                                                         ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                                         ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyBitmapSize(size,
                                     BOOST_CURRENT_FUNCTION,
@@ -200,7 +200,7 @@ namespace canvas
         }
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > SAL_CALL createVolatileBitmap( const ::com::sun::star::geometry::IntegerSize2D& size ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                                                                                               ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                                               ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyBitmapSize(size,
                                     BOOST_CURRENT_FUNCTION,
@@ -212,7 +212,7 @@ namespace canvas
         }
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > SAL_CALL createCompatibleAlphaBitmap( const ::com::sun::star::geometry::IntegerSize2D& size ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                                                                                              ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                                              ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyBitmapSize(size,
                                     BOOST_CURRENT_FUNCTION,
@@ -224,7 +224,7 @@ namespace canvas
         }
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > SAL_CALL createVolatileAlphaBitmap( const ::com::sun::star::geometry::IntegerSize2D& size ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                                                                                                    ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                                                    ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyBitmapSize(size,
                                     BOOST_CURRENT_FUNCTION,
@@ -235,19 +235,19 @@ namespace canvas
             return maDeviceHelper.createVolatileAlphaBitmap( this, size );
         }
 
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL getParametricPolyPolygonFactory(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL getParametricPolyPolygonFactory(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             return this;
         }
 
-        virtual ::sal_Bool SAL_CALL hasFullScreenMode(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::sal_Bool SAL_CALL hasFullScreenMode(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
             return maDeviceHelper.hasFullScreenMode();
         }
 
-        virtual ::sal_Bool SAL_CALL enterFullScreenMode( ::sal_Bool bEnter ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::sal_Bool SAL_CALL enterFullScreenMode( ::sal_Bool bEnter ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
@@ -255,7 +255,7 @@ namespace canvas
         }
 
         // XMultiServiceFactory
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const OUString& aServiceSpecifier ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             return ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XParametricPolyPolygon2D >(
                 ParametricPolyPolygon::create(this,
@@ -263,7 +263,7 @@ namespace canvas
                                               ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >()));
         }
 
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString& aServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString& aServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             return ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XParametricPolyPolygon2D >(
                 ParametricPolyPolygon::create(this,
@@ -271,14 +271,14 @@ namespace canvas
                                               Arguments));
         }
 
-        virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             return ParametricPolyPolygon::getAvailableServiceNames();
         }
 
 
         // XUpdatable
-        virtual void SAL_CALL update() throw (com::sun::star::uno::RuntimeException)
+        virtual void SAL_CALL update() throw (com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
@@ -288,7 +288,7 @@ namespace canvas
 
 
         // XPropertySet
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
             return maPropHelper.getPropertySetInfo();
@@ -299,7 +299,7 @@ namespace canvas
                                                                                                   ::com::sun::star::beans::PropertyVetoException,
                                                                                                   ::com::sun::star::lang::IllegalArgumentException,
                                                                                                   ::com::sun::star::lang::WrappedTargetException,
-                                                                                                  ::com::sun::star::uno::RuntimeException)
+                                                                                                  ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
             maPropHelper.setPropertyValue( aPropertyName, aValue );
@@ -307,7 +307,7 @@ namespace canvas
 
         virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException,
                                                                                                                     ::com::sun::star::lang::WrappedTargetException,
-                                                                                                                    ::com::sun::star::uno::RuntimeException)
+                                                                                                                    ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
             return maPropHelper.getPropertyValue( aPropertyName );
@@ -316,7 +316,7 @@ namespace canvas
         virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
                                                          const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException,
                                                                                                                                                                         ::com::sun::star::lang::WrappedTargetException,
-                                                                                                                                                                        ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                        ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
             maPropHelper.addPropertyChangeListener( aPropertyName,
@@ -326,7 +326,7 @@ namespace canvas
         virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
                                                             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException,
                                                                                                                                                                            ::com::sun::star::lang::WrappedTargetException,
-                                                                                                                                                                           ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                           ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
             maPropHelper.removePropertyChangeListener( aPropertyName,
@@ -336,7 +336,7 @@ namespace canvas
         virtual void SAL_CALL addVetoableChangeListener( const OUString& aPropertyName,
                                                          const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException,
                                                                                                                                                                         ::com::sun::star::lang::WrappedTargetException,
-                                                                                                                                                                        ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                        ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
             maPropHelper.addVetoableChangeListener( aPropertyName,
@@ -346,7 +346,7 @@ namespace canvas
         virtual void SAL_CALL removeVetoableChangeListener( const OUString& aPropertyName,
                                                             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException,
                                                                                                                                                                            ::com::sun::star::lang::WrappedTargetException,
-                                                                                                                                                                           ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                           ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
             maPropHelper.removeVetoableChangeListener( aPropertyName,
commit 268be3ac88bd9572b2402ecdb7bed04038fe6999
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 11:48:17 2014 +0100

    Mark overriding DisambiguationHelper class template mem funs as SAL_OVERRIDE
    
    ...which reveals that some uses are not derived from XEventListener, so re-
    introduce BaseMutexHelper as an alternative (which originally got superseded by
    DisambiguationHelper in 09b546cf9c1d0d9f78066e70a0348c7678cdcb14 "Fix
    overloaded-virtual warning in canvas").
    
    Change-Id: I1418370733b72526ec481b70fa69f03e7c28b7ce

diff --git a/canvas/source/cairo/cairo_canvas.hxx b/canvas/source/cairo/cairo_canvas.hxx
index 945bf5f..96eb1e7 100644
--- a/canvas/source/cairo/cairo_canvas.hxx
+++ b/canvas/source/cairo/cairo_canvas.hxx
@@ -38,7 +38,7 @@
 #include <comphelper/uno3.hxx>
 
 #include <canvas/base/spritecanvasbase.hxx>
-#include <canvas/base/disambiguationhelper.hxx>
+#include <canvas/base/basemutexhelper.hxx>
 #include <canvas/base/bufferedgraphicdevicebase.hxx>
 
 #include <basegfx/vector/b2isize.hxx>
@@ -60,7 +60,7 @@ namespace cairocanvas
                                                 ::com::sun::star::util::XUpdatable,
                                                 ::com::sun::star::beans::XPropertySet,
                                                 ::com::sun::star::lang::XServiceName >  GraphicDeviceBase_Base;
-    typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase_Base >,
+    typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
                                                  DeviceHelper,
                                                  ::osl::MutexGuard,
                                                  ::cppu::OWeakObject > CanvasBase_Base;
@@ -116,7 +116,7 @@ namespace cairocanvas
         ~Canvas();
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx
index f67a955..1f074cf 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.hxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.hxx
@@ -32,6 +32,7 @@
 
 #include <boost/shared_ptr.hpp>
 
+#include <canvas/base/basemutexhelper.hxx>
 #include <canvas/base/integerbitmapbase.hxx>
 
 #include "cairo_cairo.hxx"
@@ -49,7 +50,7 @@ namespace cairocanvas
                                               ::com::sun::star::lang::XServiceInfo,
                                               ::com::sun::star::beans::XFastPropertySet >   CanvasBitmapBase_Base;
     class CanvasBitmapSpriteSurface_Base :
-        public ::canvas::DisambiguationHelper<CanvasBitmapBase_Base>,
+        public ::canvas::BaseMutexHelper<CanvasBitmapBase_Base>,
         public SurfaceProvider
     {
     };
@@ -79,7 +80,7 @@ namespace cairocanvas
                       bool                      bHasAlpha );
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.hxx b/canvas/source/cairo/cairo_canvascustomsprite.hxx
index 65e0040..5a32488 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.hxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.hxx
@@ -33,7 +33,7 @@
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 
-#include <canvas/base/disambiguationhelper.hxx>
+#include <canvas/base/basemutexhelper.hxx>
 #include <canvas/base/canvascustomspritebase.hxx>
 
 #include "cairo_sprite.hxx"
@@ -67,7 +67,7 @@ namespace cairocanvas
         remain a base class that provides implementation, not to
         enforce any specific interface on its derivees.
      */
-    class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
+    class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
                                                  public Sprite,
                                               public SurfaceProvider
     {
@@ -102,7 +102,7 @@ namespace cairocanvas
         CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D&   rSpriteSize,
                             const SpriteCanvasRef&                          rRefDevice );
 
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/canvas/source/cairo/cairo_spritecanvas.hxx b/canvas/source/cairo/cairo_spritecanvas.hxx
index 6869881..95ff09f 100644
--- a/canvas/source/cairo/cairo_spritecanvas.hxx
+++ b/canvas/source/cairo/cairo_spritecanvas.hxx
@@ -113,7 +113,7 @@ namespace cairocanvas
         void initialize();
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/canvas/source/directx/dx_canvas.hxx b/canvas/source/directx/dx_canvas.hxx
index cf4e7ad..5467c2d 100644
--- a/canvas/source/directx/dx_canvas.hxx
+++ b/canvas/source/directx/dx_canvas.hxx
@@ -36,7 +36,7 @@
 #include <comphelper/uno3.hxx>
 
 #include <canvas/base/integerbitmapbase.hxx>
-#include <canvas/base/disambiguationhelper.hxx>
+#include <canvas/base/basemutexhelper.hxx>
 #include <canvas/base/graphicdevicebase.hxx>
 
 #include "dx_bitmapprovider.hxx"
@@ -54,7 +54,7 @@ namespace dxcanvas
                                               ::com::sun::star::util::XUpdatable,
                                               ::com::sun::star::beans::XPropertySet,
                                               ::com::sun::star::lang::XServiceName >    GraphicDeviceBase1_Base;
-    typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase1_Base >,
+    typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase1_Base >,
                                            DeviceHelper,
                                            ::osl::MutexGuard,
                                            ::cppu::OWeakObject >    CanvasBase1_Base;
@@ -83,7 +83,7 @@ namespace dxcanvas
         void initialize();
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
@@ -111,7 +111,7 @@ namespace dxcanvas
                                               ::com::sun::star::util::XUpdatable,
                                               ::com::sun::star::beans::XPropertySet,
                                               ::com::sun::star::lang::XServiceName >    GraphicDeviceBase2_Base;
-    typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase2_Base >,
+    typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase2_Base >,
                                            DeviceHelper,
                                            ::osl::MutexGuard,
                                            ::cppu::OWeakObject >    CanvasBase2_Base;
@@ -142,7 +142,7 @@ namespace dxcanvas
         void initialize();
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/canvas/source/directx/dx_canvasbitmap.hxx b/canvas/source/directx/dx_canvasbitmap.hxx
index bffcf1f..680848d 100644
--- a/canvas/source/directx/dx_canvasbitmap.hxx
+++ b/canvas/source/directx/dx_canvasbitmap.hxx
@@ -33,7 +33,7 @@
 
 #include <cppuhelper/compbase3.hxx>
 #include <comphelper/uno3.hxx>
-#include <canvas/base/disambiguationhelper.hxx>
+#include <canvas/base/basemutexhelper.hxx>
 #include <canvas/base/integerbitmapbase.hxx>
 
 #include "dx_bitmapprovider.hxx"
@@ -53,7 +53,7 @@ namespace dxcanvas
                                                ::com::sun::star::beans::XFastPropertySet >      CanvasBitmapBase_Base;
     typedef ::canvas::IntegerBitmapBase<
         canvas::BitmapCanvasBase2<
-            ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
+            ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
             BitmapCanvasHelper,
             ::osl::MutexGuard,
             ::cppu::OWeakObject> > CanvasBitmap_Base;
@@ -73,7 +73,7 @@ namespace dxcanvas
                       const DeviceRef&        rDevice );
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // XServiceInfo
         virtual OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/canvas/source/directx/dx_canvascustomsprite.hxx b/canvas/source/directx/dx_canvascustomsprite.hxx
index ec25ab1..ad94a90 100644
--- a/canvas/source/directx/dx_canvascustomsprite.hxx
+++ b/canvas/source/directx/dx_canvascustomsprite.hxx
@@ -33,7 +33,7 @@
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 
-#include <canvas/base/disambiguationhelper.hxx>
+#include <canvas/base/basemutexhelper.hxx>
 #include <canvas/base/canvascustomspritebase.hxx>
 
 #include "dx_sprite.hxx"
@@ -66,7 +66,7 @@ namespace dxcanvas
         remain a base class that provides implementation, not to
         enforce any specific interface on its derivees.
      */
-    class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
+    class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
                                                  public Sprite
     {
     };
@@ -102,7 +102,7 @@ namespace dxcanvas
                             const ::canvas::ISurfaceProxyManagerSharedPtr&  rSurfaceProxy,
                             bool                                            bShowSpriteBounds );
 
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/canvas/source/directx/dx_spritecanvas.hxx b/canvas/source/directx/dx_spritecanvas.hxx
index 18966f1..8bf7f59 100644
--- a/canvas/source/directx/dx_spritecanvas.hxx
+++ b/canvas/source/directx/dx_spritecanvas.hxx
@@ -108,7 +108,7 @@ namespace dxcanvas
         void initialize();
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/canvas/source/opengl/ogl_canvasbitmap.hxx b/canvas/source/opengl/ogl_canvasbitmap.hxx
index bdb624d..534837a 100644
--- a/canvas/source/opengl/ogl_canvasbitmap.hxx
+++ b/canvas/source/opengl/ogl_canvasbitmap.hxx
@@ -16,7 +16,7 @@
 #include <com/sun/star/rendering/XIntegerBitmap.hpp>
 
 #include <canvas/base/integerbitmapbase.hxx>
-#include <canvas/base/disambiguationhelper.hxx>
+#include <canvas/base/basemutexhelper.hxx>
 #include <basegfx/vector/b2isize.hxx>
 
 #include <boost/shared_ptr.hpp>
@@ -33,7 +33,7 @@ namespace oglcanvas
                                               ::com::sun::star::rendering::XIntegerBitmap > CanvasBitmapBase_Base;
     typedef ::canvas::IntegerBitmapBase<
         canvas::BitmapCanvasBase2<
-            ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
+            ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
             BitmapCanvasHelper,
             ::osl::MutexGuard,
             ::cppu::OWeakObject> > CanvasBitmapBaseT;
@@ -59,7 +59,7 @@ namespace oglcanvas
         CanvasBitmap( const CanvasBitmap& rSrc );
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         /** Write out recorded actions
          */
diff --git a/canvas/source/opengl/ogl_canvascustomsprite.hxx b/canvas/source/opengl/ogl_canvascustomsprite.hxx
index 8d9721e..161dfc0 100644
--- a/canvas/source/opengl/ogl_canvascustomsprite.hxx
+++ b/canvas/source/opengl/ogl_canvascustomsprite.hxx
@@ -21,7 +21,7 @@
 #include <basegfx/vector/b2isize.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 
-#include <canvas/base/disambiguationhelper.hxx>
+#include <canvas/base/basemutexhelper.hxx>
 
 #include "ogl_spritecanvas.hxx"
 #include "ogl_canvashelper.hxx"
@@ -32,7 +32,7 @@ namespace oglcanvas
     typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::rendering::XCustomSprite,
                                               ::com::sun::star::rendering::XCanvas > CanvasCustomSpriteBase_Base;
     typedef ::canvas::CanvasBase<
-         ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
+         ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
          CanvasHelper,
          ::osl::MutexGuard,
          ::cppu::OWeakObject >                          CanvasCustomSpriteBaseT;
@@ -60,7 +60,7 @@ namespace oglcanvas
                             const SpriteCanvasRef&                          rRefDevice,
                             SpriteDeviceHelper&                             rDeviceHelper );
 
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // XSprite
         virtual void SAL_CALL setAlpha( double alpha ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception);
diff --git a/canvas/source/opengl/ogl_spritecanvas.hxx b/canvas/source/opengl/ogl_spritecanvas.hxx
index f59bc8b..f657c26 100644
--- a/canvas/source/opengl/ogl_spritecanvas.hxx
+++ b/canvas/source/opengl/ogl_spritecanvas.hxx
@@ -75,7 +75,7 @@ namespace oglcanvas
         void initialize();
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/canvas/source/vcl/canvas.hxx b/canvas/source/vcl/canvas.hxx
index 95dc329..1f005c4 100644
--- a/canvas/source/vcl/canvas.hxx
+++ b/canvas/source/vcl/canvas.hxx
@@ -34,7 +34,7 @@
 #include <cppuhelper/compbase7.hxx>
 #include <comphelper/uno3.hxx>
 
-#include <canvas/base/disambiguationhelper.hxx>
+#include <canvas/base/basemutexhelper.hxx>
 #include <canvas/base/integerbitmapbase.hxx>
 #include <canvas/base/graphicdevicebase.hxx>
 
@@ -55,7 +55,7 @@ namespace vclcanvas
                                               ::com::sun::star::util::XUpdatable,
                                               ::com::sun::star::beans::XPropertySet,
                                               ::com::sun::star::lang::XServiceName >    GraphicDeviceBase_Base;
-    typedef ::canvas::GraphicDeviceBase< ::canvas::DisambiguationHelper< GraphicDeviceBase_Base >,
+    typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
                                            DeviceHelper,
                                            tools::LocalGuard,
                                            ::cppu::OWeakObject >    CanvasBase_Base;
@@ -90,7 +90,7 @@ namespace vclcanvas
         ~Canvas();
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/canvas/source/vcl/canvasbitmap.hxx b/canvas/source/vcl/canvasbitmap.hxx
index 8cf013c..2f2988f 100644
--- a/canvas/source/vcl/canvasbitmap.hxx
+++ b/canvas/source/vcl/canvasbitmap.hxx
@@ -32,6 +32,7 @@
 
 #include <canvas/vclwrapper.hxx>
 
+#include <canvas/base/basemutexhelper.hxx>
 #include <canvas/base/integerbitmapbase.hxx>
 #include <canvasbitmaphelper.hxx>
 
@@ -50,7 +51,7 @@ namespace vclcanvas
                                              ::com::sun::star::beans::XFastPropertySet >    CanvasBitmapBase_Base;
     typedef ::canvas::IntegerBitmapBase<
         canvas::BitmapCanvasBase2<
-            ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
+            ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
             CanvasBitmapHelper,
             tools::LocalGuard,
             ::cppu::OWeakObject> > CanvasBitmap_Base;
diff --git a/canvas/source/vcl/canvascustomsprite.hxx b/canvas/source/vcl/canvascustomsprite.hxx
index 3b8dbd6..0c0a1bb 100644
--- a/canvas/source/vcl/canvascustomsprite.hxx
+++ b/canvas/source/vcl/canvascustomsprite.hxx
@@ -32,7 +32,7 @@
 #include <vcl/virdev.hxx>
 
 #include <canvas/vclwrapper.hxx>
-#include <canvas/base/disambiguationhelper.hxx>
+#include <canvas/base/basemutexhelper.hxx>
 #include <canvas/base/spritesurface.hxx>
 #include <canvas/base/canvascustomspritebase.hxx>
 
@@ -68,7 +68,7 @@ namespace vclcanvas
         remain a base class that provides implementation, not to
         enforce any specific interface on its derivees.
      */
-    class CanvasCustomSpriteSpriteBase_Base : public ::canvas::DisambiguationHelper< CanvasCustomSpriteBase_Base >,
+    class CanvasCustomSpriteSpriteBase_Base : public ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
                                                  public Sprite
     {
     };
diff --git a/canvas/source/vcl/spritecanvas.hxx b/canvas/source/vcl/spritecanvas.hxx
index 92dc4da..6d99798 100644
--- a/canvas/source/vcl/spritecanvas.hxx
+++ b/canvas/source/vcl/spritecanvas.hxx
@@ -115,7 +115,7 @@ namespace vclcanvas
         ~SpriteCanvas();
 
         /// Dispose all internal references
-        virtual void disposeThis();
+        virtual void disposeThis() SAL_OVERRIDE;
 
         // Forwarding the XComponent implementation to the
         // cppu::ImplHelper templated base
diff --git a/include/canvas/base/basemutexhelper.hxx b/include/canvas/base/basemutexhelper.hxx
new file mode 100644
index 0000000..d780d54
--- /dev/null
+++ b/include/canvas/base/basemutexhelper.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_CANVAS_BASE_BASEMUTEXHELPER_HXX
+#define INCLUDED_CANVAS_BASE_BASEMUTEXHELPER_HXX
+
+#include <sal/config.h>
+
+#include <osl/mutex.hxx>
+
+/* Definition of the BaseMutexHelper class */
+
+namespace canvas
+{
+    /** Base class, initializing its own baseclass with m_aMutex.
+
+        This is necessary to make the CanvasBase, GraphicDeviceBase,
+        etc. classes freely combinable - letting them perform this
+        initialization would prohibit deriving e.g. CanvasBase from
+        GraphicDeviceBase.
+     */
+    template< class Base > class BaseMutexHelper : public Base
+    {
+    protected:
+        /** Construct BaseMutexHelper
+
+            This method is the whole purpose of this template:
+            initializing a base class with the provided m_aMutex
+            member (the WeakComponentImplHelper templates need that,
+            as they require the lifetime of the mutex to extend
+            theirs).
+         */
+        BaseMutexHelper() :
+            Base( m_aMutex )
+        {
+        }
+
+        virtual void disposeThis() {}
+
+        mutable osl::Mutex m_aMutex;
+
+    private:
+        virtual void SAL_CALL disposing() SAL_OVERRIDE
+        { disposeThis(); }
+    };
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/canvas/base/bufferedgraphicdevicebase.hxx b/include/canvas/base/bufferedgraphicdevicebase.hxx
index 0eec72a..f7ba97c 100644
--- a/include/canvas/base/bufferedgraphicdevicebase.hxx
+++ b/include/canvas/base/bufferedgraphicdevicebase.hxx
@@ -176,7 +176,7 @@ namespace canvas
             return ::com::sun::star::uno::makeAny(mxWindow);
         }
 
-        virtual void disposeThis()
+        virtual void disposeThis() SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
@@ -224,7 +224,7 @@ namespace canvas
         }
 
         // XWindowListener
-        virtual void disposeEventSource( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException)
+        virtual void disposeEventSource( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
diff --git a/include/canvas/base/canvasbase.hxx b/include/canvas/base/canvasbase.hxx
index 64681eb..4a3944b 100644
--- a/include/canvas/base/canvasbase.hxx
+++ b/include/canvas/base/canvasbase.hxx
@@ -111,7 +111,7 @@ namespace canvas
         {
         }
 
-        virtual void disposeThis()
+        virtual void disposeThis() SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
diff --git a/include/canvas/base/canvascustomspritebase.hxx b/include/canvas/base/canvascustomspritebase.hxx
index b244e64..8caa258 100644
--- a/include/canvas/base/canvascustomspritebase.hxx
+++ b/include/canvas/base/canvascustomspritebase.hxx
@@ -94,7 +94,7 @@ namespace canvas
             @derive when overriding this method in derived classes,
             <em>always</em> call the base class' method!
          */
-        virtual void disposeThis()
+        virtual void disposeThis() SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
diff --git a/include/canvas/base/disambiguationhelper.hxx b/include/canvas/base/disambiguationhelper.hxx
index 2a19db1..9b07498 100644
--- a/include/canvas/base/disambiguationhelper.hxx
+++ b/include/canvas/base/disambiguationhelper.hxx
@@ -44,9 +44,7 @@ namespace canvas
      */
     template< class Base > class DisambiguationHelper : public Base
     {
-    public:
-        typedef Base BaseType;
-
+    protected:
         /** Construct DisambiguationHelper
 
             This method is the whole purpose of this template:
@@ -56,23 +54,24 @@ namespace canvas
             theirs).
          */
         DisambiguationHelper() :
-            BaseType( m_aMutex )
+            Base( m_aMutex )
         {
         }
 
-        virtual void SAL_CALL disposing()
-        { disposeThis(); }
-
-        virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException)
-        { disposeEventSource(Source); }
-
         virtual void disposeThis()
         {}
         virtual void disposeEventSource( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException)
         {}
 
-protected:
         mutable ::osl::Mutex m_aMutex;
+
+    private:
+        virtual void SAL_CALL disposing() SAL_OVERRIDE
+        { disposeThis(); }
+
+        virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
+        { disposeEventSource(Source); }
+
     };
 }
 
diff --git a/include/canvas/base/graphicdevicebase.hxx b/include/canvas/base/graphicdevicebase.hxx
index df8551f..69a4c2f 100644
--- a/include/canvas/base/graphicdevicebase.hxx
+++ b/include/canvas/base/graphicdevicebase.hxx
@@ -136,7 +136,7 @@ namespace canvas
                                                       _1)));
         }
 
-        virtual void disposeThis()
+        virtual void disposeThis() SAL_OVERRIDE
         {
             MutexType aGuard( BaseType::m_aMutex );
 
diff --git a/include/canvas/base/spritecanvasbase.hxx b/include/canvas/base/spritecanvasbase.hxx
index 4bc030e..c45b34f 100644
--- a/include/canvas/base/spritecanvasbase.hxx
+++ b/include/canvas/base/spritecanvasbase.hxx
@@ -77,7 +77,7 @@ namespace canvas
         {
         }
 
-        virtual void disposeThis()
+        virtual void disposeThis() SAL_OVERRIDE
         {
             typename BaseType::MutexType aGuard( BaseType::m_aMutex );
 
commit 781992cebac6415bdd38c78ae48806af156da09f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 10:38:32 2014 +0100

    Mark overriding SpriteCanvasBase class template member funs as SAL_OVERRIDE
    
    Change-Id: Ie01ae7e29f22fbb2f627a9c671f48bb1c19c5f56

diff --git a/include/canvas/base/spritecanvasbase.hxx b/include/canvas/base/spritecanvasbase.hxx
index 60e2039..4bc030e 100644
--- a/include/canvas/base/spritecanvasbase.hxx
+++ b/include/canvas/base/spritecanvasbase.hxx
@@ -89,7 +89,7 @@ namespace canvas
 
         // XSpriteCanvas
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimatedSprite > SAL_CALL createSpriteFromAnimation( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimation >& animation ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                                                                                                                                           ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                                                                                           ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(animation,
                               BOOST_CURRENT_FUNCTION,
@@ -103,7 +103,7 @@ namespace canvas
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimatedSprite > SAL_CALL createSpriteFromBitmaps( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > >& animationBitmaps,
                                                                                                                                    sal_Int8                                                                                                           interpolationMode ) throw (::com::sun::star::lang::IllegalArgumentException,
                                                                                                                                                                                                                                                                                  ::com::sun::star::rendering::VolatileContentDestroyedException,
-                                                                                                                                                                                                                                                                                 ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                                                                                                                                 ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(animationBitmaps,
                               BOOST_CURRENT_FUNCTION,
@@ -118,7 +118,7 @@ namespace canvas
         }
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCustomSprite > SAL_CALL createCustomSprite( const ::com::sun::star::geometry::RealSize2D& spriteSize ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                                                                                              ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                                              ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifySpriteSize(spriteSize,
                                     BOOST_CURRENT_FUNCTION,
@@ -130,7 +130,7 @@ namespace canvas
         }
 
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite > SAL_CALL createClonedSprite( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite >& original ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                                                                                                                        ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                                                                                        ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(original,
                               BOOST_CURRENT_FUNCTION,
commit ea7adb4a3a6d7a3267aeb718b40dd4ed2e693c33
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 10:30:08 2014 +0100

    Mark overriding IntegerBitmapBase class template member funs as SAL_OVERRIDE
    
    Change-Id: I484ef5c4b31122605287b8e1a5f33108f7b22ea2

diff --git a/include/canvas/base/integerbitmapbase.hxx b/include/canvas/base/integerbitmapbase.hxx
index 79863d6..6b24afe 100644
--- a/include/canvas/base/integerbitmapbase.hxx
+++ b/include/canvas/base/integerbitmapbase.hxx
@@ -42,7 +42,7 @@ namespace canvas
     public:
         // XIntegerBitmap
         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getData( ::com::sun::star::rendering::IntegerBitmapLayout&     bitmapLayout,
-                                                                              const ::com::sun::star::geometry::IntegerRectangle2D& rect ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException)
+                                                                              const ::com::sun::star::geometry::IntegerRectangle2D& rect ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(rect,
                               BOOST_CURRENT_FUNCTION,
@@ -57,7 +57,7 @@ namespace canvas
 
         virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< sal_Int8 >&      data,
                                        const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
-                                       const ::com::sun::star::geometry::IntegerRectangle2D&   rect ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+                                       const ::com::sun::star::geometry::IntegerRectangle2D&   rect ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(bitmapLayout, rect,
                               BOOST_CURRENT_FUNCTION,
@@ -74,7 +74,7 @@ namespace canvas
 
         virtual void SAL_CALL setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >&      color,
                                         const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
-                                        const ::com::sun::star::geometry::IntegerPoint2D&       pos ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+                                        const ::com::sun::star::geometry::IntegerPoint2D&       pos ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(bitmapLayout, pos,
                               BOOST_CURRENT_FUNCTION,
@@ -90,7 +90,7 @@ namespace canvas
         }
 
         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
-                                                                               const ::com::sun::star::geometry::IntegerPoint2D& pos ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException)
+                                                                               const ::com::sun::star::geometry::IntegerPoint2D& pos ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(pos,
                               BOOST_CURRENT_FUNCTION,
@@ -103,7 +103,7 @@ namespace canvas
                                                       pos );
         }
 
-        virtual ::com::sun::star::rendering::IntegerBitmapLayout SAL_CALL getMemoryLayout(  ) throw (::com::sun::star::uno::RuntimeException)
+        virtual ::com::sun::star::rendering::IntegerBitmapLayout SAL_CALL getMemoryLayout(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             typename Base::MutexType aGuard( Base::m_aMutex );
 
commit 19edde184077eca38ce369304980a8a42fb3ab52
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 12 10:06:42 2014 +0100

    Mark overriding BitmapCanvasBase class template member funs as SAL_OVERRIDE
    
    ...which reveals that SpriteCanvasBase is not derived from XBitmapCanvas, so
    split up BitmapCanvasBase (just XBitmap) and BitmapCanvasBase2 (plus
    XBitmapCanvas) and make IntegerBitmapBase directly abstract over those two as
    arguments.
    
    Change-Id: Ieae87fe466bb9f1a861c8a95162ef25235ae5799

diff --git a/canvas/source/cairo/cairo_canvas.hxx b/canvas/source/cairo/cairo_canvas.hxx
index 0aa07f3..945bf5f 100644
--- a/canvas/source/cairo/cairo_canvas.hxx
+++ b/canvas/source/cairo/cairo_canvas.hxx
@@ -85,10 +85,12 @@ namespace cairocanvas
     {
     };
 
-    typedef ::canvas::IntegerBitmapBase< CanvasBaseSurfaceProvider_Base,
-                                         CanvasHelper,
-                                         ::osl::MutexGuard,
-                                         ::cppu::OWeakObject >          CanvasBaseT;
+    typedef ::canvas::IntegerBitmapBase<
+        canvas::BitmapCanvasBase2<
+            CanvasBaseSurfaceProvider_Base,
+            CanvasHelper,
+            ::osl::MutexGuard,
+            ::cppu::OWeakObject> > CanvasBaseT;
 
     /** Product of this component's factory.
 
diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx
index fa33e20..f67a955 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.hxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.hxx
@@ -55,10 +55,11 @@ namespace cairocanvas
     };
 
     typedef ::canvas::IntegerBitmapBase<
-          CanvasBitmapSpriteSurface_Base,
-          CanvasHelper,
-          ::osl::MutexGuard,
-          ::cppu::OWeakObject >                         CanvasBitmap_Base;
+        canvas::BitmapCanvasBase2<
+            CanvasBitmapSpriteSurface_Base,
+            CanvasHelper,
+            ::osl::MutexGuard,
+            ::cppu::OWeakObject> > CanvasBitmap_Base;
 
     class CanvasBitmap : public CanvasBitmap_Base,
                          public RepaintTarget
diff --git a/canvas/source/directx/dx_canvas.hxx b/canvas/source/directx/dx_canvas.hxx
index 78e63ff..cf4e7ad 100644
--- a/canvas/source/directx/dx_canvas.hxx
+++ b/canvas/source/directx/dx_canvas.hxx
@@ -115,10 +115,12 @@ namespace dxcanvas
                                            DeviceHelper,
                                            ::osl::MutexGuard,
                                            ::cppu::OWeakObject >    CanvasBase2_Base;
-    typedef ::canvas::IntegerBitmapBase< CanvasBase2_Base,
-                                         BitmapCanvasHelper,
-                                         ::osl::MutexGuard,
-                                         ::cppu::OWeakObject >      BitmapCanvasBaseT;
+    typedef ::canvas::IntegerBitmapBase<
+        canvas::BitmapCanvasBase2<
+            CanvasBase2_Base,
+            BitmapCanvasHelper,
+            ::osl::MutexGuard,
+            ::cppu::OWeakObject> > BitmapCanvasBaseT;
 
     /** Product of this component's factory.
 
diff --git a/canvas/source/directx/dx_canvasbitmap.hxx b/canvas/source/directx/dx_canvasbitmap.hxx
index a59228e..bffcf1f 100644
--- a/canvas/source/directx/dx_canvasbitmap.hxx
+++ b/canvas/source/directx/dx_canvasbitmap.hxx
@@ -51,10 +51,12 @@ namespace dxcanvas
                                               ::com::sun::star::rendering::XIntegerBitmap,
                                                ::com::sun::star::lang::XServiceInfo,
                                                ::com::sun::star::beans::XFastPropertySet >      CanvasBitmapBase_Base;
-    typedef ::canvas::IntegerBitmapBase< ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
-                                         BitmapCanvasHelper,
-                                         ::osl::MutexGuard,
-                                         ::cppu::OWeakObject >                          CanvasBitmap_Base;
+    typedef ::canvas::IntegerBitmapBase<
+        canvas::BitmapCanvasBase2<
+            ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
+            BitmapCanvasHelper,
+            ::osl::MutexGuard,
+            ::cppu::OWeakObject> > CanvasBitmap_Base;
 
     class CanvasBitmap : public CanvasBitmap_Base, public BitmapProvider
     {
diff --git a/canvas/source/opengl/ogl_canvasbitmap.hxx b/canvas/source/opengl/ogl_canvasbitmap.hxx
index 876a761..bdb624d 100644
--- a/canvas/source/opengl/ogl_canvasbitmap.hxx
+++ b/canvas/source/opengl/ogl_canvasbitmap.hxx
@@ -32,10 +32,11 @@ namespace oglcanvas
     typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::rendering::XBitmapCanvas,
                                               ::com::sun::star::rendering::XIntegerBitmap > CanvasBitmapBase_Base;
     typedef ::canvas::IntegerBitmapBase<
-        ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
-        BitmapCanvasHelper,
-        ::osl::MutexGuard,
-        ::cppu::OWeakObject >                          CanvasBitmapBaseT;
+        canvas::BitmapCanvasBase2<
+            ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
+            BitmapCanvasHelper,
+            ::osl::MutexGuard,
+            ::cppu::OWeakObject> > CanvasBitmapBaseT;
 
     class CanvasBitmap : public CanvasBitmapBaseT
     {
diff --git a/canvas/source/vcl/canvas.hxx b/canvas/source/vcl/canvas.hxx
index 0c99706..95dc329 100644
--- a/canvas/source/vcl/canvas.hxx
+++ b/canvas/source/vcl/canvas.hxx
@@ -59,10 +59,12 @@ namespace vclcanvas
                                            DeviceHelper,
                                            tools::LocalGuard,
                                            ::cppu::OWeakObject >    CanvasBase_Base;
-    typedef ::canvas::IntegerBitmapBase< CanvasBase_Base,
-                                         CanvasHelper,
-                                         tools::LocalGuard,
-                                         ::cppu::OWeakObject >      CanvasBaseT;
+    typedef ::canvas::IntegerBitmapBase<
+        canvas::BitmapCanvasBase2<
+            CanvasBase_Base,
+            CanvasHelper,
+            tools::LocalGuard,
+            ::cppu::OWeakObject> > CanvasBaseT;
 
     /** Product of this component's factory.
 
diff --git a/canvas/source/vcl/canvasbitmap.hxx b/canvas/source/vcl/canvasbitmap.hxx
index 865996c..8cf013c 100644
--- a/canvas/source/vcl/canvasbitmap.hxx
+++ b/canvas/source/vcl/canvasbitmap.hxx
@@ -48,10 +48,12 @@ namespace vclcanvas
                                                ::com::sun::star::rendering::XIntegerBitmap,
                                                 ::com::sun::star::lang::XServiceInfo,
                                              ::com::sun::star::beans::XFastPropertySet >    CanvasBitmapBase_Base;
-    typedef ::canvas::IntegerBitmapBase< ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
-                                         CanvasBitmapHelper,
-                                         tools::LocalGuard,
-                                         ::cppu::OWeakObject >                          CanvasBitmap_Base;
+    typedef ::canvas::IntegerBitmapBase<
+        canvas::BitmapCanvasBase2<
+            ::canvas::DisambiguationHelper< CanvasBitmapBase_Base >,
+            CanvasBitmapHelper,
+            tools::LocalGuard,
+            ::cppu::OWeakObject> > CanvasBitmap_Base;
 
     class CanvasBitmap : public CanvasBitmap_Base,
                          public RepaintTarget
diff --git a/include/canvas/base/bitmapcanvasbase.hxx b/include/canvas/base/bitmapcanvasbase.hxx
index 307b78c..37c38c2 100644
--- a/include/canvas/base/bitmapcanvasbase.hxx
+++ b/include/canvas/base/bitmapcanvasbase.hxx
@@ -67,6 +67,41 @@ namespace canvas
     public:
         typedef CanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >    BaseType;
 
+        // XBitmap
+        virtual ::com::sun::star::geometry::IntegerSize2D SAL_CALL getSize(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
+        {
+            typename BaseType::MutexType aGuard( BaseType::m_aMutex );
+
+            return BaseType::maCanvasHelper.getSize();
+        }
+
+        virtual ::sal_Bool SAL_CALL hasAlpha(  ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
+        {
+            typename BaseType::MutexType aGuard( BaseType::m_aMutex );
+
+            return BaseType::maCanvasHelper.hasAlpha();
+        }
+
+        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > SAL_CALL getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
+                                                                                                                   sal_Bool                                      beFast ) throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
+        {
+            typename BaseType::MutexType aGuard( BaseType::m_aMutex );
+
+            return BaseType::maCanvasHelper.getScaledBitmap( newSize, beFast );
+        }
+
+    };
+
+    template< class Base,
+              class CanvasHelper,
+              class Mutex=::osl::MutexGuard,
+              class UnambiguousBase=::com::sun::star::uno::XInterface > class BitmapCanvasBase2 :
+        public BitmapCanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >
+    {
+        typedef BitmapCanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >
+            BaseType;
+
+    public:
         // XBitmapCanvas
         virtual void SAL_CALL copyRect( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas >&   sourceCanvas,
                                         const ::com::sun::star::geometry::RealRectangle2D&                                      sourceRect,
@@ -75,19 +110,19 @@ namespace canvas
                                         const ::com::sun::star::geometry::RealRectangle2D&                                      destRect,
                                         const ::com::sun::star::rendering::ViewState&                                           destViewState,
                                         const ::com::sun::star::rendering::RenderState&                                         destRenderState ) throw (::com::sun::star::lang::IllegalArgumentException,
-                                                                                                                                                         ::com::sun::star::uno::RuntimeException)
+                                                                                                                                                         ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE
         {
             tools::verifyArgs(sourceCanvas, sourceRect, sourceViewState, sourceRenderState,
                               destRect, destViewState, destRenderState,
                               BOOST_CURRENT_FUNCTION,
                               static_cast< typename BaseType::UnambiguousBaseType* >(this));
 
-            typename BaseType::MutexType aGuard( BaseType::m_aMutex );
+            typename BaseType::BaseType::MutexType aGuard( BaseType::m_aMutex );
 
-            BaseType::mbSurfaceDirty = true;
-            BaseType::maCanvasHelper.modifying();
+            BaseType::BaseType::mbSurfaceDirty = true;
+            BaseType::BaseType::maCanvasHelper.modifying();
 
-            BaseType::maCanvasHelper.copyRect( this,
+            BaseType::BaseType::maCanvasHelper.copyRect( this,
                                                sourceCanvas,
                                                sourceRect,
                                                sourceViewState,
@@ -96,30 +131,6 @@ namespace canvas
                                                destViewState,
                                                destRenderState );
         }
-
-        // XBitmap
-        virtual ::com::sun::star::geometry::IntegerSize2D SAL_CALL getSize(  ) throw (::com::sun::star::uno::RuntimeException)
-        {
-            typename BaseType::MutexType aGuard( BaseType::m_aMutex );
-
-            return BaseType::maCanvasHelper.getSize();
-        }
-
-        virtual ::sal_Bool SAL_CALL hasAlpha(  ) throw (::com::sun::star::uno::RuntimeException)
-        {
-            typename BaseType::MutexType aGuard( BaseType::m_aMutex );
-
-            return BaseType::maCanvasHelper.hasAlpha();
-        }
-
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > SAL_CALL getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
-                                                                                                                   sal_Bool                                      beFast ) throw (::com::sun::star::uno::RuntimeException)
-        {
-            typename BaseType::MutexType aGuard( BaseType::m_aMutex );
-
-            return BaseType::maCanvasHelper.getScaledBitmap( newSize, beFast );
-        }
-
     };
 }
 
diff --git a/include/canvas/base/canvascustomspritebase.hxx b/include/canvas/base/canvascustomspritebase.hxx
index b6f6ac0..b244e64 100644
--- a/include/canvas/base/canvascustomspritebase.hxx
+++ b/include/canvas/base/canvascustomspritebase.hxx
@@ -75,10 +75,10 @@ namespace canvas
               class CanvasHelper,
               class Mutex=::osl::MutexGuard,
               class UnambiguousBase=::com::sun::star::uno::XInterface > class CanvasCustomSpriteBase :
-        public IntegerBitmapBase< Base, CanvasHelper, Mutex, UnambiguousBase >
+        public IntegerBitmapBase< BitmapCanvasBase2<Base, CanvasHelper, Mutex, UnambiguousBase> >
     {
     public:
-        typedef IntegerBitmapBase< Base, CanvasHelper, Mutex, UnambiguousBase > BaseType;
+        typedef IntegerBitmapBase< BitmapCanvasBase2<Base, CanvasHelper, Mutex, UnambiguousBase> > BaseType;
         typedef SpriteHelper                                                    SpriteHelperType;
 
         CanvasCustomSpriteBase() :
diff --git a/include/canvas/base/integerbitmapbase.hxx b/include/canvas/base/integerbitmapbase.hxx
index ee396c2..79863d6 100644
--- a/include/canvas/base/integerbitmapbase.hxx
+++ b/include/canvas/base/integerbitmapbase.hxx
@@ -33,53 +33,25 @@ namespace canvas
         implementation.
 
         @tpl Base
-        Base class to use, most probably one of the
-        WeakComponentImplHelperN templates with the appropriate
-        interfaces. At least XIntegerBitmap should be among them (why
-        else would you use this template, then?). Base class must have
-        an Base( const Mutex& ) constructor (like the
-        WeakComponentImplHelperN templates have).
-
-        @tpl CanvasHelper
-        Canvas helper implementation for the backend in question
-
-        @tpl Mutex
-        Lock strategy to use. Defaults to using the
-        OBaseMutex-provided lock.  Everytime one of the methods is
-        entered, an object of type Mutex is created with m_aMutex as
-        the sole parameter, and destroyed again when the method scope
-        is left.
-
-        @tpl UnambiguousBase
-        Optional unambiguous base class for XInterface of Base. It's
-        sometimes necessary to specify this parameter, e.g. if Base
-        derives from multiple UNO interface (were each provides its
-        own version of XInterface, making the conversion ambiguous)
-
-        @see CanvasBase for further contractual requirements towards
-        the CanvasHelper type, and some examples.
+        Either BitmapCanvasBase (just XBitmap) or BitmapCanvasBase2 (XBitmap and
+        XBitmapCanvas).
      */
-    template< class Base,
-              class CanvasHelper,
-              class Mutex=::osl::MutexGuard,
-              class UnambiguousBase=::com::sun::star::uno::XInterface > class IntegerBitmapBase :
-        public BitmapCanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >
+    template< class Base > class IntegerBitmapBase :
+        public Base
     {
     public:
-        typedef BitmapCanvasBase< Base, CanvasHelper, Mutex, UnambiguousBase >  BaseType;
-
         // XIntegerBitmap
         virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getData( ::com::sun::star::rendering::IntegerBitmapLayout&     bitmapLayout,
                                                                               const ::com::sun::star::geometry::IntegerRectangle2D& rect ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException)
         {
             tools::verifyArgs(rect,
                               BOOST_CURRENT_FUNCTION,
-                              static_cast< typename BaseType::UnambiguousBaseType* >(this));
-            tools::verifyIndexRange(rect, BaseType::getSize() );
+                              static_cast< typename Base::UnambiguousBaseType* >(this));
+            tools::verifyIndexRange(rect, Base::getSize() );
 
-            typename BaseType::MutexType aGuard( BaseType::m_aMutex );
+            typename Base::MutexType aGuard( Base::m_aMutex );
 
-            return BaseType::maCanvasHelper.getData( bitmapLayout,
+            return Base::maCanvasHelper.getData( bitmapLayout,
                                                      rect );
         }
 
@@ -89,15 +61,15 @@ namespace canvas
         {
             tools::verifyArgs(bitmapLayout, rect,
                               BOOST_CURRENT_FUNCTION,
-                              static_cast< typename BaseType::UnambiguousBaseType* >(this));
-            tools::verifyIndexRange(rect, BaseType::getSize() );
+                              static_cast< typename Base::UnambiguousBaseType* >(this));
+            tools::verifyIndexRange(rect, Base::getSize() );
 
-            typename BaseType::MutexType aGuard( BaseType::m_aMutex );
+            typename Base::MutexType aGuard( Base::m_aMutex );
 
-            BaseType::mbSurfaceDirty = true;
-            BaseType::maCanvasHelper.modifying();
+            Base::mbSurfaceDirty = true;
+            Base::maCanvasHelper.modifying();
 
-            BaseType::maCanvasHelper.setData( data, bitmapLayout, rect );
+            Base::maCanvasHelper.setData( data, bitmapLayout, rect );
         }
 
         virtual void SAL_CALL setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >&      color,
@@ -106,15 +78,15 @@ namespace canvas
         {
             tools::verifyArgs(bitmapLayout, pos,
                               BOOST_CURRENT_FUNCTION,

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list