From 4ef9ccea6c4aa79cdc57dea52b47775c346696ec Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 9 Dec 2016 15:48:38 +0200 Subject: OSL_TRACE -> SAL in sfx2..svx Change-Id: I78cf8058a5682baa3d7b00a25feeb2d28fb3e66e Reviewed-on: https://gerrit.libreoffice.org/31799 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- svx/source/accessibility/AccessibleShape.cxx | 10 +++---- svx/source/accessibility/AccessibleTextHelper.cxx | 16 +++++------ svx/source/accessibility/ChildrenManager.cxx | 2 +- svx/source/customshapes/EnhancedCustomShape2d.cxx | 11 ++++---- svx/source/fmcomp/gridcell.cxx | 2 +- svx/source/form/fmtextcontrolshell.cxx | 34 ++++++++--------------- svx/source/gengal/gengal.cxx | 2 +- svx/source/svdraw/svdotext.cxx | 4 +-- svx/source/table/accessiblecell.cxx | 4 +-- svx/source/unodraw/unoshcol.cxx | 2 +- 10 files changed, 38 insertions(+), 49 deletions(-) (limited to 'svx') diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index bcbebd314048..2313dbe6c1de 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -117,7 +117,7 @@ AccessibleShape::~AccessibleShape() { delete mpChildrenManager; delete mpText; - OSL_TRACE ("~AccessibleShape"); + SAL_INFO("svx", "~AccessibleShape"); // Unregistering from the various broadcasters should be unnecessary // since this destructor would not have been called if one of the @@ -575,7 +575,7 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds() } } else - OSL_TRACE (" no property BoundRect"); + SAL_WARN("svx", "no property BoundRect"); } } @@ -638,7 +638,7 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds() } else { - OSL_TRACE ("parent does not support component"); + SAL_INFO("svx", "parent does not support component"); aBoundingBox = awt::Rectangle ( aPixelPosition.getX(), aPixelPosition.getY(), aPixelSize.getWidth(), aPixelSize.getHeight()); @@ -676,7 +676,7 @@ awt::Point SAL_CALL AccessibleShape::getLocationOnScreen() aLocation.Y += aParentLocation.Y; } else - OSL_TRACE ("getLocation: parent does not support XAccessibleComponent"); + SAL_WARN("svx", "parent does not support XAccessibleComponent"); return aLocation; } @@ -1016,7 +1016,7 @@ void SAL_CALL } catch (uno::RuntimeException const&) { - OSL_TRACE ("caught exception while disposing"); + SAL_WARN("svx", "caught exception while disposing"); } } diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index e3b392258ee0..9ac6ceae2002 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -256,7 +256,7 @@ namespace accessibility mnNotifierClientId(::comphelper::AccessibleEventNotifier::registerClient()) { #ifdef DBG_UTIL - OSL_TRACE( "AccessibleTextHelper_Impl received ID: %d", mnNotifierClientId ); + SAL_INFO("svx", "received ID: " << mnNotifierClientId ); #endif } @@ -426,7 +426,7 @@ namespace accessibility pAccTable->SetStateDirectly(AccessibleStateType::FOCUSED); } } - OSL_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object received focus" ); + SAL_INFO("svx", "Parent object received focus" ); } else { @@ -444,7 +444,7 @@ namespace accessibility pAccTable->ResetStateDirectly(AccessibleStateType::FOCUSED); } } - OSL_TRACE("AccessibleTextHelper_Impl::SetShapeFocus(): Parent object lost focus" ); + SAL_INFO("svx", "Parent object lost focus" ); } } } @@ -471,7 +471,7 @@ namespace accessibility SetShapeFocus( bHaveFocus ); } - OSL_TRACE("AccessibleTextHelper_Impl::SetFocus: focus changed, Object %p, state: %s", this, bHaveFocus ? "focused" : "not focused"); + SAL_INFO("svx", "focus changed, Object " << this << ", state: " << (bHaveFocus ? "focused" : "not focused") ); } bool AccessibleTextHelper_Impl::IsActive() const @@ -518,7 +518,7 @@ namespace accessibility // #103998# Not that important, changed from assertion to trace if( mbThisHasFocus ) { - OSL_TRACE("AccessibleTextHelper_Impl::UpdateSelection(): Parent has focus!"); + SAL_INFO("svx", "Parent has focus!"); } sal_Int32 nMaxValidParaIndex( GetTextForwarder().GetParagraphCount() - 1 ); @@ -1323,7 +1323,7 @@ namespace accessibility catch( const uno::Exception& ) { #ifdef DBG_UTIL - OSL_TRACE("AccessibleTextHelper_Impl::ProcessQueue: Unhandled exception."); + SAL_WARN("svx", "Unhandled exception."); #endif } } @@ -1439,7 +1439,7 @@ namespace accessibility catch( const uno::Exception& ) { #ifdef DBG_UTIL - OSL_TRACE("AccessibleTextHelper_Impl::Notify: Unhandled exception."); + SAL_WARN("svx", "Unhandled exception."); #endif mbInNotify = false; } @@ -1456,7 +1456,7 @@ namespace accessibility // #106234# Unregister from EventNotifier ::comphelper::AccessibleEventNotifier::revokeClient( getNotifierClientId() ); #ifdef DBG_UTIL - OSL_TRACE( "AccessibleTextHelper_Impl disposed ID: %d", mnNotifierClientId ); + SAL_INFO("svx", "disposed ID: " << mnNotifierClientId ); #endif } catch( const uno::Exception& ) {} diff --git a/svx/source/accessibility/ChildrenManager.cxx b/svx/source/accessibility/ChildrenManager.cxx index c7938a17242f..d1a7acde0f07 100644 --- a/svx/source/accessibility/ChildrenManager.cxx +++ b/svx/source/accessibility/ChildrenManager.cxx @@ -46,7 +46,7 @@ ChildrenManager::~ChildrenManager() mpImpl->dispose(); // empty - OSL_TRACE ("~ChildrenManager"); + SAL_INFO("svx", "~ChildrenManager"); } long ChildrenManager::GetChildCount() const throw () diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index f93ddd48b5ba..c5c060122f4a 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -723,8 +723,8 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : const Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" ); if ( pAny ) { *pAny >>= sShapeType; - bOOXMLShape = ( sShapeType.startsWith("ooxml-") ); - OSL_TRACE("shape type: %s %d", OUStringToOString( sShapeType, RTL_TEXTENCODING_ASCII_US ).getStr(), bOOXMLShape); + bOOXMLShape = sShapeType.startsWith("ooxml-"); + SAL_INFO("svx", "shape type: " << sShapeType << " " << bOOXMLShape); } eSpType = EnhancedCustomShapeTypeNames::Get( sShapeType ); @@ -885,7 +885,7 @@ double EnhancedCustomShape2d::GetEquationValueAsDouble( const sal_Int32 nIndex ) } catch ( ... ) { - OSL_TRACE("error: EnhancedCustomShape2d::GetEquationValueAsDouble failed"); + SAL_WARN("svx", "EnhancedCustomShape2d::GetEquationValueAsDouble failed"); } #if OSL_DEBUG_LEVEL > 0 nLevel --; @@ -1797,7 +1797,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm fStartAngle *= F_PI180; fSwingAngle *= F_PI180; - OSL_TRACE("ARCANGLETO scale: %f x %f angles: %f, %f", fWR, fHR, fStartAngle, fSwingAngle); + SAL_INFO("svx", "ARCANGLETO scale: " << fWR << "x" << fHR << " angles: " << fStartAngle << "," << fSwingAngle); bool bClockwise = fSwingAngle >= 0.0; @@ -1809,7 +1809,8 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm double fT = atan2((fWR*sin(fStartAngle)), (fHR*cos(fStartAngle))); double fTE = atan2((fWR*sin(fStartAngle + fSwingAngle)), fHR*cos(fStartAngle + fSwingAngle)); - OSL_TRACE("ARCANGLETO angles: %f, %f --> parameters: %f, %f", fStartAngle, fSwingAngle, fT, fTE ); + SAL_INFO("svx", "ARCANGLETO angles: " << fStartAngle << ", " << fSwingAngle + << " --> parameters: " << fT <<", " << fTE ); fWR *= fXScale; fHR *= fYScale; diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index fc59e76fbb95..6a115a3fd970 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -2063,7 +2063,7 @@ double DbCurrencyField::GetCurrency(const Reference< css::sdb::XColumn >& _rxFie double fValue = GetValue(_rxField, xFormatter); if (m_nScale) { - // OSL_TRACE("double = %.64f ",fValue); + // SAL_INFO("svx",("double = %.64f ",fValue); fValue = ::rtl::math::pow10Exp(fValue, m_nScale); fValue = ::rtl::math::round(fValue); } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index fc617478d000..76726e244420 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -552,7 +552,7 @@ namespace svx { if ( m_bNeedClipboardInvalidation ) { - OSL_TRACE( "FmTextControlShell::ClipBoard: invalidating clipboard slots" ); + SAL_INFO("svx", "invalidating clipboard slots" ); m_rBindings.Invalidate( SID_CUT ); m_rBindings.Invalidate( SID_COPY ); m_rBindings.Invalidate( SID_PASTE ); @@ -611,11 +611,10 @@ namespace svx { #if OSL_DEBUG_LEVEL > 0 bool bFeatureIsEnabled = aFeature->second->isFeatureEnabled(); - OString sMessage( "FmTextControlShell::transferFeatureStatesToItemSet: found a feature state for " ); - sMessage += sUnoSlotNameAscii; + OString sMessage = "found a feature state for " + sUnoSlotNameAscii; if ( !bFeatureIsEnabled ) sMessage += " (disabled)"; - OSL_TRACE( "%s", sMessage.getStr() ); + SAL_INFO("svx", sMessage ); #endif lcl_translateUnoStateToItem( nSlotId, aFeature->second->getFeatureState(), _rSet ); @@ -623,10 +622,7 @@ namespace svx #if OSL_DEBUG_LEVEL > 0 else { - OString sMessage( "FmTextControlShell::transferFeatureStatesToItemSet: found a feature state for " ); - sMessage += sUnoSlotNameAscii; - sMessage += ", but could not translate it into an item!"; - OSL_TRACE( "%s", sMessage.getStr() ); + SAL_WARN("svx", "found a feature state for " << sUnoSlotNameAscii << ", but could not translate it into an item!" ); } #endif } @@ -958,7 +954,7 @@ namespace svx bNeedSelection = true; bNeedTextComponent = true; bNeedWriteableControl = true; - OSL_TRACE( "FmTextControlShell::ClipBoard: need to invalidate again" ); + SAL_INFO("svx", "need to invalidate again" ); m_bNeedClipboardInvalidation = true; break; @@ -1042,9 +1038,7 @@ namespace svx void FmTextControlShell::formActivated( const Reference< runtime::XFormController >& _rxController ) { #if OSL_DEBUG_LEVEL > 0 - OString sTrace( "FmTextControlShell::formActivated: 0x" ); - sTrace += OString::number( reinterpret_cast(_rxController.get()), 16 ); - OSL_TRACE( "%s", sTrace.getStr() ); + SAL_INFO("svx", "0x" << OUString::number( reinterpret_cast(_rxController.get()), 16 )); #endif DBG_ASSERT( _rxController.is(), "FmTextControlShell::formActivated: invalid controller!" ); @@ -1070,9 +1064,7 @@ namespace svx void FmTextControlShell::formDeactivated( const Reference< runtime::XFormController >& _rxController ) { #if OSL_DEBUG_LEVEL > 0 - OString sTrace( "FmTextControlShell::formDeactivated: 0x" ); - sTrace += OString::number( reinterpret_cast(_rxController.get()), 16 ); - OSL_TRACE( "%s", sTrace.getStr() ); + SAL_INFO("svx", "0x" << OUString::number( reinterpret_cast(_rxController.get()), 16 )); #endif (void)_rxController; @@ -1160,7 +1152,7 @@ namespace svx if ( m_xActiveTextComponent.is() ) { - OSL_TRACE( "FmTextControlShell::ClipBoard: stopping timer for clipboard invalidation" ); + SAL_INFO("svx", "stopping timer for clipboard invalidation" ); m_aClipboardInvalidation.Stop(); } // no more active control @@ -1225,7 +1217,7 @@ namespace svx if ( m_xActiveTextComponent.is() ) { - OSL_TRACE( "FmTextControlShell::ClipBoard: starting timer for clipboard invalidation" ); + SAL_INFO("svx", "starting timer for clipboard invalidation" ); m_aClipboardInvalidation.Start(); } @@ -1318,9 +1310,7 @@ namespace svx Reference< css::awt::XControl > xControl( _rEvent.Source, UNO_QUERY ); #if OSL_DEBUG_LEVEL > 0 - OString sTrace( "FmTextControlShell::focusGained: 0x" ); - sTrace += OString::number( reinterpret_cast(xControl.get()), 16 ); - OSL_TRACE( "%s", sTrace.getStr() ); + SAL_INFO("svx", "0x" << OUString::number( reinterpret_cast(xControl.get()), 16 )); #endif DBG_ASSERT( xControl.is(), "FmTextControlShell::focusGained: suspicious focus event!" ); @@ -1334,9 +1324,7 @@ namespace svx Reference< css::awt::XControl > xControl( _rEvent.Source, UNO_QUERY ); #if OSL_DEBUG_LEVEL > 0 - OString sTrace( "FmTextControlShell::focusLost: 0x" ); - sTrace += OString::number( reinterpret_cast(xControl.get()), 16 ); - OSL_TRACE( "%s", sTrace.getStr() ); + SAL_INFO("svx", "0x" << OUString::number( reinterpret_cast(xControl.get()), 16 )); #endif m_bActiveControl = false; diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx index 0b81ff122a30..2f0b5cbe8bcb 100644 --- a/svx/source/gengal/gengal.cxx +++ b/svx/source/gengal/gengal.cxx @@ -186,7 +186,7 @@ void GalApp::Init() OUString envVar( "OOO_INSTALL_PREFIX"); osl_setEnvironment(envVar.pData, installPrefix.pData); } - OSL_TRACE( "OOO_INSTALL_PREFIX=%s", getenv( "OOO_INSTALL_PREFIX" ) ); + SAL_INFO("svx", "OOO_INSTALL_PREFIX=" << getenv( "OOO_INSTALL_PREFIX" ) ); uno::Reference xComponentContext = ::cppu::defaultBootstrap_InitialComponentContext(); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index b40fd8bd9176..76e27c16d2b6 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1328,11 +1328,11 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize, nCurrStretchY = sal::static_int_cast(nCurrStretchY*fFactor); rOutliner.SetGlobalCharStretching(std::min(sal_uInt16(100),nCurrStretchX), std::min(sal_uInt16(100),nCurrStretchY)); - OSL_TRACE("SdrTextObj::onEditOutlinerStatusEvent(): zoom is %d", nCurrStretchX); + SAL_INFO("svx", "zoom is " << nCurrStretchX); } } - OSL_TRACE("---- SdrTextObj::onEditOutlinerStatusEvent(): final zoom is %d ----", nMinStretchX); + SAL_INFO("svx", "final zoom is " << nMinStretchX); rOutliner.SetGlobalCharStretching(std::min(sal_uInt16(100),nMinStretchX), std::min(sal_uInt16(100),nMinStretchY)); } diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index 97be877663ec..f72e94ca8ae9 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -336,7 +336,7 @@ css::awt::Rectangle SAL_CALL AccessibleCell::getBounds() throw(RuntimeException, } else { - OSL_TRACE ("parent does not support component"); + SAL_INFO("svx", "parent does not support component"); aBoundingBox = awt::Rectangle (aPixelPosition.getX(), aPixelPosition.getY(),aPixelSize.getWidth(), aPixelSize.getHeight()); } } @@ -370,7 +370,7 @@ css::awt::Point SAL_CALL AccessibleCell::getLocationOnScreen() throw(RuntimeExce } else { - OSL_TRACE ("getLocation: parent does not support XAccessibleComponent"); + SAL_WARN("svx", "parent does not support XAccessibleComponent"); } return aLocation; diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 7ab047df4472..d370a9c8aab8 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -173,7 +173,7 @@ void SvxShapeCollection::dispose() { // in a multithreaded environment, it can't be avoided, that dispose is called twice. // However this condition is traced, because it MAY indicate an error. - OSL_TRACE( "OComponentHelper::dispose() - dispose called twice" ); + SAL_INFO("svx", "dispose called twice" ); } } -- cgit