summaryrefslogtreecommitdiff
path: root/svtools/source/contnr
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/contnr')
-rw-r--r--svtools/source/contnr/cont_pch.cxx43
-rw-r--r--svtools/source/contnr/contentenumeration.cxx2
-rw-r--r--svtools/source/contnr/ctrdll.cxx76
-rw-r--r--svtools/source/contnr/fileview.cxx97
-rw-r--r--svtools/source/contnr/fileview.src4
-rw-r--r--svtools/source/contnr/imivctl.hxx278
-rw-r--r--svtools/source/contnr/imivctl1.cxx850
-rw-r--r--svtools/source/contnr/imivctl2.cxx182
-rw-r--r--svtools/source/contnr/ivctrl.cxx90
-rw-r--r--svtools/source/contnr/makefile.mk82
-rw-r--r--svtools/source/contnr/svicnvw.cxx102
-rw-r--r--svtools/source/contnr/svimpbox.cxx730
-rw-r--r--svtools/source/contnr/svimpicn.cxx662
-rw-r--r--svtools/source/contnr/svlbitm.cxx130
-rw-r--r--svtools/source/contnr/svlbox.cxx351
-rw-r--r--svtools/source/contnr/svtabbx.cxx166
-rw-r--r--svtools/source/contnr/svtreebx.cxx317
-rw-r--r--svtools/source/contnr/templwin.cxx83
-rw-r--r--svtools/source/contnr/templwin.hxx16
-rw-r--r--svtools/source/contnr/templwin.src4
-rw-r--r--svtools/source/contnr/tooltiplbox.cxx2
-rw-r--r--svtools/source/contnr/treelist.cxx314
22 files changed, 2225 insertions, 2356 deletions
diff --git a/svtools/source/contnr/cont_pch.cxx b/svtools/source/contnr/cont_pch.cxx
deleted file mode 100644
index 3abdd131677a..000000000000
--- a/svtools/source/contnr/cont_pch.cxx
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-
-#include <sv.hxx>
-#include <svtools/treelist.hxx>
-#include <svtools/svtabbx.hxx>
-#include <svtools/svtreebx.hxx>
-#include <svtools/svicnvw.hxx>
-#include "svimpbox.hxx"
-#include "svimpicn.hxx"
-#include <svtools/svlbox.hxx>
-#include <svtools/svlbitm.hxx>
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx
index f17958fa8722..6e4f6441140c 100644
--- a/svtools/source/contnr/contentenumeration.cxx
+++ b/svtools/source/contnr/contentenumeration.cxx
@@ -31,7 +31,7 @@
#include "contentenumeration.hxx"
#include <svl/urlfilter.hxx>
#include <svtools/inettbc.hxx>
-#include "imagemgr.hxx"
+#include <svtools/imagemgr.hxx>
/** === begin UNO includes === **/
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/svtools/source/contnr/ctrdll.cxx b/svtools/source/contnr/ctrdll.cxx
deleted file mode 100644
index 4560d5ea64a5..000000000000
--- a/svtools/source/contnr/ctrdll.cxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-
-#ifdef WIN
-#include <svwin.h>
-
-#include <sysdep.hxx>
-
-// Statische DLL-Verwaltungs-Variablen
-static HINSTANCE hDLLInst = 0; // HANDLE der DLL
-
-
-/***************************************************************************
-|*
-|* LibMain()
-|*
-|* Beschreibung Initialisierungsfunktion der DLL
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
-{
-#ifndef WNT
- if ( nHeap )
- UnlockData( 0 );
-#endif
-
- hDLLInst = hDLL;
-
- return TRUE;
-}
-
-/***************************************************************************
-|*
-|* WEP()
-|*
-|* Beschreibung DLL-Deinitialisierung
-|*
-***************************************************************************/
-
-extern "C" int CALLBACK WEP( int )
-{
- return 1;
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 3a9efa5f9905..b95c889827b9 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -29,12 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svtools.hxx"
-#include "fileview.hxx"
+#include <svtools/fileview.hxx>
#include <svtools/svtdata.hxx>
-#include "imagemgr.hxx"
+#include <svtools/imagemgr.hxx>
#include <svtools/headbar.hxx>
#include <svtools/svtabbx.hxx>
-
#include <svtools/svtools.hrc>
#include "fileview.hrc"
#include "contentenumeration.hxx"
@@ -190,7 +189,7 @@ private:
sal_Bool Kill( const OUString& rURL );
protected:
- virtual BOOL DoubleClickHdl();
+ virtual sal_Bool DoubleClickHdl();
virtual ::rtl::OUString GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos ) const;
public:
@@ -199,7 +198,7 @@ public:
virtual void Resize();
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
void ClearAll();
HeaderBar* GetHeaderBar() const { return mpHeaderBar; }
@@ -214,7 +213,7 @@ public:
DECL_LINK( ResetQuickSearch_Impl, Timer * );
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopentry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopentry );
};
// class HashedEntry --------------------------------------------------
@@ -444,9 +443,9 @@ void NameTranslationList::Init()
aConfig.SetGroup( ByteString( pSection ) );
- USHORT nKeyCnt = aConfig.GetKeyCount();
+ sal_uInt16 nKeyCnt = aConfig.GetKeyCount();
- for( USHORT nCnt = 0 ; nCnt < nKeyCnt ; ++nCnt )
+ for( sal_uInt16 nCnt = 0 ; nCnt < nKeyCnt ; ++nCnt )
Insert( new NameTranslationEntry( aConfig.GetKeyName( nCnt ), aConfig.ReadKey( nCnt ) ) );
}
}
@@ -586,7 +585,7 @@ public:
String FolderInserted( const OUString& rURL,
const OUString& rTitle );
- ULONG GetEntryPos( const OUString& rURL );
+ sal_uLong GetEntryPos( const OUString& rURL );
inline void EnableContextMenu( sal_Bool bEnable );
inline void EnableDelete( sal_Bool bEnable );
@@ -935,7 +934,7 @@ PopupMenu* ViewTabListBox_Impl::CreateContextMenu( void )
// -----------------------------------------------------------------------
-void ViewTabListBox_Impl::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void ViewTabListBox_Impl::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
switch ( nSelectedPopupEntry )
{
@@ -953,7 +952,7 @@ void ViewTabListBox_Impl::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry
void ViewTabListBox_Impl::ClearAll()
{
- for ( USHORT i = 0; i < GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < GetEntryCount(); ++i )
delete (SvtContentEntry*)GetEntry(i)->GetUserData();
Clear();
}
@@ -1029,10 +1028,10 @@ void ViewTabListBox_Impl::DeleteEntries()
}
// -----------------------------------------------------------------------
-BOOL ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
+sal_Bool ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
const XubString& rNewText )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
OUString aURL;
SvtContentEntry* pData = (SvtContentEntry*)pEntry->GetUserData();
@@ -1077,7 +1076,7 @@ BOOL ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
pData->maURL = aURL;
pEntry->SetUserData( pData );
- bRet = TRUE;
+ bRet = sal_True;
}
}
catch( Exception const & )
@@ -1115,7 +1114,7 @@ void ViewTabListBox_Impl::DoQuickSearch( const xub_Unicode& rChar )
SvLBoxEntry* pEntry = GetEntry( mnSearchIndex );
if ( pEntry )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
Select( pEntry );
SetCurEntry( pEntry );
MakeVisible( pEntry );
@@ -1131,10 +1130,10 @@ void ViewTabListBox_Impl::DoQuickSearch( const xub_Unicode& rChar )
}
// -----------------------------------------------------------------------
-BOOL ViewTabListBox_Impl::DoubleClickHdl()
+sal_Bool ViewTabListBox_Impl::DoubleClickHdl()
{
SvHeaderTabListBox::DoubleClickHdl();
- return FALSE;
+ return sal_False;
// this means "do no additional handling". Especially this means that the SvImpLBox does not
// recognize that the entry at the double click position change after the handler call (which is
// the case if in the handler, our content was replaced)
@@ -1280,7 +1279,7 @@ void SvtFileView::OpenFolder( const Sequence< OUString >& aContents )
{
mpImp->mpView->ClearAll();
const OUString* pFileProperties = aContents.getConstArray();
- UINT32 i, nCount = aContents.getLength();
+ sal_uInt32 i, nCount = aContents.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pFileProperties[i] );
@@ -1312,7 +1311,7 @@ void SvtFileView::OpenFolder( const Sequence< OUString >& aContents )
// detect image
sal_Bool bDoInsert = sal_True;
INetURLObject aObj( aImageURL.Len() > 0 ? aImageURL : aURL );
- Image aImage = SvFileInformationManager::GetImage( aObj, FALSE );
+ Image aImage = SvFileInformationManager::GetImage( aObj, sal_False );
if ( bDoInsert )
{
@@ -1360,7 +1359,7 @@ sal_Bool SvtFileView::CreateNewFolder( const String& rNewFolder )
String sTitle = aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
String sEntry = mpImp->FolderInserted( sURL, sTitle );
SvLBoxEntry* pEntry = mpImp->mpView->InsertEntry( sEntry, mpImp->maFolderImage, mpImp->maFolderImage );
- SvtContentEntry* pUserData = new SvtContentEntry( sURL, TRUE );
+ SvtContentEntry* pUserData = new SvtContentEntry( sURL, sal_True );
pEntry->SetUserData( pUserData );
mpImp->mpView->MakeVisible( pEntry );
bRet = sal_True;
@@ -1411,16 +1410,16 @@ sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const
// -----------------------------------------------------------------------
-sal_uInt32 SvtFileView::GetHelpId( ) const
+const rtl::OString& SvtFileView::GetHelpId( ) const
{
return mpImp->mpView->GetHelpId( );
}
// -----------------------------------------------------------------------
-void SvtFileView::SetHelpId( sal_uInt32 nHelpId )
+void SvtFileView::SetHelpId( const rtl::OString& rHelpId )
{
- mpImp->mpView->SetHelpId( nHelpId );
+ mpImp->mpView->SetHelpId( rHelpId );
}
// -----------------------------------------------------------------------
@@ -1546,7 +1545,7 @@ void SvtFileView::CancelRunningAsyncAction()
void SvtFileView::SetNoSelection()
{
- mpImp->mpView->SelectAll( FALSE );
+ mpImp->mpView->SelectAll( sal_False );
}
// -----------------------------------------------------------------------
@@ -1581,7 +1580,7 @@ void SvtFileView::SetDoubleClickHdl( const Link& rHdl )
// -----------------------------------------------------------------------
-ULONG SvtFileView::GetSelectionCount() const
+sal_uLong SvtFileView::GetSelectionCount() const
{
return mpImp->mpView->GetSelectionCount();
}
@@ -1653,7 +1652,7 @@ void SvtFileView::EndInplaceEditing( bool _bCancel )
IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar )
{
DBG_ASSERT( pBar, "no headerbar" );
- USHORT nItemID = pBar->GetCurItemId();
+ sal_uInt16 nItemID = pBar->GetCurItemId();
HeaderBarItemBits nBits;
@@ -1674,7 +1673,7 @@ IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar )
nBits = pBar->GetItemBits( nItemID );
- BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
+ sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
if ( bUp )
{
@@ -1698,10 +1697,10 @@ IMPL_LINK( SvtFileView, HeaderEndDrag_Impl, HeaderBar*, pBar )
if ( !pBar->IsItemMode() )
{
Size aSize;
- USHORT nTabs = pBar->GetItemCount();
+ sal_uInt16 nTabs = pBar->GetItemCount();
long nTmpSize = 0;
- for ( USHORT i = 1; i <= nTabs; ++i )
+ for ( sal_uInt16 i = 1; i <= nTabs; ++i )
{
long nWidth = pBar->GetItemSize(i);
aSize.Width() = nWidth + nTmpSize;
@@ -1724,14 +1723,14 @@ String SvtFileView::GetConfigString() const
sRet += String::CreateFromInt32( mpImp->mnSortColumn );
sRet += ';';
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
- BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
+ sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
sRet += bUp ? '1' : '0';
sRet += ';';
- USHORT nCount = pBar->GetItemCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = pBar->GetItemCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- USHORT nId = pBar->GetItemId(i);
+ sal_uInt16 nId = pBar->GetItemId(i);
sRet += String::CreateFromInt32( nId );
sRet += ';';
sRet += String::CreateFromInt32( pBar->GetItemSize( nId ) );
@@ -1748,9 +1747,9 @@ void SvtFileView::SetConfigString( const String& rCfgStr )
HeaderBar* pBar = mpImp->mpView->GetHeaderBar();
DBG_ASSERT( pBar, "invalid headerbar" );
- USHORT nIdx = 0;
- mpImp->mnSortColumn = (USHORT)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
- BOOL bUp = (BOOL)(USHORT)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
+ sal_uInt16 nIdx = 0;
+ mpImp->mnSortColumn = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
+ sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
if ( bUp )
@@ -1767,7 +1766,7 @@ void SvtFileView::SetConfigString( const String& rCfgStr )
while ( nIdx != STRING_NOTFOUND )
{
- USHORT nItemId = (USHORT)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
+ sal_uInt16 nItemId = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
pBar->SetItemSize( nItemId, rCfgStr.GetToken( 0, ';', nIdx ).ToInt32() );
}
@@ -2161,7 +2160,7 @@ void SvtFileView_Impl::OpenFolder_Impl()
{
::osl::MutexGuard aGuard( maMutex );
- mpView->SetUpdateMode( FALSE );
+ mpView->SetUpdateMode( sal_False );
mpView->ClearAll();
std::vector< SortingData_Impl* >::iterator aIt;
@@ -2184,7 +2183,7 @@ void SvtFileView_Impl::OpenFolder_Impl()
InitSelection();
++mnSuspendSelectCallback;
- mpView->SetUpdateMode( TRUE );
+ mpView->SetUpdateMode( sal_True );
--mnSuspendSelectCallback;
ResetCursor();
@@ -2196,9 +2195,9 @@ void SvtFileView_Impl::ResetCursor()
// deselect
SvLBoxEntry* pEntry = mpView->FirstSelected();
if ( pEntry )
- mpView->Select( pEntry, FALSE );
+ mpView->Select( pEntry, sal_False );
// set cursor to the first entry
- mpView->SetCursor( mpView->First(), TRUE );
+ mpView->SetCursor( mpView->First(), sal_True );
mpView->Update();
}
@@ -2330,10 +2329,10 @@ void SvtFileView_Impl::CreateDisplayText_Impl()
::svtools::VolumeInfo aVolInfo( (*aIt)->mbIsVolume, (*aIt)->mbIsRemote,
(*aIt)->mbIsRemoveable, (*aIt)->mbIsFloppy,
(*aIt)->mbIsCompactDisc );
- (*aIt)->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE );
+ (*aIt)->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, sal_False );
}
else
- (*aIt)->maImage = SvFileInformationManager::GetFileImage( INetURLObject( (*aIt)->maTargetURL ), FALSE );
+ (*aIt)->maImage = SvFileInformationManager::GetFileImage( INetURLObject( (*aIt)->maTargetURL ), sal_False );
}
}
@@ -2418,7 +2417,7 @@ void SvtFileView_Impl::CreateVector_Impl( const Sequence < OUString > &rList )
// detect the image
INetURLObject aObj( pEntry->maImageURL.getLength() ? pEntry->maImageURL : pEntry->maTargetURL );
- pEntry->maImage = SvFileInformationManager::GetImage( aObj, FALSE );
+ pEntry->maImage = SvFileInformationManager::GetImage( aObj, sal_False );
maContent.push_back( pEntry );
}
@@ -2449,7 +2448,7 @@ void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending )
if ( !mbIsFirstResort )
{
- ULONG nPos = GetEntryPos( aEntryURL );
+ sal_uLong nPos = GetEntryPos( aEntryURL );
if ( nPos < mpView->GetEntryCount() )
{
pEntry = mpView->GetEntry( nPos );
@@ -2538,7 +2537,7 @@ sal_Bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl
}
}
- // when the two elements are equal, we must not return TRUE (which would
+ // when the two elements are equal, we must not return sal_True (which would
// happen if we just return ! ( a < b ) when not sorting ascending )
if ( bEqual )
return sal_False;
@@ -2628,7 +2627,7 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r
::svtools::VolumeInfo aVolInfo;
pData->maType = SvFileInformationManager::GetFolderDescription( aVolInfo );
- pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE );
+ pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, sal_False );
OUString aValue;
OUString aTab( RTL_CONSTASCII_USTRINGPARAM( "\t" ));
@@ -2657,12 +2656,12 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r
}
// -----------------------------------------------------------------------
-ULONG SvtFileView_Impl::GetEntryPos( const OUString& rURL )
+sal_uLong SvtFileView_Impl::GetEntryPos( const OUString& rURL )
{
::osl::MutexGuard aGuard( maMutex );
std::vector< SortingData_Impl* >::iterator aIt;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
for ( aIt = maContent.begin(); aIt != maContent.end(); ++aIt )
{
diff --git a/svtools/source/contnr/fileview.src b/svtools/source/contnr/fileview.src
index c8f5e6aa1911..a7e82cf15881 100644
--- a/svtools/source/contnr/fileview.src
+++ b/svtools/source/contnr/fileview.src
@@ -110,6 +110,7 @@ Menu RID_FILEVIEW_CONTEXTMENU
ModalDialog DLG_SVT_QUERYDELETE
{
+ HelpID = "svtools:ModalDialog:DLG_SVT_QUERYDELETE";
SVLook = TRUE ;
OutputSize = TRUE ;
Moveable = TRUE ;
@@ -142,6 +143,7 @@ ModalDialog DLG_SVT_QUERYDELETE
PushButton BTN_YES
{
+ HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_YES";
Pos = MAP_APPFONT ( 6 , 47 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -151,6 +153,7 @@ ModalDialog DLG_SVT_QUERYDELETE
PushButton BTN_ALL
{
+ HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_ALL";
Pos = MAP_APPFONT ( 59 , 47 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -160,6 +163,7 @@ ModalDialog DLG_SVT_QUERYDELETE
PushButton BTN_NO
{
+ HelpID = "svtools:PushButton:DLG_SVT_QUERYDELETE:BTN_NO";
Pos = MAP_APPFONT ( 112 , 47 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index 4a7b54c6fed3..517f0f6b66f1 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -38,7 +38,7 @@
#include <limits.h>
-#include "ivctrl.hxx"
+#include <svtools/ivctrl.hxx>
#include <svl/svarray.hxx>
class IcnCursor_Impl;
@@ -56,7 +56,7 @@ class IcnGridMap_Impl;
#define F_VER_SBARSIZE_WITH_HBAR 0x0001
#define F_HOR_SBARSIZE_WITH_VBAR 0x0002
-#define F_PAINTED 0x0004 // TRUE nach erstem Paint
+#define F_PAINTED 0x0004 // sal_True nach erstem Paint
#define F_ADD_MODE 0x0008
#define F_SELECTING_RECT 0x0020
#define F_DOWN_CTRL 0x0080
@@ -105,11 +105,11 @@ enum IcnViewFieldType
//
struct LocalFocus
{
- BOOL bOn;
+ sal_Bool bOn;
Rectangle aRect;
Color aPenColor;
- LocalFocus() { bOn = FALSE; }
+ LocalFocus() { bOn = sal_False; }
};
///////////////////////////////////////////////////////////////////////////////
@@ -129,18 +129,18 @@ private:
public:
EntryList_Impl(
SvxIconChoiceCtrl_Impl*,
- USHORT _nInitSize = 1024,
- USHORT _nReSize = 1024 );
+ sal_uInt16 _nInitSize = 1024,
+ sal_uInt16 _nReSize = 1024 );
EntryList_Impl(
SvxIconChoiceCtrl_Impl*,
- USHORT _nBlockSize,
- USHORT _nInitSize,
- USHORT _nReSize );
+ sal_uInt16 _nBlockSize,
+ sal_uInt16 _nInitSize,
+ sal_uInt16 _nReSize );
~EntryList_Impl();
void Clear();
- void Insert( SvxIconChoiceCtrlEntry* pEntry, ULONG nPos );
- SvxIconChoiceCtrlEntry* Remove( ULONG nPos );
+ void Insert( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos );
+ SvxIconChoiceCtrlEntry* Remove( sal_uLong nPos );
void Remove( SvxIconChoiceCtrlEntry* pEntry );
};
@@ -155,7 +155,7 @@ class SvxIconChoiceCtrl_Impl
friend class EntryList_Impl;
friend class IcnGridMap_Impl;
- BOOL bChooseWithCursor;
+ sal_Bool bChooseWithCursor;
EntryList_Impl aEntries;
ScrollBar aVerSBar;
ScrollBar aHorSBar;
@@ -185,12 +185,12 @@ class SvxIconChoiceCtrl_Impl
IcnViewEdit_Impl* pEdit;
WinBits nWinBits;
long nMaxBoundHeight; // Hoehe des hoechsten BoundRects
- USHORT nFlags;
- USHORT nCurTextDrawFlags;
- ULONG nUserEventAdjustScrBars;
- ULONG nUserEventShowCursor;
+ sal_uInt16 nFlags;
+ sal_uInt16 nCurTextDrawFlags;
+ sal_uLong nUserEventAdjustScrBars;
+ sal_uLong nUserEventShowCursor;
SvxIconChoiceCtrlEntry* pCurHighlightFrame;
- BOOL bHighlightFramePressed;
+ sal_Bool bHighlightFramePressed;
SvxIconChoiceCtrlEntry* pHead; // Eintrag oben links
SvxIconChoiceCtrlEntry* pCursor;
SvxIconChoiceCtrlEntry* pPrevDropTarget;
@@ -208,16 +208,16 @@ class SvxIconChoiceCtrl_Impl
SvxIconChoiceCtrlEntry* pCurEditedEntry;
SvxIconChoiceCtrlTextMode eTextMode;
SelectionMode eSelectionMode;
- ULONG nSelectionCount;
+ sal_uLong nSelectionCount;
SvxIconChoiceCtrlPositionMode ePositionMode;
- BOOL bBoundRectsDirty;
- BOOL bUpdateMode;
- BOOL bEntryEditingEnabled;
- BOOL bInDragDrop;
+ sal_Bool bBoundRectsDirty;
+ sal_Bool bUpdateMode;
+ sal_Bool bEntryEditingEnabled;
+ sal_Bool bInDragDrop;
- void ShowCursor( BOOL bShow );
+ void ShowCursor( sal_Bool bShow );
- void ImpArrange( BOOL bKeepPredecessors = FALSE );
+ void ImpArrange( sal_Bool bKeepPredecessors = sal_False );
void AdjustVirtSize( const Rectangle& );
void ResetVirtSize();
void CheckScrollBars();
@@ -232,16 +232,16 @@ class SvxIconChoiceCtrl_Impl
DECL_LINK( VisRectChangedHdl, void* );
DECL_LINK( CallSelectHdlHdl, void* );
- void AdjustScrollBars( BOOL bVirtSizeGrowedOnly = FALSE);
+ void AdjustScrollBars( sal_Bool bVirtSizeGrowedOnly = sal_False);
void PositionScrollBars( long nRealWidth, long nRealHeight );
long GetScrollBarPageSize( long nVisibleRange ) const { return ((nVisibleRange*75)/100); }
long GetScrollBarLineSize() const { return nMaxBoundHeight / 2; }
- BOOL HandleScrollCommand( const CommandEvent& rCmd );
+ sal_Bool HandleScrollCommand( const CommandEvent& rCmd );
void ToDocPos( Point& rPosPixel ) { rPosPixel -= pView->GetMapMode().GetOrigin(); }
void InitScrollBarBox();
SvxIconChoiceCtrlEntry* FindNewCursor();
void ToggleSelection( SvxIconChoiceCtrlEntry* );
- void DeselectAllBut( SvxIconChoiceCtrlEntry*, BOOL bPaintSync=FALSE );
+ void DeselectAllBut( SvxIconChoiceCtrlEntry*, sal_Bool bPaintSync=sal_False );
void Center( SvxIconChoiceCtrlEntry* pEntry ) const;
void StopEditTimer() { aEditTimer.Stop(); }
void StartEditTimer() { aEditTimer.Start(); }
@@ -250,13 +250,13 @@ class SvxIconChoiceCtrl_Impl
void SelectRect(
SvxIconChoiceCtrlEntry* pEntry1,
SvxIconChoiceCtrlEntry* pEntry2,
- BOOL bAdd = TRUE,
+ sal_Bool bAdd = sal_True,
SvPtrarr* pOtherRects = 0 );
void SelectRange(
SvxIconChoiceCtrlEntry* pStart,
SvxIconChoiceCtrlEntry* pEnd,
- BOOL bAdd = TRUE );
+ sal_Bool bAdd = sal_True );
void AddSelectedRect( const Rectangle& );
void AddSelectedRect(
@@ -272,27 +272,27 @@ class SvxIconChoiceCtrl_Impl
Point AdjustAtGrid(
const Rectangle& rCenterRect, // "Schwerpunkt" des Objekts (typ. Bmp-Rect)
const Rectangle& rBoundRect ) const;
- ULONG GetPredecessorGrid( const Point& rDocPos) const;
+ sal_uLong GetPredecessorGrid( const Point& rDocPos) const;
void InitPredecessors();
void ClearPredecessors();
- BOOL CheckVerScrollBar();
- BOOL CheckHorScrollBar();
+ sal_Bool CheckVerScrollBar();
+ sal_Bool CheckHorScrollBar();
void CancelUserEvents();
- void EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL bSelect,
- BOOL bSyncPaint );
+ void EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect,
+ sal_Bool bSyncPaint );
void SaveSelection( List** );
- void RepaintEntries( USHORT nEntryFlagsMask );
+ void RepaintEntries( sal_uInt16 nEntryFlagsMask );
void SetListPositions();
void SetDefaultTextSize();
- BOOL IsAutoArrange() const {
- return (BOOL)(ePositionMode == IcnViewPositionModeAutoArrange); }
- BOOL IsAutoAdjust() const {
- return (BOOL)(ePositionMode == IcnViewPositionModeAutoAdjust); }
+ sal_Bool IsAutoArrange() const {
+ return (sal_Bool)(ePositionMode == IcnViewPositionModeAutoArrange); }
+ sal_Bool IsAutoAdjust() const {
+ return (sal_Bool)(ePositionMode == IcnViewPositionModeAutoAdjust); }
void DocRectChanged() { aDocRectChangedTimer.Start(); }
void VisRectChanged() { aVisRectChangedTimer.Start(); }
- void SetOrigin( const Point&, BOOL bDoNotUpdateWallpaper = FALSE );
+ void SetOrigin( const Point&, sal_Bool bDoNotUpdateWallpaper = sal_False );
DECL_LINK( TextEditEndedHdl, IcnViewEdit_Impl* );
@@ -300,7 +300,7 @@ class SvxIconChoiceCtrl_Impl
void HideFocus ();
void DrawFocusRect ( OutputDevice* pOut );
- BOOL IsMnemonicChar( sal_Unicode cChar, ULONG& rPos ) const;
+ sal_Bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const;
public:
@@ -312,52 +312,52 @@ public:
SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
~SvxIconChoiceCtrl_Impl();
- BOOL SetChoiceWithCursor ( BOOL bDo = TRUE ) { BOOL bOld=bChooseWithCursor; bChooseWithCursor = bDo; return bOld; }
- void Clear( BOOL bInCtor = FALSE );
+ sal_Bool SetChoiceWithCursor ( sal_Bool bDo = sal_True ) { sal_Bool bOld=bChooseWithCursor; bChooseWithCursor = bDo; return bOld; }
+ void Clear( sal_Bool bInCtor = sal_False );
void SetStyle( WinBits nWinStyle );
WinBits GetStyle() const { return nWinBits; }
- void InsertEntry( SvxIconChoiceCtrlEntry*, ULONG nPos, const Point* pPos=0 );
+ void InsertEntry( SvxIconChoiceCtrlEntry*, sal_uLong nPos, const Point* pPos=0 );
void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = NULL );
void RemoveEntry( SvxIconChoiceCtrlEntry* pEntry );
void FontModified();
- void SelectAll( BOOL bSelect = TRUE, BOOL bPaint = TRUE );
+ void SelectAll( sal_Bool bSelect = sal_True, sal_Bool bPaint = sal_True );
void SelectEntry(
SvxIconChoiceCtrlEntry*,
- BOOL bSelect,
- BOOL bCallHdl = TRUE,
- BOOL bAddToSelection = FALSE,
- BOOL bSyncPaint = FALSE );
+ sal_Bool bSelect,
+ sal_Bool bCallHdl = sal_True,
+ sal_Bool bAddToSelection = sal_False,
+ sal_Bool bSyncPaint = sal_False );
void Paint( const Rectangle& rRect );
- BOOL MouseButtonDown( const MouseEvent& );
- BOOL MouseButtonUp( const MouseEvent& );
- BOOL MouseMove( const MouseEvent&);
- BOOL RequestHelp( const HelpEvent& rHEvt );
+ sal_Bool MouseButtonDown( const MouseEvent& );
+ sal_Bool MouseButtonUp( const MouseEvent& );
+ sal_Bool MouseMove( const MouseEvent&);
+ sal_Bool RequestHelp( const HelpEvent& rHEvt );
void SetCursor_Impl(
SvxIconChoiceCtrlEntry* pOldCursor,
SvxIconChoiceCtrlEntry* pNewCursor,
- BOOL bMod1,
- BOOL bShift,
- BOOL bPaintSync = FALSE);
- BOOL KeyInput( const KeyEvent& );
+ sal_Bool bMod1,
+ sal_Bool bShift,
+ sal_Bool bPaintSync = sal_False);
+ sal_Bool KeyInput( const KeyEvent& );
void Resize();
void GetFocus();
void LoseFocus();
- void SetUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const { return bUpdateMode; }
- void PaintEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bIsBackgroundPainted=FALSE );
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool GetUpdateMode() const { return bUpdateMode; }
+ void PaintEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bIsBackgroundPainted=sal_False );
void PaintEntry(
SvxIconChoiceCtrlEntry*,
const Point&,
OutputDevice* pOut = 0,
- BOOL bIsBackgroundPainted = FALSE);
+ sal_Bool bIsBackgroundPainted = sal_False);
void PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* );
void SetEntryPos(
SvxIconChoiceCtrlEntry* pEntry,
const Point& rPos,
- BOOL bAdjustRow = FALSE,
- BOOL bCheckScrollBars = FALSE,
- BOOL bKeepGridMap = FALSE );
+ sal_Bool bAdjustRow = sal_False,
+ sal_Bool bCheckScrollBars = sal_False,
+ sal_Bool bKeepGridMap = sal_False );
void InvalidateEntry( SvxIconChoiceCtrlEntry* );
IcnViewFieldType GetItem( SvxIconChoiceCtrlEntry*, const Point& rAbsPos );
@@ -367,25 +367,25 @@ public:
SvxIconChoiceCtrlEntry* GetCurEntry() const { return pCursor; }
void SetCursor(
SvxIconChoiceCtrlEntry*,
- // TRUE == bei Single-Selection die Sel. mitfuehren
- BOOL bSyncSingleSelection = TRUE,
- BOOL bShowFocusAsync = FALSE );
+ // sal_True == bei Single-Selection die Sel. mitfuehren
+ sal_Bool bSyncSingleSelection = sal_True,
+ sal_Bool bShowFocusAsync = sal_False );
- SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, BOOL bHit = FALSE );
+ SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, sal_Bool bHit = sal_False );
SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rDocPos, SvxIconChoiceCtrlEntry* pCurEntry );
SvxIconChoiceCtrlEntry* GetPrevEntry( const Point& rDocPos, SvxIconChoiceCtrlEntry* pCurEntry );
Point GetEntryPos( SvxIconChoiceCtrlEntry* );
- void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, BOOL bBound = TRUE );
+ void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound = sal_True );
- void Arrange(BOOL bKeepPredecessors = FALSE, long nSetMaxVirtWidth =0, long nSetMaxVirtHeight =0 );
+ void Arrange(sal_Bool bKeepPredecessors = sal_False, long nSetMaxVirtWidth =0, long nSetMaxVirtHeight =0 );
Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* );
Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = 0 );
Rectangle CalcTextRect(
SvxIconChoiceCtrlEntry*,
const Point* pPos = 0,
- BOOL bForInplaceEdit = FALSE,
+ sal_Bool bForInplaceEdit = sal_False,
const String* pStr = 0 );
long CalcBoundingWidth( SvxIconChoiceCtrlEntry* ) const;
@@ -402,44 +402,44 @@ public:
void RecalcAllBoundingRectsSmart();
const Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* );
void InvalidateBoundingRect( SvxIconChoiceCtrlEntry* );
- void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; bBoundRectsDirty = TRUE; }
- BOOL IsBoundingRectValid( const Rectangle& rRect ) const { return (BOOL)( rRect.Right() != LONG_MAX ); }
+ void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; bBoundRectsDirty = sal_True; }
+ sal_Bool IsBoundingRectValid( const Rectangle& rRect ) const { return (sal_Bool)( rRect.Right() != LONG_MAX ); }
void PaintEmphasis(
const Rectangle& rRect1,
const Rectangle& rRect2,
- BOOL bSelected,
- BOOL bDropTarget,
- BOOL bCursored,
+ sal_Bool bSelected,
+ sal_Bool bDropTarget,
+ sal_Bool bCursored,
OutputDevice* pOut,
- BOOL bIsBackgroundPainted = FALSE);
+ sal_Bool bIsBackgroundPainted = sal_False);
void PaintItem(
const Rectangle& rRect,
IcnViewFieldType eItem,
SvxIconChoiceCtrlEntry* pEntry,
- USHORT nPaintFlags,
+ sal_uInt16 nPaintFlags,
OutputDevice* pOut,
const String* pStr = 0,
::vcl::ControlLayoutData* _pLayoutData = NULL );
- // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == TRUE
+ // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == sal_True
void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); }
// berechnet alle invalidierten BoundingRects neu
void UpdateBoundingRects();
- void ShowTargetEmphasis( SvxIconChoiceCtrlEntry* pEntry, BOOL bShow );
+ void ShowTargetEmphasis( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bShow );
void PrepareCommandEvent( const CommandEvent& );
void Command( const CommandEvent& rCEvt );
void ToTop( SvxIconChoiceCtrlEntry* );
- ULONG GetSelectionCount() const;
+ sal_uLong GetSelectionCount() const;
void SetGrid( const Size& );
Size GetMinGrid() const;
- ULONG GetGridCount(
+ sal_uLong GetGridCount(
const Size& rSize,
- BOOL bCheckScrBars,
- BOOL bSmartScrBar ) const;
- void Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar = FALSE );
+ sal_Bool bCheckScrBars,
+ sal_Bool bSmartScrBar ) const;
+ void Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar = sal_False );
const Size& GetItemSize( SvxIconChoiceCtrlEntry*, IcnViewFieldType ) const;
void HideDDIcon();
@@ -448,67 +448,67 @@ public:
SvxIconChoiceCtrlEntry* pRefEntry,
const Point& rPos );
- BOOL IsOver(
+ sal_Bool IsOver(
SvPtrarr* pSelectedRectList,
const Rectangle& rEntryBoundRect ) const;
void SelectRect(
const Rectangle&,
- BOOL bAdd = TRUE,
+ sal_Bool bAdd = sal_True,
SvPtrarr* pOtherRects = 0 );
void CalcScrollOffsets(
const Point& rRefPosPixel,
long& rX,
long& rY,
- BOOL bDragDrop = FALSE,
- USHORT nBorderWidth = 10 );
+ sal_Bool bDragDrop = sal_False,
+ sal_uInt16 nBorderWidth = 10 );
- BOOL IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos );
+ sal_Bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos );
void MakeVisible(
const Rectangle& rDocPos,
- BOOL bInScrollBarEvent=FALSE,
- BOOL bCallRectChangedHdl = TRUE );
+ sal_Bool bInScrollBarEvent=sal_False,
+ sal_Bool bCallRectChangedHdl = sal_True );
void AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart = 0 );
void SetEntryTextMode( SvxIconChoiceCtrlTextMode, SvxIconChoiceCtrlEntry* pEntry = 0 );
SvxIconChoiceCtrlTextMode GetTextMode( const SvxIconChoiceCtrlEntry* pEntry = 0 ) const;
void ShowEntryFocusRect( const SvxIconChoiceCtrlEntry* pEntry );
- void EnableEntryEditing( BOOL bEnable ) { bEntryEditingEnabled = bEnable; }
- BOOL IsEntryEditingEnabled() const { return bEntryEditingEnabled; }
- BOOL IsEntryEditing() const { return (BOOL)(pCurEditedEntry!=0); }
+ void EnableEntryEditing( sal_Bool bEnable ) { bEntryEditingEnabled = bEnable; }
+ sal_Bool IsEntryEditingEnabled() const { return bEntryEditingEnabled; }
+ sal_Bool IsEntryEditing() const { return (sal_Bool)(pCurEditedEntry!=0); }
void EditEntry( SvxIconChoiceCtrlEntry* pEntry );
- void StopEntryEditing( BOOL bCancel );
- void LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, BOOL bLock );
- ULONG GetEntryCount() const { return aEntries.Count(); }
- SvxIconChoiceCtrlEntry* GetEntry( ULONG nPos ) const { return (SvxIconChoiceCtrlEntry*)aEntries.GetObject(nPos); }
- SvxIconChoiceCtrlEntry* GetFirstSelectedEntry( ULONG& ) const;
- SvxIconChoiceCtrlEntry* GetNextSelectedEntry( ULONG& ) const;
+ void StopEntryEditing( sal_Bool bCancel );
+ void LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bLock );
+ sal_uLong GetEntryCount() const { return aEntries.Count(); }
+ SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return (SvxIconChoiceCtrlEntry*)aEntries.GetObject(nPos); }
+ SvxIconChoiceCtrlEntry* GetFirstSelectedEntry( sal_uLong& ) const;
+ SvxIconChoiceCtrlEntry* GetNextSelectedEntry( sal_uLong& ) const;
SvxIconChoiceCtrlEntry* GetHdlEntry() const { return pHdlEntry; }
void SetHdlEntry( SvxIconChoiceCtrlEntry* pEntry ) { pHdlEntry = pEntry; }
SvxIconChoiceCtrlTextMode GetEntryTextModeSmart( const SvxIconChoiceCtrlEntry* pEntry ) const;
void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; }
SelectionMode GetSelectionMode() const { return eSelectionMode; }
- BOOL AreEntriesMoved() const { return (BOOL)((nFlags & F_MOVED_ENTRIES)!=0); }
- void SetEntriesMoved( BOOL bMoved )
+ sal_Bool AreEntriesMoved() const { return (sal_Bool)((nFlags & F_MOVED_ENTRIES)!=0); }
+ void SetEntriesMoved( sal_Bool bMoved )
{
if( bMoved ) nFlags |= F_MOVED_ENTRIES;
else nFlags &= ~(F_MOVED_ENTRIES);
}
- ULONG GetEntryListPos( SvxIconChoiceCtrlEntry* ) const;
- void SetEntryListPos( SvxIconChoiceCtrlEntry* pEntry, ULONG nNewPos );
+ sal_uLong GetEntryListPos( SvxIconChoiceCtrlEntry* ) const;
+ void SetEntryListPos( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nNewPos );
void SetEntryImageSize( const Size& rSize ) { aImageSize = rSize; }
- void SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, USHORT nFlags );
- SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, BOOL bRight );
- SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, BOOL bDown );
+ void SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nFlags );
+ SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, sal_Bool bRight );
+ SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown );
void InitSettings();
Rectangle GetOutputRect() const;
- BOOL ArePredecessorsSet() const { return (BOOL)(pHead != 0); }
+ sal_Bool ArePredecessorsSet() const { return (sal_Bool)(pHead != 0); }
SvxIconChoiceCtrlEntry* GetPredecessorHead() const { return pHead; }
void SetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry* pPredecessor);
- BOOL GetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry** ppPredecessor);
+ sal_Bool GetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry** ppPredecessor);
// liefert gueltige Ergebnisse nur im AutoArrange-Modus!
SvxIconChoiceCtrlEntry* FindEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry, const Point& );
@@ -516,24 +516,24 @@ public:
SvxIconChoiceCtrlPositionMode GetPositionMode() const { return ePositionMode;}
void Flush();
- void SetColumn( USHORT nIndex, const SvxIconChoiceCtrlColumnInfo& );
- const SvxIconChoiceCtrlColumnInfo* GetColumn( USHORT nIndex ) const;
- const SvxIconChoiceCtrlColumnInfo* GetItemColumn( USHORT nSubItem, long& rLeft ) const;
+ void SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& );
+ const SvxIconChoiceCtrlColumnInfo* GetColumn( sal_uInt16 nIndex ) const;
+ const SvxIconChoiceCtrlColumnInfo* GetItemColumn( sal_uInt16 nSubItem, long& rLeft ) const;
Rectangle GetDocumentRect() const { return Rectangle( Point(), aVirtOutputSize ); }
Rectangle GetVisibleRect() const { return GetOutputRect(); }
- void SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,BOOL bKeepHighlightFlags=FALSE );
+ void SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,sal_Bool bKeepHighlightFlags=sal_False );
void HideEntryHighlightFrame();
void DrawHighlightFrame( OutputDevice* pOut,
- const Rectangle& rBmpRect, BOOL bHide );
+ const Rectangle& rBmpRect, sal_Bool bHide );
void StopSelectTimer() { aCallSelectHdlTimer.Stop(); }
void Tracking( const TrackingEvent& rTEvt );
Point GetPopupMenuPosPixel() const;
- BOOL HandleShortCutKey( const KeyEvent& rKeyEvent );
+ sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent );
- void CallEventListeners( ULONG nEvent, void* pData = NULL );
+ void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
inline ::svt::IAccessibleFactory&
GetAccessibleFactory() { return aAccFactory.getFactory(); }
@@ -555,12 +555,12 @@ class IcnCursor_Impl
void ImplCreate();
void Create() { if( !pColumns ) ImplCreate(); }
- USHORT GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
- SvxIconChoiceCtrlEntry* SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,USHORT nPref,
- BOOL bDown, BOOL bSimple );
+ sal_uInt16 GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
+ SvxIconChoiceCtrlEntry* SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,sal_uInt16 nPref,
+ sal_Bool bDown, sal_Bool bSimple );
- SvxIconChoiceCtrlEntry* SearchRow(USHORT nRow,USHORT nRight,USHORT nLeft,USHORT nPref,
- BOOL bRight, BOOL bSimple );
+ SvxIconChoiceCtrlEntry* SearchRow(sal_uInt16 nRow,sal_uInt16 nRight,sal_uInt16 nLeft,sal_uInt16 nPref,
+ sal_Bool bRight, sal_Bool bSimple );
public:
IcnCursor_Impl( SvxIconChoiceCtrl_Impl* pOwner );
@@ -568,9 +568,9 @@ public:
void Clear();
// fuer Cursortravelling usw.
- SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, BOOL bRight );
- SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, BOOL bDown );
- SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, BOOL bDown );
+ SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, sal_Bool bRight );
+ SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown );
+ SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown );
// Erzeugt fuer jede Zeile (Hoehe=nGridDY) eine nach BoundRect.Left()
// sortierte Liste der Eintraege, die in ihr stehen. Eine Liste kann
@@ -582,7 +582,7 @@ public:
// ----------------------------------------------------------------------------------------------
-typedef ULONG GridId;
+typedef sal_uLong GridId;
#define GRID_NOT_FOUND ((GridId)ULONG_MAX)
@@ -590,14 +590,14 @@ class IcnGridMap_Impl
{
Rectangle _aLastOccupiedGrid;
SvxIconChoiceCtrl_Impl* _pView;
- BOOL* _pGridMap;
- USHORT _nGridCols, _nGridRows;
+ sal_Bool* _pGridMap;
+ sal_uInt16 _nGridCols, _nGridRows;
void Expand();
void Create_Impl();
void Create() { if(!_pGridMap) Create_Impl(); }
- void GetMinMapSize( USHORT& rDX, USHORT& rDY ) const;
+ void GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const;
public:
IcnGridMap_Impl(SvxIconChoiceCtrl_Impl* pView);
@@ -605,22 +605,22 @@ public:
void Clear();
- GridId GetGrid( const Point& rDocPos, BOOL* pbClipped = 0 );
- GridId GetGrid( USHORT nGridX, USHORT nGridY );
- GridId GetUnoccupiedGrid( BOOL bOccupyFound=TRUE );
+ GridId GetGrid( const Point& rDocPos, sal_Bool* pbClipped = 0 );
+ GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY );
+ GridId GetUnoccupiedGrid( sal_Bool bOccupyFound=sal_True );
- void OccupyGrids( const Rectangle&, BOOL bOccupy = TRUE );
- void OccupyGrids( const SvxIconChoiceCtrlEntry*, BOOL bOccupy = TRUE );
- void OccupyGrid( GridId nId, BOOL bOccupy = TRUE )
+ void OccupyGrids( const Rectangle&, sal_Bool bOccupy = sal_True );
+ void OccupyGrids( const SvxIconChoiceCtrlEntry*, sal_Bool bOccupy = sal_True );
+ void OccupyGrid( GridId nId, sal_Bool bOccupy = sal_True )
{
- DBG_ASSERT(!_pGridMap || nId<(ULONG)(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
- if(_pGridMap && nId < (ULONG)(_nGridCols *_nGridRows) )
+ DBG_ASSERT(!_pGridMap || nId<(sal_uLong)(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
+ if(_pGridMap && nId < (sal_uLong)(_nGridCols *_nGridRows) )
_pGridMap[ nId ] = bOccupy;
}
Rectangle GetGridRect( GridId );
- void GetGridCoord( GridId, USHORT& rGridX, USHORT& rGridY );
- static ULONG GetGridCount( const Size& rSizePixel, USHORT nGridWidth, USHORT nGridHeight );
+ void GetGridCoord( GridId, sal_uInt16& rGridX, sal_uInt16& rGridY );
+ static sal_uLong GetGridCount( const Size& rSizePixel, sal_uInt16 nGridWidth, sal_uInt16 nGridHeight );
void OutputSizeChanged();
};
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index fb3f11060adf..640f6c5ae923 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -41,7 +41,7 @@
#include <vcl/mnemonic.hxx>
#include <vcl/controllayout.hxx>
-#include "ivctrl.hxx"
+#include <svtools/ivctrl.hxx>
#include "imivctl.hxx"
#include <svtools/svmedit.hxx>
@@ -69,7 +69,7 @@ struct SvxIconChoiceCtrlEntry_Impl
: _pEntry( pEntry), _aPos( rBoundRect.TopLeft()) {}
};
-static BOOL bEndScrollInvalidate = TRUE;
+static sal_Bool bEndScrollInvalidate = sal_True;
class IcnViewEdit_Impl : public MultiLineEdit
{
@@ -77,9 +77,9 @@ class IcnViewEdit_Impl : public MultiLineEdit
Accelerator aAccReturn;
Accelerator aAccEscape;
Timer aTimer;
- BOOL bCanceled;
- BOOL bAlreadyInCallback;
- BOOL bGrabFocus;
+ sal_Bool bCanceled;
+ sal_Bool bAlreadyInCallback;
+ sal_Bool bGrabFocus;
void CallCallBackHdl_Impl();
DECL_LINK( Timeout_Impl, Timer * );
@@ -98,9 +98,9 @@ public:
~IcnViewEdit_Impl();
virtual void KeyInput( const KeyEvent& rKEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
- BOOL EditingCanceled() const { return bCanceled; }
- void StopEditing( BOOL bCancel = FALSE );
- BOOL IsGrabFocus() const { return bGrabFocus; }
+ sal_Bool EditingCanceled() const { return bCanceled; }
+ void StopEditing( sal_Bool bCancel = sal_False );
+ sal_Bool IsGrabFocus() const { return bGrabFocus; }
};
SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
@@ -112,7 +112,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
aImageSize( 32, 32 ),
pColumns( 0 )
{
- bChooseWithCursor=FALSE;
+ bChooseWithCursor=sal_False;
pEntryPaintDev = 0;
pCurEditedEntry = 0;
pCurHighlightFrame = 0;
@@ -123,10 +123,10 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
pHdlEntry = 0;
pHead = NULL;
pCursor = NULL;
- bUpdateMode = TRUE;
- bEntryEditingEnabled = FALSE;
- bInDragDrop = FALSE;
- bHighlightFramePressed = FALSE;
+ bUpdateMode = sal_True;
+ bEntryEditingEnabled = sal_False;
+ bInDragDrop = sal_False;
+ bHighlightFramePressed = sal_False;
eSelectionMode = MULTIPLE_SELECTION;
pView = pCurView;
pZOrderList = new List; //SvPtrarr;
@@ -166,7 +166,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
aVisRectChangedTimer.SetTimeout( 50 );
aVisRectChangedTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,VisRectChangedHdl));
- Clear( TRUE );
+ Clear( sal_True );
SetGrid( Size(100, 70) );
}
@@ -190,17 +190,17 @@ SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl()
ClearColumnList();
}
-void SvxIconChoiceCtrl_Impl::Clear( BOOL bInCtor )
+void SvxIconChoiceCtrl_Impl::Clear( sal_Bool bInCtor )
{
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
nSelectionCount = 0;
DELETEZ(pDraggedSelection);
- bInDragDrop = FALSE;
+ bInDragDrop = sal_False;
pCurHighlightFrame = 0;
StopEditTimer();
CancelUserEvents();
- ShowCursor( FALSE );
- bBoundRectsDirty = FALSE;
+ ShowCursor( sal_False );
+ bBoundRectsDirty = sal_False;
nMaxBoundHeight = 0;
nFlags &= ~(F_PAINTED | F_MOVED_ENTRIES);
@@ -224,8 +224,8 @@ void SvxIconChoiceCtrl_Impl::Clear( BOOL bInCtor )
pView->Invalidate(INVALIDATE_NOCHILDREN);
}
AdjustScrollBars();
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
delete pCur;
@@ -254,19 +254,19 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle )
IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollUpDownHdl, ScrollBar*, pScrollBar )
{
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
// Pfeil hoch: delta=-1; Pfeil runter: delta=+1
- Scroll( 0, pScrollBar->GetDelta(), TRUE );
- bEndScrollInvalidate = TRUE;
+ Scroll( 0, pScrollBar->GetDelta(), sal_True );
+ bEndScrollInvalidate = sal_True;
return 0;
}
IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollLeftRightHdl, ScrollBar*, pScrollBar )
{
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
// Pfeil links: delta=-1; Pfeil rechts: delta=+1
- Scroll( pScrollBar->GetDelta(), 0, TRUE );
- bEndScrollInvalidate = TRUE;
+ Scroll( pScrollBar->GetDelta(), 0, sal_True );
+ bEndScrollInvalidate = sal_True;
return 0;
}
@@ -288,11 +288,11 @@ void SvxIconChoiceCtrl_Impl::FontModified()
DELETEZ(pDDTempDev);
DELETEZ(pEntryPaintDev);
SetDefaultTextSize();
- ShowCursor( FALSE );
- ShowCursor( TRUE );
+ ShowCursor( sal_False );
+ ShowCursor( sal_True );
}
-void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, ULONG nPos,
+void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos,
const Point* pPos )
{
StopEditTimer();
@@ -309,13 +309,13 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, ULONG
{
Size aSize( CalcBoundingSize( pEntry ) );
SetBoundingRect_Impl( pEntry, *pPos, aSize );
- SetEntryPos( pEntry, *pPos, FALSE, TRUE, TRUE /*keep grid map*/ );
+ SetEntryPos( pEntry, *pPos, sal_False, sal_True, sal_True /*keep grid map*/ );
pEntry->nFlags |= ICNVIEW_FLAG_POS_MOVED;
- SetEntriesMoved( TRUE );
+ SetEntriesMoved( sal_True );
}
else
{
- // wenn der UpdateMode TRUE ist, wollen wir nicht pauschal alle
+ // wenn der UpdateMode sal_True ist, wollen wir nicht pauschal alle
// BoundRects auf 'zu ueberpruefen' setzen, sondern nur das des
// neuen Eintrags. Deshalb kein InvalidateBoundingRect aufrufen!
pEntry->aRect.Right() = LONG_MAX;
@@ -342,8 +342,8 @@ void SvxIconChoiceCtrl_Impl::CreateAutoMnemonics( MnemonicGenerator* _pGenerator
pAutoDeleteOwnGenerator.reset( _pGenerator );
}
- ULONG nEntryCount = GetEntryCount();
- ULONG i;
+ sal_uLong nEntryCount = GetEntryCount();
+ sal_uLong i;
// insert texts in generator
for( i = 0; i < nEntryCount; ++i )
@@ -376,8 +376,8 @@ void SvxIconChoiceCtrl_Impl::SetListPositions()
if( nFlags & F_ENTRYLISTPOS_VALID )
return;
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
pEntry->nPos = nCur;
@@ -387,14 +387,14 @@ void SvxIconChoiceCtrl_Impl::SetListPositions()
void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
{
- BOOL bSyncSingleSelection;
+ sal_Bool bSyncSingleSelection;
// bei Single-Selection wird die Selektion beim Umsetzen des Cursors
// mitgefuehrt. Das soll aber nur erfolgen, wenn ueberhaupt ein
// Eintrag selektiert ist.
if( GetSelectionCount() )
- bSyncSingleSelection = TRUE;
+ bSyncSingleSelection = sal_True;
else
- bSyncSingleSelection = FALSE;
+ bSyncSingleSelection = sal_False;
if( pEntry == pCurHighlightFrame )
pCurHighlightFrame = 0;
@@ -402,7 +402,7 @@ void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
if( bInDragDrop )
{
DELETEZ(pDraggedSelection);
- bInDragDrop = FALSE;
+ bInDragDrop = sal_False;
}
if( pEntry->IsSelected() )
@@ -419,25 +419,25 @@ void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
pAnchor = 0;
if( pEntry->IsSelected() )
nSelectionCount--;
- BOOL bEntryBoundValid = IsBoundingRectValid( pEntry->aRect );
+ sal_Bool bEntryBoundValid = IsBoundingRectValid( pEntry->aRect );
if( bEntryBoundValid )
pView->Invalidate( pEntry->aRect );
- BOOL bSetNewCursor = FALSE;
+ sal_Bool bSetNewCursor = sal_False;
SvxIconChoiceCtrlEntry* pNewCursor = NULL;
if( pEntry == pCursor )
{
- bSetNewCursor = TRUE;
+ bSetNewCursor = sal_True;
pNewCursor = FindNewCursor();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pCursor = 0;
}
- BOOL bCurEntryPosValid = (nFlags & F_ENTRYLISTPOS_VALID) ? TRUE : FALSE;
+ sal_Bool bCurEntryPosValid = (nFlags & F_ENTRYLISTPOS_VALID) ? sal_True : sal_False;
if( bCurEntryPosValid && aEntries.GetObject(aEntries.Count()-1) != pEntry )
nFlags &= ~F_ENTRYLISTPOS_VALID;
- ULONG nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uLong nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos );
if( bCurEntryPosValid )
{
@@ -455,12 +455,12 @@ void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
{
// Fokusrechteck asynchron einblenden, um das Loeschen einer
// Multiselektion zu beschleunigen.
- SetCursor( pNewCursor, bSyncSingleSelection, TRUE );
+ SetCursor( pNewCursor, bSyncSingleSelection, sal_True );
}
}
-void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bSelect,
- BOOL bCallHdl, BOOL bAdd, BOOL bSyncPaint )
+void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect,
+ sal_Bool bCallHdl, sal_Bool bAdd, sal_Bool bSyncPaint )
{
if( eSelectionMode == NO_SELECTION )
return;
@@ -477,7 +477,7 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL b
if( pEntry->IsSelected() != bSelect )
{
pHdlEntry = pEntry;
- USHORT nEntryFlags = pEntry->GetFlags();
+ sal_uInt16 nEntryFlags = pEntry->GetFlags();
if( bSelect )
{
nEntryFlags |= ICNVIEW_FLAG_SELECTED;
@@ -498,8 +498,8 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL b
}
}
-void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL bSelect,
- BOOL bSyncPaint )
+void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect,
+ sal_Bool bSyncPaint )
{
// bei SingleSelection dafuer sorgen, dass der Cursor immer
// auf dem (einzigen) selektierten Eintrag steht. Aber nur,
@@ -519,7 +519,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL
if( bUpdateMode )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( pView->IsTracking() && (bSelect || !pView->HasBackground()) ) // beim Tracken immer synchron
PaintEntry( pEntry );
else if( bSyncPaint ) // synchron & mit virtuellem OutDev!
@@ -529,7 +529,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL
pView->Invalidate( CalcFocusRect( pEntry ) );
}
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
// #i101012# emit vcl event LISTBOX_SELECT only in case that the given entry is selected.
@@ -544,8 +544,8 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
StopEditTimer();
aVirtOutputSize.Width() = 0;
aVirtOutputSize.Height() = 0;
- const ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
pCur->ClearFlags( ICNVIEW_FLAG_POS_MOVED );
@@ -567,8 +567,8 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
if( aVirtOutputSize.Width() < aRealOutputSize.Width() ||
aVirtOutputSize.Height() < aRealOutputSize.Height() )
{
- ULONG nGridCount = IcnGridMap_Impl::GetGridCount(
- aRealOutputSize, (USHORT)nGridDX, (USHORT)nGridDY );
+ sal_uLong nGridCount = IcnGridMap_Impl::GetGridCount(
+ aRealOutputSize, (sal_uInt16)nGridDX, (sal_uInt16)nGridDY );
if( nGridCount < nCount )
{
if( nWinBits & WB_ALIGN_TOP )
@@ -616,11 +616,11 @@ void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const Rectangle& rRect )
void SvxIconChoiceCtrl_Impl::InitPredecessors()
{
DBG_ASSERT(!pHead,"SvxIconChoiceCtrl_Impl::InitPredecessors() >> Already initialized");
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( nCount )
{
SvxIconChoiceCtrlEntry* pPrev = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( 0 );
- for( ULONG nCur = 1; nCur <= nCount; nCur++ )
+ for( sal_uLong nCur = 1; nCur <= nCount; nCur++ )
{
pPrev->ClearFlags( ICNVIEW_FLAG_POS_LOCKED | ICNVIEW_FLAG_POS_MOVED |
ICNVIEW_FLAG_PRED_SET);
@@ -645,8 +645,8 @@ void SvxIconChoiceCtrl_Impl::ClearPredecessors()
{
if( pHead )
{
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
pCur->pflink = 0;
@@ -657,7 +657,7 @@ void SvxIconChoiceCtrl_Impl::ClearPredecessors()
}
}
-void SvxIconChoiceCtrl_Impl::Arrange( BOOL bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight )
+void SvxIconChoiceCtrl_Impl::Arrange( sal_Bool bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight )
{
if ( nSetMaxVirtWidth != 0 )
nMaxVirtWidth = nSetMaxVirtWidth;
@@ -672,23 +672,23 @@ void SvxIconChoiceCtrl_Impl::Arrange( BOOL bKeepPredecessors, long nSetMaxVirtWi
ImpArrange( bKeepPredecessors );
}
-void SvxIconChoiceCtrl_Impl::ImpArrange( BOOL bKeepPredecessors )
+void SvxIconChoiceCtrl_Impl::ImpArrange( sal_Bool bKeepPredecessors )
{
static Point aEmptyPoint;
- BOOL bOldUpdate = bUpdateMode;
+ sal_Bool bOldUpdate = bUpdateMode;
Rectangle aCurOutputArea( GetOutputRect() );
if( (nWinBits & WB_SMART_ARRANGE) && aCurOutputArea.TopLeft() != aEmptyPoint )
- bUpdateMode = FALSE;
+ bUpdateMode = sal_False;
aAutoArrangeTimer.Stop();
nFlags &= ~F_MOVED_ENTRIES;
nFlags |= F_ARRANGING;
StopEditTimer();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
ResetVirtSize();
if( !bKeepPredecessors )
ClearPredecessors();
- bBoundRectsDirty = FALSE;
+ bBoundRectsDirty = sal_False;
SetOrigin( Point() );
VisRectChanged();
RecalcAllBoundingRectsSmart();
@@ -701,12 +701,12 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( BOOL bKeepPredecessors )
MakeVisible( aCurOutputArea );
SetUpdateMode( bOldUpdate );
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
{
- bEndScrollInvalidate = FALSE;
+ bEndScrollInvalidate = sal_False;
#if defined(OV_DRAWGRID)
Color aOldColor ( pView->GetLineColor() );
@@ -755,14 +755,14 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
if( !pCursor )
{
// set cursor to item with focus-flag
- BOOL bfound = FALSE;
- for ( ULONG i = 0; i < pView->GetEntryCount() && !bfound; i++)
+ sal_Bool bfound = sal_False;
+ for ( sal_uLong i = 0; i < pView->GetEntryCount() && !bfound; i++)
{
SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry ( i );
if( pEntry->IsFocused() )
{
pCursor = pEntry;
- bfound=TRUE;
+ bfound=sal_True;
}
}
@@ -774,31 +774,31 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
if ( pView->HasFocus() )
GetFocus();
- ULONG nCount = pZOrderList->Count();
+ sal_uLong nCount = pZOrderList->Count();
if( !nCount )
return;
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() )
{
Rectangle aOutputArea( GetOutputRect() );
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
pView->SetClipRegion( aOutputArea );
}
- const USHORT nListInitSize = aEntries.Count() > USHRT_MAX ?
- USHRT_MAX : (USHORT)aEntries.Count();
+ const sal_uInt16 nListInitSize = aEntries.Count() > USHRT_MAX ?
+ USHRT_MAX : (sal_uInt16)aEntries.Count();
List* pNewZOrderList = new List( nListInitSize );
List* pPaintedEntries = new List( nListInitSize );
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
while( nCount )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nPos ));
const Rectangle& rBoundRect = GetEntryBoundRect( pEntry );
if( rRect.IsOver( rBoundRect ) )
{
- PaintEntry( pEntry, rBoundRect.TopLeft(), pView, TRUE );
+ PaintEntry( pEntry, rBoundRect.TopLeft(), pView, sal_True );
// Eintraege, die neu gezeichnet werden, auf Top setzen
pPaintedEntries->Insert( pEntry, LIST_APPEND );
}
@@ -813,7 +813,7 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
nCount = pPaintedEntries->Count();
if( nCount )
{
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
pZOrderList->Insert( pPaintedEntries->GetObject(nCur), LIST_APPEND);
}
delete pPaintedEntries;
@@ -822,20 +822,20 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
pView->SetClipRegion();
}
-void SvxIconChoiceCtrl_Impl::RepaintEntries( USHORT nEntryFlagsMask )
+void SvxIconChoiceCtrl_Impl::RepaintEntries( sal_uInt16 nEntryFlagsMask )
{
- const ULONG nCount = pZOrderList->Count();
+ const sal_uLong nCount = pZOrderList->Count();
if( !nCount )
return;
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
Rectangle aOutRect( GetOutputRect() );
if( !pView->IsClipRegion() )
{
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
pView->SetClipRegion( aOutRect );
}
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nCur));
if( pEntry->GetFlags() & nEntryFlagsMask )
@@ -871,28 +871,28 @@ IcnViewFieldType SvxIconChoiceCtrl_Impl::GetItem( SvxIconChoiceCtrlEntry* pEntry
return IcnViewFieldTypeDontknow;
}
-BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
+sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
{
- BOOL bHandled = TRUE;
- bHighlightFramePressed = FALSE;
+ sal_Bool bHandled = sal_True;
+ bHighlightFramePressed = sal_False;
StopEditTimer();
- BOOL bGotFocus = (BOOL)(!pView->HasFocus() && !(nWinBits & WB_NOPOINTERFOCUS));
+ sal_Bool bGotFocus = (sal_Bool)(!pView->HasFocus() && !(nWinBits & WB_NOPOINTERFOCUS));
if( !(nWinBits & WB_NOPOINTERFOCUS) )
pView->GrabFocus();
Point aDocPos( rMEvt.GetPosPixel() );
if(aDocPos.X()>=aOutputSize.Width() || aDocPos.Y()>=aOutputSize.Height())
- return FALSE;
+ return sal_False;
ToDocPos( aDocPos );
- SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, TRUE );
+ SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True );
if( pEntry )
- MakeEntryVisible( pEntry, FALSE );
+ MakeEntryVisible( pEntry, sal_False );
if( rMEvt.IsShift() && eSelectionMode != SINGLE_SELECTION )
{
if( pEntry )
- SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), TRUE);
- return TRUE;
+ SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), sal_True);
+ return sal_True;
}
if( pAnchor && (rMEvt.IsShift() || rMEvt.IsMod1())) // Tastaturselektion?
@@ -923,7 +923,7 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
if( !pEntry && !(nWinBits & WB_NODRAGSELECTION))
pView->StartTracking( STARTTRACK_SCROLLREPEAT );
- return TRUE;
+ return sal_True;
}
else
{
@@ -945,17 +945,17 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
pView->StartTracking( STARTTRACK_SCROLLREPEAT );
}
else
- bHandled = FALSE;
+ bHandled = sal_False;
return bHandled;
}
}
- BOOL bSelected = pEntry->IsSelected();
- BOOL bEditingEnabled = IsEntryEditingEnabled();
+ sal_Bool bSelected = pEntry->IsSelected();
+ sal_Bool bEditingEnabled = IsEntryEditingEnabled();
if( rMEvt.GetClicks() == 2 )
{
DeselectAllBut( pEntry );
- SelectEntry( pEntry, TRUE, TRUE, FALSE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True );
pHdlEntry = pEntry;
pView->ClickIcon();
}
@@ -986,8 +986,8 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
if( rMEvt.IsLeft() && (nWinBits & WB_HIGHLIGHTFRAME) )
{
pCurHighlightFrame = 0; // Neues painten des Frames erzwingen
- bHighlightFramePressed = TRUE;
- SetEntryHighlightFrame( pEntry, TRUE );
+ bHighlightFramePressed = sal_True;
+ SetEntryHighlightFrame( pEntry, sal_True );
}
}
else
@@ -996,9 +996,9 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
{
if( !bSelected )
{
- DeselectAllBut( pEntry, TRUE /* Synchron painten */ );
+ DeselectAllBut( pEntry, sal_True /* Synchron painten */ );
SetCursor( pEntry );
- SelectEntry( pEntry, TRUE, TRUE, FALSE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True );
}
else
{
@@ -1018,13 +1018,13 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
return bHandled;
}
-BOOL SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
if( rMEvt.IsRight() && (nFlags & (F_DOWN_CTRL | F_DOWN_DESELECT) ))
{
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
- bHandled = TRUE;
+ bHandled = sal_True;
}
Point aDocPos( rMEvt.GetPosPixel() );
@@ -1037,59 +1037,59 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
// Ctrl & MultiSelection
ToggleSelection( pDocEntry );
SetCursor( pDocEntry );
- bHandled = TRUE;
+ bHandled = sal_True;
}
else if( nFlags & F_DOWN_DESELECT )
{
DeselectAllBut( pDocEntry );
SetCursor( pDocEntry );
- SelectEntry( pDocEntry, TRUE, TRUE, FALSE, TRUE );
- bHandled = TRUE;
+ SelectEntry( pDocEntry, sal_True, sal_True, sal_False, sal_True );
+ bHandled = sal_True;
}
}
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
if( nFlags & F_START_EDITTIMER_IN_MOUSEUP )
{
- bHandled = TRUE;
+ bHandled = sal_True;
StartEditTimer();
nFlags &= ~F_START_EDITTIMER_IN_MOUSEUP;
}
if((nWinBits & WB_HIGHLIGHTFRAME) && bHighlightFramePressed && pCurHighlightFrame)
{
- bHandled = TRUE;
+ bHandled = sal_True;
SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame;
pCurHighlightFrame = 0; // Neues painten des Frames erzwingen
- bHighlightFramePressed = FALSE;
- SetEntryHighlightFrame( pEntry, TRUE );
+ bHighlightFramePressed = sal_False;
+ SetEntryHighlightFrame( pEntry, sal_True );
pHdlEntry = pCurHighlightFrame;
pView->ClickIcon();
// set focus on Icon
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
- SetCursor_Impl( pOldCursor, pHdlEntry, FALSE, FALSE, TRUE );
+ SetCursor_Impl( pOldCursor, pHdlEntry, sal_False, sal_False, sal_True );
pHdlEntry = 0;
}
return bHandled;
}
-BOOL SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt )
{
const Point aDocPos( pView->PixelToLogic(rMEvt.GetPosPixel()) );
if( pView->IsTracking() )
- return FALSE;
+ return sal_False;
else if( nWinBits & WB_HIGHLIGHTFRAME )
{
- SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, TRUE );
+ SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True );
SetEntryHighlightFrame( pEntry );
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
@@ -1113,7 +1113,7 @@ void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
long nScrollDX, nScrollDY;
- CalcScrollOffsets( aPosPixel, nScrollDX, nScrollDY, FALSE );
+ CalcScrollOffsets( aPosPixel, nScrollDX, nScrollDY, sal_False );
if( nScrollDX || nScrollDY )
{
pView->HideTracking();
@@ -1123,7 +1123,7 @@ void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
if( aRect != aCurSelectionRect )
{
pView->HideTracking();
- BOOL bAdd = (nFlags & F_ADD_MODE) ? TRUE : FALSE;
+ sal_Bool bAdd = (nFlags & F_ADD_MODE) ? sal_True : sal_False;
SelectRect( aRect, bAdd, &aSelectedRectList );
}
pView->ShowTracking( aRect, SHOWTRACK_SMALL | SHOWTRACK_CLIP );
@@ -1131,25 +1131,25 @@ void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
}
void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor,
- SvxIconChoiceCtrlEntry* pNewCursor, BOOL bMod1, BOOL bShift, BOOL bPaintSync )
+ SvxIconChoiceCtrlEntry* pNewCursor, sal_Bool bMod1, sal_Bool bShift, sal_Bool bPaintSync )
{
if( pNewCursor )
{
SvxIconChoiceCtrlEntry* pFilterEntry = 0;
- BOOL bDeselectAll = FALSE;
+ sal_Bool bDeselectAll = sal_False;
if( eSelectionMode != SINGLE_SELECTION )
{
if( !bMod1 && !bShift )
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
else if( bShift && !bMod1 && !pAnchor )
{
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
pFilterEntry = pOldCursor;
}
}
if( bDeselectAll )
DeselectAllBut( pFilterEntry, bPaintSync );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
MakeEntryVisible( pNewCursor );
SetCursor( pNewCursor );
if( bMod1 && !bShift )
@@ -1171,41 +1171,41 @@ void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor,
}
else
{
- SelectEntry( pCursor, TRUE, TRUE, FALSE, bPaintSync );
+ SelectEntry( pCursor, sal_True, sal_True, sal_False, bPaintSync );
aCurSelectionRect = GetEntryBoundRect( pCursor );
}
}
}
-BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
{
StopEditTimer();
- BOOL bMod2 = rKEvt.GetKeyCode().IsMod2();
+ sal_Bool bMod2 = rKEvt.GetKeyCode().IsMod2();
sal_Unicode cChar = rKEvt.GetCharCode();
- ULONG nPos = (ULONG)-1;
+ sal_uLong nPos = (sal_uLong)-1;
if ( bMod2 && cChar && IsMnemonicChar( cChar, nPos ) )
{
// shortcut is clicked
SvxIconChoiceCtrlEntry* pNewCursor = GetEntry( nPos );
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
if ( pNewCursor != pOldCursor )
- SetCursor_Impl( pOldCursor, pNewCursor, FALSE, FALSE, FALSE );
- return TRUE;
+ SetCursor_Impl( pOldCursor, pNewCursor, sal_False, sal_False, sal_False );
+ return sal_True;
}
if ( bMod2 )
// no actions with <ALT>
- return FALSE;
+ return sal_False;
- BOOL bKeyUsed = TRUE;
- BOOL bMod1 = rKEvt.GetKeyCode().IsMod1();
- BOOL bShift = rKEvt.GetKeyCode().IsShift();
+ sal_Bool bKeyUsed = sal_True;
+ sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1();
+ sal_Bool bShift = rKEvt.GetKeyCode().IsShift();
if( eSelectionMode == SINGLE_SELECTION || eSelectionMode == NO_SELECTION)
{
- bShift = FALSE;
- bMod1 = FALSE;
+ bShift = sal_False;
+ bMod1 = sal_False;
}
if( bMod1 )
@@ -1214,7 +1214,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
SvxIconChoiceCtrlEntry* pNewCursor;
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case KEY_UP:
@@ -1223,10 +1223,10 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
{
MakeEntryVisible( pCursor );
if( nCode == KEY_UP )
- pNewCursor = pImpCursor->GoUpDown(pCursor,FALSE);
+ pNewCursor = pImpCursor->GoUpDown(pCursor,sal_False);
else
- pNewCursor = pImpCursor->GoPageUpDown(pCursor,FALSE);
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor = pImpCursor->GoPageUpDown(pCursor,sal_False);
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
if( !pNewCursor )
{
Rectangle aRect( GetEntryBoundRect( pCursor ) );
@@ -1253,10 +1253,10 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
if( nCode == KEY_DOWN )
- pNewCursor=pImpCursor->GoUpDown( pCursor,TRUE );
+ pNewCursor=pImpCursor->GoUpDown( pCursor,sal_True );
else
- pNewCursor=pImpCursor->GoPageUpDown( pCursor,TRUE );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor=pImpCursor->GoPageUpDown( pCursor,sal_True );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
if ( bChooseWithCursor && pNewCursor != NULL)
{
@@ -1271,8 +1271,8 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
case KEY_RIGHT:
if( pCursor )
{
- pNewCursor=pImpCursor->GoLeftRight(pCursor,TRUE );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor=pImpCursor->GoLeftRight(pCursor,sal_True );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
}
break;
@@ -1280,8 +1280,8 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
MakeEntryVisible( pCursor );
- pNewCursor = pImpCursor->GoLeftRight(pCursor,FALSE );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor = pImpCursor->GoLeftRight(pCursor,sal_False );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
if( !pNewCursor )
{
Rectangle aRect( GetEntryBoundRect(pCursor));
@@ -1299,7 +1299,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( !bMod1 && !bShift )
EditTimeoutHdl( 0 );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_F8:
@@ -1311,7 +1311,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
nFlags |= F_ADD_MODE;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SPACE:
@@ -1319,12 +1319,12 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
{
if( !bMod1 )
{
- //SelectAll( FALSE );
+ //SelectAll( sal_False );
SetNoSelection();
ClearSelectedRectList();
// click Icon with spacebar
- SetEntryHighlightFrame( GetCurEntry(), TRUE );
+ SetEntryHighlightFrame( GetCurEntry(), sal_True );
pView->ClickIcon();
pHdlEntry = pCurHighlightFrame;
pCurHighlightFrame=0;
@@ -1353,9 +1353,9 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
case KEY_DIVIDE :
case KEY_A:
if( bMod1 && (eSelectionMode != SINGLE_SELECTION))
- SelectAll( TRUE );
+ SelectAll( sal_True );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SUBTRACT:
@@ -1363,7 +1363,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( bMod1 )
SetNoSelection();
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_RETURN:
@@ -1373,14 +1373,14 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
/*pView->*/EditEntry( pCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_END:
if( pCursor )
{
pNewCursor = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( aEntries.Count() - 1 );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
}
break;
@@ -1388,12 +1388,12 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
pNewCursor = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( 0 );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
}
break;
default:
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
return bKeyUsed;
@@ -1419,7 +1419,7 @@ void SvxIconChoiceCtrl_Impl::PositionScrollBars( long nRealWidth, long nRealHeig
aVerSBar.SetPosPixel( aPos );
}
-void SvxIconChoiceCtrl_Impl::AdjustScrollBars( BOOL )
+void SvxIconChoiceCtrl_Impl::AdjustScrollBars( sal_Bool )
{
Rectangle aOldOutRect( GetOutputRect() );
long nVirtHeight = aVirtOutputSize.Height();
@@ -1451,7 +1451,7 @@ void SvxIconChoiceCtrl_Impl::AdjustScrollBars( BOOL )
sal_Bool bNoVerSBar = ( nWinBits & WB_NOVSCROLL ) != 0;
sal_Bool bNoHorSBar = ( nWinBits & WB_NOHSCROLL ) != 0;
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
if( nVirtHeight )
{
// activate ver scrollbar ?
@@ -1589,23 +1589,23 @@ void SvxIconChoiceCtrl_Impl::Resize()
VisRectChanged();
}
-BOOL SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
+sal_Bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
{
if( !pZOrderList || !aHorSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!( nWinBits & WB_HSCROLL) && !aOrigin.X() )
{
long nWidth = aOutputSize.Width();
- const ULONG nCount = pZOrderList->Count();
+ const sal_uLong nCount = pZOrderList->Count();
long nMostRight = 0;
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pZOrderList->GetObject(nCur);
long nRight = GetEntryBoundRect(pEntry).Right();
if( nRight > nWidth )
- return FALSE;
+ return sal_False;
if( nRight > nMostRight )
nMostRight = nRight;
}
@@ -1622,28 +1622,28 @@ BOOL SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
aSize.Height() += nHorSBarHeight;
aVerSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
+sal_Bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
{
if( !pZOrderList || !aVerSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!( nWinBits & WB_VSCROLL) && !aOrigin.Y() )
{
long nDeepest = 0;
long nHeight = aOutputSize.Height();
- const ULONG nCount = pZOrderList->Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = pZOrderList->Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pZOrderList->GetObject(nCur);
long nBottom = GetEntryBoundRect(pEntry).Bottom();
if( nBottom > nHeight )
- return FALSE;
+ return sal_False;
if( nBottom > nDeepest )
nDeepest = nBottom;
}
@@ -1660,9 +1660,9 @@ BOOL SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
aSize.Width() += nVerSBarWidth;
aHorSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -1685,7 +1685,7 @@ void SvxIconChoiceCtrl_Impl::GetFocus()
if( pCursor )
{
pCursor->SetFlags( ICNVIEW_FLAG_FOCUSED );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -1694,7 +1694,7 @@ void SvxIconChoiceCtrl_Impl::LoseFocus()
StopEditTimer();
if( pCursor )
pCursor->ClearFlags( ICNVIEW_FLAG_FOCUSED );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
// HideFocus ();
// pView->Invalidate ( aFocus.aRect );
@@ -1702,7 +1702,7 @@ void SvxIconChoiceCtrl_Impl::LoseFocus()
RepaintEntries( ICNVIEW_FLAG_SELECTED );
}
-void SvxIconChoiceCtrl_Impl::SetUpdateMode( BOOL bUpdate )
+void SvxIconChoiceCtrl_Impl::SetUpdateMode( sal_Bool bUpdate )
{
if( bUpdate != bUpdateMode )
{
@@ -1717,7 +1717,7 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( BOOL bUpdate )
}
}
-void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bIsBackgroundPainted )
+void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bIsBackgroundPainted )
{
Point aPos( GetEntryPos( pEntry ) );
PaintEntry( pEntry, aPos, 0, bIsBackgroundPainted );
@@ -1726,8 +1726,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bI
// Prios der Emphasis: bDropTarget => bCursored => bSelected
void SvxIconChoiceCtrl_Impl::PaintEmphasis(
const Rectangle& rTextRect, const Rectangle& rImageRect,
- BOOL bSelected, BOOL bDropTarget, BOOL bCursored, OutputDevice* pOut,
- BOOL bIsBackgroundPainted )
+ sal_Bool bSelected, sal_Bool bDropTarget, sal_Bool bCursored, OutputDevice* pOut,
+ sal_Bool bIsBackgroundPainted )
{
static Color aTransparent( COL_TRANSPARENT );
@@ -1747,14 +1747,14 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
const StyleSettings& rSettings = pOut->GetSettings().GetStyleSettings();
Color aOldFillColor( pOut->GetFillColor() );
- BOOL bSolidTextRect = FALSE;
- BOOL bSolidImageRect = FALSE;
+ sal_Bool bSolidTextRect = sal_False;
+ sal_Bool bSolidImageRect = sal_False;
if( bDropTarget && ( eSelectionMode != NO_SELECTION ) )
{
pOut->SetFillColor( rSettings.GetHighlightColor() );
- bSolidTextRect = TRUE;
- bSolidImageRect = TRUE;
+ bSolidTextRect = sal_True;
+ bSolidImageRect = sal_True;
}
else
{
@@ -1767,7 +1767,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
const Color& rFillColor = pView->GetFont().GetFillColor();
pOut->SetFillColor( rFillColor );
if( rFillColor != aTransparent )
- bSolidTextRect = TRUE;
+ bSolidTextRect = sal_True;
}
}
}
@@ -1807,14 +1807,14 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect,
- IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, USHORT nPaintFlags,
+ IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags,
OutputDevice* pOut, const String* pStr, ::vcl::ControlLayoutData* _pLayoutData )
{
if( eItem == IcnViewFieldTypeText )
{
String aText;
if( !pStr )
- aText = pView->GetEntryText( pEntry, FALSE );
+ aText = pView->GetEntryText( pEntry, sal_False );
else
aText = *pStr;
@@ -1830,7 +1830,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect,
{
Color aBkgColor( pOut->GetBackground().GetColor() );
Color aFontColor;
- USHORT nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
+ sal_uInt16 nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
if ( nColor > 127 )
aFontColor.SetColor ( COL_BLACK );
else
@@ -1908,19 +1908,19 @@ void SvxIconChoiceCtrl_Impl::PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* pEntr
void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos,
- OutputDevice* pOut, BOOL bIsBackgroundPainted )
+ OutputDevice* pOut, sal_Bool bIsBackgroundPainted )
{
if( !pOut )
pOut = pView;
- BOOL bSelected = FALSE;
+ sal_Bool bSelected = sal_False;
if( eSelectionMode != NO_SELECTION )
bSelected = pEntry->IsSelected();
- BOOL bCursored = pEntry->IsCursored();
- BOOL bDropTarget = pEntry->IsDropTarget();
- BOOL bNoEmphasis = pEntry->IsBlockingEmphasis();
+ sal_Bool bCursored = pEntry->IsCursored();
+ sal_Bool bDropTarget = pEntry->IsDropTarget();
+ sal_Bool bNoEmphasis = pEntry->IsBlockingEmphasis();
Font aTempFont( pOut->GetFont() );
@@ -1932,8 +1932,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
}
*/
- String aEntryText( pView->GetEntryText( pEntry, FALSE ) );
- Rectangle aTextRect( CalcTextRect(pEntry,&rPos,FALSE,&aEntryText));
+ String aEntryText( pView->GetEntryText( pEntry, sal_False ) );
+ Rectangle aTextRect( CalcTextRect(pEntry,&rPos,sal_False,&aEntryText));
Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos ) );
sal_Bool bShowSelection =
@@ -1973,14 +1973,14 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
pOut->SetFillColor( );
}
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() && (aVerSBar.IsVisible() || aHorSBar.IsVisible()) )
{
Rectangle aOutputArea( GetOutputRect() );
if( aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect) )
{
pView->SetClipRegion( aOutputArea );
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
}
}
@@ -1996,10 +1996,10 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
#endif
sal_Bool bLargeIconMode = WB_ICON == ( nWinBits & (VIEWMODE_MASK) );
- USHORT nBmpPaintFlags = PAINTFLAG_VER_CENTERED;
+ sal_uInt16 nBmpPaintFlags = PAINTFLAG_VER_CENTERED;
if ( bLargeIconMode )
nBmpPaintFlags |= PAINTFLAG_HOR_CENTERED;
- USHORT nTextPaintFlags = bLargeIconMode ? PAINTFLAG_HOR_CENTERED : PAINTFLAG_VER_CENTERED;
+ sal_uInt16 nTextPaintFlags = bLargeIconMode ? PAINTFLAG_HOR_CENTERED : PAINTFLAG_VER_CENTERED;
if( !bNoEmphasis )
PaintEmphasis(aTextRect,aBmpRect,bSelected,bDropTarget,bCursored,pOut,bIsBackgroundPainted);
@@ -2015,7 +2015,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
// Highlight-Frame zeichnen
if( pEntry == pCurHighlightFrame && !bNoEmphasis )
- DrawHighlightFrame( pOut, CalcFocusRect( pEntry ), FALSE );
+ DrawHighlightFrame( pOut, CalcFocusRect( pEntry ), sal_False );
pOut->SetFont( aTempFont );
if( bResetClipRegion )
@@ -2023,15 +2023,15 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
}
void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos,
- BOOL bAdjustAtGrid, BOOL bCheckScrollBars, BOOL bKeepGridMap )
+ sal_Bool bAdjustAtGrid, sal_Bool bCheckScrollBars, sal_Bool bKeepGridMap )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
Rectangle aBoundRect( GetEntryBoundRect( pEntry ));
pView->Invalidate( aBoundRect );
ToTop( pEntry );
if( !IsAutoArrange() )
{
- BOOL bAdjustVirtSize = FALSE;
+ sal_Bool bAdjustVirtSize = sal_False;
if( rPos != aBoundRect.TopLeft() )
{
Point aGridOffs(
@@ -2042,7 +2042,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
aBoundRect.SetPos( rPos );
pEntry->aRect = aBoundRect;
pEntry->aGridRect.SetPos( rPos + aGridOffs );
- bAdjustVirtSize = TRUE;
+ bAdjustVirtSize = sal_True;
}
if( bAdjustAtGrid )
{
@@ -2061,7 +2061,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
Point aNewPos( AdjustAtGrid( aCenterRect, rBoundRect ) );
Rectangle aNewBoundRect( aNewPos, pEntry->aRect.GetSize());
AdjustVirtSize( aNewBoundRect );
- bAdjustVirtSize = FALSE;
+ bAdjustVirtSize = sal_False;
}
AdjustEntryAtGrid( pEntry );
ToTop( pEntry );
@@ -2081,7 +2081,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
SetEntryPredecessor( pEntry, pPrev );
aAutoArrangeTimer.Start();
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvxIconChoiceCtrl_Impl::SetNoSelection()
@@ -2090,16 +2090,16 @@ void SvxIconChoiceCtrl_Impl::SetNoSelection()
if( !(nFlags & F_CLEARING_SELECTION ))
{
nFlags |= F_CLEARING_SELECTION;
- DeselectAllBut( 0, TRUE );
+ DeselectAllBut( 0, sal_True );
nFlags &= ~F_CLEARING_SELECTION;
}
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, BOOL bHit )
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, sal_Bool bHit )
{
CheckBoundingRects();
// Z-Order-Liste vom Ende her absuchen
- ULONG nCount = pZOrderList->Count();
+ sal_uLong nCount = pZOrderList->Count();
while( nCount )
{
nCount--;
@@ -2130,11 +2130,11 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextEntry( const Point& rDocP
{
CheckBoundingRects();
SvxIconChoiceCtrlEntry* pTarget = 0;
- const ULONG nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ const sal_uLong nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != LIST_ENTRY_NOTFOUND )
{
- const ULONG nCount = pZOrderList->Count();
- for( ULONG nCur = nStartPos+1; nCur < nCount; nCur++ )
+ const sal_uLong nCount = pZOrderList->Count();
+ for( sal_uLong nCur = nStartPos+1; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nCur));
if( pEntry->aRect.IsInside( rDocPos ) )
@@ -2151,7 +2151,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetPrevEntry( const Point& rDocP
{
CheckBoundingRects();
SvxIconChoiceCtrlEntry* pTarget = 0;
- ULONG nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ sal_uLong nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != LIST_ENTRY_NOTFOUND && nStartPos != 0 )
{
nStartPos--;
@@ -2173,7 +2173,7 @@ Point SvxIconChoiceCtrl_Impl::GetEntryPos( SvxIconChoiceCtrlEntry* pEntry )
return pEntry->aRect.TopLeft();
}
-void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, BOOL bBound )
+void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound )
{
if ( bBound )
{
@@ -2227,7 +2227,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c
}
Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry,
- const Point* pEntryPos, BOOL bEdit, const String* pStr )
+ const Point* pEntryPos, sal_Bool bEdit, const String* pStr )
{
String aEntryText;
if( !pStr )
@@ -2345,8 +2345,8 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRects()
{
nMaxBoundHeight = 0;
pZOrderList->Clear();
- ULONG nCount = aEntries.Count();
- ULONG nCur;
+ sal_uLong nCount = aEntries.Count();
+ sal_uLong nCur;
SvxIconChoiceCtrlEntry* pEntry;
if( !IsAutoArrange() || !pHead )
@@ -2371,7 +2371,7 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRects()
nCur++;
}
}
- bBoundRectsDirty = FALSE;
+ bBoundRectsDirty = sal_False;
AdjustScrollBars();
}
@@ -2379,9 +2379,9 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRectsSmart()
{
nMaxBoundHeight = 0;
pZOrderList->Clear();
- ULONG nCur;
+ sal_uLong nCur;
SvxIconChoiceCtrlEntry* pEntry;
- const ULONG nCount = aEntries.Count();
+ const sal_uLong nCount = aEntries.Count();
if( !IsAutoArrange() || !pHead )
{
@@ -2424,8 +2424,8 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRectsSmart()
void SvxIconChoiceCtrl_Impl::UpdateBoundingRects()
{
- const ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
GetEntryBoundRect( pEntry );
@@ -2441,7 +2441,7 @@ void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry )
return;
}
Size aSize( CalcBoundingSize( pEntry ) );
- Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid(TRUE)).TopLeft());
+ Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid(sal_True)).TopLeft());
SetBoundingRect_Impl( pEntry, aPos, aSize );
}
@@ -2456,33 +2456,33 @@ void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntr
}
-void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, BOOL bSyncSingleSelection,
- BOOL bShowFocusAsync )
+void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSyncSingleSelection,
+ sal_Bool bShowFocusAsync )
{
if( pEntry == pCursor )
{
if( pCursor && eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection &&
!pCursor->IsSelected() )
- SelectEntry( pCursor, TRUE, TRUE );
+ SelectEntry( pCursor, sal_True, sal_True );
return;
}
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
pCursor = pEntry;
if( pOldCursor )
{
pOldCursor->ClearFlags( ICNVIEW_FLAG_FOCUSED );
if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection )
- SelectEntry( pOldCursor, FALSE, TRUE ); // alten Cursor deselektieren
+ SelectEntry( pOldCursor, sal_False, sal_True ); // alten Cursor deselektieren
}
if( pCursor )
{
ToTop( pCursor );
pCursor->SetFlags( ICNVIEW_FLAG_FOCUSED );
if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection )
- SelectEntry( pCursor, TRUE, TRUE );
+ SelectEntry( pCursor, sal_True, sal_True );
if( !bShowFocusAsync )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
else
{
if( !nUserEventShowCursor )
@@ -2494,7 +2494,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, BOOL bSy
}
-void SvxIconChoiceCtrl_Impl::ShowCursor( BOOL bShow )
+void SvxIconChoiceCtrl_Impl::ShowCursor( sal_Bool bShow )
{
if( !pCursor || !bShow || !pView->HasFocus() )
{
@@ -2533,7 +2533,7 @@ void SvxIconChoiceCtrl_Impl::ShowDDIcon( SvxIconChoiceCtrlEntry* pRefEntry, cons
DELETEZ(pDDDev);
DELETEZ(pDDBufDev);
}
- BOOL bSelected = pRefEntry->IsSelected();
+ sal_Bool bSelected = pRefEntry->IsSelected();
pRefEntry->ClearFlags( ICNVIEW_FLAG_SELECTED );
if( !pDDDev )
{
@@ -2670,16 +2670,16 @@ void SvxIconChoiceCtrl_Impl::InvalidateBoundingRect( SvxIconChoiceCtrlEntry* pEn
}
-BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
+sal_Bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
{
Rectangle aDocRect( GetDocumentRect() );
Rectangle aVisRect( GetVisibleRect() );
if( aVisRect.IsInside( aDocRect ))
- return FALSE;
+ return sal_False;
Size aDocSize( aDocRect.GetSize() );
Size aVisSize( aVisRect.GetSize() );
- BOOL bHor = aDocSize.Width() > aVisSize.Width();
- BOOL bVer = aDocSize.Height() > aVisSize.Height();
+ sal_Bool bHor = aDocSize.Width() > aVisSize.Width();
+ sal_Bool bVer = aDocSize.Height() > aVisSize.Height();
long nScrollDX = 0, nScrollDY = 0;
@@ -2688,7 +2688,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
case COMMAND_STARTAUTOSCROLL:
{
pView->EndTracking();
- USHORT nScrollFlags = 0;
+ sal_uInt16 nScrollFlags = 0;
if( bHor )
nScrollFlags |= AUTOSCROLL_HORZ;
if( bVer )
@@ -2696,7 +2696,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
if( nScrollFlags )
{
pView->StartAutoScroll( nScrollFlags );
- return TRUE;
+ return sal_True;
}
}
break;
@@ -2706,7 +2706,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
const CommandWheelData* pData = rCmd.GetWheelData();
if( pData && (COMMAND_WHEEL_SCROLL == pData->GetMode()) && !pData->IsHorz() )
{
- ULONG nScrollLines = pData->GetScrollLines();
+ sal_uLong nScrollLines = pData->GetScrollLines();
if( nScrollLines == COMMAND_WHEEL_PAGESCROLL )
{
nScrollDY = GetScrollBarPageSize( aVisSize.Width() );
@@ -2741,9 +2741,9 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
aVisRect.Left() -= nScrollDX;
aVisRect.Right() -= nScrollDX;
MakeVisible( aVisRect );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -2770,7 +2770,7 @@ void SvxIconChoiceCtrl_Impl::ToTop( SvxIconChoiceCtrlEntry* pEntry )
{
if( pZOrderList->GetObject( pZOrderList->Count() - 1 ) != pEntry )
{
- ULONG nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uLong nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos );
pZOrderList->Insert( pEntry, LIST_APPEND );
}
@@ -2790,10 +2790,10 @@ void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const
// rRect: Bereich des Dokumentes (in Dokumentkoordinaten), der
// sichtbar gemacht werden soll.
-// bScrBar == TRUE: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
+// bScrBar == sal_True: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
-void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
- BOOL bCallRectChangedHdl )
+void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, sal_Bool bScrBar,
+ sal_Bool bCallRectChangedHdl )
{
Rectangle aVirtRect( rRect );
ClipAtVirtOutRect( aVirtRect );
@@ -2839,7 +2839,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
{
HideDDIcon();
pView->Update();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
}
// Origin fuer SV invertieren (damit wir in
@@ -2847,7 +2847,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
aOrigin *= -1;
SetOrigin( aOrigin );
- BOOL bScrollable = pView->GetBackground().IsScrollable();
+ sal_Bool bScrollable = pView->GetBackground().IsScrollable();
if( pView->HasBackground() && !bScrollable )
{
Rectangle aRect( GetOutputRect());
@@ -2879,7 +2879,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
}
if( GetUpdateMode() )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
// pruefen, ob ScrollBars noch benoetigt werden
CheckScrollBars();
@@ -2900,15 +2900,15 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindNewCursor()
SvxIconChoiceCtrlEntry* pNewCursor;
if( pCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_False );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_True );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoUpDown( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_False );
if( !pNewCursor )
- pNewCursor = pImpCursor->GoUpDown( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_True );
}
}
}
@@ -2918,7 +2918,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindNewCursor()
return pNewCursor;
}
-ULONG SvxIconChoiceCtrl_Impl::GetSelectionCount() const
+sal_uLong SvxIconChoiceCtrl_Impl::GetSelectionCount() const
{
if( (nWinBits & WB_HIGHLIGHTFRAME) && pCurHighlightFrame )
return 1;
@@ -2927,27 +2927,27 @@ ULONG SvxIconChoiceCtrl_Impl::GetSelectionCount() const
void SvxIconChoiceCtrl_Impl::ToggleSelection( SvxIconChoiceCtrlEntry* pEntry )
{
- BOOL bSel;
+ sal_Bool bSel;
if( pEntry->IsSelected() )
- bSel = FALSE;
+ bSel = sal_False;
else
- bSel = TRUE;
- SelectEntry( pEntry, bSel, TRUE, TRUE );
+ bSel = sal_True;
+ SelectEntry( pEntry, bSel, sal_True, sal_True );
}
void SvxIconChoiceCtrl_Impl::DeselectAllBut( SvxIconChoiceCtrlEntry* pThisEntryNot,
- BOOL bPaintSync )
+ sal_Bool bPaintSync )
{
ClearSelectedRectList();
//
// !!!!!!! Todo: Evtl. Z-Orderlist abarbeiten !!!!!!!
//
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
if( pEntry != pThisEntryNot && pEntry->IsSelected() )
- SelectEntry( pEntry, FALSE, TRUE, TRUE, bPaintSync );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True, bPaintSync );
}
pAnchor = 0;
nFlags &= (~F_ADD_MODE);
@@ -3083,7 +3083,7 @@ void SvxIconChoiceCtrl_Impl::Center( SvxIconChoiceCtrlEntry* pEntry ) const
// Die Deltas entsprechen Offsets, um die die View auf dem Doc verschoben wird
// links, hoch: Offsets < 0
// rechts, runter: Offsets > 0
-void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar )
+void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar )
{
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
@@ -3136,7 +3136,7 @@ static Rectangle GetHotSpot( const Rectangle& rRect )
}
void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2,
- BOOL bAdd, SvPtrarr* pOtherRects )
+ sal_Bool bAdd, SvPtrarr* pOtherRects )
{
DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr");
Rectangle aRect( GetEntryBoundRect( pEntry1 ) );
@@ -3144,7 +3144,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIco
SelectRect( aRect, bAdd, pOtherRects );
}
-void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
+void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, sal_Bool bAdd,
SvPtrarr* pOtherRects )
{
aCurSelectionRect = rRect;
@@ -3152,53 +3152,53 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
return;
// Flag setzen, damit im Select kein ToTop gerufen wird
- BOOL bAlreadySelectingRect = nFlags & F_SELECTING_RECT ? TRUE : FALSE;
+ sal_Bool bAlreadySelectingRect = nFlags & F_SELECTING_RECT ? sal_True : sal_False;
nFlags |= F_SELECTING_RECT;
CheckBoundingRects();
pView->Update();
- const ULONG nCount = pZOrderList->Count();
+ const sal_uLong nCount = pZOrderList->Count();
Rectangle aRect( rRect );
aRect.Justify();
- BOOL bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? TRUE : FALSE;
+ sal_Bool bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? sal_True : sal_False;
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() )
{
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
pView->SetClipRegion( GetOutputRect() );
}
- for( ULONG nPos = 0; nPos < nCount; nPos++ )
+ for( sal_uLong nPos = 0; nPos < nCount; nPos++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nPos ));
if( !IsBoundingRectValid( pEntry->aRect ))
FindBoundingRect( pEntry );
Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) );
- BOOL bSelected = pEntry->IsSelected();
+ sal_Bool bSelected = pEntry->IsSelected();
- BOOL bOverlaps;
+ sal_Bool bOverlaps;
if( bCalcOverlap )
bOverlaps = IsOver( pOtherRects, aBoundRect );
else
- bOverlaps = FALSE;
- BOOL bOver = aRect.IsOver( aBoundRect );
+ bOverlaps = sal_False;
+ sal_Bool bOver = aRect.IsOver( aBoundRect );
if( bOver && !bOverlaps )
{
// Ist im neuen Selektionsrechteck und in keinem alten
// => selektieren
if( !bSelected )
- SelectEntry( pEntry, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_True );
}
else if( !bAdd )
{
// ist ausserhalb des Selektionsrechtecks
// => Selektion entfernen
if( bSelected )
- SelectEntry( pEntry, FALSE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True );
}
else if( bAdd && bOverlaps )
{
@@ -3218,19 +3218,19 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
{
// Schnittmenge zwischen alten Rects & aktuellem Rect desel.
if( bSelected )
- SelectEntry( pEntry, FALSE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True );
}
else
{
// Eintrag eines alten Rects selektieren
if( !bSelected )
- SelectEntry( pEntry, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_True );
}
}
else if( !bOver && bSelected )
{
// Der Eintrag liegt voellig ausserhalb und wird deshalb desel.
- SelectEntry( pEntry, FALSE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True );
}
}
@@ -3245,13 +3245,13 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
void SvxIconChoiceCtrl_Impl::SelectRange(
SvxIconChoiceCtrlEntry* pStart,
SvxIconChoiceCtrlEntry* pEnd,
- BOOL bAdd )
+ sal_Bool bAdd )
{
- ULONG nFront = GetEntryListPos( pStart );
- ULONG nBack = GetEntryListPos( pEnd );
- ULONG nFirst = std::min( nFront, nBack );
- ULONG nLast = std::max( nFront, nBack );
- ULONG i;
+ sal_uLong nFront = GetEntryListPos( pStart );
+ sal_uLong nBack = GetEntryListPos( pEnd );
+ sal_uLong nFirst = std::min( nFront, nBack );
+ sal_uLong nLast = std::max( nFront, nBack );
+ sal_uLong i;
SvxIconChoiceCtrlEntry* pEntry;
if ( ! bAdd )
@@ -3262,7 +3262,7 @@ void SvxIconChoiceCtrl_Impl::SelectRange(
{
pEntry = GetEntry( i );
if( pEntry->IsSelected() )
- SelectEntry( pEntry, FALSE, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True );
}
}
@@ -3271,33 +3271,33 @@ void SvxIconChoiceCtrl_Impl::SelectRange(
{
pEntry = GetEntry( i );
if( ! pEntry->IsSelected() )
- SelectEntry( pEntry, TRUE, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_True, sal_True );
}
if ( ! bAdd )
{
// deselect everything behind the last entry if not in
// adding mode
- ULONG nEnd = GetEntryCount();
+ sal_uLong nEnd = GetEntryCount();
for ( ; i<nEnd; i++ )
{
pEntry = GetEntry( i );
if( pEntry->IsSelected() )
- SelectEntry( pEntry, FALSE, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True );
}
}
}
-BOOL SvxIconChoiceCtrl_Impl::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
+sal_Bool SvxIconChoiceCtrl_Impl::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
{
- const USHORT nCount = pRectList->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = pRectList->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)pRectList->GetObject( nCur );
if( rBoundRect.IsOver( *pRect ))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SvxIconChoiceCtrl_Impl::AddSelectedRect( SvxIconChoiceCtrlEntry* pEntry1,
@@ -3318,8 +3318,8 @@ void SvxIconChoiceCtrl_Impl::AddSelectedRect( const Rectangle& rRect )
void SvxIconChoiceCtrl_Impl::ClearSelectedRectList()
{
- const USHORT nCount = aSelectedRectList.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = aSelectedRectList.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)aSelectedRectList.GetObject( nCur );
delete pRect;
@@ -3328,7 +3328,7 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList()
}
void SvxIconChoiceCtrl_Impl::CalcScrollOffsets( const Point& rPosPixel,
- long& rX, long& rY, BOOL isInDragDrop, USHORT nBorderWidth)
+ long& rX, long& rY, sal_Bool isInDragDrop, sal_uInt16 nBorderWidth)
{
// Scrolling der View, falls sich der Mauszeiger im Grenzbereich des
// Fensters befindet
@@ -3336,8 +3336,8 @@ void SvxIconChoiceCtrl_Impl::CalcScrollOffsets( const Point& rPosPixel,
long nPixelToScrollY = 0;
Size aWndSize = aOutputSize;
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
if ( rPosPixel.X() < nBorderWidth )
{
@@ -3398,16 +3398,16 @@ void SvxIconChoiceCtrl_Impl::PrepareCommandEvent( const CommandEvent& rCEvt )
StopEditTimer();
SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry( rCEvt.GetMousePosPixel() );
if( (nFlags & F_DOWN_CTRL) && pEntry && !pEntry->IsSelected() )
- SelectEntry( pEntry, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True );
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
}
-BOOL SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos )
+sal_Bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos )
{
Rectangle aRect( CalcTextRect( pEntry ));
if( aRect.IsInside( rDocPos ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
IMPL_LINK(SvxIconChoiceCtrl_Impl, EditTimeoutHdl, Timer*, EMPTYARG )
@@ -3433,8 +3433,8 @@ void SvxIconChoiceCtrl_Impl::AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart )
{
SvPtrarr aLists;
pImpCursor->CreateGridAjustData( aLists, pStart );
- const USHORT nCount = aLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = aLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
AdjustAtGrid( *(SvPtrarr*)aLists[ nCur ], pStart );
IcnCursor_Impl::DestroyGridAdjustData( aLists );
CheckScrollBars();
@@ -3446,18 +3446,18 @@ void SvxIconChoiceCtrl_Impl::AdjustAtGrid( const SvPtrarr& rRow, SvxIconChoiceCt
if( !rRow.Count() )
return;
- BOOL bGo;
+ sal_Bool bGo;
if( !pStart )
- bGo = TRUE;
+ bGo = sal_True;
else
- bGo = FALSE;
+ bGo = sal_False;
long nCurRight = 0;
- for( USHORT nCur = 0; nCur < rRow.Count(); nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < rRow.Count(); nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)rRow[ nCur ];
if( !bGo && pCur == pStart )
- bGo = TRUE;
+ bGo = sal_True;
//SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pCur);
// Massgebend (fuer unser Auge) ist die Bitmap, da sonst
@@ -3521,7 +3521,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode,
if( eTextMode == IcnShowTextDontKnow )
eTextMode = IcnShowTextShort;
eTextMode = eMode;
- Arrange( TRUE );
+ Arrange( sal_True );
}
}
else
@@ -3575,20 +3575,20 @@ void SvxIconChoiceCtrl_Impl::ShowFocus ( Rectangle& rRect )
{
Color aBkgColor ( pView->GetBackground().GetColor() );
Color aPenColor;
- USHORT nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
+ sal_uInt16 nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
if ( nColor > 128 )
aPenColor.SetColor ( COL_BLACK );
else
aPenColor.SetColor( COL_WHITE );
- aFocus.bOn = TRUE;
+ aFocus.bOn = sal_True;
aFocus.aPenColor = aPenColor;
aFocus.aRect = rRect;
}
void SvxIconChoiceCtrl_Impl::HideFocus ()
{
- aFocus.bOn = FALSE;
+ aFocus.bOn = sal_False;
}
void SvxIconChoiceCtrl_Impl::DrawFocusRect ( OutputDevice* pOut )
@@ -3608,12 +3608,12 @@ void SvxIconChoiceCtrl_Impl::DrawFocusRect ( OutputDevice* pOut )
pOut->DrawPolyLine ( aPolygon, aLineInfo );
}
-BOOL SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, ULONG& rPos ) const
+sal_Bool SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const
{
sal_Bool bRet = sal_False;
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
- ULONG nEntryCount = GetEntryCount();
- for ( ULONG i = 0; i < nEntryCount; ++i )
+ sal_uLong nEntryCount = GetEntryCount();
+ for ( sal_uLong i = 0; i < nEntryCount; ++i )
{
if ( rI18nHelper.MatchMnemonic( GetEntry( i )->GetText(), cChar ) )
{
@@ -3639,7 +3639,7 @@ IMPL_LINK(SvxIconChoiceCtrl_Impl, UserEventHdl, void*, nId )
else if( nId == EVENTID_SHOW_CURSOR )
{
nUserEventShowCursor = 0;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
return 0;
}
@@ -3661,12 +3661,12 @@ void SvxIconChoiceCtrl_Impl::CancelUserEvents()
void SvxIconChoiceCtrl_Impl::InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Invalidate( pEntry->aRect );
Center( pEntry );
pView->Invalidate( pEntry->aRect );
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
@@ -3675,13 +3675,13 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
if( !pEntry )
return;
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
DELETEZ(pEdit);
SetNoSelection();
pCurEditedEntry = pEntry;
- String aEntryText( pView->GetEntryText( pEntry, TRUE ) );
- Rectangle aRect( CalcTextRect( pEntry, 0, TRUE, &aEntryText ) );
+ String aEntryText( pView->GetEntryText( pEntry, sal_True ) );
+ Rectangle aRect( CalcTextRect( pEntry, 0, sal_True, &aEntryText ) );
MakeVisible( aRect );
Point aPos( aRect.TopLeft() );
aPos = pView->GetPixelPos( aPos );
@@ -3722,7 +3722,7 @@ IMPL_LINK( SvxIconChoiceCtrl_Impl, TextEditEndedHdl, IcnViewEdit_Impl*, EMPTYARG
if( pView->EditedEntry( pCurEditedEntry, aText, pEdit->EditingCanceled() ) )
InvalidateEntry( pCurEditedEntry );
if( !GetSelectionCount() )
- SelectEntry( pCurEditedEntry, TRUE );
+ SelectEntry( pCurEditedEntry, sal_True );
pEdit->Hide();
if( pEdit->IsGrabFocus() )
@@ -3733,13 +3733,13 @@ IMPL_LINK( SvxIconChoiceCtrl_Impl, TextEditEndedHdl, IcnViewEdit_Impl*, EMPTYARG
return 0;
}
-void SvxIconChoiceCtrl_Impl::StopEntryEditing( BOOL bCancel )
+void SvxIconChoiceCtrl_Impl::StopEntryEditing( sal_Bool bCancel )
{
if( pEdit )
pEdit->StopEditing( bCancel );
}
-void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, BOOL bLock )
+void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bLock )
{
if( bLock )
pEntry->SetFlags( ICNVIEW_FLAG_POS_LOCKED );
@@ -3747,7 +3747,7 @@ void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, BOOL
pEntry->ClearFlags( ICNVIEW_FLAG_POS_LOCKED );
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( ULONG& rPos ) const
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( sal_uLong& rPos ) const
{
if( !GetSelectionCount() )
return 0;
@@ -3758,10 +3758,10 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( ULONG& rP
return pCurHighlightFrame;
}
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( !pHead )
{
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
if( pEntry->IsSelected() )
@@ -3793,14 +3793,14 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( ULONG& rP
}
// kein Round Robin!
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextSelectedEntry( ULONG& rStartPos ) const
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextSelectedEntry( sal_uLong& rStartPos ) const
{
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( rStartPos > nCount || !GetSelectionCount() )
return 0;
if( !pHead )
{
- for( ULONG nCur = rStartPos+1; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = rStartPos+1; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
if( pEntry->IsSelected() )
@@ -3829,15 +3829,15 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextSelectedEntry( ULONG& rSt
return 0;
}
-void SvxIconChoiceCtrl_Impl::SelectAll( BOOL bSelect, BOOL bPaint )
+void SvxIconChoiceCtrl_Impl::SelectAll( sal_Bool bSelect, sal_Bool bPaint )
{
- bPaint = TRUE;
+ bPaint = sal_True;
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount && (bSelect || GetSelectionCount() ); nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount && (bSelect || GetSelectionCount() ); nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
- SelectEntry( pEntry, bSelect, TRUE, TRUE, bPaint );
+ SelectEntry( pEntry, bSelect, sal_True, sal_True, bPaint );
}
nFlags &= (~F_ADD_MODE);
pAnchor = 0;
@@ -3847,7 +3847,7 @@ void SvxIconChoiceCtrl_Impl::SaveSelection( List** ppList )
{
if( !*ppList )
*ppList = new List;
- ULONG nPos;
+ sal_uLong nPos;
SvxIconChoiceCtrlEntry* pEntry = GetFirstSelectedEntry( nPos );
while( pEntry && GetSelectionCount() != (*ppList)->Count() )
{
@@ -3860,12 +3860,12 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo
const Size& rSize, const XubString& rData, const Link& rNotifyEditEnd ) :
MultiLineEdit( pParent, (pParent->GetStyle() & WB_ICON) ? WB_CENTER : WB_LEFT),
aCallBackHdl( rNotifyEditEnd ),
- bCanceled( FALSE ),
- bAlreadyInCallback( FALSE ),
- bGrabFocus( FALSE )
+ bCanceled( sal_False ),
+ bAlreadyInCallback( sal_False ),
+ bGrabFocus( sal_False )
{
Font aFont( pParent->GetPointFont() );
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
SetControlFont( aFont );
if( !pParent->HasFontFillColor() )
{
@@ -3905,7 +3905,7 @@ void IcnViewEdit_Impl::CallCallBackHdl_Impl()
aTimer.Stop();
if ( !bAlreadyInCallback )
{
- bAlreadyInCallback = TRUE;
+ bAlreadyInCallback = sal_True;
GetpApp()->RemoveAccel( &aAccReturn );
GetpApp()->RemoveAccel( &aAccEscape );
Hide();
@@ -3921,16 +3921,16 @@ IMPL_LINK( IcnViewEdit_Impl, Timeout_Impl, Timer*, EMPTYARG )
IMPL_LINK( IcnViewEdit_Impl, ReturnHdl_Impl, Accelerator*, EMPTYARG )
{
- bCanceled = FALSE;
- bGrabFocus = TRUE;
+ bCanceled = sal_False;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
return 1;
}
IMPL_LINK( IcnViewEdit_Impl, EscapeHdl_Impl, Accelerator*, EMPTYARG )
{
- bCanceled = TRUE;
- bGrabFocus = TRUE;
+ bCanceled = sal_True;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
return 1;
}
@@ -3938,19 +3938,19 @@ IMPL_LINK( IcnViewEdit_Impl, EscapeHdl_Impl, Accelerator*, EMPTYARG )
void IcnViewEdit_Impl::KeyInput( const KeyEvent& rKEvt )
{
KeyCode aCode = rKEvt.GetKeyCode();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
{
case KEY_ESCAPE:
- bCanceled = TRUE;
- bGrabFocus = TRUE;
+ bCanceled = sal_True;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
break;
case KEY_RETURN:
- bCanceled = FALSE;
- bGrabFocus = TRUE;
+ bCanceled = sal_False;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
break;
@@ -3966,7 +3966,7 @@ long IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
if ( !bAlreadyInCallback &&
((!Application::GetFocusWindow()) || !IsChild(Application::GetFocusWindow())))
{
- bCanceled = FALSE;
+ bCanceled = sal_False;
aTimer.SetTimeout(10);
aTimer.SetTimeoutHdl(LINK(this,IcnViewEdit_Impl,Timeout_Impl));
aTimer.Start();
@@ -3975,7 +3975,7 @@ long IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
return 0;
}
-void IcnViewEdit_Impl::StopEditing( BOOL bCancel )
+void IcnViewEdit_Impl::StopEditing( sal_Bool bCancel )
{
if ( !bAlreadyInCallback )
{
@@ -3984,22 +3984,22 @@ void IcnViewEdit_Impl::StopEditing( BOOL bCancel )
}
}
-ULONG SvxIconChoiceCtrl_Impl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
+sal_uLong SvxIconChoiceCtrl_Impl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
{
if( !(nFlags & F_ENTRYLISTPOS_VALID ))
((SvxIconChoiceCtrl_Impl*)this)->SetListPositions();
return pEntry->nPos;
}
-void SvxIconChoiceCtrl_Impl::SetEntryListPos( SvxIconChoiceCtrlEntry* pListEntry, ULONG nNewPos )
+void SvxIconChoiceCtrl_Impl::SetEntryListPos( SvxIconChoiceCtrlEntry* pListEntry, sal_uLong nNewPos )
{
- ULONG nCurPos = GetEntryListPos( pListEntry );
+ sal_uLong nCurPos = GetEntryListPos( pListEntry );
if( nCurPos == nNewPos )
return;
aEntries.List::Remove( nCurPos );
aEntries.List::Insert( (void*)pListEntry, nNewPos );
// Eintragspositionen anpassen
- ULONG nStart, nEnd;
+ sal_uLong nStart, nEnd;
if( nNewPos < nCurPos )
{
nStart = nNewPos;
@@ -4017,19 +4017,19 @@ void SvxIconChoiceCtrl_Impl::SetEntryListPos( SvxIconChoiceCtrlEntry* pListEntry
}
}
-void SvxIconChoiceCtrl_Impl::SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, USHORT nEntryFlags )
+void SvxIconChoiceCtrl_Impl::SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nEntryFlags )
{
pEntry->nFlags = nEntryFlags;
if( nEntryFlags & ICNVIEW_FLAG_POS_MOVED )
nFlags |= F_MOVED_ENTRIES;
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pStart, BOOL bRight )
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pStart, sal_Bool bRight )
{
return pImpCursor->GoLeftRight( pStart, bRight );
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pStart, BOOL bDown )
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pStart, sal_Bool bDown )
{
return pImpCursor->GoUpDown( pStart, bDown );
}
@@ -4080,14 +4080,14 @@ void SvxIconChoiceCtrl_Impl::InitSettings()
}
}
-EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, USHORT _nInitSize , USHORT _nReSize ) :
+EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, sal_uInt16 _nInitSize , sal_uInt16 _nReSize ) :
List( _nInitSize, _nReSize ),
_pOwner( pOwner )
{
_pOwner->pHead = 0;
}
-EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize ) :
+EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) :
List( _nBlockSize, _nInitSize, _nReSize ),
_pOwner( pOwner )
{
@@ -4105,14 +4105,14 @@ void EntryList_Impl::Clear()
List::Clear();
}
-void EntryList_Impl::Insert( SvxIconChoiceCtrlEntry* pEntry, ULONG nPos )
+void EntryList_Impl::Insert( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos )
{
List::Insert( pEntry, nPos );
if( _pOwner->pHead )
pEntry->SetBacklink( _pOwner->pHead->pblink );
}
-SvxIconChoiceCtrlEntry* EntryList_Impl::Remove( ULONG nPos )
+SvxIconChoiceCtrlEntry* EntryList_Impl::Remove( sal_uLong nPos )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)List::Remove( nPos );
DBG_ASSERT(pEntry,"EntryList_Impl::Remove > Entry not found");
@@ -4146,14 +4146,14 @@ void EntryList_Impl::Removed_Impl( SvxIconChoiceCtrlEntry* pEntry )
void SvxIconChoiceCtrl_Impl::SetPositionMode( SvxIconChoiceCtrlPositionMode eMode )
{
- ULONG nCur;
+ sal_uLong nCur;
if( eMode == ePositionMode )
return;
SvxIconChoiceCtrlPositionMode eOldMode = ePositionMode;
ePositionMode = eMode;
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( eOldMode == IcnViewPositionModeAutoArrange )
{
@@ -4222,12 +4222,12 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
if( pEntry == pPredecessor )
return;
- ULONG nPos1 = GetEntryListPos( pEntry );
+ sal_uLong nPos1 = GetEntryListPos( pEntry );
if( !pHead )
{
if( pPredecessor )
{
- ULONG nPos2 = GetEntryListPos( pPredecessor );
+ sal_uLong nPos2 = GetEntryListPos( pPredecessor );
if( nPos1 == (nPos2 + 1) )
return; // ist schon Vorgaenger
}
@@ -4241,16 +4241,16 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
if( !pPredecessor && pHead == pEntry )
return; // ist schon der Erste
- BOOL bSetHead = FALSE;
+ sal_Bool bSetHead = sal_False;
if( !pPredecessor )
{
- bSetHead = TRUE;
+ bSetHead = sal_True;
pPredecessor = pHead->pblink;
}
if( pEntry == pHead )
{
pHead = pHead->pflink;
- bSetHead = FALSE;
+ bSetHead = sal_False;
}
if( pEntry != pPredecessor )
{
@@ -4263,12 +4263,12 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
aAutoArrangeTimer.Start();
}
-BOOL SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry,
+sal_Bool SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry,
SvxIconChoiceCtrlEntry** ppPredecessor )
{
*ppPredecessor = 0;
if( !pHead )
- return FALSE;
+ return sal_False;
DBG_ASSERT(pEntry->pblink,"GetEntryPredecessor: Backward link not set");
DBG_ASSERT(pEntry->pflink,"GetEntryPredecessor: Forward link not set");
@@ -4276,14 +4276,14 @@ BOOL SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
{
SvxIconChoiceCtrlEntry* pFirst = (SvxIconChoiceCtrlEntry*)aEntries.GetObject(0);
if( pFirst != pEntry )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
*ppPredecessor = pEntry->pblink;
if( !(pEntry->nFlags & ICNVIEW_FLAG_PRED_SET) &&
(GetEntryListPos( *ppPredecessor ) + 1) == GetEntryListPos( pEntry ))
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry,
@@ -4292,8 +4292,8 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho
Point aPos( rPosTopLeft ); //TopLeft
Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos ));
Point aNewPos( aCenterRect.Center() );
- ULONG nGrid = GetPredecessorGrid( aNewPos );
- ULONG nCount = aEntries.Count();
+ sal_uLong nGrid = GetPredecessorGrid( aNewPos );
+ sal_uLong nCount = aEntries.Count();
if( nGrid == ULONG_MAX )
return 0;
if( nGrid >= nCount )
@@ -4303,26 +4303,26 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho
SvxIconChoiceCtrlEntry* pCur = pHead; // Grid 0
// todo: Liste von hinten aufrollen wenn nGrid > nCount/2
- for( ULONG nCur = 0; nCur < nGrid; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nGrid; nCur++ )
pCur = pCur->pflink;
return pCur;
}
-ULONG SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
+sal_uLong SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
{
Point aPos( rPos );
aPos.X() -= LROFFS_WINBORDER;
aPos.Y() -= TBOFFS_WINBORDER;
- USHORT nMaxCol = (USHORT)(aVirtOutputSize.Width() / nGridDX);
+ sal_uInt16 nMaxCol = (sal_uInt16)(aVirtOutputSize.Width() / nGridDX);
if( nMaxCol )
nMaxCol--;
- USHORT nGridX = (USHORT)(aPos.X() / nGridDX);
+ sal_uInt16 nGridX = (sal_uInt16)(aPos.X() / nGridDX);
if( nGridX > nMaxCol )
nGridX = nMaxCol;
- USHORT nGridY = (USHORT)(aPos.Y() / nGridDY);
- USHORT nGridsX = (USHORT)(aOutputSize.Width() / nGridDX);
- ULONG nGrid = (nGridY * nGridsX) + nGridX;
+ sal_uInt16 nGridY = (sal_uInt16)(aPos.Y() / nGridDY);
+ sal_uInt16 nGridsX = (sal_uInt16)(aOutputSize.Width() / nGridDX);
+ sal_uLong nGrid = (nGridY * nGridsX) + nGridX;
long nMiddle = (nGridX * nGridDX) + (nGridDX / 2);
if( rPos.X() < nMiddle )
{
@@ -4342,27 +4342,27 @@ void SvxIconChoiceCtrl_Impl::Flush()
}
}
-BOOL SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
{
if ( !(rHEvt.GetMode() & HELPMODE_QUICK ) )
- return FALSE;
+ return sal_False;
Point aPos( pView->ScreenToOutputPixel(rHEvt.GetMousePosPixel() ) );
aPos -= pView->GetMapMode().GetOrigin();
- SvxIconChoiceCtrlEntry* pEntry = GetEntry( aPos, TRUE );
+ SvxIconChoiceCtrlEntry* pEntry = GetEntry( aPos, sal_True );
if ( !pEntry )
- return FALSE;
+ return sal_False;
String sQuickHelpText = pEntry->GetQuickHelpText();
- String aEntryText( pView->GetEntryText( pEntry, FALSE ) );
- Rectangle aTextRect( CalcTextRect( pEntry, 0, FALSE, &aEntryText ) );
+ String aEntryText( pView->GetEntryText( pEntry, sal_False ) );
+ Rectangle aTextRect( CalcTextRect( pEntry, 0, sal_False, &aEntryText ) );
if ( ( !aTextRect.IsInside( aPos ) || !aEntryText.Len() ) && !sQuickHelpText.Len() )
- return FALSE;
+ return sal_False;
Rectangle aOptTextRect( aTextRect );
aOptTextRect.Bottom() = LONG_MAX;
- USHORT nNewFlags = nCurTextDrawFlags;
+ sal_uInt16 nNewFlags = nCurTextDrawFlags;
nNewFlags &= ~( TEXT_DRAW_CLIP | TEXT_DRAW_ENDELLIPSIS );
aOptTextRect = pView->GetTextRect( aOptTextRect, aEntryText, nNewFlags );
if ( aOptTextRect != aTextRect || sQuickHelpText.Len() > 0 )
@@ -4383,7 +4383,7 @@ BOOL SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
Help::ShowQuickHelp( (Window*)pView, aOptTextRect, sHelpText, QUICKHELP_LEFT | QUICKHELP_VCENTER );
}
- return TRUE;
+ return sal_True;
}
void SvxIconChoiceCtrl_Impl::ClearColumnList()
@@ -4391,8 +4391,8 @@ void SvxIconChoiceCtrl_Impl::ClearColumnList()
if( !pColumns )
return;
- const USHORT nCount = pColumns->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = pColumns->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlColumnInfo* pInfo = (SvxIconChoiceCtrlColumnInfo*)
pColumns->GetObject( nCur );
@@ -4401,7 +4401,7 @@ void SvxIconChoiceCtrl_Impl::ClearColumnList()
DELETEZ(pColumns);
}
-void SvxIconChoiceCtrl_Impl::SetColumn( USHORT nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo)
+void SvxIconChoiceCtrl_Impl::SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo)
{
if( !pColumns )
pColumns = new SvPtrarr;
@@ -4431,22 +4431,22 @@ void SvxIconChoiceCtrl_Impl::SetColumn( USHORT nIndex, const SvxIconChoiceCtrlCo
Arrange( IsAutoArrange() );
}
-const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( USHORT nIndex ) const
+const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16 nIndex ) const
{
if( !pColumns || nIndex >= pColumns->Count() )
return 0;
return (const SvxIconChoiceCtrlColumnInfo*)pColumns->GetObject( nIndex );
}
-const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetItemColumn( USHORT nSubItem,
+const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetItemColumn( sal_uInt16 nSubItem,
long& rLeft ) const
{
rLeft = 0;
if( !pColumns )
return 0;
- const USHORT nCount = pColumns->Count();
+ const sal_uInt16 nCount = pColumns->Count();
const SvxIconChoiceCtrlColumnInfo* pCol = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
pCol = (const SvxIconChoiceCtrlColumnInfo*)pColumns->GetObject( nCur );
if( !pCol || pCol->GetSubItem() == nSubItem )
@@ -4457,7 +4457,7 @@ const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetItemColumn( USHORT
}
void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(
- OutputDevice* pOut, const Rectangle& rBmpRect, BOOL bHide )
+ OutputDevice* pOut, const Rectangle& rBmpRect, sal_Bool bHide )
{
Rectangle aBmpRect( rBmpRect );
long nBorder = 2;
@@ -4473,7 +4473,7 @@ void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(
else
{
DecorationView aDecoView( pOut );
- USHORT nDecoFlags;
+ sal_uInt16 nDecoFlags;
if ( bHighlightFramePressed )
nDecoFlags = FRAME_HIGHLIGHT_TESTBACKGROUND | FRAME_HIGHLIGHT_IN;
else
@@ -4483,20 +4483,20 @@ void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(
}
void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,
- BOOL bKeepHighlightFlags )
+ sal_Bool bKeepHighlightFlags )
{
if( pEntry == pCurHighlightFrame )
return;
if( !bKeepHighlightFlags )
- bHighlightFramePressed = FALSE;
+ bHighlightFramePressed = sal_False;
HideEntryHighlightFrame();
pCurHighlightFrame = pEntry;
if( pEntry )
{
Rectangle aBmpRect( CalcFocusRect(pEntry) );
- DrawHighlightFrame( pView, aBmpRect, FALSE );
+ DrawHighlightFrame( pView, aBmpRect, sal_False );
}
}
@@ -4508,7 +4508,7 @@ void SvxIconChoiceCtrl_Impl::HideEntryHighlightFrame()
SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame;
pCurHighlightFrame = 0;
Rectangle aBmpRect( CalcFocusRect(pEntry) );
- DrawHighlightFrame( pView, aBmpRect, TRUE );
+ DrawHighlightFrame( pView, aBmpRect, sal_True );
}
void SvxIconChoiceCtrl_Impl::CallSelectHandler( SvxIconChoiceCtrlEntry* )
@@ -4549,7 +4549,7 @@ Point SvxIconChoiceCtrl_Impl::GetPopupMenuPosPixel() const
SvxIconChoiceCtrlEntry* pEntry = GetCurEntry();
if( !pEntry || !pEntry->IsSelected() )
{
- ULONG nNext;
+ sal_uLong nNext;
pEntry = GetFirstSelectedEntry( nNext );
}
if( pEntry )
@@ -4561,14 +4561,14 @@ Point SvxIconChoiceCtrl_Impl::GetPopupMenuPosPixel() const
return aResult;
}
-void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, BOOL bDoNotUpdateWallpaper )
+void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, sal_Bool bDoNotUpdateWallpaper )
{
MapMode aMapMode( pView->GetMapMode() );
aMapMode.SetOrigin( rPos );
pView->SetMapMode( aMapMode );
if( !bDoNotUpdateWallpaper )
{
- BOOL bScrollable = pView->GetBackground().IsScrollable();
+ sal_Bool bScrollable = pView->GetBackground().IsScrollable();
if( pView->HasBackground() && !bScrollable )
{
Rectangle aRect( GetOutputRect());
@@ -4579,8 +4579,8 @@ void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, BOOL bDoNotUpdateWall
}
}
-ULONG SvxIconChoiceCtrl_Impl::GetGridCount( const Size& rSize, BOOL bCheckScrBars,
- BOOL bSmartScrBar ) const
+sal_uLong SvxIconChoiceCtrl_Impl::GetGridCount( const Size& rSize, sal_Bool bCheckScrBars,
+ sal_Bool bSmartScrBar ) const
{
Size aSize( rSize );
if( bCheckScrBars && aHorSBar.IsVisible() )
@@ -4598,19 +4598,19 @@ ULONG SvxIconChoiceCtrl_Impl::GetGridCount( const Size& rSize, BOOL bCheckScrBar
if( aSize.Height() < 0 )
aSize.Height() = 0;
- return IcnGridMap_Impl::GetGridCount( aSize, (USHORT)nGridDX, (USHORT)nGridDY );
+ return IcnGridMap_Impl::GetGridCount( aSize, (sal_uInt16)nGridDX, (sal_uInt16)nGridDY );
}
-BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
{
StopEditTimer();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
DBG_ASSERT( rKEvt.GetKeyCode().IsMod2(), "*SvxIconChoiceCtrl_Impl::HandleShortCutKey(): no <ALT> pressed!?" );
sal_Unicode cChar = rKEvt.GetCharCode();
- ULONG nPos = (ULONG)-1;
+ sal_uLong nPos = (sal_uLong)-1;
if( cChar && IsMnemonicChar( cChar, nPos ) )
{
@@ -4619,7 +4619,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
if( pNewCursor != pOldCursor )
{
- SetCursor_Impl( pOldCursor, pNewCursor, FALSE, FALSE, FALSE );
+ SetCursor_Impl( pOldCursor, pNewCursor, sal_False, sal_False, sal_False );
if( pNewCursor != NULL )
{
@@ -4629,13 +4629,13 @@ BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
pCurHighlightFrame = NULL;
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-void SvxIconChoiceCtrl_Impl::CallEventListeners( ULONG nEvent, void* pData )
+void SvxIconChoiceCtrl_Impl::CallEventListeners( sal_uLong nEvent, void* pData )
{
pView->CallImplEventListeners( nEvent, pData );
}
diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx
index 43b03f569d5d..93e2990d6658 100644
--- a/svtools/source/contnr/imivctl2.cxx
+++ b/svtools/source/contnr/imivctl2.cxx
@@ -48,14 +48,14 @@ IcnCursor_Impl::~IcnCursor_Impl()
delete[] pRows;
}
-USHORT IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue,
+sal_uInt16 IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue,
int bVertical )
{
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( !nCount )
return 0;
- USHORT nCurPos = 0;
+ sal_uInt16 nCurPos = 0;
long nPrevValue = LONG_MIN;
while( nCount )
{
@@ -67,7 +67,7 @@ USHORT IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue,
else
nCurValue = rRect.Left();
if( nValue >= nPrevValue && nValue <= nCurValue )
- return (USHORT)nCurPos;
+ return (sal_uInt16)nCurPos;
nPrevValue = nCurValue;
nCount--;
nCurPos++;
@@ -85,8 +85,8 @@ void IcnCursor_Impl::ImplCreate()
pColumns = new SvPtrarr[ nCols ];
pRows = new SvPtrarr[ nRows ];
- ULONG nCount = pView->aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = pView->aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur );
// const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
@@ -100,10 +100,10 @@ void IcnCursor_Impl::ImplCreate()
if( nX >= nCols )
nX = sal::static_int_cast< short >(nCols - 1);
- USHORT nIns = GetSortListPos( &pColumns[nX], rRect.Top(), TRUE );
+ sal_uInt16 nIns = GetSortListPos( &pColumns[nX], rRect.Top(), sal_True );
pColumns[ nX ].Insert( pEntry, nIns );
- nIns = GetSortListPos( &pRows[nY], rRect.Left(), FALSE );
+ nIns = GetSortListPos( &pRows[nY], rRect.Left(), sal_False );
pRows[ nY ].Insert( pEntry, nIns );
pEntry->nX = nX;
@@ -128,12 +128,12 @@ void IcnCursor_Impl::Clear()
}
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
- USHORT, BOOL bDown, BOOL bSimple )
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,
+ sal_uInt16, sal_Bool bDown, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchCol: No reference entry");
SvPtrarr* pList = &(pColumns[ nCol ]);
- const USHORT nCount = pList->Count();
+ const sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -141,7 +141,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Col-List");
if( bDown )
{
@@ -174,18 +174,18 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT
if( nTop > nBottom )
{
- USHORT nTemp = nTop;
+ sal_uInt16 nTemp = nTop;
nTop = nBottom;
nBottom = nTemp;
}
long nMinDistance = LONG_MAX;
SvxIconChoiceCtrlEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
- USHORT nY = pEntry->nY;
+ sal_uInt16 nY = pEntry->nY;
if( nY >= nTop && nY <= nBottom )
{
const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
@@ -203,12 +203,12 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT
return pResult;
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
- USHORT, BOOL bRight, BOOL bSimple )
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow,sal_uInt16 nLeft,sal_uInt16 nRight,
+ sal_uInt16, sal_Bool bRight, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchRow: No reference entry");
SvPtrarr* pList = &(pRows[ nRow ]);
- const USHORT nCount = pList->Count();
+ const sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -216,7 +216,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Row-List");
if( bRight )
{
@@ -249,18 +249,18 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
}
if( nRight < nLeft )
{
- USHORT nTemp = nRight;
+ sal_uInt16 nTemp = nRight;
nRight = nLeft;
nLeft = nTemp;
}
long nMinDistance = LONG_MAX;
SvxIconChoiceCtrlEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
- USHORT nX = pEntry->nX;
+ sal_uInt16 nX = pEntry->nX;
if( nX >= nLeft && nX <= nRight )
{
const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
@@ -282,7 +282,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
/*
Sucht ab dem uebergebenen Eintrag den naechsten rechts- bzw.
- linksstehenden. Suchverfahren am Beispiel bRight = TRUE:
+ linksstehenden. Suchverfahren am Beispiel bRight = sal_True:
c
b c
@@ -297,21 +297,21 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
a,b,c : 2., 3., 4. Suchrechteck
*/
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, BOOL bRight )
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bRight )
{
SvxIconChoiceCtrlEntry* pResult;
pCurEntry = pCtrlEntry;
Create();
- USHORT nY = pCtrlEntry->nY;
- USHORT nX = pCtrlEntry->nX;
+ sal_uInt16 nY = pCtrlEntry->nY;
+ sal_uInt16 nX = pCtrlEntry->nX;
DBG_ASSERT(nY< nRows,"GoLeftRight:Bad column");
DBG_ASSERT(nX< nCols,"GoLeftRight:Bad row");
// Nachbar auf gleicher Zeile ?
if( bRight )
pResult = SearchRow(
- nY, nX, sal::static_int_cast< USHORT >(nCols-1), nX, TRUE, TRUE );
+ nY, nX, sal::static_int_cast< sal_uInt16 >(nCols-1), nX, sal_True, sal_True );
else
- pResult = SearchRow( nY, nX ,0, nX, FALSE, TRUE );
+ pResult = SearchRow( nY, nX ,0, nX, sal_False, sal_True );
if( pResult )
return pResult;
@@ -329,11 +329,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt
nLastCol = -1; // 0-1
}
- USHORT nRowMin = nY;
- USHORT nRowMax = nY;
+ sal_uInt16 nRowMin = nY;
+ sal_uInt16 nRowMax = nY;
do
{
- SvxIconChoiceCtrlEntry* pEntry = SearchCol((USHORT)nCurCol,nRowMin,nRowMax,nY,TRUE, FALSE);
+ SvxIconChoiceCtrlEntry* pEntry = SearchCol((sal_uInt16)nCurCol,nRowMin,nRowMax,nY,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nRowMin )
@@ -345,7 +345,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt
return 0;
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, BOOL bDown)
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, sal_Bool bDown)
{
if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) )
{
@@ -367,7 +367,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS
nNewPos = 0;
}
if( nPos != nNewPos )
- return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( (ULONG)nNewPos );
+ return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( (sal_uLong)nNewPos );
return 0;
}
long nOpt = pView->GetEntryBoundRect( pStart ).Top();
@@ -405,11 +405,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS
return 0;
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, BOOL bDown)
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bDown)
{
if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) )
{
- ULONG nPos = pView->GetEntryListPos( pCtrlEntry );
+ sal_uLong nPos = pView->GetEntryListPos( pCtrlEntry );
if( bDown && nPos < (pView->aEntries.Count() - 1) )
return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nPos + 1 );
else if( !bDown && nPos > 0 )
@@ -420,17 +420,17 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE
SvxIconChoiceCtrlEntry* pResult;
pCurEntry = pCtrlEntry;
Create();
- USHORT nY = pCtrlEntry->nY;
- USHORT nX = pCtrlEntry->nX;
+ sal_uInt16 nY = pCtrlEntry->nY;
+ sal_uInt16 nX = pCtrlEntry->nX;
DBG_ASSERT(nY<nRows,"GoUpDown:Bad column");
DBG_ASSERT(nX<nCols,"GoUpDown:Bad row");
// Nachbar in gleicher Spalte ?
if( bDown )
pResult = SearchCol(
- nX, nY, sal::static_int_cast< USHORT >(nRows-1), nY, TRUE, TRUE );
+ nX, nY, sal::static_int_cast< sal_uInt16 >(nRows-1), nY, sal_True, sal_True );
else
- pResult = SearchCol( nX, nY ,0, nY, FALSE, TRUE );
+ pResult = SearchCol( nX, nY ,0, nY, sal_False, sal_True );
if( pResult )
return pResult;
@@ -448,11 +448,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE
nLastRow = -1; // 0-1
}
- USHORT nColMin = nX;
- USHORT nColMax = nX;
+ sal_uInt16 nColMin = nX;
+ sal_uInt16 nColMax = nX;
do
{
- SvxIconChoiceCtrlEntry* pEntry = SearchRow((USHORT)nCurRow,nColMin,nColMax,nX,TRUE, FALSE);
+ SvxIconChoiceCtrlEntry* pEntry = SearchRow((sal_uInt16)nCurRow,nColMin,nColMax,nX,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nColMin )
@@ -494,23 +494,23 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
{
if( !pRefEntry )
{
- USHORT nGridRows = (USHORT)(pView->aVirtOutputSize.Height() / pView->nGridDY);
+ sal_uInt16 nGridRows = (sal_uInt16)(pView->aVirtOutputSize.Height() / pView->nGridDY);
nGridRows++; // wg. Abrundung!
if( !nGridRows )
return;
- for( USHORT nCurList = 0; nCurList < nGridRows; nCurList++ )
+ for( sal_uInt16 nCurList = 0; nCurList < nGridRows; nCurList++ )
{
SvPtrarr* pRow = new SvPtrarr;
rLists.Insert( (void*)pRow, nCurList );
}
- const ULONG nCount = pView->aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = pView->aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur );
const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
- USHORT nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),FALSE);
+ sal_uInt16 nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),sal_False);
((SvPtrarr*)rLists[ nY ])->Insert( pEntry, nIns );
}
}
@@ -523,8 +523,8 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
short nRefRow = (short)( ((rRefRect.Top()+rRefRect.Bottom())/2) / pView->nGridDY );
SvPtrarr* pRow = new SvPtrarr;
rLists.Insert( (void*)pRow, 0 );
- ULONG nCount = pView->aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = pView->aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur );
Rectangle rRect( pView->CalcBmpRect(pEntry) );
@@ -532,7 +532,7 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
if( nY == nRefRow )
{
- USHORT nIns = GetSortListPos( pRow, rRect.Left(), FALSE );
+ sal_uInt16 nIns = GetSortListPos( pRow, rRect.Left(), sal_False );
pRow->Insert( pEntry, nIns );
}
}
@@ -542,8 +542,8 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
//static
void IcnCursor_Impl::DestroyGridAdjustData( SvPtrarr& rLists )
{
- const USHORT nCount = rLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = rLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvPtrarr* pArr = (SvPtrarr*)rLists[ nCur ];
delete pArr;
@@ -570,16 +570,16 @@ void IcnGridMap_Impl::Expand()
Create_Impl();
else
{
- USHORT nNewGridRows = _nGridRows;
- USHORT nNewGridCols = _nGridCols;
+ sal_uInt16 nNewGridRows = _nGridRows;
+ sal_uInt16 nNewGridCols = _nGridCols;
if( _pView->nWinBits & WB_ALIGN_TOP )
nNewGridRows += 50;
else
nNewGridCols += 50;
- BOOL* pNewGridMap = new BOOL[nNewGridRows*nNewGridCols];
- memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(BOOL) );
- memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(BOOL) );
+ sal_Bool* pNewGridMap = new sal_Bool[nNewGridRows*nNewGridCols];
+ memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(sal_Bool) );
+ memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(sal_Bool) );
delete[] _pGridMap;
_pGridMap = pNewGridMap;
_nGridRows = nNewGridRows;
@@ -598,15 +598,15 @@ void IcnGridMap_Impl::Create_Impl()
else
_nGridCols += 50;
- _pGridMap = new BOOL[ _nGridRows * _nGridCols];
+ _pGridMap = new sal_Bool[ _nGridRows * _nGridCols];
memset( (void*)_pGridMap, 0, _nGridRows * _nGridCols );
- const ULONG nCount = _pView->aEntries.Count();
- for( ULONG nCur=0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = _pView->aEntries.Count();
+ for( sal_uLong nCur=0; nCur < nCount; nCur++ )
OccupyGrids( (SvxIconChoiceCtrlEntry*)_pView->aEntries.GetObject( nCur ));
}
-void IcnGridMap_Impl::GetMinMapSize( USHORT& rDX, USHORT& rDY ) const
+void IcnGridMap_Impl::GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const
{
long nX, nY;
if( _pView->nWinBits & WB_ALIGN_TOP )
@@ -644,11 +644,11 @@ void IcnGridMap_Impl::GetMinMapSize( USHORT& rDX, USHORT& rDY ) const
if( !nDY )
nDY++;
- rDX = (USHORT)nDX;
- rDY = (USHORT)nDY;
+ rDX = (sal_uInt16)nDX;
+ rDY = (sal_uInt16)nDY;
}
-GridId IcnGridMap_Impl::GetGrid( USHORT nGridX, USHORT nGridY )
+GridId IcnGridMap_Impl::GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY )
{
Create();
if( _pView->nWinBits & WB_ALIGN_TOP )
@@ -657,7 +657,7 @@ GridId IcnGridMap_Impl::GetGrid( USHORT nGridX, USHORT nGridY )
return nGridY + ( nGridX * _nGridRows );
}
-GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, BOOL* pbClipped )
+GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, sal_Bool* pbClipped )
{
Create();
@@ -667,28 +667,28 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, BOOL* pbClipped )
nY -= TBOFFS_WINBORDER;
nX /= _pView->nGridDX;
nY /= _pView->nGridDY;
- BOOL bClipped = FALSE;
+ sal_Bool bClipped = sal_False;
if( nX >= _nGridCols )
{
nX = _nGridCols - 1;
- bClipped = TRUE;
+ bClipped = sal_True;
}
if( nY >= _nGridRows )
{
nY = _nGridRows - 1;
- bClipped = TRUE;
+ bClipped = sal_True;
}
- GridId nId = GetGrid( (USHORT)nX, (USHORT)nY );
+ GridId nId = GetGrid( (sal_uInt16)nX, (sal_uInt16)nY );
if( pbClipped )
*pbClipped = bClipped;
- DBG_ASSERT(nId <(ULONG)(_nGridCols*_nGridRows),"GetGrid failed");
+ DBG_ASSERT(nId <(sal_uLong)(_nGridCols*_nGridRows),"GetGrid failed");
return nId;
}
Rectangle IcnGridMap_Impl::GetGridRect( GridId nId )
{
Create();
- USHORT nGridX, nGridY;
+ sal_uInt16 nGridX, nGridY;
GetGridCoord( nId, nGridX, nGridY );
const long nLeft = nGridX * _pView->nGridDX+ LROFFS_WINBORDER;
const long nTop = nGridY * _pView->nGridDY + TBOFFS_WINBORDER;
@@ -698,28 +698,28 @@ Rectangle IcnGridMap_Impl::GetGridRect( GridId nId )
nTop + _pView->nGridDY );
}
-GridId IcnGridMap_Impl::GetUnoccupiedGrid( BOOL bOccupyFound )
+GridId IcnGridMap_Impl::GetUnoccupiedGrid( sal_Bool bOccupyFound )
{
Create();
- ULONG nStart = 0;
- BOOL bExpanded = FALSE;
+ sal_uLong nStart = 0;
+ sal_Bool bExpanded = sal_False;
while( 1 )
{
- const ULONG nCount = (USHORT)(_nGridCols * _nGridRows);
- for( ULONG nCur = nStart; nCur < nCount; nCur++ )
+ const sal_uLong nCount = (sal_uInt16)(_nGridCols * _nGridRows);
+ for( sal_uLong nCur = nStart; nCur < nCount; nCur++ )
{
if( !_pGridMap[ nCur ] )
{
if( bOccupyFound )
- _pGridMap[ nCur ] = TRUE;
+ _pGridMap[ nCur ] = sal_True;
return (GridId)nCur;
}
}
DBG_ASSERT(!bExpanded,"ExpandGrid failed");
if( bExpanded )
return 0; // prevent never ending loop
- bExpanded = TRUE;
+ bExpanded = sal_True;
Expand();
nStart = nCount;
}
@@ -730,7 +730,7 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( BOOL bOccupyFound )
// Bounding-Rect, kann aber zu kleinen Ueberlappungen fuehren
#define OCCUPY_CENTER
-void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, BOOL bOccupy )
+void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, sal_Bool bOccupy )
{
if( !_pGridMap || !_pView->IsBoundingRectValid( pEntry->aRect ))
return;
@@ -742,7 +742,7 @@ void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, BOOL bO
}
-void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, BOOL bUsed )
+void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, sal_Bool bUsed )
{
if( !_pGridMap )
return;
@@ -756,17 +756,17 @@ void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, BOOL bUsed )
else
_aLastOccupiedGrid.SetEmpty();
- BOOL bTopLeftClipped, bBottomRightClipped;
+ sal_Bool bTopLeftClipped, bBottomRightClipped;
GridId nIdTL = GetGrid( rRect.TopLeft(), &bTopLeftClipped );
GridId nIdBR = GetGrid( rRect.BottomRight(), &bBottomRightClipped );
if( bTopLeftClipped && bBottomRightClipped )
return;
- USHORT nX1,nX2,nY1,nY2;
+ sal_uInt16 nX1,nX2,nY1,nY2;
GetGridCoord( nIdTL, nX1, nY1 );
GetGridCoord( nIdBR, nX2, nY2 );
- USHORT nTemp;
+ sal_uInt16 nTemp;
if( nX1 > nX2 )
{
nTemp = nX1;
@@ -795,20 +795,20 @@ void IcnGridMap_Impl::Clear()
}
}
-ULONG IcnGridMap_Impl::GetGridCount( const Size& rSizePixel, USHORT nDX, USHORT nDY)
+sal_uLong IcnGridMap_Impl::GetGridCount( const Size& rSizePixel, sal_uInt16 nDX, sal_uInt16 nDY)
{
long ndx = (rSizePixel.Width() - LROFFS_WINBORDER) / nDX;
if( ndx < 0 ) ndx *= -1;
long ndy = (rSizePixel.Height() - TBOFFS_WINBORDER) / nDY;
if( ndy < 0 ) ndy *= -1;
- return (ULONG)(ndx * ndy);
+ return (sal_uLong)(ndx * ndy);
}
void IcnGridMap_Impl::OutputSizeChanged()
{
if( _pGridMap )
{
- USHORT nCols, nRows;
+ sal_uInt16 nCols, nRows;
GetMinMapSize( nCols, nRows );
if( _pView->nWinBits & WB_ALIGN_TOP )
{
@@ -830,18 +830,18 @@ void IcnGridMap_Impl::OutputSizeChanged()
// Independendly of the views alignment (TOP or LEFT) the gridmap
// should contain the data in a continues region, to make it possible
// to copy the whole block if the gridmap needs to be expanded.
-void IcnGridMap_Impl::GetGridCoord( GridId nId, USHORT& rGridX, USHORT& rGridY )
+void IcnGridMap_Impl::GetGridCoord( GridId nId, sal_uInt16& rGridX, sal_uInt16& rGridY )
{
Create();
if( _pView->nWinBits & WB_ALIGN_TOP )
{
- rGridX = (USHORT)(nId % _nGridCols);
- rGridY = (USHORT)(nId / _nGridCols);
+ rGridX = (sal_uInt16)(nId % _nGridCols);
+ rGridY = (sal_uInt16)(nId / _nGridCols);
}
else
{
- rGridX = (USHORT)(nId / _nGridRows);
- rGridY = (USHORT)(nId % _nGridRows);
+ rGridX = (sal_uInt16)(nId / _nGridRows);
+ rGridY = (sal_uInt16)(nId % _nGridRows);
}
}
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 1bd17f9d584c..f26de38cc1ab 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svtools.hxx"
-#include "ivctrl.hxx"
+#include <svtools/ivctrl.hxx>
#include "imivctl.hxx"
#include <vcl/bitmapex.hxx>
#include <vcl/controllayout.hxx>
@@ -42,7 +42,7 @@ using namespace ::com::sun::star::accessibility;
|
\*****************************************************************************/
-SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, USHORT _nFlags )
+SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, sal_uInt16 _nFlags )
{
aText = rText;
aImage = rImage;
@@ -54,7 +54,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image
pflink = 0;
}
-SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( USHORT _nFlags )
+SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( sal_uInt16 _nFlags )
{
pUserData = NULL;
@@ -64,7 +64,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( USHORT _nFlags )
pflink = 0;
}
-void SvxIconChoiceCtrlEntry::SetMoved( BOOL bMoved )
+void SvxIconChoiceCtrlEntry::SetMoved( sal_Bool bMoved )
{
if( bMoved )
nFlags |= ICNVIEW_FLAG_POS_MOVED;
@@ -72,7 +72,7 @@ void SvxIconChoiceCtrlEntry::SetMoved( BOOL bMoved )
nFlags &= ~ICNVIEW_FLAG_POS_MOVED;
}
-void SvxIconChoiceCtrlEntry::LockPos( BOOL bLock )
+void SvxIconChoiceCtrlEntry::LockPos( sal_Bool bLock )
{
if( bLock )
nFlags |= ICNVIEW_FLAG_POS_LOCKED;
@@ -108,7 +108,7 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( Window* pParent, WinBits nWinStyle ) :
_pCurKeyEvent ( NULL ),
_pImp ( new SvxIconChoiceCtrl_Impl( this, nWinStyle ) ),
- _bAutoFontColor ( FALSE )
+ _bAutoFontColor ( sal_False )
{
SetLineColor();
@@ -123,7 +123,7 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( Window* pParent, const ResId& rResId ) :
_pCurKeyEvent ( NULL ),
_pImp ( new SvxIconChoiceCtrl_Impl( this, WB_BORDER ) ),
- _bAutoFontColor ( FALSE )
+ _bAutoFontColor ( sal_False )
{
SetLineColor();
@@ -138,14 +138,14 @@ SvtIconChoiceCtrl::~SvtIconChoiceCtrl()
delete _pImp;
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( ULONG nPos, const Point* pPos, USHORT nFlags )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( nFlags );
_pImp->InsertEntry( pEntry, nPos, pPos );
return pEntry;
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, ULONG nPos, const Point* pPos, USHORT nFlags )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, nFlags);
@@ -154,14 +154,14 @@ SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, con
return pEntry;
}
-BOOL SvtIconChoiceCtrl::EditedEntry( SvxIconChoiceCtrlEntry*, const XubString&, BOOL )
+sal_Bool SvtIconChoiceCtrl::EditedEntry( SvxIconChoiceCtrlEntry*, const XubString&, sal_Bool )
{
- return TRUE;
+ return sal_True;
}
-BOOL SvtIconChoiceCtrl::EditingEntry( SvxIconChoiceCtrlEntry* )
+sal_Bool SvtIconChoiceCtrl::EditingEntry( SvxIconChoiceCtrlEntry* )
{
- return TRUE;
+ return sal_True;
}
void SvtIconChoiceCtrl::DrawEntryImage( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, OutputDevice& rDev )
@@ -169,29 +169,29 @@ void SvtIconChoiceCtrl::DrawEntryImage( SvxIconChoiceCtrlEntry* pEntry, const Po
rDev.DrawImage( rPos, pEntry->GetImage() );
}
-String SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, BOOL )
+String SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, sal_Bool )
{
return pEntry->GetText();
}
-BOOL SvtIconChoiceCtrl::HasBackground() const
+sal_Bool SvtIconChoiceCtrl::HasBackground() const
{
- return FALSE;
+ return sal_False;
}
-BOOL SvtIconChoiceCtrl::HasFont() const
+sal_Bool SvtIconChoiceCtrl::HasFont() const
{
- return FALSE;
+ return sal_False;
}
-BOOL SvtIconChoiceCtrl::HasFontTextColor() const
+sal_Bool SvtIconChoiceCtrl::HasFontTextColor() const
{
- return TRUE;
+ return sal_True;
}
-BOOL SvtIconChoiceCtrl::HasFontFillColor() const
+sal_Bool SvtIconChoiceCtrl::HasFontFillColor() const
{
- return TRUE;
+ return sal_True;
}
void SvtIconChoiceCtrl::Paint( const Rectangle& rRect )
@@ -223,7 +223,7 @@ void SvtIconChoiceCtrl::ArrangeIcons()
Size aFullSize;
Rectangle aEntryRect;
- for ( ULONG i = 0; i < GetEntryCount(); i++ )
+ for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
@@ -231,14 +231,14 @@ void SvtIconChoiceCtrl::ArrangeIcons()
aFullSize.setWidth ( aFullSize.getWidth()+aEntryRect.GetWidth() );
}
- _pImp->Arrange ( FALSE, aFullSize.getWidth() );
+ _pImp->Arrange ( sal_False, aFullSize.getWidth() );
}
else if ( GetStyle() & WB_ALIGN_LEFT )
{
Size aFullSize;
Rectangle aEntryRect;
- for ( ULONG i = 0; i < GetEntryCount(); i++ )
+ for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
@@ -246,13 +246,13 @@ void SvtIconChoiceCtrl::ArrangeIcons()
aFullSize.setHeight ( aFullSize.getHeight()+aEntryRect.GetHeight() );
}
- _pImp->Arrange ( FALSE, 0, aFullSize.getHeight() );
+ _pImp->Arrange ( sal_False, 0, aFullSize.getHeight() );
}
else
{
_pImp->Arrange();
}
- _pImp->Arrange( FALSE, 0, 1000 );
+ _pImp->Arrange( sal_False, 0, 1000 );
}
void SvtIconChoiceCtrl::Resize()
{
@@ -288,7 +288,7 @@ void SvtIconChoiceCtrl::GetFocus()
{
_pImp->GetFocus();
Control::GetFocus();
- ULONG nPos;
+ sal_uLong nPos;
SvxIconChoiceCtrlEntry* pSelectedEntry = GetSelectedEntry ( nPos );
if ( pSelectedEntry )
_pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pSelectedEntry );
@@ -300,7 +300,7 @@ void SvtIconChoiceCtrl::LoseFocus()
Control::LoseFocus();
}
-void SvtIconChoiceCtrl::SetUpdateMode( BOOL bUpdate )
+void SvtIconChoiceCtrl::SetUpdateMode( sal_Bool bUpdate )
{
Control::SetUpdateMode( bUpdate );
_pImp->SetUpdateMode( bUpdate );
@@ -322,7 +322,7 @@ void SvtIconChoiceCtrl::SetPointFont( const Font& rFont )
_pImp->FontModified();
}
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos, BOOL bHit ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos, sal_Bool bHit ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
@@ -353,25 +353,25 @@ SvxIconChoiceCtrlTextMode SvtIconChoiceCtrl::GetEntryTextMode( const SvxIconChoi
return _pImp->GetEntryTextModeSmart( pEntry );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetNextEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetNextEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
return ((SvtIconChoiceCtrl*)this)->_pImp->GetNextEntry( aPos, pCurEntry );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetPrevEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetPrevEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
return ((SvtIconChoiceCtrl*)this)->_pImp->GetPrevEntry( aPos, pCurEntry );
}
-ULONG SvtIconChoiceCtrl::GetEntryCount() const
+sal_uLong SvtIconChoiceCtrl::GetEntryCount() const
{
return _pImp->GetEntryCount();
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( ULONG nPos ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( sal_uLong nPos ) const
{
return _pImp->GetEntry( nPos );
}
@@ -391,30 +391,30 @@ void SvtIconChoiceCtrl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
_pImp->RemoveEntry( pEntry );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( ULONG& rPos ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( sal_uLong& rPos ) const
{
return _pImp->GetFirstSelectedEntry( rPos );
}
void SvtIconChoiceCtrl::ClickIcon()
{
- ULONG nPos;
+ sal_uLong nPos;
GetSelectedEntry ( nPos );
_aClickIconHdl.Call( this );
}
-BOOL SvtIconChoiceCtrl::IsEntryEditing() const
+sal_Bool SvtIconChoiceCtrl::IsEntryEditing() const
{
return _pImp->IsEntryEditing();
}
-BOOL SvtIconChoiceCtrl::SetChoiceWithCursor ( BOOL bDo )
+sal_Bool SvtIconChoiceCtrl::SetChoiceWithCursor ( sal_Bool bDo )
{
return _pImp->SetChoiceWithCursor (bDo);
}
void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bKeyUsed = DoKeyInput( rKEvt );
+ sal_Bool bKeyUsed = DoKeyInput( rKEvt );
if ( !bKeyUsed )
{
_pCurKeyEvent = (KeyEvent*)&rKEvt;
@@ -422,17 +422,17 @@ void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt )
_pCurKeyEvent = NULL;
}
}
-BOOL SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt )
+sal_Bool SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt )
{
// unter OS/2 bekommen wir auch beim Editieren Key-Up/Down
if( IsEntryEditing() )
- return TRUE;
+ return sal_True;
_pCurKeyEvent = (KeyEvent*)&rKEvt;
- BOOL bHandled = _pImp->KeyInput( rKEvt );
+ sal_Bool bHandled = _pImp->KeyInput( rKEvt );
_pCurKeyEvent = NULL;
return bHandled;
}
-ULONG SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
+sal_uLong SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
{
return _pImp->GetEntryListPos( pEntry );
}
@@ -537,7 +537,7 @@ void SvtIconChoiceCtrl::SetSelectionMode( SelectionMode eMode )
_pImp->SetSelectionMode( eMode );
}
-BOOL SvtIconChoiceCtrl::HandleShortCutKey( const KeyEvent& r )
+sal_Bool SvtIconChoiceCtrl::HandleShortCutKey( const KeyEvent& r )
{
return _pImp->HandleShortCutKey( r );
}
@@ -591,7 +591,7 @@ void SvtIconChoiceCtrl::SetNoSelection()
_pImp->SetNoSelection();
}
-void SvtIconChoiceCtrl::CallImplEventListeners(ULONG nEvent, void* pData)
+void SvtIconChoiceCtrl::CallImplEventListeners(sal_uLong nEvent, void* pData)
{
CallEventListeners(nEvent, pData);
}
diff --git a/svtools/source/contnr/makefile.mk b/svtools/source/contnr/makefile.mk
deleted file mode 100644
index 777297b33e9c..000000000000
--- a/svtools/source/contnr/makefile.mk
+++ /dev/null
@@ -1,82 +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=svtools
-TARGET=svcontnr
-
-PROJECTPCH4DLL=TRUE
-PROJECTPCH=cont_pch
-PROJECTPCHSOURCE=cont_pch
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svt.pmk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES=\
- $(SLO)$/contentenumeration.obj \
- $(SLO)$/fileview.obj \
- $(SLO)$/imivctl1.obj \
- $(SLO)$/imivctl2.obj \
- $(SLO)$/ivctrl.obj \
- $(SLO)$/svicnvw.obj \
- $(SLO)$/svimpbox.obj \
- $(SLO)$/svimpicn.obj \
- $(SLO)$/svlbitm.obj \
- $(SLO)$/svlbox.obj \
- $(SLO)$/svtabbx.obj \
- $(SLO)$/svtreebx.obj \
- $(SLO)$/templwin.obj \
- $(SLO)$/tooltiplbox.obj
-
-SLOFILES= $(EXCEPTIONSFILES) \
- $(SLO)$/treelist.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES =\
- fileview.src \
- templwin.src \
- svcontnr.src
-
-HXX1TARGET= svcontnr
-HXX1EXT= hxx
-HXX1FILES= $(PRJ)$/inc$/svlbox.hxx \
- $(PRJ)$/inc$/svlbitm.hxx \
- $(PRJ)$/inc$/svtreebx.hxx \
- $(PRJ)$/inc$/svicnvw.hxx \
- $(PRJ)$/inc$/svtabbx.hxx \
- $(PRJ)$/inc$/treelist.hxx
-HXX1EXCL= -E:*include*
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svtools/source/contnr/svicnvw.cxx b/svtools/source/contnr/svicnvw.cxx
index 03a1a13b0b6d..6fd401533267 100644
--- a/svtools/source/contnr/svicnvw.cxx
+++ b/svtools/source/contnr/svicnvw.cxx
@@ -48,7 +48,6 @@ SvIcnVwDataEntry::~SvIcnVwDataEntry()
SvIconView::SvIconView( Window* pParent, WinBits nWinStyle ) :
SvLBox( pParent, nWinStyle | WB_BORDER )
{
- nWinBits = nWinStyle;
nIcnVwFlags = 0;
pImp = new SvImpIconView( this, GetModel(), nWinStyle | WB_ICON );
pImp->mpViewData = 0;
@@ -70,8 +69,6 @@ SvIconView::SvIconView( Window* pParent , const ResId& rResId ) :
SetBackground( Wallpaper( rStyleSettings.GetFieldColor() ) );
SetDefaultFont();
pImp->SetSelectionMode( GetSelectionMode() );
- pImp->SetWindowBits( nWindowStyle );
- nWinBits = nWindowStyle;
}
SvIconView::~SvIconView()
@@ -107,7 +104,7 @@ void SvIconView::DisconnectFromModel()
SvLBoxEntry* SvIconView::InsertEntry( const XubString& rText,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos )
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uLong nPos )
{
SvLBoxEntry* pEntry = CreateEntry(
rText, aCollapsedEntryBmp, aExpandedEntryBmp );
@@ -123,7 +120,7 @@ SvLBoxEntry* SvIconView::InsertEntry( const XubString& rText,
SvLBoxEntry* SvIconView::InsertEntry( const XubString& rText,
const Image& rExpEntryBmp,
const Image& rCollEntryBmp,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos)
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uLong nPos)
{
SvLBoxEntry* pEntry = CreateEntry(
rText, rCollEntryBmp, rExpEntryBmp );
@@ -219,7 +216,7 @@ SvLBoxEntry* SvIconView::CloneEntry( SvLBoxEntry* pSource )
}
-USHORT SvIconView::IsA()
+sal_uInt16 SvIconView::IsA()
{
return SV_LISTBOX_ID_ICONVIEW;
}
@@ -227,7 +224,7 @@ USHORT SvIconView::IsA()
void SvIconView::RequestingChilds( SvLBoxEntry* pParent )
{
if ( !pParent->HasChilds() )
- InsertEntry( String::CreateFromAscii("<dummy>"), pParent, FALSE, LIST_APPEND );
+ InsertEntry( String::CreateFromAscii("<dummy>"), pParent, sal_False, LIST_APPEND );
}
void SvIconView::Paint( const Rectangle& rRect )
@@ -257,7 +254,7 @@ void SvIconView::KeyInput( const KeyEvent& rKEvt )
return;
nImpFlags |= SVLBOX_IS_TRAVELSELECT;
- BOOL bKeyUsed = pImp->KeyInput( rKEvt );
+ sal_Bool bKeyUsed = pImp->KeyInput( rKEvt );
if ( !bKeyUsed )
SvLBox::KeyInput( rKEvt );
nImpFlags &= ~SVLBOX_IS_TRAVELSELECT;
@@ -281,7 +278,7 @@ void SvIconView::LoseFocus()
SvLBox::LoseFocus();
}
-void SvIconView::SetUpdateMode( BOOL bUpdate )
+void SvIconView::SetUpdateMode( sal_Bool bUpdate )
{
Control::SetUpdateMode( bUpdate );
if ( bUpdate )
@@ -320,7 +317,7 @@ void SvIconView::ModelHasInsertedTree( SvListEntry* pEntry )
}
void SvIconView::ModelIsMoving(SvListEntry* pSource,
- SvListEntry* /* pTargetParent */ , ULONG /* nChildPos */ )
+ SvListEntry* /* pTargetParent */ , sal_uLong /* nChildPos */ )
{
pImp->MovingEntry( (SvLBoxEntry*)pSource );
}
@@ -349,7 +346,7 @@ void SvIconView::ModelHasEntryInvalidated( SvListEntry* pEntry )
pImp->ModelHasEntryInvalidated( pEntry );
}
-void SvIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow )
+void SvIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow )
{
pImp->ShowTargetEmphasis( pEntry, bShow );
}
@@ -361,10 +358,10 @@ Point SvIconView::GetEntryPosition( SvLBoxEntry* pEntry ) const
void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos)
{
- pImp->SetEntryPosition( pEntry, rPos, FALSE, TRUE );
+ pImp->SetEntryPosition( pEntry, rPos, sal_False, sal_True );
}
-void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos, BOOL bAdjustAtGrid )
+void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos, sal_Bool bAdjustAtGrid )
{
pImp->SetEntryPosition( pEntry, rPos, bAdjustAtGrid );
}
@@ -372,7 +369,7 @@ void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos, BOOL
void SvIconView::SetFont( const Font& rFont )
{
Font aTempFont( rFont );
- aTempFont.SetTransparent( TRUE );
+ aTempFont.SetTransparent( sal_True );
SvLBox::SetFont( aTempFont );
RecalcViewData();
pImp->ChangedFont();
@@ -388,7 +385,7 @@ SvLBoxEntry* SvIconView::GetDropTarget( const Point& rPos )
return pImp->GetDropTarget( rPos );
}
-SvLBoxEntry* SvIconView::GetEntry( const Point& rPixPos, BOOL ) const
+SvLBoxEntry* SvIconView::GetEntry( const Point& rPixPos, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
@@ -401,10 +398,11 @@ SvLBoxEntry* SvIconView::GetEntryFromLogicPos( const Point& rDocPos ) const
}
-void SvIconView::SetWindowBits( WinBits nWinStyle )
+void SvIconView::StateChanged( StateChangedType i_nStateChange )
{
- nWinBits = nWinStyle;
- pImp->SetWindowBits( nWinStyle );
+ SvLBox::StateChanged( i_nStateChange );
+ if ( i_nStateChange == STATE_CHANGE_STYLE )
+ pImp->SetStyle( GetStyle() );
}
void SvIconView::PaintEntry( SvLBoxEntry* pEntry )
@@ -440,10 +438,10 @@ void SvIconView::SetSelectionMode( SelectionMode eSelectMode )
pImp->SetSelectionMode( eSelectMode );
}
-BOOL SvIconView::Select( SvLBoxEntry* pEntry, BOOL bSelect )
+sal_Bool SvIconView::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
EndEditing();
- BOOL bRetVal = SvListView::Select( pEntry, bSelect );
+ sal_Bool bRetVal = SvListView::Select( pEntry, bSelect );
if( bRetVal )
{
pImp->EntrySelected( pEntry, bSelect );
@@ -453,7 +451,7 @@ BOOL SvIconView::Select( SvLBoxEntry* pEntry, BOOL bSelect )
return bRetVal;
}
-void SvIconView::SelectAll( BOOL bSelect, BOOL )
+void SvIconView::SelectAll( sal_Bool bSelect, sal_Bool )
{
SvLBoxEntry* pEntry = pImp->GetCurParent();
pEntry = FirstChild( pEntry );
@@ -467,6 +465,7 @@ void SvIconView::SelectAll( BOOL bSelect, BOOL )
void SvIconView::SetCurEntry( SvLBoxEntry* _pEntry )
{
pImp->SetCursor( _pEntry );
+ OnCurrentEntryChanged();
}
SvLBoxEntry* SvIconView::GetCurEntry() const
@@ -477,7 +476,7 @@ SvLBoxEntry* SvIconView::GetCurEntry() const
void SvIconView::Arrange()
{
#ifdef DBG_UTIL
- USHORT n=1;
+ sal_uInt16 n=1;
if( n == 1 && n-1 == 0 )
{
pImp->Arrange();
@@ -497,20 +496,20 @@ void SvIconView::SetSpaceBetweenEntries( long nX, long nY )
pImp->SetSpaceBetweenEntries( nX, nY );
}
-BOOL SvIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool SvIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return pImp->NotifyMoving(pTarget,pEntry,rpNewParent,rNewChildPos);
}
-BOOL SvIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool SvIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return pImp->NotifyCopying(pTarget,pEntry,rpNewParent,rNewChildPos);
}
-void SvIconView::EnableInplaceEditing( BOOL bEnable )
+void SvIconView::EnableInplaceEditing( sal_Bool bEnable )
{
SvLBox::EnableInplaceEditing( bEnable );
}
@@ -523,7 +522,7 @@ void SvIconView::EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if ( EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
EditItemText( pEntry, (SvLBoxString*)pItem, aSel );
}
}
@@ -536,7 +535,7 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
DBG_ASSERT(pEntry&&pItem,"EditItemText:Params?");
pCurEdEntry = pEntry;
pCurEdItem = pItem;
- Rectangle aRect( pImp->CalcTextRect( pEntry, (SvLBoxString*)pItem,0,TRUE ));
+ Rectangle aRect( pImp->CalcTextRect( pEntry, (SvLBoxString*)pItem,0,sal_True ));
aRect.Bottom() += 4;
pImp->MakeVisible( aRect ); // vor der Umrechnung in Pixel-Koord. rufen!
@@ -548,9 +547,6 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
aRect.Bottom() += 2; // sieht huebscher aus
-#ifdef WIN
- aRect.Bottom() += 4;
-#endif
#ifdef OS2
#if OS2_SINGLE_LINE_EDIT
@@ -566,7 +562,7 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
#endif
#endif // OS2
- EditText( ((SvLBoxString*)pItem)->GetText(), aRect, rSel, TRUE );
+ EditText( ((SvLBoxString*)pItem)->GetText(), aRect, rSel, sal_True );
}
void SvIconView::EditEntry( SvLBoxEntry* pEntry )
@@ -581,7 +577,7 @@ void SvIconView::EditEntry( SvLBoxEntry* pEntry )
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if( EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
EditItemText( pEntry, pItem, aSel );
}
}
@@ -601,14 +597,14 @@ void SvIconView::EditedText( const XubString& rStr )
}
-BOOL SvIconView::EditingEntry( SvLBoxEntry*, Selection& )
+sal_Bool SvIconView::EditingEntry( SvLBoxEntry*, Selection& )
{
- return TRUE;
+ return sal_True;
}
-BOOL SvIconView::EditedEntry( SvLBoxEntry*, const XubString& )
+sal_Bool SvIconView::EditedEntry( SvLBoxEntry*, const XubString& )
{
- return TRUE;
+ return sal_True;
}
@@ -661,9 +657,9 @@ Region SvIconView::GetDragRegion() const
return aRegion;
}
-ULONG SvIconView::GetSelectionCount() const
+sal_uLong SvIconView::GetSelectionCount() const
{
- return (ULONG)(pImp->GetSelectionCount());
+ return (sal_uLong)(pImp->GetSelectionCount());
}
void SvIconView::SetGrid( long nDX, long nDY )
@@ -671,18 +667,18 @@ void SvIconView::SetGrid( long nDX, long nDY )
pImp->SetGrid( nDX, nDY );
}
-void SvIconView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvIconView::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
SvLBox::ModelNotification( nActionId, pEntry1, pEntry2, nPos );
switch( nActionId )
{
case LISTACTION_RESORTING:
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
break;
case LISTACTION_RESORTED:
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
Arrange();
break;
@@ -694,9 +690,9 @@ void SvIconView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
}
-void SvIconView::Scroll( long nDeltaX, long nDeltaY, USHORT )
+void SvIconView::Scroll( long nDeltaX, long nDeltaY, sal_uInt16 )
{
- pImp->Scroll( nDeltaX, nDeltaY, FALSE );
+ pImp->Scroll( nDeltaX, nDeltaY, sal_False );
}
void SvIconView::PrepareCommandEvent( const CommandEvent& rCEvt )
@@ -707,7 +703,7 @@ void SvIconView::PrepareCommandEvent( const CommandEvent& rCEvt )
void SvIconView::StartDrag( sal_Int8 nAction, const Point& rPos )
{
pImp->SttDrag( rPos );
- SvLBoxEntry* pEntry = GetEntry( rPos, TRUE );
+ SvLBoxEntry* pEntry = GetEntry( rPos, sal_True );
pImp->mpViewData = pEntry;
SvLBox::StartDrag( nAction, rPos );
}
@@ -753,14 +749,14 @@ void SvIconView::HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPos )
pImp->HideShowDDIcon( pRefEntry, rPos );
}
-void SvIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
+void SvIconView::SelectRect( const Rectangle& rRect, sal_Bool bAdd,
SvPtrarr* pRects, short nOffs )
{
pImp->SelectRect( rRect, bAdd, pRects, nOffs );
}
void SvIconView::CalcScrollOffsets( const Point& rRefPosPixel, long& rX, long& rY,
- BOOL b, USHORT nBorderWidth )
+ sal_Bool b, sal_uInt16 nBorderWidth )
{
pImp->CalcScrollOffsets( rRefPosPixel, rX, rY, b, nBorderWidth );
}
@@ -784,7 +780,7 @@ void SvIconView::AdjustAtGrid( SvLBoxEntry* pEntry )
pImp->AdjustAtGrid( pEntry );
}
-void SvIconView::LockEntryPos( SvLBoxEntry* pEntry, BOOL bLock )
+void SvIconView::LockEntryPos( SvLBoxEntry* pEntry, sal_Bool bLock )
{
SvIcnVwDataEntry* pViewData = (SvIcnVwDataEntry*)GetViewData( pEntry );
if( bLock )
@@ -793,7 +789,7 @@ void SvIconView::LockEntryPos( SvLBoxEntry* pEntry, BOOL bLock )
pViewData->ClearVwFlags( ICNVW_FLAG_POS_LOCKED );
}
-BOOL SvIconView::IsEntryPosLocked( const SvLBoxEntry* pEntry ) const
+sal_Bool SvIconView::IsEntryPosLocked( const SvLBoxEntry* pEntry ) const
{
const SvIcnVwDataEntry* pViewData = (const SvIcnVwDataEntry*)GetViewData( (SvListEntry*)pEntry );
return pViewData->IsEntryPosLocked();
@@ -809,14 +805,14 @@ SvIconViewTextMode SvIconView::GetTextMode( const SvLBoxEntry* pEntry ) const
return pImp->GetTextMode( pEntry );
}
-SvLBoxEntry* SvIconView::GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const
+SvLBoxEntry* SvIconView::GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
return ((SvIconView*)this)->pImp->GetNextEntry( aPos, pCurEntry );
}
-SvLBoxEntry* SvIconView::GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const
+SvLBoxEntry* SvIconView::GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 9c5b4a56df30..69e9d12ace50 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -30,13 +30,10 @@
#include "precompiled_svtools.hxx"
#include <vcl/svapp.hxx>
#include <vcl/salnativewidgets.hxx>
-
#include <vcl/help.hxx>
-#include <tabbar.hxx>
+#include <svtools/tabbar.hxx>
-#ifndef _STACK_
#include <stack>
-#endif
#define _SVTREEBX_CXX
#include <svtools/svtreebx.hxx>
@@ -44,10 +41,8 @@
#include <svimpbox.hxx>
#include <rtl/instance.hxx>
#include <svtools/svtdata.hxx>
-
+#include <tools/wintypes.hxx>
#include <svtools/svtools.hrc>
-
-// #102891# --------------------
#include <comphelper/processfactory.hxx>
#define NODE_BMP_TABDIST_NOTVALID -2000000
@@ -75,8 +70,8 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
pView = pLBView;
pTree = pLBTree;
aSelEng.SetFunctionSet( (FunctionSet*)&aFctSet );
- aSelEng.ExpandSelectionOnMouseMove( FALSE );
- SetWindowBits( nWinStyle );
+ aSelEng.ExpandSelectionOnMouseMove( sal_False );
+ SetStyle( nWinStyle );
SetSelectionMode( SINGLE_SELECTION );
SetDragDropMode( 0 );
@@ -101,7 +96,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
nYoffsNodeBmp = 0;
nNodeBmpWidth = 0;
- bAsyncBeginDrag = FALSE;
+ bAsyncBeginDrag = sal_False;
aAsyncBeginDragTimer.SetTimeout( 0 );
aAsyncBeginDragTimer.SetTimeoutHdl( LINK(this,SvImpLBox,BeginDragHdl));
// Button-Animation in Listbox
@@ -119,11 +114,11 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
pMostRightEntry = 0;
nCurUserEvent = 0xffffffff;
- bUpdateMode = TRUE;
- bInVScrollHdl = FALSE;
+ bUpdateMode = sal_True;
+ bInVScrollHdl = sal_False;
nFlags |= F_FILLING;
- bSubLstOpRet = bSubLstOpLR = bContextMenuHandling = bIsCellFocusEnabled = FALSE;
+ bSubLstOpRet = bSubLstOpLR = bContextMenuHandling = bIsCellFocusEnabled = sal_False;
}
SvImpLBox::~SvImpLBox()
@@ -165,7 +160,7 @@ short SvImpLBox::UpdateContextBmpWidthVector( SvLBoxEntry* pEntry, short nWidth
{
DBG_ASSERT( pView->pModel, "View and Model aren't valid!" );
- USHORT nDepth = pView->pModel->GetDepth( pEntry );
+ sal_uInt16 nDepth = pView->pModel->GetDepth( pEntry );
// initialize vector if necessary
std::vector< short >::size_type nSize = aContextBmpWidthVector.size();
while ( nDepth > nSize )
@@ -213,7 +208,7 @@ void SvImpLBox::UpdateContextBmpWidthVectorFromMovedEntry( SvLBoxEntry* pEntry )
void SvImpLBox::UpdateContextBmpWidthMax( SvLBoxEntry* pEntry )
{
- USHORT nDepth = pView->pModel->GetDepth( pEntry );
+ sal_uInt16 nDepth = pView->pModel->GetDepth( pEntry );
if( aContextBmpWidthVector.size() < 1 )
return;
short nWidth = aContextBmpWidthVector[ nDepth ];
@@ -244,11 +239,11 @@ void SvImpLBox::CalcCellFocusRect( SvLBoxEntry* pEntry, Rectangle& rRect )
}
}
-void SvImpLBox::SetWindowBits( WinBits nWinStyle )
+void SvImpLBox::SetStyle( WinBits i_nWinStyle )
{
- nWinBits = nWinStyle;
- if((nWinStyle & WB_SIMPLEMODE) && aSelEng.GetSelectionMode()==MULTIPLE_SELECTION)
- aSelEng.AddAlways( TRUE );
+ m_nStyle = i_nWinStyle;
+ if ( ( m_nStyle & WB_SIMPLEMODE) && ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) )
+ aSelEng.AddAlways( sal_True );
}
void SvImpLBox::SetExtendedWindowBits( ExtendedWinBits _nBits )
@@ -335,11 +330,11 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar )
nFlags &= (~F_FILLING);
- bInVScrollHdl = TRUE;
+ bInVScrollHdl = sal_True;
if( pView->IsEditingActive() )
{
- pView->EndEditing( TRUE ); // Cancel
+ pView->EndEditing( sal_True ); // Cancel
pView->Update();
}
BeginScroll();
@@ -349,7 +344,7 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar )
if( nDelta == 1 )
CursorDown();
else
- PageDown( (USHORT) nDelta );
+ PageDown( (sal_uInt16) nDelta );
}
else
{
@@ -357,9 +352,9 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar )
if( nDelta == 1 )
CursorUp();
else
- PageUp( (USHORT) nDelta );
+ PageUp( (sal_uInt16) nDelta );
}
- bInVScrollHdl = FALSE;
+ bInVScrollHdl = sal_False;
return 0;
}
@@ -371,13 +366,13 @@ void SvImpLBox::CursorDown()
{
nFlags &= (~F_FILLING);
pView->NotifyScrolling( -1 );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Update();
pStartEntry = pNextFirstToDraw;
Rectangle aArea( GetVisibleArea() );
pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, SCROLL_NOCHILDREN );
pView->Update();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->NotifyScrolled();
}
}
@@ -390,31 +385,31 @@ void SvImpLBox::CursorUp()
nFlags &= (~F_FILLING);
long nEntryHeight = pView->GetEntryHeight();
pView->NotifyScrolling( 1 );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Update();
pStartEntry = pPrevFirstToDraw;
Rectangle aArea( GetVisibleArea() );
aArea.Bottom() -= nEntryHeight;
pView->Scroll( 0, nEntryHeight, aArea, SCROLL_NOCHILDREN );
pView->Update();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->NotifyScrolled();
}
}
-void SvImpLBox::PageDown( USHORT nDelta )
+void SvImpLBox::PageDown( sal_uInt16 nDelta )
{
- USHORT nRealDelta = nDelta;
+ sal_uInt16 nRealDelta = nDelta;
if( !nDelta )
return;
SvLBoxEntry* pNext;
pNext = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nRealDelta ));
- if( (ULONG)pNext == (ULONG)pStartEntry )
+ if( (sal_uLong)pNext == (sal_uLong)pStartEntry )
return;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
nFlags &= (~F_FILLING);
pView->Update();
@@ -438,21 +433,21 @@ void SvImpLBox::PageDown( USHORT nDelta )
pView->NotifyScrolled();
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
-void SvImpLBox::PageUp( USHORT nDelta )
+void SvImpLBox::PageUp( sal_uInt16 nDelta )
{
- USHORT nRealDelta = nDelta;
+ sal_uInt16 nRealDelta = nDelta;
if( !nDelta )
return;
SvLBoxEntry* pPrev = (SvLBoxEntry*)(pView->PrevVisible( pStartEntry, nRealDelta ));
- if( (ULONG)pPrev == (ULONG)pStartEntry )
+ if( (sal_uLong)pPrev == (sal_uLong)pStartEntry )
return;
nFlags &= (~F_FILLING);
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Update();
pStartEntry = pPrev;
@@ -472,10 +467,10 @@ void SvImpLBox::PageUp( USHORT nDelta )
pView->NotifyScrolled();
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
-void SvImpLBox::KeyUp( BOOL bPageUp, BOOL bNotifyScroll )
+void SvImpLBox::KeyUp( sal_Bool bPageUp, sal_Bool bNotifyScroll )
{
if( !aVerSBar.IsVisible() )
return;
@@ -509,7 +504,7 @@ void SvImpLBox::KeyUp( BOOL bPageUp, BOOL bNotifyScroll )
}
-void SvImpLBox::KeyDown( BOOL bPageDown, BOOL bNotifyScroll )
+void SvImpLBox::KeyDown( sal_Bool bPageDown, sal_Bool bNotifyScroll )
{
if( !aVerSBar.IsVisible() )
return;
@@ -584,15 +579,15 @@ void SvImpLBox::InvalidateEntry( SvLBoxEntry* pEntry )
}
if( !(nFlags & F_IN_PAINT ))
{
- BOOL bHasFocusRect = FALSE;
+ sal_Bool bHasFocusRect = sal_False;
if( pEntry==pCursor && pView->HasFocus() )
{
- bHasFocusRect = TRUE;
- ShowCursor( FALSE );
+ bHasFocusRect = sal_True;
+ ShowCursor( sal_False );
}
InvalidateEntry( GetEntryLine( pEntry ) );
if( bHasFocusRect )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -617,7 +612,7 @@ void SvImpLBox::RecalcFocusRect()
// Setzt Cursor. Passt bei SingleSelection die Selektion an
//
-void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
+void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect )
{
SvViewDataEntry* pViewDataNewCur = 0;
if( pEntry )
@@ -640,18 +635,18 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
SvLBoxEntry* pOldCursor = pCursor;
if( pCursor && pEntry != pCursor )
{
- pView->SetEntryFocus( pCursor, FALSE );
+ pView->SetEntryFocus( pCursor, sal_False );
if( bSimpleTravel )
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
pView->HideFocus();
}
pCursor = pEntry;
if( pCursor )
{
- pViewDataNewCur->SetFocus( TRUE );
+ pViewDataNewCur->SetFocus( sal_True );
if(!bForceNoSelect && bSimpleTravel && !(nFlags & F_DESEL_ALL) && GetUpdateMode())
{
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
// Mehrfachselektion: Im Cursor-Move selektieren, wenn
// nicht im Add-Mode (Ctrl-F8)
@@ -660,11 +655,11 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
!(nFlags & F_DESEL_ALL) && !aSelEng.IsAddMode() &&
!bForceNoSelect )
{
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
else
{
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
if( pAnchor )
@@ -674,9 +669,11 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
}
}
nFlags &= (~F_DESEL_ALL);
+
+ pView->OnCurrentEntryChanged();
}
-void SvImpLBox::ShowCursor( BOOL bShow )
+void SvImpLBox::ShowCursor( sal_Bool bShow )
{
if( !bShow || !pCursor || !pView->HasFocus() )
{
@@ -701,8 +698,8 @@ void SvImpLBox::ShowCursor( BOOL bShow )
-void SvImpLBox::UpdateAll( BOOL bInvalidateCompleteView,
- BOOL bUpdateVerScrollBar )
+void SvImpLBox::UpdateAll( sal_Bool bInvalidateCompleteView,
+ sal_Bool bUpdateVerScrollBar )
{
if( bUpdateVerScrollBar )
FindMostRight(0);
@@ -711,8 +708,8 @@ void SvImpLBox::UpdateAll( BOOL bInvalidateCompleteView,
FillView();
ShowVerSBar();
if( bSimpleTravel && pCursor && pView->HasFocus() )
- pView->Select( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->Select( pCursor, sal_True );
+ ShowCursor( sal_True );
if( bInvalidateCompleteView )
pView->Invalidate();
else
@@ -726,7 +723,7 @@ IMPL_LINK_INLINE_START( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar )
{
if( pView->IsEditingActive() )
{
- pView->EndEditing( TRUE ); // Cancel
+ pView->EndEditing( sal_True ); // Cancel
pView->Update();
}
pView->nFocusWidth = -1;
@@ -743,7 +740,7 @@ void SvImpLBox::KeyLeftRight( long nDelta )
BeginScroll();
nFlags &= (~F_FILLING);
pView->NotifyScrolling( 0 ); // 0 == horizontales Scrolling
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
// neuen Origin berechnen
long nPos = aHorSBar.GetThumbPos();
@@ -761,7 +758,7 @@ void SvImpLBox::KeyLeftRight( long nDelta )
else
pView->Invalidate();
RecalcFocusRect();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->NotifyScrolled();
}
@@ -780,8 +777,8 @@ SvLBoxEntry* SvImpLBox::GetClickedEntry( const Point& rPoint ) const
if( pView->GetEntryCount() == 0 || !pStartEntry || !pView->GetEntryHeight())
return 0;
- USHORT nClickedEntry = (USHORT)(rPoint.Y() / pView->GetEntryHeight() );
- USHORT nTemp = nClickedEntry;
+ sal_uInt16 nClickedEntry = (sal_uInt16)(rPoint.Y() / pView->GetEntryHeight() );
+ sal_uInt16 nTemp = nClickedEntry;
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nTemp ));
return pEntry;
}
@@ -790,13 +787,13 @@ SvLBoxEntry* SvImpLBox::GetClickedEntry( const Point& rPoint ) const
// prueft, ob der Eintrag "richtig" getroffen wurde
// (Focusrect+ ContextBitmap bei TreeListBox)
//
-BOOL SvImpLBox::EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPosPixel,long nLine)
+sal_Bool SvImpLBox::EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPosPixel,long nLine)
{
- BOOL bRet;
+ sal_Bool bRet;
// bei "besonderen" Entries (mit CheckButtons usw.) sind wir
// nicht so pingelig
if( pEntry->ItemCount() >= 3 )
- return TRUE;
+ return sal_True;
Rectangle aRect( pView->GetFocusRect( pEntry, nLine ));
aRect.Right() = GetOutputSize().Width() - pView->GetMapMode().GetOrigin().X();
@@ -809,9 +806,9 @@ BOOL SvImpLBox::EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPosPixel,long n
Point aPos( rPosPixel );
aPos -= pView->GetMapMode().GetOrigin();
if( aRect.IsInside( aPos ) )
- bRet = TRUE;
+ bRet = sal_True;
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -824,8 +821,8 @@ SvLBoxEntry* SvImpLBox::GetEntry( const Point& rPoint ) const
|| !pView->GetEntryHeight())
return 0;
- USHORT nClickedEntry = (USHORT)(rPoint.Y() / pView->GetEntryHeight() );
- USHORT nTemp = nClickedEntry;
+ sal_uInt16 nClickedEntry = (sal_uInt16)(rPoint.Y() / pView->GetEntryHeight() );
+ sal_uInt16 nTemp = nClickedEntry;
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nTemp ));
if( nTemp != nClickedEntry )
pEntry = 0;
@@ -833,7 +830,7 @@ SvLBoxEntry* SvImpLBox::GetEntry( const Point& rPoint ) const
}
-SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,BOOL bNotifyScroll)
+SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,sal_Bool bNotifyScroll)
{
if( !pCursor )
return 0;
@@ -848,19 +845,19 @@ SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,BOOL bNotifyScroll)
pEntry = (SvLBoxEntry*)(pView->NextVisible( pCursor ));
if( pEntry && pEntry != pCursor )
- pView->SetEntryFocus( pCursor, FALSE );
+ pView->SetEntryFocus( pCursor, sal_False );
if( nY < 0 )
- KeyUp( FALSE, bNotifyScroll );
+ KeyUp( sal_False, bNotifyScroll );
else
- KeyDown( FALSE, bNotifyScroll );
+ KeyDown( sal_False, bNotifyScroll );
}
else
{
pEntry = GetClickedEntry( rPoint );
if( !pEntry )
{
- USHORT nSteps = 0xFFFF;
+ sal_uInt16 nSteps = 0xFFFF;
// LastVisible ist noch nicht implementiert!
pEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nSteps ));
}
@@ -869,7 +866,7 @@ SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,BOOL bNotifyScroll)
if( pEntry != pCursor &&
aSelEng.GetSelectionMode() == SINGLE_SELECTION
)
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
}
}
return pEntry;
@@ -897,11 +894,11 @@ void SvImpLBox::Paint( const Rectangle& rRect )
SvLBoxEntry* pFirst = pView->First();
if( pFirst != pStartEntry )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pStartEntry = pView->First();
aVerSBar.SetThumbPos( 0 );
StopUserEvent();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
nCurUserEvent = Application::PostUserEvent(LINK(this,SvImpLBox,MyUserEvent),(void*)1);
return;
}
@@ -919,8 +916,8 @@ void SvImpLBox::Paint( const Rectangle& rRect )
long nEntryHeight = pView->GetEntryHeight();
// Bereich der zu zeichnenden Entries berechnen
- USHORT nStartLine = (USHORT)( rRect.Top() / nEntryHeight );
- USHORT nCount = (USHORT)( nRectHeight / nEntryHeight );
+ sal_uInt16 nStartLine = (sal_uInt16)( rRect.Top() / nEntryHeight );
+ sal_uInt16 nCount = (sal_uInt16)( nRectHeight / nEntryHeight );
nCount += 2; // keine Zeile vergessen
long nY = nStartLine * nEntryHeight;
@@ -935,15 +932,15 @@ void SvImpLBox::Paint( const Rectangle& rRect )
// erst die Linien Zeichnen, dann clippen!
pView->SetClipRegion();
- if( nWinBits & ( WB_HASLINES | WB_HASLINESATROOT ) )
+ if( m_nStyle & ( WB_HASLINES | WB_HASLINESATROOT ) )
DrawNet();
pView->SetClipRegion( aClipRegion );
- for( USHORT n=0; n< nCount && pEntry; n++ )
+ for( sal_uInt16 n=0; n< nCount && pEntry; n++ )
{
/*long nMaxRight=*/
- pView->PaintEntry1( pEntry, nY, 0xffff, TRUE );
+ pView->PaintEntry1( pEntry, nY, 0xffff, sal_True );
nY += nEntryHeight;
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
@@ -951,8 +948,8 @@ void SvImpLBox::Paint( const Rectangle& rRect )
if ( !pCursor && ( ( nExtendedWinBits & EWB_NO_AUTO_CURENTRY ) == 0 ) )
{
// do not select if multiselection or explicit set
- BOOL bNotSelect = ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION )
- || ( ( nWinBits & WB_NOINITIALSELECTION ) == WB_NOINITIALSELECTION );
+ sal_Bool bNotSelect = ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION )
+ || ( ( m_nStyle & WB_NOINITIALSELECTION ) == WB_NOINITIALSELECTION );
SetCursor( pStartEntry, bNotSelect );
}
@@ -967,17 +964,17 @@ void SvImpLBox::Paint( const Rectangle& rRect )
nFlags &= (~F_IN_PAINT);
}
-void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
+void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, sal_Bool bMoveToTop )
{
if( !pEntry )
return;
- BOOL bInView = IsEntryInView( pEntry );
+ sal_Bool bInView = IsEntryInView( pEntry );
if( bInView && (!bMoveToTop || pStartEntry == pEntry) )
return; // ist schon sichtbar
- if( pStartEntry || (nWinBits & WB_FORCE_MAKEVISIBLE) )
+ if( pStartEntry || (m_nStyle & WB_FORCE_MAKEVISIBLE) )
nFlags &= (~F_FILLING);
if( !bInView )
{
@@ -989,7 +986,7 @@ void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
if( !pView->IsExpanded( pParent ) )
{
#ifdef DBG_UTIL
- BOOL bRet =
+ sal_Bool bRet =
#endif
pView->Expand( pParent );
DBG_ASSERT(bRet,"Not expanded!");
@@ -1003,10 +1000,10 @@ void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
}
pStartEntry = pEntry;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
FillView();
aVerSBar.SetThumbPos( (long)(pView->GetVisiblePos( pStartEntry )) );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->Invalidate();
}
@@ -1022,21 +1019,21 @@ void SvImpLBox::RepaintSelectionItems()
if( nNodeBmpTabDistance == NODE_BMP_TABDIST_NOTVALID )
SetNodeBmpTabDistance();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
long nEntryHeight = pView->GetEntryHeight();
- ULONG nCount = nVisibleCount;
+ sal_uLong nCount = nVisibleCount;
long nY = 0;
SvLBoxEntry* pEntry = pStartEntry;
- for( ULONG n=0; n< nCount && pEntry; n++ )
+ for( sal_uLong n=0; n< nCount && pEntry; n++ )
{
pView->PaintEntry1( pEntry, nY, 0xffff ); //wg. ItemsetBrowser SV_LBOXTAB_SHOW_SELECTION );
nY += nEntryHeight;
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
@@ -1072,7 +1069,7 @@ void SvImpLBox::DrawNet()
SvLBoxTab* pFirstDynamicTab = pView->GetFirstDynamicTab();
while( pTree->GetDepth( pEntry ) > 0 )
pEntry = pView->GetParent( pEntry );
- USHORT nOffs = (USHORT)(pView->GetVisiblePos( pStartEntry ) -
+ sal_uInt16 nOffs = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ) -
pView->GetVisiblePos( pEntry ));
long nY = 0;
nY -= ( nOffs * nEntryHeight );
@@ -1087,12 +1084,12 @@ void SvImpLBox::DrawNet()
aCol = rStyleSettings.GetShadowColor();
pView->SetLineColor( aCol );
Point aPos1, aPos2;
- USHORT nDistance;
- ULONG nMax = nVisibleCount + nOffs + 1;
+ sal_uInt16 nDistance;
+ sal_uLong nMax = nVisibleCount + nOffs + 1;
const Image& rExpandedNodeBitmap = GetExpandedNodeBmp();
- for( ULONG n=0; n< nMax && pEntry; n++ )
+ for( sal_uLong n=0; n< nMax && pEntry; n++ )
{
if( pView->IsExpanded(pEntry) )
{
@@ -1108,14 +1105,14 @@ void SvImpLBox::DrawNet()
pChild = pView->FirstChild( pEntry );
DBG_ASSERT(pChild,"Child?");
pChild = pTree->LastSibling( pChild );
- nDistance = (USHORT)(pView->GetVisiblePos(pChild) -
+ nDistance = (sal_uInt16)(pView->GetVisiblePos(pChild) -
pView->GetVisiblePos(pEntry));
aPos2 = aPos1;
aPos2.Y() += nDistance * nEntryHeight;
pView->DrawLine( aPos1, aPos2 );
}
// Sichtbar im Control ?
- if( n>= nOffs && ((nWinBits & WB_HASLINESATROOT) || !pTree->IsAtRootDepth(pEntry)))
+ if( n>= nOffs && ((m_nStyle & WB_HASLINESATROOT) || !pTree->IsAtRootDepth(pEntry)))
{
// kann aPos1 recyclet werden ?
if( !pView->IsExpanded(pEntry) )
@@ -1137,7 +1134,7 @@ void SvImpLBox::DrawNet()
nY += nEntryHeight;
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
- if( nWinBits & WB_HASLINESATROOT )
+ if( m_nStyle & WB_HASLINESATROOT )
{
pEntry = pView->First();
aPos1.X() = pView->GetTabPos( pEntry, pFirstDynamicTab);
@@ -1163,7 +1160,7 @@ static long GetOptSize( TabBar* pTabBar )
return pTabBar->CalcWindowSizePixel().Width();
}
-void SvImpLBox::PositionScrollBars( Size& rSize, USHORT nMask )
+void SvImpLBox::PositionScrollBars( Size& rSize, sal_uInt16 nMask )
{
long nOverlap = 0;
@@ -1221,30 +1218,31 @@ void SvImpLBox::PositionScrollBars( Size& rSize, USHORT nMask )
}
// nResult: Bit0 == VerSBar Bit1 == HorSBar
-USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
+sal_uInt16 SvImpLBox::AdjustScrollBars( Size& rSize )
{
long nEntryHeight = pView->GetEntryHeight();
if( !nEntryHeight )
return 0;
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
Size aOSize( pView->Control::GetOutputSizePixel() );
- BOOL bVerSBar = ( pView->nWindowStyle & WB_VSCROLL ) != 0;
- BOOL bHorBar = FALSE;
+ const WinBits nWindowStyle = pView->GetStyle();
+ sal_Bool bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
+ sal_Bool bHorBar = sal_False;
long nMaxRight = aOSize.Width(); //GetOutputSize().Width();
Point aOrigin( pView->GetMapMode().GetOrigin() );
aOrigin.X() *= -1;
nMaxRight += aOrigin.X() - 1;
long nVis = nMostRight - aOrigin.X();
if( pTabBar || (
- (pView->nWindowStyle & WB_HSCROLL) &&
+ (nWindowStyle & WB_HSCROLL) &&
(nVis < nMostRight || nMaxRight < nMostRight) ))
- bHorBar = TRUE;
+ bHorBar = sal_True;
// Anzahl aller nicht eingeklappten Eintraege
- ULONG nTotalCount = pView->GetVisibleCount();
+ sal_uLong nTotalCount = pView->GetVisibleCount();
// Anzahl in der View sichtbarer Eintraege
nVisibleCount = aOSize.Height() / nEntryHeight;
@@ -1257,9 +1255,9 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
nMaxRight -= nVerSBarWidth;
if( !bHorBar )
{
- if( (pView->nWindowStyle & WB_HSCROLL) &&
+ if( (nWindowStyle & WB_HSCROLL) &&
(nVis < nMostRight || nMaxRight < nMostRight) )
- bHorBar = TRUE;
+ bHorBar = sal_True;
}
}
@@ -1322,7 +1320,7 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
nTemp = nNewThumbPos - nTemp;
if( pView->IsEditingActive() )
{
- pView->EndEditing( TRUE ); // Cancel
+ pView->EndEditing( sal_True ); // Cancel
pView->Update();
}
pView->nFocusWidth = -1;
@@ -1378,23 +1376,23 @@ void SvImpLBox::FillView()
{
if( !pStartEntry )
{
- USHORT nVisibleViewCount = (USHORT)(pView->GetVisibleCount());
- USHORT nTempThumb = (USHORT)aVerSBar.GetThumbPos();
+ sal_uInt16 nVisibleViewCount = (sal_uInt16)(pView->GetVisibleCount());
+ sal_uInt16 nTempThumb = (sal_uInt16)aVerSBar.GetThumbPos();
if( nTempThumb >= nVisibleViewCount )
nTempThumb = nVisibleViewCount - 1;
pStartEntry = (SvLBoxEntry*)(pView->GetEntryAtVisPos(nTempThumb));
}
if( pStartEntry )
{
- USHORT nLast = (USHORT)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
- USHORT nThumb = (USHORT)(pView->GetVisiblePos( pStartEntry ));
- USHORT nCurDispEntries = nLast-nThumb+1;
+ sal_uInt16 nLast = (sal_uInt16)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
+ sal_uInt16 nThumb = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ));
+ sal_uInt16 nCurDispEntries = nLast-nThumb+1;
if( nCurDispEntries < nVisibleCount )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
// Fenster fuellen, indem der Thumb schrittweise
// nach oben bewegt wird
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SvLBoxEntry* pTemp = pStartEntry;
while( nCurDispEntries < nVisibleCount && pTemp )
{
@@ -1404,13 +1402,13 @@ void SvImpLBox::FillView()
nThumb--;
pStartEntry = pTemp;
nCurDispEntries++;
- bFound = TRUE;
+ bFound = sal_True;
}
}
if( bFound )
{
aVerSBar.SetThumbPos( nThumb );
- ShowCursor( TRUE ); // Focusrect neu berechnen
+ ShowCursor( sal_True ); // Focusrect neu berechnen
pView->Invalidate();
}
}
@@ -1422,11 +1420,11 @@ void SvImpLBox::FillView()
void SvImpLBox::ShowVerSBar()
{
- BOOL bVerBar = ( pView->nWindowStyle & WB_VSCROLL ) != 0;
- ULONG nVis = 0;
+ sal_Bool bVerBar = ( pView->GetStyle() & WB_VSCROLL ) != 0;
+ sal_uLong nVis = 0;
if( !bVerBar )
nVis = pView->GetVisibleCount();
- if( bVerBar || (nVisibleCount && nVis > (ULONG)(nVisibleCount-1)) )
+ if( bVerBar || (nVisibleCount && nVis > (sal_uLong)(nVisibleCount-1)) )
{
if( !aVerSBar.IsVisible() )
{
@@ -1495,18 +1493,18 @@ void SvImpLBox::SyncVerThumb()
aVerSBar.SetThumbPos( 0 );
}
-BOOL SvImpLBox::IsEntryInView( SvLBoxEntry* pEntry ) const
+sal_Bool SvImpLBox::IsEntryInView( SvLBoxEntry* pEntry ) const
{
// Parent eingeklappt
if( !pView->IsEntryVisible(pEntry) )
- return FALSE;
+ return sal_False;
long nY = GetEntryLine( pEntry );
if( nY < 0 )
- return FALSE;
+ return sal_False;
long nMax = nVisibleCount * pView->GetEntryHeight();
if( nY >= nMax )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
@@ -1549,10 +1547,10 @@ void SvImpLBox::IndentChanged( short /* nIndentPixel */ ) {}
void SvImpLBox::EntryExpanded( SvLBoxEntry* pEntry )
{
- // SelAllDestrAnch( FALSE, TRUE ); //DeselectAll();
+ // SelAllDestrAnch( sal_False, sal_True ); //DeselectAll();
if( GetUpdateMode() )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
long nY = GetEntryLine( pEntry );
if( IsLineVisible(nY) )
{
@@ -1564,7 +1562,7 @@ void SvImpLBox::EntryExpanded( SvLBoxEntry* pEntry )
// die Thumb-Position korrigiert werden.
SyncVerThumb();
ShowVerSBar();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -1573,7 +1571,7 @@ void SvImpLBox::EntryCollapsed( SvLBoxEntry* pEntry )
if( !pView->IsEntryVisible( pEntry ) )
return;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( !pMostRightEntry || pTree->IsChild( pEntry,pMostRightEntry ) )
{
@@ -1583,13 +1581,13 @@ void SvImpLBox::EntryCollapsed( SvLBoxEntry* pEntry )
if( pStartEntry )
{
long nOldThumbPos = aVerSBar.GetThumbPos();
- ULONG nVisList = pView->GetVisibleCount();
+ sal_uLong nVisList = pView->GetVisibleCount();
aVerSBar.SetRange( Range(0, nVisList-1) );
long nNewThumbPos = aVerSBar.GetThumbPos();
if( nNewThumbPos != nOldThumbPos )
{
pStartEntry = pView->First();
- USHORT nDistance = (USHORT)nNewThumbPos;
+ sal_uInt16 nDistance = (sal_uInt16)nNewThumbPos;
if( nDistance )
pStartEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry,
nDistance));
@@ -1605,9 +1603,9 @@ void SvImpLBox::EntryCollapsed( SvLBoxEntry* pEntry )
SetCursor( pEntry );
if( GetUpdateMode() )
ShowVerSBar();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
if( GetUpdateMode() && pCursor )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
void SvImpLBox::CollapsingEntry( SvLBoxEntry* pEntry )
@@ -1615,7 +1613,7 @@ void SvImpLBox::CollapsingEntry( SvLBoxEntry* pEntry )
if( !pView->IsEntryVisible( pEntry ) || !pStartEntry )
return;
- SelAllDestrAnch( FALSE, TRUE ); // deselectall
+ SelAllDestrAnch( sal_False, sal_True ); // deselectall
// ist der eingeklappte Parent sichtbar ?
long nY = GetEntryLine( pEntry );
@@ -1658,13 +1656,13 @@ void SvImpLBox::SetNodeBmpTabDistance()
//
// korrigiert bei SingleSelection den Cursor
//
-void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
+void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
if( nFlags & F_IGNORE_SELECT )
return;
/*
- if( (nWinBits & WB_HIDESELECTION) && pEntry && !pView->HasFocus() )
+ if( (m_nStyle & WB_HIDESELECTION) && pEntry && !pView->HasFocus() )
{
SvViewData* pViewData = pView->GetViewData( pEntry );
pViewData->SetCursored( bSelect );
@@ -1685,9 +1683,9 @@ void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
long nY = GetEntryLine( pEntry );
if( IsLineVisible( nY ) )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->PaintEntry1( pEntry, nY, 0xffff ); // wg. ItemsetBrowser SV_LBOXTAB_SHOW_SELECTION );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
}
@@ -1731,14 +1729,14 @@ void SvImpLBox::RemovingEntry( SvLBoxEntry* pEntry )
if( pCursor && pCursor == pEntry )
{
if( bSimpleTravel )
- pView->Select( pCursor, FALSE );
- ShowCursor( FALSE ); // Focus-Rect weg
+ pView->Select( pCursor, sal_False );
+ ShowCursor( sal_False ); // Focus-Rect weg
// NextSibling, weil auch Childs des Cursors geloescht werden
pTemp = pView->NextSibling( pCursor );
if( !pTemp )
pTemp = (SvLBoxEntry*)(pView->PrevVisible( pCursor ));
- SetCursor( pTemp, TRUE );
+ SetCursor( pTemp, sal_True );
}
if( pStartEntry && pStartEntry == pEntry )
{
@@ -1771,10 +1769,10 @@ void SvImpLBox::EntryRemoved()
if( !pStartEntry )
pStartEntry = pTree->First();
if( !pCursor )
- SetCursor( pStartEntry, TRUE );
+ SetCursor( pStartEntry, sal_True );
if( pCursor && (bSimpleTravel || !pView->GetSelectionCount() ))
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
if( GetUpdateMode())
{
@@ -1802,9 +1800,9 @@ void SvImpLBox::EntryRemoved()
MakeVisible( pCursor );
}
else
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
nFlags &= (~F_REMOVED_RECALC_MOST_RIGHT);
}
@@ -1813,12 +1811,12 @@ void SvImpLBox::EntryRemoved()
void SvImpLBox::MovingEntry( SvLBoxEntry* pEntry )
{
int bDeselAll = nFlags & F_DESEL_ALL;
- SelAllDestrAnch( FALSE, TRUE ); // DeselectAll();
+ SelAllDestrAnch( sal_False, sal_True ); // DeselectAll();
if( !bDeselAll )
nFlags &= (~F_DESEL_ALL);
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( IsEntryInView( pEntry ) )
pView->Invalidate();
if( pEntry == pStartEntry )
@@ -1851,8 +1849,8 @@ void SvImpLBox::EntryMoved( SvLBoxEntry* pEntry )
pStartEntry = pView->First();
aVerSBar.SetRange( Range(0, pView->GetVisibleCount()-1));
- USHORT nFirstPos = (USHORT)pTree->GetAbsPos( pStartEntry );
- USHORT nNewPos = (USHORT)pTree->GetAbsPos( pEntry );
+ sal_uInt16 nFirstPos = (sal_uInt16)pTree->GetAbsPos( pStartEntry );
+ sal_uInt16 nNewPos = (sal_uInt16)pTree->GetAbsPos( pEntry );
FindMostRight(0);
if( nNewPos < nFirstPos ) //!!!Notloesung
pStartEntry = pEntry;
@@ -1861,7 +1859,7 @@ void SvImpLBox::EntryMoved( SvLBoxEntry* pEntry )
if( pEntry == pCursor )
{
if( pView->IsEntryVisible( pCursor ) )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
else
{
SvLBoxEntry* pParent = pEntry;
@@ -1891,16 +1889,16 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
return;
int bDeselAll = nFlags & F_DESEL_ALL;
if( bDeselAll )
- SelAllDestrAnch( FALSE, TRUE );
+ SelAllDestrAnch( sal_False, sal_True );
else
DestroyAnchor();
// nFlags &= (~F_DESEL_ALL);
-// ShowCursor( FALSE ); // falls sich Cursor nach unten verschiebt
+// ShowCursor( sal_False ); // falls sich Cursor nach unten verschiebt
long nY = GetEntryLine( pEntry );
- BOOL bEntryVisible = IsLineVisible( nY );
+ sal_Bool bEntryVisible = IsLineVisible( nY );
if( bEntryVisible )
{
- ShowCursor( FALSE ); // falls sich Cursor nach unten verschiebt
+ ShowCursor( sal_False ); // falls sich Cursor nach unten verschiebt
nY -= pView->GetEntryHeight(); // wg. Linien
InvalidateEntriesFrom( nY );
}
@@ -1909,9 +1907,9 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
// pruefen, ob die View komplett gefuellt ist. Wenn
// nicht, dann pStartEntry und den Cursor anpassen
// (automatisches scrollen)
- USHORT nLast = (USHORT)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
- USHORT nThumb = (USHORT)(pView->GetVisiblePos( pStartEntry ));
- USHORT nCurDispEntries = nLast-nThumb+1;
+ sal_uInt16 nLast = (sal_uInt16)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
+ sal_uInt16 nThumb = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ));
+ sal_uInt16 nCurDispEntries = nLast-nThumb+1;
if( nCurDispEntries < nVisibleCount )
{
// beim naechsten Paint-Event setzen
@@ -1926,7 +1924,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
// die Linien invalidieren
/*
if( (bEntryVisible || bPrevEntryVisible) &&
- (nWinBits & ( WB_HASLINES | WB_HASLINESATROOT )) )
+ (m_nStyle & ( WB_HASLINES | WB_HASLINESATROOT )) )
{
SvLBoxTab* pTab = pView->GetFirstDynamicTab();
if( pTab )
@@ -1944,7 +1942,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
aVerSBar.SetRange( Range(0, pView->GetVisibleCount()-1));
SyncVerThumb(); // falls vor Thumb eingefuegt wurde
ShowVerSBar();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
if( pStartEntry != pView->First() && (nFlags & F_FILLING) )
pView->Update();
}
@@ -1959,7 +1957,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
// ****** Steuerung der Controlanimation
-BOOL SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry,
+sal_Bool SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry,
long nY )
{
SvLBoxItem* pItem = pView->GetItem(pEntry,rMEvt.GetPosPixel().X(),&pActiveTab);
@@ -1970,18 +1968,18 @@ BOOL SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry
if( pCursor == pActiveEntry )
pView->HideFocus();
pView->CaptureMouse();
- pActiveButton->SetStateHilighted( TRUE );
+ pActiveButton->SetStateHilighted( sal_True );
pView->PaintEntry1( pActiveEntry, nY,
SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
SV_LBOXTAB_ADJUST_RIGHT );
- return TRUE;
+ return sal_True;
}
else
pActiveButton = 0;
- return FALSE;
+ return sal_False;
}
-BOOL SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry)
+sal_Bool SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry)
{
if( pActiveButton )
{
@@ -1992,7 +1990,7 @@ BOOL SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry
{
if( !pActiveButton->IsStateHilighted() )
{
- pActiveButton->SetStateHilighted(TRUE );
+ pActiveButton->SetStateHilighted(sal_True );
nY = GetEntryLine( pActiveEntry );
pView->PaintEntry1( pActiveEntry, nY,
SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
@@ -2003,24 +2001,24 @@ BOOL SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry
{
if( pActiveButton->IsStateHilighted() )
{
- pActiveButton->SetStateHilighted(FALSE );
+ pActiveButton->SetStateHilighted(sal_False );
nY = GetEntryLine( pActiveEntry );
pView->PaintEntry1( pActiveEntry, nY, SV_LBOXTAB_PUSHABLE );
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
+sal_Bool SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
{
if( pActiveButton )
{
pView->ReleaseMouse();
SvLBoxEntry* pEntry = GetClickedEntry( rMEvt.GetPosPixel() );
long nY = GetEntryLine( pActiveEntry );
- pActiveButton->SetStateHilighted( FALSE );
+ pActiveButton->SetStateHilighted( sal_False );
long nMouseX = rMEvt.GetPosPixel().X();
if( pEntry == pActiveEntry &&
pView->GetItem( pActiveEntry, nMouseX ) == pActiveButton )
@@ -2029,26 +2027,26 @@ BOOL SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
SV_LBOXTAB_ADJUST_RIGHT );
if( pCursor == pActiveEntry )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pActiveButton = 0;
pActiveEntry = 0;
pActiveTab = 0;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// ******* Steuerung Plus/Minus-Button zum Expandieren/Kollabieren
-// FALSE == kein Expand/Collapse-Button getroffen
-BOOL SvImpLBox::IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const
+// sal_False == kein Expand/Collapse-Button getroffen
+sal_Bool SvImpLBox::IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const
{
if( !pEntry->HasChilds() && !pEntry->HasChildsOnDemand() )
- return FALSE;
+ return sal_False;
SvLBoxTab* pFirstDynamicTab = pView->GetFirstDynamicTab();
if( !pFirstDynamicTab )
- return FALSE;
+ return sal_False;
long nMouseX = rPosPixel.X();
// in Doc-Koords umrechnen
@@ -2058,26 +2056,26 @@ BOOL SvImpLBox::IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) cons
long nX = pView->GetTabPos( pEntry, pFirstDynamicTab);
nX += nNodeBmpTabDistance;
if( nMouseX < nX )
- return FALSE;
+ return sal_False;
nX += nNodeBmpWidth;
if( nMouseX > nX )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-// FALSE == hit no node button
-BOOL SvImpLBox::ButtonDownCheckExpand( const MouseEvent& rMEvt, SvLBoxEntry* pEntry, long /* nY */ )
+// sal_False == hit no node button
+sal_Bool SvImpLBox::ButtonDownCheckExpand( const MouseEvent& rMEvt, SvLBoxEntry* pEntry, long /* nY */ )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pView->IsEditingActive() && pEntry == pView->pEdEntry )
// inplace editing -> nothing to do
- bRet = TRUE;
+ bRet = sal_True;
else if ( IsNodeButton( rMEvt.GetPosPixel(), pEntry ) )
{
if ( pView->IsExpanded( pEntry ) )
{
- pView->EndEditing( TRUE );
+ pView->EndEditing( sal_True );
pView->Collapse( pEntry );
}
else
@@ -2085,7 +2083,7 @@ BOOL SvImpLBox::ButtonDownCheckExpand( const MouseEvent& rMEvt, SvLBoxEntry* pEn
// you can expand an entry, which is in editing
pView->Expand( pEntry );
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -2152,7 +2150,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
{
// neu selektieren & tschuess
if( !bSimpleTravel && !aSelEng.IsAlwaysAdding())
- SelAllDestrAnch( FALSE, TRUE ); // DeselectAll();
+ SelAllDestrAnch( sal_False, sal_True ); // DeselectAll();
SetCursor( pEntry );
return;
@@ -2165,7 +2163,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
pView->Expand( pEntry );
if( pEntry == pCursor ) // nur wenn Entryitem angeklickt wurde
// (Nodebutton ist kein Entryitem!)
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
return;
}
}
@@ -2173,7 +2171,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
else
{
// CheckButton? (TreeListBox: Check + Info)
- if( ButtonDownCheckCtrl(rMEvt, pEntry, nY) == TRUE)
+ if( ButtonDownCheckCtrl(rMEvt, pEntry, nY) == sal_True)
return;
// Inplace-Editing?
}
@@ -2214,31 +2212,32 @@ void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
return;
}
-BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
+sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
{
aEditTimer.Stop();
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
if( rKeyCode.IsMod2() )
- return FALSE; // Alt-Taste nicht auswerten
+ return sal_False; // Alt-Taste nicht auswerten
nFlags &= (~F_FILLING);
if( !pCursor )
pCursor = pStartEntry;
if( !pCursor )
- return FALSE;
+ return sal_False;
- BOOL bKeyUsed = TRUE;
+ sal_Bool bKeyUsed = sal_True;
- USHORT nDelta = (USHORT)aVerSBar.GetPageSize();
- USHORT aCode = rKeyCode.GetCode();
+ sal_uInt16 nDelta = (sal_uInt16)aVerSBar.GetPageSize();
+ sal_uInt16 aCode = rKeyCode.GetCode();
- BOOL bShift = rKeyCode.IsShift();
- BOOL bMod1 = rKeyCode.IsMod1();
+ sal_Bool bShift = rKeyCode.IsShift();
+ sal_Bool bMod1 = rKeyCode.IsMod1();
SvLBoxEntry* pNewCursor;
+ const WinBits nWindowStyle = pView->GetStyle();
switch( aCode )
{
case KEY_UP:
@@ -2265,7 +2264,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
if( !IsEntryInView( pNewCursor ) )
- KeyUp( FALSE );
+ KeyUp( sal_False );
}
break;
@@ -2298,13 +2297,13 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
else
{
if( pCursor )
- pView->Select( pCursor, FALSE );
- KeyDown( FALSE );
+ pView->Select( pCursor, sal_False );
+ KeyDown( sal_False );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
}
}
else
- KeyDown( FALSE ); // weil ScrollBar-Range evtl. noch
+ KeyDown( sal_False ); // weil ScrollBar-Range evtl. noch
// scrollen erlaubt
break;
@@ -2317,11 +2316,11 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if ( nCurTabPos < ( pView->TabCount() - 1 /*!2*/ ) )
{
++nCurTabPos;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor );
}
}
- else if( pView->nWindowStyle & WB_HSCROLL )
+ else if( nWindowStyle & WB_HSCROLL )
{
long nThumb = aHorSBar.GetThumbPos();
nThumb += aHorSBar.GetLineSize();
@@ -2337,7 +2336,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
}
@@ -2348,11 +2347,11 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if ( nCurTabPos > FIRST_ENTRY_TAB )
{
--nCurTabPos;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor );
}
}
- else if ( pView->nWindowStyle & WB_HSCROLL )
+ else if ( nWindowStyle & WB_HSCROLL )
{
long nThumb = aHorSBar.GetThumbPos();
nThumb -= aHorSBar.GetLineSize();
@@ -2380,7 +2379,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
else if( bSubLstOpLR && IsExpandable() )
pView->Collapse( pCursor );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
}
@@ -2397,19 +2396,19 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( nDelta )
{
- DBG_ASSERT(pNewCursor&&(ULONG)pNewCursor!=(ULONG)pCursor,"Cursor?");
+ DBG_ASSERT(pNewCursor&&(sal_uLong)pNewCursor!=(sal_uLong)pCursor,"Cursor?");
aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) )
SetCursor( pNewCursor );
else
{
SetCursor( pNewCursor );
- KeyUp( TRUE );
+ KeyUp( sal_True );
}
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_PAGEDOWN:
@@ -2425,21 +2424,21 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( nDelta )
{
- DBG_ASSERT(pNewCursor&&(ULONG)pNewCursor!=(ULONG)pCursor,"Cursor?");
+ DBG_ASSERT(pNewCursor&&(sal_uLong)pNewCursor!=(sal_uLong)pCursor,"Cursor?");
aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) )
SetCursor( pNewCursor );
else
{
SetCursor( pNewCursor );
- KeyDown( TRUE );
+ KeyDown( sal_True );
}
}
else
- KeyDown( FALSE ); // siehe KEY_DOWN
+ KeyDown( sal_False ); // siehe KEY_DOWN
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SPACE:
@@ -2454,19 +2453,23 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
else if ( !bShift /*&& !bMod1*/ )
{
if ( aSelEng.IsAddMode() )
+ {
// toggle selection
pView->Select( pCursor, !pView->IsSelected( pCursor ) );
- else
+ }
+ else if ( !pView->IsSelected( pCursor ) )
{
- SelAllDestrAnch( FALSE );
- pView->Select( pCursor, TRUE );
+ SelAllDestrAnch( sal_False );
+ pView->Select( pCursor, sal_True );
}
+ else
+ bKeyUsed = sal_False;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_RETURN:
@@ -2478,7 +2481,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
pView->Expand( pCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_F2:
@@ -2488,20 +2491,20 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
EditTimerCall( 0 );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_F8:
if( bShift && pView->GetSelectionMode()==MULTIPLE_SELECTION &&
- !(nWinBits & WB_SIMPLEMODE))
+ !(m_nStyle & WB_SIMPLEMODE))
{
if( aSelEng.IsAlwaysAdding() )
- aSelEng.AddAlways( FALSE );
+ aSelEng.AddAlways( sal_False );
else
- aSelEng.AddAlways( TRUE );
+ aSelEng.AddAlways( sal_True );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_ADD:
@@ -2511,7 +2514,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
pView->Expand( pCursor );
if( bMod1 )
{
- USHORT nRefDepth = pTree->GetDepth( pCursor );
+ sal_uInt16 nRefDepth = pTree->GetDepth( pCursor );
SvLBoxEntry* pCur = pTree->Next( pCursor );
while( pCur && pTree->GetDepth(pCur) > nRefDepth )
{
@@ -2522,14 +2525,14 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_A:
if( bMod1 )
- SelAllDestrAnch( TRUE );
-// else
-// bKeyUsed = FALSE; #105907# assume user wants to use quicksearch with key "a", so key is handled!
+ SelAllDestrAnch( sal_True );
+ else
+ bKeyUsed = sal_False;
break;
case KEY_SUBTRACT:
@@ -2543,7 +2546,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
SvLBoxEntry* pParentToCollapse = (SvLBoxEntry*)pTree->GetRootLevelParent(pCursor);
if( pParentToCollapse )
{
- USHORT nRefDepth;
+ sal_uInt16 nRefDepth;
// Sonderbehandlung Explorer: Befindet sich auf der
// Root nur ein Eintrag,dann den Root-Entry nicht
// einklappen
@@ -2573,21 +2576,21 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_DIVIDE :
if( bMod1 )
- SelAllDestrAnch( TRUE );
+ SelAllDestrAnch( sal_True );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_COMMA :
if( bMod1 )
- SelAllDestrAnch( FALSE );
+ SelAllDestrAnch( sal_False );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_HOME :
@@ -2600,14 +2603,14 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( pNewCursor && pNewCursor != pCursor )
{
-// SelAllDestrAnch( FALSE );
+// SelAllDestrAnch( sal_False );
aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor );
if( !IsEntryInView( pNewCursor ) )
MakeVisible( pNewCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_END :
@@ -2620,14 +2623,14 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( pNewCursor && pNewCursor != pCursor)
{
-// SelAllDestrAnch( FALSE );
+// SelAllDestrAnch( sal_False );
aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor );
if( !IsEntryInView( pNewCursor ) )
MakeVisible( pNewCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_ESCAPE:
@@ -2636,14 +2639,19 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
case KEY_BACKSPACE:
// #105907# must not be handled because this quits dialogs and does other magic things...
// if there are other single keys which should not be handled, they can be added here
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
default:
- if( bMod1 || rKeyCode.GetGroup() == KEYGROUP_FKEYS )
- // #105907# CTRL or Function key is pressed, assume user don't want to use quicksearch...
- // if there are groups of keys which should not be handled, they can be added here
- bKeyUsed = FALSE;
+ // is there any reason why we should eat the events here? The only place where this is called
+ // is from SvTreeListBox::KeyInput. If we set bKeyUsed to sal_True here, then the key input
+ // is just silenced. However, we want SvLBox::KeyInput to get a chance, to do the QuickSelection
+ // handling.
+ // (The old code here which intentionally set bKeyUsed to TRUE said this was because of "quick search"
+ // handling, but actually there was no quick search handling anymore. We just re-implemented it.)
+ // #i31275# / 2009-06-16 / frank.schoenheit@sun.com
+ bKeyUsed = sal_False;
+ break;
}
return bKeyUsed;
}
@@ -2652,13 +2660,13 @@ void SvImpLBox::GetFocus()
{
if( pCursor )
{
- pView->SetEntryFocus( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->SetEntryFocus( pCursor, sal_True );
+ ShowCursor( sal_True );
// auskommentiert wg. deselectall
// if( bSimpleTravel && !pView->IsSelected(pCursor) )
-// pView->Select( pCursor, TRUE );
+// pView->Select( pCursor, sal_True );
}
- if( nWinBits & WB_HIDESELECTION )
+ if( m_nStyle & WB_HIDESELECTION )
{
SvLBoxEntry* pEntry = pView->FirstSelected();
while( pEntry )
@@ -2673,7 +2681,7 @@ void SvImpLBox::GetFocus()
SvViewData* pViewData = pView->GetViewData( pEntry );
if( pViewData->IsCursored() )
{
- pViewData->SetCursored( FALSE );
+ pViewData->SetCursored( sal_False );
InvalidateEntry( pEntry );
}
pEntry = pView->GetModel()->Next( pEntry );
@@ -2688,16 +2696,16 @@ void SvImpLBox::LoseFocus()
{
aEditTimer.Stop();
if( pCursor )
- pView->SetEntryFocus( pCursor,FALSE );
- ShowCursor( FALSE );
+ pView->SetEntryFocus( pCursor,sal_False );
+ ShowCursor( sal_False );
- if( nWinBits & WB_HIDESELECTION )
+ if( m_nStyle & WB_HIDESELECTION )
{
SvLBoxEntry* pEntry = pView->FirstSelected();
while( pEntry )
{
//SvViewData* pViewData = pView->GetViewData( pEntry );
- //pViewData->SetCursored( TRUE );
+ //pViewData->SetCursored( sal_True );
InvalidateEntry( pEntry );
pEntry = pView->NextSelected( pEntry );
}
@@ -2709,7 +2717,7 @@ void SvImpLBox::LoseFocus()
// SelectionEngine
// ********************************************************************
-inline void SvImpLBox::SelectEntry( SvLBoxEntry* pEntry, BOOL bSelect )
+inline void SvImpLBox::SelectEntry( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
pView->Select( pEntry, bSelect );
}
@@ -2755,7 +2763,7 @@ void ImpLBSelEng::CreateCursor()
*/
-BOOL ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor)
+sal_Bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor)
{
SvLBoxEntry* pNewCursor = pImp->MakePointVisible( rPoint );
if( pNewCursor != pImp->pCursor )
@@ -2766,19 +2774,19 @@ BOOL ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor
// bei SimpleTravel wird in SetCursor selektiert und
// der Select-Handler gerufen
//if( !bDontSelectAtCursor && !pImp->bSimpleTravel )
- // pImp->SelectEntry( pNewCursor, TRUE );
+ // pImp->SelectEntry( pNewCursor, sal_True );
pImp->SetCursor( pNewCursor, bDontSelectAtCursor );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint )
+sal_Bool ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint )
{
SvLBoxEntry* pEntry = pImp->MakePointVisible( rPoint );
if( pEntry )
return pView->IsSelected(pEntry);
- return FALSE;
+ return sal_False;
}
void ImpLBSelEng::DeselectAtPoint( const Point& rPoint )
@@ -2786,7 +2794,7 @@ void ImpLBSelEng::DeselectAtPoint( const Point& rPoint )
SvLBoxEntry* pEntry = pImp->MakePointVisible( rPoint );
if( !pEntry )
return;
- pImp->SelectEntry( pEntry, FALSE );
+ pImp->SelectEntry( pEntry, sal_False );
}
/*
@@ -2795,13 +2803,13 @@ void ImpLBSelEng::SelectAtPoint( const Point& rPoint )
SvLBoxEntry* pEntry = pImp->MakePointVisible( rPoint );
if( !pEntry )
return;
- pImp->SelectEntry( pEntry, TRUE );
+ pImp->SelectEntry( pEntry, sal_True );
}
*/
void ImpLBSelEng::DeselectAll()
{
- pImp->SelAllDestrAnch( FALSE, FALSE ); // SelectionEngine nicht resetten!
+ pImp->SelAllDestrAnch( sal_False, sal_False ); // SelectionEngine nicht resetten!
pImp->nFlags &= (~F_DESEL_ALL);
}
@@ -2812,9 +2820,9 @@ void ImpLBSelEng::DeselectAll()
void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCursor)
{
SvLBoxEntry* pEntry;
- ULONG nAnchorVisPos = pView->GetVisiblePos( pAnchor );
- ULONG nOldVisPos = pView->GetVisiblePos( pOldCursor );
- ULONG nNewVisPos = pView->GetVisiblePos( pNewCursor );
+ sal_uLong nAnchorVisPos = pView->GetVisiblePos( pAnchor );
+ sal_uLong nOldVisPos = pView->GetVisiblePos( pOldCursor );
+ sal_uLong nNewVisPos = pView->GetVisiblePos( pNewCursor );
if( nOldVisPos > nAnchorVisPos ||
( nAnchorVisPos==nOldVisPos && nNewVisPos > nAnchorVisPos) )
@@ -2824,11 +2832,11 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pOldCursor;
while( pEntry && pEntry != pNewCursor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2837,20 +2845,20 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pAnchor;
while( pEntry && pEntry != pOldCursor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = pNewCursor;
while( pEntry && pEntry != pAnchor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2860,11 +2868,11 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
while( pEntry && pEntry != pOldCursor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
return;
}
}
@@ -2875,11 +2883,11 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pNewCursor;
while( pEntry && pEntry != pOldCursor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2888,19 +2896,19 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pOldCursor;
while( pEntry && pEntry != pAnchor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = pAnchor;
while( pEntry && pEntry != pNewCursor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2909,7 +2917,7 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pOldCursor;
while( pEntry && pEntry != pNewCursor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
return;
@@ -2917,8 +2925,8 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
}
}
-void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
- BOOL bSingleSelToo )
+void SvImpLBox::SelAllDestrAnch( sal_Bool bSelect, sal_Bool bDestroyAnchor,
+ sal_Bool bSingleSelToo )
{
SvLBoxEntry* pEntry;
nFlags &= (~F_DESEL_ALL);
@@ -2926,7 +2934,7 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
{
if( pCursor && !pView->IsSelected( pCursor ))
{
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
return;
}
@@ -2944,7 +2952,7 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
if( !bSelect && pView->GetSelectionCount()==1 && pCursor &&
pView->IsSelected( pCursor ))
{
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
if( bDestroyAnchor )
DestroyAnchor(); // Anker loeschen & SelectionEngine zuruecksetzen
else
@@ -2955,8 +2963,8 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
if( bSimpleTravel && !pCursor && !GetUpdateMode() )
nFlags |= F_DESEL_ALL;
- ShowCursor( FALSE );
- BOOL bUpdate = GetUpdateMode();
+ ShowCursor( sal_False );
+ sal_Bool bUpdate = GetUpdateMode();
nFlags |= F_IGNORE_SELECT; // EntryInserted soll nix tun
pEntry = pTree->First();
@@ -2979,18 +2987,18 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
DestroyAnchor(); // Anker loeschen & SelectionEngine zuruecksetzen
else
pAnchor = 0; // internen Anker immer loeschen
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvImpLBox::SetSelectionMode( SelectionMode eSelMode )
{
aSelEng.SetSelectionMode( eSelMode);
if( eSelMode == SINGLE_SELECTION )
- bSimpleTravel = TRUE;
+ bSimpleTravel = sal_True;
else
- bSimpleTravel = FALSE;
- if( (nWinBits & WB_SIMPLEMODE) && (eSelMode == MULTIPLE_SELECTION) )
- aSelEng.AddAlways( TRUE );
+ bSimpleTravel = sal_False;
+ if( (m_nStyle & WB_SIMPLEMODE) && (eSelMode == MULTIPLE_SELECTION) )
+ aSelEng.AddAlways( sal_True );
}
// ***********************************************************************
@@ -3001,13 +3009,13 @@ void SvImpLBox::SetDragDropMode( DragDropMode eDDMode )
{
if( eDDMode && eDDMode != SV_DRAGDROP_APP_DROP )
{
- aSelEng.ExpandSelectionOnMouseMove( FALSE );
- aSelEng.EnableDrag( TRUE );
+ aSelEng.ExpandSelectionOnMouseMove( sal_False );
+ aSelEng.EnableDrag( sal_True );
}
else
{
- aSelEng.ExpandSelectionOnMouseMove( TRUE );
- aSelEng.EnableDrag( FALSE );
+ aSelEng.ExpandSelectionOnMouseMove( sal_True );
+ aSelEng.EnableDrag( sal_False );
}
}
@@ -3055,7 +3063,7 @@ void SvImpLBox::PaintDDCursor( SvLBoxEntry* pInsertionPos )
// Delete all submenus of a PopupMenu, recursively
void lcl_DeleteSubPopups(PopupMenu* pPopup)
{
- for(USHORT i = 0; i < pPopup->GetItemCount(); i++)
+ for(sal_uInt16 i = 0; i < pPopup->GetItemCount(); i++)
{
PopupMenu* pSubPopup = pPopup->GetPopupMenu( pPopup->GetItemId( i ));
if(pSubPopup)
@@ -3066,35 +3074,22 @@ void lcl_DeleteSubPopups(PopupMenu* pPopup)
}
}
-bool SvImpLBox::Command( const CommandEvent& rCEvt )
+void SvImpLBox::Command( const CommandEvent& rCEvt )
{
- USHORT nCommand = rCEvt.GetCommand();
+ sal_uInt16 nCommand = rCEvt.GetCommand();
if( nCommand == COMMAND_CONTEXTMENU )
aEditTimer.Stop();
// Rollmaus-Event?
- if ( ( ( nCommand == COMMAND_WHEEL )
- || ( nCommand == COMMAND_STARTAUTOSCROLL )
- || ( nCommand == COMMAND_AUTOSCROLL )
- )
- && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar )
- )
- {
- return true;
- }
-
- if ( ( nCommand == COMMAND_CONTEXTMENU )
- && !bContextMenuHandling
- )
- {
- return false;
- }
+ if( ( ( nCommand == COMMAND_WHEEL ) || ( nCommand == COMMAND_STARTAUTOSCROLL ) || ( nCommand == COMMAND_AUTOSCROLL ) )
+ && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar ) )
+ return;
if( bContextMenuHandling && nCommand == COMMAND_CONTEXTMENU )
{
Point aPopupPos;
- BOOL bClickedIsFreePlace = FALSE;
+ sal_Bool bClickedIsFreePlace = sal_False;
std::stack<SvLBoxEntry*> aSelRestore;
if( rCEvt.IsMouseEvent() )
@@ -3105,7 +3100,7 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt )
SvLBoxEntry* pClickedEntry = GetEntry( aPopupPos );
if( pClickedEntry )
{ // mouse in non empty area
- BOOL bClickedIsSelected = FALSE;
+ sal_Bool bClickedIsSelected = sal_False;
// collect the currently selected entries
SvLBoxEntry* pSelected = pView->FirstSelected();
@@ -3118,30 +3113,32 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt )
// if the entry which the user clicked at is not selected
if( !bClickedIsSelected )
{ // deselect all other and select the clicked one
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
pView->SetCursor( pClickedEntry );
}
}
else if( aSelEng.GetSelectionMode() == SINGLE_SELECTION )
{//modified by BerryJia for fixing Bug102739 2002-9-9 17:00(Beijing Time)
- bClickedIsFreePlace = TRUE;
- INT32 nSelectedEntries = pView->GetSelectionCount();
+ bClickedIsFreePlace = sal_True;
+ sal_Int32 nSelectedEntries = pView->GetSelectionCount();
SvLBoxEntry* pSelected = pView->FirstSelected();
- for(USHORT nSel = 0; nSel < nSelectedEntries; nSel++ )
+ for(sal_uInt16 nSel = 0; nSel < nSelectedEntries; nSel++ )
{
aSelRestore.push(pSelected);
pSelected = pView->NextSelected( pSelected );
}
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
}
else
{ // deselect all
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
}
+
+
}
else
{ // key event (or at least no mouse event)
- INT32 nSelectionCount = pView->GetSelectionCount();
+ sal_Int32 nSelectionCount = pView->GetSelectionCount();
if( nSelectionCount )
{ // now allways take first visible as base for positioning the menu
@@ -3172,7 +3169,7 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt )
if( pPopup )
{
// do action for selected entry in popup menu
- USHORT nMenuAction = pPopup->Execute( pView, aPopupPos );
+ sal_uInt16 nMenuAction = pPopup->Execute( pView, aPopupPos );
if ( nMenuAction )
pView->ExcecuteContextMenuAction( nMenuAction );
lcl_DeleteSubPopups(pPopup);
@@ -3186,7 +3183,7 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt )
SvLBoxEntry* pEntry = aSelRestore.top();
//#i19717# the entry is maybe already deleted
bool bFound = false;
- for(ULONG nEntry = 0; nEntry < pView->GetEntryCount(); nEntry++)
+ for(sal_uLong nEntry = 0; nEntry < pView->GetEntryCount(); nEntry++)
if(pEntry == pView->GetEntry(nEntry))
{
bFound = true;
@@ -3197,18 +3194,15 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt )
aSelRestore.pop();
}
}
- return true;
}
-
- const Point& rPos = rCEvt.GetMousePosPixel();
- if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() )
- aSelEng.Command( rCEvt );
-
- // strictly, this is not correct. However, it leads to a behavior compatible to the one at the time
- // when this method did have a void return value ...
- // A proper solution would be to give the EditEngine::Command also a boolean return value, and forward
- // this (or false) to our caller
- return true;
+#ifndef NOCOMMAND
+ else
+ {
+ const Point& rPos = rCEvt.GetMousePosPixel();
+ if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() )
+ aSelEng.Command( rCEvt );
+ }
+#endif
}
void SvImpLBox::BeginScroll()
@@ -3248,12 +3242,12 @@ void SvImpLBox::SetCurEntry( SvLBoxEntry* pEntry )
if ( ( aSelEng.GetSelectionMode() != SINGLE_SELECTION )
&& ( aSelEng.GetSelectionMode() != NO_SELECTION )
)
- SelAllDestrAnch( FALSE, TRUE, FALSE );
+ SelAllDestrAnch( sal_False, sal_True, sal_False );
if ( pEntry )
MakeVisible( pEntry );
SetCursor( pEntry );
if ( pEntry && ( aSelEng.GetSelectionMode() != NO_SELECTION ) )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
IMPL_LINK( SvImpLBox, EditTimerCall, Timer *, EMPTYARG )
@@ -3275,21 +3269,21 @@ IMPL_LINK( SvImpLBox, EditTimerCall, Timer *, EMPTYARG )
SvLBoxEntry* pEntry = GetCurEntry();
if( pEntry )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->ImplEditEntry( pEntry );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
return 0;
}
-BOOL SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
+sal_Bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
{
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( pView->ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
if( !GetVisibleArea().IsInside( aPos ))
- return FALSE;
+ return sal_False;
SvLBoxEntry* pEntry = GetEntry( aPos );
if( pEntry )
@@ -3298,18 +3292,18 @@ BOOL SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
SvLBoxTab* pTab;
SvLBoxString* pItem = (SvLBoxString*)(pView->GetItem( pEntry, aPos.X(), &pTab ));
if( !pItem || pItem->IsA() != SV_ITEM_ID_LBOXSTRING )
- return FALSE;
+ return sal_False;
aPos = GetEntryPosition( pEntry );
aPos.X() = pView->GetTabPos( pEntry, pTab ); //pTab->GetPos();
Size aSize( pItem->GetSize( pView, pEntry ) );
SvLBoxTab* pNextTab = NextTab( pTab );
- BOOL bItemClipped = FALSE;
+ sal_Bool bItemClipped = sal_False;
// wurde das Item von seinem rechten Nachbarn abgeschnitten?
if( pNextTab && pView->GetTabPos(pEntry,pNextTab) < aPos.X()+aSize.Width() )
{
aSize.Width() = pNextTab->GetPos() - pTab->GetPos();
- bItemClipped = TRUE;
+ bItemClipped = sal_True;
}
Rectangle aItemRect( aPos, aSize );
@@ -3330,19 +3324,19 @@ BOOL SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
Help::ShowQuickHelp( pView, aItemRect,
pItem->GetText(), QUICKHELP_LEFT | QUICKHELP_VCENTER );
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
SvLBoxTab* SvImpLBox::NextTab( SvLBoxTab* pTab )
{
- USHORT nTabCount = pView->TabCount();
+ sal_uInt16 nTabCount = pView->TabCount();
if( nTabCount <= 1 )
return 0;
- for( USHORT nTab=0; nTab < (nTabCount-1); nTab++)
+ for( sal_uInt16 nTab=0; nTab < (nTabCount-1); nTab++)
{
if( pView->aTabs[nTab]==pTab )
return (SvLBoxTab*)(pView->aTabs[nTab+1]);
@@ -3360,28 +3354,28 @@ void SvImpLBox::RepaintScrollBars()
{
}
-void SvImpLBox::SetUpdateMode( BOOL bMode )
+void SvImpLBox::SetUpdateMode( sal_Bool bMode )
{
if( bUpdateMode != bMode )
{
bUpdateMode = bMode;
if( bUpdateMode )
- UpdateAll( FALSE );
+ UpdateAll( sal_False );
}
}
-void SvImpLBox::SetUpdateModeFast( BOOL bMode )
+void SvImpLBox::SetUpdateModeFast( sal_Bool bMode )
{
if( bUpdateMode != bMode )
{
bUpdateMode = bMode;
if( bUpdateMode )
- UpdateAll( FALSE, FALSE );
+ UpdateAll( sal_False, sal_False );
}
}
-BOOL SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
+sal_Bool SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
{
if( pView->nTreeFlags & TREEFLAG_RECALCTABS )
{
@@ -3390,8 +3384,8 @@ BOOL SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
nFlags &= ~F_IGNORE_CHANGED_TABS;
}
- USHORT nLastTab = pView->aTabs.Count() - 1;
- USHORT nLastItem = pEntry->ItemCount() - 1;
+ sal_uInt16 nLastTab = pView->aTabs.Count() - 1;
+ sal_uInt16 nLastItem = pEntry->ItemCount() - 1;
if( nLastTab != USHRT_MAX && nLastItem != USHRT_MAX )
{
if( nLastItem < nLastTab )
@@ -3417,10 +3411,10 @@ BOOL SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
{
nMostRight = nRight;
pMostRightEntry = pEntry;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
void SvImpLBox::FindMostRight( SvLBoxEntry* pEntryToIgnore )
@@ -3454,8 +3448,8 @@ void SvImpLBox::FindMostRight_Impl( SvLBoxEntry* pParent, SvLBoxEntry* pEntryToI
if( !pList )
return;
- ULONG nCount = pList->Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = pList->Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pChild = (SvLBoxEntry*)pList->GetObject( nCur );
if( pChild != pEntryToIgnore )
@@ -3560,7 +3554,7 @@ const Image& SvImpLBox::GetDefaultCollapsedNodeImage( )
}
// -----------------------------------------------------------------------
-void SvImpLBox::CallEventListeners( ULONG nEvent, void* pData )
+void SvImpLBox::CallEventListeners( sal_uLong nEvent, void* pData )
{
if ( pView )
pView->CallImplEventListeners( nEvent, pData);
@@ -3568,14 +3562,14 @@ void SvImpLBox::CallEventListeners( ULONG nEvent, void* pData )
// -----------------------------------------------------------------------
-bool SvImpLBox::SetCurrentTabPos( USHORT _nNewPos )
+bool SvImpLBox::SetCurrentTabPos( sal_uInt16 _nNewPos )
{
bool bRet = false;
if ( pView && _nNewPos < ( pView->TabCount() - 2 ) )
{
nCurTabPos = _nNewPos;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
bRet = true;
}
diff --git a/svtools/source/contnr/svimpicn.cxx b/svtools/source/contnr/svimpicn.cxx
index 3ad775fd071f..eab15f65647c 100644
--- a/svtools/source/contnr/svimpicn.cxx
+++ b/svtools/source/contnr/svimpicn.cxx
@@ -97,30 +97,30 @@
#undef TEXT_DRAW_WORDBREAK
#endif
-// #define TEXT_DRAW_DISABLE ((USHORT)0x0001)
-// #define TEXT_DRAW_3DLOOK ((USHORT)0x0002)
-// #define TEXT_DRAW_MNEMONIC ((USHORT)0x0004)
-#define TEXT_DRAW_LEFT ((USHORT)0x0010)
-#define TEXT_DRAW_CENTER ((USHORT)0x0020)
-#define TEXT_DRAW_RIGHT ((USHORT)0x0040)
-#define TEXT_DRAW_TOP ((USHORT)0x0080)
-#define TEXT_DRAW_VCENTER ((USHORT)0x0100)
-#define TEXT_DRAW_BOTTOM ((USHORT)0x0200)
-#define TEXT_DRAW_ENDELLIPSIS ((USHORT)0x0400)
-#define TEXT_DRAW_PATHELLIPSIS ((USHORT)0x0800)
-#define TEXT_DRAW_CLIP ((USHORT)0x1000)
-#define TEXT_DRAW_MULTILINE ((USHORT)0x2000)
-#define TEXT_DRAW_WORDBREAK ((USHORT)0x4000)
+// #define TEXT_DRAW_DISABLE ((sal_uInt16)0x0001)
+// #define TEXT_DRAW_3DLOOK ((sal_uInt16)0x0002)
+// #define TEXT_DRAW_MNEMONIC ((sal_uInt16)0x0004)
+#define TEXT_DRAW_LEFT ((sal_uInt16)0x0010)
+#define TEXT_DRAW_CENTER ((sal_uInt16)0x0020)
+#define TEXT_DRAW_RIGHT ((sal_uInt16)0x0040)
+#define TEXT_DRAW_TOP ((sal_uInt16)0x0080)
+#define TEXT_DRAW_VCENTER ((sal_uInt16)0x0100)
+#define TEXT_DRAW_BOTTOM ((sal_uInt16)0x0200)
+#define TEXT_DRAW_ENDELLIPSIS ((sal_uInt16)0x0400)
+#define TEXT_DRAW_PATHELLIPSIS ((sal_uInt16)0x0800)
+#define TEXT_DRAW_CLIP ((sal_uInt16)0x1000)
+#define TEXT_DRAW_MULTILINE ((sal_uInt16)0x2000)
+#define TEXT_DRAW_WORDBREAK ((sal_uInt16)0x4000)
XubString GetEllipsisString( OutputDevice* pDev,
const XubString& rStr, long nMaxWidth,
- USHORT nStyle = TEXT_DRAW_ENDELLIPSIS )
+ sal_uInt16 nStyle = TEXT_DRAW_ENDELLIPSIS )
{
XubString aStr = rStr;
if ( nStyle & TEXT_DRAW_ENDELLIPSIS )
{
- USHORT nIndex = pDev->GetTextBreak( rStr, nMaxWidth );
+ sal_uInt16 nIndex = pDev->GetTextBreak( rStr, nMaxWidth );
if ( nIndex != STRING_LEN )
{
aStr.Erase( nIndex );
@@ -148,11 +148,11 @@ class TextLineInfo
{
private:
long mnWidth;
- USHORT mnIndex;
- USHORT mnLen;
+ sal_uInt16 mnIndex;
+ sal_uInt16 mnLen;
public:
- TextLineInfo( long nWidth, USHORT nIndex, USHORT nLen )
+ TextLineInfo( long nWidth, sal_uInt16 nIndex, sal_uInt16 nLen )
{
mnWidth = nWidth;
mnIndex = nIndex;
@@ -160,8 +160,8 @@ public:
}
long GetWidth() const { return mnWidth; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT GetLen() const { return mnLen; }
+ sal_uInt16 GetIndex() const { return mnIndex; }
+ sal_uInt16 GetLen() const { return mnLen; }
};
#define MULTITEXTLINEINFO_RESIZE 16
@@ -171,8 +171,8 @@ class MultiTextLineInfo
{
private:
PTextLineInfo* mpLines;
- USHORT mnLines;
- USHORT mnSize;
+ sal_uInt16 mnLines;
+ sal_uInt16 mnSize;
public:
MultiTextLineInfo();
@@ -181,9 +181,9 @@ public:
void AddLine( TextLineInfo* pLine );
void Clear();
- TextLineInfo* GetLine( USHORT nLine ) const
+ TextLineInfo* GetLine( sal_uInt16 nLine ) const
{ return mpLines[nLine]; }
- USHORT Count() const { return mnLines; }
+ sal_uInt16 Count() const { return mnLines; }
private:
MultiTextLineInfo( const MultiTextLineInfo& );
@@ -199,7 +199,7 @@ MultiTextLineInfo::MultiTextLineInfo()
MultiTextLineInfo::~MultiTextLineInfo()
{
- for ( USHORT i = 0; i < mnLines; i++ )
+ for ( sal_uInt16 i = 0; i < mnLines; i++ )
delete mpLines[i];
delete [] mpLines;
}
@@ -220,7 +220,7 @@ void MultiTextLineInfo::AddLine( TextLineInfo* pLine )
void MultiTextLineInfo::Clear()
{
- for ( USHORT i = 0; i < mnLines; i++ )
+ for ( sal_uInt16 i = 0; i < mnLines; i++ )
delete mpLines[i];
mnLines = 0;
}
@@ -229,7 +229,7 @@ void MultiTextLineInfo::Clear()
long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
long nWidth, const XubString& rStr,
- USHORT nStyle = TEXT_DRAW_WORDBREAK )
+ sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK )
{
rLineInfo.Clear();
if ( !rStr.Len() )
@@ -237,20 +237,20 @@ long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
if ( nWidth <= 0 )
nWidth = 1;
- USHORT nStartPos = 0; // Start-Position der Zeile
- USHORT nLastLineLen = 0; // Zeilenlaenge bis zum vorherigen Wort
- USHORT nLastWordPos = 0; // Position des letzten Wortanfangs
- USHORT i = 0;
- USHORT nPos; // StartPositon der Zeile (nur Temp)
- USHORT nLen; // Laenge der Zeile (nur Temp)
- USHORT nStrLen = rStr.Len();
+ sal_uInt16 nStartPos = 0; // Start-Position der Zeile
+ sal_uInt16 nLastLineLen = 0; // Zeilenlaenge bis zum vorherigen Wort
+ sal_uInt16 nLastWordPos = 0; // Position des letzten Wortanfangs
+ sal_uInt16 i = 0;
+ sal_uInt16 nPos; // StartPositon der Zeile (nur Temp)
+ sal_uInt16 nLen; // Laenge der Zeile (nur Temp)
+ sal_uInt16 nStrLen = rStr.Len();
long nMaxLineWidth = 0; // Maximale Zeilenlaenge
long nLineWidth; // Aktuelle Zeilenlaenge
long nLastLineWidth = 0; // Zeilenlaenge der letzten Zeile
xub_Unicode c;
xub_Unicode c2;
const xub_Unicode* pStr = rStr.GetBuffer();
- BOOL bHardBreak = FALSE;
+ sal_Bool bHardBreak = sal_False;
do
{
@@ -258,9 +258,9 @@ long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
// Auf Zeilenende ermitteln
if ( (c == _CR) || (c == _LF) )
- bHardBreak = TRUE;
+ bHardBreak = sal_True;
else
- bHardBreak = FALSE;
+ bHardBreak = sal_False;
// Testen, ob ein Wortende erreicht ist
if ( bHardBreak || (i == nStrLen) ||
@@ -375,9 +375,9 @@ long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
// -----------------------------------------------------------------------
-USHORT GetTextLines( OutputDevice* pDev, const Rectangle& rRect,
+sal_uInt16 GetTextLines( OutputDevice* pDev, const Rectangle& rRect,
const XubString& rStr,
- USHORT nStyle = TEXT_DRAW_WORDBREAK,
+ sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK,
long* pMaxWidth = NULL )
{
MultiTextLineInfo aMultiLineInfo;
@@ -392,10 +392,10 @@ USHORT GetTextLines( OutputDevice* pDev, const Rectangle& rRect,
Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
const XubString& rStr,
- USHORT nStyle = TEXT_DRAW_WORDBREAK )
+ sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK )
{
Rectangle aRect = rRect;
- USHORT nLines;
+ sal_uInt16 nLines;
long nWidth = rRect.GetWidth();
long nMaxWidth;
long nTextHeight;
@@ -404,13 +404,13 @@ Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
{
MultiTextLineInfo aMultiLineInfo;
TextLineInfo* pLineInfo;
- USHORT nFormatLines;
+ sal_uInt16 nFormatLines;
nMaxWidth = 0;
GetTextLines( pDev, aMultiLineInfo, nWidth, rStr, nStyle );
nFormatLines = aMultiLineInfo.Count();
nTextHeight = pDev->GetTextHeight();
- nLines = (USHORT)(aRect.GetHeight()/nTextHeight);
+ nLines = (sal_uInt16)(aRect.GetHeight()/nTextHeight);
if ( nFormatLines <= nLines )
nLines = nFormatLines;
else
@@ -420,7 +420,7 @@ Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
else
nMaxWidth = nWidth;
}
- for ( USHORT i = 0; i < nLines; i++ )
+ for ( sal_uInt16 i = 0; i < nLines; i++ )
{
pLineInfo = aMultiLineInfo.GetLine( i );
if ( pLineInfo->GetWidth() > nMaxWidth )
@@ -462,7 +462,7 @@ Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
// -----------------------------------------------------------------------
void DrawText( OutputDevice* pDev, const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle = 0 )
+ const XubString& rStr, sal_uInt16 nStyle = 0 )
{
if ( !rStr.Len() || rRect.IsEmpty() )
return;
@@ -484,10 +484,10 @@ void DrawText( OutputDevice* pDev, const Rectangle& rRect,
TextLineInfo* pLineInfo;
long nTextHeight = pDev->GetTextHeight();
long nMaxTextWidth;
- USHORT i;
- USHORT nLines = (USHORT)(nHeight/nTextHeight);
- USHORT nFormatLines;
- BOOL bIsClipRegion = FALSE;
+ sal_uInt16 i;
+ sal_uInt16 nLines = (sal_uInt16)(nHeight/nTextHeight);
+ sal_uInt16 nFormatLines;
+ sal_Bool bIsClipRegion = sal_False;
nMaxTextWidth = GetTextLines( pDev, aMultiLineInfo, nWidth, rStr, nStyle );
nFormatLines = aMultiLineInfo.Count();
@@ -608,7 +608,7 @@ void DrawText( OutputDevice* pDev, const Rectangle& rRect,
if ( nStyle & TEXT_DRAW_CLIP )
{
- BOOL bIsClipRegion = pDev->IsClipRegion();
+ sal_Bool bIsClipRegion = pDev->IsClipRegion();
if ( bIsClipRegion )
{
Region aOldRegion = pDev->GetClipRegion();
@@ -646,7 +646,7 @@ class ImpIcnCursor
SvImpIconView* pView;
SvPtrarr* pColumns;
SvPtrarr* pRows;
- BOOL* pGridMap;
+ sal_Bool* pGridMap;
long nGridDX, nGridDY;
long nGridCols, nGridRows;
long nCols;
@@ -658,34 +658,34 @@ class ImpIcnCursor
void ImplCreate();
void Create() { if( !pColumns ) ImplCreate(); }
- USHORT GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
- SvLBoxEntry* SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,USHORT nPref,
- BOOL bDown, BOOL bSimple );
- SvLBoxEntry* SearchRow(USHORT nRow,USHORT nRight,USHORT nLeft,USHORT nPref,
- BOOL bRight, BOOL bSimple );
+ sal_uInt16 GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
+ SvLBoxEntry* SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,sal_uInt16 nPref,
+ sal_Bool bDown, sal_Bool bSimple );
+ SvLBoxEntry* SearchRow(sal_uInt16 nRow,sal_uInt16 nRight,sal_uInt16 nLeft,sal_uInt16 nPref,
+ sal_Bool bRight, sal_Bool bSimple );
void CreateGridMap();
- // Rueckgabe FALSE: Eintrag liegt nicht in der GridMap. rGridx,y werden
+ // Rueckgabe sal_False: Eintrag liegt nicht in der GridMap. rGridx,y werden
// dann an nGridCols, nGridRows geclippt
- BOOL GetGrid( const Point& rDocPos, USHORT& rGridX, USHORT& rGridY ) const;
- void SetGridUsed( USHORT nDX, USHORT nDY, BOOL bUsed )
+ sal_Bool GetGrid( const Point& rDocPos, sal_uInt16& rGridX, sal_uInt16& rGridY ) const;
+ void SetGridUsed( sal_uInt16 nDX, sal_uInt16 nDY, sal_Bool bUsed )
{
pGridMap[ (nDY * nGridCols) + nDX ] = bUsed;
}
public:
ImpIcnCursor( SvImpIconView* pOwner );
~ImpIcnCursor();
- void Clear( BOOL bGridToo = TRUE );
+ void Clear( sal_Bool bGridToo = sal_True );
// fuer Cursortravelling usw.
- SvLBoxEntry* GoLeftRight( SvLBoxEntry*, BOOL bRight );
- SvLBoxEntry* GoUpDown( SvLBoxEntry*, BOOL bDown );
+ SvLBoxEntry* GoLeftRight( SvLBoxEntry*, sal_Bool bRight );
+ SvLBoxEntry* GoUpDown( SvLBoxEntry*, sal_Bool bDown );
- // Rueckgaebe: FALSE == Das leere Rect steht hinter dem letzten
+ // Rueckgaebe: sal_False == Das leere Rect steht hinter dem letzten
// Eintrag; d.h. beim naechsten Einfuegen ergibt sich das naechste
// leere Rechteck durch Addition. Hinweis: Das Rechteck kann dann
// ausserhalb des View-Space liegen
- BOOL FindEmptyGridRect( Rectangle& rRect );
+ sal_Bool FindEmptyGridRect( Rectangle& rRect );
// Erzeugt fuer jede Zeile (Hoehe=nGridDY) eine nach BoundRect.Left()
// sortierte Liste der Eintraege, die in ihr stehen. Eine Liste kann
@@ -693,14 +693,14 @@ public:
// muessen mit DestroyGridAdjustData geloescht werden
void CreateGridAjustData( SvPtrarr& pLists, SvLBoxEntry* pRow=0);
static void DestroyGridAdjustData( SvPtrarr& rLists );
- void SetGridUsed( const Rectangle&, BOOL bUsed = TRUE );
+ void SetGridUsed( const Rectangle&, sal_Bool bUsed = sal_True );
};
SvImpIconView::SvImpIconView( SvIconView* pCurView, SvLBoxTreeList* pTree,
- WinBits nWinStyle ) :
+ WinBits i_nWinStyle ) :
aVerSBar( pCurView, WB_DRAG | WB_VSCROLL ),
aHorSBar( pCurView, WB_DRAG | WB_HSCROLL )
{
@@ -708,7 +708,7 @@ SvImpIconView::SvImpIconView( SvIconView* pCurView, SvLBoxTreeList* pTree,
pModel = pTree;
pCurParent = 0;
pZOrderList = new SvPtrarr;
- SetWindowBits( nWinStyle );
+ SetStyle( i_nWinStyle );
nHorDist = 0;
nVerDist = 0;
nFlags = 0;
@@ -732,7 +732,7 @@ SvImpIconView::SvImpIconView( SvIconView* pCurView, SvLBoxTreeList* pTree,
aEditTimer.SetTimeout( 800 );
aEditTimer.SetTimeoutHdl(LINK(this,SvImpIconView,EditTimeoutHdl));
- Clear( TRUE );
+ Clear( sal_True );
}
SvImpIconView::~SvImpIconView()
@@ -747,14 +747,14 @@ SvImpIconView::~SvImpIconView()
ClearSelectedRectList();
}
-void SvImpIconView::Clear( BOOL bInCtor )
+void SvImpIconView::Clear( sal_Bool bInCtor )
{
StopEditTimer();
CancelUserEvent();
nMaxBmpWidth = 0;
nMaxBmpHeight = 0;
nMaxTextWidth = 0;
- bMustRecalcBoundingRects = FALSE;
+ bMustRecalcBoundingRects = sal_False;
nMaxBoundHeight = 0;
//XXX
@@ -777,30 +777,29 @@ void SvImpIconView::Clear( BOOL bInCtor )
AdjustScrollBars();
}
-void SvImpIconView::SetWindowBits( WinBits nWinStyle )
+void SvImpIconView::SetStyle( const WinBits i_nWinStyle )
{
- nWinBits = nWinStyle;
nViewMode = VIEWMODE_TEXT;
- if( nWinStyle & WB_NAME )
+ if( i_nWinStyle & WB_NAME )
nViewMode = VIEWMODE_NAME;
- if( nWinStyle & WB_ICON )
+ if( i_nWinStyle & WB_ICON )
nViewMode = VIEWMODE_ICON;
}
IMPL_LINK( SvImpIconView, ScrollUpDownHdl, ScrollBar *, pScrollBar )
{
- pView->EndEditing( TRUE );
+ pView->EndEditing( sal_True );
// Pfeil hoch: delta=-1; Pfeil runter: delta=+1
- Scroll( 0, pScrollBar->GetDelta(), TRUE );
+ Scroll( 0, pScrollBar->GetDelta(), sal_True );
return 0;
}
IMPL_LINK( SvImpIconView, ScrollLeftRightHdl, ScrollBar *, pScrollBar )
{
- pView->EndEditing( TRUE );
+ pView->EndEditing( sal_True );
// Pfeil links: delta=-1; Pfeil rechts: delta=+1
- Scroll( pScrollBar->GetDelta(), 0, TRUE );
+ Scroll( pScrollBar->GetDelta(), 0, sal_True );
return 0;
}
@@ -840,7 +839,7 @@ void SvImpIconView::CheckSizes( SvLBoxEntry* pEntry,
{
nMaxTextWidth = aSize.Width();
if( !(nFlags & F_GRIDMODE ) )
- bMustRecalcBoundingRects = TRUE;
+ bMustRecalcBoundingRects = sal_True;
}
}
SvLBoxContextBmp* pBmpItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
@@ -852,14 +851,14 @@ void SvImpIconView::CheckSizes( SvLBoxEntry* pEntry,
nMaxBmpWidth = aSize.Width();
nMaxBmpWidth += (2*LROFFS_ICON);
if( !(nFlags & F_GRIDMODE ) )
- bMustRecalcBoundingRects = TRUE;
+ bMustRecalcBoundingRects = sal_True;
}
if( aSize.Height() > nMaxBmpHeight )
{
nMaxBmpHeight = aSize.Height();
nMaxBmpHeight += (2*TBOFFS_ICON);;
if( !(nFlags & F_GRIDMODE ) )
- bMustRecalcBoundingRects = TRUE;
+ bMustRecalcBoundingRects = sal_True;
}
}
}
@@ -872,9 +871,9 @@ void SvImpIconView::EntryInserted( SvLBoxEntry* pEntry )
DBG_ASSERT(pZOrderList->GetPos(pEntry)==0xffff,"EntryInserted:ZOrder?");
pZOrderList->Insert( pEntry, pZOrderList->Count() );
if( nFlags & F_GRIDMODE )
- pImpCursor->Clear( FALSE );
+ pImpCursor->Clear( sal_False );
else
- pImpCursor->Clear( TRUE );
+ pImpCursor->Clear( sal_True );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
CheckSizes( pEntry, pViewData );
if( pView->IsUpdateMode() )
@@ -904,11 +903,11 @@ void SvImpIconView::RemovingEntry( SvLBoxEntry* pEntry )
if( pEntry == pCursor )
{
SvLBoxEntry* pNewCursor = GetNewCursor();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pCursor = 0; // damit er nicht deselektiert wird
SetCursor( pNewCursor );
}
- USHORT nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uInt16 nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos, 1 );
pImpCursor->Clear();
}
@@ -951,7 +950,7 @@ void SvImpIconView::MovingEntry( SvLBoxEntry* pEntry )
void SvImpIconView::EntryMoved( SvLBoxEntry* pEntry )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
if( pModel->GetParent(pEntry)==pCurParent )
{
@@ -979,9 +978,9 @@ void SvImpIconView::EntryMoved( SvLBoxEntry* pEntry )
SetCursor( pNextCursor );
}
pImpCursor->Clear();
- USHORT nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uInt16 nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos, 1 );
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
// wenn er nochmal in dieser View auftaucht, muss sein
// Bounding-Rect neu berechnet werden
InvalidateBoundingRect( pViewData->aRect );
@@ -1006,7 +1005,7 @@ void SvImpIconView::CollapsingEntry( SvLBoxEntry* )
{
}
-void SvImpIconView::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
+void SvImpIconView::EntrySelected( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
if( pModel->GetParent(pEntry) != pCurParent )
return;
@@ -1026,13 +1025,13 @@ void SvImpIconView::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
if( pView->IsUpdateMode() )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( nFlags & F_RUBBERING )
PaintEntry( pEntry );
else
pView->Invalidate( GetBoundingRect( pEntry ) );
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -1124,7 +1123,7 @@ void SvImpIconView::ResetVirtSize()
StopEditTimer();
aVirtOutputSize.Width() = 0;
aVirtOutputSize.Height() = 0;
- BOOL bLockedEntryFound = FALSE;
+ sal_Bool bLockedEntryFound = sal_False;
nFlags &= (~F_GRID_INSERT);
SvLBoxEntry* pCur = pModel->FirstChild( pCurParent );
while( pCur )
@@ -1137,7 +1136,7 @@ void SvImpIconView::ResetVirtSize()
FindBoundingRect( pCur, pViewData );
else
AdjustVirtSize( pViewData->aRect );
- bLockedEntryFound = TRUE;
+ bLockedEntryFound = sal_True;
}
else
InvalidateBoundingRect( pViewData->aRect );
@@ -1191,16 +1190,16 @@ void SvImpIconView::Arrange()
void SvImpIconView::ImpArrange()
{
StopEditTimer();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
ResetVirtSize();
- bMustRecalcBoundingRects = FALSE;
+ bMustRecalcBoundingRects = sal_False;
MapMode aMapMode( pView->GetMapMode());
aMapMode.SetOrigin( Point() );
pView->SetMapMode( aMapMode );
CheckAllSizes();
RecalcAllBoundingRectsSmart();
pView->Invalidate();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvImpIconView::Paint( const Rectangle& rRect )
@@ -1242,14 +1241,14 @@ void SvImpIconView::Paint( const Rectangle& rRect )
if( !pCursor )
pCursor = pModel->FirstChild( pCurParent );
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
if( !nCount )
return;
SvPtrarr* pNewZOrderList = new SvPtrarr;
SvPtrarr* pPaintedEntries = new SvPtrarr;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( nCount )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pZOrderList->GetObject(nPos ));
@@ -1272,7 +1271,7 @@ void SvImpIconView::Paint( const Rectangle& rRect )
nCount = pPaintedEntries->Count();
if( nCount )
{
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
pZOrderList->Insert( pPaintedEntries->GetObject( nCur ),pZOrderList->Count());
}
delete pPaintedEntries;
@@ -1282,7 +1281,7 @@ void SvImpIconView::Paint( const Rectangle& rRect )
PaintResizeRect( aRect );
}
-BOOL SvImpIconView::GetResizeRect( Rectangle& rRect )
+sal_Bool SvImpIconView::GetResizeRect( Rectangle& rRect )
{
if( aHorSBar.IsVisible() && aVerSBar.IsVisible() )
{
@@ -1293,9 +1292,9 @@ BOOL SvImpIconView::GetResizeRect( Rectangle& rRect )
aOrigin.Y() += aOutputSize.Height();
rRect.SetPos( aOrigin );
rRect.SetSize( Size( nVerSBarWidth, nHorSBarHeight));
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SvImpIconView::PaintResizeRect( const Rectangle& rRect )
@@ -1355,7 +1354,7 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
{
if( !rMEvt.IsMod1() ) // Ctrl
{
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
ClearSelectedRectList();
}
else
@@ -1367,8 +1366,8 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
return;
}
- BOOL bSelected = pView->IsSelected( pEntry );
- BOOL bEditingEnabled = pView->IsInplaceEditingEnabled();
+ sal_Bool bSelected = pView->IsSelected( pEntry );
+ sal_Bool bEditingEnabled = pView->IsInplaceEditingEnabled();
if( rMEvt.GetClicks() == 2 )
{
@@ -1392,7 +1391,7 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
if( bEditingEnabled && bSelected && !rMEvt.GetModifier() &&
rMEvt.IsLeft() && IsTextHit( pEntry, aDocPos ) )
{
@@ -1407,7 +1406,7 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
else
{
@@ -1442,7 +1441,7 @@ void SvImpIconView::MouseButtonUp( const MouseEvent& rMEvt )
nFlags &= ~(F_RUBBERING | F_ADD_MODE);
}
- SvLBoxEntry* pEntry = pView->GetEntry( rMEvt.GetPosPixel(), TRUE );
+ SvLBoxEntry* pEntry = pView->GetEntry( rMEvt.GetPosPixel(), sal_True );
if( pEntry )
{
if( nFlags & F_DOWN_CTRL )
@@ -1455,7 +1454,7 @@ void SvImpIconView::MouseButtonUp( const MouseEvent& rMEvt )
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
}
@@ -1491,12 +1490,12 @@ void SvImpIconView::MouseMove( const MouseEvent& rMEvt )
long nScrollDX, nScrollDY;
- CalcScrollOffsets(rMEvt.GetPosPixel(),nScrollDX,nScrollDY,FALSE );
- BOOL bSelRectHidden = FALSE;
+ CalcScrollOffsets(rMEvt.GetPosPixel(),nScrollDX,nScrollDY,sal_False );
+ sal_Bool bSelRectHidden = sal_False;
if( nScrollDX || nScrollDY )
{
HideSelectionRect();
- bSelRectHidden = TRUE;
+ bSelRectHidden = sal_True;
pView->Scroll( nScrollDX, nScrollDY );
}
Point aDocPos( rMEvt.GetPosPixel() );
@@ -1505,8 +1504,8 @@ void SvImpIconView::MouseMove( const MouseEvent& rMEvt )
if( aRect != aCurSelectionRect )
{
HideSelectionRect();
- bSelRectHidden = TRUE;
- BOOL bAdd = (nFlags & F_ADD_MODE) ? TRUE : FALSE;
+ bSelRectHidden = sal_True;
+ sal_Bool bAdd = (nFlags & F_ADD_MODE) ? sal_True : sal_False;
SelectRect( aRect, bAdd, &aSelectedRectList );
}
if( bSelRectHidden )
@@ -1514,32 +1513,32 @@ void SvImpIconView::MouseMove( const MouseEvent& rMEvt )
}
}
-BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
+sal_Bool SvImpIconView::KeyInput( const KeyEvent& rKEvt )
{
StopEditTimer();
- BOOL bKeyUsed = TRUE;
- BOOL bMod1 = rKEvt.GetKeyCode().IsMod1();
- BOOL bInAddMode = (BOOL)((nFlags & F_ADD_MODE) != 0);
+ sal_Bool bKeyUsed = sal_True;
+ sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1();
+ sal_Bool bInAddMode = (sal_Bool)((nFlags & F_ADD_MODE) != 0);
int bDeselAll = (pView->GetSelectionMode() != SINGLE_SELECTION) &&
!bInAddMode;
SvLBoxEntry* pNewCursor;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case KEY_UP:
if( pCursor )
{
MakeVisible( pCursor );
- pNewCursor = pImpCursor->GoUpDown(pCursor,FALSE);
+ pNewCursor = pImpCursor->GoUpDown(pCursor,sal_False);
if( pNewCursor )
{
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
else
{
@@ -1557,17 +1556,17 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
case KEY_DOWN:
if( pCursor )
{
- pNewCursor=pImpCursor->GoUpDown( pCursor,TRUE );
+ pNewCursor=pImpCursor->GoUpDown( pCursor,sal_True );
if( pNewCursor )
{
MakeVisible( pCursor );
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
}
break;
@@ -1575,17 +1574,17 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
case KEY_RIGHT:
if( pCursor )
{
- pNewCursor=pImpCursor->GoLeftRight(pCursor,TRUE );
+ pNewCursor=pImpCursor->GoLeftRight(pCursor,sal_True );
if( pNewCursor )
{
MakeVisible( pCursor );
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
}
break;
@@ -1594,16 +1593,16 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
MakeVisible( pCursor );
- pNewCursor = pImpCursor->GoLeftRight(pCursor,FALSE );
+ pNewCursor = pImpCursor->GoLeftRight(pCursor,sal_False );
if( pNewCursor )
{
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
else
{
@@ -1622,7 +1621,7 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
if( nFlags & F_RUBBERING )
{
HideSelectionRect();
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
nFlags &= ~F_RUBBERING;
}
break;
@@ -1663,13 +1662,13 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
case KEY_ADD:
case KEY_DIVIDE :
if( bMod1 )
- pView->SelectAll( TRUE );
+ pView->SelectAll( sal_True );
break;
case KEY_SUBTRACT:
case KEY_COMMA :
if( bMod1 )
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
break;
case KEY_RETURN:
@@ -1681,7 +1680,7 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
break;
default:
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
return bKeyUsed;
@@ -1694,11 +1693,6 @@ void SvImpIconView::PositionScrollBars( long nRealWidth, long nRealHeight )
Point aPos( 0, nRealHeight );
aPos.Y() -= nHorSBarHeight;
-#ifdef WIN
- // vom linken und unteren Rand ein Pixel abschneiden
- aPos.Y()++;
- aPos.X()--;
-#endif
#ifdef OS2
aPos.Y()++;
#endif
@@ -1709,7 +1703,7 @@ void SvImpIconView::PositionScrollBars( long nRealWidth, long nRealHeight )
aPos.X() = nRealWidth; aPos.Y() = 0;
aPos.X() -= nVerSBarWidth;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
aPos.X()++;
aPos.Y()--;
#endif
@@ -1751,10 +1745,10 @@ void SvImpIconView::AdjustScrollBars()
else
nVisibleHeight = nRealHeight;
- bool bVerSBar = (pView->nWindowStyle & WB_VSCROLL) ? true : false;
- bool bHorSBar = (pView->nWindowStyle & WB_HSCROLL) ? true : false;
+ bool bVerSBar = (pView->GetStyle() & WB_VSCROLL) ? true : false;
+ bool bHorSBar = (pView->GetStyle() & WB_HSCROLL) ? true : false;
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
if( nVirtHeight )
{
// activate ver scrollbar ?
@@ -1801,7 +1795,7 @@ void SvImpIconView::AdjustScrollBars()
// size ver scrollbar
long nThumb = aVerSBar.GetThumbPos();
Size aSize( nVerSBarWidth, nRealHeight );
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
aSize.Height() += 2;
#endif
#ifdef OS2
@@ -1826,7 +1820,7 @@ void SvImpIconView::AdjustScrollBars()
nThumb = aHorSBar.GetThumbPos();
aSize.Width() = nRealWidth;
aSize.Height() = nHorSBarHeight;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
aSize.Width()++;
#endif
#ifdef OS2
@@ -1834,7 +1828,7 @@ void SvImpIconView::AdjustScrollBars()
if( nResult & 0x0001 ) // vertikale Scrollbar ?
aSize.Width()--;
#endif
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
if( nResult & 0x0001 ) // vertikale Scrollbar ?
{
aSize.Width()++;
@@ -1860,7 +1854,7 @@ void SvImpIconView::AdjustScrollBars()
nRealWidth++;
#endif
aOutputSize.Width() = nRealWidth;
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
if( nResult & 0x0002 ) // hor scrollbar ?
nRealHeight++; // weil unterer Rand geclippt wird
#endif
@@ -1894,23 +1888,23 @@ void SvImpIconView::Resize()
#endif
}
-BOOL SvImpIconView::CheckHorScrollBar()
+sal_Bool SvImpIconView::CheckHorScrollBar()
{
if( !pZOrderList || !aHorSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
- if(!(pView->nWindowStyle & WB_HSCROLL) && !aOrigin.X() )
+ if(!(pView->GetStyle() & WB_HSCROLL) && !aOrigin.X() )
{
long nWidth = aOutputSize.Width();
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
long nMostRight = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)pZOrderList->operator[](nCur);
long nRight = GetBoundingRect(pEntry).Right();
if( nRight > nWidth )
- return FALSE;
+ return sal_False;
if( nRight > nMostRight )
nMostRight = nRight;
}
@@ -1927,28 +1921,28 @@ BOOL SvImpIconView::CheckHorScrollBar()
aSize.Height() += nHorSBarHeight;
aVerSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvImpIconView::CheckVerScrollBar()
+sal_Bool SvImpIconView::CheckVerScrollBar()
{
if( !pZOrderList || !aVerSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
- if(!(pView->nWindowStyle & WB_VSCROLL) && !aOrigin.Y() )
+ if(!(pView->GetStyle() & WB_VSCROLL) && !aOrigin.Y() )
{
long nDeepest = 0;
long nHeight = aOutputSize.Height();
- USHORT nCount = pZOrderList->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = pZOrderList->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)pZOrderList->operator[](nCur);
long nBottom = GetBoundingRect(pEntry).Bottom();
if( nBottom > nHeight )
- return FALSE;
+ return sal_False;
if( nBottom > nDeepest )
nDeepest = nBottom;
}
@@ -1965,9 +1959,9 @@ BOOL SvImpIconView::CheckVerScrollBar()
aSize.Width() += nVerSBarWidth;
aHorSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -1984,8 +1978,8 @@ void SvImpIconView::GetFocus()
{
if( pCursor )
{
- pView->SetEntryFocus( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->SetEntryFocus( pCursor, sal_True );
+ ShowCursor( sal_True );
}
}
@@ -1993,8 +1987,8 @@ void SvImpIconView::LoseFocus()
{
StopEditTimer();
if( pCursor )
- pView->SetEntryFocus( pCursor,FALSE );
- ShowCursor( FALSE );
+ pView->SetEntryFocus( pCursor,sal_False );
+ ShowCursor( sal_False );
}
void SvImpIconView::UpdateAll()
@@ -2010,8 +2004,8 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, SvIcnVwDataEntry* pViewData
PaintEntry( pEntry, aPos, pViewData );
}
-void SvImpIconView::PaintEmphasis( const Rectangle& rRect, BOOL bSelected,
- BOOL bCursored, OutputDevice* pOut )
+void SvImpIconView::PaintEmphasis( const Rectangle& rRect, sal_Bool bSelected,
+ sal_Bool bCursored, OutputDevice* pOut )
{
// HACK fuer D&D
if( nFlags & F_NO_EMPHASIS )
@@ -2049,7 +2043,7 @@ void SvImpIconView::PaintEmphasis( const Rectangle& rRect, BOOL bSelected,
}
void SvImpIconView::PaintItem( const Rectangle& rRect,
- SvLBoxItem* pItem, SvLBoxEntry* pEntry, USHORT nPaintFlags,
+ SvLBoxItem* pItem, SvLBoxEntry* pEntry, sal_uInt16 nPaintFlags,
OutputDevice* pOut )
{
if( nViewMode == VIEWMODE_ICON && pItem->IsA() == SV_ITEM_ID_LBOXSTRING )
@@ -2087,8 +2081,8 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
SvLBoxString* pStringItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
- BOOL bSelected = pViewData->IsSelected();
- BOOL bCursored = pViewData->IsCursored();
+ sal_Bool bSelected = pViewData->IsSelected();
+ sal_Bool bCursored = pViewData->IsCursored();
Font aTempFont( pOut->GetFont() );
// waehrend D&D nicht die Fontfarbe wechseln, da sonst auch die
@@ -2100,7 +2094,7 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
aNewFont.SetColor( rStyleSettings.GetHighlightTextColor() );
pOut->SetFont( aNewFont );
}
- Rectangle aTextRect( CalcTextRect(pEntry,pStringItem,&rPos,FALSE,pViewData));
+ Rectangle aTextRect( CalcTextRect(pEntry,pStringItem,&rPos,sal_False,pViewData));
Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos, pViewData ) );
switch( nViewMode )
@@ -2110,7 +2104,7 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
PaintEmphasis( aBmpRect, bSelected, bCursored, pOut );
PaintItem( aBmpRect, pBmpItem, pEntry,
PAINTFLAG_HOR_CENTERED | PAINTFLAG_VER_CENTERED, pOut );
- PaintEmphasis( aTextRect, bSelected, FALSE, pOut );
+ PaintEmphasis( aTextRect, bSelected, sal_False, pOut );
PaintItem( aTextRect, pStringItem, pEntry, PAINTFLAG_HOR_CENTERED, pOut );
break;
@@ -2118,7 +2112,7 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
pBmpItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
PaintEmphasis( aBmpRect, bSelected, bCursored, pOut );
PaintItem( aBmpRect, pBmpItem, pEntry, PAINTFLAG_VER_CENTERED, pOut );
- PaintEmphasis( aTextRect, bSelected, FALSE, pOut );
+ PaintEmphasis( aTextRect, bSelected, sal_False, pOut );
PaintItem( aTextRect, pStringItem, pEntry,PAINTFLAG_VER_CENTERED, pOut );
break;
@@ -2131,11 +2125,11 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
}
void SvImpIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos,
- BOOL bAdjustAtGrid, BOOL bCheckScrollBars )
+ sal_Bool bAdjustAtGrid, sal_Bool bCheckScrollBars )
{
if( pModel->GetParent(pEntry) == pCurParent )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
Rectangle aBoundRect( GetBoundingRect( pEntry, pViewData ));
pView->Invalidate( aBoundRect );
@@ -2161,7 +2155,7 @@ void SvImpIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos,
CheckScrollBars();
PaintEntry( pEntry, pViewData );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -2172,7 +2166,7 @@ void SvImpIconView::ViewDataInitialized( SvLBoxEntry*)
void SvImpIconView::ModelHasEntryInvalidated( SvListEntry* pEntry )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
pView->Invalidate( pViewData->aRect );
@@ -2185,7 +2179,7 @@ void SvImpIconView::ModelHasEntryInvalidated( SvListEntry* pEntry )
ViewDataInitialized( (SvLBoxEntry*)pEntry );
pView->Invalidate( pViewData->aRect );
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
@@ -2207,9 +2201,9 @@ void SvImpIconView::SetSelectionMode( SelectionMode )
{
}
-BOOL SvImpIconView::IsEntryInView( SvLBoxEntry* )
+sal_Bool SvImpIconView::IsEntryInView( SvLBoxEntry* )
{
- return FALSE;
+ return sal_False;
}
SvLBoxEntry* SvImpIconView::GetDropTarget( const Point& rPos )
@@ -2227,7 +2221,7 @@ SvLBoxEntry* SvImpIconView::GetEntry( const Point& rDocPos )
CheckBoundingRects();
SvLBoxEntry* pTarget = 0;
// Z-Order-Liste vom Ende her absuchen
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
while( nCount )
{
nCount--;
@@ -2246,11 +2240,11 @@ SvLBoxEntry* SvImpIconView::GetNextEntry( const Point& rDocPos, SvLBoxEntry* pCu
{
CheckBoundingRects();
SvLBoxEntry* pTarget = 0;
- USHORT nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ sal_uInt16 nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != USHRT_MAX )
{
- USHORT nCount = pZOrderList->Count();
- for( USHORT nCur = nStartPos+1; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = pZOrderList->Count();
+ for( sal_uInt16 nCur = nStartPos+1; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pZOrderList->GetObject(nCur));
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
@@ -2268,7 +2262,7 @@ SvLBoxEntry* SvImpIconView::GetPrevEntry( const Point& rDocPos, SvLBoxEntry* pCu
{
CheckBoundingRects();
SvLBoxEntry* pTarget = 0;
- USHORT nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ sal_uInt16 nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != USHRT_MAX && nStartPos != 0 )
{
nStartPos--;
@@ -2348,7 +2342,7 @@ Rectangle SvImpIconView::CalcBmpRect( SvLBoxEntry* pEntry, const Point* pPos,
}
Rectangle SvImpIconView::CalcTextRect( SvLBoxEntry* pEntry,
- SvLBoxString* pItem, const Point* pPos, BOOL bForInplaceEdit,
+ SvLBoxString* pItem, const Point* pPos, sal_Bool bForInplaceEdit,
SvIcnVwDataEntry* pViewData )
{
long nBmpHeight, nBmpWidth;
@@ -2501,7 +2495,7 @@ void SvImpIconView::RecalcAllBoundingRects()
pZOrderList->Insert( pEntry, pZOrderList->Count() );
pEntry = pModel->NextSibling( pEntry );
}
- bMustRecalcBoundingRects = FALSE;
+ bMustRecalcBoundingRects = sal_False;
AdjustScrollBars();
}
@@ -2580,26 +2574,26 @@ void SvImpIconView::SetCursor( SvLBoxEntry* pEntry )
if( pEntry == pCursor )
return;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( pCursor )
{
- pView->SetEntryFocus( pCursor, FALSE );
+ pView->SetEntryFocus( pCursor, sal_False );
if( pView->GetSelectionMode() == SINGLE_SELECTION )
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
}
pCursor = pEntry;
ToTop( pCursor );
if( pCursor )
{
- pView->SetEntryFocus(pCursor, TRUE );
+ pView->SetEntryFocus(pCursor, sal_True );
if( pView->GetSelectionMode() == SINGLE_SELECTION )
- pView->Select( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->Select( pCursor, sal_True );
+ ShowCursor( sal_True );
}
}
-void SvImpIconView::ShowCursor( BOOL bShow )
+void SvImpIconView::ShowCursor( sal_Bool bShow )
{
if( !pCursor || !bShow || !pView->HasFocus() )
{
@@ -2638,7 +2632,7 @@ void SvImpIconView::ShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix )
DELETEZ(pDDDev);
DELETEZ(pDDBufDev);
}
- BOOL bSelected = pView->SvListView::Select( pRefEntry, FALSE );
+ sal_Bool bSelected = pView->SvListView::Select( pRefEntry, sal_False );
if( !pDDDev )
{
if( pDDBufDev )
@@ -2676,7 +2670,7 @@ void SvImpIconView::ShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix )
PaintEntry( pRefEntry, aPos );
nFlags &= ~F_NO_EMPHASIS;
if( bSelected )
- pView->SvListView::Select( pRefEntry, TRUE );
+ pView->SvListView::Select( pRefEntry, sal_True );
}
void SvImpIconView::HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix )
@@ -2767,12 +2761,12 @@ void SvImpIconView::HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix
pDDDev->GetOutputSizePixel(),
*pDDTempDev );
- BOOL bSelected = pView->SvListView::Select( pRefEntry, FALSE );
+ sal_Bool bSelected = pView->SvListView::Select( pRefEntry, sal_False );
if( bSelected )
- pView->SvListView::Select( pRefEntry, TRUE );
+ pView->SvListView::Select( pRefEntry, sal_True );
}
-void SvImpIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL )
+void SvImpIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool )
{
CheckBoundingRects();
Rectangle aRect;
@@ -2792,8 +2786,8 @@ void SvImpIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL )
ImpDrawXORRect( aRect );
}
-BOOL SvImpIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewPar, ULONG& rNewChildPos )
+sal_Bool SvImpIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewPar, sal_uLong& rNewChildPos )
{
if( pTarget == pCurParent && pModel->GetParent(pEntry) == pCurParent )
{
@@ -2803,14 +2797,14 @@ BOOL SvImpIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
Size aSize( pViewData->aRect.GetSize() );
Point aNewPos = FindNextEntryPos( aSize );
AdjustVirtSize( Rectangle( aNewPos, aSize ) );
- SetEntryPosition( pEntry, aNewPos, FALSE, TRUE );
- return FALSE;
+ SetEntryPosition( pEntry, aNewPos, sal_False, sal_True );
+ return sal_False;
}
return pView->SvLBox::NotifyMoving(pTarget,pEntry,rpNewPar,rNewChildPos);
}
-BOOL SvImpIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool SvImpIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return pView->SvLBox::NotifyCopying(pTarget,pEntry,rpNewParent,rNewChildPos);
}
@@ -2847,9 +2841,9 @@ void SvImpIconView::PrepareCommandEvent( const Point& rPt )
aMouseMoveTimer.Stop();
StopEditTimer();
nFlags |= F_CMD_ARRIVED;
- SvLBoxEntry* pEntry = pView->GetEntry( rPt, TRUE );
+ SvLBoxEntry* pEntry = pView->GetEntry( rPt, sal_True );
if( (nFlags & F_DOWN_CTRL) && pEntry && !pView->IsSelected(pEntry) )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
}
@@ -2858,12 +2852,12 @@ void SvImpIconView::SttDrag( const Point& rPos )
PrepareCommandEvent( rPos );
nFlags |= F_DRAG_SOURCE;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
}
void SvImpIconView::EndDrag()
{
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
nFlags &= (~F_DRAG_SOURCE);
}
@@ -2872,7 +2866,7 @@ void SvImpIconView::ToTop( SvLBoxEntry* pEntry )
DBG_ASSERT(pZOrderList->GetPos(pEntry)!=0xffff,"ToTop:ZOrder?");
if( pZOrderList->GetObject( pZOrderList->Count() -1 ) != pEntry )
{
- USHORT nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uInt16 nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos, 1 );
pZOrderList->Insert( pEntry, pZOrderList->Count() );
}
@@ -2899,9 +2893,9 @@ void SvImpIconView::ClipAtVirtOutRect( Rectangle& rRect ) const
// rRect: Bereich des Dokumentes (in Dokumentkoordinaten), der
// sichtbar gemacht werden soll.
-// bScrBar == TRUE: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
+// bScrBar == sal_True: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
-void SvImpIconView::MakeVisible( const Rectangle& rRect, BOOL bScrBar )
+void SvImpIconView::MakeVisible( const Rectangle& rRect, sal_Bool bScrBar )
{
Rectangle aRect( rRect );
ClipAtVirtOutRect( aRect );
@@ -2955,7 +2949,7 @@ void SvImpIconView::MakeVisible( const Rectangle& rRect, BOOL bScrBar )
pView->SetMapMode( aMapMode );
// in umgekehrte Richtung scrollen!
- pView->Control::Scroll( -nDx, -nDy, aOutputArea, TRUE );
+ pView->Control::Scroll( -nDx, -nDy, aOutputArea, sal_True );
if( aHorSBar.IsVisible() || aVerSBar.IsVisible() )
{
if( !bScrBar )
@@ -2979,15 +2973,15 @@ SvLBoxEntry* SvImpIconView::GetNewCursor()
SvLBoxEntry* pNewCursor;
if( pCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_False );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_True );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoUpDown( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_False );
if( !pNewCursor )
- pNewCursor = pImpCursor->GoUpDown( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_True );
}
}
}
@@ -2998,9 +2992,9 @@ SvLBoxEntry* SvImpIconView::GetNewCursor()
}
-USHORT SvImpIconView:: GetSelectionCount() const
+sal_uInt16 SvImpIconView:: GetSelectionCount() const
{
- USHORT nSelected = 0;
+ sal_uInt16 nSelected = 0;
SvLBoxEntry* pEntry = pModel->FirstChild( pCurParent);
while( pEntry )
{
@@ -3014,11 +3008,11 @@ USHORT SvImpIconView:: GetSelectionCount() const
void SvImpIconView::ToggleSelection( SvLBoxEntry* pEntry )
{
- BOOL bSel;
+ sal_Bool bSel;
if( pView->IsSelected( pEntry ) )
- bSel = FALSE;
+ bSel = sal_False;
else
- bSel = TRUE;
+ bSel = sal_True;
pView->Select( pEntry, bSel );
}
@@ -3029,7 +3023,7 @@ void SvImpIconView::DeselectAllBut( SvLBoxEntry* pThisEntryNot )
while( pEntry )
{
if( pEntry != pThisEntryNot && pView->IsSelected( pEntry ))
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = pModel->NextSibling( pEntry );
}
}
@@ -3059,14 +3053,14 @@ ImpIcnCursor::~ImpIcnCursor()
delete pGridMap;
}
-USHORT ImpIcnCursor::GetSortListPos( SvPtrarr* pList, long nValue,
+sal_uInt16 ImpIcnCursor::GetSortListPos( SvPtrarr* pList, long nValue,
int bVertical )
{
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( !nCount )
return 0;
- USHORT nCurPos = 0;
+ sal_uInt16 nCurPos = 0;
long nPrevValue = LONG_MIN;
while( nCount )
{
@@ -3078,7 +3072,7 @@ USHORT ImpIcnCursor::GetSortListPos( SvPtrarr* pList, long nValue,
else
nCurValue = rRect.Left();
if( nValue >= nPrevValue && nValue <= nCurValue )
- return (USHORT)nCurPos;
+ return (sal_uInt16)nCurPos;
nPrevValue = nCurValue;
nCount--;
nCurPos++;
@@ -3114,10 +3108,10 @@ void ImpIcnCursor::ImplCreate()
if( nX >= nCols )
nX = sal::static_int_cast< short >(nCols - 1);
- USHORT nIns = GetSortListPos( &pColumns[nX], rRect.Top(), TRUE );
+ sal_uInt16 nIns = GetSortListPos( &pColumns[nX], rRect.Top(), sal_True );
pColumns[ nX ].Insert( pEntry, nIns );
- nIns = GetSortListPos( &pRows[nY], rRect.Left(), FALSE );
+ nIns = GetSortListPos( &pRows[nY], rRect.Left(), sal_False );
pRows[ nY ].Insert( pEntry, nIns );
pViewData->nX = nX;
@@ -3161,7 +3155,7 @@ void ImpIcnCursor::CreateGridMap()
//XXX
//nGridRows += 50; // in fuenfziger-Schritten
- pGridMap = new BOOL[ nGridRows*nGridCols];
+ pGridMap = new sal_Bool[ nGridRows*nGridCols];
memset( (void*)pGridMap, 0, nGridRows*nGridCols );
SvLBoxTreeList* pModel = pView->pModel;
@@ -3180,49 +3174,49 @@ void ImpIcnCursor::CreateGridMap()
}
}
-BOOL ImpIcnCursor::GetGrid( const Point& rDocPos, USHORT& rGridX, USHORT& rGridY ) const
+sal_Bool ImpIcnCursor::GetGrid( const Point& rDocPos, sal_uInt16& rGridX, sal_uInt16& rGridY ) const
{
Point aPos( rDocPos );
aPos.X() -= LROFFS_WINBORDER;
aPos.Y() -= TBOFFS_WINBORDER;
- rGridX = (USHORT)(aPos.X() / nGridDX);
- rGridY = (USHORT)(aPos.Y() / nGridDY);
- BOOL bInGrid = TRUE;
+ rGridX = (sal_uInt16)(aPos.X() / nGridDX);
+ rGridY = (sal_uInt16)(aPos.Y() / nGridDY);
+ sal_Bool bInGrid = sal_True;
if( rGridX >= nGridCols )
{
- rGridX = sal::static_int_cast< USHORT >(nGridCols - 1);
- bInGrid = FALSE;
+ rGridX = sal::static_int_cast< sal_uInt16 >(nGridCols - 1);
+ bInGrid = sal_False;
}
if( rGridY >= nGridRows )
{
- rGridY = sal::static_int_cast< USHORT >(nGridRows - 1);
+ rGridY = sal::static_int_cast< sal_uInt16 >(nGridRows - 1);
if( !bInGrid )
- return FALSE; // beide Koordinaten nicht im Grid
+ return sal_False; // beide Koordinaten nicht im Grid
}
- return TRUE;
+ return sal_True;
}
-void ImpIcnCursor::SetGridUsed( const Rectangle& rRect, BOOL bUsed )
+void ImpIcnCursor::SetGridUsed( const Rectangle& rRect, sal_Bool bUsed )
{
CreateGridMap();
- USHORT nTLX, nTLY, nBRX, nBRY;
+ sal_uInt16 nTLX, nTLY, nBRX, nBRY;
- BOOL bTLInGrid = GetGrid( rRect.TopLeft(), nTLX, nTLY );
- BOOL bBRInGrid = GetGrid( rRect.BottomRight(), nBRX, nBRY );
+ sal_Bool bTLInGrid = GetGrid( rRect.TopLeft(), nTLX, nTLY );
+ sal_Bool bBRInGrid = GetGrid( rRect.BottomRight(), nBRX, nBRY );
if( !bTLInGrid && !bBRInGrid )
return;
- for( USHORT nCurY = nTLY; nCurY <= nBRY; nCurY++ )
+ for( sal_uInt16 nCurY = nTLY; nCurY <= nBRY; nCurY++ )
{
- for( USHORT nCurX = nTLX; nCurX <= nBRX; nCurX++ )
+ for( sal_uInt16 nCurX = nTLX; nCurX <= nBRX; nCurX++ )
{
SetGridUsed( nCurX, nCurY, bUsed );
}
}
}
-void ImpIcnCursor::Clear( BOOL bGridToo )
+void ImpIcnCursor::Clear( sal_Bool bGridToo )
{
if( pColumns )
{
@@ -3242,12 +3236,12 @@ void ImpIcnCursor::Clear( BOOL bGridToo )
}
}
-SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
- USHORT, BOOL bDown, BOOL bSimple )
+SvLBoxEntry* ImpIcnCursor::SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,
+ sal_uInt16, sal_Bool bDown, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchCol: No reference entry");
SvPtrarr* pList = &(pColumns[ nCol ]);
- USHORT nCount = pList->Count();
+ sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -3255,7 +3249,7 @@ SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Col-List");
if( bDown )
{
@@ -3288,19 +3282,19 @@ SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
if( nTop > nBottom )
{
- USHORT nTemp = nTop;
+ sal_uInt16 nTemp = nTop;
nTop = nBottom;
nBottom = nTemp;
}
long nMinDistance = LONG_MAX;
SvLBoxEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pEntry);
- USHORT nY = pViewData->nY;
+ sal_uInt16 nY = pViewData->nY;
if( nY >= nTop && nY <= nBottom )
{
const Rectangle& rRect = pView->GetBoundingRect( pEntry );
@@ -3318,12 +3312,12 @@ SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
return pResult;
}
-SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
- USHORT, BOOL bRight, BOOL bSimple )
+SvLBoxEntry* ImpIcnCursor::SearchRow(sal_uInt16 nRow,sal_uInt16 nLeft,sal_uInt16 nRight,
+ sal_uInt16, sal_Bool bRight, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchRow: No reference entry");
SvPtrarr* pList = &(pRows[ nRow ]);
- USHORT nCount = pList->Count();
+ sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -3331,7 +3325,7 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Row-List");
if( bRight )
{
@@ -3364,19 +3358,19 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
}
if( nRight < nLeft )
{
- USHORT nTemp = nRight;
+ sal_uInt16 nTemp = nRight;
nRight = nLeft;
nLeft = nTemp;
}
long nMinDistance = LONG_MAX;
SvLBoxEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pEntry);
- USHORT nX = pViewData->nX;
+ sal_uInt16 nX = pViewData->nX;
if( nX >= nLeft && nX <= nRight )
{
const Rectangle& rRect = pView->GetBoundingRect( pEntry );
@@ -3398,7 +3392,7 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
/*
Sucht ab dem uebergebenen Eintrag den naechsten rechts- bzw.
- linksstehenden. Suchverfahren am Beispiel bRight = TRUE:
+ linksstehenden. Suchverfahren am Beispiel bRight = sal_True:
c
b c
@@ -3413,22 +3407,22 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
a,b,c : 2., 3., 4. Suchrechteck
*/
-SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, BOOL bRight )
+SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, sal_Bool bRight )
{
SvLBoxEntry* pResult;
pCurEntry = pIcnEntry;
Create();
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pIcnEntry);
- USHORT nY = pViewData->nY;
- USHORT nX = pViewData->nX;
+ sal_uInt16 nY = pViewData->nY;
+ sal_uInt16 nX = pViewData->nX;
DBG_ASSERT(nY< nRows,"GoLeftRight:Bad column");
DBG_ASSERT(nX< nCols,"GoLeftRight:Bad row");
// Nachbar auf gleicher Zeile ?
if( bRight )
pResult = SearchRow(
- nY, nX, sal::static_int_cast< USHORT >(nCols-1), nX, TRUE, TRUE );
+ nY, nX, sal::static_int_cast< sal_uInt16 >(nCols-1), nX, sal_True, sal_True );
else
- pResult = SearchRow( nY, nX ,0, nX, FALSE, TRUE );
+ pResult = SearchRow( nY, nX ,0, nX, sal_False, sal_True );
if( pResult )
return pResult;
@@ -3446,11 +3440,11 @@ SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, BOOL bRight )
nLastCol = -1; // 0-1
}
- USHORT nRowMin = nY;
- USHORT nRowMax = nY;
+ sal_uInt16 nRowMin = nY;
+ sal_uInt16 nRowMax = nY;
do
{
- SvLBoxEntry* pEntry = SearchCol((USHORT)nCurCol,nRowMin,nRowMax,nY,TRUE, FALSE);
+ SvLBoxEntry* pEntry = SearchCol((sal_uInt16)nCurCol,nRowMin,nRowMax,nY,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nRowMin )
@@ -3462,23 +3456,23 @@ SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, BOOL bRight )
return 0;
}
-SvLBoxEntry* ImpIcnCursor::GoUpDown( SvLBoxEntry* pIcnEntry, BOOL bDown)
+SvLBoxEntry* ImpIcnCursor::GoUpDown( SvLBoxEntry* pIcnEntry, sal_Bool bDown)
{
SvLBoxEntry* pResult;
pCurEntry = pIcnEntry;
Create();
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pIcnEntry);
- USHORT nY = pViewData->nY;
- USHORT nX = pViewData->nX;
+ sal_uInt16 nY = pViewData->nY;
+ sal_uInt16 nX = pViewData->nX;
DBG_ASSERT(nY<nRows,"GoUpDown:Bad column");
DBG_ASSERT(nX<nCols,"GoUpDown:Bad row");
// Nachbar in gleicher Spalte ?
if( bDown )
pResult = SearchCol(
- nX, nY, sal::static_int_cast< USHORT >(nRows-1), nY, TRUE, TRUE );
+ nX, nY, sal::static_int_cast< sal_uInt16 >(nRows-1), nY, sal_True, sal_True );
else
- pResult = SearchCol( nX, nY ,0, nY, FALSE, TRUE );
+ pResult = SearchCol( nX, nY ,0, nY, sal_False, sal_True );
if( pResult )
return pResult;
@@ -3496,11 +3490,11 @@ SvLBoxEntry* ImpIcnCursor::GoUpDown( SvLBoxEntry* pIcnEntry, BOOL bDown)
nLastRow = -1; // 0-1
}
- USHORT nColMin = nX;
- USHORT nColMax = nX;
+ sal_uInt16 nColMin = nX;
+ sal_uInt16 nColMax = nX;
do
{
- SvLBoxEntry* pEntry = SearchRow((USHORT)nCurRow,nColMin,nColMax,nX,TRUE, FALSE);
+ SvLBoxEntry* pEntry = SearchRow((sal_uInt16)nCurRow,nColMin,nColMax,nX,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nColMin )
@@ -3548,26 +3542,26 @@ void ImpIcnCursor::SetDeltas()
}
}
-BOOL ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
+sal_Bool ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
{
CreateGridMap();
- USHORT nCount = (USHORT)(nGridCols * nGridRows);
+ sal_uInt16 nCount = (sal_uInt16)(nGridCols * nGridRows);
if( !nCount )
- return FALSE;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ return sal_False;
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
if( !pGridMap[ nCur ] )
{
- USHORT nCol = (USHORT)(nCur % nGridCols);
- USHORT nRow = (USHORT)(nCur / nGridCols);
+ sal_uInt16 nCol = (sal_uInt16)(nCur % nGridCols);
+ sal_uInt16 nRow = (sal_uInt16)(nCur / nGridCols);
rRect.Top() = nRow * nGridDY + TBOFFS_WINBORDER;
rRect.Bottom() = rRect.Top() + nGridDY;
rRect.Left() = nCol * nGridDX+ LROFFS_WINBORDER;
rRect.Right() = rRect.Left() + nGridDX;
- SetGridUsed( nCol, nRow, TRUE );
+ SetGridUsed( nCol, nRow, sal_True );
DBG_ASSERT(pGridMap[nCur],"SetGridUsed failed");
- return TRUE;
+ return sal_True;
}
}
// Gridmap ist voll: Um eine Zeile erweitern
@@ -3575,19 +3569,19 @@ BOOL ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
rRect.Bottom() = rRect.Top() + nGridDY;
rRect.Left() = LROFFS_WINBORDER;
rRect.Right() = rRect.Left() + nGridDX;
- return FALSE;
+ return sal_False;
}
void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry)
{
if( !pRefEntry )
{
- USHORT nAdjustRows = (USHORT)(pView->aVirtOutputSize.Height() / pView->nGridDY);
+ sal_uInt16 nAdjustRows = (sal_uInt16)(pView->aVirtOutputSize.Height() / pView->nGridDY);
nAdjustRows++; // wg. Abrundung!
if( !nAdjustRows )
return;
- for( USHORT nCurList = 0; nCurList < nAdjustRows; nCurList++ )
+ for( sal_uInt16 nCurList = 0; nCurList < nAdjustRows; nCurList++ )
{
SvPtrarr* pRow = new SvPtrarr;
rLists.Insert( (void*)pRow, nCurList );
@@ -3597,7 +3591,7 @@ void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry
{
const Rectangle& rRect = pView->GetBoundingRect( pEntry );
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
- USHORT nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),FALSE);
+ sal_uInt16 nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),sal_False);
((SvPtrarr*)rLists[ nY ])->Insert( pEntry, nIns );
pEntry = pView->pModel->NextSibling( pEntry );
}
@@ -3621,7 +3615,7 @@ void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
if( nY == nRefRow )
{
- USHORT nIns = GetSortListPos( pRow, rRect.Left(), FALSE );
+ sal_uInt16 nIns = GetSortListPos( pRow, rRect.Left(), sal_False );
pRow->Insert( pEntry, nIns );
}
pEntry = pView->pModel->NextSibling( pEntry );
@@ -3632,8 +3626,8 @@ void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry
//static
void ImpIcnCursor::DestroyGridAdjustData( SvPtrarr& rLists )
{
- USHORT nCount = rLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = rLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvPtrarr* pArr = (SvPtrarr*)rLists[ nCur ];
delete pArr;
@@ -3690,7 +3684,7 @@ void SvImpIconView::Center( SvLBoxEntry* pEntry,
// Die Deltas entsprechen Offsets, um die die View auf dem Doc verschoben wird
// links, hoch: Offsets < 0
// rechts, runter: Offsets > 0
-void SvImpIconView::Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar )
+void SvImpIconView::Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar )
{
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
@@ -3728,7 +3722,7 @@ Rectangle SvImpIconView::CalcFocusRect( SvLBoxEntry* pEntry )
}
-void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
+void SvImpIconView::SelectRect( const Rectangle& rRect, sal_Bool bAdd,
SvPtrarr* pOtherRects, short nBorderOffs )
{
if( !pZOrderList || !pZOrderList->Count() )
@@ -3736,7 +3730,7 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
CheckBoundingRects();
pView->Update();
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
Rectangle aRect( rRect );
aRect.Justify();
@@ -3747,9 +3741,9 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
aRect.Top() -= nBorderOffs;
aRect.Bottom() += nBorderOffs;
}
- BOOL bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? TRUE : FALSE;
+ sal_Bool bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? sal_True : sal_False;
- for( USHORT nPos = 0; nPos < nCount; nPos++ )
+ for( sal_uInt16 nPos = 0; nPos < nCount; nPos++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pZOrderList->GetObject(nPos ));
@@ -3758,28 +3752,28 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
if( !IsBoundingRectValid( pViewData->aRect ))
FindBoundingRect( pEntry, pViewData );
const Rectangle& rBoundRect = pViewData->aRect;
- BOOL bSelected = pViewData->IsSelected();
+ sal_Bool bSelected = pViewData->IsSelected();
- BOOL bOverlaps;
+ sal_Bool bOverlaps;
if( bCalcOverlap )
bOverlaps = IsOver( pOtherRects, rBoundRect );
else
- bOverlaps = FALSE;
- BOOL bOver = aRect.IsOver( rBoundRect );
+ bOverlaps = sal_False;
+ sal_Bool bOver = aRect.IsOver( rBoundRect );
if( bOver && !bOverlaps )
{
// Ist im neuen Selektionsrechteck und in keinem alten
// => selektieren
if( !bSelected )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
else if( !bAdd )
{
// ist ausserhalb des Selektionsrechtecks
// => Selektion entfernen
if( bSelected )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
}
else if( bAdd && bOverlaps )
{
@@ -3799,34 +3793,34 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
{
// Schnittmenge zwischen alten Rects & aktuellem Rect desel.
if( bSelected )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
}
else
{
// Eintrag eines alten Rects selektieren
if( !bSelected )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
}
else if( !bOver && bSelected )
{
// Der Eintrag liegt voellig ausserhalb und wird deshalb desel.
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
}
}
pView->Update();
}
-BOOL SvImpIconView::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
+sal_Bool SvImpIconView::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
{
- USHORT nCount = pRectList->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = pRectList->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)pRectList->GetObject( nCur );
if( rBoundRect.IsOver( *pRect ))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SvImpIconView::AddSelectedRect( const Rectangle& rRect, short nBorderOffs )
@@ -3845,8 +3839,8 @@ void SvImpIconView::AddSelectedRect( const Rectangle& rRect, short nBorderOffs )
void SvImpIconView::ClearSelectedRectList()
{
- USHORT nCount = aSelectedRectList.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = aSelectedRectList.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)aSelectedRectList.GetObject( nCur );
delete pRect;
@@ -3884,7 +3878,7 @@ void SvImpIconView::ImpDrawXORRect( const Rectangle& rRect )
}
void SvImpIconView::CalcScrollOffsets( const Point& rPosPixel,
- long& rX, long& rY, BOOL bInDragDrop, USHORT nBorderWidth)
+ long& rX, long& rY, sal_Bool bInDragDrop, sal_uInt16 nBorderWidth)
{
// Scrolling der View, falls sich der Mauszeiger im Grenzbereich des
// Fensters befindet
@@ -3892,8 +3886,8 @@ void SvImpIconView::CalcScrollOffsets( const Point& rPosPixel,
long nPixelToScrollY = 0;
Size aWndSize = aOutputSize;
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
if ( rPosPixel.X() < nBorderWidth )
{
@@ -3945,16 +3939,16 @@ void SvImpIconView::EndTracking()
}
}
-BOOL SvImpIconView::IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos )
+sal_Bool SvImpIconView::IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos )
{
SvLBoxString* pItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
if( pItem )
{
Rectangle aRect( CalcTextRect( pEntry, pItem ));
if( aRect.IsInside( rDocPos ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
IMPL_LINK(SvImpIconView, EditTimeoutHdl, Timer*, EMPTYARG )
@@ -3979,8 +3973,8 @@ void SvImpIconView::AdjustAtGrid( SvLBoxEntry* pStart )
{
SvPtrarr aLists;
pImpCursor->CreateGridAjustData( aLists, pStart );
- USHORT nCount = aLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = aLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
AdjustAtGrid( *(SvPtrarr*)aLists[ nCur ], pStart );
}
@@ -3994,18 +3988,18 @@ void SvImpIconView::AdjustAtGrid( const SvPtrarr& rRow, SvLBoxEntry* pStart )
if( !rRow.Count() )
return;
- BOOL bGo;
+ sal_Bool bGo;
if( !pStart )
- bGo = TRUE;
+ bGo = sal_True;
else
- bGo = FALSE;
+ bGo = sal_False;
long nCurRight = 0;
- for( USHORT nCur = 0; nCur < rRow.Count(); nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < rRow.Count(); nCur++ )
{
SvLBoxEntry* pCur = (SvLBoxEntry*)rRow[ nCur ];
if( !bGo && pCur == pStart )
- bGo = TRUE;
+ bGo = sal_True;
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pCur);
// Massgebend (fuer das menschliche Auge) ist die Bitmap, da sonst
diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx
index 3fa940603aa4..a8b1a62bb4e6 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -43,20 +43,20 @@
struct SvLBoxButtonData_Impl
{
SvLBoxEntry* pEntry;
- BOOL bDefaultImages;
- BOOL bShowRadioButton;
+ sal_Bool bDefaultImages;
+ sal_Bool bShowRadioButton;
- SvLBoxButtonData_Impl() : pEntry( NULL ), bDefaultImages( FALSE ), bShowRadioButton( FALSE ) {}
+ SvLBoxButtonData_Impl() : pEntry( NULL ), bDefaultImages( sal_False ), bShowRadioButton( sal_False ) {}
};
DBG_NAME(SvLBoxButtonData)
-void SvLBoxButtonData::InitData( BOOL bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl )
+void SvLBoxButtonData::InitData( sal_Bool bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl )
{
pImpl = new SvLBoxButtonData_Impl;
- bDataOk = FALSE;
+ bDataOk = sal_False;
eState = SV_BUTTON_UNCHECKED;
pImpl->bDefaultImages = bImagesFromDefault;
pImpl->bShowRadioButton = ( _bRadioBtn != false );
@@ -69,21 +69,21 @@ SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings )
{
DBG_CTOR(SvLBoxButtonData,0);
- InitData( TRUE, false, pControlForSettings );
+ InitData( sal_True, false, pControlForSettings );
}
SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings, bool _bRadioBtn )
{
DBG_CTOR(SvLBoxButtonData,0);
- InitData( TRUE, _bRadioBtn, pControlForSettings );
+ InitData( sal_True, _bRadioBtn, pControlForSettings );
}
SvLBoxButtonData::SvLBoxButtonData()
{
DBG_CTOR(SvLBoxButtonData,0);
- InitData( FALSE, false );
+ InitData( sal_False, false );
}
SvLBoxButtonData::~SvLBoxButtonData()
@@ -102,11 +102,11 @@ void SvLBoxButtonData::CallLink()
aLink.Call( this );
}
-USHORT SvLBoxButtonData::GetIndex( USHORT nItemState )
+sal_uInt16 SvLBoxButtonData::GetIndex( sal_uInt16 nItemState )
{
DBG_CHKTHIS(SvLBoxButtonData,0);
nItemState &= 0x000F;
- USHORT nIdx;
+ sal_uInt16 nIdx;
switch( nItemState )
{
case SV_ITEMSTATE_UNCHECKED:
@@ -133,18 +133,18 @@ void SvLBoxButtonData::SetWidthAndHeight()
Size aSize = aBmps[0].GetSizePixel();
nWidth = aSize.Width();
nHeight = aSize.Height();
- bDataOk = TRUE;
+ bDataOk = sal_True;
}
-void SvLBoxButtonData::StoreButtonState( SvLBoxEntry* pActEntry, USHORT nItemFlags )
+void SvLBoxButtonData::StoreButtonState( SvLBoxEntry* pActEntry, sal_uInt16 nItemFlags )
{
DBG_CHKTHIS(SvLBoxButtonData,0);
pImpl->pEntry = pActEntry;
eState = ConvertToButtonState( nItemFlags );
}
-SvButtonState SvLBoxButtonData::ConvertToButtonState( USHORT nItemFlags ) const
+SvButtonState SvLBoxButtonData::ConvertToButtonState( sal_uInt16 nItemFlags ) const
{
DBG_CHKTHIS(SvLBoxButtonData,0);
nItemFlags &= (SV_ITEMSTATE_UNCHECKED |
@@ -195,12 +195,12 @@ void SvLBoxButtonData::SetDefaultImages( const Control* pCtrl )
}
}
-BOOL SvLBoxButtonData::HasDefaultImages( void ) const
+sal_Bool SvLBoxButtonData::HasDefaultImages( void ) const
{
return pImpl->bDefaultImages;
}
-BOOL SvLBoxButtonData::IsRadio() {
+sal_Bool SvLBoxButtonData::IsRadio() {
return pImpl->bShowRadioButton;
}
@@ -210,7 +210,7 @@ BOOL SvLBoxButtonData::IsRadio() {
DBG_NAME(SvLBoxString);
-SvLBoxString::SvLBoxString( SvLBoxEntry* pEntry,USHORT nFlags,const XubString& rStr) :
+SvLBoxString::SvLBoxString( SvLBoxEntry* pEntry,sal_uInt16 nFlags,const XubString& rStr) :
SvLBoxItem( pEntry, nFlags )
{
DBG_CTOR(SvLBoxString,0);
@@ -227,19 +227,19 @@ SvLBoxString::~SvLBoxString()
DBG_DTOR(SvLBoxString,0);
}
-USHORT SvLBoxString::IsA()
+sal_uInt16 SvLBoxString::IsA()
{
DBG_CHKTHIS(SvLBoxString,0);
return SV_ITEM_ID_LBOXSTRING;
}
-void SvLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
+void SvLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */,
SvLBoxEntry* _pEntry)
{
DBG_CHKTHIS(SvLBoxString,0);
if ( _pEntry )
{
- USHORT nStyle = rDev.IsEnabled() ? 0 : TEXT_DRAW_DISABLE;
+ sal_uInt16 nStyle = rDev.IsEnabled() ? 0 : TEXT_DRAW_DISABLE;
if ( rDev.IsEntryMnemonicsEnabled() )
nStyle |= TEXT_DRAW_MNEMONIC;
rDev.DrawText( Rectangle(rPos,GetSize(&rDev,_pEntry)),aStr,nStyle);
@@ -282,7 +282,7 @@ void SvLBoxString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
DBG_NAME(SvLBoxBmp);
-SvLBoxBmp::SvLBoxBmp( SvLBoxEntry* pEntry, USHORT nFlags, Image aBitmap ) :
+SvLBoxBmp::SvLBoxBmp( SvLBoxEntry* pEntry, sal_uInt16 nFlags, Image aBitmap ) :
SvLBoxItem( pEntry, nFlags )
{
DBG_CTOR(SvLBoxBmp,0);
@@ -299,7 +299,7 @@ SvLBoxBmp::~SvLBoxBmp()
DBG_DTOR(SvLBoxBmp,0);
}
-USHORT SvLBoxBmp::IsA()
+sal_uInt16 SvLBoxBmp::IsA()
{
DBG_CHKTHIS(SvLBoxBmp,0);
return SV_ITEM_ID_LBOXBMP;
@@ -320,11 +320,11 @@ void SvLBoxBmp::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
pViewData->aSize = aBmp.GetSizePixel();
}
-void SvLBoxBmp::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
+void SvLBoxBmp::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */,
SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBoxBmp,0);
- USHORT nStyle = rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
+ sal_uInt16 nStyle = rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
rDev.DrawImage( rPos, aBmp ,nStyle);
}
@@ -347,7 +347,7 @@ void SvLBoxBmp::Clone( SvLBoxItem* pSource )
DBG_NAME(SvLBoxButton);
SvLBoxButton::SvLBoxButton( SvLBoxEntry* pEntry, SvLBoxButtonKind eTheKind,
- USHORT nFlags, SvLBoxButtonData* pBData )
+ sal_uInt16 nFlags, SvLBoxButtonData* pBData )
: SvLBoxItem( pEntry, nFlags )
{
DBG_CTOR(SvLBoxButton,0);
@@ -371,13 +371,13 @@ SvLBoxButton::~SvLBoxButton()
DBG_DTOR(SvLBoxButton,0);
}
-USHORT SvLBoxButton::IsA()
+sal_uInt16 SvLBoxButton::IsA()
{
DBG_CHKTHIS(SvLBoxButton,0);
return SV_ITEM_ID_LBOXBUTTON;
}
-void SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, BOOL bOn)
+void SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, sal_Bool bOn)
{
DBG_CHKTHIS(SvLBoxButton,0);
if ( bOn != IsStateChecked() )
@@ -389,7 +389,7 @@ void SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, BOOL bOn)
}
}
-BOOL SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry )
+sal_Bool SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry )
{
DBG_CHKTHIS(SvLBoxButton,0);
if ( CheckModification() )
@@ -401,30 +401,30 @@ BOOL SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry )
pData->StoreButtonState( pEntry, nItemFlags );
pData->CallLink();
}
- return FALSE;
+ return sal_False;
}
-void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
- SvLBoxEntry* )
+void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */,
+ SvLBoxEntry* /*pEntry*/ )
{
DBG_CHKTHIS(SvLBoxButton,0);
- USHORT nIndex = eKind == SvLBoxButtonKind_staticImage
+ sal_uInt16 nIndex = eKind == SvLBoxButtonKind_staticImage
? SV_BMP_STATICIMAGE : pData->GetIndex( nItemFlags );
- USHORT nStyle = eKind != SvLBoxButtonKind_disabledCheckbox &&
+ sal_uInt16 nStyle = eKind != SvLBoxButtonKind_disabledCheckbox &&
rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
///
//Native drawing
///
- BOOL bNativeOK = FALSE;
- Window *pWin = NULL;
- if( rDev.GetOutDevType() == OUTDEV_WINDOW )
- pWin = (Window*) &rDev;
+ sal_Bool bNativeOK = sal_False;
+ ControlType eCtrlType = (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX;
+ if ( nIndex != SV_BMP_STATICIMAGE && rDev.IsNativeControlSupported( eCtrlType, PART_ENTIRE_CONTROL) )
- if ( nIndex != SV_BMP_STATICIMAGE && pWin && pWin->IsNativeControlSupported( (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX, PART_ENTIRE_CONTROL) )
{
+ Size aSize(pData->Width(), pData->Height());
+ ImplAdjustBoxSize( aSize, eCtrlType, &rDev );
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( rPos, Size(pData->Width(), pData->Height()) );
+ Rectangle aCtrlRegion( rPos, aSize );
ControlState nState = 0;
//states CTRL_STATE_DEFAULT, CTRL_STATE_PRESSED and CTRL_STATE_ROLLOVER are not implemented
@@ -438,8 +438,8 @@ void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
else if ( IsStateTristate() )
aControlValue.setTristateVal( BUTTONVALUE_MIXED );
- bNativeOK = pWin->DrawNativeControl( (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX, PART_ENTIRE_CONTROL,
- aCtrlRegion, nState, aControlValue, rtl::OUString() );
+ bNativeOK = rDev.DrawNativeControl( eCtrlType, PART_ENTIRE_CONTROL,
+ aCtrlRegion, nState, aControlValue, rtl::OUString() );
}
if( !bNativeOK)
@@ -458,13 +458,47 @@ void SvLBoxButton::Clone( SvLBoxItem* pSource )
pData = ((SvLBoxButton*)pSource)->pData;
}
+void SvLBoxButton::ImplAdjustBoxSize( Size& io_rSize, ControlType i_eType, Window* i_pParent )
+{
+ if ( i_pParent->IsNativeControlSupported( i_eType, PART_ENTIRE_CONTROL) )
+ {
+ ImplControlValue aControlValue;
+ Rectangle aCtrlRegion( Point( 0, 0 ), io_rSize );
+ ControlState nState = CTRL_STATE_ENABLED;
+
+ aControlValue.setTristateVal( BUTTONVALUE_ON );
+
+ Rectangle aNativeBounds, aNativeContent;
+ bool bNativeOK = i_pParent->GetNativeControlRegion( i_eType,
+ PART_ENTIRE_CONTROL,
+ aCtrlRegion,
+ nState,
+ aControlValue,
+ rtl::OUString(),
+ aNativeBounds,
+ aNativeContent );
+ if( bNativeOK )
+ {
+ Size aContentSize( aNativeContent.GetSize() );
+ // leave a little space around the box image (looks better
+ if( aContentSize.Height() + 2 > io_rSize.Height() )
+ io_rSize.Height() = aContentSize.Height() + 2;
+ }
+ }
+}
+
void SvLBoxButton::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
SvViewDataItem* pViewData )
{
DBG_CHKTHIS(SvLBoxButton,0);
if( !pViewData )
pViewData = pView->GetViewDataItem( pEntry, this );
- pViewData->aSize = Size( pData->Width(), pData->Height() );
+ Size aSize( pData->Width(), pData->Height() );
+
+ ControlType eCtrlType = (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX;
+ if ( eKind != SvLBoxButtonKind_staticImage && pView )
+ ImplAdjustBoxSize( aSize, eCtrlType, pView );
+ pViewData->aSize = aSize;
}
bool SvLBoxButton::CheckModification() const
@@ -483,14 +517,14 @@ struct SvLBoxContextBmp_Impl
Image m_aImage1;
Image m_aImage2;
- USHORT m_nB2IndicatorFlags;
+ sal_uInt16 m_nB2IndicatorFlags;
};
// ***************************************************************
DBG_NAME(SvLBoxContextBmp)
-SvLBoxContextBmp::SvLBoxContextBmp( SvLBoxEntry* pEntry, USHORT nItemFlags,
- Image aBmp1, Image aBmp2, USHORT nEntryFlags )
+SvLBoxContextBmp::SvLBoxContextBmp( SvLBoxEntry* pEntry, sal_uInt16 nItemFlags,
+ Image aBmp1, Image aBmp2, sal_uInt16 nEntryFlags )
:SvLBoxItem( pEntry, nItemFlags )
,m_pImpl( new SvLBoxContextBmp_Impl )
{
@@ -514,13 +548,13 @@ SvLBoxContextBmp::~SvLBoxContextBmp()
DBG_DTOR(SvLBoxContextBmp,0);
}
-USHORT SvLBoxContextBmp::IsA()
+sal_uInt16 SvLBoxContextBmp::IsA()
{
DBG_CHKTHIS(SvLBoxContextBmp,0);
return SV_ITEM_ID_LBOXCONTEXTBMP;
}
-BOOL SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2 )
+sal_Bool SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2 )
{
DBG_CHKTHIS(SvLBoxContextBmp,0);
@@ -548,7 +582,7 @@ void SvLBoxContextBmp::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
}
void SvLBoxContextBmp::Paint( const Point& _rPos, SvLBox& _rDev,
- USHORT _nViewDataEntryFlags, SvLBoxEntry* _pEntry )
+ sal_uInt16 _nViewDataEntryFlags, SvLBoxEntry* _pEntry )
{
DBG_CHKTHIS(SvLBoxContextBmp,0);
@@ -557,7 +591,7 @@ void SvLBoxContextBmp::Paint( const Point& _rPos, SvLBox& _rDev,
sal_Bool _bSemiTransparent = _pEntry && ( 0 != ( SV_ENTRYFLAG_SEMITRANSPARENT & _pEntry->GetFlags( ) ) );
// draw
- USHORT nStyle = _rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
+ sal_uInt16 nStyle = _rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
if ( _bSemiTransparent )
nStyle |= IMAGE_DRAW_SEMITRANSPARENT;
_rDev.DrawImage( _rPos, rImage, nStyle);
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index 67b20b3108c5..94e26128bb22 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -32,7 +32,7 @@
/*
Todo:
- Anker loeschen in SelectionEngine bei manuellem Selektieren
- - SelectAll( FALSE ), nur die deselektierten Entries repainten
+ - SelectAll( sal_False ), nur die deselektierten Entries repainten
*/
#include <string.h>
@@ -76,14 +76,14 @@ SvInplaceEdit::SvInplaceEdit
Edit( pParent, WB_LEFT ),
aCallBackHdl ( rNotifyEditEnd ),
- bCanceled ( FALSE ),
- bAlreadyInCallBack ( FALSE )
+ bCanceled ( sal_False ),
+ bAlreadyInCallBack ( sal_False )
{
DBG_CTOR(SvInplaceEdit,0);
Font aFont( pParent->GetFont() );
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
Color aColor( pParent->GetBackground().GetColor() );
aFont.SetFillColor(aColor );
SetFont( aFont );
@@ -119,7 +119,7 @@ SvInplaceEdit::~SvInplaceEdit()
IMPL_LINK_INLINE_START( SvInplaceEdit, ReturnHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit,0);
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
return 1;
}
@@ -128,7 +128,7 @@ IMPL_LINK_INLINE_END( SvInplaceEdit, ReturnHdl_Impl, Accelerator *, EMPTYARG )
IMPL_LINK_INLINE_START( SvInplaceEdit, EscapeHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit,0);
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
return 1;
}
@@ -137,16 +137,16 @@ IMPL_LINK_INLINE_END( SvInplaceEdit, EscapeHdl_Impl, Accelerator *, EMPTYARG )
void SvInplaceEdit::KeyInput( const KeyEvent& rKEvt )
{
DBG_CHKTHIS(SvInplaceEdit,0);
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch ( nCode )
{
case KEY_ESCAPE:
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
break;
case KEY_RETURN:
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
break;
@@ -155,7 +155,7 @@ void SvInplaceEdit::KeyInput( const KeyEvent& rKEvt )
}
}
-void SvInplaceEdit::StopEditing( BOOL bCancel )
+void SvInplaceEdit::StopEditing( sal_Bool bCancel )
{
DBG_CHKTHIS(SvInplaceEdit,0);
if ( !bAlreadyInCallBack )
@@ -170,7 +170,7 @@ void SvInplaceEdit::LoseFocus()
DBG_CHKTHIS(SvInplaceEdit,0);
if ( !bAlreadyInCallBack )
{
- bCanceled = FALSE;
+ bCanceled = sal_False;
aTimer.SetTimeout(10);
aTimer.SetTimeoutHdl(LINK(this,SvInplaceEdit,Timeout_Impl));
aTimer.Start();
@@ -191,12 +191,12 @@ void SvInplaceEdit::CallCallBackHdl_Impl()
aTimer.Stop();
if ( !bAlreadyInCallBack )
{
- bAlreadyInCallBack = TRUE;
+ bAlreadyInCallBack = sal_True;
GetpApp()->RemoveAccel( &aAccReturn );
GetpApp()->RemoveAccel( &aAccEscape );
Hide();
aCallBackHdl.Call( this );
- // bAlreadyInCallBack = FALSE;
+ // bAlreadyInCallBack = sal_False;
}
}
@@ -267,12 +267,12 @@ SvInplaceEdit2::SvInplaceEdit2
const String& rData,
const Link& rNotifyEditEnd,
const Selection& rSelection,
- BOOL bMulti
+ sal_Bool bMulti
) :
aCallBackHdl ( rNotifyEditEnd ),
- bCanceled ( FALSE ),
- bAlreadyInCallBack ( FALSE ),
+ bCanceled ( sal_False ),
+ bAlreadyInCallBack ( sal_False ),
bMultiLine ( bMulti )
{
@@ -284,7 +284,7 @@ SvInplaceEdit2::SvInplaceEdit2
pEdit = new MyEdit_Impl( pParent, this );
Font aFont( pParent->GetFont() );
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
Color aColor( pParent->GetBackground().GetColor() );
aFont.SetFillColor(aColor );
pEdit->SetFont( aFont );
@@ -332,7 +332,7 @@ void SvInplaceEdit2::Hide()
IMPL_LINK_INLINE_START( SvInplaceEdit2, ReturnHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
return 1;
}
@@ -341,35 +341,35 @@ IMPL_LINK_INLINE_END( SvInplaceEdit2, ReturnHdl_Impl, Accelerator *, EMPTYARG )
IMPL_LINK_INLINE_START( SvInplaceEdit2, EscapeHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
return 1;
}
IMPL_LINK_INLINE_END( SvInplaceEdit2, EscapeHdl_Impl, Accelerator *, EMPTYARG )
-BOOL SvInplaceEdit2::KeyInput( const KeyEvent& rKEvt )
+sal_Bool SvInplaceEdit2::KeyInput( const KeyEvent& rKEvt )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
KeyCode aCode = rKEvt.GetKeyCode();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
{
case KEY_ESCAPE:
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
- return TRUE;
+ return sal_True;
case KEY_RETURN:
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-void SvInplaceEdit2::StopEditing( BOOL bCancel )
+void SvInplaceEdit2::StopEditing( sal_Bool bCancel )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
if ( !bAlreadyInCallBack )
@@ -386,7 +386,7 @@ void SvInplaceEdit2::LoseFocus()
&& ((!Application::GetFocusWindow()) || !pEdit->IsChild( Application::GetFocusWindow()) )
)
{
- bCanceled = FALSE;
+ bCanceled = sal_False;
aTimer.SetTimeout(10);
aTimer.SetTimeoutHdl(LINK(this,SvInplaceEdit2,Timeout_Impl));
aTimer.Start();
@@ -407,7 +407,7 @@ void SvInplaceEdit2::CallCallBackHdl_Impl()
aTimer.Stop();
if ( !bAlreadyInCallBack )
{
- bAlreadyInCallBack = TRUE;
+ bAlreadyInCallBack = sal_True;
GetpApp()->RemoveAccel( &aAccReturn );
GetpApp()->RemoveAccel( &aAccEscape );
pEdit->Hide();
@@ -434,7 +434,7 @@ SvLBoxTab::SvLBoxTab()
nFlags = 0;
}
-SvLBoxTab::SvLBoxTab( long nPosition, USHORT nTabFlags )
+SvLBoxTab::SvLBoxTab( long nPosition, sal_uInt16 nTabFlags )
{
DBG_CTOR(SvLBoxTab,0);
nPos = nPosition;
@@ -493,7 +493,7 @@ long SvLBoxTab::CalcOffset( const String& rStr, const OutputDevice& rOutDev )
long nWidth;
if ( nFlags & SV_LBOXTAB_ADJUST_NUMERIC )
{
- USHORT nPos = rStr.Search( '.' );
+ sal_uInt16 nPos = rStr.Search( '.' );
if ( nPos == STRING_NOTFOUND )
nPos = rStr.Search( ',' );
if ( nPos == STRING_NOTFOUND )
@@ -517,7 +517,7 @@ long SvLBoxTab::CalcOffset( const String& rStr, const OutputDevice& rOutDev )
DBG_NAME(SvLBoxItem);
-SvLBoxItem::SvLBoxItem( SvLBoxEntry*, USHORT )
+SvLBoxItem::SvLBoxItem( SvLBoxEntry*, sal_uInt16 )
{
DBG_CTOR(SvLBoxItem,0);
}
@@ -542,7 +542,7 @@ const Size& SvLBoxItem::GetSize( SvLBox* pView,SvLBoxEntry* pEntry )
const Size& SvLBoxItem::GetSize( SvLBoxEntry* pEntry, SvViewDataEntry* pViewData)
{
DBG_CHKTHIS(SvLBoxItem,0);
- USHORT nItemPos = pEntry->GetPos( this );
+ sal_uInt16 nItemPos = pEntry->GetPos( this );
SvViewDataItem* pItemData = pViewData->pItemData+nItemPos;
return pItemData->aSize;
}
@@ -583,7 +583,7 @@ SvLBoxEntry::~SvLBoxEntry()
void SvLBoxEntry::DeleteItems_Impl()
{
DBG_CHKTHIS(SvLBoxEntry,0);
- USHORT nCount = aItems.Count();
+ sal_uInt16 nCount = aItems.Count();
while( nCount )
{
nCount--;
@@ -606,8 +606,8 @@ void SvLBoxEntry::Clone( SvListEntry* pSource )
SvListEntry::Clone( pSource );
SvLBoxItem* pNewItem;
DeleteItems_Impl();
- USHORT nCount = ((SvLBoxEntry*)pSource)->ItemCount();
- USHORT nCurPos = 0;
+ sal_uInt16 nCount = ((SvLBoxEntry*)pSource)->ItemCount();
+ sal_uInt16 nCurPos = 0;
while( nCurPos < nCount )
{
SvLBoxItem* pItem = ((SvLBoxEntry*)pSource)->GetItem( nCurPos );
@@ -620,7 +620,7 @@ void SvLBoxEntry::Clone( SvListEntry* pSource )
nEntryFlags = ((SvLBoxEntry*)pSource)->nEntryFlags;
}
-void SvLBoxEntry::EnableChildsOnDemand( BOOL bEnable )
+void SvLBoxEntry::EnableChildsOnDemand( sal_Bool bEnable )
{
DBG_CHKTHIS(SvLBoxEntry,0);
if ( bEnable )
@@ -629,7 +629,7 @@ void SvLBoxEntry::EnableChildsOnDemand( BOOL bEnable )
nEntryFlags &= (~SV_ENTRYFLAG_CHILDS_ON_DEMAND);
}
-void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, USHORT nPos )
+void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos )
{
DBG_CHKTHIS(SvLBoxEntry,0);
DBG_ASSERT(pNewItem,"ReplaceItem:No Item");
@@ -642,10 +642,10 @@ void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, USHORT nPos )
}
}
-SvLBoxItem* SvLBoxEntry::GetFirstItem( USHORT nId )
+SvLBoxItem* SvLBoxEntry::GetFirstItem( sal_uInt16 nId )
{
- USHORT nCount = aItems.Count();
- USHORT nCur = 0;
+ sal_uInt16 nCount = aItems.Count();
+ sal_uInt16 nCur = 0;
SvLBoxItem* pItem;
while( nCur < nCount )
{
@@ -684,6 +684,7 @@ SvLBox_Impl::SvLBox_Impl( SvLBox& _rBox )
,m_bEntryMnemonicsEnabled( false )
,m_pLink( NULL )
,m_aMnemonicEngine( _rBox )
+ ,m_aQuickSelectionEngine( _rBox )
{
}
@@ -698,7 +699,6 @@ SvLBox::SvLBox( Window* pParent, WinBits nWinStyle ) :
DropTargetHelper( this ), DragSourceHelper( this ), eSelMode( NO_SELECTION )
{
DBG_CTOR(SvLBox,0);
- nWindowStyle = nWinStyle;
nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK;
nImpFlags = 0;
pTargetEntry = 0;
@@ -723,7 +723,6 @@ SvLBox::SvLBox( Window* pParent, const ResId& rResId ) :
DBG_CTOR(SvLBox,0);
pTargetEntry = 0;
nImpFlags = 0;
- nWindowStyle = 0;
pLBoxImpl = new SvLBox_Impl( *this );
nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK;
nDragDropMode = 0;
@@ -801,7 +800,7 @@ bool SvLBox::IsEntryMnemonicsEnabled() const
return pLBoxImpl->m_bEntryMnemonicsEnabled;
}
-USHORT SvLBox::IsA()
+sal_uInt16 SvLBox::IsA()
{
DBG_CHKTHIS(SvLBox,0);
return SVLISTBOX_ID_LBOX;
@@ -814,17 +813,17 @@ IMPL_LINK_INLINE_START( SvLBox, CloneHdl_Impl, SvListEntry*, pEntry )
}
IMPL_LINK_INLINE_END( SvLBox, CloneHdl_Impl, SvListEntry*, pEntry )
-ULONG SvLBox::Insert( SvLBoxEntry* pEntry, SvLBoxEntry* pParent, ULONG nPos )
+sal_uLong SvLBox::Insert( SvLBoxEntry* pEntry, SvLBoxEntry* pParent, sal_uLong nPos )
{
DBG_CHKTHIS(SvLBox,0);
- ULONG nInsPos = pModel->Insert( pEntry, pParent, nPos );
+ sal_uLong nInsPos = pModel->Insert( pEntry, pParent, nPos );
return nInsPos;
}
-ULONG SvLBox::Insert( SvLBoxEntry* pEntry,ULONG nRootPos )
+sal_uLong SvLBox::Insert( SvLBoxEntry* pEntry,sal_uLong nRootPos )
{
DBG_CHKTHIS(SvLBox,0);
- ULONG nInsPos = pModel->Insert( pEntry, nRootPos );
+ sal_uLong nInsPos = pModel->Insert( pEntry, nRootPos );
return nInsPos;
}
@@ -852,48 +851,48 @@ void SvLBox::DeselectHdl()
aDeselectHdl.Call( this );
}
-BOOL SvLBox::DoubleClickHdl()
+sal_Bool SvLBox::DoubleClickHdl()
{
DBG_CHKTHIS(SvLBox,0);
aDoubleClickHdl.Call( this );
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::CheckDragAndDropMode( SvLBox* pSource, sal_Int8 nAction )
+sal_Bool SvLBox::CheckDragAndDropMode( SvLBox* pSource, sal_Int8 nAction )
{
DBG_CHKTHIS(SvLBox,0);
if ( pSource == this )
{
if ( !(nDragDropMode & (SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY) ) )
- return FALSE; // D&D innerhalb der Liste gesperrt
+ return sal_False; // D&D innerhalb der Liste gesperrt
if( DND_ACTION_MOVE == nAction )
{
if ( !(nDragDropMode & SV_DRAGDROP_CTRL_MOVE) )
- return FALSE; // kein lokales Move
+ return sal_False; // kein lokales Move
}
else
{
if ( !(nDragDropMode & SV_DRAGDROP_CTRL_COPY))
- return FALSE; // kein lokales Copy
+ return sal_False; // kein lokales Copy
}
}
else
{
if ( !(nDragDropMode & SV_DRAGDROP_APP_DROP ) )
- return FALSE; // kein Drop
+ return sal_False; // kein Drop
if ( DND_ACTION_MOVE == nAction )
{
if ( !(nDragDropMode & SV_DRAGDROP_APP_MOVE) )
- return FALSE; // kein globales Move
+ return sal_False; // kein globales Move
}
else
{
if ( !(nDragDropMode & SV_DRAGDROP_APP_COPY))
- return FALSE; // kein globales Copy
+ return sal_False; // kein globales Copy
}
}
- return TRUE;
+ return sal_True;
}
@@ -919,19 +918,19 @@ void SvLBox::NotifyRemoving( SvLBoxEntry* )
- Entry wird an das Ende der Target-Childlist gehaengt
*/
#ifdef DBG_UTIL
-BOOL SvLBox::NotifyMoving(
+sal_Bool SvLBox::NotifyMoving(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu verschiebender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos) // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos) // Position in Childlist des Target-Parents
#else
-BOOL SvLBox::NotifyMoving(
+sal_Bool SvLBox::NotifyMoving(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry*, // Zu verschiebender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos) // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos) // Position in Childlist des Target-Parents
#endif
{
DBG_CHKTHIS(SvLBox,0);
@@ -940,7 +939,7 @@ BOOL SvLBox::NotifyMoving(
{
rpNewParent = 0;
rNewChildPos = 0;
- return TRUE;
+ return sal_True;
}
if ( !pTarget->HasChilds() && !pTarget->HasChildsOnDemand() )
{
@@ -959,15 +958,15 @@ BOOL SvLBox::NotifyMoving(
else
rNewChildPos = LIST_APPEND;
}
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::NotifyCopying(
+sal_Bool SvLBox::NotifyCopying(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu kopierender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos) // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos) // Position in Childlist des Target-Parents
{
DBG_CHKTHIS(SvLBox,0);
return NotifyMoving(pTarget,pEntry,rpNewParent,rNewChildPos);
@@ -977,7 +976,7 @@ BOOL SvLBox::NotifyCopying(
{
rpNewParent = 0;
rNewChildPos = 0;
- return TRUE;
+ return sal_True;
}
if ( !pTarget->HasChilds() && !pTarget->HasChildsOnDemand() )
{
@@ -994,7 +993,7 @@ BOOL SvLBox::NotifyCopying(
else
rNewChildPos = LIST_APPEND;
}
- return TRUE;
+ return sal_True;
*/
}
@@ -1008,13 +1007,13 @@ SvLBoxEntry* SvLBox::CloneEntry( SvLBoxEntry* pSource )
// Rueckgabe: Alle Entries wurden kopiert
-BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
+sal_Bool SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
{
DBG_CHKTHIS(SvLBox,0);
nCurEntrySelPos = 0; // Selektionszaehler fuer NotifyMoving/Copying
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
SvTreeEntryList aList;
- BOOL bClone = (BOOL)( (ULONG)(pSource->GetModel()) != (ULONG)GetModel() );
+ sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() );
Link aCloneLink( pModel->GetCloneLink() );
pModel->SetCloneLink( LINK(this, SvLBox, CloneHdl_Impl ));
@@ -1025,7 +1024,7 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
while ( pSourceEntry )
{
// Childs werden automatisch mitkopiert
- pSource->SelectChilds( pSourceEntry, FALSE );
+ pSource->SelectChilds( pSourceEntry, sal_False );
aList.Insert( pSourceEntry, LIST_APPEND );
pSourceEntry = pSource->NextSelected( pSourceEntry );
}
@@ -1034,13 +1033,13 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
while ( pSourceEntry )
{
SvLBoxEntry* pNewParent = 0;
- ULONG nInsertionPos = LIST_APPEND;
- BOOL bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
+ sal_uLong nInsertionPos = LIST_APPEND;
+ sal_Bool bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
if ( bOk )
{
if ( bClone )
{
- ULONG nCloneCount = 0;
+ sal_uLong nCloneCount = 0;
pSourceEntry = (SvLBoxEntry*)
pModel->Clone( (SvListEntry*)pSourceEntry, nCloneCount );
pModel->InsertTree( (SvListEntry*)pSourceEntry,
@@ -1048,15 +1047,15 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
}
else
{
- ULONG nListPos = pModel->Copy( (SvListEntry*)pSourceEntry,
+ sal_uLong nListPos = pModel->Copy( (SvListEntry*)pSourceEntry,
(SvListEntry*)pNewParent, nInsertionPos );
pSourceEntry = GetEntry( pNewParent, nListPos );
}
}
else
- bSuccess = FALSE;
+ bSuccess = sal_False;
- if( bOk == (BOOL)2 ) // !!!HACK verschobenen Entry sichtbar machen?
+ if( bOk == (sal_Bool)2 ) // !!!HACK verschobenen Entry sichtbar machen?
MakeVisible( pSourceEntry );
pSourceEntry = (SvLBoxEntry*)aList.Next();
@@ -1066,18 +1065,18 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
}
// Rueckgabe: Alle Entries wurden verschoben
-BOOL SvLBox::MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget )
+sal_Bool SvLBox::MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget )
{
return MoveSelectionCopyFallbackPossible( pSource, pTarget, sal_False );
}
-BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback )
+sal_Bool SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback )
{
DBG_CHKTHIS(SvLBox,0);
nCurEntrySelPos = 0; // Selektionszaehler fuer NotifyMoving/Copying
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
SvTreeEntryList aList;
- BOOL bClone = (BOOL)( (ULONG)(pSource->GetModel()) != (ULONG)GetModel() );
+ sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() );
Link aCloneLink( pModel->GetCloneLink() );
if ( bClone )
pModel->SetCloneLink( LINK(this, SvLBox, CloneHdl_Impl ));
@@ -1086,7 +1085,7 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
while ( pSourceEntry )
{
// Childs werden automatisch mitbewegt
- pSource->SelectChilds( pSourceEntry, FALSE );
+ pSource->SelectChilds( pSourceEntry, sal_False );
aList.Insert( pSourceEntry, LIST_APPEND );
pSourceEntry = pSource->NextSelected( pSourceEntry );
}
@@ -1095,7 +1094,7 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
while ( pSourceEntry )
{
SvLBoxEntry* pNewParent = 0;
- ULONG nInsertionPos = LIST_APPEND;
+ sal_uLong nInsertionPos = LIST_APPEND;
sal_Bool bOk = NotifyMoving(pTarget,pSourceEntry,pNewParent,nInsertionPos);
sal_Bool bCopyOk = bOk;
if ( !bOk && bAllowCopyFallback )
@@ -1108,7 +1107,7 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
{
if ( bClone )
{
- ULONG nCloneCount = 0;
+ sal_uLong nCloneCount = 0;
pSourceEntry = (SvLBoxEntry*)
pModel->Clone( (SvListEntry*)pSourceEntry, nCloneCount );
pModel->InsertTree( (SvListEntry*)pSourceEntry,
@@ -1125,9 +1124,9 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
}
}
else
- bSuccess = FALSE;
+ bSuccess = sal_False;
- if( bOk == (BOOL)2 ) // !!!HACK verschobenen Entry sichtbar machen?
+ if( bOk == (sal_Bool)2 ) // !!!HACK verschobenen Entry sichtbar machen?
MakeVisible( pSourceEntry );
pSourceEntry = (SvLBoxEntry*)aList.Next();
@@ -1148,7 +1147,7 @@ void SvLBox::RemoveSelection()
aList.Insert( pEntry );
if ( pEntry->HasChilds() )
// Remove loescht Childs automatisch
- SelectChilds( pEntry, FALSE );
+ SelectChilds( pEntry, sal_False );
pEntry = NextSelected( pEntry );
}
pEntry = (SvLBoxEntry*)aList.First();
@@ -1181,8 +1180,8 @@ void SvLBox::RecalcViewData()
SvLBoxEntry* pEntry = First();
while( pEntry )
{
- USHORT nCount = pEntry->ItemCount();
- USHORT nCurPos = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCurPos = 0;
while ( nCurPos < nCount )
{
SvLBoxItem* pItem = pEntry->GetItem( nCurPos );
@@ -1206,7 +1205,7 @@ void SvLBox::StateChanged( StateChangedType eType )
Control::StateChanged( eType );
}
-void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow)
+void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow)
{
DBG_CHKTHIS(SvLBox,0);
if ( bShow && (nImpFlags & SVLBOX_TARGEMPH_VIS) )
@@ -1220,37 +1219,43 @@ void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow)
nImpFlags &= ~SVLBOX_TARGEMPH_VIS;
}
-void SvLBox::ShowTargetEmphasis( SvLBoxEntry*, BOOL /* bShow */ )
+void SvLBox::ShowTargetEmphasis( SvLBoxEntry*, sal_Bool /* bShow */ )
{
DBG_CHKTHIS(SvLBox,0);
}
-BOOL SvLBox::Expand( SvLBoxEntry* )
+sal_Bool SvLBox::Expand( SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBox,0);
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::Collapse( SvLBoxEntry* )
+sal_Bool SvLBox::Collapse( SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBox,0);
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::Select( SvLBoxEntry*, BOOL )
+sal_Bool SvLBox::Select( SvLBoxEntry*, sal_Bool )
{
DBG_CHKTHIS(SvLBox,0);
- return FALSE;
+ return sal_False;
}
-ULONG SvLBox::SelectChilds( SvLBoxEntry* , BOOL )
+sal_uLong SvLBox::SelectChilds( SvLBoxEntry* , sal_Bool )
{
DBG_CHKTHIS(SvLBox,0);
return 0;
}
-void SvLBox::SelectAll( BOOL /* bSelect */ , BOOL /* bPaint */ )
+void SvLBox::OnCurrentEntryChanged()
+{
+ if ( !pLBoxImpl->m_bDoingQuickSelection )
+ pLBoxImpl->m_aQuickSelectionEngine.Reset();
+}
+
+void SvLBox::SelectAll( sal_Bool /* bSelect */ , sal_Bool /* bPaint */ )
{
DBG_CHKTHIS(SvLBox,0);
}
@@ -1279,9 +1284,9 @@ void SvLBox::FillEntryPath( SvLBoxEntry* pEntry, ::std::deque< sal_Int32 >& _rPa
if ( pEntry )
{
SvLBoxEntry* pParentEntry = GetParent( pEntry );
- while ( TRUE )
+ while ( sal_True )
{
- ULONG i, nCount = GetLevelChildCount( pParentEntry );
+ sal_uLong i, nCount = GetLevelChildCount( pParentEntry );
for ( i = 0; i < nCount; ++i )
{
SvLBoxEntry* pTemp = GetEntry( pParentEntry, i );
@@ -1311,11 +1316,11 @@ String SvLBox::GetEntryText( SvLBoxEntry* ) const
return String();
}
-ULONG SvLBox::GetLevelChildCount( SvLBoxEntry* _pParent ) const
+sal_uLong SvLBox::GetLevelChildCount( SvLBoxEntry* _pParent ) const
{
DBG_CHKTHIS(SvLBox,0);
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
SvLBoxEntry* pEntry = FirstChild( _pParent );
while ( pEntry )
{
@@ -1354,8 +1359,8 @@ void SvLBox::InitViewData( SvViewData* pData, SvListEntry* pEntry )
pEntryData->pItemData = new SvViewDataItem[ pInhEntry->ItemCount() ];
SvViewDataItem* pItemData = pEntryData->pItemData;
pEntryData->nItmCnt = pInhEntry->ItemCount(); // Anzahl Items fuer delete
- USHORT nCount = pInhEntry->ItemCount();
- USHORT nCurPos = 0;
+ sal_uInt16 nCount = pInhEntry->ItemCount();
+ sal_uInt16 nCurPos = 0;
while( nCurPos < nCount )
{
SvLBoxItem* pItem = pInhEntry->GetItem( nCurPos );
@@ -1367,10 +1372,10 @@ void SvLBox::InitViewData( SvViewData* pData, SvListEntry* pEntry )
-void SvLBox::EnableSelectionAsDropTarget( BOOL bEnable, BOOL bWithChilds )
+void SvLBox::EnableSelectionAsDropTarget( sal_Bool bEnable, sal_Bool bWithChilds )
{
DBG_CHKTHIS(SvLBox,0);
- USHORT nRefDepth;
+ sal_uInt16 nRefDepth;
SvLBoxEntry* pTemp;
SvLBoxEntry* pSelEntry = FirstSelected();
@@ -1421,11 +1426,11 @@ SvLBoxEntry* SvLBox::GetDropTarget( const Point& )
void SvLBox::EditText( const String& rStr, const Rectangle& rRect,
const Selection& rSel )
{
- EditText( rStr, rRect, rSel, FALSE );
+ EditText( rStr, rRect, rSel, sal_False );
}
void SvLBox::EditText( const String& rStr, const Rectangle& rRect,
- const Selection& rSel, BOOL bMulti )
+ const Selection& rSel, sal_Bool bMulti )
{
DBG_CHKTHIS(SvLBox,0);
if( pEdCtrl )
@@ -1467,11 +1472,11 @@ void SvLBox::CancelTextEditing()
{
DBG_CHKTHIS(SvLBox,0);
if ( pEdCtrl )
- pEdCtrl->StopEditing( TRUE );
+ pEdCtrl->StopEditing( sal_True );
nImpFlags &= (~SVLBOX_IN_EDT);
}
-void SvLBox::EndEditing( BOOL bCancel )
+void SvLBox::EndEditing( sal_Bool bCancel )
{
DBG_CHKTHIS(SvLBox,0);
if( pEdCtrl )
@@ -1534,15 +1539,14 @@ void SvLBox::KeyInput( const KeyEvent& rKEvt )
Control::KeyInput( rKEvt );
}
-const void* SvLBox::FirstSearchEntry( String& _rEntryText )
+const void* SvLBox::FirstSearchEntry( String& _rEntryText ) const
{
SvLBoxEntry* pEntry = GetCurEntry();
if ( pEntry )
pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( NextSearchEntry( pEntry, _rEntryText ) ) );
else
{
- if ( !pEntry )
- pEntry = FirstSelected();
+ pEntry = FirstSelected();
if ( !pEntry )
pEntry = First();
}
@@ -1553,11 +1557,23 @@ const void* SvLBox::FirstSearchEntry( String& _rEntryText )
return pEntry;
}
-const void* SvLBox::NextSearchEntry( const void* _pCurrentSearchEntry, String& _rEntryText )
+const void* SvLBox::NextSearchEntry( const void* _pCurrentSearchEntry, String& _rEntryText ) const
{
SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pCurrentSearchEntry ) );
- pEntry = Next( pEntry );
+ if ( ( ( GetChildCount( pEntry ) > 0 )
+ || ( pEntry->HasChildsOnDemand() )
+ )
+ && !IsExpanded( pEntry )
+ )
+ {
+ pEntry = NextSibling( pEntry );
+ }
+ else
+ {
+ pEntry = Next( pEntry );
+ }
+
if ( !pEntry )
pEntry = First();
@@ -1571,28 +1587,61 @@ void SvLBox::SelectSearchEntry( const void* _pEntry )
{
SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pEntry ) );
DBG_ASSERT( pEntry, "SvLBox::SelectSearchEntry: invalid entry!" );
- if ( pEntry )
+ if ( !pEntry )
return;
- SelectAll( FALSE );
+ SelectAll( sal_False );
SetCurEntry( pEntry );
Select( pEntry );
}
-void SvLBox::ExecuteSearchEntry( const void* /*_pEntry*/ )
+void SvLBox::ExecuteSearchEntry( const void* /*_pEntry*/ ) const
{
// nothing to do here, we have no "execution"
}
+::vcl::StringEntryIdentifier SvLBox::CurrentEntry( String& _out_entryText ) const
+{
+ // always accept the current entry if there is one
+ SvLBoxEntry* pCurrentEntry( GetCurEntry() );
+ if ( pCurrentEntry )
+ {
+ _out_entryText = GetEntryText( pCurrentEntry );
+ return pCurrentEntry;
+ }
+ return FirstSearchEntry( _out_entryText );
+}
+
+::vcl::StringEntryIdentifier SvLBox::NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const
+{
+ return NextSearchEntry( _currentEntry, _out_entryText );
+}
+
+void SvLBox::SelectEntry( ::vcl::StringEntryIdentifier _entry )
+{
+ SelectSearchEntry( _entry );
+}
+
bool SvLBox::HandleKeyInput( const KeyEvent& _rKEvt )
{
- if ( !IsEntryMnemonicsEnabled() )
- return false;
+ if ( IsEntryMnemonicsEnabled()
+ && pLBoxImpl->m_aMnemonicEngine.HandleKeyEvent( _rKEvt )
+ )
+ return true;
+
+ if ( ( GetStyle() & WB_QUICK_SEARCH ) != 0 )
+ {
+ pLBoxImpl->m_bDoingQuickSelection = true;
+ const bool bHandled = pLBoxImpl->m_aQuickSelectionEngine.HandleKeyEvent( _rKEvt );
+ pLBoxImpl->m_bDoingQuickSelection = false;
+ if ( bHandled )
+ return true;
+ }
- return pLBoxImpl->m_aMnemonicEngine.HandleKeyEvent( _rKEvt );
+ return false;
}
-SvLBoxEntry* SvLBox::GetEntry( const Point&, BOOL ) const
+SvLBoxEntry* SvLBox::GetEntry( const Point&, sal_Bool ) const
{
DBG_CHKTHIS(SvLBox,0);
return 0;
@@ -1601,15 +1650,15 @@ SvLBoxEntry* SvLBox::GetEntry( const Point&, BOOL ) const
void SvLBox::ModelHasEntryInvalidated( SvListEntry* pEntry )
{
DBG_CHKTHIS(SvLBox,0);
- USHORT nCount = ((SvLBoxEntry*)pEntry)->ItemCount();
- for( USHORT nIdx = 0; nIdx < nCount; nIdx++ )
+ sal_uInt16 nCount = ((SvLBoxEntry*)pEntry)->ItemCount();
+ for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++ )
{
SvLBoxItem* pItem = ((SvLBoxEntry*)pEntry)->GetItem( nIdx );
pItem->InitViewData( this, (SvLBoxEntry*)pEntry, 0 );
}
}
-void SvLBox::SetInUseEmphasis( SvLBoxEntry* pEntry, BOOL bInUse )
+void SvLBox::SetInUseEmphasis( SvLBoxEntry* pEntry, sal_Bool bInUse )
{
DBG_CHKTHIS(SvLBox,0);
DBG_ASSERT(pEntry,"SetInUseEmphasis:No Entry");
@@ -1631,7 +1680,7 @@ void SvLBox::SetInUseEmphasis( SvLBoxEntry* pEntry, BOOL bInUse )
}
}
-void SvLBox::SetCursorEmphasis( SvLBoxEntry* pEntry, BOOL bCursored )
+void SvLBox::SetCursorEmphasis( SvLBoxEntry* pEntry, sal_Bool bCursored )
{
DBG_CHKTHIS(SvLBox,0);
DBG_ASSERT(pEntry,"SetInUseEmphasis:No Entry");
@@ -1646,7 +1695,7 @@ void SvLBox::SetCursorEmphasis( SvLBoxEntry* pEntry, BOOL bCursored )
}
}
-BOOL SvLBox::HasCursorEmphasis( SvLBoxEntry* pEntry ) const
+sal_Bool SvLBox::HasCursorEmphasis( SvLBoxEntry* pEntry ) const
{
DBG_CHKTHIS(SvLBox,0);
DBG_ASSERT(pEntry,"SetInUseEmphasis:No Entry");
@@ -1665,11 +1714,11 @@ void SvLBox::ReadDragServerInfo(const Point&, SvLBoxDDInfo* )
DBG_CHKTHIS(SvLBox,0);
}
-BOOL SvLBox::EditingCanceled() const
+sal_Bool SvLBox::EditingCanceled() const
{
if( pEdCtrl && pEdCtrl->EditingCanceled() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
@@ -1681,7 +1730,7 @@ sal_Int8 SvLBox::AcceptDrop( const AcceptDropEvent& rEvt )
if( rEvt.mbLeaving || !CheckDragAndDropMode( pDDSource, rEvt.mnAction ) )
{
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
}
else if( !nDragDropMode )
{
@@ -1708,12 +1757,12 @@ sal_Int8 SvLBox::AcceptDrop( const AcceptDropEvent& rEvt )
// **** Emphasis zeichnen ****
if( DND_ACTION_NONE == nRet )
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
else if( pEntry != pTargetEntry || !(nImpFlags & SVLBOX_TARGEMPH_VIS) )
{
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pTargetEntry = pEntry;
- ImplShowTargetEmphasis( pTargetEntry, TRUE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_True );
}
}
return nRet;
@@ -1725,9 +1774,9 @@ sal_Int8 SvLBox::ExecuteDrop( const ExecuteDropEvent& rEvt, SvLBox* pSourceView
sal_Int8 nRet = DND_ACTION_NONE;
DBG_ASSERT( pSourceView, "SvLBox::ExecuteDrop(): no source view" );
- pSourceView->EnableSelectionAsDropTarget( TRUE, TRUE );
+ pSourceView->EnableSelectionAsDropTarget( sal_True, sal_True );
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pDDTarget = this;
SvLBoxDDInfo aDDInfo;
@@ -1823,8 +1872,8 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel )
pDDSource = this;
pDDTarget = 0;
- BOOL bOldUpdateMode = Control::IsUpdateMode();
- Control::SetUpdateMode( TRUE );
+ sal_Bool bOldUpdateMode = Control::IsUpdateMode();
+ Control::SetUpdateMode( sal_True );
Update();
Control::SetUpdateMode( bOldUpdateMode );
@@ -1832,8 +1881,8 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel )
// Wichtig: Wenn im DropHandler die Selektion der
// SourceListBox veraendert wird, muessen vorher die Eintraege
// als DropTargets wieder freigeschaltet werden:
- // (GetSourceListBox()->EnableSelectionAsDropTarget( TRUE, TRUE );)
- EnableSelectionAsDropTarget( FALSE, TRUE /* with Childs */ );
+ // (GetSourceListBox()->EnableSelectionAsDropTarget( sal_True, sal_True );)
+ EnableSelectionAsDropTarget( sal_False, sal_True /* with Childs */ );
pContainer->StartDrag( this, nDragOptions, GetDragFinishedHdl() );
}
@@ -1844,18 +1893,18 @@ nAction
#endif
)
{
- EnableSelectionAsDropTarget( TRUE, TRUE );
+ EnableSelectionAsDropTarget( sal_True, sal_True );
#ifndef UNX
if( (nAction == DND_ACTION_MOVE) && ( (pDDTarget &&
- ((ULONG)(pDDTarget->GetModel())!=(ULONG)(this->GetModel()))) ||
+ ((sal_uLong)(pDDTarget->GetModel())!=(sal_uLong)(this->GetModel()))) ||
!pDDTarget ))
{
RemoveSelection();
}
#endif
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pDDSource = 0;
pDDTarget = 0;
pTargetEntry = 0;
@@ -1868,10 +1917,10 @@ DragDropMode SvLBox::NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* )
return (DragDropMode)0xffff;
}
-BOOL SvLBox::NotifyAcceptDrop( SvLBoxEntry* )
+sal_Bool SvLBox::NotifyAcceptDrop( SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBox,0);
- return TRUE;
+ return sal_True;
}
// handler and methods for Drag - finished handler.
@@ -1888,20 +1937,20 @@ namespace
void SvLBox::AddBoxToDDList_Impl( const SvLBox& rB )
{
- ULONG nVal = (ULONG)&rB;
+ sal_uLong nVal = (sal_uLong)&rB;
SortLBoxes::get().Insert( nVal );
}
void SvLBox::RemoveBoxFromDDList_Impl( const SvLBox& rB )
{
- ULONG nVal = (ULONG)&rB;
+ sal_uLong nVal = (sal_uLong)&rB;
SortLBoxes::get().Remove( nVal );
}
IMPL_STATIC_LINK( SvLBox, DragFinishHdl_Impl, sal_Int8*, pAction )
{
- ULONG nVal = (ULONG)pThis;
- USHORT nFnd;
+ sal_uLong nVal = (sal_uLong)pThis;
+ sal_uInt16 nFnd;
SvULongsSort &rSortLBoxes = SortLBoxes::get();
if( rSortLBoxes.Seek_Entry( nVal, &nFnd ) )
{
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index db6a3dd0d3c5..4b1c00e4c873 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -72,7 +72,7 @@ void SvTabListBox::SetTabs()
*/
// alle anderen Tabs an Liste haengen
- for( USHORT nCurTab = 1; nCurTab < nTabCount; nCurTab++ )
+ for( sal_uInt16 nCurTab = 1; nCurTab < nTabCount; nCurTab++ )
{
SvLBoxTab* pTab = pTabList+nCurTab;
AddTab( pTab->GetPos(), pTab->nFlags );
@@ -87,10 +87,10 @@ void SvTabListBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rStr,
XubString aToken;
const xub_Unicode* pCurToken = aCurEntry.GetBuffer();
- USHORT nCurTokenLen;
+ sal_uInt16 nCurTokenLen;
const xub_Unicode* pNextToken = GetToken( pCurToken, nCurTokenLen );
- USHORT nCount = nTabCount; nCount--;
- for( USHORT nToken = 0; nToken < nCount; nToken++ )
+ sal_uInt16 nCount = nTabCount; nCount--;
+ for( sal_uInt16 nToken = 0; nToken < nCount; nToken++ )
{
if( pCurToken && nCurTokenLen )
// aToken.Assign( pCurToken, nCurTokenLen );
@@ -144,7 +144,7 @@ void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit )
return;
delete [] pTabList;
- USHORT nCount = (USHORT)(*pTabs);
+ sal_uInt16 nCount = (sal_uInt16)(*pTabs);
pTabList = new SvLBoxTab[ nCount ];
nTabCount = nCount;
@@ -152,7 +152,7 @@ void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit )
MapMode aMMDest( MAP_PIXEL );
pTabs++;
- for( USHORT nIdx = 0; nIdx < nCount; nIdx++, pTabs++ )
+ for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++, pTabs++ )
{
Size aSize( *pTabs, 0 );
aSize = LogicToLogic( aSize, &aMMSource, &aMMDest );
@@ -165,7 +165,7 @@ void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit )
Invalidate();
}
-void SvTabListBox::SetTab( USHORT nTab,long nValue,MapUnit eMapUnit )
+void SvTabListBox::SetTab( sal_uInt16 nTab,long nValue,MapUnit eMapUnit )
{
DBG_ASSERT(nTab<nTabCount,"Invalid Tab-Pos");
if( nTab < nTabCount )
@@ -184,8 +184,8 @@ void SvTabListBox::SetTab( USHORT nTab,long nValue,MapUnit eMapUnit )
}
SvLBoxEntry* SvTabListBox::InsertEntry( const XubString& rText, SvLBoxEntry* pParent,
- BOOL /*bChildsOnDemand*/,
- ULONG nPos, void* pUserData,
+ sal_Bool /*bChildsOnDemand*/,
+ sal_uLong nPos, void* pUserData,
SvLBoxButtonKind )
{
return InsertEntryToColumn( rText, pParent, nPos, 0xffff, pUserData );
@@ -195,15 +195,15 @@ SvLBoxEntry* SvTabListBox::InsertEntry( const XubString& rText,
const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp,
SvLBoxEntry* pParent,
- BOOL /*bChildsOnDemand*/,
- ULONG nPos, void* pUserData,
+ sal_Bool /*bChildsOnDemand*/,
+ sal_uLong nPos, void* pUserData,
SvLBoxButtonKind )
{
return InsertEntryToColumn( rText, rExpandedEntryBmp, rCollapsedEntryBmp,
pParent, nPos, 0xffff, pUserData );
}
-SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry* pParent,ULONG nPos,USHORT nCol,
+SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry* pParent,sal_uLong nPos,sal_uInt16 nCol,
void* pUser )
{
XubString aStr;
@@ -217,7 +217,7 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry
}
aStr += rStr;
XubString aFirstStr( aStr );
- USHORT nEnd = aFirstStr.Search( '\t' );
+ sal_uInt16 nEnd = aFirstStr.Search( '\t' );
if( nEnd != STRING_NOTFOUND )
{
aFirstStr.Erase( nEnd );
@@ -226,12 +226,12 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry
}
else
aCurEntry.Erase();
- return SvTreeListBox::InsertEntry( aFirstStr, pParent, FALSE, nPos, pUser );
+ return SvTreeListBox::InsertEntry( aFirstStr, pParent, sal_False, nPos, pUser );
}
SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr,
const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
- SvLBoxEntry* pParent,ULONG nPos,USHORT nCol, void* pUser )
+ SvLBoxEntry* pParent,sal_uLong nPos,sal_uInt16 nCol, void* pUser )
{
XubString aStr;
if( nCol != 0xffff )
@@ -244,7 +244,7 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr,
}
aStr += rStr;
XubString aFirstStr( aStr );
- USHORT nEnd = aFirstStr.Search( '\t' );
+ sal_uInt16 nEnd = aFirstStr.Search( '\t' );
if( nEnd != STRING_NOTFOUND )
{
aFirstStr.Erase( nEnd );
@@ -257,11 +257,11 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr,
return SvTreeListBox::InsertEntry(
aFirstStr,
rExpandedEntryBmp, rCollapsedEntryBmp,
- pParent, FALSE, nPos, pUser );
+ pParent, sal_False, nPos, pUser );
}
-SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr, ULONG nPos,
- USHORT nCol, void* pUser )
+SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr, sal_uLong nPos,
+ sal_uInt16 nCol, void* pUser )
{
return InsertEntryToColumn( rStr,0,nPos, nCol, pUser );
}
@@ -271,14 +271,14 @@ String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry ) const
return GetEntryText( pEntry, 0xffff );
}
-String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry, USHORT nCol ) const
+String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const
{
DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry");
XubString aResult;
if( pEntry )
{
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
while( nCur < nCount )
{
SvLBoxItem* pStr = pEntry->GetItem( nCur );
@@ -303,19 +303,19 @@ String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry, USHORT nCol ) const
return aResult;
}
-String SvTabListBox::GetEntryText( ULONG nPos, USHORT nCol ) const
+String SvTabListBox::GetEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
{
SvLBoxEntry* pEntry = GetEntryOnPos( nPos );
return GetEntryText( pEntry, nCol );
}
-void SvTabListBox::SetEntryText( const XubString& rStr, ULONG nPos, USHORT nCol )
+void SvTabListBox::SetEntryText( const XubString& rStr, sal_uLong nPos, sal_uInt16 nCol )
{
SvLBoxEntry* pEntry = SvTreeListBox::GetEntry( nPos );
SetEntryText( rStr, pEntry, nCol );
}
-void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, USHORT nCol )
+void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, sal_uInt16 nCol )
{
DBG_ASSERT(pEntry,"SetEntryText:Invalid Entry");
if( !pEntry )
@@ -325,14 +325,14 @@ void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, USH
if ( sOldText == rStr )
return;
- USHORT nTextColumn = nCol;
+ sal_uInt16 nTextColumn = nCol;
const xub_Unicode* pCurToken = rStr.GetBuffer();
- USHORT nCurTokenLen;
+ sal_uInt16 nCurTokenLen;
const xub_Unicode* pNextToken = GetToken( pCurToken, nCurTokenLen );
XubString aTemp;
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
while( nCur < nCount )
{
SvLBoxItem* pStr = pEntry->GetItem( nCur );
@@ -372,7 +372,7 @@ void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, USH
delete pData;
}
-String SvTabListBox::GetCellText( ULONG nPos, USHORT nCol ) const
+String SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const
{
SvLBoxEntry* pEntry = GetEntryOnPos( nPos );
DBG_ASSERT( pEntry, "SvTabListBox::GetCellText(): Invalid Entry" );
@@ -386,9 +386,9 @@ String SvTabListBox::GetCellText( ULONG nPos, USHORT nCol ) const
return aResult;
}
-ULONG SvTabListBox::GetEntryPos( const XubString& rStr, USHORT nCol )
+sal_uLong SvTabListBox::GetEntryPos( const XubString& rStr, sal_uInt16 nCol )
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvLBoxEntry* pEntry = First();
while( pEntry )
{
@@ -401,9 +401,9 @@ ULONG SvTabListBox::GetEntryPos( const XubString& rStr, USHORT nCol )
return 0xffffffff;
}
-ULONG SvTabListBox::GetEntryPos( const SvLBoxEntry* pEntry ) const
+sal_uLong SvTabListBox::GetEntryPos( const SvLBoxEntry* pEntry ) const
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvLBoxEntry* pTmpEntry = First();
while( pTmpEntry )
{
@@ -421,7 +421,7 @@ void SvTabListBox::Resize()
}
// static
-const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, USHORT& rLen )
+const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, sal_uInt16& rLen )
{
if( !pPtr || *pPtr == 0 )
{
@@ -429,7 +429,7 @@ const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, USHORT& rLen
return 0;
}
xub_Unicode c = *pPtr;
- USHORT nLen = 0;
+ sal_uInt16 nLen = 0;
while( c != '\t' && c != 0 )
{
pPtr++;
@@ -444,15 +444,15 @@ const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, USHORT& rLen
return pPtr;
}
-String SvTabListBox::GetTabEntryText( ULONG nPos, USHORT nCol ) const
+String SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
{
SvLBoxEntry* pEntry = SvTreeListBox::GetEntry( nPos );
DBG_ASSERT( pEntry, "GetTabEntryText(): Invalid entry " );
XubString aResult;
if ( pEntry )
{
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = ( 0 == nCol && IsCellFocusEnabled() ) ? GetCurrentTabPos() : 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = ( 0 == nCol && IsCellFocusEnabled() ) ? GetCurrentTabPos() : 0;
while( nCur < nCount )
{
SvLBoxItem* pStr = pEntry->GetItem( nCur );
@@ -482,10 +482,10 @@ String SvTabListBox::GetTabEntryText( ULONG nPos, USHORT nCol ) const
return aResult;
}
-SvLBoxEntry* SvTabListBox::GetEntryOnPos( ULONG _nEntryPos ) const
+SvLBoxEntry* SvTabListBox::GetEntryOnPos( sal_uLong _nEntryPos ) const
{
SvLBoxEntry* pEntry = NULL;
- ULONG i, nPos = 0, nCount = GetLevelChildCount( NULL );
+ sal_uLong i, nPos = 0, nCount = GetLevelChildCount( NULL );
for ( i = 0; i < nCount; ++i )
{
SvLBoxEntry* pParent = GetEntry(i);
@@ -506,9 +506,9 @@ SvLBoxEntry* SvTabListBox::GetEntryOnPos( ULONG _nEntryPos ) const
return pEntry;
}
-SvLBoxEntry* SvTabListBox::GetChildOnPos( SvLBoxEntry* _pParent, ULONG _nEntryPos, ULONG& _rPos ) const
+SvLBoxEntry* SvTabListBox::GetChildOnPos( SvLBoxEntry* _pParent, sal_uLong _nEntryPos, sal_uLong& _rPos ) const
{
- ULONG i, nCount = GetLevelChildCount( _pParent );
+ sal_uLong i, nCount = GetLevelChildCount( _pParent );
for ( i = 0; i < nCount; ++i )
{
SvLBoxEntry* pParent = GetEntry( _pParent, i );
@@ -526,33 +526,33 @@ SvLBoxEntry* SvTabListBox::GetChildOnPos( SvLBoxEntry* _pParent, ULONG _nEntryPo
return NULL;
}
-void SvTabListBox::SetTabJustify( USHORT nTab, SvTabJustify eJustify)
+void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify)
{
if( nTab >= nTabCount )
return;
SvLBoxTab* pTab = &(pTabList[ nTab ]);
- USHORT nFlags = pTab->nFlags;
+ sal_uInt16 nFlags = pTab->nFlags;
nFlags &= (~MYTABMASK);
- nFlags |= (USHORT)eJustify;
+ nFlags |= (sal_uInt16)eJustify;
pTab->nFlags = nFlags;
SvTreeListBox::nTreeFlags |= TREEFLAG_RECALCTABS;
if( IsUpdateMode() )
Invalidate();
}
-SvTabJustify SvTabListBox::GetTabJustify( USHORT nTab ) const
+SvTabJustify SvTabListBox::GetTabJustify( sal_uInt16 nTab ) const
{
SvTabJustify eResult = AdjustLeft;
if( nTab >= nTabCount )
return eResult;
SvLBoxTab* pTab = &(pTabList[ nTab ]);
- USHORT nFlags = pTab->nFlags;
+ sal_uInt16 nFlags = pTab->nFlags;
nFlags &= MYTABMASK;
eResult = (SvTabJustify)nFlags;
return eResult;
}
-long SvTabListBox::GetLogicTab( USHORT nTab )
+long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
{
if( SvTreeListBox::nTreeFlags & TREEFLAG_RECALCTABS )
((SvTabListBox*)this)->SetTabs();
@@ -580,7 +580,7 @@ SvHeaderTabListBox::SvHeaderTabListBox( Window* pParent, WinBits nWinStyle ) :
SvTabListBox( pParent, nWinStyle ),
- m_bFirstPaint ( TRUE ),
+ m_bFirstPaint ( sal_True ),
m_pImpl ( new ::svt::SvHeaderTabListBoxImpl ),
m_pAccessible ( NULL )
{
@@ -592,7 +592,7 @@ SvHeaderTabListBox::SvHeaderTabListBox( Window* pParent, const ResId& rResId ) :
SvTabListBox( pParent, rResId ),
- m_bFirstPaint ( TRUE ),
+ m_bFirstPaint ( sal_True ),
m_pImpl ( new ::svt::SvHeaderTabListBoxImpl ),
m_pAccessible ( NULL )
{
@@ -611,7 +611,7 @@ void SvHeaderTabListBox::Paint( const Rectangle& rRect )
{
if ( m_bFirstPaint )
{
- m_bFirstPaint = FALSE;
+ m_bFirstPaint = sal_False;
RepaintScrollBars();
}
SvTabListBox::Paint( rRect );
@@ -630,14 +630,14 @@ void SvHeaderTabListBox::InitHeaderBar( HeaderBar* pHeaderBar )
// -----------------------------------------------------------------------
-sal_Bool SvHeaderTabListBox::IsItemChecked( SvLBoxEntry* pEntry, USHORT nCol ) const
+sal_Bool SvHeaderTabListBox::IsItemChecked( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const
{
SvButtonState eState = SV_BUTTON_UNCHECKED;
SvLBoxButton* pItem = (SvLBoxButton*)( pEntry->GetItem( nCol + 1 ) );
if ( pItem && ( (SvLBoxItem*)pItem )->IsA() == SV_ITEM_ID_LBOXBUTTON )
{
- USHORT nButtonFlags = pItem->GetButtonFlags();
+ sal_uInt16 nButtonFlags = pItem->GetButtonFlags();
eState = pCheckButtonData->ConvertToButtonState( nButtonFlags );
}
@@ -647,7 +647,7 @@ sal_Bool SvHeaderTabListBox::IsItemChecked( SvLBoxEntry* pEntry, USHORT nCol ) c
// -----------------------------------------------------------------------
SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
- const XubString& rStr, ULONG nPos, USHORT nCol, void* pUserData )
+ const XubString& rStr, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
{
SvLBoxEntry* pEntry = SvTabListBox::InsertEntryToColumn( rStr, nPos, nCol, pUserData );
RecalculateAccessibleChildren();
@@ -657,7 +657,7 @@ SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
// -----------------------------------------------------------------------
SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
- const XubString& rStr, SvLBoxEntry* pParent, ULONG nPos, USHORT nCol, void* pUserData )
+ const XubString& rStr, SvLBoxEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
{
SvLBoxEntry* pEntry = SvTabListBox::InsertEntryToColumn( rStr, pParent, nPos, nCol, pUserData );
RecalculateAccessibleChildren();
@@ -668,7 +668,7 @@ SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
const XubString& rStr, const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
- SvLBoxEntry* pParent, ULONG nPos, USHORT nCol, void* pUserData )
+ SvLBoxEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
{
SvLBoxEntry* pEntry = SvTabListBox::InsertEntryToColumn(
rStr, rExpandedEntryBmp, rCollapsedEntryBmp, pParent, nPos, nCol, pUserData );
@@ -678,19 +678,19 @@ SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
// -----------------------------------------------------------------------
-ULONG SvHeaderTabListBox::Insert(
- SvLBoxEntry* pEnt, SvLBoxEntry* pPar, ULONG nPos )
+sal_uLong SvHeaderTabListBox::Insert(
+ SvLBoxEntry* pEnt, SvLBoxEntry* pPar, sal_uLong nPos )
{
- ULONG n = SvTabListBox::Insert( pEnt, pPar, nPos );
+ sal_uLong n = SvTabListBox::Insert( pEnt, pPar, nPos );
RecalculateAccessibleChildren();
return n;
}
// -----------------------------------------------------------------------
-ULONG SvHeaderTabListBox::Insert( SvLBoxEntry* pEntry, ULONG nRootPos )
+sal_uLong SvHeaderTabListBox::Insert( SvLBoxEntry* pEntry, sal_uLong nRootPos )
{
- ULONG nPos = SvTabListBox::Insert( pEntry, nRootPos );
+ sal_uLong nPos = SvTabListBox::Insert( pEntry, nRootPos );
RecalculateAccessibleChildren();
return nPos;
}
@@ -762,7 +762,7 @@ sal_Bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, Tr
SvLBoxEntry* pEntry = GetEntry( _nRow );
if ( pEntry )
{
- USHORT nItemCount = pEntry->ItemCount();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
if ( nItemCount > ( _nColumn + 1 ) )
{
SvLBoxButton* pItem = (SvLBoxButton*)( pEntry->GetItem( _nColumn + 1 ) );
@@ -798,8 +798,8 @@ sal_Int32 SvHeaderTabListBox::GetCurrRow() const
SvLBoxEntry* pEntry = GetCurEntry();
if ( pEntry )
{
- ULONG nCount = GetEntryCount();
- for ( ULONG i = 0; i < nCount; ++i )
+ sal_uLong nCount = GetEntryCount();
+ for ( sal_uLong i = 0; i < nCount; ++i )
{
if ( pEntry == GetEntry(i) )
{
@@ -838,13 +838,13 @@ sal_Bool SvHeaderTabListBox::IsCellFocusable() const
return IsCellFocusEnabled();
}
// -----------------------------------------------------------------------
-BOOL SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
+sal_Bool SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
{
- sal_Bool bRet = ( IsCellFocusEnabled() == TRUE );
+ sal_Bool bRet = ( IsCellFocusEnabled() == sal_True );
if ( bRet )
{
// first set cursor to _nRow
- SetCursor( GetEntry( _nRow ), TRUE );
+ SetCursor( GetEntry( _nRow ), sal_True );
// then set the focus into _nColumn
bRet = ( SetCurrentTabPos( _nColumn ) == true );
}
@@ -853,22 +853,22 @@ BOOL SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
// -----------------------------------------------------------------------
void SvHeaderTabListBox::SetNoSelection()
{
- SvLBox::SelectAll( FALSE );
+ SvLBox::SelectAll( sal_False );
}
// -----------------------------------------------------------------------
void SvHeaderTabListBox::SelectAll()
{
- SvLBox::SelectAll( TRUE );
+ SvLBox::SelectAll( sal_True );
}
// -----------------------------------------------------------------------
-void SvHeaderTabListBox::SelectAll( BOOL bSelect, BOOL bPaint )
+void SvHeaderTabListBox::SelectAll( sal_Bool bSelect, sal_Bool bPaint )
{
- // overwritten just to disambiguate the SelectAll() from the base' class SelectAll( BOOl, BOOL )
+ // overwritten just to disambiguate the SelectAll() from the base' class SelectAll( BOOl, sal_Bool )
SvTabListBox::SelectAll( bSelect, bPaint );
}
// -----------------------------------------------------------------------
-void SvHeaderTabListBox::SelectRow( long _nRow, BOOL _bSelect, BOOL )
+void SvHeaderTabListBox::SelectRow( long _nRow, sal_Bool _bSelect, sal_Bool )
{
Select( GetEntry( _nRow ), _bSelect );
}
@@ -895,7 +895,7 @@ bool SvHeaderTabListBox::IsRowSelected( long _nRow ) const
// -----------------------------------------------------------------------
sal_Bool SvHeaderTabListBox::IsColumnSelected( long ) const
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
void SvHeaderTabListBox::GetAllSelectedRows( ::com::sun::star::uno::Sequence< sal_Int32 >& ) const
@@ -911,12 +911,12 @@ sal_Bool SvHeaderTabListBox::IsCellVisible( sal_Int32, sal_uInt16 ) const
return sal_True;
}
// -----------------------------------------------------------------------
-String SvHeaderTabListBox::GetAccessibleCellText( long _nRow, USHORT _nColumnPos ) const
+String SvHeaderTabListBox::GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const
{
return ::rtl::OUString( GetTabEntryText( _nRow, _nColumnPos ) );
}
// -----------------------------------------------------------------------
-Rectangle SvHeaderTabListBox::calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen )
+Rectangle SvHeaderTabListBox::calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen )
{
Rectangle aRect;
if ( _bIsColumnBar )
@@ -930,7 +930,7 @@ Rectangle SvHeaderTabListBox::calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnS
return aRect;
}
// -----------------------------------------------------------------------
-Rectangle SvHeaderTabListBox::calcTableRect( BOOL _bOnScreen )
+Rectangle SvHeaderTabListBox::calcTableRect( sal_Bool _bOnScreen )
{
Window* pParent = NULL;
if ( !_bOnScreen )
@@ -940,14 +940,14 @@ Rectangle SvHeaderTabListBox::calcTableRect( BOOL _bOnScreen )
return aRect;
}
// -----------------------------------------------------------------------
-Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, BOOL _bIsHeader, BOOL _bOnScreen )
+Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, sal_Bool _bIsHeader, sal_Bool _bOnScreen )
{
DBG_ASSERT( !_bIsHeader || 0 == _nRow, "invalid parameters" );
Rectangle aRect;
SvLBoxEntry* pEntry = GetEntry( _nRow );
if ( pEntry )
{
- aRect = _bIsHeader ? calcHeaderRect( sal_True, FALSE ) : GetBoundingRect( pEntry );
+ aRect = _bIsHeader ? calcHeaderRect( sal_True, sal_False ) : GetBoundingRect( pEntry );
Point aTopLeft = aRect.TopLeft();
DBG_ASSERT( m_pImpl->m_pHeaderBar->GetItemCount() > _nColumn, "invalid column" );
Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) );
@@ -1105,7 +1105,7 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin
}
case ::svt::BBTYPE_COLUMNHEADERCELL:
{
- aRetText = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( (USHORT)_nPos ) );
+ aRetText = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( (sal_uInt16)_nPos ) );
break;
}
@@ -1224,7 +1224,7 @@ void SvHeaderTabListBox::GrabTableFocus()
GrabFocus();
}
// -----------------------------------------------------------------------
-BOOL SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
+sal_Bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
{
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, nBase, rVector );
}
@@ -1239,7 +1239,7 @@ void SvHeaderTabListBox::GrabFocus()
Control::GrabFocus();
}
// -----------------------------------------------------------------------
-Reference< XAccessible > SvHeaderTabListBox::GetAccessible( BOOL bCreate )
+Reference< XAccessible > SvHeaderTabListBox::GetAccessible( sal_Bool bCreate )
{
return Control::GetAccessible( bCreate );
}
@@ -1283,7 +1283,7 @@ Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_In
// -----------------------------------------------------------------------------
sal_Int32 SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)
{
- String sText = GetAccessibleCellText( _nRow, static_cast< USHORT >( _nColumnPos ) );
+ String sText = GetAccessibleCellText( _nRow, static_cast< sal_uInt16 >( _nColumnPos ) );
MetricVector aRects;
if ( GetGlyphBoundRects(Point(0,0),sText,0,STRING_LEN,0,aRects) )
{
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 96c91a3b8992..12ac258dd31c 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -61,10 +61,10 @@ DBG_NAME(SvTreeListBox)
#define SV_LBOX_DEFAULT_INDENT_PIXEL 20
SvTreeListBox::SvTreeListBox( Window* pParent, WinBits nWinStyle )
- : SvLBox(pParent,nWinStyle )
+ : SvLBox( pParent, nWinStyle )
{
DBG_CTOR(SvTreeListBox,0);
- InitTreeView( nWinStyle );
+ InitTreeView();
SetSublistOpenWithLeftRight();
}
@@ -74,13 +74,13 @@ SvTreeListBox::SvTreeListBox( Window* pParent , const ResId& rResId )
{
DBG_CTOR(SvTreeListBox,0);
- InitTreeView( 0 );
+ InitTreeView();
Resize();
SetSublistOpenWithLeftRight();
}
-void SvTreeListBox::InitTreeView( WinBits nWinStyle )
+void SvTreeListBox::InitTreeView()
{
DBG_CHKTHIS(SvTreeListBox,0);
pCheckButtonData = NULL;
@@ -98,15 +98,15 @@ void SvTreeListBox::InitTreeView( WinBits nWinStyle )
nTreeFlags = TREEFLAG_RECALCTABS;
nIndent = SV_LBOX_DEFAULT_INDENT_PIXEL;
nEntryHeightOffs = SV_ENTRYHEIGHTOFFS_PIXEL;
- pImp = new SvImpLBox( this, GetModel(), nWinStyle );
+ pImp = new SvImpLBox( this, GetModel(), GetStyle() );
aContextBmpMode = SVLISTENTRYFLAG_EXPANDED;
nContextBmpWidthMax = 0;
SetFont( GetFont() );
SetSpaceBetweenEntries( 0 );
SetLineColor();
- InitSettings( TRUE, TRUE, TRUE );
- SetWindowBits( nWinStyle );
+ InitSettings( sal_True, sal_True, sal_True );
+ ImplInitStyle();
SetTabs();
}
@@ -145,28 +145,28 @@ void SvTreeListBox::DisconnectFromModel()
}
-USHORT SvTreeListBox::IsA()
+sal_uInt16 SvTreeListBox::IsA()
{
DBG_CHKTHIS(SvTreeListBox,0);
return SV_LISTBOX_ID_TREEBOX;
}
-void SvTreeListBox::SetSublistOpenWithReturn( BOOL b )
+void SvTreeListBox::SetSublistOpenWithReturn( sal_Bool b )
{
pImp->bSubLstOpRet = b;
}
-BOOL SvTreeListBox::IsSublistOpenWithReturn() const
+sal_Bool SvTreeListBox::IsSublistOpenWithReturn() const
{
return pImp->bSubLstOpRet;
}
-void SvTreeListBox::SetSublistOpenWithLeftRight( BOOL b )
+void SvTreeListBox::SetSublistOpenWithLeftRight( sal_Bool b )
{
pImp->bSubLstOpLR = b;
}
-BOOL SvTreeListBox::IsSublistOpenWithLeftRight() const
+sal_Bool SvTreeListBox::IsSublistOpenWithLeftRight() const
{
return pImp->bSubLstOpLR;
}
@@ -175,12 +175,12 @@ void SvTreeListBox::Resize()
{
DBG_CHKTHIS(SvTreeListBox,0);
if( IsEditingActive() )
- EndEditing( TRUE );
+ EndEditing( sal_True );
SvLBox::Resize();
pImp->Resize();
nFocusWidth = -1;
- pImp->ShowCursor( FALSE );
- pImp->ShowCursor( TRUE );
+ pImp->ShowCursor( sal_False );
+ pImp->ShowCursor( sal_True );
}
/* Faelle:
@@ -220,11 +220,12 @@ void SvTreeListBox::SetTabs()
{
DBG_CHKTHIS(SvTreeListBox,0);
if( IsEditingActive() )
- EndEditing( TRUE );
+ EndEditing( sal_True );
nTreeFlags &= (~TREEFLAG_RECALCTABS);
nFocusWidth = -1;
- BOOL bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0;
- BOOL bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT |
+ const WinBits nStyle( GetStyle() );
+ sal_Bool bHasButtons = (nStyle & WB_HASBUTTONS)!=0;
+ sal_Bool bHasButtonsAtRoot = (nStyle & (WB_HASLINESATROOT |
WB_HASBUTTONSATROOT))!=0;
long nStartPos = TAB_STARTPOS;
long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width();
@@ -349,8 +350,8 @@ String SvTreeListBox::SearchEntryText( SvLBoxEntry* pEntry ) const
DBG_CHKTHIS(SvTreeListBox,0);
DBG_ASSERT( pEntry, "SvTreeListBox::SearchEntryText(): no entry" );
String sRet;
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
SvLBoxItem* pItem;
while( nCur < nCount )
{
@@ -396,7 +397,7 @@ IMPL_LINK_INLINE_END( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData
SvLBoxEntry* SvTreeListBox::InsertEntry(
const XubString& aText,
SvLBoxEntry* pParent,
- BOOL bChildsOnDemand, ULONG nPos,
+ sal_Bool bChildsOnDemand, sal_uLong nPos,
void* pUser,
SvLBoxButtonKind eButtonKind
)
@@ -430,7 +431,7 @@ SvLBoxEntry* SvTreeListBox::InsertEntry(
SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,
const Image& aExpEntryBmp, const Image& aCollEntryBmp,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos, void* pUser,
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uLong nPos, void* pUser,
SvLBoxButtonKind eButtonKind )
{
DBG_CHKTHIS(SvTreeListBox,0);
@@ -513,7 +514,7 @@ void SvTreeListBox::ImpEntryInserted( SvLBoxEntry* pEntry )
SvLBoxEntry* pParent = (SvLBoxEntry*)pModel->GetParent( pEntry );
if( pParent )
{
- USHORT nFlags = pParent->GetFlags();
+ sal_uInt16 nFlags = pParent->GetFlags();
nFlags &= ~SV_ENTRYFLAG_NO_NODEBMP;
pParent->SetFlags( nFlags );
}
@@ -575,7 +576,7 @@ SvButtonState SvTreeListBox::GetCheckButtonState( SvLBoxEntry* pEntry ) const
SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
if(!pItem)
return SV_BUTTON_TRISTATE;
- USHORT nButtonFlags = pItem->GetButtonFlags();
+ sal_uInt16 nButtonFlags = pItem->GetButtonFlags();
eState = pCheckButtonData->ConvertToButtonState( nButtonFlags );
}
return eState;
@@ -626,7 +627,7 @@ SvLBoxEntry* SvTreeListBox::CloneEntry( SvLBoxEntry* pSource )
return pClone;
}
-void SvTreeListBox::ShowExpandBitmapOnCursor( BOOL bYes )
+void SvTreeListBox::ShowExpandBitmapOnCursor( sal_Bool bYes )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( bYes )
@@ -719,19 +720,19 @@ void SvTreeListBox::SetNodeBitmaps( const Image& rCollapsedNodeBmp, const Image&
SetTabs();
}
-BOOL SvTreeListBox::EditingEntry( SvLBoxEntry*, Selection& )
+sal_Bool SvTreeListBox::EditingEntry( SvLBoxEntry*, Selection& )
{
DBG_CHKTHIS(SvTreeListBox,0);
- return TRUE;
+ return sal_True;
}
-BOOL SvTreeListBox::EditedEntry( SvLBoxEntry* /*pEntry*/,const XubString& /*rNewText*/)
+sal_Bool SvTreeListBox::EditedEntry( SvLBoxEntry* /*pEntry*/,const XubString& /*rNewText*/)
{
DBG_CHKTHIS(SvTreeListBox,0);
- return TRUE;
+ return sal_True;
}
-void SvTreeListBox::EnableInplaceEditing( BOOL bOn )
+void SvTreeListBox::EnableInplaceEditing( sal_Bool bOn )
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBox::EnableInplaceEditing( bOn );
@@ -747,7 +748,7 @@ void SvTreeListBox::KeyInput( const KeyEvent& rKEvt )
nImpFlags |= SVLBOX_IS_TRAVELSELECT;
#ifdef OVDEBUG
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch ( nCode )
{
case KEY_F1:
@@ -771,7 +772,7 @@ void SvTreeListBox::RequestingChilds( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( !pParent->HasChilds() )
- InsertEntry( String::CreateFromAscii("<dummy>"), pParent, FALSE, LIST_APPEND );
+ InsertEntry( String::CreateFromAscii("<dummy>"), pParent, sal_False, LIST_APPEND );
}
void SvTreeListBox::GetFocus()
@@ -815,7 +816,7 @@ void SvTreeListBox::ModelHasCleared()
SvLBox::ModelHasCleared();
}
-void SvTreeListBox::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL /* bShow */ )
+void SvTreeListBox::ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool /* bShow */ )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->PaintDDCursor( pEntry );
@@ -839,13 +840,13 @@ void SvTreeListBox::ScrollOutputArea( short nDeltaEntries )
long nTemp = nThumb + nVis;
if( nDeltaEntries > (nMax - nTemp) )
nDeltaEntries = (short)(nMax - nTemp);
- pImp->PageDown( (USHORT)nDeltaEntries );
+ pImp->PageDown( (sal_uInt16)nDeltaEntries );
}
else
{
if( nDeltaEntries > nThumb )
nDeltaEntries = (short)nThumb;
- pImp->PageUp( (USHORT)nDeltaEntries );
+ pImp->PageUp( (sal_uInt16)nDeltaEntries );
}
pImp->SyncVerThumb();
NotifyEndScroll();
@@ -889,8 +890,8 @@ void SvTreeListBox::SetEntryHeight( SvLBoxEntry* pEntry )
{
DBG_CHKTHIS(SvTreeListBox,0);
short nHeight, nHeightMax=0;
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
SvViewDataEntry* pViewData = GetViewDataEntry( pEntry );
while( nCur < nCount )
{
@@ -909,7 +910,7 @@ void SvTreeListBox::SetEntryHeight( SvLBoxEntry* pEntry )
}
}
-void SvTreeListBox::SetEntryHeight( short nHeight, BOOL bAlways )
+void SvTreeListBox::SetEntryHeight( short nHeight, sal_Bool bAlways )
{
DBG_CHKTHIS(SvTreeListBox,0);
@@ -950,12 +951,12 @@ void SvTreeListBox::AdjustEntryHeight( const Font& rFont )
}
}
-BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent )
+sal_Bool SvTreeListBox::Expand( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
pHdlEntry = pParent;
- BOOL bExpanded = FALSE;
- USHORT nFlags;
+ sal_Bool bExpanded = sal_False;
+ sal_uInt16 nFlags;
if( pParent->HasChildsOnDemand() )
RequestingChilds( pParent );
@@ -964,7 +965,7 @@ BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent )
nImpFlags |= SVLBOX_IS_EXPANDING;
if( ExpandingHdl() )
{
- bExpanded = TRUE;
+ bExpanded = sal_True;
SvListView::Expand( pParent );
pImp->EntryExpanded( pParent );
pHdlEntry = pParent;
@@ -992,16 +993,16 @@ BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent )
return bExpanded;
}
-BOOL SvTreeListBox::Collapse( SvLBoxEntry* pParent )
+sal_Bool SvTreeListBox::Collapse( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
nImpFlags &= ~SVLBOX_IS_EXPANDING;
pHdlEntry = pParent;
- BOOL bCollapsed = FALSE;
+ sal_Bool bCollapsed = sal_False;
if( ExpandingHdl() )
{
- bCollapsed = TRUE;
+ bCollapsed = sal_True;
pImp->CollapsingEntry( pParent );
SvListView::Collapse( pParent );
pImp->EntryCollapsed( pParent );
@@ -1018,11 +1019,11 @@ BOOL SvTreeListBox::Collapse( SvLBoxEntry* pParent )
return bCollapsed;
}
-BOOL SvTreeListBox::Select( SvLBoxEntry* pEntry, BOOL bSelect )
+sal_Bool SvTreeListBox::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
DBG_CHKTHIS(SvTreeListBox,0);
DBG_ASSERT(pEntry,"Select: Null-Ptr");
- BOOL bRetVal = SvListView::Select( pEntry, bSelect );
+ sal_Bool bRetVal = SvListView::Select( pEntry, bSelect );
DBG_ASSERT(IsSelected(pEntry)==bSelect,"Select failed");
if( bRetVal )
{
@@ -1039,14 +1040,14 @@ BOOL SvTreeListBox::Select( SvLBoxEntry* pEntry, BOOL bSelect )
return bRetVal;
}
-ULONG SvTreeListBox::SelectChilds( SvLBoxEntry* pParent, BOOL bSelect )
+sal_uLong SvTreeListBox::SelectChilds( SvLBoxEntry* pParent, sal_Bool bSelect )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->DestroyAnchor();
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( !pParent->HasChilds() )
return 0;
- USHORT nRefDepth = pModel->GetDepth( pParent );
+ sal_uInt16 nRefDepth = pModel->GetDepth( pParent );
SvLBoxEntry* pChild = FirstChild( pParent );
do {
nRet++;
@@ -1056,19 +1057,19 @@ ULONG SvTreeListBox::SelectChilds( SvLBoxEntry* pParent, BOOL bSelect )
return nRet;
}
-void SvTreeListBox::SelectAll( BOOL bSelect, BOOL )
+void SvTreeListBox::SelectAll( sal_Bool bSelect, sal_Bool )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SelAllDestrAnch(
bSelect,
- TRUE, // Anker loeschen,
- TRUE ); // auch bei SINGLE_SELECTION den Cursor deselektieren
+ sal_True, // Anker loeschen,
+ sal_True ); // auch bei SINGLE_SELECTION den Cursor deselektieren
}
void SvTreeListBox::ModelHasInsertedTree( SvListEntry* pEntry )
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nRefDepth = pModel->GetDepth( (SvLBoxEntry*)pEntry );
+ sal_uInt16 nRefDepth = pModel->GetDepth( (SvLBoxEntry*)pEntry );
SvLBoxEntry* pTmp = (SvLBoxEntry*)pEntry;
do
{
@@ -1087,7 +1088,7 @@ void SvTreeListBox::ModelHasInserted( SvListEntry* pEntry )
void SvTreeListBox::ModelIsMoving(SvListEntry* pSource,
SvListEntry* /* pTargetParent */,
- ULONG /* nChildPos */ )
+ sal_uLong /* nChildPos */ )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->MovingEntry( (SvLBoxEntry*)pSource );
@@ -1109,9 +1110,11 @@ void SvTreeListBox::ModelIsRemoving( SvListEntry* pEntry )
NotifyRemoving( (SvLBoxEntry*)pEntry );
}
-void SvTreeListBox::ModelHasRemoved( SvListEntry* /* pEntry */ )
+void SvTreeListBox::ModelHasRemoved( SvListEntry* pEntry )
{
DBG_CHKTHIS(SvTreeListBox,0);
+ if ( pEntry == pHdlEntry)
+ pHdlEntry = NULL;
pImp->EntryRemoved();
}
@@ -1134,7 +1137,7 @@ void SvTreeListBox::SetFont( const Font& rFont )
{
DBG_CHKTHIS(SvTreeListBox,0);
Font aTempFont( rFont );
- aTempFont.SetTransparent( TRUE );
+ aTempFont.SetTransparent( sal_True );
Control::SetFont( aTempFont );
AdjustEntryHeight( aTempFont );
// immer Invalidieren, sonst fallen wir
@@ -1171,13 +1174,13 @@ void SvTreeListBox::MouseMove( const MouseEvent& rMEvt )
}
-void SvTreeListBox::SetUpdateMode( BOOL bUpdate )
+void SvTreeListBox::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SetUpdateMode( bUpdate );
}
-void SvTreeListBox::SetUpdateModeFast( BOOL bUpdate )
+void SvTreeListBox::SetUpdateModeFast( sal_Bool bUpdate )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SetUpdateModeFast( bUpdate );
@@ -1197,7 +1200,7 @@ void SvTreeListBox::SetSpaceBetweenEntries( short nOffsLogic )
}
}
-void SvTreeListBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
+void SvTreeListBox::SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SetCursor(pEntry, bForceNoSelect);
@@ -1234,7 +1237,7 @@ void SvTreeListBox::MakeVisible( SvLBoxEntry* pEntry )
pImp->MakeVisible(pEntry);
}
-void SvTreeListBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
+void SvTreeListBox::MakeVisible( SvLBoxEntry* pEntry, sal_Bool bMoveToTop )
{
pImp->MakeVisible( pEntry, bMoveToTop );
}
@@ -1255,11 +1258,11 @@ void SvTreeListBox::EditItemText( SvLBoxEntry* pEntry, SvLBoxString* pItem,
DBG_ASSERT(pEntry&&pItem,"EditItemText: Bad params");
if( IsSelected( pEntry ))
{
- pImp->ShowCursor( FALSE );
- SvListView::Select( pEntry, FALSE );
+ pImp->ShowCursor( sal_False );
+ SvListView::Select( pEntry, sal_False );
PaintEntry( pEntry );
- SvListView::Select( pEntry, TRUE );
- pImp->ShowCursor( TRUE );
+ SvListView::Select( pEntry, sal_True );
+ pImp->ShowCursor( sal_True );
}
pEdEntry = pEntry;
pEdItem = pItem;
@@ -1272,7 +1275,7 @@ void SvTreeListBox::EditItemText( SvLBoxEntry* pEntry, SvLBoxString* pItem,
aPos.X() = GetTabPos( pEntry, pTab );
long nOutputWidth = pImp->GetOutputSize().Width();
Size aSize( nOutputWidth - aPos.X(), aItemSize.Height() );
- USHORT nPos = aTabs.GetPos( pTab );
+ sal_uInt16 nPos = aTabs.GetPos( pTab );
if( nPos+1 < aTabs.Count() )
{
SvLBoxTab* pRightTab = (SvLBoxTab*)aTabs.GetObject( nPos + 1 );
@@ -1318,8 +1321,8 @@ void SvTreeListBox::ImplEditEntry( SvLBoxEntry* pEntry )
bool bIsMouseTriggered = nClickX >= 0;
SvLBoxString* pItem = NULL;
- USHORT nCount = pEntry->ItemCount();
- for( USHORT i = 0 ; i < nCount ; i++ )
+ sal_uInt16 nCount = pEntry->ItemCount();
+ for( sal_uInt16 i = 0 ; i < nCount ; i++ )
{
SvLBoxItem* pTmpItem = pEntry->GetItem( i );
if( pTmpItem->IsA() != SV_ITEM_ID_LBOXSTRING )
@@ -1348,7 +1351,7 @@ void SvTreeListBox::ImplEditEntry( SvLBoxEntry* pEntry )
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if( pItem && EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
MakeVisible( pEntry );
EditItemText( pEntry, pItem, aSel );
}
@@ -1394,7 +1397,7 @@ void SvTreeListBox::EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if( EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
EditItemText( pEntry, (SvLBoxString*)pItem, aSel );
}
}
@@ -1408,7 +1411,7 @@ SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
// Scrollen
if( rPos.Y() < 12 )
{
- SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, FALSE );
+ SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, sal_False );
ScrollOutputArea( +1 );
}
else
@@ -1416,7 +1419,7 @@ SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
Size aSize( pImp->GetOutputSize() );
if( rPos.Y() > aSize.Height() - 12 )
{
- SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, FALSE );
+ SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, sal_False );
ScrollOutputArea( -1 );
}
}
@@ -1433,7 +1436,7 @@ SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
}
-SvLBoxEntry* SvTreeListBox::GetEntry( const Point& rPos, BOOL bHit ) const
+SvLBoxEntry* SvTreeListBox::GetEntry( const Point& rPos, sal_Bool bHit ) const
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBoxEntry* pEntry = pImp->GetEntry( rPos );
@@ -1452,12 +1455,14 @@ SvLBoxEntry* SvTreeListBox::GetCurEntry() const
return pImp->GetCurEntry();
}
-void SvTreeListBox::SetWindowBits( WinBits nWinStyle )
+void SvTreeListBox::ImplInitStyle()
{
DBG_CHKTHIS(SvTreeListBox,0);
- nWindowStyle = nWinStyle;
+
+ const WinBits nWindowStyle = GetStyle();
+
nTreeFlags |= TREEFLAG_RECALCTABS;
- if( nWinStyle & WB_SORT )
+ if( nWindowStyle & WB_SORT )
{
GetModel()->SetSortMode( SortAscending );
GetModel()->SetCompareHdl( LINK(this,SvTreeListBox,DefaultCompare));
@@ -1468,9 +1473,9 @@ void SvTreeListBox::SetWindowBits( WinBits nWinStyle )
GetModel()->SetCompareHdl( Link() );
}
#ifdef OS2
- nWinStyle |= WB_VSCROLL;
+ nWindowStyle |= WB_VSCROLL;
#endif
- pImp->SetWindowBits( nWinStyle );
+ pImp->SetStyle( nWindowStyle );
pImp->Resize();
Invalidate();
}
@@ -1494,21 +1499,21 @@ void SvTreeListBox::InvalidateEntry( SvLBoxEntry* pEntry )
}
-long SvTreeListBox::PaintEntry(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags)
+long SvTreeListBox::PaintEntry(SvLBoxEntry* pEntry,long nLine,sal_uInt16 nTabFlags)
{
return PaintEntry1(pEntry,nLine,nTabFlags);
}
#define SV_TAB_BORDER 8
-long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
- BOOL bHasClipRegion )
+long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,sal_uInt16 nTabFlags,
+ sal_Bool bHasClipRegion )
{
DBG_CHKTHIS(SvTreeListBox,0);
Rectangle aRect; // multi purpose
- BOOL bHorSBar = pImp->HasHorScrollBar();
+ sal_Bool bHorSBar = pImp->HasHorScrollBar();
PreparePaint( pEntry );
pImp->UpdateContextBmpWidthMax( pEntry );
@@ -1533,11 +1538,12 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
Color aBackupColor = GetFillColor();
bool bCurFontIsSel = false;
- BOOL bInUse = pEntry->HasInUseEmphasis();
+ sal_Bool bInUse = pEntry->HasInUseEmphasis();
// wenn eine ClipRegion von aussen gesetzt wird, dann
// diese nicht zuruecksetzen
- BOOL bResetClipRegion = !bHasClipRegion;
- BOOL bHideSelection = ((nWindowStyle & WB_HIDESELECTION) && !HasFocus())!=0;
+ const WinBits nWindowStyle = GetStyle();
+ const sal_Bool bResetClipRegion = !bHasClipRegion;
+ const sal_Bool bHideSelection = ((nWindowStyle & WB_HIDESELECTION) && !HasFocus())!=0;
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
Font aHighlightFont( GetFont() );
@@ -1549,24 +1555,24 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
if( !bHasClipRegion && nWindowStyle & WB_HSCROLL )
{
SetClipRegion( Region(pImp->GetClipRegionRect()) );
- bHasClipRegion = TRUE;
+ bHasClipRegion = sal_True;
}
SvViewDataEntry* pViewDataEntry = GetViewDataEntry( pEntry );
- USHORT nTabCount = aTabs.Count();
- USHORT nItemCount = pEntry->ItemCount();
- USHORT nCurTab = 0;
- USHORT nCurItem = 0;
+ sal_uInt16 nTabCount = aTabs.Count();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
+ sal_uInt16 nCurTab = 0;
+ sal_uInt16 nCurItem = 0;
while( nCurTab < nTabCount && nCurItem < nItemCount )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( nCurTab );
- USHORT nNextTab = nCurTab + 1;
+ sal_uInt16 nNextTab = nCurTab + 1;
SvLBoxTab* pNextTab = nNextTab < nTabCount ? (SvLBoxTab*)aTabs.GetObject(nNextTab) : 0;
SvLBoxItem* pItem = nCurItem < nItemCount ? pEntry->GetItem(nCurItem) : 0;
- USHORT nFlags = pTab->nFlags;
+ sal_uInt16 nFlags = pTab->nFlags;
Size aSize( pItem->GetSize( pViewDataEntry, nCurItem ));
long nTabPos = GetTabPos( pEntry, pTab );
@@ -1592,7 +1598,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
if( !bHasClipRegion && nX + aSize.Width() >= nMaxRight )
{
SetClipRegion( Region(pImp->GetClipRegionRect()) );
- bHasClipRegion = TRUE;
+ bHasClipRegion = sal_True;
}
aEntryPos.X() = nX;
aEntryPos.Y() = nLine;
@@ -1602,7 +1608,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
Wallpaper aWallpaper = GetBackground();
int bSelTab = nFlags & SV_LBOXTAB_SHOW_SELECTION;
- USHORT nItemType = pItem->IsA();
+ sal_uInt16 nItemType = pItem->IsA();
if ( pViewDataEntry->IsSelected() && bSelTab && !pViewDataEntry->IsCursored() )
{
@@ -1716,7 +1722,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
SetFont( aBackupFont );
}
- USHORT nFirstDynTabPos;
+ sal_uInt16 nFirstDynTabPos;
SvLBoxTab* pFirstDynamicTab = GetFirstDynamicTab( nFirstDynTabPos );
long nDynTabPos = GetTabPos( pEntry, pFirstDynamicTab );
nDynTabPos += pImp->nNodeBmpTabDistance;
@@ -1730,7 +1736,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
{
// ersten festen Tab suchen, und pruefen ob die Node-Bitmap
// in ihn hineinragt
- USHORT nNextTab = nFirstDynTabPos;
+ sal_uInt16 nNextTab = nFirstDynTabPos;
SvLBoxTab* pNextTab;
do
{
@@ -1760,12 +1766,12 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
}
aPos.Y() += (nTempEntryHeight - pImg->GetSizePixel().Height()) / 2;
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( !IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
//native
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if ( IsNativeControlSupported( CTRL_LISTNODE, PART_ENTIRE_CONTROL) )
{
ImplControlValue aControlValue;
@@ -1820,7 +1826,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvLBoxEntry* pEntry, long nLine )
long nRealWidth = pImp->GetOutputSize().Width();
nRealWidth -= GetMapMode().GetOrigin().X();
- USHORT nCurTab;
+ sal_uInt16 nCurTab;
SvLBoxTab* pTab = GetFirstTab( SV_LBOXTAB_SHOW_SELECTION, nCurTab );
long nTabPos = 0;
if( pTab )
@@ -1838,7 +1844,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvLBoxEntry* pEntry, long nLine )
nNextTabPos += 50;
}
- BOOL bUserSelection = (BOOL)( nTreeFlags & TREEFLAG_USESEL ) != 0;
+ sal_Bool bUserSelection = (sal_Bool)( nTreeFlags & TREEFLAG_USESEL ) != 0;
if( !bUserSelection )
{
if( pTab && nCurTab < pEntry->ItemCount() )
@@ -1863,7 +1869,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvLBoxEntry* pEntry, long nLine )
// wenn erster SelTab != 0, dann muessen wir auch rechnen
if( nFocusWidth == -1 || nFirstSelTab )
{
- USHORT nLastTab;
+ sal_uInt16 nLastTab;
SvLBoxTab* pLastTab = GetLastTab(SV_LBOXTAB_SHOW_SELECTION,nLastTab);
nLastTab++;
if( nLastTab < aTabs.Count() ) // gibts noch einen ?
@@ -1911,23 +1917,23 @@ long SvTreeListBox::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
long nPos = pTab->GetPos();
if( pTab->IsDynamic() )
{
- USHORT nDepth = pModel->GetDepth( pEntry );
- nDepth = nDepth * (USHORT)nIndent;
+ sal_uInt16 nDepth = pModel->GetDepth( pEntry );
+ nDepth = nDepth * (sal_uInt16)nIndent;
nPos += (long)nDepth;
}
return nPos;
}
SvLBoxItem* SvTreeListBox::GetItem_Impl( SvLBoxEntry* pEntry, long nX,
- SvLBoxTab** ppTab, USHORT nEmptyWidth )
+ SvLBoxTab** ppTab, sal_uInt16 nEmptyWidth )
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBoxItem* pItemClicked = 0;
- USHORT nTabCount = aTabs.Count();
- USHORT nItemCount = pEntry->ItemCount();
+ sal_uInt16 nTabCount = aTabs.Count();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0);
SvLBoxItem* pItem = pEntry->GetItem(0);
- USHORT nNextItem = 1;
+ sal_uInt16 nNextItem = 1;
nX -= GetMapMode().GetOrigin().X();
long nRealWidth = pImp->GetOutputSize().Width();
nRealWidth -= GetMapMode().GetOrigin().X();
@@ -1996,9 +2002,9 @@ SvLBoxItem* SvTreeListBox::GetFirstDynamicItem( SvLBoxEntry* pEntry )
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0);
SvLBoxItem* pItem = pEntry->GetItem(0);
- USHORT nTabCount = aTabs.Count();
+ sal_uInt16 nTabCount = aTabs.Count();
- USHORT nNext = 1;
+ sal_uInt16 nNext = 1;
while ( !pTab->IsDynamic() && nNext < nTabCount )
{
pItem = pEntry->GetItem( nNext );
@@ -2008,7 +2014,7 @@ SvLBoxItem* SvTreeListBox::GetFirstDynamicItem( SvLBoxEntry* pEntry )
return pItem;
}
-void SvTreeListBox::AddTab(long nTabPos,USHORT nFlags,void* pUserData )
+void SvTreeListBox::AddTab(long nTabPos,sal_uInt16 nFlags,void* pUserData )
{
DBG_CHKTHIS(SvTreeListBox,0);
nFocusWidth = -1;
@@ -2017,7 +2023,7 @@ void SvTreeListBox::AddTab(long nTabPos,USHORT nFlags,void* pUserData )
aTabs.Insert( pTab, aTabs.Count() );
if( nTreeFlags & TREEFLAG_USESEL )
{
- USHORT nPos = aTabs.Count() - 1;
+ sal_uInt16 nPos = aTabs.Count() - 1;
if( nPos >= nFirstSelTab && nPos <= nLastSelTab )
pTab->nFlags |= SV_LBOXTAB_SHOW_SELECTION;
else
@@ -2029,11 +2035,11 @@ void SvTreeListBox::AddTab(long nTabPos,USHORT nFlags,void* pUserData )
-SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( USHORT& rPos ) const
+SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( sal_uInt16& rPos ) const
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nCurTab = 0;
- USHORT nTabCount = aTabs.Count();
+ sal_uInt16 nCurTab = 0;
+ sal_uInt16 nTabCount = aTabs.Count();
while( nCurTab < nTabCount )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(nCurTab);
@@ -2049,21 +2055,21 @@ SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( USHORT& rPos ) const
SvLBoxTab* SvTreeListBox::GetFirstDynamicTab() const
{
- USHORT nDummy;
+ sal_uInt16 nDummy;
return GetFirstDynamicTab( nDummy );
}
SvLBoxTab* SvTreeListBox::GetTab( SvLBoxEntry* pEntry, SvLBoxItem* pItem) const
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nPos = pEntry->GetPos( pItem );
+ sal_uInt16 nPos = pEntry->GetPos( pItem );
return (SvLBoxTab*)aTabs.GetObject( nPos );
}
void SvTreeListBox::ClearTabList()
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nTabCount = aTabs.Count();
+ sal_uInt16 nTabCount = aTabs.Count();
while( nTabCount )
{
nTabCount--;
@@ -2107,7 +2113,7 @@ void SvTreeListBox::NotifyInvalidating()
DBG_CHKTHIS(SvTreeListBox,0);
}
-void SvTreeListBox::Invalidate( USHORT nInvalidateFlags )
+void SvTreeListBox::Invalidate( sal_uInt16 nInvalidateFlags )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( nFocusWidth == -1 )
@@ -2118,7 +2124,7 @@ void SvTreeListBox::Invalidate( USHORT nInvalidateFlags )
pImp->Invalidate();
}
-void SvTreeListBox::Invalidate( const Rectangle& rRect, USHORT nInvalidateFlags )
+void SvTreeListBox::Invalidate( const Rectangle& rRect, sal_uInt16 nInvalidateFlags )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( nFocusWidth == -1 )
@@ -2129,11 +2135,11 @@ void SvTreeListBox::Invalidate( const Rectangle& rRect, USHORT nInvalidateFlags
}
-void SvTreeListBox::SetHighlightRange( USHORT nStart, USHORT nEnd)
+void SvTreeListBox::SetHighlightRange( sal_uInt16 nStart, sal_uInt16 nEnd)
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nTemp;
+ sal_uInt16 nTemp;
nTreeFlags |= TREEFLAG_USESEL;
if( nStart > nEnd )
{
@@ -2156,12 +2162,12 @@ void SvTreeListBox::RemoveHighlightRange()
Invalidate();
}
-ULONG SvTreeListBox::GetAscInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
+sal_uLong SvTreeListBox::GetAscInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
{
return LIST_APPEND;
}
-ULONG SvTreeListBox::GetDescInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
+sal_uLong SvTreeListBox::GetDescInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
{
DBG_CHKTHIS(SvTreeListBox,0);
return LIST_APPEND;
@@ -2185,8 +2191,8 @@ Region SvTreeListBox::GetDragRegion() const
void SvTreeListBox::Command( const CommandEvent& rCEvt )
{
DBG_CHKTHIS(SvTreeListBox,0);
- if ( !pImp->Command( rCEvt ) )
- SvLBox::Command( rCEvt );
+ // FIXME gnumake2 resync to DEV300_m84
+ pImp->Command( rCEvt );
}
@@ -2207,10 +2213,10 @@ void SvTreeListBox::RemoveParentKeepChilds( SvLBoxEntry* pParent )
pModel->Remove( pParent );
}
-SvLBoxTab* SvTreeListBox::GetFirstTab( USHORT nFlagMask, USHORT& rPos )
+SvLBoxTab* SvTreeListBox::GetFirstTab( sal_uInt16 nFlagMask, sal_uInt16& rPos )
{
- USHORT nTabCount = aTabs.Count();
- for( USHORT nPos = 0; nPos < nTabCount; nPos++ )
+ sal_uInt16 nTabCount = aTabs.Count();
+ for( sal_uInt16 nPos = 0; nPos < nTabCount; nPos++ )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( nPos );
if( (pTab->nFlags & nFlagMask) )
@@ -2223,17 +2229,17 @@ SvLBoxTab* SvTreeListBox::GetFirstTab( USHORT nFlagMask, USHORT& rPos )
return 0;
}
-SvLBoxTab* SvTreeListBox::GetLastTab( USHORT nFlagMask, USHORT& rTabPos )
+SvLBoxTab* SvTreeListBox::GetLastTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos )
{
short nTabCount = (short)aTabs.Count();
if( nTabCount )
{
for( short nPos = nTabCount-1; nPos >= 0; nPos-- )
{
- SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( (USHORT)nPos );
+ SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( (sal_uInt16)nPos );
if( (pTab->nFlags & nFlagMask) )
{
- rTabPos = (USHORT)nPos;
+ rTabPos = (sal_uInt16)nPos;
return pTab;
}
}
@@ -2242,12 +2248,12 @@ SvLBoxTab* SvTreeListBox::GetLastTab( USHORT nFlagMask, USHORT& rTabPos )
return 0;
}
-void SvTreeListBox::SetAddMode( BOOL bAdd )
+void SvTreeListBox::SetAddMode( sal_Bool bAdd )
{
pImp->SetAddMode( bAdd );
}
-BOOL SvTreeListBox::IsAddMode() const
+sal_Bool SvTreeListBox::IsAddMode() const
{
return pImp->IsAddMode();
}
@@ -2272,8 +2278,8 @@ IMPL_LINK( SvTreeListBox, DefaultCompare, SvSortData*, pData )
return pImp->pIntlWrapper->getCaseCollator()->compareString( aLeft, aRight );
}
-void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvTreeListBox::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
if( nActionId == LISTACTION_CLEARING )
CancelTextEditing();
@@ -2301,14 +2307,14 @@ void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
break;
case LISTACTION_RESORTING:
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
break;
case LISTACTION_RESORTED:
// nach Sortierung den ersten Eintrag anzeigen, dabei die
// Selektion erhalten.
- MakeVisible( (SvLBoxEntry*)pModel->First(), TRUE );
- SetUpdateMode( TRUE );
+ MakeVisible( (SvLBoxEntry*)pModel->First(), sal_True );
+ SetUpdateMode( sal_True );
break;
case LISTACTION_CLEARED:
@@ -2322,8 +2328,9 @@ void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
long SvTreeListBox::GetTextOffset() const
{
DBG_CHKTHIS(SvTreeListBox,0);
- BOOL bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0;
- BOOL bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT |
+ const WinBits nWindowStyle = GetStyle();
+ sal_Bool bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0;
+ sal_Bool bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT |
WB_HASBUTTONSATROOT))!=0;
long nStartPos = TAB_STARTPOS;
long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width();
@@ -2401,12 +2408,12 @@ void SvTreeListBox::EndSelection()
pImp->EndSelection();
}
-BOOL SvTreeListBox::IsNodeButton( const Point& rPos ) const
+sal_Bool SvTreeListBox::IsNodeButton( const Point& rPos ) const
{
SvLBoxEntry* pEntry = GetEntry( rPos );
if( pEntry )
return pImp->IsNodeButton( rPos, pEntry );
- return FALSE;
+ return sal_False;
}
void SvTreeListBox::RepaintScrollBars() const
@@ -2424,7 +2431,7 @@ ScrollBar *SvTreeListBox::GetHScroll()
return &((SvTreeListBox*)this)->pImp->aHorSBar;
}
-void SvTreeListBox::EnableAsyncDrag( BOOL b )
+void SvTreeListBox::EnableAsyncDrag( sal_Bool b )
{
pImp->EnableAsyncDrag( b );
}
@@ -2462,9 +2469,9 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt )
{
if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- nEntryHeight = 0; // _together_ with TRUE of 1. par (bFont) of InitSettings() a zero-height
+ nEntryHeight = 0; // _together_ with sal_True of 1. par (bFont) of InitSettings() a zero-height
// forces complete recalc of heights!
- InitSettings( TRUE, TRUE, TRUE );
+ InitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
else
@@ -2474,9 +2481,11 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt )
void SvTreeListBox::StateChanged( StateChangedType i_nStateChange )
{
SvLBox::StateChanged( i_nStateChange );
+ if ( i_nStateChange == STATE_CHANGE_STYLE )
+ ImplInitStyle();
}
-void SvTreeListBox::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground)
+void SvTreeListBox::InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont )
@@ -2503,17 +2512,17 @@ void SvTreeListBox::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground)
pCheckButtonData->SetDefaultImages( this );
}
-BOOL SvTreeListBox::IsCellFocusEnabled() const
+sal_Bool SvTreeListBox::IsCellFocusEnabled() const
{
return pImp->IsCellFocusEnabled();
}
-bool SvTreeListBox::SetCurrentTabPos( USHORT _nNewPos )
+bool SvTreeListBox::SetCurrentTabPos( sal_uInt16 _nNewPos )
{
return pImp->SetCurrentTabPos( _nNewPos );
}
-USHORT SvTreeListBox::GetCurrentTabPos() const
+sal_uInt16 SvTreeListBox::GetCurrentTabPos() const
{
return pImp->GetCurrentTabPos();
}
@@ -2535,7 +2544,7 @@ PopupMenu* SvTreeListBox::CreateContextMenu( void )
return NULL;
}
-void SvTreeListBox::ExcecuteContextMenuAction( USHORT )
+void SvTreeListBox::ExcecuteContextMenuAction( sal_uInt16 )
{
DBG_WARNING( "SvTreeListBox::ExcecuteContextMenuAction(): now there's happening nothing!" );
}
@@ -2544,17 +2553,17 @@ void SvTreeListBox::EnableContextMenuHandling( void )
{
DBG_ASSERT( pImp, "-SvTreeListBox::EnableContextMenuHandling(): No implementation!" );
- pImp->bContextMenuHandling = TRUE;
+ pImp->bContextMenuHandling = sal_True;
}
-void SvTreeListBox::EnableContextMenuHandling( BOOL b )
+void SvTreeListBox::EnableContextMenuHandling( sal_Bool b )
{
DBG_ASSERT( pImp, "-SvTreeListBox::EnableContextMenuHandling(): No implementation!" );
pImp->bContextMenuHandling = b;
}
-BOOL SvTreeListBox::IsContextMenuHandlingEnabled( void ) const
+sal_Bool SvTreeListBox::IsContextMenuHandlingEnabled( void ) const
{
DBG_ASSERT( pImp, "-SvTreeListBox::IsContextMenuHandlingEnabled(): No implementation!" );
@@ -2619,7 +2628,7 @@ void SvTreeListBox::EnableCellFocus()
pImp->EnableCellFocus();
}
-void SvTreeListBox::CallImplEventListeners(ULONG nEvent, void* pData)
+void SvTreeListBox::CallImplEventListeners(sal_uLong nEvent, void* pData)
{
CallEventListeners(nEvent, pData);
}
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 9cd0add24eda..ea768918e460 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svtools.hxx"
#include "templwin.hxx"
-#include "templdlg.hxx"
+#include <svtools/templdlg.hxx>
#include <svtools/svtdata.hxx>
#include <svtools/langhelp.hxx>
#include <unotools/pathoptions.hxx>
@@ -37,18 +37,17 @@
#include <unotools/extendedsecurityoptions.hxx>
#include <svtools/xtextedt.hxx>
#include <svl/inettype.hxx>
-#include "imagemgr.hxx"
+#include <svtools/imagemgr.hxx>
#include <svtools/miscopt.hxx>
-#include "templatefoldercache.hxx"
-#include "imgdef.hxx"
-#include "txtattr.hxx"
+#include <svtools/templatefoldercache.hxx>
+#include <svtools/imgdef.hxx>
+#include <svtools/txtattr.hxx>
#include <svtools/svtools.hrc>
#include "templwin.hrc"
#include <svtools/helpid.hrc>
#include <unotools/pathoptions.hxx>
#include <unotools/viewoptions.hxx>
#include <unotools/ucbhelper.hxx>
-
#include "unotools/configmgr.hxx"
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -83,7 +82,7 @@
#include <vcl/svapp.hxx>
#include <vcl/split.hxx>
#include <vcl/msgbox.hxx>
-#include "DocumentInfoPreview.hxx"
+#include <svtools/DocumentInfoPreview.hxx>
#include <vcl/mnemonic.hxx>
#include <ucbhelper/content.hxx>
@@ -123,7 +122,7 @@ extern ::rtl::OUString CreateExactSizeText_Impl( sal_Int64 nSize ); // fileview.
struct FolderHistory
{
String m_sURL;
- ULONG m_nGroup;
+ sal_uLong m_nGroup;
FolderHistory( const String& _rURL, sal_Int32 _nGroup ) :
m_sURL( _rURL ), m_nGroup( _nGroup ) {}
@@ -135,7 +134,7 @@ ODocumentInfoPreview::ODocumentInfoPreview( Window* pParent ,WinBits _nBits) : W
{
m_pEditWin = new SvtExtendedMultiLineEdit_Impl(this,_nBits);
m_pEditWin->Show();
- m_pEditWin->EnableCursor( FALSE );
+ m_pEditWin->EnableCursor( sal_False );
m_pInfoTable = new SvtDocInfoTable_Impl();
// detect application language
m_aLocale = SvtPathOptions().GetLocale();
@@ -184,7 +183,7 @@ void ODocumentInfoPreview::fill(
if (!i_xDocProps.is()) throw RuntimeException();
::rtl::OUString aStr;
- m_pEditWin->SetAutoScroll( FALSE );
+ m_pEditWin->SetAutoScroll( sal_False );
aStr = i_xDocProps->getTitle();
if (aStr.getLength()) {
@@ -238,7 +237,7 @@ void ODocumentInfoPreview::fill(
// size
if ( i_rURL.Len() > 0 )
{
- ULONG nDocSize = ::utl::UCBContentHelper::GetSize( i_rURL );
+ sal_uLong nDocSize = ::utl::UCBContentHelper::GetSize( i_rURL );
m_pEditWin->InsertEntry(
m_pInfoTable->GetString( DI_SIZE ),
CreateExactSizeText_Impl( nDocSize ) );
@@ -286,7 +285,7 @@ void ODocumentInfoPreview::fill(
}
m_pEditWin->SetSelection( Selection( 0, 0 ) );
- m_pEditWin->SetAutoScroll( TRUE );
+ m_pEditWin->SetAutoScroll( sal_True );
}
// -----------------------------------------------------------------------------
@@ -341,7 +340,7 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
aIconCtrl.SetAccessibleName( String( RTL_CONSTASCII_USTRINGPARAM("Groups") ) );
aIconCtrl.SetHelpId( HID_TEMPLATEDLG_ICONCTRL );
- aIconCtrl.SetChoiceWithCursor( TRUE );
+ aIconCtrl.SetChoiceWithCursor( sal_True );
aIconCtrl.SetSelectionMode( SINGLE_SELECTION );
aIconCtrl.Show();
@@ -413,7 +412,7 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
SvtIconWindow_Impl::~SvtIconWindow_Impl()
{
- for ( ULONG i = 0; i < aIconCtrl.GetEntryCount(); ++i )
+ for ( sal_uLong i = 0; i < aIconCtrl.GetEntryCount(); ++i )
{
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetEntry( i );
delete (String*)pEntry->GetUserData();
@@ -423,7 +422,7 @@ SvtIconWindow_Impl::~SvtIconWindow_Impl()
SvxIconChoiceCtrlEntry* SvtIconWindow_Impl::GetEntry( const String& rURL ) const
{
SvxIconChoiceCtrlEntry* pEntry = NULL;
- for ( ULONG i = 0; i < aIconCtrl.GetEntryCount(); ++i )
+ for ( sal_uLong i = 0; i < aIconCtrl.GetEntryCount(); ++i )
{
SvxIconChoiceCtrlEntry* pTemp = aIconCtrl.GetEntry( i );
String aURL( *( (String*)pTemp->GetUserData() ) );
@@ -461,7 +460,7 @@ String SvtIconWindow_Impl::GetCursorPosIconURL() const
String SvtIconWindow_Impl::GetSelectedIconURL() const
{
- ULONG nPos;
+ sal_uLong nPos;
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetSelectedEntry( nPos );
String aURL;
if ( pEntry )
@@ -471,7 +470,7 @@ String SvtIconWindow_Impl::GetSelectedIconURL() const
String SvtIconWindow_Impl::GetSelectedIconText() const
{
- ULONG nPos;
+ sal_uLong nPos;
return MnemonicGenerator::EraseAllMnemonicChars( aIconCtrl.GetSelectedEntry( nPos )->GetText() );
}
@@ -489,9 +488,9 @@ void SvtIconWindow_Impl::InvalidateIconControl()
aIconCtrl.Invalidate();
}
-ULONG SvtIconWindow_Impl::GetCursorPos() const
+sal_uLong SvtIconWindow_Impl::GetCursorPos() const
{
- ULONG nPos = ~ULONG(0);
+ sal_uLong nPos = ~sal_uLong(0);
SvxIconChoiceCtrlEntry* pCursorEntry = aIconCtrl.GetCursor( );
if ( pCursorEntry )
@@ -500,15 +499,15 @@ ULONG SvtIconWindow_Impl::GetCursorPos() const
return nPos;
}
-ULONG SvtIconWindow_Impl::GetSelectEntryPos() const
+sal_uLong SvtIconWindow_Impl::GetSelectEntryPos() const
{
- ULONG nPos;
+ sal_uLong nPos;
if ( !aIconCtrl.GetSelectedEntry( nPos ) )
- nPos = ~ULONG(0);
+ nPos = ~sal_uLong(0);
return nPos;
}
-void SvtIconWindow_Impl::SetCursorPos( ULONG nPos )
+void SvtIconWindow_Impl::SetCursorPos( sal_uLong nPos )
{
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetEntry( nPos );
aIconCtrl.SetCursor( pEntry );
@@ -525,7 +524,7 @@ long SvtIconWindow_Impl::CalcHeight() const
{
// calculate the required height of the IconControl
long nHeight = 0;
- ULONG nCount = aIconCtrl.GetEntryCount();
+ sal_uLong nCount = aIconCtrl.GetEntryCount();
if ( nCount > 0 )
// bottom of the last icon
nHeight = aIconCtrl.GetEntry(nCount-1)->GetBoundRect().Bottom();
@@ -544,9 +543,9 @@ sal_Bool SvtIconWindow_Impl::IsRootURL( const String& rURL ) const
rURL == aSamplesFolderRootURL;
}
-ULONG SvtIconWindow_Impl::GetRootPos( const String& rURL ) const
+sal_uLong SvtIconWindow_Impl::GetRootPos( const String& rURL ) const
{
- ULONG nPos = ~ULONG(0);
+ sal_uLong nPos = ~sal_uLong(0);
if ( aNewDocumentRootURL.Match( rURL ) == STRING_MATCH )
nPos = 0;
else if ( aTemplateRootURL.Match( rURL ) == STRING_MATCH )
@@ -645,7 +644,7 @@ Sequence< ::rtl::OUString > SvtFileViewWindow_Impl::GetNewDocContents() const
::rtl::OUString aImageURL;
::rtl::OUString aTargetFrame;
- UINT32 i, nCount = aDynamicMenuEntries.getLength();
+ sal_uInt32 i, nCount = aDynamicMenuEntries.getLength();
::rtl::OUString sSeparator( ASCII_STR("private:separator") );
::rtl::OUString sSlotURL( ASCII_STR("slot:5500") );
@@ -787,7 +786,7 @@ void SvtExtendedMultiLineEdit_Impl::InsertEntry( const String& rTitle, const Str
aText += rTitle;
aText += ':';
InsertText( aText );
- ULONG nPara = GetParagraphCount() - 1;
+ sal_uLong nPara = GetParagraphCount() - 1;
SetAttrib( TextAttribFontWeight( WEIGHT_BOLD ), nPara, 0, aText.Len() );
aText = '\n';
@@ -967,7 +966,7 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B
// disabling must be done here, does not work in ctor because
// execute of the dialog will overwrite it
// ( own execute method would help )
- pTextWin->EnableInput( FALSE, TRUE );
+ pTextWin->EnableInput( sal_False, sal_True );
if ( pTextWin->IsReallyVisible() )
{
sal_Bool b = sal_True;
@@ -1123,7 +1122,7 @@ IMPL_LINK ( SvtTemplateWindow , IconClickHdl_Impl, SvtIconChoiceCtrl *, EMPTYARG
{
pFileWin->OpenRoot( aURL );
pIconWin->InvalidateIconControl();
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, FALSE );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
}
return 0;
}
@@ -1160,10 +1159,10 @@ IMPL_LINK ( SvtTemplateWindow , FileDblClickHdl_Impl, SvtFileView *, EMPTYARG )
IMPL_LINK ( SvtTemplateWindow , NewFolderHdl_Impl, SvtFileView *, EMPTYARG )
{
pFrameWin->OpenFile( String(), sal_True, sal_False, sal_False );
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, FALSE );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
String sURL = pFileWin->GetFolderURL();
- ULONG nPos = pIconWin->GetRootPos( sURL );
+ sal_uLong nPos = pIconWin->GetRootPos( sURL );
AppendHistoryURL( sURL, nPos );
aNewFolderHdl.Call( this );
@@ -1234,7 +1233,7 @@ void SvtTemplateWindow::PrintFile( const String& rURL )
// ------------------------------------------------------------------------
-void SvtTemplateWindow::AppendHistoryURL( const String& rURL, ULONG nGroup )
+void SvtTemplateWindow::AppendHistoryURL( const String& rURL, sal_uLong nGroup )
{
sal_Bool bInsert = sal_True;
if ( !pHistoryList )
@@ -1269,7 +1268,7 @@ void SvtTemplateWindow::OpenHistory()
// ------------------------------------------------------------------------
-void SvtTemplateWindow::DoAction( USHORT nAction )
+void SvtTemplateWindow::DoAction( sal_uInt16 nAction )
{
switch( nAction )
{
@@ -1318,16 +1317,16 @@ void SvtTemplateWindow::InitToolBoxes()
aSize.Height() += 4;
aFrameWinTB.SetPosSizePixel( Point( pFrameWin->GetPosPixel().X() + 2, 2 ), aSize );
- BOOL bFlat = ( SvtMiscOptions().GetToolboxStyle() == TOOLBOX_STYLE_FLAT );
+ sal_Bool bFlat = ( SvtMiscOptions().GetToolboxStyle() == TOOLBOX_STYLE_FLAT );
if ( bFlat )
{
aFileViewTB.SetOutStyle( TOOLBOX_STYLE_FLAT );
aFrameWinTB.SetOutStyle( TOOLBOX_STYLE_FLAT );
}
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_BACK, FALSE );
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PREV, FALSE );
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, FALSE );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_BACK, sal_False );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PREV, sal_False );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
Link aLink = LINK( this, SvtTemplateWindow, ClickHdl_Impl );
aFileViewTB.SetClickHdl( aLink );
@@ -1339,7 +1338,7 @@ void SvtTemplateWindow::InitToolBoxes()
void SvtTemplateWindow::InitToolBoxImages()
{
SvtMiscOptions aMiscOpt;
- BOOL bLarge = aMiscOpt.AreCurrentSymbolsLarge();
+ sal_Bool bLarge = aMiscOpt.AreCurrentSymbolsLarge();
aFileViewTB.SetItemImage( TI_DOCTEMPLATE_BACK, Image( SvtResId(
bLarge ? IMG_SVT_DOCTEMPLATE_BACK_LARGE
@@ -1370,13 +1369,13 @@ void SvtTemplateWindow::UpdateIcons()
long SvtTemplateWindow::PreNotify( NotifyEvent& rNEvt )
{
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
long nRet = 0;
if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() )
{
const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
if ( KEY_BACKSPACE == nCode && !rKeyCode.GetModifier() && pFileWin->HasChildPathFocus() )
{
@@ -1579,7 +1578,7 @@ void SvtTemplateWindow::ReadViewSettings()
// the selected view (details or preview)
pFrameWin->ToggleView( TI_DOCTEMPLATE_DOCINFO == nSelectedView );
- aFrameWinTB.CheckItem( (sal_uInt16)nSelectedView, TRUE );
+ aFrameWinTB.CheckItem( (sal_uInt16)nSelectedView, sal_True );
// the split ratio
sal_Int32 nSplitFileAndFrameSize = aSplitWin.GetItemSize( FILEWIN_ID ) + aSplitWin.GetItemSize( FRAMEWIN_ID );
diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx
index b74dfb9a2366..161df3184de3 100644
--- a/svtools/source/contnr/templwin.hxx
+++ b/svtools/source/contnr/templwin.hxx
@@ -33,8 +33,8 @@
#include <vcl/toolbox.hxx>
#include <vcl/window.hxx>
#include <svtools/headbar.hxx>
-#include "fileview.hxx"
-#include "ivctrl.hxx"
+#include <svtools/fileview.hxx>
+#include <svtools/ivctrl.hxx>
#include <svtools/svmedit2.hxx>
#include <svl/restrictedpaths.hxx>
#include <com/sun/star/frame/XDispatch.hpp>
@@ -95,13 +95,13 @@ public:
String GetCursorPosIconURL() const;
String GetIconText( const String& rURL ) const;
void InvalidateIconControl();
- void SetCursorPos( ULONG nPos );
- ULONG GetCursorPos() const;
- ULONG GetSelectEntryPos() const;
+ void SetCursorPos( sal_uLong nPos );
+ sal_uLong GetCursorPos() const;
+ sal_uLong GetSelectEntryPos() const;
void SetFocus();
long CalcHeight() const;
sal_Bool IsRootURL( const String& rURL ) const;
- ULONG GetRootPos( const String& rURL ) const;
+ sal_uLong GetRootPos( const String& rURL ) const;
void UpdateIcons();
inline sal_Bool ProcessKeyEvent( const KeyEvent& rKEvt );
@@ -269,9 +269,9 @@ private:
DECL_LINK( ResizeHdl_Impl, SplitWindow* ); // used for split and initial setting of toolbar pos
void PrintFile( const String& rURL );
- void AppendHistoryURL( const String& rURL, ULONG nGroup );
+ void AppendHistoryURL( const String& rURL, sal_uLong nGroup );
void OpenHistory();
- void DoAction( USHORT nAction );
+ void DoAction( sal_uInt16 nAction );
void InitToolBoxes();
void InitToolBoxImages();
void UpdateIcons();
diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src
index 162202408437..076963d2e7c3 100644
--- a/svtools/source/contnr/templwin.src
+++ b/svtools/source/contnr/templwin.src
@@ -28,7 +28,7 @@
// includes ------------------------------------------------------------------
#include "templwin.hrc"
-#include "controldims.hrc"
+#include <svtools/controldims.hrc>
#include <svtools/helpid.hrc>
#include <svtools/svtools.hrc>
@@ -215,12 +215,14 @@ ModalDialog DLG_DOCTEMPLATE
};
PushButton BTN_DOCTEMPLATE_MANAGE
{
+ HelpID = "svtools:PushButton:DLG_DOCTEMPLATE:BTN_DOCTEMPLATE_MANAGE";
Pos = MAP_APPFONT( 6, 230 );
Size = MAP_APPFONT( 50, 14 );
Text [ en-US ] = "Organi~ze...";
};
PushButton BTN_DOCTEMPLATE_EDIT
{
+ HelpID = "svtools:PushButton:DLG_DOCTEMPLATE:BTN_DOCTEMPLATE_EDIT";
Pos = MAP_APPFONT( 59, 230 );
Size = MAP_APPFONT( 50, 14 );
Text [ en-US ] = "~Edit";
diff --git a/svtools/source/contnr/tooltiplbox.cxx b/svtools/source/contnr/tooltiplbox.cxx
index 9a148336adbe..fb610e826f3a 100644
--- a/svtools/source/contnr/tooltiplbox.cxx
+++ b/svtools/source/contnr/tooltiplbox.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svtools.hxx"
-#include "tooltiplbox.hxx"
+#include <svtools/tooltiplbox.hxx>
#include <vcl/help.hxx>
// ============================================================================
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 7bb25e9c065e..f78b13fb04ad 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -82,7 +82,7 @@ void SvListEntry::SetListPositions()
if( pChilds )
{
SvListEntry *pEntry = (SvListEntry*)pChilds->First();
- ULONG nCur = 0;
+ sal_uLong nCur = 0;
while ( pEntry )
{
pEntry->nListPos &= 0x80000000;
@@ -132,16 +132,6 @@ void SvTreeEntryList::DestroyAll()
}
-
-
-#if defined (WIN) && defined (MSC)
-// siehe BugId 42896: Die Funktionen Prev, PrevVisible, Next, NextVisible
-// (andere?) funktionieren nicht mit Optimierung.
-#pragma optimize ("", off)
-#endif
-
-
-
/*************************************************************************
|*
|* SvTreeList::
@@ -151,7 +141,7 @@ void SvTreeEntryList::DestroyAll()
SvTreeList::SvTreeList()
{
nEntryCount = 0;
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
nRefCount = 1;
pRootItem = new SvListEntry;
eSortMode = SortNone;
@@ -179,11 +169,11 @@ SvTreeList::~SvTreeList()
|*
*************************************************************************/
-void SvTreeList::Broadcast( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvTreeList::Broadcast( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
- ULONG nViewCount = aViewList.Count();
- for( ULONG nCurView = 0; nCurView < nViewCount; nCurView++ )
+ sal_uLong nViewCount = aViewList.Count();
+ for( sal_uLong nCurView = 0; nCurView < nViewCount; nCurView++ )
{
SvListView* pView = (SvListView*)aViewList.GetObject( nCurView );
if( pView )
@@ -193,7 +183,7 @@ void SvTreeList::Broadcast( USHORT nActionId, SvListEntry* pEntry1,
void SvTreeList::InsertView( SvListView* pView)
{
- ULONG nPos = aViewList.GetPos( pView );
+ sal_uLong nPos = aViewList.GetPos( pView );
if ( nPos == LIST_ENTRY_NOTFOUND )
{
aViewList.Insert( pView, LIST_APPEND );
@@ -203,7 +193,7 @@ void SvTreeList::InsertView( SvListView* pView)
void SvTreeList::RemoveView( SvListView* pView )
{
- ULONG nPos = aViewList.GetPos( pView );
+ sal_uLong nPos = aViewList.GetPos( pView );
if ( nPos != LIST_ENTRY_NOTFOUND )
{
aViewList.Remove( pView );
@@ -213,15 +203,15 @@ void SvTreeList::RemoveView( SvListView* pView )
// Ein Entry ist sichtbar, wenn alle Parents expandiert sind
-BOOL SvTreeList::IsEntryVisible( const SvListView* pView, SvListEntry* pEntry ) const
+sal_Bool SvTreeList::IsEntryVisible( const SvListView* pView, SvListEntry* pEntry ) const
{
DBG_ASSERT(pView&&pEntry,"IsVisible:Invalid Params");
- BOOL bRetVal=FALSE;
+ sal_Bool bRetVal=sal_False;
do
{
if ( pEntry == pRootItem )
{
- bRetVal=TRUE;
+ bRetVal=sal_True;
break;
}
pEntry = pEntry->pParent;
@@ -229,10 +219,10 @@ BOOL SvTreeList::IsEntryVisible( const SvListView* pView, SvListEntry* pEntry )
return bRetVal;
}
-USHORT SvTreeList::GetDepth( SvListEntry* pEntry ) const
+sal_uInt16 SvTreeList::GetDepth( SvListEntry* pEntry ) const
{
DBG_ASSERT(pEntry&&pEntry!=pRootItem,"GetDepth:Bad Entry");
- USHORT nDepth = 0;
+ sal_uInt16 nDepth = 0;
while( pEntry->pParent != pRootItem )
{
nDepth++;
@@ -273,20 +263,20 @@ void SvTreeList::Clear()
|*
*************************************************************************/
-BOOL SvTreeList::IsChild( SvListEntry* pParent, SvListEntry* pChild ) const
+sal_Bool SvTreeList::IsChild( SvListEntry* pParent, SvListEntry* pChild ) const
{
if ( !pParent )
pParent = pRootItem;
- BOOL bIsChild = FALSE;
+ sal_Bool bIsChild = sal_False;
SvTreeEntryList* pList = pParent->pChilds;
if ( !pList )
- return FALSE;
+ return sal_False;
SvListEntry* pActualChild = (SvListEntry*)(pList->First());
while( !bIsChild && pActualChild )
{
if ( pActualChild == pChild )
- bIsChild = TRUE;
+ bIsChild = sal_True;
else
{
if ( pActualChild->pChilds )
@@ -297,7 +287,7 @@ BOOL SvTreeList::IsChild( SvListEntry* pParent, SvListEntry* pChild ) const
return bIsChild;
}
-ULONG SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG nListPos)
+sal_uLong SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal_uLong nListPos)
{
// pDest darf Null sein!
DBG_ASSERT(pSrcEntry,"Entry?");
@@ -312,7 +302,7 @@ ULONG SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
if ( pSrcEntry == pTargetParent )
return pSrcEntry->GetChildListPos();
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
SvTreeEntryList* pDstList = pTargetParent->pChilds;
SvTreeEntryList* pSrcList = pSrcEntry->pParent->pChilds;
@@ -341,20 +331,20 @@ ULONG SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
// Listenpositionen in Zielliste korrigieren
SetListPositions( pDstList );
- if ( pSrcList && (ULONG)pSrcList != (ULONG)pDstList )
+ if ( pSrcList && (sal_uLong)pSrcList != (sal_uLong)pDstList )
SetListPositions( pSrcList );
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
- ULONG nRetVal = pDstList->GetPos( pSrcEntry );
+ sal_uLong nRetVal = pDstList->GetPos( pSrcEntry );
DBG_ASSERT(nRetVal==pSrcEntry->GetChildListPos(),"ListPos not valid");
Broadcast( LISTACTION_MOVED,pSrcEntry,pTargetParent,nRetVal);
return nRetVal;
}
-ULONG SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG nListPos)
+sal_uLong SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal_uLong nListPos)
{
// pDest darf Null sein!
DBG_ASSERT(pSrcEntry,"Entry?");
@@ -363,9 +353,9 @@ ULONG SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
if ( !pTargetParent->pChilds )
pTargetParent->pChilds = new SvTreeEntryList;
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
- ULONG nCloneCount = 0;
+ sal_uLong nCloneCount = 0;
SvListEntry* pClonedEntry = Clone( pSrcEntry, nCloneCount );
nEntryCount += nCloneCount;
@@ -378,7 +368,7 @@ ULONG SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
CheckIntegrity();
#endif
Broadcast( LISTACTION_INSERTED_TREE, pClonedEntry );
- ULONG nRetVal = pDstList->GetPos( pClonedEntry );
+ sal_uLong nRetVal = pDstList->GetPos( pClonedEntry );
return nRetVal;
}
@@ -393,7 +383,7 @@ CheckIntegrity();
void SvTreeList::Move( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
{
SvListEntry* pParent;
- ULONG nPos;
+ sal_uLong nPos;
if ( !pDstEntry )
{
@@ -418,7 +408,7 @@ void SvTreeList::Move( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
void SvTreeList::Copy( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
{
SvListEntry* pParent;
- ULONG nPos;
+ sal_uLong nPos;
if ( !pDstEntry )
{
@@ -441,7 +431,7 @@ void SvTreeList::Copy( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
void SvTreeList::InsertTree( SvListEntry* pSrcEntry, SvListEntry* pDstEntry)
{
SvListEntry* pParent;
- ULONG nPos;
+ sal_uLong nPos;
if ( !pDstEntry )
{
@@ -458,7 +448,7 @@ void SvTreeList::InsertTree( SvListEntry* pSrcEntry, SvListEntry* pDstEntry)
void SvTreeList::InsertTree(SvListEntry* pSrcEntry,
- SvListEntry* pTargetParent,ULONG nListPos)
+ SvListEntry* pTargetParent,sal_uLong nListPos)
{
DBG_ASSERT(pSrcEntry,"InsertTree:Entry?");
if ( !pSrcEntry )
@@ -472,7 +462,7 @@ void SvTreeList::InsertTree(SvListEntry* pSrcEntry,
// Sortierung beruecksichtigen
GetInsertionPos( pSrcEntry, pTargetParent, nListPos );
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
pSrcEntry->pParent = pTargetParent; // Parent umsetzen
SvTreeEntryList* pDstList = pTargetParent->pChilds;
@@ -507,7 +497,7 @@ SvListEntry* SvTreeList::CreateEntry() const
|*
*************************************************************************/
-SvListEntry* SvTreeList::Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const
+SvListEntry* SvTreeList::Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const
{
SvListEntry* pClonedEntry = CloneEntry( pEntry );
nCloneCount = 1;
@@ -525,7 +515,7 @@ SvListEntry* SvTreeList::Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const
SvTreeEntryList* SvTreeList::CloneChilds( SvTreeEntryList* pChilds,
SvListEntry* pNewParent,
- ULONG& nCloneCount ) const
+ sal_uLong& nCloneCount ) const
{
DBG_ASSERT(pChilds->Count(),"Childs?");
SvTreeEntryList* pClonedChilds = new SvTreeEntryList;
@@ -555,16 +545,16 @@ SvTreeEntryList* SvTreeList::CloneChilds( SvTreeEntryList* pChilds,
|*
*************************************************************************/
-ULONG SvTreeList::GetChildCount( SvListEntry* pParent ) const
+sal_uLong SvTreeList::GetChildCount( SvListEntry* pParent ) const
{
if ( !pParent )
return GetEntryCount();
if ( !pParent || !pParent->pChilds)
return 0;
- ULONG nCount = 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nActDepth = nRefDepth;
+ sal_uLong nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nActDepth = nRefDepth;
do
{
pParent = Next( pParent, &nActDepth );
@@ -580,16 +570,16 @@ ULONG SvTreeList::GetChildCount( SvListEntry* pParent ) const
|*
*************************************************************************/
-ULONG SvTreeList::GetVisibleChildCount(const SvListView* pView, SvListEntry* pParent) const
+sal_uLong SvTreeList::GetVisibleChildCount(const SvListView* pView, SvListEntry* pParent) const
{
DBG_ASSERT(pView,"GetVisChildCount:No View");
if ( !pParent )
pParent = pRootItem;
if ( !pParent || !pView->IsExpanded(pParent) || !pParent->pChilds )
return 0;
- ULONG nCount = 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nActDepth = nRefDepth;
+ sal_uLong nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nActDepth = nRefDepth;
do
{
pParent = NextVisible( pView, pParent, &nActDepth );
@@ -599,16 +589,16 @@ ULONG SvTreeList::GetVisibleChildCount(const SvListView* pView, SvListEntry* pPa
return nCount;
}
-ULONG SvTreeList::GetChildSelectionCount(const SvListView* pView,SvListEntry* pParent) const
+sal_uLong SvTreeList::GetChildSelectionCount(const SvListView* pView,SvListEntry* pParent) const
{
DBG_ASSERT(pView,"GetChildSelCount:No View");
if ( !pParent )
pParent = pRootItem;
if ( !pParent || !pParent->pChilds)
return 0;
- ULONG nCount = 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nActDepth = nRefDepth;
+ sal_uLong nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nActDepth = nRefDepth;
do
{
pParent = Next( pParent, &nActDepth );
@@ -639,22 +629,22 @@ SvListEntry* SvTreeList::First() const
|* SvTreeList::Next
|*
*************************************************************************/
-SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, USHORT* pDepth ) const
+SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, sal_uInt16* pDepth ) const
{
DBG_ASSERT( pActEntry && pActEntry->pParent, "SvTreeList::Next: invalid entry/parent!" );
if ( !pActEntry || !pActEntry->pParent )
return NULL;
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pDepth )
{
nDepth = *pDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( pActEntry->pChilds /* && pActEntry->pChilds->Count() */ )
{
@@ -699,20 +689,20 @@ SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, USHORT* pDepth ) const
|* SvTreeList::Prev
|*
*************************************************************************/
-SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, USHORT* pDepth ) const
+SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, sal_uInt16* pDepth ) const
{
DBG_ASSERT(pActEntry!=0,"Entry?");
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pDepth )
{
nDepth = *pDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( nActualPos > 0 )
{
@@ -748,7 +738,7 @@ SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, USHORT* pDepth ) const
|*
*************************************************************************/
-SvListEntry* SvTreeList::Last( USHORT* /* nDepth */ ) const
+SvListEntry* SvTreeList::Last( sal_uInt16* /* nDepth */ ) const
{
SvTreeEntryList* pActList = pRootItem->pChilds;
// if ( pActList->Count() == 0 )
@@ -770,7 +760,7 @@ SvListEntry* SvTreeList::Last( USHORT* /* nDepth */ ) const
|*
*************************************************************************/
-ULONG SvTreeList::GetVisiblePos( const SvListView* pView, SvListEntry* pEntry ) const
+sal_uLong SvTreeList::GetVisiblePos( const SvListView* pView, SvListEntry* pEntry ) const
{
DBG_ASSERT(pView&&pEntry,"View/Entry?");
@@ -790,7 +780,7 @@ ULONG SvTreeList::GetVisiblePos( const SvListView* pView, SvListEntry* pEntry )
|*
*************************************************************************/
-ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
+sal_uLong SvTreeList::GetVisibleCount( const SvListView* pView ) const
{
DBG_ASSERT(pView,"GetVisCount:No View");
if( !pView->HasViewData() )
@@ -798,7 +788,7 @@ ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
if ( pView->nVisibleCount )
return pView->nVisibleCount;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvListEntry* pEntry = First(); // erster Eintrag immer sichtbar
while ( pEntry )
{
@@ -814,7 +804,7 @@ ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
}
#endif
((SvListView*)pView)->nVisibleCount = nPos;
- ((SvListView*)pView)->bVisPositionsValid = TRUE;
+ ((SvListView*)pView)->bVisPositionsValid = sal_True;
return nPos;
}
@@ -828,22 +818,22 @@ ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
// Funktion geht aus Geschwindigkeitsgruenden davon aus,
// das der uebergebene Eintrag bereits sichtbar ist
-SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEntry,USHORT* pActDepth) const
+SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEntry,sal_uInt16* pActDepth) const
{
DBG_ASSERT(pView,"NextVisible:No View");
if ( !pActEntry )
return 0;
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pActDepth )
{
nDepth = *pActDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( pView->IsExpanded(pActEntry) )
{
@@ -894,20 +884,20 @@ SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEn
// Funktion geht aus Geschwindigkeitsgruenden davon aus,
// das der uebergebene Eintrag bereits sichtbar ist
-SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActEntry, USHORT* pActDepth) const
+SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActEntry, sal_uInt16* pActDepth) const
{
DBG_ASSERT(pView&&pActEntry,"PrevVis:View/Entry?");
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pActDepth )
{
nDepth = *pActDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( nActualPos > 0 )
{
@@ -943,7 +933,7 @@ SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActE
|*
*************************************************************************/
-SvListEntry* SvTreeList::LastVisible( const SvListView* pView, USHORT* pDepth) const
+SvListEntry* SvTreeList::LastVisible( const SvListView* pView, sal_uInt16* pDepth) const
{
DBG_ASSERT(pView,"LastVis:No View");
SvListEntry* pEntry = Last();
@@ -960,20 +950,20 @@ SvListEntry* SvTreeList::LastVisible( const SvListView* pView, USHORT* pDepth) c
|*
*************************************************************************/
-SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pEntry,USHORT& nDelta) const
+SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pEntry,sal_uInt16& nDelta) const
{
DBG_ASSERT(pView&&pEntry&&IsEntryVisible(pView,pEntry),"NextVis:Wrong Prms/!Vis");
- ULONG nVisPos = GetVisiblePos( pView, pEntry );
+ sal_uLong nVisPos = GetVisiblePos( pView, pEntry );
// nDelta Eintraege vorhanden ?
// Beispiel: 0,1,2,3,4,5,6,7,8,9 nVisPos=5 nDelta=7
// nNewDelta = 10-nVisPos-1 == 4
if ( nVisPos+nDelta >= pView->nVisibleCount )
{
- nDelta = (USHORT)(pView->nVisibleCount-nVisPos);
+ nDelta = (sal_uInt16)(pView->nVisibleCount-nVisPos);
nDelta--;
}
- USHORT nDeltaTmp = nDelta;
+ sal_uInt16 nDeltaTmp = nDelta;
while( nDeltaTmp )
{
pEntry = NextVisible( pView, pEntry );
@@ -989,17 +979,17 @@ SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pEntry
|*
*************************************************************************/
-SvListEntry* SvTreeList::PrevVisible( const SvListView* pView, SvListEntry* pEntry, USHORT& nDelta ) const
+SvListEntry* SvTreeList::PrevVisible( const SvListView* pView, SvListEntry* pEntry, sal_uInt16& nDelta ) const
{
DBG_ASSERT(pView&&pEntry&&IsEntryVisible(pView,pEntry),"PrevVis:Parms/!Vis");
- ULONG nVisPos = GetVisiblePos( pView, pEntry );
+ sal_uLong nVisPos = GetVisiblePos( pView, pEntry );
// nDelta Eintraege vorhanden ?
// Beispiel: 0,1,2,3,4,5,6,7,8,9 nVisPos=8 nDelta=20
// nNewDelta = nNewVisPos
if ( nDelta > nVisPos )
- nDelta = (USHORT)nVisPos;
- USHORT nDeltaTmp = nDelta;
+ nDelta = (sal_uInt16)nVisPos;
+ sal_uInt16 nDeltaTmp = nDelta;
while( nDeltaTmp )
{
pEntry = PrevVisible( pView, pEntry );
@@ -1045,8 +1035,8 @@ SvListEntry* SvTreeList::NextSibling( SvListEntry* pEntry ) const
if( !pEntry )
return 0;
SvTreeEntryList* pList = pEntry->pParent->pChilds;
-// ULONG nPos = pList->GetPos( pEntry );
- ULONG nPos = pEntry->GetChildListPos();
+// sal_uLong nPos = pList->GetPos( pEntry );
+ sal_uLong nPos = pEntry->GetChildListPos();
nPos++;
pEntry = (SvListEntry*)(pList->GetObject( nPos ));
return pEntry;
@@ -1059,8 +1049,8 @@ SvListEntry* SvTreeList::PrevSibling( SvListEntry* pEntry ) const
return 0;
SvTreeEntryList* pList = pEntry->pParent->pChilds;
- // ULONG nPos = pList->GetPos( pEntry );
- ULONG nPos = pEntry->GetChildListPos();
+ // sal_uLong nPos = pList->GetPos( pEntry );
+ sal_uLong nPos = pEntry->GetChildListPos();
if ( nPos == 0 )
return 0;
nPos--;
@@ -1134,7 +1124,7 @@ SvListEntry* SvTreeList::LastSelected( const SvListView* pView ) const
|* SvTreeList::Insert
|*
*************************************************************************/
-ULONG SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,ULONG nPos )
+sal_uLong SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,sal_uLong nPos )
{
DBG_ASSERT( pEntry,"Entry?");
@@ -1153,7 +1143,7 @@ ULONG SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,ULONG nPos )
// Sortierung beruecksichtigen
GetInsertionPos( pEntry, pParent, nPos );
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
pEntry->pParent = pParent;
pList->Insert( pEntry, nPos );
@@ -1176,7 +1166,7 @@ CheckIntegrity();
|*
*************************************************************************/
-ULONG SvTreeList::GetAbsPos( SvListEntry* pEntry) const
+sal_uLong SvTreeList::GetAbsPos( SvListEntry* pEntry) const
{
if ( !bAbsPositionsValid )
((SvTreeList*)this)->SetAbsolutePositions();
@@ -1191,7 +1181,7 @@ ULONG SvTreeList::GetAbsPos( SvListEntry* pEntry) const
void SvTreeList::SetAbsolutePositions()
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvListEntry* pEntry = First();
while ( pEntry )
{
@@ -1199,7 +1189,7 @@ void SvTreeList::SetAbsolutePositions()
nPos++;
pEntry = Next( pEntry );
}
- bAbsPositionsValid = TRUE;
+ bAbsPositionsValid = sal_True;
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
@@ -1226,7 +1216,7 @@ void SvTreeList::Expand( SvListView* pView, SvListEntry* pEntry )
// wenn Parent sichtbar dann Statusdaten invalidieren
if ( pView->IsExpanded( pParent ) )
{
- pView->bVisPositionsValid = FALSE;
+ pView->bVisPositionsValid = sal_False;
pView->nVisibleCount = 0;
}
#ifdef CHECK_INTEGRITY
@@ -1255,7 +1245,7 @@ void SvTreeList::Collapse( SvListView* pView, SvListEntry* pEntry )
if ( pView->IsExpanded(pParent) )
{
pView->nVisibleCount = 0;
- pView->bVisPositionsValid = FALSE;
+ pView->bVisPositionsValid = sal_False;
}
#ifdef CHECK_INTEGRITY
CheckIntegrity();
@@ -1269,14 +1259,14 @@ CheckIntegrity();
|*
*************************************************************************/
-BOOL SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, BOOL bSelect )
+sal_Bool SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, sal_Bool bSelect )
{
DBG_ASSERT(pView&&pEntry,"Select:View/Entry?");
SvViewData* pViewData = pView->GetViewData( pEntry );
if ( bSelect )
{
if ( pViewData->IsSelected() || !pViewData->IsSelectable() )
- return FALSE;
+ return sal_False;
else
{
pViewData->nFlags |= SVLISTENTRYFLAG_SELECTED;
@@ -1286,7 +1276,7 @@ BOOL SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, BOOL bSelect )
else
{
if ( !pViewData->IsSelected() )
- return FALSE;
+ return sal_False;
else
{
pViewData->nFlags &= ~( SVLISTENTRYFLAG_SELECTED );
@@ -1296,7 +1286,7 @@ BOOL SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, BOOL bSelect )
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1304,7 +1294,7 @@ CheckIntegrity();
|* SvTreeList::Remove
|*
*************************************************************************/
-BOOL SvTreeList::Remove( SvListEntry* pEntry )
+sal_Bool SvTreeList::Remove( SvListEntry* pEntry )
{
DBG_ASSERT(pEntry,"Cannot remove root, use clear");
@@ -1315,22 +1305,22 @@ BOOL SvTreeList::Remove( SvListEntry* pEntry )
// Explorer aus der View Eintraege, die er nicht in die View
// eingefuegt hat. Da sich der Kunde fuer ein platzendes
// Office nichts kaufen kann, fange ich diesen Fall ab.
- return FALSE;
+ return sal_False;
}
Broadcast( LISTACTION_REMOVING, pEntry );
- ULONG nRemoved = 1 + GetChildCount(pEntry);
- bAbsPositionsValid = FALSE;
+ sal_uLong nRemoved = 1 + GetChildCount(pEntry);
+ bAbsPositionsValid = sal_False;
SvListEntry* pParent = pEntry->pParent;
SvTreeEntryList* pList = pParent->pChilds;
DBG_ASSERT(pList,"Remove:No Childlist");
- BOOL bLastEntry = FALSE;
+ sal_Bool bLastEntry = sal_False;
if ( pEntry->HasChildListPos() )
{
- ULONG nListPos = pEntry->GetChildListPos();
- bLastEntry = (nListPos == (pList->Count()-1) ) ? TRUE : FALSE;
+ sal_uLong nListPos = pEntry->GetChildListPos();
+ bLastEntry = (nListPos == (pList->Count()-1) ) ? sal_True : sal_False;
pList->Remove( nListPos );
}
else
@@ -1360,7 +1350,7 @@ CheckIntegrity();
Broadcast( LISTACTION_REMOVED, pEntry );
delete pEntry; // loescht auch alle Childs
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1369,7 +1359,7 @@ CheckIntegrity();
|*
*************************************************************************/
-ULONG SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,BOOL bSelect )
+sal_uLong SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,sal_Bool bSelect )
{
DBG_ASSERT(pView&&pParent,"SelChilds:View/Parent?");
if ( !pParent->pChilds )
@@ -1377,9 +1367,9 @@ ULONG SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,BOOL bSel
if ( pParent->pChilds->Count() == 0 )
return 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nDepth = nRefDepth;
- ULONG nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nDepth = nRefDepth;
+ sal_uLong nCount = 0;
pParent = Next( pParent );
do
{
@@ -1394,7 +1384,7 @@ CheckIntegrity();
return nCount;
}
-void SvTreeList::SelectAll( SvListView* pView, BOOL bSelect )
+void SvTreeList::SelectAll( SvListView* pView, sal_Bool bSelect )
{
DBG_ASSERT(pView,"SelectAll:NoView");
SvListEntry* pEntry = First();
@@ -1418,7 +1408,7 @@ CheckIntegrity();
}
-SvListEntry* SvTreeList::GetEntryAtAbsPos( ULONG nAbsPos ) const
+SvListEntry* SvTreeList::GetEntryAtAbsPos( sal_uLong nAbsPos ) const
{
SvListEntry* pEntry = First();
while ( nAbsPos && pEntry )
@@ -1429,7 +1419,7 @@ SvListEntry* SvTreeList::GetEntryAtAbsPos( ULONG nAbsPos ) const
return pEntry;
}
-SvListEntry* SvTreeList::GetEntryAtVisPos( const SvListView* pView, ULONG nVisPos ) const
+SvListEntry* SvTreeList::GetEntryAtVisPos( const SvListView* pView, sal_uLong nVisPos ) const
{
DBG_ASSERT(pView,"GetEntryAtVisPos:No View");
SvListEntry* pEntry = First();
@@ -1450,7 +1440,7 @@ void SvTreeList::SetListPositions( SvTreeEntryList* pList )
pEntry->pParent->InvalidateChildrensListPositions();
}
/*
- ULONG nListPos = 0;
+ sal_uLong nListPos = 0;
SvListEntry* pEntry = (SvListEntry*)(pList->First());
while( pEntry )
{
@@ -1467,13 +1457,13 @@ void SvTreeList::InvalidateEntry( SvListEntry* pEntry )
Broadcast( LISTACTION_INVALIDATE_ENTRY, pEntry );
}
-BOOL SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const
+sal_Bool SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const
{
if ( !pParent )
pParent = pRootItem;
- BOOL bIsChild = FALSE;
+ sal_Bool bIsChild = sal_False;
if ( pParent->pChilds )
- bIsChild = (BOOL)(pParent->pChilds->GetPos(pChild) != LIST_ENTRY_NOTFOUND);
+ bIsChild = (sal_Bool)(pParent->pChilds->GetPos(pChild) != LIST_ENTRY_NOTFOUND);
return bIsChild;
}
@@ -1481,7 +1471,7 @@ BOOL SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const
void lcl_CheckList( SvTreeEntryList* pList )
{
SvListEntry* pEntry = (SvListEntry*)(pList->First());
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
while ( pEntry )
{
DBG_ASSERT(pEntry->GetChildListPos()==nPos,"Wrong ListPos");
@@ -1492,7 +1482,7 @@ void lcl_CheckList( SvTreeEntryList* pList )
void SvTreeList::CheckIntegrity() const
{
- ULONG nMyEntryCount = 0;
+ sal_uLong nMyEntryCount = 0;
if ( pRootItem->pChilds )
{
lcl_CheckList( pRootItem->pChilds );
@@ -1543,7 +1533,7 @@ SvListView::SvListView( SvTreeList* pModell )
pModel = 0;
nSelectionCount = 0;
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
SetModel( pModell );
}
@@ -1553,7 +1543,7 @@ SvListView::SvListView()
pModel = 0;
nSelectionCount = 0;
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
@@ -1587,7 +1577,7 @@ void SvListView::InitTable()
pEntry = pModel->pRootItem;
pViewData = new SvViewData;
pViewData->nFlags = SVLISTENTRYFLAG_EXPANDED;
- aDataTable.Insert( (ULONG)pEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pEntry, pViewData );
// Jetzt alle anderen Entries
pEntry = pModel->First();
while( pEntry )
@@ -1595,7 +1585,7 @@ void SvListView::InitTable()
pViewData = CreateViewData( pEntry );
DBG_ASSERT(pViewData,"InitTable:No ViewData");
InitViewData( pViewData, pEntry );
- aDataTable.Insert( (ULONG)pEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pEntry, pViewData );
pEntry = pModel->Next( pEntry );
}
}
@@ -1623,25 +1613,25 @@ void SvListView::Clear()
ClearTable();
nSelectionCount = 0;
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
if( pModel )
{
// RootEntry einfuegen
SvListEntry* pEntry = pModel->pRootItem;
SvViewData* pViewData = new SvViewData;
pViewData->nFlags = SVLISTENTRYFLAG_EXPANDED;
- aDataTable.Insert( (ULONG)pEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pEntry, pViewData );
}
}
void SvListView::SetModel( SvTreeList* pNewModel )
{
DBG_CHKTHIS(SvListView,0);
- BOOL bBroadcastCleared = FALSE;
+ sal_Bool bBroadcastCleared = sal_False;
if ( pModel )
{
pModel->RemoveView( this );
- bBroadcastCleared = TRUE;
+ bBroadcastCleared = sal_True;
ModelNotification( LISTACTION_CLEARING,0,0,0 );
if ( pModel->GetRefCount() == 0 )
delete pModel;
@@ -1670,7 +1660,7 @@ void SvListView::ModelHasInsertedTree( SvListEntry* )
}
void SvListView::ModelIsMoving( SvListEntry* /* pSource */ ,
- SvListEntry* /* pTargetParent */ , ULONG /* nPos */ )
+ SvListEntry* /* pTargetParent */ , sal_uLong /* nPos */ )
{
DBG_CHKTHIS(SvListView,0);
}
@@ -1696,28 +1686,28 @@ void SvListView::ModelHasEntryInvalidated( SvListEntry*)
DBG_CHKTHIS(SvListView,0);
}
-void SvListView::ActionMoving( SvListEntry* pEntry,SvListEntry*,ULONG)
+void SvListView::ActionMoving( SvListEntry* pEntry,SvListEntry*,sal_uLong)
{
DBG_CHKTHIS(SvListView,0);
SvListEntry* pParent = pEntry->pParent;
DBG_ASSERT(pParent,"Model not consistent");
if( pParent != pModel->pRootItem && pParent->pChilds->Count() == 1 )
{
- SvViewData* pViewData = (SvViewData*)aDataTable.Get( (ULONG)pParent );
+ SvViewData* pViewData = (SvViewData*)aDataTable.Get( (sal_uLong)pParent );
pViewData->nFlags &= (~SVLISTENTRYFLAG_EXPANDED);
}
// vorlaeufig
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
void SvListView::ActionMoved( SvListEntry* /* pEntry */ ,
SvListEntry* /* pTargetPrnt */ ,
- ULONG /* nChildPos */ )
+ sal_uLong /* nChildPos */ )
{
DBG_CHKTHIS(SvListView,0);
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
void SvListView::ActionInserted( SvListEntry* pEntry )
@@ -1727,14 +1717,14 @@ void SvListView::ActionInserted( SvListEntry* pEntry )
SvViewData* pData = CreateViewData( pEntry );
InitViewData( pData, pEntry );
#ifdef DBG_UTIL
- BOOL bSuccess =
+ sal_Bool bSuccess =
#endif
- aDataTable.Insert( (ULONG)pEntry, pData );
+ aDataTable.Insert( (sal_uLong)pEntry, pData );
DBG_ASSERT(bSuccess,"Entry already in View");
if ( nVisibleCount && pModel->IsEntryVisible( this, pEntry ))
{
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
}
@@ -1744,18 +1734,18 @@ void SvListView::ActionInsertedTree( SvListEntry* pEntry )
if ( pModel->IsEntryVisible( this, pEntry ))
{
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
// ueber Entry und seine Childs iterieren
SvListEntry* pCurEntry = pEntry;
- USHORT nRefDepth = pModel->GetDepth( pCurEntry );
+ sal_uInt16 nRefDepth = pModel->GetDepth( pCurEntry );
while( pCurEntry )
{
- DBG_ASSERT(aDataTable.Get((ULONG)pCurEntry)==0,"Entry already in Table");
+ DBG_ASSERT(aDataTable.Get((sal_uLong)pCurEntry)==0,"Entry already in Table");
SvViewData* pViewData = CreateViewData( pCurEntry );
DBG_ASSERT(pViewData,"No ViewData");
InitViewData( pViewData, pEntry );
- aDataTable.Insert( (ULONG)pCurEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pCurEntry, pViewData );
pCurEntry = pModel->Next( pCurEntry );
if ( pCurEntry && pModel->GetDepth(pCurEntry) <= nRefDepth)
pCurEntry = 0;
@@ -1770,9 +1760,9 @@ void SvListView::RemoveViewData( SvListEntry* pParent )
SvListEntry* pCur = (SvListEntry*)pChilds->First();
while( pCur )
{
- SvViewData* pViewData = (SvViewData*)aDataTable.Get((ULONG)pCur);
+ SvViewData* pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pCur);
delete pViewData;
- aDataTable.Remove( (ULONG)pCur );
+ aDataTable.Remove( (sal_uLong)pCur );
if( pCur->HasChilds())
RemoveViewData( pCur );
pCur = (SvListEntry*)pChilds->Next();
@@ -1787,12 +1777,12 @@ void SvListView::ActionRemoving( SvListEntry* pEntry )
DBG_CHKTHIS(SvListView,0);
DBG_ASSERT(pEntry,"Remove:No Entry");
- SvViewData* pViewData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
- ULONG nSelRemoved = 0;
+ SvViewData* pViewData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
+ sal_uLong nSelRemoved = 0;
if ( pViewData->IsSelected() )
nSelRemoved = 1 + pModel->GetChildSelectionCount( this, pEntry );
nSelectionCount -= nSelRemoved;
- ULONG nVisibleRemoved = 0;
+ sal_uLong nVisibleRemoved = 0;
if ( pModel->IsEntryVisible( this, pEntry ) )
nVisibleRemoved = 1 + pModel->GetVisibleChildCount( this, pEntry );
if( nVisibleCount )
@@ -1805,18 +1795,18 @@ void SvListView::ActionRemoving( SvListEntry* pEntry )
#endif
nVisibleCount -= nVisibleRemoved;
}
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
- pViewData = (SvViewData*)aDataTable.Get((ULONG)pEntry);
+ pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pEntry);
delete pViewData;
- aDataTable.Remove( (ULONG)pEntry );
+ aDataTable.Remove( (sal_uLong)pEntry );
RemoveViewData( pEntry );
SvListEntry* pCurEntry = pEntry->pParent;
if ( pCurEntry && pCurEntry != pModel->pRootItem &&
pCurEntry->pChilds->Count() == 1 )
{
- pViewData = (SvViewData*)aDataTable.Get((ULONG)pCurEntry);
+ pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pCurEntry);
pViewData->nFlags &= (~SVLISTENTRYFLAG_EXPANDED);
}
}
@@ -1832,8 +1822,8 @@ void SvListView::ActionClear()
Clear();
}
-void SvListView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvListView::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
DBG_CHKTHIS(SvListView,0);
switch( nActionId )
@@ -1873,7 +1863,7 @@ void SvListView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
ModelHasEntryInvalidated( pEntry1 );
break;
case LISTACTION_RESORTED:
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
break;
case LISTACTION_RESORTING:
break;
@@ -1901,7 +1891,7 @@ StringCompare SvTreeList::Compare( SvListEntry* pLeft, SvListEntry* pRight) cons
void SvTreeList::Resort()
{
Broadcast( LISTACTION_RESORTING );
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
ResortChilds( pRootItem );
Broadcast( LISTACTION_RESORTED );
}
@@ -1915,11 +1905,11 @@ void SvTreeList::ResortChilds( SvListEntry* pParent )
List aList( *pChildList );
pChildList->Clear();
- ULONG nCount = aList.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aList.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvListEntry* pCurEntry = (SvListEntry*)aList.GetObject( nCur );
- ULONG nListPos = LIST_APPEND;
+ sal_uLong nListPos = LIST_APPEND;
GetInsertionPos( pCurEntry, pParent, nListPos );
pChildList->Insert( pCurEntry, nListPos );
if( pCurEntry->pChilds )
@@ -1929,7 +1919,7 @@ void SvTreeList::ResortChilds( SvListEntry* pParent )
}
void SvTreeList::GetInsertionPos( SvListEntry* pEntry, SvListEntry* pParent,
- ULONG& rPos )
+ sal_uLong& rPos )
{
DBG_ASSERT(pEntry,"No Entry");