Kaydet (Commit) db1bd15c authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Bin some use-once variables, use literals instead

Change-Id: I3ccdc7c92b53f1f385cec8ebfa1a325f355da9ed
üst b2459b05
...@@ -44,21 +44,6 @@ using ::rtl::OUString; ...@@ -44,21 +44,6 @@ using ::rtl::OUString;
namespace sd { namespace sidebar { namespace sd { namespace sidebar {
namespace {
/** Note that these names have to be identical to (the tail of)
the entries in officecfg/registry/data/org/openoffice/Office/Impress.xcu
for the TaskPanelFactory.
*/
const static char* gsResourceNameCustomAnimations = "/CustomAnimations";
const static char* gsResourceNameLayouts = "/Layouts";
const static char* gsResourceNameAllMasterPages = "/AllMasterPages";
const static char* gsResourceNameRecentMasterPages = "/RecentMasterPages";
const static char* gsResourceNameUsedMasterPages = "/UsedMasterPages";
const static char* gsResourceNameSlideTransitions = "/SlideTransitions";
const static char* gsResourceNameTableDesign = "/TableDesign";
const static char* gsResourceNameNavigator = "/NavigatorPanel";
}
Reference<lang::XEventListener> mxControllerDisposeListener; Reference<lang::XEventListener> mxControllerDisposeListener;
//----- PanelFactory -------------------------------------------------------- //----- PanelFactory --------------------------------------------------------
...@@ -123,22 +108,26 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( ...@@ -123,22 +108,26 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
VclPtr<vcl::Window> pControl; VclPtr<vcl::Window> pControl;
css::ui::LayoutSize aLayoutSize (-1,-1,-1); css::ui::LayoutSize aLayoutSize (-1,-1,-1);
/** Note that these names have to be identical to (the tail of)
the entries in officecfg/registry/data/org/openoffice/Office/Impress.xcu
for the TaskPanelFactory.
*/
#define EndsWith(s,t) s.endsWithAsciiL(t,strlen(t)) #define EndsWith(s,t) s.endsWithAsciiL(t,strlen(t))
if (EndsWith(rsUIElementResourceURL, gsResourceNameCustomAnimations)) if (EndsWith(rsUIElementResourceURL, "/CustomAnimations"))
pControl = VclPtr<CustomAnimationPanel>::Create(pParentWindow, *pBase, xFrame); pControl = VclPtr<CustomAnimationPanel>::Create(pParentWindow, *pBase, xFrame);
else if (EndsWith(rsUIElementResourceURL, gsResourceNameLayouts)) else if (EndsWith(rsUIElementResourceURL, "/Layouts"))
pControl = VclPtr<LayoutMenu>::Create(pParentWindow, *pBase, xSidebar); pControl = VclPtr<LayoutMenu>::Create(pParentWindow, *pBase, xSidebar);
else if (EndsWith(rsUIElementResourceURL, gsResourceNameAllMasterPages)) else if (EndsWith(rsUIElementResourceURL, "/AllMasterPages"))
pControl = AllMasterPagesSelector::Create(pParentWindow, *pBase, xSidebar); pControl = AllMasterPagesSelector::Create(pParentWindow, *pBase, xSidebar);
else if (EndsWith(rsUIElementResourceURL, gsResourceNameRecentMasterPages)) else if (EndsWith(rsUIElementResourceURL, "/RecentMasterPages"))
pControl = RecentMasterPagesSelector::Create(pParentWindow, *pBase, xSidebar); pControl = RecentMasterPagesSelector::Create(pParentWindow, *pBase, xSidebar);
else if (EndsWith(rsUIElementResourceURL, gsResourceNameUsedMasterPages)) else if (EndsWith(rsUIElementResourceURL, "/UsedMasterPages"))
pControl = CurrentMasterPagesSelector::Create(pParentWindow, *pBase, xSidebar); pControl = CurrentMasterPagesSelector::Create(pParentWindow, *pBase, xSidebar);
else if (EndsWith(rsUIElementResourceURL, gsResourceNameSlideTransitions)) else if (EndsWith(rsUIElementResourceURL, "/SlideTransitions"))
pControl = VclPtr<SlideTransitionPanel>::Create(pParentWindow, *pBase, xFrame); pControl = VclPtr<SlideTransitionPanel>::Create(pParentWindow, *pBase, xFrame);
else if (EndsWith(rsUIElementResourceURL, gsResourceNameTableDesign)) else if (EndsWith(rsUIElementResourceURL, "/TableDesign"))
pControl = VclPtr<TableDesignPanel>::Create(pParentWindow, *pBase); pControl = VclPtr<TableDesignPanel>::Create(pParentWindow, *pBase);
else if (EndsWith(rsUIElementResourceURL, gsResourceNameNavigator)) else if (EndsWith(rsUIElementResourceURL, "/NavigatorPanel"))
pControl = VclPtr<NavigatorWrapper>::Create(pParentWindow, *pBase, pBindings); pControl = VclPtr<NavigatorWrapper>::Create(pParentWindow, *pBase, pBindings);
#undef EndsWith #undef EndsWith
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment