diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-13 10:50:28 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-13 10:53:28 +0100 |
commit | ee11e221d2108212619e1bbe7f029e7d9afdba32 (patch) | |
tree | 65e77bfcd7fc7a4ca7e1c111cc8707615bc0d613 /sfx2 | |
parent | e37388c7de15242b7af0bf9fdc48c6d194d8cd94 (diff) |
tdf#43157: Fix format string violations in OSL_TRACE etc.
...in preparation of enabling the __attribute__((format(...))) in
sal_detail_logFormat (include/sal/detail/log.h)
Change-Id: I8a859199fa11ca0f9f4f4b4b23a8ebddec955a86
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/sidebar/Deck.cxx | 16 |
4 files changed, 11 insertions, 20 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 21091580b60e..29e0892dce4c 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -231,9 +231,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert else if ( nSubCount == 0 ) { // for a simple property there can be only one parameter and its name *must* match - OUStringBuffer aStr("Property name does not match: "); - aStr.append(aName); - OSL_FAIL( aStr.getStr() ); + SAL_WARN("sfx.appl", "Property name does not match: " << aName); } #endif else diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 5cd81b44b9f7..7db1a76d1960 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -66,7 +66,6 @@ #include <sfx2/sfxuno.hxx> #include <vcl/svapp.hxx> #include <sfx2/frame.hxx> -#include <rtl/strbuf.hxx> #include <rtl/string.hxx> using namespace ::com::sun::star::beans; @@ -631,11 +630,7 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const if (!xHelp.is() || !xHelpContent.is() || !pHelpWindow) return false; -#ifdef DBG_UTIL - OStringBuffer aTmp("SfxHelp: HelpId = "); - aTmp.append(OUStringToOString(aHelpURL, RTL_TEXTENCODING_UTF8)); - OSL_TRACE( aTmp.getStr() ); -#endif + SAL_INFO("sfx.appl", "HelpId = " << aHelpURL); pHelpWindow->SetHelpURL( aHelpURL ); pHelpWindow->loadHelpContent(aHelpURL); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index cf6c3737f6de..16cca9d30ea2 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -715,7 +715,7 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew) if ( bMDI ) { - OSL_TRACE(OStringBuffer("Deactivate Dispatcher").append(reinterpret_cast<sal_Int64>(this)).getStr()); + SAL_INFO("sfx.control", "Deactivate Dispatcher " << this); DBG_ASSERT( xImp->bActive, "Deactivate error" ); xImp->bActive = false; @@ -736,7 +736,7 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew) } } else { - OSL_TRACE(OStringBuffer("Non-MDI-DeActivate Dispatcher").append(reinterpret_cast<sal_Int64>(this)).getStr()); + SAL_INFO("sfx.control", "Non-MDI-DeActivate Dispatcher " << this); } if ( IsAppDispatcher() && !pSfxApp->IsDowning() ) diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index c114a937003c..ed4ad3cc285a 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -284,15 +284,13 @@ void Deck::PrintWindowSubTree (vcl::Window* pRoot, int nIndentation) static const char* sIndentation = " "; const Point aLocation (pRoot->GetPosPixel()); const Size aSize (pRoot->GetSizePixel()); - OUString sClassification = GetWindowClassification(pRoot); - const char* sVisible = pRoot->IsVisible() ? "visible" : "hidden"; - OSL_TRACE("%s%x %s %s +%d+%d x%dx%d", - sIndentation+strlen(sIndentation)-nIndentation*4, - pRoot, - OUStringToOString(sClassification, RTL_TEXTENCODING_ASCII_US).getStr(), - sVisible, - aLocation.X(),aLocation.Y(), - aSize.Width(),aSize.Height()); + SAL_INFO( + "sfx.sidebar", + sIndentation+strlen(sIndentation)-nIndentation*4 << pRoot << " " + << GetWindowClassification(pRoot) << " " + << (pRoot->IsVisible() ? "visible" : "hidden") << " +" + << aLocation.X() << "+" << aLocation.Y() << " x" << aSize.Width() + << "x" << aSize.Height()); const sal_uInt16 nChildCount (pRoot->GetChildCount()); for (sal_uInt16 nIndex=0; nIndex<nChildCount; ++nIndex) |