diff options
-rw-r--r-- | sw/source/ui/vba/vbatabstop.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbatabstop.hxx | 4 | ||||
-rw-r--r-- | sw/source/ui/vba/vbatabstops.cxx | 12 |
3 files changed, 8 insertions, 10 deletions
diff --git a/sw/source/ui/vba/vbatabstop.cxx b/sw/source/ui/vba/vbatabstop.cxx index 55b32f6ac1ab..8979ebc1e299 100644 --- a/sw/source/ui/vba/vbatabstop.cxx +++ b/sw/source/ui/vba/vbatabstop.cxx @@ -23,7 +23,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; -SwVbaTabStop::SwVbaTabStop( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< beans::XPropertySet >& xParaProps, const style::TabStop& aTabStop ) throw ( uno::RuntimeException ) : SwVbaTabStop_BASE( rParent, rContext ), mxParaProps( xParaProps ), maTabStop( aTabStop ) +SwVbaTabStop::SwVbaTabStop( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< beans::XPropertySet >& xParaProps ) throw ( uno::RuntimeException ) : SwVbaTabStop_BASE( rParent, rContext ), mxParaProps( xParaProps ) { } diff --git a/sw/source/ui/vba/vbatabstop.hxx b/sw/source/ui/vba/vbatabstop.hxx index 857b55e498c1..9c5f5c4db04a 100644 --- a/sw/source/ui/vba/vbatabstop.hxx +++ b/sw/source/ui/vba/vbatabstop.hxx @@ -21,7 +21,6 @@ #include <ooo/vba/word/XTabStop.hpp> #include <vbahelper/vbahelperinterface.hxx> -#include <com/sun/star/style/TabStop.hpp> typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XTabStop > SwVbaTabStop_BASE; @@ -29,10 +28,9 @@ class SwVbaTabStop : public SwVbaTabStop_BASE { private: css::uno::Reference< css::beans::XPropertySet > mxParaProps; - css::style::TabStop maTabStop; public: - SwVbaTabStop( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps, const css::style::TabStop& aTabStop ) throw ( css::uno::RuntimeException ); + SwVbaTabStop( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps ) throw ( css::uno::RuntimeException ); virtual ~SwVbaTabStop(); // XHelperInterface diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx index 8315b16087ee..6a9007494e78 100644 --- a/sw/source/ui/vba/vbatabstops.cxx +++ b/sw/source/ui/vba/vbatabstops.cxx @@ -19,6 +19,7 @@ #include "vbatabstops.hxx" #include "vbatabstop.hxx" #include <com/sun/star/style/TabAlign.hpp> +#include <com/sun/star/style/TabStop.hpp> #include <ooo/vba/word/WdTabLeader.hpp> #include <ooo/vba/word/WdTabAlignment.hpp> #include <cppuhelper/implbase.hxx> @@ -69,27 +70,26 @@ private: uno::Reference< XHelperInterface > mxParent; uno::Reference< uno::XComponentContext > mxContext; uno::Reference< beans::XPropertySet > mxParaProps; - uno::Sequence< style::TabStop > maTabStops; + sal_Int32 mnTabStops; public: TabStopCollectionHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& xParaProps ) throw ( css::uno::RuntimeException ): mxParent( xParent ), mxContext( xContext ), mxParaProps( xParaProps ) { - maTabStops = lcl_getTabStops( xParaProps ); + mnTabStops = lcl_getTabStops( xParaProps ).getLength(); } virtual ~TabStopCollectionHelper() {} virtual sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException, std::exception) override { - return maTabStops.getLength(); + return mnTabStops; } virtual uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override { if ( Index < 0 || Index >= getCount() ) throw css::lang::IndexOutOfBoundsException(); - const style::TabStop* pTabs = maTabStops.getConstArray(); - return uno::makeAny( uno::Reference< word::XTabStop >( new SwVbaTabStop( mxParent, mxContext, mxParaProps, pTabs[ Index ] ) ) ); + return uno::makeAny( uno::Reference< word::XTabStop >( new SwVbaTabStop( mxParent, mxContext, mxParaProps ) ) ); } virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException, std::exception) override { @@ -222,7 +222,7 @@ uno::Reference< word::XTabStop > SAL_CALL SwVbaTabStops::Add( float Position, co else lcl_setTabStops( mxParaProps, aNewTabs ); - return uno::Reference< word::XTabStop >( new SwVbaTabStop( this, mxContext, mxParaProps, aTab ) ); + return uno::Reference< word::XTabStop >( new SwVbaTabStop( this, mxContext, mxParaProps ) ); } void SAL_CALL SwVbaTabStops::ClearAll() throw (uno::RuntimeException, std::exception) |