35#include <com/sun/star/uno/XComponentContext.hpp>
42using namespace css::uno;
60 const OUString& rsUIElementResourceURL,
61 const css::uno::Sequence<css::beans::PropertyValue>& rArguments)
64 const ::comphelper::NamedValueCollection
aArguments (rArguments);
65 Reference<frame::XFrame>
xFrame (
aArguments.getOrDefault(
"Frame", Reference<frame::XFrame>()));
66 Reference<awt::XWindow> xParentWindow (
aArguments.getOrDefault(
"ParentWindow", Reference<awt::XWindow>()));
67 Reference<ui::XSidebar> xSidebar (
aArguments.getOrDefault(
"Sidebar", Reference<ui::XSidebar>()));
72 pParent = pTunnel->getWidget();
75 throw RuntimeException(
76 "PanelFactory::createUIElement called without ParentWindow");
78 throw RuntimeException(
79 "PanelFactory::createUIElement called without XFrame");
84 if (pController !=
nullptr)
85 pBase = pController->GetViewShellBase();
87 throw RuntimeException(
"can not get ViewShellBase for frame");
90 const sal_uInt64 nBindingsValue (
aArguments.getOrDefault(
"SfxBindings", sal_uInt64(0)));
94 std::unique_ptr<PanelLayout> xControl;
95 css::ui::LayoutSize aLayoutSize (-1,-1,-1);
101 if (rsUIElementResourceURL.endsWith(
"/CustomAnimations"))
102 xControl = std::make_unique<CustomAnimationPane>(pParent, *pBase);
103 else if (rsUIElementResourceURL.endsWith(
"/Layouts"))
104 xControl = std::make_unique<LayoutMenu>(pParent, *pBase, xSidebar);
105 else if (rsUIElementResourceURL.endsWith(
"/AllMasterPages"))
107 else if (rsUIElementResourceURL.endsWith(
"/RecentMasterPages"))
109 else if (rsUIElementResourceURL.endsWith(
"/UsedMasterPages"))
111 else if (rsUIElementResourceURL.endsWith(
"/SlideTransitions"))
112 xControl = std::make_unique<SlideTransitionPane>(pParent, *pBase);
113 else if (rsUIElementResourceURL.endsWith(
"/TableDesign"))
114 xControl = std::make_unique<TableDesignPane>(pParent, *pBase);
115 else if (rsUIElementResourceURL.endsWith(
"/NavigatorPanel"))
116 xControl = std::make_unique<NavigatorWrapper>(pParent, *pBase, pBindings);
117 else if (rsUIElementResourceURL.endsWith(
"/SlideBackgroundPanel"))
118 xControl = std::make_unique<SlideBackground>(pParent, *pBase,
xFrame, pBindings);
121 throw lang::IllegalArgumentException();
126 rsUIElementResourceURL,
133 return "org.openoffice.comp.Draw.framework.PanelFactory";
141 return {
"com.sun.star.drawing.framework.PanelFactory"};
147extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
149 css::uno::Sequence<css::uno::Any>
const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_openoffice_comp_Draw_framework_PanelFactory_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
The DrawController is the UNO controller for Impress and Draw.
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
Sequence< PropertyValue > aArguments
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Reference< XFrame > xFrame