Remove create template menu and associated icons.
Change-Id: Ifb2c2a640de7961ef215c9359f53218cee9c9c0e
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 973 B |
@@ -120,7 +120,6 @@ private:
|
||||
TemplateAbstractView *mpCurView;
|
||||
TemplateLocalView *maView;
|
||||
TemplateOnlineView *mpOnlineView;
|
||||
PopupMenu *mpCreateMenu;
|
||||
PopupMenu *mpActionMenu;
|
||||
PopupMenu *mpRepositoryMenu;
|
||||
|
||||
|
||||
@@ -109,13 +109,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
|
||||
maButtonSelMode.SetStyle(maButtonSelMode.GetStyle() | WB_TOGGLE);
|
||||
|
||||
// Create popup menus
|
||||
mpCreateMenu = new PopupMenu;
|
||||
mpCreateMenu->InsertItem(MNI_CREATE_TEXT,SfxResId(STR_CREATE_TEXT).toString(),SfxResId(IMG_CREATE_TEXT));
|
||||
mpCreateMenu->InsertItem(MNI_CREATE_SHEET,SfxResId(STR_CREATE_SHEET).toString(),SfxResId(IMG_CREATE_SHEET));
|
||||
mpCreateMenu->InsertItem(MNI_CREATE_PRESENT,SfxResId(STR_CREATE_PRESENT).toString(),SfxResId(IMG_CREATE_PRESENT));
|
||||
mpCreateMenu->InsertItem(MNI_CREATE_DRAW,SfxResId(STR_CREATE_DRAW).toString(),SfxResId(IMG_CREATE_DRAW));
|
||||
mpCreateMenu->SetSelectHdl(LINK(this, SfxTemplateManagerDlg, MenuSelectHdl));
|
||||
|
||||
mpActionMenu = new PopupMenu;
|
||||
mpActionMenu->InsertItem(MNI_ACTION_SORT_NAME,SfxResId(STR_ACTION_SORT_NAME).toString(),SfxResId(IMG_ACTION_SORT));
|
||||
mpActionMenu->SetSelectHdl(LINK(this,SfxTemplateManagerDlg,MenuSelectHdl));
|
||||
@@ -154,7 +147,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
|
||||
|
||||
// Set toolbox button bits
|
||||
mpViewBar->EnableItem(TBI_TEMPLATE_IMPORT,false);
|
||||
mpViewBar->SetItemBits(TBI_TEMPLATE_CREATE, TIB_DROPDOWNONLY);
|
||||
mpViewBar->SetItemBits(TBI_TEMPLATE_REPOSITORY, TIB_DROPDOWNONLY);
|
||||
mpActionBar->SetItemBits(TBI_TEMPLATE_ACTION, TIB_DROPDOWNONLY);
|
||||
mpTemplateBar->SetItemBits(TBI_TEMPLATE_MOVE,TIB_DROPDOWNONLY);
|
||||
@@ -268,7 +260,6 @@ SfxTemplateManagerDlg::~SfxTemplateManagerDlg ()
|
||||
delete mpSearchView;
|
||||
delete maView;
|
||||
delete mpOnlineView;
|
||||
delete mpCreateMenu;
|
||||
delete mpActionMenu;
|
||||
delete mpRepositoryMenu;
|
||||
}
|
||||
@@ -398,16 +389,6 @@ IMPL_LINK(SfxTemplateManagerDlg, TBXDropdownHdl, ToolBox*, pBox)
|
||||
|
||||
switch(nCurItemId)
|
||||
{
|
||||
case TBI_TEMPLATE_CREATE:
|
||||
pBox->SetItemDown( nCurItemId, true );
|
||||
|
||||
mpCreateMenu->Execute(pBox,pBox->GetItemRect(TBI_TEMPLATE_CREATE),
|
||||
POPUPMENU_EXECUTE_DOWN);
|
||||
|
||||
pBox->SetItemDown( nCurItemId, false );
|
||||
pBox->EndSelection();
|
||||
pBox->Invalidate();
|
||||
break;
|
||||
case TBI_TEMPLATE_ACTION:
|
||||
pBox->SetItemDown( nCurItemId, true );
|
||||
|
||||
@@ -527,22 +508,6 @@ IMPL_LINK(SfxTemplateManagerDlg, MenuSelectHdl, Menu*, pMenu)
|
||||
|
||||
switch(nMenuId)
|
||||
{
|
||||
case MNI_CREATE_TEXT:
|
||||
lcl_createTemplate(mxDesktop,FILTER_APP_WRITER);
|
||||
Close( );
|
||||
break;
|
||||
case MNI_CREATE_SHEET:
|
||||
lcl_createTemplate(mxDesktop,FILTER_APP_CALC);
|
||||
Close( );
|
||||
break;
|
||||
case MNI_CREATE_PRESENT:
|
||||
lcl_createTemplate(mxDesktop,FILTER_APP_IMPRESS);
|
||||
Close( );
|
||||
break;
|
||||
case MNI_CREATE_DRAW:
|
||||
lcl_createTemplate(mxDesktop,FILTER_APP_DRAW);
|
||||
Close( );
|
||||
break;
|
||||
case MNI_ACTION_SORT_NAME:
|
||||
if (maView->isOverlayVisible())
|
||||
maView->sortOverlayItems(SortView_Name());
|
||||
@@ -1087,34 +1052,4 @@ void SfxTemplateManagerDlg::localSearchMoveTo(sal_uInt16 nMenuId)
|
||||
SearchUpdateHdl(mpSearchEdit);
|
||||
}
|
||||
|
||||
void lcl_createTemplate(uno::Reference< com::sun::star::frame::XComponentLoader > xDesktop,
|
||||
const FILTER_APPLICATION eApp)
|
||||
{
|
||||
rtl::OUString aURL;
|
||||
|
||||
switch(eApp)
|
||||
{
|
||||
case FILTER_APP_WRITER:
|
||||
aURL = "private:factory/swriter";
|
||||
break;
|
||||
case FILTER_APP_CALC:
|
||||
aURL = "private:factory/scalc";
|
||||
break;
|
||||
case FILTER_APP_IMPRESS:
|
||||
aURL = "private:factory/simpress";
|
||||
break;
|
||||
case FILTER_APP_DRAW:
|
||||
aURL = "private:factory/sdraw";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!aURL.isEmpty())
|
||||
{
|
||||
uno::Sequence<PropertyValue> aArgs;
|
||||
xDesktop->loadComponentFromURL(aURL,rtl::OUString("_default"), 0, aArgs );
|
||||
}
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#define TEMPLATE_VIEW 7
|
||||
|
||||
#define TBX_ACTION_VIEW 8
|
||||
#define TBI_TEMPLATE_CREATE 9
|
||||
#define TBI_TEMPLATE_IMPORT 10
|
||||
|
||||
#define TBX_ACTION_ACTION 11
|
||||
@@ -29,11 +28,6 @@
|
||||
#define TBI_TEMPLATE_MOVE 17
|
||||
#define TBI_TEMPLATE_DELETE 18
|
||||
|
||||
#define MNI_CREATE_TEXT 19
|
||||
#define MNI_CREATE_SHEET 20
|
||||
#define MNI_CREATE_PRESENT 21
|
||||
#define MNI_CREATE_DRAW 22
|
||||
|
||||
#define MNI_ACTION_SORT_NAME 23
|
||||
|
||||
#define BTN_TEMPLATE_CLOSE 24
|
||||
@@ -41,11 +35,6 @@
|
||||
#define TBI_TEMPLATE_FOLDER_DEL 25
|
||||
#define TBI_TEMPLATE_REPOSITORY 26
|
||||
|
||||
#define STR_CREATE_TEXT 260
|
||||
#define STR_CREATE_SHEET 261
|
||||
#define STR_CREATE_PRESENT 262
|
||||
#define STR_CREATE_DRAW 263
|
||||
|
||||
#define STR_ACTION_SORT_NAME 264
|
||||
|
||||
#define MNI_MOVE_NEW 265
|
||||
|
||||
@@ -10,26 +10,6 @@
|
||||
#include "templatedlg.hrc"
|
||||
#include "helpid.hrc"
|
||||
|
||||
String STR_CREATE_TEXT
|
||||
{
|
||||
Text [ en-US ] = "Text Document Template";
|
||||
};
|
||||
|
||||
String STR_CREATE_SHEET
|
||||
{
|
||||
Text [ en-US ] = "Spreedsheet Template";
|
||||
};
|
||||
|
||||
String STR_CREATE_PRESENT
|
||||
{
|
||||
Text [ en-US ] = "Presentation Template";
|
||||
};
|
||||
|
||||
String STR_CREATE_DRAW
|
||||
{
|
||||
Text [ en-US ] = "Drawing Template";
|
||||
};
|
||||
|
||||
String STR_ACTION_SORT_NAME
|
||||
{
|
||||
Text [ en-US ] = "Sort by name";
|
||||
@@ -135,38 +115,6 @@ ModelessDialog DLG_TEMPLATE_MANAGER
|
||||
TabStop = TRUE;
|
||||
};
|
||||
|
||||
Image IMG_CREATE_TEXT
|
||||
{
|
||||
ImageBitmap = Bitmap
|
||||
{
|
||||
File = "create_text.png";
|
||||
};
|
||||
};
|
||||
|
||||
Image IMG_CREATE_SHEET
|
||||
{
|
||||
ImageBitmap = Bitmap
|
||||
{
|
||||
File = "create_sheet.png";
|
||||
};
|
||||
};
|
||||
|
||||
Image IMG_CREATE_PRESENT
|
||||
{
|
||||
ImageBitmap = Bitmap
|
||||
{
|
||||
File = "create_present.png";
|
||||
};
|
||||
};
|
||||
|
||||
Image IMG_CREATE_DRAW
|
||||
{
|
||||
ImageBitmap = Bitmap
|
||||
{
|
||||
File = "create_draw.png";
|
||||
};
|
||||
};
|
||||
|
||||
Image IMG_ACTION_SORT
|
||||
{
|
||||
ImageBitmap = Bitmap
|
||||
@@ -184,17 +132,6 @@ ModelessDialog DLG_TEMPLATE_MANAGER
|
||||
|
||||
ItemList =
|
||||
{
|
||||
ToolBoxItem
|
||||
{
|
||||
Identifier = TBI_TEMPLATE_CREATE;
|
||||
Text [ en-US ] = "Create" ;
|
||||
|
||||
ItemImage = Image
|
||||
{
|
||||
ImageBitmap = Bitmap { File = "create_text.png" ; };
|
||||
};
|
||||
};
|
||||
|
||||
ToolBoxItem
|
||||
{
|
||||
Identifier = TBI_TEMPLATE_REPOSITORY;
|
||||
|
||||
Reference in New Issue
Block a user