diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-09-15 11:57:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-15 11:57:09 +0200 |
commit | 11b6b13fcc7b8e14e07fd482a4df9cc20a6b1e06 (patch) | |
tree | 79ff10281d29dc4a6977196c3aebc7cbef6ed27a /sc | |
parent | 416723d29938556aaeca8bc8805209e394d30939 (diff) |
ScVbaPane apparently does not inherit XHelperInterface
...and thus should simply derive from WeakImplHelper1 instead of
InheritedHelperInterfaceImpl1?
Change-Id: I0327e767715a648cabee8a4bd46b5ecff3b0f07b
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/vba/vbapane.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/vba/vbapane.hxx | 9 |
2 files changed, 10 insertions, 12 deletions
diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx index d69c0c0600b6..bd02fcb8b60e 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 7e9eaa0079ed..64551991be71 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 |