summaryrefslogtreecommitdiff
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
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>
-rw-r--r--accessibility/source/standard/vclxaccessibletoolboxitem.cxx10
-rw-r--r--avmedia/source/framework/mediacontrol.cxx6
-rw-r--r--basctl/source/basicide/tbxctl.cxx2
-rw-r--r--chart2/source/controller/main/ShapeToolbarController.cxx2
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx2
-rw-r--r--dbaccess/source/ui/control/toolboxcontroller.cxx2
-rw-r--r--forms/source/solar/control/navtoolbar.cxx4
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx2
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx8
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx10
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx12
-rw-r--r--framework/source/uielement/togglebuttontoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/toolbarmanager.cxx26
-rw-r--r--framework/source/uielement/toolbarmerger.cxx2
-rw-r--r--include/rsc/rsc-vcl-shared-types.hxx33
-rw-r--r--include/sfx2/sidebar/SidebarToolBox.hxx2
-rw-r--r--include/vcl/toolbox.hxx10
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx2
-rw-r--r--rsc/inc/rscdb.hxx1
-rw-r--r--rsc/source/parser/rscicpx.cxx24
-rw-r--r--sc/source/ui/app/inputwin.cxx18
-rw-r--r--sc/source/ui/cctrl/tbinsert.cxx2
-rw-r--r--sc/source/ui/navipi/navipi.cxx2
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx8
-rw-r--r--sd/source/ui/app/tbxww.cxx2
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx4
-rw-r--r--sd/source/ui/dlg/navigatr.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx8
-rw-r--r--sfx2/source/dialog/titledockwin.cxx2
-rw-r--r--sfx2/source/doc/templatedlg.cxx6
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx12
-rw-r--r--svtools/source/uno/generictoolboxcontroller.cxx8
-rw-r--r--svx/source/customshapes/tbxcustomshapes.cxx2
-rw-r--r--svx/source/form/tbxform.cxx6
-rw-r--r--svx/source/gallery2/galbrws2.cxx4
-rw-r--r--svx/source/mnuctrls/clipboardctl.cxx6
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.cxx4
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.cxx4
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.cxx4
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.cxx2
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx4
-rw-r--r--svx/source/tbxctrls/layctrl.cxx4
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx4
-rw-r--r--svx/source/tbxctrls/linectrl.cxx2
-rw-r--r--svx/source/tbxctrls/subtoolboxcontrol.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx6
-rw-r--r--svx/source/tbxctrls/tbxalign.cxx2
-rw-r--r--svx/source/tbxctrls/tbxdrctl.cxx2
-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
-rw-r--r--vcl/source/window/builder.cxx4
-rw-r--r--vcl/source/window/menubarwindow.cxx4
-rw-r--r--vcl/source/window/toolbox.cxx43
-rw-r--r--vcl/source/window/toolbox2.cxx20
60 files changed, 208 insertions, 201 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 3f77107d42fb..7906f64521ec 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -84,14 +84,14 @@ VCLXAccessibleToolBoxItem::VCLXAccessibleToolBoxItem( ToolBox* _pToolBox, sal_In
{
ToolBoxItemBits nBits = m_pToolBox->GetItemBits( m_nItemId );
if (
- (( nBits & TIB_DROPDOWN ) == TIB_DROPDOWN) ||
- (( nBits & TIB_DROPDOWNONLY ) == TIB_DROPDOWNONLY)
+ (( nBits & ToolBoxItemBits::DROPDOWN ) == ToolBoxItemBits::DROPDOWN) ||
+ (( nBits & ToolBoxItemBits::DROPDOWNONLY ) == ToolBoxItemBits::DROPDOWNONLY)
)
m_nRole = AccessibleRole::BUTTON_DROPDOWN;
else if (
- ( ( nBits & TIB_CHECKABLE ) == TIB_CHECKABLE ) ||
- ( ( nBits & TIB_RADIOCHECK ) == TIB_RADIOCHECK ) ||
- ( ( nBits & TIB_AUTOCHECK ) == TIB_AUTOCHECK )
+ ( ( nBits & ToolBoxItemBits::CHECKABLE ) == ToolBoxItemBits::CHECKABLE ) ||
+ ( ( nBits & ToolBoxItemBits::RADIOCHECK ) == ToolBoxItemBits::RADIOCHECK ) ||
+ ( ( nBits & ToolBoxItemBits::AUTOCHECK ) == ToolBoxItemBits::AUTOCHECK )
)
m_nRole = AccessibleRole::TOGGLE_BUTTON;
else if ( m_pToolBox->GetItemWindow( m_nItemId ) )
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 9551c7017754..96235e3a1c55 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -105,13 +105,13 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
}
- maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, implGetImage( AVMEDIA_IMG_PLAY ), OUString( AVMEDIA_RESID( AVMEDIA_STR_PLAY ) ), TIB_CHECKABLE );
+ maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, implGetImage( AVMEDIA_IMG_PLAY ), OUString( AVMEDIA_RESID( AVMEDIA_STR_PLAY ) ), ToolBoxItemBits::CHECKABLE );
maPlayToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_PLAY, HID_AVMEDIA_TOOLBOXITEM_PLAY );
- maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_PAUSE, implGetImage( AVMEDIA_IMG_PAUSE ), OUString( AVMEDIA_RESID( AVMEDIA_STR_PAUSE ) ), TIB_CHECKABLE );
+ maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_PAUSE, implGetImage( AVMEDIA_IMG_PAUSE ), OUString( AVMEDIA_RESID( AVMEDIA_STR_PAUSE ) ), ToolBoxItemBits::CHECKABLE );
maPlayToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_PAUSE, HID_AVMEDIA_TOOLBOXITEM_PAUSE );
- maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_STOP, implGetImage( AVMEDIA_IMG_STOP ), OUString( AVMEDIA_RESID( AVMEDIA_STR_STOP ) ), TIB_CHECKABLE );
+ maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_STOP, implGetImage( AVMEDIA_IMG_STOP ), OUString( AVMEDIA_RESID( AVMEDIA_STR_STOP ) ), ToolBoxItemBits::CHECKABLE );
maPlayToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_STOP, HID_AVMEDIA_TOOLBOXITEM_STOP );
maPlayToolBox.InsertSeparator();
diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx
index 721c1372326b..55c384c4d201 100644
--- a/basctl/source/basicide/tbxctl.cxx
+++ b/basctl/source/basicide/tbxctl.cxx
@@ -52,7 +52,7 @@ TbxControls::TbxControls( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
{
nLastSlot = USHRT_MAX;
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
diff --git a/chart2/source/controller/main/ShapeToolbarController.cxx b/chart2/source/controller/main/ShapeToolbarController.cxx
index 856f6cab7ab1..ec0df948e3d8 100644
--- a/chart2/source/controller/main/ShapeToolbarController.cxx
+++ b/chart2/source/controller/main/ShapeToolbarController.cxx
@@ -170,7 +170,7 @@ void ShapeToolbarController::initialize( const Sequence< uno::Any >& rArguments
}
// check if paste special is allowed, when not don't add DROPDOWN
- pToolBox->SetItemBits( m_nToolBoxId, pToolBox->GetItemBits( m_nToolBoxId ) | TIB_DROPDOWN );
+ pToolBox->SetItemBits( m_nToolBoxId, pToolBox->GetItemBits( m_nToolBoxId ) | ToolBoxItemBits::DROPDOWN );
}
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 8c22f47659b8..d68ec26f904a 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -5093,7 +5093,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem(
BitmapEx aBitmapex = BitmapEx::AutoScaleBitmap(aBitmap, m_nExpectedSize);
aImage = Image( aBitmapex);
}
- pTbSymbol->InsertItem( nId,aImage, aURL, 0, 0 ); //modify
+ pTbSymbol->InsertItem( nId,aImage, aURL, ToolBoxItemBits::NONE, 0 ); //modify
xGraphic = aImage.GetXGraphic();
@@ -5257,7 +5257,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL )
}
if ( bOK && !!aImage )
{
- pTbSymbol->InsertItem( nId, aImage, aURL, 0, 0 );
+ pTbSymbol->InsertItem( nId, aImage, aURL, ToolBoxItemBits::NONE, 0 );
xGraphic = aImage.GetXGraphic();
xGraphic->acquire();
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index eadf7a03376c..d437754e24f9 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -202,7 +202,7 @@ OAppDetailPageHelper::OAppDetailPageHelper(vcl::Window* _pParent,OAppBorderWindo
m_aMenu.reset(new PopupMenu( ModuleRes( RID_MENU_APP_PREVIEW ) ));
m_aTBPreview.SetOutStyle(TOOLBOX_STYLE_FLAT);
- m_aTBPreview.InsertItem(SID_DB_APP_DISABLE_PREVIEW,m_aMenu->GetItemText(SID_DB_APP_DISABLE_PREVIEW),TIB_LEFT|TIB_DROPDOWN|TIB_AUTOSIZE|TIB_RADIOCHECK);
+ m_aTBPreview.InsertItem(SID_DB_APP_DISABLE_PREVIEW,m_aMenu->GetItemText(SID_DB_APP_DISABLE_PREVIEW),ToolBoxItemBits::LEFT|ToolBoxItemBits::DROPDOWN|ToolBoxItemBits::AUTOSIZE|ToolBoxItemBits::RADIOCHECK);
m_aTBPreview.SetHelpId(HID_APP_VIEW_PREVIEW_CB);
m_aTBPreview.SetDropdownClickHdl( LINK( this, OAppDetailPageHelper, OnDropdownClickHdl ) );
m_aTBPreview.EnableMenuStrings();
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx
index 95ced8b8190c..11a514628957 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -146,7 +146,7 @@ namespace dbaui
}
// check if paste special is allowed, when not don't add DROPDOWN
- pToolBox->SetItemBits(m_nToolBoxId,pToolBox->GetItemBits(m_nToolBoxId) | TIB_DROPDOWN);
+ pToolBox->SetItemBits(m_nToolBoxId,pToolBox->GetItemBits(m_nToolBoxId) | ToolBoxItemBits::DROPDOWN);
}
}
void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException, std::exception )
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index 779300574404..31335632c9da 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -124,7 +124,7 @@ namespace frm
if ( m_pDispatcher )
{
if ( !m_pDispatcher->isEnabled( GetCurItemId() ) )
- // the toolbox is a little bit buggy: With TIB_REPEAT, it sometimes
+ // the toolbox is a little bit buggy: With ToolBoxItemBits::REPEAT, it sometimes
// happens that a select is reported, even though the respective
// item has just been disabled.
return;
@@ -283,7 +283,7 @@ namespace frm
{ // it's _not_ a separator
// insert the entry
- m_pToolbar->InsertItem( pSupportedFeatures->nId, OUString(), pSupportedFeatures->bRepeat ? TIB_REPEAT : 0 );
+ m_pToolbar->InsertItem( pSupportedFeatures->nId, OUString(), pSupportedFeatures->bRepeat ? ToolBoxItemBits::REPEAT : ToolBoxItemBits::NONE );
m_pToolbar->SetQuickHelpText( pSupportedFeatures->nId, OUString() ); // TODO
if ( !isArtificialItem( pSupportedFeatures->nId ) )
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 90458fb0ce64..462f48ee8eb2 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -158,7 +158,7 @@ class ToolBarManager : public ToolbarManager_Base
void UpdateImageOrientation();
void ImplClearPopupMenu( ToolBox *pToolBar );
void RequestImages();
- sal_uInt16 ConvertStyleToToolboxItemBits( sal_Int32 nStyle );
+ ToolBoxItemBits ConvertStyleToToolboxItemBits( sal_Int32 nStyle );
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetModelFromFrame() const;
bool IsPluginMode() const;
Image QueryAddonsImage( const OUString& aCommandURL, bool bBigImages );
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx
index 7e731b306964..49026882bddb 100644
--- a/framework/source/uielement/complextoolbarcontroller.cxx
+++ b/framework/source/uielement/complextoolbarcontroller.cxx
@@ -140,8 +140,8 @@ throw ( RuntimeException, std::exception )
{
m_pToolbar->EnableItem( m_nID, Event.IsEnabled );
- sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID );
- nItemBits &= ~TIB_CHECKABLE;
+ ToolBoxItemBits nItemBits = m_pToolbar->GetItemBits( m_nID );
+ nItemBits &= ~ToolBoxItemBits::CHECKABLE;
TriState eTri = TRISTATE_FALSE;
bool bValue;
@@ -158,7 +158,7 @@ throw ( RuntimeException, std::exception )
m_pToolbar->CheckItem( m_nID, bValue );
if ( bValue )
eTri = TRISTATE_TRUE;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
}
else if ( Event.State >>= aStrValue )
{
@@ -172,7 +172,7 @@ throw ( RuntimeException, std::exception )
else if ( Event.State >>= aItemState )
{
eTri = TRISTATE_INDET;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
if ( m_bMadeInvisible )
m_pToolbar->ShowItem( m_nID, true );
}
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index c3a836bf60a4..11cf7ee004ff 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -188,8 +188,8 @@ throw ( RuntimeException, std::exception )
{
m_pToolbar->EnableItem( m_nID, Event.IsEnabled );
- sal_uInt16 nItemBits = m_pToolbar->GetItemBits( m_nID );
- nItemBits &= ~TIB_CHECKABLE;
+ ToolBoxItemBits nItemBits = m_pToolbar->GetItemBits( m_nID );
+ nItemBits &= ~ToolBoxItemBits::CHECKABLE;
TriState eTri = TRISTATE_FALSE;
bool bValue;
@@ -205,7 +205,7 @@ throw ( RuntimeException, std::exception )
m_pToolbar->CheckItem( m_nID, bValue );
if ( bValue )
eTri = TRISTATE_TRUE;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
}
else if ( Event.State >>= aStrValue )
{
@@ -219,7 +219,7 @@ throw ( RuntimeException, std::exception )
m_pToolbar->CheckItem( m_nID, bValue );
if ( bValue )
eTri = TRISTATE_TRUE;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
}
else
{
@@ -252,7 +252,7 @@ throw ( RuntimeException, std::exception )
else if (( Event.State >>= aItemState ) && !m_bEnumCommand )
{
eTri = TRISTATE_INDET;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
if ( m_bMadeInvisible )
m_pToolbar->ShowItem( m_nID, true );
}
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 10617f6e0906..fbb28088e7e1 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -70,7 +70,7 @@ protected:
PopupMenuToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const OUString &rPopupCommand = OUString() );
virtual void functionExecuted( const OUString &rCommand );
- virtual sal_uInt16 getDropDownStyle() const;
+ virtual ToolBoxItemBits getDropDownStyle() const;
void createPopupMenuController();
css::uno::Reference< css::uno::XComponentContext > m_xContext;
@@ -205,9 +205,9 @@ void PopupMenuToolbarController::functionExecuted( const OUString &/*rCommand*/)
{
}
-sal_uInt16 PopupMenuToolbarController::getDropDownStyle() const
+ToolBoxItemBits PopupMenuToolbarController::getDropDownStyle() const
{
- return TIB_DROPDOWN;
+ return ToolBoxItemBits::DROPDOWN;
}
void PopupMenuToolbarController::createPopupMenuController()
@@ -260,7 +260,7 @@ public:
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) SAL_OVERRIDE;
private:
- sal_uInt16 getDropDownStyle() const SAL_OVERRIDE;
+ ToolBoxItemBits getDropDownStyle() const SAL_OVERRIDE;
};
WizardsToolbarController::WizardsToolbarController(
@@ -290,9 +290,9 @@ css::uno::Sequence<OUString> WizardsToolbarController::getSupportedServiceNames(
return aRet;
}
-sal_uInt16 WizardsToolbarController::getDropDownStyle() const
+ToolBoxItemBits WizardsToolbarController::getDropDownStyle() const
{
- return TIB_DROPDOWNONLY;
+ return ToolBoxItemBits::DROPDOWNONLY;
}
class OpenToolbarController : public PopupMenuToolbarController
diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
index 5d73812ab615..3ee98ab91f24 100644
--- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
@@ -64,9 +64,9 @@ ToggleButtonToolbarController::ToggleButtonToolbarController(
m_eStyle( eStyle )
{
if ( eStyle == STYLE_DROPDOWNBUTTON )
- m_pToolbar->SetItemBits( m_nID, TIB_DROPDOWNONLY | m_pToolbar->GetItemBits( m_nID ) );
+ m_pToolbar->SetItemBits( m_nID, ToolBoxItemBits::DROPDOWNONLY | m_pToolbar->GetItemBits( m_nID ) );
else if ( eStyle == STYLE_TOGGLE_DROPDOWNBUTTON )
- m_pToolbar->SetItemBits( m_nID, TIB_DROPDOWN | m_pToolbar->GetItemBits( m_nID ) );
+ m_pToolbar->SetItemBits( m_nID, ToolBoxItemBits::DROPDOWN | m_pToolbar->GetItemBits( m_nID ) );
}
ToggleButtonToolbarController::~ToggleButtonToolbarController()
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index b9ec5385d099..e00a974607a2 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -947,7 +947,7 @@ void ToolBarManager::CreateControllers()
// Accessibility support: Set toggle button role for specific commands
sal_Int32 nProps = RetrievePropertiesFromCommand( aCommandURL );
if ( nProps & UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON )
- m_pToolBar->SetItemBits( nId, m_pToolBar->GetItemBits( nId ) | TIB_CHECKABLE );
+ m_pToolBar->SetItemBits( nId, m_pToolBar->GetItemBits( nId ) | ToolBoxItemBits::CHECKABLE );
}
else
xController = Reference< XStatusListener >(
@@ -1110,25 +1110,25 @@ void ToolBarManager::AddImageOrientationListener()
}
}
-sal_uInt16 ToolBarManager::ConvertStyleToToolboxItemBits( sal_Int32 nStyle )
+ToolBoxItemBits ToolBarManager::ConvertStyleToToolboxItemBits( sal_Int32 nStyle )
{
- sal_uInt16 nItemBits( 0 );
+ ToolBoxItemBits nItemBits( ToolBoxItemBits::NONE );
if ( nStyle & ::com::sun::star::ui::ItemStyle::RADIO_CHECK )
- nItemBits |= TIB_RADIOCHECK;
+ nItemBits |= ToolBoxItemBits::RADIOCHECK;
if ( nStyle & ::com::sun::star::ui::ItemStyle::ALIGN_LEFT )
- nItemBits |= TIB_LEFT;
+ nItemBits |= ToolBoxItemBits::LEFT;
if ( nStyle & ::com::sun::star::ui::ItemStyle::AUTO_SIZE )
- nItemBits |= TIB_AUTOSIZE;
+ nItemBits |= ToolBoxItemBits::AUTOSIZE;
if ( nStyle & ::com::sun::star::ui::ItemStyle::DROP_DOWN )
- nItemBits |= TIB_DROPDOWN;
+ nItemBits |= ToolBoxItemBits::DROPDOWN;
if ( nStyle & ::com::sun::star::ui::ItemStyle::REPEAT )
- nItemBits |= TIB_REPEAT;
+ nItemBits |= ToolBoxItemBits::REPEAT;
if ( nStyle & ::com::sun::star::ui::ItemStyle::DROPDOWN_ONLY )
- nItemBits |= TIB_DROPDOWNONLY;
+ nItemBits |= ToolBoxItemBits::DROPDOWNONLY;
if ( nStyle & ::com::sun::star::ui::ItemStyle::TEXT )
- nItemBits |= TIB_TEXT_ONLY;
+ nItemBits |= ToolBoxItemBits::TEXT_ONLY;
if ( nStyle & ::com::sun::star::ui::ItemStyle::ICON )
- nItemBits |= TIB_ICON_ONLY;
+ nItemBits |= ToolBoxItemBits::ICON_ONLY;
return nItemBits;
}
@@ -1268,11 +1268,11 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
{
OUString aString( RetrieveLabelFromCommand( aCommandURL ));
- sal_uInt16 nItemBits = ConvertStyleToToolboxItemBits( nStyle );
+ ToolBoxItemBits nItemBits = ConvertStyleToToolboxItemBits( nStyle );
if ( aMenuDesc.is() )
{
m_aMenuMap[ nId ] = aMenuDesc;
- nItemBits |= TIB_DROPDOWNONLY;
+ nItemBits |= ToolBoxItemBits::DROPDOWNONLY;
}
m_pToolBar->InsertItem( nId, aString, nItemBits );
m_pToolBar->SetItemCommand( nId, aCommandURL );
diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx
index 42d139dead33..798b76cdbec5 100644
--- a/framework/source/uielement/toolbarmerger.cxx
+++ b/framework/source/uielement/toolbarmerger.cxx
@@ -662,7 +662,7 @@ bool ToolBarMerger::RemoveItems(
void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, CommandToInfoMap& rCommandMap, sal_uInt16 nPos, sal_uInt16 nItemId, const AddonToolbarItem& rItem )
{
- pToolbar->InsertItem( nItemId, rItem.aLabel, 0, nPos );
+ pToolbar->InsertItem( nItemId, rItem.aLabel, ToolBoxItemBits::NONE, nPos );
pToolbar->SetItemCommand( nItemId, rItem.aCommandURL );
pToolbar->SetQuickHelpText( nItemId, rItem.aLabel );
pToolbar->SetItemText( nItemId, rItem.aLabel );
diff --git a/include/rsc/rsc-vcl-shared-types.hxx b/include/rsc/rsc-vcl-shared-types.hxx
index 051cd71303f1..1c1441204026 100644
--- a/include/rsc/rsc-vcl-shared-types.hxx
+++ b/include/rsc/rsc-vcl-shared-types.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_RSC_RSC_VCL_SHARED_TYPES_HXX
#include <sal/types.h>
+#include <o3tl/typed_flags_set.hxx>
enum TimeFieldFormat {TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC, TIMEF_SEC_CS, TimeFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
@@ -48,19 +49,25 @@ typedef sal_uInt16 MenuItemBits;
#define MIB_ICON ((MenuItemBits)0x0080)
#define MIB_TEXT ((MenuItemBits)0x0100)
-typedef sal_uInt16 ToolBoxItemBits;
-
-#define TIB_CHECKABLE ((ToolBoxItemBits)0x0001)
-#define TIB_RADIOCHECK ((ToolBoxItemBits)0x0002)
-#define TIB_AUTOCHECK ((ToolBoxItemBits)0x0004)
-#define TIB_LEFT ((ToolBoxItemBits)0x0008)
-#define TIB_AUTOSIZE ((ToolBoxItemBits)0x0010)
-#define TIB_DROPDOWN ((ToolBoxItemBits)0x0020)
-#define TIB_REPEAT ((ToolBoxItemBits)0x0040)
-#define TIB_DROPDOWNONLY ((ToolBoxItemBits)0x0080 | TIB_DROPDOWN)
-#define TIB_TEXT_ONLY ((ToolBoxItemBits)0x0100)
-#define TIB_ICON_ONLY ((ToolBoxItemBits)0x0200)
-#define TIB_TEXTICON ((ToolBoxItemBits) TIB_TEXT_ONLY | TIB_ICON_ONLY )
+enum class ToolBoxItemBits : sal_uInt16
+{
+ NONE = 0x0000,
+ CHECKABLE = 0x0001,
+ RADIOCHECK = 0x0002,
+ AUTOCHECK = 0x0004,
+ LEFT = 0x0008,
+ AUTOSIZE = 0x0010,
+ DROPDOWN = 0x0020,
+ REPEAT = 0x0040,
+ DROPDOWNONLY = 0x00a0, // 0x0080 | TIB_DROPDOWN
+ TEXT_ONLY = 0x0100,
+ ICON_ONLY = 0x0200,
+ TEXTICON = 0x0300 // TIB_TEXT_ONLY | TIB_ICON_ONLY
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ToolBoxItemBits> : is_typed_flags<ToolBoxItemBits, 0x3ff> {};
+}
enum ToolBoxItemType { TOOLBOXITEM_DONTKNOW, TOOLBOXITEM_BUTTON,
TOOLBOXITEM_SPACE, TOOLBOXITEM_SEPARATOR,
diff --git a/include/sfx2/sidebar/SidebarToolBox.hxx b/include/sfx2/sidebar/SidebarToolBox.hxx
index 0a6f37fa8463..381745da7648 100644
--- a/include/sfx2/sidebar/SidebarToolBox.hxx
+++ b/include/sfx2/sidebar/SidebarToolBox.hxx
@@ -45,7 +45,7 @@ public:
using ToolBox::InsertItem;
virtual void InsertItem(const OUString& rCommand,
const com::sun::star::uno::Reference<com::sun::star::frame::XFrame>& rFrame,
- ToolBoxItemBits nBits = 0,
+ ToolBoxItemBits nBits = ToolBoxItemBits::NONE,
const Size& rRequestedSize = Size(),
sal_uInt16 nPos = TOOLBOX_APPEND) SAL_OVERRIDE;
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 7bde25e90362..e8161b7407c3 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -328,21 +328,21 @@ public:
/// Insert a command (like '.uno:Save').
virtual void InsertItem( const OUString& rCommand,
const css::uno::Reference<css::frame::XFrame>& rFrame,
- ToolBoxItemBits nBits = 0,
+ ToolBoxItemBits nBits = ToolBoxItemBits::NONE,
const Size& rRequestedSize = Size(),
sal_uInt16 nPos = TOOLBOX_APPEND );
void InsertItem( sal_uInt16 nItemId, const Image& rImage,
- ToolBoxItemBits nBits = 0,
+ ToolBoxItemBits nBits = ToolBoxItemBits::NONE,
sal_uInt16 nPos = TOOLBOX_APPEND );
void InsertItem( sal_uInt16 nItemId, const Image& rImage,
const OUString& rText,
- ToolBoxItemBits nBits = 0,
+ ToolBoxItemBits nBits = ToolBoxItemBits::NONE,
sal_uInt16 nPos = TOOLBOX_APPEND );
void InsertItem( sal_uInt16 nItemId, const OUString& rText,
- ToolBoxItemBits nBits = 0,
+ ToolBoxItemBits nBits = ToolBoxItemBits::NONE,
sal_uInt16 nPos = TOOLBOX_APPEND );
void InsertWindow( sal_uInt16 nItemId, vcl::Window* pWindow,
- ToolBoxItemBits nBits = 0,
+ ToolBoxItemBits nBits = ToolBoxItemBits::NONE,
sal_uInt16 nPos = TOOLBOX_APPEND );
void InsertSpace( sal_uInt16 nPos = TOOLBOX_APPEND );
void InsertSeparator( sal_uInt16 nPos = TOOLBOX_APPEND,
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index 12171558bf8b..cb83281f3b29 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -194,7 +194,7 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
if ( m_pToolbarController.is() )
m_pToolbarController->initialize(_rArguments);
// check if paste special is allowed, when not don't add DROPDOWN
- pToolBox->SetItemBits(m_nToolBoxId,pToolBox->GetItemBits(m_nToolBoxId) | TIB_DROPDOWN);
+ pToolBox->SetItemBits(m_nToolBoxId,pToolBox->GetItemBits(m_nToolBoxId) | ToolBoxItemBits::DROPDOWN);
}
}
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index c4bc2fe4ffc4..a200f1ff188d 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -140,6 +140,7 @@ class RscTypCont
void Init(); // Initialisiert Klassen und Tabelle
void SETCONST( RscConst *, const char *, sal_uInt32 );
inline void SETCONST( RscConst *p1, const char * p2, SymbolType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
+ inline void SETCONST( RscConst *p1, Atom p2, ToolBoxItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
void SETCONST( RscConst *, Atom, sal_uInt32 );
RscEnum * InitLangType();
RscEnum * InitFieldUnitsType();
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index a9034bcb255b..661aef93ea04 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -1308,18 +1308,18 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
aBaseLst.push_back( pFlag = new RscFlag( pHS->getID( "FlagToolBoxState" ), RSC_NOTYPE ) );
// Konstanten in Tabelle stellen
- l_nCheckableId = pHS->getID( "TIB_CHECKABLE" );
- SETCONST( pFlag, l_nCheckableId, TIB_CHECKABLE );
- l_nAutoCheckId = pHS->getID( "TIB_AUTOCHECK" );
- SETCONST( pFlag, l_nAutoCheckId, TIB_AUTOCHECK );
- l_nRadioCheckId = pHS->getID( "TIB_RADIOCHECK" );
- SETCONST( pFlag, l_nRadioCheckId, TIB_RADIOCHECK );
- l_nLeftId = pHS->getID( "TIB_LEFT" );
- SETCONST( pFlag, l_nLeftId, TIB_LEFT );
- l_nAutoSizeId = pHS->getID( "TIB_AUTOSIZE" );
- SETCONST( pFlag, l_nAutoSizeId, TIB_AUTOSIZE );
- l_nDropDownId = pHS->getID( "TIB_DROPDOWN" );
- SETCONST( pFlag, l_nDropDownId, TIB_DROPDOWN );
+ l_nCheckableId = pHS->getID( "ToolBoxItemBits::CHECKABLE" );
+ SETCONST( pFlag, l_nCheckableId, ToolBoxItemBits::CHECKABLE );
+ l_nAutoCheckId = pHS->getID( "ToolBoxItemBits::AUTOCHECK" );
+ SETCONST( pFlag, l_nAutoCheckId, ToolBoxItemBits::AUTOCHECK );
+ l_nRadioCheckId = pHS->getID( "ToolBoxItemBits::RADIOCHECK" );
+ SETCONST( pFlag, l_nRadioCheckId, ToolBoxItemBits::RADIOCHECK );
+ l_nLeftId = pHS->getID( "ToolBoxItemBits::LEFT" );
+ SETCONST( pFlag, l_nLeftId, ToolBoxItemBits::LEFT );
+ l_nAutoSizeId = pHS->getID( "ToolBoxItemBits::AUTOSIZE" );
+ SETCONST( pFlag, l_nAutoSizeId, ToolBoxItemBits::AUTOSIZE );
+ l_nDropDownId = pHS->getID( "ToolBoxItemBits::DROPDOWN" );
+ SETCONST( pFlag, l_nDropDownId, ToolBoxItemBits::DROPDOWN );
// Variable einfuegen
l_nVarId = aNmTb.Put( "_ToolBoxItemFlags", VARNAME );
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 14f819603ce8..02478a23adf2 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -202,13 +202,13 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) :
OSL_ENSURE( pViewSh, "no view shell for input window" );
// Position window, 3 buttons, input window
- InsertWindow ( 1, &aWndPos, 0, 0 );
+ InsertWindow ( 1, &aWndPos, ToolBoxItemBits::NONE, 0 );
InsertSeparator ( 1 );
- InsertItem ( SID_INPUT_FUNCTION, IMAGE( SID_INPUT_FUNCTION ), 0, 2 );
- InsertItem ( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), 0, 3 );
- InsertItem ( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), 0, 4 );
+ InsertItem ( SID_INPUT_FUNCTION, IMAGE( SID_INPUT_FUNCTION ), ToolBoxItemBits::NONE, 2 );
+ InsertItem ( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), ToolBoxItemBits::NONE, 3 );
+ InsertItem ( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), ToolBoxItemBits::NONE, 4 );
InsertSeparator ( 5 );
- InsertWindow ( 7, &aTextWindow, 0, 6 );
+ InsertWindow ( 7, &aTextWindow, ToolBoxItemBits::NONE, 6 );
aWndPos .SetQuickHelpText( ScResId( SCSTR_QHELP_POSWND ) );
aWndPos .SetHelpId ( HID_INSWIN_POS );
@@ -653,8 +653,8 @@ void ScInputWindow::SetOkCancelMode()
{
RemoveItem( 3 ); // Remove SID_INPUT_SUM and SID_INPUT_EQUAL
RemoveItem( 3 );
- InsertItem( SID_INPUT_CANCEL, IMAGE( SID_INPUT_CANCEL ), 0, 3 );
- InsertItem( SID_INPUT_OK, IMAGE( SID_INPUT_OK ), 0, 4 );
+ InsertItem( SID_INPUT_CANCEL, IMAGE( SID_INPUT_CANCEL ), ToolBoxItemBits::NONE, 3 );
+ InsertItem( SID_INPUT_OK, IMAGE( SID_INPUT_OK ), ToolBoxItemBits::NONE, 4 );
SetItemText ( SID_INPUT_CANCEL, aTextCancel );
SetHelpId ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL );
SetItemText ( SID_INPUT_OK, aTextOk );
@@ -676,8 +676,8 @@ void ScInputWindow::SetSumAssignMode()
// Remove SID_INPUT_CANCEL, and SID_INPUT_OK
RemoveItem( 3 );
RemoveItem( 3 );
- InsertItem( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), 0, 3 );
- InsertItem( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), 0, 4 );
+ InsertItem( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), ToolBoxItemBits::NONE, 3 );
+ InsertItem( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), ToolBoxItemBits::NONE, 4 );
SetItemText ( SID_INPUT_SUM, aTextSum );
SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME );
SetItemText ( SID_INPUT_EQUAL, aTextEqual );
diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx
index fe1635bf91dd..4030b74d2e5f 100644
--- a/sc/source/ui/cctrl/tbinsert.cxx
+++ b/sc/source/ui/cctrl/tbinsert.cxx
@@ -41,7 +41,7 @@ ScTbxInsertCtrl::ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& r
SfxToolBoxControl( nSlotId, nId, rTbx ),
nLastSlotId(0)
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
}
ScTbxInsertCtrl::~ScTbxInsertCtrl()
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index f6e01c42464d..6b3218eb83cd 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -325,7 +325,7 @@ CommandToolBox::CommandToolBox( ScNavigatorDlg* pParent, const ResId& rResId )
SetSizePixel( CalcWindowSizePixel() );
SetDropdownClickHdl( LINK(this, CommandToolBox, ToolBoxDropdownClickHdl) );
- SetItemBits( IID_DROPMODE, GetItemBits( IID_DROPMODE ) | TIB_DROPDOWNONLY );
+ SetItemBits( IID_DROPMODE, GetItemBits( IID_DROPMODE ) | ToolBoxItemBits::DROPDOWNONLY );
}
CommandToolBox::~CommandToolBox()
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 9907448945af..bb44cd93bfb7 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -225,28 +225,28 @@ CellAppearancePropertyPanel::~CellAppearancePropertyPanel()
void CellAppearancePropertyPanel::Initialize()
{
const sal_uInt16 nIdBkColor = mpTBFillColor->GetItemId( UNO_BACKGROUNDCOLOR );
- mpTBFillColor->SetItemBits( nIdBkColor, mpTBFillColor->GetItemBits( nIdBkColor ) | TIB_DROPDOWNONLY );
+ mpTBFillColor->SetItemBits( nIdBkColor, mpTBFillColor->GetItemBits( nIdBkColor ) | ToolBoxItemBits::DROPDOWNONLY );
Link aLink = LINK(this, CellAppearancePropertyPanel, TbxBKColorSelectHdl);
mpTBFillColor->SetDropdownClickHdl ( aLink );
mpTBFillColor->SetSelectHdl ( aLink );
const sal_uInt16 nIdBorderType = mpTBCellBorder->GetItemId( UNO_SETBORDERSTYLE );
mpTBCellBorder->SetItemImage( nIdBorderType, maIMGCellBorder );
- mpTBCellBorder->SetItemBits( nIdBorderType, mpTBCellBorder->GetItemBits( nIdBorderType ) | TIB_DROPDOWNONLY );
+ mpTBCellBorder->SetItemBits( nIdBorderType, mpTBCellBorder->GetItemBits( nIdBorderType ) | ToolBoxItemBits::DROPDOWNONLY );
aLink = LINK(this, CellAppearancePropertyPanel, TbxCellBorderSelectHdl);
mpTBCellBorder->SetDropdownClickHdl ( aLink );
mpTBCellBorder->SetSelectHdl ( aLink );
const sal_uInt16 nIdBorderLineStyle = mpTBLineStyle->GetItemId( UNO_LINESTYLE );
mpTBLineStyle->SetItemImage( nIdBorderLineStyle, maIMGLineStyle1 );
- mpTBLineStyle->SetItemBits( nIdBorderLineStyle, mpTBLineStyle->GetItemBits( nIdBorderLineStyle ) | TIB_DROPDOWNONLY );
+ mpTBLineStyle->SetItemBits( nIdBorderLineStyle, mpTBLineStyle->GetItemBits( nIdBorderLineStyle ) | ToolBoxItemBits::DROPDOWNONLY );
aLink = LINK(this, CellAppearancePropertyPanel, TbxLineStyleSelectHdl);
mpTBLineStyle->SetDropdownClickHdl ( aLink );
mpTBLineStyle->SetSelectHdl ( aLink );
mpTBLineStyle->Disable();
const sal_uInt16 nIdBorderLinecolor = mpTBLineColor->GetItemId( UNO_FRAMELINECOLOR );
- mpTBLineColor->SetItemBits( nIdBorderLinecolor, mpTBLineColor->GetItemBits( nIdBorderLinecolor ) | TIB_DROPDOWNONLY );
+ mpTBLineColor->SetItemBits( nIdBorderLinecolor, mpTBLineColor->GetItemBits( nIdBorderLinecolor ) | ToolBoxItemBits::DROPDOWNONLY );
aLink = LINK(this, CellAppearancePropertyPanel, TbxLineColorSelectHdl);
mpTBLineColor->SetDropdownClickHdl ( aLink );
mpTBLineColor->SetSelectHdl ( aLink );
diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx
index 40ee52f1ddd9..1a80e8b18ea4 100644
--- a/sd/source/ui/app/tbxww.cxx
+++ b/sd/source/ui/app/tbxww.cxx
@@ -45,7 +45,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SdTbxControl, TbxImageItem )
SdTbxControl::SdTbxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index e5a4621571e9..27cb76b6a561 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -349,9 +349,9 @@ void SAL_CALL SlideLayoutController::initialize( const css::uno::Sequence< css::
if ( getToolboxId( nId, &pToolBox ) )
{
if ( mbInsertPage )
- pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | TIB_DROPDOWN );
+ pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWN );
else
- pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | TIB_DROPDOWNONLY );
+ pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWNONLY );
}
}
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index b9aa3f5ea1a3..7e7f1550ec7a 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -94,12 +94,12 @@ SdNavigatorWin::SdNavigatorWin(
maToolbox.SetSelectHdl( LINK( this, SdNavigatorWin, SelectToolboxHdl ) );
maToolbox.SetClickHdl( LINK( this, SdNavigatorWin, ClickToolboxHdl ) );
maToolbox.SetDropdownClickHdl( LINK(this, SdNavigatorWin, DropdownClickToolBoxHdl) );
- maToolbox.SetItemBits( TBI_DRAGTYPE, maToolbox.GetItemBits( TBI_DRAGTYPE ) | TIB_DROPDOWNONLY );
+ maToolbox.SetItemBits( TBI_DRAGTYPE, maToolbox.GetItemBits( TBI_DRAGTYPE ) | ToolBoxItemBits::DROPDOWNONLY );
// Shape filter drop down menu.
maToolbox.SetItemBits(
TBI_SHAPE_FILTER,
- maToolbox.GetItemBits(TBI_SHAPE_FILTER) | TIB_DROPDOWNONLY);
+ maToolbox.GetItemBits(TBI_SHAPE_FILTER) | ToolBoxItemBits::DROPDOWNONLY);
// TreeListBox
// set position below toolbox
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 05b443c726d6..3eef6a97548a 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -2391,7 +2391,7 @@ void SfxTemplateDialog_Impl::InsertFamilyItem(sal_uInt16 nId,const SfxStyleFamil
case SFX_STYLE_FAMILY_PSEUDO: sHelpId = ".uno:ListStyle"; break;
default: OSL_FAIL("unknown StyleFamily"); break;
}
- m_aActionTbL.InsertItem( nId, pItem->GetImage(), pItem->GetText(), 0, 0);
+ m_aActionTbL.InsertItem( nId, pItem->GetImage(), pItem->GetText(), ToolBoxItemBits::NONE, 0);
m_aActionTbL.SetHelpId( nId, sHelpId );
}
@@ -2401,7 +2401,7 @@ void SfxTemplateDialog_Impl::ReplaceUpdateButtonByMenu()
{
m_aActionTbR.HideItem(SID_STYLE_UPDATE_BY_EXAMPLE);
m_aActionTbR.SetItemBits( SID_STYLE_NEW_BY_EXAMPLE,
- TIB_DROPDOWNONLY|m_aActionTbR.GetItemBits( SID_STYLE_NEW_BY_EXAMPLE ));
+ ToolBoxItemBits::DROPDOWNONLY|m_aActionTbR.GetItemBits( SID_STYLE_NEW_BY_EXAMPLE ));
}
@@ -2652,7 +2652,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRSelect, ToolBox *, pBox )
{
const sal_uInt16 nEntry = pBox->GetCurItemId();
if(nEntry != SID_STYLE_NEW_BY_EXAMPLE ||
- TIB_DROPDOWN != (pBox->GetItemBits(nEntry)&TIB_DROPDOWN))
+ ToolBoxItemBits::DROPDOWN != (pBox->GetItemBits(nEntry)&ToolBoxItemBits::DROPDOWN))
ActionSelect(nEntry);
return 0;
}
@@ -2661,7 +2661,7 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox )
{
const sal_uInt16 nEntry = pBox->GetCurItemId();
if(nEntry == SID_STYLE_NEW_BY_EXAMPLE &&
- TIB_DROPDOWN == (pBox->GetItemBits(nEntry)&TIB_DROPDOWN))
+ ToolBoxItemBits::DROPDOWN == (pBox->GetItemBits(nEntry)&ToolBoxItemBits::DROPDOWN))
{
//create a popup menu in Writer
boost::scoped_ptr<PopupMenu> pMenu(new PopupMenu);
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index 3d5c8e2baf61..02f0601667cc 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -244,7 +244,7 @@ namespace sfx2
// Add the menu before the closer button.
const sal_uInt16 nItemCount( m_aToolbox.GetItemCount() );
const sal_uInt16 nItemId( nItemCount + 1 );
- m_aToolbox.InsertItem( nItemId, i_rItemText, TIB_DROPDOWNONLY, nItemCount > 0 ? nItemCount - 1 : TOOLBOX_APPEND );
+ m_aToolbox.InsertItem( nItemId, i_rItemText, ToolBoxItemBits::DROPDOWNONLY, nItemCount > 0 ? nItemCount - 1 : TOOLBOX_APPEND );
m_aToolbox.SetHelpId( nItemId, i_nHelpId );
m_aToolbox.SetClickHdl( i_rCallback );
m_aToolbox.SetDropdownClickHdl( i_rCallback );
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index bdd2b27e8856..ca1d508ce570 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -224,9 +224,9 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window *parent)
mpTemplateBar->SetButtonType(BUTTON_SYMBOLTEXT);
// Set toolbox button bits
- mpViewBar->SetItemBits(mpViewBar->GetItemId(VIEWBAR_REPOSITORY), TIB_DROPDOWNONLY);
- mpActionBar->SetItemBits(mpActionBar->GetItemId(ACTIONBAR_ACTION), TIB_DROPDOWNONLY);
- mpTemplateBar->SetItemBits(mpTemplateBar->GetItemId(TEMPLATEBAR_MOVE), TIB_DROPDOWNONLY);
+ mpViewBar->SetItemBits(mpViewBar->GetItemId(VIEWBAR_REPOSITORY), ToolBoxItemBits::DROPDOWNONLY);
+ mpActionBar->SetItemBits(mpActionBar->GetItemId(ACTIONBAR_ACTION), ToolBoxItemBits::DROPDOWNONLY);
+ mpTemplateBar->SetItemBits(mpTemplateBar->GetItemId(TEMPLATEBAR_MOVE), ToolBoxItemBits::DROPDOWNONLY);
// Set toolbox handlers
mpViewBar->SetClickHdl(LINK(this,SfxTemplateManagerDlg,TBXViewHdl));
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 9544b388f677..e3db0a2f3612 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -910,8 +910,8 @@ void SfxToolBoxControl::StateChanged
// enabled/disabled-Flag correcting the lump sum
pImpl->pBox->EnableItem( GetId(), eState != SfxItemState::DISABLED );
- sal_uInt16 nItemBits = pImpl->pBox->GetItemBits( GetId() );
- nItemBits &= ~TIB_CHECKABLE;
+ ToolBoxItemBits nItemBits = pImpl->pBox->GetItemBits( GetId() );
+ nItemBits &= ~ToolBoxItemBits::CHECKABLE;
::TriState eTri = TRISTATE_FALSE;
switch ( eState )
{
@@ -923,7 +923,7 @@ void SfxToolBoxControl::StateChanged
// BoolItem for checking
if ( static_cast<const SfxBoolItem*>(pState)->GetValue() )
eTri = TRISTATE_TRUE;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
}
else if ( pState->ISA(SfxEnumItemInterface) &&
static_cast<const SfxEnumItemInterface *>(pState)->HasBoolValue())
@@ -931,7 +931,7 @@ void SfxToolBoxControl::StateChanged
// EnumItem is handled as Bool
if ( static_cast<const SfxEnumItemInterface *>(pState)->GetBoolValue() )
eTri = TRISTATE_TRUE;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
}
else if ( pImpl->bShowString && pState->ISA(SfxStringItem) )
pImpl->pBox->SetItemText(nId, static_cast<const SfxStringItem*>(pState)->GetValue() );
@@ -941,7 +941,7 @@ void SfxToolBoxControl::StateChanged
case SfxItemState::DONTCARE:
{
eTri = TRISTATE_INDET;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
}
break;
@@ -1389,7 +1389,7 @@ void SfxPopupWindow::Delete()
SfxRecentFilesToolBoxControl::SfxRecentFilesToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox )
: SfxToolBoxControl( nSlotId, nId, rBox )
{
- rBox.SetItemBits( nId, rBox.GetItemBits( nId ) | TIB_DROPDOWN);
+ rBox.SetItemBits( nId, rBox.GetItemBits( nId ) | ToolBoxItemBits::DROPDOWN);
}
SfxRecentFilesToolBoxControl::~SfxRecentFilesToolBoxControl()
diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx
index b77a309afb37..1c78816e63af 100644
--- a/svtools/source/uno/generictoolboxcontroller.cxx
+++ b/svtools/source/uno/generictoolboxcontroller.cxx
@@ -137,8 +137,8 @@ throw ( RuntimeException, std::exception )
{
m_pToolbox->EnableItem( m_nID, Event.IsEnabled );
- sal_uInt16 nItemBits = m_pToolbox->GetItemBits( m_nID );
- nItemBits &= ~TIB_CHECKABLE;
+ ToolBoxItemBits nItemBits = m_pToolbox->GetItemBits( m_nID );
+ nItemBits &= ~ToolBoxItemBits::CHECKABLE;
TriState eTri = TRISTATE_FALSE;
bool bValue;
@@ -152,7 +152,7 @@ throw ( RuntimeException, std::exception )
m_pToolbox->CheckItem( m_nID, bValue );
if ( bValue )
eTri = TRISTATE_TRUE;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
}
else if ( Event.State >>= aStrValue )
{
@@ -161,7 +161,7 @@ throw ( RuntimeException, std::exception )
else if ( Event.State >>= aItemState )
{
eTri = TRISTATE_INDET;
- nItemBits |= TIB_CHECKABLE;
+ nItemBits |= ToolBoxItemBits::CHECKABLE;
}
m_pToolbox->SetItemState( m_nID, eTri );
diff --git a/svx/source/customshapes/tbxcustomshapes.cxx b/svx/source/customshapes/tbxcustomshapes.cxx
index 1a1d2d0f283e..a1bad6d9b352 100644
--- a/svx/source/customshapes/tbxcustomshapes.cxx
+++ b/svx/source/customshapes/tbxcustomshapes.cxx
@@ -83,7 +83,7 @@ SvxTbxCtlCustomShapes::SvxTbxCtlCustomShapes( sal_uInt16 nSlotId, sal_uInt16 nId
break;
}
m_aSubTbxResName += m_aSubTbName;
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 6c7714e4083d..06ce8aa30902 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -147,7 +147,7 @@ SvxFmTbxCtlConfig::SvxFmTbxCtlConfig( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBo
: SfxToolBoxControl( nSlotId, nId, rTbx )
,nLastSlot( 0 )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
}
@@ -387,7 +387,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxNextRec, SfxBoolItem );
SvxFmTbxNextRec::SvxFmTbxNextRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
:SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits(nId, rTbx.GetItemBits(nId) | TIB_REPEAT);
+ rTbx.SetItemBits(nId, rTbx.GetItemBits(nId) | ToolBoxItemBits::REPEAT);
AllSettings aSettings = rTbx.GetSettings();
MouseSettings aMouseSettings = aSettings.GetMouseSettings();
@@ -402,7 +402,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxPrevRec, SfxBoolItem );
SvxFmTbxPrevRec::SvxFmTbxPrevRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
:SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits(nId, rTbx.GetItemBits(nId) | TIB_REPEAT);
+ rTbx.SetItemBits(nId, rTbx.GetItemBits(nId) | ToolBoxItemBits::REPEAT);
}
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index d4c50a4091fb..c00671e727b1 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -443,12 +443,12 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, const ResId& rResId, Gal
maMiscOptions.AddListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) );
maViewBox.InsertItem( TBX_ID_ICON, aDummyImage );
- maViewBox.SetItemBits( TBX_ID_ICON, TIB_RADIOCHECK | TIB_AUTOCHECK );
+ maViewBox.SetItemBits( TBX_ID_ICON, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
maViewBox.SetHelpId( TBX_ID_ICON, HID_GALLERY_ICONVIEW );
maViewBox.SetQuickHelpText( TBX_ID_ICON, GAL_RESSTR(RID_SVXSTR_GALLERY_ICONVIEW) );
maViewBox.InsertItem( TBX_ID_LIST, aDummyImage );
- maViewBox.SetItemBits( TBX_ID_LIST, TIB_RADIOCHECK | TIB_AUTOCHECK );
+ maViewBox.SetItemBits( TBX_ID_LIST, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
maViewBox.SetHelpId( TBX_ID_LIST, HID_GALLERY_LISTVIEW );
maViewBox.SetQuickHelpText( TBX_ID_LIST, GAL_RESSTR(RID_SVXSTR_GALLERY_LISTVIEW) );
diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx
index fec5d11d2aed..8602702e0fea 100644
--- a/svx/source/mnuctrls/clipboardctl.cxx
+++ b/svx/source/mnuctrls/clipboardctl.cxx
@@ -49,7 +49,7 @@ SvxClipBoardControl::SvxClipBoardControl(
{
addStatusListener( OUString( ".uno:ClipboardFormatItems" ));
ToolBox& rBox = GetToolBox();
- rBox.SetItemBits( nId, TIB_DROPDOWN | rBox.GetItemBits( nId ) );
+ rBox.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rBox.GetItemBits( nId ) );
rBox.Invalidate();
}
@@ -122,10 +122,10 @@ void SvxClipBoardControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, co
if ( eState >= SfxItemState::DEFAULT )
{
pClipboardFmtItem = pState->Clone();
- GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) | TIB_DROPDOWN );
+ GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) | ToolBoxItemBits::DROPDOWN );
}
else if ( !bDisabled )
- GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) & ~TIB_DROPDOWN );
+ GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) & ~ToolBoxItemBits::DROPDOWN );
GetToolBox().Invalidate( GetToolBox().GetItemRect( GetId() ) );
}
else
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index fe23425a4b2a..189d5e9551c4 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -168,7 +168,7 @@ void AreaPropertyPanel::Initialize()
mpLbFillAttr->Hide();
const sal_uInt16 nIdColor = mpToolBoxColor->GetItemId(UNO_SIDEBARCOLOR);
mpToolBoxColor->SetItemImage(nIdColor, maImgColor);
- mpToolBoxColor->SetItemBits( nIdColor, mpToolBoxColor->GetItemBits( nIdColor ) | TIB_DROPDOWNONLY );
+ mpToolBoxColor->SetItemBits( nIdColor, mpToolBoxColor->GetItemBits( nIdColor ) | ToolBoxItemBits::DROPDOWNONLY );
mpToolBoxColor->SetItemText(nIdColor, msHelpFillAttr);
aLink = LINK(this, AreaPropertyPanel, ToolBoxColorDropHdl);
@@ -184,7 +184,7 @@ void AreaPropertyPanel::Initialize()
mpMTRTransparent->SetAccessibleName(OUString( "Transparency")); //wj acc
const sal_uInt16 nIdGradient = mpBTNGradient->GetItemId(UNO_SIDEBARGRADIENT);
- mpBTNGradient->SetItemBits( nIdGradient, mpBTNGradient->GetItemBits( nIdGradient ) | TIB_DROPDOWNONLY );
+ mpBTNGradient->SetItemBits( nIdGradient, mpBTNGradient->GetItemBits( nIdGradient ) | ToolBoxItemBits::DROPDOWNONLY );
aLink = LINK( this, AreaPropertyPanel, ClickTrGrHdl_Impl );
mpBTNGradient->SetDropdownClickHdl( aLink );
mpBTNGradient->SetSelectHdl( aLink );
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 334399a22223..c46c772af852 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -232,7 +232,7 @@ void LinePropertyPanel::Initialize()
const sal_uInt16 nIdColor = mpTBColor->GetItemId(UNO_SELECTCOLOR);
mpTBColor->SetItemImage(nIdColor, maIMGColor);
- mpTBColor->SetItemBits( nIdColor, mpTBColor->GetItemBits( nIdColor ) | TIB_DROPDOWNONLY );
+ mpTBColor->SetItemBits( nIdColor, mpTBColor->GetItemBits( nIdColor ) | ToolBoxItemBits::DROPDOWNONLY );
Link aLink = LINK(this, LinePropertyPanel, ToolboxColorSelectHdl);
mpTBColor->SetDropdownClickHdl ( aLink );
mpTBColor->SetSelectHdl ( aLink );
@@ -246,7 +246,7 @@ void LinePropertyPanel::Initialize()
const sal_uInt16 nIdWidth = mpTBWidth->GetItemId(UNO_SELECTWIDTH);
mpTBWidth->SetItemImage(nIdWidth, mpIMGWidthIcon[0]);
- mpTBWidth->SetItemBits( nIdWidth, mpTBWidth->GetItemBits( nIdWidth ) | TIB_DROPDOWNONLY );
+ mpTBWidth->SetItemBits( nIdWidth, mpTBWidth->GetItemBits( nIdWidth ) | ToolBoxItemBits::DROPDOWNONLY );
aLink = LINK(this, LinePropertyPanel, ToolboxWidthSelectHdl);
mpTBWidth->SetDropdownClickHdl ( aLink );
mpTBWidth->SetSelectHdl ( aLink );
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 97dca501671f..98badcf54e75 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -285,7 +285,7 @@ void ParaPropertyPanel::InitToolBoxBGColor()
const sal_uInt16 nIdBackColor = mpTBxBackColor->GetItemId(UNO_PARABACKCOLOR);
mpColorUpdater.reset(new ::svx::ToolboxButtonColorUpdater(0 /* not defined, default is transparent */, nIdBackColor, mpTBxBackColor));
- mpTBxBackColor->SetItemBits( nIdBackColor, mpTBxBackColor->GetItemBits( nIdBackColor ) | TIB_DROPDOWNONLY );
+ mpTBxBackColor->SetItemBits( nIdBackColor, mpTBxBackColor->GetItemBits( nIdBackColor ) | ToolBoxItemBits::DROPDOWNONLY );
Link aLink = LINK(this, ParaPropertyPanel, ToolBoxBackColorDDHandler);
mpTBxBackColor->SetDropdownClickHdl ( aLink );
@@ -339,7 +339,7 @@ void ParaPropertyPanel::InitToolBoxLineSpacing()
mpLineSPTbx->SetSelectHdl( aLink ); //support keyinput "ENTER"
const sal_uInt16 nIdSpacing = mpLineSPTbx->GetItemId(UNO_LINESPACING);
- mpLineSPTbx->SetItemBits( nIdSpacing, mpLineSPTbx->GetItemBits( nIdSpacing ) | TIB_DROPDOWNONLY );
+ mpLineSPTbx->SetItemBits( nIdSpacing, mpLineSPTbx->GetItemBits( nIdSpacing ) | ToolBoxItemBits::DROPDOWNONLY );
mpLineSPTbx->SetItemImage(nIdSpacing, maSpace3);
}
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 318c64d8743b..288ccbfcb720 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -187,7 +187,7 @@ void TextPropertyPanel::InitToolBoxFont()
void TextPropertyPanel::InitToolBoxSpacing()
{
const sal_uInt16 nId = mpToolBoxSpacing->GetItemId(UNO_SPACING);
- mpToolBoxSpacing->SetItemBits(nId, mpToolBoxSpacing->GetItemBits(nId) | TIB_DROPDOWNONLY);
+ mpToolBoxSpacing->SetItemBits(nId, mpToolBoxSpacing->GetItemBits(nId) | ToolBoxItemBits::DROPDOWNONLY);
Link aLink = LINK(this, TextPropertyPanel, SpacingClickHdl);
mpToolBoxSpacing->SetDropdownClickHdl ( aLink );
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 32811637a470..46aed2c55bde 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -260,7 +260,7 @@ SFX_IMPL_TOOLBOX_CONTROL( FontWorkShapeTypeControl, SfxStringItem );
FontWorkShapeTypeControl::FontWorkShapeTypeControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx )
: SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 300cfa75d171..fbbede43306e 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -430,7 +430,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafFilterToolBoxControl, TbxImageItem );
SvxGrafFilterToolBoxControl::SvxGrafFilterToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
@@ -459,7 +459,7 @@ SfxPopupWindow* SvxGrafFilterToolBoxControl::CreatePopupWindow()
SvxGrafToolBoxControl::SvxGrafToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 920669e9a3dc..54213d163d59 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -704,7 +704,7 @@ SvxTableToolBoxControl::SvxTableToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 n
SfxToolBoxControl( nSlotId, nId, rTbx ),
bEnabled( true )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
@@ -769,7 +769,7 @@ SvxColumnsToolBoxControl::SvxColumnsToolBoxControl( sal_uInt16 nSlotId, sal_uInt
: SfxToolBoxControl(nSlotId, nId, rTbx)
, bEnabled(false)
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index c2b2b553cbb4..f6b1f7f7de31 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -134,7 +134,7 @@ SvxListBoxControl::SvxListBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBo
:SfxToolBoxControl( nSlotId, nId, rTbx ),
pPopupWin ( 0 )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
@@ -227,7 +227,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxUndoRedoControl, SfxStringItem );
SvxUndoRedoControl::SvxUndoRedoControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
: SvxListBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
aDefaultText = MnemonicGenerator::EraseAllMnemonicChars( rTbx.GetItemText( nId ) );
}
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 0e7b5f5672cf..40dd2cdfc4b5 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -605,7 +605,7 @@ void SvxLineEndWindow::GetFocus (void)
SvxLineEndToolBoxControl::SvxLineEndToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
diff --git a/svx/source/tbxctrls/subtoolboxcontrol.cxx b/svx/source/tbxctrls/subtoolboxcontrol.cxx
index e70ef72988c4..d186f5582f2d 100644
--- a/svx/source/tbxctrls/subtoolboxcontrol.cxx
+++ b/svx/source/tbxctrls/subtoolboxcontrol.cxx
@@ -30,7 +30,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxSubToolBoxControl, SfxUInt16Item );
SvxSubToolBoxControl::SvxSubToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
: SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
}
SvxSubToolBoxControl::~SvxSubToolBoxControl()
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 6900cda8184f..d0c7cf1425a1 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2330,7 +2330,7 @@ SvxColorToolBoxControl::SvxColorToolBoxControl(
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
// The following commands are available at the various modules
switch( nSlotId )
@@ -2518,7 +2518,7 @@ SvxFrameToolBoxControl::SvxFrameToolBoxControl(
ToolBox& rTbx )
: SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
}
SfxPopupWindowType SvxFrameToolBoxControl::GetPopupWindowType() const
@@ -2560,7 +2560,7 @@ SvxFrameLineStyleToolBoxControl::SvxFrameLineStyleToolBoxControl(
: SfxToolBoxControl( nSlotId, nId, rTbx )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
}
SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const
diff --git a/svx/source/tbxctrls/tbxalign.cxx b/svx/source/tbxctrls/tbxalign.cxx
index 44b8e40f5897..14d15b25fde6 100644
--- a/svx/source/tbxctrls/tbxalign.cxx
+++ b/svx/source/tbxctrls/tbxalign.cxx
@@ -40,7 +40,7 @@ SvxTbxCtlAlign::SvxTbxCtlAlign( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTb
, m_aSubTbName( "alignmentbar" )
, m_aSubTbResName( "private:resource/toolbar/alignmentbar" )
{
- rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
m_aCommand = m_aCommandURL;
diff --git a/svx/source/tbxctrls/tbxdrctl.cxx b/svx/source/tbxctrls/tbxdrctl.cxx
index 52d208d94c25..541b2e0f31cb 100644
--- a/svx/source/tbxctrls/tbxdrctl.cxx
+++ b/svx/source/tbxctrls/tbxdrctl.cxx
@@ -48,7 +48,7 @@ SvxTbxCtlDraw::SvxTbxCtlDraw( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx
m_sToolboxName( "private:resource/toolbar/drawbar" )
{
- rTbx.SetItemBits( nId, TIB_CHECKABLE | rTbx.GetItemBits( nId ) );
+ rTbx.SetItemBits( nId, ToolBoxItemBits::CHECKABLE | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
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())
{
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 4f7202f0e5d1..e534e414a778 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1618,9 +1618,9 @@ vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, c
OUString aCommand(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8));
sal_uInt16 nItemId = 0;
- ToolBoxItemBits nBits = 0;
+ ToolBoxItemBits nBits = ToolBoxItemBits::NONE;
if (name == "GtkMenuToolButton")
- nBits |= TIB_DROPDOWN;
+ nBits |= ToolBoxItemBits::DROPDOWN;
if (!aCommand.isEmpty() && m_xFrame.is())
{
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 1f0bcee25caa..63011d297395 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -144,7 +144,7 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
aCloseBtn.SetPaintTransparent(true);
aCloseBtn.SetParentClipMode(PARENTCLIPMODE_NOCLIP);
- aCloseBtn.InsertItem(IID_DOCUMENTCLOSE, aCloseBtn.maImage, 0);
+ aCloseBtn.InsertItem(IID_DOCUMENTCLOSE, aCloseBtn.maImage, ToolBoxItemBits::NONE);
aCloseBtn.SetSelectHdl(LINK(this, MenuBarWindow, CloseHdl));
aCloseBtn.AddEventListener(LINK(this, MenuBarWindow, ToolboxEventHdl));
aCloseBtn.SetQuickHelpText(IID_DOCUMENTCLOSE, ResId(SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr).toString());
@@ -1086,7 +1086,7 @@ sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i
AddButtonEntry& rNewEntry = m_aAddButtons[nId];
rNewEntry.m_nId = nId;
rNewEntry.m_aSelectLink = i_rLink;
- aCloseBtn.InsertItem(nId, i_rImage, 0, 0);
+ aCloseBtn.InsertItem(nId, i_rImage, ToolBoxItemBits::NONE, 0);
aCloseBtn.calcMinSize();
ShowButtons(aCloseBtn.IsItemVisible(IID_DOCUMENTCLOSE), aFloatBtn.IsVisible(), aHideBtn.IsVisible());
LayoutChanged();
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 816fac94d9e6..c701e33befa0 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -167,13 +167,12 @@ int ToolBox::ImplGetDragWidth( ToolBox* pThis )
ButtonType determineButtonType( ImplToolItem* pItem, ButtonType defaultType )
{
ButtonType tmpButtonType = defaultType;
- ToolBoxItemBits nBits( pItem->mnBits & 0x300 );
- if ( nBits & TIB_TEXTICON ) // item has custom setting
+ if ( pItem->mnBits & (ToolBoxItemBits::TEXT_ONLY | ToolBoxItemBits::ICON_ONLY) ) // item has custom setting
{
tmpButtonType = BUTTON_SYMBOLTEXT;
- if ( nBits == TIB_TEXT_ONLY )
+ if ( pItem->mnBits & ToolBoxItemBits::TEXT_ONLY )
tmpButtonType = BUTTON_TEXT;
- else if ( nBits == TIB_ICON_ONLY )
+ else if ( pItem->mnBits & ToolBoxItemBits::ICON_ONLY )
tmpButtonType = BUTTON_SYMBOL;
}
return tmpButtonType;
@@ -1820,7 +1819,7 @@ bool ToolBox::ImplCalcItem()
}
// add in drop down arrow
- if( it->mnBits & TIB_DROPDOWN )
+ if( it->mnBits & ToolBoxItemBits::DROPDOWN )
{
it->maItemSize.Width() += nDropDownArrowWidth;
it->mnDropDownArrowWidth = nDropDownArrowWidth;
@@ -2620,7 +2619,7 @@ void ToolBox::ImplFormat( bool bResize )
IMPL_LINK_NOARG(ToolBox, ImplDropdownLongClickHdl)
{
if( mnCurPos != TOOLBOX_ITEM_NOTFOUND &&
- (mpData->m_aItems[ mnCurPos ].mnBits & TIB_DROPDOWN)
+ (mpData->m_aItems[ mnCurPos ].mnBits & ToolBoxItemBits::DROPDOWN)
)
{
mpData->mbDropDownByKeyboard = false;
@@ -2963,8 +2962,8 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
if( ImplGetSVData()->maNWFData.mbToolboxDropDownSeparate )
{
// separate button not for dropdown only where the whole button is painted
- if ( pItem->mnBits & TIB_DROPDOWN &&
- ((pItem->mnBits & TIB_DROPDOWNONLY) != TIB_DROPDOWNONLY) )
+ if ( pItem->mnBits & ToolBoxItemBits::DROPDOWN &&
+ ((pItem->mnBits & ToolBoxItemBits::DROPDOWNONLY) != ToolBoxItemBits::DROPDOWNONLY) )
{
Rectangle aArrowRect = pItem->GetDropDownRect( mbHorz );
if( aArrowRect.Top() == pItem->maRect.Top() ) // dropdown arrow on right side
@@ -3126,7 +3125,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
// draw the image
nImageOffX = nOffX;
nImageOffY = nOffY;
- if ( (pItem->mnBits & (TIB_LEFT|TIB_DROPDOWN)) || bText )
+ if ( (pItem->mnBits & (ToolBoxItemBits::LEFT|ToolBoxItemBits::DROPDOWN)) || bText )
{
// left align also to leave space for drop down arrow
// and when drawing text+image
@@ -3220,7 +3219,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
return;
// paint optional drop down arrow
- if ( pItem->mnBits & TIB_DROPDOWN )
+ if ( pItem->mnBits & ToolBoxItemBits::DROPDOWN )
{
Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz ) );
bool bSetColor = true;
@@ -3231,7 +3230,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint,
}
// dropdown only will be painted without inner border
- if( (pItem->mnBits & TIB_DROPDOWNONLY) != TIB_DROPDOWNONLY )
+ if( (pItem->mnBits & ToolBoxItemBits::DROPDOWNONLY) != ToolBoxItemBits::DROPDOWNONLY )
{
ImplErase( this, aDropDownRect, nHighlight != 0, bHasOpenPopup );
@@ -3374,7 +3373,7 @@ bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, bool bRepeat )
Highlight();
}
- if ( (pItem->mnBits & TIB_REPEAT) && bRepeat )
+ if ( (pItem->mnBits & ToolBoxItemBits::REPEAT) && bRepeat )
Select();
}
else
@@ -3422,7 +3421,7 @@ bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel )
// stop eventual running dropdown timer
if( mnCurPos < mpData->m_aItems.size() &&
- (mpData->m_aItems[mnCurPos].mnBits & TIB_DROPDOWN ) )
+ (mpData->m_aItems[mnCurPos].mnBits & ToolBoxItemBits::DROPDOWN ) )
{
mpData->maDropdownTimer.Stop();
}
@@ -3458,9 +3457,9 @@ bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel )
if ( !bCancel )
{
// execute AutoCheck if required
- if ( pItem->mnBits & TIB_AUTOCHECK )
+ if ( pItem->mnBits & ToolBoxItemBits::AUTOCHECK )
{
- if ( pItem->mnBits & TIB_RADIOCHECK )
+ if ( pItem->mnBits & ToolBoxItemBits::RADIOCHECK )
{
if ( pItem->meState != TRISTATE_TRUE )
SetItemState( pItem->mnId, TRISTATE_TRUE );
@@ -3476,7 +3475,7 @@ bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel )
// do not call Select when Repeat is active, as in this
// case that was triggered already in MouseButtonDown
- if ( !(pItem->mnBits & TIB_REPEAT) )
+ if ( !(pItem->mnBits & ToolBoxItemBits::REPEAT) )
{
// prevent from being destroyed in the select handler
ImplDelData aDelData;
@@ -3829,7 +3828,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
mnDownItemId = mnCurItemId;
mnMouseClicks = rMEvt.GetClicks();
mnMouseModifier = rMEvt.GetModifier();
- if ( it->mnBits & TIB_REPEAT )
+ if ( it->mnBits & ToolBoxItemBits::REPEAT )
nTrackFlags |= STARTTRACK_BUTTONREPEAT;
if ( mbSelection )
@@ -3855,9 +3854,9 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt )
}
// was dropdown arrow pressed
- if( (it->mnBits & TIB_DROPDOWN) )
+ if( (it->mnBits & ToolBoxItemBits::DROPDOWN) )
{
- if( ( (it->mnBits & TIB_DROPDOWNONLY) == TIB_DROPDOWNONLY) || it->GetDropDownRect( mbHorz ).IsInside( aMousePos ))
+ if( ( (it->mnBits & ToolBoxItemBits::DROPDOWNONLY) == ToolBoxItemBits::DROPDOWNONLY) || it->GetDropDownRect( mbHorz ).IsInside( aMousePos ))
{
// dropdownonly always triggers the dropdown handler, over the whole button area
@@ -4923,9 +4922,9 @@ bool ToolBox::ImplActivateItem( vcl::KeyCode aKeyCode )
{
mnDownItemId = mnCurItemId = mnHighItemId;
ImplToolItem* pItem = ImplGetItem( mnHighItemId );
- if ( pItem->mnBits & TIB_AUTOCHECK )
+ if ( pItem->mnBits & ToolBoxItemBits::AUTOCHECK )
{
- if ( pItem->mnBits & TIB_RADIOCHECK )
+ if ( pItem->mnBits & ToolBoxItemBits::RADIOCHECK )
{
if ( pItem->meState != TRISTATE_TRUE )
SetItemState( pItem->mnId, TRISTATE_TRUE );
@@ -5000,7 +4999,7 @@ bool ToolBox::ImplOpenItem( vcl::KeyCode aKeyCode )
mpData->mnEventId = Application::PostUserEvent( LINK( this, ToolBox, ImplCallExecuteCustomMenu ) );
}
else if( mnHighItemId && ImplGetItem( mnHighItemId ) &&
- (ImplGetItem( mnHighItemId )->mnBits & TIB_DROPDOWN) )
+ (ImplGetItem( mnHighItemId )->mnBits & ToolBoxItemBits::DROPDOWN) )
{
if( ImplCloseLastPopup( GetParent() ) )
return bRet;
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 2f8e1fdf663c..9517f07a56ad 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -109,7 +109,7 @@ void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits,
ImplToolItem::ImplToolItem()
{
- init(0, 0, true);
+ init(0, ToolBoxItemBits::NONE, true);
}
ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage,
@@ -318,7 +318,7 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbIma
Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const
{
Rectangle aRect;
- if( (mnBits & TIB_DROPDOWN) && !maRect.IsEmpty() )
+ if( (mnBits & ToolBoxItemBits::DROPDOWN) && !maRect.IsEmpty() )
{
aRect = maRect;
if( mbVisibleText && !bHorz )
@@ -1069,10 +1069,10 @@ void ToolBox::SetItemBits( sal_uInt16 nItemId, ToolBoxItemBits nBits )
{
ToolBoxItemBits nOldBits = mpData->m_aItems[nPos].mnBits;
mpData->m_aItems[nPos].mnBits = nBits;
- nBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN;
- nOldBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN;
+ nBits &= ToolBoxItemBits::LEFT | ToolBoxItemBits::AUTOSIZE | ToolBoxItemBits::DROPDOWN;
+ nOldBits &= ToolBoxItemBits::LEFT | ToolBoxItemBits::AUTOSIZE | ToolBoxItemBits::DROPDOWN;
// trigger reformat when the item width has changed (dropdown arrow)
- bool bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN);
+ bool bFormat = (nBits & ToolBoxItemBits::DROPDOWN) != (nOldBits & ToolBoxItemBits::DROPDOWN);
if ( nBits != nOldBits )
ImplInvalidate( true, bFormat );
}
@@ -1085,7 +1085,7 @@ ToolBoxItemBits ToolBox::GetItemBits( sal_uInt16 nItemId ) const
if ( pItem )
return pItem->mnBits;
else
- return 0;
+ return ToolBoxItemBits::NONE;
}
void ToolBox::SetItemExpand( sal_uInt16 nItemId, bool bExpand )
@@ -1419,8 +1419,8 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
if ( pItem->meState != eState )
{
// if RadioCheck, un-check the previous
- if ( (eState == TRISTATE_TRUE) && (pItem->mnBits & TIB_AUTOCHECK) &&
- (pItem->mnBits & TIB_RADIOCHECK) )
+ if ( (eState == TRISTATE_TRUE) && (pItem->mnBits & ToolBoxItemBits::AUTOCHECK) &&
+ (pItem->mnBits & ToolBoxItemBits::RADIOCHECK) )
{
ImplToolItem* pGroupItem;
sal_uInt16 nGroupPos;
@@ -1430,7 +1430,7 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
while ( nGroupPos )
{
pGroupItem = &mpData->m_aItems[nGroupPos-1];
- if ( pGroupItem->mnBits & TIB_RADIOCHECK )
+ if ( pGroupItem->mnBits & ToolBoxItemBits::RADIOCHECK )
{
if ( pGroupItem->meState != TRISTATE_FALSE )
SetItemState( pGroupItem->mnId, TRISTATE_FALSE );
@@ -1444,7 +1444,7 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState )
while ( nGroupPos < nItemCount )
{
pGroupItem = &mpData->m_aItems[nGroupPos];
- if ( pGroupItem->mnBits & TIB_RADIOCHECK )
+ if ( pGroupItem->mnBits & ToolBoxItemBits::RADIOCHECK )
{
if ( pGroupItem->meState != TRISTATE_FALSE )
SetItemState( pGroupItem->mnId, TRISTATE_FALSE );