[Libreoffice-commits] core.git: basic/source chart2/qa chart2/source codemaker/source comphelper/source connectivity/source cppuhelper/source cppu/source cui/source dbaccess/source desktop/source editeng/source extensions/source filter/source forms/source fpicker/source framework/source helpcompiler/source i18npool/source i18nutil/source idlc/source idl/source include/sal include/toolkit include/vcl jvmfwk/plugins l10ntools/source oox/source opencl/source package/source rsc/source sc/qa sc/source sd/source sfx2/source slideshow/source sot/source svgio/inc svgio/source svl/source svtools/langsupport svtools/source svx/source sw/qa sw/source test/source testtools/source toolkit/source ucbhelper/source ucb/source unodevtools/source unotools/source unoxml/source uui/source vcl/opengl vcl/source vcl/unx writerfilter/source xmloff/source xmlsecurity/source

Noel Grandin noel.grandin at collabora.co.uk
Sun May 28 17:44:36 UTC 2017


 basic/source/uno/scriptcont.cxx                              |   14 -
 chart2/qa/extras/chart2dump/chart2dump.cxx                   |    6 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx |   18 -
 chart2/source/controller/itemsetwrapper/ItemConverter.cxx    |   16 -
 chart2/source/controller/main/ChartController.cxx            |    5 
 codemaker/source/codemaker/global.cxx                        |    8 
 comphelper/source/misc/documentinfo.cxx                      |   12 
 comphelper/source/misc/mimeconfighelper.cxx                  |   34 +-
 comphelper/source/misc/scopeguard.cxx                        |    3 
 connectivity/source/commontools/dbtools.cxx                  |   10 
 connectivity/source/drivers/dbase/DTable.cxx                 |    4 
 connectivity/source/drivers/hsqldb/HStorageMap.cxx           |   14 -
 connectivity/source/drivers/mork/MQueryHelper.cxx            |    2 
 cppu/source/LogBridge/LogBridge.cxx                          |   22 -
 cppu/source/typelib/typelib.cxx                              |    4 
 cppuhelper/source/component.cxx                              |    6 
 cppuhelper/source/component_context.cxx                      |    3 
 cppuhelper/source/implbase.cxx                               |   12 
 cppuhelper/source/weak.cxx                                   |    6 
 cui/source/options/optinet2.cxx                              |    2 
 cui/source/options/optsave.cxx                               |    6 
 dbaccess/source/core/recovery/settingsimport.cxx             |   25 -
 dbaccess/source/ui/browser/genericcontroller.cxx             |    7 
 dbaccess/source/ui/dlg/DbAdminImpl.cxx                       |   47 +--
 desktop/source/deployment/dp_log.cxx                         |    6 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx             |    5 
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx           |    2 
 desktop/source/deployment/manager/dp_manager.cxx             |    9 
 desktop/source/deployment/registry/dp_registry.cxx           |   17 -
 desktop/source/deployment/registry/package/dp_package.cxx    |   17 -
 desktop/source/lib/init.cxx                                  |    2 
 desktop/source/migration/migration.cxx                       |   24 -
 desktop/source/migration/services/basicmigration.cxx         |    7 
 desktop/source/migration/services/wordbookmigration.cxx      |    7 
 desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx               |    3 
 desktop/source/pkgchk/unopkg/unopkg_misc.cxx                 |    3 
 editeng/source/uno/unoipset.cxx                              |    2 
 extensions/source/bibliography/datman.cxx                    |    7 
 extensions/source/logging/filehandler.cxx                    |   10 
 extensions/source/propctrlr/browserlistbox.cxx               |   26 -
 extensions/source/propctrlr/eformspropertyhandler.cxx        |    9 
 extensions/source/propctrlr/propcontroller.cxx               |   18 -
 extensions/source/propctrlr/stringrepresentation.cxx         |   13 
 extensions/source/scanner/sanedlg.cxx                        |    9 
 filter/source/config/cache/filtercache.cxx                   |   17 -
 filter/source/svg/svgwriter.cxx                              |    2 
 filter/source/svg/test/odfserializer.cxx                     |    3 
 filter/source/xsltfilter/XSLTFilter.cxx                      |    2 
 forms/source/component/Edit.cxx                              |   15 -
 forms/source/richtext/attributedispatcher.cxx                |   13 
 forms/source/xforms/submission/replace.cxx                   |    4 
 fpicker/source/office/commonpicker.cxx                       |    6 
 framework/source/layoutmanager/layoutmanager.cxx             |    6 
 framework/source/uielement/toolbarmanager.cxx                |    2 
 helpcompiler/source/HelpIndexer_main.cxx                     |    2 
 i18npool/source/breakiterator/xdictionary.cxx                |    2 
 i18nutil/source/utility/paper.cxx                            |    3 
 idl/source/objects/object.cxx                                |    3 
 idlc/source/idlcmain.cxx                                     |    3 
 idlc/source/idlcproduce.cxx                                  |    7 
 idlc/source/scanner.l                                        |    4 
 include/sal/log-areas.dox                                    |    4 
 include/toolkit/helper/macros.hxx                            |    4 
 include/vcl/builder.hxx                                      |    6 
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx                   |    2 
 l10ntools/source/cfgmerge.cxx                                |    2 
 l10ntools/source/common.cxx                                  |    4 
 l10ntools/source/helpmerge.cxx                               |    6 
 l10ntools/source/lngmerge.cxx                                |    4 
 l10ntools/source/localize.cxx                                |   12 
 l10ntools/source/merge.cxx                                   |    6 
 l10ntools/source/po.cxx                                      |   10 
 l10ntools/source/propmerge.cxx                               |   16 -
 l10ntools/source/treemerge.cxx                               |   10 
 l10ntools/source/uimerge.cxx                                 |    6 
 l10ntools/source/xmlparse.cxx                                |   16 -
 l10ntools/source/xrmmerge.cxx                                |    8 
 oox/source/export/chartexport.cxx                            |   18 -
 oox/source/ppt/presentationfragmenthandler.cxx               |   15 -
 oox/source/ppt/slidefragmenthandler.cxx                      |    7 
 opencl/source/opencl_device.cxx                              |    2 
 package/source/zippackage/ZipPackageStream.cxx               |    3 
 rsc/source/tools/rscdef.cxx                                  |    5 
 sc/qa/unit/ucalc.cxx                                         |    2 
 sc/source/core/data/dpcache.cxx                              |    5 
 sc/source/core/data/formulacell.cxx                          |   25 -
 sc/source/filter/starcalc/scflt.cxx                          |    7 
 sd/source/core/CustomAnimationCloner.cxx                     |   27 --
 sd/source/core/stlsheet.cxx                                  |    6 
 sd/source/filter/eppt/pptx-epptbase.cxx                      |    2 
 sd/source/filter/html/htmlex.cxx                             |    8 
 sd/source/helper/simplereferencecomponent.cxx                |   12 
 sd/source/ui/remotecontrol/ImagePreparer.cxx                 |   10 
 sd/source/ui/slideshow/slideshowimpl.cxx                     |  146 ++---------
 sd/source/ui/unoidl/unomodel.cxx                             |    6 
 sd/source/ui/view/drviews1.cxx                               |    8 
 sfx2/source/dialog/filedlghelper.cxx                         |    4 
 sfx2/source/view/lokhelper.cxx                               |   12 
 slideshow/source/engine/activitiesqueue.cxx                  |    4 
 slideshow/source/engine/animationnodes/animationbasenode.cxx |    4 
 slideshow/source/engine/eventqueue.cxx                       |    4 
 slideshow/source/engine/pointersymbol.cxx                    |    4 
 slideshow/source/engine/shapes/drawinglayeranimation.cxx     |    4 
 slideshow/source/engine/shapes/externalshapebase.cxx         |    5 
 slideshow/source/engine/shapes/viewappletshape.cxx           |    5 
 slideshow/source/engine/shapes/viewbackgroundshape.cxx       |    5 
 slideshow/source/engine/shapes/viewmediashape.cxx            |   13 
 slideshow/source/engine/slide/layermanager.cxx               |    5 
 slideshow/source/engine/slide/slideanimations.cxx            |    5 
 slideshow/source/engine/slide/slideimpl.cxx                  |   15 -
 slideshow/source/engine/slidebitmap.cxx                      |    5 
 slideshow/source/engine/slideshowimpl.cxx                    |    7 
 slideshow/source/engine/soundplayer.cxx                      |    5 
 slideshow/source/engine/waitsymbol.cxx                       |    4 
 sot/source/sdstor/ucbstorage.cxx                             |    6 
 svgio/inc/svgtools.hxx                                       |    4 
 svgio/source/svgreader/svgdocumenthandler.cxx                |    4 
 svgio/source/svgreader/svgtools.cxx                          |   18 -
 svl/source/config/itemholder2.cxx                            |    7 
 svl/source/passwordcontainer/passwordcontainer.cxx           |   12 
 svtools/langsupport/langsupport.cxx                          |    3 
 svtools/source/config/extcolorcfg.cxx                        |    9 
 svtools/source/config/itemholder2.cxx                        |    6 
 svtools/source/dialogs/addresstemplate.cxx                   |    7 
 svx/source/form/fmsrccfg.cxx                                 |    6 
 svx/source/form/fmtextcontrolshell.cxx                       |   25 -
 svx/source/svdraw/svdoole2.cxx                               |   58 +---
 svx/source/xml/xmlgrhlp.cxx                                  |    2 
 sw/qa/core/macros-test.cxx                                   |    2 
 sw/source/core/crsr/crsrsh.cxx                               |   24 -
 sw/source/core/layout/dbg_lay.cxx                            |    3 
 sw/source/filter/ww8/rtfattributeoutput.cxx                  |    4 
 sw/source/ui/dbui/dbinsdlg.cxx                               |    2 
 sw/source/ui/dbui/mmaddressblockpage.cxx                     |    2 
 test/source/sheet/xcellrangesquery.cxx                       |   14 -
 test/source/sheet/xsheetoutline.cxx                          |    2 
 testtools/source/bridgetest/multi.cxx                        |    5 
 toolkit/source/controls/unocontrolmodel.cxx                  |   26 -
 toolkit/source/controls/unocontrols.cxx                      |    8 
 ucb/source/ucp/expand/ucpexpand.cxx                          |    4 
 ucbhelper/source/client/proxydecider.cxx                     |    3 
 unodevtools/source/skeletonmaker/cpptypemaker.cxx            |    6 
 unodevtools/source/skeletonmaker/javatypemaker.cxx           |    6 
 unodevtools/source/skeletonmaker/skeletonmaker.cxx           |    5 
 unotools/source/config/itemholder1.cxx                       |    6 
 unoxml/source/dom/document.cxx                               |    2 
 unoxml/source/dom/documentbuilder.cxx                        |    4 
 unoxml/source/dom/elementlist.cxx                            |    5 
 uui/source/iahndl.cxx                                        |    8 
 vcl/opengl/x11/X11DeviceInfo.cxx                             |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                            |   54 +---
 vcl/source/window/builder.cxx                                |   56 ++--
 vcl/source/window/dialog.cxx                                 |    2 
 vcl/source/window/layout.cxx                                 |    2 
 vcl/source/window/window2.cxx                                |    4 
 vcl/unx/generic/app/sm.cxx                                   |    2 
 vcl/unx/generic/fontmanager/fontconfig.cxx                   |    4 
 vcl/unx/generic/fontmanager/fontmanager.cxx                  |    4 
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx       |   13 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx               |    9 
 writerfilter/source/rtftok/rtftokenizer.cxx                  |    4 
 xmloff/source/core/xmlerror.cxx                              |    5 
 xmloff/source/forms/elementimport.cxx                        |    8 
 xmloff/source/forms/propertyimport.cxx                       |   10 
 xmloff/source/script/XMLEventExport.cxx                      |   12 
 xmloff/source/transform/StyleOOoTContext.cxx                 |   23 -
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx             |    2 
 167 files changed, 530 insertions(+), 1110 deletions(-)

New commits:
commit ef513fd4b049b214a03fbe6e62a5ea43680a7a9b
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri May 26 10:58:42 2017 +0200

    remove unnecessary use of OString::getStr
    
    Change-Id: I0490efedf459190521f4339854b3394d57765fdb
    Reviewed-on: https://gerrit.libreoffice.org/38058
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index a0617d498330..ab8dbadd350e 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -652,12 +652,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
             {
                 if( !isLibraryElementValid( pLib->getByName( aElementName ) ) )
                 {
-                    #if OSL_DEBUG_LEVEL > 0
-                    OString aMessage = "invalid library element '" +
-                                        OUStringToOString( aElementName, osl_getThreadTextEncoding() ) +
-                                        "'.";
-                    OSL_FAIL( aMessage.getStr());
-                    #endif
+                    SAL_WARN( "basic", "invalid library element '" << aElementName << "'.");
                     continue;
                 }
 
@@ -734,12 +729,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
 
                 if( !isLibraryElementValid( pLib->getByName( aElementName ) ) )
                 {
-                    #if OSL_DEBUG_LEVEL > 0
-                    OString aMessage = "invalid library element '" +
-                                       OUStringToOString( aElementName, osl_getThreadTextEncoding() ) +
-                                       "'.";
-                    OSL_FAIL( aMessage.getStr());
-                    #endif
+                    SAL_WARN( "basic", "invalid library element '" << aElementName << "'.");
                     continue;
                 }
 
diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index 7fc78e2f76a4..989d50819d04 100755
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -163,8 +163,8 @@ protected:
     {
         assert(m_bDumpMode);
         assert(m_aDumpFile.is_open());
-        m_aDumpFile << "// " << OUStringToOString(sCheck, RTL_TEXTENCODING_UTF8).getStr() << "\n";   // Add check string to make dump file readable
-        m_aDumpFile << OUStringToOString(sActualValue.trim(), RTL_TEXTENCODING_UTF8).getStr() << "\n";      // Write out the checked value, will be used as reference later
+        m_aDumpFile << "// " << sCheck << "\n";   // Add check string to make dump file readable
+        m_aDumpFile << sActualValue.trim() << "\n";      // Write out the checked value, will be used as reference later
     }
 
     void readNote(const OUString& sNote)
@@ -183,7 +183,7 @@ protected:
     {
         assert(m_bDumpMode);
         assert(m_aDumpFile.is_open());
-        m_aDumpFile << "/// " << OUStringToOString(sNote, RTL_TEXTENCODING_UTF8).getStr() << "\n";
+        m_aDumpFile << "/// " << sNote << "\n";
     }
 
     double readExpectedDouble(const OUString& sCheck)
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 6c4a4814ae61..519dde5bd163 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -140,9 +140,8 @@ namespace
             }
             catch( const uno::Exception & ex )
             {
-                (void)(ex); // no warning in non-debug builds
-                OSL_FAIL( OUStringToOString("Property Exception caught. Message: " +
-                                            ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+                (void)ex; // no warning in non-debug builds
+                SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
             }
         }
         return aResult;
@@ -168,9 +167,8 @@ namespace
             }
             catch( const uno::Exception & ex )
             {
-                (void)(ex); // no warning in non-debug builds
-                OSL_FAIL( OUStringToOString("Property Exception caught. Message: " +
-                                            ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+                (void)ex; // no warning in non-debug builds
+                SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
             }
         }
     }
