diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-26 10:58:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-28 19:44:08 +0200 |
commit | ef513fd4b049b214a03fbe6e62a5ea43680a7a9b (patch) | |
tree | 82f2ce93bc8e5fde6dce8685b633c3d643c9f069 /svx | |
parent | 826f1bca40a01f0a249d5b6cbb7c39c11638a060 (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 'svx')
-rw-r--r-- | svx/source/form/fmsrccfg.cxx | 6 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 25 | ||||
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 58 | ||||
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 2 |
4 files changed, 26 insertions, 65 deletions
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 ); } |