summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/dockwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog/dockwin.cxx')
-rw-r--r--sfx2/source/dialog/dockwin.cxx210
1 files changed, 105 insertions, 105 deletions
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 4f55dfde21a7..76bd38377eb8 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -75,7 +75,7 @@ class SfxTitleDockingWindow;
class SfxTitleDockingWindow : public SfxDockingWindow
{
Window* m_pWrappedWindow;
- USHORT m_nID;
+ sal_uInt16 m_nID;
public:
SfxTitleDockingWindow(
@@ -83,7 +83,7 @@ public:
SfxChildWindow* pChildWin ,
Window* pParent ,
WinBits nBits,
- USHORT nID);
+ sal_uInt16 nID);
virtual ~SfxTitleDockingWindow();
Window* GetWrappedWindow() const { return m_pWrappedWindow; }
@@ -93,7 +93,7 @@ public:
virtual long Notify( NotifyEvent& rNEvt );
virtual void Resize();
virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual sal_Bool Close();
};
namespace
@@ -138,7 +138,7 @@ static bool lcl_getWindowState( const uno::Reference< container::XNameAccess >&
}
SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
- USHORT nId ,
+ sal_uInt16 nId ,
SfxBindings* pBindings ,
SfxChildWinInfo* pInfo )
: SfxChildWindow( pParentWnd , nId )
@@ -242,7 +242,7 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
pWindow->SetOutputSizePixel( Size( 270, 240 ) );
( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
}
SfxChildWindow* SfxDockingWrapper::CreateImpl(
@@ -262,7 +262,7 @@ void SfxDockingWrapper::RegisterChildWindow (sal_Bool bVis, SfxModule *pMod, sal
// pre-register a couple of docking windows
for (int i=0; i < NUM_OF_DOCKINGWINDOWS; i++ )
{
- USHORT nID = USHORT(SID_DOCKWIN_START+i);
+ sal_uInt16 nID = sal_uInt16(SID_DOCKWIN_START+i);
SfxChildWinFactory *pFact = new SfxChildWinFactory( SfxDockingWrapper::CreateImpl, nID, 0xffff );
pFact->aInfo.nFlags |= nFlags;
pFact->aInfo.bVisible = bVis;
@@ -281,7 +281,7 @@ SfxTitleDockingWindow::SfxTitleDockingWindow( SfxBindings* pBind ,
SfxChildWindow* pChildWin ,
Window* pParent ,
WinBits nBits,
- USHORT nID ) :
+ sal_uInt16 nID ) :
SfxDockingWindow( pBind ,
pChildWin ,
pParent ,
@@ -341,7 +341,7 @@ void SfxTitleDockingWindow::Resizing( Size &rSize )
m_pWrappedWindow->SetSizePixel( GetOutputSizePixel() );
}
-BOOL SfxTitleDockingWindow::Close()
+sal_Bool SfxTitleDockingWindow::Close()
{
return SfxDockingWindow::Close();
}
@@ -351,9 +351,9 @@ namespace
struct ChildrenRegisteredMap : public rtl::Static< bool, ChildrenRegisteredMap > {};
}
-static bool lcl_checkDockingWindowID( USHORT nID )
+static bool lcl_checkDockingWindowID( sal_uInt16 nID )
{
- if (nID < SID_DOCKWIN_START || nID >= USHORT(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS))
+ if (nID < SID_DOCKWIN_START || nID >= sal_uInt16(SID_DOCKWIN_START+NUM_OF_DOCKINGWINDOWS))
return false;
else
return true;
@@ -391,7 +391,7 @@ static SfxWorkWindow* lcl_getWorkWindowFromXFrame( const uno::Reference< frame::
void SAL_CALL SfxDockingWindowFactory( const uno::Reference< frame::XFrame >& rFrame, const rtl::OUString& rDockingWindowName )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- USHORT nID = USHORT(rDockingWindowName.toInt32());
+ sal_uInt16 nID = sal_uInt16(rDockingWindowName.toInt32());
// Check the range of the provided ID otherwise nothing will happen
if ( lcl_checkDockingWindowID( nID ))
@@ -418,7 +418,7 @@ bool SAL_CALL IsDockingWindowVisible( const uno::Reference< frame::XFrame >& rFr
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- USHORT nID = USHORT(rDockingWindowName.toInt32());
+ sal_uInt16 nID = sal_uInt16(rDockingWindowName.toInt32());
// Check the range of the provided ID otherwise nothing will happen
if ( lcl_checkDockingWindowID( nID ))
@@ -441,25 +441,25 @@ friend class SfxDockingWindow;
SfxChildAlignment eLastAlignment;
SfxChildAlignment eDockAlignment;
- BOOL bConstructed;
+ sal_Bool bConstructed;
Size aMinSize;
SfxSplitWindow* pSplitWin;
- BOOL bSplitable;
-// BOOL bAutoHide;
+ sal_Bool bSplitable;
+// sal_Bool bAutoHide;
Timer aMoveTimer;
// Folgende members sind nur in der Zeit von StartDocking bis EndDocking
// g"ultig:
- BOOL bEndDocked;
+ sal_Bool bEndDocked;
Size aSplitSize;
long nHorizontalSize;
long nVerticalSize;
- USHORT nLine;
- USHORT nPos;
- USHORT nDockLine;
- USHORT nDockPos;
- BOOL bNewLine;
- BOOL bDockingPrevented;
+ sal_uInt16 nLine;
+ sal_uInt16 nPos;
+ sal_uInt16 nDockLine;
+ sal_uInt16 nDockPos;
+ sal_Bool bNewLine;
+ sal_Bool bDockingPrevented;
ByteString aWinState;
SfxChildAlignment GetLastAlignment() const
@@ -525,7 +525,7 @@ void SfxDockingWindow::Resize()
//-------------------------------------------------------------------------
-BOOL SfxDockingWindow::PrepareToggleFloatingMode()
+sal_Bool SfxDockingWindow::PrepareToggleFloatingMode()
/* [Beschreibung]
@@ -538,24 +538,24 @@ BOOL SfxDockingWindow::PrepareToggleFloatingMode()
{
if (!pImp->bConstructed)
- return TRUE;
+ return sal_True;
if ( (Application::IsInModalMode() && IsFloatingMode()) || !pMgr )
- return FALSE;
+ return sal_False;
if ( pImp->bDockingPrevented )
- return FALSE;
+ return sal_False;
if (!IsFloatingMode())
{
// Testen, ob FloatingMode erlaubt ist
if ( CheckAlignment(GetAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT )
- return FALSE;
+ return sal_False;
if ( pImp->pSplitWin )
{
// Das DockingWindow sitzt in einem SplitWindow und wird abgerissen
- pImp->pSplitWin->RemoveWindow(this/*, FALSE*/);
+ pImp->pSplitWin->RemoveWindow(this/*, sal_False*/);
pImp->pSplitWin = 0;
}
}
@@ -565,15 +565,15 @@ BOOL SfxDockingWindow::PrepareToggleFloatingMode()
// Testen, ob es erlaubt ist, anzudocken
if (CheckAlignment(GetAlignment(),pImp->GetLastAlignment()) == SFX_ALIGN_NOALIGNMENT)
- return FALSE;
+ return sal_False;
// Testen, ob das Workwindow gerade ein Andocken erlaubt
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
if ( !pWorkWin->IsDockingAllowed() || !pWorkWin->IsInternalDockingAllowed() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -697,13 +697,13 @@ void SfxDockingWindow::StartDocking()
pImp->pSplitWin->GetWindowPos(this, pImp->nLine, pImp->nPos);
pImp->nDockLine = pImp->nLine;
pImp->nDockPos = pImp->nPos;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
}
}
//-------------------------------------------------------------------------
-BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
+sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
/* [Beschreibung]
@@ -714,7 +714,7 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
*/
{
if ( Application::IsInModalMode() )
- return TRUE;
+ return sal_True;
if ( !pImp->bConstructed || !pMgr )
{
@@ -724,16 +724,16 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
if ( pImp->bDockingPrevented || !pWorkWin->IsInternalDockingAllowed() )
- return FALSE;
+ return sal_False;
- BOOL bFloatMode = FALSE;
+ sal_Bool bFloatMode = sal_False;
if ( GetOuterRect().IsInside( rPos ) && !IsDockingPrevented() )
{
// Maus innerhalb OuterRect : Alignment und Rectangle berechnen
SfxChildAlignment eAlign = CalcAlignment(rPos, rRect);
if (eAlign == SFX_ALIGN_NOALIGNMENT)
- bFloatMode = TRUE;
+ bFloatMode = sal_True;
pImp->SetDockAlignment(eAlign);
}
else
@@ -741,8 +741,8 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
// Maus nicht innerhalb OuterRect : muss FloatingWindow sein
// Ist das erlaubt ?
if (CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT)
- return FALSE;
- bFloatMode = TRUE;
+ return sal_False;
+ bFloatMode = sal_True;
if ( SFX_ALIGN_NOALIGNMENT != pImp->GetDockAlignment() )
{
// wg. SV-Bug darf rRect nur ver"andert werden, wenn sich das
@@ -806,7 +806,7 @@ BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
//-------------------------------------------------------------------------
-void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
+void SfxDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode )
/* [Beschreibung]
@@ -820,7 +820,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
return;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- BOOL bReArrange = FALSE;
+ sal_Bool bReArrange = sal_False;
SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
if ( pImp->bSplitable )
{
@@ -831,7 +831,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
// Wenn neu angedockt wird, machen PrepareToggleFloatingMode()
// und ToggleFloatingMode() das Ummelden.
if ( !bFloatMode )
- bReArrange = TRUE;
+ bReArrange = sal_True;
}
if ( bReArrange )
@@ -841,7 +841,7 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
// Vor dem Show() mu\s das Ummelden passiert sein, daher kann nicht
// die Basisklasse gerufen werden
if ( IsFloatingMode() || !pImp->bSplitable )
- Show( FALSE, SHOW_NOFOCUSCHANGE );
+ Show( sal_False, SHOW_NOFOCUSCHANGE );
// Die Gr"o\se f"urs Toggeln setzen
pImp->aSplitSize = rRect.GetSize();
@@ -849,11 +849,11 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
{
SetFloatingMode( bFloatMode );
if ( IsFloatingMode() || !pImp->bSplitable )
- Show( TRUE, SHOW_NOFOCUSCHANGE );
+ Show( sal_True, SHOW_NOFOCUSCHANGE );
}
else
{
- pImp->pSplitWin->RemoveWindow(this,FALSE);
+ pImp->pSplitWin->RemoveWindow(this,sal_False);
pImp->nLine = pImp->nDockLine;
pImp->nPos = pImp->nDockPos;
pImp->pSplitWin->ReleaseWindow_Impl(this);
@@ -873,9 +873,9 @@ void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
}
else
{
- pImp->bEndDocked = TRUE;
+ pImp->bEndDocked = sal_True;
DockingWindow::EndDocking(rRect, bFloatMode);
- pImp->bEndDocked = FALSE;
+ pImp->bEndDocked = sal_False;
}
SetAlignment( IsFloatingMode() ? SFX_ALIGN_NOALIGNMENT : pImp->GetDockAlignment() );
@@ -938,18 +938,18 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
}
pImp = new SfxDockingWindow_Impl;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
pImp->pSplitWin = 0;
- pImp->bEndDocked = FALSE;
- pImp->bDockingPrevented = FALSE;
+ pImp->bEndDocked = sal_False;
+ pImp->bDockingPrevented = sal_False;
- pImp->bSplitable = TRUE;
-// pImp->bAutoHide = FALSE;
+ pImp->bSplitable = sal_True;
+// pImp->bAutoHide = sal_False;
// Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
@@ -992,18 +992,18 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
}
pImp = new SfxDockingWindow_Impl;
- pImp->bConstructed = FALSE;
+ pImp->bConstructed = sal_False;
pImp->pSplitWin = 0;
- pImp->bEndDocked = FALSE;
- pImp->bDockingPrevented = FALSE;
+ pImp->bEndDocked = sal_False;
+ pImp->bDockingPrevented = sal_False;
- pImp->bSplitable = TRUE;
-// pImp->bAutoHide = FALSE;
+ pImp->bSplitable = sal_True;
+// pImp->bAutoHide = sal_False;
// Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt
pImp->nLine = pImp->nDockLine = 0;
pImp->nPos = pImp->nDockPos = 0;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
pImp->aMoveTimer.SetTimeout(50);
pImp->aMoveTimer.SetTimeoutHdl(LINK(this,SfxDockingWindow,TimerHdl));
@@ -1026,12 +1026,12 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
// Bugfix #39771
pImp->SetDockAlignment( SFX_ALIGN_NOALIGNMENT );
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
return;
}
if ( pInfo->nFlags & SFX_CHILDWIN_FORCEDOCK )
- pImp->bDockingPrevented = TRUE;
+ pImp->bDockingPrevented = sal_True;
pImp->aSplitSize = GetOutputSizePixel();
if ( !GetFloatingSize().Width() )
@@ -1049,14 +1049,14 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
// get information about alignment, split size and position in SplitWindow
String aStr;
- USHORT nPos = pInfo->aExtraString.SearchAscii("AL:");
+ sal_uInt16 nPos = pInfo->aExtraString.SearchAscii("AL:");
if ( nPos != STRING_NOTFOUND )
{
// alignment information
- USHORT n1 = pInfo->aExtraString.Search('(', nPos);
+ sal_uInt16 n1 = pInfo->aExtraString.Search('(', nPos);
if ( n1 != STRING_NOTFOUND )
{
- USHORT n2 = pInfo->aExtraString.Search(')', n1);
+ sal_uInt16 n2 = pInfo->aExtraString.Search(')', n1);
if ( n2 != STRING_NOTFOUND )
{
// extract alignment information from extrastring
@@ -1073,7 +1073,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
pImp->aWinState = pInfo->aWinState;
// check for valid alignment
- SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (USHORT) aStr.ToInt32();
+ SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
if ( pImp->bDockingPrevented )
// docking prevented, ignore old configuration and take alignment from default
aStr.Erase();
@@ -1093,7 +1093,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
if ( nPos != STRING_NOTFOUND )
{
aStr.Erase(0, nPos+1);
- pImp->SetLastAlignment( (SfxChildAlignment) (USHORT) aStr.ToInt32() );
+ pImp->SetLastAlignment( (SfxChildAlignment) (sal_uInt16) aStr.ToInt32() );
}
nPos = aStr.Search(',');
@@ -1104,8 +1104,8 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
aStr.Erase(0, nPos+1);
if ( GetPosSizeFromString( aStr, aPos, pImp->aSplitSize ) )
{
- pImp->nLine = pImp->nDockLine = (USHORT) aPos.X();
- pImp->nPos = pImp->nDockPos = (USHORT) aPos.Y();
+ pImp->nLine = pImp->nDockLine = (sal_uInt16) aPos.X();
+ pImp->nPos = pImp->nDockPos = (sal_uInt16) aPos.Y();
pImp->nVerticalSize = pImp->aSplitSize.Height();
pImp->nHorizontalSize = pImp->aSplitSize.Width();
if ( GetSplitSizeFromString( aStr, pImp->aSplitSize ))
@@ -1139,7 +1139,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
// detect floating mode
// toggeling mode will not execute code in handlers, because pImp->bConstructed is not set yet
- BOOL bFloatMode = IsFloatingMode();
+ sal_Bool bFloatMode = IsFloatingMode();
if ( bFloatMode != ((GetAlignment() == SFX_ALIGN_NOALIGNMENT)) )
{
bFloatMode = !bFloatMode;
@@ -1199,12 +1199,12 @@ void SfxDockingWindow::Initialize_Impl()
if ( !pMgr )
{
// Bugfix #39771
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
return;
}
FloatingWindow* pFloatWin = GetFloatingWindow();
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if ( pFloatWin )
{
bSet = !pFloatWin->IsDefaultPos();
@@ -1213,7 +1213,7 @@ void SfxDockingWindow::Initialize_Impl()
{
Point aPos = GetFloatingPos();
if ( aPos != Point() )
- bSet = TRUE;
+ bSet = sal_True;
}
if ( !bSet)
@@ -1243,7 +1243,7 @@ void SfxDockingWindow::Initialize_Impl()
}
// allow calling of docking handlers
- pImp->bConstructed = TRUE;
+ pImp->bConstructed = sal_True;
}
//-------------------------------------------------------------------------
@@ -1271,9 +1271,9 @@ void SfxDockingWindow::FillInfo(SfxChildWinInfo& rInfo) const
rInfo.aWinState = pImp->aWinState;
rInfo.aExtraString = DEFINE_CONST_UNICODE("AL:(");
- rInfo.aExtraString += String::CreateFromInt32((USHORT) GetAlignment());
+ rInfo.aExtraString += String::CreateFromInt32((sal_uInt16) GetAlignment());
rInfo.aExtraString += ',';
- rInfo.aExtraString += String::CreateFromInt32 ((USHORT) pImp->GetLastAlignment());
+ rInfo.aExtraString += String::CreateFromInt32 ((sal_uInt16) pImp->GetLastAlignment());
if ( pImp->bSplitable )
{
Point aPos(pImp->nLine, pImp->nPos);
@@ -1385,7 +1385,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
aInRect.Bottom() -= nTBBorder/2;
// calculate alignment resulting from docking rectangle
- BOOL bBecomesFloating = FALSE;
+ sal_Bool bBecomesFloating = sal_False;
SfxChildAlignment eDockAlign = pImp->GetDockAlignment();
Rectangle aDockingRect( rRect );
if ( !IsFloatingMode() )
@@ -1404,7 +1404,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Rectangle aIntersect = GetOuterRect().GetIntersection( aDockingRect );
if ( aIntersect.IsEmpty() )
// docking rectangle completely outside docking area -> floating mode
- bBecomesFloating = TRUE;
+ bBecomesFloating = sal_True;
else
{
// create a small test rect around the mouse position and use this one
@@ -1418,7 +1418,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Rectangle aIntersectRect = aInRect.GetIntersection( aSmallDockingRect );
if ( aIntersectRect == aSmallDockingRect )
// docking rectangle completely inside (shrinked) inner area -> floating mode
- bBecomesFloating = TRUE;
+ bBecomesFloating = sal_True;
}
if ( bBecomesFloating )
@@ -1431,7 +1431,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
Point aInPosTL( aPos.X()-aInRect.Left(), aPos.Y()-aInRect.Top() );
Point aInPosBR( aPos.X()-aInRect.Left() + aDockingRect.GetWidth(), aPos.Y()-aInRect.Top() + aDockingRect.GetHeight() );
Size aInSize = aInRect.GetSize();
- BOOL bNoChange = FALSE;
+ sal_Bool bNoChange = sal_False;
// check if alignment is still unchanged
switch ( GetAlignment() )
@@ -1442,7 +1442,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if (aInPosTL.X() <= 0)
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
case SFX_ALIGN_TOP:
@@ -1451,7 +1451,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( aInPosTL.Y() <= 0)
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
case SFX_ALIGN_RIGHT:
@@ -1460,7 +1460,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( aInPosBR.X() >= aInSize.Width())
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
case SFX_ALIGN_BOTTOM:
@@ -1469,7 +1469,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( aInPosBR.Y() >= aInSize.Height())
{
eDockAlign = GetAlignment();
- bNoChange = TRUE;
+ bNoChange = sal_True;
}
break;
default:
@@ -1479,7 +1479,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
if ( !bNoChange )
{
// alignment will change, test alignment according to distance of the docking rectangles edges
- BOOL bForbidden = TRUE;
+ sal_Bool bForbidden = sal_True;
if ( aInPosTL.X() <= 0)
{
eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_LEFT);
@@ -1528,7 +1528,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
}
else if ( pImp->bSplitable )
{
- USHORT nLine, nPos;
+ sal_uInt16 nLine, nPos;
SfxSplitWindow *pSplitWin = pWorkWin->GetSplitWindow_Impl(eDockAlign);
aPos = pSplitWin->ScreenToOutputPixel( aPos );
if ( pSplitWin->GetWindowPos( aPos, nLine, nPos ) )
@@ -1536,7 +1536,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
// mouse over splitwindow, get line and position
pImp->nDockLine = nLine;
pImp->nDockPos = nPos;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
}
else
{
@@ -1556,18 +1556,18 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
// if this window is the only one in the last line, it can't be docked as new line in the same splitwindow
pImp->nDockLine = pImp->nLine;
pImp->nDockPos = pImp->nPos;
- pImp->bNewLine = FALSE;
+ pImp->bNewLine = sal_False;
}
else
{
// create new line
pImp->nDockLine = pSplitWin->GetLineCount();
pImp->nDockPos = 0;
- pImp->bNewLine = TRUE;
+ pImp->bNewLine = sal_True;
}
}
- BOOL bChanged = pImp->nLine != pImp->nDockLine || pImp->nPos != pImp->nDockPos || eDockAlign != GetAlignment();
+ sal_Bool bChanged = pImp->nLine != pImp->nDockLine || pImp->nPos != pImp->nDockPos || eDockAlign != GetAlignment();
if ( !bChanged && !IsFloatingMode() )
{
// window only sightly moved, no change of any property
@@ -1753,7 +1753,7 @@ SfxChildAlignment SfxDockingWindow::CheckAlignment(SfxChildAlignment,
//-------------------------------------------------------------------------
-BOOL SfxDockingWindow::Close()
+sal_Bool SfxDockingWindow::Close()
/* [Beschreibung]
@@ -1768,12 +1768,12 @@ BOOL SfxDockingWindow::Close()
// Execute mit Parametern, da Toggle von einigen ChildWindows ignoriert
// werden kann
if ( !pMgr )
- return TRUE;
+ return sal_True;
- SfxBoolItem aValue( pMgr->GetType(), FALSE);
+ SfxBoolItem aValue( pMgr->GetType(), sal_False);
pBindings->GetDispatcher_Impl()->Execute(
pMgr->GetType(), SFX_CALLMODE_RECORD | SFX_CALLMODE_ASYNCHRON, &aValue, 0L );
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -1885,7 +1885,7 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
// also base class rufen, sonst erf"ahrt der parent nichts
// if ( rEvt.GetWindow() == this ) PB: #i74693# not necessary any longer
DockingWindow::Notify( rEvt );
- return TRUE;
+ return sal_True;
}
else if( rEvt.GetType() == EVENT_KEYINPUT )
{
@@ -1893,7 +1893,7 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
if ( !DockingWindow::Notify( rEvt ) && SfxViewShell::Current() )
// dann auch global g"ultige Acceleratoren verwenden
return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
- return TRUE;
+ return sal_True;
}
else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() )
{
@@ -1905,9 +1905,9 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
}
-USHORT SfxDockingWindow::GetWinBits_Impl() const
+sal_uInt16 SfxDockingWindow::GetWinBits_Impl() const
{
- USHORT nBits = 0;
+ sal_uInt16 nBits = 0;
// if ( pImp->bAutoHide )
// nBits |= SWIB_AUTOHIDE;
return nBits;
@@ -1940,27 +1940,27 @@ void SfxDockingWindow::Reappear_Impl()
}
}
-BOOL SfxDockingWindow::IsAutoHide_Impl() const
+sal_Bool SfxDockingWindow::IsAutoHide_Impl() const
{
if ( pImp->pSplitWin )
return !pImp->pSplitWin->IsFadeIn();
else
- return FALSE;
+ return sal_False;
}
-BOOL SfxDockingWindow::IsPinned_Impl() const
+sal_Bool SfxDockingWindow::IsPinned_Impl() const
{
if ( pImp->pSplitWin )
return pImp->pSplitWin->IsPinned();
else
- return TRUE;
+ return sal_True;
}
-void SfxDockingWindow::AutoShow( BOOL bShow )
+void SfxDockingWindow::AutoShow( sal_Bool bShow )
{
AutoShow_Impl(bShow);
}
-void SfxDockingWindow::AutoShow_Impl( BOOL bShow )
+void SfxDockingWindow::AutoShow_Impl( sal_Bool bShow )
{
if ( pImp->pSplitWin )
{
@@ -1972,7 +1972,7 @@ void SfxDockingWindow::AutoShow_Impl( BOOL bShow )
}
/*
-void SfxDockingWindow::Pin_Impl( BOOL bPinned )
+void SfxDockingWindow::Pin_Impl( sal_Bool bPinned )
{
if ( pImp->pSplitWin )
pImp->pSplitWin->Pin_Impl( bPinned );
@@ -1984,7 +1984,7 @@ SfxSplitWindow* SfxDockingWindow::GetSplitWindow_Impl() const
return pImp->pSplitWin;
}
-void SfxDockingWindow::FadeIn( BOOL /*bFadeIn*/ )
+void SfxDockingWindow::FadeIn( sal_Bool /*bFadeIn*/ )
{
}