@@ -185,9 +183,8 @@ namespace
         }
         catch( const uno::Exception & ex )
         {
-            (void)(ex); // no warning in non-debug builds
-            OSL_FAIL( OUStringToOString("Property Exception caught. Message: " +
-                                        ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+            (void)ex; // no warning in non-debug builds
+            SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
         }
         return Color( nResult );
     }
@@ -204,8 +201,7 @@ namespace
         catch( const uno::Exception & ex )
         {
             (void)(ex); // no warning in non-debug builds
-            OSL_FAIL( OUStringToOString( "Property Exception caught. Message: " +
-                                        ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+            SAL_WARN( "chart2", "Property Exception caught. Message: " << ex.Message);
         }
     }
 }
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index eb66209e1a73..7669bd253674 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -123,12 +123,7 @@ void ItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
                     catch( const beans::UnknownPropertyException &ex )
                     {
                         delete pItem;
-                        (void)ex;
-                        OSL_FAIL(
-                                    OUStringToOString(
-                                        ex.Message +
-                                        " - unknown Property: " + aProperty.first,
-                                        RTL_TEXTENCODING_ASCII_US ).getStr());
+                        SAL_WARN( "chart2", ex.Message << " - unknown Property: " << aProperty.first);
                     }
                     catch( const uno::Exception &ex )
                     {
@@ -193,17 +188,12 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet )
                 catch( const beans::UnknownPropertyException &ex )
                 {
                     (void)ex;
-                    OSL_FAIL(
-                                OUStringToOString(
-                                    ex.Message +
-                                    " - unknown Property: " + aProperty.first,
-                                    RTL_TEXTENCODING_ASCII_US).getStr());
+                    SAL_WARN( "chart2", ex.Message << " - unknown Property: " << aProperty.first);
                 }
                 catch( const uno::Exception &ex )
                 {
                     (void)ex;
-                    OSL_FAIL( OUStringToOString(
-                                    ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+                    SAL_WARN( "chart2", ex.Message );
                 }
             }
             else
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 63e3b2336b21..308b64a5ad8e 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -216,9 +216,8 @@ void ChartController::TheModel::tryTermination()
     }
     catch(const uno::Exception& ex)
     {
-        (void)(ex); // no warning in non-debug builds
-        OSL_FAIL( OString( OString("Termination of model failed: ")
-            + OUStringToOString( ex.Message, RTL_TEXTENCODING_ASCII_US ) ).getStr() );
+        (void)ex; // no warning in non-debug builds
+        SAL_WARN( "chart2", "Termination of model failed: " << ex.Message );
     }
 }
 
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index 177230982905..7f80faec432a 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -96,13 +96,13 @@ OString createFileNameFromType( const OString& destination,
     if (bWithPoint)
         fileNameBuf.append('.');
     else
-        fileNameBuf.append(destination.getStr(), destination.getLength());
+        fileNameBuf.append(destination);
 
     if (bWithSeparator)
         fileNameBuf.append("/");
 
-    fileNameBuf.append(type.getStr(), type.getLength());
-    fileNameBuf.append(postfix.getStr(), postfix.getLength());
+    fileNameBuf.append(type);
+    fileNameBuf.append(postfix);
 
     OString fileName(fileNameBuf.makeStringAndClear());
 
@@ -120,7 +120,7 @@ OString createFileNameFromType( const OString& destination,
     sal_Int32 nIndex = 0;
     do
     {
-        buffer.append(fileName.getToken(0, token, nIndex).getStr());
+        buffer.append(fileName.getToken(0, token, nIndex));
         if( nIndex == -1 )
             break;
 
diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx
index 4c2700c3f2f5..e309da6d74ed 100644
--- a/comphelper/source/misc/documentinfo.cxx
+++ b/comphelper/source/misc/documentinfo.cxx
@@ -147,17 +147,11 @@ namespace comphelper {
         catch ( const Exception& )
         {
             css::uno::Any caught( ::cppu::getCaughtException() );
-            OString sMessage( "caught an exception!" );
-            sMessage += "\ntype   : ";
-            sMessage += OString( caught.getValueTypeName().getStr(), caught.getValueTypeName().getLength(), osl_getThreadTextEncoding() );
-            sMessage += "\nmessage: ";
             css::uno::Exception exception;
             caught >>= exception;
-            sMessage += OString( exception.Message.getStr(), exception.Message.getLength(), osl_getThreadTextEncoding() );
-            sMessage += "\nin function:\n";
-            sMessage += OSL_THIS_FUNC;
-            sMessage += "\n";
-            OSL_FAIL( sMessage.getStr() );
+            SAL_WARN( "comphelper", "caught an exception!\ntype   : " << caught.getValueTypeName()
+                                    << "\nmessage: " << exception.Message
+                                    << "\nin function:\n" << OSL_THIS_FUNC);
         }
 
         return sTitle;
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index b4d05a5fcd48..14e42fb9a022 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -84,30 +84,26 @@ uno::Sequence< sal_Int8 > MimeConfigurationHelper::GetSequenceClassIDRepresentat
     if ( nLength == 36 )
     {
         OString aCharClassID = OUStringToOString( aClassID, RTL_TEXTENCODING_ASCII_US );
-        const sal_Char* pString = aCharClassID.getStr();
-        if ( pString )
-        {
-            uno::Sequence< sal_Int8 > aResult( 16 );
-
-            sal_Int32 nStrPointer = 0;
-            sal_Int32 nSeqInd = 0;
-            while( nSeqInd < 16 && nStrPointer + 1 < nLength )
-            {
-                sal_uInt8 nDigit1 = GetDigit_Impl( pString[nStrPointer++] );
-                sal_uInt8 nDigit2 = GetDigit_Impl( pString[nStrPointer++] );
+        uno::Sequence< sal_Int8 > aResult( 16 );
 
-                if ( nDigit1 > 15 || nDigit2 > 15 )
-                    break;
+        sal_Int32 nStrPointer = 0;
+        sal_Int32 nSeqInd = 0;
+        while( nSeqInd < 16 && nStrPointer + 1 < nLength )
+        {
+            sal_uInt8 nDigit1 = GetDigit_Impl( aCharClassID[nStrPointer++] );
+            sal_uInt8 nDigit2 = GetDigit_Impl( aCharClassID[nStrPointer++] );
 
-                aResult[nSeqInd++] = (sal_Int8)( nDigit1 * 16 + nDigit2 );
+            if ( nDigit1 > 15 || nDigit2 > 15 )
+                break;
 
-                if ( nStrPointer < nLength && pString[nStrPointer] == '-' )
-                    nStrPointer++;
-            }
+            aResult[nSeqInd++] = (sal_Int8)( nDigit1 * 16 + nDigit2 );
 
-            if ( nSeqInd == 16 && nStrPointer == nLength )
-                return aResult;
+            if ( nStrPointer < nLength && aCharClassID[nStrPointer] == '-' )
+                nStrPointer++;
         }
+
+        if ( nSeqInd == 16 && nStrPointer == nLength )
+            return aResult;
     }
 
     return uno::Sequence< sal_Int8 >();
diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx
index 6eeb7c8e166c..99e70581024b 100644
--- a/comphelper/source/misc/scopeguard.cxx
+++ b/comphelper/source/misc/scopeguard.cxx
@@ -33,8 +33,7 @@ ScopeGuard::~ScopeGuard()
     }
     catch (css::uno::Exception & exc) {
         (void) exc; // avoid warning about unused variable
-        OSL_FAIL( OUStringToOString( "UNO exception occurred: " + exc.Message,
-                                     RTL_TEXTENCODING_UTF8 ).getStr() );
+        SAL_WARN( "comphelper", "UNO exception occurred: " << exc.Message );
     }
     catch (...) {
         OSL_FAIL( "unknown exception occurred!" );
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 1b17eb112d49..35b5bf818b6c 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -976,14 +976,10 @@ try
                 {
                     xNewProps->setPropertyValue(pResult->Name, xOldProps->getPropertyValue(pResult->Name));
                 }
-                catch(IllegalArgumentException&)
+                catch(IllegalArgumentException const & exc)
                 {
-#ifdef DBG_UTIL
-                    OUString sMessage = "TransferFormComponentProperties : could not transfer the value for property \"" +
-                        pResult->Name +
-                        "\"";
-                    OSL_FAIL(OUStringToOString(sMessage, RTL_TEXTENCODING_ASCII_US).getStr());
-#endif
+                    SAL_WARN( "connectivity.commontools", "TransferFormComponentProperties : could not transfer the value for property \""
+                                << pResult->Name << "\" " << exc.Message);
                 }
             }
         }
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index d1b8960f79da..709ab9345fd6 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1253,7 +1253,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
                 throwInvalidColumnType( STR_INVALID_COLUMN_NAME_LENGTH, aName );
             }
 
-            (*m_pFileStream).WriteCharPtr( aCol.getStr() );
+            m_pFileStream->WriteCharPtr( aCol.getStr() );
             m_pFileStream->WriteBytes(aBuffer, 11 - aCol.getLength());
 
             sal_Int32 nPrecision = 0;
@@ -2091,7 +2091,7 @@ bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, std::size_t& rBlockNr
             const char cEOF = (char) DBF_EOL;
             nSize++;
             m_pMemoStream->WriteBytes(aStr.getStr(), aStr.getLength());
-            (*m_pMemoStream).WriteChar( cEOF ).WriteChar( cEOF );
+            m_pMemoStream->WriteChar( cEOF ).WriteChar( cEOF );
         } break;
         case MemoFoxPro:
         case MemodBaseIV: // dBase IV-Memofeld with length
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index fe1c184d7e99..3181b940bf84 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -311,16 +311,10 @@ namespace connectivity
                         }
                         catch(const Exception& e)
                         {
-#if OSL_DEBUG_LEVEL > 0
-                            OString sMessage( "[HSQLDB-SDBC] caught an exception while opening a stream\n" );
-                            sMessage += "Name: ";
-                            sMessage += OString( sName.getStr(), sName.getLength(), osl_getThreadTextEncoding() );
-                            sMessage += "\nMode: 0x";
-                            if ( _nMode < 16 )
-                                sMessage += "0";
-                            sMessage += OString::number( _nMode, 16 ).toAsciiUpperCase();
-                            OSL_FAIL( sMessage.getStr() );
-#endif
+                            SAL_WARN( "connectivity.hsqldb", "[HSQLDB-SDBC] caught an exception while opening a stream\n"
+                                "Name: " << sName
+                                << "\nMode: 0x" <<  ( _nMode < 16 ? "0" : "")
+                                << std::hex << _nMode );
                             StorageContainer::throwJavaException(e,env);
                         }
                     }
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index cfea0be76e83..51a20c5e65e2 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -271,7 +271,7 @@ std::vector<bool> entryMatchedByExpression(MQueryHelper* _aQuery, MQueryExpressi
             MQueryExpressionString* evStr = static_cast<MQueryExpressionString*> (*evIter);
             // Set the 'name' property of the boolString.
             OString attrName = _aQuery->getColumnAlias().getProgrammaticNameOrFallbackToUTF8Alias( evStr->getName() );
-            SAL_INFO("connectivity.mork", "Name = " << attrName.getStr());
+            SAL_INFO("connectivity.mork", "Name = " << attrName);
             bool bRequiresValue = true;
             OUString currentValue = entry->getValue(attrName);
             if (evStr->getCond() == MQueryOp::Exists || evStr->getCond() == MQueryOp::DoesNotExist)
diff --git a/cppu/source/LogBridge/LogBridge.cxx b/cppu/source/LogBridge/LogBridge.cxx
index 604369d85186..ac99c395e8f9 100644
--- a/cppu/source/LogBridge/LogBridge.cxx
+++ b/cppu/source/LogBridge/LogBridge.cxx
@@ -134,10 +134,7 @@ bool LogBridge::v_isValid(rtl::OUString * pReason)
         switch(_pTypeRef->eTypeClass)
         {
             case typelib_TypeClass_STRING:
-                {
-                    const ::rtl::OString sValue( ::rtl::OUStringToOString(*static_cast< ::rtl::OUString*>(pArg),osl_getThreadTextEncoding()));
-                    SAL_INFO("cppu.log", "" << sValue.getStr());
-                }
+                SAL_INFO("cppu.log", "" << *static_cast< ::rtl::OUString*>(pArg));
                 break;
             case typelib_TypeClass_BOOLEAN:
                SAL_INFO("cppu.log", "" << *static_cast<sal_Bool*>(pArg));
@@ -168,10 +165,7 @@ bool LogBridge::v_isValid(rtl::OUString * pReason)
                SAL_INFO("cppu.log", "" << *static_cast<double*>(pArg));
                 break;
             case typelib_TypeClass_TYPE:
-                {
-                    const ::rtl::OString sValue( ::rtl::OUStringToOString(static_cast<css::uno::Type*>(pArg)->getTypeName(),osl_getThreadTextEncoding()));
-                   SAL_INFO("cppu.log", "" << sValue.getStr());
-                }
+                SAL_INFO("cppu.log", "" << static_cast<css::uno::Type*>(pArg)->getTypeName());
                 break;
             case typelib_TypeClass_ANY:
                 if ( static_cast<uno_Any*>(pArg)->pData )
@@ -183,10 +177,7 @@ bool LogBridge::v_isValid(rtl::OUString * pReason)
                SAL_INFO("cppu.log", "exception");
                 break;
             case typelib_TypeClass_INTERFACE:
-                {
-                    const ::rtl::OString sValue( ::rtl::OUStringToOString(_pTypeRef->pTypeName,osl_getThreadTextEncoding()));
-                   SAL_INFO("cppu.log", "" << sValue.getStr() << "0x" << std::hex << pArg);
-                }
+                SAL_INFO("cppu.log", "" << _pTypeRef->pTypeName << "0x" << std::hex << pArg);
                 break;
             case typelib_TypeClass_VOID:
                SAL_INFO("cppu.log", "void");
@@ -215,7 +206,7 @@ void LogProbe(
         sTemp = ::rtl::OUStringToOString(pMemberType->pTypeName,RTL_TEXTENCODING_ASCII_US);
     if ( pre  )
     {
-        SAL_INFO("cppu.log", "{ LogBridge () " << sTemp.getStr() );
+        SAL_INFO("cppu.log", "{ LogBridge () " << sTemp );
         if ( nParams )
         {
            SAL_INFO("cppu.log", "\n| : ( LogBridge ");
@@ -232,14 +223,13 @@ void LogProbe(
     }
     else if ( !pre )
     {
-        SAL_INFO("cppu.log", "} LogBridge () " << sTemp.getStr());
+        SAL_INFO("cppu.log", "} LogBridge () " << sTemp);
         if ( ppException && *ppException )
         {
             SAL_INFO("cppu.log", " exception occurred : ");
             typelib_TypeDescription * pElementTypeDescr = nullptr;
             TYPELIB_DANGER_GET( &pElementTypeDescr, (*ppException)->pType );
-            const ::rtl::OString sValue( ::rtl::OUStringToOString(pElementTypeDescr->pTypeName,osl_getThreadTextEncoding()));
-           SAL_INFO("cppu.log", "" << sValue.getStr());
+            SAL_INFO("cppu.log", "" << pElementTypeDescr->pTypeName);
             TYPELIB_DANGER_RELEASE( pElementTypeDescr );
         }
         else if ( pReturnTypeRef )
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index f869e795c077..cf6621707f16 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -530,9 +530,7 @@ bool complete(typelib_TypeDescription ** ppTypeDescr, bool initTables) {
         }
         else
         {
-            OString aStr(
-                rtl::OUStringToOString( (*ppTypeDescr)->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
-            SAL_INFO( "cppu.typelib", "type cannot be completed: " <<  aStr.getStr() );
+            SAL_INFO( "cppu.typelib", "type cannot be completed: " <<  (*ppTypeDescr)->pTypeName );
             return false;
         }
     }
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index fdff1a21bab8..333812495fa6 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -92,12 +92,8 @@ void OComponentHelper::release() throw()
                 catch (css::uno::RuntimeException & exc)
                 {
                     // release should not throw exceptions
-#if OSL_DEBUG_LEVEL > 0
-                    OString msg( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
-                    OSL_FAIL( msg.getStr() );
-#else
                     (void) exc; // avoid warning about unused variable
-#endif
+                    SAL_WARN( "cppuhelper", exc.Message );
                 }
 
                 // only the alive ref holds the object
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index 2df1b495689c..ee964e227c57 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -574,8 +574,7 @@ extern "C" { static void s_createComponentContext_v(va_list * pParam)
         catch (Exception & exc)
         {
             (void) exc; // avoid warning about unused variable
-            OSL_FAIL( OUStringToOString(
-                            exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+            SAL_WARN( "cppuhelper", exc.Message );
             xContext.clear();
         }
     }
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index 6118ccb79fc1..c8b72f61a48f 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -77,10 +77,8 @@ void WeakComponentImplHelperBase::release()
                 dispose();
             }
             catch (RuntimeException const& exc) { // don't break throw ()
-                OSL_FAIL(
-                    OUStringToOString(
-                        exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
-                static_cast<void>(exc);
+                (void)exc;
+                SAL_WARN( "cppuhelper", exc.Message );
             }
             OSL_ASSERT( rBHelper.bDisposed );
         }
@@ -204,10 +202,8 @@ void WeakAggComponentImplHelperBase::release()
                 dispose();
             }
             catch (RuntimeException const& exc) { // don't break throw ()
-                OSL_FAIL(
-                    OUStringToOString(
-                        exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
-                static_cast<void>(exc);
+                (void)exc;
+                SAL_WARN( "cppuhelper", exc.Message );
             }
             OSL_ASSERT( rBHelper.bDisposed );
         }
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index b52634b26ecc..6bd49fa212ec 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -243,10 +243,8 @@ void OWeakObject::disposeWeakConnectionPoint()
             p->dispose();
         }
         catch (RuntimeException const& exc) {
-            OSL_FAIL(
-                OUStringToOString(
-                    exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
-            static_cast<void>(exc);
+            (void)exc;
+            SAL_WARN( "cppuhelper", exc.Message );
         }
         p->release();
     }
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index cea8b66cdbe3..0c2e0b7157a5 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -783,7 +783,7 @@ IMPL_STATIC_LINK_NOARG(SvxSecurityTabPage, MacroSecPBHdl, Button*, void)
     }
     catch (const Exception& e)
     {
-        OSL_FAIL(OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr());
+        SAL_WARN( "cui.options", e.Message);
         (void)e;
     }
 }
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 24c56f47d403..a64a998a17a1 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -457,11 +457,7 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
         catch(Exception& e)
         {
             (void) e;
-            OSL_FAIL(
-                OUStringToOString(
-                    "exception in FilterFactory access: " + e.Message,
-                    RTL_TEXTENCODING_UTF8).
-                getStr());
+            SAL_WARN( "cui.options", "exception in FilterFactory access: " << e.Message );
         }
 
         pImpl->bInitialized = true;
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;
 
diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx
index ee814f312b7b..f84aac3c53ae 100644
--- a/desktop/source/deployment/dp_log.cxx
+++ b/desktop/source/deployment/dp_log.cxx
@@ -79,8 +79,7 @@ void ProgressLogImpl::disposing()
     }
     catch (const Exception & exc) {
         (void) exc;
-        OSL_FAIL( OUStringToOString(
-                        exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+        SAL_WARN( "desktop", exc.Message );
     }
 }
 
@@ -139,8 +138,7 @@ void ProgressLogImpl::log_write( OString const & text )
     }
     catch (const io::IOException & exc) {
         (void) exc;
-        OSL_FAIL( OUStringToOString(
-                        exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+        SAL_WARN( "desktop", exc.Message );
     }
 }
 
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 8acde7cc8172..fa286493fec9 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -740,8 +740,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
             xFilePicker->appendFilter( iPos->first, iPos->second );
         }
         catch (const lang::IllegalArgumentException & exc) {
-            OSL_FAIL( OUStringToOString(
-                            exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+            SAL_WARN( "desktop", exc.Message );
             (void) exc;
         }
     }
@@ -1389,7 +1388,7 @@ bool UpdateRequiredDialog::isEnabled( const uno::Reference< deployment::XPackage
     catch ( const uno::RuntimeException & ) { throw; }
     catch (const uno::Exception & exc) {
         (void) exc;
-        OSL_FAIL( OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+        SAL_WARN( "desktop", exc.Message );
         bRegistered = false;
     }
 
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index f4d2f1fd3ab6..28863f9bc59b 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -345,7 +345,7 @@ PackageState TheExtensionManager::getPackageState( const uno::Reference< deploym
     }
     catch (const uno::Exception & exc) {
         (void) exc;
-        OSL_FAIL( OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+        SAL_WARN( "desktop", exc.Message );
         return NOT_AVAILABLE;
     }
 }
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index df1431c449a2..2dd0abd3a945 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -583,8 +583,7 @@ OUString PackageManagerImpl::detectMediaType(
             if (throw_exc)
                 throw;
             (void) exc;
-            OSL_FAIL( OUStringToOString(
-                            exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+            SAL_WARN( "desktop", exc.Message );
         }
     }
     return mediaType;
@@ -1028,14 +1027,12 @@ PackageManagerImpl::getDeployedPackages_(
         catch (const lang::IllegalArgumentException & exc) {
             // ignore
             (void) exc; // avoid warnings
-            OSL_FAIL( OUStringToOString(
-                            exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+            SAL_WARN( "desktop", exc.Message );
         }
         catch (const deployment::DeploymentException& exc) {
             // ignore
             (void) exc; // avoid warnings
-            OSL_FAIL( OUStringToOString(
-                            exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+            SAL_WARN( "desktop", exc.Message );
         }
     }
     return comphelper::containerToSequence(packages);
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index d0b4211691ee..da6c96195158 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -257,17 +257,12 @@ void PackageRegistryImpl::insertBackend(
 #if OSL_DEBUG_LEVEL > 0
         else
         {
-            OUStringBuffer buf;
-            buf.append( "more than one PackageRegistryBackend for media-type=\"" );
-            buf.append( mediaType );
-            buf.append( "\" => " );
-            buf.append( Reference<lang::XServiceInfo>(
-                            xBackend, UNO_QUERY_THROW )->
-                        getImplementationName() );
-            buf.append( "\"!" );
-            OSL_FAIL( OUStringToOString(
-                            buf.makeStringAndClear(),
-                            RTL_TEXTENCODING_UTF8).getStr() );
+            SAL_WARN( "desktop", "more than one PackageRegistryBackend for media-type=\""
+                    << mediaType
+                    << "\" => "
+                    <<  Reference<lang::XServiceInfo>(
+                            xBackend, UNO_QUERY_THROW )->getImplementationName()
+                    << "\"!" );
         }
 #endif
     }
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index cda1f56de4c4..93a8060231b1 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -843,10 +843,8 @@ void BackendImpl::PackageImpl::processPackage_(
                         }
                         catch (const Exception &)
                         {
-                            OSL_FAIL( OUStringToOString(
-                                            ::comphelper::anyToString(
-                                                ::cppu::getCaughtException() ),
-                                            RTL_TEXTENCODING_UTF8 ).getStr() );
+                            SAL_WARN( "desktop", ::comphelper::anyToString(
+                                                ::cppu::getCaughtException() ) );
                             // ignore any errors of rollback
                         }
                     }
@@ -934,7 +932,7 @@ OUString BackendImpl::PackageImpl::getDescription()
         }
         catch ( const css::deployment::DeploymentException& )
         {
-            OSL_FAIL( OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 ).getStr() );
+            SAL_WARN( "desktop", ::comphelper::anyToString( ::cppu::getCaughtException() ) );
         }
     }
 
@@ -1058,15 +1056,12 @@ void BackendImpl::PackageImpl::exportTo(
         }
         // xxx todo: think about exception specs:
         catch (const deployment::DeploymentException &) {
-            OSL_FAIL( OUStringToOString(
-                            ::comphelper::anyToString(
-                                ::cppu::getCaughtException() ),
-                            RTL_TEXTENCODING_UTF8 ).getStr() );
+            SAL_WARN( "desktop", ::comphelper::anyToString(
+                                ::cppu::getCaughtException() ) );
         }
         catch (const lang::IllegalArgumentException & exc) {
             (void) exc;
-            OSL_FAIL( OUStringToOString(
-                            exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+            SAL_WARN( "desktop", exc.Message );
         }
 
         std::vector< Sequence<beans::PropertyValue> > manifest;
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 572bdd0eaef4..3c88929d4683 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -353,7 +353,7 @@ struct RectangleAndPart
     OString toString() const
     {
         std::stringstream ss;
-        ss << m_aRectangle.toString().getStr();
+        ss << m_aRectangle.toString();
         if (m_nPart >= -1)
             ss << ", " << m_nPart;
         return ss.str().c_str();
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index be141b68210c..bc4df65f6cfa 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -207,9 +207,7 @@ void Migration::migrateSettingsIfNecessary()
     try {
         bResult = aImpl.doMigration();
     } catch (const Exception& e) {
-        OString aMsg = "doMigration() exception: "
-                     + OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
-        OSL_FAIL(aMsg.getStr());
+        SAL_WARN( "desktop", "doMigration() exception: " << e.Message);
     }
     OSL_ENSURE(bResult, "Migration has not been successful");
     (void)bResult;
@@ -844,11 +842,7 @@ void MigrationImpl::copyFiles()
             _checkAndCreateDirectory(aURL);
             FileBase::RC copyResult = File::copy(*i_file, destName);
             if (copyResult != FileBase::E_None) {
-                OString msg = "Cannot copy "
-                            + OUStringToOString(*i_file, RTL_TEXTENCODING_UTF8)
-                            + " to "
-                            + OUStringToOString(destName, RTL_TEXTENCODING_UTF8);
-                OSL_FAIL(msg.getStr());
+                SAL_WARN( "desktop", "Cannot copy " << *i_file <<  " to " << destName);
             }
             ++i_file;
         }
@@ -894,16 +888,12 @@ void MigrationImpl::runServices()
 
 
             } catch (const Exception& e) {
-                OString aMsg = "Execution of migration service failed (Exception caught).\nService: "
-                             + OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US)
-                             + "\nMessage: "
-                             + OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
-                OSL_FAIL(aMsg.getStr());
+                SAL_WARN( "desktop", "Execution of migration service failed (Exception caught).\nService: "
+                            << i_mig->service
+                            << "\nMessage: " << e.Message);
             } catch (...) {
-                OString aMsg = "Execution of migration service failed (Exception caught).\nService: "
-                             + OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US)
-                             + "\nNo message available";
-                OSL_FAIL(aMsg.getStr());
+                SAL_WARN( "desktop", "Execution of migration service failed (Exception caught).\nService: "
+                            << i_mig->service << "\nNo message available");
             }
 
         }
diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx
index bfe2e84df1d6..5bd36c836b2e 100644
--- a/desktop/source/migration/services/basicmigration.cxx
+++ b/desktop/source/migration/services/basicmigration.cxx
@@ -132,11 +132,8 @@ namespace migration
                 ::osl::FileBase::RC aResult = ::osl::File::copy( *aI, sTargetName );
                 if ( aResult != ::osl::FileBase::E_None )
                 {
-                    OString aMsg = "BasicMigration::copyFiles: cannot copy "
-                                 + OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 )
-                                 + " to "
-                                 + OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
-                    OSL_FAIL( aMsg.getStr() );
+                    SAL_WARN( "desktop", "BasicMigration::copyFiles: cannot copy "
+                                << *aI << " to " << sTargetName );
                 }
                 ++aI;
             }
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 3b0ebe9b9024..5b19b59a0472 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -165,11 +165,8 @@ bool IsUserWordbook( const OUString& rFile )
                     ::osl::FileBase::RC aResult = ::osl::File::copy( *aI, sTargetName );
                     if ( aResult != ::osl::FileBase::E_None )
                     {
-                        OString aMsg = "WordbookMigration::copyFiles: cannot copy "
-                                     + OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 )
-                                     + " to "
-                                     + OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
-                        OSL_FAIL( aMsg.getStr() );
+                        SAL_WARN( "desktop", "WordbookMigration::copyFiles: cannot copy "
+                                     << *aI << " to " << sTargetName);
                     }
                 }
                 ++aI;
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 0eb7feff44e4..d31baf996b59 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -127,8 +127,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
     }
     catch (const RuntimeException & exc) {
         (void) exc;
-        OSL_FAIL( OUStringToOString(
-                        exc.Message, osl_getThreadTextEncoding() ).getStr() );
+        SAL_WARN( "desktop", exc.Message );
     }
 }
 
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index c74d9e0d98aa..8e692cdf2fc8 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -84,8 +84,7 @@ OptionInfo const * getOptionInfo(
             }
         }
     }
-    OSL_FAIL( OUStringToOString(
-                    opt, osl_getThreadTextEncoding() ).getStr() );
+    SAL_WARN( "desktop", opt );
     return nullptr;
 }
 
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 32dc1b7441e1..0eebf97ee0c9 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -302,7 +302,7 @@ void SvxUnoConvertToMM( const MapUnit eSourceMapUnit, uno::Any & rMetric ) throw
                 rMetric <<= (sal_uInt32)(TWIPS_TO_MM(*o3tl::forceAccess<sal_uInt32>(rMetric)));
                 break;
             default:
