diff options
Diffstat (limited to 'extensions/source/propctrlr')
-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 |
4 files changed, 18 insertions, 48 deletions
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 } |