summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx10
-rw-r--r--dbaccess/source/ui/inc/directsql.hxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx24
3 files changed, 17 insertions, 19 deletions
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 9d85be115ff4..7ae47ed6f318 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -175,11 +175,11 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue();
}
else
- OSL_FAIL(rtl::OStringBuffer("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (").append(OUStringToOString(pArguments->Name, osl_getThreadTextEncoding())).append(") !").getStr());
+ SAL_WARN("dbaccess.ui", "SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (" << pArguments->Name << ") !");
}
if (sControlType.isEmpty())
{
- OSL_FAIL("SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !");
+ SAL_WARN("dbaccess.ui", "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !");
sControlType = OUString("TextField");
}
OSL_ENSURE(aControlProps.getLength(), "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnProperties) !");
@@ -203,7 +203,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
}
catch (const Exception&)
{
- OSL_FAIL(rtl::OStringBuffer("SbaExternalSourceBrowser::dispatch : could not set a column property (").append(OUStringToOString(pControlProps->Name, RTL_TEXTENCODING_ASCII_US)).append(")!").getStr());
+ SAL_WARN("dbaccess.ui", "SbaExternalSourceBrowser::dispatch : could not set a column property (" << pControlProps->Name << ")!");
}
}
}
@@ -240,7 +240,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
}
if (!xMasterForm.is())
{
- OSL_FAIL("SbaExternalSourceBrowser::dispatch(FormSlots/AttachToForm) : please specify a form to attach to as argument !");
+ SAL_WARN("dbaccess.ui", "SbaExternalSourceBrowser::dispatch(FormSlots/AttachToForm) : please specify a form to attach to as argument !");
return;
}
@@ -409,7 +409,7 @@ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster)
}
catch(Exception&)
{
- OSL_FAIL("SbaExternalSourceBrowser::Attach : couldn't restore the cursor position !");
+ SAL_WARN("dbaccess.ui", "SbaExternalSourceBrowser::Attach : couldn't restore the cursor position !");
}
}
diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx
index 73258413b52e..0c10fc9b330d 100644
--- a/dbaccess/source/ui/inc/directsql.hxx
+++ b/dbaccess/source/ui/inc/directsql.hxx
@@ -125,7 +125,7 @@ namespace dbaui
{ \
const sal_Char* pError = impl_CheckInvariants(); \
if (pError) \
- OSL_FAIL(rtl::OStringBuffer(methodname).append(": ").append(pError).makeStringAndClear().getStr()); \
+ SAL_WARN("dbaccess.ui", methodname << ": " << pError); \
}
#else
#define CHECK_INVARIANTS(methodname)
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 58668ca16864..fac61dc3c026 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -162,7 +162,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
SQLExceptionInfo aInfo;
if ( !_xDataSource.is() )
{
- OSL_FAIL("createConnection: coult not retrieve the data source!");
+ SAL_WARN("dbaccess.ui", "createConnection: coult not retrieve the data source!");
return aInfo;
}
@@ -176,7 +176,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
}
catch(const Exception&)
{
- OSL_FAIL("createConnection: error while retrieving data source properties!");
+ SAL_WARN("dbaccess.ui", "createConnection: error while retrieving data source properties!");
}
@@ -187,7 +187,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
Reference<XCompletedConnection> xConnectionCompletion(_xDataSource, UNO_QUERY);
if (!xConnectionCompletion.is())
{
- OSL_FAIL("createConnection: missing an interface ... need an error message here!");
+ SAL_WARN("dbaccess.ui", "createConnection: missing an interface ... need an error message here!");
}
else
{ // instantiate the default SDB interaction handler
@@ -208,7 +208,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
catch(const SQLContext& e) { aInfo = SQLExceptionInfo(e); }
catch(const SQLWarning& e) { aInfo = SQLExceptionInfo(e); }
catch(const SQLException& e) { aInfo = SQLExceptionInfo(e); }
- catch(const Exception&) { OSL_FAIL("SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
+ catch(const Exception&) { SAL_WARN("dbaccess.ui", "SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
return aInfo;
}
@@ -351,11 +351,9 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo,
&& ( (_bAutoIncrement && aIter->second->bAutoIncrement) || !_bAutoIncrement )
)
{
- OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ")
- += ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), osl_getThreadTextEncoding())
- += ::rtl::OString("\" (expected type name ")
- += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), osl_getThreadTextEncoding())
- += ::rtl::OString(" matches the type's local name).")).getStr());
+ SAL_WARN("dbaccess.ui", "getTypeInfoFromType: assuming column type " <<
+ aIter->second->aTypeName << "\" (expected type name " <<
+ _sTypeName << " matches the type's local name).");
break;
}
}
@@ -736,7 +734,7 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
case SVX_HOR_JUSTIFY_CENTER: nAlignment = ::com::sun::star::awt::TextAlign::CENTER; break;
case SVX_HOR_JUSTIFY_RIGHT: nAlignment = ::com::sun::star::awt::TextAlign::RIGHT; break;
default:
- OSL_FAIL("Invalid TextAlign!");
+ SAL_WARN("dbaccess.ui", "Invalid TextAlign!");
}
return nAlignment;
}
@@ -750,7 +748,7 @@ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment)
case ::com::sun::star::awt::TextAlign::CENTER : eJustify = SVX_HOR_JUSTIFY_CENTER; break;
case ::com::sun::star::awt::TextAlign::RIGHT : eJustify = SVX_HOR_JUSTIFY_RIGHT; break;
default:
- OSL_FAIL("Invalid TextAlign!");
+ SAL_WARN("dbaccess.ui", "Invalid TextAlign!");
}
return eJustify;
}
@@ -778,7 +776,7 @@ float ConvertFontWeight( ::FontWeight eWeight )
else if( eWeight == WEIGHT_BLACK )
return ::com::sun::star::awt::FontWeight::BLACK;
- OSL_FAIL("Unknown FontWeigth" );
+ SAL_WARN("dbaccess.ui", "Unknown FontWeigth" );
return ::com::sun::star::awt::FontWeight::DONTKNOW;
}
// -----------------------------------------------------------------------------
@@ -805,7 +803,7 @@ float ConvertFontWidth( ::FontWidth eWidth )
else if( eWidth == WIDTH_ULTRA_EXPANDED )
return ::com::sun::star::awt::FontWidth::ULTRAEXPANDED;
- OSL_FAIL("Unknown FontWidth" );
+ SAL_WARN("dbaccess.ui", "Unknown FontWidth" );
return ::com::sun::star::awt::FontWidth::DONTKNOW;
}
// -----------------------------------------------------------------------------