-                OSL_FAIL(OString("AW: Missing unit translation to 100th mm, " + OString::number((sal_Int32)rMetric.getValueTypeClass())).getStr());
+                SAL_WARN("editeng", "AW: Missing unit translation to 100th mm, " << OString::number((sal_Int32)rMetric.getValueTypeClass()));
             }
             break;
         }
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];
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index 3d836d9fdb2b..cfc5ad0e5513 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -820,7 +820,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
     }
 
     {
-        SAL_INFO( "filter.config", "" << sRtlLog.getStr());
+        SAL_INFO( "filter.config", "" << sRtlLog);
         *pConfig = impl_createConfigAccess(sPath    ,
                                            false,   // bReadOnly
                                            true );  // bLocalesMode
@@ -878,15 +878,10 @@ css::uno::Any FilterCache::impl_getDirectCFGValue(const OUString& sDirectKey)
     }
     catch(const css::uno::RuntimeException&)
         { throw; }
-    #if OSL_DEBUG_LEVEL > 0
     catch(const css::uno::Exception& ex)
-    #else
-    catch(const css::uno::Exception&)
-    #endif
         {
-            #if OSL_DEBUG_LEVEL > 0
-            OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr());
-            #endif
+            (void)ex;
+            SAL_WARN( "filter.config", ex.Message);
             aValue.clear();
         }
 
