diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-08-14 19:02:27 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2012-08-15 07:18:26 -0430 |
commit | 6072d114977421da17127610e4a1a5103fecb20a (patch) | |
tree | e1b7560ed2a4f399d50342909ecc0a45856f26f2 | |
parent | e626da3c527812adcd23916489cf95f995c6ec6f (diff) |
Add save templates command to manager.
Change-Id: Ic538f23f1d8c4ba8f1a47386e1d16337cf2650c9
-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"; + }; }; }; |