diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2023-01-27 15:04:33 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2023-02-01 08:41:21 +0000 |
commit | 7ab51def766ad6bfdcf5111e7b751bbc2bbf1d73 (patch) | |
tree | 16e58aaf7336ca8c56fbd9bdd729ab4a1c379dae /sw/inc | |
parent | a262ee4c4a682f844ef380d5e843be1b3ec78c98 (diff) |
sw: implement "Theme" property for the XDrawPage in Writer
Change-Id: I8eed04f0ccb2e626a648abcaecd957b6f62c39d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146226
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/unodraw.hxx | 21 | ||||
-rw-r--r-- | sw/inc/unomap.hxx | 18 |
2 files changed, 34 insertions, 5 deletions
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 0c926e28e16b..1f9efea10eac 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -31,7 +31,7 @@ #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/drawing/XShapes.hpp> #include <cppuhelper/implbase.hxx> -#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase2.hxx> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/drawing/HomogenMatrix3.hpp> @@ -40,16 +40,20 @@ class SdrView; class SwDoc; class SwXShape; -typedef cppu::AggImplInheritanceHelper1 +typedef cppu::AggImplInheritanceHelper2 < SvxFmDrawPage, - css::container::XEnumerationAccess -> SwFmDrawPage_Base; + css::container::XEnumerationAccess, + css::beans::XPropertySet> + SwFmDrawPage_Base; + class SwFmDrawPage final : public SwFmDrawPage_Base { SwDoc* m_pDoc; SdrPageView* m_pPageView; std::vector<rtl::Reference<SwXShape>> m_vShapes; + const SfxItemPropertySet* m_pPropertySet; + public: SwFmDrawPage( SwDoc* pDoc, SdrPage* pPage ); virtual ~SwFmDrawPage() noexcept override; @@ -98,6 +102,15 @@ public: virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; + //XPropertySet + virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() override; + virtual void SAL_CALL setPropertyValue(const OUString& aPropertyName, const css::uno::Any& aValue) override; + virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& PropertyName) override; + virtual void SAL_CALL addPropertyChangeListener(const OUString& aPropertyName, const css::uno::Reference<css::beans::XPropertyChangeListener>& xListener) override; + virtual void SAL_CALL removePropertyChangeListener(const OUString& aPropertyName, const css::uno::Reference<css::beans::XPropertyChangeListener>& aListener) override; + virtual void SAL_CALL addVetoableChangeListener(const OUString& PropertyName, const css::uno::Reference<css::beans::XVetoableChangeListener>& aListener) override; + virtual void SAL_CALL removeVetoableChangeListener(const OUString& PropertyName, const css::uno::Reference<css::beans::XVetoableChangeListener>& aListener) override; + // renamed and outlined to detect where it's called void InvalidateSwDoc(); // {pDoc = 0;} }; diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx index 689fa87063a1..84245bea2d14 100644 --- a/sw/inc/unomap.hxx +++ b/sw/inc/unomap.hxx @@ -128,7 +128,8 @@ class SfxItemPropertySet; #define PROPERTY_MAP_FIELDMARK 102 #define PROPERTY_MAP_LINEBREAK 103 #define PROPERTY_MAP_CONTENTCONTROL 104 -#define PROPERTY_MAP_END 105 +#define PROPERTY_MAP_TEXT_PAGE 105 +#define PROPERTY_MAP_END 106 //S&E #define WID_WORDS 0 @@ -307,6 +308,21 @@ class SfxItemPropertySet; #define WID_IS_OUTLINE 4 #define WID_DEFAULT_LIST_ID 5 +#define WID_PAGE_BOTTOM 0 +#define WID_PAGE_LEFT 1 +#define WID_PAGE_RIGHT 2 +#define WID_PAGE_TOP 3 +#define WID_PAGE_WIDTH 4 +#define WID_PAGE_HEIGHT 5 +#define WID_PAGE_NUMBER 6 +#define WID_PAGE_ORIENT 7 +#define WID_PAGE_USERATTRIBS 8 +#define WID_PAGE_ISDARK 9 +#define WID_NAVORDER 10 +#define WID_PAGE_BACKFULL 11 + +#define WID_PAGE_THEME 12 + // This define would need the include of <svx/unoshprp.hxx>, but this ends // in a mess; there *are* double used symbols which are used in a #define in // editengine and as an enum in sw; these will then collide and lead to severe |