@@ -1537,10 +1532,8 @@ void FilterCache::impl_readPatchUINames(const css::uno::Reference< css::containe
             return;
         OUString sName = rItem.getUnpackedValueOrDefault(PROPNAME_NAME, OUString());
 
-        OUString sMsg("Fallback scenario for filter or type '" + sName + "' and locale '" +
-                      sActLocale + "' failed. Please check your filter configuration.");
-
-        OSL_FAIL(FILTER_CONFIG_TO_ASCII_(sMsg));
+        SAL_WARN("filter.config", "Fallback scenario for filter or type '" << sName << "' and locale '" <<
+                      sActLocale << "' failed. Please check your filter configuration.");
 #endif
         return;
     }
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index c9a9115bb509..a9b9dbbc5e87 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2836,7 +2836,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
             catch( ... )
             {
                 const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
-                OSL_FAIL( pA->GetComment().getStr() );
+                SAL_WARN( "filter.svg", pA->GetComment() );
             }
 
         }
diff --git a/filter/source/svg/test/odfserializer.cxx b/filter/source/svg/test/odfserializer.cxx
index 48d5e1be759a..8a3d62996279 100644
--- a/filter/source/svg/test/odfserializer.cxx
+++ b/filter/source/svg/test/odfserializer.cxx
@@ -94,8 +94,7 @@ void SAL_CALL ODFSerializer::endElement( const OUString& aName )
 
 void SAL_CALL ODFSerializer::characters( const OUString& aChars )
 {
-    const OString aStr = OUStringToOString(aChars,
-                                                     RTL_TEXTENCODING_UTF8);
+    const OString aStr = OUStringToOString(aChars, RTL_TEXTENCODING_UTF8);
     const sal_Int32 nLen( aStr.getLength() );
     m_aBuf.realloc( nLen );
     const sal_Char* pStr = aStr.getStr();
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index 47d9e380ae14..d4455f620a0a 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -402,7 +402,7 @@ namespace XSLT
                 catch( const Exception& exc)
                     {
                         // something went wrong
-                        OSL_FAIL(OUStringToOString(exc.Message, RTL_TEXTENCODING_ASCII_US).getStr());
+                        SAL_WARN("filter.xslt", exc.Message);
                         return false;
                     }
             }
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index fa4de8afddf3..d8a86b4c9634 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -447,19 +447,10 @@ namespace
                 }
                 catch(const IllegalArgumentException& e)
                 {
-#if OSL_DEBUG_LEVEL > 0
-                    OString sMessage( "could not transfer the property named '" );
-                    sMessage += OString( pSourceProps->Name.getStr(), pSourceProps->Name.getLength(), RTL_TEXTENCODING_ASCII_US );
-                    sMessage += OString( "'." );
-                    if ( !e.Message.isEmpty() )
-                    {
-                        sMessage += OString( "\n\nMessage:\n" );
-                        sMessage += OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
-                    }
-                    OSL_FAIL( sMessage.getStr() );
-#else
                     (void)e;
-#endif
+                    SAL_WARN( "forms.component", "could not transfer the property named '"
+                                << pSourceProps->Name
+                                << "'. " << e.Message );
                 }
 
                 ++pSourceProps;
diff --git a/forms/source/richtext/attributedispatcher.cxx b/forms/source/richtext/attributedispatcher.cxx
index af06c8a26811..e5f38169cd93 100644
--- a/forms/source/richtext/attributedispatcher.cxx
+++ b/forms/source/richtext/attributedispatcher.cxx
@@ -90,16 +90,9 @@ namespace frm
         (void)_rArguments;
 
         OSL_ENSURE( _rURL.Complete == getFeatureURL().Complete, "OAttributeDispatcher::dispatch: invalid URL!" );
-#if OSL_DEBUG_LEVEL > 0
-        if ( _rArguments.getLength() )
-        {
-            OString sMessage( "OAttributeDispatcher::dispatch: found arguments, but can't handle arguments at all" );
-            sMessage += "\n (URL: ";
-            sMessage += OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US );
-            sMessage += ")";
-            OSL_FAIL( sMessage.getStr() );
-        }
-#endif
+        SAL_WARN_IF( _rArguments.getLength(), "forms.richtext",
+                "OAttributeDispatcher::dispatch: found arguments, but can't handle arguments at all"
+                " (URL: " << _rURL.Complete << ")");
 
         if ( m_pMasterDispatcher )
             m_pMasterDispatcher->executeAttribute( m_nAttributeId, nullptr );
diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx
index 03801430c773..e569e2634b63 100644
--- a/forms/source/xforms/submission/replace.cxx
+++ b/forms/source/xforms/submission/replace.cxx
@@ -101,9 +101,7 @@ CSubmission::SubmissionResult CSubmission::replace(const OUString& aReplace, con
             return CSubmission::SUCCESS;
         }
     } catch (const Exception& e) {
-            OString aMsg = "Exception during replace:\n"
-                         + OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8);
-        OSL_FAIL(aMsg.getStr());
+        SAL_WARN( "forms.xforms", "Exception during replace: " << e.Message);
     }
     return CSubmission::UNKNOWN_ERROR;
 }
diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx
index 1150ed51864e..14fcbd9c5ea8 100644
--- a/fpicker/source/office/commonpicker.cxx
+++ b/fpicker/source/office/commonpicker.cxx
@@ -446,10 +446,8 @@ namespace svt
             }
             else
             {
-                OSL_FAIL(
-                    OString(
-                        "OCommonPicker::initialize: unknown argument type at position "
-                        + OString::number(pArguments - _rArguments.getConstArray())).getStr());
+                SAL_WARN( "fpicker", "OCommonPicker::initialize: unknown argument type at position "
+                    << (pArguments - _rArguments.getConstArray()));
                 continue;
             }
 
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index f55ac969e568..28574963f084 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -1614,7 +1614,7 @@ sal_Bool SAL_CALL LayoutManager::requestElement( const OUString& rResourceURL )
     SolarMutexClearableGuard aWriteLock;
 
     OString aResName = OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US );
-    SAL_INFO( "fwk", "framework (cd100003) Element " << aResName.getStr() << " requested." );
+    SAL_INFO( "fwk", "framework (cd100003) Element " << aResName << " requested." );
 
     if (( aElementType.equalsIgnoreAsciiCase("statusbar") &&
           aElementName.equalsIgnoreAsciiCase("statusbar") ) ||
@@ -1742,7 +1742,7 @@ sal_Bool SAL_CALL LayoutManager::showElement( const OUString& aName )
     parseResourceURL( aName, aElementType, aElementName );
 
     OString aResName = OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US );
-    SAL_INFO( "fwk", "framework (cd100003) Element " << aResName.getStr() );
+    SAL_INFO( "fwk", "framework (cd100003) Element " << aResName );
 
     if ( aElementType.equalsIgnoreAsciiCase("menubar") &&
          aElementName.equalsIgnoreAsciiCase("menubar") )
@@ -1817,7 +1817,7 @@ sal_Bool SAL_CALL LayoutManager::hideElement( const OUString& aName )
 
     parseResourceURL( aName, aElementType, aElementName );
     OString aResName = OUStringToOString( aElementName, RTL_TEXTENCODING_ASCII_US );
