summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/control
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/control')
-rw-r--r--dbaccess/source/ui/control/ColumnControlWindow.cxx2
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx16
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx64
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.cxx60
-rw-r--r--dbaccess/source/ui/control/charsetlistbox.cxx2
-rw-r--r--dbaccess/source/ui/control/curledit.cxx4
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx42
-rw-r--r--dbaccess/source/ui/control/listviewitems.cxx2
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx14
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx6
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx14
-rw-r--r--dbaccess/source/ui/control/toolboxcontroller.cxx22
12 files changed, 125 insertions, 123 deletions
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index db9bd6809d7a..36c89d858be5 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -93,7 +93,7 @@ void OColumnControlWindow::DeactivateAggregate( EControlType eType )
}
}
// -----------------------------------------------------------------------------
-void OColumnControlWindow::CellModified(long /*nRow*/, USHORT /*nColId*/ )
+void OColumnControlWindow::CellModified(long /*nRow*/, sal_uInt16 /*nColId*/ )
{
saveCurrentFieldDescData();
}
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index e9d903697dba..a4f2f0a24eeb 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -814,7 +814,7 @@ void OFieldDescControl::ArrangeAggregates()
{
Control* pctrlInputControl; // das eigentliche Control zur Eingabe
Control* pctrlTextControl; // das Label dazu
- USHORT nPosSizeArgument; // das zweite Argument fuer SetPosSize
+ sal_uInt16 nPosSizeArgument; // das zweite Argument fuer SetPosSize
};
AGGREGATE_DESCRIPTION adAggregates[] = {
{ m_pColumnName, m_pColumnNameText, 1},
@@ -1068,9 +1068,9 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
}
}
// -----------------------------------------------------------------------------
-void OFieldDescControl::InitializeControl(Control* _pControl,ULONG _nHelpId,bool _bAddChangeHandler)
+void OFieldDescControl::InitializeControl(Control* _pControl,const ::rtl::OString& _sHelpId,bool _bAddChangeHandler)
{
- _pControl->SetHelpId(_nHelpId);
+ _pControl->SetHelpId(_sHelpId);
if ( _bAddChangeHandler )
((OPropListBoxCtrl*)_pControl)->SetSelectHdl(LINK(this,OFieldDescControl,ChangeHdl));
@@ -1079,7 +1079,7 @@ void OFieldDescControl::InitializeControl(Control* _pControl,ULONG _nHelpId,bool
_pControl->EnableClipSiblings();
}
// -----------------------------------------------------------------------------
-FixedText* OFieldDescControl::CreateText(USHORT _nTextRes)
+FixedText* OFieldDescControl::CreateText(sal_uInt16 _nTextRes)
{
FixedText* pFixedText = new FixedText( this );
pFixedText->SetText( ModuleRes(_nTextRes) );
@@ -1087,15 +1087,15 @@ FixedText* OFieldDescControl::CreateText(USHORT _nTextRes)
return pFixedText;
}
// -----------------------------------------------------------------------------
-OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(USHORT _nHelpStr,short _nProperty,ULONG _nHelpId)
+OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(sal_uInt16 _nHelpStr,short _nProperty,const rtl::OString& _sHelpId)
{
OPropNumericEditCtrl* pControl = new OPropNumericEditCtrl( this, _nHelpStr, _nProperty, WB_BORDER );
pControl->SetDecimalDigits(0);
pControl->SetMin(0);
pControl->SetMax(0x7FFFFFFF); // soll draussen geaendert werden, wenn noetig
- pControl->SetStrictFormat(TRUE);
+ pControl->SetStrictFormat(sal_True);
- InitializeControl(pControl,_nHelpId,false);
+ InitializeControl(pControl,_sHelpId,false);
return pControl;
}
@@ -1535,7 +1535,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
if(m_pType)
{
- USHORT nPos = pFieldType.get() ? m_pType->GetEntryPos(String(pFieldDescr->getTypeInfo()->aUIName)) : LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = pFieldType.get() ? m_pType->GetEntryPos(String(pFieldDescr->getTypeInfo()->aUIName)) : LISTBOX_ENTRY_NOTFOUND;
if(nPos == LISTBOX_ENTRY_NOTFOUND)
{
const OTypeInfoMap* pMap = getTypeInfo();
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 2c9ab0b8b841..df2ac9b6e4b6 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -74,14 +74,14 @@ namespace dbaui
Reference< XPropertySet> m_xDestDef;
- void fillListBox(const Reference< XPropertySet>& _xDest,long nRow,USHORT nColumnId);
+ void fillListBox(const Reference< XPropertySet>& _xDest,long nRow,sal_uInt16 nColumnId);
/** returns the column id for the editbrowsebox
@param _nColId
the column id SOURCE_COLUMN or DEST_COLUMN
@return the current column id eihter SOURCE_COLUMN or DEST_COLUMN depends on the connection data
*/
- USHORT getColumnIdent( USHORT _nColId ) const;
+ sal_uInt16 getColumnIdent( sal_uInt16 _nColId ) const;
public:
ORelationControl( OTableListBoxControl* pParent,const OJoinTableView::OTableWindowMap* _pTableMap );
virtual ~ORelationControl();
@@ -107,16 +107,16 @@ namespace dbaui
virtual long PreNotify(NotifyEvent& rNEvt );
- virtual BOOL IsTabAllowed(BOOL bForward) const;
+ virtual sal_Bool IsTabAllowed(sal_Bool bForward) const;
virtual void Init(const TTableConnectionData::value_type& _pConnData);
virtual void Init() { ORelationControl_Base::Init(); }
- virtual void InitController( ::svt::CellControllerRef& rController, long nRow, USHORT nCol );
- virtual ::svt::CellController* GetController( long nRow, USHORT nCol );
- virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColId ) const;
- virtual BOOL SeekRow( long nRow );
- virtual BOOL SaveModified();
- virtual String GetCellText( long nRow, USHORT nColId ) const;
+ virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol );
+ virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol );
+ virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const;
+ virtual sal_Bool SeekRow( long nRow );
+ virtual sal_Bool SaveModified();
+ virtual String GetCellText( long nRow, sal_uInt16 nColId ) const;
virtual void CellModified();
@@ -188,7 +188,7 @@ namespace dbaui
// not the first call
RowRemoved(0, GetRowCount());
- RowInserted(0, m_pConnData->GetConnLineDataList()->size() + 1, TRUE); // add one extra row
+ RowInserted(0, m_pConnData->GetConnLineDataList()->size() + 1, sal_True); // add one extra row
}
//------------------------------------------------------------------------------
void ORelationControl::Resize()
@@ -227,20 +227,20 @@ namespace dbaui
}
//------------------------------------------------------------------------------
- BOOL ORelationControl::IsTabAllowed(BOOL bForward) const
+ sal_Bool ORelationControl::IsTabAllowed(sal_Bool bForward) const
{
DBG_CHKTHIS(ORelationControl,NULL);
long nRow = GetCurRow();
- USHORT nCol = GetCurColumnId();
+ sal_uInt16 nCol = GetCurColumnId();
- BOOL bRet = !(( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1)))
+ sal_Bool bRet = !(( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1)))
|| (!bForward && (nCol == SOURCE_COLUMN) && (nRow == 0)));
return bRet && EditBrowseBox::IsTabAllowed(bForward);
}
//------------------------------------------------------------------------------
- BOOL ORelationControl::SaveModified()
+ sal_Bool ORelationControl::SaveModified()
{
DBG_CHKTHIS(ORelationControl,NULL);
sal_Int32 nRow = GetCurRow();
@@ -267,19 +267,19 @@ namespace dbaui
}
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
- USHORT ORelationControl::getColumnIdent( USHORT _nColId ) const
+ sal_uInt16 ORelationControl::getColumnIdent( sal_uInt16 _nColId ) const
{
- USHORT nId = _nColId;
+ sal_uInt16 nId = _nColId;
if ( m_pConnData->getReferencingTable() != m_pBoxControl->getReferencingTable() )
nId = ( _nColId == SOURCE_COLUMN) ? DEST_COLUMN : SOURCE_COLUMN;
return nId;
}
//------------------------------------------------------------------------------
- String ORelationControl::GetCellText( long nRow, USHORT nColId ) const
+ String ORelationControl::GetCellText( long nRow, sal_uInt16 nColId ) const
{
DBG_CHKTHIS(ORelationControl,NULL);
String sText;
@@ -300,22 +300,22 @@ namespace dbaui
}
//------------------------------------------------------------------------------
- void ORelationControl::InitController( CellControllerRef& /*rController*/, long nRow, USHORT nColumnId )
+ void ORelationControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId )
{
DBG_CHKTHIS(ORelationControl,NULL);
- ULONG nHelpId = HID_RELATIONDIALOG_LEFTFIELDCELL;
+ rtl::OString sHelpId( HID_RELATIONDIALOG_LEFTFIELDCELL );
Reference< XPropertySet> xDef;
switch ( getColumnIdent(nColumnId) )
{
case SOURCE_COLUMN:
xDef = m_xSourceDef;
- nHelpId = HID_RELATIONDIALOG_LEFTFIELDCELL;
+ sHelpId = HID_RELATIONDIALOG_LEFTFIELDCELL;
break;
case DEST_COLUMN:
xDef = m_xDestDef;
- nHelpId = HID_RELATIONDIALOG_RIGHTFIELDCELL;
+ sHelpId = HID_RELATIONDIALOG_RIGHTFIELDCELL;
break;
default:
// ?????????
@@ -333,27 +333,27 @@ namespace dbaui
m_pListCell->SelectEntry( sName );
}
- m_pListCell->SetHelpId(nHelpId);
+ m_pListCell->SetHelpId(sHelpId);
}
}
//------------------------------------------------------------------------------
- CellController* ORelationControl::GetController( long /*nRow*/, USHORT /*nColumnId*/ )
+ CellController* ORelationControl::GetController( long /*nRow*/, sal_uInt16 /*nColumnId*/ )
{
DBG_CHKTHIS(ORelationControl,NULL);
return new ListBoxCellController( m_pListCell.get() );
}
//------------------------------------------------------------------------------
- BOOL ORelationControl::SeekRow( long nRow )
+ sal_Bool ORelationControl::SeekRow( long nRow )
{
DBG_CHKTHIS(ORelationControl,NULL);
m_nDataPos = nRow;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
- void ORelationControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId ) const
+ void ORelationControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(ORelationControl,NULL);
String aText =const_cast< ORelationControl*>(this)->GetCellText( m_nDataPos, nColumnId );
@@ -371,7 +371,7 @@ namespace dbaui
rDev.SetClipRegion();
}
// -----------------------------------------------------------------------------
- void ORelationControl::fillListBox(const Reference< XPropertySet>& _xDest,long /*_nRow*/,USHORT /*nColumnId*/)
+ void ORelationControl::fillListBox(const Reference< XPropertySet>& _xDest,long /*_nRow*/,sal_uInt16 /*nColumnId*/)
{
m_pListCell->Clear();
try
@@ -400,7 +400,7 @@ namespace dbaui
void ORelationControl::setWindowTables(const OTableWindow* _pSource,const OTableWindow* _pDest)
{
// wenn ich hier gerade editiere, ausblenden
- BOOL bWasEditing = IsEditing();
+ sal_Bool bWasEditing = IsEditing();
if ( bWasEditing )
DeactivateCell();
@@ -636,7 +636,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
if ( pLines->size() >= static_cast<sal_uInt32>(m_pRC_Tables->GetRowCount()) )
{
m_pRC_Tables->DeactivateCell();
- m_pRC_Tables->RowInserted(m_pRC_Tables->GetRowCount(), pLines->size() - static_cast<sal_uInt32>(m_pRC_Tables->GetRowCount()) + 1, TRUE);
+ m_pRC_Tables->RowInserted(m_pRC_Tables->GetRowCount(), pLines->size() - static_cast<sal_uInt32>(m_pRC_Tables->GetRowCount()) + 1, sal_True);
m_pRC_Tables->ActivateCell();
}
}
@@ -691,9 +691,9 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent
m_pRC_Tables->lateInit();
}
// -----------------------------------------------------------------------------
- BOOL OTableListBoxControl::SaveModified()
+ sal_Bool OTableListBoxControl::SaveModified()
{
- BOOL bRet = m_pRC_Tables->SaveModified();
+ sal_Bool bRet = m_pRC_Tables->SaveModified();
m_pRC_Tables->getData()->normalizeLines();
return bRet;
}
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index 991dca50d804..afb6fa777352 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -46,14 +46,14 @@ using namespace ::com::sun::star::uno;
using namespace ::dbaui;
using namespace ::svt;
-const USHORT COL_TABLE_NAME = 1;
-const USHORT COL_SELECT = 2;
-const USHORT COL_INSERT = 3;
-const USHORT COL_DELETE = 4;
-const USHORT COL_UPDATE = 5;
-const USHORT COL_ALTER = 6;
-const USHORT COL_REF = 7;
-const USHORT COL_DROP = 8;
+const sal_uInt16 COL_TABLE_NAME = 1;
+const sal_uInt16 COL_SELECT = 2;
+const sal_uInt16 COL_INSERT = 3;
+const sal_uInt16 COL_DELETE = 4;
+const sal_uInt16 COL_UPDATE = 5;
+const sal_uInt16 COL_ALTER = 6;
+const sal_uInt16 COL_REF = 7;
+const sal_uInt16 COL_DROP = 8;
DBG_NAME(OTableGrantControl)
@@ -65,13 +65,13 @@ OTableGrantControl::OTableGrantControl( Window* pParent,const ResId& _RsId)
,m_pCheckCell( NULL )
,m_pEdit( NULL )
,m_nDataPos( 0 )
- ,m_bEnable(TRUE)
+ ,m_bEnable(sal_True)
,m_nDeactivateEvent(0)
{
DBG_CTOR(OTableGrantControl,NULL);
//////////////////////////////////////////////////////////////////////
// Spalten einfuegen
- USHORT i=1;
+ sal_uInt16 i=1;
InsertDataColumn( i, String(ModuleRes(STR_TABLE_PRIV_NAME) ), 75);
FreezeColumn(i++);
InsertDataColumn( i++, String(ModuleRes(STR_TABLE_PRIV_SELECT)), 75);
@@ -144,11 +144,11 @@ void OTableGrantControl::Init()
if(!m_pCheckCell)
{
m_pCheckCell = new CheckBoxControl( &GetDataWindow() );
- m_pCheckCell->GetBox().EnableTriState(FALSE);
+ m_pCheckCell->GetBox().EnableTriState(sal_False);
m_pEdit = new Edit( &GetDataWindow() );
m_pEdit->SetReadOnly();
- m_pEdit->Enable(FALSE);
+ m_pEdit->Enable(sal_False);
}
UpdateTables();
@@ -204,17 +204,17 @@ IMPL_LINK(OTableGrantControl, AsynchDeactivate, void*, EMPTYARG)
}
//------------------------------------------------------------------------------
-BOOL OTableGrantControl::IsTabAllowed(BOOL bForward) const
+sal_Bool OTableGrantControl::IsTabAllowed(sal_Bool bForward) const
{
DBG_CHKTHIS(OTableGrantControl,NULL);
long nRow = GetCurRow();
- USHORT nCol = GetCurColumnId();
+ sal_uInt16 nCol = GetCurColumnId();
if (bForward && (nCol == 2) && (nRow == GetRowCount() - 1))
- return FALSE;
+ return sal_False;
if (!bForward && (nCol == 1) && (nRow == 0))
- return FALSE;
+ return sal_False;
return EditBrowseBox::IsTabAllowed(bForward);
}
@@ -226,16 +226,16 @@ BOOL OTableGrantControl::IsTabAllowed(BOOL bForward) const
xAuth->revokePrivileges(sTableName,PrivilegeObject::TABLE,what)
//------------------------------------------------------------------------------
-BOOL OTableGrantControl::SaveModified()
+sal_Bool OTableGrantControl::SaveModified()
{
DBG_CHKTHIS(OTableGrantControl,NULL);
sal_Int32 nRow = GetCurRow();
if(nRow == -1 || nRow >= m_aTableNames.getLength())
- return FALSE;
+ return sal_False;
::rtl::OUString sTableName = m_aTableNames[nRow];
- BOOL bErg = TRUE;
+ sal_Bool bErg = sal_True;
try
{
@@ -274,7 +274,7 @@ BOOL OTableGrantControl::SaveModified()
}
catch(SQLException& e)
{
- bErg = FALSE;
+ bErg = sal_False;
::dbaui::showError(::dbtools::SQLExceptionInfo(e),GetParent(),m_xORB);
}
if(bErg && Controller().Is())
@@ -286,7 +286,7 @@ BOOL OTableGrantControl::SaveModified()
}
//------------------------------------------------------------------------------
-String OTableGrantControl::GetCellText( long nRow, USHORT nColId ) const
+String OTableGrantControl::GetCellText( long nRow, sal_uInt16 nColId ) const
{
DBG_CHKTHIS(OTableGrantControl,NULL);
if(COL_TABLE_NAME == nColId)
@@ -301,7 +301,7 @@ String OTableGrantControl::GetCellText( long nRow, USHORT nColId ) const
}
//------------------------------------------------------------------------------
-void OTableGrantControl::InitController( CellControllerRef& /*rController*/, long nRow, USHORT nColumnId )
+void OTableGrantControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId )
{
DBG_CHKTHIS(OTableGrantControl,NULL);
String sTablename = m_aTableNames[nRow];
@@ -312,7 +312,7 @@ void OTableGrantControl::InitController( CellControllerRef& /*rController*/, lon
{
// get the privileges from the user
TTablePrivilegeMap::const_iterator aFind = findPrivilege(nRow);
- m_pCheckCell->GetBox().Check(aFind != m_aPrivMap.end() ? isAllowed(nColumnId,aFind->second.nRights) : FALSE);
+ m_pCheckCell->GetBox().Check(aFind != m_aPrivMap.end() ? isAllowed(nColumnId,aFind->second.nRights) : sal_False);
}
}
// -----------------------------------------------------------------------------
@@ -347,7 +347,7 @@ void OTableGrantControl::fillPrivilege(sal_Int32 _nRow) const
}
}
// -----------------------------------------------------------------------------
-sal_Bool OTableGrantControl::isAllowed(USHORT _nColumnId,sal_Int32 _nPrivilege) const
+sal_Bool OTableGrantControl::isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivilege) const
{
sal_Bool bAllowed = sal_False;
switch (_nColumnId)
@@ -389,7 +389,7 @@ void OTableGrantControl::setGrantUser(const Reference< XAuthorizable>& _xGrantUs
m_xGrantUser = _xGrantUser;
}
//------------------------------------------------------------------------------
-CellController* OTableGrantControl::GetController( long nRow, USHORT nColumnId )
+CellController* OTableGrantControl::GetController( long nRow, sal_uInt16 nColumnId )
{
DBG_CHKTHIS(OTableGrantControl,NULL);
@@ -417,7 +417,7 @@ CellController* OTableGrantControl::GetController( long nRow, USHORT nColumnId )
return pController;
}
//------------------------------------------------------------------------------
-BOOL OTableGrantControl::SeekRow( long nRow )
+sal_Bool OTableGrantControl::SeekRow( long nRow )
{
DBG_CHKTHIS(OTableGrantControl,NULL);
m_nDataPos = nRow;
@@ -426,7 +426,7 @@ BOOL OTableGrantControl::SeekRow( long nRow )
}
//------------------------------------------------------------------------------
-void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId ) const
+void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(OTableGrantControl,NULL);
@@ -436,7 +436,7 @@ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect,
if(aFind != m_aPrivMap.end())
PaintTristate(rDev, rRect, isAllowed(nColumnId,aFind->second.nRights) ? STATE_CHECK : STATE_NOCHECK,isAllowed(nColumnId,aFind->second.nWithGrant));
else
- PaintTristate(rDev, rRect, STATE_NOCHECK,FALSE);
+ PaintTristate(rDev, rRect, STATE_NOCHECK,sal_False);
}
else
{
@@ -477,11 +477,11 @@ OTableGrantControl::TTablePrivilegeMap::const_iterator OTableGrantControl::findP
// -----------------------------------------------------------------------------
Reference< XAccessible > OTableGrantControl::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos )
{
- USHORT nColumnId = GetColumnId( _nColumnPos );
+ sal_uInt16 nColumnId = GetColumnId( _nColumnPos );
if(nColumnId != COL_TABLE_NAME)
{
TriState eState = STATE_NOCHECK;
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
TTablePrivilegeMap::const_iterator aFind = findPrivilege(_nRow);
if(aFind != m_aPrivMap.end())
{
diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx
index 040e1fd41242..cc092ccfe3b3 100644
--- a/dbaccess/source/ui/control/charsetlistbox.cxx
+++ b/dbaccess/source/ui/control/charsetlistbox.cxx
@@ -99,7 +99,7 @@ namespace dbaui
}
//--------------------------------------------------------------------
- bool CharSetListBox::StoreSelectedCharSet( SfxItemSet& _rSet, const USHORT _nItemId )
+ bool CharSetListBox::StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId )
{
bool bChangedSomething = false;
if ( GetSelectEntryPos() != GetSavedValue() )
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx
index 70d7a6450448..d649647e70b0 100644
--- a/dbaccess/source/ui/control/curledit.cxx
+++ b/dbaccess/source/ui/control/curledit.cxx
@@ -41,7 +41,7 @@ namespace dbaui
//=========================================================================
//= OConnectionURLEdit
//=========================================================================
-OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,BOOL _bShowPrefix)
+OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,sal_Bool _bShowPrefix)
:Edit(_pParent, _rResId)
,m_pTypeCollection(NULL)
,m_pForcedPrefix(NULL)
@@ -144,7 +144,7 @@ String OConnectionURLEdit::GetText() const
return Edit::GetText();
}
// -----------------------------------------------------------------------------
-void OConnectionURLEdit::ShowPrefix(BOOL _bShowPrefix)
+void OConnectionURLEdit::ShowPrefix(sal_Bool _bShowPrefix)
{
m_bShowPrefix = _bShowPrefix;
if ( m_pForcedPrefix )
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 653f80138a6c..075b8b6bab6d 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -97,7 +97,7 @@ DBTreeListBox::DBTreeListBox( Window* pParent, const Reference< XMultiServiceFac
// -----------------------------------------------------------------------------
void DBTreeListBox::init()
{
- USHORT nSize = SPACEBETWEENENTRIES;
+ sal_uInt16 nSize = SPACEBETWEENENTRIES;
SetSpaceBetweenEntries(nSize);
m_aTimer.SetTimeout(900);
@@ -109,6 +109,8 @@ void DBTreeListBox::init()
SetNodeDefaultImages( );
EnableContextMenuHandling();
+
+ SetStyle( GetStyle() | WB_QUICK_SEARCH );
}
//------------------------------------------------------------------------
DBTreeListBox::~DBTreeListBox()
@@ -124,8 +126,8 @@ SvLBoxEntry* DBTreeListBox::GetEntryPosByName( const String& aName, SvLBoxEntry*
SvLBoxEntry* pEntry = NULL;
if ( pChilds )
{
- ULONG nCount = pChilds->Count();
- for (ULONG i=0; i < nCount; ++i)
+ sal_uLong nCount = pChilds->Count();
+ for (sal_uLong i=0; i < nCount; ++i)
{
pEntry = static_cast<SvLBoxEntry*>(pChilds->GetObject(i));
SvLBoxString* pItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
@@ -349,7 +351,7 @@ void DBTreeListBox::RequestHelp( const HelpEvent& rHEvt )
void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
{
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
sal_Bool bHandled = sal_False;
if(eFunc != KEYFUNC_DONTKNOW)
@@ -409,12 +411,12 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt )
SvTreeListBox::KeyInput(rKEvt);
}
// -----------------------------------------------------------------------------
-BOOL DBTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& /*_aSelection*/)
+sal_Bool DBTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& /*_aSelection*/)
{
return m_aEditingHandler.Call(pEntry) != 0;
}
// -----------------------------------------------------------------------------
-BOOL DBTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
+sal_Bool DBTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
{
DBTreeEditedEntry aEntry;
aEntry.pEntry = pEntry;
@@ -426,11 +428,11 @@ BOOL DBTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText
}
SetEntryText(pEntry,aEntry.aNewText);
- return FALSE; // we never want that the base change our text
+ return sal_False; // we never want that the base change our text
}
// -----------------------------------------------------------------------------
-BOOL DBTreeListBox::DoubleClickHdl()
+sal_Bool DBTreeListBox::DoubleClickHdl()
{
long nResult = aDoubleClickHdl.Call( this );
// continue default processing if the DoubleClickHandler didn't handle it
@@ -467,12 +469,12 @@ namespace
if ( !_pPopup )
return;
- USHORT nCount = _pPopup->GetItemCount();
- for (USHORT i=0; i < nCount; ++i)
+ sal_uInt16 nCount = _pPopup->GetItemCount();
+ for (sal_uInt16 i=0; i < nCount; ++i)
{
if ( _pPopup->GetItemType(i) != MENUITEM_SEPARATOR )
{
- USHORT nId = _pPopup->GetItemId(i);
+ sal_uInt16 nId = _pPopup->GetItemId(i);
PopupMenu* pSubPopUp = _pPopup->GetPopupMenu(nId);
if ( pSubPopUp )
{
@@ -499,14 +501,14 @@ namespace
{
void lcl_adjustMenuItemIDs( Menu& _rMenu, IController& _rCommandController )
{
- USHORT nCount = _rMenu.GetItemCount();
- for ( USHORT pos = 0; pos < nCount; ++pos )
+ sal_uInt16 nCount = _rMenu.GetItemCount();
+ for ( sal_uInt16 pos = 0; pos < nCount; ++pos )
{
// do not adjust separators
if ( _rMenu.GetItemType( pos ) == MENUITEM_SEPARATOR )
continue;
- USHORT nId = _rMenu.GetItemId(pos);
+ sal_uInt16 nId = _rMenu.GetItemId(pos);
String aCommand = _rMenu.GetItemCommand( nId );
PopupMenu* pPopup = _rMenu.GetPopupMenu( nId );
if ( pPopup )
@@ -515,7 +517,7 @@ namespace
continue;
}
- const USHORT nCommandId = _rCommandController.registerCommandURL( aCommand );
+ const sal_uInt16 nCommandId = _rCommandController.registerCommandURL( aCommand );
_rMenu.InsertItem( nCommandId, _rMenu.GetItemText( nId ), _rMenu.GetItemImage( nId ),
_rMenu.GetItemBits( nId ), pos );
@@ -535,14 +537,14 @@ namespace
uno::Reference< frame::XFrame> xFrame;
if ( xController.is() )
xFrame = xController->getFrame();
- USHORT nCount = _rMenu.GetItemCount();
- for ( USHORT pos = 0; pos < nCount; ++pos )
+ sal_uInt16 nCount = _rMenu.GetItemCount();
+ for ( sal_uInt16 pos = 0; pos < nCount; ++pos )
{
// do not adjust separators
if ( _rMenu.GetItemType( pos ) == MENUITEM_SEPARATOR )
continue;
- USHORT nId = _rMenu.GetItemId(pos);
+ sal_uInt16 nId = _rMenu.GetItemId(pos);
String aCommand = _rMenu.GetItemCommand( nId );
PopupMenu* pPopup = _rMenu.GetPopupMenu( nId );
if ( pPopup )
@@ -552,7 +554,7 @@ namespace
}
if ( xFrame.is() )
- _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,FALSE));
+ _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,sal_False));
}
}
// =========================================================================
@@ -696,7 +698,7 @@ PopupMenu* DBTreeListBox::CreateContextMenu( void )
}
// -----------------------------------------------------------------------------
-void DBTreeListBox::ExcecuteContextMenuAction( USHORT _nSelectedPopupEntry )
+void DBTreeListBox::ExcecuteContextMenuAction( sal_uInt16 _nSelectedPopupEntry )
{
if ( m_pContextMenuProvider && _nSelectedPopupEntry )
m_pContextMenuProvider->getCommandController().executeChecked( _nSelectedPopupEntry, Sequence< PropertyValue >() );
diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx
index 2f2c7afd2a60..74193e682409 100644
--- a/dbaccess/source/ui/control/listviewitems.cxx
+++ b/dbaccess/source/ui/control/listviewitems.cxx
@@ -55,7 +55,7 @@ namespace dbaui
}
//------------------------------------------------------------------------
- USHORT OBoldListboxString::IsA()
+ sal_uInt16 OBoldListboxString::IsA()
{
return SV_ITEM_ID_BOLDLBSTRING;
}
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index c95a48c84079..e02b7c000501 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -197,8 +197,8 @@ namespace dbaui
// Place icon left of text and both centered in the button.
SetModeImage( GetCommandIcon( ".uno:Open", m_sModule ) );
- EnableImageDisplay( TRUE );
- EnableTextDisplay( TRUE );
+ EnableImageDisplay( sal_True );
+ EnableTextDisplay( sal_True );
SetImageAlign( IMAGEALIGN_LEFT );
SetStyle( GetStyle() | WB_CENTER );
}
@@ -257,7 +257,7 @@ namespace dbaui
String sDecodedURL = aURL.GetMainURL( INetURLObject::NO_DECODE );
- USHORT nPos = InsertEntry( sTitle );
+ sal_uInt16 nPos = InsertEntry( sTitle );
m_aURLs.insert( MapIndexToStringPair::value_type( nPos, StringPair( sDecodedURL, sFilter ) ) );
}
}
@@ -272,7 +272,7 @@ namespace dbaui
String OpenDocumentListBox::GetSelectedDocumentURL() const
{
String sURL;
- USHORT nSelected = GetSelectEntryPos();
+ sal_uInt16 nSelected = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != GetSelectEntryPos() )
sURL = impl_getDocumentAtIndex( nSelected ).first;
return sURL;
@@ -282,14 +282,14 @@ namespace dbaui
String OpenDocumentListBox::GetSelectedDocumentFilter() const
{
String sFilter;
- USHORT nSelected = GetSelectEntryPos();
+ sal_uInt16 nSelected = GetSelectEntryPos();
if ( LISTBOX_ENTRY_NOTFOUND != GetSelectEntryPos() )
sFilter = impl_getDocumentAtIndex( nSelected ).second;
return sFilter;
}
//--------------------------------------------------------------------
- OpenDocumentListBox::StringPair OpenDocumentListBox::impl_getDocumentAtIndex( USHORT _nListIndex, bool _bSystemNotation ) const
+ OpenDocumentListBox::StringPair OpenDocumentListBox::impl_getDocumentAtIndex( sal_uInt16 _nListIndex, bool _bSystemNotation ) const
{
MapIndexToStringPair::const_iterator pos = m_aURLs.find( _nListIndex );
OSL_ENSURE( pos != m_aURLs.end(), "OpenDocumentListBox::impl_getDocumentAtIndex: invalid index!" );
@@ -316,7 +316,7 @@ namespace dbaui
return;
Point aRequestPos( ScreenToOutputPixel( _rHEvt.GetMousePosPixel() ) );
- USHORT nItemIndex = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nItemIndex = LISTBOX_ENTRY_NOTFOUND;
if ( GetIndexForPoint( aRequestPos, nItemIndex ) != -1 )
{
Rectangle aItemRect( GetBoundingRectangle( nItemIndex ) );
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 3eee26f30959..1caa8917be8b 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -69,7 +69,7 @@ OSqlEdit::OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle ) :
m_ColorConfig.AddListener(this);
//#i97044#
- EnableFocusSelectionHide( FALSE );
+ EnableFocusSelectionHide( sal_False );
}
//------------------------------------------------------------------------------
@@ -127,11 +127,11 @@ IMPL_LINK(OSqlEdit, OnUndoActionTimer, void*, EMPTYARG)
if(aText != m_strOrigText)
{
OJoinController& rController = m_pView->getContainerWindow()->getDesignView()->getController();
- SfxUndoManager* pUndoMgr = rController.getUndoMgr();
+ SfxUndoManager& rUndoMgr = rController.GetUndoManager();
OSqlEditUndoAct* pUndoAct = new OSqlEditUndoAct( this );
pUndoAct->SetOriginalText( m_strOrigText );
- pUndoMgr->AddUndoAction( pUndoAct );
+ rUndoMgr.AddUndoAction( pUndoAct );
rController.InvalidateFeature(SID_UNDO);
rController.InvalidateFeature(SID_REDO);
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 9dd0a24ebbbf..c1c12947cb9b 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -131,8 +131,8 @@ void OTableTreeListBox::notifyHiContrastChanged()
SvLBoxEntry* pEntryLoop = First();
while (pEntryLoop)
{
- USHORT nCount = pEntryLoop->ItemCount();
- for (USHORT i=0;i<nCount;++i)
+ sal_uInt16 nCount = pEntryLoop->ItemCount();
+ for (sal_uInt16 i=0;i<nCount;++i)
{
SvLBoxItem* pItem = pEntryLoop->GetItem(i);
if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXCONTEXTBMP)
@@ -298,7 +298,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
sRootEntryText = String(ModuleRes(STR_ALL_VIEWS));
else
sRootEntryText = String(ModuleRes(STR_ALL_TABLES_AND_VIEWS));
- InsertEntry( sRootEntryText, NULL, FALSE, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) );
+ InsertEntry( sRootEntryText, NULL, sal_False, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) );
}
if ( _rTables.empty() )
@@ -344,7 +344,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
{
SvLBoxEntry* pFolder = GetEntryPosByName( *folder, pRootEntry );
if ( !pFolder )
- pFolder = InsertEntry( *folder, pRootEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFolderType ) );
+ pFolder = InsertEntry( *folder, pRootEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderType ) );
}
}
}
@@ -481,7 +481,7 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry(
{
SvLBoxEntry* pFolder = GetEntryPosByName( rFirstName, pParentEntry );
if ( !pFolder )
- pFolder = InsertEntry( rFirstName, pParentEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) );
+ pFolder = InsertEntry( rFirstName, pParentEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) );
pParentEntry = pFolder;
}
@@ -489,14 +489,14 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry(
{
SvLBoxEntry* pFolder = GetEntryPosByName( rSecondName, pParentEntry );
if ( !pFolder )
- pFolder = InsertEntry( rSecondName, pParentEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) );
+ pFolder = InsertEntry( rSecondName, pParentEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) );
pParentEntry = pFolder;
}
SvLBoxEntry* pRet = NULL;
if ( !_bCheckName || !GetEntryPosByName( sName, pParentEntry ) )
{
- pRet = InsertEntry( sName, pParentEntry, FALSE, LIST_APPEND );
+ pRet = InsertEntry( sName, pParentEntry, sal_False, LIST_APPEND );
Image aImage;
m_pImageProvider->getImages( _rTableName, DatabaseObject::TABLE, aImage );
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx
index 009f63edba3a..5f36c9678b99 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -67,7 +67,7 @@ namespace dbaui
namespace
{
- void lcl_copy(Menu* _pMenu,USHORT _nMenuId,USHORT _nMenuPos,ToolBox* _pToolBox,USHORT _nToolId,const ::rtl::OUString& _sCommand)
+ void lcl_copy(Menu* _pMenu,sal_uInt16 _nMenuId,sal_uInt16 _nMenuPos,ToolBox* _pToolBox,sal_uInt16 _nToolId,const ::rtl::OUString& _sCommand)
{
if ( _pMenu->GetItemType(_nMenuPos) != MENUITEM_STRING )
_pToolBox->SetItemImage(_nToolId, _pMenu->GetItemImage(_nMenuId));
@@ -140,10 +140,10 @@ namespace dbaui
ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()));
if ( pToolBox )
{
- USHORT nCount = pToolBox->GetItemCount();
- for (USHORT nPos = 0; nPos < nCount; ++nPos)
+ sal_uInt16 nCount = pToolBox->GetItemCount();
+ for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos)
{
- USHORT nItemId = pToolBox->GetItemId(nPos);
+ sal_uInt16 nItemId = pToolBox->GetItemId(nPos);
if ( pToolBox->GetItemCommand(nItemId) == String(m_aCommandURL) )
{
m_nToolBoxId = nItemId;
@@ -167,10 +167,10 @@ namespace dbaui
if ( m_aCommandURL == aFind->first && !Event.IsEnabled )
{
::std::auto_ptr<PopupMenu> pMenu = getMenu();
- USHORT nCount = pMenu->GetItemCount();
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pMenu->GetItemCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
- USHORT nItemId = pMenu->GetItemId(i);
+ sal_uInt16 nItemId = pMenu->GetItemId(i);
aFind = m_aStates.find(pMenu->GetItemCommand(nItemId));
if ( aFind != m_aStates.end() && aFind->second )
{
@@ -202,13 +202,13 @@ namespace dbaui
short nImageType = hasBigImages() ? ImageType::SIZE_LARGE : ImageType::SIZE_DEFAULT;
Sequence< ::rtl::OUString> aSeq(1);
- USHORT nCount = pMenu->GetItemCount();
- for (USHORT nPos = 0; nPos < nCount; ++nPos)
+ sal_uInt16 nCount = pMenu->GetItemCount();
+ for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos)
{
if ( pMenu->GetItemType( nPos ) == MENUITEM_SEPARATOR )
continue;
- USHORT nItemId = pMenu->GetItemId(nPos);
+ sal_uInt16 nItemId = pMenu->GetItemId(nPos);
aSeq[0] = pMenu->GetItemCommand(nItemId);
Sequence< Reference<XGraphic> > aImages = xImageMgr->getImages(nImageType,aSeq);
@@ -242,7 +242,7 @@ namespace dbaui
ToolBox* pToolBox = static_cast<ToolBox*>(VCLUnoHelper::GetWindow(getParent()));
::std::auto_ptr<PopupMenu> pMenu = getMenu();
- USHORT nSelected = pMenu->Execute(pToolBox, pToolBox->GetItemRect( m_nToolBoxId ),POPUPMENU_EXECUTE_DOWN);
+ sal_uInt16 nSelected = pMenu->Execute(pToolBox, pToolBox->GetItemRect( m_nToolBoxId ),POPUPMENU_EXECUTE_DOWN);
// "cleanup" the toolbox state
Point aPoint = pToolBox->GetItemRect( m_nToolBoxId ).TopLeft();
MouseEvent aLeave( aPoint, 0, MOUSE_LEAVEWINDOW | MOUSE_SYNTHETIC );