diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-11 16:33:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-11 16:34:04 +0100 |
commit | c3a98155ed28bd77eff4de3d80ccbcde1e68c828 (patch) | |
tree | 4b6d6cc435af3b62aa0815eca19d94b8d8168620 /sw | |
parent | 08bf088959c677e61cb118bf8d0bf092d3f21466 (diff) |
de-src writer formula toolbar
Change-Id: I8d4f031053fe819ff92ce1488a24dd3ff9b3ffd8
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/inc/ribbar.hrc | 7 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/inputwin.cxx | 20 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/inputwin.src | 45 |
3 files changed, 29 insertions, 43 deletions
diff --git a/sw/source/uibase/inc/ribbar.hrc b/sw/source/uibase/inc/ribbar.hrc index fb9c9d99496e..f44c3f8bf8a7 100644 --- a/sw/source/uibase/inc/ribbar.hrc +++ b/sw/source/uibase/inc/ribbar.hrc @@ -21,8 +21,6 @@ #include "rcid.hrc" -#define RID_TBX_FORMULA (RC_RIBBAR_BEGIN +6) -#define FT_POS (RC_RIBBAR_BEGIN +7) #define STR_TBL_FORMULA (RC_RIBBAR_BEGIN +8) #define RID_DRAW_WIN (RC_RIBBAR_BEGIN + 9) @@ -50,8 +48,11 @@ #define ST_INDEX_ENTRY (RC_RIBBAR_BEGIN + 29) #define ST_TABLE_FORMULA (RC_RIBBAR_BEGIN + 30) #define ST_TABLE_FORMULA_ERROR (RC_RIBBAR_BEGIN + 31) +#define STR_FORMULA_CALC (RC_RIBBAR_BEGIN + 32) +#define STR_FORMULA_CANCEL (RC_RIBBAR_BEGIN + 33) +#define STR_FORMULA_APPLY (RC_RIBBAR_BEGIN + 34) -#define STR_IMGBTN_START (RC_RIBBAR_BEGIN + 33) +#define STR_IMGBTN_START (RC_RIBBAR_BEGIN + 35) #define STR_IMGBTN_NEXT_DOWN (STR_IMGBTN_START + 0) #define STR_IMGBTN_PREV_DOWN (STR_IMGBTN_START + 1) diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 9a29eaf9b22a..e45cb059a1fb 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -60,7 +60,7 @@ SFX_IMPL_POS_CHILDWINDOW_WITHID( SwInputChild, FN_EDIT_FORMULA, SFX_OBJECTBAR_OBJECT ) SwInputWindow::SwInputWindow(vcl::Window* pParent, SfxDispatcher* pDispatcher) - : ToolBox(pParent, SW_RES(RID_TBX_FORMULA)) + : ToolBox(pParent, WB_3DLOOK|WB_BORDER) , aPos(VclPtr<Edit>::Create(this, WB_3DLOOK|WB_CENTER|WB_BORDER|WB_READONLY)) , aEdit(VclPtr<InputEdit>::Create(this, WB_3DLOOK|WB_TABSTOP|WB_BORDER|WB_NOHIDESELECTION)) , aPopMenu(SW_RES(MN_CALC_POPUP)) @@ -75,13 +75,21 @@ SwInputWindow::SwInputWindow(vcl::Window* pParent, SfxDispatcher* pDispatcher) bFirst = true; bActive = bIsTable = bDelSel = false; - FreeResource(); - aEdit->SetSizePixel(aEdit->CalcMinimumSize()); aPos->SetSizePixel(aPos->LogicToPixel(Size(45, 11), MapMode(MapUnit::MapAppFont))); - SfxImageManager* pManager = SfxImageManager::GetImageManager( *SW_MOD() ); + SfxImageManager* pManager = SfxImageManager::GetImageManager(*SW_MOD()); pManager->RegisterToolBox(this); + InsertItem(FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC), + SW_RESSTR(STR_FORMULA_CALC)); + InsertItem(FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL), + SW_RESSTR(STR_FORMULA_CANCEL)); + InsertItem(FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY), + SW_RESSTR(STR_FORMULA_APPLY)); + + SetHelpId(FN_FORMULA_CALC, HID_TBX_FORMULA_CALC); + SetHelpId(FN_FORMULA_CANCEL, HID_TBX_FORMULA_CANCEL); + SetHelpId(FN_FORMULA_APPLY, HID_TBX_FORMULA_APPLY); SwView *pDispatcherView = dynamic_cast<SwView*>(pDispatcher ? pDispatcher->GetFrame()->GetViewShell() : nullptr); SwView* pActiveView = ::GetActiveView(); @@ -100,10 +108,6 @@ SwInputWindow::SwInputWindow(vcl::Window* pParent, SfxDispatcher* pDispatcher) aEdit->SetAccessibleName(SW_RESSTR(STR_ACCESS_FORMULA_TEXT)); SetHelpId(ED_FORMULA, HID_EDIT_FORMULA); - SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC )); - SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL )); - SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY )); - SetItemBits( FN_FORMULA_CALC, GetItemBits( FN_FORMULA_CALC ) | ToolBoxItemBits::DROPDOWNONLY ); SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl )); diff --git a/sw/source/uibase/ribbar/inputwin.src b/sw/source/uibase/ribbar/inputwin.src index 444c255d4950..e0de1cd724a1 100644 --- a/sw/source/uibase/ribbar/inputwin.src +++ b/sw/source/uibase/ribbar/inputwin.src @@ -26,36 +26,6 @@ #include "inputwin.hrc" #include "access.hrc" -ToolBox RID_TBX_FORMULA -{ - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( 600 , 14 ) ; - SVLook = TRUE ; - Border = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_FORMULA_CALC ; - HelpId = HID_TBX_FORMULA_CALC ; - DropDown = TRUE ; - Text [ en-US ] = "Functions" ; - }; - ToolBoxItem - { - Identifier = FN_FORMULA_CANCEL ; - HelpId = HID_TBX_FORMULA_CANCEL ; - Text [ en-US ] = "Cancel" ; - }; - ToolBoxItem - { - Identifier = FN_FORMULA_APPLY ; - HelpId = HID_TBX_FORMULA_APPLY ; - Text [ en-US ] = "Apply" ; - }; - }; -}; - Menu MN_CALC_POPUP { ItemList = @@ -252,9 +222,20 @@ Menu MN_CALC_POPUP }; }; }; -String STR_TBL_FORMULA + +String STR_FORMULA_CALC +{ + Text [ en-US ] = "Functions" ; +}; + +String STR_FORMULA_CANCEL +{ + Text [ en-US ] = "Cancel" ; +}; + +String STR_FORMULA_APPLY { - Text [ en-US ] = "Text formula" ; + Text [ en-US ] = "Apply" ; }; String STR_ACCESS_FORMULA_TOOLBAR |