-    SAL_INFO( "fwk", "framework (cd100003) Element " << aResName.getStr() );
+    SAL_INFO( "fwk", "framework (cd100003) Element " << aResName );
 
     if ( aElementType.equalsIgnoreAsciiCase("menubar") &&
          aElementName.equalsIgnoreAsciiCase("menubar") )
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index d2d1183d88f6..ec0f925e7651 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -971,7 +971,7 @@ void ToolBarManager::InitImageManager()
 void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContainer )
 {
     OString aTbxName = OUStringToOString( m_aResourceName, RTL_TEXTENCODING_ASCII_US );
-    SAL_INFO( "fwk.uielement", "framework (cd100003) ::ToolBarManager::FillToolbar " << aTbxName.getStr() );
+    SAL_INFO( "fwk.uielement", "framework (cd100003) ::ToolBarManager::FillToolbar " << aTbxName );
 
     SolarMutexGuard g;
 
diff --git a/helpcompiler/source/HelpIndexer_main.cxx b/helpcompiler/source/HelpIndexer_main.cxx
index 82822d897445..eb1220c34c2b 100644
--- a/helpcompiler/source/HelpIndexer_main.cxx
+++ b/helpcompiler/source/HelpIndexer_main.cxx
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
             sDir, sDir);
 
         if (!indexer.indexDocuments()) {
-            std::cerr << OUStringToOString(indexer.getErrorMessage(), osl_getThreadTextEncoding()).getStr()  << std::endl;
+            std::cerr << indexer.getErrorMessage() << std::endl;
             return 2;
         }
         return 0;
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 69aba9c43ae4..18babd5c4cf0 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -149,7 +149,7 @@ void xdictionary::initDictionaryData(const sal_Char *pLang)
     osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
     for(datacache & i : aLoadedCache)
     {
-        if( !strcmp( pLang, i.maLang.getStr() ) )
+        if( i.maLang != pLang )
         {
             data = i.maData;
             return;
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 3a6e98a28d4f..657496abcc44 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -271,8 +271,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
 
                 if (ePaper == PAPER_USER)
                 {
-                    bHalve = !rtl_str_shortenedCompareIgnoreAsciiCase_WithLength(
-                        aPaper.getStr(), aPaper.getLength(),  "half", 4, 4);
+                    bHalve = !aPaper.startsWith("half");
                     if (bHalve)
                         aPaper = aPaper.copy(4);
                     ePaper = PaperInfo::fromPSName(aPaper);
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 33a5fd75b6f6..8beb1071b84b 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -102,8 +102,7 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
 {
     if ( !rAttr.GetRef() && dynamic_cast<const SvMetaSlot *>(&rAttr) )
     {
-        OSL_FAIL( "Neuer Slot : " );
-        OSL_FAIL( rAttr.GetSlotId().getString().getStr() );
+        SAL_WARN( "idl", "Neuer Slot : " << rAttr.GetSlotId().getString() );
     }
 
     for( sal_uLong n = 0; n < aAttrList.size(); n++ )
diff --git a/idlc/source/idlcmain.cxx b/idlc/source/idlcmain.cxx
index 59a656aed142..038d0a0769d4 100644
--- a/idlc/source/idlcmain.cxx
+++ b/idlc/source/idlcmain.cxx
@@ -85,8 +85,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
             OString sysFileName( convertToAbsoluteSystemPath(*i) );
 
             if ( !options.quiet() )
-                fprintf(stdout, "Compiling: %s\n",
-                    (*i).getStr());
+                fprintf(stdout, "Compiling: %s\n", (*i).getStr());
             nErrors = compileFile(&sysFileName);
 
             if ( idlc()->getWarningCount() && !options.quiet() )
diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx
index e66bc9229a43..60c5ff463045 100644
--- a/idlc/source/idlcproduce.cxx
+++ b/idlc/source/idlcproduce.cxx
@@ -51,10 +51,9 @@ static bool checkOutputPath(const OString& completeName)
 
     sal_Int32 nIndex = 0;
     OString token(sysPathName.getToken(0, SEPARATOR, nIndex));
-    const sal_Char* p = token.getStr();
-    if (strcmp(p, "..") == 0
-        || *(p+1) == ':'
-        || strcmp(p, ".") == 0)
+    if (token.startsWith("..")
+        || (token.getLength() >= 2 && token[1] == ':')
+        || token.startsWith("."))
     {
         buffer.append(token);
         buffer.append(SEPARATOR);
diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l
index 2db7f97f38cf..cfb9cb6d56ed 100644
--- a/idlc/source/scanner.l
+++ b/idlc/source/scanner.l
@@ -439,7 +439,7 @@ published       return IDL_PUBLISHED;
 				if ( (nIndex = docu.indexOf("/*")) >= 0 || (nIndex = docu.indexOf("///")) >= 0 )
 				{
                     if ( 0 != nIndex &&
-                         (docu.getStr()[nIndex - 1] != '"' && docu.getStr()[nIndex - 1] != ':') )
+                         (docu[nIndex - 1] != '"' && docu[nIndex - 1] != ':') )
                         ErrorHandler::syntaxError(PS_NoState, idlc()->getLineNumber(),
                                                      "nested documentation strings are not allowed!");
 				}
@@ -456,7 +456,7 @@ published       return IDL_PUBLISHED;
 				if ( docu.indexOf("/*") >= 0 || docu.indexOf("//") >= 0 )
 				{
                     if ( 0 != nIndex &&
-                         (docu.getStr()[nIndex - 1] != '"' && docu.getStr()[nIndex - 1] != ':') )
+                         (docu[nIndex - 1] != '"' && docu[nIndex - 1] != ':') )
                         ErrorHandler::syntaxError(PS_NoState, idlc()->getLineNumber(),
                                                      "nested documentation strings are not allowed!");
 				}
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 8acbf3f62a0f..4a8c692e061d 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -193,6 +193,7 @@ certain functionality.
 @li @c extensions.config
 @li @c extensions.dbpilots
 @li @c extensions.evoab
+ at li @c extensions.logging
 @li @c extensions.olebridge - OLE automation bridge
 @li @c extensions.plugin
 @li @c extensions.propctrlr
@@ -234,6 +235,7 @@ certain functionality.
 @li @c forms.misc
 @li @c forms.richtext
 @li @c forms.runtime
+ at li @c forms.xforms
 
 @section formula
 
@@ -562,6 +564,7 @@ certain functionality.
 @li @c drawinglayer
 @li @c dtrans
 @li @c helpcompiler
+ at li @c idl
 @li @c javaunohelper
 @li @c jvmaccess
 @li @c lingucomponent
@@ -581,6 +584,7 @@ certain functionality.
 @li @c stoc
 @li @c store
 @li @c svg
+ at li @c svgio
 @li @c test
 @li @c ucbhelper
 @li @c unodevtools
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx
index 8df7340912b2..ab9b0f4b3739 100644
--- a/include/toolkit/helper/macros.hxx
+++ b/include/toolkit/helper/macros.hxx
@@ -126,9 +126,7 @@ void ClassName::disposing( const css::lang::EventObject& ) \
 
 #if OSL_DEBUG_LEVEL > 0
     #define DISPLAY_EXCEPTION( ClassName, MethodName, e )    \
-        OString sMessage( #ClassName "::" #MethodName ": caught an exception!\n" ); \
-        sMessage += OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); \
-        OSL_FAIL( sMessage.getStr() );
+        SAL_WARN( "toolkit", #ClassName "::" #MethodName ": caught an exception! " << e.Message);
 #else
     #define DISPLAY_EXCEPTION( ClassName, MethodName, e ) (void)e;
 #endif
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 0695af5cd25a..248dc5d4689a 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -412,9 +412,9 @@ template <typename T>
 inline T* VclBuilder::get(VclPtr<T>& ret, const OString& sID)
 {
     vcl::Window *w = get_by_name(sID);
-    SAL_WARN_IF(!w, "vcl.layout", "widget \"" << sID.getStr() << "\" not found in .ui");
+    SAL_WARN_IF(!w, "vcl.layout", "widget \"" << sID << "\" not found in .ui");
     SAL_WARN_IF(!dynamic_cast<T*>(w),
-       "vcl.layout", ".ui widget \"" << sID.getStr() << "\" needs to correspond to vcl type " << typeid(T).name());
+       "vcl.layout", ".ui widget \"" << sID << "\" needs to correspond to vcl type " << typeid(T).name());
     assert(w);
     assert(dynamic_cast<T*>(w));
     ret = static_cast<T*>(w);
@@ -427,7 +427,7 @@ inline T* VclBuilder::get(const OString& sID)
 {
     vcl::Window *w = get_by_name(sID);
     SAL_WARN_IF(w && !dynamic_cast<T*>(w),
-        "vcl.layout", ".ui widget \"" << sID.getStr() << "\" needs to correspond to vcl type " << typeid(T).name());
+        "vcl.layout", ".ui widget \"" << sID << "\" needs to correspond to vcl type " << typeid(T).name());
     assert(!w || dynamic_cast<T*>(w));
     return static_cast<T*>(w);
 }
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 3c31e60c63e6..281af044c6e1 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -537,7 +537,7 @@ bool getJavaProps(const OUString & exePath,
     //process error stream data
     stderrReader->join();
     JFW_TRACE2("Java wrote to stderr:\" "
-               << stderrReader->getData().getStr() << " \"");
+               << stderrReader->getData() << " \"");
 
     TimeValue waitMax= {5 ,0};
     procErr = osl_joinProcessWithTimeout(javaProcess, &waitMax);
diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 240650ca0f53..d8ec518c1a3a 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -456,7 +456,7 @@ void CfgMerge::WorkOnText(OString &, const OString& rLangIndex)
 
 void CfgMerge::Output(const OString& rOutput)
 {
-    pOutputStream << rOutput.getStr();
+    pOutputStream << rOutput;
 }
 
 void CfgMerge::WorkOnResourceEnd()
diff --git a/l10ntools/source/common.cxx b/l10ntools/source/common.cxx
index 444aa31d741c..45c15fae969c 100644
--- a/l10ntools/source/common.cxx
+++ b/l10ntools/source/common.cxx
@@ -91,9 +91,9 @@ bool handleArguments(
 void writeUsage(const OString& rName, const OString& rFileType)
 {
     std::cout
-        << " Syntax: " << rName.getStr()
+        << " Syntax: " << rName
         << " -i FileIn -o FileOut [-m DataBase] [-l Lang] [-b]\n"
-           " FileIn:   Source files (" << rFileType.getStr() << ")\n"
+           " FileIn:   Source files (" << rFileType << ")\n"
            " FileOut:  Destination file (*.*)\n"
            " DataBase: Mergedata (*.po)\n"
            " Lang: Restrict the handled language; one element of\n"
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 092de8a61790..f1df5aa7881e 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -231,7 +231,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
             // important for indentation of Basic code examples
             sal_Int32 nPreSpaces = 0;
             sal_Int32 nLen = sSourceText.getLength();
-            while ( (nPreSpaces < nLen) && (*(sSourceText.getStr()+nPreSpaces) == ' ') )
+            while ( (nPreSpaces < nLen) && (sSourceText[nPreSpaces] == ' ') )
                 nPreSpaces++;
             if( sCur == "qtz" )
             {
@@ -264,8 +264,8 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
             {
                 SAL_WARN(
                     "l10ntools",
-                    "Can't find GID=" << pResData->sGId.getStr() << " LID="
-                        << pResData->sId.getStr() << " TYP=" << pResData->sResTyp.getStr());
+                    "Can't find GID=" << pResData->sGId << " LID="
+                        << pResData->sId << " TYP=" << pResData->sResTyp);
             }
             pXMLElement->ChangeLanguageTag(sCur);
         }
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 646cd02f044b..513c36e13e56 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -92,7 +92,7 @@ bool LngParser::CreatePO( const OString &rPOFile )
 {
     PoOfstream aPOStream( rPOFile, PoOfstream::APP );
     if (!aPOStream.isOpen()) {
-        std::cerr << "Ulfex error: Can't open po file:" << rPOFile.getStr() << "\n";
+        std::cerr << "Ulfex error: Can't open po file:" << rPOFile << "\n";
     }
 
     size_t nPos  = 0;
@@ -309,7 +309,7 @@ bool LngParser::Merge(
     }
 
     for ( size_t i = 0; i < pLines->size(); ++i )
-        aDestination << (*pLines)[i]->getStr() << '\n';
+        aDestination << *(*pLines)[i] << '\n';
 
     aDestination.close();
     return true;
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 2d3265871720..b977562fba2f 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -94,7 +94,7 @@ void handleCommand(
     const OString cmd = buf.makeStringAndClear();
     if (system(cmd.getStr()) != 0)
     {
-        cerr << "Error: Failed to execute " << cmd.getStr() << '\n';
+        cerr << "Error: Failed to execute " << cmd << '\n';
         throw false; //TODO
     }
 }
@@ -116,7 +116,7 @@ void InitPoFile(
                 << ("Error: Cannot convert pathname to URL in " __FILE__
                     ", in line ")
                 << __LINE__ << "\n       outDir: "
-                << OUStringToOString(outDir, RTL_TEXTENCODING_ASCII_US).getStr()
+                << outDir
                 << "\n";
             throw false; //TODO
         }
@@ -130,7 +130,7 @@ void InitPoFile(
     {
         cerr
             << "Error: Cannot open po file "
-            << rOutPath.getStr() << "\n";
+            << rOutPath << "\n";
         throw false; //TODO
     }
 
@@ -231,7 +231,7 @@ void handleFilesOfDir(
             {
                 cerr
                     << "Error: Cannot remove entryless pot file: "
-                    << sPotFile.getStr() << "\n";
+                    << sPotFile << "\n";
                     throw false; //TODO
             }
         }
@@ -395,7 +395,7 @@ void handleDirectory(
             << ("Error: Cannot convert pathname to URL in " __FILE__
                 ", in line ")
             << __LINE__ << "\n"
-            << OUStringToOString(sPoPath, RTL_TEXTENCODING_UTF8).getStr()
+            << sPoPath
             << "\n";
         throw false; //TODO
     }
@@ -423,7 +423,7 @@ void handleProjects(char * sSourceRoot, char const * sDestRoot)
             << ("Error: Cannot convert pathname to URL in " __FILE__
                 ", in line ")
             << __LINE__ << "\n       root16: "
-            << OUStringToOString(root16, RTL_TEXTENCODING_ASCII_US).getStr()
+            << root16
             << "\n";
         throw false; //TODO
     }
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index e08f35f4f87b..56eceb8c236c 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -47,7 +47,7 @@ namespace
         }
         catch (const PoIfstream::Exception&)
         {
-            SAL_WARN("l10ntools", rFileName.getStr() << " contains invalid entry");
+            SAL_WARN("l10ntools", rFileName << " contains invalid entry");
             return false;
         }
         return true;
@@ -222,7 +222,7 @@ MergeDataFile::MergeDataFile(
     std::ifstream aInputStream( rFileName.getStr() );
     if ( !aInputStream.is_open() )
     {
-        SAL_WARN("l10ntools", "Can't open po path container file for " << rFileName.getStr());
+        SAL_WARN("l10ntools", "Can't open po path container file for " << rFileName);
         return;
     }
     std::string sPoFile;
@@ -239,7 +239,7 @@ MergeDataFile::MergeDataFile(
         aPoInput.open( sPoFileName );
         if ( !aPoInput.isOpen() )
         {
-            SAL_WARN("l10ntools", "Can't open file: " << sPoFileName.getStr());
+            SAL_WARN("l10ntools", "Can't open file: " << sPoFileName);
             return;
         }
 
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 7bfa070e64ce..856a76b61835 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -129,19 +129,19 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) const
     if ( !m_sExtractCom.isEmpty() )
         rOFStream
             << "#. "
-            << m_sExtractCom.replaceAll("\n","\n#. ").getStr() << std::endl;
+            << m_sExtractCom.replaceAll("\n","\n#. ") << std::endl;
     if ( !m_sReference.isEmpty() )
-        rOFStream << "#: " << m_sReference.getStr() << std::endl;
+        rOFStream << "#: " << m_sReference << std::endl;
     if ( m_bFuzzy )
         rOFStream << "#, fuzzy" << std::endl;
     if ( !m_sMsgCtxt.isEmpty() )
         rOFStream << "msgctxt "
-                  << lcl_GenMsgString(m_sReference+"\n"+m_sMsgCtxt).getStr()
+                  << lcl_GenMsgString(m_sReference+"\n"+m_sMsgCtxt)
                   << std::endl;
     rOFStream << "msgid "
-              << lcl_GenMsgString(m_sMsgId).getStr() << std::endl;
+              << lcl_GenMsgString(m_sMsgId) << std::endl;
     rOFStream << "msgstr "
-              << lcl_GenMsgString(m_sMsgStr).getStr() << std::endl;
+              << lcl_GenMsgString(m_sMsgStr) << std::endl;
 }
 
 void GenPoEntry::readFromFile(std::ifstream& rIFStream)
diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx
index 9ae073931118..bb58876c5d14 100644
--- a/l10ntools/source/propmerge.cxx
+++ b/l10ntools/source/propmerge.cxx
@@ -113,7 +113,7 @@ PropParser::PropParser(
     {
         std::cerr
             << "Propex error: Cannot open source file: "
-            << m_sSource.getStr() << std::endl;
+            << m_sSource << std::endl;
         return;
     }
     m_bIsInitialized = true;
@@ -132,7 +132,7 @@ void PropParser::Extract( const OString& rPOFile )
     {
         std::cerr
             << "Propex error: Cannot open pofile for extract: "
-            << rPOFile.getStr() << std::endl;
+            << rPOFile << std::endl;
         return;
     }
 
@@ -163,7 +163,7 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
     if( !aDestination.is_open() ) {
         std::cerr
             << "Propex error: Cannot open source file for merge: "
-            << rDestinationFile.getStr() << std::endl;
+            << rDestinationFile << std::endl;
         return;
     }
 
@@ -178,8 +178,8 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
             std::cerr
                 << ("Propex error: given language conflicts with language of"
                     " Mergedata file: ")
-                << m_sLang.getStr() << " - "
-                << vLanguages[0].getStr() << std::endl;
+                << m_sLang << " - "
+                << vLanguages[0] << std::endl;
             return;
         }
     }
@@ -210,18 +210,18 @@ void PropParser::Merge( const OString &rMergeSrc, const OString &rDestinationFil
             }
             if( !sNewText.isEmpty() )
             {
-                aDestination << OString(sID + "=").getStr();
+                aDestination << OString(sID + "=");
                 lcl_PrintJavaStyle( sNewText, aDestination );
                 aDestination << std::endl;
             }
             else
             {
-                aDestination << sLine.getStr() << std::endl;
+                aDestination << sLine << std::endl;
             }
         }
         else
         {
-            aDestination << sLine.getStr() << std::endl;
+            aDestination << sLine << std::endl;
         }
     }
     aDestination.close();
diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index a0c738cc0782..95b6ab2595dc 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -130,7 +130,7 @@ namespace
             {
                 std::cerr
                     << "Treex error: Cannot find title in "
-                    << sXhpPath.getStr() << std::endl;
+                    << sXhpPath << std::endl;
                 return nullptr;
             }
             xmlFree( pXhpFile );
@@ -208,7 +208,7 @@ TreeParser::TreeParser(
     if ( !m_pSource ) {
         std::cerr
             << "Treex error: Cannot open source file: "
-            << rInputFile.getStr() << std::endl;
+            << rInputFile << std::endl;
         return;
     }
     if( !m_pSource->name )
@@ -231,7 +231,7 @@ void TreeParser::Extract( const OString& rPOFile )
     {
         std::cerr
             << "Treex error: Cannot open po file for extract: "
-            << rPOFile.getStr() << std::endl;
+            << rPOFile << std::endl;
         return;
     }
 
@@ -264,8 +264,8 @@ void TreeParser::Merge(
             std::cerr
                 << ("Treex error: given language conflicts with language of"
                     " Mergedata file: ")
-                << m_sLang.getStr() << " - "
-                << vLanguages[0].getStr() << std::endl;
+                << m_sLang << " - "
+                << vLanguages[0] << std::endl;
             delete pMergeDataFile;
             return;
         }
diff --git a/l10ntools/source/uimerge.cxx b/l10ntools/source/uimerge.cxx
index dd334de13fa5..0bc13697cd8e 100644
--- a/l10ntools/source/uimerge.cxx
+++ b/l10ntools/source/uimerge.cxx
@@ -113,9 +113,9 @@ namespace
             if (sOut.isEmpty())
                 continue;
 
-            aDestination << " <e g=\"" << aI->second->sGID.getStr() << "\" i=\""
-                << aI->second->sLID.getStr() << "\">"
-                << helper::QuotHTML(sOut).getStr() << "</e>\n";
+            aDestination << " <e g=\"" << aI->second->sGID << "\" i=\""
+                << aI->second->sLID << "\">"
+                << helper::QuotHTML(sOut) << "</e>\n";
         }
 
         aDestination << "</t>";
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index fd6e1f7f2837..5b0fcb88ff48 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -158,7 +158,7 @@ void XMLFile::Write( OString const &aFilename )
     if (!s.is_open())
     {
         std::cerr
-            << "Error: helpex cannot create file " << aFilename.getStr()
+            << "Error: helpex cannot create file " << aFilename
             << '\n';
         std::exit(EXIT_FAILURE);
     }
@@ -184,16 +184,16 @@ bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
             {
                 XMLElement *pElement = static_cast<XMLElement*>(pCur);
                 rStream  << "<";
-                rStream << pElement->GetName().getStr();
+                rStream << pElement->GetName();
                 if ( pElement->GetAttributeList())
                     for ( size_t j = 0; j < pElement->GetAttributeList()->size(); j++ )
                     {
                         rStream << " ";
                         OString sData( (*pElement->GetAttributeList())[ j ]->GetName() );
-                        rStream << XMLUtil::QuotHTML( sData ).getStr();
+                        rStream << XMLUtil::QuotHTML( sData );
                         rStream << "=\"";
                         sData = (*pElement->GetAttributeList())[ j ]->GetValue();
-                        rStream << XMLUtil::QuotHTML( sData ).getStr();
+                        rStream << XMLUtil::QuotHTML( sData );
                         rStream << "\"";
                     }
                 if ( !pElement->GetChildList())
@@ -204,7 +204,7 @@ bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
                     for ( size_t k = 0; k < pElement->GetChildList()->size(); k++ )
                         Write( rStream, (*pElement->GetChildList())[ k ] );
                     rStream << "</";
-                    rStream << pElement->GetName().getStr();
+                    rStream << pElement->GetName();
                     rStream << ">";
                 }
             }
