PanelFactory.cxx (f35c6d02) PanelFactory.cxx (ae13266d)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 104 unchanged lines hidden (view full) ---

113 RuntimeException)
114{
115 const ::comphelper::NamedValueCollection aArguments (rArguments);
116 Reference<frame::XFrame> xFrame (aArguments.getOrDefault("Frame", Reference<frame::XFrame>()));
117 Reference<awt::XWindow> xParentWindow (aArguments.getOrDefault("ParentWindow", Reference<awt::XWindow>()));
118 Reference<ui::XSidebar> xSidebar (aArguments.getOrDefault("Sidebar", Reference<ui::XSidebar>()));
119 const sal_uInt64 nBindingsValue (aArguments.getOrDefault("SfxBindings", sal_uInt64(0)));
120 SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue);
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 104 unchanged lines hidden (view full) ---

113 RuntimeException)
114{
115 const ::comphelper::NamedValueCollection aArguments (rArguments);
116 Reference<frame::XFrame> xFrame (aArguments.getOrDefault("Frame", Reference<frame::XFrame>()));
117 Reference<awt::XWindow> xParentWindow (aArguments.getOrDefault("ParentWindow", Reference<awt::XWindow>()));
118 Reference<ui::XSidebar> xSidebar (aArguments.getOrDefault("Sidebar", Reference<ui::XSidebar>()));
119 const sal_uInt64 nBindingsValue (aArguments.getOrDefault("SfxBindings", sal_uInt64(0)));
120 SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue);
121 ::sfx2::sidebar::EnumContext aContext (
122 aArguments.getOrDefault("ApplicationName", OUString()),
123 aArguments.getOrDefault("ContextName", OUString()));
121
122 ::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
123 if ( ! xParentWindow.is() || pParentWindow==NULL)
124 throw RuntimeException(
125 A2S("PanelFactory::createUIElement called without ParentWindow"),
126 NULL);
127 if ( ! xFrame.is())
128 throw RuntimeException(

--- 5 unchanged lines hidden (view full) ---

134 NULL);
135
136 Window* pControl = NULL;
137 ui::LayoutSize aLayoutSize (-1,-1,-1);
138
139#define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s))
140 if (DoesResourceEndWith("/TextPropertyPanel"))
141 {
124
125 ::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
126 if ( ! xParentWindow.is() || pParentWindow==NULL)
127 throw RuntimeException(
128 A2S("PanelFactory::createUIElement called without ParentWindow"),
129 NULL);
130 if ( ! xFrame.is())
131 throw RuntimeException(

--- 5 unchanged lines hidden (view full) ---

137 NULL);
138
139 Window* pControl = NULL;
140 ui::LayoutSize aLayoutSize (-1,-1,-1);
141
142#define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s))
143 if (DoesResourceEndWith("/TextPropertyPanel"))
144 {
142 pControl = TextPropertyPanel::Create(pParentWindow, xFrame, pBindings);
145 pControl = TextPropertyPanel::Create(pParentWindow, xFrame, pBindings, aContext);
143 }
144 else if (DoesResourceEndWith("/ParaPropertyPanel"))
145 {
146 pControl = ParaPropertyPanel::Create(pParentWindow, xFrame, pBindings, xSidebar);
147 }
148 else if (DoesResourceEndWith("/AreaPropertyPanel"))
149 {
150 pControl = AreaPropertyPanel::Create(pParentWindow, xFrame, pBindings);

--- 64 unchanged lines hidden ---
146 }
147 else if (DoesResourceEndWith("/ParaPropertyPanel"))
148 {
149 pControl = ParaPropertyPanel::Create(pParentWindow, xFrame, pBindings, xSidebar);
150 }
151 else if (DoesResourceEndWith("/AreaPropertyPanel"))
152 {
153 pControl = AreaPropertyPanel::Create(pParentWindow, xFrame, pBindings);

--- 64 unchanged lines hidden ---