compilerplugins/clang/implinheritancehelper.cxx |    4 +++
 include/svx/fmdpage.hxx                         |   12 ++--------
 include/svx/unopage.hxx                         |    7 +-----
 include/xmloff/xmlictxt.hxx                     |    3 ++
 reportdesign/source/core/inc/ReportDrawPage.hxx |    1 
 sd/source/ui/inc/unopage.hxx                    |    7 ------
 sd/source/ui/slideshow/slideshowimpl.cxx        |    1 
 sd/source/ui/unoidl/unopage.cxx                 |   27 +++---------------------
 svx/source/form/fmdpage.cxx                     |   20 -----------------
 svx/source/unodraw/unopage.cxx                  |    6 -----
 sw/inc/unodraw.hxx                              |    6 ++---
 xmloff/source/draw/shapeimport.cxx              |    2 -
 12 files changed, 23 insertions(+), 73 deletions(-)

New commits:
commit 5a7c5151a5bab89c70984a9b04540c9e0244ecf0
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Sep 5 12:16:15 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Sep 5 14:31:33 2023 +0200

    SAL_WARN->SAL_INFO in XMLShapeImportHelper
    
    these attributes are typically processed elsewhere, so this warning is
    not useful
    
    Change-Id: I2ebfe87e81e2959fbf25b17ed93a3bc80e1c6ab5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156560
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx
index ea10bd002b83..ab7a70442ffa 100644
--- a/include/xmloff/xmlictxt.hxx
+++ b/include/xmloff/xmlictxt.hxx
@@ -114,6 +114,9 @@ public:
 #define XMLOFF_WARN_UNKNOWN(area, rIter) \
     SAL_WARN(area, "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(rIter.getToken()) << " value=" << 
rIter.toString());
 
