summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2015-09-20 01:42:12 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-09-20 13:05:16 +0200
commit3a3c68aeafb1ed3c02dd863112d49e61727cf84c (patch)
tree79161a7c633a70f5396eef8f937da90e76903e3f /editeng
parent04bc1bd40c57a815cd25c61401c4b710d77edcf8 (diff)
chained editeng: Convert fprintf to SAL_INFO
Change-Id: I8e0cfedd34d7e0d70a30147a3bbf0f1cd8e6d3cc
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx17
-rw-r--r--editeng/source/outliner/outliner.cxx19
-rw-r--r--editeng/source/outliner/overflowingtxt.cxx17
3 files changed, 22 insertions, 31 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 2298ecc3925e..aef05f567642 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);
@@ -4638,7 +4633,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;
}
@@ -4664,13 +4659,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 f0c982fa520f..1f077c2ab462 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2081,17 +2081,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;
}
@@ -2189,10 +2188,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 60120e531ca1..0993e3751523 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);
}