summaryrefslogtreecommitdiff
path: root/svtools/source/control
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2010-01-29 15:26:37 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2010-01-29 15:26:37 +0000
commit04a59adcc7fd221ee6b7644aa1fa53fed8dd3c0e (patch)
tree98e45c3b1a1418ca54ef4a83f6022691099078e0 /svtools/source/control
parent554b7023a920d8701ef9d38c6e4952ebb41d1b5f (diff)
parentc0bfd066e3d8355d35c2ea22d5a98ac7f43406da (diff)
ab71: merge with DEV300_m54
Diffstat (limited to 'svtools/source/control')
-rw-r--r--svtools/source/control/filectrl.cxx6
-rw-r--r--svtools/source/control/inettbc.cxx6
-rw-r--r--svtools/source/control/scrwin.cxx4
-rw-r--r--svtools/source/control/tabbar.cxx50
4 files changed, 33 insertions, 33 deletions
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index 76893744688b..d820dce097ed 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -47,7 +47,7 @@
FileControl::FileControl( Window* pParent, WinBits nStyle, FileControlMode nFlags ) :
Window( pParent, nStyle|WB_DIALOGCONTROL ),
maEdit( this, (nStyle&(~WB_BORDER))|WB_NOTABSTOP ),
- maButton( this, nStyle&(~WB_BORDER)|WB_NOLIGHTBORDER|WB_NOPOINTERFOCUS|WB_NOTABSTOP ),
+ maButton( this, (nStyle&(~WB_BORDER))|WB_NOLIGHTBORDER|WB_NOPOINTERFOCUS|WB_NOTABSTOP ),
maButtonText( SvtResId( STR_FILECTRL_BUTTONTEXT ) ),
mnFlags( nFlags ),
mnInternalFlags( FILECTRL_ORIGINALBUTTONTEXT )
@@ -164,11 +164,11 @@ void FileControl::Resize()
Size aOutSz = GetOutputSizePixel();
long nButtonTextWidth = maButton.GetTextWidth( maButtonText );
if ( ((mnInternalFlags & FILECTRL_ORIGINALBUTTONTEXT) == 0) ||
- nButtonTextWidth < aOutSz.Width()/3 &&
+ ( nButtonTextWidth < aOutSz.Width()/3 &&
( mnFlags & FILECTRL_RESIZEBUTTONBYPATHLEN
? ( maEdit.GetTextWidth( maEdit.GetText() )
<= aOutSz.Width() - nButtonTextWidth - ButtonBorder )
- : TRUE )
+ : TRUE ) )
)
{
maButton.SetText( maButtonText );
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 2f9e881e39c9..4a01a03ad759 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -374,8 +374,8 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL,
sal_Bool bExectMatch = bPureHomePath
|| aText.CompareToAscii( "." ) == COMPARE_EQUAL
- || aText.Len() > 1 && aText.Copy( aText.Len() - 2, 2 ).CompareToAscii( "/." ) == COMPARE_EQUAL
- || aText.Len() > 1 && aText.Copy( aText.Len() - 3, 3 ).CompareToAscii( "/.." ) == COMPARE_EQUAL;
+ || (aText.Len() > 1 && aText.Copy( aText.Len() - 2, 2 ).CompareToAscii( "/." ) == COMPARE_EQUAL)
+ || (aText.Len() > 2 && aText.Copy( aText.Len() - 3, 3 ).CompareToAscii( "/.." ) == COMPARE_EQUAL);
// for pure home pathes ( ~username ) the '.' at the end of rMatch
// means that it poits to root catalog
@@ -641,7 +641,7 @@ void SvtMatchContext_Impl::run()
// if the user input is a valid URL, go on with it
// otherwise it could be parsed smart with a predefined smart protocol
// ( or if this is not set with the protocol of a predefined base URL )
- if( eProt == INET_PROT_NOT_VALID || eProt == eSmartProt || eSmartProt == INET_PROT_NOT_VALID && eProt == eBaseProt )
+ if( eProt == INET_PROT_NOT_VALID || eProt == eSmartProt || (eSmartProt == INET_PROT_NOT_VALID && eProt == eBaseProt) )
{
// not stopped yet ?
if( schedule() )
diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx
index 9805110c9254..162f23948385 100644
--- a/svtools/source/control/scrwin.cxx
+++ b/svtools/source/control/scrwin.cxx
@@ -273,8 +273,8 @@ void __EXPORT ScrollableWindow::Resize()
// disable painting in the corner between the scrollbars
if ( bVVisible && bHVisible )
{
- aCornerWin.SetPosSizePixel(
- *((Point*) &aOutPixSz), Size(nScrSize, nScrSize) );
+ aCornerWin.SetPosSizePixel(Point(aOutPixSz.Width(), aOutPixSz.Height()),
+ Size(nScrSize, nScrSize) );
aCornerWin.Show();
}
else
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 6f3db6175677..ed1abbe53a2a 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1543,7 +1543,7 @@ void TabBar::InsertPage( USHORT nPageId, const XubString& rText,
TabBarPageBits nBits, USHORT nPos )
{
DBG_ASSERT( nPageId, "TabBar::InsertPage(): PageId == 0" );
- DBG_ASSERT( GetPagePos( nPageId ) == TAB_PAGE_NOTFOUND,
+ DBG_ASSERT( GetPagePos( nPageId ) == TABBAR_PAGE_NOTFOUND,
"TabBar::InsertPage(): PageId already exists" );
DBG_ASSERT( nBits <= TPB_SPECIAL, "TabBar::InsertPage(): nBits is wrong" );
@@ -1570,7 +1570,7 @@ void TabBar::RemovePage( USHORT nPageId )
USHORT nPos = GetPagePos( nPageId );
// Existiert Item
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
if ( mnCurPageId == nPageId )
mnCurPageId = 0;
@@ -1605,7 +1605,7 @@ void TabBar::MovePage( USHORT nPageId, USHORT nNewPos )
return;
// Existiert Item
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
// TabBar-Item in der Liste verschieben
ImplTabBarItem* pItem = mpItemList->Remove( nPos );
@@ -1643,7 +1643,7 @@ void TabBar::Clear()
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
- CallEventListeners( VCLEVENT_TABBAR_PAGEREMOVED, (void*) TAB_PAGE_NOTFOUND );
+ CallEventListeners( VCLEVENT_TABBAR_PAGEREMOVED, (void*) TABBAR_PAGE_NOTFOUND );
}
// -----------------------------------------------------------------------
@@ -1652,7 +1652,7 @@ void TabBar::EnablePage( USHORT nPageId, BOOL bEnable )
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
@@ -1675,7 +1675,7 @@ BOOL TabBar::IsPageEnabled( USHORT nPageId ) const
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
return mpItemList->GetObject( nPos )->mbEnable;
else
return FALSE;
@@ -1687,7 +1687,7 @@ void TabBar::SetPageBits( USHORT nPageId, TabBarPageBits nBits )
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
@@ -1708,7 +1708,7 @@ TabBarPageBits TabBar::GetPageBits( USHORT nPageId ) const
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
return mpItemList->GetObject( nPos )->mnBits;
else
return FALSE;
@@ -1745,7 +1745,7 @@ USHORT TabBar::GetPagePos( USHORT nPageId ) const
pItem = mpItemList->Next();
}
- return TAB_PAGE_NOTFOUND;
+ return TABBAR_PAGE_NOTFOUND;
}
// -----------------------------------------------------------------------
@@ -1770,7 +1770,7 @@ Rectangle TabBar::GetPageRect( USHORT nPageId ) const
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
return mpItemList->GetObject( nPos )->maRect;
else
return Rectangle();
@@ -1783,7 +1783,7 @@ void TabBar::SetCurPageId( USHORT nPageId )
USHORT nPos = GetPagePos( nPageId );
// Wenn Item nicht existiert, dann nichts machen
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
// Wenn sich aktuelle Page nicht geaendert hat, dann muessen wir
// jetzt nichts mehr machen
@@ -1875,7 +1875,7 @@ void TabBar::MakeVisible( USHORT nPageId )
USHORT nPos = GetPagePos( nPageId );
// Wenn Item nicht existiert, dann nichts machen
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
if ( nPos < mnFirstPos )
SetFirstPageId( nPageId );
@@ -1924,7 +1924,7 @@ void TabBar::SetFirstPageId( USHORT nPageId )
USHORT nPos = GetPagePos( nPageId );
// Wenn Item nicht existiert, dann FALSE zurueckgeben
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
if ( nPos != mnFirstPos )
{
@@ -1958,7 +1958,7 @@ void TabBar::SelectPage( USHORT nPageId, BOOL bSelect )
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
@@ -2039,7 +2039,7 @@ USHORT TabBar::GetSelectPageCount() const
BOOL TabBar::IsPageSelected( USHORT nPageId ) const
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
return mpItemList->GetObject( nPos )->mbSelect;
else
return FALSE;
@@ -2050,7 +2050,7 @@ BOOL TabBar::IsPageSelected( USHORT nPageId ) const
BOOL TabBar::StartEditMode( USHORT nPageId )
{
USHORT nPos = GetPagePos( nPageId );
- if ( mpEdit || (nPos == TAB_PAGE_NOTFOUND) || (mnLastOffX < 8) )
+ if ( mpEdit || (nPos == TABBAR_PAGE_NOTFOUND) || (mnLastOffX < 8) )
return FALSE;
mnEditId = nPageId;
@@ -2126,11 +2126,11 @@ void TabBar::EndEditMode( BOOL bCancel )
if ( !bCancel )
{
long nAllowRenaming = AllowRenaming();
- if ( nAllowRenaming == TAB_RENAMING_YES )
+ if ( nAllowRenaming == TABBAR_RENAMING_YES )
SetPageText( mnEditId, maEditText );
- else if ( nAllowRenaming == TAB_RENAMING_NO )
+ else if ( nAllowRenaming == TABBAR_RENAMING_NO )
bEnd = FALSE;
- else // nAllowRenaming == TAB_RENAMING_CANCEL
+ else // nAllowRenaming == TABBAR_RENAMING_CANCEL
mbEditCanceled = TRUE;
}
@@ -2271,7 +2271,7 @@ void TabBar::SetSelectTextColor( const Color& rColor )
void TabBar::SetPageText( USHORT nPageId, const XubString& rText )
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
mpItemList->GetObject( nPos )->maText = rText;
mbSizeFormat = TRUE;
@@ -2289,7 +2289,7 @@ void TabBar::SetPageText( USHORT nPageId, const XubString& rText )
XubString TabBar::GetPageText( USHORT nPageId ) const
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
return mpItemList->GetObject( nPos )->maText;
else
return XubString();
@@ -2300,7 +2300,7 @@ XubString TabBar::GetPageText( USHORT nPageId ) const
void TabBar::SetHelpText( USHORT nPageId, const XubString& rText )
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
mpItemList->GetObject( nPos )->maHelpText = rText;
}
@@ -2309,7 +2309,7 @@ void TabBar::SetHelpText( USHORT nPageId, const XubString& rText )
XubString TabBar::GetHelpText( USHORT nPageId ) const
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
{
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
if ( !pItem->maHelpText.Len() && pItem->mnHelpId )
@@ -2330,7 +2330,7 @@ XubString TabBar::GetHelpText( USHORT nPageId ) const
void TabBar::SetHelpId( USHORT nPageId, ULONG nHelpId )
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
mpItemList->GetObject( nPos )->mnHelpId = nHelpId;
}
@@ -2339,7 +2339,7 @@ void TabBar::SetHelpId( USHORT nPageId, ULONG nHelpId )
ULONG TabBar::GetHelpId( USHORT nPageId ) const
{
USHORT nPos = GetPagePos( nPageId );
- if ( nPos != TAB_PAGE_NOTFOUND )
+ if ( nPos != TABBAR_PAGE_NOTFOUND )
return mpItemList->GetObject( nPos )->mnHelpId;
else
return 0;