30#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
36using namespace css::uno;
49 const OUString& rsResourceURL,
50 const ::css::uno::Sequence<css::beans::PropertyValue>& rArguments)
52 Reference<ui::XUIElement> xElement;
56 const ::comphelper::NamedValueCollection
aArguments (rArguments);
57 Reference<frame::XFrame>
xFrame (
aArguments.getOrDefault(
"Frame", Reference<frame::XFrame>()));
58 Reference<awt::XWindow> xParentWindow (
aArguments.getOrDefault(
"ParentWindow", Reference<awt::XWindow>()));
59 const sal_uInt64 nBindingsValue (
aArguments.getOrDefault(
"SfxBindings", sal_uInt64(0)));
64 pParent = pTunnel->getWidget();
68 "PanelFactory::createUIElement called without ParentWindow",
72 "PanelFactory::createUIElement called without Frame",
74 if (pBindings ==
nullptr)
76 "PanelFactory::createUIElement called without SfxBindings",
79 sal_Int32 nMinimumSize = -1;
80 std::unique_ptr<PanelLayout> xPanel;
81 if (rsResourceURL.endsWith(
"/AlignmentPropertyPanel"))
83 else if (rsResourceURL.endsWith(
"/CellAppearancePropertyPanel"))
85 else if (rsResourceURL.endsWith(
"/NumberFormatPropertyPanel"))
87 else if (rsResourceURL.endsWith(
"/NavigatorPanel"))
89 xPanel = std::make_unique<ScNavigatorDlg>(pBindings, pParent,
nullptr);
92 else if (rsResourceURL.endsWith(
"/FunctionsPanel"))
94 xPanel = std::make_unique<ScFunctionWin>(pParent);
103 ui::LayoutSize(nMinimumSize,-1,-1));
105 catch (
const uno::RuntimeException &)
109 catch (
const uno::Exception&)
112 throw lang::WrappedTargetRuntimeException(
113 "ScPanelFactory::createUIElement exception",
122 return "org.apache.openoffice.comp.sc.sidebar.ScPanelFactory";
132 return {
"com.sun.star.ui.UIElementFactory" };
137extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ScPanelFactory_get_implementation(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< XFrame > xFrame