summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-26 10:58:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-28 19:44:08 +0200
commitef513fd4b049b214a03fbe6e62a5ea43680a7a9b (patch)
tree82f2ce93bc8e5fde6dce8685b633c3d643c9f069
parentrdm#2247 enable Upper Sorbian for languagepack/UI (diff)
downloadcore-ef513fd4b049b214a03fbe6e62a5ea43680a7a9b.tar.gz
core-ef513fd4b049b214a03fbe6e62a5ea43680a7a9b.zip
remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--basic/source/uno/scriptcont.cxx14
-rwxr-xr-xchart2/qa/extras/chart2dump/chart2dump.cxx6
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx18
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx16
-rw-r--r--chart2/source/controller/main/ChartController.cxx5
-rw-r--r--codemaker/source/codemaker/global.cxx8
-rw-r--r--comphelper/source/misc/documentinfo.cxx12
-rw-r--r--comphelper/source/misc/mimeconfighelper.cxx34
-rw-r--r--comphelper/source/misc/scopeguard.cxx3
-rw-r--r--connectivity/source/commontools/dbtools.cxx10
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageMap.cxx14
-rw-r--r--connectivity/source/drivers/mork/MQueryHelper.cxx2
-rw-r--r--cppu/source/LogBridge/LogBridge.cxx22
-rw-r--r--cppu/source/typelib/typelib.cxx4
-rw-r--r--cppuhelper/source/component.cxx6
-rw-r--r--cppuhelper/source/component_context.cxx3
-rw-r--r--cppuhelper/source/implbase.cxx12
-rw-r--r--cppuhelper/source/weak.cxx6
-rw-r--r--cui/source/options/optinet2.cxx2
-rw-r--r--cui/source/options/optsave.cxx6
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx25
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx7
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx47
-rw-r--r--desktop/source/deployment/dp_log.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx5
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx9
-rw-r--r--desktop/source/deployment/registry/dp_registry.cxx17
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx17
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--desktop/source/migration/migration.cxx24
-rw-r--r--desktop/source/migration/services/basicmigration.cxx7
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx7
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx3
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx3
-rw-r--r--editeng/source/uno/unoipset.cxx2
-rw-r--r--extensions/source/bibliography/datman.cxx7
-rw-r--r--extensions/source/logging/filehandler.cxx10
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx26
-rw-r--r--extensions/source/propctrlr/eformspropertyhandler.cxx9
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx18
-rw-r--r--extensions/source/propctrlr/stringrepresentation.cxx13
-rw-r--r--extensions/source/scanner/sanedlg.cxx9
-rw-r--r--filter/source/config/cache/filtercache.cxx17
-rw-r--r--filter/source/svg/svgwriter.cxx2
-rw-r--r--filter/source/svg/test/odfserializer.cxx3
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx2
-rw-r--r--forms/source/component/Edit.cxx15
-rw-r--r--forms/source/richtext/attributedispatcher.cxx13
-rw-r--r--forms/source/xforms/submission/replace.cxx4
-rw-r--r--fpicker/source/office/commonpicker.cxx6
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx6
-rw-r--r--framework/source/uielement/toolbarmanager.cxx2
-rw-r--r--helpcompiler/source/HelpIndexer_main.cxx2
-rw-r--r--i18npool/source/breakiterator/xdictionary.cxx2
-rw-r--r--i18nutil/source/utility/paper.cxx3
-rw-r--r--idl/source/objects/object.cxx3
-rw-r--r--idlc/source/idlcmain.cxx3
-rw-r--r--idlc/source/idlcproduce.cxx7
-rw-r--r--idlc/source/scanner.l4
-rw-r--r--include/sal/log-areas.dox4
-rw-r--r--include/toolkit/helper/macros.hxx4
-rw-r--r--include/vcl/builder.hxx6
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx2
-rw-r--r--l10ntools/source/cfgmerge.cxx2
-rw-r--r--l10ntools/source/common.cxx4
-rw-r--r--l10ntools/source/helpmerge.cxx6
-rw-r--r--l10ntools/source/lngmerge.cxx4
-rw-r--r--l10ntools/source/localize.cxx12
-rw-r--r--l10ntools/source/merge.cxx6
-rw-r--r--l10ntools/source/po.cxx10
-rw-r--r--l10ntools/source/propmerge.cxx16
-rw-r--r--l10ntools/source/treemerge.cxx10
-rw-r--r--l10ntools/source/uimerge.cxx6
-rw-r--r--l10ntools/source/xmlparse.cxx16
-rw-r--r--l10ntools/source/xrmmerge.cxx8
-rw-r--r--oox/source/export/chartexport.cxx18
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx15
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx7
-rw-r--r--opencl/source/opencl_device.cxx2
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx3
-rw-r--r--rsc/source/tools/rscdef.cxx5
-rw-r--r--sc/qa/unit/ucalc.cxx2
-rw-r--r--sc/source/core/data/dpcache.cxx5
-rw-r--r--sc/source/core/data/formulacell.cxx25
-rw-r--r--sc/source/filter/starcalc/scflt.cxx7
-rw-r--r--sd/source/core/CustomAnimationCloner.cxx27
-rw-r--r--sd/source/core/stlsheet.cxx6
-rw-r--r--sd/source/filter/eppt/pptx-epptbase.cxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx8
-rw-r--r--sd/source/helper/simplereferencecomponent.cxx12
-rw-r--r--sd/source/ui/remotecontrol/ImagePreparer.cxx10
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx146
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx6
-rw-r--r--sd/source/ui/view/drviews1.cxx8
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--sfx2/source/view/lokhelper.cxx12
-rw-r--r--slideshow/source/engine/activitiesqueue.cxx4
-rw-r--r--slideshow/source/engine/animationnodes/animationbasenode.cxx4
-rw-r--r--slideshow/source/engine/eventqueue.cxx4
-rw-r--r--slideshow/source/engine/pointersymbol.cxx4
-rw-r--r--slideshow/source/engine/shapes/drawinglayeranimation.cxx4
-rw-r--r--slideshow/source/engine/shapes/externalshapebase.cxx5
-rw-r--r--slideshow/source/engine/shapes/viewappletshape.cxx5
-rw-r--r--slideshow/source/engine/shapes/viewbackgroundshape.cxx5
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx13
-rw-r--r--slideshow/source/engine/slide/layermanager.cxx5
-rw-r--r--slideshow/source/engine/slide/slideanimations.cxx5
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx15
-rw-r--r--slideshow/source/engine/slidebitmap.cxx5
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx7
-rw-r--r--slideshow/source/engine/soundplayer.cxx5
-rw-r--r--slideshow/source/engine/waitsymbol.cxx4
-rw-r--r--sot/source/sdstor/ucbstorage.cxx6
-rw-r--r--svgio/inc/svgtools.hxx4
-rw-r--r--svgio/source/svgreader/svgdocumenthandler.cxx4
-rw-r--r--svgio/source/svgreader/svgtools.cxx18
-rw-r--r--svl/source/config/itemholder2.cxx7
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx12
-rw-r--r--svtools/langsupport/langsupport.cxx3
-rw-r--r--svtools/source/config/extcolorcfg.cxx9
-rw-r--r--svtools/source/config/itemholder2.cxx6
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx7
-rw-r--r--svx/source/form/fmsrccfg.cxx6
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx25
-rw-r--r--svx/source/svdraw/svdoole2.cxx58
-rw-r--r--svx/source/xml/xmlgrhlp.cxx2
-rw-r--r--sw/qa/core/macros-test.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx24
-rw-r--r--sw/source/core/layout/dbg_lay.cxx3
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx4
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx2
-rw-r--r--test/source/sheet/xcellrangesquery.cxx14
-rw-r--r--test/source/sheet/xsheetoutline.cxx2
-rw-r--r--testtools/source/bridgetest/multi.cxx5
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx26
-rw-r--r--toolkit/source/controls/unocontrols.cxx8
-rw-r--r--ucb/source/ucp/expand/ucpexpand.cxx4
-rw-r--r--ucbhelper/source/client/proxydecider.cxx3
-rw-r--r--unodevtools/source/skeletonmaker/cpptypemaker.cxx6
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx6
-rw-r--r--unodevtools/source/skeletonmaker/skeletonmaker.cxx5
-rw-r--r--unotools/source/config/itemholder1.cxx6
-rw-r--r--unoxml/source/dom/document.cxx2
-rw-r--r--unoxml/source/dom/documentbuilder.cxx4
-rw-r--r--unoxml/source/dom/elementlist.cxx5
-rw-r--r--uui/source/iahndl.cxx8
-rw-r--r--vcl/opengl/x11/X11DeviceInfo.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx54
-rw-r--r--vcl/source/window/builder.cxx56
-rw-r--r--vcl/source/window/dialog.cxx2
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/window2.cxx4
-rw-r--r--vcl/unx/generic/app/sm.cxx2
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx4
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx4
-rw-r--r--writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx13
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx9
-rw-r--r--writerfilter/source/rtftok/rtftokenizer.cxx4
-rw-r--r--xmloff/source/core/xmlerror.cxx5
-rw-r--r--xmloff/source/forms/elementimport.cxx8
-rw-r--r--xmloff/source/forms/propertyimport.cxx10
-rw-r--r--xmloff/source/script/XMLEventExport.cxx12
-rw-r--r--xmloff/source/transform/StyleOOoTContext.cxx23
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx2
167 files changed, 530 insertions, 1110 deletions
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
+@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
+@li @c forms.xforms
@section formula
@@ -562,6 +564,7 @@ certain functionality.
@li @c drawinglayer
@li @c dtrans
@li @c helpcompiler
+@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
+@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() ),
- RTL_TEXTENCODING_UTF8 )).getStr());
+ SAL_WARN( "oox", "oox::ppt::SlideFragmentHandler::EndElement(), "
+ "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index fed84cfdf0c6..d6ec25c1630d 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -475,7 +475,7 @@ int matchDevice(std::unique_ptr<ds_profile>& profile, char* deviceName)
int deviceMatch = -1;
for (unsigned int d = 0; d < profile->devices.size() - 1; d++)
{
- if ((std::string(profile->devices[d].sDeviceName.getStr())).find(deviceName) != std::string::npos)
+ if (profile->devices[d].sDeviceName.indexOf(deviceName) != -1)
deviceMatch = d;
}
if (std::string("NATIVE_CPU").find(deviceName) != std::string::npos)
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 14637f9f18ca..2882b94cb076 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -986,9 +986,8 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getInputStream()
}
catch ( Exception &ex )
{
- OSL_FAIL( "Exception is thrown during stream wrapping!" );
- OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr());
(void)ex;
+ SAL_WARN( "package", "Exception is thrown during stream wrapping!" << ex.Message);
return uno::Reference < io::XInputStream > ();
}
}
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index 4ff0216cc547..f721e925fb5d 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -169,8 +169,7 @@ RscDefine * RscDefine::Search( const char * pSearch ) const
COMPARE RscDefine::Compare( const NameNode * pSearch ) const
{
- int nCmp = strcmp( m_aName.getStr(),
- static_cast<const RscDefine *>(pSearch)->m_aName.getStr() );
+ int nCmp = m_aName.compareTo( static_cast<const RscDefine *>(pSearch)->m_aName );
if( nCmp < 0 )
return LESS;
else if( nCmp > 0 )
@@ -182,7 +181,7 @@ COMPARE RscDefine::Compare( const NameNode * pSearch ) const
// pSearch is a pointer to const char *
COMPARE RscDefine::Compare( const void * pSearch ) const
{
- int nCmp = strcmp( m_aName.getStr(), static_cast<const char *>(pSearch) );
+ int nCmp = m_aName.compareTo( static_cast<const char *>(pSearch) );
if( nCmp < 0 )
return LESS;
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index fe8d35aeeb09..9cb6f345ee1b 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -864,7 +864,7 @@ bool checkHorizontalIterator(ScDocument* pDoc, const char* pData[][Size], size_t
if (OUString::createFromAscii(pChecks[i].pVal) != pCell->getString(pDoc))
{
cerr << "String mismatch " << pChecks[i].pVal << " vs. " <<
- OUStringToOString(pCell->getString(pDoc), RTL_TEXTENCODING_UTF8).getStr() << endl;
+ pCell->getString(pDoc) << endl;
return false;
}
}
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 461ffdc14bc6..b65cdaae1bad 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -1223,11 +1223,6 @@ sal_Int32 ScDPCache::GetGroupType(long nDim) const
namespace {
-std::ostream& operator<< (::std::ostream& os, const OUString& str)
-{
- return os << OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr();
-}
-
void dumpItems(const ScDPCache& rCache, long nDim, const ScDPCache::ScDPItemDataVec& rItems, size_t nOffset)
{
for (size_t i = 0; i < rItems.size(); ++i)
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 0fe70dbcafeb..581c28a3232b 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2759,26 +2759,17 @@ sc::MatrixEdge ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) const
if ( nEdges == sc::MatrixEdge::Nothing )
nEdges = sc::MatrixEdge::Inside;
}
-#if OSL_DEBUG_LEVEL > 0
else
{
- OStringBuffer aMsg( "broken Matrix, Pos: " );
- OUString aTmp(aPos.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument));
- aMsg.append(OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8 ));
- aMsg.append(", MatOrg: ");
- aTmp = aOrg.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument);
- aMsg.append(OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8 ));
- aMsg.append(", MatCols: ");
- aMsg.append(static_cast<sal_Int32>( nC ));
- aMsg.append(", MatRows: ");
- aMsg.append(static_cast<sal_Int32>( nR ));
- aMsg.append(", DiffCols: ");
- aMsg.append(static_cast<sal_Int32>( dC ));
- aMsg.append(", DiffRows: ");
- aMsg.append(static_cast<sal_Int32>( dR ));
- OSL_FAIL( aMsg.makeStringAndClear().getStr());
+ SAL_WARN( "sc", "broken Matrix, Pos: "
+ << aPos.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument)
+ << ", MatOrg: "
+ << aOrg.Format(ScRefFlags::COL_VALID | ScRefFlags::ROW_VALID, pDocument)
+ << ", MatCols: " << static_cast<sal_Int32>( nC )
+ << ", MatRows: " << static_cast<sal_Int32>( nR )
+ << ", DiffCols: " << static_cast<sal_Int32>( dC )
+ << ", DiffRows: " << static_cast<sal_Int32>( dR ));
}
-#endif
return nEdges;
}
default:
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index a2ba6a178531..25f05968c553 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -973,12 +973,7 @@ sal_uLong Sc10Import::Import()
if (!nError) { ImportNameCollection(); pPrgrsBar->Progress(); }
pDoc->SetViewOptions( aSc30ViewOpt );
-#if OSL_DEBUG_LEVEL > 0
- if (nError)
- {
- OSL_FAIL( OString::number(nError).getStr());
- }
-#endif
+ SAL_WARN_IF( nError, "sc", nError);
delete pPrgrsBar;
#if OSL_DEBUG_LEVEL > 0
diff --git a/sd/source/core/CustomAnimationCloner.cxx b/sd/source/core/CustomAnimationCloner.cxx
index a8d2d24e63f8..4fabb79b2262 100644
--- a/sd/source/core/CustomAnimationCloner.cxx
+++ b/sd/source/core/CustomAnimationCloner.cxx
@@ -121,13 +121,8 @@ namespace sd
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::CustomAnimationClonerImpl::Clone(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
-
+ SAL_WARN( "sd", "sd::CustomAnimationClonerImpl::Clone(), "
+ "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ) );
Reference< XAnimationNode > xEmpty;
return xEmpty;
}
@@ -205,12 +200,9 @@ namespace sd
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::CustomAnimationClonerImpl::transformNode(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::CustomAnimationClonerImpl::transformNode(), "
+ "exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -279,12 +271,9 @@ namespace sd
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::CustomAnimationClonerImpl::transformValue(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::CustomAnimationClonerImpl::transformValue(), "
+ "exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
return rValue;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index ea125d3a8aad..477335994037 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -712,10 +712,8 @@ void SAL_CALL SdStyleSheet::release( ) throw ()
}
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( "sd", exc.Message );
}
OSL_ASSERT( mrBHelper.bDisposed );
SdStyleSheetBase::release();
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index 4b98eae7b143..cd2b2fb3b06b 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -1017,7 +1017,7 @@ bool PPTWriterBase::ContainsOtherShapeThanPlaceholders()
else
bOtherThanPlaceHolders = true;
}
- SAL_INFO("sd.eppt", "mType == " << mType.getStr());
+ SAL_INFO("sd.eppt", "mType == " << mType);
}
return bOtherThanPlaceHolders;
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 161d8fa6afce..81eeea393043 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3060,8 +3060,8 @@ bool HtmlExport::checkFileExists( Reference< css::ucb::XSimpleFileAccess3 >& xFi
}
catch( css::uno::Exception& )
{
- OSL_FAIL(OString(OString("sd::HtmlExport::checkFileExists(), exception caught: ") +
- OUStringToOString( comphelper::anyToString( cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::HtmlExport::checkFileExists(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
return false;
@@ -3108,8 +3108,8 @@ bool HtmlExport::checkForExistingFiles()
}
catch( Exception& )
{
- OSL_FAIL(OString(OString("sd::HtmlExport::checkForExistingFiles(), exception caught: ") +
- OUStringToOString( comphelper::anyToString( cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::HtmlExport::checkForExistingFiles(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
bFound = false;
}
diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx
index 57c792ea5b0c..d17abdc8aadc 100644
--- a/sd/source/helper/simplereferencecomponent.cxx
+++ b/sd/source/helper/simplereferencecomponent.cxx
@@ -52,16 +52,10 @@ void SimpleReferenceComponent::release()
{
Dispose();
}
- catch (RuntimeException &
-#if OSL_DEBUG_LEVEL > 0
- exc
-#endif
- ) // don't break throw ()
+ catch (RuntimeException & exc ) // don't break throw ()
{
-#if OSL_DEBUG_LEVEL > 0
- OString msg( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
- OSL_FAIL( msg.getStr() );
-#endif
+ (void)exc;
+ SAL_WARN( "sd", exc.Message );
}
}
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx
index dd50f1f3516a..c765ca6a0c9a 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.cxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx
@@ -98,7 +98,7 @@ void ImagePreparer::sendPreview( sal_uInt32 aSlideNumber )
aBuffer.append( "slide_preview\n" );
- aBuffer.append( OString::number( aSlideNumber ).getStr() );
+ aBuffer.append( (sal_Int32)aSlideNumber );
aBuffer.append( "\n" );
aBuffer.append( aEncodedShortString.getStr() );
@@ -175,12 +175,6 @@ void ImagePreparer::sendNotes( sal_uInt32 aSlideNumber )
if ( aNotes.isEmpty() )
return;
-// OUStringBuffer aStrBuffer;
-// ::sax::Converter::encodeBase64( aStrBuffer, aTemp );
-
-// OString aNotes = OUStringToOString(
-// aStrBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8 );
-
if ( !xController->isRunning() )
return;
@@ -189,7 +183,7 @@ void ImagePreparer::sendNotes( sal_uInt32 aSlideNumber )
aBuffer.append( "slide_notes\n" );
- aBuffer.append( OString::number( aSlideNumber ).getStr() );
+ aBuffer.append( (sal_Int32) aSlideNumber );
aBuffer.append( "\n" );
aBuffer.append( "<html><body>" );
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 8de1e7ac82d2..8b06f80ecf65 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -310,13 +310,9 @@ bool AnimationSlideController::getSlideAPI( sal_Int32 nSlideNumber, Reference< X
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::AnimationSlideController::getSlideAPI(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
-
+ SAL_WARN( "sd", "sd::AnimationSlideController::getSlideAPI(), "
+ "exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
return false;
@@ -609,13 +605,8 @@ void SAL_CALL SlideshowImpl::disposing()
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::stop(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
-
+ SAL_WARN( "sd", "sd::SlideshowImpl::stop(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
mxShow.clear();
@@ -832,12 +823,8 @@ bool SlideshowImpl::startPreview(
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::startPreview(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::startPreview(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
bRet = false;
}
@@ -1043,12 +1030,8 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
}
catch (const Exception&)
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::startShow(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::startShow(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
bRet = false;
}
@@ -1117,12 +1100,8 @@ bool SlideshowImpl::startShowImpl( const Sequence< beans::PropertyValue >& aProp
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::startShowImpl(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::startShowImpl(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
return false;
}
}
@@ -1155,12 +1134,8 @@ void SlideshowImpl::paint()
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::paint(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::paint(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -1232,12 +1207,8 @@ void SlideshowImpl::removeShapeEvents()
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::removeShapeEvents(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::removeShapeEvents(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -1265,12 +1236,8 @@ void SlideshowImpl::registerShapeEvents(sal_Int32 nSlideNumber)
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::registerShapeEvents(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::registerShapeEvents(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -1341,12 +1308,8 @@ void SlideshowImpl::registerShapeEvents( Reference< XShapes >& xShapes )
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::registerShapeEvents(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::registerShapeEvents(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -1411,12 +1374,8 @@ void SAL_CALL SlideshowImpl::pause()
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::pause(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::pause(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -1445,12 +1404,8 @@ void SAL_CALL SlideshowImpl::resume()
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::resume(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::resume(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
#ifdef ENABLE_SDREMOTE
RemoteServer::presentationStarted( this );
@@ -1750,11 +1705,8 @@ void SlideshowImpl::updateSlideShow()
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::updateSlideShow(), exception caught: ")
- + OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::updateSlideShow(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -1878,12 +1830,8 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
catch( Exception& )
{
bRet = false;
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::keyInput(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::keyInput(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
return bRet;
@@ -2263,12 +2211,8 @@ Reference< XSlideShow > SlideshowImpl::createSlideShow()
}
catch( uno::Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::createSlideShow(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::createSlideShow(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
return xShow;
@@ -2448,12 +2392,8 @@ void SlideshowImpl::resize( const Size& rSize )
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::resize(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::resize(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -2715,12 +2655,8 @@ void SAL_CALL SlideshowImpl::setUsePen( sal_Bool bMouseAsPen )
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::setUsePen(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::setUsePen(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -2962,12 +2898,8 @@ void SlideshowImpl::gotoPreviousSlide (const bool bSkipAllMainSequenceEffects)
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::gotoPreviousSlide(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::gotoPreviousSlide(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -3051,12 +2983,8 @@ void SAL_CALL SlideshowImpl::stopSound( )
}
catch( Exception& )
{
- OSL_FAIL(
- OString(OString("sd::SlideshowImpl::stopSound(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::SlideshowImpl::stopSound(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index d1bae6bcf5b5..3291114a9f94 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -320,10 +320,8 @@ void SAL_CALL SdXImpressDocument::release() throw ( )
}
catch (const uno::RuntimeException& exc)
{ // don't break throw ()
- OSL_FAIL(
- OUStringToOString(
- exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
- static_cast<void>(exc);
+ (void)exc;
+ SAL_WARN( "sd", exc.Message );
}
}
SfxBaseModel::release();
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 78e5d42b9c79..a36b4fee9d2a 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -244,12 +244,8 @@ void DrawViewShell::SelectionHasChanged()
}
catch( css::uno::Exception& )
{
- OSL_FAIL(
- OString(OString("sd::DrawViewShell::SelectionHasChanged(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "sd", "sd::DrawViewShell::SelectionHasChanged(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
if( HasCurrentFunction() )
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 2026be6ad82e..cce0acf5cb81 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1626,9 +1626,7 @@ void FileDialogHelper_Impl::verifyPath()
}
struct stat aFileStat;
if (stat(sysPathC.getStr(), &aFileStat) == -1) {
- SAL_WARN(
- "sfx.dialog",
- "stat(" << sysPathC.getStr() << ") failed with errno " << errno);
+ SAL_WARN( "sfx.dialog", "stat(" << sysPathC << ") failed with errno " << errno);
return;
}
if ((aFileStat.st_mode & (S_IRWXO | S_IRWXG | S_IRWXU)) == S_IRUSR) {
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 2420b0903578..f5762518d632 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -146,12 +146,14 @@ void SfxLokHelper::notifyOtherViews(SfxViewShell* pThisView, int nType, const OS
void SfxLokHelper::notifyInvalidation(SfxViewShell* pThisView, const OString& rPayload)
{
- std::stringstream ss;
- ss << rPayload.getStr();
+ OStringBuffer aBuf;
+ aBuf.append(rPayload);
if (comphelper::LibreOfficeKit::isPartInInvalidation())
- ss << ", " << pThisView->getPart();
- OString aPayload = ss.str().c_str();
- pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, aPayload.getStr());
+ {
+ aBuf.append(", ");
+ aBuf.append((sal_Int32) pThisView->getPart());
+ }
+ pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, aBuf.makeStringAndClear().getStr());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/slideshow/source/engine/activitiesqueue.cxx b/slideshow/source/engine/activitiesqueue.cxx
index 531e421ab6f4..3f6c7d73bc33 100644
--- a/slideshow/source/engine/activitiesqueue.cxx
+++ b/slideshow/source/engine/activitiesqueue.cxx
@@ -122,9 +122,7 @@ namespace slideshow
// since this will also capture segmentation
// violations and the like. In such a case, we
// still better let our clients now...
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
catch( SlideShowException& )
{
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index ace0570aa98d..d7e3c0ed01c1 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -207,9 +207,7 @@ bool AnimationBaseNode::init_st()
mpActivity = createActivity();
}
catch (uno::Exception const&) {
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString(cppu::getCaughtException()),
- RTL_TEXTENCODING_UTF8).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString(cppu::getCaughtException()) );
// catch and ignore. We later handle empty activities, but for
// other nodes to function properly, the core functionality of
// this node must remain up and running.
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx
index 2cb928cc3436..b202f4d3a6e8 100644
--- a/slideshow/source/engine/eventqueue.cxx
+++ b/slideshow/source/engine/eventqueue.cxx
@@ -238,9 +238,7 @@ namespace slideshow
// since this will also capture segmentation
// violations and the like. In such a case, we
// still better let our clients now...
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
catch( SlideShowException& )
{
diff --git a/slideshow/source/engine/pointersymbol.cxx b/slideshow/source/engine/pointersymbol.cxx
index 2b50addcd71c..b539cf6a1055 100644
--- a/slideshow/source/engine/pointersymbol.cxx
+++ b/slideshow/source/engine/pointersymbol.cxx
@@ -125,9 +125,7 @@ void PointerSymbol::viewAdded( const UnoViewSharedPtr& rView )
}
catch( uno::Exception& )
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
maViews.push_back( ViewsVecT::value_type( rView, sprite ) );
diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
index d4941f8300cf..503a0a4dc250 100644
--- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx
+++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx
@@ -934,9 +934,7 @@ std::shared_ptr<Activity> createDrawingLayerAnimActivity(
catch( uno::Exception& )
{
// translate any error into empty factory product.
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
return pActivity;
diff --git a/slideshow/source/engine/shapes/externalshapebase.cxx b/slideshow/source/engine/shapes/externalshapebase.cxx
index 40c0d99b2df0..13800cefa450 100644
--- a/slideshow/source/engine/shapes/externalshapebase.cxx
+++ b/slideshow/source/engine/shapes/externalshapebase.cxx
@@ -107,10 +107,7 @@ namespace slideshow
}
catch (uno::Exception &)
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString(
- cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
}
diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx
index 3f13d2259633..8550ed5e2f56 100644
--- a/slideshow/source/engine/shapes/viewappletshape.cxx
+++ b/slideshow/source/engine/shapes/viewappletshape.cxx
@@ -106,10 +106,7 @@ namespace slideshow
}
catch (uno::Exception &)
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString(
- cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
}
diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx
index ec2d611fec58..c2a3d533b18c 100644
--- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx
+++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx
@@ -184,10 +184,7 @@ namespace slideshow
}
catch( uno::Exception& )
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
return false;
}
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index dcc14b913560..0ff36b81f6dc 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -105,10 +105,7 @@ namespace slideshow
}
catch (uno::Exception &)
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString(
- cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -341,9 +338,7 @@ namespace slideshow
}
catch( uno::Exception& )
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
}
}
@@ -518,9 +513,7 @@ namespace slideshow
}
catch( uno::Exception& )
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
}
}
diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx
index e3c024398f6f..702e00513516 100644
--- a/slideshow/source/engine/slide/layermanager.cxx
+++ b/slideshow/source/engine/slide/layermanager.cxx
@@ -624,10 +624,7 @@ namespace slideshow
{
// TODO(E1): Might be superfluous. Nowadays,
// addViewLayer swallows all errors, anyway.
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
// at least one shape could not be rendered
bRet = false;
}
diff --git a/slideshow/source/engine/slide/slideanimations.cxx b/slideshow/source/engine/slide/slideanimations.cxx
index 9c82dbafd87d..330d204bfcd8 100644
--- a/slideshow/source/engine/slide/slideanimations.cxx
+++ b/slideshow/source/engine/slide/slideanimations.cxx
@@ -54,10 +54,7 @@ namespace slideshow
}
catch (uno::Exception &)
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString(
- cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString(cppu::getCaughtException() ) );
}
}
}
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index ecd3725538ab..95582c37b718 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -776,10 +776,7 @@ bool SlideImpl::implPrefetchShow()
}
catch( uno::Exception& )
{
- OSL_FAIL(
- OUStringToOString(
- comphelper::anyToString(cppu::getCaughtException()),
- RTL_TEXTENCODING_UTF8).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString(cppu::getCaughtException()) );
// TODO(E2): Error handling. For now, bail out
}
@@ -1037,10 +1034,7 @@ bool SlideImpl::loadShapes()
}
catch( uno::Exception& )
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
return false;
}
}
@@ -1079,10 +1073,7 @@ bool SlideImpl::loadShapes()
}
catch( uno::Exception& )
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
return false;
}
diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx
index c13a38f15667..3dd5a329b022 100644
--- a/slideshow/source/engine/slidebitmap.cxx
+++ b/slideshow/source/engine/slidebitmap.cxx
@@ -84,10 +84,7 @@ namespace slideshow
}
catch( uno::Exception& )
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
-
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
return false;
}
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 8e8023e0146f..50d6f5ab70db 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1037,8 +1037,7 @@ public:
}
else
{
- OSL_FAIL( OUStringToOString(
- rProperty.Name, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", rProperty.Name );
}
}
private:
@@ -2088,9 +2087,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
}
catch( uno::Exception& )
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
}
diff --git a/slideshow/source/engine/soundplayer.cxx b/slideshow/source/engine/soundplayer.cxx
index a685dd18d583..24a809faf68e 100644
--- a/slideshow/source/engine/soundplayer.cxx
+++ b/slideshow/source/engine/soundplayer.cxx
@@ -120,10 +120,7 @@ namespace slideshow
dispose();
}
catch (uno::Exception &) {
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString(
- cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
}
diff --git a/slideshow/source/engine/waitsymbol.cxx b/slideshow/source/engine/waitsymbol.cxx
index e278d609c464..918ca961e04c 100644
--- a/slideshow/source/engine/waitsymbol.cxx
+++ b/slideshow/source/engine/waitsymbol.cxx
@@ -129,9 +129,7 @@ void WaitSymbol::viewAdded( const UnoViewSharedPtr& rView )
}
catch( uno::Exception& )
{
- OSL_FAIL( OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "slideshow", comphelper::anyToString( cppu::getCaughtException() ) );
}
maViews.push_back( ViewsVecT::value_type( rView, sprite ) );
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index b7cd310e8ea2..d1cbadd41856 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -788,7 +788,7 @@ void UCBStorageStream_Impl::ReadSourceWriteTemporary()
}
catch (const Exception &e)
{
- OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ SAL_WARN( "sot", e.Message );
(void)e;
}
}
@@ -824,7 +824,7 @@ sal_uInt64 UCBStorageStream_Impl::ReadSourceWriteTemporary(sal_uInt64 aLength)
}
catch( const Exception & e )
{
- OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ SAL_WARN( "sot", e.Message );
(void)e;
}
}
@@ -873,7 +873,7 @@ std::size_t UCBStorageStream_Impl::GetData(void* pData, std::size_t const nSize)
}
catch (const Exception &e)
{
- OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ SAL_WARN( "sot", e.Message );
(void)e;
}
diff --git a/svgio/inc/svgtools.hxx b/svgio/inc/svgtools.hxx
index cc4a1da908c4..7d339fac6230 100644
--- a/svgio/inc/svgtools.hxx
+++ b/svgio/inc/svgtools.hxx
@@ -30,10 +30,6 @@ namespace svgio
{
namespace svgreader
{
-#ifdef DBG_UTIL
- // error helper
- void myAssert(const OUString& rMessage);
-#endif
// recommended value for this device dependent unit, see CSS2 section 4.3.2 Lengths
#define F_SVG_PIXEL_PER_INCH 96.0
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx
index 72e1adf9bee7..4d7171e8fef8 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -400,9 +400,7 @@ namespace svgio
default:
{
/// invalid token, ignore
-#ifdef DBG_UTIL
- myAssert( "Unknown Base SvgToken <" + aName + "> (!)" );
-#endif
+ SAL_WARN( "svgio", "Unknown Base SvgToken <" + aName + "> (!)" );
break;
}
}
diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx
index 2f22d1966172..cb85a7e635f0 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -29,16 +29,6 @@ namespace svgio
{
namespace svgreader
{
-#ifdef DBG_UTIL
- void myAssert(const OUString& rMessage)
- {
- OString aMessage2;
-
- rMessage.convertToString(&aMessage2, osl_getThreadTextEncoding(), RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR|RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR);
- OSL_ENSURE(false, aMessage2.getStr());
- }
-#endif
-
// common non-token strings
const OUString commonStrings::aStrUserSpaceOnUse("userSpaceOnUse");
const OUString commonStrings::aStrObjectBoundingBox("objectBoundingBox");
@@ -191,9 +181,7 @@ namespace svgio
}
case Unit_none:
{
-#ifdef DBG_UTIL
- myAssert("Design error, this case should have been handled in the caller");
-#endif
+ SAL_WARN("svgio", "Design error, this case should have been handled in the caller");
return mfNumber;
}
default:
@@ -237,9 +225,7 @@ namespace svgio
if ( aViewPort.isEmpty() )
{
-#ifdef DBG_UTIL
- myAssert("Design error, this case should have been handled in the caller");
-#endif
+ SAL_WARN("svgio", "Design error, this case should have been handled in the caller");
// no viewPort, assume a normal page size (A4)
aViewPort = basegfx::B2DRange(
0.0,
diff --git a/svl/source/config/itemholder2.cxx b/svl/source/config/itemholder2.cxx
index fc12e7681ce4..c7ab2bfb4b26 100644
--- a/svl/source/config/itemholder2.cxx
+++ b/svl/source/config/itemholder2.cxx
@@ -50,11 +50,8 @@ ItemHolder2::ItemHolder2()
if(bMessage)
{
bMessage = false;
- OString sMsg = "CreateInstance with arguments exception: "
- + OString(rEx.Message.getStr(),
- rEx.Message.getLength(),
- RTL_TEXTENCODING_ASCII_US);
- OSL_FAIL(sMsg.getStr());
+ SAL_WARN( "svl", "CreateInstance with arguments exception: "
+ << rEx.Message);
}
}
#else
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 7f17e57c640f..eaed9780e490 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -50,12 +50,12 @@ using namespace com::sun::star::ucb;
static OUString createIndex(const vector< OUString >& lines)
{
- OString aResult;
+ OUString aResult;
for( size_t i = 0; i < lines.size(); i++ )
{
if( i )
- aResult += OString( "__" );
+ aResult += "__";
OString line = OUStringToOString( lines[i], RTL_TEXTENCODING_UTF8 );
const sal_Char* pLine = line.getStr();
@@ -63,19 +63,19 @@ static OUString createIndex(const vector< OUString >& lines)
{
if (rtl::isAsciiAlphanumeric(static_cast<unsigned char>(*pLine)))
{
- aResult += OString( *pLine );
+ aResult += OUStringLiteral1(*pLine);
}
else
{
- aResult += OString("_");
- aResult += OString::number( *pLine, 16 );
+ aResult += "_";
+ aResult += OUString::number( *pLine, 16 );
}
pLine++;
}
}
- return OUString::createFromAscii( aResult.getStr() );
+ return aResult;
}
diff --git a/svtools/langsupport/langsupport.cxx b/svtools/langsupport/langsupport.cxx
index 3a43af30eedf..7ef274571f7e 100644
--- a/svtools/langsupport/langsupport.cxx
+++ b/svtools/langsupport/langsupport.cxx
@@ -55,8 +55,7 @@ SAL_IMPLEMENT_MAIN()
OUString sTag( LanguageTag::convertToBcp47( eLang));
- std::cout << OUStringToOString(sTag, osl_getThreadTextEncoding()).getStr()
- << std::endl;
+ std::cout << sTag << std::endl;
}
}
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index f42a7c038d60..f60858d856cc 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -105,12 +105,9 @@ public:
return aFind2->second;
}
#if OSL_DEBUG_LEVEL > 0
- OStringBuffer aMessage( "Could find the required config:\n" );
- aMessage.append( "component: " );
- aMessage.append( OUStringToOString( _sComponentName, RTL_TEXTENCODING_UTF8 ) );
- aMessage.append( "\nname: " );
- aMessage.append( OUStringToOString( _sName, RTL_TEXTENCODING_UTF8 ) );
- OSL_FAIL( aMessage.makeStringAndClear().getStr() );
+ SAL_WARN( "svtools", "Could find the required config:\n"
+ "component: " << _sComponentName
+ << "\nname: " << _sName );
#endif
return ExtendedColorConfigValue();
}
diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx
index 638120cf1515..bdfb27387a8d 100644
--- a/svtools/source/config/itemholder2.cxx
+++ b/svtools/source/config/itemholder2.cxx
@@ -59,11 +59,7 @@ ItemHolder2::ItemHolder2()
if(bMessage)
{
bMessage = false;
- OString sMsg = "CreateInstance with arguments exception: "
- + OString(rEx.Message.getStr(),
- rEx.Message.getLength(),
- RTL_TEXTENCODING_ASCII_US);
- OSL_FAIL(sMsg.getStr());
+ SAL_WARN( "svtools", "CreateInstance with arguments exception: " << rEx.Message );
}
}
#else
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index c79e3ab01978..9b6812802520 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -179,11 +179,8 @@ namespace svt
}
else
{
- OSL_FAIL(
- OString(
- "AssigmentTransientData::AssigmentTransientData: unknown programmatic name ("
- + OString(pFields->ProgrammaticName.getStr(), pFields->ProgrammaticName.getLength(), RTL_TEXTENCODING_ASCII_US)
- + ")!").getStr());
+ SAL_WARN( "svtools", "AssigmentTransientData::AssigmentTransientData: unknown programmatic name: "
+ << pFields->ProgrammaticName );
}
}
}
diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx
index 6181fc2c3cc6..fdd943f2b03b 100644
--- a/svx/source/form/fmsrccfg.cxx
+++ b/svx/source/form/fmsrccfg.cxx
@@ -133,10 +133,8 @@ namespace svxform
++pSearch;
}
- OSL_FAIL(
- OString(
- "lcl_implMapIntValue: could not convert the integer value "
- + OString::number(_nValue) + " !").getStr());
+ SAL_WARN( "svx", "lcl_implMapIntValue: could not convert the integer value "
+ << _nValue << " !");
static const sal_Char* const s_pDummy = "";
// just as a fallback ....
return s_pDummy;
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 466f25003ce0..ffe40a7b828e 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -439,16 +439,11 @@ namespace svx
sSlotUnoName = ".uno:";
sSlotUnoName += OUString::createFromAscii( pAsciiUnoName );
}
-#if OSL_DEBUG_LEVEL > 0
else
{
- OString sMessage( "lcl_getUnoSlotName: invalid slot id, or invalid slot, or no UNO name!\n" );
- sMessage += "(slot id: ";
- sMessage += OString::number( _nSlotId );
- sMessage += ")";
- OSL_FAIL( sMessage.getStr() );
+ SAL_WARN( "svx", "lcl_getUnoSlotName: invalid slot id, or invalid slot, or no UNO name! "
+ "(slot id: " << _nSlotId << ")");
}
-#endif
return sSlotUnoName;
}
@@ -720,17 +715,13 @@ namespace svx
#if OSL_DEBUG_LEVEL > 0
else
{
- OString sError( "FmTextControShell::executeAttributeDialog: Could not handle the following item:" );
- sError += "\n SlotID: "; sError += OString::number( nSlotForItemSet );
- sError += "\n WhichID: "; sError += OString::number( nWhich );
- sError += "\n UNO name: ";
-
OUString sUnoSlotName = lcl_getUnoSlotName( *SfxGetpApp(), nSlotForItemSet );
- if ( !sUnoSlotName.isEmpty() )
- sError += OString( sUnoSlotName.getStr(), sUnoSlotName.getLength(), RTL_TEXTENCODING_ASCII_US );
- else
- sError += "unknown (no SfxSlot)";
- OSL_FAIL( sError.getStr() );
+ if ( sUnoSlotName.isEmpty() )
+ sUnoSlotName = "unknown (no SfxSlot)";
+ SAL_WARN( "svx", "FmTextControShell::executeAttributeDialog: Could not handle the following item:"
+ "\n SlotID: " << nSlotForItemSet
+ << "\n WhichID: " << nWhich
+ << "\n UNO name: " << sUnoSlotName );
}
#endif
}
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 2935d8e4b902..2206b8bb8a36 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -836,14 +836,10 @@ bool SdrOle2Obj::UpdateLinkURL_Impl()
if ( nCurState != embed::EmbedStates::LOADED )
mpImpl->mxObjRef->changeState(nCurState);
}
- catch( css::uno::Exception& )
+ catch( css::uno::Exception const & )
{
- OSL_FAIL(
- OString(OString("SdrOle2Obj::UpdateLinkURL_Impl(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "svx", "SdrOle2Obj::UpdateLinkURL_Impl(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -878,12 +874,8 @@ void SdrOle2Obj::BreakFileLink_Impl()
}
catch( css::uno::Exception& )
{
- OSL_FAIL(
- OString(OString("SdrOle2Obj::BreakFileLink_Impl(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "svx", "SdrOle2Obj::BreakFileLink_Impl(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
}
@@ -1003,12 +995,8 @@ void SdrOle2Obj::Connect_Impl()
}
catch( css::uno::Exception& )
{
- OSL_FAIL(
- OString(OString("SdrOle2Obj::Connect_Impl(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "svx", "SdrOle2Obj::Connect_Impl(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -1087,12 +1075,8 @@ void SdrOle2Obj::RemoveListeners_Impl()
}
catch( css::uno::Exception& )
{
- OSL_FAIL(
- OString(OString("SdrOle2Obj::RemoveListeners_Impl(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "svx", "SdrOle2Obj::RemoveListeners_Impl(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
}
@@ -1169,12 +1153,8 @@ void SdrOle2Obj::Disconnect_Impl()
}
catch( css::uno::Exception& )
{
- OSL_FAIL(
- OString(OString("SdrOle2Obj::Disconnect_Impl(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "svx", "SdrOle2Obj::Disconnect_Impl(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
mpImpl->mbConnected = false;
@@ -1300,12 +1280,8 @@ void SdrOle2Obj::SetModel(SdrModel* pNewModel)
}
catch( css::uno::Exception& )
{
- OSL_FAIL(
- OString(OString("SdrOle2Obj::SetModel(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "svx", "SdrOle2Obj::SetModel(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
@@ -1813,12 +1789,8 @@ bool SdrOle2Obj::Unload( const uno::Reference< embed::XEmbeddedObject >& xObj, s
}
catch( css::uno::Exception& )
{
- OSL_FAIL(
- OString(OString("SdrOle2Obj::Unload=(), "
- "exception caught: ") +
- OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
+ SAL_WARN( "svx", "SdrOle2Obj::Unload=(), exception caught: "
+ << comphelper::anyToString( cppu::getCaughtException() ) );
}
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 3946bb94c3c0..ed47f0a254c1 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -479,7 +479,7 @@ OUString SvXMLGraphicHelper::ImplGetGraphicMimeType( const OUString& rFileName )
RTL_TEXTENCODING_ASCII_US));
for( long i = 0, nCount = SAL_N_ELEMENTS(aMapper); ( i < nCount ) && aMimeType.isEmpty(); ++i )
- if( strcmp(aExt.getStr(), aMapper[ i ].pExt) == 0 )
+ if( aExt == aMapper[ i ].pExt )
aMimeType = OUString( aMapper[ i ].pMimeType, strlen( aMapper[ i ].pMimeType ), RTL_TEXTENCODING_ASCII_US );
}
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index 8ac5c15946ea..fa27beca817d 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -183,7 +183,7 @@ void SwMacrosTest::testVba()
SfxObjectShell::CallXScript(xComponent, sUrl, aParams, aRet, aOutParamIndex,aOutParam);
OUString aStringRes;
aRet >>= aStringRes;
- std::cout << "value of Ret " << OUStringToOString( aStringRes, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl;
+ std::cout << "value of Ret " << aStringRes << std::endl;
//CPPUNIT_ASSERT_MESSAGE( "script reported failure",aStringRes == "OK" );
pFoundShell->DoClose();
}
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index d88d76272a56..90a5c310d48a 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1161,19 +1161,21 @@ OUString SwCursorShell::getPageRectangles()
{
CurrShell aCurr(this);
SwRootFrame* pLayout = GetLayout();
- std::vector<OString> v;
+ OUStringBuffer aBuf;
for (const SwFrame* pFrame = pLayout->GetLower(); pFrame; pFrame = pFrame->GetNext())
{
- std::vector<OString> aRectangle
- {
- OString::number(pFrame->Frame().Left()),
- OString::number(pFrame->Frame().Top()),
- OString::number(pFrame->Frame().Width()),
- OString::number(pFrame->Frame().Height())
- };
- v.push_back(comphelper::string::join(", ", aRectangle));
- }
- return OUString::fromUtf8(comphelper::string::join("; ", v).getStr());
+ aBuf.append(pFrame->Frame().Left());
+ aBuf.append(", ");
+ aBuf.append(pFrame->Frame().Top());
+ aBuf.append(", ");
+ aBuf.append(pFrame->Frame().Width());
+ aBuf.append(", ");
+ aBuf.append(pFrame->Frame().Height());
+ aBuf.append("; ");
+ }
+ if (!aBuf.isEmpty())
+ aBuf.setLength( aBuf.getLength() - 2); // remove the last "; "
+ return aBuf.makeStringAndClear();
}
void SwCursorShell::NotifyCursor(SfxViewShell* pOtherShell) const
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 718048d383ba..16b5776c1d7b 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -346,8 +346,7 @@ void SwImplProtocol::CheckLine( OString& rLine )
}
if( !aTok.isEmpty() )
{
- long nVal;
- sscanf( aTok.getStr(), "%li", &nVal );
+ sal_Int64 nVal = aTok.toInt64();
switch ( nInitFile )
{
case 1: InsertFrame( sal_uInt16( nVal ) ); // add FrameId
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 891216a84183..82ab2d2509ac 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2956,7 +2956,7 @@ void RtfAttributeOutput::FormatLRSpace(const SvxLRSpaceItem& rLRSpace)
m_aSectionBreaks.append((sal_Int32)rLRSpace.GetRight());
}
if (!m_bBufferSectionBreaks)
- m_rExport.Strm(). WriteCharPtr(m_aSectionBreaks.makeStringAndClear().getStr());
+ m_rExport.Strm().WriteCharPtr(m_aSectionBreaks.makeStringAndClear().getStr());
}
else
{
@@ -3014,7 +3014,7 @@ void RtfAttributeOutput::FormatULSpace(const SvxULSpaceItem& rULSpace)
m_aSectionBreaks.append((sal_Int32)aDistances.dyaHdrBottom);
}
if (!m_bBufferSectionBreaks)
- m_rExport.Strm(). WriteCharPtr(m_aSectionBreaks.makeStringAndClear().getStr());
+ m_rExport.Strm().WriteCharPtr(m_aSectionBreaks.makeStringAndClear().getStr());
}
else
{
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 7d40cd07d598..232b62d13d18 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1174,7 +1174,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
catch (const Exception& rExcept)
{
- OSL_FAIL(OUStringToOString(rExcept.Message, osl_getThreadTextEncoding()).getStr());
+ SAL_WARN("sw", rExcept.Message);
(void)rExcept;
}
}
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 6c9c69e81774..4f80954808a2 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -180,7 +180,7 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*, void)
}
catch (const uno::Exception& e)
{
- OSL_FAIL(OUStringToOString(e.Message, osl_getThreadTextEncoding()).getStr());
+ SAL_WARN("sw", e.Message);
ScopedVclPtrInstance<MessageDialog>(this, e.Message)->Execute();
}
}
diff --git a/test/source/sheet/xcellrangesquery.cxx b/test/source/sheet/xcellrangesquery.cxx
index 202e17a64b40..16ca44f94b8a 100644
--- a/test/source/sheet/xcellrangesquery.cxx
+++ b/test/source/sheet/xcellrangesquery.cxx
@@ -28,7 +28,7 @@ void XCellRangesQuery::testQueryColumnDifference()
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryColumnDifferences(table::CellAddress(0, 1, 1));
OUString aResult = xRanges->getRangeAddressesAsString();
- std::cout << "testQueryColumnDifference: Result: " << OUStringToOString(aResult, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
+ std::cout << "testQueryColumnDifference: Result: " << aResult << std::endl;
CPPUNIT_ASSERT_EQUAL_MESSAGE("testQueryColumnDifference", aResult, aExpected);
}
@@ -38,7 +38,7 @@ void XCellRangesQuery::testQueryContentDifference()
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryContentCells(sheet::CellFlags::VALUE);
OUString aResult = xRanges->getRangeAddressesAsString();
- std::cout << "testQueryContentDifference: Result: " << OUStringToOString(aResult, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
+ std::cout << "testQueryContentDifference: Result: " << aResult << std::endl;
CPPUNIT_ASSERT_EQUAL_MESSAGE("testQueryContentDifference", aResult, aExpected);
}
@@ -48,7 +48,7 @@ void XCellRangesQuery::testQueryEmptyCells()
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryEmptyCells();
OUString aResult = xRanges->getRangeAddressesAsString();
- std::cout << "testQueryEmptyCells: Result: " << OUStringToOString(aResult, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
+ std::cout << "testQueryEmptyCells: Result: " << aResult << std::endl;
CPPUNIT_ASSERT_EQUAL_MESSAGE("testQueryEmptyCells", aResult, aExpected);
}
@@ -58,7 +58,7 @@ void XCellRangesQuery::testQueryFormulaCells()
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryFormulaCells(sheet::CellFlags::FORMULA);
OUString aResult = xRanges->getRangeAddressesAsString();
- std::cout << "testQueryFormulaCells: Result: " << OUStringToOString(aResult, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
+ std::cout << "testQueryFormulaCells: Result: " << aResult << std::endl;
CPPUNIT_ASSERT_EQUAL_MESSAGE("testQueryFormulaCells", aResult, aExpected);
}
@@ -68,7 +68,7 @@ void XCellRangesQuery::testQueryIntersection()
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryIntersection(table::CellRangeAddress(0,3,3,7,7));
OUString aResult = xRanges->getRangeAddressesAsString();
- std::cout << "testQueryIntersection: Result: " << OUStringToOString(aResult, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
+ std::cout << "testQueryIntersection: Result: " << aResult << std::endl;
CPPUNIT_ASSERT_EQUAL_MESSAGE("testQueryIntersection", aResult, aExpected);
}
@@ -78,7 +78,7 @@ void XCellRangesQuery::testQueryRowDifference()
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryRowDifferences(table::CellAddress(0,1,1));
OUString aResult = xRanges->getRangeAddressesAsString();
- std::cout << "testQueryRowDifference: Result: " << OUStringToOString(aResult, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
+ std::cout << "testQueryRowDifference: Result: " << aResult << std::endl;
CPPUNIT_ASSERT_EQUAL_MESSAGE("testQueryRowDifference", aResult, aExpected);
}
@@ -88,7 +88,7 @@ void XCellRangesQuery::testQueryVisibleCells()
uno::Reference<sheet::XCellRangesQuery> xCellRangesQuery(init(),UNO_QUERY_THROW);
uno::Reference<sheet::XSheetCellRanges> xRanges = xCellRangesQuery->queryVisibleCells();
OUString aResult = xRanges->getRangeAddressesAsString();
- std::cout << "testQueryVisibleCells: Result: " << OUStringToOString(aResult, RTL_TEXTENCODING_UTF8).getStr() << std::endl;
+ std::cout << "testQueryVisibleCells: Result: " << aResult << std::endl;
CPPUNIT_ASSERT_EQUAL_MESSAGE("testQueryVisibleCells", aResult, aExpected);
}
diff --git a/test/source/sheet/xsheetoutline.cxx b/test/source/sheet/xsheetoutline.cxx
index 1a03fb7b7613..9153c84204a7 100644
--- a/test/source/sheet/xsheetoutline.cxx
+++ b/test/source/sheet/xsheetoutline.cxx
@@ -138,7 +138,7 @@ void XSheetOutline::testShowLevel()
aSheetOutline->showLevel(2, table::TableOrientation_COLUMNS);
- std::cout << " verifiy showLevel col apres" << OUStringToOString(getVisibleAdress(aSheet, "OutlineSheet.A1:Z30"), RTL_TEXTENCODING_UTF8).getStr() << std::endl;
+ std::cout << " verifiy showLevel col apres" << getVisibleAdress(aSheet, "OutlineSheet.A1:Z30") << std::endl;
// verify that level 2 and level 1 are shown --> column 0..3 & column 22..26
// level 3 & 4 are hidden --> column 4..19
diff --git a/testtools/source/bridgetest/multi.cxx b/testtools/source/bridgetest/multi.cxx
index 99aaeffc4a36..1cf89d5632d5 100644
--- a/testtools/source/bridgetest/multi.cxx
+++ b/testtools/source/bridgetest/multi.cxx
@@ -37,11 +37,6 @@ struct CheckFailed {
OUString message;
};
-::std::ostream& operator<< (::std::ostream& os, const OUString& str)
-{
- return os << OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr();
-}
-
template< typename T > void checkEqual(T const & value, T const & argument) {
if (argument != value) {
std::ostringstream s;
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 66da7f49f8f9..1c77f79617bd 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -687,14 +687,11 @@ void UnoControlModel::write( const css::uno::Reference< css::io::XObjectOutputSt
#if OSL_DEBUG_LEVEL > 0
else
{
- OString sMessage( "UnoControlModel::write: don't know how to handle a property of type '" );
- OUString sTypeName( rType.getTypeName() );
- sMessage += OString( sTypeName.getStr(), sTypeName.getLength(), RTL_TEXTENCODING_ASCII_US );
- sMessage += "'.\n(Currently handling property '";
- const OUString& sPropertyName( GetPropertyName( *it ) );
- sMessage += OString( sPropertyName.getStr(), sPropertyName.getLength(), osl_getThreadTextEncoding() );
- sMessage += "'.)";
- OSL_FAIL( sMessage.getStr() );
+ SAL_WARN( "toolkit", "UnoControlModel::write: don't know how to handle a property of type '"
+ << rType.getTypeName()
+ << "'.\n(Currently handling property '"
+ << GetPropertyName( *it )
+ << "'.)");
}
#endif
}
@@ -899,14 +896,11 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre
}
else
{
- OString sMessage( "UnoControlModel::read: don't know how to handle a property of type '" );
- OUString sTypeName( pType->getTypeName() );
- sMessage += OString( sTypeName.getStr(), sTypeName.getLength(), RTL_TEXTENCODING_ASCII_US );
- sMessage += "'.\n(Currently handling property '";
- const OUString& sPropertyName( GetPropertyName( nPropId ) );
- sMessage += OString( sPropertyName.getStr(), sPropertyName.getLength(), osl_getThreadTextEncoding() );
- sMessage += "'.)";
- OSL_FAIL( sMessage.getStr() );
+ SAL_WARN( "toolkit", "UnoControlModel::read: don't know how to handle a property of type '"
+ << pType->getTypeName()
+ << "'.\n(Currently handling property '"
+ << GetPropertyName( nPropId )
+ << "'.)");
}
}
else
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index b2363d8b510b..88618b87af8b 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -2934,9 +2934,7 @@ void UnoListBoxControl::itemStateChanged( const awt::ItemEvent& rEvent )
#if OSL_DEBUG_LEVEL == 0
(void) e; // suppress warning
#else
- OString sMessage( "UnoListBoxControl::itemStateChanged: caught an exception:\n" );
- sMessage += OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( sMessage.getStr() );
+ SAL_WARN( "toolkit", "UnoListBoxControl::itemStateChanged: caught an exception: " << e.Message);
#endif
}
}
@@ -3276,9 +3274,7 @@ void UnoComboBoxControl::itemStateChanged( const awt::ItemEvent& rEvent )
#if OSL_DEBUG_LEVEL == 0
(void) e; // suppress warning
#else
- OString sMessage( "UnoComboBoxControl::itemStateChanged: caught an exception:\n" );
- sMessage += OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
- OSL_FAIL( sMessage.getStr() );
+ SAL_WARN( "toolkit", "UnoComboBoxControl::itemStateChanged: caught an exception: " << e.Message);
#endif
}
}
diff --git a/ucb/source/ucp/expand/ucpexpand.cxx b/ucb/source/ucp/expand/ucpexpand.cxx
index 4fae016808af..85b39f42b478 100644
--- a/ucb/source/ucp/expand/ucpexpand.cxx
+++ b/ucb/source/ucp/expand/ucpexpand.cxx
@@ -203,9 +203,7 @@ sal_Int32 ExpandContentProviderImpl::compareContentIds(
catch (const ucb::IllegalIdentifierException & exc)
{
(void) exc; // unused
- OSL_FAIL(
- OUStringToOString(
- exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_WARN( "ucb", exc.Message );
return -1;
}
}
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index d40f572efb04..4f7f23be7ac3 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -158,8 +158,7 @@ private:
bool WildCard::Matches( const OUString& rString ) const
{
OString aString
- = OUStringToOString(
- rString, RTL_TEXTENCODING_UTF8 ).toAsciiLowerCase();
+ = OUStringToOString( rString, RTL_TEXTENCODING_UTF8 ).toAsciiLowerCase();
const char * pStr = aString.getStr();
const char * pWild = m_aWildString.getStr();
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index 1fdeabd15201..936b5841a479 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -555,7 +555,7 @@ void printMethods(std::ostream & o,
}
} else {
o << "\n" << indentation << "{\n" << indentation << " return "
- << delegate.getStr() << "get" << i->name << "();\n"
+ << delegate << "get" << i->name << "();\n"
<< indentation << "}\n\n";
}
} else {
@@ -589,7 +589,7 @@ void printMethods(std::ostream & o,
}
} else {
o << "\n" << indentation << "{\n" << indentation << " "
- << delegate.getStr() << "set" << i->name
+ << delegate << "set" << i->name
<< "(the_value);\n" << indentation << "}\n\n";
}
} else {
@@ -638,7 +638,7 @@ void printMethods(std::ostream & o,
if (i->returnType != "void")
o << "return ";
- o << delegate.getStr() << i->name << '(';
+ o << delegate << i->name << '(';
printMethodParameters(
o, options, manager, i->parameters, false);
o << ");\n" << indentation << "}\n\n";
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index e097b831be90..ec60403064c6 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -493,7 +493,7 @@ void printMethods(std::ostream & o,
}
} else {
o << "\n" << indentation << "{\n" << indentation
- << " return " << delegate.getStr() << "get" << i->name
+ << " return " << delegate << "get" << i->name
<< "();\n" << indentation << "}\n\n";
}
} else {
@@ -516,7 +516,7 @@ void printMethods(std::ostream & o,
}
} else {
o << "\n" << indentation << "{\n" << indentation
- << " " << delegate.getStr() << "set" << i->name
+ << " " << delegate << "set" << i->name
<< "(the_value);\n" << indentation << "}\n\n";
}
} else {
@@ -559,7 +559,7 @@ void printMethods(std::ostream & o,
if (i->returnType != "void") {
o << "return ";
}
- o << delegate.getStr() << i->name << '(';
+ o << delegate << i->name << '(';
printMethodParameters(
o, options, manager, i->parameters, false);
o << ");\n" << indentation << "}\n\n";
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
index e2f97695997d..e5b8d5837a6e 100644
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
@@ -164,10 +164,7 @@ SAL_IMPLEMENT_MAIN()
<< " Version " << version << "\n\n";
exit(EXIT_SUCCESS);
} else {
- std::cerr
- << "ERROR: unexpected command \""
- << OUStringToOString(arg, RTL_TEXTENCODING_UTF8).getStr()
- << "\"!\n";
+ std::cerr << "ERROR: unexpected command \"" << arg << "\"!\n";
printUsageAndExit(programname, version);
exit(EXIT_FAILURE);
}
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index 7d0805fc4f6e..b845b9f8eb00 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -64,11 +64,7 @@ ItemHolder1::ItemHolder1()
if(bMessage)
{
bMessage = false;
- OString sMsg("CreateInstance with arguments exception: ");
- sMsg += OString(rEx.Message.getStr(),
- rEx.Message.getLength(),
- RTL_TEXTENCODING_ASCII_US);
- OSL_FAIL(sMsg.getStr());
+ SAL_WARN( "unotools", "CreateInstance with arguments exception: " << rEx.Message);
}
}
#else
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index b9c167ee2486..9cba7eec823d 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -487,7 +487,7 @@ namespace DOM
xmlChar const*const pData =
reinterpret_cast<xmlChar const*>(oData.getStr());
xmlNodePtr const pText =
- xmlNewCDataBlock(m_aDocPtr, pData, strlen(oData.getStr()));
+ xmlNewCDataBlock(m_aDocPtr, pData, oData.getLength());
Reference< XCDATASection > const xRet(
static_cast< XNode* >(GetCNode(pText).get()),
UNO_QUERY_THROW);
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index 71a6dc6f1785..2a1e3826bd98 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -202,7 +202,7 @@ namespace DOM
return nread;
} catch (const css::uno::Exception& ex) {
(void) ex;
- OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr());
+ SAL_WARN( "unoxml", ex.Message);
return -1;
}
}
@@ -222,7 +222,7 @@ namespace DOM
return 0;
} catch (const css::uno::Exception& ex) {
(void) ex;
- OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr());
+ SAL_WARN( "unoxml", ex.Message);
return -1;
}
}
diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx
index fad086a3b604..21e282904074 100644
--- a/unoxml/source/dom/elementlist.cxx
+++ b/unoxml/source/dom/elementlist.cxx
@@ -110,9 +110,8 @@ namespace DOM
xTarget->addEventListener("DOMSubtreeModified",
m_xEventListener, capture);
} catch (const Exception &e){
- OString aMsg("Exception caught while registering NodeList as listener:\n");
- aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_FAIL(aMsg.getStr());
+ SAL_WARN( "unoxml", "Exception caught while registering NodeList as listener: "
+ << e.Message);
}
}
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 9d5ba366f9d1..1912eab95222 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -295,13 +295,7 @@ namespace
const typelib_TypeDescription* pTypeDesc = aTypeDesc.get();
if ( !pTypeDesc || !pTypeDesc->pWeakRef )
{
-#if OSL_DEBUG_LEVEL > 0
- OStringBuffer aMessage;
- aMessage.append( "no type found for '" );
- aMessage.append( OUStringToOString( i_rTypeName, RTL_TEXTENCODING_UTF8 ) );
- aMessage.append( "'" );
- OSL_FAIL( aMessage.makeStringAndClear().getStr() );
-#endif
+ SAL_WARN( "uui","no type found for '" << i_rTypeName << "'" );
return false;
}
const css::uno::Type aType( pTypeDesc->pWeakRef );
diff --git a/vcl/opengl/x11/X11DeviceInfo.cxx b/vcl/opengl/x11/X11DeviceInfo.cxx
index 8b8b88e0cba7..8cd5cbb906b9 100644
--- a/vcl/opengl/x11/X11DeviceInfo.cxx
+++ b/vcl/opengl/x11/X11DeviceInfo.cxx
@@ -206,7 +206,7 @@ void X11OpenGLDeviceInfo::GetData()
}
}
- if (!strcmp(textureFromPixmap.getStr(), "TRUE"))
+ if (textureFromPixmap != "TRUE")
mbHasTextureFromPixmap = true;
// only useful for Linux kernel version check for FGLRX driver.
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index a4a7ed68ac34..f104ded051d6 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -544,7 +544,6 @@ static void appendName( const OUString& rStr, OStringBuffer& rBuffer )
// FIXME i59651 add a check for max length of 127 chars? Per PDF spec 1.4, appendix C.1
// I guess than when reading the #xx sequence it will count for a single character.
OString aStr( OUStringToOString( rStr, RTL_TEXTENCODING_UTF8 ) );
- const sal_Char* pStr = aStr.getStr();
int nLen = aStr.getLength();
for( int i = 0; i < nLen; i++ )
{
@@ -555,17 +554,17 @@ static void appendName( const OUString& rStr, OStringBuffer& rBuffer )
* but has a narrower acceptance rate we only pass
* alphanumerics and '-' literally.
*/
- if( (pStr[i] >= 'A' && pStr[i] <= 'Z' ) ||
- (pStr[i] >= 'a' && pStr[i] <= 'z' ) ||
- (pStr[i] >= '0' && pStr[i] <= '9' ) ||
- pStr[i] == '-' )
+ if( (aStr[i] >= 'A' && aStr[i] <= 'Z' ) ||
+ (aStr[i] >= 'a' && aStr[i] <= 'z' ) ||
+ (aStr[i] >= '0' && aStr[i] <= '9' ) ||
+ aStr[i] == '-' )
{
- rBuffer.append( pStr[i] );
+ rBuffer.append( aStr[i] );
}
else
{
rBuffer.append( '#' );
- appendHex( (sal_Int8)pStr[i], rBuffer );
+ appendHex( (sal_Int8)aStr[i], rBuffer );
}
}
}
@@ -696,7 +695,6 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
*/
const OUString& rName = (m_aContext.Version > PDFWriter::PDFVersion::PDF_1_2) ? i_rControl.Name : i_rControl.Text;
OString aStr( OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ) );
- const sal_Char* pStr = aStr.getStr();
int nLen = aStr.getLength();
OStringBuffer aBuffer( rName.getLength()+64 );
@@ -706,12 +704,12 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
* outside the interval [32(=ASCII' ');126(=ASCII'~')]
* should be escaped hexadecimal
*/
- if( (pStr[i] >= 32 && pStr[i] <= 126 ) )
- aBuffer.append( pStr[i] );
+ if( (aStr[i] >= 32 && aStr[i] <= 126 ) )
+ aBuffer.append( aStr[i] );
else
{
aBuffer.append( '#' );
- appendHex( (sal_Int8)pStr[i], aBuffer );
+ appendHex( (sal_Int8)aStr[i], aBuffer );
}
}
@@ -6463,7 +6461,7 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (!cms_msg)
return false;
- char *pass(strdup(OUStringToOString( rContext.m_aSignPassword, RTL_TEXTENCODING_UTF8 ).getStr()));
+ OString pass(OUStringToOString( rContext.m_aSignPassword, RTL_TEXTENCODING_UTF8 ));
TimeStampReq src;
OStringBuffer response_buffer;
@@ -6487,7 +6485,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
NSSCMSMessage *ts_cms_msg = CreateCMSMessage(&now, &ts_cms_sd, &ts_cms_signer, cert, &digest);
if (!ts_cms_msg)
{
- free(pass);
return false;
}
@@ -6496,12 +6493,12 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
ts_cms_output.len = 0;
PLArenaPool *ts_arena = PORT_NewArena(10000);
NSSCMSEncoderContext *ts_cms_ecx;
- ts_cms_ecx = NSS_CMSEncoder_Start(ts_cms_msg, nullptr, nullptr, &ts_cms_output, ts_arena, PDFSigningPKCS7PasswordCallback, pass, nullptr, nullptr, nullptr, nullptr);
+ ts_cms_ecx = NSS_CMSEncoder_Start(ts_cms_msg, nullptr, nullptr, &ts_cms_output, ts_arena, PDFSigningPKCS7PasswordCallback,
+ const_cast<sal_Char*>(pass.getStr()), nullptr, nullptr, nullptr, nullptr);
if (NSS_CMSEncoder_Finish(ts_cms_ecx) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSEncoder_Finish failed");
- free(pass);
return false;
}
@@ -6521,7 +6518,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (!ts_hc.get())
{
SAL_WARN("vcl.pdfwriter", "HASH_Create failed");
- free(pass);
return false;
}
@@ -6571,14 +6567,12 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (timestamp_request == nullptr)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1EncodeItem failed");
- free(pass);
return false;
}
if (timestamp_request->data == nullptr)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1EncodeItem succeeded but got NULL data");
- free(pass);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
return false;
}
@@ -6602,7 +6596,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (!curl)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_init failed");
- free(pass);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
return false;
}
@@ -6612,7 +6605,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if ((rc = curl_easy_setopt(curl, CURLOPT_URL, OUStringToOString(rContext.m_aSignTSA, RTL_TEXTENCODING_UTF8).getStr())) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_setopt(CURLOPT_URL) failed: " << curl_easy_strerror(rc));
- free(pass);
curl_easy_cleanup(curl);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
return false;
@@ -6624,7 +6616,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if ((rc = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist)) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_setopt(CURLOPT_HTTPHEADER) failed: " << curl_easy_strerror(rc));
- free(pass);
curl_slist_free_all(slist);
curl_easy_cleanup(curl);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
@@ -6635,7 +6626,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
(rc = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, timestamp_request->data)) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_setopt(CURLOPT_POSTFIELDSIZE or CURLOPT_POSTFIELDS) failed: " << curl_easy_strerror(rc));
- free(pass);
curl_easy_cleanup(curl);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
return false;
@@ -6645,7 +6635,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
(rc = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, AppendToBuffer)) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_setopt(CURLOPT_WRITEDATA or CURLOPT_WRITEFUNCTION) failed: " << curl_easy_strerror(rc));
- free(pass);
curl_easy_cleanup(curl);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
return false;
@@ -6654,7 +6643,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if ((rc = curl_easy_setopt(curl, CURLOPT_POST, 1)) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_setopt(CURLOPT_POST) failed: " << curl_easy_strerror(rc));
- free(pass);
curl_easy_cleanup(curl);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
return false;
@@ -6664,7 +6652,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if ((rc = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error_buffer)) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_setopt(CURLOPT_ERRORBUFFER) failed: " << curl_easy_strerror(rc));
- free(pass);
curl_easy_cleanup(curl);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
return false;
@@ -6675,7 +6662,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
(rc = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 10)) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_setopt(CURLOPT_TIMEOUT or CURLOPT_CONNECTTIMEOUT) failed: " << curl_easy_strerror(rc));
- free(pass);
curl_easy_cleanup(curl);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
return false;
@@ -6684,7 +6670,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (curl_easy_perform(curl) != CURLE_OK)
{
SAL_WARN("vcl.pdfwriter", "curl_easy_perform failed: " << error_buffer);
- free(pass);
curl_easy_cleanup(curl);
SECITEM_FreeItem(timestamp_request, PR_TRUE);
return false;
@@ -6713,7 +6698,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (SEC_ASN1DecodeItem(nullptr, &response, TimeStampResp_Template, &response_item) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1DecodeItem failed");
- free(pass);
return false;
}
@@ -6723,7 +6707,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
(response.status.status.data[0] != 0 && response.status.status.data[0] != 1))
{
SAL_WARN("vcl.pdfwriter", "Timestamp request was not granted");
- free(pass);
return false;
}
@@ -6746,7 +6729,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (my_SEC_StringToOID(&typetag.oid, "1.2.840.113549.1.9.16.2.14", 0) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "SEC_StringToOID failed");
- free(pass);
return false;
}
typetag.offset = SEC_OID_UNKNOWN; // ???
@@ -6767,7 +6749,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (my_NSS_CMSSignerInfo_AddUnauthAttr(cms_signer, &timestamp) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignerInfo_AddUnauthAttr failed");
- free(pass);
return false;
}
}
@@ -6786,7 +6767,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (!aCertHashContext.get())
{
SAL_WARN("vcl.pdfwriter", "HASH_Create() failed");
- free(pass);
return false;
}
HASH_Begin(aCertHashContext.get());
@@ -6811,7 +6791,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (!pEncodedCertificate)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1EncodeItem() failed");
- free(pass);
return false;
}
@@ -6836,7 +6815,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (my_SEC_StringToOID(&aOidData.oid, "1.2.840.113549.1.9.16.2.47", 0) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "my_SEC_StringToOID() failed");
- free(pass);
return false;
}
aOidData.offset = SEC_OID_UNKNOWN;
@@ -6850,7 +6828,6 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
if (my_NSS_CMSSignerInfo_AddAuthAttr(cms_signer, &aAttribute) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "my_NSS_CMSSignerInfo_AddAuthAttr() failed");
- free(pass);
return false;
}
@@ -6865,24 +6842,21 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
// with, the software itself pops up a dialog asking for the PIN (password). But I am not going
// to test it and risk locking up my token...
- cms_ecx = NSS_CMSEncoder_Start(cms_msg, nullptr, nullptr, &cms_output, arena, PDFSigningPKCS7PasswordCallback, pass, nullptr, nullptr, nullptr, nullptr);
+ cms_ecx = NSS_CMSEncoder_Start(cms_msg, nullptr, nullptr, &cms_output, arena, PDFSigningPKCS7PasswordCallback,
+ const_cast<sal_Char*>(pass.getStr()), nullptr, nullptr, nullptr, nullptr);
if (!cms_ecx)
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSEncoder_Start failed");
- free(pass);
return false;
}
if (NSS_CMSEncoder_Finish(cms_ecx) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSEncoder_Finish failed");
- free(pass);
return false;
}
- free(pass);
-
#ifdef DBG_UTIL
{
FILE *out = fopen("PDFWRITER.cms.data", "wb");
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 83d61fbbad93..da3435510a7e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -255,7 +255,7 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
pSource->SetAccessibleRelationMemberOf(pTarget);
else
{
- SAL_INFO("vcl.layout", "unhandled a11y relation :" << rType.getStr());
+ SAL_INFO("vcl.layout", "unhandled a11y relation :" << rType);
}
}
}
@@ -496,8 +496,7 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
m_pParserState.reset();
SAL_WARN_IF(!m_sID.isEmpty() && (!m_bToplevelParentFound && !get_by_name(m_sID)), "vcl.layout",
- "Requested top level widget \"" << m_sID.getStr() <<
- "\" not found in " << sUIFile);
+ "Requested top level widget \"" << m_sID << "\" not found in " << sUIFile);
#if defined SAL_LOG_WARN
if (m_bToplevelParentFound && m_pParent->IsDialog())
@@ -1454,7 +1453,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
if (sPattern.isEmpty())
{
connectNumericFormatterAdjustment(id, sAdjustment);
- SAL_INFO("vcl.layout", "making numeric field for " << name.getStr() << " " << sUnit.getStr());
+ SAL_INFO("vcl.layout", "making numeric field for " << name << " " << sUnit);
xWindow = VclPtr<NumericField>::Create(pParent, nBits);
}
else
@@ -1462,20 +1461,20 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
if (sPattern == "hh:mm")
{
connectTimeFormatterAdjustment(id, sAdjustment);
- SAL_INFO("vcl.layout", "making time field for " << name.getStr() << " " << sUnit.getStr());
+ SAL_INFO("vcl.layout", "making time field for " << name << " " << sUnit.getStr());
xWindow = VclPtr<TimeField>::Create(pParent, nBits);
}
else if (sPattern == "yy:mm:dd")
{
connectDateFormatterAdjustment(id, sAdjustment);
- SAL_INFO("vcl.layout", "making date field for " << name.getStr() << " " << sUnit.getStr());
+ SAL_INFO("vcl.layout", "making date field for " << name << " " << sUnit.getStr());
xWindow = VclPtr<DateField>::Create(pParent, nBits);
}
else
{
connectNumericFormatterAdjustment(id, sAdjustment);
FieldUnit eUnit = detectMetricUnit(sUnit);
- SAL_INFO("vcl.layout", "making metric field for " << name.getStr() << " " << sUnit.getStr());
+ SAL_INFO("vcl.layout", "making metric field for " << name << " " << sUnit.getStr());
VclPtrInstance<MetricField> xField(pParent, nBits);
xField->SetUnit(eUnit);
if (eUnit == FUNIT_CUSTOM)
@@ -1504,9 +1503,9 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
connectNumericFormatterAdjustment(id, sAdjustment);
OUString sUnit = extractUnit(sPattern);
FieldUnit eUnit = detectMetricUnit(sUnit);
- SAL_WARN("vcl.layout", "making metric box for type: " << name.getStr()
- << " unit: " << sUnit.getStr()
- << " name: " << id.getStr()
+ SAL_WARN("vcl.layout", "making metric box for type: " << name
+ << " unit: " << sUnit
+ << " name: " << id
<< " use a VclComboBoxNumeric instead");
VclPtrInstance<MetricBox> xBox(pParent, nBits);
xBox->EnableAutoSize(true);
@@ -1547,7 +1546,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
connectNumericFormatterAdjustment(id, sAdjustment);
OUString sUnit = extractUnit(sPattern);
FieldUnit eUnit = detectMetricUnit(sUnit);
- SAL_INFO("vcl.layout", "making metric box for " << name.getStr() << " " << sUnit.getStr());
+ SAL_INFO("vcl.layout", "making metric box for " << name << " " << sUnit);
VclPtrInstance<MetricBox> xBox(pParent, nBits);
xBox->EnableAutoSize(true);
xBox->SetUnit(eUnit);
@@ -1558,7 +1557,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
}
else
{
- SAL_INFO("vcl.layout", "making numeric box for " << name.getStr());
+ SAL_INFO("vcl.layout", "making numeric box for " << name);
connectNumericFormatterAdjustment(id, sAdjustment);
VclPtrInstance<NumericBox> xBox(pParent, nBits);
if (bDropdown)
@@ -1809,16 +1808,16 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
}
}
}
- SAL_WARN_IF(!xWindow, "vcl.layout", "probably need to implement " << name.getStr() << " or add a make" << name.getStr() << " function");
+ SAL_WARN_IF(!xWindow, "vcl.layout", "probably need to implement " << name << " or add a make" << name << " function");
if (xWindow)
{
xWindow->SetHelpId(m_sHelpRoot + id);
- SAL_INFO("vcl.layout", "for " << name.getStr() <<
+ SAL_INFO("vcl.layout", "for " << name <<
", created " << xWindow.get() << " child of " <<
pParent << "(" << xWindow->mpWindowImpl->mpParent.get() << "/" <<
xWindow->mpWindowImpl->mpRealParent.get() << "/" <<
xWindow->mpWindowImpl->mpBorderWindow.get() << ") with helpid " <<
- xWindow->GetHelpId().getStr());
+ xWindow->GetHelpId());
m_aChildren.push_back(WinAndId(id, xWindow, bVertical));
}
return xWindow;
@@ -1885,8 +1884,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OString
{
pCurrentChild->SetHelpId(m_sHelpRoot + m_sID);
SAL_INFO("vcl.layout", "for toplevel dialog " << this << " " <<
- rID.getStr() << ", set helpid " <<
- pCurrentChild->GetHelpId().getStr());
+ rID << ", set helpid " << pCurrentChild->GetHelpId());
}
m_bToplevelParentFound = true;
}
@@ -2418,7 +2416,7 @@ void VclBuilder::handleAtkObject(xmlreader::XmlReader &reader, const OString &rI
if (pWindow && rKey.match("AtkObject::"))
pWindow->set_property(rKey.copy(RTL_CONSTASCII_LENGTH("AtkObject::")), rValue);
else
- SAL_WARN("vcl.layout", "unhandled atk prop: " << rKey.getStr());
+ SAL_WARN("vcl.layout", "unhandled atk prop: " << rKey);
}
}
@@ -2772,7 +2770,7 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, PopupMenu *pSubMenu, const
pParent->InsertSeparator(rID);
}
- SAL_WARN_IF(nOldCount == pParent->GetItemCount(), "vcl.layout", "probably need to implement " << rClass.getStr());
+ SAL_WARN_IF(nOldCount == pParent->GetItemCount(), "vcl.layout", "probably need to implement " << rClass);
if (nOldCount != pParent->GetItemCount())
{
@@ -2792,7 +2790,7 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, PopupMenu *pSubMenu, const
else if (rKey == "has-default" && toBool(rValue))
pParent->SetSelectedEntry(nNewId);
else
- SAL_INFO("vcl.layout", "unhandled property: " << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled property: " << rKey);
}
for (accelmap::iterator aI = rAccels.begin(), aEnd = rAccels.end(); aI != aEnd; ++aI)
@@ -2803,7 +2801,7 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, PopupMenu *pSubMenu, const
if (rSignal == "activate")
pParent->SetAccelKey(nNewId, makeKeyCode(rValue));
else
- SAL_INFO("vcl.layout", "unhandled accelerator for: " << rSignal.getStr());
+ SAL_INFO("vcl.layout", "unhandled accelerator for: " << rSignal);
}
}
@@ -3107,7 +3105,7 @@ void VclBuilder::applyPackingProperty(vcl::Window *pCurrent,
}
else
{
- SAL_WARN("vcl.layout", "unknown packing: " << sKey.getStr());
+ SAL_WARN("vcl.layout", "unknown packing: " << sKey);
}
}
}
@@ -3151,7 +3149,7 @@ std::vector<vcl::EnumContext::Context> VclBuilder::handleStyle(xmlreader::XmlRea
}
else
{
- SAL_WARN("vcl.layout", "unknown class: " << classStyle.getStr());
+ SAL_WARN("vcl.layout", "unknown class: " << classStyle);
}
}
}
@@ -3510,7 +3508,7 @@ void VclBuilder::mungeAdjustment(NumericFormatter &rTarget, const Adjustment &rA
}
else
{
- SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled property :" << rKey);
}
}
}
@@ -3541,7 +3539,7 @@ void VclBuilder::mungeAdjustment(TimeField &rTarget, const Adjustment &rAdjustme
}
else
{
- SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled property :" << rKey);
}
}
}
@@ -3572,7 +3570,7 @@ void VclBuilder::mungeAdjustment(DateField &rTarget, const Adjustment &rAdjustme
}
else
{
- SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled property :" << rKey);
}
}
}
@@ -3596,7 +3594,7 @@ void VclBuilder::mungeAdjustment(ScrollBar &rTarget, const Adjustment &rAdjustme
rTarget.SetPageSize(rValue.toInt32());
else
{
- SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled property :" << rKey);
}
}
}
@@ -3620,7 +3618,7 @@ void VclBuilder::mungeAdjustment(Slider& rTarget, const Adjustment& rAdjustment)
rTarget.SetPageSize(rValue.toInt32());
else
{
- SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled property :" << rKey);
}
}
}
@@ -3636,7 +3634,7 @@ void VclBuilder::mungeTextBuffer(VclMultiLineEdit &rTarget, const TextBuffer &rT
rTarget.SetText(rValue);
else
{
- SAL_INFO("vcl.layout", "unhandled property :" << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled property :" << rKey);
}
}
}
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 91525b3f590c..6847fb2d5d76 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -766,7 +766,7 @@ bool Dialog::ImplStartExecuteModal()
case Application::DialogCancelMode::Silent:
SAL_INFO(
"vcl",
- "Dialog \"" << ImplGetDialogText(this).getStr()
+ "Dialog \"" << ImplGetDialogText(this)
<< "\"cancelled in silent mode");
return false;
default: // default cannot happen
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index e73808df8e9b..010ee2a5c2f6 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2153,7 +2153,7 @@ bool VclSizeGroup::set_property(const OString &rKey, const OUString &rValue)
}
else
{
- SAL_INFO("vcl.layout", "unhandled property: " << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled property: " << rKey);
return false;
}
return true;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 9c891ec309d9..0a54ea7fe31c 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1463,7 +1463,7 @@ bool Window::set_font_attribute(const OString &rKey, const OUString &rValue)
}
else
{
- SAL_INFO("vcl.layout", "unhandled font attribute: " << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled font attribute: " << rKey);
return false;
}
return true;
@@ -1605,7 +1605,7 @@ bool Window::set_property(const OString &rKey, const OUString &rValue)
}
else
{
- SAL_INFO("vcl.layout", "unhandled property: " << rKey.getStr());
+ SAL_INFO("vcl.layout", "unhandled property: " << rKey);
return false;
}
return true;
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index e33ccfd50726..be572f29a7c6 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -631,7 +631,7 @@ OString SessionManagerClient::getPreviousSessionID()
}
}
- SAL_INFO("vcl.sm.debug", " previous ID = " << aPrevId.getStr());
+ SAL_INFO("vcl.sm.debug", " previous ID = " << aPrevId);
return aPrevId;
}
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 4b3803231179..6b6b1442778a 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -276,7 +276,7 @@ namespace
for( std::vector<lang_and_element>::const_iterator aIter = elements.begin(); aIter != aEnd; ++aIter )
{
const char *pLang = reinterpret_cast<const char*>(aIter->first);
- if( rtl_str_compare( pLang, sFullMatch.getStr() ) == 0)
+ if( sFullMatch == pLang)
{
// both language and country match
candidate = aIter->second;
@@ -288,7 +288,7 @@ namespace
// override candidate only if there is a full match
continue;
}
- else if( rtl_str_compare( pLang, sLangMatch.getStr()) == 0)
+ else if( sLangMatch == pLang)
{
// just the language matches
candidate = aIter->second;
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 715223809afa..84b3cfd56a89 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -604,7 +604,7 @@ bool PrintFontManager::analyzeSfntFile( PrintFont* pFont ) const
if( aInfo.usubfamily )
pFont->m_aStyleName = OUString( aInfo.usubfamily );
- SAL_WARN_IF( !aInfo.psname, "vcl", "No PostScript name in font:" << aFile.getStr() );
+ SAL_WARN_IF( !aInfo.psname, "vcl", "No PostScript name in font:" << aFile );
pFont->m_aPSName = aInfo.psname ?
OUString(aInfo.psname, rtl_str_getLength(aInfo.psname), aEncoding) :
@@ -697,7 +697,7 @@ bool PrintFontManager::analyzeSfntFile( PrintFont* pFont ) const
bSuccess = true;
}
else
- SAL_WARN("vcl", "Could not OpenTTFont \"" << aFile.getStr() << "\"");
+ SAL_WARN("vcl", "Could not OpenTTFont \"" << aFile << "\"");
return bSuccess;
}
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
index f7092dfc6761..7c027680abaa 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
@@ -73,10 +73,7 @@ Name
{
#ifdef DEBUG_WRITERFILTER
clog << this << ":start unknown element:"
- << OUStringToOString(Namespace, RTL_TEXTENCODING_ASCII_US).getStr()
- << ":"
- << OUStringToOString(Name, RTL_TEXTENCODING_ASCII_US).getStr()
- << endl;
+ << Namespace << ":" << Name << endl;
#endif
}
@@ -106,9 +103,7 @@ Name
{
#ifdef DEBUG_WRITERFILTER
clog << this << ":end unknown element:"
- << OUStringToOString(Namespace, RTL_TEXTENCODING_ASCII_US).getStr()
- << ":"
- << OUStringToOString(Name, RTL_TEXTENCODING_ASCII_US).getStr()
+ << Namespace << ":" << Name
<< endl;
#endif
}
@@ -158,9 +153,7 @@ Name
{
#ifdef DEBUG_WRITERFILTER
clog << this << ":createUnknownChildContext:"
- << OUStringToOString(Namespace, RTL_TEXTENCODING_ASCII_US).getStr()
- << ":"
- << OUStringToOString(Name, RTL_TEXTENCODING_ASCII_US).getStr()
+ << Namespace << ":"<< Name
<< endl;
#endif
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index c49ae29af150..0d81c1986229 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -764,10 +764,9 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
// Feed the destination text to a stream.
OString aStr = OUStringToOString(m_aStates.top().aDestinationText.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
- const char* str = aStr.getStr();
for (int i = 0; i < aStr.getLength(); ++i)
{
- char ch = str[i];
+ char ch = aStr[i];
if (ch != 0x0d && ch != 0x0a && ch != 0x20)
{
b = b << 4;
@@ -2184,11 +2183,10 @@ RTFError RTFDocumentImpl::popState()
OString aStr = OUStringToOString(m_aStates.top().pDestinationText->makeStringAndClear(), aState.nCurrentEncoding);
// decode hex dump
OStringBuffer aBuf;
- const char* str = aStr.getStr();
int b = 0, count = 2;
for (int i = 0; i < aStr.getLength(); ++i)
{
- char ch = str[i];
+ char ch = aStr[i];
if (ch != 0x0d && ch != 0x0a)
{
b = b << 4;
@@ -3093,10 +3091,9 @@ RTFError RTFDocumentImpl::handleEmbeddedObject()
// Feed the destination text to a stream.
OString aStr = OUStringToOString(m_aStates.top().pDestinationText->makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
- const char* str = aStr.getStr();
for (int i = 0; i < aStr.getLength(); ++i)
{
- char ch = str[i];
+ char ch = aStr[i];
if (ch != 0x0d && ch != 0x0a)
{
b = b << 4;
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index e5e1087d3645..5734c8e1282e 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -282,7 +282,7 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nPara
Strm().SeekRel(nParam);
return RTFError::OK;
}
- SAL_INFO("writerfilter.rtf", OSL_THIS_FUNC << ": keyword '\\" << rKeyword.getStr() <<
+ SAL_INFO("writerfilter.rtf", OSL_THIS_FUNC << ": keyword '\\" << rKeyword <<
"' with param? " << (bParam ? 1 : 0) <<" param val: '" << (bParam ? nParam : 0) << "'");
RTFSymbol aSymbol;
aSymbol.sKeyword = rKeyword.getStr();
@@ -290,7 +290,7 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nPara
int i = low - s_aRTFControlWords.begin();
if (low == s_aRTFControlWords.end() || aSymbol < *low)
{
- SAL_INFO("writerfilter.rtf", OSL_THIS_FUNC << ": unknown keyword '\\" << rKeyword.getStr() << "'");
+ SAL_INFO("writerfilter.rtf", OSL_THIS_FUNC << ": unknown keyword '\\" << rKeyword << "'");
RTFSkipDestination aSkip(m_rImport);
aSkip.setParsed(false);
return RTFError::OK;
diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx
index cf5f9642aa0c..7bc45c540a90 100644
--- a/xmloff/source/core/xmlerror.cxx
+++ b/xmloff/source/core/xmlerror.cxx
@@ -166,10 +166,7 @@ void XMLErrors::AddRecord(
sMessage.append( "\n" );
}
- // convert to byte string and signal the error
- OString aError(OUStringToOString(sMessage.makeStringAndClear(),
- RTL_TEXTENCODING_ASCII_US));
- OSL_FAIL( aError.getStr() );
+ SAL_WARN( "xmloff", sMessage.makeStringAndClear() );
#endif
}
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 1bf17017d9c7..00f4f05b63a0 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -329,12 +329,8 @@ namespace xmloff
{
if ( !xDynamicProperties.is() )
{
- #if OSL_DEBUG_LEVEL > 0
- OString aMessage( "OElementImport::implApplyGenericProperties: encountered an unknown property (" );
- aMessage += OUStringToOString( aPropValues->Name, RTL_TEXTENCODING_ASCII_US );
- aMessage += "), but component is no PropertyBag!";
- OSL_FAIL( aMessage.getStr() );
- #endif
+ SAL_WARN( "xmloff", "OElementImport::implApplyGenericProperties: encountered an unknown property ("
+ << aPropValues->Name << "), but component is no PropertyBag!");
continue;
}
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index c8a2161a9828..5871a19a1e0a 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -338,14 +338,8 @@ bool OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const OUStr
}
if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for <form:form>
{
-#if OSL_DEBUG_LEVEL > 0
- OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" );
- sMessage += OString( " Attribute name: " );
- sMessage += OString( _rLocalName.getStr(), _rLocalName.getLength(), osl_getThreadTextEncoding() );
- sMessage += OString( "\n value: " );
- sMessage += OString( _rValue.getStr(), _rValue.getLength(), osl_getThreadTextEncoding() );
- OSL_FAIL( sMessage.getStr() );
-#endif
+ SAL_WARN( "xmloff", "OPropertyImport::handleAttribute: Can't handle the following:\n"
+ " Attribute name: " << _rLocalName << "\n value: " << _rValue );
return false;
}
return true;
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index 2e9c538ae46a..0bc2297e05db 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -138,15 +138,11 @@ void XMLEventExport::Export( Reference<XNameAccess> & rAccess,
// now export the current event
ExportEvent( aValues, rXmlName, bWhitespace, bStarted );
}
-#ifdef DBG_UTIL
else
{
// don't proceed further
- OString aStr("Unknown event name:" );
- aStr += OUStringToOString( aNames[i], RTL_TEXTENCODING_UTF8 );
- OSL_FAIL( aStr.getStr() );
+ SAL_WARN("xmloff", "Unknown event name:" << aNames[i] );
}
-#endif
}
// close <script:events> element (if it was opened before)
@@ -187,15 +183,11 @@ void XMLEventExport::ExportSingleEvent(
EndElement(bUseWhitespace);
}
}
-#ifdef DBG_UTIL
else
{
// don't proceed further
- OString aStr("Unknown event name:" );
- aStr += OUStringToOString( rApiEventName, RTL_TEXTENCODING_UTF8 );
- OSL_FAIL( aStr.getStr() );
+ SAL_WARN("xmloff", "Unknown event name:" << rApiEventName );
}
-#endif
}
diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx
index 82941b446753..29512be6af94 100644
--- a/xmloff/source/transform/StyleOOoTContext.cxx
+++ b/xmloff/source/transform/StyleOOoTContext.cxx
@@ -317,22 +317,13 @@ XMLTypedPropertiesOOoTContext_Impl
XML_PROP_TYPE_END==m_aPropTypes[1] ||
(i<MAX_PROP_TYPES && XML_PROP_TYPE_END!=m_aPropTypes[i]) ) )
{
- OString aTmp("Didn't find property: ");
- const OUString& rPrefix =
- GetTransformer().GetNamespaceMap().GetPrefixByKey( nPrefix );
- aTmp += OString( rPrefix.getStr(), rPrefix.getLength(),
- RTL_TEXTENCODING_ASCII_US );
- aTmp += OString( ':' );
- aTmp += OString( rLocalName.getStr(), rLocalName.getLength(),
- RTL_TEXTENCODING_ASCII_US );
- aTmp += OString(", assuming <style:");
- const OUString& rName =
- ::xmloff::token::GetXMLToken( aPropTokens[m_aPropTypes[0]] );
- aTmp += OString( rName.getStr(), rName.getLength(),
- RTL_TEXTENCODING_ASCII_US );
- aTmp += OString( '>' );
-
- OSL_FAIL(aTmp.getStr());
+ SAL_WARN("xmloff", "Didn't find property: "
+ << GetTransformer().GetNamespaceMap().GetPrefixByKey( nPrefix )
+ << ":"
+ << rLocalName
+ << ", assuming <style:"
+ << ::xmloff::token::GetXMLToken( aPropTokens[m_aPropTypes[0]] )
+ << ">" );
}
#endif
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index b970b7d4cb38..44ed6971f65d 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -250,7 +250,7 @@ bool nsscrypto_initialize( const css::uno::Reference< css::uno::XComponentContex
#else
(void) rxContext;
#endif
- SAL_INFO("xmlsecurity.xmlsec", "Using profile: " << sCertDir.getStr() );
+ SAL_INFO("xmlsecurity.xmlsec", "Using profile: " << sCertDir );
PR_Init( PR_USER_THREAD, PR_PRIORITY_NORMAL, 1 ) ;