summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-19 14:05:01 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-19 14:05:01 +0100
commitfbcbfa9d34dc4b9645c6beebb9e0cb0973448427 (patch)
treee602d75bf4fff639408824b3804b05270e677d4b /dbaccess/source/ui
parent41bc9ff8d750b4af10d20a36539c57da14695dcf (diff)
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx4
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx14
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx11
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx20
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/directsql.cxx2
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx2
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx8
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.cxx2
-rw-r--r--dbaccess/source/ui/inc/directsql.hxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx5
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx4
-rw-r--r--dbaccess/source/ui/misc/indexcollection.cxx12
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx8
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx14
-rw-r--r--dbaccess/source/ui/uno/unosqlmessage.cxx2
21 files changed, 61 insertions, 63 deletions
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index e58c11a9ae86..7e8f56972e0f 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -173,7 +173,7 @@ void OApplicationController::deleteTables(const ::std::vector< ::rtl::OUString>&
if(e.TargetException >>= aSql)
aErrorInfo = aSql;
else
- OSL_ENSURE(sal_False, "OApplicationController::implDropTable: something strange happended!");
+ OSL_FAIL("OApplicationController::implDropTable: something strange happended!");
}
catch( const Exception& )
{
@@ -294,7 +294,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
if ( e.TargetException >>= aSql )
showError( SQLExceptionInfo( e.TargetException ) );
else
- OSL_ENSURE( sal_False, "OApplicationController::deleteObjects: something strange happended!" );
+ OSL_FAIL( "OApplicationController::deleteObjects: something strange happended!" );
}
catch( const Exception& )
{
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index de34b955bd36..b10ee6afd78f 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -653,7 +653,7 @@ void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rIm
case E_REPORT: nDatabaseObjectType = DatabaseObject::REPORT; break;
case E_QUERY: nDatabaseObjectType = DatabaseObject::QUERY; break;
default:
- OSL_ENSURE( sal_False, "OAppDetailPageHelper::GetElementIcons: invalid element type!" );
+ OSL_FAIL( "OAppDetailPageHelper::GetElementIcons: invalid element type!" );
return;
}
_rImageId = aImageProvider.getDefaultImageResourceID( nDatabaseObjectType );
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 0a60b4c9a2e9..7b4293318712 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -504,7 +504,7 @@ Sequence< ::rtl::OUString > SAL_CALL SbaXDataBrowserController::FormControllerIm
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setModel(const Reference< ::com::sun::star::awt::XTabControllerModel > & /*Model*/) throw( RuntimeException )
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::FormControllerImpl::setModel : invalid call, can't change my model !");
+ OSL_FAIL("SbaXDataBrowserController::FormControllerImpl::setModel : invalid call, can't change my model !");
}
//------------------------------------------------------------------
@@ -516,7 +516,7 @@ Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL SbaXDataBrowse
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContainer(const Reference< ::com::sun::star::awt::XControlContainer > & /*_Container*/) throw( RuntimeException )
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::FormControllerImpl::setContainer : invalid call, can't change my container !");
+ OSL_FAIL("SbaXDataBrowserController::FormControllerImpl::setContainer : invalid call, can't change my container !");
}
//------------------------------------------------------------------
@@ -541,13 +541,13 @@ Sequence< Reference< ::com::sun::star::awt::XControl > > SAL_CALL SbaXDataBrowse
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::autoTabOrder(void) throw( RuntimeException )
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) !");
+ OSL_FAIL("SbaXDataBrowserController::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) !");
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::activateTabOrder(void) throw( RuntimeException )
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) !");
+ OSL_FAIL("SbaXDataBrowserController::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) !");
}
//------------------------------------------------------------------
@@ -1089,7 +1089,7 @@ void SAL_CALL SbaXDataBrowserController::focusLost(const FocusEvent& e) throw( R
if (xCommitable.is())
xCommitable->commit();
else
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::focusLost : why is my control not commitable ?");
+ OSL_FAIL("SbaXDataBrowserController::focusLost : why is my control not commitable ?");
}
// -------------------------------------------------------------------------
@@ -1785,7 +1785,7 @@ void SbaXDataBrowserController::applyParserOrder(const ::rtl::OUString& _rOldOrd
Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY);
if (!m_xLoadable.is())
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::applyParserOrder: invalid row set!");
+ OSL_FAIL("SbaXDataBrowserController::applyParserOrder: invalid row set!");
return;
}
@@ -1827,7 +1827,7 @@ void SbaXDataBrowserController::applyParserFilter(const ::rtl::OUString& _rOldFi
Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY);
if (!m_xLoadable.is())
{
- OSL_ENSURE(sal_False, "SbaXDataBrowserController::applyParserFilter: invalid row set!");
+ OSL_FAIL("SbaXDataBrowserController::applyParserFilter: invalid row set!");
return;
}
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 68053fbbc234..898f78cd3ebe 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -185,11 +185,11 @@ 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) !");
+ 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) !");
@@ -213,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,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;
}
@@ -425,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 !");
}
}
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index f82912466ef1..706d58400c2d 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -1298,7 +1298,7 @@ namespace
pReturn = "sbasic";
else
{
- OSL_ENSURE( sal_False, "lcl_getModuleHelpModuleName: no installed module found" );
+ OSL_FAIL( "lcl_getModuleHelpModuleName: no installed module found" );
}
}
}
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 418a1bdef48b..216afb3caf2c 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1351,7 +1351,7 @@ void SbaTableQueryBrowser::connectExternalDispatches()
if ( feature->second.xDispatcher.get() == static_cast< XDispatch* >( this ) )
{
- OSL_ENSURE( sal_False, "SbaTableQueryBrowser::connectExternalDispatches: this should not happen anymore!" );
+ OSL_FAIL( "SbaTableQueryBrowser::connectExternalDispatches: this should not happen anymore!" );
// (nowadays, the URLs aren't in our SupportedFeatures list anymore, so we should
// not supply a dispatcher for this)
feature->second.xDispatcher.clear();
@@ -1500,7 +1500,7 @@ sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (
}
catch(const Exception&)
{
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::select: could not extract the descriptor!");
+ OSL_FAIL("SbaTableQueryBrowser::select: could not extract the descriptor!");
}
// check the precense of the props we need
@@ -1833,7 +1833,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
}
catch(DisposedException&)
{
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::GetState: object already disposed!");
+ OSL_FAIL("SbaTableQueryBrowser::GetState: object already disposed!");
}
catch( const Exception& )
{
@@ -1856,7 +1856,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
case CommandType::COMMAND:
sTitle = String(ModuleRes(STR_QRY_TITLE)); break;
default:
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::GetState: unknown command type!");
+ OSL_FAIL("SbaTableQueryBrowser::GetState: unknown command type!");
}
::rtl::OUString aName;
xProp->getPropertyValue(PROPERTY_COMMAND) >>= aName;
@@ -2299,7 +2299,7 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvLBoxEntry*, _pParent)
if(e.TargetException >>= aSql)
aInfo = aSql;
else
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::OnExpandEntry: something strange happended!");
+ OSL_FAIL("SbaTableQueryBrowser::OnExpandEntry: something strange happended!");
}
catch( const Exception& )
{
@@ -2766,7 +2766,7 @@ bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry )
if(e.TargetException >>= aSql)
showError(SQLExceptionInfo(aSql));
else
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::implSelect: something strange happended!");
+ OSL_FAIL("SbaTableQueryBrowser::implSelect: something strange happended!");
// reset the values
xRowSetProps->setPropertyValue(PROPERTY_DATASOURCENAME,Any());
xRowSetProps->setPropertyValue(PROPERTY_ACTIVE_CONNECTION,Any());
@@ -3105,11 +3105,11 @@ void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection )
if(e.TargetException >>= aSql)
showError(SQLExceptionInfo(aSql));
else
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::unloadAndCleanup: something strange happended!");
+ OSL_FAIL("SbaTableQueryBrowser::unloadAndCleanup: something strange happended!");
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::unloadAndCleanup: could not reset the form");
+ OSL_FAIL("SbaTableQueryBrowser::unloadAndCleanup: could not reset the form");
}
}
@@ -3270,7 +3270,7 @@ void SbaTableQueryBrowser::impl_initialize()
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "SbaTableQueryBrowser::impl_initialize: a connection parent which does not have a 'Name'!??" );
+ OSL_FAIL( "SbaTableQueryBrowser::impl_initialize: a connection parent which does not have a 'Name'!??" );
}
}
}
@@ -3307,7 +3307,7 @@ void SbaTableQueryBrowser::impl_initialize()
}
catch(const Exception&)
{
- OSL_ENSURE(sal_False, "SbaTableQueryBrowser::impl_initialize: could not set the update related names!");
+ OSL_FAIL("SbaTableQueryBrowser::impl_initialize: could not set the update related names!");
}
}
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 3e66ab51e027..c30b36782582 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1518,7 +1518,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
if( pNumType )
{
- OSL_ENSURE(sal_False, "OFieldDescControl::DisplayData: invalid num type!");
+ OSL_FAIL("OFieldDescControl::DisplayData: invalid num type!");
}
if( pLength )
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 83506495c575..d2b4bb956b67 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -335,7 +335,7 @@ DBG_NAME(OMySQLIntroPageSetup)
// -----------------------------------------------------------------------
sal_Bool OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/)
{
- OSL_ENSURE(sal_False,"Who called me?! Please ask oj for more information.");
+ OSL_FAIL("Who called me?! Please ask oj for more information.");
return sal_True;
}
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index 99692ffc2961..0e4a61414de8 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -308,7 +308,7 @@ DBG_NAME(DirectSQLDialog)
m_aSQL.SetSelection(Selection(sStatement.Len(), sStatement.Len()));
}
else
- OSL_ENSURE(sal_False, "DirectSQLDialog::switchToHistory: invalid position!");
+ OSL_FAIL("DirectSQLDialog::switchToHistory: invalid position!");
}
//--------------------------------------------------------------------
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 1b48dab42801..d4480c464d59 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -230,7 +230,7 @@ DBG_NAME(DbaIndexDialog)
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "DbaIndexDialog::DbaIndexDialog: could not retrieve basic information from the UNO collection!");
+ OSL_FAIL("DbaIndexDialog::DbaIndexDialog: could not retrieve basic information from the UNO collection!");
}
fillIndexList();
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 927e62c7ddf8..2a85b1a5d58b 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -310,7 +310,7 @@ DBG_NAME(IndexFieldsControl)
break;
default:
- OSL_ENSURE(sal_False, "IndexFieldsControl::GetController: invalid column id!");
+ OSL_FAIL("IndexFieldsControl::GetController: invalid column id!");
}
if (pReturn)
@@ -400,7 +400,7 @@ DBG_NAME(IndexFieldsControl)
}
break;
default:
- OSL_ENSURE(sal_False, "IndexFieldsControl::SaveModified: invalid column id!");
+ OSL_FAIL("IndexFieldsControl::SaveModified: invalid column id!");
}
return sal_True;
}
@@ -424,7 +424,7 @@ DBG_NAME(IndexFieldsControl)
break;
default:
- OSL_ENSURE(sal_False, "IndexFieldsControl::InitController: invalid column id!");
+ OSL_FAIL("IndexFieldsControl::InitController: invalid column id!");
}
}
@@ -490,7 +490,7 @@ DBG_NAME(IndexFieldsControl)
else
return _rRow->bSortAscending ? m_sAscendingText : m_sDescendingText;
default:
- OSL_ENSURE(sal_False, "IndexFieldsControl::GetCurrentRowCellText: invalid column id!");
+ OSL_FAIL("IndexFieldsControl::GetCurrentRowCellText: invalid column id!");
}
}
return String();
diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx
index baf20415e4d6..22d68052aee0 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.cxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.cxx
@@ -292,7 +292,7 @@ void OOdbcEnumeration::getDatasourceNames(StringBag& _rNames)
if (!allocEnv())
{
- OSL_ENSURE(sal_False, "OOdbcEnumeration::getDatasourceNames: could not allocate an ODBC environment!");
+ OSL_FAIL("OOdbcEnumeration::getDatasourceNames: could not allocate an ODBC environment!");
return;
}
diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx
index dcb9ec5f96c1..250c667166be 100644
--- a/dbaccess/source/ui/inc/directsql.hxx
+++ b/dbaccess/source/ui/inc/directsql.hxx
@@ -126,7 +126,7 @@ namespace dbaui
{ \
const sal_Char* pError = impl_CheckInvariants(); \
if (pError) \
- OSL_ENSURE(sal_False, (ByteString(methodname) += ByteString(": ") += ByteString(pError)).GetBuffer()); \
+ OSL_FAIL((ByteString(methodname) += ByteString(": ") += ByteString(pError)).GetBuffer()); \
}
#else
#define CHECK_INVARIANTS(methodname)
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 8f76cfeec73b..a89699c002a3 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -210,7 +210,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
Reference< XInteractionHandler > xHandler(_rMF->createInstance(SERVICE_TASK_INTERACTION_HANDLER), UNO_QUERY);
if (!xHandler.is())
{
- OSL_ENSURE(sal_False, "createConnection: could not instantiate an interaction handler!");
+ OSL_FAIL("createConnection: could not instantiate an interaction handler!");
// TODO: a real parent!
}
else
@@ -400,8 +400,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
&& ( (_bAutoIncrement && aIter->second->bAutoIncrement) || !_bAutoIncrement )
)
{
- OSL_ENSURE(sal_False,
- ( ::rtl::OString("getTypeInfoFromType: assuming column type ")
+ OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ")
+= ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding())
+= ::rtl::OString("\" (expected type name ")
+= ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding())
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 600fb72c68be..ceb8f6d6745e 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -974,7 +974,7 @@ IMPL_LINK( OCopyTableWizard, ImplOKHdl, OKButton*, EMPTYARG )
break;
default:
{
- OSL_ENSURE(sal_False, "OCopyTableWizard::ImplOKHdl: invalid creation style!");
+ OSL_FAIL("OCopyTableWizard::ImplOKHdl: invalid creation style!");
}
}
@@ -1229,7 +1229,7 @@ void OCopyTableWizard::appendColumns( Reference<XColumnsSupplier>& _rxColSup, co
}
else
{
- OSL_ENSURE(sal_False, "OCopyTableWizard::appendColumns: invalid field name!");
+ OSL_FAIL("OCopyTableWizard::appendColumns: invalid field name!");
}
}
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index 318856ba2345..ae68cd988f55 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -157,7 +157,7 @@ namespace dbaui
Reference< XAppend > xAppendIndex(xIndexFactory, UNO_QUERY);
if (!xAppendIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::commitNewIndex: missing an interface of the index container!");
+ OSL_FAIL("OIndexCollection::commitNewIndex: missing an interface of the index container!");
return;
}
@@ -171,7 +171,7 @@ namespace dbaui
Reference< XAppend > xAppendCols(xColumnFactory, UNO_QUERY);
if (!xAppendCols.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::commitNewIndex: invalid index descriptor returned!");
+ OSL_FAIL("OIndexCollection::commitNewIndex: invalid index descriptor returned!");
return;
}
@@ -226,7 +226,7 @@ namespace dbaui
Reference< XDrop > xDropIndex(m_xIndexes, UNO_QUERY);
if (!xDropIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::drop: no XDrop interface!");
+ OSL_FAIL("OIndexCollection::drop: no XDrop interface!");
return sal_False;
}
@@ -273,7 +273,7 @@ namespace dbaui
m_xIndexes->getByName(_rIndex.getOriginalName()) >>= xIndex;
if (!xIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::implFillIndexInfo: got an invalid index object!");
+ OSL_FAIL("OIndexCollection::implFillIndexInfo: got an invalid index object!");
}
else
implFillIndexInfo(_rIndex, xIndex);
@@ -314,7 +314,7 @@ namespace dbaui
xCols->getByName(*pFieldNames) >>= xIndexColumn;
if (!xIndexColumn.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::implFillIndexInfo: invalid index column!");
+ OSL_FAIL("OIndexCollection::implFillIndexInfo: invalid index column!");
--aCopyTo;
continue;
}
@@ -383,7 +383,7 @@ namespace dbaui
m_xIndexes->getByName(*pNames) >>= xIndex;
if (!xIndex.is())
{
- OSL_ENSURE(sal_False, "OIndexCollection::implConstructFrom: got an invalid index object ... ignoring!");
+ OSL_FAIL("OIndexCollection::implConstructFrom: got an invalid index object ... ignoring!");
continue;
}
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index 2207bbb541ad..2de49e7522d8 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -287,7 +287,7 @@ namespace dbaui
break;
default:
- OSL_ENSURE( sal_False, "OLinkedDocumentsAccess::newDocument: please use newFormWithPilot!" );
+ OSL_FAIL( "OLinkedDocumentsAccess::newDocument: please use newFormWithPilot!" );
return Reference< XComponent >();
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 52fa237d061d..7324b0ab597f 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -727,7 +727,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
}
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
@@ -1697,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!" );
}
}
}
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index d6e0c2703fa9..6884feaf2ef4 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -1122,7 +1122,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const TOTypeIn
SwitchType( _pTypeInfo );
break;
default:
- OSL_ENSURE(sal_False, "OTableEditorCtrl::SetCellData: invalid column!");
+ OSL_FAIL("OTableEditorCtrl::SetCellData: invalid column!");
}
SetControlText(nRow,nColId,_pTypeInfo.get() ? _pTypeInfo->aUIName : ::rtl::OUString());
}
@@ -1149,7 +1149,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::s
break;
case FIELD_TYPE:
- OSL_ENSURE(sal_False, "OTableEditorCtrl::SetCellData: invalid column!");
+ OSL_FAIL("OTableEditorCtrl::SetCellData: invalid column!");
break;
case COLUMN_DESCRIPTION:
@@ -1177,7 +1177,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::s
break;
case FIELD_PROPERTY_NUMTYPE:
- OSL_ENSURE(sal_False, "OTableEditorCtrl::SetCellData: invalid column!");
+ OSL_FAIL("OTableEditorCtrl::SetCellData: invalid column!");
break;
case FIELD_PROPERTY_AUTOINC:
@@ -1260,7 +1260,7 @@ Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId )
break;
case FIELD_PROPERTY_NUMTYPE:
- OSL_ENSURE(sal_False, "OTableEditorCtrl::GetCellData: invalid column!");
+ OSL_FAIL("OTableEditorCtrl::GetCellData: invalid column!");
break;
case FIELD_PROPERTY_AUTOINC:
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 28450226eb81..b79eba4f8378 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -368,7 +368,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OTableController::doSaveDoc: nothing is expected to happen here!");
+ OSL_FAIL("OTableController::doSaveDoc: nothing is expected to happen here!");
}
sal_Bool bAlter = sal_False;
@@ -505,7 +505,7 @@ void OTableController::doEditIndexes()
OSL_ENSURE(xIndexes.is(), "OTableController::doEditIndexes: no keys got from the indexes supplier!");
}
else
- OSL_ENSURE(sal_False, "OTableController::doEditIndexes: should never have reached this (no indexes supplier)!");
+ OSL_FAIL("OTableController::doEditIndexes: should never have reached this (no indexes supplier)!");
// get the field names
Reference< XColumnsSupplier > xColSupp(m_xTable, UNO_QUERY);
@@ -629,7 +629,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
}
catch(const Exception&)
{
- OSL_ENSURE(sal_False, "OTableController::suspend: nothing is expected to happen here!");
+ OSL_FAIL("OTableController::suspend: nothing is expected to happen here!");
}
}
@@ -763,7 +763,7 @@ void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_
}
else
{
- OSL_ENSURE(sal_False, "OTableController::appendColumns: invalid field name!");
+ OSL_FAIL("OTableController::appendColumns: invalid field name!");
}
}
@@ -1089,7 +1089,7 @@ void OTableController::alterColumns()
try { xColumn->getPropertyValue(PROPERTY_TYPENAME) >>= sTypeName; }
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "no TypeName property?!" );
+ OSL_FAIL( "no TypeName property?!" );
// since this is a last minute fix for #i41785#, I want to be on the safe side,
// and catch errors here as early as possible (instead of the whole process of altering
// the columns failing)
@@ -1172,7 +1172,7 @@ void OTableController::alterColumns()
}
else
{
- OSL_ENSURE(sal_False, "OTableController::alterColumns: invalid column (2)!");
+ OSL_FAIL("OTableController::alterColumns: invalid column (2)!");
}
}
catch(const SQLException&)
@@ -1308,7 +1308,7 @@ void OTableController::alterColumns()
}
else
{
- OSL_ENSURE(sal_False, "OTableController::alterColumns: invalid column!");
+ OSL_FAIL("OTableController::alterColumns: invalid column!");
}
}
}
diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx
index 978468a8acd5..66d65552b264 100644
--- a/dbaccess/source/ui/uno/unosqlmessage.cxx
+++ b/dbaccess/source/ui/uno/unosqlmessage.cxx
@@ -155,7 +155,7 @@ Dialog* OSQLMessageDialog::createDialog(Window* _pParent)
if ( m_aException.hasValue() )
return new OSQLMessageBox( _pParent, SQLExceptionInfo( m_aException ), WB_OK | WB_DEF_OK, m_sHelpURL );
- OSL_ENSURE(sal_False, "OSQLMessageDialog::createDialog : You should use the SQLException property to specify the error to display!");
+ OSL_FAIL("OSQLMessageDialog::createDialog : You should use the SQLException property to specify the error to display!");
return new OSQLMessageBox(_pParent, SQLException());
}