diff options
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/bibliography/datman.cxx | 7 | ||||
-rw-r--r-- | extensions/source/logging/filehandler.cxx | 10 | ||||
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.cxx | 26 | ||||
-rw-r--r-- | extensions/source/propctrlr/eformspropertyhandler.cxx | 9 | ||||
-rw-r--r-- | extensions/source/propctrlr/propcontroller.cxx | 18 | ||||
-rw-r--r-- | extensions/source/propctrlr/stringrepresentation.cxx | 13 | ||||
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 9 |
7 files changed, 24 insertions, 68 deletions
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 756d488078b9..e87e2c82a0a4 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -180,13 +180,8 @@ Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm) } catch (const Exception& e) { -#ifdef DBG_UTIL - OUString sMsg( "::getColumns : catched an exception (" + e.Message + ") ..." ); - - OSL_FAIL(OUStringToOString(sMsg, RTL_TEXTENCODING_ASCII_US ).getStr()); -#else (void)e; -#endif + SAL_WARN( "extensions.biblio", "::getColumns : catched an exception. " << e.Message); } } diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx index a59a43cb9800..87bf330d50b5 100644 --- a/extensions/source/logging/filehandler.cxx +++ b/extensions/source/logging/filehandler.cxx @@ -186,13 +186,9 @@ namespace logging #if OSL_DEBUG_LEVEL > 0 if ( m_eFileValidity == eInvalid ) { - OStringBuffer sMessage; - sMessage.append( "FileHandler::impl_prepareFile_nothrow: could not open the designated log file:" ); - sMessage.append( "\nURL: " ); - sMessage.append( OString( m_sFileURL.getStr(), m_sFileURL.getLength(), osl_getThreadTextEncoding() ) ); - sMessage.append( "\nerror code: " ); - sMessage.append( (sal_Int32)res ); - OSL_FAIL( sMessage.makeStringAndClear().getStr() ); + SAL_WARN( "extensions.logging", "FileHandler::impl_prepareFile_nothrow: could not open the designated log file:" + "\nURL: " << m_sFileURL + << "\nerror code: " << (sal_Int32)res ); } #endif if ( m_eFileValidity == eValid ) diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 269b14d033dc..f34a7b67b35f 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -868,16 +868,9 @@ namespace pcr } else { - #ifdef DBG_UTIL - if ( !_rLine.xHandler.is() ) - { - OString sMessage( "OBrowserListBox::impl_setControlAsPropertyValue: no handler -> no conversion (property: '" ); - OUString sPropertyName( _rLine.pLine->GetEntryName() ); - sMessage += OString( sPropertyName.getStr(), sPropertyName.getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += OString( "')!" ); - OSL_FAIL( sMessage.getStr() ); - } - #endif + SAL_WARN_IF( !_rLine.xHandler.is(), "extensions.propctrlr", + "OBrowserListBox::impl_setControlAsPropertyValue: no handler -> no conversion (property: '" + << _rLine.pLine->GetEntryName() << "')!" ); if ( _rLine.xHandler.is() ) { Any aControlValue = _rLine.xHandler->convertToControlValue( @@ -899,16 +892,9 @@ namespace pcr Any aPropertyValue; try { - #ifdef DBG_UTIL - if ( !_rLine.xHandler.is() ) - { - OString sMessage( "OBrowserListBox::impl_getControlAsPropertyValue: no handler -> no conversion (property: '" ); - OUString sPropertyName( _rLine.pLine->GetEntryName() ); - sMessage += OString( sPropertyName.getStr(), sPropertyName.getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += OString( "')!" ); - OSL_FAIL( sMessage.getStr() ); - } - #endif + SAL_WARN_IF( !_rLine.xHandler.is(), "extensions.propctrlr", + "OBrowserListBox::impl_getControlAsPropertyValue: no handler -> no conversion (property: '" + << _rLine.pLine->GetEntryName() << "')!" ); if ( _rLine.xHandler.is() ) aPropertyValue = _rLine.xHandler->convertToPropertyValue( _rLine.pLine->GetEntryName(), xControl->getValue() ); else diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index a02a615a5bda..f6a3bb171ade 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -144,13 +144,8 @@ namespace pcr } catch( const Exception& ) { -#if OSL_DEBUG_LEVEL > 0 - OString sMessage( "EFormsPropertyHandler::getPropertyValue: caught an exception!" ); - sMessage += "\n(have been asked for the \""; - sMessage += OString( _rPropertyName.getStr(), _rPropertyName.getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += "\" property.)"; - OSL_FAIL( sMessage.getStr() ); -#endif + SAL_WARN( "extensions.propctrlr", "EFormsPropertyHandler::getPropertyValue: caught an exception!" + "\n(have been asked for the \"" <<_rPropertyName << "\" property.)"); } return aReturn; } diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 6f150c9d4622..c20b617bbd55 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -1125,10 +1125,8 @@ namespace pcr if ( _rDescriptor.DisplayName.isEmpty() ) { #ifdef DBG_UTIL - OString sMessage( "OPropertyBrowserController::describePropertyLine: handler did not provide a display name for '" ); - sMessage += OString( _rProperty.Name.getStr(), _rProperty.Name.getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += OString( "'!" ); - DBG_ASSERT( !_rDescriptor.DisplayName.isEmpty(), sMessage.getStr() ); + SAL_WARN( "extensions.propctrlr", "OPropertyBrowserController::describePropertyLine: handler did not provide a display name for '" + <<_rProperty.Name << "'!" ); #endif _rDescriptor.DisplayName = _rProperty.Name; } @@ -1203,15 +1201,9 @@ namespace pcr bool bIsActuatingProperty = impl_isActuatingProperty_nothrow( property->second.Name ); - #if OSL_DEBUG_LEVEL > 0 - if ( aDescriptor.Category.isEmpty() ) - { - OString sMessage( "OPropertyBrowserController::UpdateUI: empty category provided for property '" ); - sMessage += OString( property->second.Name.getStr(), property->second.Name.getLength(), osl_getThreadTextEncoding() ); - sMessage += "'!"; - OSL_FAIL( sMessage.getStr() ); - } - #endif + SAL_WARN_IF( aDescriptor.Category.isEmpty(), "extensions.propctrlr", + "OPropertyBrowserController::UpdateUI: empty category provided for property '" + << property->second.Name << "'!"); // finally insert this property control sal_uInt16 nTargetPageId = impl_getPageIdForCategory_nothrow( aDescriptor.Category ); if ( nTargetPageId == (sal_uInt16)-1 ) diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index 3f8b0abfa697..946c8b6422f5 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -168,10 +168,9 @@ OUString SAL_CALL StringRepresentation::convertToControlValue(const uno::Any & P #ifdef DBG_UTIL if ( sReturn.isEmpty() && PropertyValue.hasValue() ) { - OString sMessage( "StringRepresentation::convertPropertyValueToStringRepresentation: cannot convert values of type '" ); - sMessage += OString( PropertyValue.getValueType().getTypeName().getStr(), PropertyValue.getValueType().getTypeName().getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += OString( "'!" ); - OSL_FAIL( sMessage.getStr() ); + SAL_WARN( "extensions.propctrlr", "StringRepresentation::convertPropertyValueToStringRepresentation: cannot convert values of type '" + << PropertyValue.getValueType().getTypeName() + << "'!" ); } #endif } @@ -213,10 +212,8 @@ uno::Any SAL_CALL StringRepresentation::convertToPropertyValue(const OUString & // could not convert ... if ( !bCanConvert && !ControlValue.isEmpty() ) { - OString sMessage( "StringRepresentation::convertStringRepresentationToPropertyValue: cannot convert into values of type '" ); - sMessage += OString( ControlValueType.getTypeName().getStr(), ControlValueType.getTypeName().getLength(), RTL_TEXTENCODING_ASCII_US ); - sMessage += OString( "'!" ); - OSL_FAIL( sMessage.getStr() ); + SAL_WARN( "extensions.propctrlr", "StringRepresentation::convertStringRepresentationToPropertyValue: cannot convert into values of type '" + << ControlValueType.getTypeName() << "'!" ); } #endif } diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index cc712b24ccd3..3813f58eea5e 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -689,9 +689,7 @@ IMPL_LINK( SaneDlg, SelectHdl, ListBox&, rListBox, void ) { if( &rListBox == mpQuantumRangeBox ) { - OString aValue(OUStringToOString(mpQuantumRangeBox->GetSelectEntry(), - osl_getThreadTextEncoding())); - double fValue = atof(aValue.getStr()); + double fValue = mpQuantumRangeBox->GetSelectEntry().toDouble(); mrSane.SetOptionValue( mnCurrentOption, fValue, mnCurrentElement ); } else if( &rListBox == mpStringRangeBox ) @@ -809,10 +807,7 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit&, rEdit, void ) } else if( &rEdit == mpNumericEdit ) { - double fValue; - OString aContents(OUStringToOString(mpNumericEdit->GetText(), - osl_getThreadTextEncoding())); - fValue = atof(aContents.getStr()); + double fValue = mpNumericEdit->GetText().toDouble(); if( mfMin != mfMax && ( fValue < mfMin || fValue > mfMax ) ) { char pBuf[256]; |