+#define XMLOFF_INFO_UNKNOWN(area, rIter) \
+    SAL_INFO(area, "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(rIter.getToken()) << " value=" << 
rIter.toString());
+
 #define XMLOFF_WARN_UNKNOWN_ATTR(area, token, value) \
     SAL_WARN(area, "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(token) << "=" << value);
 
diff --git a/xmloff/source/draw/shapeimport.cxx 
b/xmloff/source/draw/shapeimport.cxx
index 45c1d22fcabb..5b0e6d101787 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -349,7 +349,7 @@ SvXMLShapeContext* 
XMLShapeImportHelper::CreateGroupChildContext(
     for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
     {
         if (!pContext->processAttribute( aIter ))
-            XMLOFF_WARN_UNKNOWN("xmloff", aIter);
+            XMLOFF_INFO_UNKNOWN("xmloff", aIter);
     }
     return pContext;
 }
commit 5fac945201bc381e0642218c380a6a72cfc6328c
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Sep 5 11:38:10 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Sep 5 14:31:24 2023 +0200

    SvxDrawPage does not need to use aggregation
    
    we use custom subclasses when we want to modify behaviour
    
    Change-Id: I1aef9e87c76ea97f1868134f5e1ac0e317b5c698
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156559
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/compilerplugins/clang/implinheritancehelper.cxx 
b/compilerplugins/clang/implinheritancehelper.cxx
index fb24ed96f2dd..1eb1db60a90b 100644
--- a/compilerplugins/clang/implinheritancehelper.cxx
+++ b/compilerplugins/clang/implinheritancehelper.cxx
@@ -74,6 +74,10 @@ bool ImplInheritanceHelper::VisitCXXRecordDecl(const 
CXXRecordDecl* cxxRecordDec
             .Namespace("pcr")
             .GlobalNamespace())
         return true;
+    if 
(loplugin::DeclCheck(cxxRecordDecl).Class("SdDrawPage").GlobalNamespace())
+        return true;
+    if 
(loplugin::DeclCheck(cxxRecordDecl).Class("SdMasterPage").GlobalNamespace())
+        return true;
 
     // check if this class extends cppu::WeakImplHelper
     if (!loplugin::isDerivedFrom(cxxRecordDecl, [](Decl const* decl) -> bool {
diff --git a/include/svx/fmdpage.hxx b/include/svx/fmdpage.hxx
index 3842e8b0b02e..e7f3732cad1c 100644
--- a/include/svx/fmdpage.hxx
+++ b/include/svx/fmdpage.hxx
@@ -21,14 +21,14 @@
 
 #include <com/sun/star/form/XFormsSupplier2.hpp>
 #include <svx/unopage.hxx>
-#include <comphelper/uno3.hxx>
 #include <svx/svxdllapi.h>
 
 
 // SvxFmDrawPage
 
-class SVXCORE_DLLPUBLIC SvxFmDrawPage   :public SvxDrawPage
-                                    ,public css::form::XFormsSupplier2
+typedef cppu::ImplInheritanceHelper<SvxDrawPage, css::form::XFormsSupplier2> 
SvxFmDrawPage_Base;
+
+class SVXCORE_DLLPUBLIC SvxFmDrawPage : public SvxFmDrawPage_Base
 {
 protected:
 
@@ -44,14 +44,8 @@ public:
     SvxFmDrawPage( SdrPage* pPage );
     virtual ~SvxFmDrawPage() noexcept override;
 
-    // UNO binding
-    DECLARE_UNO3_AGG_DEFAULTS(SvxFmDrawPage, SvxDrawPage)
-
-    virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& 
aType ) override;
     virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 
override;
 
-    virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) 
override;
-
     // XFormsSupplier
     virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL 
getForms() override;
 
diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx
index 4bc4c1ff7438..fc6860aa9274 100644
--- a/include/svx/unopage.hxx
+++ b/include/svx/unopage.hxx
@@ -32,7 +32,7 @@
 #include <svx/svdobjkind.hxx>
 #include <rtl/ref.hxx>
 
-#include <cppuhelper/implbase7.hxx>
+#include <cppuhelper/implbase.hxx>
 #include <comphelper/servicehelper.hxx>
 
 #include <memory>
@@ -48,7 +48,7 @@ class SvxShapeConnector;
 enum class SdrInventor : sal_uInt32;
 
 class SVXCORE_DLLPUBLIC SvxDrawPage : protected cppu::BaseMutex,
-                                    public ::cppu::WeakAggImplHelper7< 
css::drawing::XDrawPage,
+                                    public ::cppu::WeakImplHelper< 
css::drawing::XDrawPage,
                                                css::drawing::XShapeGrouper,
                                                css::drawing::XShapes2,
                                                css::drawing::XShapes3,
@@ -97,9 +97,6 @@ class SVXCORE_DLLPUBLIC SvxDrawPage : protected 
cppu::BaseMutex,
 
     UNO3_GETIMPLEMENTATION_DECL( SvxDrawPage )
 
-    // XInterface
-    virtual void SAL_CALL release() noexcept override;
-
     // XShapes
     virtual void SAL_CALL add( const css::uno::Reference< css::drawing::XShape 
>& xShape ) override;
     virtual void SAL_CALL remove( const css::uno::Reference< 
css::drawing::XShape >& xShape ) override;
diff --git a/reportdesign/source/core/inc/ReportDrawPage.hxx 
b/reportdesign/source/core/inc/ReportDrawPage.hxx
index b4c10d93eb6c..0a10693d30b1 100644
--- a/reportdesign/source/core/inc/ReportDrawPage.hxx
+++ b/reportdesign/source/core/inc/ReportDrawPage.hxx
@@ -22,6 +22,7 @@
 
 #include <svx/unopage.hxx>
 #include <com/sun/star/report/XSection.hpp>
+#include <cppuhelper/weakref.hxx>
 
 namespace reportdesign
 {
diff --git a/sd/source/ui/inc/unopage.hxx b/sd/source/ui/inc/unopage.hxx
index 9a684b2cb496..b62ce21cc579 100644
--- a/sd/source/ui/inc/unopage.hxx
+++ b/sd/source/ui/inc/unopage.hxx
@@ -110,9 +110,6 @@ public:
 
     // XInterface
     virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & 
rType ) override;
-    virtual void SAL_CALL release() noexcept override;
-
-    css::uno::Any SAL_CALL queryAggregation(css::uno::Type const & rType) 
override;
 
     // XShapeCombiner
     virtual css::uno::Reference< css::drawing::XShape > SAL_CALL combine( 
const css::uno::Reference< css::drawing::XShapes >& xShapes ) override;
@@ -181,8 +178,6 @@ public:
     virtual void SAL_CALL acquire() noexcept override;
     virtual void SAL_CALL release() noexcept override;
 
-    css::uno::Any SAL_CALL queryAggregation(css::uno::Type const & rType) 
override;
-
     // XTypeProvider
     virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
     virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 
override;
@@ -240,8 +235,6 @@ public:
     virtual void SAL_CALL acquire() noexcept override;
     virtual void SAL_CALL release() noexcept override;
 
-    css::uno::Any SAL_CALL queryAggregation(css::uno::Type const & rType) 
override;
-
     // XTypeProvider
     virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
     virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 
override;
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 42ed20634499..f91a6aaa816b 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -44,6 +44,7 @@
 
 #include <toolkit/helper/vclunohelper.hxx>
 #include <comphelper/diagnose_ex.hxx>
+#include <comphelper/sequence.hxx>
 
 #include <sfx2/infobar.hxx>
 #include <sfx2/dispatch.hxx>
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 17080d0532b2..c7f35d08f1f1 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -512,12 +512,8 @@ rtl::Reference<SdrObject> 
SdGenericDrawPage::CreateSdrObject_( const Reference<
 }
 
 // XInterface
-Any SAL_CALL SdGenericDrawPage::queryInterface( const uno::Type & rType )
+Any SdGenericDrawPage::queryInterface(const uno::Type & rType)
 {
-    return SvxFmDrawPage::queryInterface(rType);
-}
-
-css::uno::Any SdGenericDrawPage::queryAggregation(css::uno::Type const & 
rType) {
     Any aAny;
 
     if (rType == cppu::UnoType<beans::XPropertySet>::get())
@@ -564,7 +560,7 @@ css::uno::Any 
SdGenericDrawPage::queryAggregation(css::uno::Type const & rType)
             return Any( Reference< XAnimationNodeSupplier >( this ) );
     }
     else
-        return SvxFmDrawPage::queryAggregation( rType );
+        return SvxFmDrawPage::queryInterface( rType );
 
     return aAny;
 }
@@ -1880,13 +1876,6 @@ void SdGenericDrawPage::SetHeight( sal_Int32 nHeight )
     refreshpage( &rDoc, ePageKind );
 }
 
-// XInterface
-void SdGenericDrawPage::release() noexcept
-{
-
-    OWeakAggObject::release();
-}
-
 // XComponent
 void SdGenericDrawPage::disposing() noexcept
 {
@@ -2069,10 +2058,6 @@ SdDrawPage::~SdDrawPage() noexcept
 // XInterface
 Any SAL_CALL SdDrawPage::queryInterface( const uno::Type & rType )
 {
-    return SdGenericDrawPage::queryInterface(rType);
-}
-
-css::uno::Any SdDrawPage::queryAggregation(css::uno::Type const & rType) {
     if( rType == cppu::UnoType<drawing::XMasterPageTarget>::get() )
     {
         return Any( Reference< drawing::XMasterPageTarget >( this ) );
@@ -2087,7 +2072,7 @@ css::uno::Any SdDrawPage::queryAggregation(css::uno::Type 
const & rType) {
         }
     }
 
-    return SdGenericDrawPage::queryAggregation( rType );
+    return SdGenericDrawPage::queryInterface( rType );
 }
 
 void SAL_CALL SdDrawPage::acquire() noexcept
@@ -2670,10 +2655,6 @@ SdMasterPage::~SdMasterPage() noexcept
 // XInterface
 Any SAL_CALL SdMasterPage::queryInterface( const uno::Type & rType )
 {
-    return SdGenericDrawPage::queryInterface(rType);
-}
-
-css::uno::Any SdMasterPage::queryAggregation(css::uno::Type const & rType) {
     ::SolarMutexGuard aGuard;
 
     throwIfDisposed();
@@ -2691,7 +2672,7 @@ css::uno::Any 
SdMasterPage::queryAggregation(css::uno::Type const & rType) {
                GetPage()  && GetPage()->GetPageKind() != PageKind::Handout) )
         aAny <<= Reference< presentation::XPresentationPage >( this );
     else
-        return SdGenericDrawPage::queryAggregation( rType );
+        return SdGenericDrawPage::queryInterface( rType );
 
     return aAny;
 }
diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx
index dbf8ccc001aa..7f5c8a9c303e 100644
--- a/svx/source/form/fmdpage.cxx
+++ b/svx/source/form/fmdpage.cxx
@@ -28,7 +28,7 @@ using ::com::sun::star::uno::Any;
 using ::com::sun::star::form::XFormsSupplier2;
 
 SvxFmDrawPage::SvxFmDrawPage( SdrPage* pInPage ) :
-    SvxDrawPage( pInPage )
+    SvxFmDrawPage_Base( pInPage )
 {
 }
 
@@ -41,24 +41,6 @@ css::uno::Sequence< sal_Int8 > SAL_CALL 
SvxFmDrawPage::getImplementationId()
     return css::uno::Sequence<sal_Int8>();
 }
 
