diff options
-rw-r--r-- | icon-themes/galaxy/sfx2/imglst/actionview030.png | bin | 0 -> 1021 bytes | |||
-rw-r--r-- | sfx2/inc/templatedlg.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 13 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.hrc | 2 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.src | 11 |
5 files changed, 27 insertions, 0 deletions
diff --git a/icon-themes/galaxy/sfx2/imglst/actionview030.png b/icon-themes/galaxy/sfx2/imglst/actionview030.png Binary files differnew file mode 100644 index 000000000000..53c5ee802c6e --- /dev/null +++ b/icon-themes/galaxy/sfx2/imglst/actionview030.png diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx index c7b40f686bfa..c5feb96964a7 100644 --- a/sfx2/inc/templatedlg.hxx +++ b/sfx2/inc/templatedlg.hxx @@ -80,6 +80,7 @@ private: void OnTemplateImport (); void OnTemplateSearch (); + void OnTemplateOpen (); void OnTemplateEdit (); void OnTemplateProperties (); void OnTemplateDelete (); diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index e9892a6564bd..2db2c8bbfb97 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -314,6 +314,7 @@ void SfxTemplateManagerDlg::setSaveMode(bool bMode) mpTemplateBar->ShowItem(TBI_TEMPLATE_SAVE); mpTemplateBar->ShowItem(TBI_TEMPLATE_PROPERTIES); mpTemplateBar->ShowItem(TBI_TEMPLATE_DEFAULT); + mpTemplateBar->HideItem(TBI_TEMPLATE_OPEN); mpTemplateBar->HideItem(TBI_TEMPLATE_EDIT); mpTemplateBar->HideItem(TBI_TEMPLATE_MOVE); mpTemplateBar->HideItem(TBI_TEMPLATE_EXPORT); @@ -525,6 +526,9 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,TBXTemplateHdl) { switch(mpTemplateBar->GetCurItemId()) { + case TBI_TEMPLATE_OPEN: + OnTemplateOpen(); + break; case TBI_TEMPLATE_EDIT: OnTemplateEdit(); break; @@ -877,6 +881,7 @@ void SfxTemplateManagerDlg::OnTemplateState (const ThumbnailViewItem *pItem) { if (!mbIsSaveMode) { + mpTemplateBar->HideItem(TBI_TEMPLATE_OPEN); mpTemplateBar->HideItem(TBI_TEMPLATE_EDIT); mpTemplateBar->HideItem(TBI_TEMPLATE_PROPERTIES); mpTemplateBar->HideItem(TBI_TEMPLATE_DEFAULT); @@ -907,6 +912,7 @@ void SfxTemplateManagerDlg::OnTemplateState (const ThumbnailViewItem *pItem) { if (!mbIsSaveMode) { + mpTemplateBar->ShowItem(TBI_TEMPLATE_OPEN); mpTemplateBar->ShowItem(TBI_TEMPLATE_EDIT); mpTemplateBar->ShowItem(TBI_TEMPLATE_PROPERTIES); mpTemplateBar->ShowItem(TBI_TEMPLATE_DEFAULT); @@ -1166,6 +1172,13 @@ void SfxTemplateManagerDlg::OnTemplateSearch () mpSearchEdit->GrabFocus(); } +void SfxTemplateManagerDlg::OnTemplateOpen () +{ + ThumbnailViewItem *pItem = const_cast<ThumbnailViewItem*>(*maSelTemplates.begin()); + + OpenTemplateHdl(pItem); +} + void SfxTemplateManagerDlg::OnTemplateEdit () { uno::Sequence< PropertyValue > aArgs(3); diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc index dec2b52b9a17..40bdfa0565e7 100644 --- a/sfx2/source/doc/templatedlg.hrc +++ b/sfx2/source/doc/templatedlg.hrc @@ -43,6 +43,8 @@ #define TBI_TEMPLATE_FOLDER_NEW 29 +#define TBI_TEMPLATE_OPEN 30 + #define STR_ACTION_REFRESH 263 #define STR_ACTION_SORT_NAME 264 diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src index 32f331951bb8..c205b996dbd3 100644 --- a/sfx2/source/doc/templatedlg.src +++ b/sfx2/source/doc/templatedlg.src @@ -241,6 +241,17 @@ TabPage TAB_TEMPLATE_MANAGER ToolBoxItem { + Identifier = TBI_TEMPLATE_OPEN; + Text [ en-US ] = "Open"; + + ItemImage = Image + { + ImageBitmap = Bitmap { File = "actionview030.png"; }; + }; + }; + + ToolBoxItem + { Identifier = TBI_TEMPLATE_EDIT; Text [ en-US ] = "Edit"; |