diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/templatedlg.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.hrc | 4 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.src | 5 |
4 files changed, 28 insertions, 0 deletions
diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx index fdf458e1003b..ea82d786c8e7 100644 --- a/sfx2/inc/templatedlg.hxx +++ b/sfx2/inc/templatedlg.hxx @@ -81,6 +81,7 @@ private: ToolBox *mpTemplateBar; TemplateFolderView *maView; PopupMenu *mpCreateMenu; + PopupMenu *mpActionMenu; int mnSelectionCount; std::set<const ThumbnailViewItem*> maSelTemplates; diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 4a9215b6bf34..cfacc3b93d7e 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -69,6 +69,10 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent) mpCreateMenu->InsertItem(MNI_CREATE_DRAW,SfxResId(STR_CREATE_DRAW).toString()); mpCreateMenu->SetSelectHdl(LINK(this, SfxTemplateManagerDlg, MenuSelectHdl)); + mpActionMenu = new PopupMenu; + mpActionMenu->InsertItem(MNI_ACTION_SORT_NAME,SfxResId(STR_ACTION_SORT_NAME).toString()); + mpActionMenu->SetSelectHdl(LINK(this,SfxTemplateManagerDlg,MenuSelectHdl)); + // Calculate toolboxs size and positions Size aWinSize = GetOutputSize(); Size aViewSize = mpViewBar->CalcMinimumWindowSizePixel(); @@ -92,11 +96,13 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent) // Set toolbox button bits mpViewBar->SetItemBits(TBI_TEMPLATE_CREATE, TIB_DROPDOWNONLY); + mpActionBar->SetItemBits(TBI_TEMPLATE_ACTION, TIB_DROPDOWNONLY); // Set toolbox handlers mpViewBar->SetClickHdl(LINK(this,SfxTemplateManagerDlg,TBXViewHdl)); mpViewBar->SetDropdownClickHdl(LINK(this,SfxTemplateManagerDlg,TBXDropdownHdl)); mpActionBar->SetClickHdl(LINK(this,SfxTemplateManagerDlg,TBXActionHdl)); + mpActionBar->SetDropdownClickHdl(LINK(this,SfxTemplateManagerDlg,TBXDropdownHdl)); mpTemplateBar->SetClickHdl(LINK(this,SfxTemplateManagerDlg,TBXTemplateHdl)); // Set view position below toolbox @@ -255,6 +261,16 @@ IMPL_LINK(SfxTemplateManagerDlg, TBXDropdownHdl, ToolBox*, pBox) pBox->EndSelection(); pBox->Invalidate(); break; + case TBI_TEMPLATE_ACTION: + pBox->SetItemDown( nCurItemId, true ); + + mpActionMenu->Execute(pBox,pBox->GetItemRect(TBI_TEMPLATE_ACTION), + POPUPMENU_EXECUTE_DOWN); + + pBox->SetItemDown( nCurItemId, false ); + pBox->EndSelection(); + pBox->Invalidate(); + break; default: break; } @@ -325,6 +341,8 @@ IMPL_LINK(SfxTemplateManagerDlg, MenuSelectHdl, Menu*, pMenu) case MNI_CREATE_DRAW: lcl_createTemplate(mxDesktop,FILTER_APP_DRAW); break; + case MNI_ACTION_SORT_NAME: + break; default: break; } diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc index 500d2ddb82ce..064e85ca69ee 100644 --- a/sfx2/source/doc/templatedlg.hrc +++ b/sfx2/source/doc/templatedlg.hrc @@ -34,9 +34,13 @@ #define MNI_CREATE_PRESENT 21 #define MNI_CREATE_DRAW 22 +#define MNI_ACTION_SORT_NAME 23 + #define STR_CREATE_TEXT 260 #define STR_CREATE_SHEET 261 #define STR_CREATE_PRESENT 262 #define STR_CREATE_DRAW 263 +#define STR_ACTION_SORT_NAME 264 + #define IMG_ONLINE_REPOSITORY 100 diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src index 06f1c54a023a..e98ca373aa83 100644 --- a/sfx2/source/doc/templatedlg.src +++ b/sfx2/source/doc/templatedlg.src @@ -30,6 +30,11 @@ String STR_CREATE_DRAW Text [ en-US ] = "Drawing Template"; }; +String STR_ACTION_SORT_NAME +{ + Text [ en-US ] = "Sort by name"; +}; + ModalDialog DLG_TEMPLATE_MANAGER { HelpId = CMD_SID_TEMPLATE_MANAGER; |