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

Stephan Bergmann sbergman at redhat.com
Mon Sep 15 02:58:36 PDT 2014


 sc/source/ui/vba/vbapane.cxx |   13 +++++--------
 sc/source/ui/vba/vbapane.hxx |    9 +++++----
 2 files changed, 10 insertions(+), 12 deletions(-)

New commits:
commit 11b6b13fcc7b8e14e07fd482a4df9cc20a6b1e06
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Sep 15 11:57:09 2014 +0200

    ScVbaPane apparently does not inherit XHelperInterface
    
    ...and thus should simply derive from WeakImplHelper1 instead of
    InheritedHelperInterfaceImpl1?
    
    Change-Id: I0327e767715a648cabee8a4bd46b5ecff3b0f07b

diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx
index d69c0c0..bd02fcb 100644
--- a/sc/source/ui/vba/vbapane.cxx
+++ b/sc/source/ui/vba/vbapane.cxx
@@ -31,9 +31,10 @@ ScVbaPane::ScVbaPane(
         const uno::Reference< uno::XComponentContext >& xContext,
         const uno::Reference< frame::XModel >& xModel,
         const uno::Reference< sheet::XViewPane > xViewPane ) throw (uno::RuntimeException) :
-    ScVbaPane_BASE( xParent, xContext ),
     m_xModel( xModel, uno::UNO_SET_THROW ),
-    m_xViewPane( xViewPane, uno::UNO_SET_THROW )
+    m_xViewPane( xViewPane, uno::UNO_SET_THROW ),
+    m_xParent(xParent),
+    m_xContext(xContext)
 {
 }
 
@@ -78,8 +79,8 @@ ScVbaPane::getVisibleRange() throw (uno::RuntimeException, std::exception)
     uno::Reference< container::XIndexAccess > xSheetsIA( xDoc->getSheets(), uno::UNO_QUERY_THROW );
     uno::Reference< sheet::XSpreadsheet > xSheet( xSheetsIA->getByIndex( aRangeAddr.Sheet ), uno::UNO_QUERY_THROW );
     uno::Reference< table::XCellRange > xRange( xSheet->getCellRangeByPosition( aRangeAddr.StartColumn, aRangeAddr.StartRow, aRangeAddr.EndColumn, aRangeAddr.EndRow ), uno::UNO_SET_THROW );
-    // TODO: getParent() returns the window, Range needs the worksheet
-    return new ScVbaRange( getParent(), mxContext, xRange );
+    // TODO: m_xParent is the window, Range needs the worksheet
+    return new ScVbaRange( m_xParent, m_xContext, xRange );
 }
 
 //Method
@@ -191,8 +192,4 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
     m_xViewPane->setFirstVisibleColumn( newStartCol );
 }
 
-// XHelperInterface
-
-VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaPane, "ooo.vba.excel.Pane" )
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx
index 7e9eaa0..6455199 100644
--- a/sc/source/ui/vba/vbapane.hxx
+++ b/sc/source/ui/vba/vbapane.hxx
@@ -24,7 +24,7 @@
 #include <vbahelper/vbahelperinterface.hxx>
 #include "excelvbahelper.hxx"
 
-typedef InheritedHelperInterfaceImpl1< ov::excel::XPane > ScVbaPane_BASE;
+typedef cppu::WeakImplHelper1< ov::excel::XPane > ScVbaPane_BASE;
 
 class ScVbaPane : public ScVbaPane_BASE
 {
@@ -48,12 +48,13 @@ public:
     virtual void SAL_CALL SmallScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     virtual void SAL_CALL LargeScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
-    // XHelperInterface
-    VBAHELPER_DECL_XHELPERINTERFACE
-
 protected:
     css::uno::Reference< css::frame::XModel > m_xModel;
     css::uno::Reference< css::sheet::XViewPane > m_xViewPane;
+
+private:
+    css::uno::WeakReference< ov::XHelperInterface > m_xParent;
+    css::uno::Reference< css::uno::XComponentContext > m_xContext;
 };
 
 #endif // INCLUDED_SC_SOURCE_UI_VBA_VBAPANE_HXX


More information about the Libreoffice-commits mailing list