diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-12-17 14:54:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-12-18 14:49:14 +0100 |
commit | 7e4b7be35cf38acdd67ecaeb63c1c5f152afd4f5 (patch) | |
tree | 5039f5aaee2a4c785d89c3f17089cb02f96de8bd /sw/source/ui/vba/vbapagesetup.cxx | |
parent | 6b63318f73de07b9a9697284d018e1271cb3307c (diff) |
use more concrete UNO in sw
Change-Id: Ie83d957349f123bca0fd46ce3144ce778c3ec101
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178704
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/ui/vba/vbapagesetup.cxx')
-rw-r--r-- | sw/source/ui/vba/vbapagesetup.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index 8163ff48239d..e227d59043c3 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -22,17 +22,19 @@ #include <ooo/vba/word/WdSectionStart.hpp> #include <ooo/vba/word/WdOrientation.hpp> #include "wordvbahelper.hxx" +#include <unotxdoc.hxx> +#include <unobasestyle.hxx> using namespace ::com::sun::star; using namespace ::ooo::vba; SwVbaPageSetup::SwVbaPageSetup(const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< frame::XModel >& xModel, + const rtl::Reference< SwXTextDocument >& xModel, const uno::Reference< beans::XPropertySet >& xProps ): - SwVbaPageSetup_BASE( xParent, xContext ) + SwVbaPageSetup_BASE( xParent, xContext ), + mxModel(xModel) { - mxModel.set( xModel, uno::UNO_SET_THROW ); mxPageProps.set( xProps, uno::UNO_SET_THROW ); mnOrientPortrait = word::WdOrientation::wdOrientPortrait; mnOrientLandscape = word::WdOrientation::wdOrientLandscape; @@ -151,7 +153,7 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status else newStyle = "Standard"; - uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); + rtl::Reference< SwXBaseStyle > xStyleProps( word::getCurrentPageStyle( mxModel ) ); sal_Int32 nTopMargin = 0; xStyleProps->getPropertyValue(u"TopMargin"_ustr) >>= nTopMargin; sal_Int32 nBottomMargin = 0; @@ -191,7 +193,7 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status xCursorProps->setPropertyValue(u"PageDescName"_ustr, uno::Any( newStyle ) ); } - uno::Reference< beans::XPropertySet > xFirstPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); + rtl::Reference< SwXBaseStyle > xFirstPageProps( word::getCurrentPageStyle( mxModel ) ); xFirstPageProps->setPropertyValue(u"TopMargin"_ustr, uno::Any( nTopMargin ) ); xFirstPageProps->setPropertyValue(u"BottomMargin"_ustr, uno::Any( nBottomMargin ) ); xFirstPageProps->setPropertyValue(u"LeftMargin"_ustr, uno::Any( nLeftMargin ) ); |