Rebased ref, commits from common ancestor:
commit a99fa0a3c9a4833f7b30d1b4eaa2ac7fc7246cf6
Author: Thorsten Behrens <thorsten.behr...@cib.de>
Date:   Sun Sep 20 01:42:12 2015 +0200

    chained editeng: Convert fprintf to SAL_INFO
    
    Change-Id: I8e0cfedd34d7e0d70a30147a3bbf0f1cd8e6d3cc

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 70072a2..74eb16d 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -564,18 +564,13 @@ void ImpEditEngine::CheckAutoPageSize()
 
 void ImpEditEngine::CheckPageOverflow()
 {
-    // FIXME(matteocam)
-    /* fprintf( stderr, IsPageOverflow(aPaperSize, aPrevPaperSize)
-                        ? "YES Overflow!\n"  : "NO Overflow!\n" ); */
-    // setting overflow status
-
-    fprintf(stderr, "[CONTROL_STATUS] AutoPageSize is %s",  ( 
aStatus.GetControlWord() & EEControlBits::AUTOPAGESIZE ) ? "ON\n" : "OFF\n" );
+    SAL_INFO("editeng.chaining", "[CONTROL_STATUS] AutoPageSize is " << (( 
aStatus.GetControlWord() & EEControlBits::AUTOPAGESIZE ) ? "ON" : "OFF") );
 
     sal_uInt32 nBoxHeight = GetMaxAutoPaperSize().Height();
-    fprintf(stderr, "[OVERFLOW-CHECK] Current MaxAutoPaperHeight is %d\n", 
nBoxHeight);
+    SAL_INFO("editeng.chaining", "[OVERFLOW-CHECK] Current MaxAutoPaperHeight 
is " << nBoxHeight);
 
     sal_uInt32 nTxtHeight = CalcTextHeight(NULL);
-    fprintf(stderr, "[OVERFLOW-CHECK] Current Text Height is %d\n", 
nTxtHeight);
+    SAL_INFO("editeng.chaining", "[OVERFLOW-CHECK] Current Text Height is " << 
nTxtHeight);
 
     sal_uInt32 nParaCount = GetParaPortions().Count();
     sal_uInt32 nFirstLineCount = GetLineCount(0);
@@ -4636,7 +4631,7 @@ void 
ImpEditEngine::ImplUpdateOverflowingParaNum(sal_uInt32 nPaperHeight)
         if ( nY > nPaperHeight /*nCurTextHeight*/ ) // found first paragraph 
overflowing
         {
             mnOverflowingPara = nPara;
-            fprintf(stderr, "[CHAINING] Setting first overflowing #Para#: 
%d\n", nPara);
+            SAL_INFO("editeng.chaining", "[CHAINING] Setting first overflowing 
#Para#: " << nPara);
             ImplUpdateOverflowingLineNum( nPaperHeight, nPara, nY-nPH);
             return;
         }
@@ -4662,13 +4657,13 @@ void 
ImpEditEngine::ImplUpdateOverflowingLineNum(sal_uInt32 nPaperHeight,
 
         // Debugging output
         if (nLine == 0) {
-            fprintf(stderr, "[CHAINING] First line has height %d\n", nLH);
+            SAL_INFO("editeng.chaining", "[CHAINING] First line has height " 
<< nLH);
         }
 
         if ( nY > nPaperHeight ) // found first line overflowing
         {
             mnOverflowingLine = nLine;
-            fprintf(stderr, "[CHAINING] Setting first overflowing -Line- to: 
%d\n", nLine);
+            SAL_INFO("editeng.chaining", "[CHAINING] Setting first overflowing 
-Line- to: " << nLine);
             return;
         }
     }
diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index 77bb66a..040bc6e 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2094,17 +2094,16 @@ NonOverflowingText *Outliner::GetNonOverflowingText() 
const
 
     // Defensive check: oveflowing para index beyond actual # of paragraphs?
     if ( nCount > GetParagraphCount()-1) {
-        fprintf(stderr,
-                "[Overflowing] Ops, trying to retrieve para %d when max index 
is %d\n",
-                nCount,
-                GetParagraphCount()-1);
+        SAL_INFO("editeng.chaining",
+                 "[Overflowing] Ops, trying to retrieve para "
+                 << nCount << " when max index is " << GetParagraphCount()-1 );
         return NULL;
     }
 
      if (nCount < 0)
      {
-        fprintf(stderr,
-                "[Overflowing] No Overflowing text but GetNonOverflowinText 
called?!\n");
+        SAL_INFO("editeng.chaining",
+                 "[Overflowing] No Overflowing text but GetNonOverflowinText 
called?!");
         return NULL;
      }
 
@@ -2202,10 +2201,10 @@ OverflowingText *Outliner::GetOverflowingText() const
 
     // Defensive check: oveflowing para index beyond actual # of paragraphs?
     if ( pEditEngine->GetOverflowingParaNum() > GetParagraphCount()-1) {
-        fprintf(stderr,
-                "[Overflowing] Ops, trying to retrieve para %d when max index 
is %d\n",
-                pEditEngine->GetOverflowingParaNum(),
-                GetParagraphCount()-1);
+        SAL_INFO("editeng.chaining",
+                 "[Overflowing] Ops, trying to retrieve para "
+                 << pEditEngine->GetOverflowingParaNum() << " when max index 
is "
+                 << GetParagraphCount()-1 );
         return NULL;
     }
 
diff --git a/editeng/source/outliner/overflowingtxt.cxx 
b/editeng/source/outliner/overflowingtxt.cxx
index 60120e5..0993e37 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -19,7 +19,6 @@
 
 #include "rtl/ustring.hxx"
 #include "tools/debug.hxx"
-#include "sal/info.hxx"
 
 #include "editeng/overflowingtxt.hxx"
 #include "editeng/outliner.hxx"
@@ -158,11 +157,9 @@ bool NonOverflowingText::IsLastParaInterrupted() const
 OutlinerParaObject *NonOverflowingText::RemoveOverflowingText(Outliner 
*pOutliner) const
 {
     pOutliner->QuickDelete(maContentSel);
-    fprintf(stderr, "Deleting selection from (Para: %d, Pos: %d) to (Para: %d, 
Pos: %d)\n",
-            maContentSel.nStartPara,
-            maContentSel.nStartPos,
-            maContentSel.nEndPara,
-            maContentSel.nEndPos);
+    SAL_INFO("editeng.chaining", "Deleting selection from (Para: " << 
maContentSel.nStartPara
+             << ", Pos: " << maContentSel.nStartPos << ") to (Para: " << 
maContentSel.nEndPara
+             << ", Pos: " << maContentSel.nEndPos << ")");
     return pOutliner->CreateParaObject();
 }
 
@@ -213,10 +210,10 @@ OutlinerParaObject 
*OFlowChainedText::InsertOverflowingText(Outliner *pOutliner,
         return NULL;
 
     if (mbIsDeepMerge) {
-        fprintf(stderr, "[TEXTCHAINFLOW - OF] Deep merging paras\n" );
+        SAL_INFO("editeng.chaining", "[TEXTCHAINFLOW - OF] Deep merging paras" 
);
         return mpOverflowingTxt->DeeplyMergeParaObject(pOutliner, 
pTextToBeMerged );
     } else {
-        fprintf(stderr, "[TEXTCHAINFLOW - OF] Juxtaposing paras\n" );
+        SAL_INFO("editeng.chaining", "[TEXTCHAINFLOW - OF] Juxtaposing paras" 
);
         return mpOverflowingTxt->JuxtaposeParaObject(pOutliner, 
pTextToBeMerged );
     }
 }
@@ -249,11 +246,11 @@ OutlinerParaObject 
*UFlowChainedText::CreateMergedUnderflowParaObject(Outliner *
     OutlinerParaObject *pNewText = NULL;
 
     if (mbIsDeepMerge) {
-        fprintf(stderr, "[TEXTCHAINFLOW - UF] Deep merging paras\n" );
+        SAL_INFO("editeng.chaining", "[TEXTCHAINFLOW - UF] Deep merging paras" 
);
         pNewText = TextChainingUtils::DeeplyMergeParaObject(mxUnderflowingTxt, 
pOutl, pNextLinkWholeText);
     } else {
         // NewTextForCurBox = Txt(CurBox) ++ Txt(NextBox)
-        fprintf(stderr, "[TEXTCHAINFLOW - UF] Juxtaposing paras\n" );
+        SAL_INFO("editeng.chaining", "[TEXTCHAINFLOW - UF] Juxtaposing paras" 
);
         pNewText = TextChainingUtils::JuxtaposeParaObject(mxUnderflowingTxt, 
pOutl, pNextLinkWholeText);
     }
 
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 19f1b46..7b4e59a 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -546,7 +546,7 @@ void SdrObjEditView::ImpChainingEventHdl()
             pTextChain->SetNilChainingEvent(pTextObj, false);
         } else {
             // XXX
-            fprintf(stderr, "[OnChaining] No Edit Outliner View\n");
+            SAL_INFO("svx.chaining", "[OnChaining] No Edit Outliner View");
         }
     }
 
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 55948aa..cc3f479 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -2020,7 +2020,7 @@ void ImpUpdateChainLinks(SdrTextObj *pTextObj, OUString 
aNextLinkName)
     SdrTextObj *pNextTextObj = dynamic_cast< SdrTextObj * >
                                 (ImpGetObjByName(pPage, aNextLinkName));
     if (!pNextTextObj) {
-        fprintf(stderr, "[CHAINING] Can't find object as next link.\n");
+        SAL_INFO("svx.chaining", "[CHAINING] Can't find object as next link.");
         return;
     }
 
@@ -2061,25 +2061,21 @@ void SdrTextObj::onChainingEvent()
     EditingTextChainFlow aTxtChainFlow(this);
     aTxtChainFlow.CheckForFlowEvents(pEdtOutl);
 
-
     if (aTxtChainFlow.IsOverflow()) {
-        fprintf(stderr, "[CHAINING] Overflow going on\n");
+        SAL_INFO("svx.chaining", "[CHAINING] Overflow going on");
         // One outliner is for non-overflowing text, the other for overflowing 
text
         // We remove text directly from the editing outliner
         aTxtChainFlow.ExecuteOverflow(pEdtOutl, &aDrawOutliner);
     } else if (aTxtChainFlow.IsUnderflow()) {
-        fprintf(stderr, "[CHAINING] Underflow going on\n");
+        SAL_INFO("svx.chaining", "[CHAINING] Underflow going on");
         // underflow-induced overflow
         aTxtChainFlow.ExecuteUnderflow(&aDrawOutliner);
         bool bIsOverflowFromUnderflow = aTxtChainFlow.IsOverflow();
         // handle overflow
         if (bIsOverflowFromUnderflow) {
-            fprintf(stderr, "[CHAINING] Overflow going on (underflow 
induced)\n");
+            SAL_INFO("svx.chaining", "[CHAINING] Overflow going on (underflow 
induced)");
             // prevents infinite loops when setting text for editing outliner
-
-
             aTxtChainFlow.ExecuteOverflow(&aDrawOutliner, &aDrawOutliner);
-
         }
     }
 }
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index be19e39..3ad8f71 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1425,7 +1425,7 @@ void 
SdrTextObj::impHandleChainingEventsDuringDecomposition(SdrOutliner &rOutlin
         SdrTextObj *pCurObj = (SdrTextObj *) pPage->GetObj(i);
 
         if (pCurObj == this) {
-            fprintf(stderr, "Working on TextBox %d\n", i);
+            SAL_INFO("svx.chaining", "Working on TextBox " << i);
             break;
         }
     }
diff --git a/svx/source/svdraw/textchainflow.cxx 
b/svx/source/svdraw/textchainflow.cxx
index 3286b86..71d4649 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -28,7 +28,7 @@
 TextChainFlow::TextChainFlow(SdrTextObj *pChainTarget)
     : mpTargetLink(pChainTarget)
 {
-    fprintf(stderr, "\n[TEXTCHAINFLOW] Creating a new TextChainFlow\n");
+    SAL_INFO("svx.chaining", "[TEXTCHAINFLOW] Creating a new TextChainFlow");
 
     mpTextChain = mpTargetLink->GetTextChain();
     mpNextLink = mpTargetLink->GetNextLinkInChain();
@@ -205,7 +205,8 @@ void 
TextChainFlow::impLeaveOnlyNonOverflowingText(SdrOutliner *pNonOverflOutl)
 {
     OutlinerParaObject *pNewText = 
mpOverflChText->RemoveOverflowingText(pNonOverflOutl);
 
-    fprintf(stderr, "[TEXTCHAINFLOW - OF] SOURCE box set to %d paras \n", 
pNewText->GetTextObject().GetParagraphCount());
+    SAL_INFO("svx.chaining", "[TEXTCHAINFLOW - OF] SOURCE box set to "
+             << pNewText->GetTextObject().GetParagraphCount() << " paras");
 
     // adds it to current outliner anyway (useful in static decomposition)
     pNonOverflOutl->SetText(*pNewText);
@@ -221,20 +222,22 @@ void 
TextChainFlow::impMoveChainedTextToNextLink(SdrOutliner *pOverflOutl)
 {
     // prevent copying text in same box
     if ( mpNextLink ==  mpTargetLink ) {
-        fprintf(stderr, "[CHAINING] Trying to copy text for next link in same 
object\n");
+        SAL_INFO("svx.chaining", "[CHAINING] Trying to copy text for next link 
in same object");
         return;
     }
 
     OutlinerParaObject *pNewText =
         mpOverflChText->InsertOverflowingText(pOverflOutl,
                                               
mpNextLink->GetOutlinerParaObject());
-    fprintf(stderr, "[TEXTCHAINFLOW - OF] DEST box set to %d paras \n", 
pNewText->GetTextObject().GetParagraphCount());
+    SAL_INFO("svx.chaining", "[TEXTCHAINFLOW - OF] DEST box set to "
+             << pNewText->GetTextObject().GetParagraphCount() << " paras");
 
     if (pNewText)
         mpNextLink->NbcSetOutlinerParaObject(pNewText);
 
     // Set Deep Merge status
-    fprintf(stderr, "[DEEPMERGE] Setting deepMerge to %d\n", 
mpOverflChText->IsLastParaInterrupted());
+    SAL_INFO("svx.chaining", "[DEEPMERGE] Setting deepMerge to "
+             << mpOverflChText->IsLastParaInterrupted());
     GetTextChain()->SetIsPartOfLastParaInNextLink(
                           mpTargetLink,
                           mpOverflChText->IsLastParaInterrupted());
@@ -284,7 +287,7 @@ UFlowChainedText *TextChainFlow::GetUnderflowChainedText() 
const
 EditingTextChainFlow::EditingTextChainFlow(SdrTextObj *pLinkTarget) :
     TextChainFlow(pLinkTarget)
 {
-    fprintf(stderr, "[TEXTCHAINFLOW] Creating a new EditingTextChainFlow\n");
+    SAL_INFO("svx.chaining", "[TEXTCHAINFLOW] Creating a new 
EditingTextChainFlow");
 }
 
 void EditingTextChainFlow::CheckForFlowEvents(SdrOutliner *pFlowOutl)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to