diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-20 09:52:21 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-20 09:52:21 +0200 |
commit | e70b1417d22d22e3d5bdffb1f4b55bc83a4c36ef (patch) | |
tree | 3bd3a7fe6854916ee1afa9ee042fc91b3fb9c24e /dbaccess/source/ui/dlg | |
parent | c00fe9ce1105c6c2a26954eeaee5e51336909a2a (diff) | |
parent | f1ea4ba4479f4a29eb0a42389d5f03c2ad280e8f (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
dbaccess/AllLangResTarget_adabasui.mk
dbaccess/AllLangResTarget_dba.mk
dbaccess/AllLangResTarget_dbmm.mk
dbaccess/AllLangResTarget_sdbt.mk
dbaccess/Executable_odbcconfig.mk
dbaccess/JunitTest_dbaccess_unoapi.mk
dbaccess/Library_adabasui.mk
dbaccess/Library_dba.mk
dbaccess/Library_dbaxml.mk
dbaccess/Library_dbmm.mk
dbaccess/Library_sdbt.mk
dbaccess/Makefile
dbaccess/Module_dbaccess.mk
dbaccess/Package_inc.mk
dbaccess/Package_uiconfig.mk
dbaccess/prj/build.lst
dbaccess/qa/unoapi/Test.java
dbaccess/source/core/api/CacheSet.hxx
dbaccess/source/core/dataaccess/SharedConnection.hxx
dbaccess/source/core/dataaccess/connection.cxx
dbaccess/source/filter/xml/xmlAutoStyle.cxx
dbaccess/source/filter/xml/xmlColumn.cxx
dbaccess/source/filter/xml/xmlComponent.cxx
dbaccess/source/filter/xml/xmlConnectionData.cxx
dbaccess/source/filter/xml/xmlConnectionResource.cxx
dbaccess/source/filter/xml/xmlDataSource.cxx
dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
dbaccess/source/filter/xml/xmlDataSourceSettings.cxx
dbaccess/source/filter/xml/xmlDatabaseDescription.cxx
dbaccess/source/filter/xml/xmlDocuments.cxx
dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
dbaccess/source/filter/xml/xmlHelper.cxx
dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
dbaccess/source/filter/xml/xmlLogin.cxx
dbaccess/source/filter/xml/xmlQuery.cxx
dbaccess/source/filter/xml/xmlServerDatabase.cxx
dbaccess/source/filter/xml/xmlTable.cxx
dbaccess/source/filter/xml/xmlTableFilterList.cxx
dbaccess/source/filter/xml/xmlTableFilterPattern.cxx
dbaccess/source/ui/app/AppDetailPageHelper.cxx
dbaccess/source/ui/app/AppDetailView.cxx
dbaccess/source/ui/app/AppIconControl.cxx
dbaccess/source/ui/app/AppSwapWindow.cxx
dbaccess/source/ui/app/AppTitleWindow.cxx
dbaccess/source/ui/app/AppView.cxx
dbaccess/source/ui/browser/AsyncronousLink.cxx
dbaccess/source/ui/browser/genericcontroller.cxx
dbaccess/source/ui/control/ColumnControlWindow.cxx
dbaccess/source/ui/control/RelationControl.cxx
dbaccess/source/ui/control/SqlNameEdit.cxx
dbaccess/source/ui/control/TableGrantCtrl.cxx
dbaccess/source/ui/control/VertSplitView.cxx
dbaccess/source/ui/control/toolboxcontroller.cxx
dbaccess/source/ui/dlg/CollectionView.cxx
dbaccess/source/ui/dlg/ConnectionHelper.cxx
dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
dbaccess/source/ui/dlg/RelationDlg.cxx
dbaccess/source/ui/dlg/TextConnectionHelper.cxx
dbaccess/source/ui/dlg/detailpages.cxx
dbaccess/source/ui/dlg/dlgsize.cxx
dbaccess/source/ui/dlg/queryorder.cxx
dbaccess/source/ui/dlg/tablespage.cxx
dbaccess/source/ui/misc/TableCopyHelper.cxx
dbaccess/source/ui/misc/ToolBoxHelper.cxx
dbaccess/source/ui/misc/WExtendPages.cxx
dbaccess/source/ui/misc/WNameMatch.cxx
dbaccess/source/ui/misc/WTypeSelect.cxx
dbaccess/source/ui/querydesign/ConnectionLine.cxx
dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
dbaccess/source/ui/querydesign/ConnectionLineData.cxx
dbaccess/source/ui/querydesign/JAccess.cxx
dbaccess/source/ui/querydesign/JoinController.cxx
dbaccess/source/ui/querydesign/JoinDesignView.cxx
dbaccess/source/ui/querydesign/JoinExchange.cxx
dbaccess/source/ui/querydesign/JoinTableView.cxx
dbaccess/source/ui/querydesign/QTableConnection.cxx
dbaccess/source/ui/querydesign/QTableConnectionData.cxx
dbaccess/source/ui/querydesign/QTableWindow.cxx
dbaccess/source/ui/querydesign/QTableWindowData.cxx
dbaccess/source/ui/querydesign/QueryDesignView.cxx
dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
dbaccess/source/ui/querydesign/QueryTextView.cxx
dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
dbaccess/source/ui/querydesign/TableConnection.cxx
dbaccess/source/ui/querydesign/TableConnectionData.cxx
dbaccess/source/ui/querydesign/TableWindow.cxx
dbaccess/source/ui/querydesign/TableWindowAccess.cxx
dbaccess/source/ui/querydesign/TableWindowData.cxx
dbaccess/source/ui/querydesign/TableWindowListBox.cxx
dbaccess/source/ui/querydesign/TableWindowTitle.cxx
dbaccess/source/ui/querydesign/querydlg.cxx
dbaccess/source/ui/querydesign/queryview.cxx
dbaccess/source/ui/relationdesign/RTableConnection.cxx
dbaccess/source/ui/relationdesign/RelationDesignView.cxx
dbaccess/source/ui/relationdesign/RelationTableView.cxx
dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx
dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
dbaccess/source/ui/tabledesign/TEditControl.cxx
dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
dbaccess/source/ui/tabledesign/TableDesignView.cxx
dbaccess/source/ui/tabledesign/TableFieldControl.cxx
dbaccess/source/ui/tabledesign/TableRow.cxx
dbaccess/source/ui/tabledesign/TableRowExchange.cxx
dbaccess/source/ui/tabledesign/TableUndo.cxx
dbaccess/source/ui/uno/ColumnControl.cxx
dbaccess/source/ui/uno/ColumnPeer.cxx
reportdesign/AllLangResTarget_rpt.mk
reportdesign/AllLangResTarget_rptui.mk
reportdesign/Library_rpt.mk
reportdesign/Library_rptui.mk
reportdesign/Library_rptxml.mk
reportdesign/Module_reportdesign.mk
reportdesign/Package_uiconfig.mk
reportdesign/Package_xml.mk
reportdesign/prj/build.lst
reportdesign/prj/makefile.mk
Diffstat (limited to 'dbaccess/source/ui/dlg')
87 files changed, 403 insertions, 1920 deletions
diff --git a/dbaccess/source/ui/dlg/AdabasStat.cxx b/dbaccess/source/ui/dlg/AdabasStat.cxx index 10bc3331b154..fae3a5e6efb3 100644 --- a/dbaccess/source/ui/dlg/AdabasStat.cxx +++ b/dbaccess/source/ui/dlg/AdabasStat.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,51 +29,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _TOOLS_DEBUG_HXX -#include <tools/debug.hxx> -#endif -#ifndef _CPPUHELPER_EXC_HLP_HXX_ #include <cppuhelper/exc_hlp.hxx> -#endif -#ifndef TOOLS_DIAGNOSE_EX_H #include <tools/diagnose_ex.h> -#endif -#ifndef _DBAUI_ADASTAT_HXX_ +#include <osl/diagnose.h> #include "AdabasStat.hxx" -#endif -#ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> -#endif -#ifndef _COM_SUN_STAR_SDBC_XSTATEMENT_HPP_ #include <com/sun/star/sdbc/XStatement.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_ #include <com/sun/star/sdbc/XRow.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_ #include <com/sun/star/sdbc/XResultSet.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> -#endif -#ifndef DBAUI_ADABASSTAT_HRC #include "AdabasStat.hrc" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include <connectivity/dbtools.hxx> -#endif -#ifndef _DBAUI_SQLMESSAGE_HXX_ #include "sqlmessage.hxx" -#endif using namespace dbaui; DBG_NAME(OAdabasStatistics) @@ -113,7 +84,7 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent, FreeResource(); - DBG_ASSERT(m_xConnection.is(),"No connection"); + OSL_ENSURE(m_xConnection.is(),"No connection"); if(m_xConnection.is()) { Reference<XStatement> xStmt; @@ -128,14 +99,14 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent, try { xMetaData = m_xConnection->getMetaData(); - bCanSelect = checkSystemTable(::rtl::OUString::createFromAscii("SERVERDBSTATISTICS"),sSchema); + bCanSelect = checkSystemTable(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SERVERDBSTATISTICS")), sSchema); if(bCanSelect) { - aStmt = ::rtl::OUString::createFromAscii("SELECT SERVERDBSIZE, UNUSEDPAGES FROM "); + aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT SERVERDBSIZE, UNUSEDPAGES FROM ")); aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation); - aStmt += ::rtl::OUString::createFromAscii(".\"SERVERDBSTATISTICS\""); + aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".\"SERVERDBSTATISTICS\"")); xStmt = m_xConnection->createStatement(); xRes = xStmt->executeQuery(aStmt); @@ -182,14 +153,14 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent, { try { - bCanSelect = checkSystemTable(::rtl::OUString::createFromAscii("DATADEVSPACES"),sSchema); + bCanSelect = checkSystemTable(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATADEVSPACES")), sSchema); if(bCanSelect) { // then the db files - aStmt = ::rtl::OUString::createFromAscii("SELECT DEVSPACENAME FROM "); + aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT DEVSPACENAME FROM ")); aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation); - aStmt += ::rtl::OUString::createFromAscii(".\"DATADEVSPACES\""); + aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".\"DATADEVSPACES\"")); xStmt = m_xConnection->createStatement(); xRes = xStmt->executeQuery(aStmt); @@ -226,13 +197,13 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent, { try { - bCanSelect = checkSystemTable(::rtl::OUString::createFromAscii("CONFIGURATION"),sSchema); + bCanSelect = checkSystemTable(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CONFIGURATION")), sSchema); if(bCanSelect) { - aStmt = ::rtl::OUString::createFromAscii("SELECT * FROM "); + aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * FROM ")); aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation); - aStmt += ::rtl::OUString::createFromAscii(".CONFIGURATION WHERE DESCRIPTION LIKE 'SYS%DEVSPACE%NAME'"); + aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".CONFIGURATION WHERE DESCRIPTION LIKE 'SYS%DEVSPACE%NAME'")); xStmt = m_xConnection->createStatement(); xRes = xStmt->executeQuery(aStmt); if(xRes.is() && xRes->next()) @@ -243,9 +214,9 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent, else showError(); - aStmt = ::rtl::OUString::createFromAscii("SELECT * FROM "); + aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * FROM ")); aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation); - aStmt += ::rtl::OUString::createFromAscii(".CONFIGURATION WHERE DESCRIPTION = 'TRANSACTION LOG NAME'"); + aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".CONFIGURATION WHERE DESCRIPTION = 'TRANSACTION LOG NAME'")); xRes = xStmt->executeQuery(aStmt); if(xRes.is() && xRes->next()) { @@ -297,11 +268,11 @@ sal_Bool OAdabasStatistics::checkSystemTable(const ::rtl::OUString& _rsSystemTab Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); if ( xMeta.is() ) { - Reference<XResultSet> xRes = xMeta->getTablePrivileges(Any(),::rtl::OUString::createFromAscii("%"), _rsSystemTable); + Reference<XResultSet> xRes = xMeta->getTablePrivileges(Any(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")), _rsSystemTable); if(xRes.is()) { Reference<XRow> xRow(xRes,UNO_QUERY); - static const ::rtl::OUString sSelect = ::rtl::OUString::createFromAscii("SELECT"); + static const ::rtl::OUString sSelect(RTL_CONSTASCII_USTRINGPARAM("SELECT")); // first the db sizes while( xRow.is() && xRes->next() ) { @@ -331,3 +302,4 @@ void OAdabasStatistics::showError() // ----------------------------------------------------------------------------- } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/AdabasStat.hxx b/dbaccess/source/ui/dlg/AdabasStat.hxx index 2f222462d4df..7bba19f59724 100644 --- a/dbaccess/source/ui/dlg/AdabasStat.hxx +++ b/dbaccess/source/ui/dlg/AdabasStat.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,27 +28,13 @@ #ifndef _DBAUI_ADASTAT_HXX_ #define _DBAUI_ADASTAT_HXX_ -#ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> -#endif -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef _SV_DIALOG_HXX #include <vcl/dialog.hxx> -#endif -#ifndef DBAUI_FIELDCONTROLS_HXX #include "FieldControls.hxx" -#endif -#ifndef _PRGSBAR_HXX #include <svtools/prgsbar.hxx> -#endif -#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ #include <com/sun/star/sdbc/XConnection.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif namespace dbaui @@ -96,3 +83,4 @@ namespace dbaui #endif //_DBAUI_ADASTAT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/AdabasStat.src b/dbaccess/source/ui/dlg/AdabasStat.src index 37bf187b6c90..476750f7b531 100644 --- a/dbaccess/source/ui/dlg/AdabasStat.src +++ b/dbaccess/source/ui/dlg/AdabasStat.src @@ -206,33 +206,3 @@ String STR_ADABAS_ERROR_SYSTEMTABLES { Text [ en-US ] = "No information could be displayed because no access rights exist for the required system tables."; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dbaccess/source/ui/dlg/AutoControls.src b/dbaccess/source/ui/dlg/AutoControls.src index 1bfe3c0233a9..e43e2a13a7fb 100644 --- a/dbaccess/source/ui/dlg/AutoControls.src +++ b/dbaccess/source/ui/dlg/AutoControls.src @@ -69,13 +69,11 @@ String STR_MSACCESS_MDB_FILE Text[ en-US ] = "Microsoft Access database file"; }; - String STR_NO_ADDITIONAL_SETTINGS { Text[ en-US ] = "No more settings are necessary. To verify that the connection is working, click the '%test' button."; }; - String STR_COMMONURL { Text [ en-US ] = "Datasource URL" ; @@ -85,18 +83,15 @@ String STR_HOSTNAME { Text[ en-US ] = "~Host name"; }; + String STR_MOZILLA_PROFILE_NAME { Text[ en-US ] = "~Mozilla profile name"; }; + String STR_THUNDERBIRD_PROFILE_NAME { Text[ en-US ] = "~Thunderbird profile name"; }; - // ------------------------------------------------------------------------------------------------- - - - - diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index c480fdd2093e..71ce69138934 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,90 +28,34 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_COLLECTIONVIEW_HXX #include "CollectionView.hxx" -#endif -#ifndef DBAUI_COLLECTIONVIEW_HRC #include "CollectionView.hrc" -#endif -#ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef TOOLS_DIAGNOSE_EX_H #include <tools/diagnose_ex.h> -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _COMPHELPER_INTERACTION_HXX_ #include <comphelper/interaction.hxx> -#endif -#ifndef _CPPUHELPER_EXC_HLP_HXX_ #include <cppuhelper/exc_hlp.hxx> -#endif -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/helper/vclunohelper.hxx> -#endif -#ifndef SVT_QUERYFOLDER_HXX #include <svtools/QueryFolderName.hxx> -#endif -#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_ #include <com/sun/star/lang/XInitialization.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_ #include <com/sun/star/container/XChild.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ #include <com/sun/star/container/XNameContainer.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include <com/sun/star/beans/PropertyValue.hpp> -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMECONTAINER_HPP_ #include <com/sun/star/container/XHierarchicalNameContainer.hpp> -#endif -#ifndef _COM_SUN_STAR_UCB_INTERACTIVEAUGMENTEDIOEXCEPTION_HPP_ #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> -#endif -#ifndef _COM_SUN_STAR_UCB_IOERRORCODE_HPP_ #include <com/sun/star/ucb/IOErrorCode.hpp> -#endif -#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_ #include <com/sun/star/task/XInteractionHandler.hpp> -#endif -#ifndef _COM_SUN_STAR_TASK_INTERACTIONCLASSIFICATION_HPP_ #include <com/sun/star/task/InteractionClassification.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_ #include <com/sun/star/sdbc/SQLException.hpp> -#endif -#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_ #include <com/sun/star/awt/XWindow.hpp> -#endif -#ifndef INCLUDED_SVTOOLS_VIEWOPTIONS_HXX #include <unotools/viewoptions.hxx> -#endif -#ifndef _OSL_THREAD_H_ #include <osl/thread.h> -#endif -#ifndef _DBHELPER_DBEXCEPTION_HXX_ #include <connectivity/dbexception.hxx> -#endif #define FILEDIALOG_DEF_IMAGEBORDER 10 //......................................................................... @@ -162,9 +107,7 @@ OCollectionView::OCollectionView( Window * pParent m_aNewFolder.SetStyle( m_aNewFolder.GetStyle() | WB_NOPOINTERFOCUS ); m_aUp.SetModeImage(ModuleRes(IMG_NAVIGATION_BTN_UP_SC)); - m_aUp.SetModeImage(ModuleRes(IMG_NAVIGATION_BTN_UP_SCH),BMP_COLOR_HIGHCONTRAST); m_aNewFolder.SetModeImage(ModuleRes(IMG_NAVIGATION_CREATEFOLDER_SC)); - m_aNewFolder.SetModeImage(ModuleRes(IMG_NAVIGATION_CREATEFOLDER_SCH),BMP_COLOR_HIGHCONTRAST); m_aView.SetDoubleClickHdl( LINK( this, OCollectionView, Dbl_Click_FileView ) ); m_aView.EnableAutoResize(); @@ -268,7 +211,6 @@ IMPL_LINK( OCollectionView, Save_Click, PushButton*, EMPTYARG ) QueryBox aBox( this, WB_YES_NO, ModuleRes( STR_ALREADYEXISTOVERWRITE ) ); if ( aBox.Execute() != RET_YES ) return 0; - // xNameContainer->removeByName(sName); } m_aName.SetText(sName); EndDialog( sal_True ); @@ -395,3 +337,4 @@ void OCollectionView::initCurrentPath() //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/CollectionView.src b/dbaccess/source/ui/dlg/CollectionView.src index 86ac75a0d9e9..e431a6502e81 100644 --- a/dbaccess/source/ui/dlg/CollectionView.src +++ b/dbaccess/source/ui/dlg/CollectionView.src @@ -43,14 +43,12 @@ #define FIXEDLINE_HEIGHT 1 #define IMG_SIZE 15 - ModalDialog DLG_COLLECTION_VIEW { OutputSize = TRUE ; SVLook = TRUE ; Moveable = TRUE ; Closeable = TRUE ; - //Sizeable = TRUE; HelpId = HID_EXPLORERDLG_COLLECTION ; Size = MAP_APPFONT ( WIN_X , WIN_Y ) ; @@ -132,7 +130,6 @@ ModalDialog DLG_COLLECTION_VIEW Size = MAP_APPFONT ( 50 , BUTTON_HEIGHT ) ; }; - String STR_PATHNAME { Text [ en-US ] = "~Path:" ; @@ -143,29 +140,20 @@ String STR_NEW_FOLDER { Text [ en-US ] = "Folder" ; }; + Image IMG_NAVIGATION_BTN_UP_SC { ImageBitmap = Bitmap { File = "fp010"; }; MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; }; -Image IMG_NAVIGATION_BTN_UP_SCH -{ - ImageBitmap = Bitmap { File = "fph010"; }; - MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; -}; + Image IMG_NAVIGATION_CREATEFOLDER_SC { ImageBitmap = Bitmap { File = "fp015"; }; MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; }; -Image IMG_NAVIGATION_CREATEFOLDER_SCH -{ - ImageBitmap = Bitmap { File = "fph015"; }; - MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; -}; String STR_ALREADYEXISTOVERWRITE { Text [ en-US ] = "The file already exists. Overwrite?" ; }; - diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 490d654a88cc..efb8a38dcfd2 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,6 @@ #include "dsnItem.hxx" #include "ConnectionHelper.hxx" -#include "AutoControlsDef.hrc" #include "dbu_dlg.hrc" #include "dbu_misc.hrc" #include <svl/itemset.hxx> @@ -44,6 +44,7 @@ #include "dbaccess_helpid.hrc" #include "localresaccess.hxx" #include <osl/process.h> +#include <osl/diagnose.h> #include <vcl/msgbox.hxx> #include <sfx2/filedlghelper.hxx> #include "dbadmin.hxx" @@ -57,7 +58,6 @@ #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/awt/XWindow.hpp> -// #106016# ------------------------------------ #include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/ucb/XProgressHandler.hpp> #include "UITools.hxx" @@ -69,27 +69,13 @@ #include <tools/urlobj.hxx> #include <tools/diagnose_ex.h> #include <sfx2/docfilt.hxx> -#if !defined(WINDOWS_VISTA_PSDK) && defined(WNT) -#define _ADO_DATALINK_BROWSE_ -#endif #ifdef _ADO_DATALINK_BROWSE_ -#if defined( WNT ) - #include <tools/prewin.h> - #include <windows.h> - #include <tools/postwin.h> -#endif -#ifndef _SV_SYSDATA_HXX #include <vcl/sysdata.hxx> -#endif -#ifndef _DBAUI_ADO_DATALINK_HXX_ #include "adodatalinks.hxx" -#endif #endif //_ADO_DATALINK_BROWSE_ -#ifndef _COM_SUN_STAR_MOZILLA_XMOZILLABOOTSTRAP_HPP_ #include <com/sun/star/mozilla/XMozillaBootstrap.hpp> -#endif #include <unotools/processfactory.hxx> @@ -125,7 +111,7 @@ DBG_NAME(OConnectionHelper) if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); m_aPB_Connection.SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections)); - DBG_ASSERT(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !"); + OSL_ENSURE(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !"); m_aConnectionURL.SetTypeCollection(m_pCollection); } @@ -189,7 +175,7 @@ DBG_NAME(OConnectionHelper) { try { - ::rtl::OUString sFolderPickerService = ::rtl::OUString::createFromAscii(SERVICE_UI_FOLDERPICKER); + ::rtl::OUString sFolderPickerService(SERVICE_UI_FOLDERPICKER); Reference< XFolderPicker > xFolderPicker(m_xORB->createInstance(sFolderPickerService), UNO_QUERY); if (!xFolderPicker.is()) { @@ -333,7 +319,6 @@ DBG_NAME(OConnectionHelper) if (RET_OK == aSelector.Execute()) { setURLNoPrefix(aSelector.GetSelected()); - // checkCreateDatabase( ::dbaccess::DST_ADABAS); SetRoadmapStateValue(sal_True); callModifiedHdl(); } @@ -411,7 +396,7 @@ DBG_NAME(OConnectionHelper) aProfiles.insert(pArray[index]); - // excute the select dialog + // execute the select dialog ODatasourceSelectDialog aSelector(GetParent(), aProfiles, eType); ::rtl::OUString sOldProfile=getURLNoPrefix(); @@ -445,13 +430,13 @@ DBG_NAME(OConnectionHelper) void OConnectionHelper::impl_setURL( const String& _rURL, sal_Bool _bPrefix ) { String sURL( _rURL ); - DBG_ASSERT( m_pCollection, "OConnectionHelper::impl_setURL: have no interpreter for the URLs!" ); + OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_setURL: have no interpreter for the URLs!" ); if ( m_pCollection && sURL.Len() ) { if ( m_pCollection->isFileSystemBased( m_eType ) ) { - // get the tow parts: prefix and file URL + // get the two parts: prefix and file URL String sTypePrefix, sFileURLEncoded; if ( _bPrefix ) { @@ -491,13 +476,13 @@ DBG_NAME(OConnectionHelper) // get the pure text String sURL = _bPrefix ? m_aConnectionURL.GetText() : m_aConnectionURL.GetTextNoPrefix(); - DBG_ASSERT( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" ); + OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" ); if ( m_pCollection && sURL.Len() ) { if ( m_pCollection->isFileSystemBased( m_eType ) ) { - // get the tow parts: prefix and file URL + // get the two parts: prefix and file URL String sTypePrefix, sFileURLDecoded; if ( _bPrefix ) { @@ -589,7 +574,6 @@ DBG_NAME(OConnectionHelper) break; case RET_NO: - // SetRoadmapStateValue(sal_False); callModifiedHdl(); return RET_OK; @@ -658,7 +642,7 @@ DBG_NAME(OConnectionHelper) } catch(Exception&) { - DBG_ERROR("OConnectionHelper::getInstalledAdabasDBDirs: could not enumerate the adabas config files!"); + OSL_FAIL("OConnectionHelper::getInstalledAdabasDBDirs: could not enumerate the adabas config files!"); } } @@ -702,7 +686,7 @@ DBG_NAME(OConnectionHelper) } return aInstalledDBs; } - // #106016# ------------------------------------------------------------------- + // ----------------------------------------------------------------------------- IS_PATH_EXIST OConnectionHelper::pathExists(const ::rtl::OUString& _rURL, sal_Bool bIsFile) const { ::ucbhelper::Content aCheckExistence; @@ -747,7 +731,7 @@ DBG_NAME(OConnectionHelper) return 1L; // handled } break; - } // switch (_rNEvt.GetType()) + } } return OGenericAdministrationPage::PreNotify( _rNEvt ); @@ -768,7 +752,6 @@ DBG_NAME(OConnectionHelper) ::std::vector< ::rtl::OUString > aToBeCreated; // the to-be-created levels // search a level which exists - // #106016# --------------------- IS_PATH_EXIST eParentExists = PATH_NOT_EXIST; while ( eParentExists == PATH_NOT_EXIST && aParser.getSegmentCount()) { @@ -790,18 +773,18 @@ DBG_NAME(OConnectionHelper) ::rtl::OUString sContentType; if ( INET_PROT_FILE == eProtocol ) { - sContentType = ::rtl::OUString::createFromAscii( "application/vnd.sun.staroffice.fsys-folder" ); + sContentType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.staroffice.fsys-folder")); // the file UCP currently does not support the ContentType property } else { - Any aContentType = aParent.getPropertyValue( ::rtl::OUString::createFromAscii( "ContentType" ) ); + Any aContentType = aParent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")) ); aContentType >>= sContentType; } // the properties which need to be set on the new content Sequence< ::rtl::OUString > aNewDirectoryProperties(1); - aNewDirectoryProperties[0] = ::rtl::OUString::createFromAscii("Title"); + aNewDirectoryProperties[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); // the values to be set Sequence< Any > aNewDirectoryAttributes(1); @@ -861,7 +844,7 @@ DBG_NAME(OConnectionHelper) const ::dbaccess::DATASOURCE_TYPE eType = m_pCollection->determineType(m_eType); if ( ( ::dbaccess::DST_CALC == eType) || ( ::dbaccess::DST_MSACCESS == eType) || ( ::dbaccess::DST_MSACCESS_2007 == eType) ) - { // #106016# -------------------------- + { if( pathExists(sURL, sal_True) == PATH_NOT_EXIST ) { String sFile = String( ModuleRes( STR_FILE_DOES_NOT_EXIST ) ); @@ -914,3 +897,5 @@ DBG_NAME(OConnectionHelper) //......................................................................... } // namespace dbaui //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx index 94c2678f9714..cd1e491dfb6b 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,18 +29,10 @@ #ifndef DBAUI_CONNECTIONHELPER_HXX #define DBAUI_CONNECTIONHELPER_HXX -#ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" -#endif -#ifndef _UCBHELPER_CONTENT_HXX #include <ucbhelper/content.hxx> -#endif -#ifndef _DBAUI_CURLEDIT_HXX_ #include "curledit.hxx" -#endif -#ifndef _SFX_FILEDLGHELPER_HXX #include <sfx2/filedlghelper.hxx> -#endif #define FILL_STRING_ITEM(editcontrol, itemset, itemid, modifiedflag) \ @@ -54,7 +47,6 @@ namespace dbaui { //......................................................................... - // #106016# -------------- enum IS_PATH_EXIST { PATH_NOT_EXIST = 0, @@ -138,3 +130,5 @@ namespace dbaui //......................................................................... #endif // DBAUI_CONNECTIONHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 1ee072cf5c7a..96ed31cd2f09 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,147 +29,55 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_CONNECTIONPAGE_HXX #include "ConnectionPage.hxx" -#endif -#ifndef DBAUI_CONNECTIONPAGE_HRC #include "ConnectionPage.hrc" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef DBACCESS_DSMETA_HXX #include "dsmeta.hxx" -#endif -#ifndef _SFXITEMSET_HXX #include <svl/itemset.hxx> -#endif -#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX #include <unotools/pathoptions.hxx> -#endif -#ifndef _SFXSTRITEM_HXX #include <svl/stritem.hxx> -#endif -#ifndef _SFXENUMITEM_HXX #include <svl/eitem.hxx> -#endif -#ifndef _SFXINTITEM_HXX #include <svl/intitem.hxx> -#endif -#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX #include <unotools/moduleoptions.hxx> -#endif -#ifndef _DBAUI_DATASOURCEITEMS_HXX_ #include "dsitems.hxx" -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif -#ifndef _DBAUI_LOCALRESACCESS_HXX_ #include "localresaccess.hxx" -#endif -#ifndef _OSL_PROCESS_H_ #include <osl/process.h> -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _FILEDLGHELPER_HXX #include <sfx2/filedlghelper.hxx> -#endif -#ifndef _DBAUI_DBADMIN_HXX_ #include "dbadmin.hxx" -#endif -#ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> -#endif -#ifndef _VCL_STDTEXT_HXX #include <vcl/stdtext.hxx> -#endif -#ifndef _DBAUI_SQLMESSAGE_HXX_ #include "sqlmessage.hxx" -#endif -#ifndef _DBAUI_ODBC_CONFIG_HXX_ #include "odbcconfig.hxx" -#endif -#ifndef _DBAUI_DSSELECT_HXX_ #include "dsselect.hxx" -#endif -#ifndef SVTOOLS_FILENOTATION_HXX_ #include <svl/filenotation.hxx> -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef _COM_SUN_STAR_UI_DIALOGS_XFOLDERPICKER_HPP_ #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_ #include <com/sun/star/sdbc/XRow.hpp> -#endif -#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_ #include <com/sun/star/awt/XWindow.hpp> -#endif -// #106016# ------------------------------------ -#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_ #include <com/sun/star/task/XInteractionHandler.hpp> -#endif -#ifndef _COM_SUN_STAR_TASK_XPROGRESSHANDLER_HPP_ #include <com/sun/star/ucb/XProgressHandler.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ #include <com/sun/star/sdbc/XConnection.hpp> -#endif -#ifndef _COM_SUN_STAR_UI_DIALOGS_EXTENDEDFILEPICKERELEMENTIDS_HPP_ #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> -#endif -#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKERCONTROLACCESS_HPP_ #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_ #include <com/sun/star/ui/dialogs/XFilePicker.hpp> -#endif -#ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX #include <unotools/localfilehelper.hxx> -#endif -#ifndef _UNOTOOLS_UCBHELPER_HXX #include <unotools/ucbhelper.hxx> -#endif -#ifndef _UCBHELPER_COMMANDENVIRONMENT_HXX #include <ucbhelper/commandenvironment.hxx> -#endif -#ifndef DBAUI_FILEPICKER_INTERACTION_HXX #include "finteraction.hxx" -#endif -#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_ #include <connectivity/CommonTools.hxx> -#endif -#ifndef _URLOBJ_HXX #include <tools/urlobj.hxx> -#endif -#ifndef _SFX_DOCFILT_HACK_HXX #include <sfx2/docfilt.hxx> -#endif #include "dsnItem.hxx" #if defined(WNT) #define _ADO_DATALINK_BROWSE_ #endif #ifdef _ADO_DATALINK_BROWSE_ -#if defined( WNT ) - #include <tools/prewin.h> - #include <windows.h> - #include <tools/postwin.h> -#endif -#ifndef _SV_SYSDATA_HXX #include <vcl/sysdata.hxx> -#endif -#ifndef _DBAUI_ADO_DATALINK_HXX_ #include "adodatalinks.hxx" -#endif #endif //_ADO_DATALINK_BROWSE_ #include "AutoControlsDef.hrc" @@ -355,7 +264,7 @@ namespace dbaui m_aJavaDriver.SetText(sDefaultJdbcDriverName); m_aJavaDriver.SetModifyFlag(); } - } // if ( !pJdbcDrvItem->GetValue().Len() ) + } else m_aJavaDriver.SetText(pJdbcDrvItem->GetValue()); @@ -466,3 +375,4 @@ namespace dbaui } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx index 6406b9547427..bd0034a22a91 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,18 +29,10 @@ #ifndef DBAUI_CONNECTIONPAGE_HXX #define DBAUI_CONNECTIONPAGE_HXX -#ifndef DBAUI_CONNECTIONHELPER_HXX #include "ConnectionHelper.hxx" -#endif -#ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" -#endif -#ifndef _UCBHELPER_CONTENT_HXX #include <ucbhelper/content.hxx> -#endif -#ifndef _DBAUI_CURLEDIT_HXX_ #include "curledit.hxx" -#endif //......................................................................... namespace dbaui @@ -112,3 +105,5 @@ namespace dbaui //......................................................................... #endif // _DBAUI_DETAILPAGES_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/ConnectionPage.src b/dbaccess/source/ui/dlg/ConnectionPage.src index 33b70033b0f0..63c400b0a77a 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.src +++ b/dbaccess/source/ui/dlg/ConnectionPage.src @@ -55,10 +55,8 @@ TabPage PAGE_CONNECTION Text[ en-US ] = "General"; }; - AUTO_BROWSECONTROLGROUP( 6, UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS, PAGE_X, HID_DSADMIN_URL_GENERAL, HID_DSADMIN_BROWSECONN) - FixedText FT_NO_ADDITIONAL_SETTINGS { Hide = TRUE; @@ -67,7 +65,6 @@ TabPage PAGE_CONNECTION Size = MAP_APPFONT ( PAGE_X - 12 , 3*FIXEDTEXT_HEIGHT ) ; }; - FixedText FT_HOSTNAME { Hide = TRUE; @@ -76,7 +73,6 @@ TabPage PAGE_CONNECTION Text[ en-US ] = "~Host name"; }; - FixedLine FL_SEPARATOR2 { Pos = MAP_APPFONT ( 4 , 3*FIXEDTEXT_HEIGHT + 3*UNRELATED_CONTROLS + RELATED_CONTROLS ) ; @@ -90,6 +86,7 @@ TabPage PAGE_CONNECTION Size = MAP_APPFONT ( 90 - 12 , FIXEDTEXT_HEIGHT ) ; Text [ en-US ] = "~User name" ; }; + Edit ET_USERNAME { HelpID = "dbaccess:Edit:PAGE_CONNECTION:ET_USERNAME"; @@ -98,6 +95,7 @@ TabPage PAGE_CONNECTION Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; TabStop = TRUE ; }; + CheckBox CB_PASSWORD_REQUIRED { HelpID = "dbaccess:CheckBox:PAGE_CONNECTION:CB_PASSWORD_REQUIRED"; @@ -121,6 +119,7 @@ TabPage PAGE_CONNECTION Size = MAP_APPFONT ( 90 - 12 , FIXEDTEXT_HEIGHT ) ; Text [ en-US ] = "~JDBC driver class" ; }; + Edit ET_JDBCDRIVERCLASS { Border = TRUE ; @@ -189,4 +188,3 @@ String STR_MSACCESS_2007_FILTERNAME { Text [ en-US ] = "MS Access 2007 file"; }; - diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index ae86566ec210..1bfab47ead99 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_CONNECTIONPAGESETUP_HXX #include "ConnectionPageSetup.hxx" -#endif #include "AutoControlsDef.hrc" #include "dbadminsetup.hrc" #include "dbu_dlg.hrc" @@ -57,7 +56,6 @@ #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/awt/XWindow.hpp> -// #106016# ------------------------------------ #include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/sdbc/XConnection.hpp> @@ -204,7 +202,7 @@ namespace dbaui //{ // String sDisplayName = m_pCollection->getTypeDisplayName(m_eType); // FixedText* ppTextControls[] ={&m_aFT_Connection}; - // for (size_t i = 0; i < sizeof(ppTextControls)/sizeof(ppTextControls[0]); ++i) + // for (size_t i = 0; i < SAL_N_ELEMENTS(ppTextControls); ++i) // { // ppTextControls[i]->SetText(sDisplayName); // } @@ -243,3 +241,4 @@ namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index 01f25b1ac175..0fd31cf58101 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,37 +29,19 @@ #ifndef DBAUI_CONNECTIONPAGESETUP_HXX #define DBAUI_CONNECTIONPAGESETUP_HXX -#ifndef DBAUI_CONNECTIONHELPER_HXX #include "ConnectionHelper.hxx" -#endif -#ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" -#endif -#ifndef _UCBHELPER_CONTENT_HXX #include <ucbhelper/content.hxx> -#endif -#ifndef _DBAUI_CURLEDIT_HXX_ #include "curledit.hxx" -#endif -#ifndef _SV_FIELD_HXX #include <vcl/field.hxx> -#endif //......................................................................... namespace dbaui { //......................................................................... -/* // #106016# -------------- - enum IS_PATH_EXIST - { - PATH_NOT_EXIST = 0, - PATH_EXIST, - PATH_NOT_KNOWN - }; - */ class IDatabaseSettingsDialog; //========================================================================= @@ -115,3 +98,5 @@ namespace dbaui //......................................................................... #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 374d15ec3588..0253c97a1fba 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,76 +28,33 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_DBSETUPCONNECTIONPAGES_HXX #include "DBSetupConnectionPages.hxx" -#endif -#ifndef _DBAUI_SQLMESSAGE_HXX_ #include "sqlmessage.hxx" -#endif -#ifndef _DBU_RESOURCE_HRC_ #include "dbu_resource.hrc" -#endif #include "AutoControlsDef.hrc" -#ifndef _DBAUI_DBADMINSETUP_HRC_ #include "dbadminsetup.hrc" -#endif -#ifndef _SFXITEMSET_HXX #include <svl/itemset.hxx> -#endif -#ifndef _SFXSTRITEM_HXX #include <svl/stritem.hxx> -#endif -#ifndef _SFXENUMITEM_HXX #include <svl/eitem.hxx> -#endif -#ifndef _SFXINTITEM_HXX #include <svl/intitem.hxx> -#endif -#ifndef _DBAUI_DATASOURCEITEMS_HXX_ #include "dsitems.hxx" -#endif #include "dsnItem.hxx" -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif -#ifndef _DBAUI_LOCALRESACCESS_HXX_ #include "localresaccess.hxx" -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _SV_MNEMONIC_HXX #include <vcl/mnemonic.hxx> -#endif -#ifndef _SVTOOLS_CJKOPTIONS_HXX #include <svl/cjkoptions.hxx> -#endif #include <jvmaccess/virtualmachine.hxx> -#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_ #include <connectivity/CommonTools.hxx> -#endif -#ifndef DBAUI_DRIVERSETTINGS_HXX #include "DriverSettings.hxx" -#endif -#ifndef _DBAUI_DBADMIN_HXX_ #include "dbadmin.hxx" -#endif -#ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> -#endif -#ifndef _COM_SUN_STAR_UI_DIALOGS_XFOLDERPICKER_HPP_ #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> -#endif -// #106016# ------------------------------------ -#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_ #include <com/sun/star/task/XInteractionHandler.hpp> -#endif #include <com/sun/star/sdbc/XDriverAccess.hpp> #include "dbustrings.hrc" -#ifndef SVTOOLS_FILENOTATION_HXX_ #include <svl/filenotation.hxx> -#endif #include <unotools/localfilehelper.hxx> #include <unotools/ucbhelper.hxx> @@ -107,6 +65,7 @@ #include <unotools/pathoptions.hxx> #include <svtools/roadmapwizard.hxx> #include "TextConnectionHelper.hxx" +#include <osl/diagnose.h> //......................................................................... @@ -114,14 +73,6 @@ namespace dbaui { //......................................................................... using namespace ::com::sun::star; -// using namespace ::com::sun::star::ucb; -// using namespace ::com::sun::star::ui::dialogs; -// using namespace ::com::sun::star::sdbc; -// using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::lang; -// using namespace ::com::sun::star::container; -// using namespace ::dbtools; -// using namespace ::svt; OGenericAdministrationPage* OTextConnectionPageSetup::CreateTextTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { @@ -251,7 +202,7 @@ DBG_NAME(OTextConnectionPageSetup) ::dbaccess::ODsnTypeCollection* pCollection = NULL; if (pCollectionItem) pCollection = pCollectionItem->getCollection(); - DBG_ASSERT(pCollection, "OLDAPConnectionPageSetup::FillItemSet : really need a DSN type collection !"); + OSL_ENSURE(pCollection, "OLDAPConnectionPageSetup::FillItemSet : really need a DSN type collection !"); String sUrl = pCollection->getPrefix( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:ldap:"))); sUrl += m_aETHostServer.GetText(); @@ -259,7 +210,6 @@ DBG_NAME(OTextConnectionPageSetup) bChangedSomething = sal_True; } - // fillString(_rSet,&m_aETHostServer, DSID_CONNECTURL, bChangedSomething); fillBool(_rSet,&m_aCBUseSSL,DSID_CONN_LDAP_USESSL,bChangedSomething); return bChangedSomething; } @@ -385,7 +335,7 @@ DBG_NAME(OMySQLIntroPageSetup) // ----------------------------------------------------------------------- sal_Bool OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/) { - OSL_ENSURE(sal_False,"Who called me?! Please ask oj for more information."); + OSL_FAIL("Who called me?! Please ask oj for more information."); return sal_True; } @@ -705,8 +655,8 @@ DBG_NAME(OMySQLIntroPageSetup) { m_aETDriverClass.SetText(sDefaultJdbcDriverName); m_aETDriverClass.SetModifyFlag(); - } // if ( sDefaultJdbcDriverName.Len() ) - } // if ( !pJdbcDrvItem->GetValue().Len() ) + } + } else { m_aETDriverClass.SetText(pDrvItem->GetValue()); @@ -727,7 +677,6 @@ DBG_NAME(OMySQLIntroPageSetup) sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0); bEnableTestConnection = bEnableTestConnection && (m_aETDriverClass.GetText().Len() != 0); return bEnableTestConnection; -// m_aTestConnection.Enable(bEnableTestConnection); } @@ -943,7 +892,7 @@ DBG_NAME(OFinalDBPageSetup) Point aPos(m_aFTFinalHeader.GetPosPixel()); Size aStart(m_aFTFinalHeader.GetSizePixel()); aPos.Y() += aStart.Height() + nUnrelatedHeight; - sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); + sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); for (sal_Int32 i=0; i < nCount; ++i) { aPos.X() = pWindows[i].first->GetPosPixel().X(); @@ -1025,3 +974,5 @@ DBG_NAME(OFinalDBPageSetup) } // namespace dbaui //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx index 441bd61fd61d..00fe40ffbce1 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ #ifndef DBAUI_DBSETUPCONNECTIONPAGES_HXX #define DBAUI_DBSETUPCONNECTIONPAGES_HXX -#ifndef DBAUI_CONNECTIONPAGESETUP_HXX #include "ConnectionPageSetup.hxx" -#endif #include "adminpages.hxx" #include "admincontrols.hxx" @@ -49,7 +48,6 @@ namespace dbaui //......................................................................... class IDatabaseSettingsDialog; -// static OGenericAdministrationPage* CreateDbaseTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); //======================================================================== @@ -342,3 +340,5 @@ namespace dbaui //......................................................................... #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 852a5556415c..b3145475143b 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,15 +76,18 @@ #include <svl/stritem.hxx> #include <tools/urlobj.hxx> #include <tools/diagnose_ex.h> +#include <osl/diagnose.h> #include <typelib/typedescription.hxx> #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> #include <vcl/stdtext.hxx> #include <vcl/waitobj.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <algorithm> #include <functional> +#include <o3tl/compat_functional.hxx> + //......................................................................... namespace dbaui { @@ -109,7 +113,7 @@ namespace sal_Bool bCorrectType = sal_False; SfxItemPool* pPool = _rSet.GetPool(); - DBG_ASSERT( pPool, "implCheckItemType: invalid item pool!" ); + OSL_ENSURE( pPool, "implCheckItemType: invalid item pool!" ); if ( pPool ) { const SfxPoolItem& rDefItem = pPool->GetDefaultItem( _nId ); @@ -127,11 +131,11 @@ namespace } catch(Exception&) { - #ifdef DBG_UTIL + #if OSL_DEBUG_LEVEL > 0 ::rtl::OString sMessage("ODbAdminDialog::implTranslateProperty: could not set the property "); sMessage += ::rtl::OString(_rName.getStr(), _rName.getLength(), RTL_TEXTENCODING_ASCII_US); sMessage += ::rtl::OString("!"); - DBG_ERROR(sMessage.getStr()); + OSL_FAIL(sMessage.getStr()); #endif } @@ -208,18 +212,18 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_MAX_ROW_SCAN, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxRowScan" ) ) ) ); // special settings for adabas - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SHUTSERVICE, ::rtl::OUString::createFromAscii("ShutdownDatabase"))); - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_DATAINC, ::rtl::OUString::createFromAscii("DataCacheSizeIncrement"))); - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CACHESIZE, ::rtl::OUString::createFromAscii("DataCacheSize"))); - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLUSER, ::rtl::OUString::createFromAscii("ControlUser"))); - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLPWD, ::rtl::OUString::createFromAscii("ControlPassword"))); + m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SHUTSERVICE, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShutdownDatabase")))); + m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_DATAINC, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataCacheSizeIncrement")))); + m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CACHESIZE, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataCacheSize")))); + m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLUSER, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlUser")))); + m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLPWD, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlPassword")))); // extra settings for odbc m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_USECATALOG, INFO_USECATALOG)); // extra settings for a ldap address book m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_BASEDN, INFO_CONN_LDAP_BASEDN)); m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_ROWCOUNT, INFO_CONN_LDAP_ROWCOUNT)); - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_USESSL, ::rtl::OUString::createFromAscii("UseSSL"))); + m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_LDAP_USESSL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseSSL")))); m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_DOCUMENT_URL, PROPERTY_URL)); // oracle @@ -239,12 +243,12 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer ShowServiceNotAvailableError(_pParent->GetParent(), String(SERVICE_SDB_DATABASECONTEXT), sal_True); } - DBG_ASSERT(m_xDynamicContext.is(), "ODbAdminDialog::ODbAdminDialog : no XNamingService interface !"); + OSL_ENSURE(m_xDynamicContext.is(), "ODbAdminDialog::ODbAdminDialog : no XNamingService interface !"); } //------------------------------------------------------------------------- sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyValue >& _rDriverParam) { - DBG_ASSERT(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::getCurrentSettings : not to be called without an example set!"); + OSL_ENSURE(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::getCurrentSettings : not to be called without an example set!"); if (!m_pItemSetHelper->getOutputSet()) return sal_False; @@ -324,7 +328,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert // handle the request try { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // release the mutex when calling the handler, it may need to lock the SolarMutex xHandler->handle(xRequest); } @@ -357,7 +361,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert //------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::successfullyConnected() { - DBG_ASSERT(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::successfullyConnected: not to be called without an example set!"); + OSL_ENSURE(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::successfullyConnected: not to be called without an example set!"); if (!m_pItemSetHelper->getOutputSet()) return; @@ -423,7 +427,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::O try { xDriverManager = Reference< XDriverAccess >(getORB()->createInstance(SERVICE_SDBC_CONNECTIONPOOL), UNO_QUERY); - DBG_ASSERT(xDriverManager.is(), "ODbDataSourceAdministrationHelper::getDriver: could not instantiate the driver manager, or it does not provide the necessary interface!"); + OSL_ENSURE(xDriverManager.is(), "ODbDataSourceAdministrationHelper::getDriver: could not instantiate the driver manager, or it does not provide the necessary interface!"); } catch (Exception& e) { @@ -478,16 +482,16 @@ Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSourc } - DBG_ASSERT(m_xDatasource.is(), "ODbDataSourceAdministrationHelper::getCurrentDataSource: no data source!"); + OSL_ENSURE(m_xDatasource.is(), "ODbDataSourceAdministrationHelper::getCurrentDataSource: no data source!"); return m_xDatasource; } //------------------------------------------------------------------------- ::rtl::OUString ODbDataSourceAdministrationHelper::getDatasourceType( const SfxItemSet& _rSet ) { SFX_ITEMSET_GET( _rSet, pConnectURL, SfxStringItem, DSID_CONNECTURL, sal_True ); - DBG_ASSERT( pConnectURL , "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!" ); + OSL_ENSURE( pConnectURL , "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!" ); SFX_ITEMSET_GET(_rSet, pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True); - DBG_ASSERT(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!"); + OSL_ENSURE(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!"); ::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection(); return pCollection->getType(pConnectURL->GetValue()); } @@ -508,9 +512,9 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True); OSL_ENSURE(pUrlItem,"Connection URL is NULL. -> GPF!"); - DBG_ASSERT(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!"); + OSL_ENSURE(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!"); ::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection(); - DBG_ASSERT(pCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid type collection!"); + OSL_ENSURE(pCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid type collection!"); switch( pCollection->determineType(eType) ) { @@ -587,7 +591,6 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const break; case ::dbaccess::DST_LDAP: { - // SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pHostName, SfxStringItem, DSID_CONN_HOSTNAME, sal_True); SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pPortNumber, SfxInt32Item, DSID_CONN_LDAP_PORTNUMBER, sal_True); sNewUrl = pCollection->cutPrefix(pUrlItem->GetValue()); sNewUrl += lcl_createHostWithPort(NULL,pPortNumber); @@ -638,11 +641,11 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr } catch(Exception&) { -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 0 ::rtl::OString aMessage("ODbDataSourceAdministrationHelper::translateProperties: could not extract the property "); aMessage += ::rtl::OString(aDirect->second.getStr(), aDirect->second.getLength(), RTL_TEXTENCODING_ASCII_US); aMessage += ::rtl::OString("!"); - DBG_ERROR(aMessage.getStr()); + OSL_FAIL(aMessage.getStr()); #endif } // transfer it into an item @@ -665,7 +668,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr if (0 == pAdditionalInfo->Name.compareToAscii("JDBCDRV")) { // compatibility PropertyValue aCompatibility(*pAdditionalInfo); - aCompatibility.Name = ::rtl::OUString::createFromAscii("JavaDriverClass"); + aCompatibility.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("JavaDriverClass")); aInfos.insert(aCompatibility); } else @@ -701,14 +704,14 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr } catch(Exception&) { - OSL_ENSURE(0,"IsReadOnly throws an exception!"); + OSL_FAIL("IsReadOnly throws an exception!"); } } //------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _rSource, const Reference< XPropertySet >& _rxDest) { - DBG_ASSERT(_rxDest.is(), "ODbDataSourceAdministrationHelper::translateProperties: invalid property set!"); + OSL_ENSURE(_rxDest.is(), "ODbDataSourceAdministrationHelper::translateProperties: invalid property set!"); if (!_rxDest.is()) return; @@ -834,14 +837,13 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS // * are known as indirect properties // * but not relevant for the current data source type // These settings have to be removed: If they're not relevant, we have no UI for changing them. - // 25.06.2001 - 88004/87182 - frank.schoenheit@sun.com // for this, we need a string-controlled quick access to m_aIndirectPropTranslator StringSet aIndirectProps; ::std::transform(m_aIndirectPropTranslator.begin(), m_aIndirectPropTranslator.end(), ::std::insert_iterator<StringSet>(aIndirectProps,aIndirectProps.begin()), - ::std::select2nd<MapInt2String::value_type>()); + ::o3tl::select2nd<MapInt2String::value_type>()); // now check the to-be-preserved props ::std::vector< sal_Int32 > aRemoveIndexes; @@ -854,7 +856,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS { if (aIndirectProps.end() != aIndirectProps.find(aPreserved->second)) { -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 0 const ::rtl::OUString sName = aPreserved->second; #endif aRemoveIndexes.push_back(aPreserved->first - nPositionCorrector); @@ -868,7 +870,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS ++aRemoveIndex ) ::comphelper::removeElementAt(_rInfo, *aRemoveIndex); -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 0 const PropertyValue* pWhatsLeft = _rInfo.getConstArray(); const PropertyValue* pWhatsLeftEnd = pWhatsLeft + _rInfo.getLength(); for (; pWhatsLeft != pWhatsLeftEnd; ++pWhatsLeft) @@ -949,7 +951,7 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem* } else { - DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported item type!"); + OSL_FAIL("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported item type!"); return aValue; } @@ -961,7 +963,8 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< X Any aValue = implTranslateProperty(_pItem); lcl_putProperty(_rxSet, _rName,aValue); } -#ifdef DBG_UTIL + +#if OSL_DEBUG_LEVEL > 0 //------------------------------------------------------------------------- ::rtl::OString ODbDataSourceAdministrationHelper::translatePropertyId( sal_Int32 _nId ) { @@ -997,7 +1000,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet _rSet.Put(SfxStringItem(_nId, sValue.getStr())); } else { - DBG_ERROR( + OSL_FAIL( ( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) += ::rtl::OString( translatePropertyId( _nId ) ) += ::rtl::OString( " should be no string)!" ) @@ -1027,7 +1030,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet _rSet.Put( aItem ); } else { - DBG_ERROR( + OSL_FAIL( ( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) += ::rtl::OString( translatePropertyId( _nId ) ) += ::rtl::OString( " should be no boolean)!" ) @@ -1044,7 +1047,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet _rSet.Put( SfxInt32Item( _nId, nValue ) ); } else { - DBG_ERROR( + OSL_FAIL( ( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) += ::rtl::OString( translatePropertyId( _nId ) ) += ::rtl::OString( " should be no int)!" ) @@ -1060,7 +1063,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet TypeDescription aTD(_rValue.getValueType()); typelib_IndirectTypeDescription* pSequenceTD = reinterpret_cast< typelib_IndirectTypeDescription* >(aTD.get()); - DBG_ASSERT(pSequenceTD && pSequenceTD->pType, "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid sequence type!"); + OSL_ENSURE(pSequenceTD && pSequenceTD->pType, "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid sequence type!"); Type aElementType(pSequenceTD->pType); switch (aElementType.getTypeClass()) @@ -1073,11 +1076,11 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet } break; default: - DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!"); + OSL_FAIL("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!"); } } else { - DBG_ERROR( + OSL_FAIL( ( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) += ::rtl::OString( translatePropertyId( _nId ) ) += ::rtl::OString( " should be no string sequence)!" ) @@ -1091,7 +1094,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet break; default: - DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!"); + OSL_FAIL("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!"); } } @@ -1113,14 +1116,13 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest) SFX_ITEMSET_GET(_rDest, pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True); OSL_ENSURE(pUrlItem,"Connection URL is NULL. -> GPF!"); - DBG_ASSERT(pTypeCollection, "ODbAdminDialog::getDatasourceType: invalid items in the source set!"); + OSL_ENSURE(pTypeCollection, "ODbAdminDialog::getDatasourceType: invalid items in the source set!"); ::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection(); - DBG_ASSERT(pCollection, "ODbAdminDialog::getDatasourceType: invalid type collection!"); + OSL_ENSURE(pCollection, "ODbAdminDialog::getDatasourceType: invalid type collection!"); sal_uInt16 nPortNumberId = 0; sal_Int32 nPortNumber = -1; String sNewHostName; - //String sUrl = pCollection->cutPrefix(pUrlItem->GetValue()); String sUrlPart; pCollection->extractHostNamePort(pUrlItem->GetValue(),sUrlPart,sNewHostName,nPortNumber); @@ -1178,7 +1180,7 @@ sal_Bool ODbDataSourceAdministrationHelper::saveChanges(const SfxItemSet& _rSour // ----------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::setDataSourceOrName( const Any& _rDataSourceOrName ) { - DBG_ASSERT( !m_aDataSourceOrName.hasValue(), "ODbDataSourceAdministrationHelper::setDataSourceOrName: already have one!" ); + OSL_ENSURE( !m_aDataSourceOrName.hasValue(), "ODbDataSourceAdministrationHelper::setDataSourceOrName: already have one!" ); // hmm. We could reset m_xDatasource/m_xModel, probably, and continue working m_aDataSourceOrName = _rDataSourceOrName; } @@ -1219,3 +1221,4 @@ SfxPoolItem* DbuTypeCollectionItem::Clone(SfxItemPool* /*_pPool*/) const +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx index 4ed86867618e..2e4c2b251a53 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,39 +29,17 @@ #ifndef _DBAUI_DBADMINIMPL_HXX_ #define _DBAUI_DBADMINIMPL_HXX_ -#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_ #include <com/sun/star/uno/XNamingService.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include <com/sun/star/beans/PropertyValue.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ #include <com/sun/star/sdbc/XConnection.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XDRIVER_HPP_ #include <com/sun/star/sdbc/XDriver.hpp> -#endif -#ifndef _COMPHELPER_STLTYPES_HXX_ #include <comphelper/stl_types.hxx> -#endif -#ifndef _DBAUI_DSNTYPES_HXX_ #include "dsntypes.hxx" -#endif -#ifndef _SFXITEMSET_HXX #include <svl/itemset.hxx> -#endif -#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_ #include <com/sun/star/frame/XModel.hpp> -#endif #include <svl/poolitem.hxx> class Window; @@ -203,7 +182,7 @@ namespace dbaui */ sal_Bool hasAuthentication(const SfxItemSet& _rSet) const; -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 0 ::rtl::OString translatePropertyId( sal_Int32 _nId ); #endif }; @@ -214,3 +193,4 @@ namespace dbaui #endif // _DBAUI_DBADMINIMPL_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/DriverSettings.cxx b/dbaccess/source/ui/dlg/DriverSettings.cxx index 1544deb6c85f..aaa6b6379a7f 100644 --- a/dbaccess/source/ui/dlg/DriverSettings.cxx +++ b/dbaccess/source/ui/dlg/DriverSettings.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -114,3 +115,5 @@ void ODriversSettings::getSupportedIndirectSettings( const ::rtl::OUString& _sUR _out_rDetailsIds.push_back(pProps->first); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/DriverSettings.hxx b/dbaccess/source/ui/dlg/DriverSettings.hxx index c09977f276a7..13b4b50e5943 100644 --- a/dbaccess/source/ui/dlg/DriverSettings.hxx +++ b/dbaccess/source/ui/dlg/DriverSettings.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,9 +28,7 @@ #ifndef DBAUI_DRIVERSETTINGS_HXX #define DBAUI_DRIVERSETTINGS_HXX -#ifndef _DBAUI_DSNTYPES_HXX_ #include "dsntypes.hxx" -#endif #include <svl/poolitem.hxx> #include <vector> @@ -110,3 +109,4 @@ namespace dbaui #endif // DBAUI_DRIVERSETTINGS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx index c8f9240ed7b8..b5ef913b3c6d 100644 --- a/dbaccess/source/ui/dlg/RelationDlg.cxx +++ b/dbaccess/source/ui/dlg/RelationDlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,60 +28,25 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -//#ifndef _SVX_TABWIN_HXX -//#include "tabwin.hxx" -//#endif -#ifndef DBAUI_RELATIONDIALOG_HRC #include "RelationDlg.hrc" -#endif -#ifndef DBAUI_RELATIONDIALOG_HXX #include "RelationDlg.hxx" -#endif -#ifndef _WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> -#endif -#ifndef _SV_SVAPP_HXX //autogen #include <vcl/svapp.hxx> -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif -#ifndef _COM_SUN_STAR_SDBC_KEYRULE_HPP_ #include <com/sun/star/sdbc/KeyRule.hpp> -#endif -#ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef TOOLS_DIAGNOSE_EX_H #include <tools/diagnose_ex.h> -#endif -#ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef DBAUI_JOINDESIGNVIEW_HXX #include "JoinDesignView.hxx" -#endif -#ifndef DBAUI_JOINCONTROLLER_HXX #include "JoinController.hxx" -#endif -#ifndef _DBHELPER_DBEXCEPTION_HXX_ #include <connectivity/dbexception.hxx> -#endif -#ifndef DBAUI_RTABLECONNECTIONDATA_HXX #include "RTableConnectionData.hxx" -#endif -#ifndef DBAUI_RELATIONCONTROL_HXX #include "RelationControl.hxx" -#endif -#ifndef _CPPUHELPER_EXC_HLP_HXX_ #include <cppuhelper/exc_hlp.hxx> -#endif #include <algorithm> @@ -301,3 +267,4 @@ void ORelationDialog::notifyConnectionChange() // ----------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/RelationDlg.src b/dbaccess/source/ui/dlg/RelationDlg.src index 81e183e4b77b..90602e37c4a9 100644 --- a/dbaccess/source/ui/dlg/RelationDlg.src +++ b/dbaccess/source/ui/dlg/RelationDlg.src @@ -33,7 +33,6 @@ #endif #include "dbaccess_helpid.hrc" - ModalDialog DLG_REL_PROPERTIES { HelpID = "dbaccess:ModalDialog:DLG_REL_PROPERTIES"; @@ -44,7 +43,6 @@ ModalDialog DLG_REL_PROPERTIES Moveable = TRUE ; Closeable = TRUE ; - Window WND_CONTROL { Pos = MAP_APPFONT( 0, 0 ); @@ -87,9 +85,6 @@ ModalDialog DLG_REL_PROPERTIES }; }; - - - FixedLine FL_CASC_UPD { Pos = MAP_APPFONT ( 6 , 114 ) ; @@ -125,7 +120,6 @@ ModalDialog DLG_REL_PROPERTIES HelpId = HID_DLG_REL_CASC_UPD_DEFAULT ; Text [ en-US ] = "Set ~default" ; }; -// zweite FixedLine FixedLine FL_CASC_DEL { Pos = MAP_APPFONT ( 96 , 114 ) ; @@ -183,4 +177,3 @@ ModalDialog DLG_REL_PROPERTIES }; }; - diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx index 5ab742d5293c..b717b1384200 100644 --- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx +++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,25 +29,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_TABLESSINGLEDLG_HXX_ #include "TablesSingleDlg.hxx" -#endif -#ifndef _DBAUI_DBADMINIMPL_HXX_ #include "DbAdminImpl.hxx" -#endif -#ifndef _DBAUI_TABLESPAGE_HXX_ #include "tablespage.hxx" -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _DBAUI_DATASOURCEITEMS_HXX_ #include "dsitems.hxx" -#endif -#ifndef _DBAUI_PROPERTYSETITEM_HXX_ #include "propertysetitem.hxx" -#endif #include "dbu_dlg.hrc" @@ -148,3 +137,4 @@ SfxItemSet* OTableSubscriptionDialog::getWriteOutputSet() +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index d6cee59919e7..3213b324acb6 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,122 +27,53 @@ ************************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef DBAUI_TEXTCONNECTIONHELPER_HXX #include "TextConnectionHelper.hxx" -#endif -#ifndef _DBAUI_SQLMESSAGE_HXX_ #include "sqlmessage.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBU_RESOURCE_HRC_ #include "dbu_resource.hrc" -#endif #include "AutoControlsDef.hrc" -#ifndef _SFXITEMSET_HXX #include <svl/itemset.hxx> -#endif -#ifndef _SFXSTRITEM_HXX #include <svl/stritem.hxx> -#endif -#ifndef _SFXENUMITEM_HXX #include <svl/eitem.hxx> -#endif -#ifndef _SFXINTITEM_HXX #include <svl/intitem.hxx> -#endif -#ifndef _DBAUI_DATASOURCEITEMS_HXX_ #include "dsitems.hxx" -#endif -#ifndef _DBAUI_DBFINDEX_HXX_ #include "dbfindex.hxx" -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif -#ifndef _DBAUI_LOCALRESACCESS_HXX_ #include "localresaccess.hxx" -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _SV_MNEMONIC_HXX #include <vcl/mnemonic.hxx> -#endif -#ifndef _SVTOOLS_CJKOPTIONS_HXX #include <svl/cjkoptions.hxx> -#endif #include <jvmaccess/virtualmachine.hxx> -#ifndef _DBAUI_ADASTAT_HXX_ #include "AdabasStat.hxx" -#endif -#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_ #include <connectivity/CommonTools.hxx> -#endif -#ifndef DBAUI_DRIVERSETTINGS_HXX #include "DriverSettings.hxx" -#endif -#ifndef _DBAUI_DBADMIN_HXX_ #include "dbadmin.hxx" -#endif -#ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> -#endif -#ifndef _COM_SUN_STAR_UI_DIALOGS_XFOLDERPICKER_HPP_ #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> -#endif -// #106016# ------------------------------------ -#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_ #include <com/sun/star/task/XInteractionHandler.hpp> -#endif -#ifndef SVTOOLS_FILENOTATION_HXX_ #include <svl/filenotation.hxx> -#endif -#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX #include <unotools/localfilehelper.hxx> -#endif -#ifndef _UNOTOOLS_UCBHELPER_HXX #include <unotools/ucbhelper.hxx> -#endif -#ifndef _UCBHELPER_COMMANDENVIRONMENT_HXX #include <ucbhelper/commandenvironment.hxx> -#endif -#ifndef DBAUI_FILEPICKER_INTERACTION_HXX #include "finteraction.hxx" -#endif -#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_ #include <connectivity/CommonTools.hxx> -#endif -#ifndef DBAUI_DBSETUPCONNECTIONPAGES_HXX #include "DBSetupConnectionPages.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif -#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX #include <unotools/pathoptions.hxx> -#endif -#ifndef SVTOOLS_INC_ROADMAPWIZARD_HXX #include <svtools/roadmapwizard.hxx> -#endif namespace dbaui @@ -220,7 +152,7 @@ DBG_NAME(OTextConnectionHelper) { 0, NULL } }; - for ( size_t section=0; section < sizeof( aSections ) / sizeof( aSections[0] ) - 1; ++section ) + for ( size_t section=0; section < SAL_N_ELEMENTS( aSections ) - 1; ++section ) { if ( ( m_nAvailableSections & aSections[section].nFlag ) != 0 ) { @@ -402,9 +334,6 @@ DBG_NAME(OTextConnectionHelper) String sExtension = GetExtension(); String aErrorText; Control* pErrorWin = NULL; - // if (!m_aFieldSeparator.GetText().Len()) - // bug (#42168) if this line is compiled under OS2 (in a product environent) - // -> use a temporary variable String aDelText(m_aFieldSeparator.GetText()); if(!aDelText.Len()) { // Kein FeldTrenner @@ -613,3 +542,5 @@ DBG_NAME(OTextConnectionHelper) //......................................................................... } // namespace dbaui //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx index 911994553a4c..8c1d0aa0c0fd 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,33 +29,15 @@ #ifndef DBAUI_TEXTCONNECTIONHELPER_HXX #define DBAUI_TEXTCONNECTIONHELPER_HXX -#ifndef DBAUI_CONNECTIONPAGESETUP_HXX #include "ConnectionPageSetup.hxx" -#endif -#ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" -#endif -#ifndef CHARSETLISTBOX_HXX #include "charsetlistbox.hxx" -#endif -#ifndef _UCBHELPER_CONTENT_HXX #include <ucbhelper/content.hxx> -#endif -#ifndef _DBAUI_CURLEDIT_HXX_ #include "curledit.hxx" -#endif -#ifndef SVTOOLS_INC_ROADMAPWIZARD_HXX #include <svtools/roadmapwizard.hxx> -#endif -#ifndef _SV_FIELD_HXX #include <vcl/field.hxx> -#endif -#ifndef _RTL_USTRING_HXX_ #include <rtl/ustring.hxx> -#endif -#ifndef _SV_LSTBOX_HXX #include <vcl/lstbox.hxx> -#endif //......................................................................... @@ -138,3 +121,4 @@ namespace dbaui #endif // DBAUI_DBWIZ2_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index c38110da1ca0..05879d05df20 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,69 +29,27 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_USERADMIN_HXX #include "UserAdmin.hxx" -#endif -#ifndef DBAUI_USERADMIN_HRC #include "UserAdmin.hrc" -#endif -#ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> -#endif -#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_ #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XDATADEFINITIONSUPPLIER_HPP_ #include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XUSERSSUPPLIER_HPP_ #include <com/sun/star/sdbcx/XUsersSupplier.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_ #include <com/sun/star/sdbcx/XDrop.hpp> -#endif -#ifndef _UCBHELPER_INTERATIONREQUEST_HXX #include <ucbhelper/interactionrequest.hxx> -#endif -#ifndef _UCBHELPER_SIMPLEAUTHENTICATIONREQUEST_HXX #include <ucbhelper/simpleauthenticationrequest.hxx> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XDATADESCRIPTORFACTORY_HPP_ #include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XUSER_HPP_ #include <com/sun/star/sdbcx/XUser.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_ #include <com/sun/star/sdbcx/XAppend.hpp> -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef _DBAUI_DBADMIN_HXX_ #include "dbadmin.hxx" -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _SFX_PASSWD_HXX #include <sfx2/passwd.hxx> -#endif using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; @@ -391,3 +350,5 @@ void OUserAdmin::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx index 13700201a5c1..73458126dbb1 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.hxx +++ b/dbaccess/source/ui/dlg/UserAdmin.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,33 +28,15 @@ #ifndef DBAUI_USERADMIN_HXX #define DBAUI_USERADMIN_HXX -#ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> -#endif -#ifndef _SV_FIELD_HXX #include <vcl/field.hxx> -#endif -#ifndef _SV_LSTBOX_HXX #include <vcl/lstbox.hxx> -#endif -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef _SV_DIALOG_HXX #include <vcl/dialog.hxx> -#endif -#ifndef _SV_GROUP_HXX #include <vcl/group.hxx> -#endif -#ifndef DBAUI_TABLEGRANTCONTROL_HXX #include "TableGrantCtrl.hxx" -#endif -#ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" -#endif -#ifndef _COMPHELPER_UNO3_HXX_ #include <comphelper/uno3.hxx> -#endif FORWARD_DECLARE_INTERFACE(beans,XPropertySet) FORWARD_DECLARE_INTERFACE(sdbc,XConnection) @@ -105,3 +88,5 @@ public: }; } #endif // DBAUI_USERADMIN_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/UserAdmin.src b/dbaccess/source/ui/dlg/UserAdmin.src index 8d88dcf8f1ce..26dc60d0bf64 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.src +++ b/dbaccess/source/ui/dlg/UserAdmin.src @@ -71,7 +71,6 @@ TabPage TAB_PAGE_USERADMIN HelpId = HID_TAB_PAGE_LBUSER ; }; - PushButton PB_NEWUSER { Pos = MAP_APPFONT ( 12 , 29 ) ; @@ -150,7 +149,6 @@ ModalDialog DLG_PASSWORD Size = MAP_APPFONT ( WIN_X - 3 - 6 - 6 - 50 , 8 ) ; Text [ en-US ] = "User \"$name$: $\""; }; - FixedText FT_OLDPASSWORD { Pos = MAP_APPFONT ( 6 , 17 ) ; @@ -184,7 +182,7 @@ ModalDialog DLG_PASSWORD { Pos = MAP_APPFONT ( 6 , 52 ) ; Size = MAP_APPFONT ( FT_SIZE_X , 10 ) ; - Text [ en-US ] = "~Confirm password"; + Text [ en-US ] = "~Confirm password"; }; Edit ED_PASSWORD_REPEAT { @@ -218,28 +216,3 @@ String STR_ERROR_PASSWORDS_NOT_IDENTICAL { Text [ en-US ] = "The passwords do not match. Please enter the password again."; }; - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx index 68474ab64134..726a4ab70a10 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx +++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,11 +96,15 @@ DBG_NAME(OUserAdminDlg) OUserAdminDlg::~OUserAdminDlg() { if ( m_bOwnConnection ) + { try { ::comphelper::disposeComponent(m_xConnection); } - catch(Exception){} + catch(const Exception&) + { + } + } SetInputSet(NULL); DELETEZ(pExampleSet); @@ -118,12 +123,12 @@ DBG_NAME(OUserAdminDlg) throw SQLException(sError,NULL,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")) ,0,Any()); } } - catch(const SQLException& e) + catch(const SQLException&) { ::dbaui::showError( ::dbtools::SQLExceptionInfo( ::cppu::getCaughtException() ), GetParent(), getORB() ); return RET_CANCEL; } - catch( const Exception& ) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -204,3 +209,5 @@ DBG_NAME(OUserAdminDlg) //......................................................................... } // namespace dbaui //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.src b/dbaccess/source/ui/dlg/UserAdminDlg.src index d3a59a511deb..5b07b43093b5 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.src +++ b/dbaccess/source/ui/dlg/UserAdminDlg.src @@ -35,7 +35,6 @@ #include "dbu_dlg.hrc" #endif - TabDialog DLG_DATABASE_USERADMIN { OutputSize = TRUE ; diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx index 7038019c0dfd..d9c591f3221f 100755..100644 --- a/dbaccess/source/ui/dlg/admincontrols.cxx +++ b/dbaccess/source/ui/dlg/admincontrols.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -107,7 +108,7 @@ namespace dbaui break; default: - OSL_ENSURE( false, "TextResetOperator::operateOn: unexpected event ID!" ); + OSL_FAIL( "TextResetOperator::operateOn: unexpected event ID!" ); // all those IDs should have been filtered out by payAttentionTo break; } @@ -309,3 +310,5 @@ namespace dbaui //........................................................................ } // namespace dbaui //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx index 70ee08d5ca28..83353be4b8d0 100755..100644 --- a/dbaccess/source/ui/dlg/admincontrols.hxx +++ b/dbaccess/source/ui/dlg/admincontrols.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -80,3 +81,5 @@ namespace dbaui //........................................................................ #endif // DBACCESS_ADMINCONTROLS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/admincontrols.src b/dbaccess/source/ui/dlg/admincontrols.src index 8ce3bb4030dc..8ce3bb4030dc 100755..100644 --- a/dbaccess/source/ui/dlg/admincontrols.src +++ b/dbaccess/source/ui/dlg/admincontrols.src diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 93f1850b37e8..d65c2ff8d572 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -162,7 +163,7 @@ namespace dbaui else { aEnumeration.getDatasourceNames(aOdbcDatasources); - // excute the select dialog + // execute the select dialog ODatasourceSelectDialog aSelector(GetParent(), aOdbcDatasources, false); if (_sCurr.getLength()) aSelector.Select(_sCurr); @@ -352,3 +353,4 @@ namespace dbaui } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index c3773b8109cd..51fd7f025965 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,24 +29,12 @@ #ifndef _DBAUI_ADMINPAGES_HXX_ #define _DBAUI_ADMINPAGES_HXX_ -#ifndef _SFXTABDLG_HXX #include <sfx2/tabdlg.hxx> -#endif -#ifndef _DBAUI_DSNTYPES_HXX_ #include "dsntypes.hxx" -#endif -#ifndef _DBAUI_COMMON_TYPES_HXX_ #include "commontypes.hxx" -#endif -#ifndef _SVTOOLS_WIZARDMACHINE_HXX_ #include <svtools/wizardmachine.hxx> -#endif -#ifndef _SV_FIELD_HXX #include <vcl/field.hxx> -#endif -#ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> -#endif class NumericField; @@ -162,7 +151,7 @@ namespace dbaui @param _sReturn <OUT/> contains the selected name. @return - <FALSE/> if an error occured, otherwise <TRUE/> + <FALSE/> if an error occurred, otherwise <TRUE/> */ sal_Bool getSelectedDataSource(::rtl::OUString& _sReturn,::rtl::OUString& _sCurr); @@ -301,3 +290,4 @@ namespace dbaui #endif // _DBAUI_ADMINPAGES_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index 18bca9f0e31e..7fc484ad4c56 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,9 +45,7 @@ #include <adoid.h> // needed for CLSID_CADOConnection #include <adoint.h> // needed for ADOConnection -#ifndef _DBAUI_ADO_DATALINK_HXX_ #include "adodatalinks.hxx" -#endif BSTR PromptEdit(long hWnd,BSTR connstr); BSTR PromptNew(long hWnd); @@ -209,3 +208,5 @@ BSTR PromptEdit(long hWnd,BSTR connstr) return _result; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/adodatalinks.hxx b/dbaccess/source/ui/dlg/adodatalinks.hxx index 2084bb850402..e5f299e7a7be 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.hxx +++ b/dbaccess/source/ui/dlg/adodatalinks.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,12 +29,9 @@ #ifndef _DBAUI_ADO_DATALINK_HXX_ #define _DBAUI_ADO_DATALINK_HXX_ -#ifndef _OSL_MODULE_H_ #include <osl/module.h> -#endif -#ifndef _DBAUI_COMMON_TYPES_HXX_ #include "commontypes.hxx" -#endif ::rtl::OUString getAdoDatalink(long hWnd,::rtl::OUString& oldLink); #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index b47d2182489a..fa16813dd8fa 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -189,7 +190,7 @@ void TableListFacade::updateTableObjectList( bool _bAllowViews ) m_pContainerListener = new ::comphelper::OContainerListenerAdapter(this,xContainer); } sTables = xTables->getElementNames(); - } // if ( xTables.is() ) + } xViewSupp.set( xTableSupp, UNO_QUERY ); if ( xViewSupp.is() ) @@ -297,13 +298,10 @@ void QueryListFacade::updateTableObjectList( bool /*_bAllowViews*/ ) try { ImageProvider aImageProvider( m_xConnection ); - Image aQueryImage( aImageProvider.getDefaultImage( DatabaseObject::QUERY, false ) ); - Image aQueryImageHC( aImageProvider.getDefaultImage( DatabaseObject::QUERY, true ) ); + Image aQueryImage( aImageProvider.getDefaultImage( DatabaseObject::QUERY ) ); - m_rQueryList.SetDefaultExpandedEntryBmp( aQueryImage, BMP_COLOR_NORMAL ); - m_rQueryList.SetDefaultCollapsedEntryBmp( aQueryImage, BMP_COLOR_NORMAL ); - m_rQueryList.SetDefaultExpandedEntryBmp( aQueryImageHC, BMP_COLOR_HIGHCONTRAST ); - m_rQueryList.SetDefaultCollapsedEntryBmp( aQueryImageHC, BMP_COLOR_HIGHCONTRAST ); + m_rQueryList.SetDefaultExpandedEntryBmp( aQueryImage ); + m_rQueryList.SetDefaultCollapsedEntryBmp( aQueryImage ); Reference< XQueriesSupplier > xSuppQueries( m_xConnection, UNO_QUERY_THROW ); Reference< XNameAccess > xQueries( xSuppQueries->getQueries(), UNO_QUERY_THROW ); @@ -531,3 +529,4 @@ String OAddTableDlg::getDialogTitleForContext( IAddTableDialogContext& _rContext // ----------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/adtabdlg.src b/dbaccess/source/ui/dlg/adtabdlg.src index 7a36bddb378f..deb914dd831d 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.src +++ b/dbaccess/source/ui/dlg/adtabdlg.src @@ -69,6 +69,7 @@ ModelessDialog DLG_JOIN_TABADD Hide = TRUE; Group = TRUE; }; + PushButton PB_ADDTABLE { HelpID = "dbaccess:PushButton:DLG_JOIN_TABADD:PB_ADDTABLE"; @@ -78,6 +79,7 @@ ModelessDialog DLG_JOIN_TABADD TabStop = TRUE ; DefButton = TRUE ; }; + CancelButton PB_CLOSE { Pos = MAP_APPFONT ( 123 , 22 ) ; @@ -86,6 +88,7 @@ ModelessDialog DLG_JOIN_TABADD Text [ en-US ] = "~Close" ; TabStop = TRUE ; }; + HelpButton PB_HELP { Pos = MAP_APPFONT ( 123 , 43 ) ; diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 1f251f517329..4b8d244fb03b 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -313,7 +314,7 @@ namespace dbaui aValue = PTR_CAST( OptionalBoolItem, pItem )->GetFullValue(); } else - DBG_ERROR( "SpecialSettingsPage::implInitControls: unknown boolean item type!" ); + OSL_FAIL( "SpecialSettingsPage::implInitControls: unknown boolean item type!" ); if ( !aValue ) { @@ -602,3 +603,5 @@ namespace dbaui //........................................................................ } // namespace dbaui //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx index e3a70f98c509..3b29d4ba15ad 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hxx +++ b/dbaccess/source/ui/dlg/advancedsettings.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -154,3 +155,5 @@ namespace dbaui //........................................................................ #endif // DBACCESS_ADVANCEDSETTINGS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index cbe3b35cddfe..c77d2aa133cb 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -148,7 +149,6 @@ void ODbAdminDialog::impl_selectDataSource(const ::com::sun::star::uno::Any& _aD { case ::dbaccess::DST_DBASE: addDetailPage(PAGE_DBASE, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateDbase); - // bResetPasswordRequired = sal_True; break; case ::dbaccess::DST_ADO: @@ -157,7 +157,6 @@ void ODbAdminDialog::impl_selectDataSource(const ::com::sun::star::uno::Any& _aD case ::dbaccess::DST_FLAT: addDetailPage(PAGE_TEXT, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateText); - // bResetPasswordRequired = sal_True; break; case ::dbaccess::DST_ODBC: @@ -414,7 +413,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp *pCounter++ = new SfxBoolItem( DSID_RESPECTRESULTSETTYPE,sal_False ); // create the pool - static SfxItemInfo __READONLY_DATA aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] = + static SfxItemInfo const aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] = { {0,0}, {0,0}, @@ -479,7 +478,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp {0,0} }; - OSL_ENSURE(sizeof(aItemInfos)/sizeof(aItemInfos[0]) == DSID_LAST_ITEM_ID,"Invalid Ids!"); + OSL_ENSURE(SAL_N_ELEMENTS(aItemInfos) == DSID_LAST_ITEM_ID,"Invalid Ids!"); _rpPool = new SfxItemPool(String::CreateFromAscii("DSAItemPool"), DSID_FIRST_ITEM_ID, DSID_LAST_ITEM_ID, aItemInfos, _rppDefaults); _rpPool->FreezeIdRanges(); @@ -517,3 +516,4 @@ void ODbAdminDialog::destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src index f16edc83a761..d3a356fc95bf 100644 --- a/dbaccess/source/ui/dlg/dbadmin.src +++ b/dbaccess/source/ui/dlg/dbadmin.src @@ -82,7 +82,6 @@ Pos = MAP_APPFONT ( EDIT_X , AUTO_Y ) ; \ Size = MAP_APPFONT ( 97 , EDIT_HEIGHT ) ; \ }; \ - \ FixedText FT_PORTNUMBER \ { \ Pos = MAP_APPFONT ( 6 , AUTO_Y + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + 2 ) ; \ @@ -336,7 +335,7 @@ TabPage PAGE_DBASE WordBreak = TRUE; Pos = MAP_APPFONT ( 6 , 3*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + CHECKBOX_HEIGHT) ; Size = MAP_APPFONT ( PAGE_X - 12 , 2*FIXEDTEXT_HEIGHT ) ; - Text [ en-US ] = "Note: When deleted, and thus inactive, records are displayed, you will not be able to delete records from the data source." ; + Text [ en-US ] = "Note: When deleted, and thus inactive, records are displayed, you will not be able to delete records from the data source." ; }; PushButton PB_INDICIES @@ -743,8 +742,8 @@ TabPage PAGE_TEXT HelpId = HID_DSADMIN_PAGE_TEXT; AUTO_SEPARATORCONTROLGROUP(UNRELATED_CONTROLS, PAGE_X) - }; + //......................................................................... TabPage PAGE_USERDRIVER { diff --git a/dbaccess/source/ui/dlg/dbadmin2.src b/dbaccess/source/ui/dlg/dbadmin2.src index 76cfebb8dcb0..44ef3f024e3a 100644 --- a/dbaccess/source/ui/dlg/dbadmin2.src +++ b/dbaccess/source/ui/dlg/dbadmin2.src @@ -62,6 +62,11 @@ String STR_COULD_NOT_CREATE_DIRECTORY Text [ en-US ] = "The directory $name$ could not be created."; }; + + + + + #define EDIT_SIZE_X 50 #define FT_SIZE_X 90 #define WIN_X 220 @@ -147,4 +152,3 @@ TabPage PAGE_TABLESUBSCRIPTION Text [ en-US ] = "Mark the tables that should be visible for the applications."; }; }; - diff --git a/dbaccess/source/ui/dlg/dbadminsetup.hrc b/dbaccess/source/ui/dlg/dbadminsetup.hrc index b53e12425af7..7d6757951089 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.hrc +++ b/dbaccess/source/ui/dlg/dbadminsetup.hrc @@ -72,7 +72,6 @@ #define STR_DEFAULTLDAPPORTNUMBER 60 #define STR_ADABASNAME 61 -//#define STR_ADOURL 62 #define STR_ODBCDATASOURCENAME 63 #define STR_SPREADSHEETPATH 64 #define STR_DBLOCATIONLABEL 65 diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src index 4d6812143598..ea4341914e82 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.src +++ b/dbaccess/source/ui/dlg/dbadminsetup.src @@ -141,7 +141,6 @@ ModalDialog DLG_DATABASE_WIZARD }; }; - String STR_DATABASEDEFAULTNAME { Text[ en-US ] = "New Database" ; @@ -164,7 +163,6 @@ TabPage PAGE_DBWIZARD_MYSQL_INTRO WordBreak = TRUE; }; - FixedText FT_MYSQL_HELPTEXT { Pos = MAP_APPFONT (START_X , 27 ) ; @@ -203,7 +201,6 @@ TabPage PAGE_DBWIZARD_MYSQL_INTRO Text[ en-US ] = "Connect directly" ; Hide = TRUE ; }; - }; #define AUTHENTEDIT_X (EDIT_X - 10) @@ -224,7 +221,6 @@ TabPage PAGE_DBWIZARD_AUTHENTIFICATION WordBreak = TRUE; }; - FixedText FT_AUTHENTIFICATIONHELPTEXT\ { Pos = MAP_APPFONT (START_X , 27 ) ; @@ -263,7 +259,6 @@ TabPage PAGE_DBWIZARD_AUTHENTIFICATION Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; Text[ en-US ] = "~Test Connection" ; }; - }; @@ -275,7 +270,6 @@ TabPage PAGE_DBWIZARD_FINAL Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; Hide = TRUE ; - FixedText FT_FINALHEADER { Pos = MAP_APPFONT ( START_X , 8 ) ; @@ -292,7 +286,6 @@ TabPage PAGE_DBWIZARD_FINAL WordBreak = TRUE ; }; - RadioButton RB_REGISTERDATASOURCE { HelpId = HID_PAGE_DBWIZARD_FINAL_RB_REGISTERDATASOURCE; @@ -302,7 +295,6 @@ TabPage PAGE_DBWIZARD_FINAL Text[ en-US ] = "~Yes, register the database for me" ; }; - RadioButton RB_DONTREGISTERDATASOURCE { HelpId = HID_PAGE_DBWIZARD_FINAL_RB_DONTREGISTERDATASOURCE ; @@ -352,7 +344,6 @@ TabPage PAGE_DBWIZARD_MYSQL_JDBC Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; Hide = TRUE ; - String STR_MYSQLJDBC_HEADERTEXT { Text[ en-US ] = "Set up connection to a MySQL database using JDBC" ; @@ -416,7 +407,6 @@ TabPage PAGE_DBWIZARD_DBASE Text[ en-US ] = "Set up a connection to dBASE files" ; }; - String STR_DBASE_HELPTEXT { Text[ en-US ] = "Select the folder where the dBASE files are stored." ; @@ -425,34 +415,27 @@ TabPage PAGE_DBWIZARD_DBASE AUTO_HELP_BROWSECONTROLGROUP( 3, HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION,HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION) }; - TabPage PAGE_DBWIZARD_TEXT { HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_TEXT"; - String STR_TEXT_HEADERTEXT { Text[ en-US ] = "Set up a connection to text files" ; }; - String STR_TEXT_HELPTEXT { Text[ en-US ] = "Select the folder where the CSV (Comma Separated Values) text files are stored. %PRODUCTNAME Base will open these files in read-only mode." ; }; - String STR_TEXT_PATH_OR_FILE{ Text[ en-US ] = "Path to text files"; }; - AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE,HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE) AUTO_SEPARATORCONTROLGROUP(82, WIZARD_PAGE_X) }; - - TabPage PAGE_DBWIZARD_MSACCESS { HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MSACCESS"; @@ -466,17 +449,14 @@ TabPage PAGE_DBWIZARD_MSACCESS Text[ en-US ] = "Set up a connection to a Microsoft Access database" ; }; - String STR_MSACCESS_HELPTEXT { Text[ en-US ] = "Please select the Microsoft Access file you want to access."; }; AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_MSACCESS_ET_MSACCESSLOCATION, HID_PAGE_DBWIZARD_MSACCESS_PB_MSACCESSLOCATION) -// FT_MSACCESS_MDB_FILE }; - TabPage PAGE_DBWIZARD_LDAP { HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_LDAP"; @@ -493,7 +473,6 @@ TabPage PAGE_DBWIZARD_LDAP WordBreak = TRUE; }; - FixedText FT_LDAP_HELPTEXT { Pos = MAP_APPFONT (START_X , 27 ) ; @@ -518,7 +497,6 @@ TabPage PAGE_DBWIZARD_LDAP }; }; - TabPage PAGE_DBWIZARD_ADABAS { HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADABAS"; @@ -532,7 +510,6 @@ TabPage PAGE_DBWIZARD_ADABAS Text[ en-US ] = "Set up a connection to an Adabas D database" ; }; - String STR_ADABAS_HELPTEXT{ 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." ; }; @@ -540,7 +517,6 @@ TabPage PAGE_DBWIZARD_ADABAS AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME, HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME) }; - TabPage PAGE_DBWIZARD_ADO { HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADO"; @@ -559,7 +535,6 @@ TabPage PAGE_DBWIZARD_ADO }; AUTO_HELP_BROWSECONTROLGROUP(5, HID_PAGE_DBWIZARD_ADO_ET_ADOURL, HID_PAGE_DBWIZARD_ADO_PB_ADOURL) - }; @@ -594,8 +569,6 @@ TabPage PAGE_DBWIZARD_USERDEFINED AUTO_HELP_BROWSECONTROLGROUP(6, HID_PAGE_DBWIZARD_USERDEFINED_ET_BROWSE, HID_PAGE_DBWIZARD_USERDEFINED_BROWSE) }; - - TabPage PAGE_DBWIZARD_JDBC { HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_JDBC"; @@ -637,12 +610,10 @@ TabPage PAGE_DBWIZARD_ORACLE Text[ en-US ] = "Default: 1521" ; }; - String STR_ORACLE_DRIVERCLASSTEXT{ Text [ en-US ] = "Oracle JDBC ~driver class"; }; - String STR_ORACLE_HELPTEXT{ 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." ; }; @@ -664,12 +635,10 @@ TabPage PAGE_DBWIZARD_SPREADSHEET Text[ en-US ] = "Set up a connection to spreadsheets"; }; - String STR_SPREADSHEET_HELPTEXT{ Text[ en-US ] = "Click 'Browse...' to select a %PRODUCTNAME spreadsheet or Microsoft Excel workbook.\n%PRODUCTNAME will open this file in read-only mode." ; }; - AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_SPREADSHEET_ET_SPREADSHEETPATH,HID_PAGE_DBWIZARD_SPREADSHEET_PB_SPREADSHEETPATH ) String STR_SPREADSHEETPATH{ @@ -685,5 +654,3 @@ TabPage PAGE_DBWIZARD_SPREADSHEET Text[ en-US ] = "~Password required" ; }; }; - - diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 99cf4bdf95fa..464aba52b7df 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,43 +29,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_DBFINDEX_HXX_ #include "dbfindex.hxx" -#endif -#ifndef _CONFIG_HXX #include <tools/config.hxx> -#endif -#ifndef _SFXAPP_HXX //autogen #include <sfx2/app.hxx> -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBAUI_DBF_INDEXES_HRC_ #include "dbfindex.hrc" -#endif -#ifndef _TOOLS_DEBUG_HXX -#include <tools/debug.hxx> -#endif -#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX +#include <osl/diagnose.h> #include <unotools/localfilehelper.hxx> -#endif -#ifndef _URLOBJ_HXX #include <tools/urlobj.hxx> -#endif -#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX #include <unotools/pathoptions.hxx> -#endif -#ifndef _UCBHELPER_CONTENT_HXX #include <ucbhelper/content.hxx> -#endif -#ifndef SVTOOLS_FILENOTATION_HXX_ #include <svl/filenotation.hxx> -#endif //......................................................................... @@ -117,12 +94,6 @@ ODbaseIndexDialog::ODbaseIndexDialog( Window * pParent, String aDataSrcName ) Init(); SetCtrls(); FreeResource(); - - // set Hi contrast bitmaps - aIB_Add.SetModeImage( ModuleRes(IMG_ONE_LEFT_H),BMP_COLOR_HIGHCONTRAST); - aIB_AddAll.SetModeImage( ModuleRes(IMG_ALL_LEFT_H),BMP_COLOR_HIGHCONTRAST); - aIB_Remove.SetModeImage( ModuleRes(IMG_ONE_RIGHT_H),BMP_COLOR_HIGHCONTRAST); - aIB_RemoveAll.SetModeImage( ModuleRes(IMG_ALL_RIGHT_H),BMP_COLOR_HIGHCONTRAST); } //------------------------------------------------------------------------- @@ -195,7 +166,7 @@ OTableIndex ODbaseIndexDialog::implRemoveIndex(const String& _rName, TableIndexL } (void)_bMustExist; - DBG_ASSERT(!_bMustExist || (aSearch != _rList.end()), "ODbaseIndexDialog::implRemoveIndex : did not find the index!"); + OSL_ENSURE(!_bMustExist || (aSearch != _rList.end()), "ODbaseIndexDialog::implRemoveIndex : did not find the index!"); return aReturn; } @@ -377,8 +348,8 @@ void ODbaseIndexDialog::Init() Sequence< ::rtl::OUString> aFolderContent( ::utl::LocalFileHelper::GetFolderContents(m_aDSN,bFolder)); - ::rtl::OUString aIndexExt = ::rtl::OUString::createFromAscii("ndx"); - ::rtl::OUString aTableExt = ::rtl::OUString::createFromAscii("dbf"); + ::rtl::OUString aIndexExt(RTL_CONSTASCII_USTRINGPARAM("ndx")); + ::rtl::OUString aTableExt(RTL_CONSTASCII_USTRINGPARAM("dbf")); ::std::vector< String > aUsedIndexes; @@ -564,7 +535,7 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const try { ::ucbhelper::Content aContent(aURL.GetURLNoPass(),Reference<XCommandEnvironment>()); - aContent.executeCommand( rtl::OUString::createFromAscii( "delete" ),makeAny( sal_Bool( sal_True ) ) ); + aContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),makeAny( sal_Bool( sal_True ) ) ); } catch (const Exception& e ) { @@ -572,7 +543,6 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const // simply silent this. The strange algorithm here does a lot of things even if no files at all were // created or accessed, so it's possible that the file we're trying to delete does not even exist, // and this is a valid condition. - // 2003-05-15 - #109677# - fs@openoffice.org } } } @@ -581,3 +551,4 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx index 28e80aac5963..c10b2362027b 100644 --- a/dbaccess/source/ui/dlg/dbfindex.hxx +++ b/dbaccess/source/ui/dlg/dbfindex.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,27 +29,15 @@ #ifndef _DBAUI_DBFINDEX_HXX_ #define _DBAUI_DBFINDEX_HXX_ -#ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> -#endif -#ifndef _BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif -#ifndef _COMBOBOX_HXX //autogen #include <vcl/combobox.hxx> -#endif -#ifndef _LSTBOX_HXX //autogen #include <vcl/lstbox.hxx> -#endif -#ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> -#endif #ifndef __SGI_STL_LIST #include <list> #endif -#ifndef _COMPHELPER_STLTYPES_HXX_ #include <comphelper/stl_types.hxx> -#endif //......................................................................... namespace dbaui @@ -164,3 +153,4 @@ public: #endif // _DBAUI_DBFINDEX_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbfindex.src b/dbaccess/source/ui/dlg/dbfindex.src index 83ce7090c195..ca8b6e4a3622 100644 --- a/dbaccess/source/ui/dlg/dbfindex.src +++ b/dbaccess/source/ui/dlg/dbfindex.src @@ -35,62 +35,6 @@ #define WIN_X 264 #define WIN_Y 149 -Image IMG_ONE_LEFT_H -{ - ImageBitmap = Bitmap - { - File = "one_left_h.bmp" ; - }; - MaskColor = Color - { - Red = 0xFFFF ; - Green = 0x0000 ; - Blue = 0xFFFF ; - }; -}; - -Image IMG_ALL_LEFT_H -{ - ImageBitmap = Bitmap - { - File = "all_left_h.bmp" ; - }; - MaskColor = Color - { - Red = 0xFFFF ; - Green = 0x0000 ; - Blue = 0xFFFF ; - }; -}; - -Image IMG_ONE_RIGHT_H -{ - ImageBitmap = Bitmap - { - File = "one_right_h.bmp" ; - }; - MaskColor = Color - { - Red = 0xFFFF ; - Green = 0x0000 ; - Blue = 0xFFFF ; - }; -}; - -Image IMG_ALL_RIGHT_H -{ - ImageBitmap = Bitmap - { - File = "all_right_h.bmp" ; - }; - MaskColor = Color - { - Red = 0xFFFF ; - Green = 0x0000 ; - Blue = 0xFFFF ; - }; -}; - ModalDialog DLG_DBASE_INDEXES { HelpID = "dbaccess:ModalDialog:DLG_DBASE_INDEXES"; @@ -180,7 +124,7 @@ ModalDialog DLG_DBASE_INDEXES { ImageBitmap = Bitmap { - File = "one_left.bmp" ; + File = "one_left.png" ; }; MaskColor = Color { @@ -200,7 +144,7 @@ ModalDialog DLG_DBASE_INDEXES { ImageBitmap = Bitmap { - File = "all_left.bmp" ; + File = "all_left.png" ; }; MaskColor = Color { @@ -220,7 +164,7 @@ ModalDialog DLG_DBASE_INDEXES { ImageBitmap = Bitmap { - File = "one_right.bmp" ; + File = "one_right.png" ; }; MaskColor = Color { @@ -240,7 +184,7 @@ ModalDialog DLG_DBASE_INDEXES { ImageBitmap = Bitmap { - File = "all_right.bmp" ; + File = "all_right.png" ; }; MaskColor = Color { @@ -250,5 +194,4 @@ ModalDialog DLG_DBASE_INDEXES }; }; }; - }; diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index e909ae107053..0fb8484f5f8b 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,64 +29,26 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_DBWIZ_HXX #include "dbwiz.hxx" -#endif -#ifndef _DBAUI_DBADMIN_HRC_ #include "dbadmin.hrc" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBAUI_DATASOURCEITEMS_HXX_ #include "dsitems.hxx" -#endif #include "dsnItem.hxx" -#ifndef _SFXSTRITEM_HXX #include <svl/stritem.hxx> -#endif -#ifndef _SFXENUMITEM_HXX #include <svl/eitem.hxx> -#endif -#ifndef _SFXINTITEM_HXX #include <svl/intitem.hxx> -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" -#endif -#ifndef _DBAUI_GENERALPAGE_HXX_ #include "generalpage.hxx" -#endif -#ifndef _DBAUI_LOCALRESACCESS_HXX_ #include "localresaccess.hxx" -#endif -#ifndef _DBAUI_STRINGLISTITEM_HXX_ #include "stringlistitem.hxx" -#endif -#ifndef _DBAUI_PROPERTYSETITEM_HXX_ #include "propertysetitem.hxx" -#endif -#ifndef _UNOTOOLS_CONFIGNODE_HXX_ #include <unotools/confignode.hxx> -#endif -#ifndef DBAUI_CONNECTIONPAGE_HXX #include "ConnectionPage.hxx" -#endif -#ifndef DBAUI_DRIVERSETTINGS_HXX #include "DriverSettings.hxx" -#endif -#ifndef _DBAUI_DBADMINIMPL_HXX_ #include "DbAdminImpl.hxx" -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif //......................................................................... namespace dbaui @@ -347,7 +310,7 @@ TabPage* ODbTypeWizDialog::createPage(WizardState _nState) pPage = ODriversSettings::CreateUser(this,*m_pOutSet); break; default: - OSL_ENSURE(0,"Wrong state!"); + OSL_FAIL("Wrong state!"); break; } @@ -384,7 +347,7 @@ void ODbTypeWizDialog::enableConfirmSettings( bool _bEnable ) { enableButtons( WZB_FINISH, _bEnable ); // TODO: - // this is hacky. At the moment, this method is used in only one case (#b6532894#). + // this is hacky. At the moment, this method is used in only one case. // As soon as it is to be used more wide-spread, we should find a proper concept // for enabling both the Next and Finish buttons, depending on the current page state. // Plus, the concept must also care for the case where those pages are embedded into @@ -419,3 +382,5 @@ sal_Bool ODbTypeWizDialog::onFinish() //......................................................................... } // namespace dbaui //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 4c9c2c6470f4..07793cea5c19 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,63 +61,25 @@ #include <cppuhelper/exc_hlp.hxx> /** === begin UNO includes === **/ -#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_ #include <com/sun/star/frame/XStorable.hpp> -#endif -#ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_ #include <com/sun/star/uno/XNamingService.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_ #include <com/sun/star/sdbcx/XTablesSupplier.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_ #include <com/sun/star/sdbc/XDataSource.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_SDB_XDOCUMENTDATASOURCE_HPP_ #include <com/sun/star/sdb/XDocumentDataSource.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_ #include <com/sun/star/frame/FrameSearchFlag.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_ #include <com/sun/star/frame/XComponentLoader.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_ #include <com/sun/star/frame/XModel.hpp> -#endif -#ifndef _COM_SUN_STAR_UCB_XSIMPLEFILEACCESS_HPP_ #include <com/sun/star/ucb/XSimpleFileAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_TASK_XJOBEXECUTOR_HPP_ #include <com/sun/star/task/XJobExecutor.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_ #include <com/sun/star/lang/XInitialization.hpp> -#endif -#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_ #include <com/sun/star/sdb/CommandType.hpp> -#endif -#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP_ #include <com/sun/star/ucb/InteractiveIOException.hpp> -#endif -#ifndef _COM_SUN_STAR_IO_IOEXCEPTION_HPP_ #include <com/sun/star/io/IOException.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XTERMINATELISTENER_HPP_ #include <com/sun/star/frame/XTerminateListener.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_ #include <com/sun/star/frame/XDesktop.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XDRIVERACCESS_HPP_ #include <com/sun/star/sdbc/XDriverAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_DOCUMENT_MACROEXECMODE_HPP_ #include <com/sun/star/document/MacroExecMode.hpp> -#endif #include <com/sun/star/ucb/IOErrorCode.hpp> #include <com/sun/star/task/XInteractionHandler2.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> @@ -129,6 +92,7 @@ #include <comphelper/namedvaluecollection.hxx> #include <comphelper/sequenceashashmap.hxx> #include <tools/diagnose_ex.h> +#include <osl/diagnose.h> #include <connectivity/DriversConfig.hxx> #include <memory> @@ -160,40 +124,8 @@ using namespace ::cppu; #define START_PAGE 0 #define CONNECTION_PAGE 1 - - - -//#define DBASE_PATH 1 -//#define TEXT_PATH 2 -//#define MSACCESS_PATH 3 -//#define LDAP_PATH 4 -//#define ADABAS_PATH 5 -//#define ADO_PATH 6 -//#define JDBC_PATH 7 -//#define ORACLE_PATH 8 -//#define MYSQL_JDBC_PATH 9 -//#define MYSQL_ODBC_PATH 10 -//#define ODBC_PATH 11 -//#define SPREADSHEET_PATH 12 -//#define OUTLOOKEXP_PATH 13 -//#define OUTLOOK_PATH 14 -//#define MOZILLA_PATH 15 -//#define EVOLUTION_PATH 16 -//#define EVOLUTION_PATH_GROUPWISE 17 -//#define EVOLUTION_PATH_LDAP 18 -//#define KAB_PATH 19 -//#define MACAB_PATH 20 -//#define THUNDERBIRD_PATH 21 -//#define CREATENEW_PATH 22 -//#define USERDEFINED_PATH 23 -//#define OPEN_DOC_PATH 24 -//#define MSACCESS2007_PATH 25 -//#define MYSQL_NATIVE_PATH 26 - OFinalDBPageSetup* pFinalPage; - - DBG_NAME(ODbTypeWizDialogSetup) //========================================================================= //= ODbTypeWizDialogSetup @@ -240,7 +172,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); - DBG_ASSERT(m_pCollection, "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : really need a DSN type collection !"); + OSL_ENSURE(m_pCollection, "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : really need a DSN type collection !"); FreeResource(); @@ -250,7 +182,6 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() ); m_pImpl->translateProperties(xDatasource, *m_pOutSet); -// eType = m_pImpl->getDatasourceType(*m_pOutSet); SetPageSizePixel(LogicToPixel(::Size(WIZARD_PAGE_X, WIZARD_PAGE_Y), MAP_APPFONT)); ShowButtonFixedLine(sal_True); @@ -298,7 +229,7 @@ void ODbTypeWizDialogSetup::declareAuthDepPath( const ::rtl::OUString& _sURL, Pa { if ( bHasAuthentication || ( *aIter != PAGE_DBSETUPWIZARD_AUTHENTIFICATION ) ) aPath.push_back( *aIter ); - } // for(;aIter != aEnd;++aIter) + } // call base method ::svt::RoadmapWizard::declarePath( _nPathId, aPath ); @@ -428,7 +359,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath() { sal_Int32 nCreateNewDBIndex = m_pCollection->getIndexOf( m_pCollection->getEmbeddedDatabase() ); if ( nCreateNewDBIndex == -1 ) - nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString::createFromAscii( "sdbc:dbase:" ) ); + nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")) ); OSL_ENSURE( nCreateNewDBIndex != -1, "ODbTypeWizDialogSetup::activateDatabasePath: the GeneralPage should have prevented this!" ); activatePath( static_cast< PathId >( nCreateNewDBIndex + 1 ), sal_True ); @@ -457,7 +388,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath() } break; default: - DBG_ERROR( "ODbTypeWizDialogSetup::activateDatabasePath: unknown creation mode!" ); + OSL_FAIL( "ODbTypeWizDialogSetup::activateDatabasePath: unknown creation mode!" ); } enableButtons( WZB_NEXT, m_pGeneralPage->GetDatabaseCreationMode() != OGeneralPage::eOpenExisting ); @@ -724,7 +655,7 @@ IMPL_LINK(ODbTypeWizDialogSetup, ImplClickHdl, OMySQLIntroPageSetup*, _pMySQLInt case OMySQLIntroPageSetup::VIA_NATIVE: sURLPrefix = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:mysql:mysqlc:")); break; - } // switch( _pMySQLIntroPageSetup->getMySQLMode() ) + } activatePath( static_cast<PathId>(m_pCollection->getIndexOf(sURLPrefix) + 1), sal_True); return sal_True; } @@ -795,7 +726,7 @@ sal_Bool ODbTypeWizDialogSetup::leaveState(WizardState _nState) // ----------------------------------------------------------------------------- void ODbTypeWizDialogSetup::setTitle(const ::rtl::OUString& /*_sTitle*/) { - DBG_ERROR( "ODbTypeWizDialogSetup::setTitle: not implemented!" ); + OSL_FAIL( "ODbTypeWizDialogSetup::setTitle: not implemented!" ); // why? } @@ -929,15 +860,13 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } else if ( m_pCollection->isFileSystemBased(eType) ) { - Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" )), UNO_QUERY); + Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))), UNO_QUERY); INetURLObject aDBPathURL(m_sWorkPath); aDBPathURL.Append(m_aDocURL.getBase()); createUniqueFolderName(&aDBPathURL); ::rtl::OUString sPrefix = eType; sUrl = aDBPathURL.GetMainURL( INetURLObject::NO_DECODE); xSimpleFileAccess->createFolder(sUrl); - //OFileNotation aFileNotation(sUrl); - //sUrl = aFileNotation.get(OFileNotation::N_SYSTEM); sUrl = sPrefix.concat(sUrl); } m_pOutSet->Put(SfxStringItem(DSID_CONNECTURL, sUrl)); @@ -998,7 +927,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() //------------------------------------------------------------------------- void ODbTypeWizDialogSetup::createUniqueFolderName(INetURLObject* pURL) { - Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" )), UNO_QUERY); + Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))), UNO_QUERY); :: rtl::OUString sLastSegmentName = pURL->getName(); sal_Bool bFolderExists = sal_True; sal_Int32 i = 1; @@ -1016,7 +945,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() //------------------------------------------------------------------------- String ODbTypeWizDialogSetup::createUniqueFileName(const INetURLObject& _rURL) { - Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" )), UNO_QUERY); + Reference< XSimpleFileAccess > xSimpleFileAccess(getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))), UNO_QUERY); :: rtl::OUString sFilename = _rURL.getName(); ::rtl::OUString BaseName = _rURL.getBase(); ::rtl::OUString sExtension = _rURL.getExtension(); @@ -1207,3 +1136,4 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index e5e968396490..a1050a603d33 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,46 +43,20 @@ #include "dbu_dlg.hrc" #include "dbadmin.hrc" -#ifndef _SFXITEMSET_HXX #include <svl/itemset.hxx> -#endif -#ifndef _SFXSTRITEM_HXX #include <svl/stritem.hxx> -#endif -#ifndef _SFXENUMITEM_HXX #include <svl/eitem.hxx> -#endif -#ifndef _SFXINTITEM_HXX #include <svl/intitem.hxx> -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _SV_MNEMONIC_HXX #include <vcl/mnemonic.hxx> -#endif -#ifndef _SVTOOLS_CJKOPTIONS_HXX #include <svl/cjkoptions.hxx> -#endif #include <jvmaccess/virtualmachine.hxx> -#ifndef DBAUI_ADABASPAGE_HRC #include "AdabasPage.hrc" -#endif -#ifndef _DBAUI_ADASTAT_HXX_ #include "AdabasStat.hxx" -#endif -#ifndef _CONNECTIVITY_COMMONTOOLS_HXX_ #include <connectivity/CommonTools.hxx> -#endif -#ifndef DBAUI_DRIVERSETTINGS_HXX #include "DriverSettings.hxx" -#endif -#ifndef _DBAUI_DBADMIN_HXX_ #include "dbadmin.hxx" -#endif -#ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> -#endif #include "AutoControlsDef.hrc" //......................................................................... @@ -139,7 +114,7 @@ namespace dbaui m_pAutoIncrementLabel, m_pAutoIncrement, m_pAutoRetrievingLabel, m_pAutoRetrieving }; - sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); + sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); for (sal_Int32 i=1; i < nCount; ++i) { if ( pWindows[i] ) @@ -392,7 +367,7 @@ namespace dbaui ,m_pOptionsLabel,m_pOptions,&m_aUseCatalog }; - sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); + sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); for (sal_Int32 i=1; i < nCount; ++i) pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); } @@ -573,7 +548,7 @@ namespace dbaui &m_aFTDriverClass, &m_aEDDriverClass,&m_aTestJavaDriver, m_pCharsetLabel, m_pCharset}; - sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); + sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); for (sal_Int32 i=1; i < nCount; ++i) pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); @@ -705,7 +680,7 @@ namespace dbaui Window* pWindows[] = { &m_aMySQLSettings, &m_aSeparator2, &m_aUserNameLabel, &m_aUserName, &m_aPasswordRequired, m_pCharsetLabel, m_pCharset}; - sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); + sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); for (sal_Int32 i=1; i < nCount; ++i) pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); @@ -845,7 +820,7 @@ namespace dbaui ,&m_CB_SHUTDB ,m_pCharsetLabel, m_pCharset,&m_PB_STAT}; - sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]); + sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); for (sal_Int32 i=1; i < nCount; ++i) pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); } @@ -1149,3 +1124,5 @@ namespace dbaui //......................................................................... } // namespace dbaui //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index 2e7b90cd00ab..6d48d2fd2711 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,33 +29,15 @@ #ifndef _DBAUI_DETAILPAGES_HXX_ #define _DBAUI_DETAILPAGES_HXX_ -#ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" -#endif -#ifndef _DBAUI_CHARSETS_HXX_ #include "charsets.hxx" -#endif -#ifndef CHARSETLISTBOX_HXX #include "charsetlistbox.hxx" -#endif -#ifndef _SV_FIELD_HXX #include <vcl/field.hxx> -#endif -#ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> -#endif -#ifndef _SV_LSTBOX_HXX #include <vcl/lstbox.hxx> -#endif -#ifndef _SV_EDIT_HXX #include <vcl/edit.hxx> -#endif -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef DBAUI_TEXTCONNECTIONHELPER_HXX #include "TextConnectionHelper.hxx" -#endif #include "admincontrols.hxx" #include <svtools/dialogcontrolling.hxx> @@ -386,3 +369,5 @@ namespace dbaui //......................................................................... #endif // _DBAUI_DETAILPAGES_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 30d0e669687b..96541a21da17 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,33 +29,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBACCESS_UI_DIRECTSQL_HXX_ #include "directsql.hxx" -#endif -#ifndef _DBACCESS_UI_DIRECTSQL_HRC_ #include "directsql.hrc" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _SV_SVAPP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _VOS_MUTEX_HXX_ -#include <vos/mutex.hxx> -#endif -#ifndef TOOLS_DIAGNOSE_EX_H +#include <osl/mutex.hxx> #include <tools/diagnose_ex.h> -#endif //........................................................................ namespace dbaui @@ -151,7 +134,7 @@ DBG_NAME(DirectSQLDialog) //-------------------------------------------------------------------- void DirectSQLDialog::_disposing( const EventObject& _rSource ) { - ::vos::OGuard aSolarGuard(Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard(m_aMutex); OSL_ENSURE(Reference< XConnection >(_rSource.Source, UNO_QUERY).get() == m_xConnection.get(), @@ -325,7 +308,7 @@ DBG_NAME(DirectSQLDialog) m_aSQL.SetSelection(Selection(sStatement.Len(), sStatement.Len())); } else - OSL_ENSURE(sal_False, "DirectSQLDialog::switchToHistory: invalid position!"); + OSL_FAIL("DirectSQLDialog::switchToHistory: invalid position!"); } //-------------------------------------------------------------------- @@ -365,3 +348,4 @@ DBG_NAME(DirectSQLDialog) } // namespace dbaui //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/directsql.src b/dbaccess/source/ui/dlg/directsql.src index cdde8fca5ed6..5428535c365a 100644 --- a/dbaccess/source/ui/dlg/directsql.src +++ b/dbaccess/source/ui/dlg/directsql.src @@ -137,4 +137,3 @@ String STR_DIRECTSQL_CONNECTIONLOST { Text [ en-US ] = "The connection to the database has been lost. This dialog will be closed."; }; - diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx index 143433837c2d..414853448b79 100644 --- a/dbaccess/source/ui/dlg/dlgattr.cxx +++ b/dbaccess/source/ui/dlg/dlgattr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,54 +30,23 @@ #include "precompiled_dbui.hxx" -#ifndef DBAUI_SBATTRDLG_HXX #include "dlgattr.hxx" -#endif -#ifndef _SFXTABDLG_HXX //autogen #include <sfx2/tabdlg.hxx> -#endif -#ifndef _SVX_NUMINF_HXX //autogen #include <svx/numinf.hxx> -#endif -//CHINA001 #ifndef _SVX_CHARDLG_HXX //autogen -//CHINA001 #include <svx/chardlg.hxx> -//CHINA001 #endif - -//CHINA001 #ifndef _SVX_NUMFMT_HXX //autogen -//CHINA001 #include <svx/numfmt.hxx> -//CHINA001 #endif -#ifndef _SVX_NUMINF_HXX #include <svx/numinf.hxx> -#endif - -//CHINA001 #ifndef _SVX_ALIGN_HXX //autogen -//CHINA001 #include <svx/align.hxx> -//CHINA001 #endif -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _SFXITEMSET_HXX #include <svl/itemset.hxx> -#endif #define _ZFORLIST_DECLARE_TABLE -#ifndef _ZFORLIST_HXX #include <svl/zforlist.hxx> -#endif -#include <svx/svxids.hrc> //CHINA001 -#include <svx/flagsdef.hxx> //CHINA001 -#ifndef _SFXINTITEM_HXX //CHINA001 -#include <svl/intitem.hxx> //CHINA001 -#endif //CHINA001 -#ifndef _DBAUI_MODULE_DBU_HXX_ +#include <svx/svxids.hrc> +#include <svx/flagsdef.hxx> +#include <svl/intitem.hxx> #include "moduledbu.hxx" -#endif using namespace dbaui; DBG_NAME(SbaSbAttrDlg) @@ -93,13 +63,12 @@ SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumb SetText(aTitle); if( nFlags & TP_ATTR_CHAR ) { -// AddTabPage( RID_SVXPAGE_CHAR_STD,String(ModuleRes(TP_ATTR_CHAR)),SvxCharStdPage::Create, 0 ); - DBG_ERROR( "found flag TP_ATTR_CHAR" ); + OSL_FAIL( "found flag TP_ATTR_CHAR" ); } if( nFlags & TP_ATTR_NUMBER ) - AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)) ); //CHINA001 AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)),SvxNumberFormatTabPage::Create, 0 ); + AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)) ); if( nFlags & TP_ATTR_ALIGN ) - AddTabPage( RID_SVXPAGE_ALIGNMENT,String(ModuleRes(TP_ATTR_ALIGN)) );//CHINA001 AddTabPage( RID_SVXPAGE_ALIGNMENT,String(ModuleRes(TP_ATTR_ALIGN)),SvxAlignmentTabPage::Create, 0 ); + AddTabPage( RID_SVXPAGE_ALIGNMENT,String(ModuleRes(TP_ATTR_ALIGN)) ); FreeResource(); } @@ -119,8 +88,6 @@ void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) { case RID_SVXPAGE_NUMBERFORMAT: { - //CHINA001 ((SvxNumberFormatTabPage&)rTabPage). - //CHINA001 SetNumberFormatList( *pNumberInfoItem ); aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), (const sal_uInt16)SID_ATTR_NUMBERFORMAT_INFO)); rTabPage.PageCreated(aSet); } @@ -128,15 +95,11 @@ void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) case RID_SVXPAGE_CHAR_STD: { - // ((SvxCharStdPage&)rTabPage).SetFontList(SBA_MOD_EXT()->FontListItem()); } break; case RID_SVXPAGE_ALIGNMENT: { - //CHINA001 ((SvxAlignmentTabPage&)rTabPage).SetFlags(WBA_NO_ORIENTATION|WBA_NO_LINEBREAK|WBA_NO_GRIDLINES|WBA_NO_VERTICAL|WBA_NO_LEFTINDENT); -// aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, WBA_NO_ORIENTATION|WBA_NO_LINEBREAK|WBA_NO_GRIDLINES|WBA_NO_VERTICAL|WBA_NO_LEFTINDENT)); -// rTabPage.PageCreated(aSet); } break; @@ -146,3 +109,4 @@ void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dlgattr.src b/dbaccess/source/ui/dlg/dlgattr.src index 8dce0835aa69..4ed8c1c5644a 100644 --- a/dbaccess/source/ui/dlg/dlgattr.src +++ b/dbaccess/source/ui/dlg/dlgattr.src @@ -36,6 +36,7 @@ #ifndef DBAUI_SBATTRDLG_HRC #include "dlgattr.hrc" #endif + //================================================ // Der Attributdialog: TabDialog DLG_ATTR @@ -73,7 +74,6 @@ TabDialog DLG_ATTR }; String TP_ATTR_CHAR { - /* ### ACHTUNG: Neuer Text in Resource? Schrift : Zeichen */ Text [ en-US ] = "Font" ; }; String TP_ATTR_NUMBER @@ -89,34 +89,3 @@ TabDialog DLG_ATTR Text [ en-US ] = "Table Format" ; }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index 3c6bb87c757e..4a7bdf349505 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,66 +29,26 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_DLGSAVE_HXX #include "dlgsave.hxx" -#endif -#ifndef DBAUI_DLGSAVE_HRC #include "dlgsave.hrc" -#endif -#ifndef _SV_MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_ #include <com/sun/star/sdb/CommandType.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_ #include <com/sun/star/sdbc/XRow.hpp> -#endif -#ifndef _DBAUI_SQLMESSAGE_HXX_ #include "sqlmessage.hxx" -#endif -#ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include <connectivity/dbtools.hxx> -#endif -#ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif -#ifndef DBAUI_SQLNAMEEDIT_HXX #include "SqlNameEdit.hxx" -#endif -#ifndef _BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif -#ifndef _FIXED_HXX //autogen #include <vcl/fixed.hxx> -#endif -#ifndef _EDIT_HXX //autogen #include <vcl/edit.hxx> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMEACCESS_HPP_ #include <com/sun/star/container/XHierarchicalNameAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_ #include <com/sun/star/sdbc/XDatabaseMetaData.hpp> -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef DBACCESS_SOURCE_UI_INC_OBJECTNAMECHECK_HXX #include "objectnamecheck.hxx" -#endif -#ifndef TOOLS_DIAGNOSE_EX_H #include <tools/diagnose_ex.h> -#endif using namespace dbaui; @@ -348,7 +309,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent, break; default: - OSL_ENSURE( false, "OSaveAsDlg::OSaveAsDlg: Type not supported yet!" ); + OSL_FAIL( "OSaveAsDlg::OSaveAsDlg: Type not supported yet!" ); } implInit(); @@ -484,3 +445,4 @@ String OSaveAsDlg::getName() const { return m_pImpl->m_aName; } String OSaveAsDlg::getCatalog() const { return m_pImpl->m_aCatalog.IsVisible() ? m_pImpl->m_aCatalog.GetText() : String(); } String OSaveAsDlg::getSchema() const { return m_pImpl->m_aSchema.IsVisible() ? m_pImpl->m_aSchema.GetText() : String(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dlgsave.src b/dbaccess/source/ui/dlg/dlgsave.src index 802f88d0869a..bc94b77eee37 100644 --- a/dbaccess/source/ui/dlg/dlgsave.src +++ b/dbaccess/source/ui/dlg/dlgsave.src @@ -141,4 +141,3 @@ ModalDialog DLG_SAVE_AS Text [ en-US ] = "Insert as"; }; }; - diff --git a/dbaccess/source/ui/dlg/dlgsize.cxx b/dbaccess/source/ui/dlg/dlgsize.cxx index 10bbac679b32..089b70a6d3e3 100644 --- a/dbaccess/source/ui/dlg/dlgsize.cxx +++ b/dbaccess/source/ui/dlg/dlgsize.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,18 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_DLGSIZE_HRC #include "dlgsize.hrc" -#endif -#ifndef _DBAUI_DLGSIZE_HXX #include "dlgsize.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif //......................................................................... namespace dbaui @@ -128,3 +121,4 @@ IMPL_LINK( DlgSize, CbClickHdl, Button *, pButton ) //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dlgsize.src b/dbaccess/source/ui/dlg/dlgsize.src index ea2a97d5910c..556c53974c9a 100644 --- a/dbaccess/source/ui/dlg/dlgsize.src +++ b/dbaccess/source/ui/dlg/dlgsize.src @@ -149,34 +149,3 @@ ModalDialog DLG_COLWIDTH }; Text [ en-US ] = "Column Width" ; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dbaccess/source/ui/dlg/dsnItem.hxx b/dbaccess/source/ui/dlg/dsnItem.hxx index ac66e4386bf9..a3b542a1d4f6 100644 --- a/dbaccess/source/ui/dlg/dsnItem.hxx +++ b/dbaccess/source/ui/dlg/dsnItem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,4 @@ namespace dbaui #endif // _DBAUI_DSNITEM_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx index 0851fddb5249..9f6dfda58a97 100644 --- a/dbaccess/source/ui/dlg/dsselect.cxx +++ b/dbaccess/source/ui/dlg/dsselect.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,70 +29,29 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_DSSELECT_HXX_ #include "dsselect.hxx" -#endif -#ifndef _DBAUI_DSSELECT_HRC_ #include "dsselect.hrc" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _DBAUI_LOCALRESACCESS_HXX_ #include "localresaccess.hxx" -#endif -#ifndef _TOOLS_RCID_H #include <tools/rcid.h> -#endif +#include <sal/macros.h> -#ifndef _COM_SUN_STAR_SDBCX_XCREATECATALOG_HPP_ #include <com/sun/star/sdbcx/XCreateCatalog.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_ #include <com/sun/star/beans/XPropertySetInfo.hpp> -#endif -#ifndef _COM_SUN_STAR_UI_DIALOGS_XEXECUTABLEDIALOG_HPP_ #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> -#endif -#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_ #include <com/sun/star/awt/XWindow.hpp> -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/helper/vclunohelper.hxx> -#endif -#ifndef _COMPHELPER_EXTRACT_HXX_ #include <comphelper/extract.hxx> -#endif -#ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> -#endif -#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ #include <comphelper/processfactory.hxx> -#endif -#ifndef _DBAUI_DATASOURCEITEMS_HXX_ #include "dsitems.hxx" -#endif -#ifndef _SFXSTRITEM_HXX #include <svl/stritem.hxx> -#endif -#ifndef _SFXINTITEM_HXX #include <svl/intitem.hxx> -#endif -#ifndef _SFXENUMITEM_HXX #include <svl/eitem.hxx> -#endif -#ifndef _SFXITEMSET_HXX #include <svl/itemset.hxx> -#endif //......................................................................... namespace dbaui @@ -141,7 +101,7 @@ ODatasourceSelectDialog::ODatasourceSelectDialog(Window* _pParent, const StringB // move the buttons PushButton* pButtons[] = { &m_aOk, &m_aCancel, &m_aHelp ,&m_aCreateAdabasDB}; - for (size_t i=0; i<sizeof(pButtons)/sizeof(pButtons[0]); ++i) + for (size_t i=0; i < SAL_N_ELEMENTS(pButtons); ++i) { Point aOldPos = pButtons[i]->GetPosPixel(); pButtons[i]->SetPosPixel(Point(aOldPos.X() - nLostPixels, aOldPos.Y())); @@ -189,7 +149,7 @@ IMPL_LINK( ODatasourceSelectDialog, CreateDBClickHdl, PushButton*, /*pButton*/ ) if ( xCatalog.is() && m_pOutputSet ) { Sequence< Any > aArgs(2); - aArgs[0] <<= PropertyValue(::rtl::OUString::createFromAscii("CreateCatalog"), 0,makeAny(xCatalog) , PropertyState_DIRECT_VALUE); + aArgs[0] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateCatalog")), 0, makeAny(xCatalog), PropertyState_DIRECT_VALUE); aArgs[1] <<= PropertyValue(PROPERTY_PARENTWINDOW, 0, makeAny(VCLUnoHelper::GetInterface(this)), PropertyState_DIRECT_VALUE); Reference< XExecutableDialog > xDialog( @@ -316,3 +276,4 @@ void ODatasourceSelectDialog::fillListBox(const StringBag& _rDatasources) } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx index 93509a044d45..34050aff9cb9 100644 --- a/dbaccess/source/ui/dlg/dsselect.hxx +++ b/dbaccess/source/ui/dlg/dsselect.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -93,3 +94,4 @@ protected: #endif // _DBAUI_DSSELECT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dsselect.src b/dbaccess/source/ui/dlg/dsselect.src index f6fca187ba58..d6a8855559a2 100644 --- a/dbaccess/source/ui/dlg/dsselect.src +++ b/dbaccess/source/ui/dlg/dsselect.src @@ -107,5 +107,3 @@ ModalDialog DLG_DATASOURCE_SELECTION Text [ en-US ] = "Choose a database"; }; }; - - diff --git a/dbaccess/source/ui/dlg/finteraction.cxx b/dbaccess/source/ui/dlg/finteraction.cxx index afaad9788211..2a0e6be0715a 100644 --- a/dbaccess/source/ui/dlg/finteraction.cxx +++ b/dbaccess/source/ui/dlg/finteraction.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,15 +29,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_FILEPICKER_INTERACTION_HXX #include "finteraction.hxx" -#endif -#ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP_ +#include <osl/diagnose.h> #include <com/sun/star/ucb/InteractiveIOException.hpp> -#endif //........................................................................ namespace dbaui @@ -56,7 +52,7 @@ namespace dbaui ,m_bDoesNotExist(sal_False) { DBG_CTOR( OFilePickerInteractionHandler, NULL ); - DBG_ASSERT( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" ); + OSL_ENSURE( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" ); } //-------------------------------------------------------------------- @@ -86,3 +82,4 @@ namespace dbaui } // namespace svt //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/finteraction.hxx b/dbaccess/source/ui/dlg/finteraction.hxx index b11e960a144e..bbc837e0b074 100644 --- a/dbaccess/source/ui/dlg/finteraction.hxx +++ b/dbaccess/source/ui/dlg/finteraction.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,12 +29,8 @@ #ifndef DBAUI_FILEPICKER_INTERACTION_HXX #define DBAUI_FILEPICKER_INTERACTION_HXX -#ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include <cppuhelper/implbase1.hxx> -#endif -#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP_ #include <com/sun/star/task/XInteractionHandler.hpp> -#endif //........................................................................ namespace dbaui @@ -73,3 +70,4 @@ namespace dbaui #endif // DBAUI_FILEPICKER_INTERACTION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 8bff43cfc0c6..b9628fe046cc 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,6 +52,7 @@ #include "UITools.hxx" #include <comphelper/processfactory.hxx> #include <unotools/confignode.hxx> +#include <osl/diagnose.h> //......................................................................... namespace dbaui @@ -99,12 +101,12 @@ namespace dbaui DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rItems.GetItem(DSID_TYPECOLLECTION)); if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); - DBG_ASSERT(m_pCollection, "OGeneralPage::OGeneralPage : really need a DSN type collection !"); + OSL_ENSURE(m_pCollection, "OGeneralPage::OGeneralPage : really need a DSN type collection !"); // If no driver for embedded DBs is installed, and no dBase driver, then hide the "Create new database" option sal_Int32 nCreateNewDBIndex = m_pCollection->getIndexOf( m_pCollection->getEmbeddedDatabase() ); if ( nCreateNewDBIndex == -1 ) - nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString::createFromAscii( "sdbc:dbase:" ) ); + nCreateNewDBIndex = m_pCollection->getIndexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")) ); bool bHideCreateNew = ( nCreateNewDBIndex == -1 ); // also, if our application policies tell us to hide the option, do it @@ -126,7 +128,7 @@ namespace dbaui &m_aTypePostLabel }; const long nOffset = m_aRB_OpenDocument.GetPosPixel().Y() - m_aRB_CreateDatabase.GetPosPixel().Y(); - for ( size_t i=0; i < sizeof( pWindowsToMove ) / sizeof( pWindowsToMove[0] ); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS( pWindowsToMove ); ++i ) { Point aPos( pWindowsToMove[i]->GetPosPixel() ); aPos.Y() -= nOffset; @@ -212,7 +214,7 @@ namespace dbaui ++loop ) insertDatasourceTypeEntryData( loop->eType, loop->sDisplayName ); - } // if ( m_pCollection ) + } } } @@ -359,8 +361,8 @@ namespace dbaui // collect some items and some values SFX_ITEMSET_GET(_rSet, pNameItem, SfxStringItem, DSID_NAME, sal_True); SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True); - DBG_ASSERT(pUrlItem, "OGeneralPage::implInitControls : missing the type attribute !"); - DBG_ASSERT(pNameItem, "OGeneralPage::implInitControls : missing the type attribute !"); + OSL_ENSURE(pUrlItem, "OGeneralPage::implInitControls : missing the type attribute !"); + OSL_ENSURE(pNameItem, "OGeneralPage::implInitControls : missing the type attribute !"); sName = pNameItem->GetValue(); sConnectURL = pUrlItem->GetValue(); } @@ -606,7 +608,6 @@ namespace dbaui const SfxFilter* pFilter = getStandardDatabaseFilter(); if ( pFilter ) { -// aFileDlg.AddFilter(pFilter->GetUIName(),pFilter->GetDefaultExtension()); aFileDlg.SetCurrentFilter(pFilter->GetUIName()); } if ( aFileDlg.Execute() == ERRCODE_NONE ) @@ -634,3 +635,4 @@ namespace dbaui } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 729e38eb7dff..5bd2dbe189fa 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,21 +29,11 @@ #ifndef _DBAUI_GENERALPAGE_HXX_ #define _DBAUI_GENERALPAGE_HXX_ -#ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" -#endif -#ifndef DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX #include "opendoccontrols.hxx" -#endif -#ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> -#endif -#ifndef _SV_LSTBOX_HXX #include <vcl/lstbox.hxx> -#endif -#ifndef _SV_EDIT_HXX #include <vcl/edit.hxx> -#endif #include <svtools/dialogcontrolling.hxx> #include <memory> @@ -175,3 +166,5 @@ namespace dbaui } // namespace dbaui //......................................................................... #endif // _DBAUI_GENERALPAGE_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index ea6735ab0234..10af9cdcc3cf 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,42 +29,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_INDEXDIALOG_HXX_ #include "indexdialog.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif -#ifndef _DBAUI_INDEXDIALOG_HRC_ #include "indexdialog.hrc" -#endif -#ifndef _DBAUI_INDEXFIELDSCONTROL_HXX_ #include "indexfieldscontrol.hxx" -#endif -#ifndef _DBAUI_INDEXCOLLECTION_HXX_ #include "indexcollection.hxx" -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_ #include <com/sun/star/sdb/SQLContext.hpp> -#endif -#ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef _SVTOOLS_IMGDEF_HXX #include <svtools/imgdef.hxx> -#endif -#ifndef DBACCESS_UI_BROWSER_ID_HXX #include "browserids.hxx" -#endif -#ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include <connectivity/dbtools.hxx> -#endif +#include <osl/diagnose.h> //...................................................................... namespace dbaui { @@ -168,14 +146,14 @@ namespace dbaui //------------------------------------------------------------------ void DbaIndexList::enableSelectHandler() { - DBG_ASSERT(m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); + OSL_ENSURE(m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); m_bSuspendSelectHdl = sal_False; } //------------------------------------------------------------------ void DbaIndexList::disableSelectHandler() { - DBG_ASSERT(!m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); + OSL_ENSURE(!m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); m_bSuspendSelectHdl = sal_True; } @@ -209,7 +187,7 @@ DBG_NAME(DbaIndexDialog) const Reference< XMultiServiceFactory >& _rxORB,sal_Int32 _nMaxColumnsInIndex) :ModalDialog( _pParent, ModuleRes(DLG_INDEXDESIGN)) ,m_xConnection(_rxConnection) - ,m_aGeometrySettings(E_DIALOG, ::rtl::OUString::createFromAscii("dbaccess.tabledesign.indexdialog")) + ,m_aGeometrySettings(E_DIALOG, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dbaccess.tabledesign.indexdialog"))) ,m_aActions (this, ModuleRes(TLB_ACTIONS)) ,m_aIndexes (this, ModuleRes(CTR_INDEXLIST)) ,m_aIndexDetails (this, ModuleRes(FL_INDEXDETAILS)) @@ -252,7 +230,7 @@ DBG_NAME(DbaIndexDialog) } catch(Exception&) { - OSL_ENSURE(sal_False, "DbaIndexDialog::DbaIndexDialog: could not retrieve basic information from the UNO collection!"); + OSL_FAIL("DbaIndexDialog::DbaIndexDialog: could not retrieve basic information from the UNO collection!"); } fillIndexList(); @@ -262,14 +240,6 @@ DBG_NAME(DbaIndexDialog) m_aClose.SetClickHdl(LINK(this, DbaIndexDialog, OnCloseDialog)); - // get our most recent geometry settings -// if (m_aGeometrySettings.Exists()) -// { -// Point aPos; -// m_aGeometrySettings.GetPosition(aPos.X(), aPos.Y()); -// SetPosPixel(aPos); -// } - // if all of the indexes have an empty description, we're not interested in displaying it Indexes::const_iterator aCheck; @@ -339,8 +309,7 @@ DBG_NAME(DbaIndexDialog) //------------------------------------------------------------------ void DbaIndexDialog::fillIndexList() { - sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - Image aPKeyIcon(ModuleRes( bHiContrast ? IMG_PKEYICON_SCH : IMG_PKEYICON)); + Image aPKeyIcon(ModuleRes( IMG_PKEYICON )); // fill the list with the index names m_aIndexes.Clear(); Indexes::iterator aIndexLoop = m_pIndexes->begin(); @@ -366,17 +335,13 @@ DBG_NAME(DbaIndexDialog) delete m_pIndexes; delete m_pFields; - // save our geometry settings -// Point aPos = GetPosPixel(); -// m_aGeometrySettings.SetPosition(aPos.X(), aPos.Y()); - DBG_DTOR(DbaIndexDialog,NULL); } //------------------------------------------------------------------ sal_Bool DbaIndexDialog::implCommit(SvLBoxEntry* _pEntry) { - DBG_ASSERT(_pEntry, "DbaIndexDialog::implCommit: invalid entry!"); + OSL_ENSURE(_pEntry, "DbaIndexDialog::implCommit: invalid entry!"); Indexes::iterator aCommitPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData()); @@ -431,7 +396,7 @@ DBG_NAME(DbaIndexDialog) } if ((i>0x7FFFFFFF) || (i<0)) { - DBG_ERROR("DbaIndexDialog::OnNewIndex: no free index name found!"); + OSL_FAIL("DbaIndexDialog::OnNewIndex: no free index name found!"); // can't do anything ... of course we try another base, but this could end with the same result ... return; } @@ -444,7 +409,7 @@ DBG_NAME(DbaIndexDialog) for (SvLBoxEntry* pAdjust = m_aIndexes.First(); pAdjust; pAdjust = m_aIndexes.Next(pAdjust)) { Indexes::iterator aAfterInsertPos = m_pIndexes->find(m_aIndexes.GetEntryText(pAdjust)); - DBG_ASSERT(aAfterInsertPos != m_pIndexes->end(), "DbaIndexDialog::OnNewIndex: problems with on of the entries!"); + OSL_ENSURE(aAfterInsertPos != m_pIndexes->end(), "DbaIndexDialog::OnNewIndex: problems with on of the entries!"); pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterInsertPos - m_pIndexes->begin()))); } @@ -460,7 +425,7 @@ DBG_NAME(DbaIndexDialog) { // the selected index SvLBoxEntry* pSelected = m_aIndexes.FirstSelected(); - DBG_ASSERT(pSelected, "DbaIndexDialog::OnDropIndex: invalid call!"); + OSL_ENSURE(pSelected, "DbaIndexDialog::OnDropIndex: invalid call!"); if (pSelected) { // let the user confirm the drop @@ -486,7 +451,7 @@ DBG_NAME(DbaIndexDialog) { // do the drop Indexes::iterator aDropPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData()); - DBG_ASSERT(aDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: did not find the index in my collection!"); + OSL_ENSURE(aDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: did not find the index in my collection!"); SQLExceptionInfo aExceptionInfo; sal_Bool bSuccess = sal_False; @@ -516,7 +481,7 @@ DBG_NAME(DbaIndexDialog) for (SvLBoxEntry* pAdjust = m_aIndexes.First(); pAdjust; pAdjust = m_aIndexes.Next(pAdjust)) { Indexes::iterator aAfterDropPos = m_pIndexes->find(m_aIndexes.GetEntryText(pAdjust)); - DBG_ASSERT(aAfterDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: problems with on of the remaining entries!"); + OSL_ENSURE(aAfterDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: problems with on of the remaining entries!"); pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterDropPos - m_pIndexes->begin()))); } @@ -537,7 +502,7 @@ DBG_NAME(DbaIndexDialog) { // the selected index SvLBoxEntry* pSelected = m_aIndexes.FirstSelected(); - DBG_ASSERT(pSelected, "DbaIndexDialog::OnRenameIndex: invalid call!"); + OSL_ENSURE(pSelected, "DbaIndexDialog::OnRenameIndex: invalid call!"); // save the changes made 'til here // Upon leaving the edit mode, the control will be re-initialized with the @@ -566,7 +531,7 @@ DBG_NAME(DbaIndexDialog) { // the selected index SvLBoxEntry* pSelected = m_aIndexes.FirstSelected(); - DBG_ASSERT(pSelected, "DbaIndexDialog::OnResetIndex: invalid call!"); + OSL_ENSURE(pSelected, "DbaIndexDialog::OnResetIndex: invalid call!"); Indexes::iterator aResetPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(pSelected->GetUserData()); @@ -624,7 +589,7 @@ DBG_NAME(DbaIndexDialog) { if (m_aIndexes.IsEditingActive()) { - DBG_ASSERT(!m_bEditAgain, "DbaIndexDialog::OnCloseDialog: somebody was faster than hell!"); + OSL_ENSURE(!m_bEditAgain, "DbaIndexDialog::OnCloseDialog: somebody was faster than hell!"); // this means somebody entered a new name, which was invalid, which cause us to posted us an event, // and before the event arrived the user clicked onto "close". VERY fast, this user .... m_aIndexes.EndEditing(sal_False); @@ -635,7 +600,7 @@ DBG_NAME(DbaIndexDialog) // the currently selected entry const SvLBoxEntry* pSelected = m_aIndexes.FirstSelected(); - DBG_ASSERT(pSelected == m_pPreviousSelection, "DbaIndexDialog::OnCloseDialog: inconsistence!"); + OSL_ENSURE(pSelected == m_pPreviousSelection, "DbaIndexDialog::OnCloseDialog: inconsistence!"); sal_Int32 nResponse = RET_NO; if (pSelected) @@ -680,7 +645,7 @@ DBG_NAME(DbaIndexDialog) { Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData()); - DBG_ASSERT(aPosition >= m_pIndexes->begin() && aPosition < m_pIndexes->end(), + OSL_ENSURE(aPosition >= m_pIndexes->begin() && aPosition < m_pIndexes->end(), "DbaIndexDialog::OnEntryEdited: invalid entry!"); String sNewName = m_aIndexes.GetEntryText(_pEntry); @@ -804,7 +769,7 @@ DBG_NAME(DbaIndexDialog) //------------------------------------------------------------------ IMPL_LINK( DbaIndexDialog, OnModified, void*, /*NOTINTERESTEDIN*/ ) { - DBG_ASSERT(m_pPreviousSelection, "DbaIndexDialog, OnModified: invalid call!"); + OSL_ENSURE(m_pPreviousSelection, "DbaIndexDialog, OnModified: invalid call!"); Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData()); aPosition->setModified(sal_True); @@ -912,22 +877,19 @@ DBG_NAME(DbaIndexDialog) } } //------------------------------------------------------------------ - ImageList DbaIndexDialog::getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const + ImageList DbaIndexDialog::getImageList(sal_Int16 _eBitmapSet) const { sal_Int16 nN = IMG_INDEX_DLG_SC; - sal_Int16 nH = IMG_INDEX_DLG_SCH; if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE ) { nN = IMG_INDEX_DLG_LC; - nH = IMG_INDEX_DLG_LCH; - } // if ( _eBitmapSet == SFX_SYMBOLS_LARGE ) - return ImageList(ModuleRes( _bHiContast ? nH : nN )); + } + return ImageList( nN ); } //------------------------------------------------------------------ void DbaIndexDialog::resizeControls(const Size& _rDiff) { // we use large images so we must change them - Size aTbNewSize = m_aActions.GetSizePixel(); if ( _rDiff.Width() || _rDiff.Height() ) { Size aDlgSize = GetSizePixel(); @@ -960,3 +922,4 @@ DBG_NAME(DbaIndexDialog) } // namespace dbaui //...................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/indexdialog.src b/dbaccess/source/ui/dlg/indexdialog.src index e4102b9c6f84..2071684c37b6 100644 --- a/dbaccess/source/ui/dlg/indexdialog.src +++ b/dbaccess/source/ui/dlg/indexdialog.src @@ -58,7 +58,6 @@ ModalDialog DLG_INDEXDESIGN ToolBox TLB_ACTIONS { Pos = MAP_APPFONT ( 6 , 6 ) ; - // Size = MAP_APPFONT ( DIALOG_SIZE_X - 14 , 14 ) ; ButtonType = BUTTON_SYMBOL; Align = BOXALIGN_TOP; HelpId = HID_INDEX_DIALOG_ACTION_TB; @@ -174,14 +173,17 @@ String STR_TAB_INDEX_SORTORDER { Text [ en-US ] = "Sort order" ; }; + String STR_TAB_INDEX_FIELD { Text [ en-US ] = "Index field" ; }; + String STR_ORDER_ASCENDING { Text [ en-US ] = "Ascending" ; }; + String STR_ORDER_DESCENDING { Text [ en-US ] = "Descending" ; @@ -199,12 +201,7 @@ String STR_LOGICAL_INDEX_NAME Image IMG_PKEYICON { - ImageBitmap = Bitmap { File = "pkey.bmp"; }; - MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; -}; -Image IMG_PKEYICON_SCH -{ - ImageBitmap = Bitmap { File = "pkey_sch.bmp"; }; + ImageBitmap = Bitmap { File = "pkey.png"; }; MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; }; @@ -236,4 +233,3 @@ String STR_INDEXDESIGN_DOUBLE_COLUMN_NAME { Text [ en-US ] = "In an index definition, no table column may occur more than once. However, you have entered column \"$name$\" twice."; }; - diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index bb29db6f43bd..ae6b365859d6 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,18 +29,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_INDEXFIELDSCONTROL_HXX_ #include "indexfieldscontrol.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _OSL_DIAGNOSE_H_ #include <osl/diagnose.h> -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif //...................................................................... namespace dbaui @@ -205,7 +198,6 @@ DBG_NAME(IndexFieldsControl) // insert rows for the the fields RowInserted(GetRowCount(), m_aFields.size(), sal_False); // insert an additional row for a new field for that index -// if(!m_nMaxColumnsInIndex || GetRowCount() < m_nMaxColumnsInIndex ) RowInserted(GetRowCount(), 1, sal_False); SetUpdateMode(sal_True); @@ -318,7 +310,7 @@ DBG_NAME(IndexFieldsControl) break; default: - OSL_ENSURE(sal_False, "IndexFieldsControl::GetController: invalid column id!"); + OSL_FAIL("IndexFieldsControl::GetController: invalid column id!"); } if (pReturn) @@ -408,7 +400,7 @@ DBG_NAME(IndexFieldsControl) } break; default: - OSL_ENSURE(sal_False, "IndexFieldsControl::SaveModified: invalid column id!"); + OSL_FAIL("IndexFieldsControl::SaveModified: invalid column id!"); } return sal_True; } @@ -432,7 +424,7 @@ DBG_NAME(IndexFieldsControl) break; default: - OSL_ENSURE(sal_False, "IndexFieldsControl::InitController: invalid column id!"); + OSL_FAIL("IndexFieldsControl::InitController: invalid column id!"); } } @@ -498,7 +490,7 @@ DBG_NAME(IndexFieldsControl) else return _rRow->bSortAscending ? m_sAscendingText : m_sDescendingText; default: - OSL_ENSURE(sal_False, "IndexFieldsControl::GetCurrentRowCellText: invalid column id!"); + OSL_FAIL("IndexFieldsControl::GetCurrentRowCellText: invalid column id!"); } } return String(); @@ -514,3 +506,4 @@ DBG_NAME(IndexFieldsControl) } // namespace dbaui //...................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/makefile.mk b/dbaccess/source/ui/dlg/makefile.mk deleted file mode 100644 index ca0d3ab8cde7..000000000000 --- a/dbaccess/source/ui/dlg/makefile.mk +++ /dev/null @@ -1,154 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. -PRJINC=$(PRJ)$/source -PRJNAME=dbaccess -TARGET=uidlg - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(SYSTEM_ODBC_HEADERS)" == "YES" -CFLAGS+=-DSYSTEM_ODBC_HEADERS -.ENDIF - -.IF "$(WINDOWS_VISTA_PSDK)"!="" && "$(PROF_EDITION)"=="" -CDEFS+=-DWINDOWS_VISTA_PSDK -.ENDIF - -.IF "$(GUI)$(COM)"=="WNTGCC" # for adoint.h -CFLAGS+=-fpermissive -.ENDIF - -# --- Files ------------------------------------- - -# ... resource files ............................ - - -LOCALIZE_ME=AutoControls_tmpl.hrc - -SRS1NAME=$(TARGET) -SRC1FILES = \ - AutoControls.src \ - ConnectionPage.src \ - UserAdmin.src \ - admincontrols.src \ - directsql.src \ - AdabasStat.src \ - indexdialog.src \ - RelationDlg.src \ - adtabdlg.src \ - dlgsave.src \ - queryorder.src \ - queryfilter.src \ - paramdialog.src \ - dsselect.src \ - dbadmin.src \ - dbadmin2.src \ - dbadminsetup.src \ - dbfindex.src \ - dlgsize.src \ - CollectionView.src \ - dlgattr.src \ - advancedsettings.src\ - UserAdminDlg.src \ - sqlmessage.src \ - textconnectionsettings.src - - -# ... object files ............................ -EXCEPTIONSFILES= \ - $(SLO)$/directsql.obj \ - $(SLO)$/dbwiz.obj \ - $(SLO)$/dbwizsetup.obj \ - $(SLO)$/generalpage.obj \ - $(SLO)$/indexfieldscontrol.obj \ - $(SLO)$/indexdialog.obj \ - $(SLO)$/RelationDlg.obj \ - $(SLO)$/adtabdlg.obj \ - $(SLO)$/dlgsave.obj \ - $(SLO)$/admincontrols.obj \ - $(SLO)$/adminpages.obj \ - $(SLO)$/queryorder.obj \ - $(SLO)$/queryfilter.obj \ - $(SLO)$/paramdialog.obj \ - $(SLO)$/dbadmin.obj \ - $(SLO)$/detailpages.obj \ - $(SLO)$/sqlmessage.obj \ - $(SLO)$/finteraction.obj \ - $(SLO)$/ConnectionPage.obj \ - $(SLO)$/ConnectionHelper.obj \ - $(SLO)$/TextConnectionHelper.obj \ - $(SLO)$/ConnectionPageSetup.obj \ - $(SLO)$/DBSetupConnectionPages.obj \ - $(SLO)$/UserAdminDlg.obj \ - $(SLO)$/UserAdmin.obj \ - $(SLO)$/AdabasStat.obj \ - $(SLO)$/tablespage.obj \ - $(SLO)$/DbAdminImpl.obj \ - $(SLO)$/TablesSingleDlg.obj \ - $(SLO)$/CollectionView.obj \ - $(SLO)$/dsselect.obj \ - $(SLO)$/dbfindex.obj \ - $(SLO)$/DriverSettings.obj \ - $(SLO)$/odbcconfig.obj \ - $(SLO)$/advancedsettings.obj \ - $(SLO)$/textconnectionsettings.obj - -SLOFILES= \ - $(EXCEPTIONSFILES) \ - $(SLO)$/dlgsize.obj \ - $(SLO)$/dlgattr.obj \ - $(SLO)$/optionalboolitem.obj - -.IF "$(WINDOWS_VISTA_PSDK)"!="" && "$(PROF_EDITION)"=="" -DISABLE_ADO=TRUE -.ENDIF # "$(WINDOWS_VISTA_PSDK)"!="" && "$(PROF_EDITION)"=="" - -.IF "$(GUI)"=="WNT" && "$(DISABLE_ADO)"=="" -SLOFILES+= $(SLO)$/adodatalinks.obj -.ENDIF - -# --- Targets ---------------------------------- -.INCLUDE : target.mk - -$(SLO)$/ConnectionHelper.obj : $(LOCALIZE_ME_DEST) - -$(SLO)$/ConnectionPageSetup.obj : $(LOCALIZE_ME_DEST) - -$(SLO)$/DBSetupConnectionPages.obj : $(LOCALIZE_ME_DEST) - -$(SLO)$/TextConnectionHelper.obj : $(LOCALIZE_ME_DEST) - -$(SLO)$/detailpages.obj : $(LOCALIZE_ME_DEST) - -$(SLO)$/tablespage.obj : $(LOCALIZE_ME_DEST) - -$(SLO)$/ConnectionPage.obj : $(LOCALIZE_ME_DEST) diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index d31405cce9d2..a31e9ebed021 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,38 +29,25 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_ODBC_CONFIG_HXX_ #include "odbcconfig.hxx" + +#ifdef SYSTEM_ODBC_HEADERS +#include <sqltypes.h> +#else +#include <odbc/sqltypes.h> #endif + #include <rtl/bootstrap.hxx> -#ifndef _RTL_USTRING_HXX_ #include <rtl/ustring.hxx> -#endif -#ifndef _RTL_USTRBUF_HXX_ #include <rtl/ustrbuf.hxx> -#endif -#ifndef _OSL_DIAGNOSE_H_ #include <osl/diagnose.h> -#endif -#ifndef _OSL_PROCESS_H_ #include <osl/process.h> -#endif -#ifndef _THREAD_HXX_ #include <osl/thread.hxx> -#endif -#ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef _SV_SVAPP_HXX #include <vcl/svapp.hxx> -#endif #ifdef HAVE_ODBC_SUPPORT -#if defined(OS2) -#define ODBC_LIBRARY "ODBC.DLL" -#define ODBC_UI_LIBRARY "ODBCINST.DLL" -#endif #if defined WNT #define ODBC_LIBRARY "ODBC32.DLL" #define ODBC_UI_LIBRARY "ODBCCP32.DLL" @@ -90,18 +78,11 @@ #endif #endif // defined(WNT) -#if defined(OS2) -#define ALLREADY_HAVE_OS2_TYPES -#define DONT_TD_VOID -#endif - #ifdef SYSTEM_ODBC_HEADERS #include <sqlext.h> #else -#ifndef __SQLEXT_H #include <odbc/sqlext.h> #endif -#endif #if defined(WNT) #if defined _MSC_VER @@ -112,10 +93,6 @@ #endif // defined(WNT) // from here on you can do what you want to -#if defined(OS2) -#define SQL_API _System -#endif // defined(OS2) - #else #define ODBC_LIBRARY "" @@ -295,7 +272,7 @@ void OOdbcEnumeration::getDatasourceNames(StringBag& _rNames) if (!allocEnv()) { - OSL_ENSURE(sal_False, "OOdbcEnumeration::getDatasourceNames: could not allocate an ODBC environment!"); + OSL_FAIL("OOdbcEnumeration::getDatasourceNames: could not allocate an ODBC environment!"); return; } @@ -401,3 +378,5 @@ bool OOdbcManagement::isRunning() const //......................................................................... } // namespace dbaui //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx index 8c0c70defe07..2c950ba5f473 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.hxx +++ b/dbaccess/source/ui/dlg/odbcconfig.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,11 +31,11 @@ #include "commontypes.hxx" -#if defined(WNT) || defined (UNX) || defined (OS2) +#if defined(WNT) || defined (UNX) #define HAVE_ODBC_SUPPORT #endif -#if ( defined(WNT) || defined (OS2) ) && defined(HAVE_ODBC_SUPPORT) +#if defined(WNT) && defined(HAVE_ODBC_SUPPORT) #define HAVE_ODBC_ADMINISTRATION #endif @@ -138,3 +139,4 @@ public: #endif // _DBAUI_ODBC_CONFIG_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/optionalboolitem.cxx b/dbaccess/source/ui/dlg/optionalboolitem.cxx index 688a47eef7b6..963a12b1a300 100644 --- a/dbaccess/source/ui/dlg/optionalboolitem.cxx +++ b/dbaccess/source/ui/dlg/optionalboolitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -74,3 +75,5 @@ namespace dbaui //........................................................................ } // namespace dbaui //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/optionalboolitem.hxx b/dbaccess/source/ui/dlg/optionalboolitem.hxx index 89d7d0d5de3b..0fdb2dedf611 100644 --- a/dbaccess/source/ui/dlg/optionalboolitem.hxx +++ b/dbaccess/source/ui/dlg/optionalboolitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -65,3 +66,5 @@ namespace dbaui //........................................................................ #endif // DBACCESS_OPTIONALBOOLITEM_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 163675229bca..8293b6231e42 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,49 +29,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_PARAMDIALOG_HXX_ #include "paramdialog.hxx" -#endif -#ifndef _DBAUI_PARAMDIALOG_HRC_ #include "paramdialog.hrc" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBAUI_COMMON_TYPES_HXX_ #include "commontypes.hxx" -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_ #include <com/sun/star/util/XNumberFormatter.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_ #include <com/sun/star/sdbc/DataType.hpp> -#endif -#ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include <connectivity/dbtools.hxx> -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef _SV_SVAPP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _TOOLS_DEBUG_HXX -#include <tools/debug.hxx> -#endif +#include <osl/diagnose.h> #include <tools/diagnose_ex.h> -#ifndef _DBAUI_LOCALRESACCESS_HXX_ #include "localresaccess.hxx" -#endif -#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX #include <unotools/syslocale.hxx> -#endif #define EF_VISITED 0x0001 #define EF_DIRTY 0x0002 @@ -122,7 +95,7 @@ DBG_NAME(OParameterDialog) m_xFormatter = Reference< XNumberFormatter>(_rxORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))), UNO_QUERY); else { - DBG_ERROR("OParameterDialog::OParameterDialog: need a service factory!"); + OSL_FAIL("OParameterDialog::OParameterDialog: need a service factory!"); } Reference< XNumberFormatsSupplier > xNumberFormats = ::dbtools::getNumberFormats(m_xConnection, sal_True); @@ -132,7 +105,7 @@ DBG_NAME(OParameterDialog) m_xFormatter->attachNumberFormatsSupplier(xNumberFormats); try { - DBG_ASSERT(rParamContainer->getCount(), "OParameterDialog::OParameterDialog : can't handle empty containers !"); + OSL_ENSURE(rParamContainer->getCount(), "OParameterDialog::OParameterDialog : can't handle empty containers !"); m_aFinalValues.realloc(rParamContainer->getCount()); PropertyValue* pValues = m_aFinalValues.getArray(); @@ -325,7 +298,7 @@ DBG_NAME(OParameterDialog) { sal_uInt16 nCurrent = m_aAllParams.GetSelectEntryPos(); sal_uInt16 nCount = m_aAllParams.GetEntryCount(); - DBG_ASSERT(nCount == m_aVisitedParams.size(), "OParameterDialog::OnButtonClicked : inconsistent lists !"); + OSL_ENSURE(nCount == m_aVisitedParams.size(), "OParameterDialog::OnButtonClicked : inconsistent lists !"); // search the next entry in list we haven't visited yet sal_uInt16 nNext = (nCurrent + 1) % nCount; @@ -370,13 +343,13 @@ DBG_NAME(OParameterDialog) // initialize the controls with the new values sal_uInt16 nSelected = m_aAllParams.GetSelectEntryPos(); - DBG_ASSERT(nSelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnEntrySelected : no current entry !"); + OSL_ENSURE(nSelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnEntrySelected : no current entry !"); m_aParam.SetText(::comphelper::getString(m_aFinalValues[nSelected].Value)); m_nCurrentlySelected = nSelected; // with this the value isn't dirty - DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnEntrySelected : invalid current entry !"); + OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnEntrySelected : invalid current entry !"); m_aVisitedParams[m_nCurrentlySelected] &= ~EF_DIRTY; m_aResetVisitFlag.SetTimeout(1000); @@ -388,10 +361,10 @@ DBG_NAME(OParameterDialog) //------------------------------------------------------------------------------ IMPL_LINK(OParameterDialog, OnVisitedTimeout, Timer*, /*pTimer*/) { - DBG_ASSERT(m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnVisitedTimeout : invalid call !"); + OSL_ENSURE(m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnVisitedTimeout : invalid call !"); // mark the currently selected entry as visited - DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnVisitedTimeout : invalid entry !"); + OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnVisitedTimeout : invalid entry !"); m_aVisitedParams[m_nCurrentlySelected] |= EF_VISITED; // was it the last "not visited yet" entry ? @@ -438,7 +411,7 @@ DBG_NAME(OParameterDialog) IMPL_LINK(OParameterDialog, OnValueModified, Control*, /*pBox*/) { // mark the currently selected entry as dirty - DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !"); + OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !"); m_aVisitedParams[m_nCurrentlySelected] |= EF_DIRTY; m_bNeedErrorOnCurrent = sal_True; @@ -450,3 +423,5 @@ DBG_NAME(OParameterDialog) //......................................................................... } // namespace dbaui //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/paramdialog.src b/dbaccess/source/ui/dlg/paramdialog.src index f654f5627808..1f78123c6096 100644 --- a/dbaccess/source/ui/dlg/paramdialog.src +++ b/dbaccess/source/ui/dlg/paramdialog.src @@ -44,7 +44,6 @@ ModalDialog DLG_PARAMETERS Moveable = TRUE ; Closeable = TRUE ; - FixedLine FL_PARAMS { Pos = MAP_APPFONT ( 4 , 3 ) ; @@ -101,4 +100,3 @@ ModalDialog DLG_PARAMETERS Text [ en-US ] = "The entry could not be converted to a valid value for the \"$name$\"column"; }; }; - diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 0591ec668aef..6432334b79e4 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,75 +29,28 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_QUERYFILTER_HXX #include "queryfilter.hxx" -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_ #include <com/sun/star/sdbc/DataType.hpp> -#endif -#ifndef _COM_SUN_STAR_UTIL_DATE_HPP_ #include <com/sun/star/util/Date.hpp> -#endif -#ifndef _COM_SUN_STAR_UTIL_DATETIME_HPP_ #include <com/sun/star/util/DateTime.hpp> -#endif -#ifndef _COM_SUN_STAR_UTIL_TIME_HPP_ #include <com/sun/star/util/Time.hpp> -#endif -#ifndef _COM_SUN_STAR_SDB_XSQLQUERYCOMPOSER_HPP_ #include <com/sun/star/sdb/XSQLQueryComposer.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_COLUMNSEARCH_HPP_ #include <com/sun/star/sdbc/ColumnSearch.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_ #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> -#endif -#ifndef _COM_SUN_STAR_SDB_SQLFILTEROPERATOR_HPP_ #include <com/sun/star/sdb/SQLFilterOperator.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_ #include <com/sun/star/sdbc/XRow.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_ #include <com/sun/star/sdbc/XResultSet.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> -#endif -#ifndef _TOOLS_DEBUG_HXX -#include <tools/debug.hxx> -#endif -#ifndef TOOLS_DIAGNOSE_EX_H #include <tools/diagnose_ex.h> -#endif -#ifndef TOOLS_DIAGNOSE_EX_H -#include <tools/diagnose_ex.h> -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ +#include <osl/diagnose.h> #include "moduledbu.hxx" -#endif -#ifndef _CONNECTIVITY_PARSE_SQLITERATOR_HXX_ #include <connectivity/sqliterator.hxx> -#endif -#ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include <connectivity/dbtools.hxx> -#endif -#ifndef DBAUI_QUERYFILTER_HRC #include "queryfilter.hrc" -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_ #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> -#endif -#ifndef _COM_SUN_STAR_SDB_SQLFILTEROPERATOR_HPP_ #include <com/sun/star/sdb/SQLFilterOperator.hpp> -#endif using namespace dbaui; using namespace connectivity; @@ -235,7 +189,7 @@ DlgFilterCrit::DlgFilterCrit(Window * pParent, fillLines(aValues); } - catch(Exception&) + catch(const Exception&) { FreeResource(); throw; @@ -314,7 +268,7 @@ sal_Int32 DlgFilterCrit::GetOSQLPredicateType( const String& _rSelectedPredicate nPredicateType = SQLFilterOperator::NOT_SQLNULL; break; default: - OSL_ENSURE( false, "DlgFilterCrit::GetOSQLPredicateType: unknown predicate string!" ); + OSL_FAIL( "DlgFilterCrit::GetOSQLPredicateType: unknown predicate string!" ); break; } @@ -408,10 +362,10 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom sTableName += _rFilter.Name; _rFilter.Name = sTableName; } - } // if ( !bFunction ) + } } } - catch(Exception) + catch(const Exception&) { } @@ -500,7 +454,7 @@ Reference< XPropertySet > DlgFilterCrit::getMatchingColumn( const Edit& _rValueI sField = aLB_WHEREFIELD3.GetSelectEntry(); } else { - DBG_ERROR( "DlgFilterCrit::getMatchingColumn: invalid event source!" ); + OSL_FAIL( "DlgFilterCrit::getMatchingColumn: invalid event source!" ); } // the field itself @@ -510,7 +464,7 @@ Reference< XPropertySet > DlgFilterCrit::getMatchingColumn( const Edit& _rValueI //------------------------------------------------------------------------------ IMPL_LINK( DlgFilterCrit, PredicateLoseFocus, Edit*, _pField ) { - DBG_ASSERT( _pField, "DlgFilterCrit::PredicateLoseFocus: invalid event source!" ); + OSL_ENSURE( _pField, "DlgFilterCrit::PredicateLoseFocus: invalid event source!" ); if ( _pField ) { // retrieve the field affected @@ -631,11 +585,9 @@ void DlgFilterCrit::SelectField( ListBox& rBox, const String& rField ) { DBG_CHKTHIS(DlgFilterCrit,NULL); sal_uInt16 nCnt = rBox.GetEntryCount(); - // sal_Bool bCase = m_rIterator.TablesAreSensitive(); for( sal_uInt16 i=0 ; i<nCnt ; i++ ) { - // if(bCase ? rBox.GetEntry(i) == rField : rBox.GetEntry(i).EqualsIgnoreCaseAscii(rField)) if(rBox.GetEntry(i) == rField) { rBox.SelectEntryPos(i); @@ -801,7 +753,7 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox ) } else { - DBG_ASSERT(0,"DlgFilterCrit::ListSelectHdl: Diese Column d�rfte garnicht vorhanden sein!"); + OSL_FAIL("DlgFilterCrit::ListSelectHdl: Diese Column d�rfte garnicht vorhanden sein!"); } } pComp->SelectEntryPos(0); @@ -826,7 +778,6 @@ void DlgFilterCrit::BuildWherePart() Sequence<Sequence<PropertyValue> > aFilter,aHaving; aFilter.realloc(1); aHaving.realloc(1); - // ::rtl::OUString aFilter; if( LbPos(aLB_WHEREFIELD1) != 0 ) { @@ -895,7 +846,7 @@ void DlgFilterCrit::BuildWherePart() m_xQueryComposer->setStructuredFilter(aFilter); m_xQueryComposer->setStructuredHavingClause(aHaving); } - catch(Exception) + catch(const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -919,3 +870,4 @@ void DlgFilterCrit::fillLines(const Sequence<Sequence<PropertyValue > >& _aValue } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/queryfilter.src b/dbaccess/source/ui/dlg/queryfilter.src index a92110a6eefd..6d273b5c53aa 100644 --- a/dbaccess/source/ui/dlg/queryfilter.src +++ b/dbaccess/source/ui/dlg/queryfilter.src @@ -30,15 +30,6 @@ #endif #include "dbaccess_helpid.hrc" -/* -#define STRLST_AND_OR \ - StringList [ en-US ] = \ - {\ - < "AND" ; Default ; > ; \ - < "OR" ; Default ; > ; \ - };\ -*/ - ModalDialog DLG_FILTERCRIT { OutputSize = TRUE ; @@ -88,7 +79,6 @@ ModalDialog DLG_FILTERCRIT TabStop = TRUE ; DropDown = TRUE ; CurPos = 0 ; -// STRLST_AND_OR StringList [ en-US ] = { < "AND" ; Default ; > ; @@ -132,7 +122,6 @@ ModalDialog DLG_FILTERCRIT TabStop = TRUE ; DropDown = TRUE ; CurPos = 0 ; -// STRLST_AND_OR StringList [ en-US ] = { < "AND" ; Default ; > ; @@ -192,7 +181,6 @@ ModalDialog DLG_FILTERCRIT { Pos = MAP_APPFONT ( 15 , 14 ) ; Size = MAP_APPFONT ( 40 , 8 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Verknpfung : Verknpfung */ Center = TRUE ; Text [ en-US ] = "Operator" ; }; @@ -230,4 +218,3 @@ ModalDialog DLG_FILTERCRIT Text [ en-US ] = "=;<>;<;<=;>;>=;like;not like;null;not null"; }; }; - diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index ff4d2738ebf1..98c388ec16a6 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,48 +28,22 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef DBAUI_QUERYORDER_HRC #include "queryorder.hrc" -#endif -#ifndef DBAUI_QUERYORDER_HXX #include "queryorder.hxx" -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef _COM_SUN_STAR_SDB_XSINGLESELECTQUERYCOMPOSER_HPP_ #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_COLUMNSEARCH_HPP_ #include <com/sun/star/sdbc/ColumnSearch.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> -#endif -#ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif -#ifndef _CONNECTIVITY_PARSE_SQLITERATOR_HXX_ #include <connectivity/sqliterator.hxx> -#endif -#ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include <connectivity/dbtools.hxx> -#endif -#ifndef _COMPHELPER_EXTRACT_HXX_ #include <comphelper/extract.hxx> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_ #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> -#endif -#ifndef TOOLS_DIAGNOSE_EX_H #include <tools/diagnose_ex.h> -#endif #include <algorithm> @@ -272,8 +247,8 @@ void DlgOrderCrit::EnableLines() DBG_CHKTHIS(DlgOrderCrit,NULL); Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData(); ::rtl::OUString sQuote = xMetaData.is() ? xMetaData->getIdentifierQuoteString() : ::rtl::OUString(); - static const ::rtl::OUString sDESC = ::rtl::OUString::createFromAscii(" DESC "); - static const ::rtl::OUString sASC = ::rtl::OUString::createFromAscii(" ASC "); + static const ::rtl::OUString sDESC(RTL_CONSTASCII_USTRINGPARAM(" DESC ")); + static const ::rtl::OUString sASC(RTL_CONSTASCII_USTRINGPARAM(" ASC ")); Reference< XNameAccess> xColumns = Reference< XColumnsSupplier >(m_xQueryComposer,UNO_QUERY)->getColumns(); @@ -283,7 +258,7 @@ void DlgOrderCrit::EnableLines() if(m_aColumnList[i]->GetSelectEntryPos() != 0) { if(sOrder.getLength()) - sOrder += ::rtl::OUString::createFromAscii(","); + sOrder += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); String sName = m_aColumnList[i]->GetSelectEntry(); try @@ -308,7 +283,7 @@ void DlgOrderCrit::EnableLines() else sOrder += ::dbtools::quoteName(sQuote,sName); } - catch(Exception) + catch(const Exception&) { } if(m_aValueList[i]->GetSelectEntryPos()) @@ -332,3 +307,4 @@ void DlgOrderCrit::BuildOrderPart() +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/queryorder.src b/dbaccess/source/ui/dlg/queryorder.src index a0806f41988c..7c349dda037b 100644 --- a/dbaccess/source/ui/dlg/queryorder.src +++ b/dbaccess/source/ui/dlg/queryorder.src @@ -139,7 +139,6 @@ ModalDialog DLG_ORDERCRIT { Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 46 , 8 ) ; - /* ### ACHTUNG: Neuer Text in Resource? Verknpfung : Verknpfung */ Text [ en-US ] = "Operator" ; }; FixedText FT_ORDERDIR @@ -179,39 +178,3 @@ ModalDialog DLG_ORDERCRIT Text [ en-US ] = "<none>" ; }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 0aa02675bdf0..cfdb702d23ff 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,54 +29,23 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_SQLMESSAGE_HXX_ #include "sqlmessage.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBAUI_SQLMESSAGE_HRC_ #include "sqlmessage.hrc" -#endif -#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_ #include <com/sun/star/sdbc/SQLException.hpp> -#endif -#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_ #include <com/sun/star/sdb/SQLContext.hpp> -#endif -#ifndef _SV_GROUP_HXX //autogen #include <vcl/fixed.hxx> -#endif -#ifndef _SVTREEBOX_HXX +#include <osl/diagnose.h> #include <svtools/svtreebx.hxx> -#endif -#ifndef _SVEDIT_HXX //autogen #include <svtools/svmedit.hxx> -#endif -#ifndef _DBHELPER_DBEXCEPTION_HXX_ #include <connectivity/dbexception.hxx> -#endif -#ifndef CONNECTIVITY_SQLERROR_HXX #include <connectivity/sqlerror.hxx> -#endif -#ifndef _SV_MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif -#ifndef _UTL_CONFIGMGR_HXX_ #include <unotools/configmgr.hxx> -#endif -#ifndef _SFX_SFXUNO_HXX #include <sfx2/sfxuno.hxx> -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif -#ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ #include "moduledbu.hxx" -#endif #include <tools/urlobj.hxx> @@ -103,7 +73,7 @@ namespace class IImageProvider { public: - virtual Image getImage( bool _highContrast ) const = 0; + virtual Image getImage() const = 0; virtual ~IImageProvider() { } }; @@ -122,27 +92,17 @@ namespace { private: sal_uInt16 m_defaultImageID; - sal_uInt16 m_highContrastImageID; mutable Image m_defaultImage; - mutable Image m_highContrastImage; public: - ImageProvider( sal_uInt16 _defaultImageID, sal_uInt16 _highContrastImageID ) + ImageProvider( sal_uInt16 _defaultImageID ) :m_defaultImageID( _defaultImageID ) - ,m_highContrastImageID( _highContrastImageID ) { } - virtual Image getImage( bool _highContrast ) const + virtual Image getImage() const { - if ( _highContrast ) - { - if ( !m_highContrastImage ) - m_highContrastImage = Image( ModuleRes( m_highContrastImageID ) ); - return m_highContrastImage; - } - if ( !m_defaultImage ) m_defaultImage = Image( ModuleRes( m_defaultImageID ) ); return m_defaultImage; @@ -186,20 +146,17 @@ namespace { ::boost::shared_ptr< IImageProvider >* ppProvider( &m_pErrorImage ); sal_uInt16 nNormalImageID( BMP_EXCEPTION_ERROR ); - sal_uInt16 nHCImageID( BMP_EXCEPTION_ERROR_SCH ); switch ( _eType ) { case SQLExceptionInfo::SQL_WARNING: ppProvider = &m_pWarningsImage; nNormalImageID = BMP_EXCEPTION_WARNING; - nHCImageID = BMP_EXCEPTION_WARNING_SCH; break; case SQLExceptionInfo::SQL_CONTEXT: ppProvider = &m_pInfoImage; nNormalImageID = BMP_EXCEPTION_INFO; - nHCImageID = BMP_EXCEPTION_INFO_SCH; break; default: @@ -207,7 +164,7 @@ namespace } if ( !ppProvider->get() ) - ppProvider->reset( new ImageProvider( nNormalImageID, nHCImageID ) ); + ppProvider->reset( new ImageProvider( nNormalImageID ) ); return *ppProvider; } @@ -305,7 +262,7 @@ namespace iter.next( aCurrentElement ); const SQLException* pCurrentError = (const SQLException*)aCurrentElement; - DBG_ASSERT( pCurrentError, "lcl_buildExceptionChain: iterator failure!" ); + OSL_ENSURE( pCurrentError, "lcl_buildExceptionChain: iterator failure!" ); // hasMoreElements should not have returned <TRUE/> in this case ExceptionDisplayInfo aDisplayInfo( aCurrentElement.getType() ); @@ -319,7 +276,7 @@ namespace && !lcl_hasDetails( aDisplayInfo ) ) { - OSL_ENSURE( false, "lcl_buildExceptionChain: useles exception: no state, no error code, no message!" ); + OSL_FAIL( "lcl_buildExceptionChain: useles exception: no state, no error code, no message!" ); continue; } @@ -347,9 +304,9 @@ namespace } //------------------------------------------------------------------------------ - void lcl_insertExceptionEntry( SvTreeListBox& _rList, bool _bHiContrast, size_t _nElementPos, const ExceptionDisplayInfo& _rEntry ) + void lcl_insertExceptionEntry( SvTreeListBox& _rList, size_t _nElementPos, const ExceptionDisplayInfo& _rEntry ) { - Image aEntryImage( _rEntry.pImageProvider->getImage( _bHiContrast ) ); + Image aEntryImage( _rEntry.pImageProvider->getImage() ); SvLBoxEntry* pListEntry = _rList.InsertEntry( _rEntry.pLabelProvider->getLabel(), aEntryImage, aEntryImage ); pListEntry->SetUserData( reinterpret_cast< void* >( _nElementPos ) ); @@ -408,7 +365,6 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi m_aExceptionText.SetReadOnly(sal_True); bool bHave22018 = false; - bool bHiContrast = isHiContrast( this ); size_t elementPos = 0; for ( ExceptionDisplayChain::const_iterator loop = m_aExceptions.begin(); @@ -416,12 +372,12 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi ++loop, ++elementPos ) { - lcl_insertExceptionEntry( m_aExceptionList, bHiContrast, elementPos, *loop ); + lcl_insertExceptionEntry( m_aExceptionList, elementPos, *loop ); bHave22018 = loop->sSQLState.EqualsAscii( "22018" ); } // if the error has the code 22018, then add an additional explanation - // #i24021# / 2004-10-14 / frank.schoenheit@sun.com + // #i24021# if ( bHave22018 ) { ProviderFactory aProviderFactory; @@ -432,7 +388,7 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi aInfo22018.pImageProvider = aProviderFactory.getImageProvider( SQLExceptionInfo::SQL_CONTEXT ); m_aExceptions.push_back( aInfo22018 ); - lcl_insertExceptionEntry( m_aExceptionList, bHiContrast, m_aExceptions.size() - 1, aInfo22018 ); + lcl_insertExceptionEntry( m_aExceptionList, m_aExceptions.size() - 1, aInfo22018 ); } } @@ -446,7 +402,7 @@ OExceptionChainDialog::~OExceptionChainDialog() IMPL_LINK(OExceptionChainDialog, OnExceptionSelected, void*, EMPTYARG) { SvLBoxEntry* pSelected = m_aExceptionList.FirstSelected(); - DBG_ASSERT(!pSelected || !m_aExceptionList.NextSelected(pSelected), "OExceptionChainDialog::OnExceptionSelected : multi selection ?"); + OSL_ENSURE(!pSelected || !m_aExceptionList.NextSelected(pSelected), "OExceptionChainDialog::OnExceptionSelected : multi selection ?"); String sText; @@ -526,7 +482,7 @@ namespace case BUTTON_RETRY: nButtonID = BUTTONID_RETRY; break; case BUTTON_HELP: nButtonID = BUTTONID_HELP; break; default: - OSL_ENSURE( false, "lcl_addButton: invalid button id!" ); + OSL_FAIL( "lcl_addButton: invalid button id!" ); break; } _rDialog.AddButton( _eType, nButtonID, _bDefault ? BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON : 0 ); @@ -640,7 +596,7 @@ void OSQLMessageBox::impl_initImage( MessageType _eImage ) switch (_eImage) { default: - DBG_ERROR( "OSQLMessageBox::impl_initImage: unsupported image type!" ); + OSL_FAIL( "OSQLMessageBox::impl_initImage: unsupported image type!" ); case Info: m_aInfoImage.SetImage(InfoBox::GetStandardImage()); @@ -754,7 +710,7 @@ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage ) case SQLExceptionInfo::SQL_EXCEPTION: eType = Error; break; case SQLExceptionInfo::SQL_WARNING: eType = Warning; break; case SQLExceptionInfo::SQL_CONTEXT: eType = Info; break; - default: OSL_ENSURE( false, "OSQLMessageBox::Construct: invalid type!" ); + default: OSL_FAIL( "OSQLMessageBox::Construct: invalid type!" ); } } impl_initImage( eType ); @@ -820,3 +776,4 @@ OSQLWarningBox::OSQLWarningBox( Window* _pParent, const UniString& _rMessage, Wi } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/sqlmessage.src b/dbaccess/source/ui/dlg/sqlmessage.src index f409477267f9..94b2e394d527 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.src +++ b/dbaccess/source/ui/dlg/sqlmessage.src @@ -38,36 +38,19 @@ //------------------------------------------------------------------------- Image BMP_EXCEPTION_ERROR { - ImageBitmap = Bitmap { File = "exerror.bmp"; }; + ImageBitmap = Bitmap { File = "exerror.png"; }; MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; }; }; Image BMP_EXCEPTION_WARNING { - ImageBitmap = Bitmap { File = "exwarning.bmp"; }; + ImageBitmap = Bitmap { File = "exwarning.png"; }; MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; }; }; Image BMP_EXCEPTION_INFO { - ImageBitmap = Bitmap { File = "exinfo.bmp"; }; - MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; }; -}; -Image BMP_EXCEPTION_ERROR_SCH -{ - ImageBitmap = Bitmap { File = "exerror_sch.bmp"; }; - MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; }; -}; - -Image BMP_EXCEPTION_WARNING_SCH -{ - ImageBitmap = Bitmap { File = "exwarning_sch.bmp"; }; - MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; }; -}; - -Image BMP_EXCEPTION_INFO_SCH -{ - ImageBitmap = Bitmap { File = "exinfo_sch.bmp"; }; + ImageBitmap = Bitmap { File = "exinfo.png"; }; MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; }; }; diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index e083371afc22..8d0f261cbafc 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,96 +29,37 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbui.hxx" -#ifndef _DBAUI_TABLESPAGE_HXX_ #include "tablespage.hxx" -#endif -#ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" -#endif -#ifndef _DBAUI_DBADMIN_HRC_ #include "dbadmin.hrc" -#endif -#ifndef _DBAUI_DATASOURCEITEMS_HXX_ #include "dsitems.hxx" -#endif -#ifndef DBACCESS_UI_BROWSER_ID_HXX #include "browserids.hxx" -#endif -#ifndef _DBAUI_DATASOURCECONNECTOR_HXX_ #include "datasourceconnector.hxx" -#endif -#ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> -#endif -#ifndef _CONNECTIVITY_DBTOOLS_HXX_ #include <connectivity/dbtools.hxx> -#endif -#ifndef _DBHELPER_DBEXCEPTION_HXX_ #include <connectivity/dbexception.hxx> -#endif -#ifndef _DBAUI_STRINGLISTITEM_HXX_ #include "stringlistitem.hxx" -#endif -#ifndef _SFXENUMITEM_HXX #include <svl/eitem.hxx> -#endif -#ifndef _SFXSTRITEM_HXX #include <svl/stritem.hxx> -#endif -#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #include "dbustrings.hrc" -#endif -#ifndef _SV_SVAPP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _SV_WAITOBJ_HXX #include <vcl/waitobj.hxx> -#endif -#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_ #include <com/sun/star/sdb/SQLContext.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_ #include <com/sun/star/sdbcx/XTablesSupplier.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_ #include <com/sun/star/sdbcx/XAppend.hpp> -#endif -#ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_ #include <com/sun/star/util/XModifiable.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_ #include <com/sun/star/sdbcx/XDrop.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBCX_XDATADEFINITIONSUPPLIER_HPP_ #include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp> -#endif -#ifndef _DBAUI_SQLMESSAGE_HXX_ #include "sqlmessage.hxx" -#endif -#ifndef _SV_MSGBOX_HXX #include <vcl/msgbox.hxx> -#endif -#ifndef _DBA_DBACCESS_HELPID_HRC_ #include "dbaccess_helpid.hrc" -#endif -#ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" -#endif -#ifndef _VOS_MUTEX_HXX_ -#include <vos/mutex.hxx> -#endif -#ifndef _SVTOOLS_IMGDEF_HXX +#include <osl/mutex.hxx> +#include <osl/diagnose.h> #include <svtools/imgdef.hxx> -#endif -#ifndef _DBAUI_TABLESSINGLEDLG_HXX_ #include "TablesSingleDlg.hxx" -#endif -#ifndef TOOLS_DIAGNOSE_EX_H #include <tools/diagnose_ex.h> -#endif -#ifndef _CPPUHELPER_EXC_HLP_HXX_ #include <cppuhelper/exc_hlp.hxx> -#endif #include "AutoControlsDef.hrc" //......................................................................... @@ -232,7 +174,7 @@ DBG_NAME(OTableSubscriptionPage) } catch(SQLException&) { - DBG_ERROR("OTableSubscriptionPage::implCheckTables : could not retrieve the current connection's meta data!"); + OSL_FAIL("OTableSubscriptionPage::implCheckTables : could not retrieve the current connection's meta data!"); } // uncheck all @@ -315,7 +257,7 @@ DBG_NAME(OTableSubscriptionPage) // get the name of the data source we're working for SFX_ITEMSET_GET(_rSet, pNameItem, SfxStringItem, DSID_NAME, sal_True); - DBG_ASSERT(pNameItem, "OTableSubscriptionPage::implInitControls: missing the name attribute!"); + OSL_ENSURE(pNameItem, "OTableSubscriptionPage::implInitControls: missing the name attribute!"); String sDSName = pNameItem->GetValue(); if (bValid && sDSName.Len() && !m_xCurrentConnection.is() ) @@ -323,7 +265,7 @@ DBG_NAME(OTableSubscriptionPage) // the PropertyValues for the current dialog settings Sequence< PropertyValue > aConnectionParams; - DBG_ASSERT(m_pTablesDlg, "OTableSubscriptionPage::implInitControls: need a parent dialog doing the translation!"); + OSL_ENSURE(m_pTablesDlg, "OTableSubscriptionPage::implInitControls: need a parent dialog doing the translation!"); if ( m_pTablesDlg ) { if (!m_pTablesDlg->getCurrentSettings(aConnectionParams)) @@ -446,13 +388,9 @@ DBG_NAME(OTableSubscriptionPage) // get the current table filter SFX_ITEMSET_GET(_rSet, pTableFilter, OStringListItem, DSID_TABLEFILTER, sal_True); - SFX_ITEMSET_GET(_rSet, pSuppress, SfxBoolItem, DSID_SUPPRESSVERSIONCL, sal_True); Sequence< ::rtl::OUString > aTableFilter; - sal_Bool bSuppressVersionColumns = sal_True; if (pTableFilter) aTableFilter = pTableFilter->getList(); - if (pSuppress) - bSuppressVersionColumns = pSuppress->GetValue(); implCompleteTablesCheck( aTableFilter ); @@ -509,11 +447,11 @@ DBG_NAME(OTableSubscriptionPage) { SvLBoxEntry* pLHS = static_cast<SvLBoxEntry*>(_pSortData->pLeft); SvLBoxEntry* pRHS = static_cast<SvLBoxEntry*>(_pSortData->pRight); - DBG_ASSERT(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!"); + OSL_ENSURE(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!"); SvLBoxString* pLeftTextItem = static_cast<SvLBoxString*>(pLHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); SvLBoxString* pRightTextItem = static_cast<SvLBoxString*>(pRHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); - DBG_ASSERT(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!"); + OSL_ENSURE(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!"); String sLeftText = pLeftTextItem->GetText(); String sRightText = pRightTextItem->GetText(); @@ -690,3 +628,4 @@ DBG_NAME(OTableSubscriptionPage) } // namespace dbaui //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx index 0591eb396ae3..81566ed7faf5 100644 --- a/dbaccess/source/ui/dlg/tablespage.hxx +++ b/dbaccess/source/ui/dlg/tablespage.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,27 +29,13 @@ #ifndef _DBAUI_TABLESPAGE_HXX_ #define _DBAUI_TABLESPAGE_HXX_ -#ifndef _DBAUI_ADMINPAGES_HXX_ #include "adminpages.hxx" -#endif -#ifndef _COM_SUN_STAR_I18N_XCOLLATOR_HPP_ #include <com/sun/star/i18n/XCollator.hpp> -#endif -#ifndef _OSL_MUTEX_HXX_ #include <osl/mutex.hxx> -#endif -#ifndef _COMPHELPER_STLTYPES_HXX_ #include <comphelper/stl_types.hxx> -#endif -#ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> -#endif -#ifndef _DBAUI_TABLETREE_HXX_ #include "tabletree.hxx" -#endif -#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ #include <com/sun/star/sdbc/XConnection.hpp> -#endif //......................................................................... @@ -133,3 +120,4 @@ namespace dbaui #endif // _DBAUI_TABLESPAGE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx index d2a39627461b..44471469d401 100644 --- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx +++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,3 +105,5 @@ namespace dbaui //........................................................................ } // namespace dbaui //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |