Kaydet (Commit) 11b6b13f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

ScVbaPane apparently does not inherit XHelperInterface

...and thus should simply derive from WeakImplHelper1 instead of
InheritedHelperInterfaceImpl1?

Change-Id: I0327e767715a648cabee8a4bd46b5ecff3b0f07b
üst 416723d2
...@@ -31,9 +31,10 @@ ScVbaPane::ScVbaPane( ...@@ -31,9 +31,10 @@ ScVbaPane::ScVbaPane(
const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< frame::XModel >& xModel, const uno::Reference< frame::XModel >& xModel,
const uno::Reference< sheet::XViewPane > xViewPane ) throw (uno::RuntimeException) : const uno::Reference< sheet::XViewPane > xViewPane ) throw (uno::RuntimeException) :
ScVbaPane_BASE( xParent, xContext ),
m_xModel( xModel, uno::UNO_SET_THROW ), 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) ...@@ -78,8 +79,8 @@ ScVbaPane::getVisibleRange() throw (uno::RuntimeException, std::exception)
uno::Reference< container::XIndexAccess > xSheetsIA( xDoc->getSheets(), uno::UNO_QUERY_THROW ); 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< 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 ); 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 // TODO: m_xParent is the window, Range needs the worksheet
return new ScVbaRange( getParent(), mxContext, xRange ); return new ScVbaRange( m_xParent, m_xContext, xRange );
} }
//Method //Method
...@@ -191,8 +192,4 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any ...@@ -191,8 +192,4 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
m_xViewPane->setFirstVisibleColumn( newStartCol ); m_xViewPane->setFirstVisibleColumn( newStartCol );
} }
// XHelperInterface
VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaPane, "ooo.vba.excel.Pane" )
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <vbahelper/vbahelperinterface.hxx> #include <vbahelper/vbahelperinterface.hxx>
#include "excelvbahelper.hxx" #include "excelvbahelper.hxx"
typedef InheritedHelperInterfaceImpl1< ov::excel::XPane > ScVbaPane_BASE; typedef cppu::WeakImplHelper1< ov::excel::XPane > ScVbaPane_BASE;
class ScVbaPane : public ScVbaPane_BASE class ScVbaPane : public ScVbaPane_BASE
{ {
...@@ -48,12 +48,13 @@ public: ...@@ -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 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; 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: protected:
css::uno::Reference< css::frame::XModel > m_xModel; css::uno::Reference< css::frame::XModel > m_xModel;
css::uno::Reference< css::sheet::XViewPane > m_xViewPane; 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 #endif // INCLUDED_SC_SOURCE_UI_VBA_VBAPANE_HXX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment