[Libreoffice-commits] core.git: oox/inc oox/source

Rohan Kumar rohankanojia420 at gmail.com
Tue Apr 12 11:49:40 UTC 2016


 oox/inc/drawingml/textliststyle.hxx      |    2 +-
 oox/source/drawingml/diagram/diagram.cxx |   18 ++++++++----------
 oox/source/drawingml/textliststyle.cxx   |    4 ++--
 3 files changed, 11 insertions(+), 13 deletions(-)

New commits:
commit aba0c20fb059e5cc484af5feae29e6f51e584fa8
Author: Rohan Kumar <rohankanojia420 at gmail.com>
Date:   Fri Apr 8 11:42:42 2016 +0530

    tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
    
    I disentangled my previous patch to make one patch per module. I also
    modified the patch according to new directions given by Sweet5hark
    
    Change-Id: Id690f7c1e87230e4d10e1c9fe472f35d1d1caa8b
    Reviewed-on: https://gerrit.libreoffice.org/22924
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/oox/inc/drawingml/textliststyle.hxx b/oox/inc/drawingml/textliststyle.hxx
index 1f3c6a0..d4cc455 100644
--- a/oox/inc/drawingml/textliststyle.hxx
+++ b/oox/inc/drawingml/textliststyle.hxx
@@ -45,7 +45,7 @@ public:
     const TextParagraphPropertiesVector& getAggregationListStyle() const { return maAggregationListStyle; };
     TextParagraphPropertiesVector&       getAggregationListStyle() { return maAggregationListStyle; };
 
-#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
     void dump() const;
 #endif
 
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index 04bda5b..7749d5e 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -91,7 +91,7 @@ void Diagram::setLayout( const DiagramLayoutPtr & pLayout)
     mpLayout = pLayout;
 }
 
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_OOX_DIAGRAM
 OString normalizeDotName( const OUString& rStr )
 {
     OUStringBuffer aBuf;
@@ -139,19 +139,17 @@ static sal_Int32 calcDepth( const OUString& rNodeName,
 void Diagram::build(  )
 {
     // build name-object maps
-
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_OOX_DIAGRAM
     std::ofstream output("/tmp/tree.dot");
 
     output << "digraph datatree {" << std::endl;
 #endif
-
     dgm::Points& rPoints = getData()->getPoints();
     dgm::Points::iterator aCurrPoint(rPoints.begin());
     dgm::Points::iterator aEndPoint(rPoints.end());
     while( aCurrPoint != aEndPoint )
     {
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_OOX_DIAGRAM
         output << "\t"
                << normalizeDotName(aCurrPoint->msModelId).getStr()
                << "[";
@@ -179,6 +177,7 @@ void Diagram::build(  )
         }
 
         output << "];" << std::endl;
+#endif
 
         // does currpoint have any text set?
         if( aCurrPoint->mpShape &&
@@ -186,8 +185,8 @@ void Diagram::build(  )
             !aCurrPoint->mpShape->getTextBody()->getParagraphs().empty() &&
             !aCurrPoint->mpShape->getTextBody()->getParagraphs().front()->getRuns().empty() )
         {
+#ifdef DEBUG_OOX_DIAGRAM
             static sal_Int32 nCount=0;
-
             output << "\t"
                    << "textNode" << nCount
                    << " ["
@@ -201,8 +200,8 @@ void Diagram::build(  )
                    << " -> "
                    << "textNode" << nCount++
                    << ";" << std::endl;
-        }
 #endif
+        }
 
         const bool bInserted1=getData()->getPointNameMap().insert(
             std::make_pair(aCurrPoint->msModelId,&(*aCurrPoint))).second;
@@ -224,7 +223,7 @@ void Diagram::build(  )
     const dgm::Connections::const_iterator aEndCxn(rConnections.end());
     while( aCurrCxn != aEndCxn )
     {
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_OOX_DIAGRAM
         if( !aCurrCxn->msParTransId.isEmpty() ||
             !aCurrCxn->msSibTransId.isEmpty() )
         {
@@ -308,8 +307,7 @@ void Diagram::build(  )
 
         ++aPresOfIter;
     }
-
-#if OSL_DEBUG_LEVEL > 1
+#ifdef DEBUG_OOX_DIAGRAM
     output << "}" << std::endl;
 #endif
 }
diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx
index 5ea7a04..44b0f41 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -86,12 +86,12 @@ void TextListStyle::apply( const TextListStyle& rTextListStyle )
     applyStyleList( rTextListStyle.getListStyle(), getListStyle() );
 }
 
-#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 1
+#ifdef DBG_UTIL
 void TextListStyle::dump() const
 {
     for ( int i = 0; i < 9; i++ )
     {
-        OSL_TRACE("text list style level: %d", i);
+        SAL_INFO("oox.drawingml", "text list style level: " << i);
         maListStyle[i]->dump();
     }
 }


More information about the Libreoffice-commits mailing list