summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-20 09:52:21 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-20 09:52:21 +0200
commite70b1417d22d22e3d5bdffb1f4b55bc83a4c36ef (patch)
tree3bd3a7fe6854916ee1afa9ee042fc91b3fb9c24e /dbaccess/source/ui/querydesign
parentc00fe9ce1105c6c2a26954eeaee5e51336909a2a (diff)
parentf1ea4ba4479f4a29eb0a42389d5f03c2ad280e8f (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/querydesign')
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionData.hxx63
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx22
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx27
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineData.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/JAccess.cxx20
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx88
-rw-r--r--dbaccess/source/ui/querydesign/JoinDesignView.cxx46
-rw-r--r--dbaccess/source/ui/querydesign/JoinExchange.cxx13
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx78
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnection.cxx20
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnection.hxx9
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnectionData.cxx13
-rw-r--r--dbaccess/source/ui/querydesign/QTableConnectionData.hxx14
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.cxx63
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.hxx10
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindowData.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindowData.hxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx191
-rw-r--r--dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx8
-rw-r--r--dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx6
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx17
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx22
-rw-r--r--dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx95
-rw-r--r--dbaccess/source/ui/querydesign/QueryTextView.cxx32
-rw-r--r--dbaccess/source/ui/querydesign/QueryViewSwitch.cxx23
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx179
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx23
-rw-r--r--dbaccess/source/ui/querydesign/TableConnection.cxx14
-rw-r--r--dbaccess/source/ui/querydesign/TableConnectionData.cxx16
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldDescription.cxx10
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldInfo.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableFieldInfo.hxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx47
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowAccess.cxx35
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowData.cxx7
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx37
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowTitle.cxx42
-rw-r--r--dbaccess/source/ui/querydesign/makefile.mk89
-rw-r--r--dbaccess/source/ui/querydesign/query.src39
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx37
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx140
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx34
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.hxx16
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.src4
-rw-r--r--dbaccess/source/ui/querydesign/queryview.cxx8
52 files changed, 388 insertions, 1339 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionData.hxx b/dbaccess/source/ui/querydesign/ConnectionData.hxx
deleted file mode 100644
index 97cecf44ff8a..000000000000
--- a/dbaccess/source/ui/querydesign/ConnectionData.hxx
+++ /dev/null
@@ -1,63 +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.
- *
- ************************************************************************/
-#ifndef DBAUI_CONNECTIONDATA_HXX
-#define DBAUI_CONNECTIONDATA_HXX
-
-namespace dbaui
-{
-
- //==================================================================
- // ConnData ---------->* ConnLineData
- // ^1 ^1
- // | |
- // Conn ---------->* ConnLine
- //==================================================================
-
-
-}
-#endif // DBAUI_CONNECTIONDATA_HXX
-
-DECLARE_LIST( OConnectionLineDataList, OConnectionLineData* );
-
-//==================================================================
-class SbaJoinTabConn;
-
-
-
-DECLARE_LIST( OConnectionLineList, OConnectionLine* );
-
-DECLARE_LIST( OTableConnectionDataList, OTableConnectionData* );
-
-//==================================================================
-const sal_uInt16 MAX_CONN_COUNT = 2;
-
-class SbaJoinTabWin;
-class SbaJoinTabWinCont;
-
-
-
-DECLARE_LIST( SbaJoinTabConnList, SbaJoinTabConn* );
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index 11c17cca7582..36c7853e9733 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.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,30 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
#ifndef _INC_MATH
#include <math.h>
#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
+#include <osl/diagnose.h>
#include <vcl/lineinfo.hxx>
@@ -77,7 +64,7 @@ namespace
Rectangle GetTextPos(const OTableWindow* _pWin, const Point& _aConnPos,const Point& _aDescrLinePos)
{
OTableWindowListBox* pListBox = _pWin ? _pWin->GetListBox() : NULL;
- DBG_ASSERT(_pWin && pListBox, "OConnectionLine::GetSourceTextPos : invalid call !");
+ OSL_ENSURE(_pWin && pListBox, "OConnectionLine::GetSourceTextPos : invalid call !");
Rectangle aReturn;
if ( pListBox )
@@ -339,7 +326,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev )
// -----------------------------------------------------------------------------
sal_Bool OConnectionLine::IsValid() const
{
- return m_pData.isValid();
+ return m_pData.is();
}
//------------------------------------------------------------------------
double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Point& q)
@@ -395,3 +382,4 @@ Point OConnectionLine::getMidPoint() const
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 0b6490ad878e..084a8893bd5b 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.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,39 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_CONNECTIONLINEACCESS_HXX
#include "ConnectionLineAccess.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-#endif
-#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
#include <toolkit/awt/vclxwindow.hxx>
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
namespace dbaui
{
@@ -67,7 +46,6 @@ namespace dbaui
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
- // using namespace ::com::sun::star::awt;
using namespace ::com::sun::star;
OConnectionLineAccess::OConnectionLineAccess(OTableConnection* _pLine)
@@ -102,7 +80,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
::rtl::OUString OConnectionLineAccess::getImplementationName_Static(void) throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.ConnectionLineAccessibility");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.ConnectionLineAccessibility"));
}
// -----------------------------------------------------------------------------
// XAccessibleContext
@@ -270,3 +248,4 @@ namespace dbaui
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
index 9c51a34019b0..adbdf5edab3a 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineData.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,12 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace dbaui;
@@ -56,7 +53,7 @@ OConnectionLineData::OConnectionLineData( const ::rtl::OUString& rSourceFieldNam
//------------------------------------------------------------------------
OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData )
- : ::vos::OReference()
+ : ::salhelper::SimpleReferenceObject()
{
DBG_CTOR(OConnectionLineData,NULL);
*this = rConnLineData;
@@ -104,3 +101,4 @@ bool operator==(const OConnectionLineData& lhs, const OConnectionLineData& rhs)
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx
index 70a52e1b0404..4a0e3888a1ea 100644
--- a/dbaccess/source/ui/querydesign/JAccess.cxx
+++ b/dbaccess/source/ui/querydesign/JAccess.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,30 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_JACCESS_HXX
#include "JAccess.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#endif
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
namespace dbaui
{
@@ -72,7 +57,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
::rtl::OUString OJoinDesignViewAccess::getImplementationName_Static(void) throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.JoinViewAccessibility");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.JoinViewAccessibility"));
}
// -----------------------------------------------------------------------------
void OJoinDesignViewAccess::clearTableView()
@@ -143,3 +128,4 @@ namespace dbaui
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index fe6d65fd0040..7ccf4db07cf9 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.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,120 +28,45 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _SFXSIDS_HRC
#include <sfx2/sfxsids.hrc>
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#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_SDBCX_XDATADESCRIPTORFACTORY_HPP_
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
#include <com/sun/star/sdbcx/KeyType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDROP_HPP_
#include <com/sun/star/sdbcx/XDrop.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XALTERTABLE_HPP_
#include <com/sun/star/sdbcx/XAlterTable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XAPPEND_HPP_
#include <com/sun/star/sdbcx/XAppend.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDB_SQLCONTEXT_HPP_
#include <com/sun/star/sdb/SQLContext.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_SQLWARNING_HPP_
#include <com/sun/star/sdbc/SQLWarning.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _DBHELPER_DBEXCEPTION_HXX_
#include <connectivity/dbexception.hxx>
-#endif
-#ifndef _COM_SUN_STAR_UI_DIALOGS_XEXECUTABLEDIALOG_HPP_
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#endif
-#ifndef _COMPHELPER_STREAMSECTION_HXX_
#include <comphelper/streamsection.hxx>
-#endif
-#ifndef _COMPHELPER_BASIC_IO_HXX_
#include <comphelper/basicio.hxx>
-#endif
-#ifndef _COMPHELPER_SEQSTREAM_HXX
#include <comphelper/seqstream.hxx>
-#endif
-#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP_
#include <com/sun/star/io/XActiveDataSource.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XACTIVEDATASINK_HPP_
#include <com/sun/star/io/XActiveDataSink.hpp>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QYDLGTAB_HXX
#include "adtabdlg.hxx"
-#endif
-#ifndef _SV_WAITOBJ_HXX
#include <vcl/waitobj.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _VOS_MUTEX_HXX_
-#include <vos/mutex.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
+#include <osl/mutex.hxx>
#include "UITools.hxx"
-#endif
+#include <osl/diagnose.h>
#include <boost/optional.hpp>
@@ -409,7 +335,7 @@ void OJoinController::SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabW
// Wenn die TabWins ein SetData haetten, koennte ich mir das sparen ... haben sie aber nicht, ausserdem muesste ich dann immer
// noch Informationen, die sich eigentlich nicht geaendert haben, auch neu setzen.
// Also loesche ich die TabWinDatas nicht, sondern aktualisiere sie nur.
- DBG_ASSERT(m_vTableData.size() == pTabWinList->size(),
+ OSL_ENSURE(m_vTableData.size() == pTabWinList->size(),
"OJoinController::SaveTabWinsPosSize : inkonsistenter Zustand : sollte genausviel TabWinDatas haben wie TabWins !");
OJoinTableView::OTableWindowMap::iterator aIter = pTabWinList->begin();
@@ -438,7 +364,7 @@ sal_Bool SAL_CALL OJoinController::suspend(sal_Bool _bSuspend) throw( RuntimeExc
if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed )
return sal_True;
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
return sal_False;
@@ -538,10 +464,12 @@ TTableWindowData::value_type OJoinController::createTableWindowData(const ::rtl:
OJoinDesignView* pView = getJoinView();
if( pView )
return pView->getTableView()->createTableWindowData(_sComposedName,_sTableName,_sWindowName);
- OSL_ENSURE(0,"We should never ever reach this point!");
+ OSL_FAIL("We should never ever reach this point!");
return TTableWindowData::value_type();
}
// .............................................................................
} // namespace dbaui
// .............................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JoinDesignView.cxx b/dbaccess/source/ui/querydesign/JoinDesignView.cxx
index f0b4e27a9276..ba1ddc2b5c59 100644
--- a/dbaccess/source/ui/querydesign/JoinDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinDesignView.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,70 +28,27 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef _UNDO_HXX
#include <svl/undo.hxx>
-#endif
-#ifndef DBAUI_QYDLGTAB_HXX
#include "adtabdlg.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-// #include <com/sun/star/util/URL.hdl>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -136,7 +94,6 @@ void OJoinDesignView::Construct()
// -----------------------------------------------------------------------------
void OJoinDesignView::initialize()
{
- // getAddTableDialog()->Update();
}
// -------------------------------------------------------------------------
void OJoinDesignView::resizeDocumentView(Rectangle& _rPlayground)
@@ -168,3 +125,4 @@ void OJoinDesignView::KeyInput( const KeyEvent& rEvt )
} // namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx
index b78d62cc4660..2ec6ccea0257 100644
--- a/dbaccess/source/ui/querydesign/JoinExchange.cxx
+++ b/dbaccess/source/ui/querydesign/JoinExchange.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,21 +28,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_JOINEXCHANGE_HXX
#include "JoinExchange.hxx"
-#endif
-#ifndef _SOT_FORMATS_HXX
#include <sot/formats.hxx>
-#endif
-#ifndef _SVX_DBEXCH_HRC
#include <svx/dbexch.hrc>
-#endif
-#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
#include <cppuhelper/typeprovider.hxx>
-#endif
-#ifndef _SOT_FORMATS_HXX
#include <sot/formats.hxx>
-#endif
namespace dbaui
{
@@ -184,3 +175,5 @@ namespace dbaui
} // namespace dbaui
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 8223baa173f2..112411be0a2f 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.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,29 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
+#include <osl/diagnose.h>
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-//#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
-//#include "QTableWindowData.hxx"
-//#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _URLBMK_HXX
#include <svl/urlbmk.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef DBAUI_OQUERYMOVETABWINUNDOACT_HXX
#include "QueryMoveTabWinUndoAct.hxx"
-#endif
-#ifndef DBAUI_QUERYSIZETABWINUNDOACT_HXX
#include "QuerySizeTabWinUndoAct.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
-#ifndef DBACCESS_JACCESS_HXX
#include "JAccess.hxx"
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
#include <com/sun/star/accessibility/XAccessible.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#endif
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
#include <cppuhelper/exc_hlp.hxx>
#include <tools/diagnose_ex.h>
#include <boost/bind.hpp>
@@ -217,8 +171,6 @@ void OScrollWindowHelper::Resize()
// class OJoinTableView
//==================================================================
-//const long WINDOW_WIDTH = 1000;
-//const long WINDOW_HEIGHT = 1000;
DBG_NAME(OJoinTableView);
//------------------------------------------------------------------------------
OJoinTableView::OJoinTableView( Window* pParent, OJoinDesignView* pView )
@@ -480,7 +432,6 @@ namespace
// -----------------------------------------------------------------------------
sal_Bool isScrollAllowed( OJoinTableView* _pView,long nDelta, sal_Bool bHoriz)
{
- sal_Bool bRet = sal_True;
//////////////////////////////////////////////////////////////////////
// adjust ScrollBar-Positions
ScrollBar* pBar = _pView->GetVScrollBar();
@@ -490,9 +441,9 @@ namespace
long nOldThumbPos = pBar->GetThumbPos();
long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
- nNewThumbPos = 0;// bRet = sal_False;
+ nNewThumbPos = 0;
else if( nNewThumbPos > pBar->GetRangeMax() )
- nNewThumbPos = pBar->GetRangeMax();// bRet = sal_False;
+ nNewThumbPos = pBar->GetRangeMax();
if ( bHoriz )
{
@@ -502,7 +453,7 @@ namespace
else if ( nNewThumbPos == _pView->GetScrollOffset().Y() )
return sal_False;
- return bRet;
+ return sal_True;
}
// -----------------------------------------------------------------------------
sal_Bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY)
@@ -512,7 +463,6 @@ namespace
Point aUpperLeft = _rPoint;
// normalize with respect to visibility
aUpperLeft -= _pView->GetScrollOffset();
- // aUpperLeft.Y() -= _pView->GetScrollOffset().Y();
Point aLowerRight(aUpperLeft.X() + _rSize.Width(), aUpperLeft.Y() + _rSize.Height());
// data about ourself
@@ -523,7 +473,6 @@ namespace
sal_Bool bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height());
if (!bFitsHor || !bFitsVert)
{
- // #100386# OJ
if (!bFitsHor)
{
// ensure the visibility of the right border
@@ -531,7 +480,6 @@ namespace
_nScrollX = aLowerRight.X() - aSize.Width() + TABWIN_SPACING_X;
// ensure the visibility of the left border (higher priority)
- // if ( (aUpperLeft.X() - _nScrollX) < 0 )
if ( aUpperLeft.X() < 0 )
_nScrollX = aUpperLeft.X() - TABWIN_SPACING_X;
}
@@ -542,7 +490,6 @@ namespace
if ( aLowerRight.Y() > aSize.Height() )
_nScrollY = aLowerRight.Y() - aSize.Height() + TABWIN_SPACING_Y;
// upper border
- // if ( (aUpperLeft.Y() - _nScrollY) < 0 )
if ( aUpperLeft.Y() < 0 )
_nScrollY = aUpperLeft.Y() - TABWIN_SPACING_Y;
}
@@ -580,7 +527,6 @@ void OJoinTableView::EnsureVisible(const OTableWindow* _pWin)
{
// data about the tab win
TTableWindowData::value_type pData = _pWin->GetData();
- // Point aUpperLeft = pData->GetPosition();
EnsureVisible( pData->GetPosition() , pData->GetSize());
Invalidate(INVALIDATE_NOCHILDREN);
}
@@ -628,7 +574,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
//////////////////////////////////////////////////////////////////
// Belegte Bereiche dieser Zeile pruefen
- OTableWindow* pOtherTabWin;// = GetTabWinMap()->First();
+ OTableWindow* pOtherTabWin;
OTableWindowMapIterator aIter = m_aTableMap.begin();
OTableWindowMapIterator aEnd = m_aTableMap.end();
for(;aIter != aEnd;++aIter)
@@ -1142,7 +1088,7 @@ void OJoinTableView::ClearAll()
sal_Bool OJoinTableView::ScrollWhileDragging()
{
DBG_CHKTHIS(OJoinTableView,NULL);
- DBG_ASSERT(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging darf nur waehrend Dragging eines Fensters aufgerufen werden !");
+ OSL_ENSURE(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging darf nur waehrend Dragging eines Fensters aufgerufen werden !");
// den Timer schon mal killen
if (m_aDragScrollTimer.IsActive())
@@ -1274,10 +1220,6 @@ sal_Bool OJoinTableView::IsAddAllowed()
return sal_False;
}
- // nicht wenn keine Joins moeglich
-// if (!GetDatabase()->IsCapable(SDB_CAP_JOIN) && nMax <= GetTabWinCount())
-// return sal_False;
-
return sal_True;
}
// -----------------------------------------------------------------------------
@@ -1349,7 +1291,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt)
OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTableWindow* pRhs,bool _bSupressCrossOrNaturalJoin,const OTableConnection* _rpFirstAfter) const
{
OTableConnection* pConn = NULL;
- DBG_ASSERT(pRhs || pLhs, "OJoinTableView::GetTabConn : invalid args !");
+ OSL_ENSURE(pRhs || pLhs, "OJoinTableView::GetTabConn : invalid args !");
// only one NULL-arg allowed
if ((!pLhs || pLhs->ExistsAConn()) && (!pRhs || pRhs->ExistsAConn()))
@@ -1763,7 +1705,7 @@ bool OJoinTableView::allowQueries() const
// -----------------------------------------------------------------------------
void OJoinTableView::onNoColumns_throw()
{
- OSL_ENSURE( false, "OTableWindow::onNoColumns_throw: cannot really handle this!" );
+ OSL_FAIL( "OTableWindow::onNoColumns_throw: cannot really handle this!" );
throw SQLException();
}
//------------------------------------------------------------------------------
@@ -1771,3 +1713,5 @@ bool OJoinTableView::supressCrossNaturalJoin(const TTableConnectionData::value_t
{
return false;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableConnection.cxx b/dbaccess/source/ui/querydesign/QTableConnection.cxx
index 6244ec1a77d4..d8d98679d18b 100644
--- a/dbaccess/source/ui/querydesign/QTableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/QTableConnection.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_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
+#include <osl/diagnose.h>
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
using namespace dbaui;
//========================================================================
// class OQueryTableConnection
@@ -53,7 +46,6 @@ OQueryTableConnection::OQueryTableConnection(OQueryTableView* pContainer, const
DBG_CTOR(OQueryTableConnection,NULL);
}
-
//------------------------------------------------------------------------
OQueryTableConnection::OQueryTableConnection(const OQueryTableConnection& rConn)
:OTableConnection( rConn )
@@ -81,7 +73,7 @@ OQueryTableConnection& OQueryTableConnection::operator=(const OQueryTableConnect
//------------------------------------------------------------------------
sal_Bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare)
{
- DBG_ASSERT(GetData() && rCompare.GetData(), "OQueryTableConnection::operator== : einer der beiden Teilnehmer hat keine Daten !");
+ OSL_ENSURE(GetData() && rCompare.GetData(), "OQueryTableConnection::operator== : einer der beiden Teilnehmer hat keine Daten !");
// allzuviel brauche ich nicht vergleichen (schon gar nicht alle Member) : lediglich die Fenster, an denen wir haengen, und
// die Indizies in der entsprechenden Tabelle muessen uebereinstimmen
@@ -104,8 +96,4 @@ sal_Bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare
}
// -----------------------------------------------------------------------------
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableConnection.hxx b/dbaccess/source/ui/querydesign/QTableConnection.hxx
index bfab4fe88c10..a2402acab43b 100644
--- a/dbaccess/source/ui/querydesign/QTableConnection.hxx
+++ b/dbaccess/source/ui/querydesign/QTableConnection.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,15 +28,9 @@
#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#define DBAUI_QUERYTABLECONNECTION_HXX
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
namespace dbaui
{
@@ -60,3 +55,5 @@ namespace dbaui
};
}
#endif // DBAUI_QUERYTABLECONNECTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
index 8f02ceac42a6..5a10614f89e7 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.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_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindow.hxx"
-#endif
using namespace dbaui;
@@ -173,6 +166,4 @@ sal_Bool OQueryTableConnectionData::Update()
}
// -----------------------------------------------------------------------------
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
index 2767b97b50ef..0b4c78d394a5 100644
--- a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx
+++ b/dbaccess/source/ui/querydesign/QTableConnectionData.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,21 +28,10 @@
#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#define DBAUI_QTABLECONNECTIONDATA_HXX
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
-#endif
-//#ifndef DBAUI_QUERYCONTROLLER_HXX
-//#include "querycontroller.hxx"
-//#endif
namespace dbaui
{
@@ -97,3 +87,5 @@ namespace dbaui
}
#endif // DBAUI_QTABLECONNECTIONDATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index 88514b57ac8f..48f9237bda97 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.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,70 +28,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
+#include <osl/diagnose.h>
#include "dbaccess_helpid.hrc"
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef _SV_IMAGE_HXX
#include <vcl/image.hxx>
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERY_HRC
#include "Query.hrc"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
#include <com/sun/star/sdbcx/KeyType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
-#ifndef DBAUI_TABLEFIELDINFO_HXX
#include "TableFieldInfo.hxx"
-#endif
-#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
using namespace ::com::sun::star::sdbc;
@@ -161,14 +120,13 @@ sal_Bool OQueryTableWindow::Init()
sAliasName = String(sAliasName).EraseAllChars('"');
SetAliasName(sAliasName);
// SetAliasName reicht das als WinName weiter, dadurch benutzt es die Basisklasse
- // reset the titel
+ // reset the title
m_aTitle.SetText( pWinData->GetWinName() );
m_aTitle.Show();
- // sal_Bool bSuccess(sal_True);
if (!bSuccess)
{ // es soll nur ein Dummy-Window aufgemacht werden ...
- DBG_ASSERT(GetAliasName().getLength(), "OQueryTableWindow::Init : kein Alias- UND kein Tabellenname geht nicht !");
+ OSL_ENSURE(GetAliasName().getLength(), "OQueryTableWindow::Init : kein Alias- UND kein Tabellenname geht nicht !");
// .. aber das braucht wenigstens einen Alias
// ::com::sun::star::form::ListBox anlegen
@@ -205,14 +163,14 @@ void OQueryTableWindow::deleteUserData(void*& _pUserData)
//------------------------------------------------------------------------------
void OQueryTableWindow::OnEntryDoubleClicked(SvLBoxEntry* pEntry)
{
- DBG_ASSERT(pEntry != NULL, "OQueryTableWindow::OnEntryDoubleClicked : pEntry darf nicht NULL sein !");
+ OSL_ENSURE(pEntry != NULL, "OQueryTableWindow::OnEntryDoubleClicked : pEntry darf nicht NULL sein !");
// man koennte das auch abfragen und dann ein return hinsetzen, aber so weist es vielleicht auf Fehler bei Aufrufer hin
if (getTableView()->getDesignView()->getController().isReadOnly())
return;
OTableFieldInfo* pInf = static_cast<OTableFieldInfo*>(pEntry->GetUserData());
- DBG_ASSERT(pInf != NULL, "OQueryTableWindow::OnEntryDoubleClicked : Feld hat keine FieldInfo !");
+ OSL_ENSURE(pInf != NULL, "OQueryTableWindow::OnEntryDoubleClicked : Feld hat keine FieldInfo !");
// eine DragInfo aufbauen
OTableFieldDescRef aInfo = new OTableFieldDesc(GetTableName(),m_pListBox->GetEntryText(pEntry));
@@ -228,8 +186,8 @@ void OQueryTableWindow::OnEntryDoubleClicked(SvLBoxEntry* pEntry)
//------------------------------------------------------------------------------
sal_Bool OQueryTableWindow::ExistsField(const ::rtl::OUString& strFieldName, OTableFieldDescRef& rInfo)
{
- DBG_ASSERT(m_pListBox != NULL, "OQueryTableWindow::ExistsField : habe keine ::com::sun::star::form::ListBox !");
- OSL_ENSURE(rInfo.isValid(),"OQueryTableWindow::ExistsField: invlid argument for OTableFieldDescRef!");
+ OSL_ENSURE(m_pListBox != NULL, "OQueryTableWindow::ExistsField : habe keine ::com::sun::star::form::ListBox !");
+ OSL_ENSURE(rInfo.is(),"OQueryTableWindow::ExistsField: invlid argument for OTableFieldDescRef!");
Reference< XConnection> xConnection = getTableView()->getDesignView()->getController().getConnection();
sal_Bool bExists = sal_False;
if(xConnection.is())
@@ -245,7 +203,7 @@ sal_Bool OQueryTableWindow::ExistsField(const ::rtl::OUString& strFieldName, OTa
if (bCase(strFieldName,::rtl::OUString(m_pListBox->GetEntryText(pEntry))))
{
OTableFieldInfo* pInf = static_cast<OTableFieldInfo*>(pEntry->GetUserData());
- DBG_ASSERT(pInf != NULL, "OQueryTableWindow::ExistsField : Feld hat keine FieldInfo !");
+ OSL_ENSURE(pInf != NULL, "OQueryTableWindow::ExistsField : Feld hat keine FieldInfo !");
rInfo->SetTabWindow(this);
rInfo->SetField(strFieldName);
@@ -280,5 +238,4 @@ void OQueryTableWindow::KeyInput( const KeyEvent& rEvt )
}
// -----------------------------------------------------------------------------
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.hxx b/dbaccess/source/ui/querydesign/QTableWindow.hxx
index 9eba590a89f6..16b5097ca6d0 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.hxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.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,18 +28,10 @@
#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#define DBAUI_QUERY_TABLEWINDOW_HXX
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindowData.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef _RTTI_HXX
#include <tools/rtti.hxx>
-#endif
namespace dbaui
{
@@ -98,3 +91,4 @@ namespace dbaui
#endif // DBAUI_QUERY_TABLEWINDOW_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableWindowData.cxx b/dbaccess/source/ui/querydesign/QTableWindowData.cxx
index 8a1a87704d53..1da1c2f30d63 100644
--- a/dbaccess/source/ui/querydesign/QTableWindowData.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindowData.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,12 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindowData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace dbaui;
@@ -60,3 +57,4 @@ OQueryTableWindowData::~OQueryTableWindowData()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QTableWindowData.hxx b/dbaccess/source/ui/querydesign/QTableWindowData.hxx
index 21f69b37fd9c..9a54e738a764 100644
--- a/dbaccess/source/ui/querydesign/QTableWindowData.hxx
+++ b/dbaccess/source/ui/querydesign/QTableWindowData.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,19 +28,13 @@
#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#define DBAUI_QUERY_TABLEWINDOWDATA_HXX
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
#ifndef INCLUDED_VECTOR
#define INCLUDED_VECTOR
#include <vector>
#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
#include <com/sun/star/io/XObjectOutputStream.hpp>
-#endif
-#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
#include <com/sun/star/io/XObjectInputStream.hpp>
-#endif
namespace dbaui
@@ -57,3 +52,4 @@ namespace dbaui
#endif // DBAUI_QUERY_TABLEWINDOWDATA_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx
index 17f02964be73..c0ef7d5ef1ef 100644
--- a/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.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_QUERYADDTABCONNUNDOACTION_HXX
#define DBAUI_QUERYADDTABCONNUNDOACTION_HXX
-#ifndef DBAUI_QUERYTABCONNUNDOACTION_HXX
#include "QueryTabConnUndoAction.hxx"
-#endif
namespace dbaui
{
@@ -61,3 +60,4 @@ namespace dbaui
#endif // DBAUI_QUERYADDTABCONNUNDOACTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
index 51491c29f98a..92a79f257efd 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.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,15 +28,9 @@
#ifndef DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
#define DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
-#ifndef DBAUI_GENERALUNDO_HXX
#include "GeneralUndo.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
#include "SelectionBrowseBox.hxx"
-#endif
namespace dbaui
@@ -163,3 +158,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
index 1aa1ef821181..f0f862cf3611 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.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_QUERYDESIGNUNDOACTION_HXX
#define DBAUI_QUERYDESIGNUNDOACTION_HXX
-#ifndef DBAUI_GENERALUNDO_HXX
#include "GeneralUndo.hxx"
-#endif
namespace dbaui
{
@@ -48,3 +47,4 @@ namespace dbaui
}
#endif // DBAUI_QUERYDESIGNUNDOACTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 7d88bc7c8840..a05bf39d5432 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.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,111 +28,42 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef _SV_TOOLBOX_HXX
#include <vcl/toolbox.hxx>
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
-#ifndef _UNDO_HXX
#include <svl/undo.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBAUI_QYDLGTAB_HXX
+#include <osl/diagnose.h>
#include "adtabdlg.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_COMBOBOX_HXX
#include <vcl/combobox.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
#include "SelectionBrowseBox.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _UTL_CONFIGMGR_HXX_
#include <unotools/configmgr.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 _COM_SUN_STAR_I18N_XLOCALEDATA_HPP_
#include <com/sun/star/i18n/XLocaleData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_
#include <com/sun/star/sdbc/ColumnValue.hpp>
-#endif
-#ifndef _CONNECTIVITY_PCOLUMN_HXX_
#include <connectivity/PColumn.hxx>
-#endif
-#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINEDATA_HXX
#include "ConnectionLineData.hxx"
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef INCLUDED_SVTOOLS_SYSLOCALE_HXX
#include <unotools/syslocale.hxx>
-#endif
using namespace ::dbaui;
using namespace ::utl;
@@ -152,8 +84,8 @@ using namespace ::com::sun::star::container;
// please look at the book LargeScale C++ to know why
namespace
{
- static const ::rtl::OUString C_AND = ::rtl::OUString::createFromAscii(" AND ");
- static const ::rtl::OUString C_OR = ::rtl::OUString::createFromAscii(" OR ");
+ static const ::rtl::OUString C_AND(RTL_CONSTASCII_USTRINGPARAM(" AND "));
+ static const ::rtl::OUString C_OR(RTL_CONSTASCII_USTRINGPARAM(" OR "));
// forward declarations
sal_Bool InsertJoin( const OQueryDesignView* _pView,
@@ -316,7 +248,7 @@ namespace
bError = sal_True;
}
}
- // check if error occured
+ // check if error occurred
if ( bError )
eErrorCode = eIllegalJoin;
@@ -401,7 +333,7 @@ namespace
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building Join criteria!");
+ OSL_FAIL("Failure while building Join criteria!");
}
}
@@ -444,7 +376,6 @@ namespace
{
::rtl::OUString aDBName(pEntryTab->GetComposedName());
- // Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection();
if( _xConnection.is() )
{
try
@@ -458,9 +389,9 @@ namespace
::rtl::OUString aQuote = xMetaData->getIdentifierQuoteString();
if ( _bForce || isAppendTableAliasEnabled( _xConnection ) || pEntryTab->GetAliasName() != aDBName )
{
- aTableListStr += ::rtl::OUString::createFromAscii(" ");
+ aTableListStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "));
if ( generateAsBeforeTableAlias( _xConnection ) )
- aTableListStr += ::rtl::OUString::createFromAscii("AS ");
+ aTableListStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AS "));
aTableListStr += ::dbtools::quoteName( aQuote, pEntryTab->GetAliasName() );
}
aDBName = aTableListStr;
@@ -550,8 +481,6 @@ namespace
if ( pEntryConnData->GetJoinType() == INNER_JOIN && !pEntryConnData->isNatural() )
return;
- // Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection();
-
if(!aJoin.getLength())
{
OQueryTableWindow* pEntryTabFrom = static_cast<OQueryTableWindow*>(pEntryConn->GetSourceWin());
@@ -621,7 +550,7 @@ namespace
else if (SQL_ISRULEOR2(pNode,search_condition,boolean_term) && // AND/OR-Verknuepfung:
pNode->count() == 3)
{
- // nur AND Verknpfung zulassen
+ // nur AND Verkn�pfung zulassen
if (!SQL_ISTOKEN(pNode->getChild(1),AND))
eErrorCode = eIllegalJoinCondition;
else if ( eOk == (eErrorCode = InsertJoinConnection(_pView,pNode->getChild(0), _eJoinType,pLeftTable,pRightTable)) )
@@ -630,7 +559,7 @@ namespace
else if (SQL_ISRULE(pNode,comparison_predicate))
{
// only the comparison of columns is allowed
- DBG_ASSERT(pNode->count() == 3,"OQueryDesignView::InsertJoinConnection: Fehler im Parse Tree");
+ OSL_ENSURE(pNode->count() == 3,"OQueryDesignView::InsertJoinConnection: Fehler im Parse Tree");
if (!(SQL_ISRULE(pNode->getChild(0),column_ref) &&
SQL_ISRULE(pNode->getChild(2),column_ref) &&
pNode->getChild(1)->getNodeType() == SQL_NODE_EQUAL))
@@ -649,7 +578,6 @@ namespace
if ( pLeftTable )
{
OQueryTableWindow* pLeftWindow = static_cast<OQueryTableView*>(_pView->getTableView())->FindTable( getTableRange(_pView,pLeftTable->getByRule(OSQLParseNode::table_ref) ));
- // OQueryTableWindow* pRightWindow = static_cast<OQueryTableView*>(_pView->getTableView())->FindTable( getTableRange(_pView,pRightTable->getByRule(OSQLParseNode::table_ref) ));
if ( pLeftWindow == aDragLeft->GetTabWindow() )
insertConnection(_pView,_eJoinType,aDragLeft,aDragRight);
else
@@ -750,7 +678,7 @@ namespace
if ( pEntryField->isAggreateFunction() )
{
- DBG_ASSERT(pEntryField->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
+ OSL_ENSURE(pEntryField->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
::rtl::OUStringBuffer aTmpStr2( pEntryField->GetFunction());
aTmpStr2.appendAscii("(");
aTmpStr2.append(aTmpStr.makeStringAndClear());
@@ -775,7 +703,7 @@ namespace
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building select list!");
+ OSL_FAIL("Failure while building select list!");
}
return aFieldListStr.makeStringAndClear();
}
@@ -913,7 +841,7 @@ namespace
}
}
}
- // nur einmal fr jedes Feld
+ // nur einmal f�r jedes Feld
else if ( !i && pEntryField->isCondition() )
{
if (!aWhereStr.getLength()) // noch keine Kriterien
@@ -950,7 +878,7 @@ namespace
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building where clause!");
+ OSL_FAIL("Failure while building where clause!");
}
return sal_True;
}
@@ -1003,7 +931,7 @@ namespace
}
else if ( pEntryField->isNumericOrAggreateFunction() )
{
- DBG_ASSERT(pEntryField->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
+ OSL_ENSURE(pEntryField->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
aWorkStr += pEntryField->GetFunction();
aWorkStr += ::rtl::OUString('(');
aWorkStr += quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote);
@@ -1044,14 +972,14 @@ namespace
eErrorCode = eStatementTooLong;
else
{
- _rsRet = ::rtl::OUString::createFromAscii(" ORDER BY ");
+ _rsRet = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ORDER BY "));
_rsRet += aWorkStr;
}
}
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building group by!");
+ OSL_FAIL("Failure while building group by!");
}
return eErrorCode;
@@ -1241,7 +1169,7 @@ namespace
OTableFieldDescRef pEntryField = *aIter;
if ( pEntryField->IsGroupBy() )
{
- DBG_ASSERT(pEntryField->GetField().getLength(),"Kein FieldName vorhanden!;-(");
+ OSL_ENSURE(pEntryField->GetField().getLength(),"Kein FieldName vorhanden!;-(");
::rtl::OUString sGroupByPart = quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote);
// only quote the field name when it isn't calculated
@@ -1279,14 +1207,14 @@ namespace
if ( aGroupByStr.getLength() )
{
aGroupByStr = aGroupByStr.replaceAt(aGroupByStr.getLength()-1,1, ::rtl::OUString(' ') );
- ::rtl::OUString aGroupByStr2 = ::rtl::OUString::createFromAscii(" GROUP BY ");
+ ::rtl::OUString aGroupByStr2(RTL_CONSTASCII_USTRINGPARAM(" GROUP BY "));
aGroupByStr2 += aGroupByStr;
aGroupByStr = aGroupByStr2;
}
}
catch(SQLException&)
{
- OSL_ASSERT(!"Failure while building group by!");
+ OSL_FAIL("Failure while building group by!");
}
return aGroupByStr;
}
@@ -1574,7 +1502,7 @@ namespace
aDragLeft->SetField(aCondition);
aDragLeft->SetFunctionType(FKT_CONDITION);
- eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).isValid() ? eOk : eTooManyColumns;
+ eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).is() ? eOk : eTooManyColumns;
}
else //! TODO not supported yet
eErrorCode = eStatementTooComplex;
@@ -1618,13 +1546,6 @@ namespace
&rController.getParser().getContext(),
sal_True,
sal_True); // quote is to true because we need quoted elements inside the function
- // i75557
- //pFunction->parseNodeToPredicateStr(aColumnName,
- // xConnection,
- // rController.getNumberFormatter(),
- // _pView->getLocale(),
- // static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()),
- // &rController.getParser().getContext());
// don't display the column name
aCondition = aCondition.copy(aColumnName.getLength());
aCondition = aCondition.trim();
@@ -1644,7 +1565,7 @@ namespace
for(;aIter != aTabEnd;++aIter)
{
OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second);
- if (pTabWin->ExistsField( ::rtl::OUString::createFromAscii("*"), aDragLeft ))
+ if (pTabWin->ExistsField( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")), aDragLeft ))
{
aDragLeft->SetAlias(String());
aDragLeft->SetTable(String());
@@ -1693,7 +1614,7 @@ namespace
SqlParseError eErrorCode = eOk;
OQueryController& rController = static_cast<OQueryController&>(_pView->getController());
- DBG_ASSERT(SQL_ISRULE( pCondition, comparison_predicate),"ComparisonPredicate: pCondition ist kein ComparisonPredicate");
+ OSL_ENSURE(SQL_ISRULE( pCondition, comparison_predicate),"ComparisonPredicate: pCondition ist kein ComparisonPredicate");
if ( SQL_ISRULE(pCondition->getChild(0), column_ref )
|| SQL_ISRULE(pCondition->getChild(pCondition->count()-1), column_ref) )
{
@@ -1758,22 +1679,22 @@ namespace
case SQL_NODE_LESS:
// take the opposite as we change the order
i--;
- aCondition = aCondition + ::rtl::OUString::createFromAscii(">");
+ aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(">"));
break;
case SQL_NODE_LESSEQ:
// take the opposite as we change the order
i--;
- aCondition = aCondition + ::rtl::OUString::createFromAscii(">=");
+ aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(">="));
break;
case SQL_NODE_GREAT:
// take the opposite as we change the order
i--;
- aCondition = aCondition + ::rtl::OUString::createFromAscii("<");
+ aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<"));
break;
case SQL_NODE_GREATEQ:
// take the opposite as we change the order
i--;
- aCondition = aCondition + ::rtl::OUString::createFromAscii("<=");
+ aCondition = aCondition + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("<="));
break;
default:
break;
@@ -1877,7 +1798,7 @@ namespace
rParseIter.getColumnRange( pColumnRef, aColumnName, aTableRange );
sal_Bool bFound(sal_False);
- DBG_ASSERT(aColumnName.getLength(),"Columnname darf nicht leer sein");
+ OSL_ENSURE(aColumnName.getLength(),"Columnname darf nicht leer sein");
if (!aTableRange.getLength())
{
// SELECT column, ...
@@ -1930,7 +1851,7 @@ namespace
sal_Bool InsertJoin(const OQueryDesignView* _pView,
const ::connectivity::OSQLParseNode *pNode)
{
- DBG_ASSERT( SQL_ISRULE( pNode, qualified_join ) || SQL_ISRULE( pNode, joined_table ) || SQL_ISRULE( pNode, cross_union ),
+ OSL_ENSURE( SQL_ISRULE( pNode, qualified_join ) || SQL_ISRULE( pNode, joined_table ) || SQL_ISRULE( pNode, cross_union ),
"OQueryDesignView::InsertJoin: Fehler im Parse Tree");
if (SQL_ISRULE(pNode,joined_table))
@@ -1944,7 +1865,7 @@ namespace
if ( !checkJoinConditions(_pView,pNode->getChild(0)) || !checkJoinConditions(_pView,pRightTableRef))
return sal_False;
- // named column join wird spter vieleicht noch implementiert
+ // named column join wird sp�ter vieleicht noch implementiert
// SQL_ISRULE(pNode->getChild(4),named_columns_join)
EJoinType eJoinType = INNER_JOIN;
bool bNatural = false;
@@ -2020,7 +1941,7 @@ namespace
OTableFields& rUnUsedFields = rController.getUnUsedFields();
OTableFields::iterator aEnd = rUnUsedFields.end();
for(OTableFields::iterator aIter = rUnUsedFields.begin();aIter != aEnd;++aIter)
- if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).isValid())
+ if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).is())
(*aIter) = NULL;
OTableFields().swap( rUnUsedFields );
}
@@ -2071,7 +1992,7 @@ namespace
Reference< XConnection> xConnection = rController.getConnection();
if ( !xConnection.is() )
{
- DBG_ERROR( "InitFromParseNodeImpl: no connection? no connection!" );
+ OSL_FAIL( "InitFromParseNodeImpl: no connection? no connection!" );
break;
}
@@ -2178,7 +2099,7 @@ namespace
}
catch(SQLException&)
{
- OSL_ASSERT(!"getMaxTablesInSelect!");
+ OSL_FAIL("getMaxTablesInSelect!");
}
}
while ( false );
@@ -2223,7 +2144,7 @@ namespace
return eNoSelectStatement;
::connectivity::OSQLParseNode* pParseTree = pNode->getChild(2); // selection
- sal_Bool bFirstField = sal_True; // bei der Initialisierung mu auf alle Faelle das erste Feld neu aktiviert werden
+ sal_Bool bFirstField = sal_True; // bei der Initialisierung mu� auf alle Faelle das erste Feld neu aktiviert werden
SqlParseError eErrorCode = eOk;
@@ -2281,11 +2202,6 @@ namespace
_pView->getLocale(),
static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()),
&rController.getParser().getContext());
- //pColumnRef->parseNodeToStr( aColumns,
- // xConnection,
- // &rController.getParser().getContext(),
- // sal_True,
- // sal_True); // quote is to true because we need quoted elements inside the function
sal_Int32 nFunctionType = FKT_NONE;
::connectivity::OSQLParseNode* pParamRef = NULL;
@@ -2308,7 +2224,7 @@ namespace
for(;aIter != aEnd;++aIter)
{
OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second);
- if (pTabWin->ExistsField( ::rtl::OUString::createFromAscii("*"), aInfo ))
+ if (pTabWin->ExistsField( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")), aInfo ))
{
aInfo->SetAlias(String());
aInfo->SetTable(String());
@@ -2355,7 +2271,7 @@ namespace
eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField);
bFirstField = sal_False;
}
- else //if(SQL_ISRULE(pColumnRef,num_value_exp) || SQL_ISRULE(pColumnRef,term))
+ else
{
::rtl::OUString aColumns;
pColumnRef->parseNodeToStr( aColumns,
@@ -2388,7 +2304,7 @@ namespace
break;
}
- DBG_ERROR( "InstallFields: don't know how to interpret this parse node!" );
+ OSL_FAIL( "InstallFields: don't know how to interpret this parse node!" );
} while ( false );
}
@@ -2438,7 +2354,7 @@ namespace
for(;aIter != aEnd;++aIter)
{
OTableFieldDescRef pEntry = *aIter;
- if(pEntry.isValid() && pEntry->GetFieldAlias() == aColumnName)
+ if(pEntry.is() && pEntry->GetFieldAlias() == aColumnName)
pEntry->SetOrderDir( eOrderDir );
}
}
@@ -2834,7 +2750,7 @@ bool OQueryDesignView::HasFieldByAliasName(const ::rtl::OUString& rFieldName, OT
// -----------------------------------------------------------------------------
SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis, sal_Bool bActivate)
{
- return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).isValid() ? eOk : eTooManyColumns;
+ return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).is() ? eOk : eTooManyColumns;
}
// -----------------------------------------------------------------------------
sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const
@@ -2848,7 +2764,7 @@ sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const
//------------------------------------------------------------------------------
void OQueryDesignView::fillValidFields(const ::rtl::OUString& sAliasName, ComboBox* pFieldList)
{
- DBG_ASSERT(pFieldList != NULL, "OQueryDesignView::FillValidFields : What the hell do you think I can do with a NULL-ptr ? This will crash !");
+ OSL_ENSURE(pFieldList != NULL, "OQueryDesignView::FillValidFields : What the hell do you think I can do with a NULL-ptr ? This will crash !");
pFieldList->Clear();
sal_Bool bAllTables = sAliasName.getLength() == 0;
@@ -2916,7 +2832,7 @@ sal_Bool OQueryDesignView::checkStatement()
{
sal_Bool bRet = sal_True;
if ( m_pSelectionBox )
- bRet = m_pSelectionBox->Save(); // a error occured so we return no
+ bRet = m_pSelectionBox->Save(); // an error occurred so we return no
return bRet;
}
//-------------------------------------------------------------------------------
@@ -2967,7 +2883,7 @@ sal_Bool OQueryDesignView::checkStatement()
const ::std::vector<OTableConnection*>* pConnList = m_pTableView->getTableConnections();
Reference< XConnection> xConnection = rController.getConnection();
::rtl::OUString aTableListStr(GenerateFromClause(xConnection,pTabList,pConnList));
- DBG_ASSERT(aTableListStr.getLength(), "OQueryDesignView::getStatement() : unerwartet : habe Felder, aber keine Tabellen !");
+ OSL_ENSURE(aTableListStr.getLength(), "OQueryDesignView::getStatement() : unerwartet : habe Felder, aber keine Tabellen !");
// wenn es Felder gibt, koennen die nur durch Einfuegen aus einer schon existenten Tabelle entstanden sein; wenn andererseits
// eine Tabelle geloescht wird, verschwinden auch die zugehoerigen Felder -> ergo KANN es das nicht geben, dass Felder
// existieren, aber keine Tabellen (und aFieldListStr hat schon eine Laenge, das stelle ich oben sicher)
@@ -2980,9 +2896,9 @@ sal_Bool OQueryDesignView::checkStatement()
GenerateInnerJoinCriterias(xConnection,aJoinCrit,pConnList);
if(aJoinCrit.getLength())
{
- ::rtl::OUString aTmp = ::rtl::OUString::createFromAscii("( ");
+ ::rtl::OUString aTmp(RTL_CONSTASCII_USTRINGPARAM("( "));
aTmp += aJoinCrit;
- aTmp += ::rtl::OUString::createFromAscii(" )");
+ aTmp += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" )"));
if(aCriteriaListStr.getLength())
{
aTmp += C_AND;
@@ -2991,16 +2907,16 @@ sal_Bool OQueryDesignView::checkStatement()
aCriteriaListStr = aTmp;
}
// ----------------- Statement aufbauen ----------------------
- ::rtl::OUStringBuffer aSqlCmd(::rtl::OUString::createFromAscii("SELECT "));
+ ::rtl::OUStringBuffer aSqlCmd(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT ")));
if(static_cast<OQueryController&>(getController()).isDistinct())
- aSqlCmd.append(::rtl::OUString::createFromAscii(" DISTINCT "));
+ aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DISTINCT ")));
aSqlCmd.append(aFieldListStr);
- aSqlCmd.append(::rtl::OUString::createFromAscii(" FROM "));
+ aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM ")));
aSqlCmd.append(aTableListStr);
if (aCriteriaListStr.getLength())
{
- aSqlCmd.append(::rtl::OUString::createFromAscii(" WHERE "));
+ aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE ")));
aSqlCmd.append(aCriteriaListStr.makeStringAndClear());
}
// ----------------- GroupBy aufbauen und Anh"angen ------------
@@ -3015,7 +2931,7 @@ sal_Bool OQueryDesignView::checkStatement()
// ----------------- having Anh"angen ------------
if(aHavingStr.getLength())
{
- aSqlCmd.append(::rtl::OUString::createFromAscii(" HAVING "));
+ aSqlCmd.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" HAVING ")));
aSqlCmd.append(aHavingStr.makeStringAndClear());
}
// ----------------- Sortierung aufbauen und Anh"angen ------------
@@ -3106,7 +3022,6 @@ void OQueryDesignView::SaveUIConfig()
{
OQueryController& rCtrl = static_cast<OQueryController&>(getController());
rCtrl.SaveTabWinsPosSize( m_pTableView->GetTabWinMap(), m_pScrollWindow->GetHScrollBar()->GetThumbPos(), m_pScrollWindow->GetVScrollBar()->GetThumbPos() );
- // rCtrl.SaveTabFieldsWidth( m_pSelectionBox );
rCtrl.setVisibleRows( m_pSelectionBox->GetNoneVisibleRows() );
if ( m_aSplitter.GetSplitPosPixel() != 0 )
rCtrl.setSplitPos( m_aSplitter.GetSplitPosPixel() );
@@ -3117,8 +3032,8 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE
::rtl::OUString& _rsErrorMessage,
Reference<XPropertySet>& _rxColumn) const
{
- OSL_ENSURE(pEntry.isValid(),"Entry is null!");
- if(!pEntry.isValid())
+ OSL_ENSURE(pEntry.is(),"Entry is null!");
+ if(!pEntry.is())
return NULL;
Reference< XConnection> xConnection = static_cast<OQueryController&>(getController()).getConnection();
if(!xConnection.is())
@@ -3237,7 +3152,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >&
++field
)
{
- ::vos::ORef< OTableFieldDesc > pField( new OTableFieldDesc() );
+ ::rtl::Reference< OTableFieldDesc > pField( new OTableFieldDesc() );
pField->Load( *field, true );
InsertField( pField, sal_True, sal_False );
}
@@ -3306,3 +3221,5 @@ void OQueryDesignView::fillFunctionInfo( const ::connectivity::OSQLParseNode* p
aInfo->SetTabWindow(NULL);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx
index eb15150a5449..73d056e6cd5d 100644
--- a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.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,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_OQUERYMOVETABWINUNDOACT_HXX
#include "QueryMoveTabWinUndoAct.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
using namespace dbaui;
//------------------------------------------------------------------------------
void OJoinMoveTabWinUndoAct::TogglePosition()
@@ -54,3 +49,4 @@ void OJoinMoveTabWinUndoAct::TogglePosition()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx
index 4e52665a6dd9..692bd3946fda 100644
--- a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.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,15 +28,9 @@
#ifndef DBAUI_OQUERYMOVETABWINUNDOACT_HXX
#define DBAUI_OQUERYMOVETABWINUNDOACT_HXX
-#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#include "QueryDesignUndoAction.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
-#endif
namespace dbaui
{
@@ -70,3 +65,4 @@ namespace dbaui
#endif // DBAUI_OQUERYMOVETABWINUNDOACT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
index 5b790c0506d0..11a2fc0412de 100644
--- a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.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,12 +28,8 @@
#ifndef DBAUI_QUERYSIZETABWINUNDOACT_HXX
#define DBAUI_QUERYSIZETABWINUNDOACT_HXX
-#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#include "QueryDesignUndoAction.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
namespace dbaui
{
@@ -86,3 +83,4 @@ namespace dbaui
#endif //DBAUI_QUERYSIZETABWINUNDOACT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
index 661ba69f68aa..daa6c840c1f3 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.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,27 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYTABCONNUNDOACTION_HXX
#include "QueryTabConnUndoAction.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERYADDTABCONNUNDOACTION_HXX
#include "QueryAddTabConnUndoAction.hxx"
-#endif
-#ifndef DBAUI_QUERYTABWINSHOWUNDOACT_HXX
#include "QueryTabWinShowUndoAct.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
using namespace dbaui;
@@ -148,3 +135,5 @@ void OQueryTabWinDelUndoAct::Redo()
SetOwnership(sal_True);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
index 7803df303bb5..186c522279d5 100644
--- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.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_QUERYTABCONNUNDOACTION_HXX
#define DBAUI_QUERYTABCONNUNDOACTION_HXX
-#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#include "QueryDesignUndoAction.hxx"
-#endif
namespace dbaui
{
@@ -57,3 +56,4 @@ namespace dbaui
#endif // DBAUI_QUERYTABCONNUNDOACTION_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx
index 897d86e028a6..f5988bd65786 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.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_QUERYTABWINSHOWUNDOACT_HXX
#define DBAUI_QUERYTABWINSHOWUNDOACT_HXX
-#ifndef DBAUI_QUERYTABWINUNDOACT_HXX
#include "QueryTabWinUndoAct.hxx"
-#endif
namespace dbaui
{
@@ -64,3 +63,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
index 864313775ab4..09ce9cd87d4c 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.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,30 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_OQueryTabWinUndoAct_HXX
#include "QueryTabWinUndoAct.hxx"
-#endif
-#ifndef _OSL_DIAGNOSE_H_
#include <osl/diagnose.h>
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOWDATA_HXX
#include "QTableWindowData.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
#include "QueryDesignFieldUndoAct.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
using namespace dbaui;
@@ -149,7 +134,4 @@ void OTabFieldMovedUndoAct::Undo()
}
// -----------------------------------------------------------------------------
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
index 4d32f23a6350..7afb6811e810 100644
--- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx
+++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.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_QUERYTABWINUNDOACT_HXX
#define DBAUI_QUERYTABWINUNDOACT_HXX
-#ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
#include "QueryDesignUndoAction.hxx"
-#endif
#ifndef INCLUDED_VECTOR
#define INCLUDED_VECTOR
#include <vector>
@@ -85,3 +84,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 2d38373ed1ab..4fe07e5331e8 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.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,100 +29,38 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDINFO_HXX
#include "TableFieldInfo.hxx"
-#endif
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
+#include <osl/diagnose.h>
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLECONNECTION_HXX
#include "QTableConnection.hxx"
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_QUERYADDTABCONNUNDOACTION_HXX
#include "QueryAddTabConnUndoAction.hxx"
-#endif
-#ifndef DBAUI_QUERYTABWINSHOWUNDOACT_HXX
#include "QueryTabWinShowUndoAct.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XKeysSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#endif
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#ifndef DBACCESS_JACCESS_HXX
#include "JAccess.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_
#include <com/sun/star/sdbcx/KeyType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
#include <com/sun/star/container/XIndexAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef DBAUI_QUERYDLG_HXX
#include "querydlg.hxx"
-#endif
-#ifndef DBAUI_JOINEXCHANGE_HXX
#include "JoinExchange.hxx"
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
using namespace dbaui;
using namespace ::com::sun::star::uno;
@@ -259,7 +198,7 @@ namespace
Reference<XPropertySet> xColumn;
if ( !( _rxSourceForeignKeyColumns->getByName(*pIter) >>= xColumn ) )
{
- OSL_ENSURE( false, "addConnections: invalid foreign key column!" );
+ OSL_FAIL( "addConnections: invalid foreign key column!" );
continue;
}
@@ -273,7 +212,7 @@ namespace
if(aFind.getLength())
pNewConnData->SetFieldIndex(JTCS_FROM,aFind[0]+1);
else
- OSL_ENSURE(0,"Column not found!");
+ OSL_FAIL("Column not found!");
}
// get the position inside the tabe
Reference<XNameAccess> xRefColumns = _rDest.GetOriginalColumns();
@@ -283,7 +222,7 @@ namespace
if(aFind.getLength())
pNewConnData->SetFieldIndex(JTCS_TO,aFind[0]+1);
else
- OSL_ENSURE(0,"Column not found!");
+ OSL_FAIL("Column not found!");
}
pNewConnData->AppendConnLine(*pIter,sRelatedColumn);
@@ -297,7 +236,6 @@ namespace
// automatically remove all connections adjacent to the win.
// (Because of this automatism we would have an ownerhsip ambiguity for
// the connection data if we would insert the conn-Undo-Action)
- // FS - 21.10.99 - 69183
}
}
}
@@ -345,7 +283,7 @@ void OQueryTableView::ReSync()
{
DBG_CHKTHIS(OQueryTableView,NULL);
TTableWindowData* pTabWinDataList = m_pView->getController().getTableWindowData();
- DBG_ASSERT((getTableConnections()->size()==0) && (GetTabWinMap()->size()==0),
+ OSL_ENSURE((getTableConnections()->size()==0) && (GetTabWinMap()->size()==0),
"vor OQueryTableView::ReSync() bitte ClearAll aufrufen !");
// ich brauche eine Sammlung aller Fensternamen, deren Anlegen schief geht, damit ich die entsprechenden Connections
@@ -501,7 +439,7 @@ void OQueryTableView::AddTabWin(const ::rtl::OUString& _rTableName, const ::rtl:
}
catch(SQLException&)
{
- OSL_ASSERT(!"qualifiedNameComponents");
+ OSL_FAIL("qualifiedNameComponents");
}
}
// -----------------------------------------------------------------------------
@@ -538,7 +476,7 @@ Reference<XPropertySet> getKeyReferencedTo(const Reference<XIndexAccess>& _rxKey
void OQueryTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& _rTableName, const ::rtl::OUString& strAlias, sal_Bool bNewTable)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- DBG_ASSERT(_rTableName.getLength() || strAlias.getLength(), "OQueryTableView::AddTabWin : kein Tabellen- und kein Aliasname !");
+ OSL_ENSURE(_rTableName.getLength() || strAlias.getLength(), "OQueryTableView::AddTabWin : kein Tabellen- und kein Aliasname !");
// wenn der Tabellenname nicht gesetzt ist, steht das fuer ein Dummy-Fenster, das braucht aber wenigstens einen Alias-Namen
// neue Datenstruktur erzeugen
@@ -814,7 +752,7 @@ void OQueryTableView::KeyInput( const KeyEvent& rEvt )
OQueryTableWindow* OQueryTableView::FindTable(const String& rAliasName)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- DBG_ASSERT(rAliasName.Len(), "OQueryTableView::FindTable : der AliasName sollte nicht leer sein !");
+ OSL_ENSURE(rAliasName.Len(), "OQueryTableView::FindTable : der AliasName sollte nicht leer sein !");
// (nicht dass es schadet, aber es ist sinnlos und weist vielleicht auf Fehler beim Aufrufer hin)
OTableWindowMap::const_iterator aIter = GetTabWinMap()->find(rAliasName);
if(aIter != GetTabWinMap()->end())
@@ -842,7 +780,7 @@ sal_Bool OQueryTableView::FindTableFromField(const String& rFieldName, OTableFie
void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- DBG_ASSERT(pTabWin != NULL, "OQueryTableView::RemoveTabWin : Fenster sollte ungleich NULL sein !");
+ OSL_ENSURE(pTabWin != NULL, "OQueryTableView::RemoveTabWin : Fenster sollte ungleich NULL sein !");
// mein Parent brauche ich, da es vom Loeschen erfahren soll
OQueryDesignView* pParent = static_cast<OQueryDesignView*>(getDesignView());
@@ -893,8 +831,6 @@ void OQueryTableView::GetConnection(OQueryTableConnection* pConn)
// bei mir und dem Dokument einfuegen
addConnection( pConn );
- // invalidieren (damit es neu gezeichnet wird)
- // pConn->Invalidate();
}
//------------------------------------------------------------------------
@@ -911,7 +847,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
{
DBG_CHKTHIS(OQueryTableView,NULL);
OTableWindowMap* pTabWins = GetTabWinMap();
- DBG_ASSERT(pTabWins != NULL, "OQueryTableView::HideTabWin : habe keine TabWins !");
+ OSL_ENSURE(pTabWins != NULL, "OQueryTableView::HideTabWin : habe keine TabWins !");
if (pTabWin)
{
@@ -992,7 +928,7 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn
if (pTabWin->Init())
{
TTableWindowData::value_type pData = pTabWin->GetData();
- DBG_ASSERT(pData != NULL, "OQueryTableView::ShowTabWin : TabWin hat keine Daten !");
+ OSL_ENSURE(pData != NULL, "OQueryTableView::ShowTabWin : TabWin hat keine Daten !");
// Wenn die Daten schon PosSize haben, diese benutzen
if (pData->HasPosition() && pData->HasSize())
{
@@ -1024,9 +960,6 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn
for(;aIter != aEnd;++aIter)
addConnection(*aIter); // add all connections from the undo action
- // each connection should invalidated inside addConnection so we don't need this here any longer
-// if ( !pOwnList->empty() )
-// InvalidateConnections();
pTableCon->clear();
// und die Daten des Fensters ebenfalls in Liste (des Docs)
@@ -1062,7 +995,7 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn
void OQueryTableView::InsertField(const OTableFieldDescRef& rInfo)
{
DBG_CHKTHIS(OQueryTableView,NULL);
- DBG_ASSERT(getDesignView() != NULL, "OQueryTableView::InsertField : habe kein Parent !");
+ OSL_ENSURE(getDesignView() != NULL, "OQueryTableView::InsertField : habe kein Parent !");
static_cast<OQueryDesignView*>(getDesignView())->InsertField(rInfo);
}
//------------------------------------------------------------------------------
@@ -1098,3 +1031,5 @@ bool OQueryTableView::supressCrossNaturalJoin(const TTableConnectionData::value_
return pQueryData && (pQueryData->GetJoinType() == CROSS_JOIN);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx
index 690316c35087..47d076163d27 100644
--- a/dbaccess/source/ui/querydesign/QueryTextView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTextView.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,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYVIEW_TEXT_HXX
#include "QueryTextView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
-#ifndef DBAUI_QUERYVIEWSWITCH_HXX
#include "QueryViewSwitch.hxx"
-#endif
-#ifndef DBAUI_SQLEDIT_HXX
#include "sqledit.hxx"
-#endif
-#ifndef DBAUI_UNDOSQLEDIT_HXX
#include "undosqledit.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
-#ifndef _SV_SPLIT_HXX
#include <vcl/split.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
using namespace dbaui;
using namespace ::com::sun::star::uno;
@@ -89,7 +62,6 @@ OQueryTextView::OQueryTextView(OQueryContainerWindow* _pParent)
m_pEdit->SaveValue();
m_pEdit->SetPosPixel( Point( 0, 0 ) );
m_pEdit->Show();
- // m_pEdit->GrabFocus();
}
// -----------------------------------------------------------------------------
OQueryTextView::~OQueryTextView()
@@ -177,3 +149,5 @@ void OQueryTextView::paste()
getContainerWindow()->getDesignView()->getController().setModified(sal_True);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
index 19e6933a37d3..845e63b0a052 100644
--- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx
+++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.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,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYVIEWSWITCH_HXX
#include "QueryViewSwitch.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYVIEW_TEXT_HXX
#include "QueryTextView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef DBAUI_QYDLGTAB_HXX
#include "adtabdlg.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_SQLEDIT_HXX
#include "sqledit.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
using namespace dbaui;
using namespace ::com::sun::star::uno;
@@ -359,3 +340,5 @@ void OQueryViewSwitch::setNoneVisbleRow(sal_Int32 _nRows)
m_pDesignView->setNoneVisbleRow(_nRows);
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 66c7dd6cedff..b361a9ff5f2c 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.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,75 +28,29 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
#include "SelectionBrowseBox.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBACCESS_UI_BROWSER_ID_HXX
#include "browserids.hxx"
-#endif
-#ifndef _COMPHELPER_TYPES_HXX_
#include <comphelper/types.hxx>
-#endif
-#ifndef DBAUI_TABLEFIELDINFO_HXX
#include "TableFieldInfo.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef _DBA_DBACCESS_HELPID_HRC_
#include "dbaccess_helpid.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef DBAUI_QUERY_TABLEWINDOW_HXX
#include "QTableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
-#ifndef DBAUI_QUERYDESIGNFIELDUNDOACT_HXX
#include "QueryDesignFieldUndoAct.hxx"
-#endif
-#ifndef _SVX_DBEXCH_HRC
#include <svx/dbexch.hrc>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef _COMPHELPER_EXTRACT_HXX_
#include <comphelper/extract.hxx>
-#endif
-#ifndef _DBAUI_SQLMESSAGE_HXX_
#include "sqlmessage.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
+#include <osl/diagnose.h>
using namespace ::svt;
using namespace ::dbaui;
@@ -181,7 +136,6 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
| BROWSER_HEADERBAR_NEW ;
m_pTextCell = new Edit(&GetDataWindow(), 0);
- // m_pTextCell->EnableSpecialCheck(sal_False);
m_pVisibleCell = new CheckBoxControl(&GetDataWindow());
m_pTableCell = new ListBoxControl(&GetDataWindow()); m_pTableCell->SetDropDownLineCount( 20 );
m_pFieldCell = new ComboBoxControl(&GetDataWindow()); m_pFieldCell->SetDropDownLineCount( 20 );
@@ -198,9 +152,6 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
// TriState der ::com::sun::star::form::CheckBox abschalten
m_pVisibleCell->GetBox().EnableTriState( sal_False );
-// m_pEmptyEntry = new OTableFieldDesc();
-// m_pEmptyEntry->SetColWidth(DEFAULT_SIZE);
-
Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguage(),DEFAULTFONT_FLAGS_ONLYONE);
aTitleFont.SetSize(Size(0, 6));
SetTitleFont(aTitleFont);
@@ -257,16 +208,16 @@ void OSelectionBrowseBox::initialize()
String sGroup = m_aFunctionStrings.GetToken(m_aFunctionStrings.GetTokenCount() - 1);
m_aFunctionStrings = m_aFunctionStrings.GetToken(0);
- for (size_t i = 0; i < sizeof(eFunctions)/sizeof(eFunctions[0]) ; ++i)
+ for (size_t i = 0; i < SAL_N_ELEMENTS(eFunctions); ++i)
{
m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
m_aFunctionStrings += String(ByteString(rContext.getIntlKeywordAscii(eFunctions[i])),RTL_TEXTENCODING_UTF8);
- } // for (sal_Int32 i = 0; i < sizeof(eFunctions)/sizeof(eFunctions[0]) ; ++i)
+ }
m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
m_aFunctionStrings += sGroup;
- // Diese Funktionen stehen nur unter CORE zur Verfgung
+ // Diese Funktionen stehen nur unter CORE zur Verf�gung
if ( lcl_SupportsCoreSQLGrammar(xConnection) )
{
xub_StrLen nCount = m_aFunctionStrings.GetTokenCount();
@@ -381,11 +332,11 @@ void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo )
pUndoAct->SetTabFieldDescr(pOldEntry);
getDesignView()->getController().addUndoActionAndInvalidate(pUndoAct);
- } // if ( !m_bInUndoMode && _bCreateUndo )
+ }
}
}
else
- OSL_ENSURE(0,"Invalid column id!");
+ OSL_FAIL("Invalid column id!");
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox::Init()
@@ -407,12 +358,12 @@ void OSelectionBrowseBox::Init()
Size aHeight;
const Control* pControls[] = { m_pTextCell,m_pVisibleCell,m_pTableCell,m_pFieldCell };
- for(sal_Size i= 0; i < sizeof(pControls)/sizeof(pControls[0]);++i)
+ for(sal_Size i= 0; i < SAL_N_ELEMENTS(pControls);++i)
{
const Size aTemp( pControls[i]->GetOptimalSize(WINDOWSIZE_PREFERRED) );
if ( aTemp.Height() > aHeight.Height() )
aHeight.Height() = aTemp.Height();
- } // for(int i= 0; i < sizeof(pControls)/sizeof(pControls[0]);++i
+ }
SetDataRowHeight(aHeight.Height());
SetTitleLines(1);
// Anzahl der sichtbaren Zeilen ermitteln
@@ -436,7 +387,7 @@ void OSelectionBrowseBox::Init()
}
catch(const SQLException&)
{
- OSL_ENSURE(0,"Catched Exception when asking for database metadata options!");
+ OSL_FAIL("Catched Exception when asking for database metadata options!");
m_nMaxColumns = 0;
}
}
@@ -500,9 +451,9 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId)
if ( nColId > getFields().size() )
return NULL;
OTableFieldDescRef pEntry = getFields()[nColId-1];
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetController : keine FieldDescription !");
+ OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::GetController : keine FieldDescription !");
- if (!pEntry.isValid())
+ if (!pEntry.is())
return NULL;
if (static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly())
@@ -537,7 +488,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
if ( nPos == 0 || nPos == BROWSER_INVALIDID || nPos > getFields().size() )
return;
OTableFieldDescRef pEntry = getFields()[nPos-1];
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::InitController : keine FieldDescription !");
+ OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::InitController : keine FieldDescription !");
long nCellIndex = GetRealRow(nRow);
switch (nCellIndex)
@@ -689,7 +640,7 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const ::rtl::OUString& _sColumnName,
if ( pTabWinList )
{
sal_uInt16 nTabCount = 0;
- if ( !static_cast<OQueryTableView*>(getDesignView()->getTableView())->FindTableFromField(_sColumnName,_pEntry,nTabCount) ) // error occured: column not in table window
+ if ( !static_cast<OQueryTableView*>(getDesignView()->getTableView())->FindTableFromField(_sColumnName,_pEntry,nTabCount) ) // error occurred: column not in table window
{
String sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST));
sErrorMsg.SearchAndReplaceAscii("$name$",_sColumnName);
@@ -761,7 +712,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
if ( _pEntry->isAggreateFunction() )
{
- DBG_ASSERT(_pEntry->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
+ OSL_ENSURE(_pEntry->GetFunction().getLength(),"Functionname darf hier nicht leer sein! ;-(");
::rtl::OUStringBuffer aTmpStr2( _pEntry->GetFunction());
aTmpStr2.appendAscii("(");
aTmpStr2.append(sSql);
@@ -812,7 +763,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
{
sal_uInt16 nColumnPostion;
aSelEntry = FindFirstFreeCol(nColumnPostion);
- if ( !aSelEntry.isValid() )
+ if ( !aSelEntry.is() )
{
AppendNewCol(1);
aSelEntry = FindFirstFreeCol(nColumnPostion);
@@ -895,7 +846,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
notifyFunctionFieldChanged(sOldLocalizedFunctionName,sLocalizedFunctionName,_bListAction, nColumnId);
}
else
- OSL_ENSURE(0,"Unsupported function inserted!");
+ OSL_FAIL("Unsupported function inserted!");
}
else
@@ -949,7 +900,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
}
}
- if ( i > 0 && InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).isEmpty() ) // may we have to append more than one field
+ if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).is() ) // may we have to append more than one field
{ // the field could not be isnerted
String sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) );
sErrorMessage.SearchAndReplaceAscii("$name$",aSelEntry->GetField());
@@ -972,11 +923,11 @@ sal_Bool OSelectionBrowseBox::SaveModified()
if(getFields().size() > static_cast<sal_uInt16>(nCurrentColumnPos - 1))
pEntry = getEntry(nCurrentColumnPos - 1);
- sal_Bool bWasEmpty = pEntry.isValid() ? pEntry->IsEmpty() : sal_False;
+ sal_Bool bWasEmpty = pEntry.is() ? pEntry->IsEmpty() : sal_False;
sal_Bool bError = sal_False;
sal_Bool bListAction = sal_False;
- if (pEntry.isValid() && Controller().Is() && Controller()->IsModified())
+ if (pEntry.is() && Controller().Is() && Controller()->IsModified())
{
// fuer die Undo-Action
String strOldCellContents,sNewValue;
@@ -1117,7 +1068,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
{
strOldCellContents = pEntry->GetFunction();
sal_uInt16 nPos = m_pFunctionCell->GetSelectEntryPos();
- // Diese Funktionen stehen nur unter CORE zur Verfgung
+ // Diese Funktionen stehen nur unter CORE zur Verf�gung
String sFunctionName = m_pFunctionCell->GetEntry(nPos);
String sGroupFunctionName = m_aFunctionStrings.GetToken(m_aFunctionStrings.GetTokenCount()-1);
sal_Bool bGroupBy = sal_False;
@@ -1239,7 +1190,6 @@ sal_Bool OSelectionBrowseBox::SaveModified()
bError = sal_True;
}
}
- // }
}
strOldCellContents = pEntry->GetCriteria(nIdx);
pEntry->SetCriteria(nIdx, aCrit);
@@ -1269,7 +1219,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
}
// habe ich Daten in einer FieldDescription gespeichert, die vorher leer war und es nach den Aenderungen nicht mehr ist ?
- if ( pEntry.isValid() && bWasEmpty && !pEntry->IsEmpty() && !bError )
+ if ( pEntry.is() && bWasEmpty && !pEntry->IsEmpty() && !bError )
{
// Default auf sichtbar
pEntry->SetVisible(sal_True);
@@ -1311,7 +1261,7 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
if(getFields().size() > sal_uInt16(nPos - 1))
pEntry = getFields()[nPos - 1];
- if (!pEntry.isValid())
+ if (!pEntry.is())
return;
long nRow = GetRealRow(m_nSeekRow);
@@ -1346,7 +1296,7 @@ void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId)
sal_uInt16 nPos = GetColumnPos(_nColumnId);
// das Control sollte immer genau eine Spalte mehr haben, naemlich die HandleColumn
- DBG_ASSERT((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::RemoveColumn : invalid parameter nColId");
+ OSL_ENSURE((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::RemoveColumn : invalid parameter nColId");
// ColId ist bei mir gleichbedeutend mit Position, und da sollte die Bedingung natuerlich zutreffen
sal_uInt16 nCurCol = GetCurColumnId();
@@ -1402,7 +1352,7 @@ void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId )
//------------------------------------------------------------------------------
void OSelectionBrowseBox::adjustSelectionMode( sal_Bool _bClickedOntoHeader, sal_Bool _bClickedOntoHandleCol )
{
- // wenn ein Header selectiert wird, mu die selection angezeigt werden, sonst nicht)
+ // wenn ein Header selectiert wird, mu� die selection angezeigt werden, sonst nicht)
if ( _bClickedOntoHeader )
{
if (0 == GetSelectColumnCount() )
@@ -1476,7 +1426,7 @@ sal_Int8 OSelectionBrowseBox::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
{
if ( IsEditing() )
{
- // #100271# OJ allow the asterix again
+ // allow the asterix again
m_bDisableErrorBox = sal_True;
SaveModified();
m_bDisableErrorBox = sal_False;
@@ -1498,7 +1448,7 @@ sal_Int8 OSelectionBrowseBox::ExecuteDrop( const BrowserExecuteDropEvent& _rEvt
TransferableDataHelper aDropped(_rEvt.maDropEvent.Transferable);
if (!OJoinExchObj::isFormatAvailable(aDropped.GetDataFlavorExVector()))
{
- DBG_ERROR("OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop!");
+ OSL_FAIL("OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop!");
return DND_ACTION_NONE;
}
@@ -1573,7 +1523,7 @@ void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth)
// der FieldDescription Bescheid sagen
OTableFieldDescRef pEntry = getEntry(GetColumnPos(nColId) - 1);
- if (pEntry.isValid())
+ if (pEntry.is())
pEntry->SetColWidth(sal_uInt16(GetColumnWidth(nColId)));
if (bWasEditing)
@@ -1601,7 +1551,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
// das Control sollte immer genau eine Spalte mehr haben, naemlich die HandleColumn
- DBG_ASSERT(_nColumnPostion == BROWSER_INVALIDID || (_nColumnPostion <= (long)getFields().size()), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
+ OSL_ENSURE(_nColumnPostion == BROWSER_INVALIDID || (_nColumnPostion <= (long)getFields().size()), "OSelectionBrowseBox::InsertColumn : invalid parameter nColId.");
// -1 heisst ganz hinten, Count heisst ganz hinten, der Rest bezeichnet eine richtige Position
sal_uInt16 nCurCol = GetCurColumnId();
@@ -1638,7 +1588,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n
getFields()[nOldPosition - 1] = pEntry;
ColumnMoved(pEntry->GetColumnId(),sal_False);
- } // if ( pEntry->GetColumnId() != nColumnId )
+ }
if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) )
{
@@ -1724,7 +1674,7 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount()
while (aIter != getFields().end())
{
- if ((*aIter).isValid() && !(*aIter)->IsEmpty())
+ if ((*aIter).is() && !(*aIter)->IsEmpty())
++nCount;
++aIter;
}
@@ -1745,7 +1695,7 @@ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(sal_uInt16& _rColumnPos
{
++_rColumnPosition;
OTableFieldDescRef pEntry = (*aIter);
- if ( pEntry.isValid() && pEntry->IsEmpty() )
+ if ( pEntry.is() && pEntry->IsEmpty() )
return pEntry;
++aIter;
}
@@ -1761,7 +1711,7 @@ void OSelectionBrowseBox::CheckFreeColumns(sal_uInt16& _rColumnPosition)
{
// es ist voll, also einen Packen Spalten anhaengen
AppendNewCol(DEFAULT_QUERY_COLS);
- OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).isValid());
+ OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).is());
}
}
//------------------------------------------------------------------------------
@@ -1771,7 +1721,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
if(!xConnection.is())
return;
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(!rInfo->IsEmpty(),"AddGroupBy:: OTableFieldDescRef sollte nicht Empty sein!");
+ OSL_ENSURE(!rInfo->IsEmpty(),"AddGroupBy:: OTableFieldDescRef sollte nicht Empty sein!");
OTableFieldDescRef pEntry;
const Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
const ::comphelper::UStringMixEqual bCase(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
@@ -1783,7 +1733,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
for(;aIter != aEnd;++aIter)
{
pEntry = *aIter;
- OSL_ENSURE(pEntry.isValid(),"OTableFieldDescRef was null!");
+ OSL_ENSURE(pEntry.is(),"OTableFieldDescRef was null!");
const ::rtl::OUString aField = pEntry->GetField();
const ::rtl::OUString aAlias = pEntry->GetAlias();
@@ -1843,8 +1793,8 @@ void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel)
++m_nVisibleCount;
}
m_bVisibleRow[BROW_CRIT1_ROW + nNewLevel] = sal_True;
- } // if (!pEntry->GetCriteria(nLevel).getLength() )
- } // for(;aIter != getFields().end();++aIter)
+ }
+ }
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const String& rValue, const sal_uInt16 nLevel,bool _bAddOrOnOneLine )
@@ -1853,7 +1803,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
if(!xConnection.is())
return;
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(rInfo.isValid() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!");
+ OSL_ENSURE(rInfo.is() && !rInfo->IsEmpty(),"AddCondition:: OTableFieldDescRef sollte nicht Empty sein!");
OTableFieldDescRef pLastEntry;
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
@@ -1878,7 +1828,6 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
pEntry->SetGroupBy(sal_False);
else
{
-// pEntry->SetGroupBy(rInfo->IsGroupBy());
if(!m_bGroupByUnRelated && pEntry->IsGroupBy())
pEntry->SetVisible(sal_True);
}
@@ -1893,14 +1842,14 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
}
m_bVisibleRow[BROW_CRIT1_ROW + nLevel] = sal_True;
break;
- } // if (!pEntry->GetCriteria(nLevel).getLength() )
+ }
if ( _bAddOrOnOneLine )
{
pLastEntry = pEntry;
}
}
- } // for(;aIter != getFields().end();++aIter)
- if ( pLastEntry.isValid() )
+ }
+ if ( pLastEntry.is() )
{
String sCriteria = rValue;
String sOldCriteria = pLastEntry->GetCriteria( nLevel );
@@ -1927,7 +1876,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S
OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False );
if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // das GroupBy wird bereits von rInfo "ubernommen
pTmp->SetGroupBy(sal_False);
- if ( pTmp.isValid() )
+ if ( pTmp.is() )
{
pTmp->SetCriteria( nLevel, rValue);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
@@ -1947,7 +1896,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
if(!xConnection.is())
return;
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(!rInfo->IsEmpty(),"AddOrder:: OTableFieldDescRef sollte nicht Empty sein!");
+ OSL_ENSURE(!rInfo->IsEmpty(),"AddOrder:: OTableFieldDescRef sollte nicht Empty sein!");
OTableFieldDescRef pEntry;
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
::comphelper::UStringMixEqual bCase(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
@@ -1982,7 +1931,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
if (aIter == rFields.end())
{
OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False );
- if(pTmp.isValid())
+ if(pTmp.is())
{
if ( !m_bOrderByUnRelated && !bAppend )
pTmp->SetVisible(sal_True);
@@ -2040,7 +1989,7 @@ void OSelectionBrowseBox::CellModified()
void OSelectionBrowseBox::Fill()
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(ColCount() >= 1, "OSelectionBrowseBox::Fill : please call only after inserting the handle column !");
+ OSL_ENSURE(ColCount() >= 1, "OSelectionBrowseBox::Fill : please call only after inserting the handle column !");
sal_uInt16 nColCount = ColCount() - 1;
if (nColCount < DEFAULT_QUERY_COLS)
@@ -2160,7 +2109,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
//------------------------------------------------------------------------------
sal_Bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const
{
- DBG_ASSERT(_nWhich<(m_bVisibleRow.size()), "OSelectionBrowseBox::IsRowVisible : invalid parameter !");
+ OSL_ENSURE(_nWhich<(m_bVisibleRow.size()), "OSelectionBrowseBox::IsRowVisible : invalid parameter !");
return m_bVisibleRow[_nWhich];
}
@@ -2168,7 +2117,7 @@ sal_Bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const
void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- DBG_ASSERT(_nWhich<m_bVisibleRow.size(), "OSelectionBrowseBox::SetRowVisible : invalid parameter !");
+ OSL_ENSURE(_nWhich<m_bVisibleRow.size(), "OSelectionBrowseBox::SetRowVisible : invalid parameter !");
sal_Bool bWasEditing = IsEditing();
if (bWasEditing)
@@ -2218,7 +2167,7 @@ long OSelectionBrowseBox::GetRealRow(long nRowId) const
break;
}
}
- DBG_ASSERT(nErg <= long(m_bVisibleRow.size()),"nErg kann nicht groesser als BROW_ROW_CNT sein!");
+ OSL_ENSURE(nErg <= long(m_bVisibleRow.size()),"nErg kann nicht groesser als BROW_ROW_CNT sein!");
return i;
}
static long nVisibleRowMask[] =
@@ -2241,7 +2190,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const
{
sal_Int32 nErg(0);
// only the first 11 row are interesting
- sal_Int32 nSize = sizeof(nVisibleRowMask) / sizeof(nVisibleRowMask[0]);
+ sal_Int32 nSize = SAL_N_ELEMENTS(nVisibleRowMask);
for(sal_Int32 i=0;i<nSize;i++)
{
if(!m_bVisibleRow[i])
@@ -2253,7 +2202,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const
void OSelectionBrowseBox::SetNoneVisbleRow(long nRows)
{
// only the first 11 row are interesting
- sal_Int32 nSize = sizeof(nVisibleRowMask) / sizeof(nVisibleRowMask[0]);
+ sal_Int32 nSize = SAL_N_ELEMENTS(nVisibleRowMask);
for(sal_Int32 i=0;i< nSize;i++)
m_bVisibleRow[i] = !(nRows & nVisibleRowMask[i]);
}
@@ -2265,7 +2214,7 @@ String OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const
sal_uInt16 nPos = GetColumnPos(nColId);
OTableFieldDescRef pEntry = getFields()[nPos-1];
- DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::GetCellText : invalid column id, prepare for GPF ... ");
+ OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::GetCellText : invalid column id, prepare for GPF ... ");
if ( pEntry->IsEmpty() )
return String();
@@ -2384,13 +2333,12 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId,Strin
String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId)
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
- // DBG_ASSERT(nCellIndex < (GetRowCount()-1),"CellIndex ist zu gross");
if ( GetCurColumnId() == nColId && !m_bInUndoMode )
SaveModified();
sal_uInt16 nPos = GetColumnPos(nColId);
OTableFieldDescRef pEntry = getFields()[nPos - 1];
- DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::GetCellContents : invalid column id, prepare for GPF ... ");
+ OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::GetCellContents : invalid column id, prepare for GPF ... ");
switch (nCellIndex)
{
@@ -2418,7 +2366,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con
sal_uInt16 nPos = GetColumnPos(nColId);
OTableFieldDescRef pEntry = getEntry(nPos - 1);
- DBG_ASSERT(pEntry != NULL, "OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... ");
+ OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... ");
switch (nRow)
@@ -2501,13 +2449,13 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId)
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
sal_uInt16 nPos = GetColumnPos(nColId);
- DBG_ASSERT(nPos <= getFields().size(),"ColumnResized:: nColId sollte nicht groesser als List::count sein!");
+ OSL_ENSURE(nPos <= getFields().size(),"ColumnResized:: nColId sollte nicht groesser als List::count sein!");
OTableFieldDescRef pEntry = getEntry(nPos-1);
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !");
+ OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::ColumnResized : keine FieldDescription !");
static_cast<OQueryController&>(getDesignView()->getController()).setModified( sal_True );
EditBrowseBox::ColumnResized(nColId);
- if ( pEntry.isValid())
+ if ( pEntry.is())
{
if ( !m_bInUndoMode )
{
@@ -2526,10 +2474,10 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId
{
DBG_CHKTHIS(OSelectionBrowseBox,NULL);
sal_uInt16 nPos = GetColumnPos(nColId);
- DBG_ASSERT((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
+ OSL_ENSURE((nPos == 0) || (nPos <= getFields().size()), "OSelectionBrowseBox::GetTotalCellWidth : invalid parameter nColId");
OTableFieldDescRef pEntry = getFields()[nPos-1];
- DBG_ASSERT(pEntry.isValid(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
+ OSL_ENSURE(pEntry.is(), "OSelectionBrowseBox::GetTotalCellWidth : invalid FieldDescription !");
long nRow = GetRealRow(nRowId);
String strText(GetCellText(nRow, nColId));
@@ -2730,8 +2678,8 @@ OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos)
OSL_ENSURE(aFields.size() > _nPos,"ColID is to great!");
OTableFieldDescRef pEntry = aFields[_nPos];
- OSL_ENSURE(pEntry.isValid(),"Invalid entry!");
- if ( !pEntry.isValid() )
+ OSL_ENSURE(pEntry.is(),"Invalid entry!");
+ if ( !pEntry.is() )
{
pEntry = new OTableFieldDesc();
pEntry->SetColumnId(
@@ -2806,7 +2754,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry)
Reference< XConnection> xConnection = static_cast<OQueryController&>(getDesignView()->getController()).getConnection();
if ( xConnection.is() )
{
- // Diese Funktionen stehen nur unter CORE zur Verfgung
+ // Diese Funktionen stehen nur unter CORE zur Verf�gung
if ( lcl_SupportsCoreSQLGrammar(xConnection) )
{
// if we have an asterix, no other function than count is allowed
@@ -2859,7 +2807,7 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n
if(getFields().size() > sal_uInt16(_nColumnPos - 1))
pEntry = getFields()[_nColumnPos - 1];
- if ( _nRow == BROW_VIS_ROW && pEntry.isValid() )
+ if ( _nRow == BROW_VIS_ROW && pEntry.is() )
return EditBrowseBox::CreateAccessibleCheckBoxCell( _nRow, _nColumnPos,pEntry->IsVisible() ? STATE_CHECK : STATE_NOCHECK );
return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos );
@@ -2875,7 +2823,7 @@ bool OSelectionBrowseBox::HasFieldByAliasName(const ::rtl::OUString& rFieldName,
{
if ( (*aIter)->GetFieldAlias() == rFieldName )
{
- rInfo.getBody() = (*aIter).getBody();
+ *rInfo = *(*aIter);
break;
}
}
@@ -2883,3 +2831,4 @@ bool OSelectionBrowseBox::HasFieldByAliasName(const ::rtl::OUString& rFieldName,
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 79aaf49c56e4..fc361d5fc16f 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.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,30 +28,13 @@
#ifndef DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
#define DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX
-#ifndef _SVTOOLS_EDITBROWSEBOX_HXX_
#include <svtools/editbrowsebox.hxx>
-#endif
-//#ifndef DBAUI_QUERYCONTROLLER_HXX
-//#include "querycontroller.hxx"
-//#endif
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef DBAUI_JOINEXCHANGE_HXX
#include "JoinExchange.hxx"
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
#include <com/sun/star/util/XNumberFormatter.hpp>
-#endif
-#ifndef _STRING_HXX
#include <tools/string.hxx>
-#endif
-#ifndef _TRANSFER_HXX
#include <svtools/transfer.hxx>
-#endif
namespace connectivity
{
@@ -275,7 +259,7 @@ namespace dbaui
@param _bListAction
Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
@return
- <TRUE/> if an error occured otherwise <FALSE/>
+ <TRUE/> if an error occurred otherwise <FALSE/>
*/
sal_Bool saveField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction);
@@ -299,7 +283,7 @@ namespace dbaui
@param _bListAction
Will be set to <TRUE/> when we are in a list action otherwise <FALSE/>
@return
- <TRUE/> if an error occured otherwise <FALSE/>
+ <TRUE/> if an error occurred otherwise <FALSE/>
*/
sal_Bool fillColumnRef( const ::connectivity::OSQLParseNode* _pColumnRef,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
@@ -360,3 +344,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx
index ce168efda15e..0edc45d81868 100644
--- a/dbaccess/source/ui/querydesign/TableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnection.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,24 +28,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef DBAUI_CONNECTIONLINE_HXX
#include "ConnectionLine.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
#include <comphelper/stl_types.hxx>
-#endif
-#ifndef DBACCESS_CONNECTIONLINEACCESS_HXX
#include "ConnectionLineAccess.hxx"
-#endif
#include <algorithm>
@@ -254,3 +243,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx
index 93c0d8652cbf..2c5737159884 100644
--- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnectionData.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,15 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLECONNECTIONDATA_HXX
#include "TableConnectionData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COMPHELPER_STLTYPES_HXX_
+#include <osl/diagnose.h>
#include <comphelper/stl_types.hxx>
-#endif
using namespace dbaui;
using namespace comphelper;
@@ -65,7 +61,7 @@ void OTableConnectionData::Init()
{
//////////////////////////////////////////////////////////////////////
// LineDataList mit Defaults initialisieren
- DBG_ASSERT(m_vConnLineData.size() == 0, "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !");
+ OSL_ENSURE(m_vConnLineData.size() == 0, "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !");
ResetConnLines(sal_True);
// das legt Defaults an
}
@@ -88,7 +84,6 @@ OTableConnectionData::~OTableConnectionData()
DBG_DTOR(OTableConnectionData,NULL);
// LineDataList loeschen
OConnectionLineDataVec().swap(m_vConnLineData);
- //ResetConnLines(sal_False);
}
//------------------------------------------------------------------------
@@ -126,7 +121,7 @@ sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSo
return AppendConnLine(rSourceFieldName, rDestFieldName);
OConnectionLineDataRef pConnLineData = m_vConnLineData[nIndex];
- DBG_ASSERT(pConnLineData != NULL, "OTableConnectionData::SetConnLine : habe ungueltiges LineData-Objekt");
+ OSL_ENSURE(pConnLineData != NULL, "OTableConnectionData::SetConnLine : habe ungueltiges LineData-Objekt");
pConnLineData->SetSourceFieldName( rSourceFieldName );
pConnLineData->SetDestFieldName( rDestFieldName );
@@ -147,7 +142,7 @@ sal_Bool OTableConnectionData::AppendConnLine( const ::rtl::OUString& rSourceFie
if(aIter == aEnd)
{
OConnectionLineDataRef pNew = new OConnectionLineData(rSourceFieldName, rDestFieldName);
- if (!pNew.isValid())
+ if (!pNew.is())
return sal_False;
m_vConnLineData.push_back(pNew);
@@ -200,3 +195,4 @@ void OTableConnectionData::normalizeLines()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
index 8ea775f8dd2c..ef607a73da96 100644
--- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldDescription.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,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEFIELDDESC_HXX
#include "TableFieldDescription.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_DATATYPE_HPP_
#include <com/sun/star/sdbc/DataType.hpp>
-#endif
#include <comphelper/namedvaluecollection.hxx>
#include <functional>
@@ -65,7 +60,7 @@ OTableFieldDesc::OTableFieldDesc()
}
//------------------------------------------------------------------------------
OTableFieldDesc::OTableFieldDesc(const OTableFieldDesc& rRS)
- : ::vos::OReference()
+ : ::salhelper::SimpleReferenceObject()
{
DBG_CTOR(OTableFieldDesc,NULL);
@@ -244,3 +239,4 @@ void OTableFieldDesc::Save( ::comphelper::NamedValueCollection& o_rSettings, con
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableFieldInfo.cxx b/dbaccess/source/ui/querydesign/TableFieldInfo.cxx
index 71b800e6fe5f..bb990295e60b 100644
--- a/dbaccess/source/ui/querydesign/TableFieldInfo.cxx
+++ b/dbaccess/source/ui/querydesign/TableFieldInfo.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,12 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEFIELDINFO_HXX
#include "TableFieldInfo.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
using namespace dbaui;
//==================================================================
@@ -57,3 +54,4 @@ OTableFieldInfo::~OTableFieldInfo()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableFieldInfo.hxx b/dbaccess/source/ui/querydesign/TableFieldInfo.hxx
index d8cced2f0005..090d71735665 100644
--- a/dbaccess/source/ui/querydesign/TableFieldInfo.hxx
+++ b/dbaccess/source/ui/querydesign/TableFieldInfo.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,12 +28,8 @@
#ifndef DBAUI_TABLEFIELDINFO_HXX
#define DBAUI_TABLEFIELDINFO_HXX
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef _SAL_TYPES_H_
#include <sal/types.h>
-#endif
namespace dbaui
{
@@ -55,3 +52,4 @@ namespace dbaui
#endif // DBAUI_TABLEFIELDINFO_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 665c614a4d61..44e226852802 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.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,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
-#ifndef DBACCESS_IMAGEPROVIDER_HXX
#include "imageprovider.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef _SV_SVAPP_HXX
+#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_WALL_HXX
#include <vcl/wall.hxx>
-#endif
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -140,7 +121,7 @@ OTableWindow::~OTableWindow()
OSL_ENSURE(m_pListBox->GetEntryCount()==0,"Forgot to call EmptyListbox()!");
::std::auto_ptr<Window> aTemp(m_pListBox);
m_pListBox = NULL;
- } // if (m_pListBox)
+ }
if ( m_pContainerListener.is() )
m_pContainerListener->dispose();
@@ -207,13 +188,13 @@ sal_Bool OTableWindow::FillListBox()
m_pContainerListener = new ::comphelper::OContainerListenerAdapter(this,xContainer);
}
// mark all primary keys with special image
- ModuleRes TmpRes(isHiContrast(m_pListBox) ? IMG_JOINS_H : IMG_JOINS);
+ ModuleRes TmpRes(IMG_JOINS);
ImageList aImageList(TmpRes);
Image aPrimKeyImage = aImageList.GetImage(IMG_PRIMARY_KEY);
if (GetData()->IsShowAll())
{
- SvLBoxEntry* pEntry = m_pListBox->InsertEntry( ::rtl::OUString::createFromAscii("*") );
+ SvLBoxEntry* pEntry = m_pListBox->InsertEntry( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) );
pEntry->SetUserData( createUserData(NULL,false) );
}
@@ -224,7 +205,7 @@ sal_Bool OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occured!");
+ OSL_FAIL("Exception occurred!");
}
try
{
@@ -253,7 +234,7 @@ sal_Bool OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occured!");
+ OSL_FAIL("Exception occurred!");
}
return sal_True;
@@ -292,17 +273,16 @@ void OTableWindow::impl_updateImage()
{
ImageProvider aImageProvider( getDesignView()->getController().getConnection() );
- Image aImage, aImageHC;
- aImageProvider.getImages( GetComposedName(), m_pData->isQuery() ? DatabaseObject::QUERY : DatabaseObject::TABLE, aImage, aImageHC );
+ Image aImage;
+ aImageProvider.getImages( GetComposedName(), m_pData->isQuery() ? DatabaseObject::QUERY : DatabaseObject::TABLE, aImage );
- if ( !aImage || !aImageHC )
+ if ( !aImage )
{
- OSL_ENSURE( false, "OTableWindow::impl_updateImage: no images!" );
+ OSL_FAIL( "OTableWindow::impl_updateImage: no images!" );
return;
}
- m_aTypeImage.SetModeImage( aImage, BMP_COLOR_NORMAL );
- m_aTypeImage.SetModeImage( aImageHC, BMP_COLOR_HIGHCONTRAST );
+ m_aTypeImage.SetModeImage( aImage );
m_aTypeImage.Show();
}
@@ -313,7 +293,7 @@ sal_Bool OTableWindow::Init()
if ( !m_pListBox )
{
m_pListBox = CreateListBox();
- DBG_ASSERT( m_pListBox != NULL, "OTableWindow::Init() : CreateListBox hat NULL geliefert !" );
+ OSL_ENSURE( m_pListBox != NULL, "OTableWindow::Init() : CreateListBox hat NULL geliefert !" );
m_pListBox->SetSelectionMode( MULTIPLE_SELECTION );
}
@@ -820,3 +800,4 @@ void OTableWindow::_elementReplaced( const container::ContainerEvent& /*_rEvent*
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
index a9c4840b8e35..4d316871efd8 100644
--- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowAccess.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,45 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBACCESS_TABLEWINDOWACCESS_HXX
#include "TableWindowAccess.hxx"
-#endif
-#ifndef DBACCESS_JACCESS_HXX
#include "JAccess.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_JOINDESIGNVIEW_HXX
#include "JoinDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
#include <comphelper/sequence.hxx>
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
namespace dbaui
@@ -74,7 +49,6 @@ namespace dbaui
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
- // using namespace ::com::sun::star::awt;
using namespace ::com::sun::star;
OTableWindowAccess::OTableWindowAccess(OTableWindow* _pTable)
@@ -125,14 +99,14 @@ namespace dbaui
Sequence< ::rtl::OUString > OTableWindowAccess::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString > aSupported(2);
- aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.accessibility.Accessible");
- aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.accessibility.AccessibleContext");
+ aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.Accessible"));
+ aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.accessibility.AccessibleContext"));
return aSupported;
}
// -----------------------------------------------------------------------------
::rtl::OUString OTableWindowAccess::getImplementationName_Static(void) throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.TableWindowAccessibility");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.TableWindowAccessibility"));
}
// -----------------------------------------------------------------------------
// XAccessibleContext
@@ -317,3 +291,4 @@ namespace dbaui
}
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindowData.cxx b/dbaccess/source/ui/querydesign/TableWindowData.cxx
index 08bff33149df..708a12906d22 100644
--- a/dbaccess/source/ui/querydesign/TableWindowData.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowData.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,12 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEWINDOWDATA_HXX
#include "TableWindowData.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
@@ -155,3 +152,5 @@ void OTableWindowData::listen()
}
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index 9f44e1956474..4df65db90916 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.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,36 +28,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_JOINEXCHANGE_HXX
#include "JoinExchange.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
-#include <tools/debug.hxx>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
+#include <osl/diagnose.h>
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef _SVX_DBEXCH_HRC
#include <svx/dbexch.hrc>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
using namespace dbaui;
using namespace ::com::sun::star::sdbc;
@@ -96,7 +77,7 @@ OTableWindowListBox::OTableWindowListBox( OTableWindow* pParent )
void OTableWindowListBox::dragFinished( )
{
// first show the error msg when existing
- m_pTabWin->getDesignView()->getController().showError(m_pTabWin->getDesignView()->getController().clearOccuredError());
+ m_pTabWin->getDesignView()->getController().showError(m_pTabWin->getDesignView()->getController().clearOccurredError());
// second look for ui activities which should happen after d&d
if (m_nUiEvent)
Application::RemoveUserEvent(m_nUiEvent);
@@ -185,7 +166,6 @@ long OTableWindowListBox::PreNotify(NotifyEvent& rNEvt)
if(m_pTabWin)
{
bHandled = m_pTabWin->HandleKeyInput(*pKeyEvent);
- // bHandled = sal_True;
}
break;
}
@@ -215,7 +195,6 @@ IMPL_LINK( OTableWindowListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ )
ScrollOutputArea( -1 );
pEntry = GetEntry( m_aMousePos );
Select( pEntry, sal_True );
-// m_aScrollTimer.Start();
}
return 0;
@@ -233,7 +212,6 @@ IMPL_LINK( OTableWindowListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ )
ScrollOutputArea( 1 );
pEntry = GetEntry( m_aMousePos );
Select( pEntry, sal_True );
-// m_aScrollTimer.Start();
}
return 0;
@@ -245,7 +223,7 @@ void OTableWindowListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPi
OJoinTableView* pCont = m_pTabWin->getTableView();
if (!pCont->getDesignView()->getController().isReadOnly() && pCont->getDesignView()->getController().isConnected())
{
- // #100271# OJ asterix was not allowed to be copied to selection browsebox
+ // asterix was not allowed to be copied to selection browsebox
sal_Bool bFirstNotAllowed = FirstSelected() == First() && m_pTabWin->GetData()->IsShowAll();
EndSelection();
// create a description of the source
@@ -266,7 +244,6 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt )
&& OJoinExchObj::isFormatAvailable(GetDataFlavorExVector(),SOT_FORMATSTR_ID_SBA_JOIN) )
{ // don't drop into the window if it's the drag source itself
-
// remove the selection if the dragging operation is leaving the window
if (_rEvt.mbLeaving)
SelectAll(sal_False);
@@ -345,7 +322,7 @@ IMPL_LINK( OTableWindowListBox, DropHdl, void *, /*EMPTY_ARG*/)
catch(const SQLException& e)
{
// remember the exception so that we can show them later when d&d is finished
- m_pTabWin->getDesignView()->getController().setErrorOccured(::dbtools::SQLExceptionInfo(e));
+ m_pTabWin->getDesignView()->getController().setErrorOccurred(::dbtools::SQLExceptionInfo(e));
}
return 0L;
}
@@ -400,7 +377,7 @@ IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ )
{
// meinem Elter Bescheid sagen
Window* pParent = Window::GetParent();
- DBG_ASSERT(pParent != NULL, "OTableWindowListBox::OnDoubleClick : habe kein Parent !");
+ OSL_ENSURE(pParent != NULL, "OTableWindowListBox::OnDoubleClick : habe kein Parent !");
static_cast<OTableWindow*>(pParent)->OnEntryDoubleClicked(GetHdlEntry());
@@ -421,3 +398,5 @@ void OTableWindowListBox::Command(const CommandEvent& rEvt)
}
}
// -----------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
index 37e22b92d0e0..e09b3dc4d3c1 100644
--- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowTitle.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,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_TABLEWINDOWTITLE_HXX
#include "TableWindowTitle.hxx"
-#endif
-#ifndef DBAUI_TABLEWINDOW_HXX
#include "TableWindow.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_HELP_HXX
#include <vcl/help.hxx>
-#endif
-#ifndef _SV_MENU_HXX
#include <vcl/menu.hxx>
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _CNTIDS_HRC
#include <sfx2/cntids.hrc>
-#endif
-#ifndef DBAUI_TABLEWINDOWLISTBOX_HXX
#include "TableWindowListBox.hxx"
-#endif
-#ifndef DBAUI_TABLECONNECTION_HXX
#include "TableConnection.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
#include <algorithm>
@@ -156,15 +129,6 @@ void OTableWindowTitle::Command( const CommandEvent& rEvt )
}
//------------------------------------------------------------------------------
-//void OTableWindowTitle::Paint( const Rectangle& rRect )
-//{
-// //////////////////////////////////////////////////////////////////////
-// // Ausgabe des Textes in der Titelzeile
-// Rectangle aWinRect( Point(0,0), GetSizePixel() );
-// DrawText( aWinRect, GetText(), TEXT_DRAW_CENTER|TEXT_DRAW_VCENTER|TEXT_DRAW_ENDELLIPSIS );
-//}
-
-//------------------------------------------------------------------------------
void OTableWindowTitle::KeyInput( const KeyEvent& rEvt )
{
if ( m_pTabWin )
@@ -243,6 +207,4 @@ void OTableWindowTitle::StateChanged( StateChangedType nType )
}
}
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/makefile.mk b/dbaccess/source/ui/querydesign/makefile.mk
deleted file mode 100644
index 36e36c960023..000000000000
--- a/dbaccess/source/ui/querydesign/makefile.mk
+++ /dev/null
@@ -1,89 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-PRJINC=$(PRJ)$/source
-PRJNAME=dbaccess
-TARGET=querydesign
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES =\
- $(SLO)$/ConnectionLineAccess.obj \
- $(SLO)$/TableWindowAccess.obj \
- $(SLO)$/JAccess.obj \
- $(SLO)$/JoinDesignView.obj \
- $(SLO)$/JoinController.obj \
- $(SLO)$/QueryDesignView.obj \
- $(SLO)$/SelectionBrowseBox.obj \
- $(SLO)$/querydlg.obj \
- $(SLO)$/QueryTabWinUndoAct.obj \
- $(SLO)$/QueryMoveTabWinUndoAct.obj \
- $(SLO)$/QueryTabConnUndoAction.obj \
- $(SLO)$/TableFieldDescription.obj \
- $(SLO)$/JoinTableView.obj \
- $(SLO)$/QueryViewSwitch.obj \
- $(SLO)$/QueryTableView.obj \
- $(SLO)$/TableWindowData.obj \
- $(SLO)$/QTableWindow.obj \
- $(SLO)$/TableWindow.obj \
- $(SLO)$/JoinExchange.obj \
- $(SLO)$/TableWindowListBox.obj \
- $(SLO)$/TableWindowTitle.obj \
- $(SLO)$/QueryTextView.obj \
- $(SLO)$/QTableConnection.obj \
- $(SLO)$/querycontroller.obj \
- $(SLO)$/querycontainerwindow.obj \
- $(SLO)$/queryview.obj \
- $(SLO)$/TableConnection.obj \
- $(SLO)$/TableConnectionData.obj
-
-SLOFILES =\
- $(EXCEPTIONSFILES) \
- $(SLO)$/TableFieldInfo.obj \
- $(SLO)$/QTableConnectionData.obj \
- $(SLO)$/QTableWindowData.obj \
- $(SLO)$/ConnectionLine.obj \
- $(SLO)$/ConnectionLineData.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES = query.src \
- querydlg.src \
-
-# --- Targets -------------------------------------------------------
-
-
-.INCLUDE : target.mk
-
-$(SRS)$/$(TARGET).srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
-
diff --git a/dbaccess/source/ui/querydesign/query.src b/dbaccess/source/ui/querydesign/query.src
index 01e4182e72ff..e5d4b4d964e7 100644
--- a/dbaccess/source/ui/querydesign/query.src
+++ b/dbaccess/source/ui/querydesign/query.src
@@ -97,27 +97,11 @@ Menu RID_QUERYCOLPOPUPMENU
};
};
};
+
ImageList IMG_JOINS
{
Prefix = "jo";
- MaskColor = Color {
- Red = 0xffff;
- Green = 0x0000;
- Blue = 0xffff;
- };
- IdList = {
- IMG_PRIMARY_KEY; IMG_FOREIGN_KEY;
- };
- IdCount = { 2; };
-};
-ImageList IMG_JOINS_H
-{
- Prefix = "joh";
- MaskColor = Color {
- Red = 0xffff;
- Green = 0x0000;
- Blue = 0xffff;
- };
+ MaskColor = Color { Red = 0xffff; Green = 0x0000; Blue = 0xffff; };
IdList = {
IMG_PRIMARY_KEY; IMG_FOREIGN_KEY;
};
@@ -161,6 +145,7 @@ String STR_QUERY_UNDO_TABFIELDCREATE
{
Text [ en-US ] = "Add Column" ;
};
+
String RID_STR_TABLE_DOESNT_EXIST
{
Text [ en-US ] = "Invalid expression, table '$name$' does not exist.";
@@ -170,6 +155,7 @@ String RID_STR_FIELD_DOESNT_EXIST
{
Text [ en-US ] = "Invalid expression, field name '$name$' does not exist.";
};
+
String RID_STR_TOMUCHTABLES
{
Text [ en-US ] = "The query covers #num# tables. The selected database type, however, can only process a maximum of #maxnum# table(s) per statement.";
@@ -184,10 +170,12 @@ String STR_QUERY_UNDO_MODIFY_CELL
{
Text [ en-US ] = "Edit Column Description";
};
+
String STR_QUERY_UNDO_SIZE_COLUMN
{
Text [ en-US ] = "Adjust column width";
};
+
String STR_QUERY_SORTTEXT
{
Text [ en-US ] = "(not sorted);ascending;descending" ;
@@ -197,14 +185,17 @@ String STR_QUERY_FUNCTIONS
{
Text [ en-US ] = "(no function);Group";
};
+
String STR_QUERY_NOTABLE
{
Text [ en-US ] = "(no table)";
};
+
String STR_QRY_ORDERBY_UNRELATED
{
Text [ en-US ] = "The database only supports sorting for visible fields.";
};
+
Menu RID_QUERYFUNCTION_POPUPMENU
{
ItemList =
@@ -243,6 +234,7 @@ Menu RID_QUERYFUNCTION_POPUPMENU
};
};
};
+
String STR_QUERY_HANDLETEXT
{
Text [ en-US ] = "Field;Alias;Table;Sort;Visible;Function;Criterion;Or;Or";
@@ -257,30 +249,39 @@ ErrorBox ERR_QRY_CRITERIA_ON_ASTERISK
{
Message [ en-US ] = "A condition cannot be applied to field [*]" ;
};
+
String STR_QRY_TOO_LONG_STATEMENT
{
Text [ en-US ] = "The SQL statement created is too long.";
};
+
String STR_QRY_TOOCOMPLEX
{
Text [ en-US ] = "Query is too complex" ;
};
+
String STR_QRY_NOSELECT
{
Text [ en-US ] = "Nothing has been selected." ;
};
+
String STR_QRY_TOOMANYCOND
{
Text [ en-US ] = "Too many search criteria" ;
};
+
String STR_QRY_SYNTAX
{
Text [ en-US ] = "SQL syntax error" ;
};
+
ErrorBox ERR_QRY_ORDERBY_ON_ASTERISK
{
Message [ en-US ] = "[*] cannot be used as a sort criterion.";
};
+
+
+
String STR_QRY_TOO_MANY_TABLES
{
Text [ en-US ] = "There are too many tables.";
@@ -290,10 +291,12 @@ String STR_QRY_NATIVE
{
Text [ en-US ] = "The statement will not be applied when querying in the SQL dialect of the database." ;
};
+
ErrorBox ERR_QRY_AMB_FIELD
{
Message [ en-US ] = "Field name not found or not unique" ;
};
+
String STR_QRY_ILLEGAL_JOIN
{
Text [ en-US ] = "Join could not be processed" ;
diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index b288ff197f26..76a4d30ed845 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.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,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYCONTAINERWINDOW_HXX
#include "querycontainerwindow.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef DBAUI_JOINCONTROLLER_HXX
#include "JoinController.hxx"
-#endif
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _SFXSIDS_HRC
#include <sfx2/sfxsids.hrc>
-#endif
-#ifndef _SV_FIXED_HXX
#include <vcl/fixed.hxx>
-#endif
-#ifndef DBAUI_TOOLS_HXX
#include "UITools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XCLOSEABLE_HPP_
#include <com/sun/star/util/XCloseable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
-#endif
//.........................................................................
namespace dbaui
@@ -109,12 +86,11 @@ namespace dbaui
m_xBeamer = NULL;
if(xCloseable.is())
xCloseable->close(sal_False); // false - holds the owner ship of this frame
- // m_xBeamer->setComponent(NULL,NULL);
- }
- {
- ::std::auto_ptr<Window> aTemp(m_pSplitter);
- m_pSplitter = NULL;
}
+
+ ::std::auto_ptr<Window> aTemp(m_pSplitter);
+ m_pSplitter = NULL;
+
}
// -----------------------------------------------------------------------------
bool OQueryContainerWindow::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo )
@@ -230,7 +206,7 @@ namespace dbaui
::dbaui::notifySystemWindow(this,m_pBeamer,::comphelper::mem_fun(&TaskPaneList::AddWindow));
- Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Frame")),UNO_QUERY );
+ Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame"))),UNO_QUERY );
m_xBeamer.set( xBeamerFrame );
OSL_ENSURE(m_xBeamer.is(),"No frame created!");
m_xBeamer->initialize( VCLUnoHelper::GetInterface ( m_pBeamer ) );
@@ -286,3 +262,4 @@ namespace dbaui
//.........................................................................
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 276899efbf0b..3df54e243b5a 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.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.
@@ -89,9 +90,10 @@
#include <svtools/localresaccess.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
+#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
extern "C" void SAL_CALL createRegistryInfo_OQueryControl()
{
@@ -123,12 +125,12 @@ namespace dbaui
// need by registration
static ::rtl::OUString getImplementationName_Static() throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.OViewDesign");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OViewDesign"));
}
static Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString> aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.ViewDesign");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ViewDesign"));
return aSupported;
}
static Reference< XInterface > SAL_CALL Create(const Reference< XMultiServiceFactory >& _rM)
@@ -155,11 +157,11 @@ namespace dbaui
if (!_pNode->isToken())
{
// Regelnamen als rule: ...
- rString = ::rtl::OUString::createFromAscii("RULE_ID: ");
+ rString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RULE_ID: "));
rString += ::rtl::OUString::valueOf( (sal_Int32)_pNode->getRuleID());
- rString+= ::rtl::OUString::createFromAscii("(");
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("("));
rString += OSQLParser::RuleIDToStr(_pNode->getRuleID());
- rString+= ::rtl::OUString::createFromAscii(")");
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"));
_pParent = _pBox->InsertEntry(rString,_pParent);
@@ -180,53 +182,58 @@ namespace dbaui
case SQL_NODE_KEYWORD:
{
- rString+= ::rtl::OUString::createFromAscii("SQL_KEYWORD:");
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_KEYWORD:"));
::rtl::OString sT = OSQLParser::TokenIDToStr(_pNode->getTokenID());
rString += ::rtl::OUString(sT,sT.getLength(),RTL_TEXTENCODING_UTF8);
break;}
case SQL_NODE_COMPARISON:
- {rString+= ::rtl::OUString::createFromAscii("SQL_COMPARISON:");
- rString += _pNode->getTokenValue(); // haenge Nodevalue an
+ {
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_COMPARISON:"));
+ rString += _pNode->getTokenValue(); // haenge Nodevalue an
// und beginne neu Zeile
- break;}
+ break;}
case SQL_NODE_NAME:
- {rString+= ::rtl::OUString::createFromAscii("SQL_NAME:");
- rString+= ::rtl::OUString::createFromAscii("\"");
- rString += _pNode->getTokenValue();
- rString+= ::rtl::OUString::createFromAscii("\"");
-
- break;}
+ {
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_NAME:"));
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
+ rString += _pNode->getTokenValue();
+ rString+= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
+ break;}
case SQL_NODE_STRING:
- {rString += ::rtl::OUString::createFromAscii("SQL_STRING:'");
- rString += _pNode->getTokenValue();
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_STRING:'"));
+ rString += _pNode->getTokenValue();
+ break;}
case SQL_NODE_INTNUM:
- {rString += ::rtl::OUString::createFromAscii("SQL_INTNUM:");
- rString += _pNode->getTokenValue();
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_INTNUM:"));
+ rString += _pNode->getTokenValue();
+ break;}
case SQL_NODE_APPROXNUM:
- {rString += ::rtl::OUString::createFromAscii("SQL_APPROXNUM:");
- rString += _pNode->getTokenValue();
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_APPROXNUM:"));
+ rString += _pNode->getTokenValue();
+ break;}
case SQL_NODE_PUNCTUATION:
- {rString += ::rtl::OUString::createFromAscii("SQL_PUNCTUATION:");
- rString += _pNode->getTokenValue(); // haenge Nodevalue an
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_PUNCTUATION:"));
+ rString += _pNode->getTokenValue(); // haenge Nodevalue an
+ break;}
case SQL_NODE_AMMSC:
- {rString += ::rtl::OUString::createFromAscii("SQL_AMMSC:");
- rString += _pNode->getTokenValue(); // haenge Nodevalue an
-
- break;}
+ {
+ rString += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQL_AMMSC:"));
+ rString += _pNode->getTokenValue(); // haenge Nodevalue an
+ break;}
default:
- OSL_ASSERT("OSQLParser::ShowParseTree: unzulaessiger NodeType");
+ OSL_FAIL("OSQLParser::ShowParseTree: unzulaessiger NodeType");
rString += _pNode->getTokenValue();
}
_pBox->InsertEntry(rString,_pParent);
@@ -302,13 +309,13 @@ namespace
//------------------------------------------------------------------------------
::rtl::OUString OQueryController::getImplementationName_Static() throw( RuntimeException )
{
- return ::rtl::OUString::createFromAscii("org.openoffice.comp.dbu.OQueryDesign");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OQueryDesign"));
}
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString> OQueryController::getSupportedServiceNames_Static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString> aSupported(1);
- aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdb.QueryDesign");
+ aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.QueryDesign"));
return aSupported;
}
//-------------------------------------------------------------------------
@@ -354,7 +361,7 @@ OQueryController::~OQueryController()
DBG_DTOR(OQueryController,NULL);
if ( !getBroadcastHelper().bDisposed && !getBroadcastHelper().bInDispose )
{
- OSL_ENSURE(0,"Please check who doesn't dispose this component!");
+ OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
osl_incrementInterlockedCount( &m_refCount );
dispose();
@@ -664,7 +671,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
}
}
}
- catch(const SQLException& e)
+ catch(const SQLException&)
{
aError = ::cppu::getCaughtException();
}
@@ -693,7 +700,6 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
if(m_bGraphicalDesign)
InvalidateFeature(ID_BROWSER_ADDTABLE);
}
- // InvalidateFeature(ID_BROWSER_QUERY_EXECUTE);
break;
case SID_QUERY_VIEW_FUNCTIONS:
case SID_QUERY_VIEW_TABLES:
@@ -719,29 +725,24 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
{
xCloseFrame->close( sal_True );
}
- catch( const Exception& )
+ catch(const Exception&)
{
- OSL_ENSURE( sal_False, "OQueryController::Execute(SID_DB_QUERY_PREVIEW): *nobody* is expected to veto closing the preview frame!" );
+ OSL_FAIL( "OQueryController::Execute(SID_DB_QUERY_PREVIEW): *nobody* is expected to veto closing the preview frame!" );
}
}
else
Execute(ID_BROWSER_QUERY_EXECUTE,Sequence< PropertyValue >());
}
- catch(Exception&)
+ catch(const Exception&)
{
}
break;
case ID_QUERY_ZOOM_IN:
{
-// m_aZoom *= Fraction(1,10);
-// static_cast<OQueryViewSwitch*>(getView())->zoomTableView(m_aZoom);
}
break;
case ID_QUERY_ZOOM_OUT:
{
-// if(m_aZoom != Fraction(1,1))
-// m_aZoom /= Fraction(1,10);
-// static_cast<OQueryViewSwitch*>(getView())->zoomTableView(m_aZoom);
}
break;
#if OSL_DEBUG_LEVEL > 1
@@ -778,11 +779,10 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
pNodeTmp = pTemp->getChild(1);
OSQLParseNode::compress(pNodeTmp);
pNodeTmp = pTemp->getChild(1);
- } // if ( pCondition ) // no where clause
+ }
::rtl::OUString sTemp;
pNode->parseNodeToStr(sTemp,getConnection());
getContainer()->setStatement(sTemp);
-
}
}
@@ -863,7 +863,7 @@ void OQueryController::impl_initialize()
::rtl::OUString sIndependentSQLCommand;
if ( rArguments.get_ensureType( "IndependentSQLCommand", sIndependentSQLCommand ) )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: IndependentSQLCommand is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: IndependentSQLCommand is regognized for compatibility only!" );
sCommand = sIndependentSQLCommand;
m_nCommandType = CommandType::COMMAND;
}
@@ -871,7 +871,7 @@ void OQueryController::impl_initialize()
::rtl::OUString sCurrentQuery;
if ( rArguments.get_ensureType( "CurrentQuery", sCurrentQuery ) )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
sCommand = sCurrentQuery;
m_nCommandType = CommandType::QUERY;
}
@@ -879,7 +879,7 @@ void OQueryController::impl_initialize()
sal_Bool bCreateView( sal_False );
if ( rArguments.get_ensureType( "CreateView", bCreateView ) && bCreateView )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
m_nCommandType = CommandType::TABLE;
}
@@ -903,7 +903,7 @@ void OQueryController::impl_initialize()
m_sName = ::rtl::OUString();
break;
default:
- OSL_ENSURE( false, "OQueryController::impl_initialize: logic error in code!" );
+ OSL_FAIL( "OQueryController::impl_initialize: logic error in code!" );
throw RuntimeException();
}
@@ -911,7 +911,7 @@ void OQueryController::impl_initialize()
sal_Bool bGraphicalDesign( sal_True );
if ( rArguments.get_ensureType( (::rtl::OUString)PROPERTY_QUERYDESIGNVIEW, bGraphicalDesign ) )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: QueryDesignView is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: QueryDesignView is regognized for compatibility only!" );
m_bGraphicalDesign = bGraphicalDesign;
}
@@ -1050,7 +1050,7 @@ void OQueryController::impl_initialize()
setModified(sal_False);
}
- catch(SQLException& e)
+ catch(const SQLException& e)
{
DBG_UNHANDLED_EXCEPTION();
// we caught an exception so we switch to text only mode
@@ -1078,7 +1078,7 @@ void OQueryController::onLoadedMenu(const Reference< ::com::sun::star::frame::XL
{
if ( !editingCommand() )
{
- ::vos::OGuard aSolarGuard(Application::GetSolarMutex());
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
String aDefaultName = String( ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ) );
sName = aDefaultName.GetToken(0,' ');
@@ -1101,7 +1101,7 @@ void OQueryController::setQueryComposer()
m_xComposer = xFactory->createQueryComposer();
getContainer()->setStatement(m_sStatement);
}
- catch (Exception&)
+ catch(const Exception&)
{
m_xComposer = NULL;
}
@@ -1159,12 +1159,12 @@ void OQueryController::impl_onModifyChanged()
// -----------------------------------------------------------------------------
void SAL_CALL OQueryController::disposing( const EventObject& Source ) throw(RuntimeException)
{
- ::vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if ( getContainer() && Source.Source.is() )
{
if ( Source.Source == m_aCurrentFrame.getFrame() )
- { // our frame is beeing disposed -> close the preview window (if we have one)
+ { // our frame is being disposed -> close the preview window (if we have one)
Reference< XFrame > xPreviewFrame( getContainer()->getPreviewFrame() );
::comphelper::disposeComponent( xPreviewFrame );
}
@@ -1289,7 +1289,7 @@ void OQueryController::executeQuery()
InvalidateFeature(SID_DB_QUERY_PREVIEW);
URL aWantToDispatch;
- aWantToDispatch.Complete = ::rtl::OUString::createFromAscii(".component:DB/DataSourceBrowser");
+ aWantToDispatch.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".component:DB/DataSourceBrowser"));
::rtl::OUString sFrameName( FRAME_NAME_QUERY_PREVIEW );
sal_Int32 nSearchFlags = FrameSearchFlag::CHILDREN;
@@ -1350,12 +1350,12 @@ void OQueryController::executeQuery()
}
else
{
- OSL_ENSURE(0,"Couldn't create a beamer window!");
+ OSL_FAIL("Couldn't create a beamer window!");
}
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Couldn't create a beamer window!");
+ OSL_FAIL("Couldn't create a beamer window!");
}
}
}
@@ -1381,7 +1381,6 @@ sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElement
{
String sName = String( ModuleRes( editingView() ? STR_VIEW_TITLE : STR_QRY_TITLE ) );
aDefaultName = sName.GetToken(0,' ');
- //aDefaultName = getPrivateTitle( );
aDefaultName = ::dbtools::createUniqueName(_xElements,aDefaultName);
}
@@ -1547,7 +1546,7 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
// now check if our datasource has set a tablefilter and if so, append the new table name to it
::dbaui::appendToFilter( getConnection(), m_sName, getORB(), getView() );
- } // if ( editingView() )
+ }
Reference< XTitleChangeListener> xEventListener(impl_getTitleHelper_throw(),UNO_QUERY);
if ( xEventListener.is() )
{
@@ -1561,13 +1560,13 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
bSuccess = true;
}
- catch( const SQLException& )
+ catch(const SQLException&)
{
if ( !bNew )
m_sName = sOriginalName;
aInfo = SQLExceptionInfo( ::cppu::getCaughtException() );
}
- catch(Exception&)
+ catch(const Exception&)
{
if ( !bNew )
m_sName = sOriginalName;
@@ -1612,11 +1611,11 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
m_xComposer->setQuery(sTranslatedStmt);
sTranslatedStmt = m_xComposer->getComposedQuery();
}
- catch(SQLException& e)
+ catch(const SQLException& e)
{
::dbtools::SQLExceptionInfo aInfo(e);
showError(aInfo);
- // an error occured so we clear the statement
+ // an error occurred so we clear the statement
sTranslatedStmt = ::rtl::OUString();
}
}
@@ -1635,7 +1634,7 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
// -----------------------------------------------------------------------------
short OQueryController::saveModified()
{
- vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
short nRet = RET_YES;
if ( !isConnected() || !isModified() )
@@ -1698,7 +1697,7 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OQueryController::impl_reset: could not retrieve the layout information from the query!" );
+ OSL_FAIL( "OQueryController::impl_reset: could not retrieve the layout information from the query!" );
}
}
}
@@ -1834,7 +1833,7 @@ bool OQueryController::allowViews() const
// -----------------------------------------------------------------------------
bool OQueryController::allowQueries() const
{
- DBG_ASSERT( getSdbMetaData().isConnected(), "OQueryController::allowQueries: illegal call!" );
+ OSL_ENSURE( getSdbMetaData().isConnected(), "OQueryController::allowQueries: illegal call!" );
if ( !getSdbMetaData().supportsSubqueriesInFrom() )
return false;
@@ -1866,3 +1865,4 @@ void SAL_CALL OQueryController::restoreViewData(const Any& /*Data*/) throw( Runt
} // namespace dbaui
// -----------------------------------------------------------------------------
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 012eec40b83e..1b932edbb16d 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.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,42 +28,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYDLG_HXX
#include "querydlg.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERYDLG_HRC
#include "querydlg.hrc"
-#endif
-#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
-#ifndef DBAUI_QTABLECONNECTIONDATA_HXX
#include "QTableConnectionData.hxx"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
-#ifndef DBAUI_QUERYTABLEVIEW_HXX
#include "QueryTableView.hxx"
-#endif
-#ifndef DBAUI_QUERYDESIGNVIEW_HXX
#include "QueryDesignView.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XDATABASEMETADATA_HPP_
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
-#endif
-#ifndef DBAUI_RELATIONCONTROL_HXX
#include "RelationControl.hxx"
-#endif
-#ifndef _SV_MSGBOX_HXX
#include <vcl/msgbox.hxx>
-#endif
using namespace dbaui;
using namespace ::com::sun::star::uno;
@@ -278,12 +255,12 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ )
String sHelpText = String( ModuleRes( nResId ) );
if( nPos )
{
- sHelpText.SearchAndReplace( String( RTL_CONSTASCII_STRINGPARAM( "%1" ) ), sFirstWinName );
- sHelpText.SearchAndReplace( String( RTL_CONSTASCII_STRINGPARAM( "%2" ) ), sSecondWinName );
+ sHelpText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%1" ) ), sFirstWinName );
+ sHelpText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%2" ) ), sSecondWinName );
}
if ( bAddHint )
{
- sHelpText += String( RTL_CONSTASCII_STRINGPARAM( "\n" ) );
+ sHelpText += String( RTL_CONSTASCII_USTRINGPARAM( "\n" ) );
sHelpText += String( ModuleRes( STR_JOIN_TYPE_HINT ) );
}
@@ -343,8 +320,6 @@ TTableConnectionData::value_type DlgQryJoin::getConnectionData() const
// -----------------------------------------------------------------------------
void DlgQryJoin::setValid(sal_Bool _bValid)
{
- //LBChangeHdl(&aLB_JoinType);
-
aPB_OK.Enable(_bValid || eJoinType == CROSS_JOIN );
}
// -----------------------------------------------------------------------------
@@ -397,3 +372,4 @@ void DlgQryJoin::setJoinType(EJoinType _eNewJoinType)
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx
index 1456ce70dbb7..21f4aea129ef 100644
--- a/dbaccess/source/ui/querydesign/querydlg.hxx
+++ b/dbaccess/source/ui/querydesign/querydlg.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.
@@ -26,31 +27,17 @@
************************************************************************/
#ifndef DBAUI_QUERYDLG_HXX
#define DBAUI_QUERYDLG_HXX
-#ifndef _SV_DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
-#endif
-#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _SV_FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _SV_LSTBOX_HXX
#include <vcl/lstbox.hxx>
-#endif
-#ifndef DBAUI_ENUMTYPES_HXX
#include "QEnumTypes.hxx"
-#endif
-#ifndef DBAUI_RELCONTROLIFACE_HXX
#include "RelControliFace.hxx"
-#endif
-#ifndef DBAUI_JOINTABLEVIEW_HXX
#include "JoinTableView.hxx"
-#endif
namespace dbaui
@@ -118,3 +105,4 @@ namespace dbaui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/querydlg.src b/dbaccess/source/ui/querydesign/querydlg.src
index 730cbb4ed780..e0aec2c49d84 100644
--- a/dbaccess/source/ui/querydesign/querydlg.src
+++ b/dbaccess/source/ui/querydesign/querydlg.src
@@ -183,13 +183,13 @@ String STR_QUERY_FULL_JOIN
{
Text [ en-US ] = "Contains ALL records from '%1' and from '%2'.";
};
+
String STR_QUERY_CROSS_JOIN
{
Text [ en-US ] = "Contains the cartesian product of ALL records from '%1' and from '%2'.";
};
+
String STR_QUERY_NATURAL_JOIN
{
Text [ en-US ] = "Contains only one column for each pair of equally-named columns from '%1' and from '%2'.";
};
-
-
diff --git a/dbaccess/source/ui/querydesign/queryview.cxx b/dbaccess/source/ui/querydesign/queryview.cxx
index 60effc75d178..ff68e029b311 100644
--- a/dbaccess/source/ui/querydesign/queryview.cxx
+++ b/dbaccess/source/ui/querydesign/queryview.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,15 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef DBAUI_QUERYVIEW_HXX
#include "queryview.hxx"
-#endif
-#ifndef _DBU_QRY_HRC_
#include "dbu_qry.hrc"
-#endif
-#ifndef DBAUI_QUERYCONTROLLER_HXX
#include "querycontroller.hxx"
-#endif
using namespace dbaui;
@@ -60,3 +55,4 @@ OQueryView::~OQueryView()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */