[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Thu Nov 26 07:29:29 PST 2015


 sw/source/ui/vba/vbatabstop.cxx  |    2 +-
 sw/source/ui/vba/vbatabstop.hxx  |    4 +---
 sw/source/ui/vba/vbatabstops.cxx |   12 ++++++------
 3 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 88b78bfb16a564b012559ebaf324e93835cfd6c4
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Nov 26 16:28:49 2015 +0100

    -Werror,-Wunused-private-field
    
    Change-Id: If8faa69302775cdd24bc6f45713eb246c9210745

diff --git a/sw/source/ui/vba/vbatabstop.cxx b/sw/source/ui/vba/vbatabstop.cxx
index 55b32f6..8979ebc 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 857b55e..9c5f5c4 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 8315b16..6a90074 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)


More information about the Libreoffice-commits mailing list