summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-18 20:16:11 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-20 07:16:46 +0000
commit67c9d054517fc3b5cbc203c330eedef4b50f0e57 (patch)
tree1fad773f770e4ee4265bb05ba77d7f3084aedd3b /sw
parent8091cf383a122f2348d6e25df90fc26579fe6ef7 (diff)
fdo#84938: replace TIB_ constants with enum
Change-Id: I435ce2331fb49e7ce9fe97bdfddfaef706759a84 Reviewed-on: https://gerrit.libreoffice.org/12023 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx4
-rw-r--r--sw/source/uibase/ribbar/tblctrl.cxx2
-rw-r--r--sw/source/uibase/ribbar/tbxanchr.cxx2
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx10
-rw-r--r--sw/source/uibase/sidebar/PagePropertyPanel.cxx8
-rw-r--r--sw/source/uibase/utlui/navipi.cxx8
6 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 99db68c4c546..ec583fc18371 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -83,7 +83,7 @@ SwInputWindow::SwInputWindow( vcl::Window* pParent, SfxBindings* pBind )
pView = ::GetActiveView();
pWrtShell = pView ? pView->GetWrtShellPtr() : 0;
- InsertWindow( ED_POS, &aPos, 0, 0);
+ InsertWindow( ED_POS, &aPos, ToolBoxItemBits::NONE, 0);
SetItemText(ED_POS, SW_RESSTR(STR_ACCESS_FORMULA_TYPE));
aPos.SetAccessibleName(SW_RESSTR(STR_ACCESS_FORMULA_TYPE));
SetAccessibleName(SW_RESSTR(STR_ACCESS_FORMULA_TOOLBAR));
@@ -98,7 +98,7 @@ SwInputWindow::SwInputWindow( vcl::Window* pParent, SfxBindings* pBind )
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 ) | TIB_DROPDOWNONLY );
+ SetItemBits( FN_FORMULA_CALC, GetItemBits( FN_FORMULA_CALC ) | ToolBoxItemBits::DROPDOWNONLY );
SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl ));
Size aSizeTbx = CalcWindowSizePixel();
diff --git a/sw/source/uibase/ribbar/tblctrl.cxx b/sw/source/uibase/ribbar/tblctrl.cxx
index 2649d74e6951..c19406277d36 100644
--- a/sw/source/uibase/ribbar/tblctrl.cxx
+++ b/sw/source/uibase/ribbar/tblctrl.cxx
@@ -34,7 +34,7 @@ SwTableOptimizeCtrl::SwTableOptimizeCtrl(
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
}
SwTableOptimizeCtrl::~SwTableOptimizeCtrl()
diff --git a/sw/source/uibase/ribbar/tbxanchr.cxx b/sw/source/uibase/ribbar/tbxanchr.cxx
index a251877da573..55af895c7d23 100644
--- a/sw/source/uibase/ribbar/tbxanchr.cxx
+++ b/sw/source/uibase/ribbar/tbxanchr.cxx
@@ -42,7 +42,7 @@ SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nActAnchorId(0)
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
}
SwTbxAnchor::~SwTbxAnchor()
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 6b51a180ae76..698455412662 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -69,7 +69,7 @@ SwTbxInsertCtrl::SwTbxInsertCtrl(
SfxToolBoxControl( nSlotId, nId, rTbx ),
nLastSlotId(FN_INSERT_CTRL == nSlotId ? FN_INSERT_TABLE : SID_INSERT_DIAGRAM)
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
}
SwTbxInsertCtrl::~SwTbxInsertCtrl()
@@ -163,7 +163,7 @@ SwTbxAutoTextCtrl::SwTbxAutoTextCtrl(
pPopup(0),
pView(0)
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
}
SwTbxAutoTextCtrl::~SwTbxAutoTextCtrl()
@@ -286,7 +286,7 @@ SwTbxFieldCtrl::SwTbxFieldCtrl(
pPopup(0),
pView(0)
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
}
SwTbxFieldCtrl::~SwTbxFieldCtrl()
@@ -467,13 +467,13 @@ SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame >&
{
sal_uInt16 nNaviId = aNavigationInsertIds[i];
OUString sText;
- ToolBoxItemBits nTbxBits = 0;
+ ToolBoxItemBits nTbxBits = ToolBoxItemBits::NONE;
if((NID_PREV != nNaviId) && (NID_NEXT != nNaviId))
{
// -2, there's no string for Next/Prev
sal_uInt16 nResStr = ST_TBL - 2 + nNaviId - NID_START;
sText = SW_RESSTR(nResStr);
- nTbxBits = TIB_CHECKABLE;
+ nTbxBits = ToolBoxItemBits::CHECKABLE;
}
else
{
diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
index e1aae308b905..cc7f5fa3ed72 100644
--- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx
@@ -212,7 +212,7 @@ void PagePropertyPanel::Initialize()
mpToolBoxOrientation->SetDropdownClickHdl( aLink );
mpToolBoxOrientation->SetSelectHdl( aLink );
mpToolBoxOrientation->SetItemImage( nIdOrientation, mImgPortrait);
- mpToolBoxOrientation->SetItemBits( nIdOrientation, mpToolBoxOrientation->GetItemBits( nIdOrientation ) | TIB_DROPDOWNONLY );
+ mpToolBoxOrientation->SetItemBits( nIdOrientation, mpToolBoxOrientation->GetItemBits( nIdOrientation ) | ToolBoxItemBits::DROPDOWNONLY );
// popup for page margins
const sal_uInt16 nIdMargin = mpToolBoxMargin->GetItemId(UNO_MARGIN);
@@ -220,7 +220,7 @@ void PagePropertyPanel::Initialize()
mpToolBoxMargin->SetDropdownClickHdl( aLink );
mpToolBoxMargin->SetSelectHdl( aLink );
mpToolBoxMargin->SetItemImage(nIdMargin, mImgNormal);
- mpToolBoxMargin->SetItemBits( nIdMargin, mpToolBoxMargin->GetItemBits( nIdMargin ) | TIB_DROPDOWNONLY );
+ mpToolBoxMargin->SetItemBits( nIdMargin, mpToolBoxMargin->GetItemBits( nIdMargin ) | ToolBoxItemBits::DROPDOWNONLY );
// popup for page size
const sal_uInt16 nIdSize = mpToolBoxSize->GetItemId(UNO_SIZE);
@@ -228,7 +228,7 @@ void PagePropertyPanel::Initialize()
mpToolBoxSize->SetDropdownClickHdl( aLink );
mpToolBoxSize->SetSelectHdl( aLink );
mpToolBoxSize->SetItemImage(nIdSize, mImgLetter);
- mpToolBoxSize->SetItemBits( nIdSize, mpToolBoxSize->GetItemBits( nIdSize ) | TIB_DROPDOWNONLY );
+ mpToolBoxSize->SetItemBits( nIdSize, mpToolBoxSize->GetItemBits( nIdSize ) | ToolBoxItemBits::DROPDOWNONLY );
maImgSize = new Image[8];
maImgSize[0] = mImgA3;
maImgSize[1] = mImgA4;
@@ -254,7 +254,7 @@ void PagePropertyPanel::Initialize()
mpToolBoxColumn->SetDropdownClickHdl( aLink );
mpToolBoxColumn->SetSelectHdl( aLink );
mpToolBoxColumn->SetItemImage(nIdColumn, mImgColumn1);
- mpToolBoxColumn->SetItemBits( nIdColumn, mpToolBoxColumn->GetItemBits( nIdColumn ) | TIB_DROPDOWNONLY );
+ mpToolBoxColumn->SetItemBits( nIdColumn, mpToolBoxColumn->GetItemBits( nIdColumn ) | ToolBoxItemBits::DROPDOWNONLY );
meFUnit = GetModuleFieldUnit();
meUnit = m_aSwPagePgSizeControl.GetCoreMetric();
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index c5bf16abc16c..a2c9038b2a4a 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -717,7 +717,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
aFirstRect.Bottom() - aFirstRect.Top() );
pEdit->SetSizePixel(aItemWinSize);
aContentToolBox.InsertSeparator(4);
- aContentToolBox.InsertWindow( FN_PAGENUMBER, pEdit, 0, 4);
+ aContentToolBox.InsertWindow( FN_PAGENUMBER, pEdit, ToolBoxItemBits::NONE, 4);
aContentToolBox.InsertSeparator(4);
aContentToolBox.SetHelpId(FN_PAGENUMBER, HID_NAVI_TBX16);
aContentToolBox.ShowItem( FN_PAGENUMBER );
@@ -817,9 +817,9 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
pImgMan->RegisterToolBox(&aContentToolBox, SFX_TOOLBOX_CHANGEOUTSTYLE);
pImgMan->RegisterToolBox(&aGlobalToolBox, SFX_TOOLBOX_CHANGEOUTSTYLE);
- aContentToolBox.SetItemBits( FN_CREATE_NAVIGATION, aContentToolBox.GetItemBits( FN_CREATE_NAVIGATION ) | TIB_DROPDOWNONLY );
- aContentToolBox.SetItemBits( FN_DROP_REGION, aContentToolBox.GetItemBits( FN_DROP_REGION ) | TIB_DROPDOWNONLY );
- aContentToolBox.SetItemBits( FN_OUTLINE_LEVEL, aContentToolBox.GetItemBits( FN_OUTLINE_LEVEL ) | TIB_DROPDOWNONLY );
+ aContentToolBox.SetItemBits( FN_CREATE_NAVIGATION, aContentToolBox.GetItemBits( FN_CREATE_NAVIGATION ) | ToolBoxItemBits::DROPDOWNONLY );
+ aContentToolBox.SetItemBits( FN_DROP_REGION, aContentToolBox.GetItemBits( FN_DROP_REGION ) | ToolBoxItemBits::DROPDOWNONLY );
+ aContentToolBox.SetItemBits( FN_OUTLINE_LEVEL, aContentToolBox.GetItemBits( FN_OUTLINE_LEVEL ) | ToolBoxItemBits::DROPDOWNONLY );
if(IsGlobalDoc())
{