Add open action to template manager toolbar.

Change-Id: I5cec8814776f2658c990fb45193736a60178965b
This commit is contained in:
Rafael Dominguez
2013-05-08 19:11:13 -04:30
parent a9223251b9
commit f9f421d442
5 changed files with 27 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

View File

@@ -80,6 +80,7 @@ private:
void OnTemplateImport ();
void OnTemplateSearch ();
void OnTemplateOpen ();
void OnTemplateEdit ();
void OnTemplateProperties ();
void OnTemplateDelete ();

View File

@@ -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);

View File

@@ -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

View File

@@ -239,6 +239,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;