diff options
Diffstat (limited to 'svx/source/tbxctrls')
-rw-r--r-- | svx/source/tbxctrls/colorwindow.hxx | 8 | ||||
-rw-r--r-- | svx/source/tbxctrls/colrctrl.cxx | 50 | ||||
-rw-r--r-- | svx/source/tbxctrls/extrusioncontrols.cxx | 26 | ||||
-rw-r--r-- | svx/source/tbxctrls/fillctrl.cxx | 62 | ||||
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 14 | ||||
-rw-r--r-- | svx/source/tbxctrls/formatpaintbrushctrl.cxx | 8 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 70 | ||||
-rw-r--r-- | svx/source/tbxctrls/itemwin.cxx | 52 | ||||
-rw-r--r-- | svx/source/tbxctrls/layctrl.cxx | 76 | ||||
-rw-r--r-- | svx/source/tbxctrls/lboxctrl.cxx | 40 | ||||
-rw-r--r-- | svx/source/tbxctrls/linectrl.cxx | 70 | ||||
-rw-r--r-- | svx/source/tbxctrls/makefile.mk | 83 | ||||
-rw-r--r-- | svx/source/tbxctrls/subtoolboxcontrol.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 314 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunocontroller.cxx | 10 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 22 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxalign.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxcolorupdate.cxx | 8 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxdrctl.cxx | 10 | ||||
-rw-r--r-- | svx/source/tbxctrls/verttexttbxctrl.cxx | 18 |
20 files changed, 431 insertions, 514 deletions
diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx index 6475ec5fc1a5..726d0810aab2 100644 --- a/svx/source/tbxctrls/colorwindow.hxx +++ b/svx/source/tbxctrls/colorwindow.hxx @@ -18,7 +18,7 @@ class SvxColorWindow_Impl : public SfxPopupWindow using FloatingWindow::StateChanged; private: - const USHORT theSlotId; + const sal_uInt16 theSlotId; ValueSet aColorSet; rtl::OUString maCommand; @@ -28,11 +28,11 @@ private: protected: virtual void Resize(); - virtual BOOL Close(); + virtual sal_Bool Close(); public: SvxColorWindow_Impl( const rtl::OUString& rCommand, - USHORT nSlotId, + sal_uInt16 nSlotId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const String& rWndTitle, Window* pParentWindow ); @@ -40,7 +40,7 @@ public: void StartSelection(); virtual void KeyInput( const KeyEvent& rKEvt ); - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual SfxPopupWindow* Clone() const; }; diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 260a2e2e646c..b712bcfe04d2 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -111,7 +111,7 @@ sal_Bool SvxColorValueSetData::WriteObject( SotStorageStreamRef& rxOStm, void*, SvxColorValueSet::SvxColorValueSet( Window* _pParent, WinBits nWinStyle ) : ValueSet( _pParent, nWinStyle ), DragSourceHelper( this ), - bLeft (TRUE) + bLeft (sal_True) { } @@ -124,7 +124,7 @@ SvxColorValueSet::SvxColorValueSet( Window* _pParent, WinBits nWinStyle ) : SvxColorValueSet::SvxColorValueSet( Window* _pParent, const ResId& rResId ) : ValueSet( _pParent, rResId ), DragSourceHelper( this ), - bLeft (TRUE) + bLeft (sal_True) { } @@ -139,12 +139,12 @@ void SvxColorValueSet::MouseButtonDown( const MouseEvent& rMEvt ) // Fuer Mac noch anders handlen ! if( rMEvt.IsLeft() ) { - bLeft = TRUE; + bLeft = sal_True; ValueSet::MouseButtonDown( rMEvt ); } else { - bLeft = FALSE; + bLeft = sal_False; MouseEvent aMEvt( rMEvt.GetPosPixel(), rMEvt.GetClicks(), rMEvt.GetMode(), @@ -167,12 +167,12 @@ void SvxColorValueSet::MouseButtonUp( const MouseEvent& rMEvt ) // Fuer Mac noch anders handlen ! if( rMEvt.IsLeft() ) { - bLeft = TRUE; + bLeft = sal_True; ValueSet::MouseButtonUp( rMEvt ); } else { - bLeft = FALSE; + bLeft = sal_False; MouseEvent aMEvt( rMEvt.GetPosPixel(), rMEvt.GetClicks(), rMEvt.GetMode(), @@ -215,7 +215,7 @@ void SvxColorValueSet::StartDrag( sal_Int8 , const Point& ) void SvxColorValueSet::DoDrag() { SfxObjectShell* pDocSh = SfxObjectShell::Current(); - USHORT nItemId = GetItemId( aDragPosPixel ); + sal_uInt16 nItemId = GetItemId( aDragPosPixel ); if( pDocSh && nItemId ) { @@ -252,7 +252,7 @@ IMPL_STATIC_LINK(SvxColorValueSet, ExecDragHdl, void*, EMPTYARG) \************************************************************************/ SvxColorChildWindow::SvxColorChildWindow( Window* _pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) @@ -333,7 +333,7 @@ SvxColorDockingWindow::SvxColorDockingWindow SetSize(); aColorSet.Show(); - StartListening( *_pBindings, TRUE ); + StartListening( *_pBindings, sal_True ); } @@ -390,7 +390,7 @@ void SvxColorDockingWindow::FillValueSet() Bitmap aBmp( aVD.GetBitmap( Point(), aColorSize ) ); - aColorSet.InsertItem( (USHORT)1, Image(aBmp), SVX_RESSTR( RID_SVXSTR_INVISIBLE ) ); + aColorSet.InsertItem( (sal_uInt16)1, Image(aBmp), SVX_RESSTR( RID_SVXSTR_INVISIBLE ) ); XColorEntry* pEntry; nCount = pColorTable->Count(); @@ -398,7 +398,7 @@ void SvxColorDockingWindow::FillValueSet() for( long i = 0; i < nCount; i++ ) { pEntry = pColorTable->GetColor( i ); - aColorSet.InsertItem( (USHORT)i+2, + aColorSet.InsertItem( (sal_uInt16)i+2, pEntry->GetColor(), pEntry->GetName() ); } } @@ -418,8 +418,8 @@ void SvxColorDockingWindow::SetSize() aSize.Height() -= 4; // Zeilen und Spalten berechnen - nCols = (USHORT) ( aSize.Width() / aItemSize.Width() ); - nLines = (USHORT) ( (float) aSize.Height() / (float) aItemSize.Height() /*+ 0.35*/ ); + nCols = (sal_uInt16) ( aSize.Width() / aItemSize.Width() ); + nLines = (sal_uInt16) ( (float) aSize.Height() / (float) aItemSize.Height() /*+ 0.35*/ ); if( nLines == 0 ) nLines++; @@ -436,7 +436,7 @@ void SvxColorDockingWindow::SetSize() if( nScrollWidth > 0 ) { // Spalten mit ScrollBar berechnen - nCols = (USHORT) ( ( aSize.Width() - nScrollWidth ) / aItemSize.Width() ); + nCols = (sal_uInt16) ( ( aSize.Width() - nScrollWidth ) / aItemSize.Width() ); } aColorSet.SetColCount( nCols ); @@ -457,13 +457,13 @@ void SvxColorDockingWindow::SetSize() |* \************************************************************************/ -BOOL SvxColorDockingWindow::Close() +sal_Bool SvxColorDockingWindow::Close() { - SfxBoolItem aItem( SID_COLOR_CONTROL, FALSE ); + SfxBoolItem aItem( SID_COLOR_CONTROL, sal_False ); GetBindings().GetDispatcher()->Execute( SID_COLOR_CONTROL, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L ); SfxDockingWindow::Close(); - return( TRUE ); + return( sal_True ); } /************************************************************************* @@ -475,7 +475,7 @@ BOOL SvxColorDockingWindow::Close() IMPL_LINK( SvxColorDockingWindow, SelectHdl, void *, EMPTYARG ) { SfxDispatcher* pDispatcher = GetBindings().GetDispatcher(); - USHORT nPos = aColorSet.GetSelectItemId(); + sal_uInt16 nPos = aColorSet.GetSelectItemId(); Color aColor( aColorSet.GetItemColor( nPos ) ); String aStr( aColorSet.GetItemText( nPos ) ); @@ -490,7 +490,7 @@ IMPL_LINK( SvxColorDockingWindow, SelectHdl, void *, EMPTYARG ) } else { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // Wenn wir eine DrawView haben und uns im TextEdit-Modus befinden, // wird nicht die Flaechen-, sondern die Textfarbe zugewiesen @@ -503,7 +503,7 @@ IMPL_LINK( SvxColorDockingWindow, SelectHdl, void *, EMPTYARG ) SvxColorItem aTextColorItem( aColor, SID_ATTR_CHAR_COLOR ); pDispatcher->Execute( SID_ATTR_CHAR_COLOR, SFX_CALLMODE_RECORD, &aTextColorItem, 0L ); - bDone = TRUE; + bDone = sal_True; } } if ( !bDone ) @@ -581,8 +581,8 @@ void SvxColorDockingWindow::Resizing( Size& rNewSize ) rNewSize.Height() -= 4; // Spalten und Reihen ermitteln - nCols = (USHORT) ( (float) rNewSize.Width() / (float) aItemSize.Width() + 0.5 ); - nLines = (USHORT) ( (float) rNewSize.Height() / (float) aItemSize.Height() + 0.5 ); + nCols = (sal_uInt16) ( (float) rNewSize.Width() / (float) aItemSize.Width() + 0.5 ); + nLines = (sal_uInt16) ( (float) rNewSize.Height() / (float) aItemSize.Height() + 0.5 ); if( nLines == 0 ) nLines = 1; @@ -599,7 +599,7 @@ void SvxColorDockingWindow::Resizing( Size& rNewSize ) if( nScrollWidth > 0 ) { // Spalten mit ScrollBar berechnen - nCols = (USHORT) ( ( ( (float) rNewSize.Width() - (float) nScrollWidth ) ) + nCols = (sal_uInt16) ( ( ( (float) rNewSize.Width() - (float) nScrollWidth ) ) / (float) aItemSize.Width() + 0.5 ); } if( nCols <= 1 ) @@ -610,7 +610,7 @@ void SvxColorDockingWindow::Resizing( Size& rNewSize ) if( nCount % nCols ) nMaxLines++; - nLines = sal::static_int_cast< USHORT >( + nLines = sal::static_int_cast< sal_uInt16 >( std::min< long >( nLines, nMaxLines ) ); // Groesse des Windows setzen @@ -647,7 +647,7 @@ long SvxColorDockingWindow::Notify( NotifyEvent& rNEvt ) if( ( rNEvt.GetType() == EVENT_KEYINPUT ) ) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); - USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode(); + sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode(); switch( nKeyCode ) { case KEY_ESCAPE: diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index e5bc5045c7b3..fb68c8768d49 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -98,7 +98,7 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow( svt::ToolboxController& rCon { SetHelpId( HID_MENU_EXTRUSION_DIRECTION ); - USHORT i; + sal_uInt16 i; for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) { maImgDirection[i] = Image( SVX_RES( IMG_DIRECTION + i ) ); @@ -111,7 +111,7 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow( svt::ToolboxController& rCon mpDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) ); mpDirectionSet->SetColCount( 3 ); - mpDirectionSet->EnableFullItemMode( FALSE ); + mpDirectionSet->EnableFullItemMode( sal_False ); bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -144,7 +144,7 @@ void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt ) { bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - for( USHORT i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) + for( sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) { mpDirectionSet->SetItemImage( i+1, bHighContrast ? maImgDirectionH[ i ] : maImgDirection[ i ] ); } @@ -160,7 +160,7 @@ void ExtrusionDirectionWindow::implSetDirection( sal_Int32 nSkew, bool bEnabled { if( mpDirectionSet ) { - USHORT nItemId; + sal_uInt16 nItemId; for( nItemId = DIRECTION_NW; nItemId <= DIRECTION_SE; nItemId++ ) { if( gSkewList[nItemId] == nSkew ) @@ -406,7 +406,7 @@ void ExtrusionDepthWindow::implSetDepth( double fDepth ) void ExtrusionDepthWindow::implFillStrings( FieldUnit eUnit ) { meUnit = eUnit; - USHORT nResource = IsMetric( eUnit ) ? RID_SVXSTR_DEPTH_0 : RID_SVXSTR_DEPTH_0_INCH; + sal_uInt16 nResource = IsMetric( eUnit ) ? RID_SVXSTR_DEPTH_0 : RID_SVXSTR_DEPTH_0_INCH; for( int i = 0; i < 5; i++ ) { @@ -594,7 +594,7 @@ ExtrusionLightingWindow::ExtrusionLightingWindow( svt::ToolboxController& rContr , msExtrusionLightingDirection( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingDirection" )) , msExtrusionLightingIntensity( RTL_CONSTASCII_USTRINGPARAM( ".uno:ExtrusionLightingIntensity" )) { - USHORT i; + sal_uInt16 i; for( i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; i++ ) { if( i != FROM_FRONT ) @@ -616,7 +616,7 @@ ExtrusionLightingWindow::ExtrusionLightingWindow( svt::ToolboxController& rContr mpLightingSet->SetSelectHdl( LINK( this, ExtrusionLightingWindow, SelectHdl ) ); mpLightingSet->SetColCount( 3 ); - mpLightingSet->EnableFullItemMode( FALSE ); + mpLightingSet->EnableFullItemMode( sal_False ); bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -673,7 +673,7 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled ) if( !bEnabled ) nDirection = FROM_FRONT; - USHORT nItemId; + sal_uInt16 nItemId; for( nItemId = FROM_TOP_LEFT; nItemId <= FROM_BOTTOM_RIGHT; nItemId++ ) { if( nItemId == FROM_FRONT ) @@ -684,11 +684,11 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled ) { if( bHighContrast ) { - mpLightingSet->SetItemImage( nItemId + 1, (USHORT)nDirection == nItemId ? maImgLightingOnh[nItemId] : maImgLightingOffh[nItemId] ); + mpLightingSet->SetItemImage( nItemId + 1, (sal_uInt16)nDirection == nItemId ? maImgLightingOnh[nItemId] : maImgLightingOffh[nItemId] ); } else { - mpLightingSet->SetItemImage( nItemId + 1, (USHORT)nDirection == nItemId ? maImgLightingOn[nItemId] : maImgLightingOff[nItemId] ); + mpLightingSet->SetItemImage( nItemId + 1, (sal_uInt16)nDirection == nItemId ? maImgLightingOn[nItemId] : maImgLightingOff[nItemId] ); } } } @@ -990,7 +990,7 @@ Sequence< OUString > SAL_CALL ExtrusionSurfaceControl::getSupportedServiceNames( SFX_IMPL_TOOLBOX_CONTROL( ExtrusionColorControl, SvxColorItem ); ExtrusionColorControl::ExtrusionColorControl( - USHORT nSlotId, USHORT nId, ToolBox& rTbx ) + sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl ( nSlotId, nId, rTbx ) { rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); @@ -1029,9 +1029,9 @@ SfxPopupWindow* ExtrusionColorControl::CreatePopupWindow() // ----------------------------------------------------------------------- -void ExtrusionColorControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) +void ExtrusionColorControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); if( nSID == SID_EXTRUSION_3D_COLOR ) diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 5b740dbef004..eb10f11060d4 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -66,7 +66,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxFillToolBoxControl, XFillStyleItem ); |* \************************************************************************/ -SvxFillToolBoxControl::SvxFillToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxFillToolBoxControl::SvxFillToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), pStyleItem ( NULL ), @@ -77,8 +77,8 @@ SvxFillToolBoxControl::SvxFillToolBoxControl( USHORT nSlotId, USHORT nId, ToolBo pFillControl ( NULL ), pFillTypeLB ( NULL ), pFillAttrLB ( NULL ), - bUpdate ( FALSE ), - bIgnoreStatusUpdate( FALSE ), + bUpdate ( sal_False ), + bIgnoreStatusUpdate( sal_False ), eLastXFS ( XFILL_NONE ) { addStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FillColor" ))); @@ -106,10 +106,10 @@ SvxFillToolBoxControl::~SvxFillToolBoxControl() void SvxFillToolBoxControl::StateChanged( - USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - FASTBOOL bEnableControls = FALSE; + bool bEnableControls = sal_False; if ( bIgnoreStatusUpdate ) return; @@ -135,11 +135,11 @@ void SvxFillToolBoxControl::StateChanged( pFillTypeLB->Enable(); eLastXFS = pFillTypeLB->GetSelectEntryPos(); - bUpdate = TRUE; + bUpdate = sal_True; XFillStyle eXFS = (XFillStyle)pStyleItem->GetValue(); pFillTypeLB->SelectEntryPos( - sal::static_int_cast< USHORT >( eXFS ) ); + sal::static_int_cast< sal_uInt16 >( eXFS ) ); pFillAttrLB->Enable(); } else if( pStyleItem ) @@ -152,7 +152,7 @@ void SvxFillToolBoxControl::StateChanged( pColorItem = (XFillColorItem*) pState->Clone(); if( eXFS == XFILL_SOLID ) - bEnableControls = TRUE; + bEnableControls = sal_True; } else if( nSID == SID_ATTR_FILL_GRADIENT ) { @@ -160,7 +160,7 @@ void SvxFillToolBoxControl::StateChanged( pGradientItem = (XFillGradientItem*) pState->Clone(); if( eXFS == XFILL_GRADIENT ) - bEnableControls = TRUE; + bEnableControls = sal_True; } else if( nSID == SID_ATTR_FILL_HATCH ) { @@ -168,7 +168,7 @@ void SvxFillToolBoxControl::StateChanged( pHatchItem = (XFillHatchItem*) pState->Clone(); if( eXFS == XFILL_HATCH ) - bEnableControls = TRUE; + bEnableControls = sal_True; } else if( nSID == SID_ATTR_FILL_BITMAP ) { @@ -176,7 +176,7 @@ void SvxFillToolBoxControl::StateChanged( pBitmapItem = (XFillBitmapItem*) pState->Clone(); if( eXFS == XFILL_BITMAP ) - bEnableControls = TRUE; + bEnableControls = sal_True; } } if( bEnableControls ) @@ -184,7 +184,7 @@ void SvxFillToolBoxControl::StateChanged( //pFillTypeLB->Enable(); pFillAttrLB->Enable(); - bUpdate = TRUE; + bUpdate = sal_True; } Update( pState ); @@ -197,7 +197,7 @@ void SvxFillToolBoxControl::StateChanged( pFillTypeLB->SetNoSelection(); pFillAttrLB->Disable(); pFillAttrLB->SetNoSelection(); - bUpdate = FALSE; + bUpdate = sal_False; } else { @@ -211,7 +211,7 @@ void SvxFillToolBoxControl::StateChanged( ( nSID == SID_ATTR_FILL_BITMAP && eXFS == XFILL_BITMAP ) ) { pFillAttrLB->SetNoSelection(); - //bUpdate = FALSE; + //bUpdate = sal_False; } } } @@ -231,7 +231,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) { if ( pStyleItem && pState && bUpdate ) { - bUpdate = FALSE; + bUpdate = sal_False; XFillStyle eXFS = (XFillStyle)pStyleItem->GetValue(); @@ -265,7 +265,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) LISTBOX_ENTRY_NOTFOUND || pFillAttrLB->GetSelectEntryColor() != aColor ) { - USHORT nCount = pFillAttrLB->GetEntryCount(); + sal_uInt16 nCount = pFillAttrLB->GetEntryCount(); String aTmpStr; if( nCount > 0 ) { @@ -281,9 +281,9 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) aTmpStr += aString; aTmpStr += TMP_STR_END; - //pFillAttrLB->SetUpdateMode( FALSE ); - USHORT nPos = pFillAttrLB->InsertEntry( aColor, aTmpStr ); - //pFillAttrLB->SetUpdateMode( TRUE ); + //pFillAttrLB->SetUpdateMode( sal_False ); + sal_uInt16 nPos = pFillAttrLB->InsertEntry( aColor, aTmpStr ); + //pFillAttrLB->SetUpdateMode( sal_True ); pFillAttrLB->SelectEntryPos( nPos ); } // NEU @@ -303,7 +303,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) // Pruefen, ob Eintrag nicht in der Liste ist if( pFillAttrLB->GetSelectEntry() != aString ) { - USHORT nCount = pFillAttrLB->GetEntryCount(); + sal_uInt16 nCount = pFillAttrLB->GetEntryCount(); String aTmpStr; if( nCount > 0 ) { @@ -323,7 +323,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) String aEmptyString = String(); XGradientList aGradientList( aEmptyString ); aGradientList.Insert( pEntry ); - aGradientList.SetDirty( FALSE ); + aGradientList.SetDirty( sal_False ); Bitmap* pBmp = aGradientList.CreateBitmapForUI( 0 ); if( pBmp ) @@ -353,7 +353,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) // Pruefen, ob Eintrag nicht in der Liste ist if( pFillAttrLB->GetSelectEntry() != aString ) { - USHORT nCount = pFillAttrLB->GetEntryCount(); + sal_uInt16 nCount = pFillAttrLB->GetEntryCount(); String aTmpStr; if( nCount > 0 ) { @@ -373,7 +373,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) String aEmptyString = String(); XHatchList aHatchList( aEmptyString ); aHatchList.Insert( pEntry ); - aHatchList.SetDirty( FALSE ); + aHatchList.SetDirty( sal_False ); Bitmap* pBmp = aHatchList.CreateBitmapForUI( 0 ); if( pBmp ) @@ -410,7 +410,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) // Pruefen, ob Eintrag nicht in der Liste ist if( pFillAttrLB->GetSelectEntry() != aString ) { - USHORT nCount = pFillAttrLB->GetEntryCount(); + sal_uInt16 nCount = pFillAttrLB->GetEntryCount(); String aTmpStr; if( nCount > 0 ) { @@ -429,7 +429,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) XBitmapEntry* pEntry = new XBitmapEntry( pBitmapItem->GetBitmapValue(), aTmpStr ); XBitmapList aBitmapList( String::CreateFromAscii("TmpList") ); aBitmapList.Insert( pEntry ); - aBitmapList.SetDirty( FALSE ); + aBitmapList.SetDirty( sal_False ); //Bitmap* pBmp = aBitmapList.GetBitmap( 0 ); //( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), *pBmp ); pFillAttrLB->Fill( &aBitmapList ); @@ -677,7 +677,7 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) { XFillStyle eXFS = (XFillStyle)pLbFillType->GetSelectEntryPos(); XFillStyleItem aXFillStyleItem( eXFS ); - BOOL bAction = pBox && !pLbFillAttr->IsTravelSelect(); + sal_Bool bAction = pBox && !pLbFillAttr->IsTravelSelect(); SfxObjectShell* pSh = SfxObjectShell::Current(); if ( bAction ) @@ -689,10 +689,10 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )); aXFillStyleItem.QueryValue( a ); aArgs[0].Value = a; - ( (SvxFillToolBoxControl*)GetData() )->IgnoreStatusUpdate( TRUE ); + ( (SvxFillToolBoxControl*)GetData() )->IgnoreStatusUpdate( sal_True ); ((SvxFillToolBoxControl*)GetData())->Dispatch( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FillStyle" )), aArgs ); - ( (SvxFillToolBoxControl*)GetData() )->IgnoreStatusUpdate( FALSE ); + ( (SvxFillToolBoxControl*)GetData() )->IgnoreStatusUpdate( sal_False ); switch( eXFS ) { @@ -723,7 +723,7 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) break; case XFILL_GRADIENT: { - USHORT nPos = pLbFillAttr->GetSelectEntryPos(); + sal_uInt16 nPos = pLbFillAttr->GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_GRADIENT_LIST ) ) { @@ -747,7 +747,7 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) case XFILL_HATCH: { - USHORT nPos = pLbFillAttr->GetSelectEntryPos(); + sal_uInt16 nPos = pLbFillAttr->GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_HATCH_LIST ) ) { @@ -770,7 +770,7 @@ IMPL_LINK( FillControl, SelectFillAttrHdl, ListBox *, pBox ) case XFILL_BITMAP: { - USHORT nPos = pLbFillAttr->GetSelectEntryPos(); + sal_uInt16 nPos = pLbFillAttr->GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem( SID_BITMAP_LIST ) ) { diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 23f2241ab235..416dc09ca157 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -121,7 +121,7 @@ FontWorkGalleryDialog::~FontWorkGalleryDialog() void FontWorkGalleryDialog::initfavorites(sal_uInt16 nThemeId, std::vector< Bitmap * >& rFavorites) { // Ueber die Gallery werden die Favoriten eingelesen - ULONG nFavCount = GalleryExplorer::GetSdrObjCount( nThemeId ); + sal_uIntPtr nFavCount = GalleryExplorer::GetSdrObjCount( nThemeId ); // Gallery thema locken GalleryExplorer::BeginLocking(nThemeId); @@ -197,10 +197,10 @@ void FontWorkGalleryDialog::changeText( SdrTextObj* pObj ) { SdrOutliner& rOutl = mpModel->GetDrawOutliner(pObj); - USHORT nOutlMode = rOutl.GetMode(); + sal_uInt16 nOutlMode = rOutl.GetMode(); Size aPaperSize = rOutl.GetPaperSize(); - BOOL bUpdateMode = rOutl.GetUpdateMode(); - rOutl.SetUpdateMode(FALSE); + sal_Bool bUpdateMode = rOutl.GetUpdateMode(); + rOutl.SetUpdateMode(sal_False); rOutl.SetParaAttribs( 0, rOutl.GetEmptyItemSet() ); // #95114# Always set the object's StyleSheet at the Outliner to @@ -232,7 +232,7 @@ void FontWorkGalleryDialog::SetSdrObjectRef( SdrObject** ppSdrObject, SdrModel* void FontWorkGalleryDialog::insertSelectedFontwork() { - USHORT nItemId = maCtlFavorites.GetSelectItemId(); + sal_uInt16 nItemId = maCtlFavorites.GetSelectItemId(); if( nItemId > 0 ) { @@ -307,7 +307,7 @@ IMPL_LINK( FontWorkGalleryDialog, DoubleClickFavoriteHdl, void*, EMPTYARG ) //------------------------------------------------------------------------ SFX_IMPL_TOOLBOX_CONTROL( FontWorkShapeTypeControl, SfxStringItem ); -FontWorkShapeTypeControl::FontWorkShapeTypeControl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ) +FontWorkShapeTypeControl::FontWorkShapeTypeControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); @@ -338,7 +338,7 @@ SfxPopupWindow* FontWorkShapeTypeControl::CreatePopupWindow() // ----------------------------------------------------------------------- -void FontWorkShapeTypeControl::Select( BOOL ) +void FontWorkShapeTypeControl::Select( sal_Bool ) { } diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx index 45e76f8ae6e9..1f6195d0da87 100644 --- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx +++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx @@ -49,12 +49,12 @@ using namespace ::com::sun::star::beans; SFX_IMPL_TOOLBOX_CONTROL( FormatPaintBrushToolBoxControl, SfxBoolItem ); -FormatPaintBrushToolBoxControl::FormatPaintBrushToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +FormatPaintBrushToolBoxControl::FormatPaintBrushToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) , m_bPersistentCopy(false) , m_aDoubleClickTimer() { - ULONG nDblClkTime = rTbx.GetSettings().GetMouseSettings().GetDoubleClickTime(); + sal_uIntPtr nDblClkTime = rTbx.GetSettings().GetMouseSettings().GetDoubleClickTime(); m_aDoubleClickTimer.SetTimeoutHdl( LINK(this, FormatPaintBrushToolBoxControl, WaitDoubleClickHdl) ); m_aDoubleClickTimer.SetTimeout(nDblClkTime); @@ -102,12 +102,12 @@ IMPL_LINK(FormatPaintBrushToolBoxControl, WaitDoubleClickHdl, void*, EMPTYARG ) } // ----------------------------------------------------------------------- -void FormatPaintBrushToolBoxControl::Select( BOOL ) +void FormatPaintBrushToolBoxControl::Select( sal_Bool ) { } // ----------------------------------------------------------------------- -void FormatPaintBrushToolBoxControl::StateChanged( USHORT nSID, SfxItemState eState, +void FormatPaintBrushToolBoxControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { if( ( eState & SFX_ITEM_SET ) == 0 ) 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; } } } diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 26b5a508491e..76fd7d423324 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -74,7 +74,7 @@ SvxLineBox::SvxLineBox( Window* pParent, const Reference< XFrame >& rFrame, WinB meBmpMode ( GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ), nCurPos ( 0 ), aLogicalSize(40,140), - bRelease ( TRUE ), + bRelease ( sal_True ), mpSh ( NULL ), mxFrame ( rFrame ) { @@ -114,7 +114,7 @@ void SvxLineBox::Select() if ( !IsTravelSelect() ) { XLineStyle eXLS; - USHORT nPos = GetSelectEntryPos(); + sal_uInt16 nPos = GetSelectEntryPos(); // SfxDispatcher* pDisp = rBindings.GetDispatcher(); //DBG_ASSERT( pDisp, "invalid Dispatcher" ); @@ -177,7 +177,7 @@ void SvxLineBox::Select() long SvxLineBox::PreNotify( NotifyEvent& rNEvt ) { - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); switch(nType) { @@ -193,7 +193,7 @@ long SvxLineBox::PreNotify( NotifyEvent& rNEvt ) const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); if( pKEvt->GetKeyCode().GetCode() == KEY_TAB) { - bRelease = FALSE; + bRelease = sal_False; Select(); } } @@ -235,7 +235,7 @@ void SvxLineBox::ReleaseFocus_Impl() { if(!bRelease) { - bRelease = TRUE; + bRelease = sal_True; return; } @@ -302,7 +302,7 @@ SvxColorBox::SvxColorBox( ColorLB( pParent, nBits ), nCurPos ( 0 ), aLogicalSize(45,80), - bRelease ( TRUE ), + bRelease ( sal_True ), maCommand ( rCommand ), mxFrame ( rFrame ) { @@ -383,7 +383,7 @@ void SvxColorBox::Select() long SvxColorBox::PreNotify( NotifyEvent& rNEvt ) { - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); switch(nType) { @@ -400,7 +400,7 @@ long SvxColorBox::PreNotify( NotifyEvent& rNEvt ) if( pKEvt->GetKeyCode().GetCode() == KEY_TAB) { - bRelease = FALSE; + bRelease = sal_False; Select(); } } @@ -456,7 +456,7 @@ void SvxColorBox::ReleaseFocus_Impl() { if(!bRelease) { - bRelease = TRUE; + bRelease = sal_True; return; } @@ -492,7 +492,7 @@ SvxMetricField::SvxMetricField( SetFirst( 0 ); eDlgUnit = SfxModule::GetCurrentFieldUnit(); - SetFieldUnit( *this, eDlgUnit, FALSE ); + SetFieldUnit( *this, eDlgUnit, sal_False ); Show(); } @@ -580,7 +580,7 @@ void SvxMetricField::RefreshDlgUnit() if ( eDlgUnit != eTmpUnit ) { eDlgUnit = eTmpUnit; - SetFieldUnit( *this, eDlgUnit, FALSE ); + SetFieldUnit( *this, eDlgUnit, sal_False ); } } @@ -588,7 +588,7 @@ void SvxMetricField::RefreshDlgUnit() long SvxMetricField::PreNotify( NotifyEvent& rNEvt ) { - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) aCurTxt = GetText(); @@ -612,18 +612,18 @@ long SvxMetricField::Notify( NotifyEvent& rNEvt ) pSh->KeyInput( *pKEvt ); else { - FASTBOOL bHandled = FALSE; + bool bHandled = sal_False; switch ( rKey.GetCode() ) { case KEY_RETURN: Reformat(); - bHandled = TRUE; + bHandled = sal_True; break; case KEY_ESCAPE: SetText( aCurTxt ); - bHandled = TRUE; + bHandled = sal_True; break; } @@ -658,8 +658,8 @@ void SvxMetricField::DataChanged( const DataChangedEvent& rDCEvt ) SvxFillTypeBox::SvxFillTypeBox( Window* pParent, WinBits nBits ) : FillTypeLB( pParent, nBits | WB_TABSTOP ), nCurPos ( 0 ), - bSelect ( FALSE ), - bRelease(TRUE) + bSelect ( sal_False ), + bRelease(sal_True) { SetSizePixel( LogicToPixel( Size(40, 40 ),MAP_APPFONT )); Fill(); @@ -677,18 +677,18 @@ SvxFillTypeBox::~SvxFillTypeBox() long SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt ) { - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) nCurPos = GetSelectEntryPos(); else if ( EVENT_LOSEFOCUS == nType && Application::GetFocusWindow() - && !IsWindowOrChild( Application::GetFocusWindow(), TRUE ) ) + && !IsWindowOrChild( Application::GetFocusWindow(), sal_True ) ) { if ( !bSelect ) SelectEntryPos( nCurPos ); else - bSelect = FALSE; + bSelect = sal_False; } return FillTypeLB::PreNotify( rNEvt ); @@ -710,9 +710,9 @@ long SvxFillTypeBox::Notify( NotifyEvent& rNEvt ) ( (Link&)GetSelectHdl() ).Call( this ); break; case KEY_TAB: - bRelease = FALSE; + bRelease = sal_False; ( (Link&)GetSelectHdl() ).Call( this ); - bRelease = TRUE; + bRelease = sal_True; break; case KEY_ESCAPE: @@ -747,7 +747,7 @@ SvxFillAttrBox::SvxFillAttrBox( Window* pParent, WinBits nBits ) : FillAttrLB( pParent, nBits | WB_TABSTOP ), nCurPos( 0 ), - bRelease( TRUE ) + bRelease( sal_True ) { SetPosPixel( Point( 90, 0 ) ); @@ -765,7 +765,7 @@ SvxFillAttrBox::~SvxFillAttrBox() long SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt ) { - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) nCurPos = GetSelectEntryPos(); @@ -790,9 +790,9 @@ long SvxFillAttrBox::Notify( NotifyEvent& rNEvt ) nHandled = 1; break; case KEY_TAB: - bRelease = FALSE; + bRelease = sal_False; GetSelectHdl().Call( this ); - bRelease = TRUE; + bRelease = sal_True; break; case KEY_ESCAPE: SelectEntryPos( nCurPos ); diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index 04e7e3dc543a..ff03e87a0997 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -70,8 +70,8 @@ private: long nMX; long nMY; long nTextHeight; - BOOL bInitialKeyInput; - BOOL m_bMod1; + sal_Bool bInitialKeyInput; + sal_Bool m_bMod1; ToolBox& rTbx; Reference< XFrame > mxFrame; rtl::OUString maCommand; @@ -79,7 +79,7 @@ private: void UpdateSize_Impl( long nNewCol, long nNewLine); public: - TableWindow( USHORT nSlotId, + TableWindow( sal_uInt16 nSlotId, const rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ); @@ -93,16 +93,16 @@ public: virtual void PopupModeEnd(); virtual SfxPopupWindow* Clone() const; - USHORT GetColCount() const { return (USHORT)nCol; } - USHORT GetLineCount() const { return (USHORT)nLine; } + sal_uInt16 GetColCount() const { return (sal_uInt16)nCol; } + sal_uInt16 GetLineCount() const { return (sal_uInt16)nLine; } }; // ----------------------------------------------------------------------- -TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) : +TableWindow::TableWindow( sal_uInt16 nSlotId, const rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) : SfxPopupWindow( nSlotId, rFrame, WB_SYSTEMWINDOW ), - bInitialKeyInput(TRUE), - m_bMod1(FALSE), + bInitialKeyInput(sal_True), + m_bMod1(sal_False), rTbx(rParentTbx), mxFrame( rFrame ), maCommand( rCmd ) @@ -119,7 +119,7 @@ TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, ToolBox& rP Font aFont = GetFont(); aFont.SetColor( aLineColor ); aFont.SetFillColor( aFillColor ); - aFont.SetTransparent( FALSE ); + aFont.SetTransparent( sal_False ); SetFont( aFont ); nCol = 0; @@ -268,16 +268,16 @@ void TableWindow::UpdateSize_Impl( long nNewCol, long nNewLine) ---------------------------------------------------------------------------*/ void TableWindow::KeyInput( const KeyEvent& rKEvt ) { - BOOL bHandled = FALSE; - USHORT nModifier = rKEvt.GetKeyCode().GetModifier(); - USHORT nKey = rKEvt.GetKeyCode().GetCode(); + sal_Bool bHandled = sal_False; + sal_uInt16 nModifier = rKEvt.GetKeyCode().GetModifier(); + sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode(); if(!nModifier) { if( KEY_UP == nKey || KEY_DOWN == nKey || KEY_LEFT == nKey || KEY_RIGHT == nKey || KEY_ESCAPE == nKey ||KEY_RETURN == nKey ) { - bHandled = TRUE; + bHandled = sal_True; long nNewCol = nCol; long nNewLine = nLine; switch(nKey) @@ -312,7 +312,7 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt ) //make sure that a table can initially be created if(bInitialKeyInput) { - bInitialKeyInput = FALSE; + bInitialKeyInput = sal_False; if(!nNewLine) nNewLine = 1; if(!nNewCol) @@ -323,7 +323,7 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt ) } else if(KEY_MOD1 == nModifier && KEY_RETURN == nKey) { - m_bMod1 = TRUE; + m_bMod1 = sal_True; if(IsMouseCaptured()) ReleaseMouse(); EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL ); @@ -430,7 +430,7 @@ void TableWindow::PopupModeEnd() if ( !IsPopupModeCanceled() && nCol && nLine ) { Window* pParent = rTbx.GetParent(); - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, reinterpret_cast<void*>(nId)); Reference< XDispatchProvider > xDispatchProvider( mxFrame, UNO_QUERY ); @@ -473,15 +473,15 @@ private: long nWidth; long nMX; long nTextHeight; - BOOL bInitialKeyInput; - BOOL m_bMod1; + sal_Bool bInitialKeyInput; + sal_Bool m_bMod1; ToolBox& rTbx; Reference< XFrame > mxFrame; ::rtl::OUString maCommand; void UpdateSize_Impl( long nNewCol ); public: - ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ); + ColumnsWindow( sal_uInt16 nId, const ::rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ); void KeyInput( const KeyEvent& rKEvt ); virtual void MouseMove( const MouseEvent& rMEvt ); @@ -491,15 +491,15 @@ public: virtual void PopupModeEnd(); virtual SfxPopupWindow* Clone() const; - USHORT GetColCount() const { return (USHORT)nCol; } + sal_uInt16 GetColCount() const { return (sal_uInt16)nCol; } }; // ----------------------------------------------------------------------- -ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) : +ColumnsWindow::ColumnsWindow( sal_uInt16 nId, const ::rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) : SfxPopupWindow( nId, rFrame, WB_SYSTEMWINDOW ), - bInitialKeyInput(TRUE), - m_bMod1(FALSE), + bInitialKeyInput(sal_True), + m_bMod1(sal_False), rTbx(rParentTbx), mxFrame(rFrame), maCommand( rCmd ) @@ -516,7 +516,7 @@ ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox& Font aFont( GetFont() ); aFont.SetColor( aLineColor ); aFont.SetFillColor( aFillColor ); - aFont.SetTransparent( FALSE ); + aFont.SetTransparent( sal_False ); SetFont( aFont ); nCol = 0; @@ -630,16 +630,16 @@ void ColumnsWindow::MouseButtonDown( const MouseEvent& rMEvt ) ---------------------------------------------------------------------------*/ void ColumnsWindow::KeyInput( const KeyEvent& rKEvt ) { - BOOL bHandled = FALSE; - USHORT nModifier = rKEvt.GetKeyCode().GetModifier(); - USHORT nKey = rKEvt.GetKeyCode().GetCode(); + sal_Bool bHandled = sal_False; + sal_uInt16 nModifier = rKEvt.GetKeyCode().GetModifier(); + sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode(); if(!nModifier) { if( KEY_LEFT == nKey || KEY_RIGHT == nKey || KEY_RETURN == nKey ||KEY_ESCAPE == nKey || KEY_UP == nKey) { - bHandled = TRUE; + bHandled = sal_True; long nNewCol = nCol; switch(nKey) { @@ -663,7 +663,7 @@ void ColumnsWindow::KeyInput( const KeyEvent& rKEvt ) //make sure that a table can initially be created if(bInitialKeyInput) { - bInitialKeyInput = FALSE; + bInitialKeyInput = sal_False; if(!nNewCol) nNewCol = 1; } @@ -672,7 +672,7 @@ void ColumnsWindow::KeyInput( const KeyEvent& rKEvt ) } else if(KEY_MOD1 == nModifier && KEY_RETURN == nKey) { - m_bMod1 = TRUE; + m_bMod1 = sal_True; if(IsMouseCaptured()) ReleaseMouse(); EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL ); @@ -753,7 +753,7 @@ void ColumnsWindow::PopupModeEnd() { if ( !IsPopupModeCanceled() && nCol ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); Window* pParent = rTbx.GetParent(); pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, reinterpret_cast<void*>(nId)); @@ -774,9 +774,9 @@ void ColumnsWindow::PopupModeEnd() // class SvxTableToolBoxControl ------------------------------------------ -SvxTableToolBoxControl::SvxTableToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxTableToolBoxControl::SvxTableToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), - bEnabled( TRUE ) + bEnabled( sal_True ) { rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); rTbx.Invalidate(); @@ -821,17 +821,17 @@ SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindowCascading() // ----------------------------------------------------------------------- -void SvxTableToolBoxControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* pState ) +void SvxTableToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { if ( pState && pState->ISA(SfxUInt16Item) ) { - INT16 nValue = static_cast< const SfxUInt16Item* >( pState )->GetValue(); + sal_Int16 nValue = static_cast< const SfxUInt16Item* >( pState )->GetValue(); bEnabled = ( nValue != 0 ); } else bEnabled = SFX_ITEM_DISABLED != eState; - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); @@ -841,7 +841,7 @@ void SvxTableToolBoxControl::StateChanged( USHORT, SfxItemState eState, const Sf // class SvxColumnsToolBoxControl ------------------------------------------ -SvxColumnsToolBoxControl::SvxColumnsToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxColumnsToolBoxControl::SvxColumnsToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); @@ -890,7 +890,7 @@ SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindowCascading() /* -----------------18.11.99 16:38------------------- --------------------------------------------------*/ -void SvxColumnsToolBoxControl::StateChanged( USHORT nSID, +void SvxColumnsToolBoxControl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 4fe822f94955..9c0a5262ce7a 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -73,49 +73,49 @@ class SvxPopupWindowListBox : public SfxPopupWindow FixedInfo aInfo; ListBox * pListBox; ToolBox & rToolBox; - BOOL bUserSel; - USHORT nTbxId; + sal_Bool bUserSel; + sal_uInt16 nTbxId; rtl::OUString maCommandURL; // disallow copy-constructor and assignment-operator SvxPopupWindowListBox(const int& ); SvxPopupWindowListBox & operator = (const int& ); -// SvxPopupWindowListBox( USHORT nSlotId, ToolBox& rTbx, USHORT nTbxItemId ); +// SvxPopupWindowListBox( sal_uInt16 nSlotId, ToolBox& rTbx, sal_uInt16 nTbxItemId ); public: - SvxPopupWindowListBox( USHORT nSlotId, const rtl::OUString& rCommandURL, USHORT nTbxId, ToolBox& rTbx ); + SvxPopupWindowListBox( sal_uInt16 nSlotId, const rtl::OUString& rCommandURL, sal_uInt16 nTbxId, ToolBox& rTbx ); virtual ~SvxPopupWindowListBox(); // SfxPopupWindow virtual SfxPopupWindow * Clone() const; virtual void PopupModeEnd(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); void StartSelection(); inline ListBox & GetListBox() { return *pListBox; } inline FixedInfo & GetInfo() { return aInfo; } - BOOL IsUserSelected() const { return bUserSel; } - void SetUserSelected( BOOL bVal ) { bUserSel = bVal; } + sal_Bool IsUserSelected() const { return bUserSel; } + void SetUserSelected( sal_Bool bVal ) { bUserSel = bVal; } /*virtual*/Window* GetPreferredKeyInputWindow(); }; ///////////////////////////////////////////////////////////////// -SvxPopupWindowListBox::SvxPopupWindowListBox( USHORT nSlotId, const rtl::OUString& rCommandURL, USHORT nId, ToolBox& rTbx ) : +SvxPopupWindowListBox::SvxPopupWindowListBox( sal_uInt16 nSlotId, const rtl::OUString& rCommandURL, sal_uInt16 nId, ToolBox& rTbx ) : SfxPopupWindow( nSlotId, Reference< XFrame >(), SVX_RES( RID_SVXTBX_UNDO_REDO_CTRL ) ), aInfo ( this, SVX_RES( FT_NUM_OPERATIONS ) ), rToolBox ( rTbx ), - bUserSel ( FALSE ), + bUserSel ( sal_False ), nTbxId ( nId ), maCommandURL( rCommandURL ) { DBG_ASSERT( nSlotId == GetId(), "id mismatch" ); pListBox = new ListBox( this, SVX_RES( LB_SVXTBX_UNDO_REDO_CTRL ) ); FreeResource(); - pListBox->EnableMultiSelection( TRUE, TRUE ); + pListBox->EnableMultiSelection( sal_True, sal_True ); SetBackground( GetSettings().GetStyleSettings().GetDialogColor() ); AddStatusListener( rCommandURL ); } @@ -149,7 +149,7 @@ void SvxPopupWindowListBox::PopupModeEnd() void SvxPopupWindowListBox::StateChanged( - USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { rToolBox.EnableItem( nTbxId, ( SfxToolBoxControl::GetItemState( pState ) != SFX_ITEM_DISABLED) ); SfxPopupWindow::StateChanged( nSID, eState, pState ); @@ -173,7 +173,7 @@ Window* SvxPopupWindowListBox::GetPreferredKeyInputWindow() SFX_IMPL_TOOLBOX_CONTROL( SvxListBoxControl, SfxStringItem ); -SvxListBoxControl::SvxListBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +SvxListBoxControl::SvxListBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :SfxToolBoxControl( nSlotId, nId, rTbx ), pPopupWin ( 0 ) { @@ -201,7 +201,7 @@ SfxPopupWindowType SvxListBoxControl::GetPopupWindowType() const void SvxListBoxControl::StateChanged( - USHORT, SfxItemState, const SfxPoolItem* pState ) + sal_uInt16, SfxItemState, const SfxPoolItem* pState ) { GetToolBox().EnableItem( GetId(), SFX_ITEM_DISABLED != GetItemState(pState) ); @@ -213,7 +213,7 @@ IMPL_LINK( SvxListBoxControl, PopupModeEndHdl, void *, EMPTYARG ) if( pPopupWin && 0 == pPopupWin->GetPopupModeFlags() && pPopupWin->IsUserSelected() ) { - USHORT nCount = pPopupWin->GetListBox().GetSelectEntryCount(); + sal_uInt16 nCount = pPopupWin->GetListBox().GetSelectEntryCount(); INetURLObject aObj( m_aCommandURL ); @@ -226,13 +226,13 @@ IMPL_LINK( SvxListBoxControl, PopupModeEndHdl, void *, EMPTYARG ) } -void SvxListBoxControl::Impl_SetInfo( USHORT nCount ) +void SvxListBoxControl::Impl_SetInfo( sal_uInt16 nCount ) { DBG_ASSERT( pPopupWin, "NULL pointer, PopupWindow missing" ); // ListBox &rListBox = pPopupWin->GetListBox(); - USHORT nId; + sal_uInt16 nId; if (nCount == 1) nId = SID_UNDO == GetSlotId() ? RID_SVXSTR_NUM_UNDO_ACTION : RID_SVXSTR_NUM_REDO_ACTION; else @@ -250,14 +250,14 @@ IMPL_LINK( SvxListBoxControl, SelectHdl, void *, EMPTYARG ) { if (pPopupWin) { - //pPopupWin->SetUserSelected( FALSE ); + //pPopupWin->SetUserSelected( sal_False ); ListBox &rListBox = pPopupWin->GetListBox(); if (rListBox.IsTravelSelect()) Impl_SetInfo( rListBox.GetSelectEntryCount() ); else { - pPopupWin->SetUserSelected( TRUE ); + pPopupWin->SetUserSelected( sal_True ); pPopupWin->EndPopupMode( 0 ); } } @@ -268,7 +268,7 @@ IMPL_LINK( SvxListBoxControl, SelectHdl, void *, EMPTYARG ) SFX_IMPL_TOOLBOX_CONTROL( SvxUndoRedoControl, SfxStringItem ); -SvxUndoRedoControl::SvxUndoRedoControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +SvxUndoRedoControl::SvxUndoRedoControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxListBoxControl( nSlotId, nId, rTbx ) { rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); @@ -281,7 +281,7 @@ SvxUndoRedoControl::~SvxUndoRedoControl() } void SvxUndoRedoControl::StateChanged( - USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { if ( nSID == SID_UNDO || nSID == SID_REDO ) { diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index 0b7e6fe7182b..3369f1ae8eb5 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -88,13 +88,13 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxLineEndToolBoxControl, SfxBoolItem ); |* \************************************************************************/ -SvxLineStyleToolBoxControl::SvxLineStyleToolBoxControl( USHORT nSlotId, - USHORT nId, +SvxLineStyleToolBoxControl::SvxLineStyleToolBoxControl( sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), pStyleItem ( NULL ), pDashItem ( NULL ), - bUpdate ( FALSE ) + bUpdate ( sal_False ) { addStatusListener( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LineDash" ))); addStatusListener( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DashListState" ))); @@ -112,7 +112,7 @@ SvxLineStyleToolBoxControl::~SvxLineStyleToolBoxControl() void SvxLineStyleToolBoxControl::StateChanged ( - USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() ); @@ -140,7 +140,7 @@ void SvxLineStyleToolBoxControl::StateChanged ( pDashItem = (XLineDashItem*)pState->Clone(); } - bUpdate = TRUE; + bUpdate = sal_True; Update( pState ); } else if ( nSID != SID_DASH_LIST ) @@ -157,7 +157,7 @@ void SvxLineStyleToolBoxControl::Update( const SfxPoolItem* pState ) { if ( pState && bUpdate ) { - bUpdate = FALSE; + bUpdate = sal_False; SvxLineBox* pBox = (SvxLineBox*)GetToolBox().GetItemWindow( GetId() ); DBG_ASSERT( pBox, "Window not found!" ); @@ -232,7 +232,7 @@ Window* SvxLineStyleToolBoxControl::CreateItemWindow( Window *pParent ) \************************************************************************/ SvxLineWidthToolBoxControl::SvxLineWidthToolBoxControl( - USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : + sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { addStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:MetricUnit" ))); @@ -247,7 +247,7 @@ SvxLineWidthToolBoxControl::~SvxLineWidthToolBoxControl() //======================================================================== void SvxLineWidthToolBoxControl::StateChanged( - USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { SvxMetricField* pFld = (SvxMetricField*) GetToolBox().GetItemWindow( GetId() ); @@ -299,7 +299,7 @@ Window* SvxLineWidthToolBoxControl::CreateItemWindow( Window *pParent ) \************************************************************************/ SvxLineColorToolBoxControl::SvxLineColorToolBoxControl( - USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : + sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { addStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColorTableState" ))); @@ -315,7 +315,7 @@ SvxLineColorToolBoxControl::~SvxLineColorToolBoxControl() void SvxLineColorToolBoxControl::StateChanged( - USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { SvxColorBox* pBox = (SvxColorBox*)GetToolBox().GetItemWindow( GetId() ); @@ -377,7 +377,7 @@ Window* SvxLineColorToolBoxControl::CreateItemWindow( Window *pParent ) \************************************************************************/ SvxLineEndWindow::SvxLineEndWindow( - USHORT nSlotId, + sal_uInt16 nSlotId, const Reference< XFrame >& rFrame, const String& rWndTitle ) : SfxPopupWindow( nSlotId, @@ -388,7 +388,7 @@ SvxLineEndWindow::SvxLineEndWindow( nCols ( 2 ), nLines ( 12 ), nLineEndWidth ( 400 ), - bPopupMode ( TRUE ), + bPopupMode ( sal_True ), mbInResize ( false ), mxFrame ( rFrame ) { @@ -397,7 +397,7 @@ SvxLineEndWindow::SvxLineEndWindow( } SvxLineEndWindow::SvxLineEndWindow( - USHORT nSlotId, + sal_uInt16 nSlotId, const Reference< XFrame >& rFrame, Window* pParentWindow, const String& rWndTitle ) : @@ -410,7 +410,7 @@ SvxLineEndWindow::SvxLineEndWindow( nCols ( 2 ), nLines ( 12 ), nLineEndWidth ( 400 ), - bPopupMode ( TRUE ), + bPopupMode ( sal_True ), mbInResize ( false ), mxFrame ( rFrame ) { @@ -467,7 +467,7 @@ IMPL_LINK( SvxLineEndWindow, SelectHdl, void *, EMPTYARG ) { XLineEndItem* pLineEndItem = NULL; XLineStartItem* pLineStartItem = NULL; - USHORT nId = aLineEndSet.GetSelectItemId(); + sal_uInt16 nId = aLineEndSet.GetSelectItemId(); if( nId == 1 ) { @@ -543,7 +543,7 @@ void SvxLineEndWindow::FillValueSet() DBG_ASSERT( pBmp, "UI-Bitmap wurde nicht erzeugt" ); aBmpSize = pBmp->GetSizePixel(); - aVD.SetOutputSizePixel( aBmpSize, FALSE ); + aVD.SetOutputSizePixel( aBmpSize, sal_False ); aBmpSize.Width() = aBmpSize.Width() / 2; Point aPt0( 0, 0 ); Point aPt1( aBmpSize.Width(), 0 ); @@ -562,10 +562,10 @@ void SvxLineEndWindow::FillValueSet() DBG_ASSERT( pBmp, "UI-Bitmap wurde nicht erzeugt" ); aVD.DrawBitmap( aPt0, *pBmp ); - aLineEndSet.InsertItem( (USHORT)((i+1L)*2L+1L), aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() ); - aLineEndSet.InsertItem( (USHORT)((i+2L)*2L), aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() ); + aLineEndSet.InsertItem( (sal_uInt16)((i+1L)*2L+1L), aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() ); + aLineEndSet.InsertItem( (sal_uInt16)((i+2L)*2L), aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() ); } - nLines = Min( (USHORT)(nCount + 1), (USHORT) MAX_LINES ); + nLines = Min( (sal_uInt16)(nCount + 1), (sal_uInt16) MAX_LINES ); aLineEndSet.SetLineCount( nLines ); SetSize(); @@ -609,21 +609,21 @@ void __EXPORT SvxLineEndWindow::Resizing( Size& rNewSize ) Size aItemSize = aLineEndSet.CalcItemSizePixel( aBitmapSize ); // -> Member //Size aOldSize = GetOutputSizePixel(); // fuer Breite - USHORT nItemCount = aLineEndSet.GetItemCount(); // -> Member + sal_uInt16 nItemCount = aLineEndSet.GetItemCount(); // -> Member // Spalten ermitteln long nItemW = aItemSize.Width(); long nW = rNewSize.Width(); - nCols = (USHORT) Max( ( (ULONG)(( nW + nItemW ) / ( nItemW * 2 ) )), - (ULONG) 1L ); + nCols = (sal_uInt16) Max( ( (sal_uIntPtr)(( nW + nItemW ) / ( nItemW * 2 ) )), + (sal_uIntPtr) 1L ); nCols *= 2; // Reihen ermitteln long nItemH = aItemSize.Height(); long nH = rNewSize.Height(); - nLines = (USHORT) Max( ( ( nH + nItemH / 2 ) / nItemH ), 1L ); + nLines = (sal_uInt16) Max( ( ( nH + nItemH / 2 ) / nItemH ), 1L ); - USHORT nMaxCols = nItemCount / nLines; + sal_uInt16 nMaxCols = nItemCount / nLines; if( nItemCount % nLines ) nMaxCols++; if( nCols > nMaxCols ) @@ -633,9 +633,9 @@ void __EXPORT SvxLineEndWindow::Resizing( Size& rNewSize ) // Keine ungerade Anzahl von Spalten if( nCols % 2 ) nCols--; - nCols = Max( nCols, (USHORT) 2 ); + nCols = Max( nCols, (sal_uInt16) 2 ); - USHORT nMaxLines = nItemCount / nCols; + sal_uInt16 nMaxLines = nItemCount / nCols; if( nItemCount % nCols ) nMaxLines++; if( nLines > nMaxLines ) @@ -654,7 +654,7 @@ void SvxLineEndWindow::StartSelection() // ----------------------------------------------------------------------- -BOOL SvxLineEndWindow::Close() +sal_Bool SvxLineEndWindow::Close() { return SfxPopupWindow::Close(); } @@ -662,7 +662,7 @@ BOOL SvxLineEndWindow::Close() // ----------------------------------------------------------------------- void SvxLineEndWindow::StateChanged( - USHORT nSID, SfxItemState, const SfxPoolItem* pState ) + sal_uInt16 nSID, SfxItemState, const SfxPoolItem* pState ) { if ( nSID == SID_LINEEND_LIST ) { @@ -688,7 +688,7 @@ void SvxLineEndWindow::PopupModeEnd() { if ( IsVisible() ) { - bPopupMode = FALSE; + bPopupMode = sal_False; SetSize(); } SfxPopupWindow::PopupModeEnd(); @@ -701,8 +701,8 @@ void SvxLineEndWindow::SetSize() //if( !bPopupMode ) if( !IsInPopupMode() ) { - USHORT nItemCount = aLineEndSet.GetItemCount(); // -> Member - USHORT nMaxLines = nItemCount / nCols; // -> Member ? + sal_uInt16 nItemCount = aLineEndSet.GetItemCount(); // -> Member + sal_uInt16 nMaxLines = nItemCount / nCols; // -> Member ? if( nItemCount % nCols ) nMaxLines++; @@ -740,7 +740,7 @@ void SvxLineEndWindow::GetFocus (void) |* \************************************************************************/ -SvxLineEndToolBoxControl::SvxLineEndToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox &rTbx ) : +SvxLineEndToolBoxControl::SvxLineEndToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); @@ -766,7 +766,7 @@ SfxPopupWindow* SvxLineEndToolBoxControl::CreatePopupWindow() { SvxLineEndWindow* pLineEndWin = new SvxLineEndWindow( GetId(), m_xFrame, &GetToolBox(), SVX_RESSTR( RID_SVXSTR_LINEEND ) ); - pLineEndWin->StartPopupMode( &GetToolBox(), TRUE ); + pLineEndWin->StartPopupMode( &GetToolBox(), sal_True ); pLineEndWin->StartSelection(); SetPopupWindow( pLineEndWin ); return pLineEndWin; @@ -774,9 +774,9 @@ SfxPopupWindow* SvxLineEndToolBoxControl::CreatePopupWindow() // ----------------------------------------------------------------------- -void SvxLineEndToolBoxControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* ) +void SvxLineEndToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); diff --git a/svx/source/tbxctrls/makefile.mk b/svx/source/tbxctrls/makefile.mk deleted file mode 100644 index 351ed4f162ef..000000000000 --- a/svx/source/tbxctrls/makefile.mk +++ /dev/null @@ -1,83 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svx -TARGET=tbxctrls -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -LIB1TARGET= $(SLB)$/$(TARGET)-core.lib -LIB1OBJFILES= \ - $(SLO)$/fontworkgallery.obj\ - $(SLO)$/extrusioncontrols.obj \ - $(SLO)$/tbcontrl.obj \ - $(SLO)$/tbxcolorupdate.obj - -LIB2TARGET= $(SLB)$/$(TARGET).lib -LIB2OBJFILES= \ - $(SLO)$/formatpaintbrushctrl.obj\ - $(SLO)$/colrctrl.obj \ - $(SLO)$/fillctrl.obj \ - $(SLO)$/grafctrl.obj \ - $(SLO)$/itemwin.obj \ - $(SLO)$/layctrl.obj \ - $(SLO)$/lboxctrl.obj \ - $(SLO)$/linectrl.obj \ - $(SLO)$/tbxalign.obj \ - $(SLO)$/tbxdrctl.obj \ - $(SLO)$/verttexttbxctrl.obj \ - $(SLO)$/subtoolboxcontrol.obj \ - $(SLO)$/tbxcolor.obj \ - $(SLO)$/tbunocontroller.obj \ - $(SLO)$/tbunosearchcontrollers.obj - -SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) - -SRS1NAME=$(TARGET) -SRC1FILES = \ - fontworkgallery.src \ - extrusioncontrols.src \ - colrctrl.src \ - lboxctrl.src \ - linectrl.src \ - tbcontrl.src \ - tbunosearchcontrollers.src \ - grafctrl.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svx/source/tbxctrls/subtoolboxcontrol.cxx b/svx/source/tbxctrls/subtoolboxcontrol.cxx index e2a7a535a77f..526f32434c2e 100644 --- a/svx/source/tbxctrls/subtoolboxcontrol.cxx +++ b/svx/source/tbxctrls/subtoolboxcontrol.cxx @@ -41,7 +41,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxSubToolBoxControl, SfxUInt16Item ); **********************************************************************/ -SvxSubToolBoxControl::SvxSubToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +SvxSubToolBoxControl::SvxSubToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index bd0a39200dd1..5a4362592738 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -103,11 +103,11 @@ #define DELETEZ(p) (delete (p), (p)=NULL) #endif // don't make more than 15 entries visible at once -#define MAX_STYLES_ENTRIES static_cast< USHORT >( 15 ) +#define MAX_STYLES_ENTRIES static_cast< sal_uInt16 >( 15 ) void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet ); void lcl_CalcSizeValueSet( Window &rWin, ValueSet &rValueSet, const Size &aItemSize ); -BOOL lcl_FontChangedHint( const SfxHint &rHint ); +sal_Bool lcl_FontChangedHint( const SfxHint &rHint ); // namespaces using ::rtl::OUString; @@ -138,12 +138,12 @@ class SvxStyleBox_Impl : public ComboBox { using Window::IsVisible; public: - SvxStyleBox_Impl( Window* pParent, USHORT nSlot, const OUString& rCommand, SfxStyleFamily eFamily, const Reference< XDispatchProvider >& rDispatchProvider, - const Reference< XFrame >& _xFrame,const String& rClearFormatKey, const String& rMoreKey, BOOL bInSpecialMode ); + SvxStyleBox_Impl( Window* pParent, sal_uInt16 nSlot, const OUString& rCommand, SfxStyleFamily eFamily, const Reference< XDispatchProvider >& rDispatchProvider, + const Reference< XFrame >& _xFrame,const String& rClearFormatKey, const String& rMoreKey, sal_Bool bInSpecialMode ); ~SvxStyleBox_Impl(); void SetFamily( SfxStyleFamily eNewFamily ); - inline BOOL IsVisible() { return bVisible; } + inline sal_Bool IsVisible() { return bVisible; } virtual long PreNotify( NotifyEvent& rNEvt ); virtual long Notify( NotifyEvent& rNEvt ); @@ -160,20 +160,20 @@ protected: virtual void Select(); private: - USHORT nSlotId; + sal_uInt16 nSlotId; SfxStyleFamily eStyleFamily; - USHORT nCurSel; - BOOL bRelease; + sal_uInt16 nCurSel; + sal_Bool bRelease; Size aLogicalSize; Link aVisibilityListener; - BOOL bVisible; + sal_Bool bVisible; Reference< XDispatchProvider > m_xDispatchProvider; Reference< XFrame > m_xFrame; OUString m_aCommand; String aClearFormatKey; String aMoreKey; String sDefaultStyle; - BOOL bInSpecialMode; + sal_Bool bInSpecialMode; void ReleaseFocus(); }; @@ -191,8 +191,8 @@ private: Font aCurFont; Size aLogicalSize; String aCurText; - USHORT nFtCount; - BOOL bRelease; + sal_uInt16 nFtCount; + sal_Bool bRelease; Reference< XDispatchProvider > m_xDispatchProvider; Reference< XFrame > m_xFrame; @@ -210,7 +210,7 @@ public: void FillList(); void Update( const SvxFontItem* pFontItem ); - USHORT GetListCount() { return nFtCount; } + sal_uInt16 GetListCount() { return nFtCount; } void Clear() { FontNameBox::Clear(); nFtCount = 0; } void Fill( const FontList* pList ) { FontNameBox::Fill( pList ); @@ -230,12 +230,12 @@ public: class SvxFrmValueSet_Impl : public ValueSet { - USHORT nModifier; + sal_uInt16 nModifier; virtual void MouseButtonUp( const MouseEvent& rMEvt ); public: SvxFrmValueSet_Impl(Window* pParent, WinBits nWinStyle) : ValueSet(pParent, nWinStyle), nModifier(0) {} - USHORT GetModifier() const {return nModifier;} + sal_uInt16 GetModifier() const {return nModifier;} }; @@ -260,24 +260,24 @@ private: protected: virtual void Resize(); - virtual BOOL Close(); + virtual sal_Bool Close(); virtual Window* GetPreferredKeyInputWindow(); virtual void GetFocus(); public: - SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ); + SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, Window* pParentWindow ); ~SvxFrameWindow_Impl(); void StartSelection(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual SfxPopupWindow* Clone() const; virtual void DataChanged( const DataChangedEvent& rDCEvt ); - inline BOOL IsHighContrast( void ) const; + inline sal_Bool IsHighContrast( void ) const; }; -inline BOOL SvxFrameWindow_Impl::IsHighContrast( void ) const +inline sal_Bool SvxFrameWindow_Impl::IsHighContrast( void ) const { return GetSettings().GetStyleSettings().GetHighContrastMode(); } @@ -292,20 +292,20 @@ private: bool m_bIsWriter; #if _SOLAR__PRIVATE - void MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& rSize, String& rStr, + void MakeLineBitmap( sal_uInt16 nNo, Bitmap& rBmp, const Size& rSize, String& rStr, const ::Color& rLine, const ::Color& rBack ); DECL_LINK( SelectHdl, void * ); #endif protected: virtual void Resize(); - virtual BOOL Close(); + virtual sal_Bool Close(); virtual Window* GetPreferredKeyInputWindow(); virtual void GetFocus(); virtual void DataChanged( const DataChangedEvent& rDCEvt ); void CreateBitmaps( void ); public: - SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ); + SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, Window* pParentWindow ); void StartSelection(); virtual SfxPopupWindow* Clone() const; @@ -322,12 +322,12 @@ class SfxStyleControllerItem_Impl : public SfxStatusListener { public: SfxStyleControllerItem_Impl( const Reference< XDispatchProvider >& rDispatchProvider, - USHORT nSlotId, + sal_uInt16 nSlotId, const rtl::OUString& rCommand, SvxStyleToolBoxControl& rTbxCtl ); protected: - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); private: SvxStyleToolBoxControl& rControl; @@ -339,21 +339,21 @@ class SfxStyleControllerItem_Impl : public SfxStatusListener SvxStyleBox_Impl::SvxStyleBox_Impl( Window* pParent, - USHORT nSlot, + sal_uInt16 nSlot, const rtl::OUString& rCommand, SfxStyleFamily eFamily, const Reference< XDispatchProvider >& rDispatchProvider, const Reference< XFrame >& _xFrame, const String& rClearFormatKey, const String& rMoreKey, - BOOL bInSpec) : + sal_Bool bInSpec) : ComboBox( pParent, SVX_RES( RID_SVXTBX_STYLE ) ), nSlotId ( nSlot ), eStyleFamily( eFamily ), - bRelease ( TRUE ), - bVisible(FALSE), + bRelease ( sal_True ), + bVisible(sal_False), m_xDispatchProvider( rDispatchProvider ), m_xFrame(_xFrame), m_aCommand ( rCommand ), @@ -362,7 +362,7 @@ SvxStyleBox_Impl::SvxStyleBox_Impl( bInSpecialMode ( bInSpec ) { aLogicalSize = PixelToLogic( GetSizePixel(), MAP_APPFONT ); - EnableAutocomplete( TRUE ); + EnableAutocomplete( sal_True ); } SvxStyleBox_Impl::~SvxStyleBox_Impl() @@ -375,7 +375,7 @@ void SvxStyleBox_Impl::ReleaseFocus() { if ( !bRelease ) { - bRelease = TRUE; + bRelease = sal_True; return; } if ( m_xFrame.is() && m_xFrame->getContainerWindow().is() ) @@ -463,7 +463,7 @@ void SvxStyleBox_Impl::SetFamily( SfxStyleFamily eNewFamily ) long SvxStyleBox_Impl::PreNotify( NotifyEvent& rNEvt ) { - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) nCurSel = GetSelectEntryPos(); @@ -484,7 +484,7 @@ long SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { - USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); + sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch ( nCode ) { @@ -492,7 +492,7 @@ long SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) case KEY_TAB: { if ( KEY_TAB == nCode ) - bRelease = FALSE; + bRelease = sal_False; else nHandled = 1; Select(); @@ -536,7 +536,7 @@ void SvxStyleBox_Impl::StateChanged( StateChangedType nStateChange ) } else if ( nStateChange == STATE_CHANGE_INITSHOW ) { - bVisible = TRUE; + bVisible = sal_True; if ( aVisibilityListener.IsSet() ) aVisibilityListener.Call( this ); } @@ -554,9 +554,9 @@ IMPL_STATIC_LINK( SvxStyleBox_Impl, FocusHdl_Impl, Control*, _pCtrl ) // ----------------------------------------------------------------------- -BOOL GetDocFontList_Impl( const FontList** ppFontList, SvxFontNameBox_Impl* pBox ) +sal_Bool GetDocFontList_Impl( const FontList** ppFontList, SvxFontNameBox_Impl* pBox ) { - BOOL bChanged = FALSE; + sal_Bool bChanged = sal_False; const SfxObjectShell* pDocSh = SfxObjectShell::Current(); SvxFontListItem* pFontListItem = NULL; @@ -568,7 +568,7 @@ BOOL GetDocFontList_Impl( const FontList** ppFontList, SvxFontNameBox_Impl* pBox ::std::auto_ptr<FontList> aFontList(new FontList( pBox )); *ppFontList = aFontList.get(); pBox->SetOwnFontList(aFontList); - bChanged = TRUE; + bChanged = sal_True; } if ( pFontListItem ) @@ -581,7 +581,7 @@ BOOL GetDocFontList_Impl( const FontList** ppFontList, SvxFontNameBox_Impl* pBox { // => "ubernehmen *ppFontList = pNewFontList; - bChanged = TRUE; + bChanged = sal_True; } else { @@ -634,7 +634,7 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( Window* pParent, const Reference< XDis pFontList ( NULL ), aLogicalSize ( 75,160 ), nFtCount ( 0 ), - bRelease ( TRUE ), + bRelease ( sal_True ), m_xDispatchProvider( rDispatchProvider ), m_xFrame (_xFrame) { @@ -674,7 +674,7 @@ void SvxFontNameBox_Impl::Update( const SvxFontItem* pFontItem ) long SvxFontNameBox_Impl::PreNotify( NotifyEvent& rNEvt ) { - USHORT nType = rNEvt.GetType(); + sal_uInt16 nType = rNEvt.GetType(); if ( EVENT_MOUSEBUTTONDOWN == nType || EVENT_GETFOCUS == nType ) { @@ -692,7 +692,7 @@ long SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { - USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); + sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch ( nCode ) { @@ -700,7 +700,7 @@ long SvxFontNameBox_Impl::Notify( NotifyEvent& rNEvt ) case KEY_TAB: { if ( KEY_TAB == nCode ) - bRelease = FALSE; + bRelease = sal_False; else nHandled = 1; Select(); @@ -743,7 +743,7 @@ void SvxFontNameBox_Impl::ReleaseFocus_Impl() { if ( !bRelease ) { - bRelease = TRUE; + bRelease = sal_True; return; } if ( m_xFrame.is() && m_xFrame->getContainerWindow().is() ) @@ -755,8 +755,8 @@ void SvxFontNameBox_Impl::ReleaseFocus_Impl() void SvxFontNameBox_Impl::EnableControls_Impl() { SvtFontOptions aFontOpt; - BOOL bEnable = aFontOpt.IsFontHistoryEnabled(); - USHORT nEntries = bEnable ? MAX_MRU_FONTNAME_ENTRIES : 0; + sal_Bool bEnable = aFontOpt.IsFontHistoryEnabled(); + sal_uInt16 nEntries = bEnable ? MAX_MRU_FONTNAME_ENTRIES : 0; if ( GetMaxMRUCount() != nEntries ) { // refill in the next GetFocus-Handler @@ -824,7 +824,7 @@ void SvxFontNameBox_Impl::Select() #define PALETTE_SIZE (PALETTE_X * PALETTE_Y) SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, - USHORT nSlotId, + sal_uInt16 nSlotId, const Reference< XFrame >& rFrame, const String& rWndTitle, Window* pParentWindow ) : @@ -839,7 +839,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, SfxObjectShell* pDocSh = SfxObjectShell::Current(); const SfxPoolItem* pItem = NULL; XColorTable* pColorTable = NULL; - BOOL bKillTable = FALSE; + sal_Bool bKillTable = sal_False; const Size aSize12( 13, 13 ); if ( pDocSh ) @@ -849,7 +849,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, if ( !pColorTable ) { pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() ); - bKillTable = TRUE; + bKillTable = sal_True; } if ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId || SID_BACKGROUND_COLOR == theSlotId ) @@ -934,7 +934,7 @@ SfxPopupWindow* SvxColorWindow_Impl::Clone() const IMPL_LINK( SvxColorWindow_Impl, SelectHdl, void *, EMPTYARG ) { - USHORT nItemId = aColorSet.GetSelectItemId(); + sal_uInt16 nItemId = aColorSet.GetSelectItemId(); SvxColorItem aColorItem( aColorSet.GetItemColor( nItemId ), theSlotId ); /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() calls. @@ -999,14 +999,14 @@ void SvxColorWindow_Impl::StartSelection() // ----------------------------------------------------------------------- -BOOL SvxColorWindow_Impl::Close() +sal_Bool SvxColorWindow_Impl::Close() { return SfxPopupWindow::Close(); } // ----------------------------------------------------------------------- -void SvxColorWindow_Impl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) +void SvxColorWindow_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { if (( SFX_ITEM_DISABLED != eState ) && pState ) { @@ -1053,7 +1053,7 @@ void SvxColorWindow_Impl::StateChanged( USHORT nSID, SfxItemState eState, const // class SvxFrameWindow_Impl -------------------------------------------------- //======================================================================== -SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) : +SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) : SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL ) ), aFrameSet ( this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ), @@ -1075,7 +1075,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& * abgeschaltet werden */ - USHORT i = 0; + sal_uInt16 i = 0; for ( i=1; i<9; i++ ) aFrameSet.InsertItem( i, aImgList.GetImage(i) ); @@ -1126,9 +1126,9 @@ void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { aImgList = ImageList( SVX_RES( IsHighContrast()? RID_SVXIL_FRAME_HC : RID_SVXIL_FRAME ) ); - USHORT nNumOfItems = aFrameSet.GetItemCount(); + sal_uInt16 nNumOfItems = aFrameSet.GetItemCount(); - for( USHORT i = 1 ; i <= nNumOfItems ; ++i ) + for( sal_uInt16 i = 1 ; i <= nNumOfItems ; ++i ) aFrameSet.SetItemImage( i, aImgList.GetImage( i ) ); } } @@ -1157,9 +1157,9 @@ IMPL_LINK( SvxFrameWindow_Impl, SelectHdl, void *, EMPTYARG ) *pRight = 0, *pTop = 0, *pBottom = 0; - USHORT nSel = aFrameSet.GetSelectItemId(); - USHORT nModifier = aFrameSet.GetModifier(); - BYTE nValidFlags = 0; + sal_uInt16 nSel = aFrameSet.GetSelectItemId(); + sal_uInt16 nModifier = aFrameSet.GetModifier(); + sal_uInt8 nValidFlags = 0; theDefLine.SetOutWidth( DEF_LINE_WIDTH_0 ); switch ( nSel ) @@ -1233,8 +1233,8 @@ IMPL_LINK( SvxFrameWindow_Impl, SelectHdl, void *, EMPTYARG ) aBorderInner.SetValid( VALID_RIGHT, 0 != (nValidFlags&FRM_VALID_RIGHT )); aBorderInner.SetValid( VALID_HORI, 0 != (nValidFlags&FRM_VALID_HINNER )); aBorderInner.SetValid( VALID_VERT, 0 != (nValidFlags&FRM_VALID_VINNER)); - aBorderInner.SetValid( VALID_DISTANCE, TRUE ); - aBorderInner.SetValid( VALID_DISABLE, FALSE ); + aBorderInner.SetValid( VALID_DISTANCE, sal_True ); + aBorderInner.SetValid( VALID_DISABLE, sal_False ); if ( IsInPopupMode() ) EndPopupMode(); @@ -1270,7 +1270,7 @@ void SvxFrameWindow_Impl::Resize() void SvxFrameWindow_Impl::StateChanged( - USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { if ( pState && nSID == SID_BORDER_REDUCED_MODE) @@ -1279,24 +1279,24 @@ void SvxFrameWindow_Impl::StateChanged( if ( pItem ) { - bParagraphMode = (BOOL)pItem->GetValue(); + bParagraphMode = (sal_Bool)pItem->GetValue(); //initial calls mustn't insert or remove elements if(aFrameSet.GetItemCount()) { - BOOL bTableMode = ( aFrameSet.GetItemCount() == 12 ); - BOOL bResize = FALSE; + sal_Bool bTableMode = ( aFrameSet.GetItemCount() == 12 ); + sal_Bool bResize = sal_False; if ( bTableMode && bParagraphMode ) { - for ( USHORT i = 9; i < 13; i++ ) + for ( sal_uInt16 i = 9; i < 13; i++ ) aFrameSet.RemoveItem(i); - bResize = TRUE; + bResize = sal_True; } else if ( !bTableMode && !bParagraphMode ) { - for ( USHORT i = 9; i < 13; i++ ) + for ( sal_uInt16 i = 9; i < 13; i++ ) aFrameSet.InsertItem( i, aImgList.GetImage(i) ); - bResize = TRUE; + bResize = sal_True; } if ( bResize ) @@ -1318,7 +1318,7 @@ void SvxFrameWindow_Impl::StartSelection() // ----------------------------------------------------------------------- -BOOL SvxFrameWindow_Impl::Close() +sal_Bool SvxFrameWindow_Impl::Close() { return SfxPopupWindow::Close(); } @@ -1327,7 +1327,7 @@ BOOL SvxFrameWindow_Impl::Close() // class SvxLineWindow_Impl -------------------------------------------------- //======================================================================== -SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) : +SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) : SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL ) ), @@ -1362,7 +1362,7 @@ SfxPopupWindow* SvxLineWindow_Impl::Clone() const // ----------------------------------------------------------------------- -void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& rSize, String& rStr, +void SvxLineWindow_Impl::MakeLineBitmap( sal_uInt16 nNo, Bitmap& rBmp, const Size& rSize, String& rStr, const ::Color& rLineCol, const ::Color& rBackCol ) { VirtualDevice aVirDev( *this ); @@ -1388,14 +1388,14 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 5; aRect.Bottom() = 6; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) DEF_LINE_WIDTH_1/20; + nLineWidth = (sal_uInt16) DEF_LINE_WIDTH_1/20; break; case 3: // DEF_LINE_WIDTH_2 aRect.Top() = 5; aRect.Bottom() = 7; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) DEF_LINE_WIDTH_2/20; + nLineWidth = (sal_uInt16) DEF_LINE_WIDTH_2/20; break; case 4: // DEF_LINE_WIDTH_3 @@ -1403,14 +1403,14 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Bottom() = 7; aVirDev.DrawRect( aRect ); aVirDev.DrawRect( Rectangle( Point(2,4), Point(37,7) ) ); - nLineWidth = (USHORT) DEF_LINE_WIDTH_3/20; + nLineWidth = (sal_uInt16) DEF_LINE_WIDTH_3/20; break; case 5: // DEF_LINE_WIDTH_4 aRect.Top() = 4; aRect.Bottom() = 8; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) DEF_LINE_WIDTH_4/20; + nLineWidth = (sal_uInt16) DEF_LINE_WIDTH_4/20; break; case 6: // DEF_DOUBLE_LINE0 @@ -1420,7 +1420,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 7; aRect.Bottom() = 7; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE0_OUT+DEF_DOUBLE_LINE0_IN+DEF_DOUBLE_LINE0_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE0_OUT+DEF_DOUBLE_LINE0_IN+DEF_DOUBLE_LINE0_DIST)/20; break; case 7: // DEF_DOUBLE_LINE7 @@ -1430,7 +1430,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 7; aRect.Bottom() = 7; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE7_OUT+DEF_DOUBLE_LINE7_IN+DEF_DOUBLE_LINE7_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE7_OUT+DEF_DOUBLE_LINE7_IN+DEF_DOUBLE_LINE7_DIST)/20; break; case 8: // DEF_DOUBLE_LINE1 @@ -1440,7 +1440,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 7; aRect.Bottom() = 8; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE1_OUT+DEF_DOUBLE_LINE1_IN+DEF_DOUBLE_LINE1_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE1_OUT+DEF_DOUBLE_LINE1_IN+DEF_DOUBLE_LINE1_DIST)/20; break; case 9: // DEF_DOUBLE_LINE2 @@ -1450,7 +1450,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 8; aRect.Bottom() = 10; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE2_OUT+DEF_DOUBLE_LINE2_IN+DEF_DOUBLE_LINE2_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE2_OUT+DEF_DOUBLE_LINE2_IN+DEF_DOUBLE_LINE2_DIST)/20; break; case 10: // DEF_DOUBLE_LINE8 @@ -1460,7 +1460,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 7; aRect.Bottom() = 7; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE8_OUT+DEF_DOUBLE_LINE8_IN+DEF_DOUBLE_LINE8_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE8_OUT+DEF_DOUBLE_LINE8_IN+DEF_DOUBLE_LINE8_DIST)/20; break; case 11: // DEF_DOUBLE_LINE9 @@ -1470,7 +1470,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 8; aRect.Bottom() = 8; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE9_OUT+DEF_DOUBLE_LINE9_IN+DEF_DOUBLE_LINE9_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE9_OUT+DEF_DOUBLE_LINE9_IN+DEF_DOUBLE_LINE9_DIST)/20; break; case 12: // DEF_DOUBLE_LINE10 @@ -1480,7 +1480,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 8; aRect.Bottom() = 8; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE10_OUT+DEF_DOUBLE_LINE10_IN+DEF_DOUBLE_LINE10_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE10_OUT+DEF_DOUBLE_LINE10_IN+DEF_DOUBLE_LINE10_DIST)/20; break; case 13: // DEF_DOUBLE_LINE3 @@ -1490,7 +1490,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 7; aRect.Bottom() = 7; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE3_OUT+DEF_DOUBLE_LINE3_IN+DEF_DOUBLE_LINE3_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE3_OUT+DEF_DOUBLE_LINE3_IN+DEF_DOUBLE_LINE3_DIST)/20; break; case 14: // DEF_DOUBLE_LINE4 @@ -1500,7 +1500,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 6; aRect.Bottom() = 7; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE4_OUT+DEF_DOUBLE_LINE4_IN+DEF_DOUBLE_LINE4_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE4_OUT+DEF_DOUBLE_LINE4_IN+DEF_DOUBLE_LINE4_DIST)/20; break; case 15: // DEF_DOUBLE_LINE5 @@ -1510,7 +1510,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 8; aRect.Bottom() = 9; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE5_OUT+DEF_DOUBLE_LINE5_IN+DEF_DOUBLE_LINE5_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE5_OUT+DEF_DOUBLE_LINE5_IN+DEF_DOUBLE_LINE5_DIST)/20; break; case 16: // DEF_DOUBLE_LINE6 @@ -1520,7 +1520,7 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aRect.Top() = 7; aRect.Bottom() = 9; aVirDev.DrawRect( aRect ); - nLineWidth = (USHORT) (DEF_DOUBLE_LINE6_OUT+DEF_DOUBLE_LINE6_IN+DEF_DOUBLE_LINE6_DIST)/20; + nLineWidth = (sal_uInt16) (DEF_DOUBLE_LINE6_OUT+DEF_DOUBLE_LINE6_IN+DEF_DOUBLE_LINE6_DIST)/20; break; default: @@ -1539,10 +1539,10 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG ) { SvxLineItem aLineItem( SID_FRAME_LINESTYLE ); - USHORT n1 = 0, + sal_uInt16 n1 = 0, n2 = 0, n3 = 0; - BOOL bSetLine = TRUE; + sal_Bool bSetLine = sal_True; switch ( aLineSet.GetSelectItemId() ) { @@ -1587,7 +1587,7 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG ) n3 = DEF_DOUBLE_LINE6_DIST; break; case 0: default: - bSetLine = FALSE; + bSetLine = sal_False; break; } if ( bSetLine ) @@ -1634,7 +1634,7 @@ void SvxLineWindow_Impl::StartSelection() // ----------------------------------------------------------------------- -BOOL SvxLineWindow_Impl::Close() +sal_Bool SvxLineWindow_Impl::Close() { return SfxPopupWindow::Close(); } @@ -1676,7 +1676,7 @@ void SvxLineWindow_Impl::CreateBitmaps( void ) ::Color aBackCol( rStyleSettings.GetWindowColor() ); aLineSet.Clear(); - for( USHORT i = 1 ; i < 17 ; ++i ) + for( sal_uInt16 i = 1 ; i < 17 ; ++i ) { MakeLineBitmap( i, aBmp, aBmpSize, aStr, aLineCol, aBackCol ); aLineSet.InsertItem( i, aBmp, aStr ); @@ -1694,7 +1694,7 @@ void SvxLineWindow_Impl::CreateBitmaps( void ) SfxStyleControllerItem_Impl::SfxStyleControllerItem_Impl( const Reference< XDispatchProvider >& rDispatchProvider, - USHORT nSlotId, // Family-ID + sal_uInt16 nSlotId, // Family-ID const rtl::OUString& rCommand, // .uno: command bound to this item SvxStyleToolBoxControl& rTbxCtl ) // Controller-Instanz, dem dieses Item zugeordnet ist. : SfxStatusListener( rDispatchProvider, nSlotId, rCommand ), @@ -1705,7 +1705,7 @@ SfxStyleControllerItem_Impl::SfxStyleControllerItem_Impl( // ----------------------------------------------------------------------- void SfxStyleControllerItem_Impl::StateChanged( - USHORT, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { switch ( GetId() ) { @@ -1715,7 +1715,7 @@ void SfxStyleControllerItem_Impl::StateChanged( case SID_STYLE_FAMILY4: case SID_STYLE_FAMILY5: { - const USHORT nIdx = GetId() - SID_STYLE_FAMILY_START; + const sal_uInt16 nIdx = GetId() - SID_STYLE_FAMILY_START; if ( SFX_ITEM_AVAILABLE == eState ) { @@ -1742,16 +1742,16 @@ struct SvxStyleToolBoxControl::Impl String aClearForm; String aMore; ::std::vector< ::rtl::OUString > aDefaultStyles; - BOOL bListening; - BOOL bSpecModeWriter; - BOOL bSpecModeCalc; + sal_Bool bListening; + sal_Bool bSpecModeWriter; + sal_Bool bSpecModeCalc; inline Impl( void ) :aClearForm ( SVX_RESSTR( RID_SVXSTR_CLEARFORM ) ) ,aMore ( SVX_RESSTR( RID_SVXSTR_MORE ) ) - ,bListening ( FALSE ) - ,bSpecModeWriter ( FALSE ) - ,bSpecModeCalc ( FALSE ) + ,bListening ( sal_False ) + ,bSpecModeWriter ( sal_False ) + ,bSpecModeCalc ( sal_False ) { @@ -1848,14 +1848,14 @@ static const char* StyleSlotToStyleCommand[MAX_FAMILIES] = }; SvxStyleToolBoxControl::SvxStyleToolBoxControl( - USHORT nSlotId, USHORT nId, ToolBox& rTbx ) + sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl ( nSlotId, nId, rTbx ), pStyleSheetPool ( NULL ), nActFamily ( 0xffff ), - bListening ( FALSE ), + bListening ( sal_False ), pImpl ( new Impl ) { - for ( USHORT i=0; i<MAX_FAMILIES; i++ ) + for ( sal_uInt16 i=0; i<MAX_FAMILIES; i++ ) { pBoundItems[i] = 0; m_xBoundItems[i] = Reference< XComponent >(); @@ -1880,7 +1880,7 @@ throw ( Exception, RuntimeException) { pImpl->InitializeStyles(m_xFrame->getController()->getModel()); Reference< XDispatchProvider > xDispatchProvider( m_xFrame->getController(), UNO_QUERY ); - for ( USHORT i=0; i<MAX_FAMILIES; i++ ) + for ( sal_uInt16 i=0; i<MAX_FAMILIES; i++ ) { pBoundItems[i] = new SfxStyleControllerItem_Impl( xDispatchProvider, SID_STYLE_FAMILY_START + i, @@ -1898,7 +1898,7 @@ throw (::com::sun::star::uno::RuntimeException) { SfxToolBoxControl::dispose(); - for( USHORT i=0; i<MAX_FAMILIES; i++ ) + for( sal_uInt16 i=0; i<MAX_FAMILIES; i++ ) { if ( m_xBoundItems[i].is() ) { @@ -1964,10 +1964,10 @@ void SvxStyleToolBoxControl::FillStyleBox() if ( pStyleSheetPool && pBox && nActFamily!=0xffff ) { const SfxStyleFamily eFamily = GetActFamily(); - USHORT nCount = pStyleSheetPool->Count(); - USHORT i = 0; + sal_uInt16 nCount = pStyleSheetPool->Count(); + sal_uInt16 i = 0; SfxStyleSheetBase* pStyle = NULL; - BOOL bDoFill = FALSE; + sal_Bool bDoFill = sal_False; pStyleSheetPool->SetSearchMask( eFamily, SFXSTYLEBIT_USED ); @@ -1980,7 +1980,7 @@ void SvxStyleToolBoxControl::FillStyleBox() //!!! so the list doesn't show the count if ( nCount != pBox->GetEntryCount() ) { - bDoFill = TRUE; + bDoFill = sal_True; } else { @@ -1994,11 +1994,11 @@ void SvxStyleToolBoxControl::FillStyleBox() if ( bDoFill ) { - pBox->SetUpdateMode( FALSE ); + pBox->SetUpdateMode( sal_False ); pBox->Clear(); { - USHORT _i; + sal_uInt16 _i; sal_uInt32 nCnt = pImpl->aDefaultStyles.size(); bool bInsert; @@ -2038,9 +2038,9 @@ void SvxStyleToolBoxControl::FillStyleBox() if( pImpl->bSpecModeWriter || pImpl->bSpecModeCalc ) { // insert default styles - USHORT _i; + sal_uInt16 _i; sal_uInt32 nCnt = pImpl->aDefaultStyles.size(); - USHORT nPos = 1; + sal_uInt16 nPos = 1; for( _i = 0 ; _i < nCnt ; ++_i ) { pBox->InsertEntry( pImpl->aDefaultStyles[_i], nPos ); @@ -2062,10 +2062,10 @@ void SvxStyleToolBoxControl::FillStyleBox() pBox->SetStyle( nWinBits ); } - pBox->SetUpdateMode( TRUE ); + pBox->SetUpdateMode( sal_True ); pBox->SetFamily( eFamily ); - USHORT nLines = Min( pBox->GetEntryCount(), MAX_STYLES_ENTRIES ); + sal_uInt16 nLines = Min( pBox->GetEntryCount(), MAX_STYLES_ENTRIES ); pBox->SetDropDownLineCount( nLines ); } } @@ -2105,7 +2105,7 @@ void SvxStyleToolBoxControl::Update() if ( pDocShell ) pPool = pDocShell->GetStyleSheetPool(); - USHORT i; + sal_uInt16 i; for ( i=0; i<MAX_FAMILIES; i++ ) if( pFamilyState[i] ) break; @@ -2149,7 +2149,7 @@ void SvxStyleToolBoxControl::Update() // ----------------------------------------------------------------------- -void SvxStyleToolBoxControl::SetFamilyState( USHORT nIdx, +void SvxStyleToolBoxControl::SetFamilyState( sal_uInt16 nIdx, const SfxTemplateItem* pItem ) { DELETEZ( pFamilyState[nIdx] ); @@ -2165,7 +2165,7 @@ void SvxStyleToolBoxControl::SetFamilyState( USHORT nIdx, IMPL_LINK( SvxStyleToolBoxControl, VisibilityNotification, void*, EMPTYARG ) { - USHORT i; + sal_uInt16 i; // Call ReBind() && UnBind() according to visibility SvxStyleBox_Impl* pBox = (SvxStyleBox_Impl*)( GetToolBox().GetItemWindow( GetId() )); @@ -2190,10 +2190,10 @@ IMPL_LINK( SvxStyleToolBoxControl, VisibilityNotification, void*, EMPTYARG ) void SvxStyleToolBoxControl::StateChanged( - USHORT , SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 , SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); SvxStyleBox_Impl* pBox = (SvxStyleBox_Impl*)(rTbx.GetItemWindow( nId )); TriState eTri = STATE_NOCHECK; @@ -2252,8 +2252,8 @@ Window* SvxStyleToolBoxControl::CreateItemWindow( Window *pParent ) //======================================================================== SvxFontNameToolBoxControl::SvxFontNameToolBoxControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) @@ -2264,10 +2264,10 @@ SvxFontNameToolBoxControl::SvxFontNameToolBoxControl( void SvxFontNameToolBoxControl::StateChanged( - USHORT , SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 , SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); SvxFontNameBox_Impl* pBox = (SvxFontNameBox_Impl*)(rTbx.GetItemWindow( nId )); @@ -2313,8 +2313,8 @@ Window* SvxFontNameToolBoxControl::CreateItemWindow( Window *pParent ) //======================================================================== SvxFontColorToolBoxControl::SvxFontColorToolBoxControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), @@ -2361,10 +2361,10 @@ SfxPopupWindow* SvxFontColorToolBoxControl::CreatePopupWindow() void SvxFontColorToolBoxControl::StateChanged( - USHORT , SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 , SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); const SvxColorItem* pItem = 0; @@ -2382,7 +2382,7 @@ void SvxFontColorToolBoxControl::StateChanged( // class SvxColorToolBoxControl -------------------------------- //======================================================================== -SvxColorToolBoxControl::SvxColorToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxColorToolBoxControl::SvxColorToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { @@ -2412,7 +2412,7 @@ SfxPopupWindowType SvxColorToolBoxControl::GetPopupWindowType() const SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow() { - USHORT nResId = GetSlotId() == SID_BACKGROUND_COLOR ? + sal_uInt16 nResId = GetSlotId() == SID_BACKGROUND_COLOR ? RID_SVXSTR_BACKGROUND : RID_SVXSTR_COLOR; SvxColorWindow_Impl* pColorWin = new SvxColorWindow_Impl( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:BackgroundColor" )), @@ -2432,7 +2432,7 @@ SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow() void SvxColorToolBoxControl::StateChanged( - USHORT , SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 , SfxItemState eState, const SfxPoolItem* pState ) { const SvxColorItem* pItem = 0; @@ -2442,7 +2442,7 @@ void SvxColorToolBoxControl::StateChanged( if ( pItem ) pBtnUpdater->Update( pItem->GetValue() ); - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); @@ -2453,8 +2453,8 @@ void SvxColorToolBoxControl::StateChanged( //======================================================================== SvxFontColorExtToolBoxControl::SvxFontColorExtToolBoxControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), @@ -2467,7 +2467,7 @@ SvxFontColorExtToolBoxControl::SvxFontColorExtToolBoxControl( else addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharBackgroundExt" ))); - USHORT nMode = SID_ATTR_CHAR_COLOR2 == nSlotId + sal_uInt16 nMode = SID_ATTR_CHAR_COLOR2 == nSlotId ? TBX_UPDATER_MODE_CHAR_COLOR_NEW : TBX_UPDATER_MODE_CHAR_COLOR_NEW; pBtnUpdater = new ::svx::ToolboxButtonColorUpdater( nSlotId, nId, &GetToolBox(), nMode ); } @@ -2512,10 +2512,10 @@ SfxPopupWindow* SvxFontColorExtToolBoxControl::CreatePopupWindow() void SvxFontColorExtToolBoxControl::StateChanged( - USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); const SvxColorItem* pItem = 0; @@ -2541,7 +2541,7 @@ void SvxFontColorExtToolBoxControl::StateChanged( // ----------------------------------------------------------------------- -void SvxFontColorExtToolBoxControl::Select( BOOL ) +void SvxFontColorExtToolBoxControl::Select( sal_Bool ) { OUString aCommand; OUString aParamName; @@ -2567,8 +2567,8 @@ void SvxFontColorExtToolBoxControl::Select( BOOL ) //======================================================================== SvxFrameToolBoxControl::SvxFrameToolBoxControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) @@ -2601,10 +2601,10 @@ SfxPopupWindow* SvxFrameToolBoxControl::CreatePopupWindow() void SvxFrameToolBoxControl::StateChanged( - USHORT, SfxItemState eState, const SfxPoolItem* ) + sal_uInt16, SfxItemState eState, const SfxPoolItem* ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); @@ -2618,8 +2618,8 @@ void SvxFrameToolBoxControl::StateChanged( //======================================================================== SvxFrameLineStyleToolBoxControl::SvxFrameLineStyleToolBoxControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) @@ -2639,7 +2639,7 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow() { SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() ); - pLineWin->StartPopupMode( &GetToolBox(), TRUE ); + pLineWin->StartPopupMode( &GetToolBox(), sal_True ); pLineWin->StartSelection(); SetPopupWindow( pLineWin ); @@ -2650,9 +2650,9 @@ SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow() void SvxFrameLineStyleToolBoxControl::StateChanged( - USHORT , SfxItemState eState, const SfxPoolItem* ) + sal_uInt16 , SfxItemState eState, const SfxPoolItem* ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); @@ -2666,8 +2666,8 @@ void SvxFrameLineStyleToolBoxControl::StateChanged( //======================================================================== SvxFrameLineColorToolBoxControl::SvxFrameLineColorToolBoxControl( - USHORT nSlotId, - USHORT nId, + sal_uInt16 nSlotId, + sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), @@ -2713,10 +2713,10 @@ SfxPopupWindow* SvxFrameLineColorToolBoxControl::CreatePopupWindow() void SvxFrameLineColorToolBoxControl::StateChanged( - USHORT , SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 , SfxItemState eState, const SfxPoolItem* pState ) { - USHORT nId = GetId(); + sal_uInt16 nId = GetId(); ToolBox& rTbx = GetToolBox(); rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); @@ -2753,7 +2753,7 @@ public: // ----------------------------------------------------------------------- -SvxReloadControllerItem::SvxReloadControllerItem( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +SvxReloadControllerItem::SvxReloadControllerItem( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) , pImpl( new SvxReloadControllerItem_Impl ) { @@ -2770,7 +2770,7 @@ SvxReloadControllerItem::~SvxReloadControllerItem() // ----------------------------------------------------------------------- void SvxReloadControllerItem::StateChanged( - USHORT , SfxItemState eState, const SfxPoolItem* pState ) + sal_uInt16 , SfxItemState eState, const SfxPoolItem* pState ) { SfxBoolItem* pItem = PTR_CAST( SfxBoolItem, pState ); ToolBox& rBox = GetToolBox(); @@ -2787,7 +2787,7 @@ void SvxReloadControllerItem::StateChanged( // class SvxSimpleUndoRedoController ------------------------------------- //======================================================================== -SvxSimpleUndoRedoController::SvxSimpleUndoRedoController( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) +SvxSimpleUndoRedoController::SvxSimpleUndoRedoController( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :SfxToolBoxControl( nSlotId, nId, rTbx ) { aDefaultText = rTbx.GetItemText( nId ); @@ -2801,7 +2801,7 @@ SvxSimpleUndoRedoController::~SvxSimpleUndoRedoController() // ----------------------------------------------------------------------- -void SvxSimpleUndoRedoController::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* pState ) +void SvxSimpleUndoRedoController::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { SfxStringItem* pItem = PTR_CAST( SfxStringItem, pState ); ToolBox& rBox = GetToolBox(); @@ -2837,7 +2837,7 @@ void lcl_CalcSizeValueSet( Window &rWin, ValueSet &rValueSet, const Size &aItemS // ----------------------------------------------------------------------- -BOOL lcl_FontChangedHint( const SfxHint &rHint ) +sal_Bool lcl_FontChangedHint( const SfxHint &rHint ) { SfxPoolItemHint *pItemHint = PTR_CAST(SfxPoolItemHint, &rHint); if ( pItemHint ) diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index d9d2dc3e44df..bbb00d0085a0 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -72,7 +72,7 @@ private: FontHeightToolBoxControl* m_pCtrl; String m_aCurText; Size m_aLogicalSize; - BOOL m_bRelease; + sal_Bool m_bRelease; uno::Reference< frame::XDispatchProvider > m_xDispatchProvider; uno::Reference< frame::XFrame > m_xFrame; uno::Reference< awt::XWindow > m_xOldFocusWindow; @@ -94,7 +94,7 @@ SvxFontSizeBox_Impl::SvxFontSizeBox_Impl( m_pCtrl ( &_rCtrl ), m_aLogicalSize ( 30,100 ), - m_bRelease ( TRUE ), + m_bRelease ( sal_True ), m_xDispatchProvider ( _rDispatchProvider ), m_xFrame ( _xFrame ) { @@ -109,7 +109,7 @@ void SvxFontSizeBox_Impl::ReleaseFocus_Impl() { if ( !m_bRelease ) { - m_bRelease = TRUE; + m_bRelease = sal_True; return; } @@ -197,7 +197,7 @@ long SvxFontSizeBox_Impl::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_KEYINPUT ) { - USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); + sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); switch ( nCode ) { @@ -205,7 +205,7 @@ long SvxFontSizeBox_Impl::Notify( NotifyEvent& rNEvt ) case KEY_TAB: { if ( KEY_TAB == nCode ) - m_bRelease = FALSE; + m_bRelease = sal_False; else nHandled = 1; Select(); diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index e446d3d3b9d5..f2926c38aa5b 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -96,14 +96,14 @@ void FindTextFieldControl::InitControls_Impl() SetText( SVX_RESSTR( RID_SVXSTR_FINDBAR_FIND ) ); SetControlForeground(GetSettings().GetStyleSettings().GetDisableColor()); - EnableAutocomplete(TRUE, TRUE); + EnableAutocomplete(sal_True, sal_True); } void FindTextFieldControl::Remember_Impl(const String& rStr) { - USHORT nCount = GetEntryCount(); + sal_uInt16 nCount = GetEntryCount(); - for (USHORT i=0; i<nCount; ++i) + for (sal_uInt16 i=0; i<nCount; ++i) { if ( rStr == GetEntry(i)) return; @@ -357,8 +357,8 @@ void SAL_CALL FindTextToolbarController::initialize( const css::uno::Sequence< : ToolBox* pToolBox = (ToolBox*)pWindow; if ( pToolBox ) { - USHORT nItemCount = pToolBox->GetItemCount(); - for ( USHORT i=0; i<nItemCount; ++i ) + sal_uInt16 nItemCount = pToolBox->GetItemCount(); + for ( sal_uInt16 i=0; i<nItemCount; ++i ) { ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); if ( sItemCommand.equals( COMMAND_DOWNSEARCH ) ) @@ -528,8 +528,8 @@ void SAL_CALL DownSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) ToolBox* pToolBox = (ToolBox*)pWindow; if ( pToolBox ) { - USHORT nItemCount = pToolBox->GetItemCount(); - for ( USHORT i=0; i<nItemCount; ++i ) + sal_uInt16 nItemCount = pToolBox->GetItemCount(); + for ( sal_uInt16 i=0; i<nItemCount; ++i ) { ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) @@ -657,8 +657,8 @@ void SAL_CALL UpSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) th ToolBox* pToolBox = (ToolBox*)pWindow; if ( pToolBox ) { - USHORT nItemCount = pToolBox->GetItemCount(); - for ( USHORT i=0; i<nItemCount; ++i ) + sal_uInt16 nItemCount = pToolBox->GetItemCount(); + for ( sal_uInt16 i=0; i<nItemCount; ++i ) { ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); if ( sItemCommand.equals( COMMAND_FINDTEXT ) ) @@ -815,8 +815,8 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css ToolBox* pToolBox = (ToolBox*)pWindow; if ( pToolBox ) { - USHORT nItemCount = pToolBox->GetItemCount(); - for ( USHORT i=0; i<nItemCount; ++i ) + sal_uInt16 nItemCount = pToolBox->GetItemCount(); + for ( sal_uInt16 i=0; i<nItemCount; ++i ) { ::rtl::OUString sItemCommand = pToolBox->GetItemCommand(i); if ( sItemCommand.equalsAscii(".uno:FindText") ) diff --git a/svx/source/tbxctrls/tbxalign.cxx b/svx/source/tbxctrls/tbxalign.cxx index e0bcd03b62fc..8b509fdafc50 100644 --- a/svx/source/tbxctrls/tbxalign.cxx +++ b/svx/source/tbxctrls/tbxalign.cxx @@ -53,7 +53,7 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxTbxCtlAlign, SfxAllEnumItem); |* \************************************************************************/ -SvxTbxCtlAlign::SvxTbxCtlAlign( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxTbxCtlAlign::SvxTbxCtlAlign( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) , m_aSubTbName( RTL_CONSTASCII_USTRINGPARAM( "alignmentbar" )) , m_aSubTbResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/alignmentbar" )) diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index dd96799af0fd..e218f01fac0e 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -47,10 +47,10 @@ namespace svx //==================================================================== ToolboxButtonColorUpdater::ToolboxButtonColorUpdater( - USHORT nId, - USHORT nTbxBtnId, + sal_uInt16 nId, + sal_uInt16 nTbxBtnId, ToolBox* ptrTbx, - USHORT nMode ) : + sal_uInt16 nMode ) : mnDrawMode ( nMode ), mnBtnId ( nTbxBtnId ), mnSlotId ( nId ), @@ -60,7 +60,7 @@ namespace svx if (mnSlotId == SID_BACKGROUND_COLOR) mnDrawMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW; DBG_ASSERT( ptrTbx, "ToolBox not found :-(" ); - mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ) : FALSE; + mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ) : sal_False; Update(mnSlotId == SID_ATTR_CHAR_COLOR2 ? COL_BLACK : COL_GRAY); } diff --git a/svx/source/tbxctrls/tbxdrctl.cxx b/svx/source/tbxctrls/tbxdrctl.cxx index 34969ca00bc2..5943d6d0286d 100644 --- a/svx/source/tbxctrls/tbxdrctl.cxx +++ b/svx/source/tbxctrls/tbxdrctl.cxx @@ -55,7 +55,7 @@ using namespace ::com::sun::star::frame; // ----------------------------------------------------------------------- -SvxTbxCtlDraw::SvxTbxCtlDraw( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxTbxCtlDraw::SvxTbxCtlDraw( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), @@ -68,7 +68,7 @@ SvxTbxCtlDraw::SvxTbxCtlDraw( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : // ----------------------------------------------------------------------- -void SvxTbxCtlDraw::StateChanged( USHORT nSID, SfxItemState eState, +void SvxTbxCtlDraw::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { GetToolBox().EnableItem( GetId(), ( eState != SFX_ITEM_DISABLED ) ); @@ -94,7 +94,7 @@ void SvxTbxCtlDraw::toggleToolbox() Reference< XLayoutManager > xLayoutMgr = getLayoutManager(); if ( xLayoutMgr.is() ) { - BOOL bCheck = FALSE; + sal_Bool bCheck = sal_False; if ( xLayoutMgr->isElementVisible( m_sToolboxName ) ) { xLayoutMgr->hideElement( m_sToolboxName ); @@ -102,7 +102,7 @@ void SvxTbxCtlDraw::toggleToolbox() } else { - bCheck = TRUE; + bCheck = sal_True; xLayoutMgr->createElement( m_sToolboxName ); xLayoutMgr->showElement( m_sToolboxName ); } @@ -113,7 +113,7 @@ void SvxTbxCtlDraw::toggleToolbox() // ----------------------------------------------------------------------- -void SvxTbxCtlDraw::Select( BOOL ) +void SvxTbxCtlDraw::Select( sal_Bool ) { toggleToolbox(); } diff --git a/svx/source/tbxctrls/verttexttbxctrl.cxx b/svx/source/tbxctrls/verttexttbxctrl.cxx index 14ffdc778361..6f437dfb791e 100644 --- a/svx/source/tbxctrls/verttexttbxctrl.cxx +++ b/svx/source/tbxctrls/verttexttbxctrl.cxx @@ -42,22 +42,22 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxVertTextTbxCtrl, SfxBoolItem); // -----------------------------27.04.01 15:50-------------------------------- -SvxCTLTextTbxCtrl::SvxCTLTextTbxCtrl(USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxCTLTextTbxCtrl::SvxCTLTextTbxCtrl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxVertCTLTextTbxCtrl( nSlotId, nId, rTbx ) { - SetVert(FALSE); + SetVert(sal_False); addStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CTLFontState" ))); } -SvxVertTextTbxCtrl::SvxVertTextTbxCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxVertTextTbxCtrl::SvxVertTextTbxCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxVertCTLTextTbxCtrl( nSlotId, nId, rTbx ) { - SetVert(TRUE); + SetVert(sal_True); addStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:VerticalTextState" ))); } /* ---------------------------------------------------------------------------*/ -SvxVertCTLTextTbxCtrl::SvxVertCTLTextTbxCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : +SvxVertCTLTextTbxCtrl::SvxVertCTLTextTbxCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ), bCheckVertical(sal_True) { @@ -73,13 +73,13 @@ SvxVertCTLTextTbxCtrl::~SvxVertCTLTextTbxCtrl( ) ---------------------------------------------------------------------------*/ void SvxVertCTLTextTbxCtrl::StateChanged( - USHORT nSID, + sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) { SvtLanguageOptions aLangOptions; - BOOL bCalc = sal_False; - BOOL bVisible = GetToolBox().IsItemVisible(GetId()); + sal_Bool bCalc = sal_False; + sal_Bool bVisible = GetToolBox().IsItemVisible(GetId()); sal_Bool bEnabled = sal_False; if ( nSID == SID_VERTICALTEXT_STATE ) bEnabled = aLangOptions.IsVerticalTextEnabled(); @@ -95,7 +95,7 @@ void SvxVertCTLTextTbxCtrl::StateChanged( { if(!bVisible) { - GetToolBox().ShowItem( GetId(), TRUE ); + GetToolBox().ShowItem( GetId(), sal_True ); bCalc = sal_True; } } |