diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-08-05 07:59:38 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2012-08-06 07:38:35 -0430 |
commit | 7eaabb2db296e2bdb67d633dd68209f23167243e (patch) | |
tree | 58bcefb8e0e2d9147df434cda096c901ecfe4528 /sfx2 | |
parent | 77cb1de56a48fcc03fe8ae10964ae0cba9b5b7eb (diff) |
Remove create template menu and associated icons.
Change-Id: Ifb2c2a640de7961ef215c9359f53218cee9c9c0e
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/templatedlg.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 65 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.hrc | 11 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.src | 63 |
4 files changed, 0 insertions, 140 deletions
diff --git a/sfx2/inc/templatedlg.hxx b/sfx2/inc/templatedlg.hxx index e22fe8c8164e..ffbfc31f3eb2 100644 --- a/sfx2/inc/templatedlg.hxx +++ b/sfx2/inc/templatedlg.hxx @@ -120,7 +120,6 @@ private: TemplateAbstractView *mpCurView; TemplateLocalView *maView; TemplateOnlineView *mpOnlineView; - PopupMenu *mpCreateMenu; PopupMenu *mpActionMenu; PopupMenu *mpRepositoryMenu; diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 0b851a23c712..5c1b6665c760 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -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: */ diff --git a/sfx2/source/doc/templatedlg.hrc b/sfx2/source/doc/templatedlg.hrc index c489a309b859..810d03d0dcbe 100644 --- a/sfx2/source/doc/templatedlg.hrc +++ b/sfx2/source/doc/templatedlg.hrc @@ -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 diff --git a/sfx2/source/doc/templatedlg.src b/sfx2/source/doc/templatedlg.src index f396bac45bcb..d973e46adb1b 100644 --- a/sfx2/source/doc/templatedlg.src +++ b/sfx2/source/doc/templatedlg.src @@ -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 @@ -186,17 +134,6 @@ ModelessDialog DLG_TEMPLATE_MANAGER { ToolBoxItem { - Identifier = TBI_TEMPLATE_CREATE; - Text [ en-US ] = "Create" ; - - ItemImage = Image - { - ImageBitmap = Bitmap { File = "create_text.png" ; }; - }; - }; - - ToolBoxItem - { Identifier = TBI_TEMPLATE_REPOSITORY; Text [ en-US ] = "Repository"; }; |