@@ -212,21 +212,21 @@ bool XMLFile::Write( ofstream &rStream , XMLNode *pCur )
             case XMLNodeType::DATA:
             {
                 OString sData( static_cast<const XMLData*>(pCur)->GetData());
-                rStream << XMLUtil::QuotHTML( sData ).getStr();
+                rStream << XMLUtil::QuotHTML( sData );
             }
             break;
             case XMLNodeType::COMMENT:
             {
                 const XMLComment *pComment = static_cast<const XMLComment*>(pCur);
                 rStream << "<!--";
-                rStream <<  pComment->GetComment().getStr();
+                rStream <<  pComment->GetComment();
                 rStream << "-->";
             }
             break;
             case XMLNodeType::DEFAULT:
             {
                 const XMLDefault *pDefault = static_cast<const XMLDefault*>(pCur);
-                rStream <<  pDefault->GetDefault().getStr();
+                rStream <<  pDefault->GetDefault();
             }
             break;
         }
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 2bebcfeb4d4d..98c17e68d65e 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -443,7 +443,7 @@ void XRMResMerge::WorkOnDesc(
                     sal_Int32 i = sOutputFile.lastIndexOf('/');
                     if (i == -1) {
                         std::cerr
-                            << "Error: output file " << sOutputFile.getStr()
+                            << "Error: output file " << sOutputFile
                             << " does not contain any /\n";
                         throw false; //TODO
                     }
@@ -451,12 +451,12 @@ void XRMResMerge::WorkOnDesc(
                         sOutputFile.copy(0, i + 1) + sLocDescFilename);
                     ofstream file(sOutputDescFile.getStr());
                     if (file.is_open()) {
-                        file << sText.getStr();
+                        file << sText;
                         file.close();
                     } else {
                         std::cerr
                             << "Error: cannot write "
-                            << sOutputDescFile.getStr() << '\n';
+                            << sOutputDescFile << '\n';
                         throw false; //TODO
                     }
                 }
@@ -481,7 +481,7 @@ void XRMResMerge::WorkOnText(
 void XRMResMerge::Output( const OString& rOutput )
 {
     if (!rOutput.isEmpty())
-        pOutputStream << rOutput.getStr();
+        pOutputStream << rOutput;
 }
 
 void XRMResMerge::EndOfText(
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 28f8c6c4d7f8..d6eeabb9a96d 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -193,11 +193,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
     catch( const uno::Exception & ex )
     {
         (void)ex; // avoid warning for pro build
-        OSL_FAIL( OUStringToOString(
-                        "Exception caught. Type: " +
-                        OUString::createFromAscii( typeid( ex ).name()) +
-                        ", Message: " +
-                        ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+        SAL_WARN( "oox", "Exception caught. " << ex.Message);
     }
 
     return xResult;
@@ -303,11 +299,7 @@ bool lcl_isSeriesAttachedToFirstAxis(
     catch( const uno::Exception & ex )
     {
         (void)ex; // avoid warning for pro build
-        OSL_FAIL( OUStringToOString(
-                        "Exception caught. Type: " +
-                        OUString::createFromAscii( typeid( ex ).name()) +
-                        ", Message: " +
-                        ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+        SAL_WARN( "oox", "Exception caught. " << ex.Message);
     }
 
     return bResult;
@@ -649,11 +641,7 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha
         catch( const uno::Exception & ex )
         {
             (void)ex; // avoid warning for pro build
-            OSL_FAIL( OUStringToOString(
-                            "Exception caught. Type: " +
-                            OUString::createFromAscii( typeid( ex ).name()) +
-                            ", Message: " +
-                            ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
+            SAL_WARN( "oox", "Exception caught. " << ex.Message);
         }
 }
 
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 8dc1392bed81..32a48548bac0 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -363,12 +363,8 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
     }
     catch( uno::Exception& )
     {
-        OSL_FAIL( OString("oox::ppt::PresentationFragmentHandler::EndDocument(), "
-                    "exception caught: " +
-            OUStringToOString(
-                comphelper::anyToString( cppu::getCaughtException() ),
-                RTL_TEXTENCODING_UTF8 )).getStr() );
-
+        SAL_WARN( "oox", "oox::ppt::PresentationFragmentHandler::EndDocument(), "
+                  "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ) );
     }
 }
 
@@ -421,11 +417,8 @@ void PresentationFragmentHandler::finalizeImport()
         }
         catch( uno::Exception& )
         {
-            OSL_FAIL( OString("oox::ppt::PresentationFragmentHandler::finalizeImport(), "
-                        "exception caught: " +
-                OUStringToOString(
-                    comphelper::anyToString( cppu::getCaughtException() ),
-                    RTL_TEXTENCODING_UTF8 )).getStr() );
+            SAL_WARN( "oox", "oox::ppt::PresentationFragmentHandler::finalizeImport(), "
+                        "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ) );
         }
         // todo error handling;
         if ( rxStatusIndicator.is() )
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index c9af6b5306d3..5b8a8b836377 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -249,11 +249,8 @@ void SlideFragmentHandler::finalizeImport()
     }
     catch( uno::Exception& )
     {
-        OSL_FAIL( OString("oox::ppt::SlideFragmentHandler::EndElement(), "
-                    "exception caught: " +
-            OUStringToOString(
-                comphelper::anyToString( cppu::getCaughtException() ),

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list