diff options
-rw-r--r-- | sfx2/AllLangResTarget_sfx2.mk | 11 | ||||
-rw-r--r-- | sfx2/Library_sfx.mk | 7 | ||||
-rw-r--r-- | sfx2/inc/sfx2/sfxcommands.h | 1 | ||||
-rw-r--r-- | sfx2/inc/sfx2/sfxsids.hrc | 4 | ||||
-rw-r--r-- | sfx2/inc/templatedlg.hxx | 41 | ||||
-rw-r--r-- | sfx2/sdi/appslots.sdi | 4 | ||||
-rw-r--r-- | sfx2/sdi/sfx.sdi | 24 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/doc/doc.hrc | 1 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 55 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.hrc | 13 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.src | 62 |
12 files changed, 223 insertions, 9 deletions
diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk index bce308530352..4019fb2df1a6 100644 --- a/sfx2/AllLangResTarget_sfx2.mk +++ b/sfx2/AllLangResTarget_sfx2.mk @@ -2,7 +2,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite @@ -37,10 +37,10 @@ $(eval $(call gb_AllLangResTarget_add_srs,sfx,\ $(eval $(call gb_SrsTarget_SrsTarget,sfx/res)) $(eval $(call gb_SrsTarget_use_packages,sfx/res,\ - sfx2_inc \ - svl_inc \ - svtools_inc \ - tools_inc \ + sfx2_inc \ + svl_inc \ + svtools_inc \ + tools_inc \ )) $(eval $(call gb_SrsTarget_set_include,sfx/res,\ @@ -81,6 +81,7 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\ sfx2/source/doc/graphhelp.src \ sfx2/source/doc/new.src \ sfx2/source/doc/templatelocnames.src \ + sfx2/source/doc/templatedlg.src \ sfx2/source/menu/menu.src \ sfx2/source/view/view.src \ )) diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index f9d848b54058..0a97789b7093 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -2,7 +2,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2000, 2011 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite @@ -38,8 +38,8 @@ $(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) $(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx)) $(eval $(call gb_Library_use_api,sfx,\ - udkapi \ - offapi \ + udkapi \ + offapi \ )) $(eval $(call gb_Library_set_include,sfx,\ @@ -214,6 +214,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/doc/sfxbasemodel \ sfx2/source/doc/sfxmodelfactory \ sfx2/source/doc/syspath \ + sfx2/source/doc/templatedlg \ sfx2/source/explorer/nochaos \ sfx2/source/inet/inettbc \ sfx2/source/menu/mnuitem \ diff --git a/sfx2/inc/sfx2/sfxcommands.h b/sfx2/inc/sfx2/sfxcommands.h index 31109d5df0b2..3cd7d853fbb8 100644 --- a/sfx2/inc/sfx2/sfxcommands.h +++ b/sfx2/inc/sfx2/sfxcommands.h @@ -193,6 +193,7 @@ #define CMD_SID_OPENTEMPLATE ".uno:OpenTemplate" #define CMD_SID_OPENURL ".uno:OpenUrl" #define CMD_SID_OPTIONS ".uno:Options" +#define CMD_SID_TEMPLATE_MANAGER ".uno:TemplateManager" #define CMD_SID_ORGANIZER ".uno:Organizer" #define CMD_SID_STYLE_FAMILY4 ".uno:PageStyle" #define CMD_SID_STYLE_FAMILY2 ".uno:ParaStyle" diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index fbd8995215d4..ee1b54fdc1ec 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -317,7 +317,7 @@ #define SID_PASSWORDINTERACTION (SID_SFX_START + 1723) #define SID_GOTOLINE (SID_SFX_START + 1724) #define SID_SHOWLINES (SID_SFX_START + 1725) -#define SID_SFX_free_START (SID_SFX_START + 1726) +#define SID_SFX_free_START (SID_SFX_START + 1727) #define SID_SFX_free_END (SID_SFX_START + 3999) #define SID_OPEN_NEW_VIEW (SID_SFX_START + 520) @@ -382,6 +382,8 @@ // Floating Window Template #define SID_STYLE_DESIGNER (SID_SFX_START + 539) +#define SID_TEMPLATE_MANAGER (SID_SFX_START + 1726) + // Organizer #define SID_ORGANIZER (SID_SFX_START + 540) #define SID_TEMPLATE_ADDRESSBOKSOURCE (SID_SFX_START + 1655) diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx new file mode 100644 index 000000000000..a0e893d22758 --- /dev/null +++ b/sfx2/inc/templatedlg.hxx @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Copyright 2012 LibreOffice contributors. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef TEMPLATEDLG_HXX +#define TEMPLATEDLG_HXX + +#include <vcl/dialog.hxx> +#include <vcl/button.hxx> + +class SfxTemplateManagerDlg : public ModalDialog +{ +public: + + SfxTemplateManagerDlg (Window *parent = NULL); + + ~SfxTemplateManagerDlg (); + + DECL_LINK(ViewAllHdl, void*); + DECL_LINK(ViewDocsHdl, void*); + DECL_LINK(ViewPresentsHdl, void*); + DECL_LINK(ViewSheetsHdl, void*); + DECL_LINK(ViewDrawsHdl, void*); + +private: + + PushButton aButtonAll; + PushButton aButtonDocs; + PushButton aButtonPresents; + PushButton aButtonSheets; + PushButton aButtonDraws; +}; + +#endif // TEMPLATEDLG_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index d6d4a8508d80..11d7e3aefa93 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -127,6 +127,10 @@ interface Application ExecMethod = MiscExec_Impl ; StateMethod = MiscState_Impl ; ] + SID_TEMPLATE_MANAGER // ole(no) api(final/play/rec) + [ + ExecMethod = MiscExec_Impl ; + ] SID_ORGANIZER // ole(no) api(final/play/rec) [ ExecMethod = MiscExec_Impl ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 396fbb714528..4ba1db771785 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -4419,6 +4419,30 @@ SfxVoidItem Options SID_OPTIONS GroupId = GID_OPTIONS; ] +SfxVoidItem TemplateManager SID_TEMPLATE_MANAGER +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_APPLICATION; +] + //-------------------------------------------------------------------------- SfxVoidItem Organizer SID_ORGANIZER () diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 1287df6bf7ec..ad6012ff55d8 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -124,6 +124,7 @@ #include <sfx2/dialogs.hrc> #include "sorgitm.hxx" #include "sfx2/sfxhelp.hxx" +#include "templatedlg.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::beans; @@ -547,6 +548,14 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } + case SID_TEMPLATE_MANAGER: + { + SfxTemplateManagerDlg dlg; + dlg.Execute(); + bDone = true; + break; + } + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_ORGANIZER: { diff --git a/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc index aca8a3a304fd..e93bac160325 100644 --- a/sfx2/source/doc/doc.hrc +++ b/sfx2/source/doc/doc.hrc @@ -52,6 +52,7 @@ #define DLG_NEW_FILE (RID_SFX_DOC_START+1) #define DLG_DOC_TEMPLATE (RID_SFX_DOC_START+2) #define DLG_ORGANIZE (RID_SFX_DOC_START+3) +#define DLG_TEMPLATE_MANAGER (RID_SFX_DOC_START+4) #define BMP_STYLES_CLOSED (RID_SFX_DOC_START+ 0) #define BMP_STYLES_OPENED (RID_SFX_DOC_START+ 1) diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx new file mode 100644 index 000000000000..00d955d4ce81 --- /dev/null +++ b/sfx2/source/doc/templatedlg.cxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Copyright 2012 LibreOffice contributors. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <sfx2/sfxresid.hxx> + +#include "templatedlg.hxx" + +#include "doc.hrc" +#include "templatedlg.hrc" + +SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent) + : ModalDialog(parent, SfxResId(DLG_TEMPLATE_MANAGER)), + aButtonAll(this,SfxResId(BTN_SELECT_ALL)), + aButtonDocs(this,SfxResId(BTN_SELECT_DOCS)), + aButtonPresents(this,SfxResId(BTN_SELECT_PRESENTATIONS)), + aButtonSheets(this,SfxResId(BTN_SELECT_SHEETS)), + aButtonDraws(this,SfxResId(BTN_SELECT_DRAWS)) +{ + aButtonAll.SetClickHdl(LINK(this,SfxTemplateManagerDlg,ViewAllHdl)); + aButtonDocs.SetClickHdl(LINK(this,SfxTemplateManagerDlg,ViewDocsHdl)); + + FreeResource(); +} + +SfxTemplateManagerDlg::~SfxTemplateManagerDlg () +{ +} + +IMPL_LINK_NOARG(SfxTemplateManagerDlg,ViewAllHdl) +{ + return 0; +} + +IMPL_LINK_NOARG(SfxTemplateManagerDlg,ViewDocsHdl) +{ + return 0; +} + +IMPL_LINK_NOARG(SfxTemplateManagerDlg,ViewPresentsHdl) +{ + return 0; +} + +IMPL_LINK_NOARG(SfxTemplateManagerDlg,ViewDrawsHdl) +{ + return 0; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc new file mode 100644 index 000000000000..5f0a2776da22 --- /dev/null +++ b/sfx2/source/doc/templatedlg.hrc @@ -0,0 +1,13 @@ +/* + * Copyright 2012 LibreOffice contributors. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#define BTN_SELECT_ALL 1 +#define BTN_SELECT_DOCS 2 +#define BTN_SELECT_PRESENTATIONS 3 +#define BTN_SELECT_SHEETS 4 +#define BTN_SELECT_DRAWS 5 diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src new file mode 100644 index 000000000000..220a61d5d9b7 --- /dev/null +++ b/sfx2/source/doc/templatedlg.src @@ -0,0 +1,62 @@ +/* + * Copyright 2012 LibreOffice contributors. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "doc.hrc" +#include "templatedlg.hrc" +#include "helpid.hrc" + +ModalDialog DLG_TEMPLATE_MANAGER +{ + HelpId = CMD_SID_TEMPLATE_MANAGER; + OutputSize = TRUE; + SVLook = TRUE; + Moveable = TRUE; + Size = MAP_APPFONT ( 271 , 162 ); + Text [en-US] = "Template Manager"; + + PushButton BTN_SELECT_ALL + { + Pos = MAP_APPFONT(10,5); + Size = MAP_APPFONT(50,14); + TabStop = TRUE; + DefButton = TRUE; + Text [en-US] = "All"; + }; + + PushButton BTN_SELECT_DOCS + { + Pos = MAP_APPFONT(60,5); + Size = MAP_APPFONT(50,14); + TabStop = TRUE; + Text [en-US] = "Documents"; + }; + + PushButton BTN_SELECT_PRESENTATIONS + { + Pos = MAP_APPFONT(110,5); + Size = MAP_APPFONT(50,14); + TabStop = TRUE; + Text [en-US] = "Presentations"; + }; + + PushButton BTN_SELECT_SHEETS + { + Pos = MAP_APPFONT(160,5); + Size = MAP_APPFONT(50,14); + TabStop = TRUE; + Text [en-US] = "Spreedsheets"; + }; + + PushButton BTN_SELECT_DRAWS + { + Pos = MAP_APPFONT(210,5); + Size = MAP_APPFONT(50,14); + TabStop = TRUE; + Text [en-US] = "Drawings"; + }; +}; |