diff options
Diffstat (limited to 'chart2/source/controller/main/ChartController_Tools.cxx')
-rw-r--r-- | chart2/source/controller/main/ChartController_Tools.cxx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 6ec875364fda..c06234ef7a0b 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -52,6 +52,8 @@ #include <com/sun/star/drawing/TextHorizontalAdjust.hpp> #include <com/sun/star/chart/ErrorBarStyle.hpp> +#include <editeng/editview.hxx> +#include <editeng/outliner.hxx> #include <svx/ActionDescriptionProvider.hxx> #include <svtools/transfer.hxx> #include <sot/storage.hxx> @@ -70,6 +72,8 @@ #include <svx/unoapi.hxx> #include <svx/unopage.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> + #include <memory> using namespace ::com::sun::star; @@ -927,6 +931,37 @@ void ChartController::executeDispatch_ToggleGridVertical() } } +void ChartController::executeDispatch_LOKSetTextSelection(int nType, int nX, int nY) +{ + if (m_pDrawViewWrapper) + { + if (m_pDrawViewWrapper->IsTextEdit()) + { + OutlinerView* pOutlinerView = m_pDrawViewWrapper->GetTextEditOutlinerView(); + if (pOutlinerView) + { + EditView& rEditView = pOutlinerView->GetEditView(); + Point aPoint(convertTwipToMm100(nX), convertTwipToMm100(nY)); + switch (nType) + { + case LOK_SETTEXTSELECTION_START: + rEditView.SetCursorLogicPosition(aPoint, /*bPoint=*/false, /*bClearMark=*/false); + break; + case LOK_SETTEXTSELECTION_END: + rEditView.SetCursorLogicPosition(aPoint, /*bPoint=*/true, /*bClearMark=*/false); + break; + case LOK_SETTEXTSELECTION_RESET: + rEditView.SetCursorLogicPosition(aPoint, /*bPoint=*/true, /*bClearMark=*/true); + break; + default: + assert(false); + break; + } + } + } + } +} + void ChartController::impl_ShapeControllerDispatch( const util::URL& rURL, const Sequence< beans::PropertyValue >& rArgs ) { Reference< frame::XDispatch > xDispatch( m_aDispatchContainer.getShapeController() ); |