summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser/exsrcbrw.cxx
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/browser/exsrcbrw.cxx
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/browser/exsrcbrw.cxx')
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx76
1 files changed, 28 insertions, 48 deletions
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index b0dd7e72696e..0d93b52eabd2 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.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,39 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbui.hxx"
-#ifndef _SBA_EXTCTRLR_HXX
#include "exsrcbrw.hxx"
-#endif
-#ifndef _COM_SUN_STAR_FORM_FORMCOMPONENTTYPE_HPP_
#include <com/sun/star/form/FormComponentType.hpp>
-#endif
-#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
#include <com/sun/star/util/XURLTransformer.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XGRIDCOLUMNFACTORY_HPP_
#include <com/sun/star/form/XGridColumnFactory.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_
#include <com/sun/star/form/XLoadable.hpp>
-#endif
-#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#endif
-#ifndef _SBA_FORMADAPTER_HXX
#include "formadapter.hxx"
-#endif
-#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
#include <comphelper/processfactory.hxx>
-#endif
-#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
#include "dbustrings.hrc"
-#endif
-#ifndef _DBU_REGHELPER_HXX_
#include "dbu_reghelper.hxx"
-#endif
-#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h>
-#endif
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdb;
@@ -175,7 +154,7 @@ void SbaExternalSourceBrowser::modified(const ::com::sun::star::lang::EventObjec
void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::URL& aURL, const Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) throw(::com::sun::star::uno::RuntimeException)
{
const ::com::sun::star::beans::PropertyValue* pArguments = aArgs.getConstArray();
- if (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AddGridColumn")))
+ if (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AddGridColumn"))))
{
// search the argument describing the column to create
::rtl::OUString sControlType;
@@ -184,21 +163,21 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
sal_uInt16 i;
for ( i = 0; i < aArgs.getLength(); ++i, ++pArguments )
{
- if (pArguments->Name.equals(::rtl::OUString::createFromAscii("ColumnType")))
+ if (pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnType"))))
{
sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const ::rtl::OUString*)0));
OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnType\" !");
if (bCorrectType)
sControlType = ::comphelper::getString(pArguments->Value);
}
- else if (pArguments->Name.equals(::rtl::OUString::createFromAscii("ColumnPosition")))
+ else if (pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnPosition"))))
{
sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const sal_Int16*)0));
OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnPosition\" !");
if (bCorrectType)
nControlPos = ::comphelper::getINT16(pArguments->Value);
}
- else if (pArguments->Name.equals(::rtl::OUString::createFromAscii("ColumnProperties")))
+ else if (pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnProperties"))))
{
sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const Sequence< ::com::sun::star::beans::PropertyValue>*)0));
OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnProperties\" !");
@@ -206,12 +185,12 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue();
}
else
- OSL_ENSURE(sal_False, ((ByteString("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (") += ByteString((const sal_Unicode*)pArguments->Name, gsl_getSystemTextEncoding()).GetBuffer()) += ") !").GetBuffer());
+ OSL_FAIL(((ByteString("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (") += ByteString((const sal_Unicode*)pArguments->Name, gsl_getSystemTextEncoding()).GetBuffer()) += ") !").GetBuffer());
}
if (!sControlType.getLength())
{
- OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !");
- sControlType = ::rtl::OUString::createFromAscii("TextField");
+ OSL_FAIL("SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !");
+ sControlType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextField"));
}
OSL_ENSURE(aControlProps.getLength(), "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnProperties) !");
@@ -221,7 +200,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
Reference< XPropertySetInfo > xNewColProperties;
if (xNewCol.is())
xNewColProperties = xNewCol->getPropertySetInfo();
- // set it's properties
+ // set its properties
if (xNewColProperties.is())
{
const ::com::sun::star::beans::PropertyValue* pControlProps = aControlProps.getConstArray();
@@ -234,8 +213,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
}
catch(Exception&)
{
- OSL_ENSURE(sal_False,
- ( ByteString("SbaExternalSourceBrowser::dispatch : could not set a column property (")
+ OSL_FAIL(( ByteString("SbaExternalSourceBrowser::dispatch : could not set a column property (")
+= ByteString(pControlProps->Name.getStr(), (sal_uInt16)pControlProps->Name.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ByteString(")!")).GetBuffer());
}
@@ -253,20 +231,20 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
// append the column
xColContainer->insertByIndex(nControlPos, makeAny(xNewCol));
}
- else if (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/ClearView")))
+ else if (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/ClearView"))))
{
ClearView();
}
- else if (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AttachToForm")))
+ else if (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AttachToForm"))))
{
if (!m_pDataSourceImpl)
return;
Reference< XRowSet > xMasterForm;
- // search the arguments for he master form
+ // search the arguments for the master form
for (sal_uInt16 i=0; i<aArgs.getLength(); ++i, ++pArguments)
{
- if ((pArguments->Name.equals(::rtl::OUString::createFromAscii("MasterForm"))) && (pArguments->Value.getValueTypeClass() == TypeClass_INTERFACE))
+ if ((pArguments->Name.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MasterForm")))) && (pArguments->Value.getValueTypeClass() == TypeClass_INTERFACE))
{
xMasterForm = Reference< XRowSet > (*(Reference< XInterface > *)pArguments->Value.getValue(), UNO_QUERY);
break;
@@ -274,7 +252,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
}
if (!xMasterForm.is())
{
- OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::dispatch(FormSlots/AttachToForm) : please specify a form to attach to as argument !");
+ OSL_FAIL("SbaExternalSourceBrowser::dispatch(FormSlots/AttachToForm) : please specify a form to attach to as argument !");
return;
}
@@ -293,22 +271,22 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows
m_bInQueryDispatch = sal_True;
- if ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AttachToForm")))
+ if ( (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AttachToForm"))))
// attach a new external form
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/AddGridColumn")))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/AddGridColumn"))))
// add a column to the grid
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/ClearView")))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/ClearView"))))
// clear the grid
)
xReturn = (::com::sun::star::frame::XDispatch*)this;
if ( !xReturn.is()
- && ( (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToFirst")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToPrev")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToNext")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToLast")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/moveToNew")))
- || (aURL.Complete.equals(::rtl::OUString::createFromAscii(".uno:FormSlots/undoRecord")))
+ && ( (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToFirst"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToPrev"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToNext"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToLast"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/moveToNew"))))
+ || (aURL.Complete.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FormSlots/undoRecord"))))
)
)
{
@@ -321,7 +299,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows
m_xUrlTransformer->parseStrict( aNewUrl );
// set a new mark
- aNewUrl.Mark = ::rtl::OUString::createFromAscii("DB/FormGridView");
+ aNewUrl.Mark = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DB/FormGridView"));
// this controller is instantiated when somebody dispatches the ".component:DB/FormGridView" in any
// frame, so we use "FormGridView" as mark that a dispatch request came from this view
@@ -446,7 +424,7 @@ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster)
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::Attach : couldn't restore the cursor position !");
+ OSL_FAIL("SbaExternalSourceBrowser::Attach : couldn't restore the cursor position !");
}
}
@@ -498,3 +476,5 @@ void SbaExternalSourceBrowser::stopListening()
//==================================================================
//==================================================================
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */