summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/colrctrl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/tbxctrls/colrctrl.cxx')
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx50
1 files changed, 25 insertions, 25 deletions
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: