summaryrefslogtreecommitdiff
path: root/sd
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 /sd
parent826f1bca40a01f0a249d5b6cbb7c39c11638a060 (diff)
remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-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
9 files changed, 61 insertions, 164 deletions
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() )