diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2017-03-21 02:49:55 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2017-03-23 18:53:24 +0000 |
commit | f0a6f3549e7fd6a91037b6edc661740058754579 (patch) | |
tree | 1cbd79d7b32eb7881d1925442914164983eba1a5 /chart2 | |
parent | 3d53ec9b2d1c4514adf90ea68915f20ce4d5bc81 (diff) |
Lets not call 1/2 of everyone we know friend...
...esp. when they tend try to own our private parts.
Lets be honest here. Also remove pointless repeated private:s.
Change-Id: Idaa7621fbe812ef25f13bba1882a16cca4de9d61
Reviewed-on: https://gerrit.libreoffice.org/35600
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/inc/ChartController.hxx | 9 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 11 | ||||
-rw-r--r-- | chart2/source/controller/main/DrawCommandDispatch.cxx | 7 |
3 files changed, 14 insertions, 13 deletions
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx index 7dfcfa688f56..1272f14ac3f4 100644 --- a/chart2/source/controller/inc/ChartController.hxx +++ b/chart2/source/controller/inc/ChartController.hxx @@ -101,8 +101,6 @@ class ChartController : public ::cppu::WeakImplHelper < ,css::frame::XLayoutManagerListener > { - friend class DrawCommandDispatch; - public: ChartController() = delete; explicit ChartController(css::uno::Reference< css::uno::XComponentContext > const & xContext); @@ -324,6 +322,8 @@ public: DrawViewWrapper* GetDrawViewWrapper(); VclPtr<ChartWindow> GetChartWindow(); bool isAdditionalShapeSelected(); + void SetAndApplySelection(const css::uno::Reference<css::drawing::XShape>& rxShape); + void StartTextEdit( const Point* pMousePixel = nullptr ); DECL_LINK( NotifyUndoActionHdl, SdrUndoAction*, void ); @@ -369,7 +369,6 @@ private: ::osl::Mutex& m_rModelMutex; }; -private: mutable ::apphelper::LifeTimeManager m_aLifeTimeManager; bool m_bSuspended; @@ -413,9 +412,6 @@ private: rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler; -private: - //private methods - bool impl_isDisposedOrSuspended() const; ReferenceSizeProvider* impl_createReferenceSizeProvider(); void impl_adaptDataSeriesAutoResize(); @@ -476,7 +472,6 @@ private: void executeDispatch_SourceData(); void executeDispatch_MoveSeries( bool bForward ); - void StartTextEdit( const Point* pMousePixel = nullptr ); bool EndTextEdit(); void executeDispatch_View3D(); diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index f4e9f4c11fab..abcdeea845d1 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -66,6 +66,7 @@ #include <com/sun/star/ui/XSidebar.hpp> #include <com/sun/star/chart2/XChartTypeContainer.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> +#include <com/sun/star/drawing/XShape.hpp> #include <svx/sidebar/SelectionChangeHandler.hxx> #include <vcl/msgbox.hxx> @@ -1456,6 +1457,16 @@ bool ChartController::isAdditionalShapeSelected() return m_aSelection.isAdditionalShapeSelected(); } +void ChartController::SetAndApplySelection(const Reference<drawing::XShape>& rxShape) +{ + if(rxShape.is()) + { + m_aSelection.setSelection(rxShape); + m_aSelection.applySelection(GetDrawViewWrapper()); + } +} + + uno::Reference< XAccessible > ChartController::CreateAccessible() { diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index e52994d1aa9a..9519df44556c 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -384,12 +384,7 @@ void DrawCommandDispatch::execute( const OUString& rCommand, const Sequence< bea { SdrPageView* pPageView = pDrawViewWrapper->GetSdrPageView(); pDrawViewWrapper->InsertObjectAtView( pObj, *pPageView ); - Reference< drawing::XShape > xShape( pObj->getUnoShape(), uno::UNO_QUERY ); - if ( xShape.is() ) - { - m_pChartController->m_aSelection.setSelection( xShape ); - m_pChartController->m_aSelection.applySelection( pDrawViewWrapper ); - } + m_pChartController->SetAndApplySelection(Reference<drawing::XShape>(pObj->getUnoShape(), uno::UNO_QUERY)); if ( nFeatureId == COMMAND_ID_DRAW_TEXT ) { m_pChartController->StartTextEdit(); |