[Libreoffice-commits] core.git: svx/source

Rohan Kumar rohankanojia420 at gmail.com
Tue Apr 5 10:16:14 UTC 2016


 svx/source/customshapes/EnhancedCustomShape2d.cxx             |   13 ++++------
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |    5 ++-
 svx/source/form/formcontroller.cxx                            |    4 +--
 svx/source/form/navigatortree.cxx                             |    4 +--
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx      |   10 +++----
 5 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 901d04d3965ed73696586de06c6890e79299f266
Author: Rohan Kumar <rohankanojia420 at gmail.com>
Date:   Mon Mar 7 22:19:36 2016 +0530

    tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
    
    I replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 in order
    to reduce debug levels. In some places i also used SAL_INFO(..)
    and SAL_WARN(..) statements to replace their deprecated OSL_
    counterparts
    
    Change-Id: I73ecc20ffd654501b16820e3bf748f1bcbcdab79
    Reviewed-on: https://gerrit.libreoffice.org/23004
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 3c5f604..aa3c594 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -850,13 +850,13 @@ double EnhancedCustomShape2d::GetAdjustValueAsDouble( const sal_Int32 nIndex ) c
 double EnhancedCustomShape2d::GetEquationValueAsDouble( const sal_Int32 nIndex ) const
 {
     double fNumber = 0.0;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
     static sal_uInt32 nLevel = 0;
 #endif
     if ( nIndex < (sal_Int32)vNodesSharedPtr.size() )
     {
         if ( vNodesSharedPtr[ nIndex ].get() ) {
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
             nLevel ++;
 #endif
             try
@@ -873,10 +873,9 @@ double EnhancedCustomShape2d::GetEquationValueAsDouble( const sal_Int32 nIndex )
 
                     if ( !rtl::math::isFinite( fNumber ) )
                         fNumber = 0.0;
-#if OSL_DEBUG_LEVEL > 1
-                    OSL_TRACE("equation %d (level: %d): %s --> %f (angle: %f)", nIndex,
-                              nLevel, OUStringToOString( seqEquations[ nIndex ],
-                                                         RTL_TEXTENCODING_ASCII_US ).getStr(), fNumber, 180.0*fNumber/10800000.0);
+#if OSL_DEBUG_LEVEL > 0
+                    SAL_INFO("svx", "equation " << nLevel << " (level: " << seqEquations[nIndex] << "): "
+                             << fNumber << " --> " << 180.0*fNumber/10800000.0);
 #endif
                 }
             }
@@ -884,7 +883,7 @@ double EnhancedCustomShape2d::GetEquationValueAsDouble( const sal_Int32 nIndex )
             {
                 OSL_TRACE("error: EnhancedCustomShape2d::GetEquationValueAsDouble failed");
             }
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
         nLevel --;
 #endif
         }
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 9a2f31b..63c2ccd 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -248,7 +248,7 @@ public:
     }
     virtual double operator()() const override
     {
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
         const char *funcName;
 
         switch (meFunct) {
@@ -268,7 +268,8 @@ public:
             default:                    funcName = "???"; break;
         }
 
-        OSL_TRACE("  %s --> %f (angle: %f)", funcName, getValue( mrCustoShape, meFunct ), 180.0*getValue( mrCustoShape, meFunct )/10800000.0);
+        SAL_INFO("svx", funcName << " --> " << getValue(mrCustoShape, meFunct) << "(angle: " <<
+                 180.0*getValue(mrCustoShape, meFunct)/10800000.0 << ")");
 #endif
 
         return getValue( mrCustoShape, meFunct );
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 7f41de7..b3a7843 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -1653,10 +1653,10 @@ void FormController::focusGained(const FocusEvent& e) throw( RuntimeException, s
             )
         {
             // check the old control if the content is ok
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
             Reference< XBoundControl >  xLockingTest(m_xCurrentControl, UNO_QUERY);
             sal_Bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock();
-            OSL_ENSURE(!bControlIsLocked, "FormController::Gained: I'm modified and the current control is locked ? How this ?");
+            assert(!bControlIsLocked && "FormController::Gained: I'm modified and the current control is locked ? How this ?");
             // normalerweise sollte ein gelocktes Control nicht modified sein, also muss wohl mein bModified aus einem anderen Kontext
             // gesetzt worden sein, was ich nicht verstehen wuerde ...
 #endif
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 7dd87ee..df66815 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -985,13 +985,13 @@ namespace svxform
 
                 // copy properties form old control to new one
                 Reference< XPropertySet >  xCurrent(pControls[i], UNO_QUERY);
-#if (OSL_DEBUG_LEVEL > 1)
+#if (OSL_DEBUG_LEVEL > 0)
                 // check whether it is a hidden control
                 sal_Int16 nClassId = ::comphelper::getINT16(xCurrent->getPropertyValue(FM_PROP_CLASSID));
                 OSL_ENSURE(nClassId == FormComponentType::HIDDENCONTROL, "NavigatorTree::implExecuteDataTransfer: invalid control in drop list !");
                     // if SVX_FM_HIDDEN_CONTROLS-format exists, the sequence
                     // should only contain hidden controls
-#endif // (OSL_DEBUG_LEVEL > 1)
+#endif // (OSL_DEBUG_LEVEL > 0)
                 Reference< XPropertySetInfo >  xPropInfo( xCurrent->getPropertySetInfo());
                 Sequence< Property> seqAllCurrentProps = xPropInfo->getProperties();
                 Property* pAllCurrentProps = seqAllCurrentProps.getArray();
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index bd06604..c89f60a 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -854,7 +854,7 @@ namespace sdr { namespace contact {
         const OutputDevice& rPageViewDevice( impl_getOutputDevice_throw() );
         m_aZoomLevelNormalization = rPageViewDevice.GetInverseViewTransformation();
 
-    #if OSL_DEBUG_LEVEL > 1
+    #if OSL_DEBUG_LEVEL > 0
         ::basegfx::B2DVector aScale, aTranslate;
         double fRotate, fShearX;
         m_aZoomLevelNormalization.decompose( aScale, aTranslate, fRotate, fShearX );
@@ -866,7 +866,7 @@ namespace sdr { namespace contact {
         aScaleNormalization.set( 1, 1, (double)aCurrentDeviceMapMode.GetScaleY() );
         m_aZoomLevelNormalization *= aScaleNormalization;
 
-    #if OSL_DEBUG_LEVEL > 1
+    #if OSL_DEBUG_LEVEL > 0
         m_aZoomLevelNormalization.decompose( aScale, aTranslate, fRotate, fShearX );
     #endif
    }
@@ -1545,7 +1545,7 @@ namespace sdr { namespace contact {
 
     ::drawinglayer::primitive2d::Primitive2DContainer LazyControlCreationPrimitive2D::get2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
     {
-    #if OSL_DEBUG_LEVEL > 1
+    #if OSL_DEBUG_LEVEL > 0
         ::basegfx::B2DVector aScale, aTranslate;
         double fRotate, fShearX;
         _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
@@ -1558,7 +1558,7 @@ namespace sdr { namespace contact {
 
     ::drawinglayer::primitive2d::Primitive2DContainer LazyControlCreationPrimitive2D::create2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
     {
-    #if OSL_DEBUG_LEVEL > 1
+    #if OSL_DEBUG_LEVEL > 0
         ::basegfx::B2DVector aScale, aTranslate;
         double fRotate, fShearX;
         _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
@@ -1710,7 +1710,7 @@ namespace sdr { namespace contact {
         if ( m_pImpl->hasControl() )
         {
             const ::drawinglayer::geometry::ViewInformation2D& rViewInformation( GetObjectContact().getViewInformation2D() );
-        #if OSL_DEBUG_LEVEL > 1
+        #if OSL_DEBUG_LEVEL > 0
             ::basegfx::B2DVector aScale, aTranslate;
             double fRotate, fShearX;
             rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );


More information about the Libreoffice-commits mailing list