summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorRohan Kumar <rohankanojia420@gmail.com>2016-03-07 22:19:36 +0530
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2016-04-05 10:15:45 +0000
commit901d04d3965ed73696586de06c6890e79299f266 (patch)
treeca85db3688d3a440c56c804f9875ed2040ac8e4d /svx
parentd6411207bd83b34b4d6c6fd68cd41d3005228b05 (diff)
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@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx13
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx5
-rw-r--r--svx/source/form/formcontroller.cxx4
-rw-r--r--svx/source/form/navigatortree.cxx4
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx10
5 files changed, 18 insertions, 18 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 3c5f60400f3c..aa3c594095d6 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 9a2f31b42349..63c2ccd8ee97 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 7f41de76e9a3..b3a7843b004b 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 7dd87ee081b3..df668154c8ec 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 bd06604dee86..c89f60a97d93 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 );