24#include <com/sun/star/view/XSelectionSupplier.hpp>
25#include <com/sun/star/chart2/XDiagram.hpp>
29#include <LibreOfficeKit/LibreOfficeKitEnums.h>
39 return pToolBoxLineStyleControl;
46 return pToolBoxColorControl;
51 css::uno::Reference<css::frame::XController>
xController(
xModel->getCurrentController());
52 css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
53 if (!xSelectionSupplier.is())
56 css::uno::Any aAny = xSelectionSupplier->getSelection();
66css::uno::Reference<css::beans::XPropertySet> getPropSet(
69 OUString aCID = getCID(xModel);
70 css::uno::Reference<css::beans::XPropertySet> xPropSet =
76 css::uno::Reference<css::chart2::XDiagram> xDiagram(
77 xPropSet, css::uno::UNO_QUERY);
81 xPropSet.set(xDiagram->getWall());
90 explicit PreventUpdate(
bool& bUpdate):
109 const css::uno::Reference<css::frame::XFrame>& rxFrame,
112 if (pParent ==
nullptr)
113 throw css::lang::IllegalArgumentException(
"no parent Window given to ChartAxisPanel::Create",
nullptr, 0);
115 throw css::lang::IllegalArgumentException(
"no XFrame given to ChartAxisPanel::Create",
nullptr, 1);
117 return std::make_unique<ChartLinePanel>(pParent, rxFrame, pController);
121 const css::uno::Reference<css::frame::XFrame>& rxFrame,
123 svx::sidebar::LinePropertyPanelBase(pParent, rxFrame),
124 mxModel(pController->getChartModel()),
129 maLineColorWrapper(
mxModel, getColorToolBoxControl(*mxColorDispatch),
"LineColor"),
130 maLineStyleWrapper(
mxModel, getLineStyleToolBoxControl(*mxLineStyleDispatch))
150 css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(
mxModel->getCurrentController(), css::uno::UNO_QUERY);
151 if (xSelectionSupplier.is())
170 css::uno::Reference<css::beans::XPropertySet> xPropSet = getPropSet(
mxModel);
174 sal_uInt16 nLineTransparence = 0;
175 xPropSet->getPropertyValue(
"LineTransparence") >>= nLineTransparence;
179 sal_uInt32 nWidth = 0;
180 xPropSet->getPropertyValue(
"LineWidth") >>= nWidth;
205 css::uno::Reference<css::view::XSelectionSupplier> oldSelectionSupplier(
206 mxModel->getCurrentController(), css::uno::UNO_QUERY);
207 if (oldSelectionSupplier.is()) {
223 css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(
mxModel->getCurrentController(), css::uno::UNO_QUERY);
224 if (xSelectionSupplier.is())
230 ::chart::ChartModel* pModel =
dynamic_cast<::chart::ChartModel*
>(
xModel.get());
231 assert(!
xModel || pModel);
237 css::uno::Reference<css::beans::XPropertySet> xPropSet =
243 PreventUpdate aPreventUpdate(
mbUpdate);
245 xPropSet->setPropertyValue(
"LineJoint", css::uno::Any(pItem->GetValue()));
254 css::uno::Reference<css::beans::XPropertySet> xPropSet =
260 PreventUpdate aPreventUpdate(
mbUpdate);
261 xPropSet->setPropertyValue(
"LineTransparence", css::uno::Any(rItem.GetValue()));
266 css::uno::Reference<css::beans::XPropertySet> xPropSet =
272 PreventUpdate aPreventUpdate(
mbUpdate);
273 xPropSet->setPropertyValue(
"LineWidth", css::uno::Any(rItem.GetValue()));
278 LinePropertyPanelBase::updateLineWidth(bDisabled, bSetOrDefault, pItem);
css::uno::Reference< css::frame::XModel2 > mxModel
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
static css::uno::Reference< css::beans::XPropertySet > getObjectPropertySet(std::u16string_view rObjectCID, const rtl::Reference< ::chart::ChartModel > &xChartDocument)
ObjectType getObjectType() const
Reference< script::XScriptListener > mxListener
@ OBJECTTYPE_DATA_AVERAGE_LINE
Reference< XController > xController
Reference< XModel > xModel