diff options
author | Akshay Deep <akshaydeepiitr@gmail.com> | 2016-06-05 05:38:13 +0530 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-06-06 09:52:33 +0000 |
commit | ecece54942a8e5f20ae6dc69f25a2499d38c78bd (patch) | |
tree | fd7854f40c81cf0d0a2f51c2e3a64ae54ef22bb0 /sfx2/source | |
parent | 1efbab1eb4e01ae3116301df861067a2e488c717 (diff) |
Improve Impress Template Selection Dialog
1. Hide controls: export, move, action menu, repository menu, Online Button
2. Checkbox to easily hide the dialog
Change-Id: Id2899edb9ba280c9a714d09fa534f975600b05af
Reviewed-on: https://gerrit.libreoffice.org/25913
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/doc.hrc | 1 | ||||
-rw-r--r-- | sfx2/source/doc/doc.src | 4 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 21 |
3 files changed, 25 insertions, 1 deletions
diff --git a/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc index 10877ab1cc8d..c802ccc7fce6 100644 --- a/sfx2/source/doc/doc.hrc +++ b/sfx2/source/doc/doc.hrc @@ -123,6 +123,7 @@ #define STR_CREATE_ERROR (RID_SFX_DOC_START+103) #define STR_ERROR_SAVEAS (RID_SFX_DOC_START+105) #define STR_CATEGORY_RENAME (RID_SFX_DOC_START+109) +#define STR_TEMPLATE_SELECTION (RID_SFX_DOC_START+120) // please update to the last id #define ACT_SFX_DOC_END IMG_ACTION_REFRESH diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src index ed7f8db4a52e..84c94560e48d 100644 --- a/sfx2/source/doc/doc.src +++ b/sfx2/source/doc/doc.src @@ -80,6 +80,10 @@ String STR_RENAME_TEMPLATE { Text [ en-US ] = "Enter New Name: " ; }; +String STR_TEMPLATE_SELECTION +{ + Text [ en-US ] = "Select a Template" ; +}; String STR_AUTOMATICVERSION { Text [ en-US ] = "Automatically saved version" ; diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index db75aa7e8343..9ba3b7cd75d7 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -179,6 +179,7 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window *parent) get(mpExportButton, "export_btn"); get(mpImportButton, "import_btn"); get(mpLinkButton, "online_link"); + get(mpCBXHideDlg, "hidedialogcb"); // Create popup menus mpActionMenu = new PopupMenu; @@ -326,6 +327,7 @@ void SfxTemplateManagerDlg::dispose() mpExportButton.clear(); mpImportButton.clear(); mpLinkButton.clear(); + mpCBXHideDlg.clear(); mpSearchFilter.clear(); mpCBApp.clear(); mpCBFolder.clear(); @@ -1646,8 +1648,8 @@ SfxTemplateSelectionDlg::SfxTemplateSelectionDlg(vcl::Window* pParent): msTemplatePath(OUString()) { mpCBApp->SelectEntryPos(MNI_IMPRESS); - mpCBApp->Disable(); mpCBFolder->SelectEntryPos(0); + SetText(SfxResId(STR_TEMPLATE_SELECTION).toString()); if(mpLocalView->IsVisible()) { @@ -1655,8 +1657,17 @@ SfxTemplateSelectionDlg::SfxTemplateSelectionDlg(vcl::Window* pParent): mpLocalView->showAllTemplates(); } + mpCBApp->Disable(); + mpActionBar->Hide(); + mpLinkButton->Hide(); + mpMoveButton->Hide(); + mpExportButton->Hide(); + mpCBXHideDlg->Show(); + mpCBXHideDlg->Check(true); + mpLocalView->setOpenTemplateHdl(LINK(this,SfxTemplateSelectionDlg, OpenTemplateHdl)); mpSearchView->setOpenTemplateHdl(LINK(this,SfxTemplateSelectionDlg, OpenTemplateHdl)); + mpOKButton->SetClickHdl(LINK(this, SfxTemplateSelectionDlg, OkClickHdl)); } SfxTemplateSelectionDlg::~SfxTemplateSelectionDlg() @@ -1682,4 +1693,12 @@ IMPL_LINK_TYPED(SfxTemplateSelectionDlg, OpenTemplateHdl, ThumbnailViewItem*, pI EndDialog(RET_OK); } +IMPL_LINK_NOARG_TYPED(SfxTemplateSelectionDlg, OkClickHdl, Button*, void) +{ + TemplateViewItem *pViewItem = static_cast<TemplateViewItem*>(const_cast<ThumbnailViewItem*>(*maSelTemplates.begin())); + msTemplatePath = pViewItem->getPath(); + + EndDialog(RET_OK); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |