diff options
author | Mikhail Voytenko <mav@openoffice.org> | 2011-01-10 16:11:35 +0100 |
---|---|---|
committer | Mikhail Voytenko <mav@openoffice.org> | 2011-01-10 16:11:35 +0100 |
commit | 94d85ef550ad17efba5dec09290d0e8176a8b455 (patch) | |
tree | 41a1a79c31bd144b9374142c6259d33e2a3f5b89 /svx/source/tbxctrls/grafctrl.cxx | |
parent | 3f4e9b4c3cd9028744ea6ed5e93c41c51a15d229 (diff) |
removetooltypes01: #i112600# remove tooltypes from svx
Diffstat (limited to 'svx/source/tbxctrls/grafctrl.cxx')
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 9f8c023c3b3d..ebad78935d13 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -92,7 +92,7 @@ TYPEINIT1_AUTOFACTORY( TbxImageItem, SfxUInt16Item ); //--------------------------------------------------------- -TbxImageItem::TbxImageItem( USHORT _nWhich, UINT16 nImage ) : +TbxImageItem::TbxImageItem( sal_uInt16 _nWhich, sal_uInt16 nImage ) : SfxUInt16Item( _nWhich, nImage ) { } @@ -255,11 +255,11 @@ void ImplGrafMetricField::Update( const SfxPoolItem* pItem ) struct CommandToRID { const char* pCommand; - USHORT nResId; - USHORT nHCResId; + sal_uInt16 nResId; + sal_uInt16 nHCResId; }; -static USHORT ImplGetRID( const OUString& aCommand, bool bHighContrast ) +static sal_uInt16 ImplGetRID( const OUString& aCommand, bool bHighContrast ) { static const CommandToRID aImplCommandToResMap[] = { @@ -273,7 +273,7 @@ static USHORT ImplGetRID( const OUString& aCommand, bool bHighContrast ) { 0, 0, 0 } }; - USHORT nRID = 0; + sal_uInt16 nRID = 0; sal_Int32 i( 0 ); while ( aImplCommandToResMap[ i ].pCommand ) @@ -307,7 +307,7 @@ protected: public: - ImplGrafControl( Window* pParent, USHORT nSlotId, const rtl::OUString& rCmd, const Reference< XFrame >& rFrame ); + ImplGrafControl( Window* pParent, sal_uInt16 nSlotId, const rtl::OUString& rCmd, const Reference< XFrame >& rFrame ); ~ImplGrafControl(); void Update( const SfxPoolItem* pItem ) { maField.Update( pItem ); } @@ -316,7 +316,7 @@ public: // ----------------------------------------------------------------------------- -ImplGrafControl::ImplGrafControl( Window* pParent, USHORT, const rtl::OUString& rCmd, const Reference< XFrame >& rFrame ) : +ImplGrafControl::ImplGrafControl( Window* pParent, sal_uInt16, const rtl::OUString& rCmd, const Reference< XFrame >& rFrame ) : Control( pParent, WB_TABSTOP ), maImage ( this ), maField ( this, rCmd, rFrame ) @@ -378,7 +378,7 @@ class ImplGrafModeControl : public ListBox { using Window::Update; private: - USHORT mnCurPos; + sal_uInt16 mnCurPos; Reference< XFrame > mxFrame; virtual void Select(); @@ -443,7 +443,7 @@ void ImplGrafModeControl::Select() long ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt ) { - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); if( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) mnCurPos = GetSelectEntryPos(); @@ -526,7 +526,7 @@ private: DECL_LINK( TbxSelectHdl, void* ); public: - ImplGrafFilterPopup( USHORT nId, SvxGrafFilterToolBoxControl* pParent, + ImplGrafFilterPopup( sal_uInt16 nId, SvxGrafFilterToolBoxControl* pParent, WindowAlign eAlign, const ResId& rResIdWin, const ResId& rResIdTbx, SfxBindings& rBindings ); @@ -541,7 +541,7 @@ public: // ----------------------------------------------------------------------------- -ImplGrafFilterPopup::ImplGrafFilterPopup( USHORT nId, SvxGrafFilterToolBoxControl* pParent, +ImplGrafFilterPopup::ImplGrafFilterPopup( sal_uInt16 nId, SvxGrafFilterToolBoxControl* pParent, WindowAlign eAlign, const ResId& rResIdWin, const ResId& rResIdTbx ) : SfxPopupWindow ( nId, rResIdWin ), @@ -599,7 +599,7 @@ void ImplGrafFilterPopup::PopupModeEnd() IMPL_LINK( ImplGrafFilterPopup, TbxSelectHdl, void*, EMPTYARG ) { - const USHORT nSlotId = maTbxMgr.GetToolBox().GetCurItemId(); + const sal_uInt16 nSlotId = maTbxMgr.GetToolBox().GetCurItemId(); if( IsInPopupMode() ) EndPopupMode(); @@ -617,7 +617,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafFilterToolBoxControl, TbxImageItem ); // ----------------------------------------------------------------------------- -SvxGrafFilterToolBoxControl::SvxGrafFilterToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxGrafFilterToolBoxControl::SvxGrafFilterToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); @@ -632,7 +632,7 @@ SvxGrafFilterToolBoxControl::~SvxGrafFilterToolBoxControl() // ----------------------------------------------------------------------------- -void SvxGrafFilterToolBoxControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* ) +void SvxGrafFilterToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* ) { GetToolBox().EnableItem( GetId(), ( eState != SFX_ITEM_DISABLED ) ); } @@ -663,7 +663,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafToolBoxControl, SfxVoidItem ); // ----------------------------------------------------------------------------- -SvxGrafToolBoxControl::SvxGrafToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx) : +SvxGrafToolBoxControl::SvxGrafToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx) : SfxToolBoxControl( nSlotId, nId, rTbx ) { rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); @@ -678,7 +678,7 @@ SvxGrafToolBoxControl::~SvxGrafToolBoxControl() // ----------------------------------------------------------------------------- -void SvxGrafToolBoxControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* pState ) +void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { ImplGrafControl* pCtrl = (ImplGrafControl*) GetToolBox().GetItemWindow( GetId() ); @@ -715,7 +715,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafRedToolBoxControl, SfxInt16Item ); // ----------------------------------------------------------------------------- -SvxGrafRedToolBoxControl::SvxGrafRedToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxGrafRedToolBoxControl::SvxGrafRedToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } @@ -728,7 +728,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafGreenToolBoxControl, SfxInt16Item ); // ----------------------------------------------------------------------------- -SvxGrafGreenToolBoxControl::SvxGrafGreenToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxGrafGreenToolBoxControl::SvxGrafGreenToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } @@ -741,7 +741,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafBlueToolBoxControl, SfxInt16Item ); // ----------------------------------------------------------------------------- -SvxGrafBlueToolBoxControl::SvxGrafBlueToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxGrafBlueToolBoxControl::SvxGrafBlueToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } @@ -754,7 +754,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafLuminanceToolBoxControl, SfxInt16Item ); // ----------------------------------------------------------------------------- -SvxGrafLuminanceToolBoxControl::SvxGrafLuminanceToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxGrafLuminanceToolBoxControl::SvxGrafLuminanceToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } @@ -767,7 +767,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafContrastToolBoxControl, SfxInt16Item ); // ----------------------------------------------------------------------------- -SvxGrafContrastToolBoxControl::SvxGrafContrastToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxGrafContrastToolBoxControl::SvxGrafContrastToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } @@ -780,7 +780,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafGammaToolBoxControl, SfxUInt32Item ); // ----------------------------------------------------------------------------- -SvxGrafGammaToolBoxControl::SvxGrafGammaToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxGrafGammaToolBoxControl::SvxGrafGammaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } @@ -793,7 +793,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafTransparenceToolBoxControl, SfxUInt16Item ); // ----------------------------------------------------------------------------- -SvxGrafTransparenceToolBoxControl::SvxGrafTransparenceToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxGrafTransparenceToolBoxControl::SvxGrafTransparenceToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } @@ -806,7 +806,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxGrafModeToolBoxControl, SfxUInt16Item ); // ----------------------------------------------------------------------------- -SvxGrafModeToolBoxControl::SvxGrafModeToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxGrafModeToolBoxControl::SvxGrafModeToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { } @@ -819,7 +819,7 @@ SvxGrafModeToolBoxControl::~SvxGrafModeToolBoxControl() // ----------------------------------------------------------------------------- -void SvxGrafModeToolBoxControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* pState ) +void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { ImplGrafModeControl* pCtrl = (ImplGrafModeControl*) GetToolBox().GetItemWindow( GetId() ); @@ -869,9 +869,9 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem; - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); - if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem )) + if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False, &pItem )) pItem = 0; switch( nSlot ) @@ -1139,13 +1139,13 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) SfxItemPool& rPool = rView.GetModel()->GetItemPool(); SfxItemSet aAttrSet( rPool ); SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); rView.GetAttributes( aAttrSet ); while( nWhich ) { - USHORT nSlotId = SfxItemPool::IsWhich( nWhich ) ? rPool.GetSlotId( nWhich ) : nWhich; + sal_uInt16 nSlotId = SfxItemPool::IsWhich( nWhich ) ? rPool.GetSlotId( nWhich ) : nWhich; switch( nSlotId ) { @@ -1154,7 +1154,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) ) { rSet.Put( SfxUInt16Item( nSlotId, - sal::static_int_cast< UINT16 >( ITEMVALUE( aAttrSet, SDRATTR_GRAFMODE, SdrGrafModeItem ) ) ) ); + sal::static_int_cast< sal_uInt16 >( ITEMVALUE( aAttrSet, SDRATTR_GRAFMODE, SdrGrafModeItem ) ) ) ); } } break; @@ -1224,9 +1224,9 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) ) { const SdrMarkList& rMarkList = rView.GetMarkedObjectList(); - BOOL bEnable = TRUE; + sal_Bool bEnable = sal_True; - for( USHORT i = 0, nCount = (USHORT) rMarkList.GetMarkCount(); + for( sal_uInt16 i = 0, nCount = (sal_uInt16) rMarkList.GetMarkCount(); ( i < nCount ) && bEnable; i++ ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); @@ -1235,7 +1235,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) ( (SdrGrafObj*) pObj )->HasGDIMetaFile() || ( (SdrGrafObj*) pObj )->IsAnimated() ) { - bEnable = FALSE; + bEnable = sal_False; } } @@ -1251,7 +1251,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) case( SID_ATTR_GRAF_CROP ): { const SdrMarkList& rMarkList = rView.GetMarkedObjectList(); - BOOL bDisable = TRUE; + sal_Bool bDisable = sal_True; if( 1 == rMarkList.GetMarkCount() ) { @@ -1264,7 +1264,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) if( ( pGrafObj->GetGraphicType() != GRAPHIC_NONE ) && ( pGrafObj->GetGraphicType() != GRAPHIC_DEFAULT ) ) { - bDisable = FALSE; + bDisable = sal_False; } } } |