23#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
38using namespace css::uno;
51 const OUString& rsResourceURL,
52 const ::css::uno::Sequence<css::beans::PropertyValue>& rArguments)
58 const ::comphelper::NamedValueCollection
aArguments (rArguments);
65 pParent = pTunnel->getWidget();
69 "PanelFactory::createUIElement called without ParentWindow",
73 "PanelFactory::createUIElement called without Frame",
77 "ChartPanelFactory::createUIElement called without Controller",
83 "ChartPanelFactory::createUIElement called without valid ChartController",
86 std::unique_ptr<PanelLayout> xPanel;
87 if (rsResourceURL.endsWith(
"/ElementsPanel"))
89 else if (rsResourceURL.endsWith(
"/TypePanel"))
90 xPanel = std::make_unique<ChartTypePanel>(pParent, pController);
91 else if (rsResourceURL.endsWith(
"/SeriesPanel"))
93 else if (rsResourceURL.endsWith(
"/AxisPanel"))
95 else if (rsResourceURL.endsWith(
"/ErrorBarPanel"))
97 else if (rsResourceURL.endsWith(
"/AreaPanel"))
99 else if (rsResourceURL.endsWith(
"/LinePanel"))
107 css::ui::LayoutSize(-1,-1,-1));
109 catch (
const css::uno::RuntimeException &)
113 catch (
const css::uno::Exception&)
116 throw css::lang::WrappedTargetRuntimeException(
117 "ChartPanelFactory::createUIElement exception",
126 return "org.libreoffice.comp.chart2.sidebar.ChartPanelFactory";
136 return {
"com.sun.star.ui.UIElementFactory" };
141extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
144 return cppu::acquire(new ::chart::sidebar::ChartPanelFactory());
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_libreoffice_comp_chart2_sidebar_ChartPanelFactory(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Sequence< PropertyValue > aArguments
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Any SAL_CALL getCaughtException()
Reference< XController > xController
Reference< XFrame > xFrame