21 #include <com/sun/star/lang/IllegalArgumentException.hpp>
31 const css::uno::Reference<css::frame::XFrame>& rxFrame)
32 :
PanelLayout(pParent,
"DefaultShapesPanel",
"svx/ui/defaultshapespanel.ui")
33 , mxLineArrowSet(new
ValueSet(nullptr))
34 , mxLineArrowSetWin(new
weld::CustomWeld(*m_xBuilder,
"LinesArrows", *mxLineArrowSet))
36 , mxCurveSetWin(new
weld::CustomWeld(*m_xBuilder,
"Curves", *mxCurveSet))
37 , mxConnectorSet(new
ValueSet(nullptr))
38 , mxConnectorSetWin(new
weld::CustomWeld(*m_xBuilder,
"Connectors", *mxConnectorSet))
39 , mxBasicShapeSet(new
ValueSet(nullptr))
40 , mxBasicShapeSetWin(new
weld::CustomWeld(*m_xBuilder,
"BasicShapes", *mxBasicShapeSet))
41 , mxSymbolShapeSet(new
ValueSet(nullptr))
42 , mxSymbolShapeSetWin(new
weld::CustomWeld(*m_xBuilder,
"SymbolShapes", *mxSymbolShapeSet))
43 , mxBlockArrowSet(new
ValueSet(nullptr))
44 , mxBlockArrowSetWin(new
weld::CustomWeld(*m_xBuilder,
"BlockArrows", *mxBlockArrowSet))
45 , mxFlowchartSet(new
ValueSet(nullptr))
46 , mxFlowchartSetWin(new
weld::CustomWeld(*m_xBuilder,
"Flowcharts", *mxFlowchartSet))
47 , mxCalloutSet(new
ValueSet(nullptr))
48 , mxCalloutSetWin(new
weld::CustomWeld(*m_xBuilder,
"Callouts", *mxCalloutSet))
50 , mxStarSetWin(new
weld::CustomWeld(*m_xBuilder,
"Stars", *mxStarSet))
51 , mx3DObjectSet(new
ValueSet(nullptr))
52 , mx3DObjectSetWin(new
weld::CustomWeld(*m_xBuilder,
"3DObjects", *mx3DObjectSet))
62 if (pParent ==
nullptr)
63 throw lang::IllegalArgumentException(
"no parent Window given to DefaultShapesPanel::Create",
nullptr, 0);
65 throw lang::IllegalArgumentException(
"no XFrame given to DefaultShapesPanel::Create",
nullptr, 1);
67 return std::make_unique<DefaultShapesPanel>(pParent, rxFrame);
119 for(
auto& aSetMap : mpShapesSetMap)
121 if(rValueSet == aSetMap.first)
123 sal_uInt16 nSelectionId = aSetMap.first->GetSelectedItemId();
127 aSetMap.first->SetNoSelection();
133 OUString sSlotStr, sLabel;
137 aSet.first->SetColCount(6);
138 for(std::map<sal_uInt16, OUString>::size_type
i = 0;
i < aSet.second.size();
i++)
140 sSlotStr = aSet.second[
i];
145 sal_uInt16 nSelectionId =
i + 1;
146 aSet.first->InsertItem(nSelectionId, aSlotImage, sLabel);
#define LINK(Instance, Class, Member)
static const AllSettings & GetSettings()
PropertiesInfo aProperties
bool dispatchCommand(const OUString &rCommand, const uno::Reference< css::frame::XFrame > &rFrame, const css::uno::Sequence< css::beans::PropertyValue > &rArguments, const uno::Reference< css::frame::XDispatchResultListener > &rListener)
Image GetImageForCommand(const OUString &rsCommandName, const Reference< frame::XFrame > &rxFrame, vcl::ImageType eImageType)
OUString GetModuleIdentifier(const Reference< frame::XFrame > &rxFrame)
Sequence< beans::PropertyValue > GetCommandProperties(const OUString &rsCommandName, const OUString &rsModuleName)
OUString GetTooltipForCommand(const OUString &rsCommandName, const css::uno::Sequence< css::beans::PropertyValue > &rProperties, const Reference< frame::XFrame > &rxFrame)