LibreOffice Module chart2 (master) 1
|
This is a CommandDispatch implementation for drawing objects. More...
#include <DrawCommandDispatch.hxx>
Public Member Functions | |
DrawCommandDispatch (const css::uno::Reference< css::uno::XComponentContext > &rxContext, ChartController *pController) | |
virtual | ~DrawCommandDispatch () override |
virtual bool | isFeatureSupported (const OUString &rCommandURL) override |
void | setAttributes (SdrObject *pObj) |
void | setLineEnds (SfxItemSet &rAttr) |
Public Member Functions inherited from chart::FeatureCommandDispatchBase | |
FeatureCommandDispatchBase (const css::uno::Reference< css::uno::XComponentContext > &rxContext) | |
virtual | ~FeatureCommandDispatchBase () override |
virtual void | initialize () override |
virtual bool | isFeatureSupported (const OUString &rCommandURL) |
Public Member Functions inherited from chart::CommandDispatch | |
CommandDispatch (const css::uno::Reference< css::uno::XComponentContext > &xContext) | |
virtual | ~CommandDispatch () override |
virtual void | initialize () |
Public Member Functions inherited from comphelper::WeakComponentImplHelper< typename... Ifc > | |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual void SAL_CALL | dispose () noexcept final override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
Public Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
virtual | ~WeakComponentImplHelperBase () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual void | disposing (std::unique_lock< std::mutex > &) |
Public Member Functions inherited from comphelper::UnoImplBase | |
virtual | ~UnoImplBase () |
Protected Member Functions | |
virtual void | disposing (std::unique_lock< std::mutex > &rGuard) override |
is called when this is disposed More... | |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
virtual FeatureState | getState (const OUString &rCommand) override |
virtual void | execute (const OUString &rCommand, const css::uno::Sequence< css::beans::PropertyValue > &rArgs) override |
virtual void | describeSupportedFeatures () override |
Protected Member Functions inherited from chart::FeatureCommandDispatchBase | |
virtual void SAL_CALL | dispatch (const css::util::URL &URL, const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override |
virtual void | fireStatusEvent (const OUString &rURL, const css::uno::Reference< css::frame::XStatusListener > &xSingleListener) override |
sends a status event for a specific command to all registered listeners or only the one given when set. More... | |
virtual FeatureState | getState (const OUString &rCommand)=0 |
virtual void | execute (const OUString &rCommand, const css::uno::Sequence< css::beans::PropertyValue > &rArgs)=0 |
virtual void | describeSupportedFeatures ()=0 |
void | implDescribeSupportedFeature (const char *pAsciiCommandURL, ChartCommandID nId, sal_Int16 nGroup) |
describes a feature supported by the controller More... | |
Protected Member Functions inherited from chart::CommandDispatch | |
virtual void | fireStatusEvent (const OUString &rURL, const css::uno::Reference< css::frame::XStatusListener > &xSingleListener)=0 |
sends a status event for a specific command to all registered listeners or only the one given when set. More... | |
void | fireAllStatusEvents (const css::uno::Reference< css::frame::XStatusListener > &xSingleListener) |
calls fireStatusEvent( OUString, xSingleListener ) More... | |
void | fireStatusEventForURL (const OUString &rURL, const css::uno::Any &rState, bool bEnabled, const css::uno::Reference< css::frame::XStatusListener > &xSingleListener) |
sends a status event for a specific command to all registered listeners or only the one given when set. More... | |
virtual void SAL_CALL | dispatch (const css::util::URL &URL, const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override |
virtual void SAL_CALL | addStatusListener (const css::uno::Reference< css::frame::XStatusListener > &Control, const css::util::URL &URL) override |
virtual void SAL_CALL | removeStatusListener (const css::uno::Reference< css::frame::XStatusListener > &Control, const css::util::URL &URL) override |
virtual void | disposing (std::unique_lock< std::mutex > &rGuard) override |
is called when this is disposed More... | |
virtual void SAL_CALL | modified (const css::lang::EventObject &aEvent) override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
void | throwIfDisposed (std::unique_lock< std::mutex > &) |
Private Member Functions | |
void | setInsertObj (SdrObjKind eObj) |
rtl::Reference< SdrObject > | createDefaultObject (const ChartCommandID nID) |
bool | parseCommandURL (const OUString &rCommandURL, ChartCommandID *pnFeatureId, OUString *pBaseCommand, OUString *pCustomShapeType) |
Private Attributes | |
ChartController * | m_pChartController |
OUString | m_aCustomShapeType |
Additional Inherited Members | |
Protected Attributes inherited from chart::FeatureCommandDispatchBase | |
SupportedFeatures | m_aSupportedFeatures |
ChartCommandID | m_nFeatureId |
Protected Attributes inherited from comphelper::WeakComponentImplHelperBase | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | maEventListeners |
Protected Attributes inherited from comphelper::UnoImplBase | |
std::mutex | m_aMutex |
bool | m_bDisposed |
This is a CommandDispatch implementation for drawing objects.
Definition at line 35 of file DrawCommandDispatch.hxx.
chart::DrawCommandDispatch::DrawCommandDispatch | ( | const css::uno::Reference< css::uno::XComponentContext > & | rxContext, |
ChartController * | pController | ||
) |
Definition at line 57 of file DrawCommandDispatch.cxx.
|
overridevirtual |
Definition at line 64 of file DrawCommandDispatch.cxx.
|
private |
Definition at line 404 of file DrawCommandDispatch.cxx.
References Point::AdjustX(), Point::AdjustY(), basegfx::B2DPolyPolygon::append(), basegfx::B2DPolygon::append(), basegfx::B2DPolygon::appendBezierSegment(), tools::Rectangle::Bottom(), tools::Rectangle::BottomRight(), tools::Rectangle::Center(), DrawCaption, DrawCaptionVertical, DrawFreelineNoFill, DrawLine, DrawLineArrowEnd, DrawText, DrawTextVertical, DynCastSdrTextObj(), SdrCreateView::GetCurrentObjIdentifier(), SdrCreateView::GetCurrentObjInventor(), chart::ChartController::GetDrawModelWrapper(), chart::ChartController::GetDrawViewWrapper(), tools::Rectangle::GetHeight(), chart::DrawModelWrapper::GetItemPool(), chart::DrawModelWrapper::getMainDrawPage(), chart::DrawModelWrapper::getSdrModel(), GetSdrPageFromXDrawPage(), SdrPage::GetSize(), tools::Rectangle::GetWidth(), Size::Height(), tools::Rectangle::Left(), m_pChartController, SdrObjFactory::MakeNewObject(), makeSdrTextAutoGrowHeightItem(), makeSdrTextAutoGrowWidthItem(), SfxItemSet::Put(), tools::Rectangle::Right(), SDRTEXTHORZADJUST_RIGHT, SDRTEXTVERTADJUST_CENTER, SDRTEXTVERTADJUST_TOP, setAttributes(), setLineEnds(), tools::Rectangle::Top(), tools::Rectangle::TopLeft(), Size::Width(), Point::X(), and Point::Y().
Referenced by execute().
|
overrideprotectedvirtual |
Implements chart::FeatureCommandDispatchBase.
Definition at line 377 of file DrawCommandDispatch.cxx.
References DrawCaption, DrawEllipse, DrawFreelineNoFill, DrawLine, DrawLineArrowEnd, DrawObjectSelect, DrawRect, DrawText, DrawToolboxCsArrow, DrawToolboxCsBasic, DrawToolboxCsCallout, DrawToolboxCsFlowchart, DrawToolboxCsStar, DrawToolboxCsSymbol, and chart::FeatureCommandDispatchBase::implDescribeSupportedFeature().
|
overrideprotectedvirtual |
Reimplemented from chart::CommandDispatch.
|
overrideprotectedvirtual |
is called when this is disposed
Reimplemented from chart::CommandDispatch.
Definition at line 204 of file DrawCommandDispatch.cxx.
|
overrideprotectedvirtual |
Implements chart::FeatureCommandDispatchBase.
Definition at line 257 of file DrawCommandDispatch.cxx.
References chart::CHARTDRAW_INSERT, chart::CHARTDRAW_SELECT, createDefaultObject(), DrawCaption, DrawEllipse, DrawFreelineNoFill, DrawLine, DrawLineArrowEnd, DrawObjectSelect, DrawRect, DrawText, DrawToolboxCsArrow, DrawToolboxCsBasic, DrawToolboxCsCallout, DrawToolboxCsFlowchart, DrawToolboxCsStar, DrawToolboxCsSymbol, chart::ChartController::GetDrawViewWrapper(), SdrPaintView::GetSdrPageView(), SdrEditView::InsertObjectAtView(), KEY_MOD1, m_aCustomShapeType, chart::FeatureCommandDispatchBase::m_nFeatureId, m_pChartController, NONE, parseCommandURL(), chart::ChartController::SetAndApplySelection(), SdrCreateView::SetCreateMode(), chart::ChartController::setDrawMode(), setInsertObj(), and chart::ChartController::StartTextEdit().
|
overrideprotectedvirtual |
Implements chart::FeatureCommandDispatchBase.
Definition at line 213 of file DrawCommandDispatch.cxx.
References chart::FeatureState::aState, chart::FeatureState::bEnabled, DrawCaption, DrawEllipse, DrawFreelineNoFill, DrawLine, DrawLineArrowEnd, DrawObjectSelect, DrawRect, DrawText, DrawToolboxCsArrow, DrawToolboxCsBasic, DrawToolboxCsCallout, DrawToolboxCsFlowchart, DrawToolboxCsStar, DrawToolboxCsSymbol, NONE, and parseCommandURL().
|
overridevirtual |
Reimplemented from chart::FeatureCommandDispatchBase.
Definition at line 68 of file DrawCommandDispatch.cxx.
References NONE, and parseCommandURL().
Referenced by chart::CommandDispatchContainer::getDispatchForURL().
|
private |
Definition at line 528 of file DrawCommandDispatch.cxx.
References DrawToolboxCsArrow, DrawToolboxCsBasic, DrawToolboxCsCallout, DrawToolboxCsFlowchart, DrawToolboxCsStar, DrawToolboxCsSymbol, o3tl::getToken(), chart::FeatureCommandDispatchBase::m_aSupportedFeatures, nIndex, and NONE.
Referenced by execute(), getState(), and isFeatureSupported().
void chart::DrawCommandDispatch::setAttributes | ( | SdrObject * | pObj | ) |
Definition at line 97 of file DrawCommandDispatch.cxx.
References aObjList, tools::Rectangle::Center(), EE_ITEMS_END(), EE_ITEMS_START(), equalsIgnoreAsciiCase(), GalleryExplorer::FillObjListTitle(), SfxItemPool::FreezeIdRanges(), GALLERY_THEME_POWERPOINT, SdrCreateView::GetCurrentObjIdentifier(), chart::ChartController::GetDrawModelWrapper(), chart::ChartController::GetDrawViewWrapper(), SdrModel::GetItemPool(), SdrObject::GetMergedItemSet(), SdrObjList::GetObj(), SdrModel::GetPage(), SdrObject::GetRotateAngle(), SdrObject::getSdrModelFromSdrObject(), GalleryExplorer::GetSdrObj(), GalleryExplorer::GetSdrObjCount(), SdrObject::GetSnapRect(), i, m_aCustomShapeType, m_pChartController, makeSdrTextAutoGrowHeightItem(), SdrObject::NbcRotate(), SDRATTR_CUSTOMSHAPE_LAST(), SDRATTR_GRAF_FIRST(), SDRATTR_MISC_FIRST(), SDRATTR_MISC_LAST(), SDRATTR_SHADOW_LAST(), SDRATTR_START(), SDRATTR_TEXTDIRECTION(), SDRTEXTHORZADJUST_BLOCK, SDRTEXTVERTADJUST_CENTER, SdrObject::SetMergedItem(), and SdrObject::SetMergedItemSet().
Referenced by createDefaultObject(), and chart::ChartController::execute_MouseButtonDown().
|
private |
Definition at line 395 of file DrawCommandDispatch.cxx.
References chart::ChartController::GetDrawViewWrapper(), m_pChartController, and SdrCreateView::SetCurrentObj().
Referenced by execute().
void chart::DrawCommandDispatch::setLineEnds | ( | SfxItemSet & | rAttr | ) |
Definition at line 165 of file DrawCommandDispatch.cxx.
References basegfx::B2DPolyPolygon::append(), basegfx::B2DPolygon::append(), basegfx::B2DPolyPolygon::count(), DrawLineArrowEnd, SfxItemSet::Get(), SdrView::GetAttributes(), chart::ChartController::GetDrawModelWrapper(), chart::ChartController::GetDrawViewWrapper(), SdrModel::GetItemPool(), SfxItemSet::GetItemState(), SdrPaintView::GetModel(), chart::getPolygon(), chart::DrawModelWrapper::getSdrModel(), chart::FeatureCommandDispatchBase::m_nFeatureId, m_pChartController, nValue, SfxItemSet::Put(), basegfx::B2DPolygon::setClosed(), SvxResId(), and XATTR_LINEWIDTH().
Referenced by createDefaultObject(), and chart::ChartController::execute_MouseButtonDown().
|
private |
Definition at line 69 of file DrawCommandDispatch.hxx.
Referenced by execute(), and setAttributes().
|
private |
Definition at line 68 of file DrawCommandDispatch.hxx.
Referenced by createDefaultObject(), execute(), setAttributes(), setInsertObj(), and setLineEnds().