sal_Bool to bool
Change-Id: I5bc7eba1ba17162916c016218b8e5f43627ce047
This commit is contained in:
@@ -749,8 +749,8 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
|
|||||||
Rectangle aRect = pItem->maRect;
|
Rectangle aRect = pItem->maRect;
|
||||||
long nLeftBottom = aRect.Bottom();
|
long nLeftBottom = aRect.Bottom();
|
||||||
long nRightBottom = aRect.Bottom();
|
long nRightBottom = aRect.Bottom();
|
||||||
sal_Bool bLeftBorder = sal_True;
|
bool bLeftBorder = true;
|
||||||
sal_Bool bRightBorder = sal_True;
|
bool bRightBorder = true;
|
||||||
sal_uInt16 nOff;
|
sal_uInt16 nOff;
|
||||||
sal_Bool bNativeOK = sal_False;
|
sal_Bool bNativeOK = sal_False;
|
||||||
|
|
||||||
@@ -777,10 +777,10 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
|
|||||||
{
|
{
|
||||||
aLeftTestPos.X() -= 2;
|
aLeftTestPos.X() -= 2;
|
||||||
if ( rCurRect.IsInside( aLeftTestPos ) )
|
if ( rCurRect.IsInside( aLeftTestPos ) )
|
||||||
bLeftBorder = sal_False;
|
bLeftBorder = false;
|
||||||
aRightTestPos.X() += 2;
|
aRightTestPos.X() += 2;
|
||||||
if ( rCurRect.IsInside( aRightTestPos ) )
|
if ( rCurRect.IsInside( aRightTestPos ) )
|
||||||
bRightBorder = sal_False;
|
bRightBorder = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1068,11 +1068,11 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
|
|||||||
// increased to avoid round corners that might be drawn by a theme
|
// increased to avoid round corners that might be drawn by a theme
|
||||||
// in this case we're only interested in the top border of the tabpage because the tabitems are used
|
// in this case we're only interested in the top border of the tabpage because the tabitems are used
|
||||||
// standalone (eg impress)
|
// standalone (eg impress)
|
||||||
sal_Bool bNoTabPage = sal_False;
|
bool bNoTabPage = false;
|
||||||
TabPage* pCurPage = pCurItem ? pCurItem->mpTabPage : NULL;
|
TabPage* pCurPage = pCurItem ? pCurItem->mpTabPage : NULL;
|
||||||
if( !pCurPage || !pCurPage->IsVisible() )
|
if( !pCurPage || !pCurPage->IsVisible() )
|
||||||
{
|
{
|
||||||
bNoTabPage = sal_True;
|
bNoTabPage = true;
|
||||||
aRect.Left()-=10;
|
aRect.Left()-=10;
|
||||||
aRect.Right()+=10;
|
aRect.Right()+=10;
|
||||||
}
|
}
|
||||||
@@ -1426,7 +1426,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
|
|||||||
if( (mpTabCtrlData->mpListBox == NULL) && (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) )
|
if( (mpTabCtrlData->mpListBox == NULL) && (rCEvt.GetCommand() == COMMAND_CONTEXTMENU) && (GetPageCount() > 1) )
|
||||||
{
|
{
|
||||||
Point aMenuPos;
|
Point aMenuPos;
|
||||||
sal_Bool bMenu;
|
bool bMenu;
|
||||||
if ( rCEvt.IsMouseEvent() )
|
if ( rCEvt.IsMouseEvent() )
|
||||||
{
|
{
|
||||||
aMenuPos = rCEvt.GetMousePosPixel();
|
aMenuPos = rCEvt.GetMousePosPixel();
|
||||||
@@ -1435,7 +1435,7 @@ void TabControl::Command( const CommandEvent& rCEvt )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
aMenuPos = ImplGetTabRect( GetPagePos( mnCurPageId ) ).Center();
|
aMenuPos = ImplGetTabRect( GetPagePos( mnCurPageId ) ).Center();
|
||||||
bMenu = sal_True;
|
bMenu = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( bMenu )
|
if ( bMenu )
|
||||||
|
@@ -73,14 +73,14 @@ void TextCharAttribList::InsertAttrib( TextCharAttrib* pAttrib )
|
|||||||
|
|
||||||
const sal_uInt16 nCount = size();
|
const sal_uInt16 nCount = size();
|
||||||
const sal_uInt16 nStart = pAttrib->GetStart(); // maybe better for Comp.Opt.
|
const sal_uInt16 nStart = pAttrib->GetStart(); // maybe better for Comp.Opt.
|
||||||
sal_Bool bInserted = sal_False;
|
bool bInserted = false;
|
||||||
for ( sal_uInt16 x = 0; x < nCount; x++ )
|
for ( sal_uInt16 x = 0; x < nCount; x++ )
|
||||||
{
|
{
|
||||||
TextCharAttrib* pCurAttrib = GetAttrib( x );
|
TextCharAttrib* pCurAttrib = GetAttrib( x );
|
||||||
if ( pCurAttrib->GetStart() > nStart )
|
if ( pCurAttrib->GetStart() > nStart )
|
||||||
{
|
{
|
||||||
insert( begin() + x, pAttrib );
|
insert( begin() + x, pAttrib );
|
||||||
bInserted = sal_True;
|
bInserted = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,7 +197,7 @@ void TextNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew )
|
|||||||
if ( !nNew )
|
if ( !nNew )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sal_Bool bResort = sal_False;
|
bool bResort = false;
|
||||||
sal_uInt16 nAttribs = maCharAttribs.Count();
|
sal_uInt16 nAttribs = maCharAttribs.Count();
|
||||||
for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
|
for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
|
||||||
{
|
{
|
||||||
@@ -228,7 +228,7 @@ void TextNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew )
|
|||||||
pAttrib->Expand( nNew );
|
pAttrib->Expand( nNew );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bResort = sal_True;
|
bResort = true;
|
||||||
}
|
}
|
||||||
// 2: attribute starts before and reaches past the index
|
// 2: attribute starts before and reaches past the index
|
||||||
else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
|
else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
|
||||||
@@ -261,13 +261,13 @@ void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted )
|
|||||||
if ( !nDeleted )
|
if ( !nDeleted )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sal_Bool bResort = sal_False;
|
bool bResort = false;
|
||||||
sal_uInt16 nEndChanges = nIndex+nDeleted;
|
sal_uInt16 nEndChanges = nIndex+nDeleted;
|
||||||
|
|
||||||
for ( sal_uInt16 nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
|
for ( sal_uInt16 nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
|
||||||
{
|
{
|
||||||
TextCharAttrib* pAttrib = maCharAttribs.GetAttrib( nAttr );
|
TextCharAttrib* pAttrib = maCharAttribs.GetAttrib( nAttr );
|
||||||
sal_Bool bDelAttr = sal_False;
|
bool bDelAttr = false;
|
||||||
if ( pAttrib->GetEnd() >= nIndex )
|
if ( pAttrib->GetEnd() >= nIndex )
|
||||||
{
|
{
|
||||||
// move all attributes that are behind the cursor
|
// move all attributes that are behind the cursor
|
||||||
@@ -283,7 +283,7 @@ void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted )
|
|||||||
if ( ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) )
|
if ( ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) )
|
||||||
pAttrib->GetEnd() = nIndex; // empty
|
pAttrib->GetEnd() = nIndex; // empty
|
||||||
else
|
else
|
||||||
bDelAttr = sal_True;
|
bDelAttr = true;
|
||||||
}
|
}
|
||||||
// 2. attribute starts before, ends inside or after
|
// 2. attribute starts before, ends inside or after
|
||||||
else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
|
else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
|
||||||
@@ -306,7 +306,7 @@ void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted )
|
|||||||
DBG_ASSERT( ( pAttrib->GetEnd() <= maText.Len()) || bDelAttr, "Collaps: Attrib groesser als Absatz!" );
|
DBG_ASSERT( ( pAttrib->GetEnd() <= maText.Len()) || bDelAttr, "Collaps: Attrib groesser als Absatz!" );
|
||||||
if ( bDelAttr /* || pAttrib->IsEmpty() */ )
|
if ( bDelAttr /* || pAttrib->IsEmpty() */ )
|
||||||
{
|
{
|
||||||
bResort = sal_True;
|
bResort = true;
|
||||||
maCharAttribs.RemoveAttrib( nAttr );
|
maCharAttribs.RemoveAttrib( nAttr );
|
||||||
delete pAttrib;
|
delete pAttrib;
|
||||||
nAttr--;
|
nAttr--;
|
||||||
@@ -403,7 +403,7 @@ void TextNode::Append( const TextNode& rNode )
|
|||||||
for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
|
for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
|
||||||
{
|
{
|
||||||
TextCharAttrib* pAttrib = rNode.GetCharAttribs().GetAttrib( nAttr );
|
TextCharAttrib* pAttrib = rNode.GetCharAttribs().GetAttrib( nAttr );
|
||||||
sal_Bool bMelted = sal_False;
|
bool bMelted = false;
|
||||||
if ( pAttrib->GetStart() == 0 )
|
if ( pAttrib->GetStart() == 0 )
|
||||||
{
|
{
|
||||||
// potentially merge attributes
|
// potentially merge attributes
|
||||||
@@ -419,7 +419,7 @@ void TextNode::Append( const TextNode& rNode )
|
|||||||
{
|
{
|
||||||
pTmpAttrib->GetEnd() =
|
pTmpAttrib->GetEnd() =
|
||||||
pTmpAttrib->GetEnd() + pAttrib->GetLen();
|
pTmpAttrib->GetEnd() + pAttrib->GetLen();
|
||||||
bMelted = sal_True;
|
bMelted = true;
|
||||||
break; // there can be only one of this type at this position
|
break; // there can be only one of this type at this position
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -677,7 +677,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
|
|||||||
sal_Bool bDoOverwrite = ( bOverwrite &&
|
sal_Bool bDoOverwrite = ( bOverwrite &&
|
||||||
( aPaM.GetIndex() < pNode->GetText().Len() ) ) ? sal_True : sal_False;
|
( aPaM.GetIndex() < pNode->GetText().Len() ) ) ? sal_True : sal_False;
|
||||||
|
|
||||||
sal_Bool bUndoAction = ( rCurSel.HasRange() || bDoOverwrite );
|
bool bUndoAction = ( rCurSel.HasRange() || bDoOverwrite );
|
||||||
|
|
||||||
if ( bUndoAction )
|
if ( bUndoAction )
|
||||||
UndoActionStart();
|
UndoActionStart();
|
||||||
@@ -846,7 +846,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndin
|
|||||||
InsertUndo( new TextUndoSplitPara( this, rPaM.GetPara(), rPaM.GetIndex() ) );
|
InsertUndo( new TextUndoSplitPara( this, rPaM.GetPara(), rPaM.GetIndex() ) );
|
||||||
|
|
||||||
TextNode* pNode = mpDoc->GetNodes().GetObject( rPaM.GetPara() );
|
TextNode* pNode = mpDoc->GetNodes().GetObject( rPaM.GetPara() );
|
||||||
sal_Bool bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().Len();
|
bool bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().Len();
|
||||||
|
|
||||||
TextPaM aPaM( mpDoc->InsertParaBreak( rPaM, bKeepEndingAttribs ) );
|
TextPaM aPaM( mpDoc->InsertParaBreak( rPaM, bKeepEndingAttribs ) );
|
||||||
|
|
||||||
@@ -1563,7 +1563,7 @@ void TextEngine::FormatDoc()
|
|||||||
mbHasMultiLineParas = sal_False;
|
mbHasMultiLineParas = sal_False;
|
||||||
|
|
||||||
long nY = 0;
|
long nY = 0;
|
||||||
sal_Bool bGrow = sal_False;
|
bool bGrow = false;
|
||||||
|
|
||||||
maInvalidRect = Rectangle(); // clear
|
maInvalidRect = Rectangle(); // clear
|
||||||
for ( sal_uLong nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
|
for ( sal_uLong nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
|
||||||
@@ -1578,7 +1578,7 @@ void TextEngine::FormatDoc()
|
|||||||
ImpFormattingParagraph( nPara );
|
ImpFormattingParagraph( nPara );
|
||||||
|
|
||||||
if ( CreateLines( nPara ) )
|
if ( CreateLines( nPara ) )
|
||||||
bGrow = sal_True;
|
bGrow = true;
|
||||||
|
|
||||||
// set InvalidRect only once
|
// set InvalidRect only once
|
||||||
if ( maInvalidRect.IsEmpty() )
|
if ( maInvalidRect.IsEmpty() )
|
||||||
@@ -1661,13 +1661,13 @@ void TextEngine::CreateAndInsertEmptyLine( sal_uLong nPara )
|
|||||||
else
|
else
|
||||||
pTmpLine->SetStartX( mpDoc->GetLeftMargin() );
|
pTmpLine->SetStartX( mpDoc->GetLeftMargin() );
|
||||||
|
|
||||||
sal_Bool bLineBreak = pNode->GetText().Len() ? sal_True : sal_False;
|
bool bLineBreak = pNode->GetText().Len() ? true : false;
|
||||||
|
|
||||||
TETextPortion* pDummyPortion = new TETextPortion( 0 );
|
TETextPortion* pDummyPortion = new TETextPortion( 0 );
|
||||||
pDummyPortion->GetWidth() = 0;
|
pDummyPortion->GetWidth() = 0;
|
||||||
pTEParaPortion->GetTextPortions().push_back( pDummyPortion );
|
pTEParaPortion->GetTextPortions().push_back( pDummyPortion );
|
||||||
|
|
||||||
if ( bLineBreak == sal_True )
|
if ( bLineBreak )
|
||||||
{
|
{
|
||||||
// -2: The new one is already inserted.
|
// -2: The new one is already inserted.
|
||||||
OSL_ENSURE(
|
OSL_ENSURE(
|
||||||
@@ -1715,8 +1715,8 @@ void TextEngine::ImpBreakLine( sal_uLong nPara, TextLine* pLine, TETextPortion*,
|
|||||||
pLine->SetEnd( nBreakPos );
|
pLine->SetEnd( nBreakPos );
|
||||||
sal_uInt16 nEndPortion = SplitTextPortion( nPara, nBreakPos );
|
sal_uInt16 nEndPortion = SplitTextPortion( nPara, nBreakPos );
|
||||||
|
|
||||||
sal_Bool bBlankSeparator = ( ( nBreakPos >= pLine->GetStart() ) &&
|
bool bBlankSeparator = ( ( nBreakPos >= pLine->GetStart() ) &&
|
||||||
( pNode->GetText().GetChar( nBreakPos ) == ' ' ) ) ? sal_True : sal_False;
|
( pNode->GetText().GetChar( nBreakPos ) == ' ' ) );
|
||||||
if ( bBlankSeparator )
|
if ( bBlankSeparator )
|
||||||
{
|
{
|
||||||
// generally suppress blanks at the end of line
|
// generally suppress blanks at the end of line
|
||||||
@@ -1962,7 +1962,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
|
|||||||
TextPaM const* pSelEnd = 0;
|
TextPaM const* pSelEnd = 0;
|
||||||
if ( pSelection && pSelection->HasRange() )
|
if ( pSelection && pSelection->HasRange() )
|
||||||
{
|
{
|
||||||
sal_Bool bInvers = pSelection->GetEnd() < pSelection->GetStart();
|
bool bInvers = pSelection->GetEnd() < pSelection->GetStart();
|
||||||
pSelStart = !bInvers ? &pSelection->GetStart() : &pSelection->GetEnd();
|
pSelStart = !bInvers ? &pSelection->GetStart() : &pSelection->GetEnd();
|
||||||
pSelEnd = bInvers ? &pSelection->GetStart() : &pSelection->GetEnd();
|
pSelEnd = bInvers ? &pSelection->GetStart() : &pSelection->GetEnd();
|
||||||
}
|
}
|
||||||
@@ -2046,7 +2046,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool bDone = sal_False;
|
bool bDone = false;
|
||||||
if ( pSelStart )
|
if ( pSelStart )
|
||||||
{
|
{
|
||||||
// is a part of it in the selection?
|
// is a part of it in the selection?
|
||||||
@@ -2089,7 +2089,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
|
|||||||
aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, pLine, nTmpIndex, nTmpIndex+nL );
|
aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, pLine, nTmpIndex, nTmpIndex+nL );
|
||||||
pOutDev->DrawText( aPos, pPortion->GetNode()->GetText(), nTmpIndex, nEnd-nTmpIndex );
|
pOutDev->DrawText( aPos, pPortion->GetNode()->GetText(), nTmpIndex, nEnd-nTmpIndex );
|
||||||
}
|
}
|
||||||
bDone = sal_True;
|
bDone = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !bDone )
|
if ( !bDone )
|
||||||
@@ -2107,7 +2107,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
|
|||||||
if ( pSelStart || pPaintRange )
|
if ( pSelStart || pPaintRange )
|
||||||
{
|
{
|
||||||
Rectangle aTabArea( aTmpPos, Point( aTmpPos.X()+nTxtWidth, aTmpPos.Y()+mnCharHeight-1 ) );
|
Rectangle aTabArea( aTmpPos, Point( aTmpPos.X()+nTxtWidth, aTmpPos.Y()+mnCharHeight-1 ) );
|
||||||
sal_Bool bDone = sal_False;
|
bool bDone = false;
|
||||||
if ( pSelStart )
|
if ( pSelStart )
|
||||||
{
|
{
|
||||||
// is the Tab in the Selection???
|
// is the Tab in the Selection???
|
||||||
@@ -2119,7 +2119,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
|
|||||||
pOutDev->SetFillColor( rStyleSettings.GetHighlightColor() );
|
pOutDev->SetFillColor( rStyleSettings.GetHighlightColor() );
|
||||||
pOutDev->DrawRect( aTabArea );
|
pOutDev->DrawRect( aTabArea );
|
||||||
pOutDev->SetFillColor( aOldColor );
|
pOutDev->SetFillColor( aOldColor );
|
||||||
bDone = sal_True;
|
bDone = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !bDone )
|
if ( !bDone )
|
||||||
@@ -2189,7 +2189,7 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
const short nInvalidDiff = pTEParaPortion->GetInvalidDiff();
|
const short nInvalidDiff = pTEParaPortion->GetInvalidDiff();
|
||||||
const sal_uInt16 nInvalidStart = pTEParaPortion->GetInvalidPosStart();
|
const sal_uInt16 nInvalidStart = pTEParaPortion->GetInvalidPosStart();
|
||||||
const sal_uInt16 nInvalidEnd = nInvalidStart + std::abs( nInvalidDiff );
|
const sal_uInt16 nInvalidEnd = nInvalidStart + std::abs( nInvalidDiff );
|
||||||
sal_Bool bQuickFormat = sal_False;
|
bool bQuickFormat = false;
|
||||||
|
|
||||||
if ( pTEParaPortion->GetWritingDirectionInfos().empty() )
|
if ( pTEParaPortion->GetWritingDirectionInfos().empty() )
|
||||||
ImpInitWritingDirections( nPara );
|
ImpInitWritingDirections( nPara );
|
||||||
@@ -2198,14 +2198,14 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
{
|
{
|
||||||
if ( pTEParaPortion->IsSimpleInvalid() && ( nInvalidDiff > 0 ) )
|
if ( pTEParaPortion->IsSimpleInvalid() && ( nInvalidDiff > 0 ) )
|
||||||
{
|
{
|
||||||
bQuickFormat = sal_True;
|
bQuickFormat = true;
|
||||||
}
|
}
|
||||||
else if ( ( pTEParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff < 0 ) )
|
else if ( ( pTEParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff < 0 ) )
|
||||||
{
|
{
|
||||||
// check if deleting across Portion border
|
// check if deleting across Portion border
|
||||||
sal_uInt16 nStart = nInvalidStart; // duplicate!!!
|
sal_uInt16 nStart = nInvalidStart; // duplicate!!!
|
||||||
sal_uInt16 nEnd = nStart - nInvalidDiff; // neg.
|
sal_uInt16 nEnd = nStart - nInvalidDiff; // neg.
|
||||||
bQuickFormat = sal_True;
|
bQuickFormat = true;
|
||||||
sal_uInt16 nPos = 0;
|
sal_uInt16 nPos = 0;
|
||||||
sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().size();
|
sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().size();
|
||||||
for ( sal_uInt16 nTP = 0; nTP < nPortions; nTP++ )
|
for ( sal_uInt16 nTP = 0; nTP < nPortions; nTP++ )
|
||||||
@@ -2215,7 +2215,7 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
nPos = nPos + pTP->GetLen();
|
nPos = nPos + pTP->GetLen();
|
||||||
if ( ( nPos > nStart ) && ( nPos < nEnd ) )
|
if ( ( nPos > nStart ) && ( nPos < nEnd ) )
|
||||||
{
|
{
|
||||||
bQuickFormat = sal_False;
|
bQuickFormat = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2250,18 +2250,18 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
|
|
||||||
// format all lines starting here
|
// format all lines starting here
|
||||||
size_t nDelFromLine = std::numeric_limits<size_t>::max();
|
size_t nDelFromLine = std::numeric_limits<size_t>::max();
|
||||||
sal_Bool bLineBreak = sal_False;
|
bool bLineBreak = false;
|
||||||
|
|
||||||
sal_uInt16 nIndex = pLine->GetStart();
|
sal_uInt16 nIndex = pLine->GetStart();
|
||||||
TextLine aSaveLine( *pLine );
|
TextLine aSaveLine( *pLine );
|
||||||
|
|
||||||
Font aFont;
|
Font aFont;
|
||||||
|
|
||||||
sal_Bool bCalcPortion = sal_True;
|
bool bCalcPortion = true;
|
||||||
|
|
||||||
while ( nIndex < pNode->GetText().Len() )
|
while ( nIndex < pNode->GetText().Len() )
|
||||||
{
|
{
|
||||||
sal_Bool bEOL = sal_False;
|
bool bEOL = false;
|
||||||
sal_uInt16 nPortionStart = 0;
|
sal_uInt16 nPortionStart = 0;
|
||||||
sal_uInt16 nPortionEnd = 0;
|
sal_uInt16 nPortionEnd = 0;
|
||||||
|
|
||||||
@@ -2275,8 +2275,8 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
|
|
||||||
// search for Portion that does not fit anymore into line
|
// search for Portion that does not fit anymore into line
|
||||||
TETextPortion* pPortion = 0;
|
TETextPortion* pPortion = 0;
|
||||||
sal_Bool bBrokenLine = sal_False;
|
bool bBrokenLine = false;
|
||||||
bLineBreak = sal_False;
|
bLineBreak = false;
|
||||||
|
|
||||||
while ( ( nTmpWidth <= nXWidth ) && !bEOL && ( nTmpPortion < pTEParaPortion->GetTextPortions().size() ) )
|
while ( ( nTmpWidth <= nXWidth ) && !bEOL && ( nTmpPortion < pTEParaPortion->GetTextPortions().size() ) )
|
||||||
{
|
{
|
||||||
@@ -2294,8 +2294,8 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
// adjust Tab
|
// adjust Tab
|
||||||
pPortion->GetWidth() = nXWidth-1;
|
pPortion->GetWidth() = nXWidth-1;
|
||||||
nTmpWidth = pPortion->GetWidth();
|
nTmpWidth = pPortion->GetWidth();
|
||||||
bEOL = sal_True;
|
bEOL = true;
|
||||||
bBrokenLine = sal_True;
|
bBrokenLine = true;
|
||||||
}
|
}
|
||||||
pPortion->GetKind() = PORTIONKIND_TAB;
|
pPortion->GetKind() = PORTIONKIND_TAB;
|
||||||
}
|
}
|
||||||
@@ -2316,25 +2316,25 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this was perhaps one Portion too far
|
// this was perhaps one Portion too far
|
||||||
sal_Bool bFixedEnd = sal_False;
|
bool bFixedEnd = false;
|
||||||
if ( nTmpWidth > nXWidth )
|
if ( nTmpWidth > nXWidth )
|
||||||
{
|
{
|
||||||
nPortionEnd = nTmpPos;
|
nPortionEnd = nTmpPos;
|
||||||
nTmpPos = nTmpPos - pPortion->GetLen();
|
nTmpPos = nTmpPos - pPortion->GetLen();
|
||||||
nPortionStart = nTmpPos;
|
nPortionStart = nTmpPos;
|
||||||
nTmpPortion--;
|
nTmpPortion--;
|
||||||
bEOL = sal_False;
|
bEOL = false;
|
||||||
|
|
||||||
nTmpWidth -= pPortion->GetWidth();
|
nTmpWidth -= pPortion->GetWidth();
|
||||||
if ( pPortion->GetKind() == PORTIONKIND_TAB )
|
if ( pPortion->GetKind() == PORTIONKIND_TAB )
|
||||||
{
|
{
|
||||||
bEOL = sal_True;
|
bEOL = true;
|
||||||
bFixedEnd = sal_True;
|
bFixedEnd = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bEOL = sal_True;
|
bEOL = true;
|
||||||
pLine->SetEnd( nPortionEnd );
|
pLine->SetEnd( nPortionEnd );
|
||||||
OSL_ENSURE(pTEParaPortion->GetTextPortions().size(),
|
OSL_ENSURE(pTEParaPortion->GetTextPortions().size(),
|
||||||
"CreateLines: No TextPortions?");
|
"CreateLines: No TextPortions?");
|
||||||
@@ -2410,7 +2410,7 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
pLine->SetValid();
|
pLine->SetValid();
|
||||||
if ( bCalcPortion && bQuickFormat )
|
if ( bCalcPortion && bQuickFormat )
|
||||||
{
|
{
|
||||||
bCalcPortion = sal_False;
|
bCalcPortion = false;
|
||||||
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
|
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2423,7 +2423,7 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
// the text width does not have to be recalculated.
|
// the text width does not have to be recalculated.
|
||||||
if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
|
if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
|
||||||
{
|
{
|
||||||
bCalcPortion = sal_False;
|
bCalcPortion = false;
|
||||||
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
|
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2473,7 +2473,7 @@ sal_Bool TextEngine::CreateLines( sal_uLong nPara )
|
|||||||
|
|
||||||
DBG_ASSERT( pTEParaPortion->GetLines().size(), "CreateLines: No Line!" );
|
DBG_ASSERT( pTEParaPortion->GetLines().size(), "CreateLines: No Line!" );
|
||||||
|
|
||||||
if ( bLineBreak == sal_True )
|
if ( bLineBreak )
|
||||||
CreateAndInsertEmptyLine( nPara );
|
CreateAndInsertEmptyLine( nPara );
|
||||||
|
|
||||||
pTEParaPortion->SetValid();
|
pTEParaPortion->SetValid();
|
||||||
|
@@ -129,7 +129,7 @@ uno::Any TETextDataObject::getTransferData( const datatransfer::DataFlavor& rFla
|
|||||||
uno::Sequence< datatransfer::DataFlavor > TETextDataObject::getTransferDataFlavors( ) throw(uno::RuntimeException)
|
uno::Sequence< datatransfer::DataFlavor > TETextDataObject::getTransferDataFlavors( ) throw(uno::RuntimeException)
|
||||||
{
|
{
|
||||||
GetHTMLStream().Seek( STREAM_SEEK_TO_END );
|
GetHTMLStream().Seek( STREAM_SEEK_TO_END );
|
||||||
sal_Bool bHTML = GetHTMLStream().Tell() > 0;
|
bool bHTML = GetHTMLStream().Tell() > 0;
|
||||||
uno::Sequence< datatransfer::DataFlavor > aDataFlavors( bHTML ? 2 : 1 );
|
uno::Sequence< datatransfer::DataFlavor > aDataFlavors( bHTML ? 2 : 1 );
|
||||||
SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aDataFlavors.getArray()[0] );
|
SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aDataFlavors.getArray()[0] );
|
||||||
if ( bHTML )
|
if ( bHTML )
|
||||||
@@ -2186,7 +2186,7 @@ void TextView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDr
|
|||||||
Point aDocPos = GetDocPos( aMousePos );
|
Point aDocPos = GetDocPos( aMousePos );
|
||||||
mpImpl->mpDDInfo->maDropPos = mpImpl->mpTextEngine->GetPaM( aDocPos );
|
mpImpl->mpDDInfo->maDropPos = mpImpl->mpTextEngine->GetPaM( aDocPos );
|
||||||
|
|
||||||
sal_Bool bProtected = sal_False;
|
bool bProtected = false;
|
||||||
if(mpImpl->mbSupportProtectAttribute)
|
if(mpImpl->mbSupportProtectAttribute)
|
||||||
{
|
{
|
||||||
const TextCharAttrib* pStartAttr = mpImpl->mpTextEngine->FindCharAttrib(
|
const TextCharAttrib* pStartAttr = mpImpl->mpTextEngine->FindCharAttrib(
|
||||||
|
@@ -41,7 +41,7 @@ private:
|
|||||||
ExtTextEngine* mpExtTextEngine;
|
ExtTextEngine* mpExtTextEngine;
|
||||||
ExtTextView* mpExtTextView;
|
ExtTextView* mpExtTextView;
|
||||||
|
|
||||||
sal_Bool mbInMBDown;
|
bool mbInMBDown;
|
||||||
sal_Bool mbFocusSelectionHide;
|
sal_Bool mbFocusSelectionHide;
|
||||||
sal_Bool mbIgnoreTab;
|
sal_Bool mbIgnoreTab;
|
||||||
sal_Bool mbActivePopup;
|
sal_Bool mbActivePopup;
|
||||||
@@ -168,14 +168,14 @@ ImpVclMEdit::ImpVclMEdit( VclMultiLineEdit* pEdt, WinBits nWinStyle )
|
|||||||
|
|
||||||
void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
|
void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
|
||||||
{
|
{
|
||||||
const sal_Bool bHaveVScroll = (NULL != mpVScrollBar);
|
const bool bHaveVScroll = (NULL != mpVScrollBar);
|
||||||
const sal_Bool bHaveHScroll = (NULL != mpHScrollBar);
|
const bool bHaveHScroll = (NULL != mpHScrollBar);
|
||||||
const sal_Bool bHaveScrollBox = (NULL != mpScrollBox);
|
const bool bHaveScrollBox = (NULL != mpScrollBox);
|
||||||
|
|
||||||
sal_Bool bNeedVScroll = ( nWinStyle & WB_VSCROLL ) == WB_VSCROLL;
|
bool bNeedVScroll = ( nWinStyle & WB_VSCROLL ) == WB_VSCROLL;
|
||||||
const sal_Bool bNeedHScroll = ( nWinStyle & WB_HSCROLL ) == WB_HSCROLL;
|
const bool bNeedHScroll = ( nWinStyle & WB_HSCROLL ) == WB_HSCROLL;
|
||||||
|
|
||||||
const sal_Bool bAutoVScroll = ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL;
|
const bool bAutoVScroll = ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL;
|
||||||
if ( !bNeedVScroll && bAutoVScroll )
|
if ( !bNeedVScroll && bAutoVScroll )
|
||||||
{
|
{
|
||||||
TextEngine& rEngine( *mpTextWindow->GetTextEngine() );
|
TextEngine& rEngine( *mpTextWindow->GetTextEngine() );
|
||||||
@@ -186,9 +186,9 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
|
|||||||
bNeedVScroll = true;
|
bNeedVScroll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sal_Bool bNeedScrollBox = bNeedVScroll && bNeedHScroll;
|
const bool bNeedScrollBox = bNeedVScroll && bNeedHScroll;
|
||||||
|
|
||||||
sal_Bool bScrollbarsChanged = false;
|
bool bScrollbarsChanged = false;
|
||||||
if ( bHaveVScroll != bNeedVScroll )
|
if ( bHaveVScroll != bNeedVScroll )
|
||||||
{
|
{
|
||||||
delete mpVScrollBar;
|
delete mpVScrollBar;
|
||||||
@@ -200,7 +200,7 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
|
|||||||
mpVScrollBar->SetScrollHdl( LINK( this, ImpVclMEdit, ScrollHdl ) );
|
mpVScrollBar->SetScrollHdl( LINK( this, ImpVclMEdit, ScrollHdl ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bScrollbarsChanged = sal_True;
|
bScrollbarsChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( bHaveHScroll != bNeedHScroll )
|
if ( bHaveHScroll != bNeedHScroll )
|
||||||
@@ -214,7 +214,7 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
|
|||||||
mpHScrollBar->SetScrollHdl( LINK( this, ImpVclMEdit, ScrollHdl ) );
|
mpHScrollBar->SetScrollHdl( LINK( this, ImpVclMEdit, ScrollHdl ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bScrollbarsChanged = sal_True;
|
bScrollbarsChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( bHaveScrollBox != bNeedScrollBox )
|
if ( bHaveScrollBox != bNeedScrollBox )
|
||||||
@@ -701,7 +701,7 @@ sal_Bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt )
|
|||||||
|
|
||||||
TextWindow::TextWindow( Window* pParent ) : Window( pParent )
|
TextWindow::TextWindow( Window* pParent ) : Window( pParent )
|
||||||
{
|
{
|
||||||
mbInMBDown = sal_False;
|
mbInMBDown = false;
|
||||||
mbFocusSelectionHide = sal_False;
|
mbFocusSelectionHide = sal_False;
|
||||||
mbIgnoreTab = sal_False;
|
mbIgnoreTab = sal_False;
|
||||||
mbActivePopup = sal_False;
|
mbActivePopup = sal_False;
|
||||||
@@ -742,11 +742,11 @@ void TextWindow::MouseButtonDown( const MouseEvent& rMEvt )
|
|||||||
if ( !mbTextSelectable )
|
if ( !mbTextSelectable )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mbInMBDown = sal_True; // so that GetFocus does not select everything
|
mbInMBDown = true; // so that GetFocus does not select everything
|
||||||
mpExtTextView->MouseButtonDown( rMEvt );
|
mpExtTextView->MouseButtonDown( rMEvt );
|
||||||
Window::MouseButtonDown( rMEvt );
|
Window::MouseButtonDown( rMEvt );
|
||||||
GrabFocus();
|
GrabFocus();
|
||||||
mbInMBDown = sal_False;
|
mbInMBDown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextWindow::MouseButtonUp( const MouseEvent& rMEvt )
|
void TextWindow::MouseButtonUp( const MouseEvent& rMEvt )
|
||||||
@@ -1329,8 +1329,8 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size&
|
|||||||
// Border/Background
|
// Border/Background
|
||||||
pDev->SetLineColor();
|
pDev->SetLineColor();
|
||||||
pDev->SetFillColor();
|
pDev->SetFillColor();
|
||||||
sal_Bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
|
bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
|
||||||
sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
|
bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
|
||||||
if ( bBorder || bBackground )
|
if ( bBorder || bBackground )
|
||||||
{
|
{
|
||||||
Rectangle aRect( aPos, aSize );
|
Rectangle aRect( aPos, aSize );
|
||||||
|
@@ -139,7 +139,7 @@ sal_Bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions&
|
|||||||
TextSelection aSel( rSel );
|
TextSelection aSel( rSel );
|
||||||
aSel.Justify();
|
aSel.Justify();
|
||||||
|
|
||||||
sal_Bool bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
|
bool bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
|
||||||
|
|
||||||
TextPaM aStartPaM( aSel.GetEnd() );
|
TextPaM aStartPaM( aSel.GetEnd() );
|
||||||
if ( aSel.HasRange() && ( ( bSearchInSelection && bForward ) || ( !bSearchInSelection && !bForward ) ) )
|
if ( aSel.HasRange() && ( ( bSearchInSelection && bForward ) || ( !bSearchInSelection && !bForward ) ) )
|
||||||
@@ -301,7 +301,7 @@ sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_
|
|||||||
// HideSelection();
|
// HideSelection();
|
||||||
TextSelection aSel;
|
TextSelection aSel;
|
||||||
|
|
||||||
sal_Bool bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
|
bool bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
|
||||||
if ( bSearchInSelection )
|
if ( bSearchInSelection )
|
||||||
{
|
{
|
||||||
aSel = GetSelection();
|
aSel = GetSelection();
|
||||||
|
Reference in New Issue
Block a user