diff options
-rw-r--r-- | sfx2/inc/templatedlg.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 22 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.hrc | 5 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.src | 11 |
4 files changed, 39 insertions, 0 deletions
diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx index 40fa0bfda139..17596d924021 100644 --- a/sfx2/inc/templatedlg.hxx +++ b/sfx2/inc/templatedlg.hxx @@ -82,6 +82,7 @@ private: void OnTemplateExport (); void OnFolderDelete (); void OnRepositoryDelete (); + void OnTemplateSaveAs (); void centerTopButtons (); diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 403c767b782a..14a8eab1bac9 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -347,6 +347,9 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg,TBXViewHdl) else OnRepositoryDelete(); break; + case TBI_TEMPLATE_SAVE: + OnTemplateSaveAs(); + break; default: break; } @@ -1096,6 +1099,25 @@ void SfxTemplateManagerDlg::OnRepositoryDelete() } } +void SfxTemplateManagerDlg::OnTemplateSaveAs() +{ + if (!maView->isOverlayVisible() && maSelFolders.empty()) + { + return; + } + + InputDialog aDlg(SfxResId(STR_INPUT_TEMPLATE_NEW).toString(),this); + + if (aDlg.Execute()) + { + OUString aName = aDlg.getEntryText(); + + if (!aName.isEmpty()) + { + } + } +} + void SfxTemplateManagerDlg::centerTopButtons() { Point aFirstBtnPos = aButtonAll.GetPosPixel(); diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc index 0b82219d2505..89a022ef868a 100644 --- a/sfx2/source/doc/templatedlg.hrc +++ b/sfx2/source/doc/templatedlg.hrc @@ -38,6 +38,8 @@ #define MNI_ACTION_DEFAULT 27 +#define TBI_TEMPLATE_SAVE 28 + #define STR_ACTION_REFRESH 263 #define STR_ACTION_SORT_NAME 264 @@ -62,6 +64,9 @@ #define STR_MSG_ERROR_DELETE_TEMPLATE 282 #define STR_MSG_ERROR_DELETE_FOLDER 283 #define STR_MSG_ERROR_REPOSITORY_NAME 284 +#define STR_MSG_ERROR_SAVE_SELECT 285 + +#define STR_INPUT_TEMPLATE_NEW 288 #define IMG_ACTION_SORT 304 #define IMG_ACTION_REFRESH 305 diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src index 60d05808aee2..65f7f558d841 100644 --- a/sfx2/source/doc/templatedlg.src +++ b/sfx2/source/doc/templatedlg.src @@ -80,6 +80,11 @@ String STR_MSG_ERROR_REPOSITORY_NAME Text [ en-US ] = "Failed to create repository \"$1\".\nA repository with this name may already exist."; }; +String STR_INPUT_TEMPLATE_NEW +{ + Text [ en-US ] = "Enter template name:"; +}; + ModelessDialog DLG_TEMPLATE_MANAGER { OutputSize = TRUE; @@ -201,6 +206,12 @@ ModelessDialog DLG_TEMPLATE_MANAGER Hide = TRUE; Text [ en-US ] = "Delete"; }; + + ToolBoxItem + { + Identifier = TBI_TEMPLATE_SAVE; + Text [ en-US ] = "Save"; + }; }; }; |