summaryrefslogtreecommitdiff
path: root/sd/source/ui/sidebar
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-13 11:10:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-13 11:11:52 +0100
commita8b366af313a4ffd0ae5766cf4fc281c7efc83f3 (patch)
treec6fd78e225e298a92ecc7bd9e194208cb97ceea9 /sd/source/ui/sidebar
parenta10b4fd2bc08651d47bdb19bb8ab9c1f8f3d4851 (diff)
convert taskpane layout menu to .ui
Change-Id: Id5ecde3bc38a6d4c3dd15354c64d7b5e52712093
Diffstat (limited to 'sd/source/ui/sidebar')
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index ab862728f282..2a621b0fa554 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -600,7 +600,8 @@ void LayoutMenu::Command (const CommandEvent& rEvent)
}
// Setup the menu.
- ScopedVclPtrInstance<PopupMenu> pMenu(SdResId(RID_TASKPANE_LAYOUTMENU_POPUP));
+ VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/simpress/ui/layoutmenu.ui", "");
+ VclPtr<PopupMenu> pMenu(aBuilder.get_menu("menu"));
FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow());
if (pMenuWindow != nullptr)
pMenuWindow->SetPopupModeFlags(
@@ -640,13 +641,13 @@ IMPL_LINK(LayoutMenu, OnMenuItemSelected, Menu*, pMenu, bool)
}
pMenu->Deactivate();
- const sal_Int32 nIndex (pMenu->GetCurItemId());
+ OString sIdent = pMenu->GetCurItemIdent();
- if (nIndex == SID_TP_APPLY_TO_SELECTED_SLIDES)
+ if (sIdent == "apply")
{
AssignLayoutToSelectedSlides(GetSelectedAutoLayout());
}
- else if (nIndex == SID_INSERTPAGE_LAYOUT_MENU)
+ else if (sIdent == "insert")
{
// Add arguments to this slot and forward it to the main view
// shell.