summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-26 10:58:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-28 19:44:08 +0200
commitef513fd4b049b214a03fbe6e62a5ea43680a7a9b (patch)
tree82f2ce93bc8e5fde6dce8685b633c3d643c9f069 /dbaccess
parent826f1bca40a01f0a249d5b6cbb7c39c11638a060 (diff)
remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx25
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx7
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx47
3 files changed, 25 insertions, 54 deletions
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx
index 10675aceda2b..a3f1d66c1201 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -101,12 +101,9 @@ namespace dbaccess
if ( sLocalName == "config-item-set" )
return new ConfigItemSetImport( m_rSettings );
-#if OSL_DEBUG_LEVEL > 0
- OString sMessage = "unknown (or unsupported at this place) element name '"
- + OUStringToOString( i_rElementName, RTL_TEXTENCODING_UTF8 )
- + "', ignoring";
- OSL_FAIL( sMessage.getStr() );
-#endif
+ SAL_WARN( "dbaccess", "unknown (or unsupported at this place) element name '"
+ << i_rElementName
+ << "', ignoring");
return new IgnoringSettingsImport;
}
@@ -177,15 +174,11 @@ namespace dbaccess
{
o_rValue <<= sValue;
}
-#if OSL_DEBUG_LEVEL > 0
else
{
- OString sMessage( "ConfigItemImport::getItemValue: unsupported item type '" );
- sMessage += OUStringToOString( rItemType, RTL_TEXTENCODING_UTF8 );
- sMessage += "', ignoring";
- OSL_FAIL( sMessage.getStr() );
+ SAL_WARN( "dbaccess", "ConfigItemImport::getItemValue: unsupported item type '"
+ << rItemType << "', ignoring");
}
-#endif
}
// ConfigItemSetImport
@@ -210,12 +203,8 @@ namespace dbaccess
if ( sLocalName == "config-item" )
return new ConfigItemImport( m_aChildSettings );
-#if OSL_DEBUG_LEVEL > 0
- OString sMessage( "unknown element name '" );
- sMessage += OUStringToOString( i_rElementName, RTL_TEXTENCODING_UTF8 );
- sMessage += "', ignoring";
- OSL_FAIL( sMessage.getStr() );
-#endif
+ SAL_WARN( "dbaccess", "unknown element name '"
+ << i_rElementName << "', ignoring");
return new IgnoringSettingsImport;
}
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index a5ec0802a2c1..4dc69a4830df 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -545,10 +545,9 @@ void OGenericUnoController::InvalidateFeature_Impl()
#if OSL_DEBUG_LEVEL > 0
if ( m_aSupportedFeatures.end() == aFeaturePos )
{
- OString sMessage( "OGenericUnoController::InvalidateFeature_Impl: feature id " );
- sMessage += OString::number( aNextFeature.nId );
- sMessage += OString( " has been invalidated, but is not supported!" );
- SAL_WARN("dbaccess.ui", sMessage.getStr() );
+ SAL_WARN( "dbaccess.ui", "OGenericUnoController::InvalidateFeature_Impl: feature id "
+ << aNextFeature.nId
+ << " has been invalidated, but is not supported!" );
}
#endif
if ( m_aSupportedFeatures.end() != aFeaturePos )
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 0f4016b8883a..29f0dd00bc24 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -113,12 +113,8 @@ namespace
}
catch(Exception&)
{
- #if OSL_DEBUG_LEVEL > 0
- OString sMessage("ODbAdminDialog::implTranslateProperty: could not set the property ");
- sMessage += OString(_rName.getStr(), _rName.getLength(), RTL_TEXTENCODING_ASCII_US);
- sMessage += OString("!");
- OSL_FAIL(sMessage.getStr());
- #endif
+ SAL_WARN("dbaccess", "ODbAdminDialog::implTranslateProperty: could not set the property "
+ << _rName);
}
}
@@ -577,12 +573,8 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr
}
catch(Exception&)
{
-#if OSL_DEBUG_LEVEL > 0
- OString aMessage("ODbDataSourceAdministrationHelper::translateProperties: could not extract the property ");
- aMessage += OString(aDirect->second.getStr(), aDirect->second.getLength(), RTL_TEXTENCODING_ASCII_US);
- aMessage += OString("!");
- OSL_FAIL(aMessage.getStr());
-#endif
+ SAL_WARN("dbaccess", "ODbDataSourceAdministrationHelper::translateProperties: could not extract the property "
+ << aDirect->second);
}
// transfer it into an item
implTranslateProperty(_rDest, aDirect->first, aValue);
@@ -917,11 +909,8 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
_rSet.Put(SfxStringItem(_nId, sValue));
}
else {
- OSL_FAIL(
- OString(
- "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value ("
- + translatePropertyId(_nId)
- + " should be no string)!").getStr());
+ SAL_WARN( "dbaccess", "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value ("
+ << translatePropertyId(_nId) << " should be no string)!");
}
break;
@@ -946,11 +935,9 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
_rSet.Put( aItem );
}
else {
- OSL_FAIL(
- OString(
- "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value ("
- + translatePropertyId(_nId)
- + " should be no boolean)!").getStr());
+ SAL_WARN( "dbaccess", "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value ("
+ << translatePropertyId(_nId)
+ << " should be no boolean)!");
}
break;
@@ -962,11 +949,9 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
_rSet.Put( SfxInt32Item( _nId, nValue ) );
}
else {
- OSL_FAIL(
- OString(
- "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value ("
- + translatePropertyId(_nId)
- + " should be no int)!").getStr());
+ SAL_WARN( "dbaccess", "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value ("
+ << translatePropertyId(_nId)
+ << " should be no int)!");
}
break;
@@ -994,11 +979,9 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
}
}
else {
- OSL_FAIL(
- OString(
- "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value ("
- + translatePropertyId(_nId)
- + " should be no string sequence)!").getStr());
+ SAL_WARN( "dbaccess", "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value ("
+ << translatePropertyId(_nId)
+ << " should be no string sequence)!");
}
break;