-Any SAL_CALL SvxFmDrawPage::queryAggregation( const css::uno::Type& _rType )
-{
-    Any aRet = ::cppu::queryInterface   (   _rType
-                                        ,   static_cast< XFormsSupplier2* >( 
this )
-                                        ,   static_cast< XFormsSupplier* >( 
this )
-                                        );
-    if ( !aRet.hasValue() )
-        aRet = SvxDrawPage::queryAggregation( _rType );
-
-    return aRet;
-}
-
-css::uno::Sequence< css::uno::Type > SAL_CALL SvxFmDrawPage::getTypes(  )
-{
-    return comphelper::concatSequences(SvxDrawPage::getTypes(),
-        css::uno::Sequence { cppu::UnoType<css::form::XFormsSupplier2>::get() 
});
-}
-
 rtl::Reference<SdrObject> SvxFmDrawPage::CreateSdrObject_( const 
css::uno::Reference< css::drawing::XShape > & xDescr )
 {
     OUString aShapeType( xDescr->getShapeType() );
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 846e41ae590f..38c8d85365a0 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -82,12 +82,6 @@ SvxDrawPage::~SvxDrawPage() noexcept
     }
 }
 
-// XInterface
-void SvxDrawPage::release() noexcept
-{
-    OWeakAggObject::release();
-}
-
 // XComponent
 void SvxDrawPage::disposing() noexcept
 {
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index 3353843219e9..02deab879ee5 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -30,17 +30,17 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/XPropertyState.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
-#include <cppuhelper/implbase.hxx>
-#include <cppuhelper/implbase2.hxx>
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #include <com/sun/star/drawing/HomogenMatrix3.hpp>
+#include <com/sun/star/uno/XAggregation.hpp>
+#include <cppuhelper/implbase.hxx>
 
 class SdrMarkList;
 class SdrView;
 class SwDoc;
 class SwXShape;
 
-typedef cppu::AggImplInheritanceHelper2
+typedef cppu::ImplInheritanceHelper
 <
     SvxFmDrawPage,
     css::container::XEnumerationAccess,

Reply via email to