From a381e73c6f0693d2de99a4963343806361a62748 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Jun 2010 13:46:22 +0200 Subject: changehid: #i111874# remove SmartId, make HID of type rtl::OString, fill in dummies for all explicit help ids --- dbaccess/source/ui/app/AppController.cxx | 3 +- dbaccess/source/ui/app/AppDetailPageHelper.cxx | 24 ++++++++++----- dbaccess/source/ui/app/AppDetailView.cxx | 24 ++++++++++----- dbaccess/source/ui/app/AppSwapWindow.cxx | 3 +- dbaccess/source/ui/app/AppView.cxx | 9 ++++-- dbaccess/source/ui/browser/dbtreeview.cxx | 3 +- dbaccess/source/ui/browser/unodatbr.cxx | 15 ++++++--- dbaccess/source/ui/control/FieldDescControl.cxx | 3 ++ dbaccess/source/ui/control/RelationControl.cxx | 6 +++- dbaccess/source/ui/control/sqledit.cxx | 3 +- dbaccess/source/ui/dlg/ConnectionPage.cxx | 36 ++++++++++++++-------- dbaccess/source/ui/dlg/adtabdlg.cxx | 9 ++++-- dbaccess/source/ui/dlg/dbwiz.cxx | 15 ++++++--- dbaccess/source/ui/dlg/dbwizsetup.cxx | 15 ++++++--- dbaccess/source/ui/dlg/dlgsave.cxx | 3 +- dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 12 +++++--- dbaccess/source/ui/dlg/sqlmessage.cxx | 10 +++--- dbaccess/source/ui/misc/UITools.cxx | 3 +- dbaccess/source/ui/querydesign/QTableWindow.cxx | 3 +- dbaccess/source/ui/querydesign/QueryTableView.cxx | 3 +- .../source/ui/querydesign/SelectionBrowseBox.cxx | 21 +++++++++---- .../source/ui/relationdesign/RelationTableView.cxx | 3 +- dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx | 3 +- dbaccess/source/ui/tabledesign/TEditControl.cxx | 15 ++++++--- .../source/ui/tabledesign/TableDesignHelpBar.cxx | 3 +- dbaccess/source/ui/tabledesign/TableDesignView.cxx | 3 +- .../source/ui/tabledesign/TableFieldDescWin.cxx | 6 ++-- 27 files changed, 172 insertions(+), 84 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index ecc39c7aa169..073de6f00a5a 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -460,7 +460,8 @@ void SAL_CALL OApplicationController::disposing() sal_Bool OApplicationController::Construct(Window* _pParent) { setView( * new OApplicationView( _pParent, getORB(), *this, m_ePreviewMode ) ); - getView()->SetUniqueId(UID_APP_VIEW); + // FIXME: HELPID + getView()->SetUniqueId(""/*UID_APP_VIEW*/); // late construction sal_Bool bSuccess = sal_False; diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index afad4e3a2d7c..2da2461f4356 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -307,23 +307,29 @@ OAppDetailPageHelper::OAppDetailPageHelper(Window* _pParent,OAppBorderWindow& _r m_aTBPreview.SetOutStyle(TOOLBOX_STYLE_FLAT); m_aTBPreview.InsertItem(SID_DB_APP_DISABLE_PREVIEW,m_aMenu->GetItemText(SID_DB_APP_DISABLE_PREVIEW),TIB_LEFT|TIB_DROPDOWN|TIB_AUTOSIZE|TIB_RADIOCHECK); - m_aTBPreview.SetHelpId(HID_APP_VIEW_PREVIEW_CB); + // FIXME: HELPID + m_aTBPreview.SetHelpId(""/*HID_APP_VIEW_PREVIEW_CB*/); m_aTBPreview.SetDropdownClickHdl( LINK( this, OAppDetailPageHelper, OnDropdownClickHdl ) ); m_aTBPreview.EnableMenuStrings(); m_aTBPreview.Enable(TRUE); - m_aBorder.SetUniqueId(UID_APP_VIEW_PREVIEW_1); + // FIXME: HELPID + m_aBorder.SetUniqueId(""/*UID_APP_VIEW_PREVIEW_1*/); - m_aPreview.SetHelpId(HID_APP_VIEW_PREVIEW_1); + // FIXME: HELPID + m_aPreview.SetHelpId(""/*HID_APP_VIEW_PREVIEW_1*/); m_pTablePreview = new OTablePreviewWindow(&m_aBorder,WB_READONLY | WB_DIALOGCONTROL ); - m_pTablePreview->SetHelpId(HID_APP_VIEW_PREVIEW_2); + // FIXME: HELPID + m_pTablePreview->SetHelpId(""/*HID_APP_VIEW_PREVIEW_2*/); - m_aDocumentInfo.SetHelpId(HID_APP_VIEW_PREVIEW_3); + // FIXME: HELPID + m_aDocumentInfo.SetHelpId(""/*HID_APP_VIEW_PREVIEW_3*/); m_xWindow = VCLUnoHelper::GetInterface( m_pTablePreview ); - SetUniqueId(UID_APP_DETAILPAGE_HELPER); + // FIXME: HELPID + SetUniqueId(""/*UID_APP_DETAILPAGE_HELPER*/); for (int i=0; i < E_ELEMENT_TYPE_COUNT; ++i) m_pLists[i] = NULL; ImplInitSettings(); @@ -703,7 +709,8 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon ,getBorderWin().getView()->getORB() ,WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP ,sal_False); - pTreeView->SetHelpId(HID_APP_TABLE_TREE); + // FIXME: HELPID + pTreeView->SetHelpId(""/*HID_APP_TABLE_TREE*/); m_pLists[E_TABLE] = pTreeView; ImageProvider aImageProvider( _xConnection ); @@ -881,7 +888,10 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine DBTreeListBox* OAppDetailPageHelper::createSimpleTree( ULONG _nHelpId, const Image& _rImage, const Image& _rImageHC ) { DBTreeListBox* pTreeView = new DBTreeListBox(this,getBorderWin().getView()->getORB(),WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP); + // FIXME: HELPID + #if 0 pTreeView->SetHelpId(_nHelpId); + #endif return createTree( pTreeView, _rImage, _rImageHC ); } diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 9908134b8e1c..b7ce02485bc6 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -406,11 +406,15 @@ OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView ,m_pDetailView(_pDetailView) { DBG_CTOR(OTasksWindow,NULL); - SetUniqueId(UID_APP_TASKS_WINDOW); - m_aCreation.SetHelpId(HID_APP_CREATION_LIST); + // FIXME: HELPID + SetUniqueId(""/*UID_APP_TASKS_WINDOW*/); + // FIXME: HELPID + m_aCreation.SetHelpId(""/*HID_APP_CREATION_LIST*/); m_aCreation.SetSelectHdl(LINK(this, OTasksWindow, OnEntrySelectHdl)); - m_aHelpText.SetHelpId(HID_APP_HELP_TEXT); - m_aDescription.SetHelpId(HID_APP_DESCRIPTION_TEXT); + // FIXME: HELPID + m_aHelpText.SetHelpId(""/*HID_APP_HELP_TEXT*/); + // FIXME: HELPID + m_aDescription.SetHelpId(""/*HID_APP_DESCRIPTION_TEXT*/); m_aDescription.SetText(ModuleRes(STR_DESCRIPTION)); ImplInitSettings(sal_True,sal_True,sal_True); } @@ -600,7 +604,8 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe ,m_rBorderWin(_rParent) { DBG_CTOR(OApplicationDetailView,NULL); - SetUniqueId(UID_APP_DETAIL_VIEW); + // FIXME: HELPID + SetUniqueId(""/*UID_APP_DETAIL_VIEW*/); ImplInitSettings( sal_True, sal_True, sal_True ); m_pControlHelper = new OAppDetailPageHelper(&m_aContainer,m_rBorderWin,_ePreviewMode); @@ -611,10 +616,12 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe pTasks->Show(); pTasks->Disable(m_rBorderWin.getView()->getCommandController().isDataSourceReadOnly()); m_aTasks.setChildWindow(pTasks); - m_aTasks.SetUniqueId(UID_APP_TASKS_VIEW); + // FIXME: HELPID + m_aTasks.SetUniqueId(""/*UID_APP_TASKS_VIEW*/); m_aTasks.Show(); - m_aContainer.SetUniqueId(UID_APP_CONTAINER_VIEW); + // FIXME: HELPID + m_aContainer.SetUniqueId(""/*UID_APP_CONTAINER_VIEW*/); m_aContainer.Show(); const long nFrameWidth = LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width(); @@ -623,7 +630,8 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe set(&m_aContainer,&m_aTasks); m_aHorzSplitter.Show(); - m_aHorzSplitter.SetUniqueId(UID_APP_VIEW_HORZ_SPLIT); + // FIXME: HELPID + m_aHorzSplitter.SetUniqueId(""/*UID_APP_VIEW_HORZ_SPLIT*/); setSplitter(&m_aHorzSplitter); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index ae9ca3f5d93e..6ecb2d0e4701 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -81,7 +81,8 @@ OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWind m_aIconControl.SetClickHdl(LINK(this, OApplicationSwapWindow, OnContainerSelectHdl)); m_aIconControl.setControlActionListener( &m_rBorderWin.getView()->getAppController() ); - m_aIconControl.SetHelpId(HID_APP_SWAP_ICONCONTROL); + // FIXME: HELPID + m_aIconControl.SetHelpId(""/*HID_APP_SWAP_ICONCONTROL*/); m_aIconControl.Show(); //m_aIconControl.Enable(TRUE); } diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index e049f60d0f13..d6a53cc112f4 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -138,10 +138,12 @@ OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePrev m_pPanel->SetBorderStyle(WINDOW_BORDER_MONO); OApplicationSwapWindow* pSwap = new OApplicationSwapWindow( m_pPanel, *this ); pSwap->Show(); - pSwap->SetUniqueId(UID_APP_SWAP_VIEW); + // FIXME: HELPID + pSwap->SetUniqueId(""/*UID_APP_SWAP_VIEW*/); m_pPanel->setChildWindow(pSwap); - m_pPanel->SetUniqueId(UID_APP_DATABASE_VIEW); + // FIXME: HELPID + m_pPanel->SetUniqueId(""/*UID_APP_DATABASE_VIEW*/); m_pPanel->Show(); m_pDetailView = new OApplicationDetailView(*this,_ePreviewMode); @@ -284,7 +286,8 @@ OApplicationView::OApplicationView( Window* pParent } m_pWin = new OAppBorderWindow(this,_ePreviewMode); - m_pWin->SetUniqueId(UID_APP_VIEW_BORDER_WIN); + // FIXME: HELPID + m_pWin->SetUniqueId(""/*UID_APP_VIEW_BORDER_WIN*/); m_pWin->Show(); ImplInitSettings(); diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx index 65185f9f3e73..8129c67afd0f 100644 --- a/dbaccess/source/ui/browser/dbtreeview.cxx +++ b/dbaccess/source/ui/browser/dbtreeview.cxx @@ -64,7 +64,8 @@ DBTreeView::DBTreeView( Window* pParent, const Reference< XMultiServiceFactory > m_pTreeListBox->EnableCheckButton(NULL); m_pTreeListBox->SetDragDropMode( 0 ); m_pTreeListBox->EnableInplaceEditing( sal_True ); - m_pTreeListBox->SetHelpId(HID_TLB_TREELISTBOX); + // FIXME: HELPID + m_pTreeListBox->SetHelpId(""/*HID_TLB_TREELISTBOX*/); m_pTreeListBox->Show(); } diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index f5880cf804de..3b111cbb869d 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -393,7 +393,8 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) m_pTreeView->getListBox().setContextMenuProvider( this ); m_pTreeView->getListBox().setControlActionListener( this ); - m_pTreeView->SetHelpId(HID_CTL_TREEVIEW); + // FIXME: HELPID + m_pTreeView->SetHelpId(""/*HID_CTL_TREEVIEW*/); // a default pos for the splitter, so that the listbox is about 80 (logical) pixels wide m_pSplitter->SetSplitPosPixel( getBrowserView()->LogicToPixel( ::Size( 80, 0 ), MAP_APPFONT ).Width() ); @@ -409,11 +410,15 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) m_pTreeView->setSelChangeHdl( LINK( this, SbaTableQueryBrowser, OnSelectionChange ) ); // TODO - getBrowserView()->getVclControl()->GetDataWindow().SetUniqueId(UID_DATABROWSE_DATAWINDOW); - getBrowserView()->getVclControl()->SetHelpId(HID_CTL_TABBROWSER); - getBrowserView()->SetUniqueId(UID_CTL_CONTENT); + // FIXME: HELPID + getBrowserView()->getVclControl()->GetDataWindow().SetUniqueId(""/*UID_DATABROWSE_DATAWINDOW*/); + // FIXME: HELPID + getBrowserView()->getVclControl()->SetHelpId(""/*HID_CTL_TABBROWSER*/); + // FIXME: HELPID + getBrowserView()->SetUniqueId(""/*UID_CTL_CONTENT*/); if (getBrowserView()->getVclControl()->GetHeaderBar()) - getBrowserView()->getVclControl()->GetHeaderBar()->SetHelpId(HID_DATABROWSE_HEADER); + // FIXME: HELPID + getBrowserView()->getVclControl()->GetHeaderBar()->SetHelpId(""/*HID_DATABROWSE_HEADER*/); InvalidateFeature(ID_BROWSER_EXPLORER); } diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index c2c8affcd4a8..a8eec1c463fb 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1072,7 +1072,10 @@ void OFieldDescControl::ActivateAggregate( EControlType eType ) // ----------------------------------------------------------------------------- void OFieldDescControl::InitializeControl(Control* _pControl,ULONG _nHelpId,bool _bAddChangeHandler) { + // FIXME: HELPID + #if 0 _pControl->SetHelpId(_nHelpId); + #endif if ( _bAddChangeHandler ) ((OPropListBoxCtrl*)_pControl)->SetSelectHdl(LINK(this,OFieldDescControl,ChangeHdl)); diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 14bbe171c613..72c36f9a8cd5 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -367,7 +367,10 @@ namespace dbaui m_pListCell->SelectEntry( sName ); } + // FIXME: HELPID + #if 0 m_pListCell->SetHelpId(nHelpId); + #endif } } @@ -505,7 +508,8 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent , m_pParentDialog(_pParentDialog) { m_pRC_Tables = new ORelationControl( this,m_pTableMap ); - m_pRC_Tables->SetHelpId(HID_RELDLG_KEYFIELDS); + // FIXME: HELPID + m_pRC_Tables->SetHelpId(""/*HID_RELDLG_KEYFIELDS*/); m_pRC_Tables->Init( ); m_pRC_Tables->SetZOrder(&m_lmbRightTable, WINDOW_ZORDER_BEHIND); diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 1945557c2999..ac031d635cea 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -52,7 +52,8 @@ OSqlEdit::OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle ) : ,m_bStopTimer(sal_False ) { DBG_CTOR(OSqlEdit,NULL); - SetHelpId( HID_CTL_QRYSQLEDIT ); + // FIXME: HELPID + SetHelpId( ""/*HID_CTL_QRYSQLEDIT*/ ); SetModifyHdl( LINK(this, OSqlEdit, ModifyHdl) ); m_timerUndoActionCreation.SetTimeout(1000); diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index dac80070a640..8a49ceb7e59b 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -244,19 +244,23 @@ namespace dbaui { case ::dbaccess::DST_DBASE: m_aFT_Connection.SetText(String(ModuleRes(STR_DBASE_PATH_OR_FILE))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_DBASE_PATH); + // FIXME: HELPID + m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_DBASE_PATH*/); break; case ::dbaccess::DST_FLAT: m_aFT_Connection.SetText(String(ModuleRes(STR_FLAT_PATH_OR_FILE))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_FLAT_PATH); + // FIXME: HELPID + m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_FLAT_PATH*/); break; case ::dbaccess::DST_CALC: m_aFT_Connection.SetText(String(ModuleRes(STR_CALC_PATH_OR_FILE))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_CALC_PATH); + // FIXME: HELPID + m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_CALC_PATH*/); break; case ::dbaccess::DST_ADABAS: m_aFT_Connection.SetText(String(ModuleRes(STR_ADABAS_DATABASE_NAME))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_ADABAS_DATABASE); + // FIXME: HELPID + m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_ADABAS_DATABASE*/); break; case ::dbaccess::DST_ADO: m_aFT_Connection.SetText(String(ModuleRes(STR_COMMONURL))); @@ -264,33 +268,40 @@ namespace dbaui case ::dbaccess::DST_MSACCESS: case ::dbaccess::DST_MSACCESS_2007: m_aFT_Connection.SetText(String(ModuleRes(STR_MSACCESS_MDB_FILE))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_MSACCESS_MDB_FILE); + // FIXME: HELPID + m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_MSACCESS_MDB_FILE*/); break; case ::dbaccess::DST_MYSQL_NATIVE: case ::dbaccess::DST_MYSQL_JDBC: m_aFT_Connection.SetText(String(ModuleRes(STR_MYSQL_DATABASE_NAME))); - m_aConnectionURL.SetHelpId( HID_DSADMIN_MYSQL_DATABASE ); + // FIXME: HELPID + m_aConnectionURL.SetHelpId( ""/*HID_DSADMIN_MYSQL_DATABASE*/ ); break; case ::dbaccess::DST_ORACLE_JDBC: m_aFT_Connection.SetText(String(ModuleRes(STR_ORACLE_DATABASE_NAME))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_ORACLE_DATABASE); + // FIXME: HELPID + m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_ORACLE_DATABASE*/); break; case ::dbaccess::DST_MYSQL_ODBC: case ::dbaccess::DST_ODBC: m_aFT_Connection.SetText(String(ModuleRes(STR_NAME_OF_ODBC_DATASOURCE))); - m_aConnectionURL.SetHelpId( eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE); + // FIXME: HELPID + m_aConnectionURL.SetHelpId( ""/*eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE*/); break; case ::dbaccess::DST_LDAP: m_aFT_Connection.SetText(String(ModuleRes(STR_HOSTNAME))); - m_aConnectionURL.SetHelpId( HID_DSADMIN_LDAP_HOSTNAME ); + // FIXME: HELPID + m_aConnectionURL.SetHelpId( ""/*HID_DSADMIN_LDAP_HOSTNAME*/ ); break; case ::dbaccess::DST_MOZILLA: m_aFT_Connection.SetText(String(ModuleRes(STR_MOZILLA_PROFILE_NAME))); - m_aConnectionURL.SetHelpId( HID_DSADMIN_MOZILLA_PROFILE_NAME ); + // FIXME: HELPID + m_aConnectionURL.SetHelpId( ""/*HID_DSADMIN_MOZILLA_PROFILE_NAME*/ ); break; case ::dbaccess::DST_THUNDERBIRD: m_aFT_Connection.SetText(String(ModuleRes(STR_THUNDERBIRD_PROFILE_NAME))); - m_aConnectionURL.SetHelpId( HID_DSADMIN_THUNDERBIRD_PROFILE_NAME ); + // FIXME: HELPID + m_aConnectionURL.SetHelpId( ""/*HID_DSADMIN_THUNDERBIRD_PROFILE_NAME*/ ); break; case ::dbaccess::DST_OUTLOOK: case ::dbaccess::DST_OUTLOOKEXP: @@ -320,7 +331,8 @@ namespace dbaui bool bShowUserAuthenfication = ( eAuthMode != AuthNone ); bool bShowUser = ( eAuthMode == AuthUserPwd ); - m_aPB_Connection.SetHelpId(HID_DSADMIN_BROWSECONN); + // FIXME: HELPID + m_aPB_Connection.SetHelpId(""/*HID_DSADMIN_BROWSECONN*/); m_aFL2.Show( bShowUserAuthenfication ); m_aUserNameLabel.Show( bShowUser && bShowUserAuthenfication ); m_aUserName.Show( bShowUser && bShowUserAuthenfication ); diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index a4914cd45cc5..5f0e7628876e 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -360,10 +360,13 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) // der Close-Button hat schon einen Standard-Help-Text, den ich aber hier nicht haben moechte, also den Text ruecksetzen // und eine neue ID verteilen aCloseButton.SetHelpText(String()); - aCloseButton.SetHelpId(HID_JOINSH_ADDTAB_CLOSE); + // FIXME: HELPID + aCloseButton.SetHelpId(""/*HID_JOINSH_ADDTAB_CLOSE*/); - m_aTableList.SetHelpId( HID_JOINSH_ADDTAB_TABLELIST ); - m_aQueryList.SetHelpId( HID_JOINSH_ADDTAB_QUERYLIST ); + // FIXME: HELPID + m_aTableList.SetHelpId( ""/*HID_JOINSH_ADDTAB_TABLELIST*/ ); + // FIXME: HELPID + m_aQueryList.SetHelpId( ""/*HID_JOINSH_ADDTAB_QUERYLIST*/ ); ////////////////////////////////////////////////////////////////////// m_aCaseTables.SetClickHdl( LINK( this, OAddTableDlg, OnTypeSelected ) ); diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index cdecbd295df6..78fe8aef1f84 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -145,11 +145,16 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent enableButtons(WZB_FINISH, sal_False); enableAutomaticNextButtonState( true ); - m_pPrevPage->SetHelpId(HID_DBWIZ_PREVIOUS); - m_pNextPage->SetHelpId(HID_DBWIZ_NEXT); - m_pCancel->SetHelpId(HID_DBWIZ_CANCEL); - m_pFinish->SetHelpId(HID_DBWIZ_FINISH); - m_pHelp->SetUniqueId(UID_DBWIZ_HELP); + // FIXME: HELPID + m_pPrevPage->SetHelpId(""/*HID_DBWIZ_PREVIOUS*/); + // FIXME: HELPID + m_pNextPage->SetHelpId(""/*HID_DBWIZ_NEXT*/); + // FIXME: HELPID + m_pCancel->SetHelpId(""/*HID_DBWIZ_CANCEL*/); + // FIXME: HELPID + m_pFinish->SetHelpId(""/*HID_DBWIZ_FINISH*/); + // FIXME: HELPID + m_pHelp->SetUniqueId(""/*UID_DBWIZ_HELP*/); // no local resources needed anymore DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _pItems->GetItem(DSID_TYPECOLLECTION)); diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 5a601bd56c92..c2bf98061782 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -318,11 +318,16 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent aPath.push_back(PAGE_DBSETUPWIZARD_INTRO); declarePath( static_cast(m_pCollection->size()+1), aPath); - m_pPrevPage->SetHelpId(HID_DBWIZ_PREVIOUS); - m_pNextPage->SetHelpId(HID_DBWIZ_NEXT); - m_pCancel->SetHelpId(HID_DBWIZ_CANCEL); - m_pFinish->SetHelpId(HID_DBWIZ_FINISH); - m_pHelp->SetUniqueId(UID_DBWIZ_HELP); + // FIXME: HELPID + m_pPrevPage->SetHelpId(""/*HID_DBWIZ_PREVIOUS*/); + // FIXME: HELPID + m_pNextPage->SetHelpId(""/*HID_DBWIZ_NEXT*/); + // FIXME: HELPID + m_pCancel->SetHelpId(""/*HID_DBWIZ_CANCEL*/); + // FIXME: HELPID + m_pFinish->SetHelpId(""/*HID_DBWIZ_FINISH*/); + // FIXME: HELPID + m_pHelp->SetUniqueId(""/*UID_DBWIZ_HELP*/); SetRoadmapInteractive( sal_True ); ActivatePage(); } diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index ee6b853b5eed..db0542525aa3 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -470,7 +470,8 @@ void OSaveAsDlg::implInit() else if ( SAD_TITLE_RENAME == ( m_pImpl->m_nFlags & SAD_TITLE_RENAME ) ) { SetText( String( ModuleRes( STR_TITLE_RENAME ) ) ); - m_pImpl->m_aTitle.SetHelpId(HID_DLG_RENAME); + // FIXME: HELPID + m_pImpl->m_aTitle.SetHelpId(""/*HID_DLG_RENAME*/); } m_pImpl->m_aPB_OK.SetClickHdl(LINK(this,OSaveAsDlg,ButtonClickHdl)); diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index ef715d8061cd..aa1dd1d3e002 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -128,8 +128,10 @@ DBG_NAME(IndexFieldsControl) { DBG_CTOR(IndexFieldsControl,NULL); - SetUniqueId( UID_DLGINDEX_INDEXDETAILS_BACK ); - GetDataWindow().SetUniqueId( UID_DLGINDEX_INDEXDETAILS_MAIN ); + // FIXME: HELPID + SetUniqueId( ""/*UID_DLGINDEX_INDEXDETAILS_BACK*/ ); + // FIXME: HELPID + GetDataWindow().SetUniqueId( ""/*UID_DLGINDEX_INDEXDETAILS_MAIN*/ ); } //------------------------------------------------------------------ @@ -290,8 +292,10 @@ DBG_NAME(IndexFieldsControl) m_pSortingCell->InsertEntry(m_sAscendingText); m_pSortingCell->InsertEntry(m_sDescendingText); - m_pFieldNameCell->SetHelpId( HID_DLGINDEX_INDEXDETAILS_FIELD ); - m_pSortingCell->SetHelpId( HID_DLGINDEX_INDEXDETAILS_SORTORDER ); + // FIXME: HELPID + m_pFieldNameCell->SetHelpId( ""/*HID_DLGINDEX_INDEXDETAILS_FIELD*/ ); + // FIXME: HELPID + m_pSortingCell->SetHelpId( ""/*HID_DLGINDEX_INDEXDETAILS_SORTORDER*/ ); } //------------------------------------------------------------------ diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index f7600fd137ed..34f26083c913 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -689,11 +689,8 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) { lcl_addButton( *this, BUTTON_HELP, false ); - SmartId aHelpId( m_sHelpURL ); - if ( m_sHelpURL.indexOfAsciiL( "HID:", 4 ) == 0 ) - aHelpId = SmartId( m_sHelpURL.copy( 4 ).toInt32() ); - - SetSmartHelpId( aHelpId ); + // FIXME: HELPID + SetHelpId( rtl::OUStringToOString( m_sHelpURL, RTL_TEXTENCODING_UTF8 ) ); } } @@ -726,7 +723,8 @@ void OSQLMessageBox::impl_addDetailsButton() PushButton* pButton = GetPushButton( BUTTONID_MORE ); OSL_ENSURE( pButton, "OSQLMessageBox::impl_addDetailsButton: just added this button, why isn't it there?" ); pButton->SetClickHdl( LINK( this, OSQLMessageBox, ButtonClickHdl ) ); - pButton->SetUniqueId( UID_SQLERROR_BUTTONMORE ); + // FIXME: HELPID + pButton->SetUniqueId( ""/*UID_SQLERROR_BUTTONMORE*/ ); } } diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 930dd089951a..4979718ad41f 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1651,7 +1651,8 @@ sal_Int32 askForUserAction(Window* _pParent,USHORT _nTitle,USHORT _nText,sal_Boo if ( _bAll ) { aAsk.AddButton(String(ModuleRes(STR_BUTTON_TEXT_ALL)), RET_ALL, 0); - aAsk.GetPushButton(RET_ALL)->SetHelpId(HID_CONFIRM_DROP_BUTTON_ALL); + // FIXME: HELPID + aAsk.GetPushButton(RET_ALL)->SetHelpId(""/*HID_CONFIRM_DROP_BUTTON_ALL*/); } return aAsk.Execute(); } diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx index f22d6f64ee87..d06c45cfce3a 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx @@ -119,7 +119,8 @@ OQueryTableWindow::OQueryTableWindow( Window* pParent, const TTableWindowData::v if (m_strInitialAlias == pTabWinData->GetTableName()) m_strInitialAlias = ::rtl::OUString(); - SetHelpId(HID_CTL_QRYDGNTAB); + // FIXME: HELPID + SetHelpId(""/*HID_CTL_QRYDGNTAB*/); } //------------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index c083392a9613..e61d0b52fc84 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -310,7 +310,8 @@ OQueryTableView::OQueryTableView( Window* pParent,OQueryDesignView* pView) : OJoinTableView( pParent,pView) { DBG_CTOR(OQueryTableView,NULL); - SetHelpId(HID_CTL_QRYDGNTAB); + // FIXME: HELPID + SetHelpId(""/*HID_CTL_QRYDGNTAB*/); } //------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 7bded25d5a7d..3822cd263002 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -173,7 +173,8 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) ,m_bInUndoMode(sal_False) { DBG_CTOR(OSelectionBrowseBox,NULL); - SetHelpId(HID_CTL_QRYDGNCRIT); + // FIXME: HELPID + SetHelpId(""/*HID_CTL_QRYDGNCRIT*/); m_nMode = BROWSER_COLUMNSELECTION | BROWSER_HIDESELECT | BROWSER_KEEPSELECTION | BROWSER_HIDECURSOR @@ -188,11 +189,16 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) m_pOrderCell = new ListBoxControl(&GetDataWindow()); m_pFunctionCell = new ListBoxControl(&GetDataWindow()); m_pFunctionCell->SetDropDownLineCount( 20 ); - m_pVisibleCell->SetHelpId(HID_QRYDGN_ROW_VISIBLE); - m_pTableCell->SetHelpId(HID_QRYDGN_ROW_TABLE); - m_pFieldCell->SetHelpId(HID_QRYDGN_ROW_FIELD); - m_pOrderCell->SetHelpId(HID_QRYDGN_ROW_ORDER); - m_pFunctionCell->SetHelpId(HID_QRYDGN_ROW_FUNCTION); + // FIXME: HELPID + m_pVisibleCell->SetHelpId(""/*HID_QRYDGN_ROW_VISIBLE*/); + // FIXME: HELPID + m_pTableCell->SetHelpId(""/*HID_QRYDGN_ROW_TABLE*/); + // FIXME: HELPID + m_pFieldCell->SetHelpId(""/*HID_QRYDGN_ROW_FIELD*/); + // FIXME: HELPID + m_pOrderCell->SetHelpId(""/*HID_QRYDGN_ROW_ORDER*/); + // FIXME: HELPID + m_pFunctionCell->SetHelpId(""/*HID_QRYDGN_ROW_FUNCTION*/); ////////////////////////////////////////////////////////////////////// // TriState der ::com::sun::star::form::CheckBox abschalten @@ -2709,10 +2715,13 @@ void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,c enableControl(_rEntry,m_pTextCell); + // FIXME: HELPID + #if 0 if (m_pTextCell->GetHelpId() != _nHelpId) // da TextCell in verschiedenen Kontexten verwendet wird, muss ich den gecachten HelpText loeschen m_pTextCell->SetHelpText(String()); m_pTextCell->SetHelpId(_nHelpId); + #endif } // ----------------------------------------------------------------------------- void OSelectionBrowseBox::invalidateUndoRedo() diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index e14c234cc5d3..c422ea5cf1e1 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -101,7 +101,8 @@ ORelationTableView::ORelationTableView( Window* pParent, ORelationDesignView* pV { DBG_CTOR(ORelationTableView,NULL); - SetHelpId(HID_CTL_RELATIONTAB); + // FIXME: HELPID + SetHelpId(""/*HID_CTL_RELATIONTAB*/); } //------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx index 727de7fe60ea..8d5edcdacd1b 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx @@ -62,7 +62,8 @@ OFieldDescGenWin::OFieldDescGenWin( Window* pParent, OTableDesignHelpBar* pHelp { DBG_CTOR(OFieldDescGenWin,NULL); m_pFieldControl = new OTableFieldControl(this,pHelp); - m_pFieldControl->SetHelpId(HID_TAB_DESIGN_FIELDCONTROL); + // FIXME: HELPID + m_pFieldControl->SetHelpId(""/*HID_TAB_DESIGN_FIELDCONTROL*/); m_pFieldControl->Show(); } //------------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 40741ac02bb7..4590d7b9082b 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -246,8 +246,10 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow) { DBG_CTOR(OTableEditorCtrl,NULL); - SetHelpId(HID_TABDESIGN_BACKGROUND); - GetDataWindow().SetHelpId(HID_CTL_TABLEEDIT); + // FIXME: HELPID + SetHelpId(""/*HID_TABDESIGN_BACKGROUND*/); + // FIXME: HELPID + GetDataWindow().SetHelpId(""/*HID_CTL_TABLEEDIT*/); m_pRowList = GetView()->getController().getRows(); m_nDataPos = 0; @@ -342,9 +344,12 @@ void OTableEditorCtrl::InitCellController() pDescrCell = new Edit( &GetDataWindow(), WB_LEFT ); pDescrCell->SetMaxTextLen( MAX_DESCR_LEN ); - pNameCell->SetHelpId(HID_TABDESIGN_NAMECELL); - pTypeCell->SetHelpId(HID_TABDESIGN_TYPECELL); - pDescrCell->SetHelpId(HID_TABDESIGN_COMMENTCELL); + // FIXME: HELPID + pNameCell->SetHelpId(""/*HID_TABDESIGN_NAMECELL*/); + // FIXME: HELPID + pTypeCell->SetHelpId(""/*HID_TABDESIGN_TYPECELL*/); + // FIXME: HELPID + pDescrCell->SetHelpId(""/*HID_TABDESIGN_COMMENTCELL*/); Size aHeight; const Control* pControls[] = { pTypeCell,pDescrCell,pNameCell}; diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx index c2326e441c95..183bcb8fca71 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx @@ -52,7 +52,8 @@ OTableDesignHelpBar::OTableDesignHelpBar( Window* pParent ) : { DBG_CTOR(OTableDesignHelpBar,NULL); m_pTextWin = new MultiLineEdit( this, WB_VSCROLL | WB_LEFT | WB_BORDER | WB_NOTABSTOP | WB_READONLY); - m_pTextWin->SetHelpId(HID_TABLE_DESIGN_HELP_WINDOW); + // FIXME: HELPID + m_pTextWin->SetHelpId(""/*HID_TABLE_DESIGN_HELP_WINDOW*/); m_pTextWin->SetReadOnly(); m_pTextWin->SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() ); m_pTextWin->Show(); diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index f16624dbdad2..ce106ee74952 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -90,7 +90,8 @@ OTableBorderWindow::OTableBorderWindow(Window* pParent) : Window(pParent,WB_BORD m_pEditorCtrl = new OTableEditorCtrl( this); m_pFieldDescWin = new OTableFieldDescWin( this ); - m_pFieldDescWin->SetHelpId(HID_TAB_DESIGN_DESCWIN); + // FIXME: HELPID + m_pFieldDescWin->SetHelpId(""/*HID_TAB_DESIGN_DESCWIN*/); // set depending windows and controls m_pEditorCtrl->SetDescrWin(m_pFieldDescWin); diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index 6f136ab0b4e8..3f60dd06f4b5 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -93,11 +93,13 @@ OTableFieldDescWin::OTableFieldDescWin( Window* pParent) ////////////////////////////////////////////////////////////////////// // HelpBar m_pHelpBar = new OTableDesignHelpBar( this ); - m_pHelpBar->SetHelpId(HID_TAB_DESIGN_HELP_TEXT_FRAME); + // FIXME: HELPID + m_pHelpBar->SetHelpId(""/*HID_TAB_DESIGN_HELP_TEXT_FRAME*/); m_pHelpBar->Show(); m_pGenPage = new OFieldDescGenWin( this, m_pHelpBar ); - getGenPage()->SetHelpId( HID_TABLE_DESIGN_TABPAGE_GENERAL ); + // FIXME: HELPID + getGenPage()->SetHelpId( ""/*HID_TABLE_DESIGN_TABPAGE_GENERAL*/ ); getGenPage()->Show(); } -- cgit From 2310854cdad328a9a964ea4a09daeba4ec8b1741 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Sat, 5 Jun 2010 13:58:32 +0200 Subject: fix warnings --- dbaccess/source/ui/app/AppDetailPageHelper.cxx | 2 ++ dbaccess/source/ui/control/FieldDescControl.cxx | 2 ++ dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 2 ++ 3 files changed, 6 insertions(+) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 2da2461f4356..525bf12ffed3 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -891,6 +891,8 @@ DBTreeListBox* OAppDetailPageHelper::createSimpleTree( ULONG _nHelpId, const Ima // FIXME: HELPID #if 0 pTreeView->SetHelpId(_nHelpId); + #else + (void)_nHelpId; #endif return createTree( pTreeView, _rImage, _rImageHC ); } diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index a8eec1c463fb..95fcbf5e150d 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1075,6 +1075,8 @@ void OFieldDescControl::InitializeControl(Control* _pControl,ULONG _nHelpId,bool // FIXME: HELPID #if 0 _pControl->SetHelpId(_nHelpId); + #else + (void)_nHelpId; #endif if ( _bAddChangeHandler ) ((OPropListBoxCtrl*)_pControl)->SetSelectHdl(LINK(this,OFieldDescControl,ChangeHdl)); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 3822cd263002..1723a262ab49 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -2721,6 +2721,8 @@ void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,c // da TextCell in verschiedenen Kontexten verwendet wird, muss ich den gecachten HelpText loeschen m_pTextCell->SetHelpText(String()); m_pTextCell->SetHelpId(_nHelpId); + #else + (void)_nHelpId; #endif } // ----------------------------------------------------------------------------- -- cgit From ff186c24766361a531e59e7c759a5efd4ccc90be Mon Sep 17 00:00:00 2001 From: Malte Timmermann Date: Fri, 25 Jun 2010 13:15:03 +0200 Subject: codecleanup02: #i112685# Removed ifdefs and code for WIN,W30,W31 --- dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2 +- dbaccess/source/ui/dlg/ConnectionPage.cxx | 2 +- dbaccess/source/ui/dlg/adodatalinks.cxx | 2 +- dbaccess/source/ui/dlg/odbcconfig.cxx | 10 +++++----- dbaccess/source/ui/dlg/odbcconfig.hxx | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 1d1277f49301..7eae4fa04953 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -147,7 +147,7 @@ #ifndef _SFX_DOCFILT_HACK_HXX #include #endif -#if !defined(WINDOWS_VISTA_PSDK) && (defined(WIN) || defined(WNT)) +#if !defined(WINDOWS_VISTA_PSDK) && defined(WNT) #define _ADO_DATALINK_BROWSE_ #endif diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index dac80070a640..b2607ebc9f98 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -153,7 +153,7 @@ #include #endif #include "dsnItem.hxx" -#if defined(WIN) || defined(WNT) +#if defined(WNT) #define _ADO_DATALINK_BROWSE_ #endif diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index 30dddc0bb793..4b7005976778 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -29,7 +29,7 @@ #include "precompiled_dbaccess.hxx" -#if defined(WIN) || defined(WNT) +#if defined(WNT) #if defined _MSC_VER #pragma warning(push, 1) #pragma warning(disable: 4917) diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index c4b73ee08af0..c1f77fc02dc2 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -56,7 +56,7 @@ #ifdef HAVE_ODBC_SUPPORT -#if defined(WIN) || defined(OS2) +#if defined(OS2) #define ODBC_LIBRARY "ODBC.DLL" #define ODBC_UI_LIBRARY "ODBCINST.DLL" #endif @@ -78,7 +78,7 @@ // just to go with calling convention of windows // so don't touch this -#if defined(WIN) || defined(WNT) +#if defined(WNT) #define SQL_API __stdcall // At least under some circumstances, the below #include re- // defines SQL_API to an empty string, leading to a compiler warning on MSC; to @@ -88,7 +88,7 @@ #pragma warning(push) #pragma warning(disable: 4005) #endif -#endif // defined(WIN) || defined(WNT) +#endif // defined(WNT) #if defined(OS2) #define ALLREADY_HAVE_OS2_TYPES @@ -103,13 +103,13 @@ #endif #endif -#if defined(WIN) || defined(WNT) +#if defined(WNT) #if defined _MSC_VER #pragma warning(pop) #endif #undef SQL_API #define SQL_API __stdcall -#endif // defined(WIN) || defined(WNT) +#endif // defined(WNT) // from here on you can do what you want to #if defined(OS2) diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx index b4a10625e49b..8c0c70defe07 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.hxx +++ b/dbaccess/source/ui/dlg/odbcconfig.hxx @@ -30,11 +30,11 @@ #include "commontypes.hxx" -#if defined(WIN) || defined(WNT) || defined (UNX) || defined (OS2) +#if defined(WNT) || defined (UNX) || defined (OS2) #define HAVE_ODBC_SUPPORT #endif -#if ( defined(WIN) || defined(WNT) || defined (OS2) ) && defined(HAVE_ODBC_SUPPORT) +#if ( defined(WNT) || defined (OS2) ) && defined(HAVE_ODBC_SUPPORT) #define HAVE_ODBC_ADMINISTRATION #endif -- cgit From d1f6ae4254c5f3b6047551d95fe341ac8d6dd56b Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 10 Jul 2010 18:21:24 +0200 Subject: CWS changehid: #i111874#: change code to support HelpIds as byte strings --- dbaccess/source/ui/app/AppController.cxx | 3 +- dbaccess/source/ui/app/AppDetailPageHelper.cxx | 41 ++++++++-------------- dbaccess/source/ui/app/AppDetailPageHelper.hxx | 2 +- dbaccess/source/ui/app/AppDetailView.cxx | 24 +++++-------- dbaccess/source/ui/app/AppSwapWindow.cxx | 3 +- dbaccess/source/ui/app/AppView.cxx | 9 ++--- dbaccess/source/ui/app/app.src | 19 ---------- dbaccess/source/ui/browser/dbtreeview.cxx | 3 +- dbaccess/source/ui/browser/genericcontroller.cxx | 4 +-- dbaccess/source/ui/browser/sbabrw.src | 2 -- dbaccess/source/ui/browser/unodatbr.cxx | 15 +++----- dbaccess/source/ui/control/FieldDescControl.cxx | 13 +++---- dbaccess/source/ui/control/RelationControl.cxx | 14 +++----- dbaccess/source/ui/control/sqledit.cxx | 3 +- dbaccess/source/ui/dlg/AutoControls_tmpl.hrc | 25 ++++++------- dbaccess/source/ui/dlg/ConnectionPage.cxx | 36 +++++++------------ dbaccess/source/ui/dlg/ConnectionPage.src | 2 +- dbaccess/source/ui/dlg/TablesSingleDlg.cxx | 7 ++-- dbaccess/source/ui/dlg/adtabdlg.cxx | 9 ++--- dbaccess/source/ui/dlg/adtabdlg.src | 2 +- dbaccess/source/ui/dlg/dbadminsetup.src | 24 ++++++------- dbaccess/source/ui/dlg/dbwiz.cxx | 15 +++----- dbaccess/source/ui/dlg/dbwizsetup.cxx | 15 +++----- dbaccess/source/ui/dlg/dlgsave.cxx | 3 +- dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 12 +++---- dbaccess/source/ui/dlg/sqlmessage.cxx | 12 ++++--- dbaccess/source/ui/inc/FieldDescControl.hxx | 4 +-- dbaccess/source/ui/inc/UITools.hxx | 2 +- dbaccess/source/ui/inc/dbu_resource.hrc | 2 +- dbaccess/source/ui/misc/UITools.cxx | 7 ++-- dbaccess/source/ui/misc/WTypeSelect.cxx | 2 ++ dbaccess/source/ui/misc/WizardPages.src | 3 +- dbaccess/source/ui/querydesign/QTableWindow.cxx | 3 +- dbaccess/source/ui/querydesign/QueryTableView.cxx | 3 +- .../source/ui/querydesign/SelectionBrowseBox.cxx | 29 +++++---------- .../source/ui/querydesign/SelectionBrowseBox.hxx | 2 +- .../source/ui/relationdesign/RelationTableView.cxx | 3 +- dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx | 3 +- dbaccess/source/ui/tabledesign/TEditControl.cxx | 17 ++++----- .../source/ui/tabledesign/TableDesignHelpBar.cxx | 3 +- dbaccess/source/ui/tabledesign/TableDesignView.cxx | 3 +- .../source/ui/tabledesign/TableFieldDescWin.cxx | 6 ++-- dbaccess/source/ui/tabledesign/table.src | 4 +-- 43 files changed, 153 insertions(+), 260 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 073de6f00a5a..ecc39c7aa169 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -460,8 +460,7 @@ void SAL_CALL OApplicationController::disposing() sal_Bool OApplicationController::Construct(Window* _pParent) { setView( * new OApplicationView( _pParent, getORB(), *this, m_ePreviewMode ) ); - // FIXME: HELPID - getView()->SetUniqueId(""/*UID_APP_VIEW*/); + getView()->SetUniqueId(UID_APP_VIEW); // late construction sal_Bool bSuccess = sal_False; diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 525bf12ffed3..2a5eb22549b8 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -307,29 +307,23 @@ OAppDetailPageHelper::OAppDetailPageHelper(Window* _pParent,OAppBorderWindow& _r m_aTBPreview.SetOutStyle(TOOLBOX_STYLE_FLAT); m_aTBPreview.InsertItem(SID_DB_APP_DISABLE_PREVIEW,m_aMenu->GetItemText(SID_DB_APP_DISABLE_PREVIEW),TIB_LEFT|TIB_DROPDOWN|TIB_AUTOSIZE|TIB_RADIOCHECK); - // FIXME: HELPID - m_aTBPreview.SetHelpId(""/*HID_APP_VIEW_PREVIEW_CB*/); + m_aTBPreview.SetHelpId(HID_APP_VIEW_PREVIEW_CB); m_aTBPreview.SetDropdownClickHdl( LINK( this, OAppDetailPageHelper, OnDropdownClickHdl ) ); m_aTBPreview.EnableMenuStrings(); m_aTBPreview.Enable(TRUE); - // FIXME: HELPID - m_aBorder.SetUniqueId(""/*UID_APP_VIEW_PREVIEW_1*/); + m_aBorder.SetUniqueId(UID_APP_VIEW_PREVIEW_1); - // FIXME: HELPID - m_aPreview.SetHelpId(""/*HID_APP_VIEW_PREVIEW_1*/); + m_aPreview.SetHelpId(HID_APP_VIEW_PREVIEW_1); m_pTablePreview = new OTablePreviewWindow(&m_aBorder,WB_READONLY | WB_DIALOGCONTROL ); - // FIXME: HELPID - m_pTablePreview->SetHelpId(""/*HID_APP_VIEW_PREVIEW_2*/); + m_pTablePreview->SetHelpId(HID_APP_VIEW_PREVIEW_2); - // FIXME: HELPID - m_aDocumentInfo.SetHelpId(""/*HID_APP_VIEW_PREVIEW_3*/); + m_aDocumentInfo.SetHelpId(HID_APP_VIEW_PREVIEW_3); m_xWindow = VCLUnoHelper::GetInterface( m_pTablePreview ); - // FIXME: HELPID - SetUniqueId(""/*UID_APP_DETAILPAGE_HELPER*/); + SetUniqueId(UID_APP_DETAILPAGE_HELPER); for (int i=0; i < E_ELEMENT_TYPE_COUNT; ++i) m_pLists[i] = NULL; ImplInitSettings(); @@ -709,8 +703,7 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon ,getBorderWin().getView()->getORB() ,WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP ,sal_False); - // FIXME: HELPID - pTreeView->SetHelpId(""/*HID_APP_TABLE_TREE*/); + pTreeView->SetHelpId(HID_APP_TABLE_TREE); m_pLists[E_TABLE] = pTreeView; ImageProvider aImageProvider( _xConnection ); @@ -760,23 +753,24 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA { OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed."); - USHORT nHelpId = 0, nImageId = 0, nImageIdH = 0; + USHORT nImageId = 0, nImageIdH = 0; + rtl::OString sHelpId; ImageProvider aImageProvider; Image aFolderImage, aFolderImageHC; switch( _eType ) { case E_FORM: - nHelpId = HID_APP_FORM_TREE; + sHelpId = HID_APP_FORM_TREE; aFolderImage = aImageProvider.getFolderImage( DatabaseObject::FORM, false ); aFolderImageHC = aImageProvider.getFolderImage( DatabaseObject::FORM, true ); break; case E_REPORT: - nHelpId = HID_APP_REPORT_TREE; + sHelpId = HID_APP_REPORT_TREE; aFolderImage = aImageProvider.getFolderImage( DatabaseObject::REPORT, false ); aFolderImageHC = aImageProvider.getFolderImage( DatabaseObject::REPORT, true ); break; case E_QUERY: - nHelpId = HID_APP_QUERY_TREE; + sHelpId = HID_APP_QUERY_TREE; aFolderImage = aImageProvider.getFolderImage( DatabaseObject::QUERY, false ); aFolderImageHC = aImageProvider.getFolderImage( DatabaseObject::QUERY, true ); break; @@ -787,7 +781,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA if ( !m_pLists[_eType] ) { - m_pLists[_eType] = createSimpleTree( nHelpId, aFolderImage, aFolderImageHC ); + m_pLists[_eType] = createSimpleTree( sHelpId, aFolderImage, aFolderImageHC ); } if ( m_pLists[_eType] ) @@ -885,15 +879,10 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine } } // ----------------------------------------------------------------------------- -DBTreeListBox* OAppDetailPageHelper::createSimpleTree( ULONG _nHelpId, const Image& _rImage, const Image& _rImageHC ) +DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage, const Image& _rImageHC ) { DBTreeListBox* pTreeView = new DBTreeListBox(this,getBorderWin().getView()->getORB(),WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP); - // FIXME: HELPID - #if 0 - pTreeView->SetHelpId(_nHelpId); - #else - (void)_nHelpId; - #endif + pTreeView->SetHelpId( _sHelpId ); return createTree( pTreeView, _rImage, _rImageHC ); } diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index 5ade6b687949..9f3cadc56a44 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -190,7 +190,7 @@ namespace dbaui @return The new tree. */ - DBTreeListBox* createSimpleTree( ULONG _nHelpId, const Image& _rImage, const Image& _rImageHC ); + DBTreeListBox* createSimpleTree( const rtl::OString& _sHelpId, const Image& _rImage, const Image& _rImageHC ); DECL_LINK( OnEntryDoubleClick, SvTreeListBox* ); DECL_LINK( OnEntrySelChange, void* ); diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index b7ce02485bc6..9908134b8e1c 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -406,15 +406,11 @@ OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView ,m_pDetailView(_pDetailView) { DBG_CTOR(OTasksWindow,NULL); - // FIXME: HELPID - SetUniqueId(""/*UID_APP_TASKS_WINDOW*/); - // FIXME: HELPID - m_aCreation.SetHelpId(""/*HID_APP_CREATION_LIST*/); + SetUniqueId(UID_APP_TASKS_WINDOW); + m_aCreation.SetHelpId(HID_APP_CREATION_LIST); m_aCreation.SetSelectHdl(LINK(this, OTasksWindow, OnEntrySelectHdl)); - // FIXME: HELPID - m_aHelpText.SetHelpId(""/*HID_APP_HELP_TEXT*/); - // FIXME: HELPID - m_aDescription.SetHelpId(""/*HID_APP_DESCRIPTION_TEXT*/); + m_aHelpText.SetHelpId(HID_APP_HELP_TEXT); + m_aDescription.SetHelpId(HID_APP_DESCRIPTION_TEXT); m_aDescription.SetText(ModuleRes(STR_DESCRIPTION)); ImplInitSettings(sal_True,sal_True,sal_True); } @@ -604,8 +600,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe ,m_rBorderWin(_rParent) { DBG_CTOR(OApplicationDetailView,NULL); - // FIXME: HELPID - SetUniqueId(""/*UID_APP_DETAIL_VIEW*/); + SetUniqueId(UID_APP_DETAIL_VIEW); ImplInitSettings( sal_True, sal_True, sal_True ); m_pControlHelper = new OAppDetailPageHelper(&m_aContainer,m_rBorderWin,_ePreviewMode); @@ -616,12 +611,10 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe pTasks->Show(); pTasks->Disable(m_rBorderWin.getView()->getCommandController().isDataSourceReadOnly()); m_aTasks.setChildWindow(pTasks); - // FIXME: HELPID - m_aTasks.SetUniqueId(""/*UID_APP_TASKS_VIEW*/); + m_aTasks.SetUniqueId(UID_APP_TASKS_VIEW); m_aTasks.Show(); - // FIXME: HELPID - m_aContainer.SetUniqueId(""/*UID_APP_CONTAINER_VIEW*/); + m_aContainer.SetUniqueId(UID_APP_CONTAINER_VIEW); m_aContainer.Show(); const long nFrameWidth = LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width(); @@ -630,8 +623,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe set(&m_aContainer,&m_aTasks); m_aHorzSplitter.Show(); - // FIXME: HELPID - m_aHorzSplitter.SetUniqueId(""/*UID_APP_VIEW_HORZ_SPLIT*/); + m_aHorzSplitter.SetUniqueId(UID_APP_VIEW_HORZ_SPLIT); setSplitter(&m_aHorzSplitter); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index 6ecb2d0e4701..ae9ca3f5d93e 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -81,8 +81,7 @@ OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWind m_aIconControl.SetClickHdl(LINK(this, OApplicationSwapWindow, OnContainerSelectHdl)); m_aIconControl.setControlActionListener( &m_rBorderWin.getView()->getAppController() ); - // FIXME: HELPID - m_aIconControl.SetHelpId(""/*HID_APP_SWAP_ICONCONTROL*/); + m_aIconControl.SetHelpId(HID_APP_SWAP_ICONCONTROL); m_aIconControl.Show(); //m_aIconControl.Enable(TRUE); } diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index d6a53cc112f4..e049f60d0f13 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -138,12 +138,10 @@ OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePrev m_pPanel->SetBorderStyle(WINDOW_BORDER_MONO); OApplicationSwapWindow* pSwap = new OApplicationSwapWindow( m_pPanel, *this ); pSwap->Show(); - // FIXME: HELPID - pSwap->SetUniqueId(""/*UID_APP_SWAP_VIEW*/); + pSwap->SetUniqueId(UID_APP_SWAP_VIEW); m_pPanel->setChildWindow(pSwap); - // FIXME: HELPID - m_pPanel->SetUniqueId(""/*UID_APP_DATABASE_VIEW*/); + m_pPanel->SetUniqueId(UID_APP_DATABASE_VIEW); m_pPanel->Show(); m_pDetailView = new OApplicationDetailView(*this,_ePreviewMode); @@ -286,8 +284,7 @@ OApplicationView::OApplicationView( Window* pParent } m_pWin = new OAppBorderWindow(this,_ePreviewMode); - // FIXME: HELPID - m_pWin->SetUniqueId(""/*UID_APP_VIEW_BORDER_WIN*/); + m_pWin->SetUniqueId(UID_APP_VIEW_BORDER_WIN); m_pWin->Show(); ImplInitSettings(); diff --git a/dbaccess/source/ui/app/app.src b/dbaccess/source/ui/app/app.src index 2dec9005f847..4af2bdb70521 100644 --- a/dbaccess/source/ui/app/app.src +++ b/dbaccess/source/ui/app/app.src @@ -111,14 +111,12 @@ Menu RID_MENU_APP_NEW MenuItem { Identifier = SID_APP_NEW_FORM; - HelpId = SID_APP_NEW_FORM; Command = ".uno:DBNewForm"; Text [ en-US ] = "Form..." ; }; MenuItem { Identifier = SID_APP_NEW_REPORT; - HelpId = SID_APP_NEW_REPORT; Command = ".uno:DBNewReport"; Text [ en-US ] = "Report..." ; }; @@ -154,7 +152,6 @@ Menu RID_MENU_APP_NEW MenuItem { Identifier = SID_DB_NEW_VIEW_SQL; - HelpId = SID_DB_NEW_VIEW_SQL; Command = ".uno:DBNewViewSQL"; Text [ en-US ] = "View (Simple)..." ; }; @@ -177,7 +174,6 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_DB_APP_PASTE_SPECIAL; - HelpID = SID_DB_APP_PASTE_SPECIAL ; Text[ en-US ] = "Paste Special..."; Command = ".uno:PasteSpecial"; }; @@ -188,42 +184,36 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_DB_APP_DELETE; - HelpID = SID_DB_APP_DELETE ; Text[ en-US ] = "Delete"; Command = ".uno:DBDelete"; }; MenuItem { Identifier = SID_DB_APP_RENAME; - HelpID = SID_DB_APP_RENAME ; Text[ en-US ] = "Rename"; Command = ".uno:DBRename"; }; MenuItem { Identifier = SID_DB_APP_EDIT; - HelpID = SID_DB_APP_EDIT ; Text[ en-US ] = "Edit"; Command = ".uno:DBEdit"; }; MenuItem { Identifier = SID_DB_APP_EDIT_SQL_VIEW; - HelpID = SID_DB_APP_EDIT_SQL_VIEW ; Text [ en-US ] = "Edit in SQL View..."; Command = ".uno:DBEditSqlView"; }; MenuItem { Identifier = SID_DB_APP_OPEN; - HelpID = SID_DB_APP_OPEN ; Text[ en-US ] = "Open"; Command = ".uno:DBOpen"; }; MenuItem { Identifier = SID_DB_APP_CONVERTTOVIEW; - HelpID = SID_DB_APP_CONVERTTOVIEW ; Text[ en-US ] = "Create as View"; Command = ".uno:DBConvertToView"; }; @@ -236,14 +226,12 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_APP_NEW_REPORT_PRE_SEL; - HelpId = SID_APP_NEW_REPORT_PRE_SEL; Command = ".uno:DBNewReportWithPreSelection"; Text [ en-US ] = "Report..." ; }; MenuItem { Identifier = SID_REPORT_CREATE_REPWIZ_PRE_SEL ; - HelpID = HID_DOCUMENT_CREATE_REPWIZ ; Text[ en-US ] = "Report Wizard..."; Command = ".uno:DBNewReportAutoPilotWithPreSelection"; @@ -255,7 +243,6 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_SELECTALL; - HelpID = SID_SELECTALL ; Text[ en-US ] = "Select All"; Command = ".uno:SelectAll"; }; @@ -274,21 +261,18 @@ Menu RID_MENU_APP_EDIT MenuItem { Identifier = SID_DB_APP_DSPROPS; - HelpID = SID_DB_APP_DSPROPS ; Text[ en-US ] = "Properties"; Command = ".uno:DBDSProperties"; }; MenuItem { Identifier = SID_DB_APP_DSCONNECTION_TYPE; - HelpID = SID_DB_APP_DSCONNECTION_TYPE ; Text[ en-US ] = "Connection Type"; Command = ".uno:DBDSConnectionType"; }; MenuItem { Identifier = SID_DB_APP_DSADVANCED_SETTINGS; - HelpID = SID_DB_APP_DSADVANCED_SETTINGS ; Text[ en-US ] = "Advanced Settings"; Command = ".uno:DBDSAdvancedSettings"; }; @@ -394,7 +378,6 @@ Menu RID_MENU_APP_PREVIEW MenuItem { Identifier = SID_DB_APP_DISABLE_PREVIEW; - HelpId = SID_DB_APP_DISABLE_PREVIEW; Text[ en-US ] = "None"; Command = ".uno:DBDisablePreview"; Checkable = TRUE; @@ -404,7 +387,6 @@ Menu RID_MENU_APP_PREVIEW MenuItem { Identifier = SID_DB_APP_VIEW_DOCINFO_PREVIEW; - HelpId = SID_DB_APP_VIEW_DOCINFO_PREVIEW; Text[ en-US ] = "Document Information"; Command = ".uno:DBShowDocInfoPreview"; Checkable = TRUE; @@ -414,7 +396,6 @@ Menu RID_MENU_APP_PREVIEW MenuItem { Identifier = SID_DB_APP_VIEW_DOC_PREVIEW; - HelpId = SID_DB_APP_VIEW_DOC_PREVIEW; Text[ en-US ] = "Document"; Command = ".uno:DBShowDocPreview"; Checkable = TRUE; diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx index 8129c67afd0f..65185f9f3e73 100644 --- a/dbaccess/source/ui/browser/dbtreeview.cxx +++ b/dbaccess/source/ui/browser/dbtreeview.cxx @@ -64,8 +64,7 @@ DBTreeView::DBTreeView( Window* pParent, const Reference< XMultiServiceFactory > m_pTreeListBox->EnableCheckButton(NULL); m_pTreeListBox->SetDragDropMode( 0 ); m_pTreeListBox->EnableInplaceEditing( sal_True ); - // FIXME: HELPID - m_pTreeListBox->SetHelpId(""/*HID_TLB_TREELISTBOX*/); + m_pTreeListBox->SetHelpId(HID_TLB_TREELISTBOX); m_pTreeListBox->Show(); } diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 5935baafa2c0..b81b073a56bf 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -1387,9 +1387,9 @@ void OGenericUnoController::openHelpAgent(rtl::OUString const& _suHelpStringURL openHelpAgent( aURL ); } -void OGenericUnoController::openHelpAgent(sal_Int32 _nHelpId) +void OGenericUnoController::openHelpAgent(const rtl::OString& _sHelpId) { - openHelpAgent( createHelpAgentURL( lcl_getModuleHelpModuleName( getFrame() ), _nHelpId ) ); + openHelpAgent( createHelpAgentURL( lcl_getModuleHelpModuleName( getFrame() ), _sHelpId ) ); } void OGenericUnoController::openHelpAgent( const URL& _rURL ) diff --git a/dbaccess/source/ui/browser/sbabrw.src b/dbaccess/source/ui/browser/sbabrw.src index 747a2d7ac8cf..476fcf683b3f 100644 --- a/dbaccess/source/ui/browser/sbabrw.src +++ b/dbaccess/source/ui/browser/sbabrw.src @@ -190,14 +190,12 @@ Menu RID_MENU_REFRESH_DATA MenuItem { MID_SBA_QRY_REFRESH - HelpId = SID_FM_REFRESH ; Command = ".uno:Refresh"; }; MenuItem { Identifier = ID_BROWSER_REFRESH_REBUILD; Command = ".uno:DBRebuildData"; - HelpId = HID_BROWSER_REFRESH_REBUILDVIEW; Text [ en-US ] = "Rebuild"; }; }; diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 3b111cbb869d..f5880cf804de 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -393,8 +393,7 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) m_pTreeView->getListBox().setContextMenuProvider( this ); m_pTreeView->getListBox().setControlActionListener( this ); - // FIXME: HELPID - m_pTreeView->SetHelpId(""/*HID_CTL_TREEVIEW*/); + m_pTreeView->SetHelpId(HID_CTL_TREEVIEW); // a default pos for the splitter, so that the listbox is about 80 (logical) pixels wide m_pSplitter->SetSplitPosPixel( getBrowserView()->LogicToPixel( ::Size( 80, 0 ), MAP_APPFONT ).Width() ); @@ -410,15 +409,11 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) m_pTreeView->setSelChangeHdl( LINK( this, SbaTableQueryBrowser, OnSelectionChange ) ); // TODO - // FIXME: HELPID - getBrowserView()->getVclControl()->GetDataWindow().SetUniqueId(""/*UID_DATABROWSE_DATAWINDOW*/); - // FIXME: HELPID - getBrowserView()->getVclControl()->SetHelpId(""/*HID_CTL_TABBROWSER*/); - // FIXME: HELPID - getBrowserView()->SetUniqueId(""/*UID_CTL_CONTENT*/); + getBrowserView()->getVclControl()->GetDataWindow().SetUniqueId(UID_DATABROWSE_DATAWINDOW); + getBrowserView()->getVclControl()->SetHelpId(HID_CTL_TABBROWSER); + getBrowserView()->SetUniqueId(UID_CTL_CONTENT); if (getBrowserView()->getVclControl()->GetHeaderBar()) - // FIXME: HELPID - getBrowserView()->getVclControl()->GetHeaderBar()->SetHelpId(""/*HID_DATABROWSE_HEADER*/); + getBrowserView()->getVclControl()->GetHeaderBar()->SetHelpId(HID_DATABROWSE_HEADER); InvalidateFeature(ID_BROWSER_EXPLORER); } diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 95fcbf5e150d..c5c2a084b64a 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1070,14 +1070,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) { - // FIXME: HELPID - #if 0 - _pControl->SetHelpId(_nHelpId); - #else - (void)_nHelpId; - #endif + _pControl->SetHelpId(_sHelpId); if ( _bAddChangeHandler ) ((OPropListBoxCtrl*)_pControl)->SetSelectHdl(LINK(this,OFieldDescControl,ChangeHdl)); @@ -1094,7 +1089,7 @@ FixedText* OFieldDescControl::CreateText(USHORT _nTextRes) return pFixedText; } // ----------------------------------------------------------------------------- -OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(USHORT _nHelpStr,short _nProperty,ULONG _nHelpId) +OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(USHORT _nHelpStr,short _nProperty,const rtl::OString& _sHelpId) { OPropNumericEditCtrl* pControl = new OPropNumericEditCtrl( this, _nHelpStr, _nProperty, WB_BORDER ); pControl->SetDecimalDigits(0); @@ -1102,7 +1097,7 @@ OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(USHORT _nHelpStr,s pControl->SetMax(0x7FFFFFFF); // soll draussen geaendert werden, wenn noetig pControl->SetStrictFormat(TRUE); - InitializeControl(pControl,_nHelpId,false); + InitializeControl(pControl,_sHelpId,false); return pControl; } diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 72c36f9a8cd5..ca94faeb56f8 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -338,18 +338,18 @@ namespace dbaui { 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: // ????????? @@ -367,10 +367,7 @@ namespace dbaui m_pListCell->SelectEntry( sName ); } - // FIXME: HELPID - #if 0 - m_pListCell->SetHelpId(nHelpId); - #endif + m_pListCell->SetHelpId(sHelpId); } } @@ -508,8 +505,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent , m_pParentDialog(_pParentDialog) { m_pRC_Tables = new ORelationControl( this,m_pTableMap ); - // FIXME: HELPID - m_pRC_Tables->SetHelpId(""/*HID_RELDLG_KEYFIELDS*/); + m_pRC_Tables->SetHelpId(HID_RELDLG_KEYFIELDS); m_pRC_Tables->Init( ); m_pRC_Tables->SetZOrder(&m_lmbRightTable, WINDOW_ZORDER_BEHIND); diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index ac031d635cea..1945557c2999 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -52,8 +52,7 @@ OSqlEdit::OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle ) : ,m_bStopTimer(sal_False ) { DBG_CTOR(OSqlEdit,NULL); - // FIXME: HELPID - SetHelpId( ""/*HID_CTL_QRYSQLEDIT*/ ); + SetHelpId( HID_CTL_QRYSQLEDIT ); SetModifyHdl( LINK(this, OSqlEdit, ModifyHdl) ); m_timerUndoActionCreation.SetTimeout(1000); diff --git a/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc b/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc index 425e713094f3..258eec3a2acf 100644 --- a/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc +++ b/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc @@ -126,7 +126,7 @@ // ------------------------------------------------------------------------------------------------- -#define AUTO_BROWSECONTROLGROUP( AUTO_X, AUTO_Y, AUTOPAGE_X, AUTO_HID) \ +#define AUTO_BROWSECONTROLGROUP( AUTO_X, AUTO_Y, AUTOPAGE_X, AUTO_HID, AUTO_HID2) \ FixedText FT_AUTOBROWSEURL { \ Pos = MAP_APPFONT ( AUTO_X , AUTO_Y ) ; \ Size = MAP_APPFONT ( AUTOPAGE_X - AUTO_X - 6 , FIXEDTEXT_HEIGHT ) ; \ @@ -147,7 +147,7 @@ { \ Pos = MAP_APPFONT ( AUTOPAGE_X - BUTTON_WIDTH - 6 , AUTO_Y + FIXEDTEXT_HEIGHT + 2 ) ; \ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; \ - HelpId = (AUTO_HID + 1); \ + HelpId = AUTO_HID2; \ TabStop = TRUE ; \ Text[ en-US ] = "Browse"; \ }; @@ -214,7 +214,9 @@ // -------------------------------------------------------------------------------------------------- - +// MBA: the HID set in the FixText can't make any sense; in case this macro was called from within the +// AUTOHELP_JDBCCONTROLGROUP, the FixText would have got the same HID as an EditField from the +// also called AUTO_JDBCDRIVERCLASSGROUP macro; thus I conclude that we can remove the HID from the FixedText #define AUTO_PORTCONTROLGROUP(AUTO_Y, AUTO_HID) \ FixedText FT_AUTOPORTNUMBER \ { \ @@ -235,7 +237,6 @@ \ FixedText FT_AUTOPORTNUMBERDEFAULT \ { \ - HelpId = AUTO_HID + 1 ; \ Pos = MAP_APPFONT (EDIT_X + 22 + UNRELATED_CONTROLS, AUTO_Y +2) ; \ Size = MAP_APPFONT ( WIZARD_PAGE_X - EDIT_X - 22 - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \ Text[ en-US ] = "" ; \ @@ -445,9 +446,9 @@ // -------------------------------------------------------------------------------------------------- -#define AUTO_HELP_BROWSECONTROLGROUP(AUTO_LINECOUNT, AUTO_HID) \ +#define AUTO_HELP_BROWSECONTROLGROUP(AUTO_LINECOUNT, AUTO_HID, AUTO_HID2) \ AUTO_WIZARDHELPTEXT(AUTO_LINECOUNT) \ - AUTO_BROWSECONTROLGROUP(START_X, INIT_Y + AUTO_LINECOUNT * FIXEDTEXT_HEIGHT + 2, WIZARD_PAGE_X, AUTO_HID) + AUTO_BROWSECONTROLGROUP(START_X, INIT_Y + AUTO_LINECOUNT * FIXEDTEXT_HEIGHT + 2, WIZARD_PAGE_X, AUTO_HID, AUTO_HID2) // -------------------------------------------------------------------------------------------------- @@ -455,7 +456,7 @@ // -------------------------------------------------------------------------------------------------- -#define AUTO_JDBCDRIVERCLASSGROUP(AUTO_Y, AUTO_HID) \ +#define AUTO_JDBCDRIVERCLASSGROUP(AUTO_Y, AUTO_HID, AUTO_HID2) \ \ FixedText FT_AUTOJDBCDRIVERCLASS \ { \ @@ -479,7 +480,7 @@ Pos = MAP_APPFONT ( WIZARD_PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS , AUTO_Y + FIXEDTEXT_HEIGHT + 2) ; \ Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; \ Size = MAP_APPFONT (50, 14); \ - HelpId = AUTO_HID + 1; \ + HelpId = AUTO_HID2; \ Text[ en-US ] = "Test class" ; \ }; @@ -502,13 +503,13 @@ }; -#define AUTOHELP_JDBCCONTROLGROUP( AUTO_HID ) \ +#define AUTOHELP_JDBCCONTROLGROUP( AUTO_HID, AUTO_HID2, AUTO_HID3, AUTO_HID4, AUTO_HID5 ) \ AUTO_WIZARDHELPTEXT( 6 ) \ AUTO_NAMECONTROLGROUP( INIT_Y + 6 * FIXEDTEXT_HEIGHT + 2, AUTO_HID ) \ - AUTO_HOSTCONTROLGROUP(96, AUTO_HID + 1) \ - AUTO_PORTCONTROLGROUP(113, AUTO_HID + 2 ) \ + AUTO_HOSTCONTROLGROUP(96, AUTO_HID2) \ + AUTO_PORTCONTROLGROUP(113, AUTO_HID3 ) \ AUTO_SOCKETCONTROLGROUP(129) \ - AUTO_JDBCDRIVERCLASSGROUP(146, AUTO_HID + 3) + AUTO_JDBCDRIVERCLASSGROUP(146, AUTO_HID4, AUTO_HID5) // -------------------------------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 8a49ceb7e59b..dac80070a640 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -244,23 +244,19 @@ namespace dbaui { case ::dbaccess::DST_DBASE: m_aFT_Connection.SetText(String(ModuleRes(STR_DBASE_PATH_OR_FILE))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_DBASE_PATH*/); + m_aConnectionURL.SetHelpId(HID_DSADMIN_DBASE_PATH); break; case ::dbaccess::DST_FLAT: m_aFT_Connection.SetText(String(ModuleRes(STR_FLAT_PATH_OR_FILE))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_FLAT_PATH*/); + m_aConnectionURL.SetHelpId(HID_DSADMIN_FLAT_PATH); break; case ::dbaccess::DST_CALC: m_aFT_Connection.SetText(String(ModuleRes(STR_CALC_PATH_OR_FILE))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_CALC_PATH*/); + m_aConnectionURL.SetHelpId(HID_DSADMIN_CALC_PATH); break; case ::dbaccess::DST_ADABAS: m_aFT_Connection.SetText(String(ModuleRes(STR_ADABAS_DATABASE_NAME))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_ADABAS_DATABASE*/); + m_aConnectionURL.SetHelpId(HID_DSADMIN_ADABAS_DATABASE); break; case ::dbaccess::DST_ADO: m_aFT_Connection.SetText(String(ModuleRes(STR_COMMONURL))); @@ -268,40 +264,33 @@ namespace dbaui case ::dbaccess::DST_MSACCESS: case ::dbaccess::DST_MSACCESS_2007: m_aFT_Connection.SetText(String(ModuleRes(STR_MSACCESS_MDB_FILE))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_MSACCESS_MDB_FILE*/); + m_aConnectionURL.SetHelpId(HID_DSADMIN_MSACCESS_MDB_FILE); break; case ::dbaccess::DST_MYSQL_NATIVE: case ::dbaccess::DST_MYSQL_JDBC: m_aFT_Connection.SetText(String(ModuleRes(STR_MYSQL_DATABASE_NAME))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId( ""/*HID_DSADMIN_MYSQL_DATABASE*/ ); + m_aConnectionURL.SetHelpId( HID_DSADMIN_MYSQL_DATABASE ); break; case ::dbaccess::DST_ORACLE_JDBC: m_aFT_Connection.SetText(String(ModuleRes(STR_ORACLE_DATABASE_NAME))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId(""/*HID_DSADMIN_ORACLE_DATABASE*/); + m_aConnectionURL.SetHelpId(HID_DSADMIN_ORACLE_DATABASE); break; case ::dbaccess::DST_MYSQL_ODBC: case ::dbaccess::DST_ODBC: m_aFT_Connection.SetText(String(ModuleRes(STR_NAME_OF_ODBC_DATASOURCE))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId( ""/*eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE*/); + m_aConnectionURL.SetHelpId( eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE); break; case ::dbaccess::DST_LDAP: m_aFT_Connection.SetText(String(ModuleRes(STR_HOSTNAME))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId( ""/*HID_DSADMIN_LDAP_HOSTNAME*/ ); + m_aConnectionURL.SetHelpId( HID_DSADMIN_LDAP_HOSTNAME ); break; case ::dbaccess::DST_MOZILLA: m_aFT_Connection.SetText(String(ModuleRes(STR_MOZILLA_PROFILE_NAME))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId( ""/*HID_DSADMIN_MOZILLA_PROFILE_NAME*/ ); + m_aConnectionURL.SetHelpId( HID_DSADMIN_MOZILLA_PROFILE_NAME ); break; case ::dbaccess::DST_THUNDERBIRD: m_aFT_Connection.SetText(String(ModuleRes(STR_THUNDERBIRD_PROFILE_NAME))); - // FIXME: HELPID - m_aConnectionURL.SetHelpId( ""/*HID_DSADMIN_THUNDERBIRD_PROFILE_NAME*/ ); + m_aConnectionURL.SetHelpId( HID_DSADMIN_THUNDERBIRD_PROFILE_NAME ); break; case ::dbaccess::DST_OUTLOOK: case ::dbaccess::DST_OUTLOOKEXP: @@ -331,8 +320,7 @@ namespace dbaui bool bShowUserAuthenfication = ( eAuthMode != AuthNone ); bool bShowUser = ( eAuthMode == AuthUserPwd ); - // FIXME: HELPID - m_aPB_Connection.SetHelpId(""/*HID_DSADMIN_BROWSECONN*/); + m_aPB_Connection.SetHelpId(HID_DSADMIN_BROWSECONN); m_aFL2.Show( bShowUserAuthenfication ); m_aUserNameLabel.Show( bShowUser && bShowUserAuthenfication ); m_aUserName.Show( bShowUser && bShowUserAuthenfication ); diff --git a/dbaccess/source/ui/dlg/ConnectionPage.src b/dbaccess/source/ui/dlg/ConnectionPage.src index 8ead374bdef4..fb5131ebea6c 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.src +++ b/dbaccess/source/ui/dlg/ConnectionPage.src @@ -55,7 +55,7 @@ TabPage PAGE_CONNECTION }; - AUTO_BROWSECONTROLGROUP( 6, UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS, PAGE_X, HID_DSADMIN_URL_GENERAL) + AUTO_BROWSECONTROLGROUP( 6, UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS, PAGE_X, HID_DSADMIN_URL_GENERAL, HID_DSADMIN_BROWSECONN) FixedText FT_NO_ADDITIONAL_SETTINGS diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx index 4a12a0dd13ea..352963b21272 100644 --- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx +++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx @@ -34,9 +34,6 @@ #ifndef _DBAUI_DBADMINIMPL_HXX_ #include "DbAdminImpl.hxx" #endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ -#include "dbaccess_helpid.hrc" -#endif #ifndef _DBAUI_TABLESPAGE_HXX_ #include "tablespage.hxx" #endif @@ -51,6 +48,8 @@ #include "propertysetitem.hxx" #endif +#include "dbu_dlg.hrc" + //......................................................................... namespace dbaui { @@ -69,7 +68,7 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(Window* pParent ,SfxItemSet* _pItems ,const Reference< XMultiServiceFactory >& _rxORB ,const ::com::sun::star::uno::Any& _aDataSourceName) - :SfxSingleTabDialog(pParent,UID_DLG_TABLE_FILTER,_pItems) + :SfxSingleTabDialog(pParent,DLG_TABLE_FILTER,_pItems) ,m_pImpl( new ODbDataSourceAdministrationHelper( _rxORB, pParent, this ) ) ,m_bStopExecution(sal_False) ,m_pOutSet(_pItems) diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 5f0e7628876e..a4914cd45cc5 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -360,13 +360,10 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) // der Close-Button hat schon einen Standard-Help-Text, den ich aber hier nicht haben moechte, also den Text ruecksetzen // und eine neue ID verteilen aCloseButton.SetHelpText(String()); - // FIXME: HELPID - aCloseButton.SetHelpId(""/*HID_JOINSH_ADDTAB_CLOSE*/); + aCloseButton.SetHelpId(HID_JOINSH_ADDTAB_CLOSE); - // FIXME: HELPID - m_aTableList.SetHelpId( ""/*HID_JOINSH_ADDTAB_TABLELIST*/ ); - // FIXME: HELPID - m_aQueryList.SetHelpId( ""/*HID_JOINSH_ADDTAB_QUERYLIST*/ ); + m_aTableList.SetHelpId( HID_JOINSH_ADDTAB_TABLELIST ); + m_aQueryList.SetHelpId( HID_JOINSH_ADDTAB_QUERYLIST ); ////////////////////////////////////////////////////////////////////// m_aCaseTables.SetClickHdl( LINK( this, OAddTableDlg, OnTypeSelected ) ); diff --git a/dbaccess/source/ui/dlg/adtabdlg.src b/dbaccess/source/ui/dlg/adtabdlg.src index af1d861a0faa..431f86f3d51d 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.src +++ b/dbaccess/source/ui/dlg/adtabdlg.src @@ -38,7 +38,7 @@ ModelessDialog DLG_JOIN_TABADD { OutputSize = TRUE ; SVLook = TRUE ; - HelpID = DLG_JOIN_TABADD ; + HelpID = HID_DLG_JOIN_TABADD ; Size = MAP_APPFONT ( 178 , 147 ) ; Moveable = TRUE ; Closeable = TRUE ; diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src index 7b0dbe011342..2a8d762e8d57 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.src +++ b/dbaccess/source/ui/dlg/dbadminsetup.src @@ -370,7 +370,7 @@ TabPage PAGE_DBWIZARD_MYSQL_JDBC Text[ en-US ] = "Default: 3306"; }; - AUTOHELP_JDBCCONTROLGROUP(HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME) + AUTOHELP_JDBCCONTROLGROUP(HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME,HID_PAGE_DBWIZARD_JDBC_ET_MYSQLHOSTSERVER,HID_PAGE_DBWIZARD_JDBC_ET_MYSQLPORT,HID_PAGE_DBWIZARD_JDBC_ET_MYSQLCLASS,HID_PAGE_DBWIZARD_JDBC_PB_TESTMYSQLCLASS) }; TabPage PAGE_DBWIZARD_MYSQL_NATIVE @@ -416,7 +416,7 @@ TabPage PAGE_DBWIZARD_DBASE Text[ en-US ] = "Select the folder where the dBASE files are stored." ; }; - AUTO_HELP_BROWSECONTROLGROUP( 3, HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION) + AUTO_HELP_BROWSECONTROLGROUP( 3, HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION,HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION) }; @@ -440,7 +440,7 @@ TabPage PAGE_DBWIZARD_TEXT }; - AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE) + AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE,HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE) AUTO_SEPARATORCONTROLGROUP(82, WIZARD_PAGE_X) }; @@ -464,7 +464,7 @@ TabPage PAGE_DBWIZARD_MSACCESS Text[ en-US ] = "Please select the Microsoft Access file you want to access."; }; - AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION) + AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION, HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION) // FT_MSACCESS_MDB_FILE }; @@ -527,7 +527,7 @@ TabPage PAGE_DBWIZARD_ADABAS Text[ en-US ] = "Enter the name of the Adabas D database you want to connect to.\nClick 'Browse...' to select an Adabas D database that is already registered in %PRODUCTNAME." ; }; - AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME) + AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME, HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME) }; @@ -547,7 +547,7 @@ TabPage PAGE_DBWIZARD_ADO Text[ en-US ] = "Please enter the URL of the ADO data source you want to connect to.\nClick 'Browse' to configure provider-specific settings.\nPlease contact your system administrator if you are unsure about the following settings." ; }; - AUTO_HELP_BROWSECONTROLGROUP(5, HID_PAGE_DBWIZARD_ADO_ET_ADOURL) + AUTO_HELP_BROWSECONTROLGROUP(5, HID_PAGE_DBWIZARD_ADO_ET_ADOURL, HID_PAGE_DBWIZARD_ADO_PB_ADOURL) }; @@ -568,7 +568,7 @@ TabPage PAGE_DBWIZARD_ODBC Text[ en-US ] = "Enter the name of the ODBC database you want to connect to.\nClick 'Browse...' to select an ODBC database that is already registered in %PRODUCTNAME.\nPlease contact your system administrator if you are unsure about the following settings." ; }; - AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_ODBC_ET_NAMEOFODBCDATASOURCE) + AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_ODBC_ET_NAMEOFODBCDATASOURCE, HID_PAGE_DBWIZARD_ODBC_PB_NAMEOFODBCDATASOURCE) }; TabPage PAGE_DBWIZARD_USERDEFINED @@ -578,7 +578,7 @@ TabPage PAGE_DBWIZARD_USERDEFINED Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; Hide = TRUE ; - AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE) + AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE, HID_PAGE_DBWIZARD_USERDEFINED_BROWSE) }; @@ -599,8 +599,8 @@ TabPage PAGE_DBWIZARD_JDBC Text[ en-US ] = "Please enter the required information to connect to a JDBC database.\nPlease contact your system administrator if you are unsure about the following settings." ; }; - AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_JDBC_ET_JDBCURL) - AUTO_JDBCDRIVERCLASSGROUP(119, HID_PAGE_DBWIZARD_JDBC_ET_JDBCCLASS) + AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_JDBC_ET_JDBCURL, HID_PAGE_DBWIZARD_JDBC_PB_JDBCURL) + AUTO_JDBCDRIVERCLASSGROUP(119, HID_PAGE_DBWIZARD_JDBC_ET_JDBCCLASS, HID_PAGE_DBWIZARD_JDBC_PB_TESTJDBCCLASS) }; @@ -632,7 +632,7 @@ TabPage PAGE_DBWIZARD_ORACLE Text[ en-US ] = "Please enter the required information to connect to an Oracle database.Note that a JDBC Driver Class must be installed on your system and registered with %PRODUCTNAME.\nPlease contact your system administrator if you are unsure about the following settings." ; }; - AUTOHELP_JDBCCONTROLGROUP(HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME) + AUTOHELP_JDBCCONTROLGROUP(HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME,HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEHOSTSERVER,HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEPORT,HID_PAGE_DBWIZARD_ORACLE_ET_ORACLECLASS,HID_PAGE_DBWIZARD_ORACLE_PB_TESTORACLECLASS) }; @@ -654,7 +654,7 @@ TabPage PAGE_DBWIZARD_SPREADSHEET }; - AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_SPREADSHEET_ET_SPREADSHEETPATH ) + AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_SPREADSHEET_ET_SPREADSHEETPATH,HID_PAGE_DBWIZARD_SPREADSHEET_PB_SPREADSHEETPATH ) String STR_SPREADSHEETPATH{ Text[ en-US ] = "~Location and file name" ; diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 78fe8aef1f84..cdecbd295df6 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -145,16 +145,11 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent enableButtons(WZB_FINISH, sal_False); enableAutomaticNextButtonState( true ); - // FIXME: HELPID - m_pPrevPage->SetHelpId(""/*HID_DBWIZ_PREVIOUS*/); - // FIXME: HELPID - m_pNextPage->SetHelpId(""/*HID_DBWIZ_NEXT*/); - // FIXME: HELPID - m_pCancel->SetHelpId(""/*HID_DBWIZ_CANCEL*/); - // FIXME: HELPID - m_pFinish->SetHelpId(""/*HID_DBWIZ_FINISH*/); - // FIXME: HELPID - m_pHelp->SetUniqueId(""/*UID_DBWIZ_HELP*/); + m_pPrevPage->SetHelpId(HID_DBWIZ_PREVIOUS); + m_pNextPage->SetHelpId(HID_DBWIZ_NEXT); + m_pCancel->SetHelpId(HID_DBWIZ_CANCEL); + m_pFinish->SetHelpId(HID_DBWIZ_FINISH); + m_pHelp->SetUniqueId(UID_DBWIZ_HELP); // no local resources needed anymore DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _pItems->GetItem(DSID_TYPECOLLECTION)); diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index c2bf98061782..5a601bd56c92 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -318,16 +318,11 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent aPath.push_back(PAGE_DBSETUPWIZARD_INTRO); declarePath( static_cast(m_pCollection->size()+1), aPath); - // FIXME: HELPID - m_pPrevPage->SetHelpId(""/*HID_DBWIZ_PREVIOUS*/); - // FIXME: HELPID - m_pNextPage->SetHelpId(""/*HID_DBWIZ_NEXT*/); - // FIXME: HELPID - m_pCancel->SetHelpId(""/*HID_DBWIZ_CANCEL*/); - // FIXME: HELPID - m_pFinish->SetHelpId(""/*HID_DBWIZ_FINISH*/); - // FIXME: HELPID - m_pHelp->SetUniqueId(""/*UID_DBWIZ_HELP*/); + m_pPrevPage->SetHelpId(HID_DBWIZ_PREVIOUS); + m_pNextPage->SetHelpId(HID_DBWIZ_NEXT); + m_pCancel->SetHelpId(HID_DBWIZ_CANCEL); + m_pFinish->SetHelpId(HID_DBWIZ_FINISH); + m_pHelp->SetUniqueId(UID_DBWIZ_HELP); SetRoadmapInteractive( sal_True ); ActivatePage(); } diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index db0542525aa3..ee6b853b5eed 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -470,8 +470,7 @@ void OSaveAsDlg::implInit() else if ( SAD_TITLE_RENAME == ( m_pImpl->m_nFlags & SAD_TITLE_RENAME ) ) { SetText( String( ModuleRes( STR_TITLE_RENAME ) ) ); - // FIXME: HELPID - m_pImpl->m_aTitle.SetHelpId(""/*HID_DLG_RENAME*/); + m_pImpl->m_aTitle.SetHelpId(HID_DLG_RENAME); } m_pImpl->m_aPB_OK.SetClickHdl(LINK(this,OSaveAsDlg,ButtonClickHdl)); diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index aa1dd1d3e002..ef715d8061cd 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -128,10 +128,8 @@ DBG_NAME(IndexFieldsControl) { DBG_CTOR(IndexFieldsControl,NULL); - // FIXME: HELPID - SetUniqueId( ""/*UID_DLGINDEX_INDEXDETAILS_BACK*/ ); - // FIXME: HELPID - GetDataWindow().SetUniqueId( ""/*UID_DLGINDEX_INDEXDETAILS_MAIN*/ ); + SetUniqueId( UID_DLGINDEX_INDEXDETAILS_BACK ); + GetDataWindow().SetUniqueId( UID_DLGINDEX_INDEXDETAILS_MAIN ); } //------------------------------------------------------------------ @@ -292,10 +290,8 @@ DBG_NAME(IndexFieldsControl) m_pSortingCell->InsertEntry(m_sAscendingText); m_pSortingCell->InsertEntry(m_sDescendingText); - // FIXME: HELPID - m_pFieldNameCell->SetHelpId( ""/*HID_DLGINDEX_INDEXDETAILS_FIELD*/ ); - // FIXME: HELPID - m_pSortingCell->SetHelpId( ""/*HID_DLGINDEX_INDEXDETAILS_SORTORDER*/ ); + m_pFieldNameCell->SetHelpId( HID_DLGINDEX_INDEXDETAILS_FIELD ); + m_pSortingCell->SetHelpId( HID_DLGINDEX_INDEXDETAILS_SORTORDER ); } //------------------------------------------------------------------ diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 34f26083c913..5dd0ccda31b0 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -689,8 +689,13 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) { lcl_addButton( *this, BUTTON_HELP, false ); - // FIXME: HELPID - SetHelpId( rtl::OUStringToOString( m_sHelpURL, RTL_TEXTENCODING_UTF8 ) ); + rtl::OUString aTmp; + if ( m_sHelpURL.indexOfAsciiL( "HID:", 4 ) == 0 ) + aTmp = m_sHelpURL.copy( 4 ); + else + aTmp = m_sHelpURL; + + SetHelpId( rtl::OUStringToOString( aTmp, RTL_TEXTENCODING_UTF8 ) ); } } @@ -723,8 +728,7 @@ void OSQLMessageBox::impl_addDetailsButton() PushButton* pButton = GetPushButton( BUTTONID_MORE ); OSL_ENSURE( pButton, "OSQLMessageBox::impl_addDetailsButton: just added this button, why isn't it there?" ); pButton->SetClickHdl( LINK( this, OSQLMessageBox, ButtonClickHdl ) ); - // FIXME: HELPID - pButton->SetUniqueId( ""/*UID_SQLERROR_BUTTONMORE*/ ); + pButton->SetUniqueId( UID_SQLERROR_BUTTONMORE ); } } diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx index a384ad23cb04..10c8c8ec47a0 100644 --- a/dbaccess/source/ui/inc/FieldDescControl.hxx +++ b/dbaccess/source/ui/inc/FieldDescControl.hxx @@ -158,9 +158,9 @@ namespace dbaui sal_Bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const; void Contruct(); - OPropNumericEditCtrl* CreateNumericControl(USHORT _nHelpStr,short _nProperty,ULONG _nHelpId); + OPropNumericEditCtrl* CreateNumericControl(USHORT _nHelpStr,short _nProperty,const rtl::OString& _sHelpId); FixedText* CreateText(USHORT _nTextRes); - void InitializeControl(Control* _pControl,ULONG _nHelpId,bool _bAddChangeHandler); + void InitializeControl(Control* _pControl,const rtl::OString& _sHelpId,bool _bAddChangeHandler); protected: inline void setRightAligned() { m_bRightAligned = true; } diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index df7208aba9b7..daa8756751cf 100644 --- a/dbaccess/source/ui/inc/UITools.hxx +++ b/dbaccess/source/ui/inc/UITools.hxx @@ -337,7 +337,7 @@ namespace dbaui @return The URL for the help agent to dispatch. */ - ::com::sun::star::util::URL createHelpAgentURL(const ::rtl::OUString& _sModuleName,const sal_Int32 _nHelpId); + ::com::sun::star::util::URL createHelpAgentURL(const ::rtl::OUString& _sModuleName,const rtl::OString& _rHelpId); /** set the evaluation flag at the number formatter @param _rxFormatter diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc index be49adc0e518..730235b207ad 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -118,7 +118,7 @@ #define DLG_DATABASE_WIZARD RID_DIALOG_START + 29 #define RID_EXTENSION_NOT_PRESENT_DLG RID_DIALOG_START + 30 #define DLG_TEXT_CONNECTION_SETTINGS RID_DIALOG_START + 31 - +#define DLG_TABLE_FILTER RID_DIALOG_START + 32 //======================================================================== // tab pages diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 4979718ad41f..9656a9f90d37 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1497,13 +1497,13 @@ namespace } // annonymous // ......................................................................... // ----------------------------------------------------------------------------- -::com::sun::star::util::URL createHelpAgentURL(const ::rtl::OUString& _sModuleName,const sal_Int32 _nHelpId) +::com::sun::star::util::URL createHelpAgentURL(const ::rtl::OUString& _sModuleName, const rtl::OString& sHelpId) { ::com::sun::star::util::URL aURL; aURL.Complete = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.help://" ) ); aURL.Complete += _sModuleName; aURL.Complete += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ); - aURL.Complete += ::rtl::OUString::valueOf(_nHelpId); + aURL.Complete += ::rtl::OUString(sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8); ::rtl::OUString sAnchor; ::rtl::OUString sTempURL = aURL.Complete; @@ -1651,8 +1651,7 @@ sal_Int32 askForUserAction(Window* _pParent,USHORT _nTitle,USHORT _nText,sal_Boo if ( _bAll ) { aAsk.AddButton(String(ModuleRes(STR_BUTTON_TEXT_ALL)), RET_ALL, 0); - // FIXME: HELPID - aAsk.GetPushButton(RET_ALL)->SetHelpId(""/*HID_CONFIRM_DROP_BUTTON_ALL*/); + aAsk.GetPushButton(RET_ALL)->SetHelpId(HID_CONFIRM_DROP_BUTTON_ALL); } return aAsk.Execute(); } diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index f33c82abecb7..fa72a03269cc 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -70,6 +70,8 @@ #include "FieldControls.hxx" #endif +#include "dbaccess_slotid.hrc" + using namespace ::dbaui; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; diff --git a/dbaccess/source/ui/misc/WizardPages.src b/dbaccess/source/ui/misc/WizardPages.src index 9871c3f7d810..624be87c898e 100644 --- a/dbaccess/source/ui/misc/WizardPages.src +++ b/dbaccess/source/ui/misc/WizardPages.src @@ -35,6 +35,7 @@ #include "dbaccess_helpid.hrc" #endif +#include "dbaccess_slotid.hrc" #define WINDOW_SIZE_X 276 #define WINDOW_SIZE_Y 185 @@ -308,7 +309,7 @@ Menu RID_SBA_RTF_PKEYPOPUP MenuItem { Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ; - HelpID = SID_TABLEDESIGN_TABED_PRIMARYKEY ; + HelpID = HID_TABLEDESIGN_TABED_PRIMARYKEY ; Checkable = TRUE ; Text [ en-US ] = "Primary Key" ; }; diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx index d06c45cfce3a..f22d6f64ee87 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx @@ -119,8 +119,7 @@ OQueryTableWindow::OQueryTableWindow( Window* pParent, const TTableWindowData::v if (m_strInitialAlias == pTabWinData->GetTableName()) m_strInitialAlias = ::rtl::OUString(); - // FIXME: HELPID - SetHelpId(""/*HID_CTL_QRYDGNTAB*/); + SetHelpId(HID_CTL_QRYDGNTAB); } //------------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index e61d0b52fc84..c083392a9613 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -310,8 +310,7 @@ OQueryTableView::OQueryTableView( Window* pParent,OQueryDesignView* pView) : OJoinTableView( pParent,pView) { DBG_CTOR(OQueryTableView,NULL); - // FIXME: HELPID - SetHelpId(""/*HID_CTL_QRYDGNTAB*/); + SetHelpId(HID_CTL_QRYDGNTAB); } //------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 1723a262ab49..66b6eec9465c 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -173,8 +173,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) ,m_bInUndoMode(sal_False) { DBG_CTOR(OSelectionBrowseBox,NULL); - // FIXME: HELPID - SetHelpId(""/*HID_CTL_QRYDGNCRIT*/); + SetHelpId(HID_CTL_QRYDGNCRIT); m_nMode = BROWSER_COLUMNSELECTION | BROWSER_HIDESELECT | BROWSER_KEEPSELECTION | BROWSER_HIDECURSOR @@ -189,16 +188,11 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) m_pOrderCell = new ListBoxControl(&GetDataWindow()); m_pFunctionCell = new ListBoxControl(&GetDataWindow()); m_pFunctionCell->SetDropDownLineCount( 20 ); - // FIXME: HELPID - m_pVisibleCell->SetHelpId(""/*HID_QRYDGN_ROW_VISIBLE*/); - // FIXME: HELPID - m_pTableCell->SetHelpId(""/*HID_QRYDGN_ROW_TABLE*/); - // FIXME: HELPID - m_pFieldCell->SetHelpId(""/*HID_QRYDGN_ROW_FIELD*/); - // FIXME: HELPID - m_pOrderCell->SetHelpId(""/*HID_QRYDGN_ROW_ORDER*/); - // FIXME: HELPID - m_pFunctionCell->SetHelpId(""/*HID_QRYDGN_ROW_FUNCTION*/); + m_pVisibleCell->SetHelpId(HID_QRYDGN_ROW_VISIBLE); + m_pTableCell->SetHelpId(HID_QRYDGN_ROW_TABLE); + m_pFieldCell->SetHelpId(HID_QRYDGN_ROW_FIELD); + m_pOrderCell->SetHelpId(HID_QRYDGN_ROW_ORDER); + m_pFunctionCell->SetHelpId(HID_QRYDGN_ROW_FUNCTION); ////////////////////////////////////////////////////////////////////// // TriState der ::com::sun::star::form::CheckBox abschalten @@ -2706,7 +2700,7 @@ void OSelectionBrowseBox::enableControl(const OTableFieldDescRef& _rEntry,Window _pControl->EnableInput(bEnable); } // ----------------------------------------------------------------------------- -void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,ULONG _nHelpId) +void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,const rtl::OString& _sHelpId) { m_pTextCell->SetText(_sText); m_pTextCell->ClearModifyFlag(); @@ -2715,15 +2709,10 @@ void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,c enableControl(_rEntry,m_pTextCell); - // FIXME: HELPID - #if 0 - if (m_pTextCell->GetHelpId() != _nHelpId) + if (m_pTextCell->GetHelpId() != _sHelpId) // da TextCell in verschiedenen Kontexten verwendet wird, muss ich den gecachten HelpText loeschen m_pTextCell->SetHelpText(String()); - m_pTextCell->SetHelpId(_nHelpId); - #else - (void)_nHelpId; - #endif + m_pTextCell->SetHelpId(_sHelpId); } // ----------------------------------------------------------------------------- void OSelectionBrowseBox::invalidateUndoRedo() diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index e4fd3471fd97..3d215a81f4c8 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -261,7 +261,7 @@ namespace dbaui void appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow); OTableFields& getFields() const; void enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl); - void setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,ULONG _nHelpId); + void setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,const rtl::OString& _sHelpId); void invalidateUndoRedo(); OTableFieldDescRef getEntry(OTableFields::size_type _nPos); diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index c422ea5cf1e1..e14c234cc5d3 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -101,8 +101,7 @@ ORelationTableView::ORelationTableView( Window* pParent, ORelationDesignView* pV { DBG_CTOR(ORelationTableView,NULL); - // FIXME: HELPID - SetHelpId(""/*HID_CTL_RELATIONTAB*/); + SetHelpId(HID_CTL_RELATIONTAB); } //------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx index 8d5edcdacd1b..727de7fe60ea 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx @@ -62,8 +62,7 @@ OFieldDescGenWin::OFieldDescGenWin( Window* pParent, OTableDesignHelpBar* pHelp { DBG_CTOR(OFieldDescGenWin,NULL); m_pFieldControl = new OTableFieldControl(this,pHelp); - // FIXME: HELPID - m_pFieldControl->SetHelpId(""/*HID_TAB_DESIGN_FIELDCONTROL*/); + m_pFieldControl->SetHelpId(HID_TAB_DESIGN_FIELDCONTROL); m_pFieldControl->Show(); } //------------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 4590d7b9082b..2f7fc5f5a2b1 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -106,6 +106,8 @@ #include "TableFieldControl.hxx" #endif +#include "dbaccess_slotid.hrc" + using namespace ::dbaui; using namespace ::comphelper; using namespace ::svt; @@ -246,10 +248,8 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow) { DBG_CTOR(OTableEditorCtrl,NULL); - // FIXME: HELPID - SetHelpId(""/*HID_TABDESIGN_BACKGROUND*/); - // FIXME: HELPID - GetDataWindow().SetHelpId(""/*HID_CTL_TABLEEDIT*/); + SetHelpId(HID_TABDESIGN_BACKGROUND); + GetDataWindow().SetHelpId(HID_CTL_TABLEEDIT); m_pRowList = GetView()->getController().getRows(); m_nDataPos = 0; @@ -344,12 +344,9 @@ void OTableEditorCtrl::InitCellController() pDescrCell = new Edit( &GetDataWindow(), WB_LEFT ); pDescrCell->SetMaxTextLen( MAX_DESCR_LEN ); - // FIXME: HELPID - pNameCell->SetHelpId(""/*HID_TABDESIGN_NAMECELL*/); - // FIXME: HELPID - pTypeCell->SetHelpId(""/*HID_TABDESIGN_TYPECELL*/); - // FIXME: HELPID - pDescrCell->SetHelpId(""/*HID_TABDESIGN_COMMENTCELL*/); + pNameCell->SetHelpId(HID_TABDESIGN_NAMECELL); + pTypeCell->SetHelpId(HID_TABDESIGN_TYPECELL); + pDescrCell->SetHelpId(HID_TABDESIGN_COMMENTCELL); Size aHeight; const Control* pControls[] = { pTypeCell,pDescrCell,pNameCell}; diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx index 183bcb8fca71..c2326e441c95 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx @@ -52,8 +52,7 @@ OTableDesignHelpBar::OTableDesignHelpBar( Window* pParent ) : { DBG_CTOR(OTableDesignHelpBar,NULL); m_pTextWin = new MultiLineEdit( this, WB_VSCROLL | WB_LEFT | WB_BORDER | WB_NOTABSTOP | WB_READONLY); - // FIXME: HELPID - m_pTextWin->SetHelpId(""/*HID_TABLE_DESIGN_HELP_WINDOW*/); + m_pTextWin->SetHelpId(HID_TABLE_DESIGN_HELP_WINDOW); m_pTextWin->SetReadOnly(); m_pTextWin->SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() ); m_pTextWin->Show(); diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index ce106ee74952..f16624dbdad2 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -90,8 +90,7 @@ OTableBorderWindow::OTableBorderWindow(Window* pParent) : Window(pParent,WB_BORD m_pEditorCtrl = new OTableEditorCtrl( this); m_pFieldDescWin = new OTableFieldDescWin( this ); - // FIXME: HELPID - m_pFieldDescWin->SetHelpId(""/*HID_TAB_DESIGN_DESCWIN*/); + m_pFieldDescWin->SetHelpId(HID_TAB_DESIGN_DESCWIN); // set depending windows and controls m_pEditorCtrl->SetDescrWin(m_pFieldDescWin); diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index 3f60dd06f4b5..6f136ab0b4e8 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -93,13 +93,11 @@ OTableFieldDescWin::OTableFieldDescWin( Window* pParent) ////////////////////////////////////////////////////////////////////// // HelpBar m_pHelpBar = new OTableDesignHelpBar( this ); - // FIXME: HELPID - m_pHelpBar->SetHelpId(""/*HID_TAB_DESIGN_HELP_TEXT_FRAME*/); + m_pHelpBar->SetHelpId(HID_TAB_DESIGN_HELP_TEXT_FRAME); m_pHelpBar->Show(); m_pGenPage = new OFieldDescGenWin( this, m_pHelpBar ); - // FIXME: HELPID - getGenPage()->SetHelpId( ""/*HID_TABLE_DESIGN_TABPAGE_GENERAL*/ ); + getGenPage()->SetHelpId( HID_TABLE_DESIGN_TABPAGE_GENERAL ); getGenPage()->Show(); } diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src index d40da4e3c358..fe01dff5f79f 100644 --- a/dbaccess/source/ui/tabledesign/table.src +++ b/dbaccess/source/ui/tabledesign/table.src @@ -171,7 +171,7 @@ Menu RID_TABLEDESIGNROWPOPUPMENU MenuItem { Identifier = SID_TABLEDESIGN_INSERTROWS ; - HelpID = SID_TABLEDESIGN_INSERTROWS ; + HelpID = HID_TABLEDESIGN_INSERTROWS ; Text [ en-US ] = "Insert Rows" ; }; MenuItem @@ -181,7 +181,7 @@ Menu RID_TABLEDESIGNROWPOPUPMENU MenuItem { Identifier = SID_TABLEDESIGN_TABED_PRIMARYKEY ; - HelpID = SID_TABLEDESIGN_TABED_PRIMARYKEY ; + HelpID = HID_TABLEDESIGN_TABED_PRIMARYKEY ; Checkable = TRUE ; Text [ en-US ] = "Primary Key" ; }; -- cgit From d35a99db3cfc6a13fc36143c26e2d1a95a7ea391 Mon Sep 17 00:00:00 2001 From: Caol?n McNamara Date: Sat, 10 Jul 2010 20:27:12 +0100 Subject: cmcfixes76: #i113071# NULLs that should be sal_False --- dbaccess/source/ui/misc/TokenWriter.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 7c41a0fbfa04..c0c67984f7ca 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -100,7 +100,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor& const Reference< XMultiServiceFactory >& _rM, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF, const String& rExchange) - :m_bBookmarkSelection( NULL ) + :m_bBookmarkSelection(sal_False) ,m_xFormatter(_rxNumberF) ,m_xFactory(_rM) ,m_nCommandType(CommandType::TABLE) @@ -131,7 +131,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor& // import data ODatabaseImportExport::ODatabaseImportExport( const ::dbtools::SharedConnection& _rxConnection, const Reference< XNumberFormatter >& _rxNumberF, const Reference< XMultiServiceFactory >& _rM ) - :m_bBookmarkSelection( NULL ) + :m_bBookmarkSelection(sal_False) ,m_xConnection(_rxConnection) ,m_xFormatter(_rxNumberF) ,m_xFactory(_rM) -- cgit From d09117abd835a579e7361babedd62e88fa535e69 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 20 Jul 2010 14:50:49 +0200 Subject: CWS changehid: #i111784#: consolidate usage of HID schema; remove unused SetDialogHelpId methods --- dbaccess/source/ui/dlg/sqlmessage.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 5dd0ccda31b0..9015704d2878 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -77,6 +77,8 @@ #include "moduledbu.hxx" #endif +#include + #define BUTTONID_MORE BUTTONID_RETRY + 1 #define DIALOG_WIDTH 220 @@ -690,8 +692,9 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) lcl_addButton( *this, BUTTON_HELP, false ); rtl::OUString aTmp; - if ( m_sHelpURL.indexOfAsciiL( "HID:", 4 ) == 0 ) - aTmp = m_sHelpURL.copy( 4 ); + INetURLObject aHID( m_sHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + aTmp = aHID.GetURLPath(); else aTmp = m_sHelpURL; -- cgit From f45cf6b4635a31861c11b8bc69d39691e27baacf Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 3 Sep 2010 17:53:47 +0200 Subject: dba34a: removed SvLBox'es (and friends) Set/GetWindowBits. They were used in parallel to Window's Set/GetStyle, with WB_* values which overlapped with existing (generic) WB_* bits. Since this overlapping has been removed, there's no need to have both Style and WindowBits at those classes. Should remove some source of confusion and error (and, well, perhaps introduce some new errors :) ). --- dbaccess/source/ui/app/AppDetailPageHelper.cxx | 2 +- dbaccess/source/ui/dlg/adtabdlg.cxx | 2 +- dbaccess/source/ui/dlg/sqlmessage.cxx | 2 +- dbaccess/source/ui/dlg/tablespage.cxx | 2 +- dbaccess/source/ui/misc/WNameMatch.cxx | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index afad4e3a2d7c..7ff09f443e64 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -890,7 +890,7 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons { WaitObject aWaitCursor(this); - _pTreeView->SetWindowBits(WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP); + _pTreeView->SetStyle(_pTreeView->GetStyle() | WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP); _pTreeView->GetModel()->SetSortMode(SortAscending); _pTreeView->EnableCheckButton( NULL ); // do not show any buttons _pTreeView->SetSelectionMode(MULTIPLE_SELECTION); diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index a4914cd45cc5..4ef32efcc7ac 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -377,7 +377,7 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) ////////////////////////////////////////////////////////////////////// m_aTableList.EnableInplaceEditing( FALSE ); - m_aTableList.SetWindowBits(WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL ); + m_aTableList.SetStyle(m_aTableList.GetStyle() | WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL ); m_aTableList.EnableCheckButton( NULL ); // do not show any buttons m_aTableList.SetSelectionMode( SINGLE_SELECTION ); m_aTableList.notifyHiContrastChanged(); diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index f7600fd137ed..19be1a916188 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -399,7 +399,7 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi m_aExceptionList.SetSelectionMode(SINGLE_SELECTION); m_aExceptionList.SetDragDropMode(0); m_aExceptionList.EnableInplaceEditing(sal_False); - m_aExceptionList.SetWindowBits(WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL); + m_aExceptionList.SetStyle(m_aExceptionList.GetStyle() | WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL); m_aExceptionList.SetSelectHdl(LINK(this, OExceptionChainDialog, OnExceptionSelected)); m_aExceptionList.SetNodeDefaultImages( ); diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index a48b08de740d..6523e0f17cd6 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -162,7 +162,7 @@ DBG_NAME(OTableSubscriptionPage) m_aTablesList.SetSelectionMode( MULTIPLE_SELECTION ); m_aTablesList.SetDragDropMode( 0 ); m_aTablesList.EnableInplaceEditing( sal_False ); - m_aTablesList.SetWindowBits(WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT); + m_aTablesList.SetStyle(m_aTablesList.GetStyle() | WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT); m_aTablesList.Clear(); diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index d54a056f863e..803554a0094f 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -92,8 +92,8 @@ OWizNameMatching::OWizNameMatching( Window* pParent) m_CTRL_RIGHT.SetSelectHdl(LINK(this,OWizNameMatching,TableListRightSelectHdl)); m_CTRL_RIGHT.EnableCheckButton( NULL ); - m_CTRL_LEFT.SetWindowBits( WB_FORCE_MAKEVISIBLE ); - m_CTRL_RIGHT.SetWindowBits( WB_FORCE_MAKEVISIBLE ); + m_CTRL_LEFT.SetStyle( m_CTRL_LEFT.GetStyle() | WB_FORCE_MAKEVISIBLE ); + m_CTRL_RIGHT.SetStyle( m_CTRL_RIGHT.GetStyle() | WB_FORCE_MAKEVISIBLE ); m_sSourceText = m_FT_TABLE_LEFT.GetText(); m_sSourceText.AppendAscii("\n"); @@ -405,7 +405,7 @@ OColumnTreeBox::OColumnTreeBox( Window* pParent, const ResId& rResId ) { SetDragDropMode( 0 ); EnableInplaceEditing( sal_False ); - SetWindowBits(WB_BORDER | WB_HASBUTTONS | WB_HSCROLL); + SetStyle(GetStyle() | WB_BORDER | WB_HASBUTTONS | WB_HSCROLL); SetSelectionMode( SINGLE_SELECTION ); } //------------------------------------------------------------------------ -- cgit From 8e88ac109dc9eba88db92940d13933fc3a4393d8 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 10 Sep 2010 13:10:07 +0200 Subject: sb129: #i113189# change UNO components to use passive registration --- dbaccess/source/ui/misc/uiservices.cxx | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx index d206e2854da6..0c5a37e31378 100644 --- a/dbaccess/source/ui/misc/uiservices.cxx +++ b/dbaccess/source/ui/misc/uiservices.cxx @@ -124,28 +124,6 @@ extern "C" DBACCESS_DLLPUBLIC void SAL_CALL component_getImplementationEnvironme *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//--------------------------------------------------------------------------------------- -extern "C" DBACCESS_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - writeDBLoaderInfo(pRegistryKey); - return ::dbaui::OModuleRegistration::writeComponentInfos( - static_cast(pServiceManager), - static_cast(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - //--------------------------------------------------------------------------------------- extern "C" DBACCESS_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, -- cgit From 770aabb60693fb67d5c0d95aa80a2e0caf3a1d1e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 15 Sep 2010 11:51:07 +0200 Subject: dba34a: removed unused string resources / resource IDs --- dbaccess/source/ui/dlg/dbadmin2.src | 40 ------------------------------------- dbaccess/source/ui/inc/dbu_dlg.hrc | 22 ++++++++++---------- 2 files changed, 11 insertions(+), 51 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/dbadmin2.src b/dbaccess/source/ui/dlg/dbadmin2.src index 50b796541872..7e8535d425f8 100644 --- a/dbaccess/source/ui/dlg/dbadmin2.src +++ b/dbaccess/source/ui/dlg/dbadmin2.src @@ -52,11 +52,6 @@ String STR_ENTER_CONNECTION_PASSWORD Text [ en-US ] = "A password is needed to connect to the data source \"$name$\"."; }; -String STR_QUERY_DROP_ALL -{ - Text[ en-US ] = "Do you want to delete all selected items?"; -}; - String STR_ASK_FOR_DIRECTORY_CREATION { Text [ en-US ] = "The directory\n\n$path$\n\ndoes not exist. Should it be created?"; @@ -67,41 +62,6 @@ String STR_COULD_NOT_CREATE_DIRECTORY Text [ en-US ] = "The directory $name$ could not be created."; }; -String STR_ADDRESSBOOK_SYSTEM -{ - Text[ en-US ] = "Windows address book"; -}; -String STR_ADDRESSBOOK_OUTLOOK -{ - Text[ en-US ] = "MS Outlook"; -}; -String STR_ADDRESSBOOK_MOZILLA -{ - Text[ en-US ] = "Mozilla address book"; -}; -String STR_ADDRESSBOOK_THUNDERBIRD -{ - Text[ en-US ] = "Thunderbird address book"; -}; -String STR_ADDRESSBOOK_EVOLUTION -{ - Text[ en-US ] = "Evolution address book"; -}; -String STR_ADDRESSBOOK_LDAP -{ - Text[ en-US ] = "LDAP address book"; -}; - -String STR_HINT_READONLY_CONNECTION -{ - Text [ en-US ] = "(Connection is read-only)"; -}; - -String STR_HINT_CONNECTION_NOT_CAPABLE -{ - Text [ en-US ] = "(Not supported by this connection)"; -}; - #define EDIT_SIZE_X 50 #define FT_SIZE_X 90 #define WIN_X 220 diff --git a/dbaccess/source/ui/inc/dbu_dlg.hrc b/dbaccess/source/ui/inc/dbu_dlg.hrc index 7e1b7df0d100..b107a0014dbb 100644 --- a/dbaccess/source/ui/inc/dbu_dlg.hrc +++ b/dbaccess/source/ui/inc/dbu_dlg.hrc @@ -64,24 +64,24 @@ #define STR_ADABAS_ERROR_SYSTEMTABLES RID_STR_DLG_START + 6 #define STR_ERROR_PASSWORDS_NOT_IDENTICAL RID_STR_DLG_START + 7 #define STR_INDEXDESIGN_DOUBLE_COLUMN_NAME RID_STR_DLG_START + 8 -#define STR_DATASOURCE_DEFAULTNAME RID_STR_DLG_START + 9 -#define STR_ERR_EMPTY_DSN_NAME RID_STR_DLG_START + 10 + // FREE + // FREE #define STR_ERR_USE_CONNECT_TO RID_STR_DLG_START + 11 #define STR_ALREADYEXISTOVERWRITE RID_STR_DLG_START + 12 -#define STR_QUERY_DROP_ALL RID_STR_DLG_START + 13 + // FREE #define STR_INDEX_NAME_ALREADY_USED RID_STR_DLG_START + 14 #define STR_ASK_FOR_DIRECTORY_CREATION RID_STR_DLG_START + 15 #define STR_COULD_NOT_CREATE_DIRECTORY RID_STR_DLG_START + 16 -#define STR_ADDRESSBOOK_SYSTEM RID_STR_DLG_START + 17 -#define STR_ADDRESSBOOK_MOZILLA RID_STR_DLG_START + 18 -#define STR_ADDRESSBOOK_EVOLUTION RID_STR_DLG_START + 19 // FREE -#define STR_ADDRESSBOOK_LDAP RID_STR_DLG_START + 21 -#define STR_ADDRESSBOOK_OUTLOOK RID_STR_DLG_START + 22 + // FREE + // FREE + // FREE + // FREE + // FREE #define STR_COMMAND_EXECUTED_SUCCESSFULLY RID_STR_DLG_START + 23 #define STR_DIRECTSQL_CONNECTIONLOST RID_STR_DLG_START + 24 -#define STR_HINT_READONLY_CONNECTION RID_STR_DLG_START + 25 -#define STR_HINT_CONNECTION_NOT_CAPABLE RID_STR_DLG_START + 26 + // FREE + // FREE #define STR_USERADMIN_NOT_AVAILABLE RID_STR_DLG_START + 27 #define STR_TAB_INDEX_SORTORDER RID_STR_DLG_START + 28 #define STR_TAB_INDEX_FIELD RID_STR_DLG_START + 29 @@ -110,7 +110,7 @@ #define STR_NO_ADABASE_DATASOURCES RID_STR_DLG_START + 55 #define STR_NO_ADDITIONAL_SETTINGS RID_STR_DLG_START + 56 #define STR_HOSTNAME RID_STR_DLG_START + 57 -#define STR_ADDRESSBOOK_THUNDERBIRD RID_STR_DLG_START + 58 + // FREE #define STR_MOZILLA_PROFILE_NAME RID_STR_DLG_START + 59 #define STR_THUNDERBIRD_PROFILE_NAME RID_STR_DLG_START + 60 #define STR_EXPLAN_STRINGCONVERSION_ERROR RID_STR_DLG_START + 61 -- cgit From 06bbadbd5a5c2f22be8cd32a53beaa1f79b6806a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Sep 2010 09:08:55 +0200 Subject: dba34a: #i113475# SRB->ORB --- dbaccess/source/ui/dlg/ExtensionNotPresent.cxx | 218 ------------------------- dbaccess/source/ui/dlg/ExtensionNotPresent.hrc | 48 ------ dbaccess/source/ui/dlg/ExtensionNotPresent.src | 89 ---------- dbaccess/source/ui/inc/ExtensionNotPresent.hxx | 101 ------------ dbaccess/source/ui/misc/dbumiscres.src | 2 +- 5 files changed, 1 insertion(+), 457 deletions(-) delete mode 100644 dbaccess/source/ui/dlg/ExtensionNotPresent.cxx delete mode 100644 dbaccess/source/ui/dlg/ExtensionNotPresent.hrc delete mode 100644 dbaccess/source/ui/dlg/ExtensionNotPresent.src delete mode 100644 dbaccess/source/ui/inc/ExtensionNotPresent.hxx (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/ExtensionNotPresent.cxx b/dbaccess/source/ui/dlg/ExtensionNotPresent.cxx deleted file mode 100644 index 49d4182d9ef8..000000000000 --- a/dbaccess/source/ui/dlg/ExtensionNotPresent.cxx +++ /dev/null @@ -1,218 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "precompiled_dbaccess.hxx" - -#include "dbaccess_helpid.hrc" -#include "dbu_resource.hrc" -#include "ExtensionNotPresent.hrc" -#include "ExtensionNotPresent.hxx" -#include "moduledbu.hxx" -#include "UITools.hxx" - -/** === begin UNO includes === **/ -#include -#include -#include -#include -/** === end UNO includes === **/ - -#include -#include -#include -#include -#include -#include -#include -#include - - -namespace dbaui -{ -using namespace ::com::sun::star; -using namespace ::comphelper; - -#define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)) - -DBG_NAME( dbu_OExtensionNotPresentDialog ) -//======================================================================== -// class OExtensionNotPresentDialog -//======================================================================== - OExtensionNotPresentDialog::OExtensionNotPresentDialog( Window* _pParent, uno::Reference< lang::XMultiServiceFactory > _xORB) - : ModalDialog( _pParent, ModuleRes(RID_EXTENSION_NOT_PRESENT_DLG) ) - ,m_aFI_WARNING(this, ModuleRes(FI_WARNING)) - ,m_aFT_TEXT(this, ModuleRes(FT_TEXT ) ) - ,m_aPB_DOWNLOAD(this, ModuleRes(PB_DOWNLOAD)) - ,m_aPB_CANCEL(this, ModuleRes(PB_CANCEL)) - ,m_xMultiServiceFactory(_xORB) -{ - DBG_CTOR( dbu_OExtensionNotPresentDialog, NULL); - - try - { - SvtSysLocale aSysLocale; - m_nLocale = aSysLocale.GetLocaleData().getLocale(); - } - catch(uno::Exception&) - { - } - - // set a ClickHandler for the 'Download' button - m_aPB_DOWNLOAD.SetClickHdl( LINK( this, OExtensionNotPresentDialog, Download_Click ) ); - - // get message string out of the resource - String sText = String( ModuleRes( RID_STR_EXTENSION_NOT_PRESENT ) ); - // String sExtensionName = String( ModuleRes( RID_STR_EXTENSION_NAME ) ); - String sExtensionName = getFromConfigurationExtension("Name"); - sText.SearchAndReplaceAscii("%RPT_EXTENSION_NAME", sExtensionName); - - m_aFT_TEXT.SetText(sText); - - // calulate the size of the text field - Rectangle aPrimaryRect( Point(0,0), m_aFT_TEXT.GetSizePixel() ); - Rectangle aSuggestedRect( GetTextRect( aPrimaryRect, sText, TEXT_DRAW_MULTILINE | TEXT_DRAW_LEFT ) ); - - Size aTempSize = LogicToPixel( Size(LEFT_PADDING + RIGHT_PADDING, 1), MAP_APPFONT); // real pixel size of LEFT and RIGHT_PADDING - sal_Int32 nWidthWithoutFixedText = aTempSize.getWidth() ; - sal_Int32 nHeightWithoutFixedText = GetSizePixel().getHeight() - m_aFT_TEXT.GetSizePixel().getHeight(); - - Size aNewSize = aSuggestedRect.GetSize(); - m_aFT_TEXT.SetSizePixel( aNewSize ); - sal_Int32 nNewWidth = nWidthWithoutFixedText + aSuggestedRect.GetWidth(); - sal_Int32 nNewHeight = nHeightWithoutFixedText + aSuggestedRect.GetHeight(); - - // set new window width & height - Size aDialogWindowSize = GetSizePixel(); - aDialogWindowSize.setWidth( nNewWidth ); - aDialogWindowSize.setHeight( nNewHeight ); - SetSizePixel(aDialogWindowSize); - - // move Action items - sal_Int32 nWindowWidth = GetSizePixel().getWidth(); - sal_Int32 nWindowHeight = GetSizePixel().getHeight(); - - Size aButtonSize = LogicToPixel( Size(BUTTON_WIDTH, BUTTON_HEIGHT), MAP_APPFONT); // real pixel size of a button - - Point aNewPos = m_aPB_DOWNLOAD.GetPosPixel(); - aNewPos.setX(nWindowWidth / 2 - m_aPB_DOWNLOAD.GetSizePixel().getWidth() - 8); - aNewPos.setY(nWindowHeight - aButtonSize.getHeight() - 5); - m_aPB_DOWNLOAD.SetPosPixel(aNewPos ); - - aNewPos = m_aPB_CANCEL.GetPosPixel(); - aNewPos.setX(nWindowWidth / 2 + 8); - aNewPos.setY(nWindowHeight - aButtonSize.getHeight() - 5); - m_aPB_CANCEL.SetPosPixel(aNewPos ); - - m_aFI_WARNING.SetImage(WarningBox::GetStandardImage()); - - // set an image in high contrast - // m_aFI_WARNING.SetModeImage(Image(BMP_EXCEPTION_WARNING_SCH), BMP_COLOR_HIGHCONTRAST); - - // to resize images - // WinBits aBits = m_aFI_WARNING.GetStyle(); - // aBits |= WB_SCALE; - // m_aFI_WARNING.SetStyle(aBits); - // - // Size aImageSize = m_aFI_WARNING.GetSizePixel(); - // (void) aImageSize; - // m_aFI_WARNING.Resize(); - - - Resize(); - FreeResource(); -} - -//------------------------------------------------------------------------ -OExtensionNotPresentDialog::~OExtensionNotPresentDialog() -{ - DBG_DTOR( dbu_OExtensionNotPresentDialog, NULL); -} -// ----------------------------------------------------------------------------- -short OExtensionNotPresentDialog::Execute() -{ - DBG_CHKTHIS( dbu_OExtensionNotPresentDialog,NULL); - short nRet = ModalDialog::Execute(); - // RET_OK - // RET_NO - return nRet; -} - -//------------------------------------------------------------------------------ - -uno::Reference< com::sun::star::system::XSystemShellExecute > OExtensionNotPresentDialog::getShellExecuter() const -{ - uno::Reference xExecuter( m_xMultiServiceFactory->createInstance( UNISTRING( "com.sun.star.system.SystemShellExecute" )), uno::UNO_QUERY_THROW); - return xExecuter; -} -// ----------------------------------------------------------------------------- -rtl::OUString OExtensionNotPresentDialog::getFromConfigurationExtension(rtl::OUString const& _sPropertyName) const -{ - // get the URL to open in a browser from Configuration - static const ::rtl::OUString sConfigName( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.ReportDesign/Extension" ) ); - - ::utl::OConfigurationTreeRoot aConfiguration( ::utl::OConfigurationTreeRoot::createWithServiceFactory( m_xMultiServiceFactory, sConfigName ) ); - - rtl::OUString aValue; - aConfiguration.getNodeValue( _sPropertyName ) >>= aValue; - return aValue; -} - -// ----------------------------------------------------------------------------- -rtl::OUString OExtensionNotPresentDialog::getFromConfigurationExtension(rtl::OString const& _sPropertyName) const -{ - return getFromConfigurationExtension(rtl::OStringToOUString( _sPropertyName, RTL_TEXTENCODING_UTF8) ); -} - -// ----------------------------------------------------------------------------- -// handle the click on the download button -IMPL_LINK( OExtensionNotPresentDialog, Download_Click, PushButton*, EMPTYARG ) -{ - try - { - EndDialog( TRUE ); - - rtl::OUString suDownloadURL = getFromConfigurationExtension("DownloadURL"); - if (suDownloadURL.getLength() == 0) - { - // fallback - suDownloadURL = UNISTRING("http://extensions.services.openoffice.org"); - } - - // open such URL in a browser - uno::Reference< com::sun::star::system::XSystemShellExecute > xShellExecute( getShellExecuter() ); - xShellExecute->execute( suDownloadURL, ::rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS ); - } - catch( const uno::Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - return 0; -} - -// ============================================================================= -} // rptui -// ============================================================================= - diff --git a/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc b/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc deleted file mode 100644 index 69794e3a76bc..000000000000 --- a/dbaccess/source/ui/dlg/ExtensionNotPresent.hrc +++ /dev/null @@ -1,48 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef DBU_EXTENSIONNOTPRESENT_HRC -#define DBU_EXTENSIONNOTPRESENT_HRC - -#define FT_TEXT (1) -#define FI_WARNING (2) -#define PB_DOWNLOAD (10) -#define PB_CANCEL (11) - -#define FIXEDTEXT_HEIGHT 8 -#define CELL_PADDING 8 -#define BUTTON_HEIGHT 14 -#define BUTTON_WIDTH 55 -#define BROWSER_HEIGHT 75 -// #define PAGE_WIDTH ( CELL_PADDING + BUTTON_WIDTH + CELL_PADDING + BUTTON_WIDTH + CELL_PADDING) -#define LEFT_PADDING 32 /* size for the icon */ -#define RIGHT_PADDING 16 -#define DLG_WIDTH ( 250 ) -#define ACTION_LINE_START (CELL_PADDING + ( 3 * FIXEDTEXT_HEIGHT ) + 2 * CELL_PADDING + 1 ) -#define DLG_HEIGHT (ACTION_LINE_START + BUTTON_HEIGHT + CELL_PADDING) - - -#endif /* DBU_EXTENSIONNOTPRESENT_HRC */ diff --git a/dbaccess/source/ui/dlg/ExtensionNotPresent.src b/dbaccess/source/ui/dlg/ExtensionNotPresent.src deleted file mode 100644 index 9507c4256360..000000000000 --- a/dbaccess/source/ui/dlg/ExtensionNotPresent.src +++ /dev/null @@ -1,89 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "ExtensionNotPresent.hrc" -#include "dbaccess_helpid.hrc" -#include "dbu_resource.hrc" -#include -#include - - -String RID_STR_EXTENSION_NOT_PRESENT -{ - // #i96130# use hard coded name - Text [ en-US ] = "To open a report you require the extension Sunâ„¢ Report Builder.\n\nClick 'Download...' to download and install the extension."; - // OLD: Text [ en-US ] = "To open a report you require the extension %RPT_EXTENSION_NAME.\n\nClick 'Download...' to download and install the extension."; -}; -// To open a report you require the extension Sun Report Designer weiss der Geier Hauptsache extra langer Name -// String RID_STR_EXTENSION_NAME -// { -// Text = "Sun(TM) Report Builder"; -// }; - -ModalDialog RID_EXTENSION_NOT_PRESENT_DLG -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( DLG_WIDTH , DLG_HEIGHT ) ; - Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION" ; - HelpId = HID_EXTENSION_NOT_PRESENT_DLG; - Moveable = TRUE ; - Closeable = TRUE ; - - // most of the calulated values here are overridden by the ExtensionNotPresent ctor itself. - FixedImage FI_WARNING - { - Pos = MAP_APPFONT (CELL_PADDING / 2, CELL_PADDING) ; - Size = (32, 32); - Fixed=BMP_EXCEPTION_WARNING; - }; - - - FixedText FT_TEXT - { - Pos = MAP_APPFONT ( 32 , CELL_PADDING ) ; - Size = MAP_APPFONT ( DLG_WIDTH - LEFT_PADDING - RIGHT_PADDING , 3 * (FIXEDTEXT_HEIGHT + 2) ) ; - // Border = TRUE ; - // Text will set outside from RID_STR_EXTENSION_NOT_PRESENT - }; - - PushButton PB_DOWNLOAD - { - Pos = MAP_APPFONT ( DLG_WIDTH / 2 - (CELL_PADDING/2) - BUTTON_WIDTH, ACTION_LINE_START ) ; - Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; - DefButton = TRUE ; - TabStop = TRUE ; - Text [ en-US ] = "~Download..." ; - }; - - CancelButton PB_CANCEL - { - Pos = MAP_APPFONT ( DLG_WIDTH / 2 + (CELL_PADDING/2), ACTION_LINE_START) ; - Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; - TabStop = TRUE ; - }; -}; - diff --git a/dbaccess/source/ui/inc/ExtensionNotPresent.hxx b/dbaccess/source/ui/inc/ExtensionNotPresent.hxx deleted file mode 100644 index 0c64214d4c37..000000000000 --- a/dbaccess/source/ui/inc/ExtensionNotPresent.hxx +++ /dev/null @@ -1,101 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef DBU_EXTENSIONNOTPRESENT_HXX -#define DBU_EXTENSIONNOTPRESENT_HXX - -#ifndef _DIALOG_HXX //autogen -#include -#endif -#ifndef _FIXED_HXX //autogen -#include -#endif -#ifndef _SV_LSTBOX_HXX -#include -#endif -#ifndef _SV_FIELD_HXX -#include -#endif -#ifndef _SV_BUTTON_HXX -#include -#endif -#ifndef _COM_SUN_STAR_REPORT_XREPORTDEFINITION_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_ -#include -#endif - -#include -#include - -namespace dbaui -{ - -/************************************************************************* -|* -|* Groups and Sorting dialog -|* -\************************************************************************/ -class OExtensionNotPresentDialog : public ModalDialog -{ - FixedImage m_aFI_WARNING; - FixedText m_aFT_TEXT; - - PushButton m_aPB_DOWNLOAD; - CancelButton m_aPB_CANCEL; - - ::com::sun::star::lang::Locale m_nLocale; - com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xMultiServiceFactory; - - /** returns the format string. - */ - // ::rtl::OUString getFormatString(::sal_Int16 _nNumberFormatIndex); - - DECL_LINK(Download_Click,PushButton*); - - // not CopyCTOR, no self assignment - OExtensionNotPresentDialog(const OExtensionNotPresentDialog&); - void operator =(const OExtensionNotPresentDialog&); - - // get some values out of the configuration - rtl::OUString getFromConfigurationExtension(rtl::OUString const& _sPropertyName) const; - rtl::OUString getFromConfigurationExtension(rtl::OString const& _sPropertyName) const; // syntactic sugar - - ::com::sun::star::uno::Reference< ::com::sun::star::system::XSystemShellExecute > getShellExecuter() const; - -public: - OExtensionNotPresentDialog( Window* pParent, com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > ); - virtual ~OExtensionNotPresentDialog(); - virtual short Execute(); - - inline String getText() const { return m_aFT_TEXT.GetText(); } -}; -// ============================================================================= -} // namespace rptui -// ============================================================================= -#endif // DBU_EXTENSIONNOTPRESENT_HXX - diff --git a/dbaccess/source/ui/misc/dbumiscres.src b/dbaccess/source/ui/misc/dbumiscres.src index 552a076147d5..22bc80670cf6 100644 --- a/dbaccess/source/ui/misc/dbumiscres.src +++ b/dbaccess/source/ui/misc/dbumiscres.src @@ -96,5 +96,5 @@ String STR_NAMED_OBJECT_ALREADY_EXISTS String RID_STR_EXTENSION_NOT_PRESENT { // #i96130# use hard coded name - Text [ en-US ] = "The report, \"$file$\", requires the extension Sun Report Builder."; + Text [ en-US ] = "The report, \"$file$\", requires the extension Oracle Report Builder."; }; -- cgit From a2e5df777eecd0e55aaba1ced97fb6dcfcfe7321 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 15:54:00 +0200 Subject: dba34a: #i97111# make the 'Test Connection' button big enough to display all its text --- dbaccess/source/ui/dlg/ConnectionPage.cxx | 2 ++ dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 2 ++ dbaccess/source/ui/dlg/adminpages.cxx | 19 ++++++++++++++++++- dbaccess/source/ui/dlg/adminpages.hxx | 4 ++++ dbaccess/source/ui/dlg/makefile.mk | 2 -- 5 files changed, 26 insertions(+), 3 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index b2607ebc9f98..a1a146cd7b4b 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -220,6 +220,8 @@ namespace dbaui m_aTestJavaDriver.SetClickHdl(LINK(this,OConnectionTabPage,OnTestJavaClickHdl)); FreeResource(); + + LayoutHelper::fitSizeRightAligned( m_aTestConnection ); } // ----------------------------------------------------------------------- diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index c340e3576f34..cfc3deda1149 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -844,6 +844,8 @@ DBG_NAME(OAuthentificationPageSetup) m_aCBPasswordRequired.SetClickHdl(getControlModifiedLink()); m_aPBTestConnection.SetClickHdl(LINK(this,OGenericAdministrationPage,OnTestConnectionClickHdl)); FreeResource(); + + LayoutHelper::fitSizeRightAligned( m_aPBTestConnection ); } diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 8e5b61dc9076..d19052525a76 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -313,7 +313,6 @@ namespace dbaui SetControlFontWeight(m_pFT_HeaderText); } - //========================================================================= //= LayoutHelper //========================================================================= @@ -331,6 +330,24 @@ namespace dbaui _rControl.SetPosPixel( aControlPos ); } + //------------------------------------------------------------------------- + void LayoutHelper::fitSizeRightAligned( PushButton& io_button ) + { + const Point aOldPos = io_button.GetPosPixel(); + const Size aOldSize = io_button.GetSizePixel(); + const Size aMinSize( io_button.CalcMinimumSize() ); + if ( aMinSize.Width() > aOldSize.Width() ) + { + io_button.SetPosSizePixel( + aOldPos.X() + aOldSize.Width() - aMinSize.Width(), + 0, + aMinSize.Width(), + 0, + WINDOW_POSSIZE_X | WINDOW_POSSIZE_WIDTH + ); + } + } + //......................................................................... } // namespace dbaui //......................................................................... diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 32ba0064a824..be6b923c2997 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -288,6 +288,10 @@ namespace dbaui const ControlRelation _eRelation, const long _nIndentAppFont ); + /** fits the button size to be large enough to contain the buttons text + */ + static void fitSizeRightAligned( PushButton& io_button ); + // why is CalcMinimumSize not a virtual method of ::Window? }; //......................................................................... diff --git a/dbaccess/source/ui/dlg/makefile.mk b/dbaccess/source/ui/dlg/makefile.mk index 270741d00857..ca0d3ab8cde7 100644 --- a/dbaccess/source/ui/dlg/makefile.mk +++ b/dbaccess/source/ui/dlg/makefile.mk @@ -137,8 +137,6 @@ SLOFILES+= $(SLO)$/adodatalinks.obj .ENDIF # --- Targets ---------------------------------- -#LOCALIZE_ME=AutoControls_tmpl.hrc - .INCLUDE : target.mk $(SLO)$/ConnectionHelper.obj : $(LOCALIZE_ME_DEST) -- cgit From 721c18332eda570264c3726ef88441bcb884fa89 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 27 Sep 2010 23:21:07 +0200 Subject: dba34a: #i31275# allow 'select as you type' aka 'quick selection' for tree list boxes (SvLBox derivees, to be precise), and enable this for Base main window, and the stylist --- dbaccess/source/ui/app/AppDetailView.cxx | 2 +- dbaccess/source/ui/app/AppDetailView.hxx | 2 +- dbaccess/source/ui/control/dbtreelistbox.cxx | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 9908134b8e1c..dbe9ad112458 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -193,7 +193,7 @@ void OCreationList::SelectSearchEntry( const void* _pEntry ) } // ----------------------------------------------------------------------------- -void OCreationList::ExecuteSearchEntry( const void* _pEntry ) +void OCreationList::ExecuteSearchEntry( const void* _pEntry ) const { SvLBoxEntry* pEntry = const_cast< SvLBoxEntry* >( static_cast< const SvLBoxEntry* >( _pEntry ) ); DBG_ASSERT( pEntry, "OCreationList::ExecuteSearchEntry: invalid entry!" ); diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index 5626db6dc157..460a4d1bc399 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -111,7 +111,7 @@ namespace dbaui // IMnemonicEntryList virtual void SelectSearchEntry( const void* _pEntry ); - virtual void ExecuteSearchEntry( const void* _pEntry ); + virtual void ExecuteSearchEntry( const void* _pEntry ) const; private: void onSelected( SvLBoxEntry* _pEntry ) const; diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 6664a96e3ec0..bc7d5d7d6364 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -140,6 +140,8 @@ void DBTreeListBox::init() SetNodeDefaultImages( ); EnableContextMenuHandling(); + + SetStyle( GetStyle() | WB_QUICK_SEARCH ); } //------------------------------------------------------------------------ DBTreeListBox::~DBTreeListBox() -- cgit From bc3f6b2c1cbe3972642b54d7b20022ebfeb47bae Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 29 Sep 2010 12:51:19 +0200 Subject: dba34b: #i109580# (preparations) --- dbaccess/source/ui/browser/brwctrlr.cxx | 54 ++---------------------- dbaccess/source/ui/browser/unodatbr.cxx | 75 +++++++++++++++++++-------------- 2 files changed, 47 insertions(+), 82 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 6a2161b1c291..db4a6bff8f96 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1205,34 +1205,16 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t } - // the filter or the sort criterias have changed ? -> update our parser - if (evt.PropertyName.equals(PROPERTY_ACTIVECOMMAND)) + if (evt.PropertyName.equals(PROPERTY_FILTER)) { - // if (m_xParser.is()) - //DO_SAFE( m_xParser->setElementaryQuery(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new query to my parser !" ); - } - else if (evt.PropertyName.equals(PROPERTY_FILTER)) - { - // if ( m_xParser.is() && m_xParser->getFilter() != ::comphelper::getString(evt.NewValue)) - //{ - // DO_SAFE( m_xParser->setFilter(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new filter to my parser !" ); - //} InvalidateFeature(ID_BROWSER_REMOVEFILTER); } else if (evt.PropertyName.equals(PROPERTY_HAVING_CLAUSE)) { - //if ( m_xParser.is() && m_xParser->getHavingClause() != ::comphelper::getString(evt.NewValue)) - //{ - // DO_SAFE( m_xParser->setHavingClause(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new filter to my parser !" ); - //} InvalidateFeature(ID_BROWSER_REMOVEFILTER); } else if (evt.PropertyName.equals(PROPERTY_ORDER)) { - //if ( m_xParser.is() && m_xParser->getOrder() != ::comphelper::getString(evt.NewValue)) - //{ - // DO_SAFE( m_xParser->setOrder(::comphelper::getString(evt.NewValue)), "SbaXDataBrowserController::propertyChange : could not forward the new order to my parser !" ); - //} InvalidateFeature(ID_BROWSER_REMOVEFILTER); } @@ -1911,12 +1893,8 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) { DlgFilterCrit aDlg( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() ); String aFilter; - if(!aDlg.Execute()) - { - //m_xParser->setFilter(sOldVal); - //m_xParser->setHavingClause(sOldHaving); - return; // if so we don't need to actualize the grid - } + if ( !aDlg.Execute() ) + return; // if so we don't need to update the grid aDlg.BuildWherePart(); } else @@ -1925,7 +1903,6 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) String aOrder; if(!aDlg.Execute()) { - //m_xParser->setOrder(sOldVal); return; // if so we don't need to actualize the grid } aDlg.BuildOrderPart(); @@ -2707,22 +2684,7 @@ void SbaXDataBrowserController::initializeParser() const { // (only if the statement isn't native) // (it is allowed to use the PROPERTY_ISPASSTHROUGH : _after_ loading a form it is valid) xFormSet->getPropertyValue(PROPERTY_SINGLESELECTQUERYCOMPOSER) >>= m_xParser; -/* - const Reference xFactory(::dbtools::getConnection(getRowSet()),UNO_QUERY); - if ( xFactory.is() ) - m_xParser.set(xFactory->createInstance(SERVICE_NAME_SINGLESELECTQUERYCOMPOSER),UNO_QUERY); -*/ - } -/* - // initialize the parser with the current sql-statement of the form - if ( m_xParser.is() ) - { - m_xParser->setElementaryQuery(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_ACTIVECOMMAND))); - m_xParser->setFilter(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_FILTER))); - m_xParser->setHavingClause(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_HAVING_CLAUSE))); - m_xParser->setOrder(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_ORDER))); } -*/ } catch(Exception&) { @@ -2758,16 +2720,6 @@ void SbaXDataBrowserController::unloaded(const EventObject& /*aEvent*/) throw( R // change as a reaction on that event. as we have no chance to be notified of this change (which is // the one we're interested in) we give them time to do what they want to before invalidating our // bound-field-dependent slots .... - /* - try - { - ::comphelper::disposeComponent(m_xParser); - } - catch(Exception&) - { - OSL_ENSURE(0,"Exception thrown by dispose"); - } - */ } //------------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index c65055c582fc..2c1c1f47d6de 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -420,6 +420,24 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) return sal_True; } // ------------------------------------------------------------------------- +namespace +{ + struct SelectValueByName : public ::std::unary_function< ::rtl::OUString, Any > + { + const Any& operator()( ::rtl::OUString const& i_name ) const + { + return m_rCollection.get( i_name ); + } + + SelectValueByName( ::comphelper::NamedValueCollection const& i_collection ) + :m_rCollection( i_collection ) + { + } + + ::comphelper::NamedValueCollection const& m_rCollection; + }; +} + sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star::sdbc::XRowSet > & _rxForm) { if(!m_pCurrentlyDisplayed) @@ -428,46 +446,41 @@ sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star: // this method set all format settings from the orignal table or query try { - // we send all properties at once, maybe the implementation is clever enough to handle one big PropertiesChanged - // more effective than many small PropertyChanged ;) - Sequence< ::rtl::OUString> aProperties(3); - Sequence< Any> aValues(3); - DBTreeListUserData* pData = static_cast(m_pCurrentlyDisplayed->GetUserData()); - OSL_ENSURE( pData, "SbaTableQueryBrowser::InitializeForm: No user data set at the currently displayed entry!" ); - OSL_ENSURE( pData->xObjectProperties.is(), "SbaTableQueryBrowser::InitializeForm: No table available!" ); + ENSURE_OR_RETURN_FALSE( pData, "SbaTableQueryBrowser::InitializeForm: No user data set at the currently displayed entry!" ); + ENSURE_OR_RETURN_FALSE( pData->xObjectProperties.is(), "SbaTableQueryBrowser::InitializeForm: No table available!" ); - if ( pData->xObjectProperties.is() ) - { - sal_Int32 nPos = 0; - // is the filter intially applied ? - aProperties.getArray()[nPos] = PROPERTY_APPLYFILTER; - aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_APPLYFILTER); + Reference< XPropertySetInfo > xPSI( pData->xObjectProperties->getPropertySetInfo(), UNO_SET_THROW ); - // the initial filter - aProperties.getArray()[nPos] = PROPERTY_FILTER; - aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_FILTER); + ::comphelper::NamedValueCollection aPropertyValues; - if ( pData->xObjectProperties->getPropertySetInfo()->hasPropertyByName(PROPERTY_HAVING_CLAUSE) ) - { - aProperties.realloc(aProperties.getLength()+1); - aValues.realloc(aValues.getLength()+1); - // the initial having clause - aProperties.getArray()[nPos] = PROPERTY_HAVING_CLAUSE; - aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_HAVING_CLAUSE); - } + const ::rtl::OUString aTransferProperties[] = + { + PROPERTY_APPLYFILTER, + PROPERTY_FILTER, + PROPERTY_HAVING_CLAUSE, + PROPERTY_ORDER + }; + for ( size_t i=0; i < sizeof( aTransferProperties ) / sizeof( aTransferProperties[0] ); ++i ) + { + if ( !xPSI->hasPropertyByName( aTransferProperties[i] ) ) + continue; + aPropertyValues.put( aTransferProperties[i], pData->xObjectProperties->getPropertyValue( aTransferProperties[i] ) ); + } - // the initial ordering - aProperties.getArray()[nPos] = PROPERTY_ORDER; - aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_ORDER); + const ::std::vector< ::rtl::OUString > aNames( aPropertyValues.getNames() ); + Sequence< ::rtl::OUString > aPropNames( aNames.size() ); + ::std::copy( aNames.begin(), aNames.end(), aPropNames.getArray() ); - Reference< XMultiPropertySet > xFormMultiSet(_rxForm, UNO_QUERY); - xFormMultiSet->setPropertyValues(aProperties, aValues); - } + Sequence< Any > aPropValues( aNames.size() ); + ::std::transform( aNames.begin(), aNames.end(), aPropValues.getArray(), SelectValueByName( aPropertyValues ) ); + + Reference< XMultiPropertySet > xFormMultiSet( _rxForm, UNO_QUERY ); + xFormMultiSet->setPropertyValues( aPropNames, aPropValues ); } catch(Exception&) { - DBG_ERROR("SbaTableQueryBrowser::InitializeForm : something went wrong !"); + DBG_UNHANDLED_EXCEPTION(); return sal_False; } -- cgit From 3f80aa43531aecebaea860c7efbb4c95d9f4b6d0 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 30 Sep 2010 09:27:40 +0200 Subject: dba34b: #i109580# don't attempt to apply Order clauses which refer to nonexistent tables --- dbaccess/source/ui/browser/brwctrlr.cxx | 68 ++++++++-- dbaccess/source/ui/browser/exsrcbrw.cxx | 2 +- dbaccess/source/ui/browser/unodatbr.cxx | 212 +++++++++++++++++++++++--------- dbaccess/source/ui/inc/brwctrlr.hxx | 11 +- dbaccess/source/ui/inc/exsrcbrw.hxx | 2 +- dbaccess/source/ui/inc/unodatbr.hxx | 6 +- 6 files changed, 222 insertions(+), 79 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index db4a6bff8f96..103267154da0 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -737,6 +737,26 @@ sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _r if (::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_ESCAPE_PROCESSING))) xFormSet->getPropertyValue(PROPERTY_SINGLESELECTQUERYCOMPOSER) >>= m_xParser; + { + const Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY ); + const Reference< XSingleSelectQueryAnalyzer > xAnalyzer( xRowSetProps->getPropertyValue( PROPERTY_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY ); + if ( xAnalyzer.is() ) + { + const Reference< XIndexAccess > xOrderColumns( xAnalyzer->getOrderColumns(), UNO_SET_THROW ); + const sal_Int32 nOrderColumns( xOrderColumns->getCount() ); + for ( sal_Int32 c=0; c xOrderColumn( xOrderColumns->getByIndex(c), UNO_QUERY_THROW ); + ::rtl::OUString sColumnName; + OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName); + ::rtl::OUString sTableName; + OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_TABLENAME ) >>= sTableName); + (void)sColumnName; + (void)sTableName; + } + } + } + Reference< XWarningsSupplier > xWarnings( _rxLoadable, UNO_QUERY ); if ( xWarnings.is() ) { @@ -807,7 +827,8 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) m_xColumnsSupplier.set(m_xRowSet,UNO_QUERY); m_xLoadable.set(m_xRowSet,UNO_QUERY); - if (!InitializeForm(m_xRowSet)) + Reference< XPropertySet > xFormProperties( m_xRowSet, UNO_QUERY ); + if ( !InitializeForm( xFormProperties ) ) return sal_False; m_xGridModel = CreateGridModel(); @@ -1853,25 +1874,50 @@ void SbaXDataBrowserController::applyParserFilter(const ::rtl::OUString& _rOldFi setCurrentColumnPosition(nPos); } + //------------------------------------------------------------------------------ Reference< XSingleSelectQueryComposer > SbaXDataBrowserController::createParser_nothrow() { - Reference< XSingleSelectQueryComposer > xRet; + Reference< XSingleSelectQueryComposer > xComposer; try { - Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY_THROW); - const Reference xFactory(::dbtools::getConnection(getRowSet()),UNO_QUERY_THROW); - xRet.set(xFactory->createInstance(SERVICE_NAME_SINGLESELECTQUERYCOMPOSER),UNO_QUERY_THROW); - xRet->setElementaryQuery(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_ACTIVECOMMAND))); - xRet->setFilter(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_FILTER))); - xRet->setHavingClause(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_HAVING_CLAUSE))); - xRet->setOrder(::comphelper::getString(xFormSet->getPropertyValue(PROPERTY_ORDER))); + const Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); + const Reference< XMultiServiceFactory > xFactory( + xRowSetProps->getPropertyValue( PROPERTY_ACTIVE_CONNECTION ), UNO_QUERY_THROW ); + xComposer.set( xFactory->createInstance( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY_THROW ); + + ::rtl::OUString sActiveCommand; + OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ACTIVECOMMAND ) >>= sActiveCommand ); + if ( sActiveCommand.getLength() > 0 ) + { + xComposer->setElementaryQuery( sActiveCommand ); + } + else + { + ::rtl::OUString sCommand; + OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_COMMAND ) >>= sCommand ); + sal_Int32 nCommandType = CommandType::COMMAND; + OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_COMMAND_TYPE ) >>= nCommandType ); + xComposer->setCommand( sCommand, nCommandType ); + } + + ::rtl::OUString sFilter; + OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_FILTER ) >>= sFilter ); + xComposer->setFilter( sFilter ); + + ::rtl::OUString sHavingClause; + OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_HAVING_CLAUSE ) >>= sHavingClause ); + xComposer->setHavingClause( sHavingClause ); + + ::rtl::OUString sOrder; + OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ORDER ) >>= sOrder ); + xComposer->setOrder( sOrder ); } - catch(Exception&) + catch ( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); } - return xRet; + return xComposer; } //------------------------------------------------------------------------------ void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index 41200c7625ec..ba40583141ab 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -145,7 +145,7 @@ Reference< XRowSet > SbaExternalSourceBrowser::CreateForm() } //------------------------------------------------------------------------------ -sal_Bool SbaExternalSourceBrowser::InitializeForm(const Reference< XRowSet > & /*xForm*/) +sal_Bool SbaExternalSourceBrowser::InitializeForm(const Reference< XPropertySet > & /*i_formProperties*/) { return sal_True; } diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 2c1c1f47d6de..9e4427a78081 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -419,9 +419,10 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) return sal_True; } -// ------------------------------------------------------------------------- +// --------------------------------------------------------------------------------------------------------------------- namespace { + // ----------------------------------------------------------------------------------------------------------------- struct SelectValueByName : public ::std::unary_function< ::rtl::OUString, Any > { const Any& operator()( ::rtl::OUString const& i_name ) const @@ -438,7 +439,98 @@ namespace }; } -sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star::sdbc::XRowSet > & _rxForm) +// --------------------------------------------------------------------------------------------------------------------- +void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() +{ + try + { + Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); + sal_Bool bEscapeProcessing = sal_False; + OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) >>= bEscapeProcessing ); + if ( !bEscapeProcessing ) + // don't touch or interpret anything if escape processing is disabled + return; + + Reference< XSingleSelectQueryComposer > xComposer( createParser_nothrow() ); + if ( !xComposer.is() ) + // can't do anything. Already reported via assertion in createParser_nothrow. + return; + + // the tables participating in the statement + Reference< XTablesSupplier > xSuppTables( xComposer, UNO_QUERY_THROW ); + Reference< XNameAccess > xTableNames( xSuppTables->getTables(), UNO_QUERY_THROW ); + + // ............................................................................................................. + // check if the order columns apply to tables which really exist in the statement + const Reference< XIndexAccess > xOrderColumns( xComposer->getOrderColumns(), UNO_SET_THROW ); + const sal_Int32 nOrderColumns( xOrderColumns->getCount() ); + bool invalidColumn = false; + for ( sal_Int32 c=0; ( c < nOrderColumns ) && !invalidColumn; ++c ) + { + const Reference< XPropertySet > xOrderColumn( xOrderColumns->getByIndex(c), UNO_QUERY_THROW ); + ::rtl::OUString sTableName; + OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_TABLENAME ) >>= sTableName); + + if ( !xTableNames->hasByName( sTableName ) ) + invalidColumn = true; + } + + if ( invalidColumn ) + { + // reset the complete order statement at both the row set and the parser + const ::rtl::OUString sEmptyOrder; + xRowSetProps->setPropertyValue( PROPERTY_ORDER, makeAny( sEmptyOrder ) ); + xComposer->setOrder( sEmptyOrder ); + } + + // ............................................................................................................. + // check if the columns participating in the filter refer to existing tables + // TODO: there's no API at all for this. The method which comes nearest to what we need is + // "getStructuredFilter", but it returns pure column names only. That is, for a statement like + // "SELECT * FROM WHERE . = ", it will return "". But + // there's no API at all to retrieve the information about "" - which is what would + // be needed here. + // That'd be a chance to replace getStructuredFilter with something more reasonable. This method + // has at least one other problem: For a clause like " != ", it will return "" + // as column name, "NOT_EQUAL" as operator, and "!= " as value, effectively duplicating the + // information about the operator, and beding all clients to manually remove the "!=" from the value + // string. + // So, what really would be handy, is some + // XNormalizedFilter getNormalizedFilter(); + // with + // interface XDisjunctiveFilterExpression + // { + // XConjunctiveFilterTerm getTerm( int index ); + // } + // interface XConjunctiveFilterTerm + // { + // ComparisonPredicate getPredicate( int index ); + // } + // struct ComparisonPredicate + // { + // XComparisonOperand Lhs; + // SQLFilterOperator Operator; + // XComparisonOperand Rhs; + // } + // interface XComparisonOperand + // { + // SQLFilterOperand Type; + // XPropertySet getColumn(); + // string getLiteral(); + // ... + // } + // enum SQLFilterOperand { Column, Literal, ... } + // + // ... or something like this .... + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } +} + +// --------------------------------------------------------------------------------------------------------------------- +sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_formProperties ) { if(!m_pCurrentlyDisplayed) return sal_True; @@ -475,16 +567,17 @@ sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star: Sequence< Any > aPropValues( aNames.size() ); ::std::transform( aNames.begin(), aNames.end(), aPropValues.getArray(), SelectValueByName( aPropertyValues ) ); - Reference< XMultiPropertySet > xFormMultiSet( _rxForm, UNO_QUERY ); + Reference< XMultiPropertySet > xFormMultiSet( i_formProperties, UNO_QUERY_THROW ); xFormMultiSet->setPropertyValues( aPropNames, aPropValues ); + + impl_sanitizeRowSetClauses_nothrow(); } - catch(Exception&) + catch ( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); return sal_False; } - return sal_True; } @@ -2306,77 +2399,74 @@ sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _r sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rCommand, const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection) { - Reference xProp(getRowSet(),UNO_QUERY); - if(xProp.is()) + try { - Reference< ::com::sun::star::form::XLoadable > xLoadable(xProp,UNO_QUERY); - try - { - // the values allowing the RowSet to re-execute - xProp->setPropertyValue(PROPERTY_DATASOURCENAME, makeAny(_rDataSourceName)); - if(_rxConnection.is()) - xProp->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( _rxConnection.getTyped() ) ); + Reference xProp( getRowSet(), UNO_QUERY_THROW ); + Reference< XLoadable > xLoadable( xProp, UNO_QUERY_THROW ); + // the values allowing the RowSet to re-execute + xProp->setPropertyValue(PROPERTY_DATASOURCENAME, makeAny(_rDataSourceName)); + if(_rxConnection.is()) + xProp->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( _rxConnection.getTyped() ) ); - // set this _before_ setting the connection, else the rowset would rebuild it ... - xProp->setPropertyValue(PROPERTY_COMMAND_TYPE, makeAny(_nCommandType)); - xProp->setPropertyValue(PROPERTY_COMMAND, makeAny(_rCommand)); - xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, ::cppu::bool2any(_bEscapeProcessing)); - if ( m_bPreview ) - { - xProp->setPropertyValue(PROPERTY_FETCHDIRECTION, makeAny(FetchDirection::FORWARD)); - } + // set this _before_ setting the connection, else the rowset would rebuild it ... + xProp->setPropertyValue(PROPERTY_COMMAND_TYPE, makeAny(_nCommandType)); + xProp->setPropertyValue(PROPERTY_COMMAND, makeAny(_rCommand)); + xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, ::cppu::bool2any(_bEscapeProcessing)); + if ( m_bPreview ) + { + xProp->setPropertyValue(PROPERTY_FETCHDIRECTION, makeAny(FetchDirection::FORWARD)); + } - // the formatter depends on the data source we're working on, so rebuild it here ... - initFormatter(); + // the formatter depends on the data source we're working on, so rebuild it here ... + initFormatter(); - // switch the grid to design mode while loading - getBrowserView()->getGridControl()->setDesignMode(sal_True); - InitializeForm(getRowSet()); + // switch the grid to design mode while loading + getBrowserView()->getGridControl()->setDesignMode(sal_True); + InitializeForm( xProp ); - sal_Bool bSuccess = sal_True; + sal_Bool bSuccess = sal_True; + { { - { - Reference< XNameContainer > xColContainer(getFormComponent(), UNO_QUERY); - // first we have to clear the grid - clearGridColumns(xColContainer); - } - FormErrorHelper aHelper(this); - // load the form - bSuccess = reloadForm(xLoadable); + Reference< XNameContainer > xColContainer(getFormComponent(), UNO_QUERY); + // first we have to clear the grid + clearGridColumns(xColContainer); + } + FormErrorHelper aHelper(this); + // load the form + bSuccess = reloadForm(xLoadable); - // initialize the model - InitializeGridModel(getFormComponent()); + // initialize the model + InitializeGridModel(getFormComponent()); - if ( m_bPreview ) - initializePreviewMode(); - - LoadFinished(sal_True); - } + if ( m_bPreview ) + initializePreviewMode(); - InvalidateAll(); - return bSuccess; - } - catch( const SQLException& e ) - { - Any aException( ::cppu::getCaughtException() ); - showError( SQLExceptionInfo( aException ) ); - } - catch( const WrappedTargetException& e ) - { - SQLException aSql; - if ( e.TargetException.isExtractableTo( ::cppu::UnoType< SQLException >::get() ) ) - showError( SQLExceptionInfo( e.TargetException ) ); - else - { - DBG_UNHANDLED_EXCEPTION(); - } + LoadFinished(sal_True); } - catch(Exception&) + + InvalidateAll(); + return bSuccess; + } + catch( const SQLException& e ) + { + Any aException( ::cppu::getCaughtException() ); + showError( SQLExceptionInfo( aException ) ); + } + catch( const WrappedTargetException& e ) + { + SQLException aSql; + if ( e.TargetException.isExtractableTo( ::cppu::UnoType< SQLException >::get() ) ) + showError( SQLExceptionInfo( e.TargetException ) ); + else { DBG_UNHANDLED_EXCEPTION(); } } + catch(Exception&) + { + DBG_UNHANDLED_EXCEPTION(); + } InvalidateAll(); return sal_False; diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx index 962bc75bb7f9..23bae743b15a 100644 --- a/dbaccess/source/ui/inc/brwctrlr.hxx +++ b/dbaccess/source/ui/inc/brwctrlr.hxx @@ -254,7 +254,8 @@ namespace dbaui // (probably this needs not to be overloaded, but you may return anything you want as long as it // supports the ::com::sun::star::form::DatabaseForm service. For instance you may want to create an adapter here which // is synchronized with a foreign ::com::sun::star::form::DatabaseForm you got elsewhere) - virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm) = 0; + virtual sal_Bool InitializeForm( + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ) = 0; // called immediately after a successfull CreateForm // do any initialization (data source etc.) here. the form should be fully functional after that. // return sal_False if you didn't succeed (don't throw exceptions, they won't be caught) @@ -325,8 +326,11 @@ namespace dbaui /// loads or reloads the form virtual sal_Bool reloadForm(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XLoadable >& _rxLoadable); - virtual sal_Bool preReloadForm(){ return sal_False; } - virtual void postReloadForm(){} + virtual sal_Bool preReloadForm(){ return sal_False; } + virtual void postReloadForm(){} + + ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > + createParser_nothrow(); private: void setCurrentModified( sal_Bool _bSet ); @@ -346,7 +350,6 @@ namespace dbaui void addColumnListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel); void impl_checkForCannotSelectUnfiltered( const ::dbtools::SQLExceptionInfo& _rError ); - ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer > createParser_nothrow(); // time to check the CUT/COPY/PASTE-slot-states DECL_LINK( OnInvalidateClipboard, AutoTimer* ); diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx index d58cf65f6959..5fbdfed65953 100644 --- a/dbaccess/source/ui/inc/exsrcbrw.hxx +++ b/dbaccess/source/ui/inc/exsrcbrw.hxx @@ -96,7 +96,7 @@ namespace dbaui ~SbaExternalSourceBrowser(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > CreateForm(); - virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm); + virtual sal_Bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ); virtual sal_Bool LoadForm(); diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 0448cef602e6..67e74bb862f7 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -265,7 +265,7 @@ namespace dbaui protected: // SbaXDataBrowserController overridables - virtual sal_Bool InitializeForm(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > & xForm); + virtual sal_Bool InitializeForm( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& i_formProperties ); virtual sal_Bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid); virtual sal_Bool preReloadForm(); @@ -531,6 +531,10 @@ namespace dbaui of the load process */ void initializePreviewMode(); + + /** checks whether the Order/Filter clauses set at our row set are valid, removes them if not so + */ + void impl_sanitizeRowSetClauses_nothrow(); }; // ......................................................................... -- cgit From 13b5be5ec753e5d08ae10b78114147d94a21c152 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 30 Sep 2010 09:49:33 +0200 Subject: dba34b: #ii109580# impl_sanitizeRowSetClauses_nothrow: completed the check for order column validity --- dbaccess/source/ui/browser/unodatbr.cxx | 38 ++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 9e4427a78081..d34ec0c4e11a 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -457,8 +457,12 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() return; // the tables participating in the statement - Reference< XTablesSupplier > xSuppTables( xComposer, UNO_QUERY_THROW ); - Reference< XNameAccess > xTableNames( xSuppTables->getTables(), UNO_QUERY_THROW ); + const Reference< XTablesSupplier > xSuppTables( xComposer, UNO_QUERY_THROW ); + const Reference< XNameAccess > xTableNames( xSuppTables->getTables(), UNO_QUERY_THROW ); + + // the columns participating in the statement + const Reference< XColumnsSupplier > xSuppColumns( xComposer, UNO_QUERY_THROW ); + const Reference< XNameAccess > xColumnNames( xSuppColumns->getColumns(), UNO_QUERY_THROW ); // ............................................................................................................. // check if the order columns apply to tables which really exist in the statement @@ -469,10 +473,34 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() { const Reference< XPropertySet > xOrderColumn( xOrderColumns->getByIndex(c), UNO_QUERY_THROW ); ::rtl::OUString sTableName; - OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_TABLENAME ) >>= sTableName); + OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_TABLENAME ) >>= sTableName ); + ::rtl::OUString sColumnName; + OSL_VERIFY( xOrderColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName ); + + if ( sTableName.getLength() == 0 ) + { + if ( !xColumnNames->hasByName( sColumnName ) ) + { + invalidColumn = true; + break; + } + } + else + { + if ( !xTableNames->hasByName( sTableName ) ) + { + invalidColumn = true; + break; + } - if ( !xTableNames->hasByName( sTableName ) ) - invalidColumn = true; + const Reference< XColumnsSupplier > xSuppTableColumns( xTableNames->getByName( sTableName ), UNO_QUERY_THROW ); + const Reference< XNameAccess > xTableColumnNames( xSuppTableColumns->getColumns(), UNO_QUERY_THROW ); + if ( !xTableColumnNames->hasByName( sColumnName ) ) + { + invalidColumn = true; + break; + } + } } if ( invalidColumn ) -- cgit From 91ff13dd6a625dcd75e3783474c2bee8b6675304 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 11 Oct 2010 17:56:12 +0200 Subject: CWS changehid: generate former auto hids into src files --- dbaccess/source/ui/dlg/AdabasStat.src | 7 ++++++ dbaccess/source/ui/dlg/CollectionView.src | 4 ++++ dbaccess/source/ui/dlg/ConnectionPage.src | 5 +++++ dbaccess/source/ui/dlg/ExtensionNotPresent.src | 1 + dbaccess/source/ui/dlg/RelationDlg.src | 1 + dbaccess/source/ui/dlg/UserAdmin.src | 3 +++ dbaccess/source/ui/dlg/adtabdlg.src | 3 +++ dbaccess/source/ui/dlg/advancedsettings.src | 2 ++ dbaccess/source/ui/dlg/dbadmin.src | 23 +++++++++++++++++++ dbaccess/source/ui/dlg/dbadmin2.src | 2 ++ dbaccess/source/ui/dlg/dbadminsetup.src | 17 ++++++++++++++ dbaccess/source/ui/dlg/dbfindex.src | 8 +++++++ dbaccess/source/ui/dlg/directsql.src | 6 +++++ dbaccess/source/ui/dlg/dlgsave.src | 3 +++ dbaccess/source/ui/dlg/dlgsize.src | 4 ++++ dbaccess/source/ui/dlg/dsselect.src | 4 ++++ dbaccess/source/ui/dlg/indexdialog.src | 3 +++ dbaccess/source/ui/dlg/paramdialog.src | 4 ++++ dbaccess/source/ui/dlg/queryfilter.src | 11 +++++++++ dbaccess/source/ui/dlg/queryorder.src | 6 +++++ dbaccess/source/ui/dlg/sqlmessage.src | 1 + dbaccess/source/ui/dlg/textconnectionsettings.src | 1 + dbaccess/source/ui/misc/WizardPages.src | 27 +++++++++++++++++++++++ dbaccess/source/ui/querydesign/querydlg.src | 1 + 24 files changed, 147 insertions(+) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/AdabasStat.src b/dbaccess/source/ui/dlg/AdabasStat.src index ff29ac12383d..37bf187b6c90 100644 --- a/dbaccess/source/ui/dlg/AdabasStat.src +++ b/dbaccess/source/ui/dlg/AdabasStat.src @@ -37,6 +37,7 @@ ModalDialog DLG_ADABASSTAT { + HelpID = "dbaccess:ModalDialog:DLG_ADABASSTAT"; OutputSize = TRUE ; Moveable = TRUE ; Closeable = TRUE ; @@ -59,6 +60,7 @@ ModalDialog DLG_ADABASSTAT Edit ET_SYSDEVSPACE { + HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_SYSDEVSPACE"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 14 ) ; Size = MAP_APPFONT ( 128 , 12 ) ; @@ -75,6 +77,7 @@ ModalDialog DLG_ADABASSTAT Edit ET_TRANSACTIONLOG { + HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_TRANSACTIONLOG"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 31 ) ; Size = MAP_APPFONT ( 128 , 12 ) ; @@ -91,6 +94,7 @@ ModalDialog DLG_ADABASSTAT ListBox LB_DATADEVS { + HelpID = "dbaccess:ListBox:DLG_ADABASSTAT:LB_DATADEVS"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 48 ) ; Size = MAP_APPFONT ( 128 , 42 ) ; @@ -115,6 +119,7 @@ ModalDialog DLG_ADABASSTAT Edit ET_SIZE { + HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_SIZE"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 109 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -131,6 +136,7 @@ ModalDialog DLG_ADABASSTAT Edit ET_FREESIZE { + HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_FREESIZE"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 126 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -147,6 +153,7 @@ ModalDialog DLG_ADABASSTAT NumericField ET_MEMORYUSING { + HelpID = "dbaccess:NumericField:DLG_ADABASSTAT:ET_MEMORYUSING"; Border = TRUE ; Pos = MAP_APPFONT ( 120 , 144 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; diff --git a/dbaccess/source/ui/dlg/CollectionView.src b/dbaccess/source/ui/dlg/CollectionView.src index 018893384dab..86ac75a0d9e9 100644 --- a/dbaccess/source/ui/dlg/CollectionView.src +++ b/dbaccess/source/ui/dlg/CollectionView.src @@ -64,6 +64,7 @@ ModalDialog DLG_COLLECTION_VIEW }; ImageButton BTN_EXPLORERFILE_NEWFOLDER { + HelpID = "dbaccess:ImageButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_NEWFOLDER"; TabStop = FALSE ; Pos = MAP_APPFONT ( WIN_X - UNRELATED_CONTROLS - RELATED_CONTROLS - 2*IMG_SIZE, UNRELATED_CONTROLS ) ; Size = MAP_APPFONT ( IMG_SIZE , IMG_SIZE ) ; @@ -71,6 +72,7 @@ ModalDialog DLG_COLLECTION_VIEW }; ImageButton BTN_EXPLORERFILE_UP { + HelpID = "dbaccess:ImageButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_UP"; TabStop = TRUE ; Pos = MAP_APPFONT ( WIN_X - UNRELATED_CONTROLS - IMG_SIZE, UNRELATED_CONTROLS ) ; Size = MAP_APPFONT ( IMG_SIZE , IMG_SIZE ) ; @@ -93,6 +95,7 @@ ModalDialog DLG_COLLECTION_VIEW }; Edit ED_EXPLORERFILE_FILENAME { + HelpID = "dbaccess:Edit:DLG_COLLECTION_VIEW:ED_EXPLORERFILE_FILENAME"; Pos = MAP_APPFONT ( RELATED_CONTROLS + UNRELATED_CONTROLS + 50 , WIN_Y - 3*UNRELATED_CONTROLS - BUTTON_HEIGHT - FIXEDLINE_HEIGHT - EDIT_HEIGHT) ; Size = MAP_APPFONT ( WIN_X - RELATED_CONTROLS - 2*UNRELATED_CONTROLS - 50 , EDIT_HEIGHT ) ; Border = TRUE ; @@ -107,6 +110,7 @@ ModalDialog DLG_COLLECTION_VIEW PushButton BTN_EXPLORERFILE_SAVE { + HelpID = "dbaccess:PushButton:DLG_COLLECTION_VIEW:BTN_EXPLORERFILE_SAVE"; Pos = MAP_APPFONT ( WIN_X - 2*UNRELATED_CONTROLS - RELATED_CONTROLS - 150, WIN_Y - UNRELATED_CONTROLS - BUTTON_HEIGHT ) ; Size = MAP_APPFONT ( 50 , BUTTON_HEIGHT ) ; DefButton = TRUE ; diff --git a/dbaccess/source/ui/dlg/ConnectionPage.src b/dbaccess/source/ui/dlg/ConnectionPage.src index fb5131ebea6c..33b70033b0f0 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.src +++ b/dbaccess/source/ui/dlg/ConnectionPage.src @@ -42,6 +42,7 @@ //......................................................................... TabPage PAGE_CONNECTION { + HelpID = "dbaccess:TabPage:PAGE_CONNECTION"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -91,6 +92,7 @@ TabPage PAGE_CONNECTION }; Edit ET_USERNAME { + HelpID = "dbaccess:Edit:PAGE_CONNECTION:ET_USERNAME"; Border = TRUE ; Pos = MAP_APPFONT ( 90 , 3*UNRELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS -1 ) ; Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; @@ -98,6 +100,7 @@ TabPage PAGE_CONNECTION }; CheckBox CB_PASSWORD_REQUIRED { + HelpID = "dbaccess:CheckBox:PAGE_CONNECTION:CB_PASSWORD_REQUIRED"; Pos = MAP_APPFONT ( 90 , 4*UNRELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS ) ; Size = MAP_APPFONT ( 105 , CHECKBOX_HEIGHT ) ; Text [ en-US ] = "Password required"; @@ -129,6 +132,7 @@ TabPage PAGE_CONNECTION PushButton PB_TESTDRIVERCLASS { + HelpID = "dbaccess:PushButton:PAGE_CONNECTION:PB_TESTDRIVERCLASS"; TabStop = TRUE ; Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS , 5*UNRELATED_CONTROLS + 6*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + CHECKBOX_HEIGHT -2 ) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; @@ -137,6 +141,7 @@ TabPage PAGE_CONNECTION PushButton PB_TESTCONNECTION { + HelpID = "dbaccess:PushButton:PAGE_CONNECTION:PB_TESTCONNECTION"; Pos = MAP_APPFONT ( PAGE_X - 75 - UNRELATED_CONTROLS, PAGE_Y - BUTTON_HEIGHT - UNRELATED_CONTROLS) ; Size = MAP_APPFONT ( 75 , BUTTON_HEIGHT ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/ExtensionNotPresent.src b/dbaccess/source/ui/dlg/ExtensionNotPresent.src index 9507c4256360..e7a36fa8d3f4 100644 --- a/dbaccess/source/ui/dlg/ExtensionNotPresent.src +++ b/dbaccess/source/ui/dlg/ExtensionNotPresent.src @@ -72,6 +72,7 @@ ModalDialog RID_EXTENSION_NOT_PRESENT_DLG PushButton PB_DOWNLOAD { + HelpID = "dbaccess:PushButton:RID_EXTENSION_NOT_PRESENT_DLG:PB_DOWNLOAD"; Pos = MAP_APPFONT ( DLG_WIDTH / 2 - (CELL_PADDING/2) - BUTTON_WIDTH, ACTION_LINE_START ) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; DefButton = TRUE ; diff --git a/dbaccess/source/ui/dlg/RelationDlg.src b/dbaccess/source/ui/dlg/RelationDlg.src index 68399ca52619..81e183e4b77b 100644 --- a/dbaccess/source/ui/dlg/RelationDlg.src +++ b/dbaccess/source/ui/dlg/RelationDlg.src @@ -36,6 +36,7 @@ ModalDialog DLG_REL_PROPERTIES { + HelpID = "dbaccess:ModalDialog:DLG_REL_PROPERTIES"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 186 , 205 ) ; diff --git a/dbaccess/source/ui/dlg/UserAdmin.src b/dbaccess/source/ui/dlg/UserAdmin.src index 2cab4f9e89f0..8d88dcf8f1ce 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.src +++ b/dbaccess/source/ui/dlg/UserAdmin.src @@ -159,6 +159,7 @@ ModalDialog DLG_PASSWORD }; Edit ED_OLDPASSWORD { + HelpID = "dbaccess:Edit:DLG_PASSWORD:ED_OLDPASSWORD"; Border = TRUE ; Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 16 ) ; Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ; @@ -173,6 +174,7 @@ ModalDialog DLG_PASSWORD }; Edit ED_PASSWORD { + HelpID = "dbaccess:Edit:DLG_PASSWORD:ED_PASSWORD"; Border = TRUE ; Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 34 ) ; Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ; @@ -186,6 +188,7 @@ ModalDialog DLG_PASSWORD }; Edit ED_PASSWORD_REPEAT { + HelpID = "dbaccess:Edit:DLG_PASSWORD:ED_PASSWORD_REPEAT"; Border = TRUE ; Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 51 ) ; Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ; diff --git a/dbaccess/source/ui/dlg/adtabdlg.src b/dbaccess/source/ui/dlg/adtabdlg.src index 431f86f3d51d..7a36bddb378f 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.src +++ b/dbaccess/source/ui/dlg/adtabdlg.src @@ -46,6 +46,7 @@ ModelessDialog DLG_JOIN_TABADD RadioButton RB_CASE_TABLES { + HelpID = "dbaccess:RadioButton:DLG_JOIN_TABADD:RB_CASE_TABLES"; Pos = MAP_APPFONT( 6, 6 ); Size = MAP_APPFONT( 50, 8 ); Text [ en-US ] = "Tables"; @@ -53,6 +54,7 @@ ModelessDialog DLG_JOIN_TABADD RadioButton RB_CASE_QUERIES { + HelpID = "dbaccess:RadioButton:DLG_JOIN_TABADD:RB_CASE_QUERIES"; Pos = MAP_APPFONT( 62, 6 ); Size = MAP_APPFONT( 50, 8 ); Text [ en-US ] = "Queries"; @@ -69,6 +71,7 @@ ModelessDialog DLG_JOIN_TABADD }; PushButton PB_ADDTABLE { + HelpID = "dbaccess:PushButton:DLG_JOIN_TABADD:PB_ADDTABLE"; Pos = MAP_APPFONT ( 123 , 6 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "~Add" ; diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src index 4c5a7d924d33..f37c67148e18 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.src +++ b/dbaccess/source/ui/dlg/advancedsettings.src @@ -253,6 +253,7 @@ TabPage PAGE_GENERATED_VALUES { + HelpID = "dbaccess:TabPage:PAGE_GENERATED_VALUES"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( ADVANCED_PAGE_X , ADVANCED_PAGE_Y ) ; @@ -311,6 +312,7 @@ TabPage PAGE_GENERATED_VALUES TabPage PAGE_ADVANCED_SETTINGS_SPECIAL { + HelpID = "dbaccess:TabPage:PAGE_ADVANCED_SETTINGS_SPECIAL"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( ADVANCED_PAGE_X , ADVANCED_PAGE_Y ) ; diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src index c4457c62eec0..1d8744f07b53 100644 --- a/dbaccess/source/ui/dlg/dbadmin.src +++ b/dbaccess/source/ui/dlg/dbadmin.src @@ -196,6 +196,7 @@ TabPage PAGE_GENERAL RadioButton RB_OPENEXISTINGDOC { + HelpID = "dbaccess:RadioButton:PAGE_GENERAL:RB_OPENEXISTINGDOC"; Pos = MAP_APPFONT (START_X + 6 , 97 ); Size = MAP_APPFONT ( 206 , 8 ) ; Text [ en-US ] = "Open an existing database ~file" ; @@ -210,6 +211,7 @@ TabPage PAGE_GENERAL ListBox LB_DOCUMENTLIST { + HelpID = "dbaccess:ListBox:PAGE_GENERAL:LB_DOCUMENTLIST"; Pos = MAP_APPFONT( START_X + INDENTED_X + INDENT_BELOW_RADIO, 121 ); Size = MAP_APPFONT( 120, 14 ); DropDown = TRUE; @@ -218,6 +220,7 @@ TabPage PAGE_GENERAL PushButton PB_OPENDOCUMENT { + HelpID = "dbaccess:PushButton:PAGE_GENERAL:PB_OPENDOCUMENT"; Pos = MAP_APPFONT( START_X + INDENTED_X + INDENT_BELOW_RADIO, 139 ); Size = MAP_APPFONT( 50, 16 ); OutputSize = TRUE; @@ -419,6 +422,7 @@ TabPage PAGE_ADABAS }; Edit ET_HOSTNAME { + HelpID = "dbaccess:Edit:PAGE_ADABAS:ET_HOSTNAME"; TabStop = TRUE ; Border = TRUE ; @@ -434,6 +438,7 @@ TabPage PAGE_ADABAS }; NumericField NF_CACHE_SIZE { + HelpID = "dbaccess:NumericField:PAGE_ADABAS:NF_CACHE_SIZE"; Pos = MAP_APPFONT ( EDIT_X , 2*UNRELATED_CONTROLS + RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT -1 ) ; Size = MAP_APPFONT ( 40 , EDIT_HEIGHT ) ; Border = TRUE ; @@ -451,6 +456,7 @@ TabPage PAGE_ADABAS }; NumericField NF_DATA_INCREMENT { + HelpID = "dbaccess:NumericField:PAGE_ADABAS:NF_DATA_INCREMENT"; Pos = MAP_APPFONT ( EDIT_X , 3*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT -1 ) ; Size = MAP_APPFONT ( 40 , EDIT_HEIGHT ) ; Border = TRUE ; @@ -473,6 +479,7 @@ TabPage PAGE_ADABAS }; Edit ET_CTRLUSERNAME { + HelpID = "dbaccess:Edit:PAGE_ADABAS:ET_CTRLUSERNAME"; Border = TRUE ; Pos = MAP_APPFONT ( EDIT_X , 4*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT-1 ) ; Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; @@ -486,6 +493,7 @@ TabPage PAGE_ADABAS }; Edit ET_CTRLPASSWORD { + HelpID = "dbaccess:Edit:PAGE_ADABAS:ET_CTRLPASSWORD"; Border = TRUE ; Pos = MAP_APPFONT ( EDIT_X , 5*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 6*FIXEDTEXT_HEIGHT-1 ) ; Size = MAP_APPFONT ( 105 , EDIT_HEIGHT) ; @@ -495,6 +503,7 @@ TabPage PAGE_ADABAS CheckBox CB_SHUTDB { + HelpID = "dbaccess:CheckBox:PAGE_ADABAS:CB_SHUTDB"; Pos = MAP_APPFONT ( 6 , 6*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 7*FIXEDTEXT_HEIGHT ) ; Size = MAP_APPFONT ( 248 , CHECKBOX_HEIGHT ) ; Text[ en-US ] = "~Shut down service when closing %PRODUCTNAME"; @@ -502,6 +511,7 @@ TabPage PAGE_ADABAS PushButton PB_STAT { + HelpID = "dbaccess:PushButton:PAGE_ADABAS:PB_STAT"; Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS, PAGE_Y - BUTTON_HEIGHT - UNRELATED_CONTROLS ) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; Text[ en-US ] = "E~xtended..."; @@ -517,6 +527,7 @@ TabPage PAGE_ADABAS TabPage PAGE_MYSQL_ODBC { + HelpID = "dbaccess:TabPage:PAGE_MYSQL_ODBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -527,6 +538,7 @@ TabPage PAGE_MYSQL_ODBC TabPage PAGE_MYSQL_JDBC { + HelpID = "dbaccess:TabPage:PAGE_MYSQL_JDBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -545,6 +557,7 @@ TabPage PAGE_MYSQL_JDBC }; Edit ET_JDBCDRIVERCLASS { + HelpID = "dbaccess:Edit:PAGE_MYSQL_JDBC:ET_JDBCDRIVERCLASS"; Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT -1 + EDIT_HEIGHT) ; Size = MAP_APPFONT ( 97 , EDIT_HEIGHT ) ; @@ -553,6 +566,7 @@ TabPage PAGE_MYSQL_JDBC }; PushButton PB_TESTDRIVERCLASS { + HelpID = "dbaccess:PushButton:PAGE_MYSQL_JDBC:PB_TESTDRIVERCLASS"; TabStop = TRUE ; Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS , 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT -2 + EDIT_HEIGHT) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; @@ -564,6 +578,7 @@ TabPage PAGE_MYSQL_JDBC TabPage PAGE_MYSQL_NATIVE { + HelpID = "dbaccess:TabPage:PAGE_MYSQL_NATIVE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -585,6 +600,7 @@ TabPage PAGE_MYSQL_NATIVE }; Edit ET_USERNAME { + HelpID = "dbaccess:Edit:PAGE_MYSQL_NATIVE:ET_USERNAME"; Border = TRUE ; Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + 4*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 3*EDIT_HEIGHT - 1 ) ; Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; @@ -592,6 +608,7 @@ TabPage PAGE_MYSQL_NATIVE }; CheckBox CB_PASSWORD_REQUIRED { + HelpID = "dbaccess:CheckBox:PAGE_MYSQL_NATIVE:CB_PASSWORD_REQUIRED"; Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + 5*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 4*EDIT_HEIGHT ) ; Size = MAP_APPFONT ( 105, CHECKBOX_HEIGHT ) ; Text [ en-US ] = "Password required"; @@ -602,6 +619,7 @@ TabPage PAGE_MYSQL_NATIVE TabPage PAGE_ORACLE_JDBC { + HelpID = "dbaccess:TabPage:PAGE_ORACLE_JDBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; @@ -621,6 +639,7 @@ TabPage PAGE_ORACLE_JDBC }; Edit ET_JDBCDRIVERCLASS { + HelpID = "dbaccess:Edit:PAGE_ORACLE_JDBC:ET_JDBCDRIVERCLASS"; Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + EDIT_HEIGHT + ( FIXEDTEXT_HEIGHT - EDIT_HEIGHT ) / 2 ) ; Size = MAP_APPFONT ( 97 , EDIT_HEIGHT ) ; @@ -629,6 +648,7 @@ TabPage PAGE_ORACLE_JDBC }; PushButton PB_TESTDRIVERCLASS { + HelpID = "dbaccess:PushButton:PAGE_ORACLE_JDBC:PB_TESTDRIVERCLASS"; TabStop = TRUE ; Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS, 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + EDIT_HEIGHT + ( FIXEDTEXT_HEIGHT - BUTTON_HEIGHT ) / 2 ) ; @@ -744,6 +764,7 @@ TabPage PAGE_USERDRIVER }; Edit ET_HOSTNAME { + HelpID = "dbaccess:Edit:PAGE_USERDRIVER:ET_HOSTNAME"; TabStop = TRUE ; Border = TRUE ; Pos = MAP_APPFONT ( EDIT_X , UNRELATED_CONTROLS -1 ) ; @@ -759,6 +780,7 @@ TabPage PAGE_USERDRIVER NumericField NF_PORTNUMBER { + HelpID = "dbaccess:NumericField:PAGE_USERDRIVER:NF_PORTNUMBER"; TabStop = TRUE ; Border = TRUE ; NoThousandSep = TRUE; @@ -775,6 +797,7 @@ TabPage PAGE_USERDRIVER }; Edit ET_OPTIONS { + HelpID = "dbaccess:Edit:PAGE_USERDRIVER:ET_OPTIONS"; Border = TRUE ; TabStop = TRUE ; }; diff --git a/dbaccess/source/ui/dlg/dbadmin2.src b/dbaccess/source/ui/dlg/dbadmin2.src index 50b796541872..a698d63e7635 100644 --- a/dbaccess/source/ui/dlg/dbadmin2.src +++ b/dbaccess/source/ui/dlg/dbadmin2.src @@ -109,6 +109,7 @@ String STR_HINT_CONNECTION_NOT_CAPABLE ModalDialog DLG_DOMAINPASSWORD { + HelpID = "dbaccess:ModalDialog:DLG_DOMAINPASSWORD"; Border = TRUE ; Moveable = TRUE ; OutputSize = TRUE ; @@ -125,6 +126,7 @@ ModalDialog DLG_DOMAINPASSWORD Edit ET_PASSWORD { + HelpID = "dbaccess:Edit:DLG_DOMAINPASSWORD:ET_PASSWORD"; Border = TRUE ; Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 16 ) ; Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ; diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src index 2a8d762e8d57..5fc9cdc12f23 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.src +++ b/dbaccess/source/ui/dlg/dbadminsetup.src @@ -151,6 +151,7 @@ String STR_DATABASEDEFAULTNAME TabPage PAGE_DBWIZARD_MYSQL_INTRO { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MYSQL_INTRO"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -197,6 +198,7 @@ TabPage PAGE_DBWIZARD_MYSQL_INTRO }; RadioButton RB_CONNECTVIANATIVE { + HelpID = "dbaccess:RadioButton:PAGE_DBWIZARD_MYSQL_INTRO:RB_CONNECTVIANATIVE"; Pos = MAP_APPFONT (START_X + 6 , 115 ) ; Size = MAP_APPFONT ( 205 , 9 ) ; Text[ en-US ] = "Connect directly" ; @@ -209,6 +211,7 @@ TabPage PAGE_DBWIZARD_MYSQL_INTRO TabPage PAGE_DBWIZARD_AUTHENTIFICATION { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_AUTHENTIFICATION"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -267,6 +270,7 @@ TabPage PAGE_DBWIZARD_AUTHENTIFICATION TabPage PAGE_DBWIZARD_FINAL { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_FINAL"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -343,6 +347,7 @@ TabPage PAGE_DBWIZARD_FINAL TabPage PAGE_DBWIZARD_MYSQL_JDBC { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MYSQL_JDBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -375,6 +380,7 @@ TabPage PAGE_DBWIZARD_MYSQL_JDBC TabPage PAGE_DBWIZARD_MYSQL_NATIVE { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MYSQL_NATIVE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0, 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -400,6 +406,7 @@ TabPage PAGE_DBWIZARD_MYSQL_NATIVE TabPage PAGE_DBWIZARD_DBASE { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_DBASE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -422,6 +429,7 @@ TabPage PAGE_DBWIZARD_DBASE TabPage PAGE_DBWIZARD_TEXT { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_TEXT"; String STR_TEXT_HEADERTEXT { @@ -448,6 +456,7 @@ TabPage PAGE_DBWIZARD_TEXT TabPage PAGE_DBWIZARD_MSACCESS { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MSACCESS"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -471,6 +480,7 @@ TabPage PAGE_DBWIZARD_MSACCESS TabPage PAGE_DBWIZARD_LDAP { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_LDAP"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -512,6 +522,7 @@ TabPage PAGE_DBWIZARD_LDAP TabPage PAGE_DBWIZARD_ADABAS { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADABAS"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -533,6 +544,7 @@ TabPage PAGE_DBWIZARD_ADABAS TabPage PAGE_DBWIZARD_ADO { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADO"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -554,6 +566,7 @@ TabPage PAGE_DBWIZARD_ADO TabPage PAGE_DBWIZARD_ODBC { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ODBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -573,6 +586,7 @@ TabPage PAGE_DBWIZARD_ODBC TabPage PAGE_DBWIZARD_USERDEFINED { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_USERDEFINED"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -585,6 +599,7 @@ TabPage PAGE_DBWIZARD_USERDEFINED TabPage PAGE_DBWIZARD_JDBC { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_JDBC"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -607,6 +622,7 @@ TabPage PAGE_DBWIZARD_JDBC TabPage PAGE_DBWIZARD_ORACLE { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ORACLE"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; @@ -638,6 +654,7 @@ TabPage PAGE_DBWIZARD_ORACLE TabPage PAGE_DBWIZARD_SPREADSHEET { + HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_SPREADSHEET"; SVLook = TRUE ; Pos = MAP_APPFONT ( 0 , 0 ) ; Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; diff --git a/dbaccess/source/ui/dlg/dbfindex.src b/dbaccess/source/ui/dlg/dbfindex.src index ad401102601d..83ce7090c195 100644 --- a/dbaccess/source/ui/dlg/dbfindex.src +++ b/dbaccess/source/ui/dlg/dbfindex.src @@ -93,6 +93,7 @@ Image IMG_ALL_RIGHT_H ModalDialog DLG_DBASE_INDEXES { + HelpID = "dbaccess:ModalDialog:DLG_DBASE_INDEXES"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( WIN_X , WIN_Y ) ; @@ -125,6 +126,7 @@ ModalDialog DLG_DBASE_INDEXES }; ComboBox CB_TABLES { + HelpID = "dbaccess:ComboBox:DLG_DBASE_INDEXES:CB_TABLES"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 62 , 5 ) ; @@ -146,6 +148,7 @@ ModalDialog DLG_DBASE_INDEXES }; ListBox LB_TABLEINDEXES { + HelpID = "dbaccess:ListBox:DLG_DBASE_INDEXES:LB_TABLEINDEXES"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 12 , 44 ) ; @@ -160,6 +163,7 @@ ModalDialog DLG_DBASE_INDEXES }; ListBox LB_FREEINDEXES { + HelpID = "dbaccess:ListBox:DLG_DBASE_INDEXES:LB_FREEINDEXES"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 120 , 44 ) ; @@ -168,6 +172,7 @@ ModalDialog DLG_DBASE_INDEXES }; ImageButton IB_ADD { + HelpID = "dbaccess:ImageButton:DLG_DBASE_INDEXES:IB_ADD"; Pos = MAP_APPFONT ( 94 , 60 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -187,6 +192,7 @@ ModalDialog DLG_DBASE_INDEXES }; ImageButton IB_ADDALL { + HelpID = "dbaccess:ImageButton:DLG_DBASE_INDEXES:IB_ADDALL"; Pos = MAP_APPFONT ( 94 , 77 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -206,6 +212,7 @@ ModalDialog DLG_DBASE_INDEXES }; ImageButton IB_REMOVE { + HelpID = "dbaccess:ImageButton:DLG_DBASE_INDEXES:IB_REMOVE"; Pos = MAP_APPFONT ( 94 , 98 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -225,6 +232,7 @@ ModalDialog DLG_DBASE_INDEXES }; ImageButton IB_REMOVEALL { + HelpID = "dbaccess:ImageButton:DLG_DBASE_INDEXES:IB_REMOVEALL"; Pos = MAP_APPFONT ( 94, 114 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/directsql.src b/dbaccess/source/ui/dlg/directsql.src index 230fe4dac320..cdde8fca5ed6 100644 --- a/dbaccess/source/ui/dlg/directsql.src +++ b/dbaccess/source/ui/dlg/directsql.src @@ -40,6 +40,7 @@ ModalDialog DLG_DIRECTSQL { + HelpID = "dbaccess:ModalDialog:DLG_DIRECTSQL"; OutputSize = TRUE ; Moveable = TRUE ; Closeable = TRUE ; @@ -60,6 +61,7 @@ ModalDialog DLG_DIRECTSQL }; MultiLineEdit ME_SQL { + HelpID = "dbaccess:MultiLineEdit:DLG_DIRECTSQL:ME_SQL"; Pos = MAP_APPFONT( 7, 26 ); Size = MAP_APPFONT( WINDOW_SIZE_X - 14, 80 ); SVLook = TRUE; @@ -69,6 +71,7 @@ ModalDialog DLG_DIRECTSQL }; PushButton PB_EXECUTE { + HelpID = "dbaccess:PushButton:DLG_DIRECTSQL:PB_EXECUTE"; Pos = MAP_APPFONT( WINDOW_SIZE_X - BUTTON_SIZE_X - 7, 109 ); Size = MAP_APPFONT( BUTTON_SIZE_X, BUTTON_SIZE_Y ); Text [ en-US ] = "Execute"; @@ -82,6 +85,7 @@ ModalDialog DLG_DIRECTSQL }; ListBox LB_HISTORY { + HelpID = "dbaccess:ListBox:DLG_DIRECTSQL:LB_HISTORY"; Pos = MAP_APPFONT( 7, 121 + BUTTON_SIZE_Y + 3 ); Size = MAP_APPFONT( WINDOW_SIZE_X - 14, 14 ); SvLook = TRUE; @@ -96,6 +100,7 @@ ModalDialog DLG_DIRECTSQL }; MultiLineEdit ME_STATUS { + HelpID = "dbaccess:MultiLineEdit:DLG_DIRECTSQL:ME_STATUS"; Pos = MAP_APPFONT( 7, 153 + BUTTON_SIZE_Y ); Size = MAP_APPFONT( WINDOW_SIZE_X - 14, 41 ); Border = TRUE; @@ -114,6 +119,7 @@ ModalDialog DLG_DIRECTSQL }; PushButton PB_CLOSE { + HelpID = "dbaccess:PushButton:DLG_DIRECTSQL:PB_CLOSE"; Pos = MAP_APPFONT( WINDOW_SIZE_X - 7 - BUTTON_SIZE_X, 207 + BUTTON_SIZE_Y ); Size = MAP_APPFONT( BUTTON_SIZE_X, BUTTON_SIZE_Y ); Text [ en-US ] = "Close"; diff --git a/dbaccess/source/ui/dlg/dlgsave.src b/dbaccess/source/ui/dlg/dlgsave.src index d550704b85f8..802f88d0869a 100644 --- a/dbaccess/source/ui/dlg/dlgsave.src +++ b/dbaccess/source/ui/dlg/dlgsave.src @@ -61,6 +61,7 @@ ModalDialog DLG_SAVE_AS }; ComboBox ET_CATALOG { + HelpID = "dbaccess:ComboBox:DLG_SAVE_AS:ET_CATALOG"; Border = TRUE ; Pos = MAP_APPFONT ( 77 , 25 ) ; Size = MAP_APPFONT ( 89 , 12 ) ; @@ -77,6 +78,7 @@ ModalDialog DLG_SAVE_AS }; ComboBox ET_SCHEMA { + HelpID = "dbaccess:ComboBox:DLG_SAVE_AS:ET_SCHEMA"; Border = TRUE ; Pos = MAP_APPFONT ( 77 , 42 ) ; Size = MAP_APPFONT ( 89 , 12 ) ; @@ -92,6 +94,7 @@ ModalDialog DLG_SAVE_AS }; Edit ET_TITLE { + HelpID = "dbaccess:Edit:DLG_SAVE_AS:ET_TITLE"; Border = TRUE ; Pos = MAP_APPFONT ( 77 , 59 ) ; Size = MAP_APPFONT ( 89 , 12 ) ; diff --git a/dbaccess/source/ui/dlg/dlgsize.src b/dbaccess/source/ui/dlg/dlgsize.src index ade6f3ff1222..128241d211e0 100644 --- a/dbaccess/source/ui/dlg/dlgsize.src +++ b/dbaccess/source/ui/dlg/dlgsize.src @@ -62,6 +62,7 @@ ModalDialog DLG_ROWHEIGHT }; MetricField MF_VALUE { + HelpID = "dbaccess:MetricField:DLG_ROWHEIGHT:MF_VALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 36 , 6 ) ; Size = MAP_APPFONT ( 63 , 12 ) ; @@ -75,6 +76,7 @@ ModalDialog DLG_ROWHEIGHT }; CheckBox CB_STANDARD { + HelpID = "dbaccess:CheckBox:DLG_ROWHEIGHT:CB_STANDARD"; Pos = MAP_APPFONT ( 36 , 25 ) ; Size = MAP_APPFONT ( 62 , 12 ) ; TabStop = TRUE ; @@ -117,6 +119,7 @@ ModalDialog DLG_COLWIDTH }; MetricField MF_VALUE { + HelpID = "dbaccess:MetricField:DLG_COLWIDTH:MF_VALUE"; Border = TRUE ; Pos = MAP_APPFONT ( 36 , 6 ) ; Size = MAP_APPFONT ( 63 , 12 ) ; @@ -130,6 +133,7 @@ ModalDialog DLG_COLWIDTH }; CheckBox CB_STANDARD { + HelpID = "dbaccess:CheckBox:DLG_COLWIDTH:CB_STANDARD"; Pos = MAP_APPFONT ( 36 , 25 ) ; Size = MAP_APPFONT ( 62 , 12 ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/dsselect.src b/dbaccess/source/ui/dlg/dsselect.src index 8eff7fffe6c4..f6fca187ba58 100644 --- a/dbaccess/source/ui/dlg/dsselect.src +++ b/dbaccess/source/ui/dlg/dsselect.src @@ -35,6 +35,7 @@ ModalDialog DLG_DATASOURCE_SELECTION { + HelpID = "dbaccess:ModalDialog:DLG_DATASOURCE_SELECTION"; OutputSize = TRUE ; Moveable = TRUE ; Closeable = TRUE ; @@ -50,6 +51,7 @@ ModalDialog DLG_DATASOURCE_SELECTION }; ListBox LB_DATASOURCE { + HelpID = "dbaccess:ListBox:DLG_DATASOURCE_SELECTION:LB_DATASOURCE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 19 ) ; Size = MAP_APPFONT ( 154 , 94 ) ; @@ -79,6 +81,7 @@ ModalDialog DLG_DATASOURCE_SELECTION }; PushButton PB_MANAGE { + HelpID = "dbaccess:PushButton:DLG_DATASOURCE_SELECTION:PB_MANAGE"; Pos = MAP_APPFONT ( 166 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; @@ -88,6 +91,7 @@ ModalDialog DLG_DATASOURCE_SELECTION }; PushButton PB_CREATE { + HelpID = "dbaccess:PushButton:DLG_DATASOURCE_SELECTION:PB_CREATE"; Pos = MAP_APPFONT ( 166 , 99 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/indexdialog.src b/dbaccess/source/ui/dlg/indexdialog.src index ae8f80d6c616..e4102b9c6f84 100644 --- a/dbaccess/source/ui/dlg/indexdialog.src +++ b/dbaccess/source/ui/dlg/indexdialog.src @@ -47,6 +47,7 @@ ModalDialog DLG_INDEXDESIGN { + HelpID = "dbaccess:ModalDialog:DLG_INDEXDESIGN"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( DIALOG_SIZE_X , DIALOG_SIZE_Y ) ; @@ -132,6 +133,7 @@ ModalDialog DLG_INDEXDESIGN }; CheckBox CB_UNIQUE { + HelpID = "dbaccess:CheckBox:DLG_INDEXDESIGN:CB_UNIQUE"; Pos = MAP_APPFONT ( LIST_WIDTH + 16, 34 ) ; Size = MAP_APPFONT ( DIALOG_SIZE_X - LIST_WIDTH - 22, 8 ) ; SVLook = TRUE; @@ -154,6 +156,7 @@ ModalDialog DLG_INDEXDESIGN }; PushButton PB_CLOSE { + HelpID = "dbaccess:PushButton:DLG_INDEXDESIGN:PB_CLOSE"; Pos = MAP_APPFONT ( DIALOG_SIZE_X - BUTTON_SIZE_X - 6 - BUTTON_SIZE_X - 6, DIALOG_SIZE_Y - BUTTON_SIZE_Y - 6 ) ; Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y ); SVLook = TRUE; diff --git a/dbaccess/source/ui/dlg/paramdialog.src b/dbaccess/source/ui/dlg/paramdialog.src index 3993096f8847..f654f5627808 100644 --- a/dbaccess/source/ui/dlg/paramdialog.src +++ b/dbaccess/source/ui/dlg/paramdialog.src @@ -37,6 +37,7 @@ ModalDialog DLG_PARAMETERS { + HelpID = "dbaccess:ModalDialog:DLG_PARAMETERS"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 6 + LIST_WIDTH + 3 + 6 + BUTTON_WIDTH + 6, 98 ) ; @@ -52,6 +53,7 @@ ModalDialog DLG_PARAMETERS }; ListBox LB_ALLPARAMS { + HelpID = "dbaccess:ListBox:DLG_PARAMETERS:LB_ALLPARAMS"; Pos = MAP_APPFONT ( 7 , 12 ) ; Size = MAP_APPFONT ( LIST_WIDTH , LIST_HEIGHT ) ; Border = TRUE; @@ -65,6 +67,7 @@ ModalDialog DLG_PARAMETERS }; Edit ET_PARAM { + HelpID = "dbaccess:Edit:DLG_PARAMETERS:ET_PARAM"; Border = TRUE ; Pos = MAP_APPFONT ( 7 , 12 + LIST_HEIGHT + 4 + 8 + 3 ) ; Size = MAP_APPFONT ( LIST_WIDTH , 12 ) ; @@ -72,6 +75,7 @@ ModalDialog DLG_PARAMETERS }; PushButton BT_TRAVELNEXT { + HelpID = "dbaccess:PushButton:DLG_PARAMETERS:BT_TRAVELNEXT"; Pos = MAP_APPFONT ( 4 + 3 + LIST_WIDTH + 3 + 6 , 12 + LIST_HEIGHT + 4 + 8 + 3 + ( 12 - BUTTON_HEIGHT ) / 2) ; Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/dlg/queryfilter.src b/dbaccess/source/ui/dlg/queryfilter.src index 2b1ef6e6baf5..a92110a6eefd 100644 --- a/dbaccess/source/ui/dlg/queryfilter.src +++ b/dbaccess/source/ui/dlg/queryfilter.src @@ -53,6 +53,7 @@ ModalDialog DLG_FILTERCRIT HelpId = HID_DLG_FILTERCRIT ; ListBox LB_WHEREFIELD1 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHEREFIELD1"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 25 ) ; Size = MAP_APPFONT ( 60 , 90 ) ; @@ -61,6 +62,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOMP1 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOMP1"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 25 ) ; Size = MAP_APPFONT ( 49 , 72 ) ; @@ -71,6 +73,7 @@ ModalDialog DLG_FILTERCRIT }; Edit ET_WHEREVALUE1 { + HelpID = "dbaccess:Edit:DLG_FILTERCRIT:ET_WHEREVALUE1"; Border = TRUE ; Pos = MAP_APPFONT ( 177 , 25 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -78,6 +81,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOND2 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOND2"; Border = TRUE ; Pos = MAP_APPFONT ( 15 , 41 ) ; Size = MAP_APPFONT ( 41 , 36 ) ; @@ -93,6 +97,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHEREFIELD2 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHEREFIELD2"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 41 ) ; Size = MAP_APPFONT ( 60 , 90 ) ; @@ -101,6 +106,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOMP2 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOMP2"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 41 ) ; Size = MAP_APPFONT ( 49 , 72 ) ; @@ -111,6 +117,7 @@ ModalDialog DLG_FILTERCRIT }; Edit ET_WHEREVALUE2 { + HelpID = "dbaccess:Edit:DLG_FILTERCRIT:ET_WHEREVALUE2"; Border = TRUE ; Pos = MAP_APPFONT ( 177 , 41 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; @@ -118,6 +125,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOND3 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOND3"; Border = TRUE ; Pos = MAP_APPFONT ( 15 , 57 ) ; Size = MAP_APPFONT ( 41 , 36 ) ; @@ -133,6 +141,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHEREFIELD3 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHEREFIELD3"; Border = TRUE ; Pos = MAP_APPFONT ( 60 , 57 ) ; Size = MAP_APPFONT ( 60 , 90 ) ; @@ -141,6 +150,7 @@ ModalDialog DLG_FILTERCRIT }; ListBox LB_WHERECOMP3 { + HelpID = "dbaccess:ListBox:DLG_FILTERCRIT:LB_WHERECOMP3"; Border = TRUE ; Pos = MAP_APPFONT ( 124 , 57 ) ; Size = MAP_APPFONT ( 49 , 72 ) ; @@ -151,6 +161,7 @@ ModalDialog DLG_FILTERCRIT }; Edit ET_WHEREVALUE3 { + HelpID = "dbaccess:Edit:DLG_FILTERCRIT:ET_WHEREVALUE3"; Border = TRUE ; Pos = MAP_APPFONT ( 177 , 57 ) ; Size = MAP_APPFONT ( 60 , 12 ) ; diff --git a/dbaccess/source/ui/dlg/queryorder.src b/dbaccess/source/ui/dlg/queryorder.src index 2f2f85a797a0..a0806f41988c 100644 --- a/dbaccess/source/ui/dlg/queryorder.src +++ b/dbaccess/source/ui/dlg/queryorder.src @@ -42,6 +42,7 @@ ModalDialog DLG_ORDERCRIT Closeable = TRUE ; ListBox LB_ORDERFIELD1 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERFIELD1"; Border = TRUE ; Pos = MAP_APPFONT ( 59 , 25 ) ; Size = MAP_APPFONT ( 60 , 72 ) ; @@ -51,6 +52,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERVALUE1 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERVALUE1"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 25 ) ; Size = MAP_APPFONT ( 60 , 36 ) ; @@ -65,6 +67,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERFIELD2 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERFIELD2"; Border = TRUE ; Pos = MAP_APPFONT ( 59 , 41 ) ; Size = MAP_APPFONT ( 60 , 72 ) ; @@ -74,6 +77,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERVALUE2 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERVALUE2"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 41 ) ; Size = MAP_APPFONT ( 60 , 36 ) ; @@ -88,6 +92,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERFIELD3 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERFIELD3"; Border = TRUE ; Pos = MAP_APPFONT ( 59 , 57 ) ; Size = MAP_APPFONT ( 60 , 72 ) ; @@ -97,6 +102,7 @@ ModalDialog DLG_ORDERCRIT }; ListBox LB_ORDERVALUE3 { + HelpID = "dbaccess:ListBox:DLG_ORDERCRIT:LB_ORDERVALUE3"; Border = TRUE ; Pos = MAP_APPFONT ( 123 , 57 ) ; Size = MAP_APPFONT ( 60 , 36 ) ; diff --git a/dbaccess/source/ui/dlg/sqlmessage.src b/dbaccess/source/ui/dlg/sqlmessage.src index af3d53f785dd..f409477267f9 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.src +++ b/dbaccess/source/ui/dlg/sqlmessage.src @@ -73,6 +73,7 @@ Image BMP_EXCEPTION_INFO_SCH ModalDialog DLG_SQLEXCEPTIONCHAIN { + HelpID = "dbaccess:ModalDialog:DLG_SQLEXCEPTIONCHAIN"; Moveable = TRUE ; Closeable = TRUE ; OutputSize = TRUE ; diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.src b/dbaccess/source/ui/dlg/textconnectionsettings.src index cca76e7f65a3..b34a056076a8 100644 --- a/dbaccess/source/ui/dlg/textconnectionsettings.src +++ b/dbaccess/source/ui/dlg/textconnectionsettings.src @@ -34,6 +34,7 @@ ModalDialog DLG_TEXT_CONNECTION_SETTINGS { + HelpID = "dbaccess:ModalDialog:DLG_TEXT_CONNECTION_SETTINGS"; Size = MAP_APPFONT( DIALOG_WIDTH, DIALOG_HEIGHT ); OutputSize = TRUE ; diff --git a/dbaccess/source/ui/misc/WizardPages.src b/dbaccess/source/ui/misc/WizardPages.src index 624be87c898e..d9c9772d2a41 100644 --- a/dbaccess/source/ui/misc/WizardPages.src +++ b/dbaccess/source/ui/misc/WizardPages.src @@ -68,6 +68,7 @@ String STR_WIZ_NAME_MATCHING_TITEL ModalDialog WIZ_RTFCOPYTABLE { + HelpID = "dbaccess:ModalDialog:WIZ_RTFCOPYTABLE"; Text [ en-US ] = "Copy RTF Table" ; @@ -92,12 +93,14 @@ ModalDialog WIZ_RTFCOPYTABLE }; PushButton PB_PREV { + HelpID = "dbaccess:PushButton:WIZ_RTFCOPYTABLE:PB_PREV"; TabStop = TRUE ; Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; Text [ en-US ] = "< ~Back"; }; PushButton PB_NEXT { + HelpID = "dbaccess:PushButton:WIZ_RTFCOPYTABLE:PB_NEXT"; TabStop = TRUE ; Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; Text [ en-US ] = "~Next>"; @@ -131,6 +134,7 @@ TabPage TAB_WIZ_COLUMN_SELECT MultiListBox LB_ORG_COLUMN_NAMES { + HelpID = "dbaccess:MultiListBox:TAB_WIZ_COLUMN_SELECT:LB_ORG_COLUMN_NAMES"; Border = TRUE ; Pos = MAP_APPFONT ( WINDOW_BORDER_X , WINDOW_BORDER_Y ) ; Size = MAP_APPFONT ( 95 , WINDOW_SIZE_Y - 23 ) ; @@ -143,6 +147,7 @@ TabPage TAB_WIZ_COLUMN_SELECT }; ImageButton IB_COLUMN_RH { + HelpID = "dbaccess:ImageButton:TAB_WIZ_COLUMN_SELECT:IB_COLUMN_RH"; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 116 , WINDOW_BORDER_Y + 25 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -162,6 +167,7 @@ TabPage TAB_WIZ_COLUMN_SELECT }; ImageButton IB_COLUMNS_RH { + HelpID = "dbaccess:ImageButton:TAB_WIZ_COLUMN_SELECT:IB_COLUMNS_RH"; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 116 , WINDOW_BORDER_Y + 45 ) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE; @@ -182,6 +188,7 @@ TabPage TAB_WIZ_COLUMN_SELECT }; ImageButton IB_COLUMN_LH { + HelpID = "dbaccess:ImageButton:TAB_WIZ_COLUMN_SELECT:IB_COLUMN_LH"; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 116 , WINDOW_BORDER_Y + 65) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -201,6 +208,7 @@ TabPage TAB_WIZ_COLUMN_SELECT }; ImageButton IB_COLUMNS_LH { + HelpID = "dbaccess:ImageButton:TAB_WIZ_COLUMN_SELECT:IB_COLUMNS_LH"; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 116 , WINDOW_BORDER_Y + 85) ; Size = MAP_APPFONT ( 20 , 14 ) ; TabStop = TRUE ; @@ -221,6 +229,7 @@ TabPage TAB_WIZ_COLUMN_SELECT MultiListBox LB_NEW_COLUMN_NAMES { + HelpID = "dbaccess:MultiListBox:TAB_WIZ_COLUMN_SELECT:LB_NEW_COLUMN_NAMES"; Border = TRUE ; Pos = MAP_APPFONT ( WINDOW_BORDER_X + 157, WINDOW_BORDER_Y) ; Size = MAP_APPFONT ( 95 , WINDOW_SIZE_Y - 23 ) ; @@ -246,6 +255,7 @@ TabPage TAB_WIZ_TYPE_SELECT MultiListBox LB_NEW_COLUMN_NAMES { + HelpID = "dbaccess:MultiListBox:TAB_WIZ_TYPE_SELECT:LB_NEW_COLUMN_NAMES"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 87 , WINDOW_SIZE_Y - 12 ) ; @@ -265,6 +275,7 @@ TabPage TAB_WIZ_TYPE_SELECT TabPage CONTROL_CONTAINER { + HelpID = "dbaccess:TabPage:CONTROL_CONTAINER"; Pos = MAP_APPFONT ( 102 , WINDOW_BORDER_Y ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 111, WINDOW_SIZE_Y - WINDOW_BORDER_Y - 67 ); SVLook = TRUE; @@ -287,6 +298,7 @@ TabPage TAB_WIZ_TYPE_SELECT NumericField ET_AUTO { + HelpID = "dbaccess:NumericField:TAB_WIZ_TYPE_SELECT:ET_AUTO"; Border = TRUE ; Pos = MAP_APPFONT ( 151 , WINDOW_SIZE_Y - WINDOW_BORDER_Y - 29) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -295,6 +307,7 @@ TabPage TAB_WIZ_TYPE_SELECT PushButton PB_AUTO { + HelpID = "dbaccess:PushButton:TAB_WIZ_TYPE_SELECT:PB_AUTO"; Pos = MAP_APPFONT ( WINDOW_SIZE_X - 62 , WINDOW_SIZE_Y - WINDOW_BORDER_Y - 30 ) ; Size = MAP_APPFONT ( BUTTON_SIZE_X , BUTTON_SIZE_Y ) ; TabStop = TRUE ; @@ -320,6 +333,7 @@ Menu RID_SBA_RTF_PKEYPOPUP //================================================================== TabPage TAB_WIZ_NAME_MATCHING { + HelpID = "dbaccess:TabPage:TAB_WIZ_NAME_MATCHING"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -361,6 +375,7 @@ TabPage TAB_WIZ_NAME_MATCHING ImageButton IB_COLUMN_UP { + HelpID = "dbaccess:ImageButton:TAB_WIZ_NAME_MATCHING:IB_COLUMN_UP"; Pos = MAP_APPFONT ( 19 , 45 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; TabStop = TRUE; @@ -381,6 +396,7 @@ TabPage TAB_WIZ_NAME_MATCHING }; ImageButton IB_COLUMN_DOWN { + HelpID = "dbaccess:ImageButton:TAB_WIZ_NAME_MATCHING:IB_COLUMN_DOWN"; Pos = MAP_APPFONT ( 19 , 63 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; TabStop = TRUE; @@ -400,6 +416,7 @@ TabPage TAB_WIZ_NAME_MATCHING }; ImageButton IB_COLUMN_UP_RIGHT { + HelpID = "dbaccess:ImageButton:TAB_WIZ_NAME_MATCHING:IB_COLUMN_UP_RIGHT"; Pos = MAP_APPFONT ( WINDOW_SIZE_X - 33, 45 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; TabStop = TRUE; @@ -420,6 +437,7 @@ TabPage TAB_WIZ_NAME_MATCHING }; ImageButton IB_COLUMN_DOWN_RIGHT { + HelpID = "dbaccess:ImageButton:TAB_WIZ_NAME_MATCHING:IB_COLUMN_DOWN_RIGHT"; Pos = MAP_APPFONT ( WINDOW_SIZE_X - 33, 63) ; Size = MAP_APPFONT ( 14 , 14 ) ; TabStop = TRUE ; @@ -440,6 +458,7 @@ TabPage TAB_WIZ_NAME_MATCHING PushButton PB_ALL { + HelpID = "dbaccess:PushButton:TAB_WIZ_NAME_MATCHING:PB_ALL"; Pos = MAP_APPFONT ( 6, 83) ; Size = MAP_APPFONT ( 40 , 14 ) ; TabStop = TRUE ; @@ -448,6 +467,7 @@ TabPage TAB_WIZ_NAME_MATCHING PushButton PB_NONE { + HelpID = "dbaccess:PushButton:TAB_WIZ_NAME_MATCHING:PB_NONE"; Pos = MAP_APPFONT ( 6, 103) ; Size = MAP_APPFONT ( 40 , 14 ) ; TabStop = TRUE ; @@ -486,12 +506,14 @@ TabPage TAB_WIZ_COPYTABLE }; RadioButton RB_DEFDATA { + HelpID = "dbaccess:RadioButton:TAB_WIZ_COPYTABLE:RB_DEFDATA"; Pos = MAP_APPFONT ( 12 , 35 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; Text [ en-US ] = "De~finition and data" ; }; RadioButton RB_DEF { + HelpID = "dbaccess:RadioButton:TAB_WIZ_COPYTABLE:RB_DEF"; Pos = MAP_APPFONT ( 12, 49 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; Text [ en-US ] = "Def~inition" ; @@ -499,6 +521,7 @@ TabPage TAB_WIZ_COPYTABLE RadioButton RB_VIEW { + HelpID = "dbaccess:RadioButton:TAB_WIZ_COPYTABLE:RB_VIEW"; Pos = MAP_APPFONT ( 12, 63 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; Text [ en-US ] = "A~s table view"; @@ -506,6 +529,7 @@ TabPage TAB_WIZ_COPYTABLE RadioButton RB_APPENDDATA { + HelpID = "dbaccess:RadioButton:TAB_WIZ_COPYTABLE:RB_APPENDDATA"; Pos = MAP_APPFONT ( 12, 77 ) ; Size = MAP_APPFONT ( 73 , 10 ) ; Text [ en-US ] = "Append ~data" ; @@ -513,6 +537,7 @@ TabPage TAB_WIZ_COPYTABLE CheckBox CB_USEHEADERLINE { + HelpID = "dbaccess:CheckBox:TAB_WIZ_COPYTABLE:CB_USEHEADERLINE"; Pos = MAP_APPFONT ( 12, 93 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 18, 10 ) ; Text [ en-US ] = "Use first ~line as column names" ; @@ -520,6 +545,7 @@ TabPage TAB_WIZ_COPYTABLE CheckBox CB_PRIMARY_COLUMN { + HelpID = "dbaccess:CheckBox:TAB_WIZ_COPYTABLE:CB_PRIMARY_COLUMN"; Pos = MAP_APPFONT ( 12, 107 ) ; Size = MAP_APPFONT ( 90 , 10 ) ; Text [ en-US ] = "Crea~te primary key"; @@ -533,6 +559,7 @@ TabPage TAB_WIZ_COPYTABLE Edit ET_KEYNAME { + HelpID = "dbaccess:Edit:TAB_WIZ_COPYTABLE:ET_KEYNAME"; Pos = MAP_APPFONT ( 80, 120 ) ; Size = MAP_APPFONT ( 65 , 12 ) ; TabStop = TRUE ; diff --git a/dbaccess/source/ui/querydesign/querydlg.src b/dbaccess/source/ui/querydesign/querydlg.src index 687df3159186..730cbb4ed780 100644 --- a/dbaccess/source/ui/querydesign/querydlg.src +++ b/dbaccess/source/ui/querydesign/querydlg.src @@ -82,6 +82,7 @@ ModalDialog DLG_QRY_JOIN }; CheckBox CB_NATURAL { + HelpID = "dbaccess:CheckBox:DLG_QRY_JOIN:CB_NATURAL"; Pos = MAP_APPFONT ( 101 , 31 ) ; Size = MAP_APPFONT ( 89 , 8 ) ; -- cgit From d5ff5c6f6810ed06b054d105416908f5a5028922 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 1 Nov 2010 15:32:54 +0100 Subject: undoapi: moved the last remaining method of SfxMacroConfig (::Call) into the SfxApplication, and got rid of the class completely --- dbaccess/source/ui/misc/linkeddocuments.cxx | 3 --- 1 file changed, 3 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx index 4d3472e623b7..553050f961e9 100644 --- a/dbaccess/source/ui/misc/linkeddocuments.cxx +++ b/dbaccess/source/ui/misc/linkeddocuments.cxx @@ -114,9 +114,6 @@ #ifndef _SB_SBUNO_HXX #include #endif -#ifndef _SFX_MACROCONF_HXX -#include -#endif #ifndef _EHDL_HXX #include #endif -- cgit From 11bc42b1f7465068945d8e217e35fb7eff094b4d Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Mon, 15 Nov 2010 12:38:17 +0100 Subject: dba34b: #i115579# check for children --- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 0eb7c09f29e9..67385fd02d67 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1957,7 +1957,7 @@ namespace pJoinType = pNode->getChild(2); } - if (SQL_ISRULE(pJoinType,join_type) && SQL_ISTOKEN(pJoinType->getChild(0),INNER)) + if (SQL_ISRULE(pJoinType,join_type) && (!pJoinType->count() || SQL_ISTOKEN(pJoinType->getChild(0),INNER))) { eJoinType = INNER_JOIN; } -- cgit From 784ea715b333655894b2702d721fd119f81bd394 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 17 Nov 2010 09:11:03 +0100 Subject: undoapi: carry the SfxUndoManager around as &, not as * --- dbaccess/source/ui/control/sqledit.cxx | 4 ++-- dbaccess/source/ui/inc/TableController.hxx | 3 --- dbaccess/source/ui/misc/singledoccontroller.cxx | 4 ++-- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 4 ++-- dbaccess/source/ui/querydesign/QueryTableView.cxx | 6 ++--- dbaccess/source/ui/querydesign/QueryViewSwitch.cxx | 2 +- .../source/ui/querydesign/SelectionBrowseBox.cxx | 8 +++---- dbaccess/source/ui/querydesign/querycontroller.cxx | 8 +++---- .../ui/relationdesign/RelationController.cxx | 2 +- .../source/ui/relationdesign/RelationTableView.cxx | 4 ++-- dbaccess/source/ui/tabledesign/TEditControl.cxx | 26 +++++++++++----------- dbaccess/source/ui/tabledesign/TEditControl.hxx | 2 +- dbaccess/source/ui/tabledesign/TableController.cxx | 11 +++------ 13 files changed, 38 insertions(+), 46 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 89cdc855a0cd..69ed6bcd84f0 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -126,11 +126,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/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx index 3651c5632504..b64fba13bbea 100644 --- a/dbaccess/source/ui/inc/TableController.hxx +++ b/dbaccess/source/ui/inc/TableController.hxx @@ -129,9 +129,6 @@ namespace dbaui virtual void impl_onModifyChanged(); - // const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();} - // need for undo's and redo's - SfxUndoManager* getUndoMgr(); inline ::std::vector< ::boost::shared_ptr >* getRows() { return &m_vRowList; } /// returns the postion of the the first empty row diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx index 87ddfa1f197b..48c83609d7af 100644 --- a/dbaccess/source/ui/misc/singledoccontroller.cxx +++ b/dbaccess/source/ui/misc/singledoccontroller.cxx @@ -530,9 +530,9 @@ namespace dbaui InvalidateFeature(_nId); } // ----------------------------------------------------------------------------- - SfxUndoManager* OSingleDocumentController::getUndoMgr() + SfxUndoManager& OSingleDocumentController::GetUndoManager() { - return &m_aUndoManager; + return m_aUndoManager; } // ----------------------------------------------------------------------------- void OSingleDocumentController::addUndoActionAndInvalidate(SfxUndoAction *_pAction) diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 0eb7c09f29e9..b8598f26f825 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2177,7 +2177,7 @@ namespace while ( false ); // Durch das Neuerzeugen wurden wieder Undo-Actions in den Manager gestellt - rController.getUndoMgr()->Clear(); + rController.GetUndoManager().Clear(); _pSelectionBrw->Invalidate(); return eErrorCode; } @@ -3234,7 +3234,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& InsertField( pField, sal_True, sal_False ); } - rController.getUndoMgr()->Clear(); + rController.GetUndoManager().Clear(); m_pSelectionBox->Invalidate(); } diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index c083392a9613..16052816f07a 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -847,8 +847,8 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin) // mein Parent brauche ich, da es vom Loeschen erfahren soll OQueryDesignView* pParent = static_cast(getDesignView()); - SfxUndoManager* pUndoMgr = m_pView->getController().getUndoMgr(); - pUndoMgr->EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() ); + SfxUndoManager& rUndoMgr = m_pView->getController().GetUndoManager(); + rUndoMgr.EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() ); // Undo-Action anlegen OQueryTabWinDelUndoAct* pUndoAction = new OQueryTabWinDelUndoAct(this); @@ -861,7 +861,7 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin) pParent->TableDeleted( static_cast< OQueryTableWindowData*>(pTabWin->GetData().get())->GetAliasName() ); m_pView->getController().addUndoActionAndInvalidate( pUndoAction ); - pUndoMgr->LeaveListAction(); + rUndoMgr.LeaveListAction(); if (m_lnkTabWinsChangeHandler.IsSet()) { diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx index ec3b22899225..d60621f7b414 100644 --- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx +++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx @@ -299,7 +299,7 @@ bool OQueryViewSwitch::impl_postViewSwitch( const bool i_bGraphicalDesign, const if ( pContainer ) pContainer->Resize(); - m_pDesignView->getController().getUndoMgr()->Clear(); + m_pDesignView->getController().GetUndoManager().Clear(); m_pDesignView->getController().InvalidateAll(); return i_bSuccess; diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 66b6eec9465c..223c00cfbd2a 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1021,7 +1021,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() strOldCellContents = pEntry->GetField(); bListAction = sal_True; if ( !m_bInUndoMode ) - rController.getUndoMgr()->EnterListAction(String(),String()); + rController.GetUndoManager().EnterListAction(String(),String()); USHORT nPos = m_pFieldCell->GetEntryPos(aFieldName); String aAliasName = pEntry->GetAlias(); @@ -1050,7 +1050,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() { sNewValue = aFieldName; if ( !m_bInUndoMode ) - static_cast(getDesignView()->getController()).getUndoMgr()->LeaveListAction(); + static_cast(getDesignView()->getController()).GetUndoManager().LeaveListAction(); bListAction = sal_False; } else @@ -1282,7 +1282,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() } if ( bListAction && !m_bInUndoMode ) - static_cast(getDesignView()->getController()).getUndoMgr()->LeaveListAction(); + static_cast(getDesignView()->getController()).GetUndoManager().LeaveListAction(); return pEntry != NULL && !bError; } @@ -2644,7 +2644,7 @@ void OSelectionBrowseBox::appendUndoAction(const String& _rOldValue,const String if ( !_bListAction ) { _bListAction = sal_True; - static_cast(getDesignView()->getController()).getUndoMgr()->EnterListAction(String(),String()); + static_cast(getDesignView()->getController()).GetUndoManager().EnterListAction(String(),String()); } appendUndoAction(_rOldValue,_rNewValue,_nRow); } diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 06b6804fa9be..c39191ac8cc9 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -685,9 +685,9 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& break; case SID_BROWSER_CLEAR_QUERY: { - getUndoMgr()->EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() ); + GetUndoManager().EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() ); getContainer()->clear(); - getUndoMgr()->LeaveListAction(); + GetUndoManager().LeaveListAction(); setStatement_fireEvent( ::rtl::OUString() ); if(m_bGraphicalDesign) @@ -1037,7 +1037,7 @@ void OQueryController::impl_initialize() } } - getUndoMgr()->Clear(); + GetUndoManager().Clear(); if ( ( m_bGraphicalDesign ) && ( ( !m_sName.getLength() && !editingCommand() ) @@ -1789,7 +1789,7 @@ void OQueryController::reset() { impl_reset(); getContainer()->reset( NULL ); - getUndoMgr()->Clear(); + GetUndoManager().Clear(); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 99fe03a7004d..642d22d1af8e 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -494,7 +494,7 @@ IMPL_LINK( ORelationController, OnThreadFinished, void*, /*NOTINTERESTEDIN*/ ) { getView()->initialize(); // show the windows and fill with our informations getView()->Invalidate(INVALIDATE_NOERASE); - getUndoMgr()->Clear(); // clear all undo redo things + GetUndoManager().Clear(); // clear all undo redo things setModified(sal_False); // and we are not modified yet if(m_vTableData.empty()) diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 0c9d0cc1a456..505738ef5cf0 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -375,7 +375,7 @@ void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) OSQLWarningBox aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES ); if ( m_bInRemove || aDlg.Execute() == RET_YES ) { - m_pView->getController().getUndoMgr()->Clear(); + m_pView->getController().GetUndoManager().Clear(); OJoinTableView::RemoveTabWin( pTabWin ); m_pView->getController().InvalidateFeature(SID_RELATION_ADD_RELATION); @@ -469,7 +469,7 @@ void ORelationTableView::_elementRemoved( const container::ContainerEvent& _rEve OTableWindow* pTableWindow = GetTabWindow(sName); if ( pTableWindow ) { - m_pView->getController().getUndoMgr()->Clear(); + m_pView->getController().GetUndoManager().Clear(); OJoinTableView::RemoveTabWin( pTableWindow ); m_pView->getController().InvalidateFeature(SID_RELATION_ADD_RELATION); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 4d3cdb6652a9..693c7dbf585a 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -263,9 +263,9 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow) } //------------------------------------------------------------------------------ -SfxUndoManager* OTableEditorCtrl::GetUndoManager() const +SfxUndoManager& OTableEditorCtrl::GetUndoManager() const { - return GetView()->getController().getUndoMgr(); + return GetView()->getController().GetUndoManager(); } //------------------------------------------------------------------------------ @@ -388,7 +388,7 @@ OTableEditorCtrl::~OTableEditorCtrl() DBG_DTOR(OTableEditorCtrl,NULL); ////////////////////////////////////////////////////////////////////// // Undo-Manager zuruecksetzen - GetUndoManager()->Clear(); + GetUndoManager().Clear(); ////////////////////////////////////////////////////////////////////// // Moegliche Events aus Queue entfernen @@ -683,7 +683,7 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) // Wenn FieldDescr existiert, wurde Feld geloescht und alter Inhalt wird wiederhergestellt if (pActFieldDescr) { - GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo())); + GetUndoManager().AddUndoAction(new OTableEditorTypeSelUndoAct(this, nRow, FIELD_TYPE, pActFieldDescr->getTypeInfo())); SwitchType(TOTypeInfoSP()); pActFieldDescr = pActRow->GetActFieldDescr(); } @@ -858,7 +858,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) default: sActionDescription = String( ModuleRes( STR_CHANGE_COLUMN_ATTRIBUTE ) ); break; } - GetUndoManager()->EnterListAction( sActionDescription, String() ); + GetUndoManager().EnterListAction( sActionDescription, String() ); if (!pActFieldDescr) { const OTypeInfoMap* pTypeInfoMap = GetView()->getController().getTypeInfo(); @@ -875,20 +875,20 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) nInvalidateTypeEvent = Application::PostUserEvent( LINK(this, OTableEditorCtrl, InvalidateFieldType) ); pActFieldDescr = pActRow->GetActFieldDescr(); pDescrWin->DisplayData( pActFieldDescr ); - GetUndoManager()->AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, TOTypeInfoSP()) ); + GetUndoManager().AddUndoAction( new OTableEditorTypeSelUndoAct(this, nRow, nColId+1, TOTypeInfoSP()) ); } if( nColId != FIELD_TYPE ) - GetUndoManager()->AddUndoAction( new OTableDesignCellUndoAct(this, nRow, nColId) ); + GetUndoManager().AddUndoAction( new OTableDesignCellUndoAct(this, nRow, nColId) ); else { - GetUndoManager()->AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo())); + GetUndoManager().AddUndoAction(new OTableEditorTypeSelUndoAct(this, GetCurRow(), nColId, GetFieldDescr(GetCurRow())->getTypeInfo())); resetType(); } SaveData(nRow,nColId); // SaveData could create a undo action as well - GetUndoManager()->LeaveListAction(); + GetUndoManager().LeaveListAction(); RowModified(nRow); CellControllerRef xController(Controller()); if(xController.Is()) @@ -1051,7 +1051,7 @@ void OTableEditorCtrl::InsertRows( long nRow ) ////////////////////////////////////////////////////////////////////// // Undo-Action erzeugen - GetUndoManager()->AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); + GetUndoManager().AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); GetView()->getController().setModified( sal_True ); InvalidateFeatures(); } @@ -1063,7 +1063,7 @@ void OTableEditorCtrl::DeleteRows() OSL_ENSURE(GetView()->getController().isDropAllowed(),"Call of DeleteRows not valid here. Please check isDropAllowed!"); ////////////////////////////////////////////////////////////////////// // Undo-Action erzeugen - GetUndoManager()->AddUndoAction( new OTableEditorDelUndoAct(this) ); + GetUndoManager().AddUndoAction( new OTableEditorDelUndoAct(this) ); ////////////////////////////////////////////////////////////////////// @@ -1111,7 +1111,7 @@ void OTableEditorCtrl::InsertNewRows( long nRow ) long nInsertRows = GetSelectRowCount(); if( !nInsertRows ) nInsertRows = 1; - GetUndoManager()->AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) ); + GetUndoManager().AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) ); ////////////////////////////////////////////////////////////////////// // Zahl der selektierten Zeilen werden neu eingefuegt for( long i=nRow; i<(nRow+nInsertRows); i++ ) @@ -1889,7 +1889,7 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) } } - GetUndoManager()->AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) ); + GetUndoManager().AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) ); ////////////////////////////////////////////////////////////////////// // Handle-Spalte invalidieren diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index 2a7a36f3a051..edf941cf1f39 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -148,7 +148,7 @@ namespace dbaui virtual ~OTableEditorCtrl(); virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol); virtual void UpdateAll(); - SfxUndoManager* GetUndoManager() const; + SfxUndoManager& GetUndoManager() const; void SetDescrWin( OTableFieldDescWin* pWin ){ pDescrWin = pWin; if (pDescrWin && pActRow) pDescrWin->DisplayData(pActRow->GetActFieldDescr()); } BOOL SaveCurRow(); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index a848eb8de18c..1cc02fb45d8b 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -568,7 +568,7 @@ void OTableController::impl_initialize() { loadData(); // fill the column information form the table getView()->initialize(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things + GetUndoManager().Clear(); // clear all undo redo things setModified(sal_False); // and we are not modified yet } catch( const Exception& ) @@ -666,11 +666,6 @@ void OTableController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:EditDoc", ID_BROWSER_EDITDOC, CommandGroup::EDIT ); } // ----------------------------------------------------------------------------- -SfxUndoManager* OTableController::getUndoMgr() -{ - return &m_aUndoManager; -} -// ----------------------------------------------------------------------------- void OTableController::impl_onModifyChanged() { OSingleDocumentController::impl_onModifyChanged(); @@ -1521,7 +1516,7 @@ void OTableController::reSyncRows() } static_cast(getView())->reSync(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things + GetUndoManager().Clear(); // clear all undo redo things setModified(sal_False); // and we are not modified yet } // ----------------------------------------------------------------------------- @@ -1577,7 +1572,7 @@ void OTableController::reload() { loadData(); // fill the column information form the table static_cast(getView())->reSync(); // show the windows and fill with our informations - getUndoMgr()->Clear(); // clear all undo redo things + GetUndoManager().Clear(); // clear all undo redo things setModified(sal_False); // and we are not modified yet static_cast(getView())->Invalidate(); } -- cgit From 39a689148061da7eeb5348abba6c064b6111f1a8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 17 Nov 2010 10:44:38 +0100 Subject: undoapi: implement XUndoManager/Supplier for Base sub components --- dbaccess/source/ui/misc/dbaundomanager.cxx | 395 ++++++++++++++++++++++++ dbaccess/source/ui/misc/dbaundomanager.hxx | 101 ++++++ dbaccess/source/ui/misc/makefile.mk | 74 ++--- dbaccess/source/ui/misc/singledoccontroller.cxx | 39 ++- 4 files changed, 560 insertions(+), 49 deletions(-) create mode 100755 dbaccess/source/ui/misc/dbaundomanager.cxx create mode 100755 dbaccess/source/ui/misc/dbaundomanager.hxx (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx new file mode 100755 index 000000000000..1e60a027a693 --- /dev/null +++ b/dbaccess/source/ui/misc/dbaundomanager.cxx @@ -0,0 +1,395 @@ +/************************************************************************* + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_dbaccess.hxx" + +#include "dbaundomanager.hxx" + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +#include +#include +#include +#include + +//...................................................................................................................... +namespace dbaui +{ +//...................................................................................................................... + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::document::XUndoManager; + using ::com::sun::star::lang::DisposedException; + using ::com::sun::star::document::UndoContextNotClosedException; + using ::com::sun::star::document::UndoFailedException; + using ::com::sun::star::document::EmptyUndoStackException; + using ::com::sun::star::util::InvalidStateException; + using ::com::sun::star::document::XUndoAction; + using ::com::sun::star::lang::IllegalArgumentException; + using ::com::sun::star::document::XUndoManagerListener; + using ::com::sun::star::util::NotLockedException; + using ::com::sun::star::lang::NoSupportException; + /** === end UNO using === **/ + + //================================================================================================================== + //= UndoManager_Impl + //================================================================================================================== + struct UndoManager_Impl : public ::framework::IUndoManagerImplementation + { + UndoManager_Impl( UndoManager& i_antiImpl, ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex ) + :rAntiImpl( i_antiImpl ) + ,rParent( i_parent ) + ,rMutex( i_mutex ) + ,bDisposed( false ) + ,aUndoManager() + ,aUndoHelper( *this ) + { + } + + virtual ~UndoManager_Impl() + { + } + + UndoManager& rAntiImpl; + ::cppu::OWeakObject& rParent; + ::osl::Mutex& rMutex; + bool bDisposed; + SfxUndoManager aUndoManager; + ::framework::UndoManagerHelper aUndoHelper; + + // IUndoManagerImplementation + virtual ::svl::IUndoManager& getImplUndoManager(); + virtual Reference< XUndoManager > getThis(); + }; + + //------------------------------------------------------------------------------------------------------------------ + ::svl::IUndoManager& UndoManager_Impl::getImplUndoManager() + { + return aUndoManager; + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XUndoManager > UndoManager_Impl::getThis() + { + return static_cast< XUndoManager* >( &rAntiImpl ); + } + + //============================================================================================================== + //= OslMutexFacade + //============================================================================================================== + class OslMutexFacade : public ::framework::IMutex + { + public: + OslMutexFacade( ::osl::Mutex& i_mutex ) + :m_rMutex( i_mutex ) + { + } + + virtual void acquire(); + virtual void release(); + + private: + ::osl::Mutex& m_rMutex; + }; + + //-------------------------------------------------------------------------------------------------------------- + void OslMutexFacade::acquire() + { + m_rMutex.acquire(); + } + + //-------------------------------------------------------------------------------------------------------------- + void OslMutexFacade::release() + { + m_rMutex.release(); + } + + //============================================================================================================== + //= UndoManagerMethodGuard + //============================================================================================================== + /** guard for public UNO methods of the UndoManager + */ + class UndoManagerMethodGuard : public ::framework::IMutexGuard + { + public: + UndoManagerMethodGuard( UndoManager_Impl& i_impl ) + :m_aGuard( i_impl.rMutex ) + ,m_aMutexFacade( i_impl.rMutex ) + { + // throw if the instance is already disposed + if ( i_impl.bDisposed ) + throw DisposedException( ::rtl::OUString(), i_impl.getThis() ); + } + virtual ~UndoManagerMethodGuard() + { + } + + // IMutexGuard + virtual ::framework::IMutex& getGuardedMutex(); + + // IGuard + virtual void clear(); + virtual void reset(); + + private: + ::osl::ResettableMutexGuard m_aGuard; + OslMutexFacade m_aMutexFacade; + }; + + //-------------------------------------------------------------------------------------------------------------- + ::framework::IMutex& UndoManagerMethodGuard::getGuardedMutex() + { + return m_aMutexFacade; + } + + //-------------------------------------------------------------------------------------------------------------- + void UndoManagerMethodGuard::clear() + { + m_aGuard.clear(); + } + + //-------------------------------------------------------------------------------------------------------------- + void UndoManagerMethodGuard::reset() + { + m_aGuard.reset(); + } + + //================================================================================================================== + //= UndoManager + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + UndoManager::UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex ) + :m_pImpl( new UndoManager_Impl( *this, i_parent, i_mutex ) ) + { + } + + //------------------------------------------------------------------------------------------------------------------ + UndoManager::~UndoManager() + { + } + + //------------------------------------------------------------------------------------------------------------------ + SfxUndoManager& UndoManager::GetSfxUndoManager() const + { + return m_pImpl->aUndoManager; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::acquire( ) throw () + { + m_pImpl->rParent.acquire(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::release( ) throw () + { + m_pImpl->rParent.release(); + } + + //------------------------------------------------------------------------------------------------------------------ + void UndoManager::disposing() + { + { + ::osl::MutexGuard aGuard( m_pImpl->rMutex ); + m_pImpl->bDisposed = true; + } + m_pImpl->aUndoHelper.disposing(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::enterUndoContext( const ::rtl::OUString& i_title ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.enterUndoContext( i_title, aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::enterHiddenUndoContext( ) throw (EmptyUndoStackException, RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.enterHiddenUndoContext( aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::leaveUndoContext( ) throw (InvalidStateException, RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.leaveUndoContext( aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::addUndoAction( const Reference< XUndoAction >& i_action ) throw (IllegalArgumentException, RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.addUndoAction( i_action, aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::undo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + // (all our UndoActions work directly on VCL code, usually, so ...) + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.undo( aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::redo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException) + { + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + // (all our UndoActions work directly on VCL code, usually, so ...) + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.redo( aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL UndoManager::isUndoPossible( ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + return m_pImpl->aUndoHelper.isUndoPossible(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL UndoManager::isRedoPossible( ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + return m_pImpl->aUndoHelper.isRedoPossible(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL UndoManager::getCurrentUndoActionTitle( ) throw (EmptyUndoStackException, RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + return m_pImpl->aUndoHelper.getCurrentUndoActionTitle(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::rtl::OUString SAL_CALL UndoManager::getCurrentRedoActionTitle( ) throw (EmptyUndoStackException, RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + return m_pImpl->aUndoHelper.getCurrentRedoActionTitle(); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL UndoManager::getAllUndoActionTitles( ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + return m_pImpl->aUndoHelper.getAllUndoActionTitles(); + } + + //------------------------------------------------------------------------------------------------------------------ + Sequence< ::rtl::OUString > SAL_CALL UndoManager::getAllRedoActionTitles( ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + return m_pImpl->aUndoHelper.getAllRedoActionTitles(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::clear( ) throw (UndoContextNotClosedException, RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.clear( aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::clearRedo( ) throw (UndoContextNotClosedException, RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.clearRedo( aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::reset( ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.reset( aGuard ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::addUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.addUndoManagerListener( i_listener ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::removeUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.removeUndoManagerListener( i_listener ); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::lock( ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.lock(); + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::unlock( ) throw (NotLockedException, RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + m_pImpl->aUndoHelper.unlock(); + } + + //------------------------------------------------------------------------------------------------------------------ + ::sal_Bool SAL_CALL UndoManager::isLocked( ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + return m_pImpl->aUndoHelper.isLocked(); + } + + //------------------------------------------------------------------------------------------------------------------ + Reference< XInterface > SAL_CALL UndoManager::getParent( ) throw (RuntimeException) + { + UndoManagerMethodGuard aGuard( *m_pImpl ); + return *&m_pImpl->rParent; + } + + //------------------------------------------------------------------------------------------------------------------ + void SAL_CALL UndoManager::setParent( const Reference< XInterface >& i_parent ) throw (NoSupportException, RuntimeException) + { + (void)i_parent; + throw NoSupportException( ::rtl::OUString(), m_pImpl->getThis() ); + } + +//...................................................................................................................... +} // namespace dbaui +//...................................................................................................................... diff --git a/dbaccess/source/ui/misc/dbaundomanager.hxx b/dbaccess/source/ui/misc/dbaundomanager.hxx new file mode 100755 index 000000000000..99ff86cb39bf --- /dev/null +++ b/dbaccess/source/ui/misc/dbaundomanager.hxx @@ -0,0 +1,101 @@ +/************************************************************************* + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef DBACCESS_DBAUNDOMANAGER_HXX +#define DBACCESS_DBAUNDOMANAGER_HXX + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +#include + +#include + +class SfxUndoManager; + +//...................................................................................................................... +namespace dbaui +{ +//...................................................................................................................... + + //================================================================================================================== + //= UndoManager + //================================================================================================================== + struct UndoManager_Impl; + typedef ::cppu::ImplHelper1< ::com::sun::star::document::XUndoManager > UndoManager_Base; + class UndoManager : public UndoManager_Base + { + public: + UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex ); + virtual ~UndoManager(); + + SfxUndoManager& GetSfxUndoManager() const; + + // XInterface + virtual void SAL_CALL acquire( ) throw (); + virtual void SAL_CALL release( ) throw (); + + // XComponent equivalents + void disposing(); + + // XUndoManager + virtual void SAL_CALL enterUndoContext( const ::rtl::OUString& i_title ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL enterHiddenUndoContext( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL leaveUndoContext( ) throw (::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addUndoAction( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoAction >& i_action ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL undo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL redo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isUndoPossible( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isRedoPossible( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getCurrentUndoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getCurrentRedoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllUndoActionTitles( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllRedoActionTitles( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL clear( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL clearRedo( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL reset( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); + + // XLockable (base of XUndoManager) + virtual void SAL_CALL lock( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL unlock( ) throw (::com::sun::star::util::NotLockedException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isLocked( ) throw (::com::sun::star::uno::RuntimeException); + + // XChild (base of XUndoManager) + virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); + + private: + ::boost::scoped_ptr< UndoManager_Impl > m_pImpl; + }; + +//...................................................................................................................... +} // namespace dbaui +//...................................................................................................................... + +#endif // DBACCESS_DBAUNDOMANAGER_HXX diff --git a/dbaccess/source/ui/misc/makefile.mk b/dbaccess/source/ui/misc/makefile.mk index 7f9bbed56023..62276292224e 100644 --- a/dbaccess/source/ui/misc/makefile.mk +++ b/dbaccess/source/ui/misc/makefile.mk @@ -25,8 +25,8 @@ # #************************************************************************* -PRJ=..$/..$/.. -PRJINC=$(PRJ)$/source +PRJ=../../.. +PRJINC=$(PRJ)/source PRJNAME=dbaccess TARGET=uimisc @@ -35,50 +35,52 @@ ENABLE_EXCEPTIONS=TRUE # --- Settings ---------------------------------- .INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk +.INCLUDE : $(PRJ)/util/makefile.pmk # --- Files ------------------------------------- # ... resource files ............................ SRS1NAME=$(TARGET) -SRC1FILES = \ - dbumiscres.src \ +SRC1FILES = \ + dbumiscres.src \ WizardPages.src # ... object files ............................ -SLOFILES= \ - $(SLO)$/asyncmodaldialog.obj \ - $(SLO)$/imageprovider.obj \ - $(SLO)$/singledoccontroller.obj \ - $(SLO)$/datasourceconnector.obj \ - $(SLO)$/linkeddocuments.obj \ - $(SLO)$/indexcollection.obj \ - $(SLO)$/UITools.obj \ - $(SLO)$/WCPage.obj \ - $(SLO)$/WCopyTable.obj \ - $(SLO)$/WTypeSelect.obj \ - $(SLO)$/TokenWriter.obj \ - $(SLO)$/HtmlReader.obj \ - $(SLO)$/RtfReader.obj \ - $(SLO)$/propertysetitem.obj \ - $(SLO)$/databaseobjectview.obj \ - $(SLO)$/DExport.obj \ - $(SLO)$/uiservices.obj \ - $(SLO)$/RowSetDrop.obj \ - $(SLO)$/TableCopyHelper.obj \ - $(SLO)$/moduledbu.obj \ - $(SLO)$/WColumnSelect.obj \ - $(SLO)$/WExtendPages.obj \ - $(SLO)$/WNameMatch.obj \ - $(SLO)$/ToolBoxHelper.obj \ - $(SLO)$/stringlistitem.obj \ - $(SLO)$/charsets.obj \ - $(SLO)$/defaultobjectnamecheck.obj \ - $(SLO)$/dsmeta.obj \ - $(SLO)$/controllerframe.obj \ - $(SLO)$/propertystorage.obj +SLOFILES= \ + $(SLO)/asyncmodaldialog.obj \ + $(SLO)/imageprovider.obj \ + $(SLO)/singledoccontroller.obj \ + $(SLO)/datasourceconnector.obj \ + $(SLO)/linkeddocuments.obj \ + $(SLO)/indexcollection.obj \ + $(SLO)/UITools.obj \ + $(SLO)/WCPage.obj \ + $(SLO)/WCopyTable.obj \ + $(SLO)/WTypeSelect.obj \ + $(SLO)/TokenWriter.obj \ + $(SLO)/HtmlReader.obj \ + $(SLO)/RtfReader.obj \ + $(SLO)/propertysetitem.obj \ + $(SLO)/databaseobjectview.obj \ + $(SLO)/DExport.obj \ + $(SLO)/uiservices.obj \ + $(SLO)/RowSetDrop.obj \ + $(SLO)/TableCopyHelper.obj \ + $(SLO)/moduledbu.obj \ + $(SLO)/WColumnSelect.obj \ + $(SLO)/WExtendPages.obj \ + $(SLO)/WNameMatch.obj \ + $(SLO)/ToolBoxHelper.obj \ + $(SLO)/stringlistitem.obj \ + $(SLO)/charsets.obj \ + $(SLO)/defaultobjectnamecheck.obj \ + $(SLO)/dsmeta.obj \ + $(SLO)/controllerframe.obj \ + $(SLO)/propertystorage.obj \ + $(SLO)/dbaundomanager.obj \ + # --- Targets ---------------------------------- .INCLUDE : target.mk diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx index 48c83609d7af..c074aed76392 100644 --- a/dbaccess/source/ui/misc/singledoccontroller.cxx +++ b/dbaccess/source/ui/misc/singledoccontroller.cxx @@ -35,9 +35,10 @@ #include "dbustrings.hrc" #include "moduledbu.hxx" #include "singledoccontroller.hxx" -#include +#include "dbaundomanager.hxx" /** === begin UNO includes === **/ +#include #include #include #include @@ -95,6 +96,7 @@ namespace dbaui using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::frame::XUntitledNumbers; using ::com::sun::star::beans::PropertyVetoException; + using ::com::sun::star::document::XUndoManager; /** === end UNO using === **/ class DataSourceHolder @@ -148,6 +150,8 @@ namespace dbaui SharedConnection m_xConnection; ::dbtools::DatabaseMetaData m_aSdbMetaData; // + ::boost::scoped_ptr< UndoManager > + m_pUndoManager; ::rtl::OUString m_sDataSourceName; // the data source we're working for DataSourceHolder m_aDataSource; Reference< XModel > m_xDocument; @@ -158,9 +162,10 @@ namespace dbaui sal_Bool m_bModified; // is the data modified bool m_bNotAttached; - OSingleDocumentControllerImpl( ::osl::Mutex& i_rMutex ) + OSingleDocumentControllerImpl( OSingleDocumentController& i_antiImpl, ::osl::Mutex& i_rMutex ) :m_aDocScriptSupport() ,m_aModifyListeners( i_rMutex ) + ,m_pUndoManager( new UndoManager( i_antiImpl, i_rMutex ) ) ,m_nDocStartNumber(0) ,m_bSuspended( sal_False ) ,m_bEditable(sal_True) @@ -190,7 +195,7 @@ namespace dbaui //-------------------------------------------------------------------- OSingleDocumentController::OSingleDocumentController(const Reference< XMultiServiceFactory >& _rxORB) :OSingleDocumentController_Base( _rxORB ) - ,m_pImpl( new OSingleDocumentControllerImpl( getMutex() ) ) + ,m_pImpl( new OSingleDocumentControllerImpl( *this, getMutex() ) ) { } @@ -368,12 +373,13 @@ namespace dbaui void SAL_CALL OSingleDocumentController::disposing() { OSingleDocumentController_Base::disposing(); - m_aUndoManager.Clear(); + GetUndoManager().Clear(); disconnect(); attachFrame( Reference < XFrame >() ); + m_pImpl->m_pUndoManager->disposing(); m_pImpl->m_aDataSource.clear(); } @@ -483,22 +489,22 @@ namespace dbaui switch (_nId) { case ID_BROWSER_UNDO: - aReturn.bEnabled = m_pImpl->m_bEditable && m_aUndoManager.GetUndoActionCount() != 0; + aReturn.bEnabled = m_pImpl->m_bEditable && GetUndoManager().GetUndoActionCount() != 0; if ( aReturn.bEnabled ) { String sUndo(ModuleRes(STR_UNDO_COLON)); sUndo += String(RTL_CONSTASCII_USTRINGPARAM(" ")); - sUndo += m_aUndoManager.GetUndoActionComment(); + sUndo += GetUndoManager().GetUndoActionComment(); aReturn.sTitle = sUndo; } break; case ID_BROWSER_REDO: - aReturn.bEnabled = m_pImpl->m_bEditable && m_aUndoManager.GetRedoActionCount() != 0; + aReturn.bEnabled = m_pImpl->m_bEditable && GetUndoManager().GetRedoActionCount() != 0; if ( aReturn.bEnabled ) { String sRedo(ModuleRes(STR_REDO_COLON)); sRedo += String(RTL_CONSTASCII_USTRINGPARAM(" ")); - sRedo += m_aUndoManager.GetRedoActionComment(); + sRedo += GetUndoManager().GetRedoActionComment(); aReturn.sTitle = sRedo; } break; @@ -516,11 +522,11 @@ namespace dbaui closeTask(); return; case ID_BROWSER_UNDO: - m_aUndoManager.Undo(); + GetUndoManager().Undo(); InvalidateFeature(ID_BROWSER_REDO); break; case ID_BROWSER_REDO: - m_aUndoManager.Redo(); + GetUndoManager().Redo(); InvalidateFeature(ID_BROWSER_UNDO); break; default: @@ -530,15 +536,15 @@ namespace dbaui InvalidateFeature(_nId); } // ----------------------------------------------------------------------------- - SfxUndoManager& OSingleDocumentController::GetUndoManager() + SfxUndoManager& OSingleDocumentController::GetUndoManager() const { - return m_aUndoManager; + return m_pImpl->m_pUndoManager->GetSfxUndoManager(); } // ----------------------------------------------------------------------------- void OSingleDocumentController::addUndoActionAndInvalidate(SfxUndoAction *_pAction) { // add undo action - m_aUndoManager.AddUndoAction(_pAction); + GetUndoManager().AddUndoAction(_pAction); // when we add an undo action the controller was modified setModified(sal_True); // now inform me that or states changed @@ -676,6 +682,13 @@ namespace dbaui return sTitle.makeStringAndClear(); } + + // ----------------------------------------------------------------------------- + Reference< XUndoManager > SAL_CALL OSingleDocumentController::getUndoManager( ) throw (RuntimeException) + { + return m_pImpl->m_pUndoManager.get(); + } + // ----------------------------------------------------------------------------- sal_Int32 OSingleDocumentController::getCurrentStartNumber() const { -- cgit From 4c4bdf1aaa3645bd15644f983c8f4f8a6307d444 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 24 Nov 2010 13:53:52 +0100 Subject: undoapi: remove unused IEnvironment interface --- dbaccess/source/ui/misc/singledoccontroller.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx index c074aed76392..a382f245347a 100644 --- a/dbaccess/source/ui/misc/singledoccontroller.cxx +++ b/dbaccess/source/ui/misc/singledoccontroller.cxx @@ -141,7 +141,7 @@ namespace dbaui public: OModuleClient m_aModuleClient; - ::dbtools::SQLExceptionInfo m_aCurrentError; // contains the current error which can be set through IEnvironment + ::dbtools::SQLExceptionInfo m_aCurrentError; ::cppu::OInterfaceContainerHelper m_aModifyListeners; @@ -367,6 +367,7 @@ namespace dbaui { // our connection was disposed so we need a new one reconnect( sal_True ); + InvalidateAll(); } //-------------------------------------------------------------------- -- cgit From 3d92e6c85264373fbbfc850d54de79c1363b87ca Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 24 Nov 2010 18:39:49 +0100 Subject: vcl117: #i115686# remove old unused style setting --- dbaccess/source/ui/dlg/UserAdminDlg.src | 1 - dbaccess/source/ui/dlg/advancedsettings.src | 1 - dbaccess/source/ui/dlg/dbadmin.src | 2 -- dbaccess/source/ui/dlg/dbadminsetup.src | 1 - 4 files changed, 5 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.src b/dbaccess/source/ui/dlg/UserAdminDlg.src index faa7f33302d7..d3a59a511deb 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.src +++ b/dbaccess/source/ui/dlg/UserAdminDlg.src @@ -49,7 +49,6 @@ TabDialog DLG_DATABASE_USERADMIN { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; String STR_PAGETITLE_USERADMIN { diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src index f37c67148e18..7a94c0dafb4c 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.src +++ b/dbaccess/source/ui/dlg/advancedsettings.src @@ -351,7 +351,6 @@ TabDialog DLG_DATABASE_ADVANCED { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; String STR_GENERATED_VALUE diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src index 1d8744f07b53..f16edc83a761 100644 --- a/dbaccess/source/ui/dlg/dbadmin.src +++ b/dbaccess/source/ui/dlg/dbadmin.src @@ -113,7 +113,6 @@ TabDialog DLG_DATABASE_ADMINISTRATION { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; //......................................................................... @@ -147,7 +146,6 @@ ModalDialog DLG_DATABASE_TYPE_CHANGE { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; Text [ en-US ] = "Database properties" ; }; diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src index 5fc9cdc12f23..4d6812143598 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.src +++ b/dbaccess/source/ui/dlg/dbadminsetup.src @@ -56,7 +56,6 @@ ModalDialog DLG_DATABASE_WIZARD { OutputSize = TRUE ; HelpId = HID_DSADMIN_TABCONTROL; - SingleLine=TRUE; }; String STR_DBWIZARDTITLE -- cgit From f9416a7fd8c2fddab7633dfd0543887ef7b8a148 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 25 Nov 2010 11:23:27 +0100 Subject: dba34b: #i115655# new ui setting for max row scan for text db --- dbaccess/source/ui/dlg/advancedsettings.cxx | 36 +++++++++++++++++++++++++++++ dbaccess/source/ui/dlg/advancedsettings.hrc | 2 ++ dbaccess/source/ui/dlg/advancedsettings.hxx | 5 ++++ dbaccess/source/ui/dlg/advancedsettings.src | 19 +++++++++++++++ dbaccess/source/ui/dlg/dbadmin.cxx | 2 ++ dbaccess/source/ui/inc/dsitems.hxx | 3 ++- dbaccess/source/ui/inc/dsmeta.hxx | 1 + dbaccess/source/ui/misc/dsmeta.cxx | 1 + 8 files changed, 68 insertions(+), 1 deletion(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index a2e82e50757d..1516c735f009 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -97,9 +97,12 @@ namespace dbaui ,m_pPrimaryKeySupport(NULL) ,m_pBooleanComparisonModeLabel( NULL ) ,m_pBooleanComparisonMode( NULL ) + ,m_pMaxRowScanLabel( NULL ) + ,m_pMaxRowScan( NULL ) ,m_aControlDependencies() ,m_aBooleanSettings() ,m_bHasBooleanComparisonMode( _rDSMeta.getFeatureSet().has( DSID_BOOLEANCOMPARISON ) ) + ,m_bHasMaxRowScan( _rDSMeta.getFeatureSet().has( DSID_MAX_ROW_SCAN ) ) { impl_initBooleanSettings(); @@ -164,6 +167,21 @@ namespace dbaui m_pBooleanComparisonModeLabel->SetPosPixel( Point( aLabelPos.X(), aLabelPos.Y() - nMoveUp ) ); m_pBooleanComparisonMode->SetPosPixel( Point( aControlPos.X(), aControlPos.Y() - nMoveUp ) ); } + // create the controls for the max row scan + if ( m_bHasMaxRowScan ) + { + m_pMaxRowScanLabel = new FixedText( this, ModuleRes( FT_MAXROWSCAN ) ); + m_pMaxRowScan = new NumericField( this, ModuleRes( NF_MAXROWSCAN ) ); + m_pMaxRowScan->SetModifyHdl(getControlModifiedLink()); + m_pMaxRowScan->SetUseThousandSep(sal_False); + + Point aLabelPos( m_pMaxRowScanLabel->GetPosPixel() ); + Point aControlPos( m_pMaxRowScan->GetPosPixel() ); + long nMoveUp = aControlPos.Y() - aPos.Y(); + + m_pMaxRowScanLabel->SetPosPixel( Point( aLabelPos.X(), aLabelPos.Y() - nMoveUp ) ); + m_pMaxRowScan->SetPosPixel( Point( aControlPos.X(), aControlPos.Y() - nMoveUp ) ); + } FreeResource(); } @@ -190,6 +208,8 @@ namespace dbaui DELETEZ( m_pPrimaryKeySupport ); DELETEZ( m_pBooleanComparisonModeLabel ); DELETEZ( m_pBooleanComparisonMode ); + DELETEZ( m_pMaxRowScanLabel ); + DELETEZ( m_pMaxRowScan ); } // ----------------------------------------------------------------------- @@ -230,6 +250,10 @@ namespace dbaui { _rControlList.push_back( new ODisableWrapper< FixedText >( m_pBooleanComparisonModeLabel ) ); } + if ( m_bHasMaxRowScan ) + { + _rControlList.push_back( new ODisableWrapper< FixedText >( m_pMaxRowScanLabel ) ); + } } // ----------------------------------------------------------------------- @@ -248,6 +272,8 @@ namespace dbaui if ( m_bHasBooleanComparisonMode ) _rControlList.push_back( new OSaveValueWrapper< ListBox >( m_pBooleanComparisonMode ) ); + if ( m_bHasMaxRowScan ) + _rControlList.push_back(new OSaveValueWrapper(m_pMaxRowScan)); } // ----------------------------------------------------------------------- @@ -306,6 +332,12 @@ namespace dbaui m_pBooleanComparisonMode->SelectEntryPos( static_cast< USHORT >( pBooleanComparison->GetValue() ) ); } + if ( m_bHasMaxRowScan ) + { + SFX_ITEMSET_GET(_rSet, pMaxRowScan, SfxInt32Item, DSID_MAX_ROW_SCAN, sal_True); + m_pMaxRowScan->SetValue(pMaxRowScan->GetValue()); + } + OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); } @@ -334,6 +366,10 @@ namespace dbaui bChangedSomething = sal_True; } } + if ( m_bHasMaxRowScan ) + { + fillInt32(_rSet,m_pMaxRowScan,DSID_MAX_ROW_SCAN,bChangedSomething); + } return bChangedSomething; } diff --git a/dbaccess/source/ui/dlg/advancedsettings.hrc b/dbaccess/source/ui/dlg/advancedsettings.hrc index 8abc5d8810d2..193fdf5f3853 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hrc +++ b/dbaccess/source/ui/dlg/advancedsettings.hrc @@ -69,7 +69,9 @@ #define FT_AUTOINCREMENTVALUE 1 #define FT_RETRIEVE_AUTO 2 #define FT_BOOLEANCOMPARISON 3 +#define FT_MAXROWSCAN 4 #define LB_BOOLEANCOMPARISON 1 +#define NF_MAXROWSCAN 1 #endif // DBAUI_ADVANCEDSETTINGS_HRC diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx index 7e58f260f4e6..07620496b11f 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hxx +++ b/dbaccess/source/ui/dlg/advancedsettings.hxx @@ -37,6 +37,7 @@ #include #include +#include #include @@ -76,12 +77,16 @@ namespace dbaui FixedText* m_pBooleanComparisonModeLabel; ListBox* m_pBooleanComparisonMode; + FixedText* m_pMaxRowScanLabel; + NumericField* m_pMaxRowScan; + ::svt::ControlDependencyManager m_aControlDependencies; BooleanSettingDescs m_aBooleanSettings; bool m_bHasBooleanComparisonMode; + bool m_bHasMaxRowScan; public: virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src index f37c67148e18..6d144890b415 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.src +++ b/dbaccess/source/ui/dlg/advancedsettings.src @@ -249,6 +249,24 @@ WORKAROUND \ }; \ +#define AUTO_MAXROWSCAN(AUTO_Y) \ + FixedText FT_MAXROWSCAN \ + { \ + Pos = MAP_APPFONT ( START_X , AUTO_Y + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) ; \ + Size = MAP_APPFONT ( 100 , CHECKBOX_HEIGHT ); \ + Text [ en-US ] = "Rows to scan column types"; \ + }; \ + NumericField NF_MAXROWSCAN \ + { \ + Pos = MAP_APPFONT ( START_X + 100, AUTO_Y ) ; \ + Size = MAP_APPFONT ( 60 , EDIT_HEIGHT ) ; \ + TabStop = TRUE ; \ + NoThousandSep = TRUE; \ + Border = TRUE; \ + HelpId = HID_DSADMIN_MAXROWSCAN; \ + }; \ + + //------------------------------------------------------------------------- TabPage PAGE_GENERATED_VALUES @@ -334,6 +352,7 @@ TabPage PAGE_ADVANCED_SETTINGS_SPECIAL AUTO_ESCAPE_DATETIME( 14*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS ) AUTO_PRIMARY_KEY_SUPPORT( 15*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 15*CHECKBOX_HEIGHT + RELATED_CONTROLS ) AUTO_BOOLEANCOMPARISON( 16*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) + AUTO_MAXROWSCAN( 17*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 ) }; //------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 1d5bb1cb167c..1c1b945854ed 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -410,6 +410,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp *pCounter++ = new SfxBoolItem(DSID_ESCAPE_DATETIME, sal_True); *pCounter++ = new SfxStringItem(DSID_NAMED_PIPE, String()); *pCounter++ = new OptionalBoolItem( DSID_PRIMARY_KEY_SUPPORT ); + *pCounter++ = new SfxInt32Item(DSID_MAX_ROW_SCAN, 100); // create the pool static SfxItemInfo __READONLY_DATA aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] = @@ -472,6 +473,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp {0,0}, {0,0}, {0,0}, + {0,0}, {0,0} }; diff --git a/dbaccess/source/ui/inc/dsitems.hxx b/dbaccess/source/ui/inc/dsitems.hxx index cb08be7812d5..6b87bee2a61a 100644 --- a/dbaccess/source/ui/inc/dsitems.hxx +++ b/dbaccess/source/ui/inc/dsitems.hxx @@ -92,6 +92,7 @@ typedef sal_Int32 ItemID; #define DSID_ESCAPE_DATETIME 57 #define DSID_NAMED_PIPE 58 #define DSID_PRIMARY_KEY_SUPPORT 59 +#define DSID_MAX_ROW_SCAN 60 // don't forget to adjust DSID_LAST_ITEM_ID below! @@ -99,7 +100,7 @@ typedef sal_Int32 ItemID; //= item range. Adjust this if you introduce new items above #define DSID_FIRST_ITEM_ID DSID_NAME -#define DSID_LAST_ITEM_ID DSID_PRIMARY_KEY_SUPPORT +#define DSID_LAST_ITEM_ID DSID_MAX_ROW_SCAN #endif // _DBAUI_DATASOURCEITEMS_HXX_ diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx index 551ba4fe40b7..87a93244cd3f 100644 --- a/dbaccess/source/ui/inc/dsmeta.hxx +++ b/dbaccess/source/ui/inc/dsmeta.hxx @@ -132,6 +132,7 @@ namespace dbaui || has( DSID_IGNORECURRENCY ) || has( DSID_ESCAPE_DATETIME ) || has( DSID_PRIMARY_KEY_SUPPORT ) + || has( DSID_MAX_ROW_SCAN ) ; } diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx index 08b5ea49f2bd..052d013f47a4 100644 --- a/dbaccess/source/ui/misc/dsmeta.cxx +++ b/dbaccess/source/ui/misc/dsmeta.cxx @@ -93,6 +93,7 @@ namespace dbaui { DSID_IGNORECURRENCY, "IgnoreCurrency" }, { DSID_ESCAPE_DATETIME, "EscapeDateTime" }, { DSID_PRIMARY_KEY_SUPPORT, "PrimaryKeySupport" }, + { DSID_MAX_ROW_SCAN, "MaxRowScan" }, { 0, NULL } }; return s_aMappings; -- cgit From a18632bfc7e59ea30dd07ac00e0f5fc36d1119c9 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Thu, 25 Nov 2010 14:11:53 +0100 Subject: dba34b: #i115384# check if the length of BIT > 1 otherwise use setBoolean, and change typeinfo for ado types --- dbaccess/source/ui/uno/copytablewizard.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index be1cf5288b21..d3620aea4901 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -1178,8 +1178,15 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou aSourceColTypes.reserve( nCount + 1 ); aSourceColTypes.push_back( -1 ); // just to avoid a everytime i-1 call + ::std::vector< sal_Int32 > aSourcePrec; + aSourcePrec.reserve( nCount + 1 ); + aSourcePrec.push_back( -1 ); // just to avoid a everytime i-1 call + for ( sal_Int32 k=1; k <= nCount; ++k ) + { aSourceColTypes.push_back( xMeta->getColumnType( k ) ); + aSourcePrec.push_back( xMeta->getPrecision( k ) ); + } // now create, fill and execute the prepared statement Reference< XPreparedStatement > xStatement( ODatabaseExport::createPreparedStatment( xDestMetaData, _rxDestTable, aColumnMapping ), UNO_SET_THROW ); @@ -1291,7 +1298,6 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou case DataType::LONGVARBINARY: case DataType::BINARY: case DataType::VARBINARY: - case DataType::BIT: aTransfer.transferComplexValue( &XRow::getBytes, &XParameters::setBytes ); break; @@ -1307,6 +1313,13 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou aTransfer.transferComplexValue( &XRow::getTimestamp, &XParameters::setTimestamp ); break; + case DataType::BIT: + if ( aSourcePrec[nSourceColumn] > 1 ) + { + aTransfer.transferComplexValue( &XRow::getBytes, &XParameters::setBytes ); + break; + } + // run through case DataType::BOOLEAN: aTransfer.transferValue( &XRow::getBoolean, &XParameters::setBoolean ); break; -- cgit From 5cf47c0008eb4126cfc41c59fbeeb4d73c8e22b1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 25 Nov 2010 14:28:03 +0100 Subject: undoapi: split OSingleDocumentController into DBSubComponentController (which the report design's controller will be derived from) and the still-so-named OSingleDocumentController. Module reportdesign does not compile with this change, this is yet to come. --- dbaccess/source/ui/app/AppController.cxx | 4 - dbaccess/source/ui/browser/dataview.cxx | 39 +- dbaccess/source/ui/inc/JoinController.hxx | 12 - dbaccess/source/ui/inc/TableController.hxx | 20 - dbaccess/source/ui/inc/singledoccontroller.hxx | 93 +++ .../source/ui/misc/dbsubcomponentcontroller.cxx | 672 ++++++++++++++++++++ dbaccess/source/ui/misc/makefile.mk | 1 + dbaccess/source/ui/misc/singledoccontroller.cxx | 703 ++------------------- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 4 +- dbaccess/source/ui/querydesign/QueryViewSwitch.cxx | 2 +- dbaccess/source/ui/querydesign/querycontroller.cxx | 4 +- .../ui/relationdesign/RelationController.cxx | 2 +- .../source/ui/relationdesign/RelationTableView.cxx | 29 +- dbaccess/source/ui/tabledesign/TableController.cxx | 6 +- 14 files changed, 854 insertions(+), 737 deletions(-) create mode 100755 dbaccess/source/ui/inc/singledoccontroller.hxx create mode 100644 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx mode change 100644 => 100755 dbaccess/source/ui/misc/singledoccontroller.cxx (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 595d9b412851..f624853c8852 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -482,10 +482,6 @@ sal_Bool OApplicationController::Construct(Window* _pParent) return sal_False; } - DBG_ASSERT( getView(), "OApplicationController::Construct: have no view!" ); - if ( getView() ) - getView()->enableSeparator( ); - // now that we have a view we can create the clipboard listener m_aSystemClipboard = TransferableDataHelper::CreateFromSystemClipboard( getView() ); m_aSystemClipboard.StartClipboardListening( ); diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index 382aac477727..8112250ad23e 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -44,9 +44,6 @@ #ifndef _SFXIMGMGR_HXX #include #endif -#ifndef _SV_FIXED_HXX -#include -#endif #ifndef DBAUI_ICONTROLLER_HXX #include "IController.hxx" #endif @@ -103,11 +100,12 @@ namespace dbaui :Window(pParent,nStyle) ,m_xServiceFactory(_rFactory) ,m_rController( _rController ) - ,m_pSeparator( NULL ) + ,m_aSeparator( this ) { DBG_CTOR(ODataView,NULL); m_rController.acquire(); m_pAccel.reset(::svt::AcceleratorExecute::createAcceleratorHelper()); + m_aSeparator.Show(); } // ------------------------------------------------------------------------- @@ -120,29 +118,9 @@ namespace dbaui { DBG_DTOR(ODataView,NULL); - enableSeparator( sal_False ); m_rController.release(); } - // ------------------------------------------------------------------------- - void ODataView::enableSeparator( const sal_Bool _bEnable ) - { - if ( _bEnable == isSeparatorEnabled() ) - // nothing to do - return; - - if ( _bEnable ) - { - m_pSeparator = new FixedLine( this ); - m_pSeparator->Show( ); - } - else - { - ::std::auto_ptr aTemp(m_pSeparator); - m_pSeparator = NULL; - } - Resize(); - } // ------------------------------------------------------------------------- void ODataView::resizeDocumentView( Rectangle& /*_rPlayground*/ ) { @@ -167,15 +145,10 @@ namespace dbaui { Rectangle aPlayground( _rPlayground ); - // position thew separator - if ( m_pSeparator ) - { - Size aSeparatorSize = Size( aPlayground.GetWidth(), 2 ); - - m_pSeparator->SetPosSizePixel( aPlayground.TopLeft(), aSeparatorSize ); - - aPlayground.Top() += aSeparatorSize.Height() + 1; - } + // position the separator + const Size aSeparatorSize = Size( aPlayground.GetWidth(), 2 ); + m_aSeparator.SetPosSizePixel( aPlayground.TopLeft(), aSeparatorSize ); + aPlayground.Top() += aSeparatorSize.Height() + 1; // position the controls of the document's view resizeDocumentView( aPlayground ); diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx index 41ee2458fa2f..8ff5fe99b727 100644 --- a/dbaccess/source/ui/inc/JoinController.hxx +++ b/dbaccess/source/ui/inc/JoinController.hxx @@ -27,26 +27,14 @@ #ifndef DBAUI_JOINCONTROLLER_HXX #define DBAUI_JOINCONTROLLER_HXX -#ifndef DBAUI_SINGLEDOCCONTROLLER_HXX #include "singledoccontroller.hxx" -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef DBAUI_JOINTABLEVIEW_HXX #include "JoinTableView.hxx" -#endif -#ifndef DBAUI_JOINDESIGNVIEW_HXX #include "JoinDesignView.hxx" -#endif #include "TableConnectionData.hxx" #include "TableWindowData.hxx" -#ifndef _MEMORY_ #include -#endif #include namespace comphelper diff --git a/dbaccess/source/ui/inc/TableController.hxx b/dbaccess/source/ui/inc/TableController.hxx index b64fba13bbea..a1f1b8158c65 100644 --- a/dbaccess/source/ui/inc/TableController.hxx +++ b/dbaccess/source/ui/inc/TableController.hxx @@ -27,36 +27,16 @@ #ifndef DBUI_TABLECONTROLLER_HXX #define DBUI_TABLECONTROLLER_HXX -#ifndef DBAUI_SINGLEDOCCONTROLLER_HXX #include "singledoccontroller.hxx" -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ #include -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include -#endif -#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_ #include -#endif -#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_ #include -#endif -#ifndef DBAUI_TYPEINFO_HXX #include "TypeInfo.hxx" -#endif -#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_ #include -#endif -#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_ #include -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include -#endif class FixedText; namespace dbaui diff --git a/dbaccess/source/ui/inc/singledoccontroller.hxx b/dbaccess/source/ui/inc/singledoccontroller.hxx new file mode 100755 index 000000000000..c738bd94e81c --- /dev/null +++ b/dbaccess/source/ui/inc/singledoccontroller.hxx @@ -0,0 +1,93 @@ +/************************************************************************* + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef DBAUI_SINGLEDOCCONTROLLER_HXX +#define DBAUI_SINGLEDOCCONTROLLER_HXX + +#include "dbsubcomponentcontroller.hxx" + +/** === begin UNO includes === **/ +#include +/** === end UNO includes === **/ + +#include + +class SfxUndoAction; +class SfxUndoManager; + +//...................................................................................................................... +namespace dbaui +{ +//...................................................................................................................... + + //================================================================================================================== + //= OSingleDocumentController + //================================================================================================================== + struct OSingleDocumentController_Data; + typedef ::cppu::ImplInheritanceHelper1 < DBSubComponentController + , ::com::sun::star::document::XUndoManagerSupplier + > OSingleDocumentController_Base; + class OSingleDocumentController : public OSingleDocumentController_Base + { + protected: + OSingleDocumentController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxORB ); + virtual ~OSingleDocumentController(); + + // OComponentHelper + virtual void SAL_CALL disposing(); + + public: + /// need for undo's and redo's + SfxUndoManager& GetUndoManager() const; + + /// complete clears the Undo/Redo stacks + void ClearUndoManager(); + + /** addUndoActionAndInvalidate adds an undo action to the undoManager, + additionally invalidates the UNDO and REDO slot + @param pAction the undo action to add + */ + void addUndoActionAndInvalidate( SfxUndoAction* pAction ); + + // OGenericUnoController + virtual FeatureState GetState( sal_uInt16 nId ) const; + virtual void Execute( sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs ); + + // XUndoManagerSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager > SAL_CALL getUndoManager( ) throw (::com::sun::star::uno::RuntimeException); + + // XEventListener + virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException ); + + private: + ::std::auto_ptr< OSingleDocumentController_Data > m_pData; + }; + +//...................................................................................................................... +} // namespace dbaui +//...................................................................................................................... + +#endif // DBAUI_SINGLEDOCCONTROLLER_HXX diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx new file mode 100644 index 000000000000..eb1b34710ff8 --- /dev/null +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -0,0 +1,672 @@ +/************************************************************************* + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_dbaccess.hxx" + +#include "browserids.hxx" +#include "commontypes.hxx" +#include "dataview.hxx" +#include "dbu_misc.hrc" +#include "dbustrings.hrc" +#include "moduledbu.hxx" +#include "dbsubcomponentcontroller.hxx" + +/** === begin UNO includes === **/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +/** === end UNO includes === **/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//........................................................................ +namespace dbaui +{ +//........................................................................ + + /** === begin UNO using === **/ + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::Reference; + using ::com::sun::star::beans::XPropertySet; + using ::com::sun::star::util::XNumberFormatter; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::sdbc::XConnection; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::container::XChild; + using ::com::sun::star::sdbc::XDataSource; + using ::com::sun::star::util::XNumberFormatter; + using ::com::sun::star::util::XNumberFormatsSupplier; + using ::com::sun::star::frame::XFrame; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::sdbc::SQLException; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::beans::PropertyValue; + using ::com::sun::star::frame::XModel; + using ::com::sun::star::sdb::XOfficeDatabaseDocument; + using ::com::sun::star::awt::XWindow; + using ::com::sun::star::sdbc::XDatabaseMetaData; + using ::com::sun::star::sdb::XDocumentDataSource; + using ::com::sun::star::document::XEmbeddedScripts; + using ::com::sun::star::lang::IllegalArgumentException; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::frame::XUntitledNumbers; + using ::com::sun::star::beans::PropertyVetoException; + /** === end UNO using === **/ + + class DataSourceHolder + { + public: + DataSourceHolder() + { + } + + DataSourceHolder( const Reference< XDataSource >& _rxDataSource ) + { + m_xDataSource = _rxDataSource; + Reference< XDocumentDataSource > xDocDS( m_xDataSource, UNO_QUERY ); + if ( xDocDS.is() ) + m_xDocument = xDocDS->getDatabaseDocument(); + + m_xDataSourceProps.set( m_xDataSource, UNO_QUERY ); + } + + const Reference< XDataSource >& getDataSource() const { return m_xDataSource; } + const Reference< XPropertySet >& getDataSourceProps() const { return m_xDataSourceProps; } + const Reference< XOfficeDatabaseDocument > getDatabaseDocument() const { return m_xDocument; } + + bool is() const { return m_xDataSource.is(); } + + void clear() + { + m_xDataSource.clear(); + m_xDocument.clear(); + } + + private: + Reference< XDataSource > m_xDataSource; + Reference< XPropertySet > m_xDataSourceProps; + Reference< XOfficeDatabaseDocument > m_xDocument; + }; + + struct DBSubComponentController_Impl + { + private: + ::boost::optional< bool > m_aDocScriptSupport; + + public: + OModuleClient m_aModuleClient; + ::dbtools::SQLExceptionInfo m_aCurrentError; + + ::cppu::OInterfaceContainerHelper + m_aModifyListeners; + + // + SharedConnection m_xConnection; + ::dbtools::DatabaseMetaData m_aSdbMetaData; + // + ::rtl::OUString m_sDataSourceName; // the data source we're working for + DataSourceHolder m_aDataSource; + Reference< XModel > m_xDocument; + Reference< XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier + sal_Int32 m_nDocStartNumber; + sal_Bool m_bSuspended; // is true when the controller was already suspended + sal_Bool m_bEditable; // is the control readonly or not + sal_Bool m_bModified; // is the data modified + bool m_bNotAttached; + + DBSubComponentController_Impl( ::osl::Mutex& i_rMutex ) + :m_aDocScriptSupport() + ,m_aModifyListeners( i_rMutex ) + ,m_nDocStartNumber(0) + ,m_bSuspended( sal_False ) + ,m_bEditable(sal_True) + ,m_bModified(sal_False) + ,m_bNotAttached(true) + { + } + + bool documentHasScriptSupport() const + { + OSL_PRECOND( !!m_aDocScriptSupport, + "DBSubComponentController_Impl::documentHasScriptSupport: not completely initialized, yet - don't know!?" ); + return !!m_aDocScriptSupport && *m_aDocScriptSupport; + } + + void setDocumentScriptSupport( const bool _bSupport ) + { + OSL_PRECOND( !m_aDocScriptSupport, + "DBSubComponentController_Impl::setDocumentScriptSupport: already initialized!" ); + m_aDocScriptSupport = ::boost::optional< bool >( _bSupport ); + } + }; + + //==================================================================== + //= DBSubComponentController + //==================================================================== + //-------------------------------------------------------------------- + DBSubComponentController::DBSubComponentController(const Reference< XMultiServiceFactory >& _rxORB) + :DBSubComponentController_Base( _rxORB ) + ,m_pImpl( new DBSubComponentController_Impl( getMutex() ) ) + { + } + + //-------------------------------------------------------------------- + DBSubComponentController::~DBSubComponentController() + { + } + + //-------------------------------------------------------------------- + void DBSubComponentController::impl_initialize() + { + OGenericUnoController::impl_initialize(); + + const ::comphelper::NamedValueCollection& rArguments( getInitParams() ); + + Reference< XConnection > xConnection; + xConnection = rArguments.getOrDefault( (::rtl::OUString)PROPERTY_ACTIVE_CONNECTION, xConnection ); + + if ( !xConnection.is() ) + ::dbtools::isEmbeddedInDatabase( getModel(), xConnection ); + + if ( xConnection.is() ) + initializeConnection( xConnection ); + + bool bShowError = true; + if ( !isConnected() ) + { + reconnect( sal_False ); + bShowError = false; + } + if ( !isConnected() ) + { + if ( bShowError ) + connectionLostMessage(); + throw IllegalArgumentException(); + } + } + + //-------------------------------------------------------------------- + Any SAL_CALL DBSubComponentController::queryInterface(const Type& _rType) throw (RuntimeException) + { + if ( _rType.equals( XScriptInvocationContext::static_type() ) ) + { + if ( m_pImpl->documentHasScriptSupport() ) + return makeAny( Reference< XScriptInvocationContext >( this ) ); + return Any(); + } + + return DBSubComponentController_Base::queryInterface( _rType ); + } + + //-------------------------------------------------------------------- + Sequence< Type > SAL_CALL DBSubComponentController::getTypes( ) throw (RuntimeException) + { + Sequence< Type > aTypes( DBSubComponentController_Base::getTypes() ); + if ( !m_pImpl->documentHasScriptSupport() ) + { + Sequence< Type > aStrippedTypes( aTypes.getLength() - 1 ); + ::std::remove_copy_if( + aTypes.getConstArray(), + aTypes.getConstArray() + aTypes.getLength(), + aStrippedTypes.getArray(), + ::std::bind2nd( ::std::equal_to< Type >(), XScriptInvocationContext::static_type() ) + ); + aTypes = aStrippedTypes; + } + return aTypes; + } + + //-------------------------------------------------------------------- + void DBSubComponentController::initializeConnection( const Reference< XConnection >& _rxForeignConn ) + { + DBG_ASSERT( !isConnected(), "DBSubComponentController::initializeConnection: not to be called when already connected!" ); + // usually this gets called from within initialize of derived classes ... + if ( isConnected() ) + disconnect(); + + m_pImpl->m_xConnection.reset( _rxForeignConn, SharedConnection::NoTakeOwnership ); + m_pImpl->m_aSdbMetaData.reset( m_pImpl->m_xConnection ); + startConnectionListening( m_pImpl->m_xConnection ); + + // get the data source the connection belongs to + try + { + // determine our data source + OSL_PRECOND( !m_pImpl->m_aDataSource.is(), "DBSubComponentController::initializeConnection: already a data source in this phase?" ); + { + Reference< XChild > xConnAsChild( m_pImpl->m_xConnection, UNO_QUERY ); + Reference< XDataSource > xDS; + if ( xConnAsChild.is() ) + xDS = Reference< XDataSource >( xConnAsChild->getParent(), UNO_QUERY ); + + // (take the indirection through XDataSource to ensure we have a correct object ....) + m_pImpl->m_aDataSource = xDS; + } + OSL_POSTCOND( m_pImpl->m_aDataSource.is(), "DBSubComponentController::initializeConnection: unable to obtain the data source object!" ); + + if ( m_pImpl->m_bNotAttached ) + { + Reference< XUntitledNumbers > xUntitledProvider( getDatabaseDocument(), UNO_QUERY ); + m_pImpl->m_nDocStartNumber = 1; + if ( xUntitledProvider.is() ) + m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber( static_cast< XWeak* >( this ) ); + } + + // determine the availability of script support in our document. Our own XScriptInvocationContext + // interface depends on this + m_pImpl->setDocumentScriptSupport( Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY ).is() ); + + // get a number formatter + Reference< XPropertySet > xDataSourceProps( m_pImpl->m_aDataSource.getDataSourceProps(), UNO_SET_THROW ); + xDataSourceProps->getPropertyValue( PROPERTY_NAME ) >>= m_pImpl->m_sDataSourceName; + DBG_ASSERT( m_pImpl->m_sDataSourceName.getLength(), "DBSubComponentController::initializeConnection: invalid data source name!" ); + Reference< XNumberFormatsSupplier> xSupplier = ::dbtools::getNumberFormats(m_pImpl->m_xConnection); + if(xSupplier.is()) + { + m_pImpl->m_xFormatter = Reference< XNumberFormatter >(getORB() + ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY); + m_pImpl->m_xFormatter->attachNumberFormatsSupplier(xSupplier); + } + OSL_ENSURE(m_pImpl->m_xFormatter.is(),"No NumberFormatter!"); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + + //-------------------------------------------------------------------- + void DBSubComponentController::reconnect( sal_Bool _bUI ) + { + OSL_ENSURE(!m_pImpl->m_bSuspended, "Cannot reconnect while suspended!"); + + stopConnectionListening( m_pImpl->m_xConnection ); + m_pImpl->m_aSdbMetaData.reset( NULL ); + m_pImpl->m_xConnection.clear(); + + // reconnect + sal_Bool bReConnect = sal_True; + if ( _bUI ) + { + QueryBox aQuery( getView(), ModuleRes(QUERY_CONNECTION_LOST) ); + bReConnect = ( RET_YES == aQuery.Execute() ); + } + + // now really reconnect ... + if ( bReConnect ) + { + m_pImpl->m_xConnection.reset( connect( m_pImpl->m_aDataSource.getDataSource(), NULL ), SharedConnection::TakeOwnership ); + m_pImpl->m_aSdbMetaData.reset( m_pImpl->m_xConnection ); + } + + // invalidate all slots + InvalidateAll(); + } + + //-------------------------------------------------------------------- + void DBSubComponentController::disconnect() + { + stopConnectionListening(m_pImpl->m_xConnection); + m_pImpl->m_aSdbMetaData.reset( NULL ); + m_pImpl->m_xConnection.clear(); + + InvalidateAll(); + } + + //-------------------------------------------------------------------- + void DBSubComponentController::losingConnection() + { + // our connection was disposed so we need a new one + reconnect( sal_True ); + InvalidateAll(); + } + + //-------------------------------------------------------------------- + void SAL_CALL DBSubComponentController::disposing() + { + DBSubComponentController_Base::disposing(); + + disconnect(); + + attachFrame( Reference < XFrame >() ); + + m_pImpl->m_aDataSource.clear(); + } + + //-------------------------------------------------------------------- + void SAL_CALL DBSubComponentController::disposing(const EventObject& _rSource) throw( RuntimeException ) + { + if ( _rSource.Source == getConnection() ) + { + if ( !m_pImpl->m_bSuspended // when already suspended then we don't have to reconnect + && !getBroadcastHelper().bInDispose + && !getBroadcastHelper().bDisposed + && isConnected() + ) + { + losingConnection(); + } + else + { + m_pImpl->m_xConnection.reset( m_pImpl->m_xConnection, SharedConnection::NoTakeOwnership ); + // this prevents the "disposeComponent" call in disconnect + disconnect(); + } + } + else + DBSubComponentController_Base::disposing( _rSource ); + } + + //-------------------------------------------------------------------- + void DBSubComponentController::appendError( const ::rtl::OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState, + const sal_Int32 _nErrorCode ) + { + m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::SQL_EXCEPTION, _rErrorMessage, getStandardSQLStateAscii( _eSQLState ), + _nErrorCode ); + } + //-------------------------------------------------------------------- + void DBSubComponentController::clearError() + { + m_pImpl->m_aCurrentError = ::dbtools::SQLExceptionInfo(); + } + + //-------------------------------------------------------------------- + sal_Bool DBSubComponentController::hasError() const + { + return m_pImpl->m_aCurrentError.isValid(); + } + + //-------------------------------------------------------------------- + const ::dbtools::SQLExceptionInfo& DBSubComponentController::getError() const + { + return m_pImpl->m_aCurrentError; + } + + //-------------------------------------------------------------------- + void DBSubComponentController::displayError() + { + showError( m_pImpl->m_aCurrentError ); + } + + //-------------------------------------------------------------------- + sal_Bool SAL_CALL DBSubComponentController::suspend(sal_Bool bSuspend) throw( RuntimeException ) + { + m_pImpl->m_bSuspended = bSuspend; + if ( !bSuspend && !isConnected() ) + reconnect(sal_True); + + + return sal_True; + } + + // ----------------------------------------------------------------------------- + sal_Bool SAL_CALL DBSubComponentController::attachModel( const Reference< XModel > & _rxModel) throw( RuntimeException ) + { + if ( !_rxModel.is() ) + return sal_False; + if ( !DBSubComponentController_Base::attachModel( _rxModel ) ) + return sal_False; + + m_pImpl->m_bNotAttached = false; + if ( m_pImpl->m_nDocStartNumber == 1 ) + releaseNumberForComponent(); + + Reference< XUntitledNumbers > xUntitledProvider( _rxModel, UNO_QUERY ); + m_pImpl->m_nDocStartNumber = 1; + if ( xUntitledProvider.is() ) + m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber( static_cast< XWeak* >( this ) ); + + return sal_True; + } + + // ----------------------------------------------------------------------------- + void DBSubComponentController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs) + { + if ( _nId == ID_BROWSER_CLOSE ) + { + closeTask(); + return; + } + + DBSubComponentController_Base::Execute( _nId, _rArgs ); + InvalidateFeature( _nId ); + } + + // ----------------------------------------------------------------------------- + ::rtl::OUString DBSubComponentController::getDataSourceName() const + { + ::rtl::OUString sName; + Reference< XPropertySet > xDataSourceProps( m_pImpl->m_aDataSource.getDataSourceProps() ); + if ( xDataSourceProps.is() ) + xDataSourceProps->getPropertyValue(PROPERTY_NAME) >>= sName; + return sName; + } + // ----------------------------------------------------------------------------- + void DBSubComponentController::connectionLostMessage() const + { + String aMessage(ModuleRes(RID_STR_CONNECTION_LOST)); + Reference< XWindow > xWindow = getTopMostContainerWindow(); + Window* pWin = NULL; + if ( xWindow.is() ) + pWin = VCLUnoHelper::GetWindow(xWindow); + if ( !pWin ) + pWin = getView()->Window::GetParent(); + + InfoBox(pWin, aMessage).Execute(); + } + // ----------------------------------------------------------------------------- + const Reference< XConnection >& DBSubComponentController::getConnection() const + { + return m_pImpl->m_xConnection; + } + + // ----------------------------------------------------------------------------- + sal_Bool DBSubComponentController::isReadOnly() const + { + return !m_pImpl->m_bEditable; + } + + // ----------------------------------------------------------------------------- + sal_Bool DBSubComponentController::isEditable() const + { + return m_pImpl->m_bEditable; + } + + // ----------------------------------------------------------------------------- + void DBSubComponentController::setEditable(sal_Bool _bEditable) + { + m_pImpl->m_bEditable = _bEditable; + } + + // ----------------------------------------------------------------------------- + const ::dbtools::DatabaseMetaData& DBSubComponentController::getSdbMetaData() const + { + return m_pImpl->m_aSdbMetaData; + } + + // ----------------------------------------------------------------------------- + sal_Bool DBSubComponentController::isConnected() const + { + return m_pImpl->m_xConnection.is(); + } + + // ----------------------------------------------------------------------------- + Reference< XDatabaseMetaData > DBSubComponentController::getMetaData( ) const + { + Reference< XDatabaseMetaData > xMeta; + try + { + if ( isConnected() ) + xMeta.set( m_pImpl->m_xConnection->getMetaData(), UNO_SET_THROW ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return xMeta; + } + + // ----------------------------------------------------------------------------- + const Reference< XPropertySet >& DBSubComponentController::getDataSource() const + { + return m_pImpl->m_aDataSource.getDataSourceProps(); + } + + // ----------------------------------------------------------------------------- + sal_Bool DBSubComponentController::haveDataSource() const + { + return m_pImpl->m_aDataSource.is(); + } + + // ----------------------------------------------------------------------------- + Reference< XModel > DBSubComponentController::getDatabaseDocument() const + { + return Reference< XModel >( m_pImpl->m_aDataSource.getDatabaseDocument(), UNO_QUERY ); + } + + // ----------------------------------------------------------------------------- + Reference< XNumberFormatter > DBSubComponentController::getNumberFormatter() const + { + return m_pImpl->m_xFormatter; + } + + // ----------------------------------------------------------------------------- + Reference< XModel > DBSubComponentController::getPrivateModel() const + { + return getDatabaseDocument(); + } + // ----------------------------------------------------------------------------- + // XTitle + ::rtl::OUString SAL_CALL DBSubComponentController::getTitle() + throw (RuntimeException) + { + ::osl::MutexGuard aGuard( getMutex() ); + if ( m_bExternalTitle ) + return impl_getTitleHelper_throw()->getTitle (); + + ::rtl::OUStringBuffer sTitle; + Reference< XTitle > xTitle(getPrivateModel(),UNO_QUERY); + if ( xTitle.is() ) + { + sTitle.append( xTitle->getTitle() ); + sTitle.appendAscii(" : "); + } + sTitle.append( getPrivateTitle() ); + return sTitle.makeStringAndClear(); + } + + // ----------------------------------------------------------------------------- + sal_Int32 DBSubComponentController::getCurrentStartNumber() const + { + return m_pImpl->m_nDocStartNumber; + } + + // ----------------------------------------------------------------------------- + Reference< XEmbeddedScripts > SAL_CALL DBSubComponentController::getScriptContainer() throw (RuntimeException) + { + ::osl::MutexGuard aGuard( getMutex() ); + if ( !m_pImpl->documentHasScriptSupport() ) + return NULL; + + return Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY_THROW ); + } + + // ----------------------------------------------------------------------------- + void SAL_CALL DBSubComponentController::addModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException) + { + ::osl::MutexGuard aGuard( getMutex() ); + m_pImpl->m_aModifyListeners.addInterface( i_Listener ); + } + + // ----------------------------------------------------------------------------- + void SAL_CALL DBSubComponentController::removeModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException) + { + ::osl::MutexGuard aGuard( getMutex() ); + m_pImpl->m_aModifyListeners.removeInterface( i_Listener ); + } + + // ----------------------------------------------------------------------------- + ::sal_Bool SAL_CALL DBSubComponentController::isModified( ) throw (RuntimeException) + { + ::osl::MutexGuard aGuard( getMutex() ); + return impl_isModified(); + } + + // ----------------------------------------------------------------------------- + void SAL_CALL DBSubComponentController::setModified( ::sal_Bool i_bModified ) throw (PropertyVetoException, RuntimeException) + { + ::osl::ClearableMutexGuard aGuard( getMutex() ); + + if ( m_pImpl->m_bModified == i_bModified ) + return; + + m_pImpl->m_bModified = i_bModified; + impl_onModifyChanged(); + + EventObject aEvent( *this ); + aGuard.clear(); + m_pImpl->m_aModifyListeners.notifyEach( &XModifyListener::modified, aEvent ); + } + + // ----------------------------------------------------------------------------- + sal_Bool DBSubComponentController::impl_isModified() const + { + return m_pImpl->m_bModified; + } + + // ----------------------------------------------------------------------------- + void DBSubComponentController::impl_onModifyChanged() + { + InvalidateFeature( ID_BROWSER_SAVEDOC ); + if ( isFeatureSupported( ID_BROWSER_SAVEASDOC ) ) + InvalidateFeature( ID_BROWSER_SAVEASDOC ); + } + +//........................................................................ +} // namespace dbaui +//........................................................................ + diff --git a/dbaccess/source/ui/misc/makefile.mk b/dbaccess/source/ui/misc/makefile.mk index 62276292224e..534d90e3995c 100644 --- a/dbaccess/source/ui/misc/makefile.mk +++ b/dbaccess/source/ui/misc/makefile.mk @@ -52,6 +52,7 @@ SLOFILES= \ $(SLO)/asyncmodaldialog.obj \ $(SLO)/imageprovider.obj \ $(SLO)/singledoccontroller.obj \ + $(SLO)/dbsubcomponentcontroller.obj \ $(SLO)/datasourceconnector.obj \ $(SLO)/linkeddocuments.obj \ $(SLO)/indexcollection.obj \ diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx old mode 100644 new mode 100755 index a382f245347a..2e8c002a2097 --- a/dbaccess/source/ui/misc/singledoccontroller.cxx +++ b/dbaccess/source/ui/misc/singledoccontroller.cxx @@ -1,5 +1,4 @@ /************************************************************************* - * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. @@ -25,472 +24,128 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbaccess.hxx" +#include "dbaundomanager.hxx" +#include "singledoccontroller.hxx" #include "browserids.hxx" -#include "commontypes.hxx" -#include "dataview.hxx" #include "dbu_misc.hrc" #include "dbustrings.hrc" #include "moduledbu.hxx" -#include "singledoccontroller.hxx" -#include "dbaundomanager.hxx" /** === begin UNO includes === **/ -#include -#include -#include -#include -#include -#include -#include -#include -#include /** === end UNO includes === **/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include -//........................................................................ +#include + +//...................................................................................................................... namespace dbaui { -//........................................................................ +//...................................................................................................................... /** === begin UNO using === **/ - using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; - using ::com::sun::star::beans::XPropertySet; - using ::com::sun::star::util::XNumberFormatter; - using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Type; - using ::com::sun::star::sdbc::XConnection; - using ::com::sun::star::uno::UNO_QUERY; - using ::com::sun::star::container::XChild; - using ::com::sun::star::sdbc::XDataSource; - using ::com::sun::star::util::XNumberFormatter; - using ::com::sun::star::util::XNumberFormatsSupplier; - using ::com::sun::star::frame::XFrame; - using ::com::sun::star::uno::Exception; - using ::com::sun::star::sdbc::SQLException; - using ::com::sun::star::lang::EventObject; - using ::com::sun::star::beans::PropertyValue; - using ::com::sun::star::frame::XModel; - using ::com::sun::star::sdb::XOfficeDatabaseDocument; - using ::com::sun::star::awt::XWindow; - using ::com::sun::star::sdbc::XDatabaseMetaData; - using ::com::sun::star::sdb::XDocumentDataSource; - using ::com::sun::star::document::XEmbeddedScripts; - using ::com::sun::star::lang::IllegalArgumentException; - using ::com::sun::star::uno::UNO_SET_THROW; - using ::com::sun::star::uno::UNO_QUERY_THROW; - using ::com::sun::star::frame::XUntitledNumbers; - using ::com::sun::star::beans::PropertyVetoException; using ::com::sun::star::document::XUndoManager; + using ::com::sun::star::lang::XMultiServiceFactory; + using ::com::sun::star::beans::PropertyValue; + using ::com::sun::star::lang::EventObject; /** === end UNO using === **/ - class DataSourceHolder + //================================================================================================================== + //= OSingleDocumentController_Data + //================================================================================================================== + struct OSingleDocumentController_Data { - public: - DataSourceHolder() - { - } - - DataSourceHolder( const Reference< XDataSource >& _rxDataSource ) - { - m_xDataSource = _rxDataSource; - Reference< XDocumentDataSource > xDocDS( m_xDataSource, UNO_QUERY ); - if ( xDocDS.is() ) - m_xDocument = xDocDS->getDatabaseDocument(); - - m_xDataSourceProps.set( m_xDataSource, UNO_QUERY ); - } - - const Reference< XDataSource >& getDataSource() const { return m_xDataSource; } - const Reference< XPropertySet >& getDataSourceProps() const { return m_xDataSourceProps; } - const Reference< XOfficeDatabaseDocument > getDatabaseDocument() const { return m_xDocument; } + ::boost::scoped_ptr< UndoManager > m_pUndoManager; - bool is() const { return m_xDataSource.is(); } - - void clear() + OSingleDocumentController_Data( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex ) + :m_pUndoManager( new UndoManager( i_parent, i_mutex ) ) { - m_xDataSource.clear(); - m_xDocument.clear(); } - - private: - Reference< XDataSource > m_xDataSource; - Reference< XPropertySet > m_xDataSourceProps; - Reference< XOfficeDatabaseDocument > m_xDocument; }; - struct OSingleDocumentControllerImpl - { - private: - ::boost::optional< bool > m_aDocScriptSupport; - - public: - OModuleClient m_aModuleClient; - ::dbtools::SQLExceptionInfo m_aCurrentError; - - ::cppu::OInterfaceContainerHelper - m_aModifyListeners; - - // - SharedConnection m_xConnection; - ::dbtools::DatabaseMetaData m_aSdbMetaData; - // - ::boost::scoped_ptr< UndoManager > - m_pUndoManager; - ::rtl::OUString m_sDataSourceName; // the data source we're working for - DataSourceHolder m_aDataSource; - Reference< XModel > m_xDocument; - Reference< XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier - sal_Int32 m_nDocStartNumber; - sal_Bool m_bSuspended; // is true when the controller was already suspended - sal_Bool m_bEditable; // is the control readonly or not - sal_Bool m_bModified; // is the data modified - bool m_bNotAttached; - - OSingleDocumentControllerImpl( OSingleDocumentController& i_antiImpl, ::osl::Mutex& i_rMutex ) - :m_aDocScriptSupport() - ,m_aModifyListeners( i_rMutex ) - ,m_pUndoManager( new UndoManager( i_antiImpl, i_rMutex ) ) - ,m_nDocStartNumber(0) - ,m_bSuspended( sal_False ) - ,m_bEditable(sal_True) - ,m_bModified(sal_False) - ,m_bNotAttached(true) - { - } - - bool documentHasScriptSupport() const - { - OSL_PRECOND( !!m_aDocScriptSupport, - "OSingleDocumentControllerImpl::documentHasScriptSupport: not completely initialized, yet - don't know!?" ); - return !!m_aDocScriptSupport && *m_aDocScriptSupport; - } - - void setDocumentScriptSupport( const bool _bSupport ) - { - OSL_PRECOND( !m_aDocScriptSupport, - "OSingleDocumentControllerImpl::setDocumentScriptSupport: already initialized!" ); - m_aDocScriptSupport = ::boost::optional< bool >( _bSupport ); - } - }; - - //==================================================================== + //================================================================================================================== //= OSingleDocumentController - //==================================================================== - //-------------------------------------------------------------------- - OSingleDocumentController::OSingleDocumentController(const Reference< XMultiServiceFactory >& _rxORB) + //================================================================================================================== + //------------------------------------------------------------------------------------------------------------------ + OSingleDocumentController::OSingleDocumentController( const Reference< XMultiServiceFactory >& _rxORB ) :OSingleDocumentController_Base( _rxORB ) - ,m_pImpl( new OSingleDocumentControllerImpl( *this, getMutex() ) ) + ,m_pData( new OSingleDocumentController_Data( *this, getMutex() ) ) { } - //-------------------------------------------------------------------- + //------------------------------------------------------------------------------------------------------------------ OSingleDocumentController::~OSingleDocumentController() { } - //-------------------------------------------------------------------- - void OSingleDocumentController::impl_initialize() - { - OGenericUnoController::impl_initialize(); - - const ::comphelper::NamedValueCollection& rArguments( getInitParams() ); - - Reference< XConnection > xConnection; - xConnection = rArguments.getOrDefault( (::rtl::OUString)PROPERTY_ACTIVE_CONNECTION, xConnection ); - - if ( !xConnection.is() ) - ::dbtools::isEmbeddedInDatabase( getModel(), xConnection ); - - if ( xConnection.is() ) - initializeConnection( xConnection ); - - bool bShowError = true; - if ( !isConnected() ) - { - reconnect( sal_False ); - bShowError = false; - } - if ( !isConnected() ) - { - if ( bShowError ) - connectionLostMessage(); - throw IllegalArgumentException(); - } - } - - //-------------------------------------------------------------------- - Any SAL_CALL OSingleDocumentController::queryInterface(const Type& _rType) throw (RuntimeException) - { - if ( _rType.equals( XScriptInvocationContext::static_type() ) ) - { - if ( m_pImpl->documentHasScriptSupport() ) - return makeAny( Reference< XScriptInvocationContext >( this ) ); - return Any(); - } - - return OSingleDocumentController_Base::queryInterface( _rType ); - } - - //-------------------------------------------------------------------- - Sequence< Type > SAL_CALL OSingleDocumentController::getTypes( ) throw (RuntimeException) - { - Sequence< Type > aTypes( OSingleDocumentController_Base::getTypes() ); - if ( !m_pImpl->documentHasScriptSupport() ) - { - Sequence< Type > aStrippedTypes( aTypes.getLength() - 1 ); - ::std::remove_copy_if( - aTypes.getConstArray(), - aTypes.getConstArray() + aTypes.getLength(), - aStrippedTypes.getArray(), - ::std::bind2nd( ::std::equal_to< Type >(), XScriptInvocationContext::static_type() ) - ); - aTypes = aStrippedTypes; - } - return aTypes; - } - - //-------------------------------------------------------------------- - void OSingleDocumentController::initializeConnection( const Reference< XConnection >& _rxForeignConn ) - { - DBG_ASSERT( !isConnected(), "OSingleDocumentController::initializeConnection: not to be called when already connected!" ); - // usually this gets called from within initialize of derived classes ... - if ( isConnected() ) - disconnect(); - - m_pImpl->m_xConnection.reset( _rxForeignConn, SharedConnection::NoTakeOwnership ); - m_pImpl->m_aSdbMetaData.reset( m_pImpl->m_xConnection ); - startConnectionListening( m_pImpl->m_xConnection ); - - // get the data source the connection belongs to - try - { - // determine our data source - OSL_PRECOND( !m_pImpl->m_aDataSource.is(), "OSingleDocumentController::initializeConnection: already a data source in this phase?" ); - { - Reference< XChild > xConnAsChild( m_pImpl->m_xConnection, UNO_QUERY ); - Reference< XDataSource > xDS; - if ( xConnAsChild.is() ) - xDS = Reference< XDataSource >( xConnAsChild->getParent(), UNO_QUERY ); - - // (take the indirection through XDataSource to ensure we have a correct object ....) - m_pImpl->m_aDataSource = xDS; - } - OSL_POSTCOND( m_pImpl->m_aDataSource.is(), "OSingleDocumentController::initializeConnection: unable to obtain the data source object!" ); - - if ( m_pImpl->m_bNotAttached ) - { - Reference< XUntitledNumbers > xUntitledProvider( getDatabaseDocument(), UNO_QUERY ); - m_pImpl->m_nDocStartNumber = 1; - if ( xUntitledProvider.is() ) - m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber( static_cast< XWeak* >( this ) ); - } - - // determine the availability of script support in our document. Our own XScriptInvocationContext - // interface depends on this - m_pImpl->setDocumentScriptSupport( Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY ).is() ); - - // get a number formatter - Reference< XPropertySet > xDataSourceProps( m_pImpl->m_aDataSource.getDataSourceProps(), UNO_SET_THROW ); - xDataSourceProps->getPropertyValue( PROPERTY_NAME ) >>= m_pImpl->m_sDataSourceName; - DBG_ASSERT( m_pImpl->m_sDataSourceName.getLength(), "OSingleDocumentController::initializeConnection: invalid data source name!" ); - Reference< XNumberFormatsSupplier> xSupplier = ::dbtools::getNumberFormats(m_pImpl->m_xConnection); - if(xSupplier.is()) - { - m_pImpl->m_xFormatter = Reference< XNumberFormatter >(getORB() - ->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.NumberFormatter")), UNO_QUERY); - m_pImpl->m_xFormatter->attachNumberFormatsSupplier(xSupplier); - } - OSL_ENSURE(m_pImpl->m_xFormatter.is(),"No NumberFormatter!"); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - } - - //-------------------------------------------------------------------- - void OSingleDocumentController::reconnect( sal_Bool _bUI ) - { - OSL_ENSURE(!m_pImpl->m_bSuspended, "Cannot reconnect while suspended!"); - - stopConnectionListening( m_pImpl->m_xConnection ); - m_pImpl->m_aSdbMetaData.reset( NULL ); - m_pImpl->m_xConnection.clear(); - - // reconnect - sal_Bool bReConnect = sal_True; - if ( _bUI ) - { - QueryBox aQuery( getView(), ModuleRes(QUERY_CONNECTION_LOST) ); - bReConnect = ( RET_YES == aQuery.Execute() ); - } - - // now really reconnect ... - if ( bReConnect ) - { - m_pImpl->m_xConnection.reset( connect( m_pImpl->m_aDataSource.getDataSource(), NULL ), SharedConnection::TakeOwnership ); - m_pImpl->m_aSdbMetaData.reset( m_pImpl->m_xConnection ); - } - - // invalidate all slots - InvalidateAll(); - } - - //-------------------------------------------------------------------- - void OSingleDocumentController::disconnect() - { - stopConnectionListening(m_pImpl->m_xConnection); - m_pImpl->m_aSdbMetaData.reset( NULL ); - m_pImpl->m_xConnection.clear(); - - InvalidateAll(); - } - - //-------------------------------------------------------------------- - void OSingleDocumentController::losingConnection() - { - // our connection was disposed so we need a new one - reconnect( sal_True ); - InvalidateAll(); - } - - //-------------------------------------------------------------------- + // ----------------------------------------------------------------------------- void SAL_CALL OSingleDocumentController::disposing() { OSingleDocumentController_Base::disposing(); - GetUndoManager().Clear(); - - disconnect(); - - attachFrame( Reference < XFrame >() ); - - m_pImpl->m_pUndoManager->disposing(); - m_pImpl->m_aDataSource.clear(); - } - - //-------------------------------------------------------------------- - sal_Bool OSingleDocumentController::Construct(Window* _pParent) - { - DBG_ASSERT( getView(), "OSingleDocumentController::Construct: have no view!" ); - if ( getView() ) - getView()->enableSeparator( ); - - return OSingleDocumentController_Base::Construct( _pParent ); - } - - //-------------------------------------------------------------------- - void SAL_CALL OSingleDocumentController::disposing(const EventObject& _rSource) throw( RuntimeException ) - { - if ( _rSource.Source == getConnection() ) - { - if ( !m_pImpl->m_bSuspended // when already suspended then we don't have to reconnect - && !getBroadcastHelper().bInDispose - && !getBroadcastHelper().bDisposed - && isConnected() - ) - { - losingConnection(); - } - else - { - m_pImpl->m_xConnection.reset( m_pImpl->m_xConnection, SharedConnection::NoTakeOwnership ); - // this prevents the "disposeComponent" call in disconnect - disconnect(); - } - } - else - OSingleDocumentController_Base::disposing( _rSource ); - } - - //-------------------------------------------------------------------- - void OSingleDocumentController::appendError( const ::rtl::OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState, - const sal_Int32 _nErrorCode ) - { - m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::SQL_EXCEPTION, _rErrorMessage, getStandardSQLStateAscii( _eSQLState ), - _nErrorCode ); - } - //-------------------------------------------------------------------- - void OSingleDocumentController::clearError() - { - m_pImpl->m_aCurrentError = ::dbtools::SQLExceptionInfo(); + ClearUndoManager(); + m_pData->m_pUndoManager->disposing(); } - //-------------------------------------------------------------------- - sal_Bool OSingleDocumentController::hasError() const + // ----------------------------------------------------------------------------- + void SAL_CALL OSingleDocumentController::disposing( const EventObject& i_event ) throw( RuntimeException ) { - return m_pImpl->m_aCurrentError.isValid(); + // simply disambiguate + OSingleDocumentController_Base::disposing( i_event ); } - //-------------------------------------------------------------------- - const ::dbtools::SQLExceptionInfo& OSingleDocumentController::getError() const + // ----------------------------------------------------------------------------- + void OSingleDocumentController::ClearUndoManager() { - return m_pImpl->m_aCurrentError; + GetUndoManager().Clear(); } - //-------------------------------------------------------------------- - void OSingleDocumentController::displayError() + // ----------------------------------------------------------------------------- + SfxUndoManager& OSingleDocumentController::GetUndoManager() const { - showError( m_pImpl->m_aCurrentError ); + return m_pData->m_pUndoManager->GetSfxUndoManager(); } - //-------------------------------------------------------------------- - sal_Bool SAL_CALL OSingleDocumentController::suspend(sal_Bool bSuspend) throw( RuntimeException ) + // ----------------------------------------------------------------------------- + void OSingleDocumentController::addUndoActionAndInvalidate(SfxUndoAction *_pAction) { - m_pImpl->m_bSuspended = bSuspend; - if ( !bSuspend && !isConnected() ) - reconnect(sal_True); + // add undo action + GetUndoManager().AddUndoAction( _pAction ); + // when we add an undo action the controller was modified + setModified( sal_True ); - return sal_True; + // now inform me that or states changed + InvalidateFeature( ID_BROWSER_UNDO ); + InvalidateFeature( ID_BROWSER_REDO ); } // ----------------------------------------------------------------------------- - sal_Bool SAL_CALL OSingleDocumentController::attachModel( const Reference< XModel > & _rxModel) throw( RuntimeException ) + Reference< XUndoManager > SAL_CALL OSingleDocumentController::getUndoManager( ) throw (RuntimeException) { - if ( !_rxModel.is() ) - return sal_False; - if ( !OSingleDocumentController_Base::attachModel( _rxModel ) ) - return sal_False; - - m_pImpl->m_bNotAttached = false; - if ( m_pImpl->m_nDocStartNumber == 1 ) - releaseNumberForComponent(); - - Reference< XUntitledNumbers > xUntitledProvider( _rxModel, UNO_QUERY ); - m_pImpl->m_nDocStartNumber = 1; - if ( xUntitledProvider.is() ) - m_pImpl->m_nDocStartNumber = xUntitledProvider->leaseNumber( static_cast< XWeak* >( this ) ); - - return sal_True; + return m_pData->m_pUndoManager.get(); } // ----------------------------------------------------------------------------- FeatureState OSingleDocumentController::GetState(sal_uInt16 _nId) const { FeatureState aReturn; - // (disabled automatically) - aReturn.bEnabled = sal_True; - - switch (_nId) + switch ( _nId ) { case ID_BROWSER_UNDO: - aReturn.bEnabled = m_pImpl->m_bEditable && GetUndoManager().GetUndoActionCount() != 0; + aReturn.bEnabled = isEditable() && GetUndoManager().GetUndoActionCount() != 0; if ( aReturn.bEnabled ) { String sUndo(ModuleRes(STR_UNDO_COLON)); @@ -499,8 +154,9 @@ namespace dbaui aReturn.sTitle = sUndo; } break; + case ID_BROWSER_REDO: - aReturn.bEnabled = m_pImpl->m_bEditable && GetUndoManager().GetRedoActionCount() != 0; + aReturn.bEnabled = isEditable() && GetUndoManager().GetRedoActionCount() != 0; if ( aReturn.bEnabled ) { String sRedo(ModuleRes(STR_REDO_COLON)); @@ -509,255 +165,36 @@ namespace dbaui aReturn.sTitle = sRedo; } break; + default: aReturn = OSingleDocumentController_Base::GetState(_nId); } return aReturn; } // ----------------------------------------------------------------------------- - void OSingleDocumentController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs) + void OSingleDocumentController::Execute( sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs ) { - switch(_nId) + switch ( _nId ) { - case ID_BROWSER_CLOSE: - closeTask(); - return; case ID_BROWSER_UNDO: GetUndoManager().Undo(); - InvalidateFeature(ID_BROWSER_REDO); + InvalidateFeature( ID_BROWSER_UNDO ); + InvalidateFeature( ID_BROWSER_REDO ); break; + case ID_BROWSER_REDO: GetUndoManager().Redo(); - InvalidateFeature(ID_BROWSER_UNDO); + InvalidateFeature( ID_BROWSER_UNDO ); + InvalidateFeature( ID_BROWSER_REDO ); break; + default: OSingleDocumentController_Base::Execute( _nId, _rArgs ); break; } InvalidateFeature(_nId); } - // ----------------------------------------------------------------------------- - SfxUndoManager& OSingleDocumentController::GetUndoManager() const - { - return m_pImpl->m_pUndoManager->GetSfxUndoManager(); - } - // ----------------------------------------------------------------------------- - void OSingleDocumentController::addUndoActionAndInvalidate(SfxUndoAction *_pAction) - { - // add undo action - GetUndoManager().AddUndoAction(_pAction); - // when we add an undo action the controller was modified - setModified(sal_True); - // now inform me that or states changed - InvalidateFeature(ID_BROWSER_UNDO); - InvalidateFeature(ID_BROWSER_REDO); - } - - // ----------------------------------------------------------------------------- - ::rtl::OUString OSingleDocumentController::getDataSourceName() const - { - ::rtl::OUString sName; - Reference< XPropertySet > xDataSourceProps( m_pImpl->m_aDataSource.getDataSourceProps() ); - if ( xDataSourceProps.is() ) - xDataSourceProps->getPropertyValue(PROPERTY_NAME) >>= sName; - return sName; - } - // ----------------------------------------------------------------------------- - void OSingleDocumentController::connectionLostMessage() const - { - String aMessage(ModuleRes(RID_STR_CONNECTION_LOST)); - Reference< XWindow > xWindow = getTopMostContainerWindow(); - Window* pWin = NULL; - if ( xWindow.is() ) - pWin = VCLUnoHelper::GetWindow(xWindow); - if ( !pWin ) - pWin = getView()->Window::GetParent(); - - InfoBox(pWin, aMessage).Execute(); - } - // ----------------------------------------------------------------------------- - const Reference< XConnection >& OSingleDocumentController::getConnection() const - { - return m_pImpl->m_xConnection; - } - - // ----------------------------------------------------------------------------- - sal_Bool OSingleDocumentController::isReadOnly() const - { - return !m_pImpl->m_bEditable; - } - - // ----------------------------------------------------------------------------- - sal_Bool OSingleDocumentController::isEditable() const - { - return m_pImpl->m_bEditable; - } - - // ----------------------------------------------------------------------------- - void OSingleDocumentController::setEditable(sal_Bool _bEditable) - { - m_pImpl->m_bEditable = _bEditable; - } - - // ----------------------------------------------------------------------------- - const ::dbtools::DatabaseMetaData& OSingleDocumentController::getSdbMetaData() const - { - return m_pImpl->m_aSdbMetaData; - } - - // ----------------------------------------------------------------------------- - sal_Bool OSingleDocumentController::isConnected() const - { - return m_pImpl->m_xConnection.is(); - } - - // ----------------------------------------------------------------------------- - Reference< XDatabaseMetaData > OSingleDocumentController::getMetaData( ) const - { - Reference< XDatabaseMetaData > xMeta; - try - { - if ( isConnected() ) - xMeta.set( m_pImpl->m_xConnection->getMetaData(), UNO_SET_THROW ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - return xMeta; - } - - // ----------------------------------------------------------------------------- - const Reference< XPropertySet >& OSingleDocumentController::getDataSource() const - { - return m_pImpl->m_aDataSource.getDataSourceProps(); - } - - // ----------------------------------------------------------------------------- - sal_Bool OSingleDocumentController::haveDataSource() const - { - return m_pImpl->m_aDataSource.is(); - } - - // ----------------------------------------------------------------------------- - Reference< XModel > OSingleDocumentController::getDatabaseDocument() const - { - return Reference< XModel >( m_pImpl->m_aDataSource.getDatabaseDocument(), UNO_QUERY ); - } - - // ----------------------------------------------------------------------------- - Reference< XNumberFormatter > OSingleDocumentController::getNumberFormatter() const - { - return m_pImpl->m_xFormatter; - } - - // ----------------------------------------------------------------------------- - Reference< XModel > OSingleDocumentController::getPrivateModel() const - { - return getDatabaseDocument(); - } - // ----------------------------------------------------------------------------- - // XTitle - ::rtl::OUString SAL_CALL OSingleDocumentController::getTitle() - throw (RuntimeException) - { - ::osl::MutexGuard aGuard( getMutex() ); - if ( m_bExternalTitle ) - return impl_getTitleHelper_throw()->getTitle (); - - ::rtl::OUStringBuffer sTitle; - Reference< XTitle > xTitle(getPrivateModel(),UNO_QUERY); - if ( xTitle.is() ) - { - sTitle.append( xTitle->getTitle() ); - sTitle.appendAscii(" : "); - } - sTitle.append( getPrivateTitle() ); - // There can be only one view with the same object - //const sal_Int32 nCurrentView = getCurrentStartNumber(); - //if ( nCurrentView > 1 ) - //{ - // sTitle.appendAscii(" : "); - // sTitle.append(nCurrentView); - //} - - return sTitle.makeStringAndClear(); - } - - // ----------------------------------------------------------------------------- - Reference< XUndoManager > SAL_CALL OSingleDocumentController::getUndoManager( ) throw (RuntimeException) - { - return m_pImpl->m_pUndoManager.get(); - } - - // ----------------------------------------------------------------------------- - sal_Int32 OSingleDocumentController::getCurrentStartNumber() const - { - return m_pImpl->m_nDocStartNumber; - } - - // ----------------------------------------------------------------------------- - Reference< XEmbeddedScripts > SAL_CALL OSingleDocumentController::getScriptContainer() throw (RuntimeException) - { - ::osl::MutexGuard aGuard( getMutex() ); - if ( !m_pImpl->documentHasScriptSupport() ) - return NULL; - - return Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY_THROW ); - } - - // ----------------------------------------------------------------------------- - void SAL_CALL OSingleDocumentController::addModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException) - { - ::osl::MutexGuard aGuard( getMutex() ); - m_pImpl->m_aModifyListeners.addInterface( i_Listener ); - } - - // ----------------------------------------------------------------------------- - void SAL_CALL OSingleDocumentController::removeModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException) - { - ::osl::MutexGuard aGuard( getMutex() ); - m_pImpl->m_aModifyListeners.removeInterface( i_Listener ); - } - - // ----------------------------------------------------------------------------- - ::sal_Bool SAL_CALL OSingleDocumentController::isModified( ) throw (RuntimeException) - { - ::osl::MutexGuard aGuard( getMutex() ); - return impl_isModified(); - } - - // ----------------------------------------------------------------------------- - void SAL_CALL OSingleDocumentController::setModified( ::sal_Bool i_bModified ) throw (PropertyVetoException, RuntimeException) - { - ::osl::ClearableMutexGuard aGuard( getMutex() ); - - if ( m_pImpl->m_bModified == i_bModified ) - return; - - m_pImpl->m_bModified = i_bModified; - impl_onModifyChanged(); - - EventObject aEvent( *this ); - aGuard.clear(); - m_pImpl->m_aModifyListeners.notifyEach( &XModifyListener::modified, aEvent ); - } - - // ----------------------------------------------------------------------------- - sal_Bool OSingleDocumentController::impl_isModified() const - { - return m_pImpl->m_bModified; - } - - // ----------------------------------------------------------------------------- - void OSingleDocumentController::impl_onModifyChanged() - { - InvalidateFeature( ID_BROWSER_SAVEDOC ); - if ( isFeatureSupported( ID_BROWSER_SAVEASDOC ) ) - InvalidateFeature( ID_BROWSER_SAVEASDOC ); - } - -//........................................................................ -} // namespace dbaui -//........................................................................ +//...................................................................................................................... +} // namespace dbaui +//...................................................................................................................... diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index b8598f26f825..28238ea27e03 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2177,7 +2177,7 @@ namespace while ( false ); // Durch das Neuerzeugen wurden wieder Undo-Actions in den Manager gestellt - rController.GetUndoManager().Clear(); + rController.ClearUndoManager(); _pSelectionBrw->Invalidate(); return eErrorCode; } @@ -3234,7 +3234,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& InsertField( pField, sal_True, sal_False ); } - rController.GetUndoManager().Clear(); + rController.ClearUndoManager(); m_pSelectionBox->Invalidate(); } diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx index d60621f7b414..5943485a7bb5 100644 --- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx +++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx @@ -299,7 +299,7 @@ bool OQueryViewSwitch::impl_postViewSwitch( const bool i_bGraphicalDesign, const if ( pContainer ) pContainer->Resize(); - m_pDesignView->getController().GetUndoManager().Clear(); + m_pDesignView->getController().ClearUndoManager(); m_pDesignView->getController().InvalidateAll(); return i_bSuccess; diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index c39191ac8cc9..2659580a91b4 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1037,7 +1037,7 @@ void OQueryController::impl_initialize() } } - GetUndoManager().Clear(); + ClearUndoManager(); if ( ( m_bGraphicalDesign ) && ( ( !m_sName.getLength() && !editingCommand() ) @@ -1789,7 +1789,7 @@ void OQueryController::reset() { impl_reset(); getContainer()->reset( NULL ); - GetUndoManager().Clear(); + ClearUndoManager(); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 642d22d1af8e..66dbc066324c 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -494,7 +494,7 @@ IMPL_LINK( ORelationController, OnThreadFinished, void*, /*NOTINTERESTEDIN*/ ) { getView()->initialize(); // show the windows and fill with our informations getView()->Invalidate(INVALIDATE_NOERASE); - GetUndoManager().Clear(); // clear all undo redo things + ClearUndoManager(); setModified(sal_False); // and we are not modified yet if(m_vTableData.empty()) diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 505738ef5cf0..dfbc022d4f7d 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -375,7 +375,7 @@ void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) OSQLWarningBox aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES ); if ( m_bInRemove || aDlg.Execute() == RET_YES ) { - m_pView->getController().GetUndoManager().Clear(); + m_pView->getController().ClearUndoManager(); OJoinTableView::RemoveTabWin( pTabWin ); m_pView->getController().InvalidateFeature(SID_RELATION_ADD_RELATION); @@ -383,30 +383,7 @@ void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) m_pView->getController().InvalidateFeature(ID_BROWSER_REDO); } } -// ----------------------------------------------------------------------------- -//namespace -//{ -// class OReleationAskDialog : public ButtonDialog -// { -// FixedImage m_aInfoImage; -// FixedText m_aTitle; -// FixedText m_aMessage; -// public: -// OReleationDialog(Window* _pParent) : ButtonDialog(_pParent,WB_HORZ | WB_STDDIALOG) -// ,m_aInfoImage(this) -// ,m_aTitle(this,WB_WORDBREAK | WB_LEFT) -// ,m_aMessage(this,WB_WORDBREAK | WB_LEFT) -// { -// m_aMessage.SetText(ModuleRes(STR_QUERY_REL_EDIT_RELATION)); -// m_aMessage.Show(); -// -// // Changed as per BugID 79541 Branding/Configuration -// String sDialogTitle( lcl_getProductName() ); -// SetText( sDialogTitle.AppendAscii( " Base" ) ); -// m_aTitle.Show(); -// } -// }; -//} + // ----------------------------------------------------------------------------- void ORelationTableView::lookForUiActivities() { @@ -469,7 +446,7 @@ void ORelationTableView::_elementRemoved( const container::ContainerEvent& _rEve OTableWindow* pTableWindow = GetTabWindow(sName); if ( pTableWindow ) { - m_pView->getController().GetUndoManager().Clear(); + m_pView->getController().ClearUndoManager(); OJoinTableView::RemoveTabWin( pTableWindow ); m_pView->getController().InvalidateFeature(SID_RELATION_ADD_RELATION); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 1cc02fb45d8b..fa8d1809b595 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -568,7 +568,7 @@ void OTableController::impl_initialize() { loadData(); // fill the column information form the table getView()->initialize(); // show the windows and fill with our informations - GetUndoManager().Clear(); // clear all undo redo things + ClearUndoManager(); setModified(sal_False); // and we are not modified yet } catch( const Exception& ) @@ -1516,7 +1516,7 @@ void OTableController::reSyncRows() } static_cast(getView())->reSync(); // show the windows and fill with our informations - GetUndoManager().Clear(); // clear all undo redo things + ClearUndoManager(); setModified(sal_False); // and we are not modified yet } // ----------------------------------------------------------------------------- @@ -1572,7 +1572,7 @@ void OTableController::reload() { loadData(); // fill the column information form the table static_cast(getView())->reSync(); // show the windows and fill with our informations - GetUndoManager().Clear(); // clear all undo redo things + ClearUndoManager(); setModified(sal_False); // and we are not modified yet static_cast(getView())->Invalidate(); } -- cgit From 4ae5573a0f94cc859ba2c30ac71bcd2ff8677f1f Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 25 Nov 2010 14:29:43 +0100 Subject: undoapi: migrated report designer to use an own, model-bound UndoManager, instead of the UndoManager formerly bound to the controller --- dbaccess/source/ui/misc/dbaundomanager.hxx | 101 ----------------------------- 1 file changed, 101 deletions(-) delete mode 100755 dbaccess/source/ui/misc/dbaundomanager.hxx (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/misc/dbaundomanager.hxx b/dbaccess/source/ui/misc/dbaundomanager.hxx deleted file mode 100755 index 99ff86cb39bf..000000000000 --- a/dbaccess/source/ui/misc/dbaundomanager.hxx +++ /dev/null @@ -1,101 +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 - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef DBACCESS_DBAUNDOMANAGER_HXX -#define DBACCESS_DBAUNDOMANAGER_HXX - -/** === begin UNO includes === **/ -#include -/** === end UNO includes === **/ - -#include - -#include - -class SfxUndoManager; - -//...................................................................................................................... -namespace dbaui -{ -//...................................................................................................................... - - //================================================================================================================== - //= UndoManager - //================================================================================================================== - struct UndoManager_Impl; - typedef ::cppu::ImplHelper1< ::com::sun::star::document::XUndoManager > UndoManager_Base; - class UndoManager : public UndoManager_Base - { - public: - UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex ); - virtual ~UndoManager(); - - SfxUndoManager& GetSfxUndoManager() const; - - // XInterface - virtual void SAL_CALL acquire( ) throw (); - virtual void SAL_CALL release( ) throw (); - - // XComponent equivalents - void disposing(); - - // XUndoManager - virtual void SAL_CALL enterUndoContext( const ::rtl::OUString& i_title ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL enterHiddenUndoContext( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL leaveUndoContext( ) throw (::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addUndoAction( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoAction >& i_action ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL undo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL redo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isUndoPossible( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isRedoPossible( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getCurrentUndoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getCurrentRedoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllUndoActionTitles( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllRedoActionTitles( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL clear( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL clearRedo( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL reset( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); - - // XLockable (base of XUndoManager) - virtual void SAL_CALL lock( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL unlock( ) throw (::com::sun::star::util::NotLockedException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isLocked( ) throw (::com::sun::star::uno::RuntimeException); - - // XChild (base of XUndoManager) - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); - - private: - ::boost::scoped_ptr< UndoManager_Impl > m_pImpl; - }; - -//...................................................................................................................... -} // namespace dbaui -//...................................................................................................................... - -#endif // DBACCESS_DBAUNDOMANAGER_HXX -- cgit From f2478305d255a1ea18191413406c4edf21f704c9 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 26 Nov 2010 09:46:54 +0100 Subject: undoapi: assert unknown slots in ImplInvalidateFeature --- dbaccess/source/ui/browser/genericcontroller.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index b81b073a56bf..0c0190318c72 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -704,6 +704,18 @@ void OGenericUnoController::InvalidateFeature_Impl() // ----------------------------------------------------------------------- void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Reference< XStatusListener >& _xListener, sal_Bool _bForceBroadcast ) { +#if OSL_DEBUG_LEVEL > 0 + if ( _nId != -1 ) + { + SupportedFeatures::iterator aFeaturePos = ::std::find_if( + m_aSupportedFeatures.begin(), + m_aSupportedFeatures.end(), + ::std::bind2nd( CompareFeatureById(), _nId ) + ); + OSL_ENSURE( aFeaturePos != m_aSupportedFeatures.end(), "OGenericUnoController::ImplInvalidateFeature: invalidating an unsupported feature is suspicious, at least!" ); + } +#endif + FeatureListener aListener; aListener.nId = _nId; aListener.xListener = _xListener; -- cgit From 5c5ac6f63c3c4cb8fd02d8749656d804f0db1046 Mon Sep 17 00:00:00 2001 From: "Ocke.Janssen" Date: Fri, 26 Nov 2010 11:14:33 +0100 Subject: dba34b: #i114309# set default values for bit boolean and reset when we are on the insertrow --- dbaccess/source/ui/browser/unodatbr.cxx | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index d34ec0c4e11a..d15fb125f234 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -735,6 +736,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: ::std::vector< NamedValue > aInitialValues; ::std::vector< ::rtl::OUString > aCopyProperties; + Any aDefault; switch(nType) { @@ -751,6 +753,8 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TriState" ) ), makeAny( sal_Bool( ColumnValue::NO_NULLS != nNullable ) ) ) ); + if ( ColumnValue::NO_NULLS == nNullable ) + aDefault <<= (sal_Int16)STATE_NOCHECK; } break; @@ -792,18 +796,17 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: Reference< XPropertySetInfo > xGridColPSI( xGridCol->getPropertySetInfo(), UNO_SET_THROW ); // calculate the default - Any aDefault; if ( xGridColPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) ) - aDefault = xColumn->getPropertyValue( PROPERTY_CONTROLDEFAULT ); - - // default value - if ( nType == DataType::BIT || nType == DataType::BOOLEAN ) { - if ( aDefault.hasValue() ) - aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)STATE_NOCHECK : (sal_Int16)STATE_CHECK; - else - aDefault <<= ((sal_Int16)STATE_DONTKNOW); - + aDefault = xColumn->getPropertyValue( PROPERTY_CONTROLDEFAULT ); + // default value + if ( nType == DataType::BIT || nType == DataType::BOOLEAN ) + { + if ( aDefault.hasValue() ) + aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)STATE_NOCHECK : (sal_Int16)STATE_CHECK; + else + aDefault <<= ((sal_Int16)STATE_DONTKNOW); + } } if ( aDefault.hasValue() ) @@ -2467,6 +2470,14 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSou // initialize the model InitializeGridModel(getFormComponent()); + Any aVal = xProp->getPropertyValue(PROPERTY_ISNEW); + if (aVal.hasValue() && ::comphelper::getBOOL(aVal)) + { + // then set the default values and the parameters given from the parent + Reference< XReset> xReset(xProp, UNO_QUERY); + xReset->reset(); + } + if ( m_bPreview ) initializePreviewMode(); -- cgit From 9e2da7c807f6955a2eee6913f429e507f101c58e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 6 Dec 2010 14:14:11 +0100 Subject: gridsort: give the UnoControl(Model/Base) classes a ctor taking a service factory, so we have access to the factory which created us, and don't need to resort to the process'es service factory --- dbaccess/source/ui/uno/ColumnControl.cxx | 4 ++-- dbaccess/source/ui/uno/ColumnControl.hxx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx index 6d9d1eba083a..53e6f5907401 100644 --- a/dbaccess/source/ui/uno/ColumnControl.cxx +++ b/dbaccess/source/ui/uno/ColumnControl.cxx @@ -61,7 +61,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; OColumnControl::OColumnControl(const Reference& _rxFactory) -: m_xORB(_rxFactory) + :UnoControl( _rxFactory ) { } // ----------------------------------------------------------------------------- @@ -87,7 +87,7 @@ void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit pParentWin = pParent->GetWindow(); } - OColumnPeer* pPeer = new OColumnPeer(pParentWin,m_xORB); + OColumnPeer* pPeer = new OColumnPeer( pParentWin, maContext.getLegacyServiceFactory() ); OSL_ENSURE(pPeer != NULL, "FmXGridControl::createPeer : imp_CreatePeer didn't return a peer !"); setPeer( pPeer ); diff --git a/dbaccess/source/ui/uno/ColumnControl.hxx b/dbaccess/source/ui/uno/ColumnControl.hxx index 866eba99b18c..4d2a7de9829d 100644 --- a/dbaccess/source/ui/uno/ColumnControl.hxx +++ b/dbaccess/source/ui/uno/ColumnControl.hxx @@ -38,7 +38,6 @@ namespace dbaui { class OColumnControl : public UnoControl { - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xORB; public: OColumnControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); -- cgit From 409873c1c1267b71eb53e4d5536fc240510438d9 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Fri, 14 Jan 2011 15:00:11 +0100 Subject: removetooltypes01: #i112600# remove tooltypes from dbaccess --- dbaccess/source/ui/app/AppController.hxx | 2 +- dbaccess/source/ui/app/AppControllerGen.cxx | 4 +- dbaccess/source/ui/app/AppDetailPageHelper.cxx | 42 +++--- dbaccess/source/ui/app/AppDetailPageHelper.hxx | 12 +- dbaccess/source/ui/app/AppDetailView.cxx | 12 +- dbaccess/source/ui/app/AppDetailView.hxx | 12 +- dbaccess/source/ui/app/AppIconControl.cxx | 12 +- dbaccess/source/ui/app/AppSwapWindow.cxx | 14 +- dbaccess/source/ui/app/AppSwapWindow.hxx | 6 +- dbaccess/source/ui/app/AppTitleWindow.cxx | 4 +- dbaccess/source/ui/app/AppTitleWindow.hxx | 8 +- dbaccess/source/ui/app/AppView.cxx | 2 +- dbaccess/source/ui/browser/brwview.cxx | 4 +- dbaccess/source/ui/browser/dbexchange.cxx | 2 +- dbaccess/source/ui/browser/dbtreemodel.hxx | 4 +- dbaccess/source/ui/browser/dsEntriesNoExp.cxx | 4 +- dbaccess/source/ui/browser/genericcontroller.cxx | 2 +- dbaccess/source/ui/browser/sbagrid.cxx | 2 +- dbaccess/source/ui/browser/unodatbr.cxx | 8 +- dbaccess/source/ui/control/ColumnControlWindow.cxx | 2 +- dbaccess/source/ui/control/FieldDescControl.cxx | 10 +- dbaccess/source/ui/control/RelationControl.cxx | 56 ++++---- dbaccess/source/ui/control/TableGrantCtrl.cxx | 60 ++++----- dbaccess/source/ui/control/charsetlistbox.cxx | 2 +- dbaccess/source/ui/control/curledit.cxx | 4 +- dbaccess/source/ui/control/dbtreelistbox.cxx | 42 +++--- dbaccess/source/ui/control/listviewitems.cxx | 2 +- dbaccess/source/ui/control/opendoccontrols.cxx | 14 +- dbaccess/source/ui/control/sqledit.cxx | 2 +- dbaccess/source/ui/control/tabletree.cxx | 14 +- dbaccess/source/ui/control/toolboxcontroller.cxx | 22 ++-- dbaccess/source/ui/dlg/AdabasStat.cxx | 4 +- dbaccess/source/ui/dlg/CollectionView.cxx | 4 +- dbaccess/source/ui/dlg/ConnectionPage.hxx | 2 +- dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 2 +- dbaccess/source/ui/dlg/ConnectionPageSetup.hxx | 4 +- dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 10 +- dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx | 32 ++--- dbaccess/source/ui/dlg/DbAdminImpl.cxx | 8 +- dbaccess/source/ui/dlg/DriverSettings.cxx | 2 +- dbaccess/source/ui/dlg/RelationDlg.cxx | 26 ++-- dbaccess/source/ui/dlg/UserAdminDlg.cxx | 2 +- dbaccess/source/ui/dlg/admincontrols.cxx | 6 +- dbaccess/source/ui/dlg/admincontrols.hxx | 2 +- dbaccess/source/ui/dlg/adminpages.cxx | 10 +- dbaccess/source/ui/dlg/adminpages.hxx | 8 +- dbaccess/source/ui/dlg/adodatalinks.cxx | 2 +- dbaccess/source/ui/dlg/adodatalinks.hxx | 2 +- dbaccess/source/ui/dlg/adtabdlg.cxx | 14 +- dbaccess/source/ui/dlg/advancedsettings.cxx | 18 +-- dbaccess/source/ui/dlg/advancedsettings.hxx | 4 +- dbaccess/source/ui/dlg/dbadmin.cxx | 4 +- dbaccess/source/ui/dlg/dbfindex.hxx | 2 +- dbaccess/source/ui/dlg/dbwiz.cxx | 2 +- dbaccess/source/ui/dlg/detailpages.cxx | 14 +- dbaccess/source/ui/dlg/detailpages.hxx | 28 ++-- dbaccess/source/ui/dlg/directsql.cxx | 4 +- dbaccess/source/ui/dlg/dlgattr.cxx | 4 +- dbaccess/source/ui/dlg/dlgsave.cxx | 6 +- dbaccess/source/ui/dlg/dsselect.cxx | 6 +- dbaccess/source/ui/dlg/dsselect.hxx | 2 +- dbaccess/source/ui/dlg/generalpage.cxx | 4 +- dbaccess/source/ui/dlg/generalpage.hxx | 2 +- dbaccess/source/ui/dlg/queryorder.cxx | 2 +- dbaccess/source/ui/dlg/sqlmessage.cxx | 16 +-- dbaccess/source/ui/dlg/tablespage.cxx | 2 +- dbaccess/source/ui/dlg/tablespage.hxx | 4 +- dbaccess/source/ui/inc/ColumnControlWindow.hxx | 2 +- dbaccess/source/ui/inc/ConnectionLine.hxx | 4 +- dbaccess/source/ui/inc/FieldControls.hxx | 46 +++---- dbaccess/source/ui/inc/FieldDescControl.hxx | 22 ++-- dbaccess/source/ui/inc/GeneralUndo.hxx | 2 +- dbaccess/source/ui/inc/JoinTableView.hxx | 16 +-- dbaccess/source/ui/inc/QueryTableView.hxx | 14 +- dbaccess/source/ui/inc/RTableConnectionData.hxx | 20 +-- dbaccess/source/ui/inc/RelationControl.hxx | 4 +- dbaccess/source/ui/inc/RelationController.hxx | 2 +- dbaccess/source/ui/inc/RelationDlg.hxx | 4 +- dbaccess/source/ui/inc/RelationTableView.hxx | 4 +- dbaccess/source/ui/inc/TableConnection.hxx | 6 +- dbaccess/source/ui/inc/TableConnectionData.hxx | 10 +- dbaccess/source/ui/inc/TableDesignControl.hxx | 24 ++-- dbaccess/source/ui/inc/TableDesignHelpBar.hxx | 2 +- dbaccess/source/ui/inc/TableDesignView.hxx | 2 +- dbaccess/source/ui/inc/TableGrantCtrl.hxx | 20 +-- dbaccess/source/ui/inc/TableRow.hxx | 4 +- dbaccess/source/ui/inc/TableWindow.hxx | 28 ++-- dbaccess/source/ui/inc/TableWindowData.hxx | 8 +- dbaccess/source/ui/inc/TableWindowListBox.hxx | 8 +- dbaccess/source/ui/inc/TokenWriter.hxx | 18 +-- dbaccess/source/ui/inc/UITools.hxx | 6 +- dbaccess/source/ui/inc/UserAdminDlg.hxx | 2 +- dbaccess/source/ui/inc/VertSplitView.hxx | 2 +- dbaccess/source/ui/inc/WCPage.hxx | 18 +-- dbaccess/source/ui/inc/WColumnSelect.hxx | 2 +- dbaccess/source/ui/inc/adtabdlg.hxx | 2 +- dbaccess/source/ui/inc/advancedsettingsdlg.hxx | 2 +- dbaccess/source/ui/inc/brwctrlr.hxx | 2 +- dbaccess/source/ui/inc/charsetlistbox.hxx | 2 +- dbaccess/source/ui/inc/curledit.hxx | 6 +- dbaccess/source/ui/inc/dbadmin.hxx | 6 +- dbaccess/source/ui/inc/dbtreelistbox.hxx | 8 +- dbaccess/source/ui/inc/dlgattr.hxx | 4 +- dbaccess/source/ui/inc/dlgsize.hxx | 2 +- dbaccess/source/ui/inc/imageprovider.hxx | 2 +- dbaccess/source/ui/inc/listviewitems.hxx | 2 +- dbaccess/source/ui/inc/moduledbu.hxx | 2 +- dbaccess/source/ui/inc/opendoccontrols.hxx | 4 +- dbaccess/source/ui/inc/propertystorage.hxx | 2 +- dbaccess/source/ui/inc/querycontroller.hxx | 2 +- dbaccess/source/ui/inc/queryfilter.hxx | 4 +- dbaccess/source/ui/inc/sbagrid.hxx | 2 +- dbaccess/source/ui/inc/sqledit.hxx | 6 +- dbaccess/source/ui/inc/unodatbr.hxx | 6 +- dbaccess/source/ui/misc/DExport.cxx | 14 +- dbaccess/source/ui/misc/HtmlReader.cxx | 10 +- dbaccess/source/ui/misc/RowSetDrop.cxx | 10 +- dbaccess/source/ui/misc/RtfReader.cxx | 8 +- dbaccess/source/ui/misc/TokenWriter.cxx | 54 ++++---- dbaccess/source/ui/misc/UITools.cxx | 2 +- dbaccess/source/ui/misc/WCPage.cxx | 6 +- dbaccess/source/ui/misc/WColumnSelect.cxx | 8 +- dbaccess/source/ui/misc/WNameMatch.cxx | 8 +- dbaccess/source/ui/misc/WTypeSelect.cxx | 6 +- dbaccess/source/ui/misc/imageprovider.cxx | 14 +- dbaccess/source/ui/querydesign/ConnectionData.hxx | 2 +- dbaccess/source/ui/querydesign/ConnectionLine.cxx | 10 +- dbaccess/source/ui/querydesign/JoinController.cxx | 6 +- dbaccess/source/ui/querydesign/JoinTableView.cxx | 142 ++++++++++----------- .../source/ui/querydesign/QTableConnectionData.cxx | 4 +- .../source/ui/querydesign/QTableConnectionData.hxx | 2 +- dbaccess/source/ui/querydesign/QTableWindow.hxx | 6 +- .../ui/querydesign/QueryDesignFieldUndoAct.hxx | 8 +- .../ui/querydesign/QueryDesignUndoAction.hxx | 2 +- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 6 +- .../ui/querydesign/QueryTabConnUndoAction.cxx | 20 +-- .../ui/querydesign/QueryTabConnUndoAction.hxx | 6 +- .../source/ui/querydesign/QueryTabWinUndoAct.cxx | 12 +- .../source/ui/querydesign/QueryTabWinUndoAct.hxx | 8 +- dbaccess/source/ui/querydesign/QueryTableView.cxx | 6 +- dbaccess/source/ui/querydesign/QueryTextView.cxx | 2 +- .../source/ui/querydesign/SelectionBrowseBox.cxx | 100 +++++++-------- .../source/ui/querydesign/SelectionBrowseBox.hxx | 28 ++-- dbaccess/source/ui/querydesign/TableConnection.cxx | 8 +- .../source/ui/querydesign/TableConnectionData.cxx | 22 ++-- dbaccess/source/ui/querydesign/TableWindow.cxx | 44 +++---- dbaccess/source/ui/querydesign/TableWindowData.cxx | 6 +- .../source/ui/querydesign/TableWindowListBox.cxx | 26 ++-- .../source/ui/querydesign/TableWindowTitle.cxx | 2 +- .../source/ui/querydesign/querycontainerwindow.cxx | 2 +- dbaccess/source/ui/querydesign/querycontroller.cxx | 4 +- dbaccess/source/ui/querydesign/querydlg.cxx | 20 +-- dbaccess/source/ui/querydesign/querydlg.hxx | 2 +- .../ui/relationdesign/RTableConnectionData.cxx | 26 ++-- .../ui/relationdesign/RelationController.cxx | 4 +- .../source/ui/relationdesign/RelationTableView.cxx | 12 +- dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx | 6 +- dbaccess/source/ui/tabledesign/TEditControl.cxx | 10 +- dbaccess/source/ui/tabledesign/TEditControl.hxx | 58 ++++----- .../source/ui/tabledesign/TableDesignControl.cxx | 12 +- dbaccess/source/ui/tabledesign/TableDesignView.cxx | 2 +- .../source/ui/tabledesign/TableFieldControl.cxx | 2 +- .../source/ui/tabledesign/TableFieldControl.hxx | 6 +- .../source/ui/tabledesign/TableFieldDescWin.cxx | 2 +- .../source/ui/tabledesign/TableFieldDescWin.hxx | 6 +- .../source/ui/tabledesign/TableRowExchange.cxx | 2 +- dbaccess/source/ui/tabledesign/TableUndo.cxx | 28 ++-- dbaccess/source/ui/tabledesign/TableUndo.hxx | 14 +- 168 files changed, 926 insertions(+), 926 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx index 1edda1d44758..153661b47200 100644 --- a/dbaccess/source/ui/app/AppController.hxx +++ b/dbaccess/source/ui/app/AppController.hxx @@ -127,7 +127,7 @@ namespace dbaui OTableCopyHelper m_aTableCopyHelper; TransferableClipboardListener* m_pClipbordNotifier; // notifier for changes in the clipboard - ULONG m_nAsyncDrop; + sal_uLong m_nAsyncDrop; OAsyncronousLink m_aControllerConnectedEvent; OAsyncronousLink m_aSelectContainerEvent; PreviewMode m_ePreviewMode; // the mode of the preview diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 9965f00dbd21..e6159a204d2a 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -763,8 +763,8 @@ void OApplicationController::onLoadedMenu(const Reference< ::com::sun::star::fra MenuBar* pMenu = pSystemWindow ? pSystemWindow->GetMenuBar() : NULL; if ( pMenu ) { - USHORT nMenuItems = pMenu->GetItemCount(); - for ( USHORT i = 0; i < nMenuItems; ++i ) + sal_uInt16 nMenuItems = pMenu->GetItemCount(); + for ( sal_uInt16 i = 0; i < nMenuItems; ++i ) aMnemonicGenerator.RegisterMnemonic( pMenu->GetItemText( pMenu->GetItemId( i ) ) ); } // - the icons should use automatic ones diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 1ecac8e25604..5a529f609cfe 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -224,7 +224,7 @@ namespace class OTablePreviewWindow : public Window { DECL_LINK(OnDisableInput, void*); - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt); public: @@ -247,7 +247,7 @@ namespace // ----------------------------------------------------------------------------- IMPL_LINK(OTablePreviewWindow, OnDisableInput, void*, EMPTYARG) { - EnableInput(FALSE); + EnableInput(sal_False); return 0L; } // ----------------------------------------------------------------------------- @@ -310,7 +310,7 @@ OAppDetailPageHelper::OAppDetailPageHelper(Window* _pParent,OAppBorderWindow& _r m_aTBPreview.SetHelpId(HID_APP_VIEW_PREVIEW_CB); m_aTBPreview.SetDropdownClickHdl( LINK( this, OAppDetailPageHelper, OnDropdownClickHdl ) ); m_aTBPreview.EnableMenuStrings(); - m_aTBPreview.Enable(TRUE); + m_aTBPreview.Enable(sal_True); m_aBorder.SetUniqueId(UID_APP_VIEW_PREVIEW_1); @@ -374,7 +374,7 @@ void OAppDetailPageHelper::selectAll() int nPos = getVisibleControlIndex(); if ( nPos < E_ELEMENT_TYPE_COUNT ) { - m_pLists[nPos]->SelectAll(TRUE); + m_pLists[nPos]->SelectAll(sal_True); } } // ----------------------------------------------------------------------------- @@ -538,7 +538,7 @@ void OAppDetailPageHelper::selectElements(const Sequence< ::rtl::OUString>& _aNa if ( nPos < E_ELEMENT_TYPE_COUNT ) { DBTreeListBox& rTree = *m_pLists[nPos]; - rTree.SelectAll(FALSE); + rTree.SelectAll(sal_False); const ::rtl::OUString* pIter = _aNames.getConstArray(); const ::rtl::OUString* pEnd = pIter + _aNames.getLength(); for(;pIter != pEnd;++pIter) @@ -689,7 +689,7 @@ SvLBoxEntry* OAppDetailPageHelper::getEntry( const Point& _aPosPixel) const SvLBoxEntry* pReturn = NULL; int nPos = getVisibleControlIndex(); if ( nPos < E_ELEMENT_TYPE_COUNT ) - pReturn = m_pLists[nPos]->GetEntry( _aPosPixel,TRUE ); + pReturn = m_pLists[nPos]->GetEntry( _aPosPixel,sal_True ); return pReturn; } // ----------------------------------------------------------------------------- @@ -722,14 +722,14 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon SvLBoxEntry* pEntry = m_pLists[E_TABLE]->First(); if ( pEntry ) m_pLists[E_TABLE]->Expand(pEntry); - m_pLists[E_TABLE]->SelectAll(FALSE); + m_pLists[E_TABLE]->SelectAll(sal_False); } setDetailPage(m_pLists[E_TABLE]); } // ----------------------------------------------------------------------------- -void OAppDetailPageHelper::getElementIcons( ElementType _eType, USHORT& _rImageId, USHORT& _rHighContrastImageId ) +void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rImageId, sal_uInt16& _rHighContrastImageId ) { ImageProvider aImageProvider; _rImageId = _rHighContrastImageId = 0; @@ -753,7 +753,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA { OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed."); - USHORT nImageId = 0, nImageIdH = 0; + sal_uInt16 nImageId = 0, nImageIdH = 0; rtl::OString sHelpId; ImageProvider aImageProvider; Image aFolderImage, aFolderImageHC; @@ -790,7 +790,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA { fillNames( _xContainer, _eType, nImageId, nImageIdH, NULL ); - m_pLists[_eType]->SelectAll(FALSE); + m_pLists[_eType]->SelectAll(sal_False); } setDetailPage(m_pLists[_eType]); } @@ -804,7 +804,7 @@ void OAppDetailPageHelper::setDetailPage(Window* _pWindow) pCurrent->Hide(); showPreview(NULL); - BOOL bHasFocus = FALSE; + sal_Bool bHasFocus = sal_False; m_aFL.Show(); { bHasFocus = pCurrent->HasChildPathFocus(); @@ -812,7 +812,7 @@ void OAppDetailPageHelper::setDetailPage(Window* _pWindow) } m_aTBPreview.Show(); m_aBorder.Show(); - switchPreview(m_ePreviewMode,TRUE); + switchPreview(m_ePreviewMode,sal_True); if ( bHasFocus ) _pWindow->GrabFocus(); @@ -836,7 +836,7 @@ namespace // ----------------------------------------------------------------------------- void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContainer, const ElementType _eType, - const USHORT _nImageId, const USHORT _nHighContrastImageId, SvLBoxEntry* _pParent ) + const sal_uInt16 _nImageId, const sal_uInt16 _nHighContrastImageId, SvLBoxEntry* _pParent ) { OSL_ENSURE(_xContainer.is(),"Data source is NULL! -> GPF"); OSL_ENSURE( ( _eType >= E_TABLE ) && ( _eType < E_ELEMENT_TYPE_COUNT ), "OAppDetailPageHelper::fillNames: invalid type!" ); @@ -859,7 +859,7 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine Reference xSubElements(_xContainer->getByName(*pIter),UNO_QUERY); if ( xSubElements.is() ) { - pEntry = pList->InsertEntry( *pIter, _pParent, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); + pEntry = pList->InsertEntry( *pIter, _pParent, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); getBorderWin().getView()->getAppController().containerFound( Reference< XContainer >( xSubElements, UNO_QUERY ) ); fillNames( xSubElements, _eType, _nImageId, _nHighContrastImageId, pEntry ); } @@ -991,13 +991,13 @@ SvLBoxEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const ::rtl:: } } - USHORT nImageId = 0, nImageIdH = 0; + sal_uInt16 nImageId = 0, nImageIdH = 0; getElementIcons( _eType, nImageId, nImageIdH ); Reference xContainer(_rObject,UNO_QUERY); if ( xContainer.is() ) { const sal_Int32 nFolderIndicator = lcl_getFolderIndicatorForType( _eType ); - pRet = pTreeView->InsertEntry( _rName, pEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); + pRet = pTreeView->InsertEntry( _rName, pEntry, sal_False, LIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); fillNames( xContainer, _eType, nImageId, nImageIdH, pRet ); } else @@ -1133,7 +1133,7 @@ sal_Bool OAppDetailPageHelper::isPreviewEnabled() return m_ePreviewMode != E_PREVIEWNONE; } // ----------------------------------------------------------------------------- -void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,BOOL _bForce) +void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,sal_Bool _bForce) { if ( m_ePreviewMode != _eMode || _bForce ) { @@ -1364,7 +1364,7 @@ void OAppDetailPageHelper::KeyInput( const KeyEvent& rKEvt ) OSL_PRECOND( pCurrentView, "OAppDetailPageHelper::KeyInput: how this?" ); KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction(); (void)eFunc; - USHORT nCode = rKEvt.GetKeyCode().GetCode(); + sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); if ( ( KEY_RETURN == nCode ) && pCurrentView ) { @@ -1436,11 +1436,11 @@ OPreviewWindow::OPreviewWindow(Window* _pParent) ImplInitSettings( sal_True, sal_True, sal_True ); } // ----------------------------------------------------------------------------- -BOOL OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const +sal_Bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const { const Size aWinSize( GetOutputSizePixel() ); Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( aNewSize.Width() && aNewSize.Height() ) { @@ -1463,7 +1463,7 @@ BOOL OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangl ( aWinSize.Height() - aNewSize.Height() ) >> 1 ); rResultRect = Rectangle( aNewPos, aNewSize ); - bRet = TRUE; + bRet = sal_True; } return bRet; diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index 9f3cadc56a44..0929bd8381f5 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -93,8 +93,8 @@ namespace dbaui @return when successfull */ - BOOL ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + sal_Bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const; + void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt); public: @@ -142,7 +142,7 @@ namespace dbaui /** retrieves the resource ids of the images representing elements of the given type */ - void getElementIcons( ElementType _eType, USHORT& _rImageId, USHORT& _rHighContrastImageId ); + void getElementIcons( ElementType _eType, sal_uInt16& _rImageId, sal_uInt16& _rHighContrastImageId ); /** fills the names in the listbox @param _xContainer @@ -158,8 +158,8 @@ namespace dbaui */ void fillNames( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xContainer, const ElementType _eType, - const USHORT _nImageId, - const USHORT _nHighContrastImageId, + const sal_uInt16 _nImageId, + const sal_uInt16 _nHighContrastImageId, SvLBoxEntry* _pParent ); /** sets the detail page @@ -374,7 +374,7 @@ namespace dbaui @param _bForce Force the preview to be resetted */ - void switchPreview(PreviewMode _eMode,BOOL _bForce = FALSE); + void switchPreview(PreviewMode _eMode,sal_Bool _bForce = sal_False); /** shows the Preview of the content when it is enabled. @param _xContent diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index dbe9ad112458..cb6dce9997ce 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -116,7 +116,7 @@ using ::com::sun::star::sdb::application::NamedDatabaseObject; #define SPACEBETWEENENTRIES 4 // ----------------------------------------------------------------------------- -TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, USHORT _nHelpID, USHORT _nTitleResourceID, bool _bHideWhenDisabled ) +TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sal_uInt16 _nTitleResourceID, bool _bHideWhenDisabled ) :sUNOCommand( ::rtl::OUString::createFromAscii( _pAsciiUNOCommand ) ) ,nHelpID( _nHelpID ) ,sTitle( ModuleRes( _nTitleResourceID ) ) @@ -131,7 +131,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent ) ,m_pMouseDownEntry( NULL ) ,m_pLastActiveEntry( NULL ) { - USHORT nSize = SPACEBETWEENENTRIES; + sal_uInt16 nSize = SPACEBETWEENENTRIES; SetSpaceBetweenEntries(nSize); SetSelectionMode( NO_SELECTION ); SetExtendedWinBits( EWB_NO_AUTO_CURENTRY ); @@ -161,7 +161,7 @@ void OCreationList::PreparePaint( SvLBoxEntry* _pEntry ) { // draw a selection background bool bIsMouseDownEntry = ( _pEntry == m_pMouseDownEntry ); - DrawSelectionBackground( GetBoundingRect( _pEntry ), bIsMouseDownEntry ? 1 : 2, FALSE, TRUE, FALSE ); + DrawSelectionBackground( GetBoundingRect( _pEntry ), bIsMouseDownEntry ? 1 : 2, sal_False, sal_True, sal_False ); if ( bIsMouseDownEntry ) { @@ -352,7 +352,7 @@ bool OCreationList::setCurrentEntryInvalidate( SvLBoxEntry* _pEntry ) // ----------------------------------------------------------------------------- void OCreationList::updateHelpText() { - USHORT nHelpTextId = 0; + sal_uInt16 nHelpTextId = 0; if ( GetCurEntry() ) nHelpTextId = reinterpret_cast< TaskEntry* >( GetCurEntry()->GetUserData() )->nHelpID; m_rTaskWindow.setHelpText( nHelpTextId ); @@ -471,7 +471,7 @@ void OTasksWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B m_aDescription.SetControlFont(aFont); } // ----------------------------------------------------------------------------- -void OTasksWindow::setHelpText(USHORT _nId) +void OTasksWindow::setHelpText(sal_uInt16 _nId) { DBG_CHKTHIS(OTasksWindow,NULL); if ( _nId ) @@ -569,7 +569,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList ) } m_aCreation.Show(); - m_aCreation.SelectAll(FALSE); + m_aCreation.SelectAll(sal_False); m_aHelpText.Show(); m_aDescription.Show(); m_aFL.Show(); diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index 460a4d1bc399..c110f90ed4fd 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -124,14 +124,14 @@ namespace dbaui struct TaskEntry { ::rtl::OUString sUNOCommand; - USHORT nHelpID; + sal_uInt16 nHelpID; String sTitle; bool bHideWhenDisabled; // TODO: we should be consistent in the task pane and the menus/toolbars: // If an entry is disabled in the latter, it should also be disabled in the former. // If an entry is *hidden* in the former, it should also be hidden in the latter. - TaskEntry( const sal_Char* _pAsciiUNOCommand, USHORT _nHelpID, USHORT _nTitleResourceID, bool _bHideWhenDisabled = false ); + TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sal_uInt16 _nTitleResourceID, bool _bHideWhenDisabled = false ); }; typedef ::std::vector< TaskEntry > TaskEntryList; @@ -140,7 +140,7 @@ namespace dbaui /// the tasks available in the pane TaskEntryList aTasks; /// the resource ID for the title of the pane - USHORT nTitleId; + sal_uInt16 nTitleId; }; class OTasksWindow : public Window @@ -152,7 +152,7 @@ namespace dbaui OApplicationDetailView* m_pDetailView; DECL_LINK( OnEntrySelectHdl, SvTreeListBox* ); - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt); public: @@ -173,7 +173,7 @@ namespace dbaui } void Clear(); - void setHelpText(USHORT _nId); + void setHelpText(sal_uInt16 _nId); }; //================================================================== class OApplicationDetailView : public OSplitterView @@ -187,7 +187,7 @@ namespace dbaui ::std::vector< TaskPaneData > m_aTaskPaneData; MnemonicGenerator m_aExternalMnemonics; - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt); diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx index 0e553cc1ffee..5476d3a2b6d1 100644 --- a/dbaccess/source/ui/app/AppIconControl.cxx +++ b/dbaccess/source/ui/app/AppIconControl.cxx @@ -68,10 +68,10 @@ OApplicationIconControl::OApplicationIconControl(Window* _pParent) struct CategoryDescriptor { - USHORT nLabelResId; + sal_uInt16 nLabelResId; ElementType eType; - USHORT nImageResId; - USHORT nImageResIdHC; + sal_uInt16 nImageResId; + sal_uInt16 nImageResIdHC; } aCategories[] = { { RID_STR_TABLES_CONTAINER, E_TABLE, IMG_TABLEFOLDER_TREE_L, IMG_TABLEFOLDER_TREE_LHC }, { RID_STR_QUERIES_CONTAINER, E_QUERY, IMG_QUERYFOLDER_TREE_L, IMG_QUERYFOLDER_TREE_LHC }, @@ -88,14 +88,14 @@ OApplicationIconControl::OApplicationIconControl(Window* _pParent) pEntry->SetUserData( new ElementType( aCategories[i].eType ) ); } - SetChoiceWithCursor( TRUE ); + SetChoiceWithCursor( sal_True ); SetSelectionMode(SINGLE_SELECTION); } // ----------------------------------------------------------------------------- OApplicationIconControl::~OApplicationIconControl() { - ULONG nCount = GetEntryCount(); - for ( ULONG i = 0; i < nCount; ++i ) + sal_uLong nCount = GetEntryCount(); + for ( sal_uLong i = 0; i < nCount; ++i ) { SvxIconChoiceCtrlEntry* pEntry = GetEntry( i ); if ( pEntry ) diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index ae9ca3f5d93e..6e3b4e85b4fe 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -75,7 +75,7 @@ OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWind ,m_rBorderWin( _rBorderWindow ) { DBG_CTOR(OApplicationSwapWindow,NULL); -// SetCompoundControl( TRUE ); +// SetCompoundControl( sal_True ); ImplInitSettings( sal_True, sal_True, sal_True ); @@ -83,7 +83,7 @@ OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWind m_aIconControl.setControlActionListener( &m_rBorderWin.getView()->getAppController() ); m_aIconControl.SetHelpId(HID_APP_SWAP_ICONCONTROL); m_aIconControl.Show(); - //m_aIconControl.Enable(TRUE); + //m_aIconControl.Enable(sal_True); } // ----------------------------------------------------------------------------- OApplicationSwapWindow::~OApplicationSwapWindow() @@ -143,7 +143,7 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt ) void OApplicationSwapWindow::clearSelection() { m_aIconControl.SetNoSelection(); - ULONG nPos = 0; + sal_uLong nPos = 0; SvxIconChoiceCtrlEntry* pEntry = m_aIconControl.GetSelectedEntry(nPos); if ( pEntry ) m_aIconControl.InvalidateEntry(pEntry); @@ -170,7 +170,7 @@ bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent ) // ----------------------------------------------------------------------------- ElementType OApplicationSwapWindow::getElementType() const { - ULONG nPos = 0; + sal_uLong nPos = 0; SvxIconChoiceCtrlEntry* pEntry = m_aIconControl.GetSelectedEntry(nPos); return ( pEntry ) ? *static_cast(pEntry->GetUserData()) : E_NONE; } @@ -195,7 +195,7 @@ bool OApplicationSwapWindow::onContainerSelected( ElementType _eType ) // ----------------------------------------------------------------------------- IMPL_LINK(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pControl) { - ULONG nPos = 0; + sal_uLong nPos = 0; SvxIconChoiceCtrlEntry* pEntry = _pControl->GetSelectedEntry( nPos ); ElementType eType = E_NONE; if ( pEntry ) @@ -215,9 +215,9 @@ IMPL_LINK(OApplicationSwapWindow, ChangeToLastSelected, void*, EMPTYARG) // ----------------------------------------------------------------------------- void OApplicationSwapWindow::selectContainer(ElementType _eType) { - ULONG nCount = m_aIconControl.GetEntryCount(); + sal_uLong nCount = m_aIconControl.GetEntryCount(); SvxIconChoiceCtrlEntry* pEntry = NULL; - for (ULONG i=0; i < nCount; ++i) + for (sal_uLong i=0; i < nCount; ++i) { pEntry = m_aIconControl.GetEntry(i); if ( pEntry && *static_cast(pEntry->GetUserData()) == _eType ) diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx index 9ce25817993f..9d4ce8d36814 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.hxx +++ b/dbaccess/source/ui/app/AppSwapWindow.hxx @@ -51,7 +51,7 @@ namespace dbaui ElementType m_eLastType; OAppBorderWindow& m_rBorderWin; - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); DECL_LINK( OnContainerSelectHdl, SvtIconChoiceCtrl* ); DECL_LINK( ChangeToLastSelected, void* ); @@ -72,8 +72,8 @@ namespace dbaui inline void cut() { } inline void paste() { } - inline ULONG GetEntryCount() const { return m_aIconControl.GetEntryCount(); } - inline SvxIconChoiceCtrlEntry* GetEntry( ULONG nPos ) const { return m_aIconControl.GetEntry(nPos); } + inline sal_uLong GetEntryCount() const { return m_aIconControl.GetEntryCount(); } + inline SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return m_aIconControl.GetEntry(nPos); } inline Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const { return m_aIconControl.GetBoundingBox(pEntry); } /** automatically creates mnemonics for the icon/texts in our left hand side panel diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index ae0f65d9aade..353281fda679 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -45,7 +45,7 @@ namespace dbaui { DBG_NAME(OTitleWindow) -OTitleWindow::OTitleWindow(Window* _pParent,USHORT _nTitleId,WinBits _nBits,BOOL _bShift) +OTitleWindow::OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,sal_Bool _bShift) : Window(_pParent,_nBits | WB_DIALOGCONTROL) , m_aSpace1(this) , m_aSpace2(this) @@ -108,7 +108,7 @@ void OTitleWindow::Resize() } } // ----------------------------------------------------------------------------- -void OTitleWindow::setTitle(USHORT _nTitleId) +void OTitleWindow::setTitle(sal_uInt16 _nTitleId) { if ( _nTitleId != 0 ) { diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx index 8efe8cd5dd9d..176d5d5785b9 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.hxx +++ b/dbaccess/source/ui/app/AppTitleWindow.hxx @@ -39,12 +39,12 @@ namespace dbaui FixedText m_aSpace2; FixedText m_aTitle; Window* m_pChild; - BOOL m_bShift; - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + sal_Bool m_bShift; + void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt); public: - OTitleWindow(Window* _pParent,USHORT _nTitleId,WinBits _nBits,BOOL _bShift = TRUE); + OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits,sal_Bool _bShift = sal_True); virtual ~OTitleWindow(); // window overloads @@ -68,7 +68,7 @@ namespace dbaui @param _nTitleId The resource id of the title text. */ - void setTitle(USHORT _nTitleId); + void setTitle(sal_uInt16 _nTitleId); /** Gets the min Width in Pixel which is needed to display the whole diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index e049f60d0f13..ee8385bb7129 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -134,7 +134,7 @@ OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePrev SetBorderStyle(WINDOW_BORDER_MONO); - m_pPanel = new OTitleWindow(this,STR_DATABASE,WB_BORDER | WB_DIALOGCONTROL ,FALSE); + m_pPanel = new OTitleWindow(this,STR_DATABASE,WB_BORDER | WB_DIALOGCONTROL ,sal_False); m_pPanel->SetBorderStyle(WINDOW_BORDER_MONO); OApplicationSwapWindow* pSwap = new OApplicationSwapWindow( m_pPanel, *this ); pSwap->Show(); diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index 44a6b40e1f2f..358e5b99e9be 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -357,8 +357,8 @@ long UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) { const KeyEvent* pKeyEvt = rNEvt.GetKeyEvent(); const KeyCode& rKeyCode = pKeyEvt->GetKeyCode(); - if ( ( rKeyCode == KeyCode( KEY_E, TRUE, TRUE, FALSE, FALSE ) ) - || ( rKeyCode == KeyCode( KEY_TAB, TRUE, FALSE, FALSE, FALSE ) ) + if ( ( rKeyCode == KeyCode( KEY_E, sal_True, sal_True, sal_False, sal_False ) ) + || ( rKeyCode == KeyCode( KEY_TAB, sal_True, sal_False, sal_False, sal_False ) ) ) { if ( m_pTreeView && m_pVclControl && m_pTreeView->HasChildPathFocus() ) diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx index 972f9be83934..8e7131d129b4 100644 --- a/dbaccess/source/ui/browser/dbexchange.cxx +++ b/dbaccess/source/ui/browser/dbexchange.cxx @@ -179,7 +179,7 @@ namespace dbaui // ----------------------------------------------------------------------------- sal_Bool ODataClipboard::GetData( const DataFlavor& rFlavor ) { - const ULONG nFormat = SotExchange::GetFormat(rFlavor); + const sal_uLong nFormat = SotExchange::GetFormat(rFlavor); switch (nFormat) { case SOT_FORMAT_RTF: diff --git a/dbaccess/source/ui/browser/dbtreemodel.hxx b/dbaccess/source/ui/browser/dbtreemodel.hxx index 8894f85ce430..33186543afab 100644 --- a/dbaccess/source/ui/browser/dbtreemodel.hxx +++ b/dbaccess/source/ui/browser/dbtreemodel.hxx @@ -51,8 +51,8 @@ // tables holds the nameaccess for the tables // table holds the table -#define CONTAINER_QUERIES ULONG( 0 ) -#define CONTAINER_TABLES ULONG( 1 ) +#define CONTAINER_QUERIES sal_uLong( 0 ) +#define CONTAINER_TABLES sal_uLong( 1 ) namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; } } } } diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx index 5fb5b0f985c6..af9d43d226ef 100644 --- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx +++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx @@ -264,8 +264,8 @@ void SbaTableQueryBrowser::notifyHiContrastChanged() } // find the proper item, and set its icons - USHORT nCount = pEntryLoop->ItemCount(); - for (USHORT i=0;iItemCount(); + for (sal_uInt16 i=0;iGetItem(i); if ( !pItem || ( pItem->IsA() != SV_ITEM_ID_LBOXCONTEXTBMP ) ) diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index b81b073a56bf..7115ffa5636c 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -403,7 +403,7 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen throw RuntimeException( ::rtl::OUString::createFromAscii( "unable to create a view" ), *this ); if ( m_bReadOnly || m_bPreview ) - pView->EnableInput( FALSE ); + pView->EnableInput( sal_False ); impl_initialize(); } diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index bb0784c0ce53..be86427f2802 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -936,7 +936,7 @@ SbaGridControl::SbaGridControl(Reference< XMultiServiceFactory > _rM, :FmGridControl(_rM,pParent, _pPeer, nBits) ,m_pMasterListener(NULL) ,m_nAsyncDropEvent(0) - ,m_nCurrentActionColId((USHORT)-1) + ,m_nCurrentActionColId((sal_uInt16)-1) ,m_bActivatingForDrop(sal_False) { DBG_CTOR(SbaGridControl ,NULL); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index c65055c582fc..b8837aac6c25 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -480,8 +480,8 @@ void SbaTableQueryBrowser::initializePreviewMode() { if ( getBrowserView() && getBrowserView()->getVclControl() ) { - getBrowserView()->getVclControl()->AlwaysEnableInput( FALSE ); - getBrowserView()->getVclControl()->EnableInput( FALSE ); + getBrowserView()->getVclControl()->AlwaysEnableInput( sal_False ); + getBrowserView()->getVclControl()->EnableInput( sal_False ); getBrowserView()->getVclControl()->ForceHideScrollbars( sal_True ); } Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY); @@ -2006,7 +2006,7 @@ void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDb m_pTreeView->getListBox().InsertEntry( _rQueryName, _rQueryImage, _rQueryImage, pDatasourceEntry, - TRUE /*ChildsOnDemand*/, LIST_APPEND, pQueriesData ); + sal_True /*ChildsOnDemand*/, LIST_APPEND, pQueriesData ); } // the child for the tables container @@ -2016,7 +2016,7 @@ void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDb m_pTreeView->getListBox().InsertEntry( _rTableName, _rTableImage, _rTableImage, pDatasourceEntry, - TRUE /*ChildsOnDemand*/, LIST_APPEND, pTablesData ); + sal_True /*ChildsOnDemand*/, LIST_APPEND, pTablesData ); } } diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx index 69f31bc1bfc2..9462330960b6 100644 --- a/dbaccess/source/ui/control/ColumnControlWindow.cxx +++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx @@ -106,7 +106,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 c5c2a084b64a..f04dbb3471b6 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -816,7 +816,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}, @@ -1081,7 +1081,7 @@ void OFieldDescControl::InitializeControl(Control* _pControl,const ::rtl::OStrin _pControl->EnableClipSiblings(); } // ----------------------------------------------------------------------------- -FixedText* OFieldDescControl::CreateText(USHORT _nTextRes) +FixedText* OFieldDescControl::CreateText(sal_uInt16 _nTextRes) { FixedText* pFixedText = new FixedText( this ); pFixedText->SetText( ModuleRes(_nTextRes) ); @@ -1089,13 +1089,13 @@ FixedText* OFieldDescControl::CreateText(USHORT _nTextRes) return pFixedText; } // ----------------------------------------------------------------------------- -OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(USHORT _nHelpStr,short _nProperty,const rtl::OString& _sHelpId) +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,_sHelpId,false); @@ -1537,7 +1537,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 ca94faeb56f8..e9f6eb6bb2e4 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -108,14 +108,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(); @@ -141,16 +141,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(); @@ -222,7 +222,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() @@ -261,20 +261,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(); @@ -301,19 +301,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; @@ -334,7 +334,7 @@ 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); @@ -372,22 +372,22 @@ namespace dbaui } //------------------------------------------------------------------------------ - 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 ); @@ -405,7 +405,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 @@ -434,7 +434,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(); @@ -670,7 +670,7 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent if ( pLines->size() >= static_cast(m_pRC_Tables->GetRowCount()) ) { m_pRC_Tables->DeactivateCell(); - m_pRC_Tables->RowInserted(m_pRC_Tables->GetRowCount(), pLines->size() - static_cast(m_pRC_Tables->GetRowCount()) + 1, TRUE); + m_pRC_Tables->RowInserted(m_pRC_Tables->GetRowCount(), pLines->size() - static_cast(m_pRC_Tables->GetRowCount()) + 1, sal_True); m_pRC_Tables->ActivateCell(); } } @@ -726,9 +726,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 679179f3f4ab..1c12baf1eabb 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -63,14 +63,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) @@ -82,13 +82,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); @@ -161,11 +161,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(); @@ -221,17 +221,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); } @@ -243,16 +243,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 { @@ -291,7 +291,7 @@ BOOL OTableGrantControl::SaveModified() } catch(SQLException& e) { - bErg = FALSE; + bErg = sal_False; ::dbaui::showError(::dbtools::SQLExceptionInfo(e),GetParent(),m_xORB); } if(bErg && Controller().Is()) @@ -303,7 +303,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) @@ -318,7 +318,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]; @@ -329,7 +329,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); } } // ----------------------------------------------------------------------------- @@ -364,7 +364,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) @@ -406,7 +406,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); @@ -434,7 +434,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; @@ -443,7 +443,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); @@ -453,7 +453,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 { @@ -494,11 +494,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 89ce1e82e9dd..94590e081574 100644 --- a/dbaccess/source/ui/control/charsetlistbox.cxx +++ b/dbaccess/source/ui/control/charsetlistbox.cxx @@ -97,7 +97,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 7ef087172807..dab16df4e0dd 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -43,7 +43,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) @@ -146,7 +146,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 bc7d5d7d6364..bb5c4bb0b87a 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -128,7 +128,7 @@ DBTreeListBox::DBTreeListBox( Window* pParent, const Reference< XMultiServiceFac // ----------------------------------------------------------------------------- void DBTreeListBox::init() { - USHORT nSize = SPACEBETWEENENTRIES; + sal_uInt16 nSize = SPACEBETWEENENTRIES; SetSpaceBetweenEntries(nSize); m_aTimer.SetTimeout(900); @@ -157,8 +157,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(pChilds->GetObject(i)); SvLBoxString* pItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); @@ -382,7 +382,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) @@ -444,12 +444,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; @@ -461,11 +461,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 @@ -502,12 +502,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 ) { @@ -534,14 +534,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 ) @@ -550,7 +550,7 @@ namespace continue; } // if ( pPopup ) - 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 ); @@ -567,19 +567,19 @@ namespace void lcl_insertMenuItemImages( Menu& _rMenu, IController& _rCommandController ) { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - const BOOL bHiContrast = rSettings.GetHighContrastMode(); + const sal_Bool bHiContrast = rSettings.GetHighContrastMode(); uno::Reference< frame::XController > xController = _rCommandController.getXController(); 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 ) @@ -589,7 +589,7 @@ namespace } // if ( pPopup ) if ( xFrame.is() ) - _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,FALSE,bHiContrast)); + _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,sal_False,bHiContrast)); } } // ========================================================================= @@ -733,7 +733,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 51cbd39cbb42..a19ac8d0e5b4 100644 --- a/dbaccess/source/ui/control/listviewitems.cxx +++ b/dbaccess/source/ui/control/listviewitems.cxx @@ -56,7 +56,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 a97130c74dff..3430a0ef1cad 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -227,8 +227,8 @@ namespace dbaui // Place icon left of text and both centered in the button. SetModeImage( GetCommandIcon( ".uno:Open", m_sModule ), BMP_COLOR_NORMAL ); - EnableImageDisplay( TRUE ); - EnableTextDisplay( TRUE ); + EnableImageDisplay( sal_True ); + EnableTextDisplay( sal_True ); SetImageAlign( IMAGEALIGN_LEFT ); SetStyle( GetStyle() | WB_CENTER ); } @@ -287,7 +287,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 ) ) ); } } @@ -302,7 +302,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; @@ -312,14 +312,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 ); DBG_ASSERT( pos != m_aURLs.end(), "OpenDocumentListBox::impl_getDocumentAtIndex: invalid index!" ); @@ -346,7 +346,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 89cdc855a0cd..c550f2830d1e 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -68,7 +68,7 @@ OSqlEdit::OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle ) : m_ColorConfig.AddListener(this); //#i97044# - EnableFocusSelectionHide( FALSE ); + EnableFocusSelectionHide( sal_False ); } //------------------------------------------------------------------------------ diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 72db2ee129df..d43126d74c29 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -174,8 +174,8 @@ void OTableTreeListBox::notifyHiContrastChanged() SvLBoxEntry* pEntryLoop = First(); while (pEntryLoop) { - USHORT nCount = pEntryLoop->ItemCount(); - for (USHORT i=0;iItemCount(); + for (sal_uInt16 i=0;iGetItem(i); if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXCONTEXTBMP) @@ -349,7 +349,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn sRootEntryText = String(ModuleRes(STR_ALL_VIEWS)); else sRootEntryText = String(ModuleRes(STR_ALL_TABLES_AND_VIEWS)); - pAllObjects = InsertEntry( sRootEntryText, NULL, FALSE, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) ); + pAllObjects = InsertEntry( sRootEntryText, NULL, sal_False, LIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) ); } if ( _rTables.empty() ) @@ -395,7 +395,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 ) ); } } } @@ -533,7 +533,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; } @@ -541,14 +541,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, aImageHC; m_pImageProvider->getImages( _rTableName, DatabaseObject::TABLE, aImage, aImageHC ); diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx index 4806ca814c0c..354446c7e9df 100644 --- a/dbaccess/source/ui/control/toolboxcontroller.cxx +++ b/dbaccess/source/ui/control/toolboxcontroller.cxx @@ -106,7 +106,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)); @@ -179,10 +179,10 @@ namespace dbaui ToolBox* pToolBox = static_cast(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; @@ -206,10 +206,10 @@ namespace dbaui if ( m_aCommandURL == aFind->first && !Event.IsEnabled ) { ::std::auto_ptr 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 ) { @@ -245,13 +245,13 @@ namespace dbaui nImageType |= ImageType::COLOR_HIGHCONTRAST; 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 > aImages = xImageMgr->getImages(nImageType,aSeq); @@ -285,7 +285,7 @@ namespace dbaui ToolBox* pToolBox = static_cast(VCLUnoHelper::GetWindow(getParent())); ::std::auto_ptr 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 ); diff --git a/dbaccess/source/ui/dlg/AdabasStat.cxx b/dbaccess/source/ui/dlg/AdabasStat.cxx index a17de64c5891..7dd769be3131 100644 --- a/dbaccess/source/ui/dlg/AdabasStat.cxx +++ b/dbaccess/source/ui/dlg/AdabasStat.cxx @@ -148,8 +148,8 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent, double nUsedPages = xRow->getInt(1) / 256; double nFreePages = xRow->getInt(2) / 256; - m_ET_SIZE.SetText(::rtl::OUString::valueOf((INT32)nUsedPages)); - m_ET_FREESIZE.SetText(::rtl::OUString::valueOf((INT32)nFreePages)); + m_ET_SIZE.SetText(::rtl::OUString::valueOf((sal_Int32)nUsedPages)); + m_ET_FREESIZE.SetText(::rtl::OUString::valueOf((sal_Int32)nFreePages)); m_ET_MEMORYUSING.SetValue(static_cast(((nUsedPages-nFreePages)/nUsedPages)*100)); } else diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index f9762833641e..a8609d03348d 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -271,7 +271,7 @@ IMPL_LINK( OCollectionView, Save_Click, PushButton*, EMPTYARG ) // xNameContainer->removeByName(sName); } m_aName.SetText(sName); - EndDialog( TRUE ); + EndDialog( sal_True ); } } catch( const Exception& ) @@ -358,7 +358,7 @@ IMPL_LINK( OCollectionView, Dbl_Click_FileView, SvtFileView*, EMPTYARG ) // ----------------------------------------------------------------------------- void OCollectionView::initCurrentPath() { - BOOL bEnable = FALSE; + sal_Bool bEnable = sal_False; try { if ( m_xContent.is() ) diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx index 2d6fef74c598..6406b9547427 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx @@ -81,7 +81,7 @@ namespace dbaui public: static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet ); - virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs); + virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index f53054d37339..f739913850b5 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -211,7 +211,7 @@ namespace dbaui //= OConnectionTabPageSetup //======================================================================== DBG_NAME(OConnectionTabPageSetup) - OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, USHORT _rId, const SfxItemSet& _rCoreAttrs, USHORT _nHelpTextResId, USHORT _nHeaderResId, USHORT _nUrlResId) + OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId) :OConnectionHelper(pParent, ModuleRes(_rId), _rCoreAttrs) ,m_bUserGrabFocus(sal_True) ,m_aFT_HelpText(this, ModuleRes(FT_AUTOWIZARDHELPTEXT)) diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index 79a16c880c54..01f25b1ac175 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -86,7 +86,7 @@ namespace dbaui static OGenericAdministrationPage* CreateUserDefinedTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); - virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs); + virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); @@ -104,7 +104,7 @@ namespace dbaui protected: - OConnectionTabPageSetup(Window* pParent, USHORT _rId, const SfxItemSet& _rCoreAttrs, USHORT _nHelpTextResId, USHORT _nHeaderResId, USHORT _nUrlResId); + OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId); virtual bool checkTestConnection(); // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten virtual ~OConnectionTabPageSetup(); diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index cfc3deda1149..b8d9d2fb77e3 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -385,7 +385,7 @@ DBG_NAME(OMySQLIntroPageSetup) // ----------------------------------------------------------------------- - BOOL OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/) + sal_Bool OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/) { OSL_ENSURE(sal_False,"Who called me?! Please ask oj for more information."); return sal_True; @@ -473,7 +473,7 @@ DBG_NAME(OMySQLIntroPageSetup) //======================================================================== //= OMySQLJDBCConnectionPageSetup //======================================================================== - OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( Window* pParent,USHORT _nResId, const SfxItemSet& _rCoreAttrs ,USHORT _nPortId, USHORT _nDefaultPortResId, USHORT _nHelpTextResId, USHORT _nHeaderTextResId, USHORT _nDriverClassId) + OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( Window* pParent,sal_uInt16 _nResId, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, sal_uInt16 _nDefaultPortResId, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderTextResId, sal_uInt16 _nDriverClassId) :OGenericAdministrationPage(pParent, ModuleRes(_nResId), _rCoreAttrs) ,m_aFTHelpText (this, ModuleRes(FT_AUTOWIZARDHELPTEXT)) ,m_aFTDatabasename (this, ModuleRes(FT_AUTODATABASENAME)) @@ -631,7 +631,7 @@ DBG_NAME(OMySQLIntroPageSetup) { } - USHORT nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; + sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() ); aMsg.Execute(); return 0L; @@ -726,7 +726,7 @@ DBG_NAME(OMySQLIntroPageSetup) bool OJDBCConnectionPageSetup::checkTestConnection() { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - BOOL bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0); + sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0); bEnableTestConnection = bEnableTestConnection && (m_aETDriverClass.GetText().Len() != 0); return bEnableTestConnection; // m_aTestConnection.Enable(bEnableTestConnection); @@ -751,7 +751,7 @@ DBG_NAME(OMySQLIntroPageSetup) { } - USHORT nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; + sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() ); aMsg.Execute(); return 0L; diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx index 1ba67e19b9e2..441bd61fd61d 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -58,7 +58,7 @@ namespace dbaui class OSpreadSheetConnectionPageSetup : public OConnectionTabPageSetup { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); static OGenericAdministrationPage* CreateSpreadSheetTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); OSpreadSheetConnectionPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs); @@ -79,7 +79,7 @@ namespace dbaui class OTextConnectionPageSetup : public OConnectionTabPageSetup { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); static OGenericAdministrationPage* CreateTextTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); OTextConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs ); OTextConnectionHelper* m_pTextConnectionHelper; @@ -103,7 +103,7 @@ namespace dbaui class OLDAPConnectionPageSetup : public OGenericAdministrationPage { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); static OGenericAdministrationPage* CreateLDAPTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); OLDAPConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs ); virtual Link getControlModifiedLink() { return LINK(this, OLDAPConnectionPageSetup, OnEditModified); } @@ -146,7 +146,7 @@ namespace dbaui virtual void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList ); virtual void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ); - virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs ); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); virtual Link getControlModifiedLink(); @@ -162,18 +162,18 @@ namespace dbaui { public: OGeneralSpecialJDBCConnectionPageSetup( Window* pParent - , USHORT _nResId + , sal_uInt16 _nResId , const SfxItemSet& _rCoreAttrs - , USHORT _nPortId - , USHORT _nDefaultPortResId - , USHORT _nHelpTextResId - , USHORT _nHeaderTextResId - , USHORT _nDriverClassId ); + , sal_uInt16 _nPortId + , sal_uInt16 _nDefaultPortResId + , sal_uInt16 _nHelpTextResId + , sal_uInt16 _nHeaderTextResId + , sal_uInt16 _nDriverClassId ); static OGenericAdministrationPage* CreateMySQLJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); static OGenericAdministrationPage* CreateOracleJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); protected: - virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs ); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); @@ -196,7 +196,7 @@ namespace dbaui PushButton m_aPBTestJavaDriver; String m_sDefaultJdbcDriverName; - USHORT m_nPortId; + sal_uInt16 m_nPortId; }; @@ -212,7 +212,7 @@ namespace dbaui protected: virtual bool checkTestConnection(); - virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs ); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); @@ -252,7 +252,7 @@ namespace dbaui protected: - virtual BOOL FillItemSet(SfxItemSet& _rSet); + virtual sal_Bool FillItemSet(SfxItemSet& _rSet); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); @@ -279,7 +279,7 @@ namespace dbaui class OAuthentificationPageSetup : public OGenericAdministrationPage { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); static OGenericAdministrationPage* CreateAuthentificationTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); OAuthentificationPageSetup(Window* pParent, const SfxItemSet& _rCoreAttrs); @@ -306,7 +306,7 @@ namespace dbaui class OFinalDBPageSetup : public OGenericAdministrationPage { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); static OGenericAdministrationPage* CreateFinalDBTabPageSetup( Window* pParent, const SfxItemSet& _rAttrSet); FixedText m_aFTFinalHeader; diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 797cb73eb021..6863f1601adc 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -104,7 +104,7 @@ using namespace com::sun::star::frame; //------------------------------------------------------------------------- namespace { - sal_Bool implCheckItemType( SfxItemSet& _rSet, const USHORT _nId, const TypeId _nExpectedItemType ) + sal_Bool implCheckItemType( SfxItemSet& _rSet, const sal_uInt16 _nId, const TypeId _nExpectedItemType ) { sal_Bool bCorrectType = sal_False; @@ -723,7 +723,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r ++aDirect ) { - const SfxPoolItem* pCurrentItem = _rSource.GetItem((USHORT)aDirect->first); + const SfxPoolItem* pCurrentItem = _rSource.GetItem((sal_uInt16)aDirect->first); if (pCurrentItem) { sal_Int16 nAttributes = PropertyAttribute::READONLY; @@ -782,7 +782,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS ::std::vector< sal_Int32>::iterator aDetailsEnd = aDetailIds.end(); for (::std::vector< sal_Int32>::iterator aIter = aDetailIds.begin();aIter != aDetailsEnd ; ++aIter) { - const SfxPoolItem* pCurrent = _rSource.GetItem((USHORT)*aIter); + const SfxPoolItem* pCurrent = _rSource.GetItem((sal_uInt16)*aIter); aTranslation = m_aIndirectPropTranslator.find(*aIter); if ( pCurrent && (m_aIndirectPropTranslator.end() != aTranslation) ) { @@ -1115,7 +1115,7 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest) ::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection(); DBG_ASSERT(pCollection, "ODbAdminDialog::getDatasourceType: invalid type collection!"); - USHORT nPortNumberId = 0; + sal_uInt16 nPortNumberId = 0; sal_Int32 nPortNumber = -1; String sNewHostName; //String sUrl = pCollection->cutPrefix(pUrlItem->GetValue()); diff --git a/dbaccess/source/ui/dlg/DriverSettings.cxx b/dbaccess/source/ui/dlg/DriverSettings.cxx index cecdc49aff8e..b94db6114e8e 100644 --- a/dbaccess/source/ui/dlg/DriverSettings.cxx +++ b/dbaccess/source/ui/dlg/DriverSettings.cxx @@ -77,7 +77,7 @@ void ODriversSettings::getSupportedIndirectSettings( const ::rtl::OUString& _sUR } } #endif - typedef ::std::pair TProperties; + typedef ::std::pair TProperties; TProperties aProps[] = { TProperties(DSID_SHOWDELETEDROWS,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowDeleted"))) ,TProperties(DSID_CHARSET,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharSet"))) ,TProperties(DSID_FIELDDELIMITER,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FieldDelimiter"))) diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx index d24a1d87dee1..f4e924f4edd3 100644 --- a/dbaccess/source/ui/dlg/RelationDlg.cxx +++ b/dbaccess/source/ui/dlg/RelationDlg.cxx @@ -97,7 +97,7 @@ DBG_NAME(ORelationDialog) //======================================================================== ORelationDialog::ORelationDialog( OJoinTableView* pParent, const TTableConnectionData::value_type& pConnectionData, - BOOL bAllowTableSelect ) + sal_Bool bAllowTableSelect ) :ModalDialog( pParent, ModuleRes(DLG_REL_PROPERTIES) ) ,m_pTableMap(pParent->GetTabWinMap()) @@ -117,7 +117,7 @@ ORelationDialog::ORelationDialog( OJoinTableView* pParent, ,aPB_HELP( this, ModuleRes( PB_HELP ) ) ,m_pOrigConnData( pConnectionData ) - ,m_bTriedOneUpdate(FALSE) + ,m_bTriedOneUpdate(sal_False) { DBG_CTOR(ORelationDialog,NULL); @@ -155,18 +155,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD { case KeyRule::NO_ACTION: case KeyRule::RESTRICT: - aRB_NoCascUpd.Check( TRUE ); + aRB_NoCascUpd.Check( sal_True ); break; case KeyRule::CASCADE: - aRB_CascUpd.Check( TRUE ); + aRB_CascUpd.Check( sal_True ); break; case KeyRule::SET_NULL: - aRB_CascUpdNull.Check( TRUE ); + aRB_CascUpdNull.Check( sal_True ); break; case KeyRule::SET_DEFAULT: - aRB_CascUpdDefault.Check( TRUE ); + aRB_CascUpdDefault.Check( sal_True ); break; } @@ -175,18 +175,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD { case KeyRule::NO_ACTION: case KeyRule::RESTRICT: - aRB_NoCascDel.Check( TRUE ); + aRB_NoCascDel.Check( sal_True ); break; case KeyRule::CASCADE: - aRB_CascDel.Check( TRUE ); + aRB_CascDel.Check( sal_True ); break; case KeyRule::SET_NULL: - aRB_CascDelNull.Check( TRUE ); + aRB_CascDelNull.Check( sal_True ); break; case KeyRule::SET_DEFAULT: - aRB_CascDelDefault.Check( TRUE ); + aRB_CascDelDefault.Check( sal_True ); break; } } @@ -205,7 +205,7 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ ) { ////////////////////////////////////////////////////////////////////// // RadioButtons auslesen - UINT16 nAttrib = 0; + sal_uInt16 nAttrib = 0; // Delete Rules if( aRB_NoCascDel.IsChecked() ) @@ -234,7 +234,7 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ ) m_pTableControl->SaveModified(); - //// wenn die ComboBoxen fuer die Tabellenauswahl enabled sind (Constructor mit bAllowTableSelect==TRUE), dann muss ich in die + //// wenn die ComboBoxen fuer die Tabellenauswahl enabled sind (Constructor mit bAllowTableSelect==sal_True), dann muss ich in die //// Connection auch die Tabellennamen stecken //m_pConnData->SetSourceWinName(m_pTableControl->getSourceWinName()); //m_pConnData->SetDestWinName(m_pTableControl->getDestWinName()); @@ -261,7 +261,7 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ ) DBG_UNHANDLED_EXCEPTION(); } - m_bTriedOneUpdate = TRUE; + m_bTriedOneUpdate = sal_True; // this means that the original connection may be lost (if m_pConnData was not a newly created but an // existent conn to be modified), which we reflect by returning RET_NO (see ::Execute) diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx index 37f28bcaa828..17c180b04eec 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx +++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx @@ -133,7 +133,7 @@ DBG_NAME(OUserAdminDlg) return nRet; } //------------------------------------------------------------------------- - void OUserAdminDlg::PageCreated(USHORT _nId, SfxTabPage& _rPage) + void OUserAdminDlg::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) { // register ourself as modified listener static_cast(_rPage).SetServiceFactory(m_pImpl->getORB()); diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx index 463358e179d5..71282c879bf6 100755 --- a/dbaccess/source/ui/dlg/admincontrols.cxx +++ b/dbaccess/source/ui/dlg/admincontrols.cxx @@ -78,7 +78,7 @@ namespace dbaui private: const String m_sDisabledText; String m_sUserText; - BOOL m_bLastKnownEnabledState; + sal_Bool m_bLastKnownEnabledState; }; //-------------------------------------------------------------------- @@ -150,7 +150,7 @@ namespace dbaui //==================================================================== //-------------------------------------------------------------------- MySQLNativeSettings::MySQLNativeSettings( Window& _rParent, const Link& _rControlModificationLink ) - :Control( &_rParent, ModuleRes( RID_MYSQL_NATIVE_SETTINGS ).SetAutoRelease( FALSE ) ) + :Control( &_rParent, ModuleRes( RID_MYSQL_NATIVE_SETTINGS ).SetAutoRelease( sal_False ) ) ,m_aDatabaseNameLabel ( this, ModuleRes( FT_MYSQL_DATABASE_NAME ) ) ,m_aDatabaseName ( this, ModuleRes( ED_MYSQL_DATABASE_NAME ) ) ,m_aHostPortRadio ( this, ModuleRes( RB_MYSQL_HOST_PORT ) ) @@ -218,7 +218,7 @@ namespace dbaui } //-------------------------------------------------------------------- - BOOL MySQLNativeSettings::FillItemSet( SfxItemSet& _rSet ) + sal_Bool MySQLNativeSettings::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = sal_False; diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx index e4526dffb8d2..70ee08d5ca28 100755 --- a/dbaccess/source/ui/dlg/admincontrols.hxx +++ b/dbaccess/source/ui/dlg/admincontrols.hxx @@ -69,7 +69,7 @@ namespace dbaui void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList ); void fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ); - BOOL FillItemSet( SfxItemSet& _rCoreAttrs ); + sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs ); void implInitControls( const SfxItemSet& _rSet ); bool canAdvance() const; diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index d19052525a76..a023ed240eaa 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -214,7 +214,7 @@ namespace dbaui return true; } // ----------------------------------------------------------------------- - void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, USHORT _nID, sal_Bool& _bChangedSomething, bool _bRevertValue ) + void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, sal_uInt16 _nID, sal_Bool& _bChangedSomething, bool _bRevertValue ) { if ( (_pCheckBox != NULL ) && ( _pCheckBox->GetState() != _pCheckBox->GetSavedValue() ) ) { @@ -236,16 +236,16 @@ namespace dbaui } } // ----------------------------------------------------------------------- - void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,USHORT _nID,sal_Bool& _bChangedSomething) + void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething) { if( (_pEdit != NULL) && (_pEdit->GetValue() != _pEdit->GetSavedValue().ToInt32()) ) { - _rSet.Put(SfxInt32Item(_nID, static_cast(_pEdit->GetValue()))); + _rSet.Put(SfxInt32Item(_nID, static_cast(_pEdit->GetValue()))); _bChangedSomething = sal_True; } } // ----------------------------------------------------------------------- - void OGenericAdministrationPage::fillString(SfxItemSet& _rSet,Edit* _pEdit,USHORT _nID,sal_Bool& _bChangedSomething) + void OGenericAdministrationPage::fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething) { if( (_pEdit != NULL) && (_pEdit->GetText() != _pEdit->GetSavedValue()) ) { @@ -304,7 +304,7 @@ namespace dbaui return 0L; } - void OGenericAdministrationPage::SetHeaderText( USHORT _nFTResId, USHORT _StringResId) + void OGenericAdministrationPage::SetHeaderText( sal_uInt16 _nFTResId, sal_uInt16 _StringResId) { delete(m_pFT_HeaderText); m_pFT_HeaderText = new FixedText(this, ModuleRes(_nFTResId)); diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index be6b923c2997..c3773b8109cd 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -227,7 +227,7 @@ namespace dbaui @param _bRevertValue set to if the display value should be reverted before putting it into the set */ - static void fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, USHORT _nID, sal_Bool& _bChangedSomething, bool _bRevertValue = false); + static void fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, sal_uInt16 _nID, sal_Bool& _bChangedSomething, bool _bRevertValue = false); /** fills the int value into the item set when the value changed. @param _rSet @@ -239,7 +239,7 @@ namespace dbaui @param _bChangedSomething if something changed otherwise */ - static void fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,USHORT _nID,sal_Bool& _bChangedSomething); + static void fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething); /** fills the String value into the item set when the value changed. @param _rSet @@ -251,12 +251,12 @@ namespace dbaui @param _bChangedSomething if something changed otherwise */ - static void fillString(SfxItemSet& _rSet,Edit* _pEdit,USHORT _nID,sal_Bool& _bChangedSomething); + static void fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething); protected: // used to set the right Pane header of a wizard to bold void SetControlFontWeight(Window* _pWindow, FontWeight _eWeight = WEIGHT_BOLD); - void SetHeaderText( USHORT _nFTResId, USHORT _StringResId); + void SetHeaderText( sal_uInt16 _nFTResId, sal_uInt16 _StringResId); /** This link be used for controls where the tabpage does not need to take any special action when the control is modified. The implementation just calls callModifiedHdl. diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index 4b7005976778..760bd7b3f4ab 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -175,7 +175,7 @@ BSTR PromptEdit(long hWnd,BSTR connstr) // Prompt for connection information. hr = dlPrompt->PromptEdit((IDispatch **)&piTmpConnection,&pbSuccess); - if( SUCCEEDED( hr ) && FALSE == pbSuccess ) //if user press cancel then FALSE == pbSuccess + if( SUCCEEDED( hr ) && sal_False == pbSuccess ) //if user press cancel then sal_False == pbSuccess { piTmpConnection->Release( ); dlPrompt->Release( ); diff --git a/dbaccess/source/ui/dlg/adodatalinks.hxx b/dbaccess/source/ui/dlg/adodatalinks.hxx index 7daf5cda61e0..2084bb850402 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.hxx +++ b/dbaccess/source/ui/dlg/adodatalinks.hxx @@ -36,4 +36,4 @@ #endif ::rtl::OUString getAdoDatalink(long hWnd,::rtl::OUString& oldLink); -#endif \ No newline at end of file +#endif diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 4ef32efcc7ac..55f4a25fc6e1 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -376,7 +376,7 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) m_aQueryList.SetSelectHdl( LINK( this, OAddTableDlg, TableListSelectHdl ) ); ////////////////////////////////////////////////////////////////////// - m_aTableList.EnableInplaceEditing( FALSE ); + m_aTableList.EnableInplaceEditing( sal_False ); m_aTableList.SetStyle(m_aTableList.GetStyle() | WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL ); m_aTableList.EnableCheckButton( NULL ); // do not show any buttons m_aTableList.SetSelectionMode( SINGLE_SELECTION ); @@ -384,7 +384,7 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) m_aTableList.suppressEmptyFolders(); ////////////////////////////////////////////////////////////////////// - m_aQueryList.EnableInplaceEditing( FALSE ); + m_aQueryList.EnableInplaceEditing( sal_False ); m_aQueryList.SetSelectionMode( SINGLE_SELECTION ); ////////////////////////////////////////////////////////////////////// @@ -421,15 +421,15 @@ void OAddTableDlg::impl_switchTo( ObjectList _eList ) switch ( _eList ) { case Tables: - m_aTableList.Show( TRUE ); m_aCaseTables.Check( TRUE ); - m_aQueryList.Show( FALSE ); m_aCaseQueries.Check( FALSE ); + m_aTableList.Show( sal_True ); m_aCaseTables.Check( sal_True ); + m_aQueryList.Show( sal_False ); m_aCaseQueries.Check( sal_False ); m_pCurrentList.reset( new TableListFacade( m_aTableList, m_rContext.getConnection() ) ); m_aTableList.GrabFocus(); break; case Queries: - m_aTableList.Show( FALSE ); m_aCaseTables.Check( FALSE ); - m_aQueryList.Show( TRUE ); m_aCaseQueries.Check( TRUE ); + m_aTableList.Show( sal_False ); m_aCaseTables.Check( sal_False ); + m_aQueryList.Show( sal_True ); m_aCaseQueries.Check( sal_True ); m_pCurrentList.reset( new QueryListFacade( m_aQueryList, m_rContext.getConnection() ) ); m_aQueryList.GrabFocus(); break; @@ -503,7 +503,7 @@ IMPL_LINK( OAddTableDlg, OnTypeSelected, void*, /*EMPTY_ARG*/ ) } //------------------------------------------------------------------------------ -BOOL OAddTableDlg::Close() +sal_Bool OAddTableDlg::Close() { m_rContext.onWindowClosing( this ); return ModelessDialog::Close(); diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index a2e82e50757d..ce6ad5f981f2 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -69,9 +69,9 @@ namespace dbaui struct BooleanSettingDesc { CheckBox** ppControl; // the dialog's control which displays this setting - USHORT nControlResId; // the resource ID to load the control from - USHORT nItemId; // the ID of the item (in an SfxItemSet) which corresponds to this setting - bool bInvertedDisplay; // true if and only if the checkbox is checked when the item is FALSE, and vice versa + sal_uInt16 nControlResId; // the resource ID to load the control from + sal_uInt16 nItemId; // the ID of the item (in an SfxItemSet) which corresponds to this setting + bool bInvertedDisplay; // true if and only if the checkbox is checked when the item is sal_False, and vice versa }; //======================================================================== @@ -110,17 +110,17 @@ namespace dbaui ++setting ) { - USHORT nItemId = setting->nItemId; + sal_uInt16 nItemId = setting->nItemId; if ( rFeatures.has( nItemId ) ) { - USHORT nResourceId = setting->nControlResId; + sal_uInt16 nResourceId = setting->nControlResId; (*setting->ppControl) = new CheckBox( this, ModuleRes( nResourceId ) ); (*setting->ppControl)->SetClickHdl( getControlModifiedLink() ); // check whether this must be a tristate check box const SfxPoolItem& rItem = _rCoreAttrs.Get( nItemId ); if ( rItem.ISA( OptionalBoolItem ) ) - (*setting->ppControl)->EnableTriState( TRUE ); + (*setting->ppControl)->EnableTriState( sal_True ); } } @@ -292,7 +292,7 @@ namespace dbaui } else { - BOOL bValue = *aValue; + sal_Bool bValue = *aValue; if ( setting->bInvertedDisplay ) bValue = !bValue; (*setting->ppControl)->Check( bValue ); @@ -303,7 +303,7 @@ namespace dbaui if ( m_bHasBooleanComparisonMode ) { SFX_ITEMSET_GET( _rSet, pBooleanComparison, SfxInt32Item, DSID_BOOLEANCOMPARISON, sal_True ); - m_pBooleanComparisonMode->SelectEntryPos( static_cast< USHORT >( pBooleanComparison->GetValue() ) ); + m_pBooleanComparisonMode->SelectEntryPos( static_cast< sal_uInt16 >( pBooleanComparison->GetValue() ) ); } OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); @@ -486,7 +486,7 @@ namespace dbaui } //------------------------------------------------------------------------- - void AdvancedSettingsDialog::PageCreated(USHORT _nId, SfxTabPage& _rPage) + void AdvancedSettingsDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) { // register ourself as modified listener static_cast(_rPage).SetServiceFactory(m_pImpl->getORB()); diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx index 7e58f260f4e6..4c039b36d2ba 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hxx +++ b/dbaccess/source/ui/dlg/advancedsettings.hxx @@ -84,7 +84,7 @@ namespace dbaui bool m_bHasBooleanComparisonMode; public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); SpecialSettingsPage(Window* pParent, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta ); @@ -122,7 +122,7 @@ namespace dbaui m_aControlDependencies; public: - virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs); + virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs); GeneratedValuesPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); protected: diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 1d5bb1cb167c..61ea8ddedf62 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -108,7 +108,7 @@ short ODbAdminDialog::Ok() } //------------------------------------------------------------------------- -void ODbAdminDialog::PageCreated(USHORT _nId, SfxTabPage& _rPage) +void ODbAdminDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) { // register ourself as modified listener static_cast(_rPage).SetServiceFactory(m_pImpl->getORB()); @@ -123,7 +123,7 @@ void ODbAdminDialog::PageCreated(USHORT _nId, SfxTabPage& _rPage) } // ----------------------------------------------------------------------------- -void ODbAdminDialog::addDetailPage(USHORT _nPageId, USHORT _nTextId, CreateTabPage _pCreateFunc) +void ODbAdminDialog::addDetailPage(sal_uInt16 _nPageId, sal_uInt16 _nTextId, CreateTabPage _pCreateFunc) { // open our own resource block, as the page titles are strings local to this block LocalResourceAccess aDummy(DLG_DATABASE_ADMINISTRATION, RSC_TABDIALOG); diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx index 5189bb34810d..28e80aac5963 100644 --- a/dbaccess/source/ui/dlg/dbfindex.hxx +++ b/dbaccess/source/ui/dlg/dbfindex.hxx @@ -137,7 +137,7 @@ protected: String m_aDSN; TableInfoList m_aTableInfoList; TableIndexList m_aFreeIndexList; - BOOL m_bCaseSensitiv; + sal_Bool m_bCaseSensitiv; void Init(); void SetCtrls(); diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 7fcf2ae8429d..3ebd34955a52 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -295,7 +295,7 @@ void ODbTypeWizDialog::clearPassword() // ----------------------------------------------------------------------------- TabPage* ODbTypeWizDialog::createPage(WizardState _nState) { - USHORT nStringId = STR_PAGETITLE_ADVANCED; + sal_uInt16 nStringId = STR_PAGETITLE_ADVANCED; TabPage* pPage = NULL; switch(_nState) { diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index d90dbd8bc296..9ddd6282bfe4 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -101,7 +101,7 @@ namespace dbaui //======================================================================== DBG_NAME(OCommonBehaviourTabPage) //------------------------------------------------------------------------ - OCommonBehaviourTabPage::OCommonBehaviourTabPage(Window* pParent, USHORT nResId, const SfxItemSet& _rCoreAttrs, + OCommonBehaviourTabPage::OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource) :OGenericAdministrationPage(pParent, ModuleRes(nResId), _rCoreAttrs) @@ -525,7 +525,7 @@ namespace dbaui //======================================================================== //= OMySQLJDBCDetailsPage //======================================================================== - OGeneralSpecialJDBCDetailsPage::OGeneralSpecialJDBCDetailsPage( Window* pParent,USHORT _nResId, const SfxItemSet& _rCoreAttrs ,USHORT _nPortId) + OGeneralSpecialJDBCDetailsPage::OGeneralSpecialJDBCDetailsPage( Window* pParent,sal_uInt16 _nResId, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId) :OCommonBehaviourTabPage(pParent, _nResId, _rCoreAttrs, CBTP_USE_CHARSET ,false) ,m_aFL_1 (this, ModuleRes( FL_SEPARATOR1) ) ,m_aFTHostname (this, ModuleRes(FT_HOSTNAME)) @@ -556,9 +556,9 @@ namespace dbaui else { m_bUseClass = false; - m_aFTDriverClass.Show(FALSE); - m_aEDDriverClass.Show(FALSE); - m_aTestJavaDriver.Show(FALSE); + m_aFTDriverClass.Show(sal_False); + m_aEDDriverClass.Show(sal_False); + m_aTestJavaDriver.Show(sal_False); } m_aFTSocket.Show(PAGE_MYSQL_JDBC == _nResId && !m_bUseClass); @@ -673,7 +673,7 @@ namespace dbaui { } - USHORT nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; + sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() ); aMsg.Execute(); return 0L; @@ -925,7 +925,7 @@ namespace dbaui IMPL_LINK( OAdabasDetailsPage, AttributesChangedHdl, void *, EMPTYARG ) { m_CB_SHUTDB.Enable(m_ET_CTRLUSERNAME.GetText().Len() && m_ET_CTRLPASSWORD.GetText().Len()); - bAttrsChanged = TRUE; + bAttrsChanged = sal_True; callModifiedHdl(); return 0; } diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index e93fa9b201c4..2e7b90cd00ab 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -98,9 +98,9 @@ namespace dbaui sal_uInt32 m_nControlFlags; public: - virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs); + virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs); - OCommonBehaviourTabPage(Window* pParent, USHORT nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true); + OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true); protected: // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten @@ -122,7 +122,7 @@ namespace dbaui class ODbaseDetailsPage : public OCommonBehaviourTabPage { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); ODbaseDetailsPage(Window* pParent, const SfxItemSet& _rCoreAttrs); private: @@ -165,7 +165,7 @@ namespace dbaui class OOdbcDetailsPage : public OCommonBehaviourTabPage { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); OOdbcDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); protected: @@ -184,7 +184,7 @@ namespace dbaui class OUserDriverDetailsPage : public OCommonBehaviourTabPage { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); OUserDriverDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); protected: @@ -215,15 +215,15 @@ namespace dbaui { public: OGeneralSpecialJDBCDetailsPage( Window* pParent - , USHORT _nResId + , sal_uInt16 _nResId , const SfxItemSet& _rCoreAttrs - , USHORT _nPortId + , sal_uInt16 _nPortId ); protected: - virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs ); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); @@ -244,7 +244,7 @@ namespace dbaui PushButton m_aTestJavaDriver; String m_sDefaultJdbcDriverName; - USHORT m_nPortId; + sal_uInt16 m_nPortId; bool m_bUseClass; }; @@ -267,7 +267,7 @@ namespace dbaui CheckBox m_aPasswordRequired; protected: - virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs ); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); @@ -279,7 +279,7 @@ namespace dbaui class OAdabasDetailsPage : public OCommonBehaviourTabPage { public: - virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs); + virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs); OAdabasDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); protected: @@ -306,7 +306,7 @@ namespace dbaui CheckBox m_CB_SHUTDB; PushButton m_PB_STAT; String m_sUser; - BOOL bAttrsChanged; + sal_Bool bAttrsChanged; DECL_LINK( AttributesChangedHdl, void * ); DECL_LINK( UserSettingsHdl, void * ); @@ -320,7 +320,7 @@ namespace dbaui class OLDAPDetailsPage : public OCommonBehaviourTabPage { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); protected: @@ -360,7 +360,7 @@ namespace dbaui class OTextDetailsPage : public OCommonBehaviourTabPage { public: - virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs ); + virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs ); OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); OTextConnectionHelper* m_pTextConnectionHelper; diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 9465cfa58fed..87086e556226 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -188,7 +188,7 @@ DBG_NAME(DirectSQLDialog) { m_aStatementHistory.pop_front(); m_aNormalizedHistory.pop_front(); - m_pSQLHistory->RemoveEntry((USHORT)0); + m_pSQLHistory->RemoveEntry((sal_uInt16)0); } } @@ -316,7 +316,7 @@ DBG_NAME(DirectSQLDialog) if (_bUpdateListBox) { // selecte the normalized statement in the list box - m_pSQLHistory->SelectEntryPos((USHORT)_nHistoryPos); + m_pSQLHistory->SelectEntryPos((sal_uInt16)_nHistoryPos); OSL_ENSURE(m_pSQLHistory->GetSelectEntry() == m_aNormalizedHistory[_nHistoryPos], "DirectSQLDialog::switchToHistory: inconsistent listbox entries!"); } diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx index 0608997ef0c1..5e8f5c0e2ca1 100644 --- a/dbaccess/source/ui/dlg/dlgattr.cxx +++ b/dbaccess/source/ui/dlg/dlgattr.cxx @@ -81,7 +81,7 @@ using namespace dbaui; DBG_NAME(SbaSbAttrDlg) //================================================================== -SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumberFormatter* pFormatter, USHORT nFlags, BOOL bRow) +SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumberFormatter* pFormatter, sal_uInt16 nFlags, sal_Bool bRow) : SfxTabDialog(pParent, ModuleRes( DLG_ATTR ), pCellAttrs ) ,aTitle(ModuleRes(ST_ROW)) { @@ -121,7 +121,7 @@ void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) { //CHINA001 ((SvxNumberFormatTabPage&)rTabPage). //CHINA001 SetNumberFormatList( *pNumberInfoItem ); - aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), (const USHORT)SID_ATTR_NUMBERFORMAT_INFO)); + aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), (const sal_uInt16)SID_ATTR_NUMBERFORMAT_INFO)); rTabPage.PageCreated(aSet); } break; diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index 7a287829057d..cd864ff5c29c 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -224,7 +224,7 @@ namespace _rList.InsertEntry( sValue ); } - USHORT nPos = _rList.GetEntryPos( String( _rCurrent ) ); + sal_uInt16 nPos = _rList.GetEntryPos( String( _rCurrent ) ); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) _rList.SelectEntryPos( nPos ); else @@ -308,7 +308,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent, sTable, ::dbtools::eInDataManipulation); - USHORT nPos = m_pImpl->m_aCatalog.GetEntryPos(String(sCatalog)); + sal_uInt16 nPos = m_pImpl->m_aCatalog.GetEntryPos(String(sCatalog)); if ( nPos != COMBOBOX_ENTRY_NOTFOUND ) m_pImpl->m_aCatalog.SelectEntryPos(nPos); @@ -328,7 +328,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent, m_pImpl->m_aPB_CANCEL.SetPosPixel(Point(m_pImpl->m_aPB_CANCEL.GetPosPixel().X(),aPos.Y())); m_pImpl->m_aPB_HELP.SetPosPixel(Point(m_pImpl->m_aPB_HELP.GetPosPixel().X(),aPos.Y())); - USHORT nLength = m_pImpl->m_xMetaData.is() ? static_cast(m_pImpl->m_xMetaData->getMaxTableNameLength()) : 0; + sal_uInt16 nLength = m_pImpl->m_xMetaData.is() ? static_cast(m_pImpl->m_xMetaData->getMaxTableNameLength()) : 0; nLength = nLength ? nLength : EDIT_NOLIMIT; m_pImpl->m_aTitle.SetMaxTextLen(nLength); diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx index b710cf990047..b2eec08a2db5 100644 --- a/dbaccess/source/ui/dlg/dsselect.cxx +++ b/dbaccess/source/ui/dlg/dsselect.cxx @@ -222,7 +222,7 @@ IMPL_LINK( ODatasourceSelectDialog, CreateDBClickHdl, PushButton*, /*pButton*/ ) if ( xPropInfo->hasPropertyByName(PROPERTY_PASSWORD) ) { m_pOutputSet->Put(SfxStringItem(DSID_PASSWORD, ::comphelper::getString(xProp->getPropertyValue(PROPERTY_PASSWORD)))); - m_pOutputSet->Put(SfxBoolItem(DSID_PASSWORDREQUIRED, TRUE)); + m_pOutputSet->Put(SfxBoolItem(DSID_PASSWORDREQUIRED, sal_True)); } if ( xPropInfo->hasPropertyByName(PROPERTY_CACHESIZE) ) m_pOutputSet->Put(SfxInt32Item(DSID_CONN_CACHESIZE, ::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_CACHESIZE)))); @@ -237,11 +237,11 @@ IMPL_LINK( ODatasourceSelectDialog, CreateDBClickHdl, PushButton*, /*pButton*/ ) } // ----------------------------------------------------------------------- -BOOL ODatasourceSelectDialog::Close() +sal_Bool ODatasourceSelectDialog::Close() { #ifdef HAVE_ODBC_ADMINISTRATION if ( m_pODBCManagement.get() && m_pODBCManagement->isRunning() ) - return FALSE; + return sal_False; #endif return ModalDialog::Close(); diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx index d2ac059827e9..93509a044d45 100644 --- a/dbaccess/source/ui/dlg/dsselect.hxx +++ b/dbaccess/source/ui/dlg/dsselect.hxx @@ -75,7 +75,7 @@ public: inline String GetSelected() const { return m_aDatasource.GetSelectEntry();} void Select( const String& _rEntry ) { m_aDatasource.SelectEntry(_rEntry); } - virtual BOOL Close(); + virtual sal_Bool Close(); protected: DECL_LINK( ListDblClickHdl, ListBox * ); diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 50658fb7811d..e54d5ea55719 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -503,7 +503,7 @@ namespace dbaui } //------------------------------------------------------------------------- - BOOL OGeneralPage::FillItemSet(SfxItemSet& _rCoreAttrs) + sal_Bool OGeneralPage::FillItemSet(SfxItemSet& _rCoreAttrs) { sal_Bool bChangedSomething = sal_False; @@ -528,7 +528,7 @@ namespace dbaui if ( bCommitTypeSelection ) { - USHORT nEntry = m_pDatasourceType->GetSelectEntryPos(); + sal_uInt16 nEntry = m_pDatasourceType->GetSelectEntryPos(); ::rtl::OUString sURLPrefix = m_aURLPrefixes[nEntry]; if (m_DBWizardMode) { diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index efd1e326d5cf..729e38eb7dff 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -141,7 +141,7 @@ namespace dbaui protected: // SfxTabPage overridables - virtual BOOL FillItemSet(SfxItemSet& _rCoreAttrs); + virtual sal_Bool FillItemSet(SfxItemSet& _rCoreAttrs); virtual void Reset(const SfxItemSet& _rCoreAttrs); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index 45dea3837d00..3a735025ea80 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -114,7 +114,7 @@ DlgOrderCrit::DlgOrderCrit( Window * pParent, AllSettings aSettings( GetSettings() ); StyleSettings aStyle( aSettings.GetStyleSettings() ); - aStyle.SetAutoMnemonic( FALSE ); + aStyle.SetAutoMnemonic( sal_False ); aSettings.SetStyleSettings( aStyle ); SetSettings( aSettings ); diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index f19f65313a0d..5114587c0af6 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -121,14 +121,14 @@ namespace class ImageProvider : public IImageProvider { private: - USHORT m_defaultImageID; - USHORT m_highContrastImageID; + sal_uInt16 m_defaultImageID; + sal_uInt16 m_highContrastImageID; mutable Image m_defaultImage; mutable Image m_highContrastImage; public: - ImageProvider( USHORT _defaultImageID, USHORT _highContrastImageID ) + ImageProvider( sal_uInt16 _defaultImageID, sal_uInt16 _highContrastImageID ) :m_defaultImageID( _defaultImageID ) ,m_highContrastImageID( _highContrastImageID ) { @@ -155,7 +155,7 @@ namespace private: String m_label; public: - LabelProvider( USHORT _labelResourceID ) + LabelProvider( sal_uInt16 _labelResourceID ) :m_label( ModuleRes( _labelResourceID ) ) { } @@ -185,8 +185,8 @@ namespace ::boost::shared_ptr< IImageProvider > getImageProvider( SQLExceptionInfo::TYPE _eType ) const { ::boost::shared_ptr< IImageProvider >* ppProvider( &m_pErrorImage ); - USHORT nNormalImageID( BMP_EXCEPTION_ERROR ); - USHORT nHCImageID( BMP_EXCEPTION_ERROR_SCH ); + sal_uInt16 nNormalImageID( BMP_EXCEPTION_ERROR ); + sal_uInt16 nHCImageID( BMP_EXCEPTION_ERROR_SCH ); switch ( _eType ) { @@ -214,7 +214,7 @@ namespace ::boost::shared_ptr< ILabelProvider > getLabelProvider( SQLExceptionInfo::TYPE _eType, bool _bSubLabel ) const { ::boost::shared_ptr< ILabelProvider >* ppProvider( &m_pErrorLabel ); - USHORT nLabelID( STR_EXCEPTION_ERROR ); + sal_uInt16 nLabelID( STR_EXCEPTION_ERROR ); switch ( _eType ) { @@ -516,7 +516,7 @@ namespace void lcl_addButton( ButtonDialog& _rDialog, StandardButtonType _eType, bool _bDefault ) { - USHORT nButtonID = 0; + sal_uInt16 nButtonID = 0; switch ( _eType ) { case BUTTON_YES: nButtonID = BUTTONID_YES; break; diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 6523e0f17cd6..a53bd9722b58 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -647,7 +647,7 @@ DBG_NAME(OTableSubscriptionPage) } //------------------------------------------------------------------------ - BOOL OTableSubscriptionPage::FillItemSet( SfxItemSet& _rCoreAttrs ) + sal_Bool OTableSubscriptionPage::FillItemSet( SfxItemSet& _rCoreAttrs ) { sal_Bool bValid, bReadonly; getFlags(_rCoreAttrs, bValid, bReadonly); diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx index 0e7f72bd5c93..0591eb396ae3 100644 --- a/dbaccess/source/ui/dlg/tablespage.hxx +++ b/dbaccess/source/ui/dlg/tablespage.hxx @@ -81,7 +81,7 @@ namespace dbaui OTableSubscriptionDialog* m_pTablesDlg; public: - virtual BOOL FillItemSet(SfxItemSet& _rCoreAttrs); + virtual sal_Bool FillItemSet(SfxItemSet& _rCoreAttrs); virtual int DeactivatePage(SfxItemSet* _pSet); using OGenericAdministrationPage::DeactivatePage; @@ -118,7 +118,7 @@ namespace dbaui ::com::sun::star::uno::Sequence< ::rtl::OUString > collectDetailedSelection() const; /// (un)check all entries - void CheckAll( BOOL bCheck = sal_True ); + void CheckAll( sal_Bool bCheck = sal_True ); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx index 0035c1480d1c..fa414c3d67ec 100644 --- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx +++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx @@ -70,7 +70,7 @@ namespace dbaui virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos); virtual sal_Bool isAutoIncrementValueEnabled() const; virtual ::rtl::OUString getAutoIncrementValue() const; - virtual void CellModified(long nRow, USHORT nColId ); + virtual void CellModified(long nRow, sal_uInt16 nColId ); public: OColumnControlWindow(Window* pParent diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx index 9e348297d13c..f845cd5cbddd 100644 --- a/dbaccess/source/ui/inc/ConnectionLine.hxx +++ b/dbaccess/source/ui/inc/ConnectionLine.hxx @@ -72,13 +72,13 @@ namespace dbaui virtual OConnectionLine& operator=( const OConnectionLine& rLine ); Rectangle GetBoundingRect(); - BOOL RecalcLine(); + sal_Bool RecalcLine(); void Draw( OutputDevice* pOutDev ); bool CheckHit( const Point& rMousePos ) const; String GetSourceFieldName() const { return m_pData->GetSourceFieldName(); } String GetDestFieldName() const { return m_pData->GetDestFieldName(); } - BOOL IsValid() const; + sal_Bool IsValid() const; Rectangle GetSourceTextPos() const; Rectangle GetDestTextPos() const; diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx index 620810024713..6174d0efca23 100644 --- a/dbaccess/source/ui/inc/FieldControls.hxx +++ b/dbaccess/source/ui/inc/FieldControls.hxx @@ -48,7 +48,7 @@ namespace dbaui { namespace { - void lcl_setSpecialReadOnly( BOOL _bReadOnly, Window* _pWin ) + void lcl_setSpecialReadOnly( sal_Bool _bReadOnly, Window* _pWin ) { StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); const Color& rNewColor = _bReadOnly ? aSystemStyle.GetDialogColor() : aSystemStyle.GetFieldColor(); @@ -64,14 +64,14 @@ namespace dbaui short m_nPos; String m_strHelpText; public: - inline OPropColumnEditCtrl(Window* pParent, ::rtl::OUString& _rAllowedChars, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0); + inline OPropColumnEditCtrl(Window* pParent, ::rtl::OUString& _rAllowedChars, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0); - inline BOOL IsModified() const { return GetText() != GetSavedValue(); } + inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); } short GetPos() const { return m_nPos; } String GetHelp() const { return m_strHelpText; } - virtual void SetSpecialReadOnly(BOOL _bReadOnly) + virtual void SetSpecialReadOnly(sal_Bool _bReadOnly) { SetReadOnly(_bReadOnly); lcl_setSpecialReadOnly(_bReadOnly,this); @@ -79,7 +79,7 @@ namespace dbaui }; inline OPropColumnEditCtrl::OPropColumnEditCtrl(Window* pParent, ::rtl::OUString& _rAllowedChars, - USHORT nHelpId, + sal_uInt16 nHelpId, short nPosition, WinBits nWinStyle) :OSQLNameEdit(pParent, _rAllowedChars,nWinStyle) @@ -95,28 +95,28 @@ namespace dbaui String m_strHelpText; public: - inline OPropEditCtrl(Window* pParent, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0); - inline OPropEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition = -1); + inline OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0); + inline OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1); - inline BOOL IsModified() const { return GetText() != GetSavedValue(); } + inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); } short GetPos() const { return m_nPos; } String GetHelp() const { return m_strHelpText; } - virtual void SetSpecialReadOnly(BOOL _bReadOnly) + virtual void SetSpecialReadOnly(sal_Bool _bReadOnly) { SetReadOnly(_bReadOnly); lcl_setSpecialReadOnly(_bReadOnly,this); } }; - inline OPropEditCtrl::OPropEditCtrl(Window* pParent, USHORT nHelpId, short nPosition, WinBits nWinStyle) + inline OPropEditCtrl::OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition, WinBits nWinStyle) :Edit(pParent, nWinStyle) ,m_nPos(nPosition) { m_strHelpText =String(ModuleRes(nHelpId)); } - inline OPropEditCtrl::OPropEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition) + inline OPropEditCtrl::OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition) :Edit(pParent, _rRes) ,m_nPos(nPosition) { @@ -130,28 +130,28 @@ namespace dbaui String m_strHelpText; public: - inline OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0); - inline OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition = -1); + inline OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0); + inline OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1); - inline BOOL IsModified() const { return GetText() != GetSavedValue(); } + inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); } short GetPos() const { return m_nPos; } String GetHelp() const { return m_strHelpText; } - virtual void SetSpecialReadOnly(BOOL _bReadOnly) + virtual void SetSpecialReadOnly(sal_Bool _bReadOnly) { SetReadOnly(_bReadOnly); lcl_setSpecialReadOnly(_bReadOnly,this); } }; - inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, short nPosition, WinBits nWinStyle) + inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition, WinBits nWinStyle) :NumericField(pParent, nWinStyle) ,m_nPos(nPosition) { m_strHelpText =String(ModuleRes(nHelpId)); } - inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition) + inline OPropNumericEditCtrl::OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition) :NumericField(pParent, _rRes) ,m_nPos(nPosition) { @@ -165,28 +165,28 @@ namespace dbaui String m_strHelpText; public: - inline OPropListBoxCtrl(Window* pParent, USHORT nHelpId, short nPosition = -1, WinBits nWinStyle = 0); - inline OPropListBoxCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition = -1); + inline OPropListBoxCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0); + inline OPropListBoxCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1); - inline BOOL IsModified() const { return GetSelectEntryPos() != GetSavedValue(); } + inline sal_Bool IsModified() const { return GetSelectEntryPos() != GetSavedValue(); } short GetPos() const { return m_nPos; } String GetHelp() const { return m_strHelpText; } - virtual void SetSpecialReadOnly(BOOL _bReadOnly) + virtual void SetSpecialReadOnly(sal_Bool _bReadOnly) { SetReadOnly(_bReadOnly); lcl_setSpecialReadOnly(_bReadOnly,this); } }; - inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, USHORT nHelpId, short nPosition, WinBits nWinStyle) + inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition, WinBits nWinStyle) :ListBox(pParent, nWinStyle) ,m_nPos(nPosition) { m_strHelpText =String(ModuleRes(nHelpId)); } - inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, USHORT nHelpId, const ResId& _rRes,short nPosition) + inline OPropListBoxCtrl::OPropListBoxCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition) :ListBox(pParent, _rRes) ,m_nPos(nPosition) { diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx index 05a507969765..4f5f3036448c 100644 --- a/dbaccess/source/ui/inc/FieldDescControl.hxx +++ b/dbaccess/source/ui/inc/FieldDescControl.hxx @@ -124,7 +124,7 @@ namespace dbaui ScrollBar* m_pHorzScroll; TOTypeInfoSP m_pPreviousType; - USHORT nCurChildId; + sal_uInt16 nCurChildId; short m_nPos; XubString aYes; XubString aNo; @@ -133,7 +133,7 @@ namespace dbaui long m_nOldHThumb; sal_Int32 m_nWidth; - ULONG nDelayedGrabFocusEvent; + sal_uLong nDelayedGrabFocusEvent; sal_Bool m_bAdded; bool m_bRightAligned; @@ -152,15 +152,15 @@ namespace dbaui void UpdateFormatSample(OFieldDescription* pFieldDescr); void ArrangeAggregates(); - void SetPosSize( Control** ppControl, long nRow, USHORT nCol ); + void SetPosSize( Control** ppControl, long nRow, sal_uInt16 nCol ); void ScrollAggregate(Control* pText, Control* pInput, Control* pButton, long nDeltaX, long nDeltaY); void ScrollAllAggregates(); sal_Bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const; void Contruct(); - OPropNumericEditCtrl* CreateNumericControl(USHORT _nHelpStr,short _nProperty,const rtl::OString& _sHelpId); - FixedText* CreateText(USHORT _nTextRes); + OPropNumericEditCtrl* CreateNumericControl(sal_uInt16 _nHelpStr,short _nProperty,const rtl::OString& _sHelpId); + FixedText* CreateText(sal_uInt16 _nTextRes); void InitializeControl(Control* _pControl,const rtl::OString& _sHelpId,bool _bAddChangeHandler); protected: @@ -176,15 +176,15 @@ namespace dbaui virtual void ActivateAggregate( EControlType eType ); virtual void DeactivateAggregate( EControlType eType ); - virtual BOOL IsReadOnly() { return FALSE; }; + virtual sal_Bool IsReadOnly() { return sal_False; }; // Sind von den abgeleiteten Klassen zu impl. virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const = 0; virtual ::com::sun::star::lang::Locale GetLocale() const = 0; - virtual void CellModified(long nRow, USHORT nColId ) = 0; - virtual void SetModified(BOOL bModified); // base implementation is empty + virtual void CellModified(long nRow, sal_uInt16 nColId ) = 0; + virtual void SetModified(sal_Bool bModified); // base implementation is empty virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) = 0; virtual const OTypeInfoMap* getTypeInfo() const = 0; @@ -208,9 +208,9 @@ namespace dbaui void SaveData( OFieldDescription* pFieldDescr ); // void SaveData( OColumn* pColumn); - void SetControlText( USHORT nControlId, const String& rText ); - String GetControlText( USHORT nControlId ); - void SetReadOnly( BOOL bReadOnly ); + void SetControlText( sal_uInt16 nControlId, const String& rText ); + String GetControlText( sal_uInt16 nControlId ); + void SetReadOnly( sal_Bool bReadOnly ); // Resize aufegrufen void CheckScrollBars(); diff --git a/dbaccess/source/ui/inc/GeneralUndo.hxx b/dbaccess/source/ui/inc/GeneralUndo.hxx index 1745b9e84f54..aaea53232644 100644 --- a/dbaccess/source/ui/inc/GeneralUndo.hxx +++ b/dbaccess/source/ui/inc/GeneralUndo.hxx @@ -49,7 +49,7 @@ namespace dbaui public: TYPEINFO(); - OCommentUndoAction(USHORT nCommentID) { m_strComment = String(ModuleRes(nCommentID)); } + OCommentUndoAction(sal_uInt16 nCommentID) { m_strComment = String(ModuleRes(nCommentID)); } virtual UniString GetComment() const { return m_strComment; } }; diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx index a3a8453da8f9..f390f1724afc 100644 --- a/dbaccess/source/ui/inc/JoinTableView.hxx +++ b/dbaccess/source/ui/inc/JoinTableView.hxx @@ -116,7 +116,7 @@ namespace dbaui OTableConnection* m_pSelectedConn; - BOOL m_bTrackingInitiallyMoved; + sal_Bool m_bTrackingInitiallyMoved; DECL_LINK(OnDragScrollTimer, void*); @@ -150,7 +150,7 @@ namespace dbaui void NotifyTitleClicked( OTableWindow* pTabWin, const Point rMousePos ); - virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE); + virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, sal_Bool bNewTable = sal_False); virtual void RemoveTabWin( OTableWindow* pTabWin ); // alle TabWins verstecken (NICHT loeschen, sie werden in eine Undo-Action gepackt) @@ -178,8 +178,8 @@ namespace dbaui */ void addConnection(OTableConnection* _pConnection,sal_Bool _bAddData = sal_True); - BOOL ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars ); - ULONG GetTabWinCount(); + sal_Bool ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPaintScrollBars ); + sal_uLong GetTabWinCount(); Point GetScrollOffset() const { return m_aScrollOffset; } OJoinDesignView* getDesignView() const { return m_pView; } @@ -197,7 +197,7 @@ namespace dbaui const ::std::vector* getTableConnections() const { return &m_vTableConnection; } - BOOL ExistsAConn(const OTableWindow* pFromWin) const; + sal_Bool ExistsAConn(const OTableWindow* pFromWin) const; /** getTableConnections searchs for all connections of a table @param _pFromWin the table for which connections should be found @@ -229,7 +229,7 @@ namespace dbaui virtual void ClearAll(); // wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen - virtual BOOL IsAddAllowed(); + virtual sal_Bool IsAddAllowed(); virtual long PreNotify(NotifyEvent& rNEvt); // DnD stuff @@ -263,7 +263,7 @@ namespace dbaui if the area is visible otherwise */ - BOOL isMovementAllowed(const Point& _rPoint,const Size& _rSize); + sal_Bool isMovementAllowed(const Point& _rPoint,const Size& _rSize); Size getRealOutputSize() const { return m_aOutputSize; } @@ -316,7 +316,7 @@ namespace dbaui private: void InitColors(); - BOOL ScrollWhileDragging(); + sal_Bool ScrollWhileDragging(); /** executePopup opens the context menu to delate a connection @param _aPos the position where the popup menu should appear diff --git a/dbaccess/source/ui/inc/QueryTableView.hxx b/dbaccess/source/ui/inc/QueryTableView.hxx index ac122501f4fb..bd8d8fe63b5a 100644 --- a/dbaccess/source/ui/inc/QueryTableView.hxx +++ b/dbaccess/source/ui/inc/QueryTableView.hxx @@ -77,14 +77,14 @@ namespace dbaui // Basisklasse ueberschrieben : Fenster kreieren und loeschen // (eigentlich nicht wirklich LOESCHEN, es geht in die Verantwortung einer UNDO-Action ueber) - virtual void AddTabWin( const ::rtl::OUString& _rTableName, const ::rtl::OUString& _rAliasName, BOOL bNewTable = FALSE ); + virtual void AddTabWin( const ::rtl::OUString& _rTableName, const ::rtl::OUString& _rAliasName, sal_Bool bNewTable = sal_False ); virtual void RemoveTabWin(OTableWindow* pTabWin); // und ein AddTabWin, das einen Alias vorgibt - void AddTabWin(const ::rtl::OUString& strDatabase, const ::rtl::OUString& strTableName, const ::rtl::OUString& strAlias, BOOL bNewTable = FALSE); + void AddTabWin(const ::rtl::OUString& strDatabase, const ::rtl::OUString& strTableName, const ::rtl::OUString& strAlias, sal_Bool bNewTable = sal_False); // TabWin suchen OQueryTableWindow* FindTable(const String& rAliasName); - BOOL FindTableFromField(const String& rFieldName, OTableFieldDescRef& rInfo, USHORT& rCnt); + sal_Bool FindTableFromField(const String& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt); // Basisklasse ueberschrieben : Connections kreieren und loeschen virtual void AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest); @@ -101,7 +101,7 @@ namespace dbaui // natuerlich alle Connections an diesen Fenstern und alle Abfrage-Spalten, die auf diesen Tabellen basierten. // TabWin anzeigen oder verstecken (NICHT kreieren oder loeschen) - BOOL ShowTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction,sal_Bool _bAppend); + sal_Bool ShowTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction,sal_Bool _bAppend); void HideTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction); // Sichbarkeit eines TabWins sicherstellen (+ Invalidieren der Connections) @@ -119,15 +119,15 @@ namespace dbaui virtual void ClearAll(); // wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen - //virtual BOOL IsAddAllowed(); + //virtual sal_Bool IsAddAllowed(); // eine neu Connection bekanntgeben und einfuegen lassen, wenn nicht schon existent - void NotifyTabConnection(const OQueryTableConnection& rNewConn, BOOL _bCreateUndoAction = TRUE); + void NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction = sal_True); Link SetTabWinsChangeHandler(const Link& lnk) { Link lnkRet = m_lnkTabWinsChangeHandler; m_lnkTabWinsChangeHandler = lnk; return lnkRet; } // der Handler bekommt einen Zeiger auf eine TabWinsChangeNotification-Struktur - BOOL ExistsAVisitedConn(const OQueryTableWindow* pFrom) const; + sal_Bool ExistsAVisitedConn(const OQueryTableWindow* pFrom) const; virtual OTableWindowData* CreateImpl(const ::rtl::OUString& _rComposedName ,const ::rtl::OUString& _sTableName diff --git a/dbaccess/source/ui/inc/RTableConnectionData.hxx b/dbaccess/source/ui/inc/RTableConnectionData.hxx index 866472ab50a0..488c2e32cb97 100644 --- a/dbaccess/source/ui/inc/RTableConnectionData.hxx +++ b/dbaccess/source/ui/inc/RTableConnectionData.hxx @@ -42,10 +42,10 @@ namespace dbaui { - const UINT16 CARDINAL_UNDEFINED = 0x0000; - const UINT16 CARDINAL_ONE_MANY = 0x0001; - const UINT16 CARDINAL_MANY_ONE = 0x0002; - const UINT16 CARDINAL_ONE_ONE = 0x0004; + const sal_uInt16 CARDINAL_UNDEFINED = 0x0000; + const sal_uInt16 CARDINAL_ONE_MANY = 0x0001; + const sal_uInt16 CARDINAL_MANY_ONE = 0x0002; + const sal_uInt16 CARDINAL_ONE_ONE = 0x0004; class OConnectionLineData; //================================================================== @@ -61,9 +61,9 @@ namespace dbaui sal_Int32 m_nDeleteRules; sal_Int32 m_nCardinality; - BOOL checkPrimaryKey(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const; - BOOL IsSourcePrimKey() const { return checkPrimaryKey(getReferencingTable()->getTable(),JTCS_FROM); } - BOOL IsDestPrimKey() const { return checkPrimaryKey(getReferencedTable()->getTable(),JTCS_TO); } + sal_Bool checkPrimaryKey(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const; + sal_Bool IsSourcePrimKey() const { return checkPrimaryKey(getReferencingTable()->getTable(),JTCS_FROM); } + sal_Bool IsDestPrimKey() const { return checkPrimaryKey(getReferencedTable()->getTable(),JTCS_TO); } protected: virtual OConnectionLineDataRef CreateLineDataObj(); @@ -85,7 +85,7 @@ namespace dbaui @return true if successful */ - virtual BOOL Update(); + virtual sal_Bool Update(); void SetCardinality(); @@ -96,9 +96,9 @@ namespace dbaui inline sal_Int32 GetDeleteRules() const { return m_nDeleteRules; } inline sal_Int32 GetCardinality() const { return m_nCardinality; } - BOOL IsConnectionPossible(); + sal_Bool IsConnectionPossible(); void ChangeOrientation(); - BOOL DropRelation(); + sal_Bool DropRelation(); }; } diff --git a/dbaccess/source/ui/inc/RelationControl.hxx b/dbaccess/source/ui/inc/RelationControl.hxx index 373e26fc5297..d90bbe6fbaaa 100644 --- a/dbaccess/source/ui/inc/RelationControl.hxx +++ b/dbaccess/source/ui/inc/RelationControl.hxx @@ -79,7 +79,7 @@ namespace dbaui /** enables the relation control * - * \param _bEnable when TRUE enables it, otherwise disable it. + * \param _bEnable when sal_True enables it, otherwise disable it. */ void enableRelation(bool _bEnable); @@ -95,7 +95,7 @@ namespace dbaui void lateUIInit(Window* _pTableSeparator = NULL); void lateInit(); - BOOL SaveModified(); + sal_Bool SaveModified(); TTableWindowData::value_type getReferencingTable() const; diff --git a/dbaccess/source/ui/inc/RelationController.hxx b/dbaccess/source/ui/inc/RelationController.hxx index 8837a4216042..1314f7e884e9 100644 --- a/dbaccess/source/ui/inc/RelationController.hxx +++ b/dbaccess/source/ui/inc/RelationController.hxx @@ -47,7 +47,7 @@ namespace dbaui { ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xTables; ::std::auto_ptr m_pWaitObject; - ULONG m_nThreadEvent; + sal_uLong m_nThreadEvent; sal_Bool m_bRelationsPossible; protected: // all the features which should be handled by this class diff --git a/dbaccess/source/ui/inc/RelationDlg.hxx b/dbaccess/source/ui/inc/RelationDlg.hxx index a2db09900471..a2c51941d93c 100644 --- a/dbaccess/source/ui/inc/RelationDlg.hxx +++ b/dbaccess/source/ui/inc/RelationDlg.hxx @@ -87,12 +87,12 @@ namespace dbaui TTableConnectionData::value_type m_pOrigConnData; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; - BOOL m_bTriedOneUpdate; + sal_Bool m_bTriedOneUpdate; public: ORelationDialog(OJoinTableView* pParent, const TTableConnectionData::value_type& pConnectionData, - BOOL bAllowTableSelect = FALSE ); + sal_Bool bAllowTableSelect = sal_False ); virtual ~ORelationDialog(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection(){ return m_xConnection; } diff --git a/dbaccess/source/ui/inc/RelationTableView.hxx b/dbaccess/source/ui/inc/RelationTableView.hxx index 3bde644a78ad..a22b3e59ca7d 100644 --- a/dbaccess/source/ui/inc/RelationTableView.hxx +++ b/dbaccess/source/ui/inc/RelationTableView.hxx @@ -46,7 +46,7 @@ namespace dbaui bool m_bInRemove; virtual void ConnDoubleClicked( OTableConnection* pConnection ); - virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL bNewTable = FALSE); + virtual void AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, sal_Bool bNewTable = sal_False); virtual OTableWindow* createWindow(const TTableWindowData::value_type& _pData); @@ -72,7 +72,7 @@ namespace dbaui void AddNewRelation(); // reisst den Dialog fuer eine voellig neue Relation hoch // wird vom AddTabDlg benutzt, um festzustellen, ob noch Tabellen hinzugefuegt werden duerfen - virtual BOOL IsAddAllowed(); + virtual sal_Bool IsAddAllowed(); virtual void lookForUiActivities(); }; diff --git a/dbaccess/source/ui/inc/TableConnection.hxx b/dbaccess/source/ui/inc/TableConnection.hxx index cc7843b4c1b5..8edc25c5f1dc 100644 --- a/dbaccess/source/ui/inc/TableConnection.hxx +++ b/dbaccess/source/ui/inc/TableConnection.hxx @@ -66,7 +66,7 @@ namespace dbaui m_pData; OJoinTableView* m_pParent; - BOOL m_bSelected; + sal_Bool m_bSelected; void Init(); /** clearLineData loops through the vector and deletes all lines @@ -90,8 +90,8 @@ namespace dbaui void Select(); void Deselect(); - BOOL IsSelected() const { return m_bSelected; } - BOOL CheckHit( const Point& rMousePos ) const; + sal_Bool IsSelected() const { return m_bSelected; } + sal_Bool CheckHit( const Point& rMousePos ) const; bool InvalidateConnection(); void UpdateLineList(); diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx index f6bf83e60161..496471a903ca 100644 --- a/dbaccess/source/ui/inc/TableConnectionData.hxx +++ b/dbaccess/source/ui/inc/TableConnectionData.hxx @@ -84,14 +84,14 @@ namespace dbaui virtual OTableConnectionData* NewInstance() const; // (von OTableConnectionData abgeleitete Klasse muessen entsprechend eine Instanz ihrer Klasse liefern) - BOOL SetConnLine( USHORT nIndex, const String& rSourceFieldName, const String& rDestFieldName ); - BOOL AppendConnLine( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName ); - void ResetConnLines( BOOL bUseDefaults = TRUE ); + sal_Bool SetConnLine( sal_uInt16 nIndex, const String& rSourceFieldName, const String& rDestFieldName ); + sal_Bool AppendConnLine( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName ); + void ResetConnLines( sal_Bool bUseDefaults = sal_True ); /** normalizeLines moves the empty lines to the back */ void normalizeLines(); - // loescht die Liste der ConnLines, bei bUseDefaults == TRUE werden danach MAX_CONN_COUNT neue Dummy-Linien eingefuegt + // loescht die Liste der ConnLines, bei bUseDefaults == sal_True werden danach MAX_CONN_COUNT neue Dummy-Linien eingefuegt OConnectionLineDataVec* GetConnLineDataList(){ return &m_vConnLineData; } @@ -108,7 +108,7 @@ namespace dbaui @return true if successful */ - virtual BOOL Update(){ return TRUE; } + virtual sal_Bool Update(){ return sal_True; } }; typedef ::std::vector< ::boost::shared_ptr > TTableConnectionData; diff --git a/dbaccess/source/ui/inc/TableDesignControl.hxx b/dbaccess/source/ui/inc/TableDesignControl.hxx index b10b9340aafb..a448b720bc1a 100644 --- a/dbaccess/source/ui/inc/TableDesignControl.hxx +++ b/dbaccess/source/ui/inc/TableDesignControl.hxx @@ -56,25 +56,25 @@ namespace dbaui long m_nDataPos; // derzeit benoetigte Zeile long m_nCurrentPos; // Aktuelle Position der ausgewaehlten Column private: - USHORT m_nCurUndoActId; + sal_uInt16 m_nCurUndoActId; protected: - BOOL m_bCurrentModified; - BOOL m_bUpdatable; - BOOL m_bClipboardFilled; + sal_Bool m_bCurrentModified; + sal_Bool m_bUpdatable; + sal_Bool m_bClipboardFilled; public: OTableRowView(Window* pParent); virtual ~OTableRowView(); - virtual void SetCellData( long nRow, USHORT nColId, const TOTypeInfoSP& _pTypeInfo ) = 0; - virtual void SetCellData( long nRow, USHORT nColId, const ::com::sun::star::uno::Any& _rNewData ) = 0; - virtual ::com::sun::star::uno::Any GetCellData( long nRow, USHORT nColId ) = 0; - virtual void SetControlText( long nRow, USHORT nColId, const String& rText ) = 0; - virtual String GetControlText( long nRow, USHORT nColId ) = 0; + virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) = 0; + virtual void SetCellData( long nRow, sal_uInt16 nColId, const ::com::sun::star::uno::Any& _rNewData ) = 0; + virtual ::com::sun::star::uno::Any GetCellData( long nRow, sal_uInt16 nColId ) = 0; + virtual void SetControlText( long nRow, sal_uInt16 nColId, const String& rText ) = 0; + virtual String GetControlText( long nRow, sal_uInt16 nColId ) = 0; virtual OTableDesignView* GetView() const = 0; - USHORT GetCurUndoActId(){ return m_nCurUndoActId; } + sal_uInt16 GetCurUndoActId(){ return m_nCurUndoActId; } // IClipboardTest virtual void cut(); @@ -93,8 +93,8 @@ namespace dbaui virtual sal_Bool IsInsertNewAllowed( long nRow ) = 0; virtual sal_Bool IsDeleteAllowed( long nRow ) = 0; - virtual BOOL IsUpdatable() const {return m_bUpdatable;} - virtual void SetUpdatable( BOOL bUpdate=TRUE ); + virtual sal_Bool IsUpdatable() const {return m_bUpdatable;} + virtual void SetUpdatable( sal_Bool bUpdate=sal_True ); virtual RowStatus GetRowStatus(long nRow) const; virtual void KeyInput(const KeyEvent& rEvt); diff --git a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx index c39a44320fb6..7f23f6d5f482 100644 --- a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx +++ b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx @@ -52,7 +52,7 @@ namespace dbaui private: String m_sHelpText; MultiLineEdit* m_pTextWin; - USHORT m_nDummy; + sal_uInt16 m_nDummy; protected: virtual void Resize(); diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx index 6be89d0d7b93..b8d688ff9668 100644 --- a/dbaccess/source/ui/inc/TableDesignView.hxx +++ b/dbaccess/source/ui/inc/TableDesignView.hxx @@ -55,7 +55,7 @@ namespace dbaui OTableFieldDescWin* m_pFieldDescWin; OTableEditorCtrl* m_pEditorCtrl; - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); void ArrangeChilds( long nSplitPos ,Rectangle& rRect); DECL_LINK( SplitHdl, Splitter* ); protected: diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx index 5dae0103f442..9d6716f389b1 100644 --- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx +++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx @@ -73,8 +73,8 @@ class OTableGrantControl : public ::svt::EditBrowseBox ::svt::CheckBoxControl* m_pCheckCell; Edit* m_pEdit; long m_nDataPos; - BOOL m_bEnable; - ULONG m_nDeactivateEvent; + sal_Bool m_bEnable; + sal_uLong m_nDeactivateEvent; public: OTableGrantControl( Window* pParent,const ResId& _RsId); @@ -102,13 +102,13 @@ protected: virtual long PreNotify(NotifyEvent& rNEvt ); - virtual BOOL IsTabAllowed(BOOL bForward) const; - 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 sal_Bool IsTabAllowed(sal_Bool bForward) 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(); @@ -116,7 +116,7 @@ private: DECL_LINK( AsynchActivate, void* ); DECL_LINK( AsynchDeactivate, void* ); - sal_Bool isAllowed(USHORT _nColumnId,sal_Int32 _nPrivilege) const; + sal_Bool isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivilege) const; void fillPrivilege(sal_Int32 _nRow) const; TTablePrivilegeMap::const_iterator findPrivilege(sal_Int32 _nRow) const; }; diff --git a/dbaccess/source/ui/inc/TableRow.hxx b/dbaccess/source/ui/inc/TableRow.hxx index d17ccfeefce4..bdf734ea528c 100644 --- a/dbaccess/source/ui/inc/TableRow.hxx +++ b/dbaccess/source/ui/inc/TableRow.hxx @@ -71,8 +71,8 @@ namespace dbaui void SetFieldType( const TOTypeInfoSP& _pType, sal_Bool _bForce = sal_False ); - void SetPrimaryKey( BOOL bSet ); - BOOL IsPrimaryKey() const; + void SetPrimaryKey( sal_Bool bSet ); + sal_Bool IsPrimaryKey() const; /** returns the current position in the table. @return diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx index 07bb577d8262..d76ca7a15937 100644 --- a/dbaccess/source/ui/inc/TableWindow.hxx +++ b/dbaccess/source/ui/inc/TableWindow.hxx @@ -44,11 +44,11 @@ namespace dbaui { ////////////////////////////////////////////////////////////////////////// // Flags fuer die Groessenanpassung der SbaJoinTabWins - const UINT16 SIZING_NONE = 0x0000; - const UINT16 SIZING_TOP = 0x0001; - const UINT16 SIZING_BOTTOM = 0x0002; - const UINT16 SIZING_LEFT = 0x0004; - const UINT16 SIZING_RIGHT = 0x0008; + const sal_uInt16 SIZING_NONE = 0x0000; + const sal_uInt16 SIZING_TOP = 0x0001; + const sal_uInt16 SIZING_BOTTOM = 0x0002; + const sal_uInt16 SIZING_LEFT = 0x0004; + const sal_uInt16 SIZING_RIGHT = 0x0008; class OTableWindowListBox; class OJoinDesignView; @@ -75,8 +75,8 @@ namespace dbaui m_pContainerListener; sal_Int32 m_nMoveCount; // how often the arrow keys was pressed sal_Int32 m_nMoveIncrement; // how many pixel we should move - UINT16 m_nSizingFlags; - BOOL m_bActive; + sal_uInt16 m_nSizingFlags; + sal_Bool m_bActive; void Draw3DBorder( const Rectangle& rRect ); // OContainerListener @@ -93,7 +93,7 @@ namespace dbaui virtual OTableWindowListBox* CreateListBox(); // wird im ERSTEN Init aufgerufen - BOOL FillListBox(); + sal_Bool FillListBox(); // wird in JEDEM Init aufgerufen virtual void OnEntryDoubleClicked(SvLBoxEntry* /*pEntry*/) { } @@ -105,7 +105,7 @@ namespace dbaui @return when the table could handle the keyevent. */ - BOOL HandleKeyInput( const KeyEvent& rEvt ); + sal_Bool HandleKeyInput( const KeyEvent& rEvt ); /** delete the user data with the equal type as created within createUserData @param _pUserData @@ -136,7 +136,7 @@ namespace dbaui virtual ~OTableWindow(); // spaeter Constructor, siehe auch CreateListbox und FillListbox - virtual BOOL Init(); + virtual sal_Bool Init(); OJoinTableView* getTableView(); const OJoinTableView* getTableView() const; @@ -146,11 +146,11 @@ namespace dbaui void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ); String getTitle() const; - void SetBoldTitle( BOOL bBold ); + void SetBoldTitle( sal_Bool bBold ); void setActive(sal_Bool _bActive = sal_True); void Remove(); - BOOL IsActiveWindow(){ return m_bActive; } + sal_Bool IsActiveWindow(){ return m_bActive; } ::rtl::OUString GetTableName() const { return m_pData->GetTableName(); } ::rtl::OUString GetWinName() const { return m_pData->GetWinName(); } @@ -168,7 +168,7 @@ namespace dbaui inline ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetOriginalColumns() const { return m_pData->getColumns(); } inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetTable() const { return m_pData->getTable(); } - UINT16 GetSizingFlags() const { return m_nSizingFlags; } + sal_uInt16 GetSizingFlags() const { return m_nSizingFlags; } /** set the sizing flag to the direction @param _rPos The EndPosition after resizing. @@ -192,7 +192,7 @@ namespace dbaui virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); // habe ich Connections nach aussen ? - BOOL ExistsAConn() const; + sal_Bool ExistsAConn() const; void EnumValidFields(::std::vector< ::rtl::OUString>& arrstrFields); diff --git a/dbaccess/source/ui/inc/TableWindowData.hxx b/dbaccess/source/ui/inc/TableWindowData.hxx index 6e84f48a4ef0..51644184bcb2 100644 --- a/dbaccess/source/ui/inc/TableWindowData.hxx +++ b/dbaccess/source/ui/inc/TableWindowData.hxx @@ -81,16 +81,16 @@ namespace dbaui inline ::rtl::OUString GetWinName() const { return m_aWinName; } inline Point GetPosition() const { return m_aPosition; } inline Size GetSize() const { return m_aSize; } - inline BOOL IsShowAll() const { return m_bShowAll; } + inline sal_Bool IsShowAll() const { return m_bShowAll; } inline bool isQuery() const { return m_bIsQuery; } inline bool isValid() const { return m_bIsValid; } // it is either a table or query but it is known - BOOL HasPosition() const; - BOOL HasSize() const; + sal_Bool HasPosition() const; + sal_Bool HasSize() const; inline void SetWinName( const ::rtl::OUString& rWinName ) { m_aWinName = rWinName; } inline void SetPosition( const Point& rPos ) { m_aPosition=rPos; } inline void SetSize( const Size& rSize ) { m_aSize = rSize; } - inline void ShowAll( BOOL bAll ) { m_bShowAll = bAll; } + inline void ShowAll( sal_Bool bAll ) { m_bShowAll = bAll; } inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> getTable() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xTable; } inline ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> getKeys() const { ::osl::MutexGuard aGuard( m_aMutex ); return m_xKeys; } diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx b/dbaccess/source/ui/inc/TableWindowListBox.hxx index a1d0b67099d4..bd25e3a244fb 100644 --- a/dbaccess/source/ui/inc/TableWindowListBox.hxx +++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx @@ -65,12 +65,12 @@ namespace dbaui Point m_aMousePos; OTableWindow* m_pTabWin; - ULONG m_nDropEvent; - ULONG m_nUiEvent; + sal_uLong m_nDropEvent; + sal_uLong m_nUiEvent; OJoinDropData m_aDropInfo; - BOOL m_bReallyScrolled : 1; - BOOL m_bDragSource : 1; + sal_Bool m_bReallyScrolled : 1; + sal_Bool m_bDragSource : 1; protected: virtual void LoseFocus(); diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx index f5f073f8e4b3..bbefbe3f85e7 100644 --- a/dbaccess/source/ui/inc/TokenWriter.hxx +++ b/dbaccess/source/ui/inc/TokenWriter.hxx @@ -125,8 +125,8 @@ namespace dbaui void setSTableName(const ::rtl::OUString &_sTableName){ m_sDefaultTableName = _sTableName; } //dyf add end - virtual BOOL Write(); // Export - virtual BOOL Read(); // Import + virtual sal_Bool Write(); // Export + virtual sal_Bool Read(); // Import void initialize(const ::svx::ODataAccessDescriptor& _aDataDescriptor); void dispose(); @@ -162,8 +162,8 @@ namespace dbaui : ODatabaseImportExport(_rxConnection,_rxNumberF,_rM) {} - virtual BOOL Write(); - virtual BOOL Read(); + virtual sal_Bool Write(); + virtual sal_Bool Read(); }; // ========================================================================= // HTML Im- und Export @@ -181,7 +181,7 @@ namespace dbaui char sIndent[nIndentMax+1]; sal_Int16 m_nIndent; #ifdef DBG_UTIL - BOOL m_bCheckFont; + sal_Bool m_bCheckFont; #endif void WriteHeader(); @@ -206,8 +206,8 @@ namespace dbaui : ODatabaseImportExport(_rxConnection,_rxNumberF,_rM) {} - virtual BOOL Write(); - virtual BOOL Read(); + virtual sal_Bool Write(); + virtual sal_Bool Read(); }; // ========================================================================= @@ -243,8 +243,8 @@ namespace dbaui : ODatabaseImportExport(_rxConnection,NULL,_rM) {} - virtual BOOL Write(); - virtual BOOL Read(); + virtual sal_Bool Write(); + virtual sal_Bool Read(); private: using ODatabaseImportExport::initialize; diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index daa8756751cf..e2268a627a50 100644 --- a/dbaccess/source/ui/inc/UITools.hxx +++ b/dbaccess/source/ui/inc/UITools.hxx @@ -311,7 +311,7 @@ namespace dbaui @param _xDatasource Asked for the properties. @param _rAutoIncrementValueEnabled - Set to TRUE when the property was set in the datasource. + Set to sal_True when the property was set in the datasource. @param _rsAutoIncrementValue Set to the value when the property was set in the datasource. */ @@ -323,7 +323,7 @@ namespace dbaui @param _xConnection Used to get the datasource as parent from the connection. @param _rAutoIncrementValueEnabled - Set to TRUE when the property was set in the datasource. + Set to sal_True when the property was set in the datasource. @param _rsAutoIncrementValue Set to the value when the property was set in the datasource. */ @@ -382,7 +382,7 @@ namespace dbaui @return RET_YES, RET_NO, RET_ALL */ - sal_Int32 askForUserAction(Window* _pParent,USHORT _nTitle,USHORT _nText,sal_Bool _bAll,const ::rtl::OUString& _sName); + sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const ::rtl::OUString& _sName); /** creates a new view from a query or table @param _sName diff --git a/dbaccess/source/ui/inc/UserAdminDlg.hxx b/dbaccess/source/ui/inc/UserAdminDlg.hxx index 4d42561a06f0..96dcc4394a95 100644 --- a/dbaccess/source/ui/inc/UserAdminDlg.hxx +++ b/dbaccess/source/ui/inc/UserAdminDlg.hxx @@ -68,7 +68,7 @@ namespace dbaui ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection; sal_Bool m_bOwnConnection; protected: - virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage); + virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage); public: OUserAdminDlg( Window* _pParent ,SfxItemSet* _pItems diff --git a/dbaccess/source/ui/inc/VertSplitView.hxx b/dbaccess/source/ui/inc/VertSplitView.hxx index 52ef4dc381a0..3e45dc2a29c7 100644 --- a/dbaccess/source/ui/inc/VertSplitView.hxx +++ b/dbaccess/source/ui/inc/VertSplitView.hxx @@ -41,7 +41,7 @@ namespace dbaui Window* m_pRight; sal_Bool m_bVertical; - void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); + void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); DECL_LINK( SplitHdl, Splitter* ); protected: virtual void DataChanged(const DataChangedEvent& rDCEvt); diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx index a1b6118b7d08..9312a490891f 100644 --- a/dbaccess/source/ui/inc/WCPage.hxx +++ b/dbaccess/source/ui/inc/WCPage.hxx @@ -72,8 +72,8 @@ namespace dbaui OWizColumnSelect* m_pPage2; OWizNormalExtend* m_pPage3; - BOOL m_bPKeyAllowed; - BOOL m_bUseHeaderAllowed; + sal_Bool m_bPKeyAllowed; + sal_Bool m_bUseHeaderAllowed; DECL_LINK( AppendDataClickHdl, Button* ); @@ -88,17 +88,17 @@ namespace dbaui public: virtual void Reset(); virtual void ActivatePage(); - virtual BOOL LeavePage(); + virtual sal_Bool LeavePage(); virtual String GetTitle() const ; OCopyTable( Window * pParent ); virtual ~OCopyTable(); - inline BOOL IsOptionDefData() const { return m_aRB_DefData.IsChecked(); } - inline BOOL IsOptionDef() const { return m_aRB_Def.IsChecked(); } - inline BOOL IsOptionAppendData() const { return m_aRB_AppendData.IsChecked(); } - inline BOOL IsOptionView() const { return m_aRB_View.IsChecked(); } - inline BOOL UseHeaderLine() const { return m_aCB_UseHeaderLine.IsChecked(); } + inline sal_Bool IsOptionDefData() const { return m_aRB_DefData.IsChecked(); } + inline sal_Bool IsOptionDef() const { return m_aRB_Def.IsChecked(); } + inline sal_Bool IsOptionAppendData() const { return m_aRB_AppendData.IsChecked(); } + inline sal_Bool IsOptionView() const { return m_aRB_View.IsChecked(); } + inline sal_Bool UseHeaderLine() const { return m_aCB_UseHeaderLine.IsChecked(); } String GetKeyName() const { return m_edKeyName.GetText(); } void setCreateStyleAction(); @@ -108,7 +108,7 @@ namespace dbaui } inline void disallowUseHeaderLine() { - m_bUseHeaderAllowed = FALSE; + m_bUseHeaderAllowed = sal_False; m_aCB_UseHeaderLine.Disable(); } diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx index e9e6e71f6999..42cb2527a426 100644 --- a/dbaccess/source/ui/inc/WColumnSelect.hxx +++ b/dbaccess/source/ui/inc/WColumnSelect.hxx @@ -88,7 +88,7 @@ namespace dbaui void enableButtons(); - USHORT adjustColumnPosition(ListBox* _pLeft, + sal_uInt16 adjustColumnPosition(ListBox* _pLeft, const ::rtl::OUString& _sColumnName, ODatabaseExport::TColumnVector::size_type nCurrentPos, const ::comphelper::TStringMixEqualFunctor& _aCase); diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx index c98c6879db2b..b00a008d83b5 100644 --- a/dbaccess/source/ui/inc/adtabdlg.hxx +++ b/dbaccess/source/ui/inc/adtabdlg.hxx @@ -124,7 +124,7 @@ namespace dbaui IAddTableDialogContext& _rContext ); private: - virtual BOOL Close(); + virtual sal_Bool Close(); bool impl_isAddAllowed(); void impl_addTable(); diff --git a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx index 87470c942ed9..8353e97be093 100644 --- a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx +++ b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx @@ -58,7 +58,7 @@ namespace dbaui SfxItemSet* m_pItemSet; protected: - virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage); + virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage); public: AdvancedSettingsDialog( Window* _pParent diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx index 962bc75bb7f9..d29a7f4ab59c 100644 --- a/dbaccess/source/ui/inc/brwctrlr.hxx +++ b/dbaccess/source/ui/inc/brwctrlr.hxx @@ -122,7 +122,7 @@ namespace dbaui // members for asynchronous load operations FormControllerImpl* m_pFormControllerImpl; // implementing the XFormController - ULONG m_nPendingLoadFinished; // the event used to tell ourself that the load is finished + sal_uLong m_nPendingLoadFinished; // the event used to tell ourself that the load is finished sal_uInt16 m_nFormActionNestingLevel; // see enter-/leaveFormAction sal_Bool m_bLoadCanceled : 1; // the load was canceled somehow diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx index 014fcb810860..17936f3dc791 100644 --- a/dbaccess/source/ui/inc/charsetlistbox.hxx +++ b/dbaccess/source/ui/inc/charsetlistbox.hxx @@ -52,7 +52,7 @@ namespace dbaui ~CharSetListBox(); void SelectEntryByIanaName( const String& _rIanaName ); - bool StoreSelectedCharSet( SfxItemSet& _rSet, const USHORT _nItemId ); + bool StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId ); private: OCharsetDisplay m_aCharSets; diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx index 68687ab8eb43..b2e7e6d0c4d3 100644 --- a/dbaccess/source/ui/inc/curledit.hxx +++ b/dbaccess/source/ui/inc/curledit.hxx @@ -57,10 +57,10 @@ class OConnectionURLEdit : public Edit m_pTypeCollection; FixedText* m_pForcedPrefix; String m_sSaveValueNoPrefix; - BOOL m_bShowPrefix; // when the prefix will be visible, otherwise not + sal_Bool m_bShowPrefix; // when the prefix will be visible, otherwise not public: - OConnectionURLEdit(Window* pParent, const ResId& rResId,BOOL _bShowPrefix = FALSE); + OConnectionURLEdit(Window* pParent, const ResId& rResId,sal_Bool _bShowPrefix = sal_False); ~OConnectionURLEdit(); public: @@ -74,7 +74,7 @@ public: @param _bShowPrefix If than the prefix will be visible, otherwise not. */ - void ShowPrefix(BOOL _bShowPrefix); + void ShowPrefix(sal_Bool _bShowPrefix); /// get the currently set text, excluding the prefix indicating the type virtual String GetTextNoPrefix() const; /// set a new text, leave the current prefix unchanged diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx index 005af27ffdfe..012edecee040 100644 --- a/dbaccess/source/ui/inc/dbadmin.hxx +++ b/dbaccess/source/ui/inc/dbadmin.hxx @@ -68,7 +68,7 @@ private: sal_Bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing sal_Bool m_bUIEnabled : 1; /// if the UI is enabled, false otherwise. Cannot be switched back to , once it is - USHORT m_nMainPageID; + sal_uInt16 m_nMainPageID; public: /** ctor. The itemset given should have been created by createItemSet and should be destroyed @@ -110,9 +110,9 @@ public: protected: // adds a new detail page and remove all the old ones - void addDetailPage(USHORT _nPageId,USHORT _nTextId,CreateTabPage pCreateFunc); + void addDetailPage(sal_uInt16 _nPageId,sal_uInt16 _nTextId,CreateTabPage pCreateFunc); - virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage); + virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage); virtual short Ok(); protected: diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index dfd1dad59356..fb32fc665e23 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -131,13 +131,13 @@ namespace dbaui virtual void InitEntry( SvLBoxEntry* pEntry, const XubString& aStr, const Image& aCollEntryBmp, const Image& aExpEntryBmp, SvLBoxButtonKind eButtonKind); // enable editing for tables/views and queries - virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& ); - virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText ); + virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& ); + virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText ); - virtual BOOL DoubleClickHdl(); + virtual sal_Bool DoubleClickHdl(); virtual PopupMenu* CreateContextMenu( void ); - virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry ); + virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ); void SetEnterKeyHdl(const Link& rNewHdl) {m_aEnterKeyHdl = rNewHdl;} diff --git a/dbaccess/source/ui/inc/dlgattr.hxx b/dbaccess/source/ui/inc/dlgattr.hxx index 63d11bdd8ab4..968636286133 100644 --- a/dbaccess/source/ui/inc/dlgattr.hxx +++ b/dbaccess/source/ui/inc/dlgattr.hxx @@ -55,10 +55,10 @@ namespace dbaui SvxNumberInfoItem* pNumberInfoItem; public: - SbaSbAttrDlg( Window * pParent, const SfxItemSet*, SvNumberFormatter*, USHORT nFlags = TP_ATTR_CHAR , BOOL bRow = FALSE); + SbaSbAttrDlg( Window * pParent, const SfxItemSet*, SvNumberFormatter*, sal_uInt16 nFlags = TP_ATTR_CHAR , sal_Bool bRow = sal_False); ~SbaSbAttrDlg(); - virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage ); + virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ); }; //......................................................................... } // namespace dbaui diff --git a/dbaccess/source/ui/inc/dlgsize.hxx b/dbaccess/source/ui/inc/dlgsize.hxx index c442bd4fb90c..dc616ba47df6 100644 --- a/dbaccess/source/ui/inc/dlgsize.hxx +++ b/dbaccess/source/ui/inc/dlgsize.hxx @@ -65,7 +65,7 @@ namespace dbaui HelpButton aPB_HELP; public: - DlgSize( Window * pParent, sal_Int32 nVal, BOOL bRow, sal_Int32 _nAlternativeStandard = -1 ); + DlgSize( Window * pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAlternativeStandard = -1 ); ~DlgSize(); sal_Int32 GetValue(); diff --git a/dbaccess/source/ui/inc/imageprovider.hxx b/dbaccess/source/ui/inc/imageprovider.hxx index b384e9e3d0db..bbc0ccced557 100644 --- a/dbaccess/source/ui/inc/imageprovider.hxx +++ b/dbaccess/source/ui/inc/imageprovider.hxx @@ -146,7 +146,7 @@ namespace dbaui the resource ID image to be used for the object type. Must be fed into a ModuleRes instance to actually load the image. */ - USHORT getDefaultImageResourceID( + sal_uInt16 getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType, bool _bHighContrast ); diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx index 893ea1eb4472..c19854e38afc 100644 --- a/dbaccess/source/ui/inc/listviewitems.hxx +++ b/dbaccess/source/ui/inc/listviewitems.hxx @@ -53,7 +53,7 @@ namespace dbaui { } - virtual USHORT IsA(); + virtual sal_uInt16 IsA(); virtual void Paint(const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); virtual void InitViewData( SvLBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* _pViewData); diff --git a/dbaccess/source/ui/inc/moduledbu.hxx b/dbaccess/source/ui/inc/moduledbu.hxx index eeb6a9747524..bfeeee749cf3 100644 --- a/dbaccess/source/ui/inc/moduledbu.hxx +++ b/dbaccess/source/ui/inc/moduledbu.hxx @@ -96,7 +96,7 @@ public: class ModuleRes : public ::ResId { public: - ModuleRes(USHORT _nId) : ResId(_nId, *OModule::getResManager()) { } + ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { } }; //......................................................................... diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx index 87c403a45be3..26957bbf8f70 100644 --- a/dbaccess/source/ui/inc/opendoccontrols.hxx +++ b/dbaccess/source/ui/inc/opendoccontrols.hxx @@ -71,7 +71,7 @@ namespace dbaui { private: typedef ::std::pair< String, String > StringPair; - typedef ::std::map< USHORT, StringPair > MapIndexToStringPair; + typedef ::std::map< sal_uInt16, StringPair > MapIndexToStringPair; ::rtl::OUString m_sModule; MapIndexToStringPair m_aURLs; @@ -85,7 +85,7 @@ namespace dbaui protected: virtual void RequestHelp( const HelpEvent& _rHEvt ); - StringPair impl_getDocumentAtIndex( USHORT _nListIndex, bool _bSystemNotation = false ) const; + StringPair impl_getDocumentAtIndex( sal_uInt16 _nListIndex, bool _bSystemNotation = false ) const; private: void impl_init( const sal_Char* _pAsciiModuleName ); diff --git a/dbaccess/source/ui/inc/propertystorage.hxx b/dbaccess/source/ui/inc/propertystorage.hxx index 79cd07b5a505..f60ab70d2c78 100644 --- a/dbaccess/source/ui/inc/propertystorage.hxx +++ b/dbaccess/source/ui/inc/propertystorage.hxx @@ -62,7 +62,7 @@ namespace dbaui //==================================================================== //= SetItemPropertyStorage //==================================================================== - typedef USHORT ItemId; + typedef sal_uInt16 ItemId; /** a PropertyStorage implementation which stores the value in an item set */ diff --git a/dbaccess/source/ui/inc/querycontroller.hxx b/dbaccess/source/ui/inc/querycontroller.hxx index ec36e6ed3e6e..0e6f98e8304e 100644 --- a/dbaccess/source/ui/inc/querycontroller.hxx +++ b/dbaccess/source/ui/inc/querycontroller.hxx @@ -99,7 +99,7 @@ namespace dbaui sal_Int32 m_nVisibleRows; // which rows the selection browse should show sal_Int32 m_nSplitPos; // the position of the splitter sal_Int32 m_nCommandType; // the type of the object we're designing - sal_Bool m_bGraphicalDesign; // are we in the graphical design mode (TRUE) or in the text design (FALSE)? + sal_Bool m_bGraphicalDesign; // are we in the graphical design mode (sal_True) or in the text design (sal_False)? sal_Bool m_bDistinct; // true when you want "select distinct" otherwise false sal_Bool m_bViewAlias; // show the alias row in the design view sal_Bool m_bViewTable; // show the table row in the design view diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx index 20fecdfa30f2..944524ee6eba 100644 --- a/dbaccess/source/ui/inc/queryfilter.hxx +++ b/dbaccess/source/ui/inc/queryfilter.hxx @@ -130,10 +130,10 @@ namespace dbaui DECL_LINK( ListSelectHdl, ListBox * ); DECL_LINK( ListSelectCompHdl, ListBox * ); - void SetLine( USHORT nIdx,const ::com::sun::star::beans::PropertyValue& _rItem,sal_Bool _bOr ); + void SetLine( sal_uInt16 nIdx,const ::com::sun::star::beans::PropertyValue& _rItem,sal_Bool _bOr ); void EnableLines(); sal_Int32 GetOSQLPredicateType( const String& _rSelectedPredicate ) const; - USHORT GetSelectionPos(sal_Int32 eType,const ListBox& rListBox) const; + sal_uInt16 GetSelectionPos(sal_Int32 eType,const ListBox& rListBox) const; sal_Bool getCondition(const ListBox& _rField,const ListBox& _rComp,const Edit& _rValue,::com::sun::star::beans::PropertyValue& _rFilter) const; void fillLines(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& _aValues); diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx index eac973230d20..04cbd9afbf8b 100644 --- a/dbaccess/source/ui/inc/sbagrid.hxx +++ b/dbaccess/source/ui/inc/sbagrid.hxx @@ -259,7 +259,7 @@ namespace dbaui sal_Int32 m_nAsyncDropEvent; - USHORT m_nCurrentActionColId; + sal_uInt16 m_nCurrentActionColId; // ui actions (e.g. a context menu) may be performed on columns which aren't the current one // and aren't selected, so we have to track this column id diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx index 4733a2640ebc..fb4f64c52c4f 100644 --- a/dbaccess/source/ui/inc/sqledit.hxx +++ b/dbaccess/source/ui/inc/sqledit.hxx @@ -43,8 +43,8 @@ namespace dbaui Link m_lnkTextModifyHdl; String m_strOrigText; // wird beim Undo wiederhergestellt OQueryTextView* m_pView; - BOOL m_bAccelAction; // Wird bei Cut, Copy, Paste gesetzt - BOOL m_bStopTimer; + sal_Bool m_bAccelAction; // Wird bei Cut, Copy, Paste gesetzt + sal_Bool m_bStopTimer; utl::SourceViewConfig m_SourceViewConfig; svtools::ColorConfig m_ColorConfig; @@ -69,7 +69,7 @@ namespace dbaui using MultiLineEditSyntaxHighlight::SetText; // own functionality - BOOL IsInAccelAct(); + sal_Bool IsInAccelAct(); void SetTextModifyHdl(const Link& lnk) { m_lnkTextModifyHdl = lnk; } // bitte nicht SetModifyHdl benutzen, den brauche ich selber, der hier wird von dem damit gesetzten Handler diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 0448cef602e6..2502433f9f54 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -163,12 +163,12 @@ namespace dbaui Splitter* m_pSplitter; SvLBoxTreeList* m_pTreeModel; // contains the datasources of the registry SvLBoxEntry* m_pCurrentlyDisplayed; - ULONG m_nAsyncDrop; + sal_uLong m_nAsyncDrop; - sal_Int16 m_nBorder; // TRUE when border should be shown + sal_Int16 m_nBorder; // sal_True when border should be shown sal_Bool m_bQueryEscapeProcessing : 1; // the escape processing flag of the query currently loaded (if any) - sal_Bool m_bShowMenu; // if TRUE the menu should be visible otherwise not + sal_Bool m_bShowMenu; // if sal_True the menu should be visible otherwise not sal_Bool m_bInSuspend; sal_Bool m_bEnableBrowser; ::boost::optional< bool > diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index f4ff8064181d..9e134b784ea1 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -114,10 +114,10 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows, ,m_nRows(1) ,m_nRowCount(0) ,m_nDefToken( gsl_getSystemTextEncoding() ) - ,m_bError(FALSE) - ,m_bInTbl(FALSE) - ,m_bHead(TRUE) - ,m_bDontAskAgain(FALSE) + ,m_bError(sal_False) + ,m_bInTbl(sal_False) + ,m_bHead(sal_True) + ,m_bDontAskAgain(sal_False) ,m_bIsAutoIncrement(_bAutoIncrementEnabled) ,m_bFoundTable(sal_False) ,m_bCheckOnly(sal_False) @@ -173,7 +173,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, ,m_nDefToken( gsl_getSystemTextEncoding() ) ,m_bError(sal_False) ,m_bInTbl(sal_False) - ,m_bHead(TRUE) + ,m_bHead(sal_True) ,m_bDontAskAgain(sal_False) ,m_bIsAutoIncrement(sal_False) ,m_bFoundTable(sal_False) @@ -786,9 +786,9 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException OSQLWarningBox aBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO ); if (aBox.Execute() == RET_YES) - m_bDontAskAgain = TRUE; + m_bDontAskAgain = sal_True; else - m_bError = TRUE; + m_bError = sal_True; } // if(!m_bDontAskAgain) } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx index 9e3517ffb3af..d787d19a3305 100644 --- a/dbaccess/source/ui/misc/HtmlReader.cxx +++ b/dbaccess/source/ui/misc/HtmlReader.cxx @@ -110,7 +110,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection, DBG_CTOR(OHTMLReader,NULL); SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); // If the file starts with a BOM, switch to UCS2. - SetSwitchToUCS2( TRUE ); + SetSwitchToUCS2( sal_True ); } // --------------------------------------------------------------------------- OHTMLReader::OHTMLReader(SvStream& rIn, @@ -132,7 +132,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn, DBG_CTOR(OHTMLReader,NULL); SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); // If the file starts with a BOM, switch to UCS2. - SetSwitchToUCS2( TRUE ); + SetSwitchToUCS2( sal_True ); } // --------------------------------------------------------------------------- OHTMLReader::~OHTMLReader() @@ -325,7 +325,7 @@ void OHTMLReader::NextToken( int nToken ) void OHTMLReader::fetchOptions() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::fetchOptions" ); - m_bInTbl = TRUE; + m_bInTbl = sal_True; const HTMLOptions* options = GetOptions(); sal_Int16 nArrLen = options->Count(); for ( sal_Int16 i = 0; i < nArrLen; i++ ) @@ -492,7 +492,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken) // run through case HTML_TABLEHEADER_ON: TableDataOn(eVal,nTmpToken2); - bTableHeader = TRUE; + bTableHeader = sal_True; break; case HTML_TABLEDATA_OFF: // m_bAppendFirstLine = true; @@ -519,7 +519,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken) case HTML_TITLE_ON: case HTML_CAPTION_ON: - bCaption = TRUE; + bCaption = sal_True; break; case HTML_TITLE_OFF: case HTML_CAPTION_OFF: diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx index 145262376288..47e9c7788478 100644 --- a/dbaccess/source/ui/misc/RowSetDrop.cxx +++ b/dbaccess/source/ui/misc/RowSetDrop.cxx @@ -106,19 +106,19 @@ void ORowSetImportExport::initialize() } } // ----------------------------------------------------------------------------- -BOOL ORowSetImportExport::Write() +sal_Bool ORowSetImportExport::Write() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "ORowSetImportExport::Write" ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- -BOOL ORowSetImportExport::Read() +sal_Bool ORowSetImportExport::Read() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "ORowSetImportExport::Read" ); // check if there is any column to copy if(::std::find_if(m_aColumnMapping.begin(),m_aColumnMapping.end(), ::std::bind2nd(::std::greater(),0)) == m_aColumnMapping.end()) - return FALSE; + return sal_False; sal_Int32 nCurrentRow = 0; sal_Int32 nRowFilterIndex = 0; sal_Bool bContinue = sal_True; @@ -164,7 +164,7 @@ BOOL ORowSetImportExport::Read() } } } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- sal_Bool ORowSetImportExport::insertNewRow() diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx index 5df3a10b15b6..6caa215c7543 100644 --- a/dbaccess/source/ui/misc/RtfReader.cxx +++ b/dbaccess/source/ui/misc/RtfReader.cxx @@ -129,7 +129,7 @@ void ORTFReader::NextToken( int nToken ) { int nTmpToken2 = GetNextToken(); - sal_Bool bNext = TRUE; + sal_Bool bNext = sal_True; do { Color aColor; @@ -193,7 +193,7 @@ void ORTFReader::NextToken( int nToken ) eraseTokens(); } - m_bInTbl = TRUE; // jetzt befinden wir uns in einer Tabellenbeschreibung + m_bInTbl = sal_True; // jetzt befinden wir uns in einer Tabellenbeschreibung break; case RTF_TEXTTOKEN: case RTF_SINGLECHAR: @@ -250,7 +250,7 @@ void ORTFReader::NextToken( int nToken ) } break; case RTF_INTBL: - m_bInTbl = TRUE; + m_bInTbl = sal_True; break; case RTF_TEXTTOKEN: case RTF_SINGLECHAR: @@ -295,7 +295,7 @@ sal_Bool ORTFReader::CreateTable(int nToken) if(m_bInTbl) aColumnName.Erase(); - m_bInTbl = TRUE; + m_bInTbl = sal_True; break; case RTF_TEXTTOKEN: case RTF_SINGLECHAR: diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index b66778138d57..29750de1f00b 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -362,24 +362,24 @@ void ODatabaseImportExport::initialize() m_bInInitialize = sal_False; } // ----------------------------------------------------------------------------- -BOOL ODatabaseImportExport::Write() +sal_Bool ODatabaseImportExport::Write() { if ( m_bNeedToReInitialize ) { if ( !m_bInInitialize ) initialize(); } // if ( m_bNeedToReInitialize ) - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- -BOOL ODatabaseImportExport::Read() +sal_Bool ODatabaseImportExport::Read() { if ( m_bNeedToReInitialize ) { if ( !m_bInInitialize ) initialize(); } // if ( m_bNeedToReInitialize ) - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- void ODatabaseImportExport::impl_initializeRowMember_throw() @@ -395,7 +395,7 @@ void ODatabaseImportExport::impl_initializeRowMember_throw() } } //====================================================================== -BOOL ORTFImportExport::Write() +sal_Bool ORTFImportExport::Write() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "ORTFImportExport::Write" ); ODatabaseImportExport::Write(); @@ -451,10 +451,10 @@ BOOL ORTFImportExport::Write() } */ - BOOL bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); - BOOL bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); - BOOL bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); - BOOL bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); + sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); + sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); + sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); + sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); sal_Int32 nColor = 0; if(m_xObject.is()) @@ -618,7 +618,7 @@ BOOL ORTFImportExport::Write() } (*m_pStream) << '}' << ODatabaseImportExport::sNewLine; - (*m_pStream) << (BYTE) 0; + (*m_pStream) << (sal_uInt8) 0; return ((*m_pStream).GetError() == SVSTREAM_OK); } // ----------------------------------------------------------------------------- @@ -641,10 +641,10 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou (*m_pStream) << ODatabaseImportExport::sNewLine; } - const BOOL bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); - const BOOL bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); - const BOOL bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); - const BOOL bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); + const sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); + const sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); + const sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); + const sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); static const ::rtl::OString aFS2("\\fs20\\f1\\cf0\\cb1"); ::comphelper::ComponentContext aContext(m_xFactory); Reference< XRowSet > xRowSet(m_xRow,UNO_QUERY); @@ -691,7 +691,7 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou ++k; } //------------------------------------------------------------------- -BOOL ORTFImportExport::Read() +sal_Bool ORTFImportExport::Read() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "ORTFImportExport::Read" ); ODatabaseImportExport::Read(); @@ -727,7 +727,7 @@ const char __FAR_DATA OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t //======================================================================== #define OUT_PROLOGUE() ((*m_pStream) << sHTML30_Prologue << ODatabaseImportExport::sNewLine << ODatabaseImportExport::sNewLine) #define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag ) -#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag, FALSE ) +#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag, sal_False ) #define OUT_STR( str ) HTMLOutFuncs::Out_String( (*m_pStream), str ) #define OUT_LF() (*m_pStream) << ODatabaseImportExport::sNewLine << GetIndentStr() #define lcl_OUT_LF() (*m_pStream) << ODatabaseImportExport::sNewLine @@ -745,7 +745,7 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD : ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF,rExchange) ,m_nIndent(0) #ifdef DBG_UTIL - ,m_bCheckFont(FALSE) + ,m_bCheckFont(sal_False) #endif { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::OHTMLImportExport" ); @@ -756,7 +756,7 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD sIndent[0] = 0; } //------------------------------------------------------------------- -BOOL OHTMLImportExport::Write() +sal_Bool OHTMLImportExport::Write() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::Write" ); ODatabaseImportExport::Write(); @@ -775,7 +775,7 @@ BOOL OHTMLImportExport::Write() return sal_False; } //------------------------------------------------------------------- -BOOL OHTMLImportExport::Read() +sal_Bool OHTMLImportExport::Read() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::Read" ); ODatabaseImportExport::Read(); @@ -1067,12 +1067,12 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I { fVal = m_xFormatter->convertStringToNumber(nFormat,rValue); ByteString aTmpString(aStrTD); - HTMLOutFuncs::CreateTableDataOptionsValNum( aTmpString, FALSE, fVal,nFormat, *pFormatter ); + HTMLOutFuncs::CreateTableDataOptionsValNum( aTmpString, sal_False, fVal,nFormat, *pFormatter ); } catch(Exception&) { ByteString aTmpString(aStrTD); - HTMLOutFuncs::CreateTableDataOptionsValNum( aTmpString, FALSE, fVal,nFormat, *pFormatter ); + HTMLOutFuncs::CreateTableDataOptionsValNum( aTmpString, sal_False, fVal,nFormat, *pFormatter ); } } @@ -1080,10 +1080,10 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I FontOn(); - BOOL bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); - BOOL bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); - BOOL bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); - BOOL bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); + sal_Bool bBold = ( ::com::sun::star::awt::FontWeight::BOLD == m_aFont.Weight ); + sal_Bool bItalic = ( ::com::sun::star::awt::FontSlant_ITALIC == m_aFont.Slant ); + sal_Bool bUnderline = ( ::com::sun::star::awt::FontUnderline::NONE != m_aFont.Underline ); + sal_Bool bStrikeout = ( ::com::sun::star::awt::FontStrikeout::NONE != m_aFont.Strikeout ); if ( bBold ) TAG_ON( OOO_STRING_SVTOOLS_HTML_bold ); if ( bItalic ) TAG_ON( OOO_STRING_SVTOOLS_HTML_italic ); @@ -1110,7 +1110,7 @@ void OHTMLImportExport::FontOn() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::FontOn" ); #ifdef DBG_UTIL - m_bCheckFont = TRUE; + m_bCheckFont = sal_True; #endif // @@ -1143,7 +1143,7 @@ inline void OHTMLImportExport::FontOff() DBG_ASSERT(m_bCheckFont,"Kein FontOn() gerufen"); TAG_OFF( OOO_STRING_SVTOOLS_HTML_font ); #ifdef DBG_UTIL - m_bCheckFont = FALSE; + m_bCheckFont = sal_False; #endif } //----------------------------------------------------------------------- diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 77180a01ac05..0b555662116e 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1643,7 +1643,7 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType return pTypeInfo; } // ----------------------------------------------------------------------------- -sal_Int32 askForUserAction(Window* _pParent,USHORT _nTitle,USHORT _nText,sal_Bool _bAll,const ::rtl::OUString& _sName) +sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const ::rtl::OUString& _sName) { vos::OGuard aGuard( Application::GetSolarMutex() ); String aMsg = String(ModuleRes(_nText)); diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx index 64b8b536bafc..6dc59632ef4d 100644 --- a/dbaccess/source/ui/misc/WCPage.cxx +++ b/dbaccess/source/ui/misc/WCPage.cxx @@ -115,7 +115,7 @@ OCopyTable::OCopyTable( Window * pParent ) ,m_edKeyName( this, ModuleRes( ET_KEYNAME ) ) ,m_pPage2(NULL) ,m_pPage3(NULL) - ,m_bUseHeaderAllowed(TRUE) + ,m_bUseHeaderAllowed(sal_True) { DBG_CTOR(OCopyTable,NULL); @@ -126,7 +126,7 @@ OCopyTable::OCopyTable( Window * pParent ) if ( !m_pParent->supportsViews() ) m_aRB_View.Disable(); - m_aCB_UseHeaderLine.Check(TRUE); + m_aCB_UseHeaderLine.Check(sal_True); m_bPKeyAllowed = m_pParent->supportsPrimaryKey(); m_aCB_PrimaryColumn.Enable(m_bPKeyAllowed); @@ -297,7 +297,7 @@ sal_Bool OCopyTable::LeavePage() void OCopyTable::ActivatePage() { DBG_CHKTHIS(OCopyTable,NULL); - m_pParent->GetOKButton().Enable( TRUE ); + m_pParent->GetOKButton().Enable( sal_True ); m_nOldOperation = m_pParent->getOperation(); m_edTableName.GrabFocus(); m_aCB_UseHeaderLine.Check(m_pParent->UseHeaderLine()); diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index 21df5b38b3e3..b4736d216681 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -173,7 +173,7 @@ void OWizColumnSelect::ActivatePage( ) ODatabaseExport::TColumnVector::const_iterator aEnd = pDestColumns->end(); for(;aIter != aEnd;++aIter) { - USHORT nPos = m_lbNewColumnNames.InsertEntry((*aIter)->first); + sal_uInt16 nPos = m_lbNewColumnNames.InsertEntry((*aIter)->first); m_lbNewColumnNames.SetEntryData(nPos,new OFieldDescription(*((*aIter)->second))); m_lbOrgColumnNames.RemoveEntry((*aIter)->first); } @@ -382,7 +382,7 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight, OSL_ENSURE( aPos != pSrcVector->end(),"Invalid position for the iterator here!"); ODatabaseExport::TColumnVector::size_type nPos = (aPos - pSrcVector->begin()) - adjustColumnPosition(_pLeft, _sColumnName, (aPos - pSrcVector->begin()), _aCase); - _pRight->SetEntryData( _pRight->InsertEntry( (*aIter).first, sal::static_int_cast< USHORT >(nPos)),aSrcIter->second ); + _pRight->SetEntryData( _pRight->InsertEntry( (*aIter).first, sal::static_int_cast< sal_uInt16 >(nPos)),aSrcIter->second ); _rRightColumns.push_back((*aIter).first); m_pParent->removeColumnNameFromNameMap(_sColumnName); } @@ -393,12 +393,12 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight, // not enough. We need to take into acccount what fields have // been removed earlier and adjust accordingly. Based on the // algorithm employed in moveColumn(). -USHORT OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft, +sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft, const ::rtl::OUString& _sColumnName, ODatabaseExport::TColumnVector::size_type nCurrentPos, const ::comphelper::TStringMixEqualFunctor& _aCase) { - USHORT nAdjustedPos = 0; + sal_uInt16 nAdjustedPos = 0; // if returning all entries to their original position, // then there is no need to adjust the positions. diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 803554a0094f..9c475971a8d2 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -286,7 +286,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ ) SvLBoxEntry* pEntry = m_CTRL_LEFT.FirstSelected(); if(pEntry) { - ULONG nPos = m_CTRL_LEFT.GetModel()->GetAbsPos(pEntry); + sal_uLong nPos = m_CTRL_LEFT.GetModel()->GetAbsPos(pEntry); SvLBoxEntry* pOldEntry = m_CTRL_RIGHT.FirstSelected(); if(pOldEntry && nPos != m_CTRL_RIGHT.GetModel()->GetAbsPos(pOldEntry)) { @@ -295,7 +295,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ ) pOldEntry = m_CTRL_RIGHT.GetEntry(nPos); if(pOldEntry) { - ULONG nNewPos = m_CTRL_LEFT.GetModel()->GetAbsPos(m_CTRL_LEFT.GetFirstEntryInView()); + sal_uLong nNewPos = m_CTRL_LEFT.GetModel()->GetAbsPos(m_CTRL_LEFT.GetFirstEntryInView()); if ( nNewPos - nPos == 1 ) --nNewPos; m_CTRL_RIGHT.MakeVisible(m_CTRL_RIGHT.GetEntry(nNewPos),sal_True); @@ -320,7 +320,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ SvLBoxEntry* pEntry = m_CTRL_RIGHT.FirstSelected(); if(pEntry) { - ULONG nPos = m_CTRL_RIGHT.GetModel()->GetAbsPos(pEntry); + sal_uLong nPos = m_CTRL_RIGHT.GetModel()->GetAbsPos(pEntry); SvLBoxEntry* pOldEntry = m_CTRL_LEFT.FirstSelected(); if(pOldEntry && nPos != m_CTRL_LEFT.GetModel()->GetAbsPos(pOldEntry)) { @@ -329,7 +329,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ pOldEntry = m_CTRL_LEFT.GetEntry(nPos); if(pOldEntry) { - ULONG nNewPos = m_CTRL_RIGHT.GetModel()->GetAbsPos(m_CTRL_RIGHT.GetFirstEntryInView()); + sal_uLong nNewPos = m_CTRL_RIGHT.GetModel()->GetAbsPos(m_CTRL_RIGHT.GetFirstEntryInView()); if ( nNewPos - nPos == 1 ) nNewPos--; m_CTRL_LEFT.MakeVisible(m_CTRL_LEFT.GetEntry(nNewPos),sal_True); diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index fa72a03269cc..379236321a05 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -158,8 +158,8 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId ) if ( getMetaData().is() && !getMetaData()->supportsMixedCaseQuotedIdentifiers() ) { bCase = sal_False; - USHORT nCount = aListBox.GetEntryCount(); - for (USHORT i=0 ; !bDoubleName && i < nCount ; ++i) + sal_uInt16 nCount = aListBox.GetEntryCount(); + for (sal_uInt16 i=0 ; !bDoubleName && i < nCount ; ++i) { ::rtl::OUString sEntry(aListBox.GetEntry(i)); bDoubleName = sNewName.equalsIgnoreAsciiCase(sEntry); @@ -360,7 +360,7 @@ void OWizTypeSelect::ActivatePage( ) Reset(); m_bFirstTime = bOldFirstTime; - m_lbColumnNames.SelectEntryPos(static_cast(m_nDisplayRow)); + m_lbColumnNames.SelectEntryPos(static_cast(m_nDisplayRow)); m_nDisplayRow = 0; m_lbColumnNames.GetSelectHdl().Call(&m_lbColumnNames); } diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx index fb35bdcc9e73..ffeb18583ea9 100644 --- a/dbaccess/source/ui/misc/imageprovider.cxx +++ b/dbaccess/source/ui/misc/imageprovider.cxx @@ -99,7 +99,7 @@ namespace dbaui //................................................................ static void lcl_getTableImageResourceID_nothrow( const ImageProvider_Data& _rData, const ::rtl::OUString& _rName, - USHORT& _out_rResourceID, USHORT& _out_rResourceID_HC ) + sal_uInt16& _out_rResourceID, sal_uInt16& _out_rResourceID_HC ) { _out_rResourceID = _out_rResourceID_HC = 0; try @@ -173,8 +173,8 @@ namespace dbaui if ( !_out_rImage || !_out_rImageHC ) { // no -> determine by type - USHORT nImageResourceID = 0; - USHORT nImageResourceID_HC = 0; + sal_uInt16 nImageResourceID = 0; + sal_uInt16 nImageResourceID_HC = 0; lcl_getTableImageResourceID_nothrow( *m_pData, _rName, nImageResourceID, nImageResourceID_HC ); if ( nImageResourceID && !_out_rImage ) @@ -189,16 +189,16 @@ namespace dbaui Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType, bool _bHighContrast ) { Image aObjectImage; - USHORT nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType, _bHighContrast ) ); + sal_uInt16 nImageResourceID( getDefaultImageResourceID( _nDatabaseObjectType, _bHighContrast ) ); if ( nImageResourceID ) aObjectImage = Image( ModuleRes( nImageResourceID ) ); return aObjectImage; } //-------------------------------------------------------------------- - USHORT ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType, bool _bHighContrast ) + sal_uInt16 ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType, bool _bHighContrast ) { - USHORT nImageResourceID( 0 ); + sal_uInt16 nImageResourceID( 0 ); switch ( _nDatabaseObjectType ) { case DatabaseObject::QUERY: @@ -223,7 +223,7 @@ namespace dbaui //-------------------------------------------------------------------- Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType, bool _bHighContrast ) { - USHORT nImageResourceID( 0 ); + sal_uInt16 nImageResourceID( 0 ); switch ( _nDatabaseObjectType ) { case DatabaseObject::QUERY: diff --git a/dbaccess/source/ui/querydesign/ConnectionData.hxx b/dbaccess/source/ui/querydesign/ConnectionData.hxx index 258da5fbe817..97cecf44ff8a 100644 --- a/dbaccess/source/ui/querydesign/ConnectionData.hxx +++ b/dbaccess/source/ui/querydesign/ConnectionData.hxx @@ -53,7 +53,7 @@ DECLARE_LIST( OConnectionLineList, OConnectionLine* ); DECLARE_LIST( OTableConnectionDataList, OTableConnectionData* ); //================================================================== -const USHORT MAX_CONN_COUNT = 2; +const sal_uInt16 MAX_CONN_COUNT = 2; class SbaJoinTabWin; class SbaJoinTabWinCont; diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index 000de0e3158e..25791b7ed29b 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -246,7 +246,7 @@ void calcPointX2(const OTableWindow* _pWin,Point& _rNewConPos,Point& _rNewDescrP _rNewConPos.X() -= DESCRIPT_LINE_WIDTH; } //------------------------------------------------------------------------ -BOOL OConnectionLine::RecalcLine() +sal_Bool OConnectionLine::RecalcLine() { ////////////////////////////////////////////////////////////////////// // Fenster und Entries muessen gesetzt sein @@ -254,7 +254,7 @@ BOOL OConnectionLine::RecalcLine() const OTableWindow* pDestWin = m_pTabConn->GetDestWin(); if( !pSourceWin || !pDestWin ) - return FALSE; + return sal_False; SvLBoxEntry* pSourceEntry = pSourceWin->GetListBox()->GetEntryFromText( GetData()->GetSourceFieldName() ); SvLBoxEntry* pDestEntry = pDestWin->GetListBox()->GetEntryFromText( GetData()->GetDestFieldName() ); @@ -297,14 +297,14 @@ BOOL OConnectionLine::RecalcLine() // aDestConnPosY bestimmen calcPointsYValue(pDestWin,pDestEntry,m_aDestConnPos,m_aDestDescrLinePos); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- //------------------------------------------------------------------------ void OConnectionLine::Draw( OutputDevice* pOutDev ) { - const UINT16 nRectSize = 3; + const sal_uInt16 nRectSize = 3; ////////////////////////////////////////////////////////////////////// // Neue Dimensionen berechnen @@ -337,7 +337,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev ) pOutDev->DrawRect( calcRect( m_aDestDescrLinePos,aVector) ); } // ----------------------------------------------------------------------------- -BOOL OConnectionLine::IsValid() const +sal_Bool OConnectionLine::IsValid() const { return m_pData.isValid(); } diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index c9a83fcd8cd4..7a983f663ce7 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -216,7 +216,7 @@ bool AddTableDialogContext::allowAddition() const // ----------------------------------------------------------------------------- void AddTableDialogContext::addTableWindow( const String& _rQualifiedTableName, const String& _rAliasName ) { - getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, TRUE ); + getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, sal_True ); } // ----------------------------------------------------------------------------- @@ -382,7 +382,7 @@ void OJoinController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& if ( m_pAddTableDialog->IsVisible() ) { - m_pAddTableDialog->Show( FALSE ); + m_pAddTableDialog->Show( sal_False ); getView()->GrabFocus(); } else @@ -391,7 +391,7 @@ void OJoinController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& WaitObject aWaitCursor( getView() ); m_pAddTableDialog->Update(); } - m_pAddTableDialog->Show( TRUE ); + m_pAddTableDialog->Show( sal_True ); ::dbaui::notifySystemWindow(getView(),m_pAddTableDialog,::comphelper::mem_fun(&TaskPaneList::AddWindow)); } break; diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 904e59924982..da929c25502d 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -229,7 +229,7 @@ OJoinTableView::OJoinTableView( Window* pParent, OJoinDesignView* pView ) ,m_pDragWin( NULL ) ,m_pSizingWin( NULL ) ,m_pSelectedConn( NULL ) - ,m_bTrackingInitiallyMoved(FALSE) + ,m_bTrackingInitiallyMoved(sal_False) ,m_pLastFocusTabWin(NULL) ,m_pView( pView ) ,m_pAccessible(NULL) @@ -260,7 +260,7 @@ IMPL_LINK( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar ) { ////////////////////////////////////////////////////////////////////// // Alle Fenster verschieben - ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), FALSE ); + ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), sal_False ); return 0; } @@ -298,7 +298,7 @@ void OJoinTableView::Resize() } } //------------------------------------------------------------------------------ -ULONG OJoinTableView::GetTabWinCount() +sal_uLong OJoinTableView::GetTabWinCount() { DBG_CHKTHIS(OJoinTableView,NULL); return m_aTableMap.size(); @@ -381,7 +381,7 @@ OTableWindowData* OJoinTableView::CreateImpl(const ::rtl::OUString& _rComposedNa return new OTableWindowData( NULL,_rComposedName,_sTableName, _rWinName ); } //------------------------------------------------------------------------------ -void OJoinTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL /*bNewTable*/) +void OJoinTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, sal_Bool /*bNewTable*/) { DBG_CHKTHIS(OJoinTableView,NULL); OSL_ENSURE(_rComposedName.getLength(),"There must be a table name supplied!"); @@ -478,9 +478,9 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin ) namespace { // ----------------------------------------------------------------------------- - BOOL isScrollAllowed( OJoinTableView* _pView,long nDelta, BOOL bHoriz) + sal_Bool isScrollAllowed( OJoinTableView* _pView,long nDelta, sal_Bool bHoriz) { - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; ////////////////////////////////////////////////////////////////////// // adjust ScrollBar-Positions ScrollBar* pBar = _pView->GetVScrollBar(); @@ -490,22 +490,22 @@ namespace long nOldThumbPos = pBar->GetThumbPos(); long nNewThumbPos = nOldThumbPos + nDelta; if( nNewThumbPos < 0 ) - nNewThumbPos = 0;// bRet = FALSE; + nNewThumbPos = 0;// bRet = sal_False; else if( nNewThumbPos > pBar->GetRangeMax() ) - nNewThumbPos = pBar->GetRangeMax();// bRet = FALSE; + nNewThumbPos = pBar->GetRangeMax();// bRet = sal_False; if ( bHoriz ) { if( nNewThumbPos == _pView->GetScrollOffset().X() ) - return FALSE; + return sal_False; } else if ( nNewThumbPos == _pView->GetScrollOffset().Y() ) - return FALSE; + return sal_False; return bRet; } // ----------------------------------------------------------------------------- - BOOL getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY) + sal_Bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY) { _nScrollY = _nScrollX = 0; // data about the tab win @@ -518,9 +518,9 @@ namespace // data about ourself Size aSize = _pView->getRealOutputSize(); //GetOutputSizePixel(); - BOOL bVisbile = TRUE; - BOOL bFitsHor = (aUpperLeft.X() >= 0) && (aLowerRight.X() <= aSize.Width()); - BOOL bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height()); + sal_Bool bVisbile = sal_True; + sal_Bool bFitsHor = (aUpperLeft.X() >= 0) && (aLowerRight.X() <= aSize.Width()); + sal_Bool bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height()); if (!bFitsHor || !bFitsVert) { // #100386# OJ @@ -548,10 +548,10 @@ namespace } if ( _nScrollX ) // aSize.Width() > _rSize.Width() && - bVisbile = isScrollAllowed(_pView,_nScrollX, TRUE); + bVisbile = isScrollAllowed(_pView,_nScrollX, sal_True); if ( _nScrollY ) // aSize.Height() > _rSize.Height() && - bVisbile = bVisbile && isScrollAllowed(_pView,_nScrollY, FALSE); + bVisbile = bVisbile && isScrollAllowed(_pView,_nScrollY, sal_False); if ( bVisbile ) { @@ -559,9 +559,9 @@ namespace sal_Int32 nVRangeMax = _pView->GetVScrollBar()->GetRangeMax(); if ( aSize.Width() + _pView->GetHScrollBar()->GetThumbPos() + _nScrollX > nHRangeMax ) - bVisbile = FALSE; + bVisbile = sal_False; if ( bVisbile && aSize.Height() + _pView->GetVScrollBar()->GetThumbPos() + _nScrollY > nVRangeMax ) - bVisbile = FALSE; + bVisbile = sal_False; } } @@ -570,7 +570,7 @@ namespace } } // end of ano namespace // ----------------------------------------------------------------------------- -BOOL OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize) +sal_Bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize) { long nX,nY; return getMovementImpl(this,_rPoint,_rSize,nX,nY); @@ -591,12 +591,12 @@ void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize) if ( getMovementImpl(this,_rPoint,_rSize,nScrollX,nScrollY) ) { - BOOL bVisbile = TRUE; + sal_Bool bVisbile = sal_True; if (nScrollX) - bVisbile = ScrollPane(nScrollX, TRUE, TRUE); + bVisbile = ScrollPane(nScrollX, sal_True, sal_True); if (nScrollY) - bVisbile = bVisbile && ScrollPane(nScrollY, FALSE, TRUE); + bVisbile = bVisbile && ScrollPane(nScrollY, sal_False, sal_True); } } @@ -611,8 +611,8 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) // Wenn kein Platz ist, wird die naechste Zeile ueberprueft. Size aOutSize = GetSizePixel(); Point aNewPos( 0,0 ); - USHORT nRow = 0; - BOOL bEnd = FALSE; + sal_uInt16 nRow = 0; + sal_Bool bEnd = sal_False; while( !bEnd ) { ////////////////////////////////////////////////////////////////// @@ -653,7 +653,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) if( (aNewPos.X()+TABWIN_WIDTH_STD)GetPosPixel(); m_pDragWin->SetZOrder(NULL, WINDOW_ZORDER_FIRST); - m_bTrackingInitiallyMoved = FALSE; + m_bTrackingInitiallyMoved = sal_False; StartTracking(); } @@ -750,10 +750,10 @@ void OJoinTableView::BeginChildSizing( OTableWindow* pTabWin, const Pointer& rPo } //------------------------------------------------------------------------------ -BOOL OJoinTableView::ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars ) +sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPaintScrollBars ) { DBG_CHKTHIS(OJoinTableView,NULL); - BOOL bRet = TRUE; + sal_Bool bRet = sal_True; ////////////////////////////////////////////////////////////////////// // ScrollBar-Positionen anpassen @@ -766,12 +766,12 @@ BOOL OJoinTableView::ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars if( nNewThumbPos < 0 ) { nNewThumbPos = 0; - bRet = FALSE; + bRet = sal_False; } if( nNewThumbPos > GetHScrollBar()->GetRange().Max() ) { nNewThumbPos = GetHScrollBar()->GetRange().Max(); - bRet = FALSE; + bRet = sal_False; } GetHScrollBar()->SetThumbPos( nNewThumbPos ); nDelta = GetHScrollBar()->GetThumbPos() - nOldThumbPos; @@ -783,12 +783,12 @@ BOOL OJoinTableView::ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars if( nNewThumbPos < 0 ) { nNewThumbPos = 0; - bRet = FALSE; + bRet = sal_False; } if( nNewThumbPos > GetVScrollBar()->GetRange().Max() ) { nNewThumbPos = GetVScrollBar()->GetRange().Max(); - bRet = FALSE; + bRet = sal_False; } GetVScrollBar()->SetThumbPos( nNewThumbPos ); nDelta = GetVScrollBar()->GetThumbPos() - nOldThumbPos; @@ -799,7 +799,7 @@ BOOL OJoinTableView::ScrollPane( long nDelta, BOOL bHoriz, BOOL bPaintScrollBars // Wenn ScrollOffset bereits an den Grenzen liegt, kein Neuzeichnen if( (GetHScrollBar()->GetThumbPos()==m_aScrollOffset.X()) && (GetVScrollBar()->GetThumbPos()==m_aScrollOffset.Y()) ) - return FALSE; + return sal_False; ////////////////////////////////////////////////////////////////////// // ScrollOffset neu setzen @@ -976,9 +976,9 @@ void OJoinTableView::MouseButtonUp( const MouseEvent& rEvt ) void OJoinTableView::KeyInput( const KeyEvent& rEvt ) { DBG_CHKTHIS(OJoinTableView,NULL); - USHORT nCode = rEvt.GetKeyCode().GetCode(); - BOOL bShift = rEvt.GetKeyCode().IsShift(); - BOOL bCtrl = rEvt.GetKeyCode().IsMod1(); + sal_uInt16 nCode = rEvt.GetKeyCode().GetCode(); + sal_Bool bShift = rEvt.GetKeyCode().IsShift(); + sal_Bool bCtrl = rEvt.GetKeyCode().IsMod1(); if( !bCtrl && !bShift && (nCode==KEY_DELETE) ) { @@ -999,11 +999,11 @@ void OJoinTableView::DeselectConn(OTableConnection* pConn) // die zugehoerigen Eitnraege in der ListBox des Tabellenfenster deselektieren OTableWindow* pWin = pConn->GetSourceWin(); if (pWin && pWin->GetListBox()) - pWin->GetListBox()->SelectAll(FALSE); + pWin->GetListBox()->SelectAll(sal_False); pWin = pConn->GetDestWin(); if (pWin && pWin->GetListBox()) - pWin->GetListBox()->SelectAll(FALSE); + pWin->GetListBox()->SelectAll(sal_False); pConn->Deselect(); m_pSelectedConn = NULL; @@ -1028,8 +1028,8 @@ void OJoinTableView::SelectConn(OTableConnection* pConn) OTableWindowListBox* pDestBox = pConnDest->GetListBox(); if (pSourceBox && pDestBox) { - pSourceBox->SelectAll(FALSE); - pDestBox->SelectAll(FALSE); + pSourceBox->SelectAll(sal_False); + pDestBox->SelectAll(sal_False); SvLBoxEntry* pFirstSourceVisible = pSourceBox->GetFirstEntryInView(); SvLBoxEntry* pFirstDestVisible = pDestBox->GetFirstEntryInView(); @@ -1043,14 +1043,14 @@ void OJoinTableView::SelectConn(OTableConnection* pConn) SvLBoxEntry* pSourceEntry = pSourceBox->GetEntryFromText((*aIter)->GetData()->GetSourceFieldName()); if (pSourceEntry) { - pSourceBox->Select(pSourceEntry, TRUE); + pSourceBox->Select(pSourceEntry, sal_True); pSourceBox->MakeVisible(pSourceEntry); } SvLBoxEntry* pDestEntry = pDestBox->GetEntryFromText((*aIter)->GetData()->GetDestFieldName()); if (pDestEntry) { - pDestBox->Select(pDestEntry, TRUE); + pDestBox->Select(pDestEntry, sal_True); pDestBox->MakeVisible(pDestEntry); } @@ -1109,7 +1109,7 @@ sal_Int32 OJoinTableView::getConnectionCount(const OTableWindow* _pFromWin) cons ::std::bind2nd(::std::mem_fun(&OTableConnection::isTableConnection),_pFromWin)); } //------------------------------------------------------------------------------ -BOOL OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const +sal_Bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const { DBG_CHKTHIS(OJoinTableView,NULL); return getTableConnections(pFrom) != m_vTableConnection.end(); @@ -1118,7 +1118,7 @@ BOOL OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const void OJoinTableView::ClearAll() { DBG_CHKTHIS(OJoinTableView,NULL); - SetUpdateMode(FALSE); + SetUpdateMode(sal_False); HideTabWins(); @@ -1133,13 +1133,13 @@ void OJoinTableView::ClearAll() m_pSelectedConn = NULL; // scroll to the upper left - ScrollPane(-GetScrollOffset().X(), TRUE, TRUE); - ScrollPane(-GetScrollOffset().Y(), FALSE, TRUE); + ScrollPane(-GetScrollOffset().X(), sal_True, sal_True); + ScrollPane(-GetScrollOffset().Y(), sal_False, sal_True); Invalidate(); } //------------------------------------------------------------------------ -BOOL OJoinTableView::ScrollWhileDragging() +sal_Bool OJoinTableView::ScrollWhileDragging() { DBG_CHKTHIS(OJoinTableView,NULL); DBG_ASSERT(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging darf nur waehrend Dragging eines Fensters aufgerufen werden !"); @@ -1153,19 +1153,19 @@ BOOL OJoinTableView::ScrollWhileDragging() Point aLowerRight(aDragWinPos.X() + aDragWinSize.Width(), aDragWinPos.Y() + aDragWinSize.Height()); if (!m_bTrackingInitiallyMoved && (aDragWinPos == m_pDragWin->GetPosPixel())) - return TRUE; + return sal_True; // Darstellungsfehler vermeiden (wenn bei aktivem TrackingRect gescrollt wird) HideTracking(); - BOOL bScrolling = FALSE; - BOOL bNeedScrollTimer = FALSE; + sal_Bool bScrolling = sal_False; + sal_Bool bNeedScrollTimer = sal_False; // An Fenstergrenzen scrollen // TODO : nur dann abfangen, wenn das Fenster komplett verschwinden wuerde (nicht, solange noch ein Pixel sichtbar ist) if( aDragWinPos.X() < 5 ) { - bScrolling = ScrollPane( -LINE_SIZE, TRUE, TRUE ); + bScrolling = ScrollPane( -LINE_SIZE, sal_True, sal_True ); if( !bScrolling && (aDragWinPos.X()<0) ) aDragWinPos.X() = 0; @@ -1175,7 +1175,7 @@ BOOL OJoinTableView::ScrollWhileDragging() if( aLowerRight.X() > m_aOutputSize.Width() - 5 ) { - bScrolling = ScrollPane( LINE_SIZE, TRUE, TRUE ) ; + bScrolling = ScrollPane( LINE_SIZE, sal_True, sal_True ) ; if( !bScrolling && ( aLowerRight.X() > m_aOutputSize.Width() ) ) aDragWinPos.X() = m_aOutputSize.Width() - aDragWinSize.Width(); @@ -1185,7 +1185,7 @@ BOOL OJoinTableView::ScrollWhileDragging() if( aDragWinPos.Y() < 5 ) { - bScrolling = ScrollPane( -LINE_SIZE, FALSE, TRUE ); + bScrolling = ScrollPane( -LINE_SIZE, sal_False, sal_True ); if( !bScrolling && (aDragWinPos.Y()<0) ) aDragWinPos.Y() = 0; @@ -1194,7 +1194,7 @@ BOOL OJoinTableView::ScrollWhileDragging() if( aLowerRight.Y() > m_aOutputSize.Height() - 5 ) { - bScrolling = ScrollPane( LINE_SIZE, FALSE, TRUE ); + bScrolling = ScrollPane( LINE_SIZE, sal_False, sal_True ); if( !bScrolling && ( (aDragWinPos.Y() + aDragWinSize.Height()) > m_aOutputSize.Height() ) ) aDragWinPos.Y() = m_aOutputSize.Height() - aDragWinSize.Height(); @@ -1249,36 +1249,36 @@ void OJoinTableView::TabWinSized(OTableWindow* ptWhich, const Point& ptOldPositi } //------------------------------------------------------------------------------ -BOOL OJoinTableView::IsAddAllowed() +sal_Bool OJoinTableView::IsAddAllowed() { DBG_CHKTHIS(OJoinTableView,NULL); // nicht wenn Db readonly if (m_pView->getController().isReadOnly()) - return FALSE; + return sal_False; try { Reference< XConnection> xConnection = m_pView->getController().getConnection(); if(!xConnection.is()) - return FALSE; + return sal_False; // nicht wenn schon zuviele Tabellen Reference < XDatabaseMetaData > xMetaData( xConnection->getMetaData() ); sal_Int32 nMax = xMetaData.is() ? xMetaData->getMaxTablesInSelect() : 0; if (nMax && nMax <= (sal_Int32)m_aTableMap.size()) - return FALSE; + return sal_False; } catch(SQLException&) { - return FALSE; + return sal_False; } // nicht wenn keine Joins moeglich // if (!GetDatabase()->IsCapable(SDB_CAP_JOIN) && nMax <= GetTabWinCount()) -// return FALSE; +// return sal_False; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- void OJoinTableView::executePopup(const Point& _aPos,OTableConnection* _pSelConnection) @@ -1299,7 +1299,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt) { DBG_CHKTHIS(OJoinTableView,NULL); - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; switch (rEvt.GetCommand()) { @@ -1338,7 +1338,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt) } } } - bHandled = TRUE; + bHandled = sal_True; } } if (!bHandled) @@ -1354,7 +1354,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab if ((!pLhs || pLhs->ExistsAConn()) && (!pRhs || pRhs->ExistsAConn())) { - BOOL bFoundStart = _rpFirstAfter ? FALSE : TRUE; + sal_Bool bFoundStart = _rpFirstAfter ? sal_False : sal_True; ::std::vector::const_iterator aIter = m_vTableConnection.begin(); ::std::vector::const_iterator aEnd = m_vTableConnection.end(); @@ -1391,7 +1391,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab pConn = pData; if (pData == _rpFirstAfter) - bFoundStart = TRUE; + bFoundStart = sal_True; } } } @@ -1401,7 +1401,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab //------------------------------------------------------------------------------ long OJoinTableView::PreNotify(NotifyEvent& rNEvt) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; switch (rNEvt.GetType()) { case EVENT_COMMAND: @@ -1413,10 +1413,10 @@ long OJoinTableView::PreNotify(NotifyEvent& rNEvt) if (pData->GetMode() == COMMAND_WHEEL_SCROLL) { if (pData->GetDelta() > 0) - ScrollPane(-10 * pData->GetScrollLines(), pData->IsHorz(), TRUE); + ScrollPane(-10 * pData->GetScrollLines(), pData->IsHorz(), sal_True); else - ScrollPane(10 * pData->GetScrollLines(), pData->IsHorz(), TRUE); - bHandled = TRUE; + ScrollPane(10 * pData->GetScrollLines(), pData->IsHorz(), sal_True); + bHandled = sal_True; } } } @@ -1437,7 +1437,7 @@ long OJoinTableView::PreNotify(NotifyEvent& rNEvt) if (!HasChildPathFocus()) break; - BOOL bForward = !pKeyEvent->GetKeyCode().IsShift(); + sal_Bool bForward = !pKeyEvent->GetKeyCode().IsShift(); // is there an active tab win ? OTableWindowMapIterator aIter = m_aTableMap.begin(); OTableWindowMapIterator aEnd = m_aTableMap.end(); diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx index 981963968865..a5fea019bb30 100644 --- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx @@ -167,9 +167,9 @@ OTableConnectionData* OQueryTableConnectionData::NewInstance() const return new OQueryTableConnectionData(); } // ----------------------------------------------------------------------------- -BOOL OQueryTableConnectionData::Update() +sal_Bool OQueryTableConnectionData::Update() { - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx index a0e474300501..2767b97b50ef 100644 --- a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx +++ b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx @@ -76,7 +76,7 @@ namespace dbaui @return true if successful */ - virtual BOOL Update(); + virtual sal_Bool Update(); ::rtl::OUString GetAliasName(EConnectionSide nWhich) const; diff --git a/dbaccess/source/ui/querydesign/QTableWindow.hxx b/dbaccess/source/ui/querydesign/QTableWindow.hxx index f9f336b13410..9eba590a89f6 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.hxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.hxx @@ -61,12 +61,12 @@ namespace dbaui } // spaeter Constructor, die Basisklasse ERZEUGT beim ersten Aufruf die Listbox - virtual BOOL Init(); + virtual sal_Bool Init(); inline sal_Int32 GetAliasNum() const { return m_nAliasNum; } - BOOL ExistsField(const ::rtl::OUString& strFieldName, OTableFieldDescRef& rInfo); - BOOL ExistsAVisitedConn() const; + sal_Bool ExistsField(const ::rtl::OUString& strFieldName, OTableFieldDescRef& rInfo); + sal_Bool ExistsAVisitedConn() const; virtual ::rtl::OUString GetName() const { return GetWinName(); } diff --git a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx index cf2bd36ebc33..51491c29f98a 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx @@ -48,16 +48,16 @@ namespace dbaui { protected: OSelectionBrowseBox* pOwner; - USHORT m_nColumnPostion; + sal_uInt16 m_nColumnPostion; virtual void Undo() = 0; virtual void Redo() = 0; public: - OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, USHORT nCommentID); + OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, sal_uInt16 nCommentID); virtual ~OQueryDesignFieldUndoAct(); - inline void SetColumnPosition(USHORT _nColumnPostion) + inline void SetColumnPosition(sal_uInt16 _nColumnPostion) { m_nColumnPostion = _nColumnPostion; OSL_ENSURE(m_nColumnPostion != BROWSER_INVALIDID,"Column position was not set add the undo action!"); @@ -112,7 +112,7 @@ namespace dbaui OTableFieldDescRef pDescr; // geloeschte Spaltenbeschreibung public: - OTabFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, USHORT nCommentID) : OQueryDesignFieldUndoAct(pSelBrwBox, nCommentID) { } + OTabFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, sal_uInt16 nCommentID) : OQueryDesignFieldUndoAct(pSelBrwBox, nCommentID) { } void SetTabFieldDescr(OTableFieldDescRef pDescription) { pDescr = pDescription; } }; diff --git a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx index 73f29f9c54ae..1aa1ef821181 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx +++ b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx @@ -43,7 +43,7 @@ namespace dbaui OJoinTableView* m_pOwner; // in diesem Container spielt sich alles ab public: - OQueryDesignUndoAction(OJoinTableView* pOwner, USHORT nCommentID) : OCommentUndoAction(nCommentID), m_pOwner(pOwner) { } + OQueryDesignUndoAction(OJoinTableView* pOwner, sal_uInt16 nCommentID) : OCommentUndoAction(nCommentID), m_pOwner(pOwner) { } }; } #endif // DBAUI_QUERYDESIGNUNDOACTION_HXX diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 0eb7c09f29e9..a4c5376e7ad9 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -800,7 +800,7 @@ namespace } Reference< XConnection> xConnection = static_cast(_pView->getController()).getConnection(); if(!xConnection.is()) - return FALSE; + return sal_False; try { const Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); @@ -1025,7 +1025,7 @@ namespace aWorkStr += ::dbtools::quoteName(aQuote, aColumnName); } aWorkStr += ::rtl::OUString(' '); - aWorkStr += String::CreateFromAscii( ";ASC;DESC" ).GetToken( (USHORT)eOrder ); + aWorkStr += String::CreateFromAscii( ";ASC;DESC" ).GetToken( (sal_uInt16)eOrder ); aWorkStr += ::rtl::OUString(','); } } @@ -2537,7 +2537,7 @@ namespace //------------------------------------------------------------------------------ String getParseErrorMessage( SqlParseError _eErrorCode ) { - USHORT nResId; + sal_uInt16 nResId; switch(_eErrorCode) { case eIllegalJoin: diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx index e61dd40c5294..f829d0e14a08 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx @@ -64,10 +64,10 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction() } // ------------------------------------------------------------------------------------------------ -OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, USHORT nCommentID) +OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID) :OQueryDesignUndoAction(pOwner, nCommentID) ,m_pConnection(NULL) - ,m_bOwnerOfConn(FALSE) + ,m_bOwnerOfConn(sal_False) { DBG_CTOR(OQueryTabConnUndoAction,NULL); } @@ -80,13 +80,13 @@ OQueryAddTabConnUndoAction::OQueryAddTabConnUndoAction(OQueryTableView* pOwner) void OQueryAddTabConnUndoAction::Undo() { static_cast(m_pOwner)->DropConnection(m_pConnection); - SetOwnership(TRUE); + SetOwnership(sal_True); } // ----------------------------------------------------------------------------- void OQueryAddTabConnUndoAction::Redo() { static_cast(m_pOwner)->GetConnection(m_pConnection); - SetOwnership(FALSE); + SetOwnership(sal_False); } // ----------------------------------------------------------------------------- OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner) @@ -97,13 +97,13 @@ OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner) void OQueryDelTabConnUndoAction::Undo() { static_cast(m_pOwner)->GetConnection(m_pConnection); - SetOwnership(FALSE); + SetOwnership(sal_False); } // ----------------------------------------------------------------------------- void OQueryDelTabConnUndoAction::Redo() { static_cast(m_pOwner)->DropConnection(m_pConnection); - SetOwnership(TRUE); + SetOwnership(sal_True); } // ----------------------------------------------------------------------------- OQueryTabWinShowUndoAct::OQueryTabWinShowUndoAct(OQueryTableView* pOwner) @@ -118,13 +118,13 @@ OQueryTabWinShowUndoAct::~OQueryTabWinShowUndoAct() void OQueryTabWinShowUndoAct::Undo() { static_cast(m_pOwner)->HideTabWin(m_pTabWin, this); - SetOwnership(TRUE); + SetOwnership(sal_True); } // ----------------------------------------------------------------------------- void OQueryTabWinShowUndoAct::Redo() { static_cast(m_pOwner)->ShowTabWin(m_pTabWin, this,sal_True); - SetOwnership(FALSE); + SetOwnership(sal_False); } // ----------------------------------------------------------------------------- OQueryTabWinDelUndoAct::OQueryTabWinDelUndoAct(OQueryTableView* pOwner) @@ -139,12 +139,12 @@ OQueryTabWinDelUndoAct::~OQueryTabWinDelUndoAct() void OQueryTabWinDelUndoAct::Undo() { static_cast(m_pOwner)->ShowTabWin( m_pTabWin, this,sal_True ); - SetOwnership(FALSE); + SetOwnership(sal_False); } // ----------------------------------------------------------------------------- void OQueryTabWinDelUndoAct::Redo() { static_cast(m_pOwner)->HideTabWin( m_pTabWin, this ); - SetOwnership(TRUE); + SetOwnership(sal_True); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx index 414b2e40b756..7803df303bb5 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx @@ -39,11 +39,11 @@ namespace dbaui { protected: OQueryTableConnection* m_pConnection; - BOOL m_bOwnerOfConn; + sal_Bool m_bOwnerOfConn; // bin ich alleiniger Eigentuemer der Connection ? (aendert sich mit jedem Redo oder Undo) public: - OQueryTabConnUndoAction(OQueryTableView* pOwner, USHORT nCommentID); + OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID); virtual ~OQueryTabConnUndoAction(); virtual void Undo() = 0; @@ -51,7 +51,7 @@ namespace dbaui void SetConnection(OQueryTableConnection* pConn) { m_pConnection = pConn; } // anschliessend bitte SetOwnership - void SetOwnership(BOOL bTakeIt) { m_bOwnerOfConn = bTakeIt; } + void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfConn = bTakeIt; } }; } #endif // DBAUI_QUERYTABCONNUNDOACTION_HXX diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx index a4b43398690b..731075b5a278 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx @@ -55,7 +55,7 @@ using namespace dbaui; DBG_NAME(OQueryDesignFieldUndoAct) -OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, USHORT nCommentID) +OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, sal_uInt16 nCommentID) : OCommentUndoAction(nCommentID) , pOwner(pSelBrwBox) , m_nColumnPostion(BROWSER_INVALIDID) @@ -72,7 +72,7 @@ OQueryDesignFieldUndoAct::~OQueryDesignFieldUndoAct() DBG_NAME(OQueryTabWinUndoAct ) // ------------------------------------------------------------------------------------------------ -OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, USHORT nCommentID) +OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID) :OQueryDesignUndoAction(pOwner, nCommentID) ,m_pTabWin(NULL) { @@ -110,7 +110,7 @@ void OTabFieldCellModifiedUndoAct::Undo() OSL_ENSURE(m_nColumnPostion < pOwner->GetColumnCount(),"Position outside the column count!"); if ( m_nColumnPostion != BROWSER_INVALIDID ) { - USHORT nColumnId = pOwner->GetColumnId(m_nColumnPostion); + sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPostion); String strNext = pOwner->GetCellContents(m_nCellIndex, nColumnId); pOwner->SetCellContents(m_nCellIndex, nColumnId, m_strNextCellContents); m_strNextCellContents = strNext; @@ -125,7 +125,7 @@ void OTabFieldSizedUndoAct::Undo() OSL_ENSURE(m_nColumnPostion != BROWSER_INVALIDID,"Column position was not set add the undo action!"); if ( m_nColumnPostion != BROWSER_INVALIDID ) { - USHORT nColumnId = pOwner->GetColumnId(m_nColumnPostion); + sal_uInt16 nColumnId = pOwner->GetColumnId(m_nColumnPostion); long nNextWidth = pOwner->GetColumnWidth(nColumnId); pOwner->SetColWidth(nColumnId, m_nNextWidth); m_nNextWidth = nNextWidth; @@ -140,9 +140,9 @@ void OTabFieldMovedUndoAct::Undo() if ( m_nColumnPostion != BROWSER_INVALIDID ) { sal_uInt16 nId = pDescr->GetColumnId(); - USHORT nOldPos = pOwner->GetColumnPos(nId); + sal_uInt16 nOldPos = pOwner->GetColumnPos(nId); pOwner->SetColumnPos(nId,m_nColumnPostion); - pOwner->ColumnMoved(nId,FALSE); + pOwner->ColumnMoved(nId,sal_False); m_nColumnPostion = nOldPos; } pOwner->LeaveUndoMode(); diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx index a588ad8eb5b8..4d32f23a6350 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx @@ -50,14 +50,14 @@ namespace dbaui protected: ::std::vector m_vTableConnection; OQueryTableWindow* m_pTabWin; - BOOL m_bOwnerOfObjects; + sal_Bool m_bOwnerOfObjects; // bin ich alleiniger Eigentuemer der verwalteten Objekte ? (aendert sich mit jedem Redo oder Undo) public: - OQueryTabWinUndoAct(OQueryTableView* pOwner, USHORT nCommentID); + OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID); virtual ~OQueryTabWinUndoAct(); - void SetOwnership(BOOL bTakeIt) { m_bOwnerOfObjects = bTakeIt; } + void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfObjects = bTakeIt; } virtual void Undo() = 0; @@ -68,7 +68,7 @@ namespace dbaui // anschliessend sollte das SetOwnership aufgerufen werden // Zugriff auf die verwalteten Connections - USHORT ConnCount() { return (USHORT)m_vTableConnection.size(); } + sal_uInt16 ConnCount() { return (sal_uInt16)m_vTableConnection.size(); } ::std::vector* GetTabConnList() { return &m_vTableConnection; } diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index c083392a9613..3dfebdd07131 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -192,7 +192,7 @@ namespace @return true when OK was pressed otherwise false */ - sal_Bool openJoinDialog(OQueryTableView* _pView,const TTableConnectionData::value_type& _pConnectionData,BOOL _bSelectableTables) + sal_Bool openJoinDialog(OQueryTableView* _pView,const TTableConnectionData::value_type& _pConnectionData,sal_Bool _bSelectableTables) { OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pConnectionData.get()); @@ -752,7 +752,7 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection) { DBG_CHKTHIS(OQueryTableView,NULL); - if( openJoinDialog(this,pConnection->GetData(),FALSE) ) + if( openJoinDialog(this,pConnection->GetData(),sal_False) ) { connectionModified(this,pConnection,sal_False); SelectConn( pConnection ); @@ -762,7 +762,7 @@ void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection) void OQueryTableView::createNewConnection() { TTableConnectionData::value_type pData(new OQueryTableConnectionData()); - if( openJoinDialog(this,pData,TRUE) ) + if( openJoinDialog(this,pData,sal_True) ) { OTableWindowMap* pMap = GetTabWinMap(); OQueryTableWindow* pSourceWin = static_cast< OQueryTableWindow*>((*pMap)[pData->getReferencingTable()->GetWinName()]); diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx index 539e39c58ca2..c6c4a9559d3a 100644 --- a/dbaccess/source/ui/querydesign/QueryTextView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx @@ -84,7 +84,7 @@ OQueryTextView::OQueryTextView(OQueryContainerWindow* _pParent) { DBG_CTOR(OQueryTextView,NULL); m_pEdit = new OSqlEdit(this); - m_pEdit->SetRightToLeft(FALSE); + m_pEdit->SetRightToLeft(sal_False); m_pEdit->ClearModifyFlag(); m_pEdit->SaveValue(); m_pEdit->SetPosPixel( Point( 0, 0 ) ); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 66b6eec9465c..7f8623ad4542 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -352,15 +352,15 @@ BrowserHeader* OSelectionBrowseBox::imp_CreateHeaderBar(BrowseBox* /*pParent*/) return new OSelectionBrwBoxHeader(this); } // ----------------------------------------------------------------------------- -void OSelectionBrowseBox::ColumnMoved( USHORT nColId,BOOL _bCreateUndo ) +void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo ) { EditBrowseBox::ColumnMoved( nColId ); // swap the two columns - USHORT nNewPos = GetColumnPos( nColId ); + sal_uInt16 nNewPos = GetColumnPos( nColId ); OTableFields& rFields = getFields(); - if ( rFields.size() > USHORT(nNewPos-1) ) + if ( rFields.size() > sal_uInt16(nNewPos-1) ) { - USHORT nOldPos = 0; + sal_uInt16 nOldPos = 0; OTableFields::iterator aEnd = rFields.end(); OTableFields::iterator aIter = rFields.begin(); for (; aIter != aEnd && ( (*aIter)->GetColumnId() != nColId ); ++aIter,++nOldPos) @@ -533,7 +533,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon OSL_ENSURE(nColId != BROWSER_INVALIDID,"An Invalid Id was set!"); if ( nColId == BROWSER_INVALIDID ) return; - USHORT nPos = GetColumnPos(nColId); + sal_uInt16 nPos = GetColumnPos(nColId); if ( nPos == 0 || nPos == BROWSER_INVALIDID || nPos > getFields().size() ) return; OTableFieldDescRef pEntry = getFields()[nPos-1]; @@ -605,7 +605,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon } break; case BROW_ORDER_ROW: m_pOrderCell->SelectEntryPos( - sal::static_int_cast< USHORT >(pEntry->GetOrderDir())); + sal::static_int_cast< sal_uInt16 >(pEntry->GetOrderDir())); enableControl(pEntry,m_pOrderCell); break; case BROW_COLUMNALIAS_ROW: @@ -623,14 +623,14 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon Controller()->ClearModified(); } // ----------------------------------------------------------------------------- -void OSelectionBrowseBox::notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,USHORT _nColumnId) +void OSelectionBrowseBox::notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId) { appendUndoAction(_sOldAlias,_sAlias,BROW_TABLE_ROW,_bListAction); if ( m_bVisibleRow[BROW_TABLE_ROW] ) RowModified(GetBrowseRow(BROW_TABLE_ROW), _nColumnId); } // ----------------------------------------------------------------------------- -void OSelectionBrowseBox::notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,USHORT _nColumnId) +void OSelectionBrowseBox::notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId) { appendUndoAction(_sOldFunctionName,_sFunctionName,BROW_FUNCTION_ROW,_bListAction); if ( !m_bVisibleRow[BROW_FUNCTION_ROW] ) @@ -638,7 +638,7 @@ void OSelectionBrowseBox::notifyFunctionFieldChanged(const String& _sOldFunction RowModified(GetBrowseRow(BROW_FUNCTION_ROW), _nColumnId); } // ----------------------------------------------------------------------------- -void OSelectionBrowseBox::clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,USHORT _nColumnId) +void OSelectionBrowseBox::clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId) { if ( isFieldNameAsterix( _sFieldName ) && (!_pEntry->isNoneFunction() || _pEntry->IsGroupBy()) ) { @@ -803,14 +803,14 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes ::comphelper::UStringMixEqual bCase(xMetaData->supportsMixedCaseQuotedIdentifiers()); OTableFieldDescRef aSelEntry = _pEntry; - USHORT nColumnId = aSelEntry->GetColumnId(); + sal_uInt16 nColumnId = aSelEntry->GetColumnId(); sal_uInt32 nCount = pSelection->count(); for (sal_uInt32 i = 0; i < nCount; ++i) { if ( i > 0 ) // may we have to append more than one field { - USHORT nColumnPostion; + sal_uInt16 nColumnPostion; aSelEntry = FindFirstFreeCol(nColumnPostion); if ( !aSelEntry.isValid() ) { @@ -968,8 +968,8 @@ sal_Bool OSelectionBrowseBox::SaveModified() DBG_CHKTHIS(OSelectionBrowseBox,NULL); OQueryController& rController = static_cast(getDesignView()->getController()); OTableFieldDescRef pEntry = NULL; - USHORT nCurrentColumnPos = GetColumnPos(GetCurColumnId()); - if(getFields().size() > static_cast(nCurrentColumnPos - 1)) + sal_uInt16 nCurrentColumnPos = GetColumnPos(GetCurColumnId()); + if(getFields().size() > static_cast(nCurrentColumnPos - 1)) pEntry = getEntry(nCurrentColumnPos - 1); sal_Bool bWasEmpty = pEntry.isValid() ? pEntry->IsEmpty() : sal_False; @@ -1023,7 +1023,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() if ( !m_bInUndoMode ) rController.getUndoMgr()->EnterListAction(String(),String()); - USHORT nPos = m_pFieldCell->GetEntryPos(aFieldName); + sal_uInt16 nPos = m_pFieldCell->GetEntryPos(aFieldName); String aAliasName = pEntry->GetAlias(); if ( nPos != COMBOBOX_ENTRY_NOTFOUND && !aAliasName.Len() && aFieldName.GetTokenCount('.') > 1 ) { // special case, we have a table field so we must cut the table name @@ -1255,7 +1255,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() if ( bAppendRow ) { - RowInserted( GetRowCount()-1, 1, TRUE ); + RowInserted( GetRowCount()-1, 1, sal_True ); m_bVisibleRow.push_back(sal_True); ++m_nVisibleCount; } @@ -1277,7 +1277,7 @@ sal_Bool OSelectionBrowseBox::SaveModified() RowModified(BROW_VIS_ROW, GetCurColumnId()); // wenn noetig neue freie Spalten anlegen - USHORT nDummy; + sal_uInt16 nDummy; CheckFreeColumns(nDummy); } @@ -1307,7 +1307,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect, rDev.SetClipRegion( rRect ); OTableFieldDescRef pEntry = NULL; - USHORT nPos = GetColumnPos(nColumnId); + sal_uInt16 nPos = GetColumnPos(nColumnId); if(getFields().size() > sal_uInt16(nPos - 1)) pEntry = getFields()[nPos - 1]; @@ -1339,12 +1339,12 @@ void OSelectionBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& r } //------------------------------------------------------------------------------ -void OSelectionBrowseBox::RemoveColumn(USHORT _nColumnId) +void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); OQueryController& rController = static_cast(getDesignView()->getController()); - USHORT nPos = GetColumnPos(_nColumnId); + sal_uInt16 nPos = GetColumnPos(_nColumnId); // das Control sollte immer genau eine Spalte mehr haben, naemlich die HandleColumn DBG_ASSERT((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::RemoveColumn : invalid parameter nColId"); // ColId ist bei mir gleichbedeutend mit Position, und da sollte die Bedingung natuerlich zutreffen @@ -1379,7 +1379,7 @@ void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId ) DBG_CHKTHIS(OSelectionBrowseBox,NULL); OQueryController& rController = static_cast(getDesignView()->getController()); - USHORT nPos = GetColumnPos(nColumnId); + sal_uInt16 nPos = GetColumnPos(nColumnId); OSL_ENSURE(getFields().size() > sal_uInt16(nPos-1),"ID is to great!"); OTableFieldDescRef pDesc = getEntry((sal_uInt32)(nPos - 1)) ; @@ -1521,7 +1521,7 @@ OTableFieldDescRef OSelectionBrowseBox::AppendNewCol( sal_uInt16 nCnt) { OTableFieldDescRef pEmptyEntry = new OTableFieldDesc(); getFields().push_back(pEmptyEntry); - USHORT nColumnId = sal::static_int_cast< USHORT >(getFields().size()); + sal_uInt16 nColumnId = sal::static_int_cast< sal_uInt16 >(getFields().size()); pEmptyEntry->SetColumnId( nColumnId ); InsertDataColumn( nColumnId , String(), DEFAULT_SIZE, HIB_STDSTYLE, HEADERBAR_APPEND); @@ -1545,7 +1545,7 @@ void OSelectionBrowseBox::DeleteFields(const String& rAliasName) OTableFields::reverse_iterator aIter = getFields().rbegin(); OTableFieldDescRef pEntry = NULL; - for(USHORT nPos=sal::static_int_cast< USHORT >(getFields().size());aIter != getFields().rend();++aIter,--nPos) + for(sal_uInt16 nPos=sal::static_int_cast< sal_uInt16 >(getFields().size());aIter != getFields().rend();++aIter,--nPos) { pEntry = *aIter; if ( pEntry->GetAlias().equals( rAliasName ) ) @@ -1597,7 +1597,7 @@ Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId ) } //------------------------------------------------------------------------------ -void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColumnPostion) +void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _nColumnPostion) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); // das Control sollte immer genau eine Spalte mehr haben, naemlich die HandleColumn @@ -1610,14 +1610,14 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColu DeactivateCell(); // remember the column id of the current positon - USHORT nColumnId = GetColumnId(_nColumnPostion); + sal_uInt16 nColumnId = GetColumnId(_nColumnPostion); // Wenn zu klein oder zu gross, auf Ende der Liste setzen if ((_nColumnPostion == BROWSER_INVALIDID) || (_nColumnPostion >= getFields().size())) // Anhaengen des Feldes { if (FindFirstFreeCol(_nColumnPostion) == NULL) // keine freie Column mehr { AppendNewCol(1); - _nColumnPostion = sal::static_int_cast< USHORT >( + _nColumnPostion = sal::static_int_cast< sal_uInt16 >( getFields().size()); } else @@ -1630,14 +1630,14 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColu // check if the column ids are identical, if not we have to move if ( pEntry->GetColumnId() != nColumnId ) { - USHORT nOldPosition = GetColumnPos(pEntry->GetColumnId()); + sal_uInt16 nOldPosition = GetColumnPos(pEntry->GetColumnId()); OSL_ENSURE( nOldPosition != 0,"Old position was 0. Not possible!"); SetColumnPos(pEntry->GetColumnId(),_nColumnPostion); // we have to delete an empty field for the fields list, because the columns must have equal length if ( nOldPosition > 0 && nOldPosition <= getFields().size() ) getFields()[nOldPosition - 1] = pEntry; - ColumnMoved(pEntry->GetColumnId(),FALSE); + ColumnMoved(pEntry->GetColumnId(),sal_False); } // if ( pEntry->GetColumnId() != nColumnId ) if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) ) @@ -1661,7 +1661,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, USHORT& _nColu } //------------------------------------------------------------------------------ -OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, USHORT _nColumnPostion, sal_Bool bVis, sal_Bool bActivate) +OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPostion, sal_Bool bVis, sal_Bool bActivate) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); OQueryTableWindow* pSourceWin = static_cast(jxdSource.pListBox->GetTabWin()); @@ -1687,7 +1687,7 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxd } //------------------------------------------------------------------------------ -OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, USHORT _nColumnPostion, sal_Bool bVis, sal_Bool bActivate) +OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPostion, sal_Bool bVis, sal_Bool bActivate) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1733,7 +1733,7 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount() } //------------------------------------------------------------------------------ -OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(USHORT& _rColumnPosition ) +OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(sal_uInt16& _rColumnPosition ) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); OTableFields::iterator aIter = getFields().begin(); @@ -1754,7 +1754,7 @@ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(USHORT& _rColumnPositio } //------------------------------------------------------------------------------ -void OSelectionBrowseBox::CheckFreeColumns(USHORT& _rColumnPosition) +void OSelectionBrowseBox::CheckFreeColumns(sal_uInt16& _rColumnPosition) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); if (FindFirstFreeCol(_rColumnPosition) == NULL) @@ -1838,7 +1838,7 @@ void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel) pEntry->SetCriteria( nNewLevel, sValue); if ( nNewLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1) ) { - RowInserted( GetRowCount()-1, 1, TRUE ); + RowInserted( GetRowCount()-1, 1, sal_True ); m_bVisibleRow.push_back(sal_True); ++m_nVisibleCount; } @@ -1887,7 +1887,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S pEntry->SetCriteria( nLevel, rValue); if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1)) { - RowInserted( GetRowCount()-1, 1, TRUE ); + RowInserted( GetRowCount()-1, 1, sal_True ); m_bVisibleRow.push_back(sal_True); ++m_nVisibleCount; } @@ -1915,7 +1915,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S pLastEntry->SetCriteria( nLevel, sCriteria); if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1)) { - RowInserted( GetRowCount()-1, 1, TRUE ); + RowInserted( GetRowCount()-1, 1, sal_True ); m_bVisibleRow.push_back(sal_True); ++m_nVisibleCount; } @@ -1932,7 +1932,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S pTmp->SetCriteria( nLevel, rValue); if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1)) { - RowInserted( GetRowCount()-1, 1, TRUE ); + RowInserted( GetRowCount()-1, 1, sal_True ); m_bVisibleRow.push_back(sal_True); ++m_nVisibleCount; } @@ -2073,7 +2073,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) if ( 1 == GetSelectColumnCount() ) { sal_uInt16 nSelId = GetColumnId( - sal::static_int_cast< USHORT >( + sal::static_int_cast< sal_uInt16 >( FirstSelectedColumn() ) ); ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, sal_False ) ); @@ -2196,8 +2196,8 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis) //------------------------------------------------------------------------------ long OSelectionBrowseBox::GetBrowseRow(long nRowId) const { - USHORT nCount(0); - for(USHORT i = 0 ; i < nRowId ; ++i) + sal_uInt16 nCount(0); + for(sal_uInt16 i = 0 ; i < nRowId ; ++i) { if ( m_bVisibleRow[i] ) ++nCount; @@ -2262,7 +2262,7 @@ String OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const { DBG_CHKTHIS(OSelectionBrowseBox,NULL); - USHORT nPos = GetColumnPos(nColId); + sal_uInt16 nPos = GetColumnPos(nColId); OTableFieldDescRef pEntry = getFields()[nPos-1]; DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::GetCellText : invalid column id, prepare for GPF ... "); @@ -2289,7 +2289,7 @@ String OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const } break; case BROW_ORDER_ROW: if (pEntry->GetOrderDir() != ORDER_NONE) - aText = String(ModuleRes(STR_QUERY_SORTTEXT) ).GetToken(sal::static_int_cast< USHORT >(pEntry->GetOrderDir())); + aText = String(ModuleRes(STR_QUERY_SORTTEXT) ).GetToken(sal::static_int_cast< sal_uInt16 >(pEntry->GetOrderDir())); break; case BROW_VIS_ROW: break; @@ -2381,14 +2381,14 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId,Strin return bErg; } //------------------------------------------------------------------------------ -String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, USHORT nColId) +String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); // DBG_ASSERT(nCellIndex < (GetRowCount()-1),"CellIndex ist zu gross"); if ( GetCurColumnId() == nColId && !m_bInUndoMode ) SaveModified(); - USHORT nPos = GetColumnPos(nColId); + sal_uInt16 nPos = GetColumnPos(nColId); OTableFieldDescRef pEntry = getFields()[nPos - 1]; DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::GetCellContents : invalid column id, prepare for GPF ... "); @@ -2409,14 +2409,14 @@ String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, USHORT nColId) } //------------------------------------------------------------------------------ -void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, USHORT nColId, const String& strNewText) +void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, const String& strNewText) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); - sal_Bool bWasEditing = IsEditing() && (GetCurColumnId() == nColId) && IsRowVisible(static_cast(nRow)) && (GetCurRow() == static_cast(GetBrowseRow(nRow))); + sal_Bool bWasEditing = IsEditing() && (GetCurColumnId() == nColId) && IsRowVisible(static_cast(nRow)) && (GetCurRow() == static_cast(GetBrowseRow(nRow))); if (bWasEditing) DeactivateCell(); - USHORT nPos = GetColumnPos(nColId); + sal_uInt16 nPos = GetColumnPos(nColId); OTableFieldDescRef pEntry = getEntry(nPos - 1); DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... "); @@ -2466,7 +2466,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, USHORT nColId, const S } long nCellIndex = GetRealRow(nRow); - if(IsRowVisible(static_cast(nRow))) + if(IsRowVisible(static_cast(nRow))) RowModified(nCellIndex, nColId); // die entsprechende Feld-Beschreibung ist jetzt leer -> Visible auf sal_False (damit das konsistent mit normalen leeren Spalten ist) @@ -2500,7 +2500,7 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId) // but the changes aren't permanent ... DBG_CHKTHIS(OSelectionBrowseBox,NULL); - USHORT nPos = GetColumnPos(nColId); + sal_uInt16 nPos = GetColumnPos(nColId); DBG_ASSERT(nPos <= getFields().size(),"ColumnResized:: nColId sollte nicht groesser als List::count sein!"); OTableFieldDescRef pEntry = getEntry(nPos-1); DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !"); @@ -2525,7 +2525,7 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId) sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); - USHORT nPos = GetColumnPos(nColId); + sal_uInt16 nPos = GetColumnPos(nColId); DBG_ASSERT((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId"); OTableFieldDescRef pEntry = getFields()[nPos-1]; @@ -2695,7 +2695,7 @@ OTableFields& OSelectionBrowseBox::getFields() const // ----------------------------------------------------------------------------- void OSelectionBrowseBox::enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl) { - BOOL bEnable = !_rEntry->isCondition(); + sal_Bool bEnable = !_rEntry->isCondition(); _pControl->Enable(bEnable); _pControl->EnableInput(bEnable); } @@ -2735,7 +2735,7 @@ OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos) { pEntry = new OTableFieldDesc(); pEntry->SetColumnId( - GetColumnId(sal::static_int_cast< USHORT >(_nPos+1))); + GetColumnId(sal::static_int_cast< sal_uInt16 >(_nPos+1))); aFields[_nPos] = pEntry; } return pEntry; diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index 3d215a81f4c8..79aaf49c56e4 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -115,10 +115,10 @@ namespace dbaui ~OSelectionBrowseBox(); void initialize(); - OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, USHORT _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True ); - OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, USHORT _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True ); - void InsertColumn( OTableFieldDescRef pEntry, USHORT& _nColumnPostion ); - void RemoveColumn( USHORT _nColumnId ); + OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True ); + OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPostion = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True ); + void InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPostion ); + void RemoveColumn( sal_uInt16 _nColumnId ); void DeleteFields( const String& rAliasName ); bool HasFieldByAliasName(const ::rtl::OUString& rFieldName, OTableFieldDescRef& rInfo) const; @@ -141,8 +141,8 @@ namespace dbaui void SetColWidth(sal_uInt16 nColId, long lNewWidth); // beachtet im Gegensatz zum SetColumnWidth der Basisklasse auch eine eventuell aktive Zelle in dieser Spalte - String GetCellContents(sal_Int32 nCellIndex, USHORT nColId); - void SetCellContents(sal_Int32 nCellIndex, USHORT nColId, const String& strNewText); + String GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId); + void SetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId, const String& strNewText); // Zelleninhalt (als String formatiert) setzen/liefern sal_Int32 GetNoneVisibleRows() const; void SetNoneVisbleRow(long nRows); @@ -163,8 +163,8 @@ namespace dbaui virtual void GetFocus(); virtual void DeactivateCell(sal_Bool bUpdate = sal_True); - virtual void ColumnMoved( USHORT nColId ) { ColumnMoved(nColId,TRUE); } - void ColumnMoved( USHORT nColId,BOOL _bCreateUndo); + virtual void ColumnMoved( sal_uInt16 nColId ) { ColumnMoved(nColId,sal_True); } + void ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo); void Fill(); void PreFill(); @@ -184,7 +184,7 @@ namespace dbaui @return the text out of the cell */ - virtual String GetCellText(long _nRow, USHORT _nColId) const; + virtual String GetCellText(long _nRow, sal_uInt16 _nColId) const; /** returns the description of the row. @param _nRow @@ -245,10 +245,10 @@ namespace dbaui void startTimer(); private: - OTableFieldDescRef FindFirstFreeCol(USHORT& _rColumnPosition); + OTableFieldDescRef FindFirstFreeCol(sal_uInt16& _rColumnPosition); // rCol enthaelt die Nummer (in pOTableFieldDescList) der ersten Spalte, die von sich sagt, dass sie leer ist // wenn es keine solche gibt, ist rCol undefiniert und der Rueckgabewert NULL - void CheckFreeColumns(USHORT& _rColumnPosition); + void CheckFreeColumns(sal_uInt16& _rColumnPosition); // testet, ob es noch freie Spalten gibt, wenn nicht, wird ein neuer Packen angefuegt // rCol enthaelt die Nummer der ersten freien Spalte (in pOTableFieldDescList) @@ -320,7 +320,7 @@ namespace dbaui @param _bListAction Will be set to when we are in a list action otherwise */ - void notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,USHORT _nColumnId); + void notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId); /** append an undo action for the function field @param _sOldFunctionName @@ -330,7 +330,7 @@ namespace dbaui @param _bListAction Will be set to when we are in a list action otherwise */ - void notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,USHORT _nColumnId); + void notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId); /** clears the function fields of the submitted entry if it doesn't match the SQL standard and append an undo action. E.q. AGGREGATE functions are only valid when the field name isn't an asterix @@ -341,7 +341,7 @@ namespace dbaui @param _bListAction When an list action will be created. */ - void clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,USHORT _nColumnId); + void clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId); /** remove or insert the necessary function types @param _pEntry diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx index ed0f5457f332..56b2327af380 100644 --- a/dbaccess/source/ui/querydesign/TableConnection.cxx +++ b/dbaccess/source/ui/querydesign/TableConnection.cxx @@ -64,7 +64,7 @@ namespace dbaui :Window(_pContainer) ,m_pData( _pTabConnData ) ,m_pParent( _pContainer ) - ,m_bSelected( FALSE ) + ,m_bSelected( sal_False ) { DBG_CTOR(OTableConnection,NULL); Init(); @@ -179,19 +179,19 @@ namespace dbaui //------------------------------------------------------------------------ void OTableConnection::Select() { - m_bSelected = TRUE; + m_bSelected = sal_True; m_pParent->Invalidate( GetBoundingRect(), INVALIDATE_NOCHILDREN); } //------------------------------------------------------------------------ void OTableConnection::Deselect() { - m_bSelected = FALSE; + m_bSelected = sal_False; InvalidateConnection(); } //------------------------------------------------------------------------ - BOOL OTableConnection::CheckHit( const Point& rMousePos ) const + sal_Bool OTableConnection::CheckHit( const Point& rMousePos ) const { ////////////////////////////////////////////////////////////////////// // check if the point hit our line diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index a17199d941b9..f0e9ee233d5f 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -66,7 +66,7 @@ void OTableConnectionData::Init() ////////////////////////////////////////////////////////////////////// // LineDataList mit Defaults initialisieren DBG_ASSERT(m_vConnLineData.size() == 0, "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !"); - ResetConnLines(TRUE); + ResetConnLines(sal_True); // das legt Defaults an } //------------------------------------------------------------------------ @@ -88,7 +88,7 @@ OTableConnectionData::~OTableConnectionData() DBG_DTOR(OTableConnectionData,NULL); // LineDataList loeschen OConnectionLineDataVec().swap(m_vConnLineData); - //ResetConnLines(FALSE); + //ResetConnLines(sal_False); } //------------------------------------------------------------------------ @@ -102,7 +102,7 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat m_aConnName = rConnData.GetConnName(); // clear line list - ResetConnLines(FALSE); + ResetConnLines(sal_False); // und kopieren OConnectionLineDataVec* pLineData = const_cast(&rConnData)->GetConnLineDataList(); @@ -116,10 +116,10 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat } //------------------------------------------------------------------------ -BOOL OTableConnectionData::SetConnLine( USHORT nIndex, const String& rSourceFieldName, const String& rDestFieldName ) +sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSourceFieldName, const String& rDestFieldName ) { - if (USHORT(m_vConnLineData.size()) < nIndex) - return FALSE; + if (sal_uInt16(m_vConnLineData.size()) < nIndex) + return sal_False; // == ist noch erlaubt, das entspricht einem Append if (m_vConnLineData.size() == nIndex) @@ -131,11 +131,11 @@ BOOL OTableConnectionData::SetConnLine( USHORT nIndex, const String& rSourceFiel pConnLineData->SetSourceFieldName( rSourceFieldName ); pConnLineData->SetDestFieldName( rDestFieldName ); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName ) +sal_Bool OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFieldName, const ::rtl::OUString& rDestFieldName ) { OConnectionLineDataVec::iterator aIter = m_vConnLineData.begin(); OConnectionLineDataVec::iterator aEnd = m_vConnLineData.end(); @@ -148,15 +148,15 @@ BOOL OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFieldNa { OConnectionLineDataRef pNew = new OConnectionLineData(rSourceFieldName, rDestFieldName); if (!pNew.isValid()) - return FALSE; + return sal_False; m_vConnLineData.push_back(pNew); } - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -void OTableConnectionData::ResetConnLines( BOOL /*bUseDefaults*/ ) +void OTableConnectionData::ResetConnLines( sal_Bool /*bUseDefaults*/ ) { OConnectionLineDataVec().swap(m_vConnLineData); } diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 25653e8ec7d1..02167c235211 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -109,7 +109,7 @@ OTableWindow::OTableWindow( Window* pParent, const TTableWindowData::value_type& ,m_nMoveCount(0) ,m_nMoveIncrement(1) ,m_nSizingFlags( SIZING_NONE ) - ,m_bActive( FALSE ) + ,m_bActive( sal_False ) { DBG_CTOR(OTableWindow,NULL); @@ -197,7 +197,7 @@ OTableWindowListBox* OTableWindow::CreateListBox() } //------------------------------------------------------------------------------ -BOOL OTableWindow::FillListBox() +sal_Bool OTableWindow::FillListBox() { m_pListBox->Clear(); if ( !m_pContainerListener.is() ) @@ -256,7 +256,7 @@ BOOL OTableWindow::FillListBox() OSL_ENSURE(0,"Exception occured!"); } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- void* OTableWindow::createUserData(const Reference< XPropertySet>& /*_xColumn*/,bool /*_bPrimaryKey*/) @@ -307,7 +307,7 @@ void OTableWindow::impl_updateImage() } //------------------------------------------------------------------------------ -BOOL OTableWindow::Init() +sal_Bool OTableWindow::Init() { // create list box if necessary if ( !m_pListBox ) @@ -325,9 +325,9 @@ BOOL OTableWindow::Init() // die Felder in die ListBox eintragen clearListBox(); - BOOL bSuccess = FillListBox(); + sal_Bool bSuccess = FillListBox(); if ( bSuccess ) - m_pListBox->SelectAll( FALSE ); + m_pListBox->SelectAll( sal_False ); impl_updateImage(); @@ -379,7 +379,7 @@ void OTableWindow::Draw3DBorder(const Rectangle& rRect) Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSize) const { Rectangle aSizingRect = Rectangle( GetPosPixel(), GetSizePixel() ); - UINT16 nSizingFlags = GetSizingFlags(); + sal_uInt16 nSizingFlags = GetSizingFlags(); if( nSizingFlags & SIZING_TOP ) { @@ -529,7 +529,7 @@ void OTableWindow::Resize() } //------------------------------------------------------------------------------ -void OTableWindow::SetBoldTitle( BOOL bBold ) +void OTableWindow::SetBoldTitle( sal_Bool bBold ) { Font aFont = m_aTitle.GetFont(); aFont.SetWeight( bBold?WEIGHT_BOLD:WEIGHT_NORMAL ); @@ -551,7 +551,7 @@ void OTableWindow::setActive(sal_Bool _bActive) SetBoldTitle( _bActive ); m_bActive = _bActive; if (!_bActive && m_pListBox && m_pListBox->GetSelectionCount() != 0) - m_pListBox->SelectAll(FALSE); + m_pListBox->SelectAll(sal_False); } //------------------------------------------------------------------------------ @@ -564,25 +564,25 @@ void OTableWindow::Remove() pTabWinCont->Invalidate(); } //------------------------------------------------------------------------------ -BOOL OTableWindow::HandleKeyInput( const KeyEvent& rEvt ) +sal_Bool OTableWindow::HandleKeyInput( const KeyEvent& rEvt ) { const KeyCode& rCode = rEvt.GetKeyCode(); - USHORT nCode = rCode.GetCode(); - BOOL bShift = rCode.IsShift(); - BOOL bCtrl = rCode.IsMod1(); + sal_uInt16 nCode = rCode.GetCode(); + sal_Bool bShift = rCode.IsShift(); + sal_Bool bCtrl = rCode.IsMod1(); - BOOL bHandle = FALSE; + sal_Bool bHandle = sal_False; if( !bCtrl && !bShift && (nCode==KEY_DELETE) ) { Remove(); - bHandle = TRUE; + bHandle = sal_True; } return bHandle; } //------------------------------------------------------------------------------ -BOOL OTableWindow::ExistsAConn() const +sal_Bool OTableWindow::ExistsAConn() const { return getTableView()->ExistsAConn(this); } @@ -668,7 +668,7 @@ void OTableWindow::Command(const CommandEvent& rEvt) // ----------------------------------------------------------------------------- long OTableWindow::PreNotify(NotifyEvent& rNEvt) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; switch (rNEvt.GetType()) { case EVENT_KEYINPUT: @@ -690,19 +690,19 @@ long OTableWindow::PreNotify(NotifyEvent& rNEvt) switch( rCode.GetCode() ) { case KEY_DOWN: - bHandled = TRUE; + bHandled = sal_True; aStartPoint.Y() += m_nMoveIncrement; break; case KEY_UP: - bHandled = TRUE; + bHandled = sal_True; aStartPoint.Y() += -m_nMoveIncrement; break; case KEY_LEFT: - bHandled = TRUE; + bHandled = sal_True; aStartPoint.X() += -m_nMoveIncrement; break; case KEY_RIGHT: - bHandled = TRUE; + bHandled = sal_True; aStartPoint.X() += m_nMoveIncrement; break; } @@ -785,7 +785,7 @@ long OTableWindow::PreNotify(NotifyEvent& rNEvt) { const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); const KeyCode& rCode = pKeyEvent->GetKeyCode(); - USHORT nKeyCode = rCode.GetCode(); + sal_uInt16 nKeyCode = rCode.GetCode(); if ( rCode.IsMod2() && nKeyCode != KEY_UP && nKeyCode != KEY_DOWN && nKeyCode != KEY_LEFT && nKeyCode != KEY_RIGHT ) { m_nMoveCount = 0; // reset our movement count diff --git a/dbaccess/source/ui/querydesign/TableWindowData.cxx b/dbaccess/source/ui/querydesign/TableWindowData.cxx index f5a64d24095d..fc5f46450469 100644 --- a/dbaccess/source/ui/querydesign/TableWindowData.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowData.cxx @@ -64,7 +64,7 @@ OTableWindowData::OTableWindowData( const Reference< XPropertySet>& _xTable ,m_sComposedName(_rComposedName) ,m_aPosition( Point(-1,-1) ) ,m_aSize( Size(-1,-1) ) - ,m_bShowAll( TRUE ) + ,m_bShowAll( sal_True ) ,m_bIsQuery(false) ,m_bIsValid(true) { @@ -85,13 +85,13 @@ OTableWindowData::~OTableWindowData() } //------------------------------------------------------------------------------ -BOOL OTableWindowData::HasPosition() const +sal_Bool OTableWindowData::HasPosition() const { return ( (m_aPosition.X() != -1) && (m_aPosition.Y() != -1) ); } //------------------------------------------------------------------------------ -BOOL OTableWindowData::HasSize() const +sal_Bool OTableWindowData::HasSize() const { return ( (m_aSize.Width() != -1) && (m_aSize.Height() !=-1) ); } diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index 55bb4b9666ed..08ed3fb125e6 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -68,7 +68,7 @@ OJoinExchangeData::OJoinExchangeData(OTableWindowListBox* pBox) , pEntry(pBox->FirstSelected()) { } -const ULONG SCROLLING_TIMESPAN = 500; +const sal_uLong SCROLLING_TIMESPAN = 500; const long LISTBOX_SCROLLING_AREA = 6; //================================================================== // class OTableWindowListBox @@ -126,7 +126,7 @@ SvLBoxEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText ) OJoinDesignView* pView = m_pTabWin->getDesignView(); OJoinController& rController = pView->getController(); - BOOL bCase = FALSE; + sal_Bool bCase = sal_False; try { Reference xConnection = rController.getConnection(); @@ -155,7 +155,7 @@ SvLBoxEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText ) //------------------------------------------------------------------------------ void OTableWindowListBox::NotifyScrolled() { - m_bReallyScrolled = TRUE; + m_bReallyScrolled = sal_True; } //------------------------------------------------------------------------------ @@ -166,13 +166,13 @@ void OTableWindowListBox::NotifyEndScroll() m_pTabWin->getTableView()->Invalidate(INVALIDATE_NOCHILDREN); // ohne das INVALIDATE_NOCHILDREN wuerden auch alle Tabellen neu gezeichnet werden, // sprich : es flackert - m_bReallyScrolled = FALSE; + m_bReallyScrolled = sal_False; } //------------------------------------------------------------------------------ long OTableWindowListBox::PreNotify(NotifyEvent& rNEvt) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; switch (rNEvt.GetType()) { case EVENT_KEYINPUT: @@ -185,7 +185,7 @@ long OTableWindowListBox::PreNotify(NotifyEvent& rNEvt) if(m_pTabWin) { bHandled = m_pTabWin->HandleKeyInput(*pKeyEvent); - // bHandled = TRUE; + // bHandled = sal_True; } break; } @@ -214,7 +214,7 @@ IMPL_LINK( OTableWindowListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ ) { ScrollOutputArea( -1 ); pEntry = GetEntry( m_aMousePos ); - Select( pEntry, TRUE ); + Select( pEntry, sal_True ); // m_aScrollTimer.Start(); } @@ -232,7 +232,7 @@ IMPL_LINK( OTableWindowListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ ) { ScrollOutputArea( 1 ); pEntry = GetEntry( m_aMousePos ); - Select( pEntry, TRUE ); + Select( pEntry, sal_True ); // m_aScrollTimer.Start(); } @@ -269,7 +269,7 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) // remove the selection if the dragging operation is leaving the window if (_rEvt.mbLeaving) - SelectAll(FALSE); + SelectAll(sal_False); else { // hit test @@ -311,8 +311,8 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) // Beim Drag automatisch den richtigen Eintrag selektieren if ((FirstSelected() != pEntry) || (FirstSelected() && NextSelected(FirstSelected()))) - SelectAll(FALSE); - Select(pEntry, TRUE); + SelectAll(sal_False); + Select(pEntry, sal_True); // Auf den ersten Eintrag (*) kann nicht gedroppt werden if(!( m_pTabWin->GetData()->IsShowAll() && (pEntry==First()) )) @@ -386,8 +386,8 @@ void OTableWindowListBox::GetFocus() if ( GetSelectionCount() == 0 || GetCurEntry() != FirstSelected() ) { if ( FirstSelected() ) - Select(FirstSelected(), FALSE); - Select(GetCurEntry(), TRUE); + Select(FirstSelected(), sal_False); + Select(GetCurEntry(), sal_True); } else ShowFocusRect(FirstSelected()); diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index f35c07c42ebd..bffd56bb6d70 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -91,7 +91,7 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) : SetTextColor(aSystemStyle.GetButtonTextColor()); Font aFont( GetFont() ); - aFont.SetTransparent( TRUE ); + aFont.SetTransparent( sal_True ); SetFont( aFont ); } diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index 3372a2ca6876..56c64fe80c39 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -207,7 +207,7 @@ namespace dbaui // ----------------------------------------------------------------------------- long OQueryContainerWindow::PreNotify( NotifyEvent& rNEvt ) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; switch (rNEvt.GetType()) { case EVENT_GETFOCUS: diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 06b6804fa9be..59cf2b8b42ee 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -238,13 +238,13 @@ namespace dbaui namespace { // ----------------------------------------------------------------------------- - String lcl_getObjectResourceString( USHORT _nResId, sal_Int32 _nCommandType ) + String lcl_getObjectResourceString( sal_uInt16 _nResId, sal_Int32 _nCommandType ) { String sMessageText = String( ModuleRes( _nResId ) ); String sObjectType; { LocalResourceAccess aLocalRes( RSC_QUERY_OBJECT_TYPE, RSC_RESOURCE ); - sObjectType = String( ModuleRes( (USHORT)( _nCommandType + 1 ) ) ); + sObjectType = String( ModuleRes( (sal_uInt16)( _nCommandType + 1 ) ) ); } sMessageText.SearchAndReplace( String::CreateFromAscii( "$object$" ), sObjectType ); return sMessageText; diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx index 041faa5f9713..5f9ef97f8aad 100644 --- a/dbaccess/source/ui/querydesign/querydlg.cxx +++ b/dbaccess/source/ui/querydesign/querydlg.cxx @@ -98,7 +98,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, const TTableConnectionData::value_type& _pData, OJoinTableView::OTableWindowMap* _pTableMap, const Reference< XConnection >& _xConnection, - BOOL _bAllowTableSelect) + sal_Bool _bAllowTableSelect) :ModalDialog( pParent, ModuleRes(DLG_QRY_JOIN) ) ,aML_HelpText( this, ModuleRes(ML_HELPTEXT) ) ,aPB_OK( this, ModuleRes( PB_OK ) ) @@ -177,8 +177,8 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, } else { - const USHORT nCount = m_pJoinControl->aLB_JoinType.GetEntryCount(); - for (USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = m_pJoinControl->aLB_JoinType.GetEntryCount(); + for (sal_uInt16 i = 0; i < nCount; ++i) { const long nJoinTyp = reinterpret_cast(m_pJoinControl->aLB_JoinType.GetEntryData(i)); if ( !bSupportFullJoin && nJoinTyp == ID_FULL_JOIN ) @@ -216,8 +216,8 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) String sFirstWinName = m_pConnData->getReferencingTable()->GetWinName(); String sSecondWinName = m_pConnData->getReferencedTable()->GetWinName(); const EJoinType eOldJoinType = eJoinType; - USHORT nResId = 0; - const USHORT nPos = m_pJoinControl->aLB_JoinType.GetSelectEntryPos(); + sal_uInt16 nResId = 0; + const sal_uInt16 nPos = m_pJoinControl->aLB_JoinType.GetSelectEntryPos(); const long nJoinType = reinterpret_cast(m_pJoinControl->aLB_JoinType.GetEntryData(nPos)); sal_Bool bAddHint = sal_True; switch ( nJoinType ) @@ -252,11 +252,11 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) m_pConnData->ResetConnLines(); m_pTableControl->lateInit(); - m_pJoinControl->m_aCBNatural.Check(FALSE); + m_pJoinControl->m_aCBNatural.Check(sal_False); m_pTableControl->enableRelation(false); ::rtl::OUString sEmpty; m_pConnData->AppendConnLine(sEmpty,sEmpty); - aPB_OK.Enable(TRUE); + aPB_OK.Enable(sal_True); } break; } @@ -307,7 +307,7 @@ IMPL_LINK( DlgQryJoin, OKClickHdl, Button*, /*pButton*/ ) IMPL_LINK( DlgQryJoin, NaturalToggleHdl, CheckBox*, /*pButton*/ ) { DBG_CHKTHIS(DlgQryJoin,NULL); - BOOL bChecked = m_pJoinControl->m_aCBNatural.IsChecked(); + sal_Bool bChecked = m_pJoinControl->m_aCBNatural.IsChecked(); static_cast(m_pConnData.get())->setNatural(bChecked); m_pTableControl->enableRelation(!bChecked); if ( bChecked ) @@ -381,8 +381,8 @@ void DlgQryJoin::setJoinType(EJoinType _eNewJoinType) break; } - const USHORT nCount = m_pJoinControl->aLB_JoinType.GetEntryCount(); - for (USHORT i = 0; i < nCount; ++i) + const sal_uInt16 nCount = m_pJoinControl->aLB_JoinType.GetEntryCount(); + for (sal_uInt16 i = 0; i < nCount; ++i) { if ( nJoinType == reinterpret_cast(m_pJoinControl->aLB_JoinType.GetEntryData(i)) ) { diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx index e885f216b804..1456ce70dbb7 100644 --- a/dbaccess/source/ui/querydesign/querydlg.hxx +++ b/dbaccess/source/ui/querydesign/querydlg.hxx @@ -92,7 +92,7 @@ namespace dbaui const TTableConnectionData::value_type& pData, OJoinTableView::OTableWindowMap* _pTableMap, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection, - BOOL _bAllowTableSelect); + sal_Bool _bAllowTableSelect); virtual ~DlgQryJoin(); EJoinType GetJoinType() const { return eJoinType; }; diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index a8e34493e320..130263130d38 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -96,7 +96,7 @@ ORelationTableConnectionData::~ORelationTableConnectionData() } //------------------------------------------------------------------------ -BOOL ORelationTableConnectionData::DropRelation() +sal_Bool ORelationTableConnectionData::DropRelation() { DBG_CHKTHIS(ORelationTableConnectionData,NULL); ::osl::MutexGuard aGuard( m_aMutex ); @@ -125,7 +125,7 @@ BOOL ORelationTableConnectionData::DropRelation() } } } - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -174,10 +174,10 @@ void ORelationTableConnectionData::SetCardinality() } // ----------------------------------------------------------------------------- -BOOL ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const +sal_Bool ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const { // check if Table has the primary key column dependig on _eEConnectionSide - USHORT nPrimKeysCount = 0, + sal_uInt16 nPrimKeysCount = 0, nValidLinesCount = 0; const Reference< XNameAccess> xKeyColumns = dbtools::getPrimaryKeyColumns_throw(i_xTable); if ( xKeyColumns.is() ) @@ -201,15 +201,15 @@ BOOL ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet } } if ( nPrimKeysCount != aKeyColumns.getLength() ) - return FALSE; + return sal_False; } if ( !nPrimKeysCount || nPrimKeysCount != nValidLinesCount ) - return FALSE; + return sal_False; - return TRUE; + return sal_True; } //------------------------------------------------------------------------ -BOOL ORelationTableConnectionData::IsConnectionPossible() +sal_Bool ORelationTableConnectionData::IsConnectionPossible() { DBG_CHKTHIS(ORelationTableConnectionData,NULL); ::osl::MutexGuard aGuard( m_aMutex ); @@ -219,7 +219,7 @@ BOOL ORelationTableConnectionData::IsConnectionPossible() if ( IsSourcePrimKey() && !IsDestPrimKey() ) ChangeOrientation(); - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -282,7 +282,7 @@ bool operator==(const ORelationTableConnectionData& lhs, const ORelationTableCon } } //------------------------------------------------------------------------ -BOOL ORelationTableConnectionData::Update() +sal_Bool ORelationTableConnectionData::Update() { ::osl::MutexGuard aGuard( m_aMutex ); //////////////////////////////////////////////////////////// @@ -290,7 +290,7 @@ BOOL ORelationTableConnectionData::Update() { DropRelation(); if( !IsConnectionPossible() ) - return FALSE; + return sal_False; } // reassign the keys because the orientaion could be changed @@ -298,7 +298,7 @@ BOOL ORelationTableConnectionData::Update() Reference< XIndexAccess> xKeys ( getReferencingTable()->getKeys()); if ( !xKeys.is() ) - return FALSE; + return sal_False; //////////////////////////////////////////////////////////// // Neue Relation erzeugen Reference xKeyFactory(xKeys,UNO_QUERY); @@ -460,7 +460,7 @@ xKey.clear(); // Kardinalitaet bestimmen SetCardinality(); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 99fe03a7004d..9ac01a24a49a 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -370,7 +370,7 @@ namespace if ( aFind == m_aTableData.end() ) { aFind = m_aTableData.insert(TTableDataHelper::value_type(sSourceName,::boost::shared_ptr(new OTableWindowData(xTableProp,sSourceName, sSourceName)))).first; - aFind->second->ShowAll(FALSE); + aFind->second->ShowAll(sal_False); bAdded = true; } TTableWindowData::value_type pReferencingTable = aFind->second; @@ -405,7 +405,7 @@ namespace { Reference xReferencedTable(m_xTables->getByName(sReferencedTable),UNO_QUERY); aRefFind = m_aTableData.insert(TTableDataHelper::value_type(sReferencedTable,::boost::shared_ptr(new OTableWindowData(xReferencedTable,sReferencedTable, sReferencedTable)))).first; - aRefFind->second->ShowAll(FALSE); + aRefFind->second->ShowAll(sal_False); } else continue; // table name could not be found so we do not show this table releation diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 0c9d0cc1a456..48eeae8df245 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -188,7 +188,7 @@ void ORelationTableView::ReSync() GetTabWinMap()->begin()->second->GrabFocus(); } //------------------------------------------------------------------------------ -BOOL ORelationTableView::IsAddAllowed() +sal_Bool ORelationTableView::IsAddAllowed() { DBG_CHKTHIS(ORelationTableView,NULL); @@ -291,9 +291,9 @@ void ORelationTableView::AddNewRelation() DBG_CHKTHIS(ORelationTableView,NULL); TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() ); - ORelationDialog aRelDlg(this, pNewConnData, TRUE); + ORelationDialog aRelDlg(this, pNewConnData, sal_True); - BOOL bSuccess = (aRelDlg.Execute() == RET_OK); + sal_Bool bSuccess = (aRelDlg.Execute() == RET_OK); if (bSuccess) { // already updated by the dialog @@ -324,7 +324,7 @@ bool ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_ } //------------------------------------------------------------------------------ -void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, BOOL /*bNewTable*/) +void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, sal_Bool /*bNewTable*/) { DBG_CHKTHIS(ORelationTableView,NULL); OSL_ENSURE(_rComposedName.getLength(),"There must be a table name supplied!"); @@ -342,7 +342,7 @@ void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ////////////////////////////////////////////////////////////////// // Neue Datenstruktur in DocShell eintragen TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName,rWinName )); - pNewTabWinData->ShowAll(FALSE); + pNewTabWinData->ShowAll(sal_False); ////////////////////////////////////////////////////////////////// // Neues Fenster in Fensterliste eintragen @@ -420,7 +420,7 @@ void ORelationTableView::lookForUiActivities() aDlg.AddButton( ModuleRes(STR_QUERY_REL_EDIT), BUTTONID_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON); aDlg.AddButton( ModuleRes(STR_QUERY_REL_CREATE), BUTTONID_YES, 0); aDlg.AddButton(BUTTON_CANCEL,BUTTONID_CANCEL,0); - UINT16 nRet = aDlg.Execute(); + sal_uInt16 nRet = aDlg.Execute(); if( nRet == RET_CANCEL) { m_pCurrentlyTabConnData.reset(); diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx index de6ea4b0ff49..73a3ca0f3122 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx @@ -59,9 +59,9 @@ namespace dbaui void DisplayData( OFieldDescription* pFieldDescr ); void SaveData( OFieldDescription* pFieldDescr ); - void SetControlText( USHORT nControlId, const String& rText ); - String GetControlText( USHORT nControlId ); - void SetReadOnly( BOOL bReadOnly ); + void SetControlText( sal_uInt16 nControlId, const String& rText ); + String GetControlText( sal_uInt16 nControlId ); + void SetReadOnly( sal_Bool bReadOnly ); #if OSL_DEBUG_LEVEL > 0 OTableEditorCtrl* GetEditorCtrl(); #endif diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 4d3cdb6652a9..df1faa7712e9 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -157,7 +157,7 @@ DBG_NAME(OTableEditorCtrl) //================================================================== DBG_NAME(ClipboardInvalidator) //------------------------------------------------------------------ -OTableEditorCtrl::ClipboardInvalidator::ClipboardInvalidator(ULONG nTimeout,OTableEditorCtrl* _pOwner) +OTableEditorCtrl::ClipboardInvalidator::ClipboardInvalidator(sal_uLong nTimeout,OTableEditorCtrl* _pOwner) : m_pOwner(_pOwner) { DBG_CTOR(ClipboardInvalidator,NULL); @@ -269,7 +269,7 @@ SfxUndoManager* OTableEditorCtrl::GetUndoManager() const } //------------------------------------------------------------------------------ -BOOL OTableEditorCtrl::IsReadOnly() +sal_Bool OTableEditorCtrl::IsReadOnly() { DBG_CHKTHIS(OTableEditorCtrl,NULL); return bReadOnly; @@ -902,7 +902,7 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) // ----------------------------------------------------------------------------- void OTableEditorCtrl::resetType() { - USHORT nPos = pTypeCell->GetSelectEntryPos(); + sal_uInt16 nPos = pTypeCell->GetSelectEntryPos(); if(nPos != LISTBOX_ENTRY_NOTFOUND) SwitchType( GetView()->getController().getTypeInfo(nPos) ); else @@ -1653,7 +1653,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) if ( 1 == GetSelectColumnCount() ) { sal_uInt16 nSelId = GetColumnId( - sal::static_int_cast< USHORT >( + sal::static_int_cast< sal_uInt16 >( FirstSelectedColumn() ) ); ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, sal_False ) ); @@ -1951,7 +1951,7 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType ) || ( GetView()->getController().getTypeInfo( nCurrentlySelected ) != _pType ) ) { - USHORT nEntryPos = 0; + sal_uInt16 nEntryPos = 0; const OTypeInfoMap* pTypeInfo = GetView()->getController().getTypeInfo(); OTypeInfoMap::const_iterator aIter = pTypeInfo->begin(); OTypeInfoMap::const_iterator aEnd = pTypeInfo->end(); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index 2a7a36f3a051..092de0aa7c90 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -74,19 +74,19 @@ namespace dbaui ::boost::shared_ptr pActRow; - ULONG nIndexEvent; - ULONG nCutEvent; - ULONG nPasteEvent; - ULONG nDeleteEvent; - ULONG nInsNewRowsEvent; - ULONG nInvalidateTypeEvent; - ULONG nEntryNotFoundEvent; + sal_uLong nIndexEvent; + sal_uLong nCutEvent; + sal_uLong nPasteEvent; + sal_uLong nDeleteEvent; + sal_uLong nInsNewRowsEvent; + sal_uLong nInvalidateTypeEvent; + sal_uLong nEntryNotFoundEvent; ChildFocusState m_eChildFocus; long nOldDataPos; - BOOL bSaveOnMove; - BOOL bReadOnly; + sal_Bool bSaveOnMove; + sal_Bool bReadOnly; //------------------------------------------------------------------ // Hilfsklasse class ClipboardInvalidator @@ -96,7 +96,7 @@ namespace dbaui OTableEditorCtrl* m_pOwner; public: - ClipboardInvalidator(ULONG nTimeout,OTableEditorCtrl*); + ClipboardInvalidator(sal_uLong nTimeout,OTableEditorCtrl*); ~ClipboardInvalidator(); protected: @@ -108,19 +108,19 @@ namespace dbaui protected: virtual void Command( const CommandEvent& rEvt ); - virtual BOOL SeekRow(long nRow); + virtual sal_Bool SeekRow(long nRow); virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect, - USHORT nColumnId ) const; + sal_uInt16 nColumnId ) const; virtual void CursorMoved(); virtual RowStatus GetRowStatus(long nRow) const; - virtual ::svt::CellController* GetController(long nRow, USHORT nCol); - virtual void InitController(::svt::CellControllerRef& rController, long nRow, USHORT nCol); + virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol); + virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol); virtual void CellModified(); - virtual BOOL SaveModified(); // wird aufgerufen vor einem Zellenwechsel - // return FALSE, verhindert Zellenwechsel + virtual sal_Bool SaveModified(); // wird aufgerufen vor einem Zellenwechsel + // return sal_False, verhindert Zellenwechsel virtual void Undo(); virtual void Redo(); virtual String GetCellText(long nRow, sal_uInt16 nColId) const; @@ -137,8 +137,8 @@ namespace dbaui void ClearModified(); - void SetPrimaryKey( BOOL bSet ); - BOOL IsPrimaryKey(); + void SetPrimaryKey( sal_Bool bSet ); + sal_Bool IsPrimaryKey(); DECL_LINK(ControlPreNotifyHdl, NotifyEvent*); @@ -146,15 +146,15 @@ namespace dbaui // TYPEINFO(); OTableEditorCtrl(Window* pParentWin); virtual ~OTableEditorCtrl(); - virtual BOOL CursorMoving(long nNewRow, USHORT nNewCol); + virtual sal_Bool CursorMoving(long nNewRow, sal_uInt16 nNewCol); virtual void UpdateAll(); SfxUndoManager* GetUndoManager() const; void SetDescrWin( OTableFieldDescWin* pWin ){ pDescrWin = pWin; if (pDescrWin && pActRow) pDescrWin->DisplayData(pActRow->GetActFieldDescr()); } - BOOL SaveCurRow(); + sal_Bool SaveCurRow(); void SwitchType( const TOTypeInfoSP& _pType ); - void DisplayData( long nRow, BOOL bGrabFocus = TRUE ); + void DisplayData( long nRow, sal_Bool bGrabFocus = sal_True ); // erzwingt das Anzeigen der genannten Zeile (selbst wenn es eigentlich schon die aktuelle ist) virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ); @@ -169,15 +169,15 @@ namespace dbaui ::boost::shared_ptr GetActRow(){ return pActRow; } void CellModified( long nRow, sal_uInt16 nColId ); - void SetReadOnly( BOOL bRead=TRUE ); + void SetReadOnly( sal_Bool bRead=sal_True ); virtual void Init(); virtual void DeactivateCell(sal_Bool bUpdate = sal_True); - BOOL IsCutAllowed( long nRow = -1 ); - BOOL IsCopyAllowed( long nRow = -1 ); - BOOL IsPasteAllowed( long nRow = -1 ); - BOOL IsReadOnly(); + sal_Bool IsCutAllowed( long nRow = -1 ); + sal_Bool IsCopyAllowed( long nRow = -1 ); + sal_Bool IsPasteAllowed( long nRow = -1 ); + sal_Bool IsReadOnly(); OFieldDescription* GetFieldDescr( long nRow ); // window overloads @@ -202,11 +202,11 @@ namespace dbaui DECL_LINK( EntryNotFound, void* ); void InitCellController(); - INT32 HasFieldName( const String& rFieldName ); + sal_Int32 HasFieldName( const String& rFieldName ); String GenerateName( const String& rName ); - BOOL SetDataPtr( long nRow ); + sal_Bool SetDataPtr( long nRow ); - BOOL SaveData(long nRow, USHORT nColumnId); + sal_Bool SaveData(long nRow, sal_uInt16 nColumnId); /** AdjustFieldDescription set the needed values for the description @param _pFieldDesc the field description where to set the values @param _rMultiSel contains the postions which changed for undo/redo diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index 91fbcd27081f..c0c37c34f594 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -70,9 +70,9 @@ OTableRowView::OTableRowView(Window* pParent) ,m_nDataPos(-1) ,m_nCurrentPos(-1) ,m_nCurUndoActId(0) - ,m_bCurrentModified(FALSE) - ,m_bUpdatable(FALSE) - ,m_bClipboardFilled(FALSE) + ,m_bCurrentModified(sal_False) + ,m_bUpdatable(sal_False) + ,m_bClipboardFilled(sal_False) { DBG_CTOR(OTableRowView,NULL); @@ -103,7 +103,7 @@ void OTableRowView::Init() SetFont(aFont); // HandleColumn, fuer maximal fuenf Ziffern einrichten - InsertHandleColumn(static_cast(GetTextWidth('0') * 4)/*, TRUE */); + InsertHandleColumn(static_cast(GetTextWidth('0') * 4)/*, sal_True */); BrowserMode nMode = BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL | BROWSER_AUTOSIZE_LASTCOL; @@ -136,7 +136,7 @@ void OTableRowView::KeyInput( const KeyEvent& rEvt ) } //------------------------------------------------------------------------ -void OTableRowView::SetUpdatable( BOOL bUpdate ) +void OTableRowView::SetUpdatable( sal_Bool bUpdate ) { m_bUpdatable = bUpdate; @@ -156,7 +156,7 @@ void OTableRowView::Command(const CommandEvent& rEvt) return; } - USHORT nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()); + sal_uInt16 nColId = GetColumnAtXPosPixel(rEvt.GetMousePosPixel().X()); long nRow = GetRowAtYPosPixel(rEvt.GetMousePosPixel().Y()); if ( nColId == HANDLE_ID ) diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index f16624dbdad2..1731f7483ea9 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -303,7 +303,7 @@ IMPL_LINK( OTableDesignView, SwitchHdl, Accelerator*, /*pAcc*/ ) //------------------------------------------------------------------------------ long OTableDesignView::PreNotify( NotifyEvent& rNEvt ) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; switch(rNEvt.GetType()) { case EVENT_GETFOCUS: diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx index 24bbb28411b1..cb51dd80bc78 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx @@ -123,7 +123,7 @@ void OTableFieldControl::DeactivateAggregate( EControlType eType ) } } // ----------------------------------------------------------------------------- -void OTableFieldControl::SetModified(BOOL bModified) +void OTableFieldControl::SetModified(sal_Bool bModified) { GetCtrl()->GetView()->getController().setModified(bModified); } diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx index cc18065bc03d..0ba24704b11c 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx @@ -45,9 +45,9 @@ namespace dbaui virtual void ActivateAggregate( EControlType eType ); virtual void DeactivateAggregate( EControlType eType ); // Sind von den abgeleiteten Klassen zu impl. - virtual void CellModified(long nRow, USHORT nColId ); - virtual BOOL IsReadOnly(); - virtual void SetModified(BOOL bModified); + virtual void CellModified(long nRow, sal_uInt16 nColId ); + virtual sal_Bool IsReadOnly(); + virtual void SetModified(sal_Bool bModified); virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > GetFormatter() const; virtual ::com::sun::star::lang::Locale GetLocale() const; diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index 6f136ab0b4e8..c33bf8460982 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -320,7 +320,7 @@ void OTableFieldDescWin::LoseFocus() // ----------------------------------------------------------------------------- long OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt ) { - BOOL bHandled = FALSE; + sal_Bool bHandled = sal_False; switch(rNEvt.GetType()) { case EVENT_GETFOCUS: diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx index b2d5f09c99c4..038d42ce93ce 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx @@ -75,16 +75,16 @@ namespace dbaui void DisplayData( OFieldDescription* pFieldDescr ); void SaveData( OFieldDescription* pFieldDescr ); - void SetReadOnly( BOOL bReadOnly ); + void SetReadOnly( sal_Bool bReadOnly ); // window overloads virtual long PreNotify( NotifyEvent& rNEvt ); virtual void GetFocus(); virtual void LoseFocus(); - void SetControlText( USHORT nControlId, const String& rText ) + void SetControlText( sal_uInt16 nControlId, const String& rText ) { m_pGenPage->SetControlText(nControlId,rText); } - String GetControlText( USHORT nControlId ) + String GetControlText( sal_uInt16 nControlId ) { return m_pGenPage->GetControlText(nControlId); } // short GetFormatCategory(OFieldDescription* pFieldDescr) { return m_pGenPage ? m_pGenPage->GetFormatCategory(pFieldDescr) : -1; } diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx index d9a462431bdc..26a5331377a1 100644 --- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx +++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx @@ -75,7 +75,7 @@ namespace dbaui // ----------------------------------------------------------------------------- sal_Bool OTableRowExchange::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) { - ULONG nFormat = SotExchange::GetFormat(rFlavor); + sal_uLong nFormat = SotExchange::GetFormat(rFlavor); if(nFormat == SOT_FORMATSTR_ID_SBA_TABED) return SetObject(&m_vTableRow,SOT_FORMATSTR_ID_SBA_TABED,rFlavor); return sal_False; diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index 39d7902a1b9d..d900b9b41546 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -72,7 +72,7 @@ TYPEINIT1( OPrimKeyUndoAct, OTableEditorUndoAct ); // class OTableDesignUndoAct //============================================================================== DBG_NAME(OTableDesignUndoAct); -OTableDesignUndoAct::OTableDesignUndoAct( OTableRowView* pOwner,USHORT nCommentID ) : OCommentUndoAction(nCommentID) +OTableDesignUndoAct::OTableDesignUndoAct( OTableRowView* pOwner,sal_uInt16 nCommentID ) : OCommentUndoAction(nCommentID) ,m_pTabDgnCtrl( pOwner ) { DBG_CTOR(OTableDesignUndoAct,NULL); @@ -116,7 +116,7 @@ void OTableDesignUndoAct::Redo() // class OTableDesignCellUndoAct //============================================================================== DBG_NAME(OTableDesignCellUndoAct); -OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, USHORT nColumn ) : +OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn ) : OTableDesignUndoAct( pOwner ,STR_TABED_UNDO_CELLMODIFIED) ,m_nCol( nColumn ) ,m_nRow( nRowID ) @@ -170,7 +170,7 @@ void OTableDesignCellUndoAct::Redo() // class OTableEditorUndoAct //============================================================================== DBG_NAME(OTableEditorUndoAct); -OTableEditorUndoAct::OTableEditorUndoAct( OTableEditorCtrl* pOwner,USHORT _nCommentID ) : +OTableEditorUndoAct::OTableEditorUndoAct( OTableEditorCtrl* pOwner,sal_uInt16 _nCommentID ) : OTableDesignUndoAct( pOwner ,_nCommentID) ,pTabEdCtrl(pOwner) { @@ -187,7 +187,7 @@ OTableEditorUndoAct::~OTableEditorUndoAct() // class OTableEditorTypeSelUndoAct //============================================================================== DBG_NAME(OTableEditorTypeSelUndoAct); -OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, USHORT nColumn, const TOTypeInfoSP& _pOldType ) +OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType ) :OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED) ,m_nCol( nColumn ) ,m_nRow( nRowID ) @@ -266,7 +266,7 @@ void OTableEditorDelUndoAct::Undo() { ////////////////////////////////////////////////////////////////////// // Geloeschte Zeilen wieder einfuegen - ULONG nPos; + sal_uLong nPos; ::std::vector< ::boost::shared_ptr >::iterator aIter = m_aDeletedRows.begin(); ::std::vector< ::boost::shared_ptr >::iterator aEnd = m_aDeletedRows.end(); @@ -290,7 +290,7 @@ void OTableEditorDelUndoAct::Redo() { ////////////////////////////////////////////////////////////////////// // Zeilen wieder loeschen - ULONG nPos; + sal_uLong nPos; ::std::vector< ::boost::shared_ptr >::iterator aIter = m_aDeletedRows.begin(); ::std::vector< ::boost::shared_ptr >::iterator aEnd = m_aDeletedRows.end(); ::std::vector< ::boost::shared_ptr >* pOriginalRows = pTabEdCtrl->GetRowList(); @@ -339,7 +339,7 @@ void OTableEditorInsUndoAct::Undo() pOriginalRows->erase(pOriginalRows->begin()+i); } - pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size(), TRUE ); + pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size(), sal_True ); pTabEdCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Undo(); @@ -362,7 +362,7 @@ void OTableEditorInsUndoAct::Redo() nInsertRow++; } - pTabEdCtrl->RowInserted( m_nInsPos, m_vInsertedRows.size(), TRUE ); + pTabEdCtrl->RowInserted( m_nInsPos, m_vInsertedRows.size(), sal_True ); pTabEdCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Redo(); @@ -398,7 +398,7 @@ void OTableEditorInsNewUndoAct::Undo() pOriginalRows->erase(pOriginalRows->begin()+i); } - pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, TRUE ); + pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, sal_True ); pTabEdCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Undo(); @@ -414,7 +414,7 @@ void OTableEditorInsNewUndoAct::Redo() for( long i=m_nInsPos; i<(m_nInsPos+m_nInsRows); i++ ) pRowList->insert( pRowList->begin()+i,::boost::shared_ptr(new OTableRow()) ); - pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows, TRUE ); + pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows, sal_True ); pTabEdCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Redo(); @@ -454,7 +454,7 @@ void OPrimKeyUndoAct::Undo() { OSL_ENSURE(nIndex <= static_cast(pRowList->size()),"Index for undo isn't valid!"); pRow = (*pRowList)[nIndex]; - pRow->SetPrimaryKey( FALSE ); + pRow->SetPrimaryKey( sal_False ); } ////////////////////////////////////////////////////////////////////// @@ -463,7 +463,7 @@ void OPrimKeyUndoAct::Undo() { OSL_ENSURE(nIndex <= static_cast(pRowList->size()),"Index for undo isn't valid!"); pRow = (*pRowList)[nIndex]; - pRow->SetPrimaryKey( TRUE ); + pRow->SetPrimaryKey( sal_True ); } m_pEditorCtrl->InvalidateHandleColumn(); @@ -479,12 +479,12 @@ void OPrimKeyUndoAct::Redo() ////////////////////////////////////////////////////////////////////// // Die geloeschten Keys loeschen for( nIndex = m_aDelKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aDelKeys.NextSelected() ) - (*pRowList)[nIndex]->SetPrimaryKey( FALSE ); + (*pRowList)[nIndex]->SetPrimaryKey( sal_False ); ////////////////////////////////////////////////////////////////////// // Die eingefuegten Keys herstellen for( nIndex = m_aInsKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aInsKeys.NextSelected() ) - (*pRowList)[nIndex]->SetPrimaryKey( TRUE ); + (*pRowList)[nIndex]->SetPrimaryKey( sal_True ); m_pEditorCtrl->InvalidateHandleColumn(); OTableEditorUndoAct::Redo(); diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx index a5e4af28b447..742e377077aa 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.hxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx @@ -57,7 +57,7 @@ namespace dbaui virtual void Redo(); public: TYPEINFO(); - OTableDesignUndoAct( OTableRowView* pOwner ,USHORT nCommentID); + OTableDesignUndoAct( OTableRowView* pOwner ,sal_uInt16 nCommentID); virtual ~OTableDesignUndoAct(); }; @@ -70,7 +70,7 @@ namespace dbaui public: TYPEINFO(); - OTableEditorUndoAct( OTableEditorCtrl* pOwner,USHORT nCommentID ); + OTableEditorUndoAct( OTableEditorCtrl* pOwner,sal_uInt16 nCommentID ); virtual ~OTableEditorUndoAct(); }; @@ -79,7 +79,7 @@ namespace dbaui class OTableDesignCellUndoAct : public OTableDesignUndoAct { protected: - USHORT m_nCol; + sal_uInt16 m_nCol; long m_nRow; ::com::sun::star::uno::Any m_sOldText; ::com::sun::star::uno::Any m_sNewText; @@ -88,7 +88,7 @@ namespace dbaui virtual void Redo(); public: TYPEINFO(); - OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, USHORT nColumn ); + OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn ); virtual ~OTableDesignCellUndoAct(); }; @@ -97,7 +97,7 @@ namespace dbaui class OTableEditorTypeSelUndoAct : public OTableEditorUndoAct { protected: - USHORT m_nCol; + sal_uInt16 m_nCol; long m_nRow; TOTypeInfoSP m_pOldType; TOTypeInfoSP m_pNewType; @@ -106,7 +106,7 @@ namespace dbaui virtual void Redo(); public: TYPEINFO(); - OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, USHORT nColumn, const TOTypeInfoSP& _pOldType ); + OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType ); virtual ~OTableEditorTypeSelUndoAct(); }; @@ -162,7 +162,7 @@ namespace dbaui protected: MultiSelection m_aDelKeys, m_aInsKeys; - BOOL m_bActPrimKeySet; + sal_Bool m_bActPrimKeySet; OTableEditorCtrl* m_pEditorCtrl; virtual void Undo(); -- cgit From 3f3abe3a1558dc9a67bf23bce6d527cecd32011b Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 17 Jan 2011 17:27:03 +0100 Subject: removetooltypes01: #i112600# Replace missing tools types replacement --- dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2 +- dbaccess/source/ui/dlg/ConnectionPage.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 7eae4fa04953..bf746e0243d3 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -226,7 +226,7 @@ DBG_NAME(OConnectionHelper) m_aConnectionURL.Show(); m_aConnectionURL.ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) ); - BOOL bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType ); + sal_Bool bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType ); m_aPB_Connection.Show( bEnableBrowseButton ); SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True); diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index a1a146cd7b4b..a221eee9c371 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -346,7 +346,7 @@ namespace dbaui String sUrl = pUrlItem->GetValue(); setURL( sUrl ); - const BOOL bEnableJDBC = m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC; + const sal_Bool bEnableJDBC = m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC; if ( !pJdbcDrvItem->GetValue().Len() ) { String sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType); @@ -436,7 +436,7 @@ namespace dbaui { } - USHORT nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; + sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS; OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() ); aMsg.Execute(); return 0L; @@ -445,7 +445,7 @@ namespace dbaui bool OConnectionTabPage::checkTestConnection() { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - BOOL bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0); + sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0); if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC ) bEnableTestConnection = bEnableTestConnection && (m_aJavaDriver.GetText().Len() != 0); m_aTestConnection.Enable(bEnableTestConnection); -- cgit From 96668046dda0d3a216966b5989ddeb6476f3478b Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Fri, 28 Jan 2011 12:49:53 +0100 Subject: gnumake3: remove comphelper version; fix including extract.hxx --- dbaccess/source/ui/misc/linkeddocuments.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx index 4d3472e623b7..67273487832e 100644 --- a/dbaccess/source/ui/misc/linkeddocuments.cxx +++ b/dbaccess/source/ui/misc/linkeddocuments.cxx @@ -74,7 +74,7 @@ #include #endif #ifndef _COMPHELPER_EXTRACT_HXX_ -#include +#include #endif #ifndef _COMPHELPER_TYPES_HXX_ #include -- cgit From bd79682982055d279587746e5a8bd0c62b6970e3 Mon Sep 17 00:00:00 2001 From: "Jens-Heiner Rechtien [hr]" Date: Mon, 7 Feb 2011 19:06:51 +0100 Subject: hr75: #i116747#: remove obsolete copyright notices --- dbaccess/source/ui/dlg/dlgsize.src | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/dlgsize.src b/dbaccess/source/ui/dlg/dlgsize.src index 128241d211e0..ea2a97d5910c 100644 --- a/dbaccess/source/ui/dlg/dlgsize.src +++ b/dbaccess/source/ui/dlg/dlgsize.src @@ -24,17 +24,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - //--------------------------------------------------------------------------- - // - // (c) Copyright 1996 - 2000 by Star Division GmbH, Hamburg, Germany - // - // Ersterstellung: - // JN - // - // Letzte Aenderung: - // $Author: rt $ $Date: 2008-04-10 14:52:17 $ $Revision: 1.32 $ - // - //--------------------------------------------------------------------------- #ifndef DBAUI_DLGSIZE_HRC #include "dlgsize.hrc" -- cgit