diff options
Diffstat (limited to 'editeng/source')
24 files changed, 173 insertions, 173 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 1cf13e023548..001389b5a4fb 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -2813,7 +2813,7 @@ namespace accessibility catch (const lang::IndexOutOfBoundsException&) { // this is not the exception that should be raised in this function ... - DBG_ASSERT( 0, "unexpected exception" ); + DBG_ASSERT( false, "unexpected exception" ); } } } diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 7a0de12e8790..a581781c166a 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1343,7 +1343,7 @@ void ContentNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew, SfxItemPool // if ( pAttrib->GetStart() == nIndex ) pAttrib->Expand( nNew ); if ( pAttrib->GetStart() == 0 ) - bExpandedEmptyAtIndexNull = sal_True; + bExpandedEmptyAtIndexNull = true; } // 1: Attribute starts before, goes to index ... else if ( pAttrib->GetEnd() == nIndex ) // Start must be before @@ -1358,7 +1358,7 @@ void ContentNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew, SfxItemPool pAttrib->Expand( nNew ); } else - bResort = sal_True; + bResort = true; } // 2: Attribute starts before, goes past the Index... else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) ) @@ -1372,14 +1372,14 @@ void ContentNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew, SfxItemPool if ( pAttrib->IsFeature() ) { pAttrib->MoveForward( nNew ); - bResort = sal_True; + bResort = true; } else { bool bExpand = false; if ( nIndex == 0 ) { - bExpand = sal_True; + bExpand = true; if( bExpandedEmptyAtIndexNull ) { // Check if this kind of attribut was empty and expanded here... @@ -1474,7 +1474,7 @@ void ContentNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted, SfxIte if ( !pAttrib->IsFeature() && ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) ) pAttrib->GetEnd() = nIndex; // empty else - bDelAttr = sal_True; + bDelAttr = true; } // 2. Attribute starts earlier, ends inside or behind it ... else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) ) @@ -1492,7 +1492,7 @@ void ContentNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted, SfxIte if ( pAttrib->IsFeature() ) { pAttrib->MoveBackward( nDeleted ); - bResort = sal_True; + bResort = true; } else { @@ -2265,7 +2265,7 @@ EditPaM EditDoc::InsertText( EditPaM aPaM, const OUString& rStr ) aPaM.GetNode()->ExpandAttribs( aPaM.GetIndex(), rStr.getLength(), GetItemPool() ); aPaM.SetIndex( aPaM.GetIndex() + rStr.getLength() ); - SetModified( sal_True ); + SetModified( true ); return aPaM; } @@ -2282,7 +2282,7 @@ EditPaM EditDoc::InsertParaBreak( EditPaM aPaM, sal_Bool bKeepEndingAttribs ) ContentAttribs aContentAttribs( aPaM.GetNode()->GetContentAttribs() ); // for a new paragraph we like to have the bullet/numbering visible by default - aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_True), EE_PARA_BULLETSTATE ); + aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, true), EE_PARA_BULLETSTATE ); // ContenNode constructor copies also the paragraph attributes ContentNode* pNode = new ContentNode( aStr, aContentAttribs ); @@ -2324,7 +2324,7 @@ EditPaM EditDoc::InsertFeature( EditPaM aPaM, const SfxPoolItem& rItem ) DBG_ASSERT( pAttrib, "Why can not the feature be created?" ); aPaM.GetNode()->GetCharAttribs().InsertAttrib( pAttrib ); - SetModified( sal_True ); + SetModified( true ); aPaM.SetIndex( aPaM.GetIndex() + 1 ); return aPaM; @@ -2355,7 +2355,7 @@ EditPaM EditDoc::RemoveChars( EditPaM aPaM, sal_uInt16 nChars ) aPaM.GetNode()->Erase( aPaM.GetIndex(), nChars ); aPaM.GetNode()->CollapsAttribs( aPaM.GetIndex(), nChars, GetItemPool() ); - SetModified( sal_True ); + SetModified( true ); return aPaM; } @@ -2432,7 +2432,7 @@ sal_Bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt // Attribute starts in Selection if ( ( pAttr->GetStart() >= nStart ) && ( pAttr->GetStart() <= nEnd ) ) { - bChanged = sal_True; + bChanged = true; if ( pAttr->GetEnd() > nEnd ) { pAttr->GetStart() = nEnd; // then it starts after this @@ -2443,14 +2443,14 @@ sal_Bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) ) { // Delete feature only if on the exact spot - bRemoveAttrib = sal_True; + bRemoveAttrib = true; } } // Attribute ends in Selection else if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetEnd() <= nEnd ) ) { - bChanged = sal_True; + bChanged = true; if ( ( pAttr->GetStart() < nStart ) && !pAttr->IsFeature() ) { pAttr->GetEnd() = nStart; // then it ends here @@ -2459,13 +2459,13 @@ sal_Bool EditDoc::RemoveAttribs( ContentNode* pNode, sal_uInt16 nStart, sal_uInt else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) ) { // Delete feature only if on the exact spot - bRemoveAttrib = sal_True; + bRemoveAttrib = true; } } // Attribute overlaps the selection else if ( ( pAttr->GetStart() <= nStart ) && ( pAttr->GetEnd() >= nEnd ) ) { - bChanged = sal_True; + bChanged = true; if ( pAttr->GetStart() == nStart ) { pAttr->GetStart() = nEnd; @@ -2521,7 +2521,7 @@ void EditDoc::InsertAttrib( const SfxPoolItem& rPoolItem, ContentNode* pNode, sa DBG_ASSERT( pAttrib, "MakeCharAttrib failed!" ); pNode->GetCharAttribs().InsertAttrib( pAttrib ); - SetModified( sal_True ); + SetModified( true ); } void EditDoc::InsertAttrib( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem ) @@ -2564,7 +2564,7 @@ void EditDoc::InsertAttrib( ContentNode* pNode, sal_uInt16 nStart, sal_uInt16 nE InsertAttrib( rPoolItem, pNode, nStart, nStart ); } - SetModified( sal_True ); + SetModified( true ); } void EditDoc::FindAttribs( ContentNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet ) diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index e015bd9fe591..1ba33296193c 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1240,7 +1240,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie EditPaM aStart( pImpEditEngine->WordLeft( aCurSel.Max() ) ); aCurSel = pImpEditEngine->InsertText( EditSelection( aStart, aCurSel.Max() ), aAutoText ); - pImpEditEngine->SetAutoCompleteText( OUString(), sal_True ); + pImpEditEngine->SetAutoCompleteText( OUString(), true ); } } pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT ); @@ -1345,7 +1345,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie if( !aComplete.isEmpty() && ( ( aWord.getLength() + 1 ) < aComplete.getLength() ) ) { - pImpEditEngine->SetAutoCompleteText( aComplete, sal_False ); + pImpEditEngine->SetAutoCompleteText( aComplete, false ); Point aPos = pImpEditEngine->PaMtoEditCursor( aCurSel.Max() ).TopLeft(); aPos = pEditView->pImpEditView->GetWindowPos( aPos ); aPos = pEditView->pImpEditView->GetWindow()->LogicToPixel( aPos ); @@ -1471,7 +1471,7 @@ void EditEngine::SetText( const OUString& rText ) sal_uLong EditEngine::Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs /* = NULL */ ) { sal_Bool bUndoEnabled = pImpEditEngine->IsUndoEnabled(); - pImpEditEngine->EnableUndo( sal_False ); + pImpEditEngine->EnableUndo( false ); pImpEditEngine->SetText( OUString() ); EditPaM aPaM( pImpEditEngine->GetEditDoc().GetStartPaM() ); pImpEditEngine->Read( rInput, rBaseURL, eFormat, EditSelection( aPaM, aPaM ), pHTTPHeaderAttrs ); @@ -2351,7 +2351,7 @@ void EditEngine::CompleteOnlineSpelling() pImpEditEngine->FormatAndUpdate(); pImpEditEngine->StopOnlineSpellTimer(); - pImpEditEngine->DoOnlineSpelling( 0, sal_True, sal_False ); + pImpEditEngine->DoOnlineSpelling( 0, true, false ); } } diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx index 3af0090b3753..853fd13550e6 100644 --- a/editeng/source/editeng/editundo.cxx +++ b/editeng/source/editeng/editundo.cxx @@ -67,9 +67,9 @@ bool EditUndoManager::Undo() mpEditEngine->GetActiveView()->GetImpEditView()->DrawSelection(); // Remove the old selection - mpEditEngine->SetUndoMode( sal_True ); + mpEditEngine->SetUndoMode( true ); bool bDone = SfxUndoManager::Undo(); - mpEditEngine->SetUndoMode( sal_False ); + mpEditEngine->SetUndoMode( false ); EditSelection aNewSel( mpEditEngine->GetActiveView()->GetImpEditView()->GetEditSelection() ); DBG_ASSERT( !aNewSel.IsInvalid(), "Invalid selection after Undo () "); @@ -102,9 +102,9 @@ bool EditUndoManager::Redo() mpEditEngine->GetActiveView()->GetImpEditView()->DrawSelection(); // Remove the old selection - mpEditEngine->SetUndoMode( sal_True ); + mpEditEngine->SetUndoMode( true ); bool bDone = SfxUndoManager::Redo(); - mpEditEngine->SetUndoMode( sal_False ); + mpEditEngine->SetUndoMode( false ); EditSelection aNewSel( mpEditEngine->GetActiveView()->GetImpEditView()->GetEditSelection() ); DBG_ASSERT( !aNewSel.IsInvalid(), "Invalid selection after Undo () "); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 6616e1206d31..b32e3f6008a1 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -620,7 +620,7 @@ void EditView::SetEditEngineUpdateMode( sal_Bool bUpdate ) void EditView::ForceUpdate() { - PIMPEE->SetUpdateMode( sal_True, this, sal_True ); + PIMPEE->SetUpdateMode( true, this, sal_True ); } SfxStyleSheet* EditView::GetStyleSheet() diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index 10bcb7645eea..ae4821afe9dd 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -104,12 +104,12 @@ SfxPoolItem** GlobalEditData::GetDefItems() ppDefItems[0] = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, EE_PARA_WRITINGDIR ); ppDefItems[1] = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS ); - ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, sal_False ); - ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, sal_True ); + ppDefItems[2] = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, false ); + ppDefItems[3] = new SfxBoolItem( EE_PARA_FORBIDDENRULES, true ); ppDefItems[4] = new SvxScriptSpaceItem( sal_True, EE_PARA_ASIANCJKSPACING ); ppDefItems[5] = new SvxNumBulletItem( aDefaultNumRule, EE_PARA_NUMBULLET ); - ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, sal_False ); - ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, sal_True ); + ppDefItems[6] = new SfxBoolItem( EE_PARA_HYPHENATE, false ); + ppDefItems[7] = new SfxBoolItem( EE_PARA_BULLETSTATE, true ); ppDefItems[8] = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE ); ppDefItems[9] = new SfxInt16Item( EE_PARA_OUTLLEVEL, -1 ); ppDefItems[10] = new SvxBulletItem( EE_PARA_BULLET ); diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 598ddd874fbc..5b5017080cc4 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -205,9 +205,9 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion, OutputD sal_uInt16 nStartLine = 0; sal_uInt16 nEndLine = pTmpPortion->GetLines().Count() -1; if ( nPara == nStartPara ) - nStartLine = pTmpPortion->GetLines().FindLine( aTmpSel.Min().GetIndex(), sal_False ); + nStartLine = pTmpPortion->GetLines().FindLine( aTmpSel.Min().GetIndex(), false ); if ( nPara == nEndPara ) - nEndLine = pTmpPortion->GetLines().FindLine( aTmpSel.Max().GetIndex(), sal_True ); + nEndLine = pTmpPortion->GetLines().FindLine( aTmpSel.Max().GetIndex(), true ); for ( sal_uInt16 nLine = nStartLine; nLine <= nEndLine; nLine++ ) { @@ -680,7 +680,7 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa // If we are behind a portion, and the next portion has other direction, we must change position... aEditCursor.Left() = aEditCursor.Right() = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GETCRSR_TXTONLY|GETCRSR_PREFERPORTIONSTART ).Left(); - sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, sal_True ); + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, true ); const TextPortion* pTextPortion = pParaPortion->GetTextPortions()[nTextPortion]; if ( pTextPortion->GetKind() == PORTIONKIND_TAB ) { diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index f81356d15cd5..44c77158d93a 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -154,7 +154,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : // Access data already from here on! SetRefDevice( NULL ); - InitDoc( sal_False ); + InitDoc( false ); bCallParaInsertedOrDeleted = true; @@ -171,7 +171,7 @@ ImpEditEngine::~ImpEditEngine() // when a parent template is destroyed. // And this after the destruction of the data! bDowning = true; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); delete pVirtDev; delete pEmptyItemSet; @@ -308,7 +308,7 @@ sal_Bool ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pVie SetActiveView( pView ); if (!GetAutoCompleteText().isEmpty()) - SetAutoCompleteText( OUString(), sal_True ); + SetAutoCompleteText( OUString(), true ); GetSelEngine().SelMouseButtonDown( rMEvt ); // Special treatment @@ -485,7 +485,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) FormatDoc(); ParaPortion* pParaPortion = GetParaPortions().SafeGetObject( GetEditDoc().GetPos( aPaM.GetNode() ) ); - sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_True ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), true ); const EditLine* pLine = pParaPortion->GetLines()[nLine]; if ( pLine && ( nInputEnd > pLine->GetEnd() ) ) nInputEnd = pLine->GetEnd(); @@ -543,7 +543,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView ) FormatDoc(); ParaPortion* pParaPortion = GetParaPortions().SafeGetObject( GetEditDoc().GetPos( aPaM.GetNode() ) ); - sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_True ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), true ); const EditLine* pLine = pParaPortion->GetLines()[nLine]; if ( pLine ) { @@ -604,7 +604,7 @@ EditPaM ImpEditEngine::InsertText(const EditSelection& aSel, const OUString& rSt EditPaM ImpEditEngine::Clear() { - InitDoc( sal_False ); + InitDoc( false ); EditPaM aPaM = aEditDoc.GetStartPaM(); EditSelection aSel( aPaM ); @@ -625,7 +625,7 @@ EditPaM ImpEditEngine::Clear() EditPaM ImpEditEngine::RemoveText() { - InitDoc( sal_True ); + InitDoc( true ); EditPaM aStartPaM = aEditDoc.GetStartPaM(); EditSelection aEmptySel( aStartPaM, aStartPaM ); @@ -645,7 +645,7 @@ void ImpEditEngine::SetText(const OUString& rText) EditPaM aStartPaM = RemoveText(); sal_Bool bUndoCurrentlyEnabled = IsUndoEnabled(); // The text inserted manually can not be made reversable by the user - EnableUndo( sal_False ); + EnableUndo( false ); EditSelection aEmptySel( aStartPaM, aStartPaM ); EditPaM aPaM = aStartPaM; @@ -715,7 +715,7 @@ void ImpEditEngine::ParaAttribsChanged( ContentNode* pNode ) { OSL_ENSURE( pNode, "ParaAttribsChanged: Which one?" ); - aEditDoc.SetModified( sal_True ); + aEditDoc.SetModified( true ); bFormatted = false; ParaPortion* pPortion = FindParaPortion( pNode ); @@ -914,7 +914,7 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& sal_Int32 nPara = GetEditDoc().GetPos( aPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SafeGetObject( nPara ); - sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), false ); const EditLine* pLine = pParaPortion->GetLines()[nLine]; bool bEmptyLine = pLine->GetStart() == pLine->GetEnd(); @@ -940,7 +940,7 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM& aPaM.SetIndex( nLogPos + pLine->GetStart() ); sal_uInt16 nTmp; - sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, sal_True ); + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTmp, true ); const TextPortion* pTextPortion = pParaPortion->GetTextPortions()[nTextPortion]; sal_uInt16 nRTLLevel = pTextPortion->GetRightToLeft(); sal_Bool bPortionRTL = (nRTLLevel%2) ? sal_True : sal_False; @@ -970,7 +970,7 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM sal_Int32 nPara = GetEditDoc().GetPos( aPaM.GetNode() ); ParaPortion* pParaPortion = GetParaPortions().SafeGetObject( nPara ); - sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), false ); const EditLine* pLine = pParaPortion->GetLines()[nLine]; bool bEmptyLine = pLine->GetStart() == pLine->GetEnd(); @@ -1004,7 +1004,7 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM { // Check if we are within a portion and don't have overwrite mode, then it's easy... sal_uInt16 nPortionStart; - sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, sal_False ); + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, false ); const TextPortion* pTextPortion = pParaPortion->GetTextPortions()[nTextPortion]; sal_Bool bPortionBoundary = ( aPaM.GetIndex() == nPortionStart ) || ( aPaM.GetIndex() == (nPortionStart+pTextPortion->GetLen()) ); @@ -1110,7 +1110,7 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM // RTL portion, stay visually on the left side. sal_uInt16 _nPortionStart; // sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nPortionStart, !bRTLPortion ); - sal_uInt16 _nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), _nPortionStart, sal_True ); + sal_uInt16 _nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), _nPortionStart, true ); const TextPortion* _pTextPortion = pParaPortion->GetTextPortions()[_nTextPortion]; if ( bVisualToLeft && !bRTLPortion && ( _pTextPortion->GetRightToLeft() % 2 ) ) aPaM.SetIndex( aPaM.GetIndex()+1 ); @@ -2163,7 +2163,7 @@ EditSelection ImpEditEngine::ImpMoveParagraphs( Range aOldPositions, sal_Int32 n CallNotify( aNotify ); } - aEditDoc.SetModified( sal_True ); + aEditDoc.SetModified( true ); if ( pRecalc1 ) CalcHeight( pRecalc1 ); @@ -3330,7 +3330,7 @@ void ImpEditEngine::UpdateSelections() ParaPortion* pParaPortion = GetParaPortions()[nPara]; EditSelection aTmpSelection( EditPaM( pParaPortion->GetNode(), 0 ) ); pView->pImpEditView->SetEditSelection( aTmpSelection ); - bChanged=sal_True; + bChanged=true; break; // for loop } } @@ -3433,7 +3433,7 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable( pDataObj->GetString() = aText; SvxFontItem::EnableStoreUnicodeNames( sal_True ); - WriteBin( pDataObj->GetStream(), aSelection, sal_True ); + WriteBin( pDataObj->GetStream(), aSelection, true ); pDataObj->GetStream().Seek( 0 ); SvxFontItem::EnableStoreUnicodeNames( sal_False ); @@ -3933,7 +3933,7 @@ long ImpEditEngine::GetXPos( if ( pNextPortion->GetKind() != PORTIONKIND_TAB ) { if ( !bPreferPortionStart ) - nX = GetXPos( pParaPortion, pLine, nIndex, sal_True ); + nX = GetXPos( pParaPortion, pLine, nIndex, true ); else if ( !IsRightToLeft( GetEditDoc().GetPos( pParaPortion->GetNode() ) ) ) nX += nPortionTextWidth; } diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index a39a5915cf7b..d3a462b356bd 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -3263,7 +3263,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt } else { - bWrong = sal_False; + bWrong = false; } } } diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 9178ca396b3d..50713cfcbd73 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -94,7 +94,7 @@ void Swapsal_uIt16s( sal_uInt16& rX, sal_uInt16& rY ) EditPaM ImpEditEngine::Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, EditSelection aSel, SvKeyValueIterator* pHTTPHeaderAttrs ) { sal_Bool _bUpdate = GetUpdateMode(); - SetUpdateMode( sal_False ); + SetUpdateMode( false ); EditPaM aPaM; if ( eFormat == EE_FORMAT_TEXT ) aPaM = ReadText( rInput, aSel ); @@ -1167,8 +1167,8 @@ void ImpEditEngine::SetText( const EditTextObject& rTextObject ) SetText( OUString() ); EditPaM aPaM = aEditDoc.GetStartPaM(); - SetUpdateMode( sal_False ); - EnableUndo( sal_False ); + SetUpdateMode( false ); + EnableUndo( false ); InsertText( rTextObject, EditSelection( aPaM, aPaM ) ); SetVertical( rTextObject.IsVertical() ); @@ -1287,7 +1287,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject pPortion->MarkSelectionInvalid( nStartPos, pC->GetText().getLength() ); } - DBG_ASSERT( CheckOrderedList( aPaM.GetNode()->GetCharAttribs().GetAttribs(), sal_True ), "InsertBinTextObject: Start-Liste distorted" ); + DBG_ASSERT( CheckOrderedList( aPaM.GetNode()->GetCharAttribs().GetAttribs(), true ), "InsertBinTextObject: Start-Liste distorted" ); sal_Bool bParaAttribs = sal_False; if ( bNewContent || ( ( n > 0 ) && ( n < (nContents-1) ) ) ) @@ -1371,7 +1371,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject if ( bNewContent ) aPaM = ImpFastInsertParagraph( nPara+1 ); else - aPaM = ImpInsertParaBreak( aPaM, sal_False ); + aPaM = ImpInsertParaBreak( aPaM, false ); } } @@ -1484,7 +1484,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc ) bIsStart = sal_True; EditSpellWrapper* pWrp = new EditSpellWrapper( Application::GetDefDialogParent(), - xSpeller, bIsStart, sal_False, pEditView ); + xSpeller, bIsStart, false, pEditView ); pWrp->SpellDocument(); delete pWrp; @@ -2225,7 +2225,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, rEditView.pImpEditView->SetEditSelection( aNext ); FormatAndUpdate(); - aEditDoc.SetModified(sal_True); + aEditDoc.SetModified(true); } } @@ -2533,7 +2533,7 @@ sal_uInt16 ImpEditEngine::StartSearchAndReplace( EditView* pEditView, const SvxS { // The Writer replaces all front beginning to end ... SvxSearchItem aTmpItem( rSearchItem ); - aTmpItem.SetBackward( sal_False ); + aTmpItem.SetBackward( false ); pEditView->pImpEditView->DrawSelection(); @@ -2679,8 +2679,8 @@ sal_Bool ImpEditEngine::ImpSearch( const SvxSearchItem& rSearchItem, sal_Bool ImpEditEngine::HasText( const SvxSearchItem& rSearchItem ) { SvxSearchItem aTmpItem( rSearchItem ); - aTmpItem.SetBackward( sal_False ); - aTmpItem.SetSelection( sal_False ); + aTmpItem.SetBackward( false ); + aTmpItem.SetSelection( false ); EditPaM aStartPaM( aEditDoc.GetStartPaM() ); EditSelection aDummySel( aStartPaM ); diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index 56b5486a22fc..8a1cbf757537 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -55,7 +55,7 @@ void ImpEditEngine::SetStyleSheet( EditSelection aSel, SfxStyleSheet* pStyle ) sal_Int32 nEndPara = aEditDoc.GetPos( aSel.Max().GetNode() ); sal_Bool _bUpdate = GetUpdateMode(); - SetUpdateMode( sal_False ); + SetUpdateMode( false ); for ( sal_Int32 n = nStartPara; n <= nEndPara; n++ ) SetStyleSheet( n, pStyle ); diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index e9bfaf37baa6..321907f9c5cd 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -283,25 +283,25 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const cSymbol != rBullet.cSymbol || aPrevText != rBullet.aPrevText || aFollowText != rBullet.aFollowText ) - return 0; + return false; if( ( nStyle != BS_BMP ) && ( aFont != rBullet.aFont ) ) - return 0; + return false; if( nStyle == BS_BMP ) { if( ( pGraphicObject && !rBullet.pGraphicObject ) || ( !pGraphicObject && rBullet.pGraphicObject ) ) - return 0; + return false; if( ( pGraphicObject && rBullet.pGraphicObject ) && ( ( *pGraphicObject != *rBullet.pGraphicObject ) || ( pGraphicObject->GetPrefSize() != rBullet.pGraphicObject->GetPrefSize() ) ) ) { - return 0; + return false; } } - return 1; + return true; } // ----------------------------------------------------------------------- diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 47d68f0e0aa2..cd86e0ebc47c 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -248,7 +248,7 @@ bool SvxFieldData::operator==( const SvxFieldData& rFld ) const { DBG_ASSERT( Type() == rFld.Type(), "==: Different Types" ); (void)rFld; - return sal_True; // Basic class is always the same. + return true; // Basic class is always the same. } // ----------------------------------------------------------------------- @@ -358,10 +358,10 @@ bool SvxFieldItem::operator==( const SfxPoolItem& rItem ) const const SvxFieldData* pOtherFld = ((const SvxFieldItem&)rItem).GetField(); if ( !pField && !pOtherFld ) - return sal_True; + return true; if ( ( !pField && pOtherFld ) || ( pField && !pOtherFld ) ) - return sal_False; + return false; return ( ( pField->Type() == pOtherFld->Type() ) && ( *pField == *pOtherFld ) ); @@ -403,7 +403,7 @@ SvxFieldData* SvxDateField::Clone() const bool SvxDateField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return sal_False; + return false; const SvxDateField& rOtherFld = (const SvxDateField&) rOther; return ( ( nFixDate == rOtherFld.nFixDate ) && @@ -541,7 +541,7 @@ SvxFieldData* SvxURLField::Clone() const bool SvxURLField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return sal_False; + return false; const SvxURLField& rOtherFld = (const SvxURLField&) rOther; return ( ( eFormat == rOtherFld.eFormat ) && @@ -783,7 +783,7 @@ SvxFieldData* SvxExtTimeField::Clone() const bool SvxExtTimeField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return sal_False; + return false; const SvxExtTimeField& rOtherFld = (const SvxExtTimeField&) rOther; return ((m_nFixTime == rOtherFld.m_nFixTime) && @@ -927,7 +927,7 @@ SvxFieldData* SvxExtFileField::Clone() const bool SvxExtFileField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return sal_False; + return false; const SvxExtFileField& rOtherFld = (const SvxExtFileField&) rOther; return ( ( aFile == rOtherFld.aFile ) && @@ -1079,7 +1079,7 @@ SvxFieldData* SvxAuthorField::Clone() const bool SvxAuthorField::operator==( const SvxFieldData& rOther ) const { if ( rOther.Type() != Type() ) - return sal_False; + return false; const SvxAuthorField& rOtherFld = (const SvxAuthorField&) rOther; return ( ( aName == rOtherFld.aName ) && diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 69bdcf16f630..213fd8bff71b 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -497,7 +497,7 @@ bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) if( nMemberId != MID_FIRST_AUTO && nMemberId != MID_L_REL_MARGIN && nMemberId != MID_R_REL_MARGIN) if(!(rVal >>= nVal)) - return sal_False; + return false; switch( nMemberId ) { @@ -1399,7 +1399,7 @@ bool SvxShadowItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } break; } - default: OSL_FAIL("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return false; } if ( bRet ) @@ -1737,7 +1737,7 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const aSeq[7] <<= uno::makeAny( (sal_Int32)(bConvert ? TWIP_TO_MM100_UNSIGNED( nLeftDist ) : nLeftDist )); aSeq[8] <<= uno::makeAny( (sal_Int32)(bConvert ? TWIP_TO_MM100_UNSIGNED( nRightDist ) : nRightDist )); rVal = uno::makeAny( aSeq ); - return sal_True; + return true; } case MID_LEFT_BORDER: case LEFT_BORDER: @@ -1896,7 +1896,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) for (int n(0); n != SAL_N_ELEMENTS(aBorders); ++n) { if (!lcl_setLine(aSeq[n], *this, aBorders[n], bConvert)) - return sal_False; + return false; } // WTH are the borders and the distances saved in different order? @@ -1914,13 +1914,13 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) SetDistance( sal_uInt16( nDist ), nLines[n-5] ); } else - return sal_False; + return false; } - return sal_True; + return true; } else - return sal_False; + return false; } case LEFT_BORDER_DISTANCE: bDistMember = sal_True; @@ -1972,7 +1972,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) if( pLine ) pLine->SetBorderLineStyle( eBorderStyle ); } - return sal_True; + return true; } break; case LINE_WIDTH: @@ -1992,14 +1992,14 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) pLine->SetWidth( nWidth ); } } - return sal_True; + return true; } if( bDistMember || nMemberId == BORDER_DISTANCE ) { sal_Int32 nDist = 0; if(!(rVal >>= nDist)) - return sal_False; + return false; if(nDist >= 0) { @@ -2015,7 +2015,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { SvxBorderLine aLine; if( !rVal.hasValue() ) - return sal_False; + return false; table::BorderLine2 aBorderLine; if( lcl_extractBorderLine(rVal, aBorderLine) ) @@ -2060,16 +2060,16 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } } else - return sal_False; + return false; } else - return sal_False; + return false; sal_Bool bSet = SvxBoxItem::LineToSvxLine(aBorderLine, aLine, bConvert); SetLine(bSet ? &aLine : 0, nLine); } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -2736,7 +2736,7 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const aSeq[3] = ::com::sun::star::uno::makeAny( nVal ); aSeq[4] = ::com::sun::star::uno::makeAny( (sal_Int32)(bConvert ? TWIP_TO_MM100_UNSIGNED(GetDefDist()) : GetDefDist()) ); rVal = ::com::sun::star::uno::makeAny( aSeq ); - return sal_True; + return true; } case MID_HORIZONTAL: @@ -2789,9 +2789,9 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { // 2 BorderLines, flags, valid flags and distance if (!lcl_setLine(aSeq[0], *this, BOXINFO_LINE_HORI, bConvert)) - return sal_False; + return false; if (!lcl_setLine(aSeq[1], *this, BOXINFO_LINE_VERT, bConvert)) - return sal_False; + return false; sal_Int16 nFlags( 0 ); sal_Int32 nVal( 0 ); @@ -2802,11 +2802,11 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) SetMinDist( ( nFlags & 0x04 ) != 0 ); } else - return sal_False; + return false; if ( aSeq[3] >>= nFlags ) nValidFlags = (sal_uInt8)nFlags; else - return sal_False; + return false; if (( aSeq[4] >>= nVal ) && ( nVal >= 0 )) { if( bConvert ) @@ -2814,14 +2814,14 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) SetDefDist( (sal_uInt16)nVal ); } } - return sal_True; + return true; } case MID_HORIZONTAL: case MID_VERTICAL: { if( !rVal.hasValue() ) - return sal_False; + return false; table::BorderLine2 aBorderLine; if( lcl_extractBorderLine(rVal, aBorderLine) ) @@ -2865,7 +2865,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } } else - return sal_False; + return false; } else if (rVal.getValueType() == ::getCppuType((const ::com::sun::star::uno::Sequence < sal_Int16 >*)0) ) { @@ -2888,10 +2888,10 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } } else - return sal_False; + return false; } else - return sal_False; + return false; SvxBorderLine aLine; sal_Bool bSet = SvxBoxItem::LineToSvxLine(aBorderLine, aLine, bConvert); @@ -2932,10 +2932,10 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } break; } - default: OSL_FAIL("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return false; } - return sal_True; + return true; } // class SvxFmtBreakItem ------------------------------------------------- @@ -3006,7 +3006,7 @@ bool SvxFmtBreakItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; nBreak = (style::BreakType) nValue; } @@ -3239,7 +3239,7 @@ bool SvxLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemId ) break; default: OSL_FAIL( "Wrong MemberId" ); - return sal_False; + return false; } return true; @@ -3691,7 +3691,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int32 nCol = 0; if ( !( rVal >>= nCol ) ) - return sal_False; + return false; if(MID_BACK_COLOR_R_G_B == nMemberId) { nCol = COLORDATA_RGB( nCol ); @@ -3704,7 +3704,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int32 nTrans = 0; if ( !( rVal >>= nTrans ) || nTrans < 0 || nTrans > 100 ) - return sal_False; + return false; aColor.SetTransparency(lcl_PercentToTransparency(nTrans)); } break; @@ -3716,7 +3716,7 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int32 nValue = 0; if ( !( rVal >>= nValue ) ) - return sal_False; + return false; eLocation = (style::GraphicLocation)nValue; } SetGraphicPos( (SvxGraphicPosition)(sal_uInt16)eLocation ); diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 3dab5b0d7cf7..94c5c9e2e51d 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -404,7 +404,7 @@ bool SvxAdjustItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) eVal != SVX_ADJUST_LEFT && eVal != SVX_ADJUST_BLOCK && eVal != SVX_ADJUST_CENTER) - return sal_False; + return false; if(eVal < (sal_uInt16)SVX_ADJUST_END) nMemberId == MID_PARA_ADJUST ? SetAdjust((SvxAdjust)eVal) : @@ -978,7 +978,7 @@ bool SvxTabStopItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const break; } } - return sal_True; + return true; } bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) @@ -994,7 +994,7 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { uno::Sequence < uno::Sequence < uno::Any > > aAnySeq; if (!(rVal >>= aAnySeq)) - return sal_False; + return false; sal_Int32 nLength = aAnySeq.getLength(); aSeq.realloc( nLength ); for ( sal_Int32 n=0; n<nLength; n++ ) @@ -1002,14 +1002,14 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) uno::Sequence < uno::Any >& rAnySeq = aAnySeq[n]; if ( rAnySeq.getLength() == 4 ) { - if (!(rAnySeq[0] >>= aSeq[n].Position)) return sal_False; + if (!(rAnySeq[0] >>= aSeq[n].Position)) return false; if (!(rAnySeq[1] >>= aSeq[n].Alignment)) { sal_Int32 nVal = 0; if (rAnySeq[1] >>= nVal) aSeq[n].Alignment = (com::sun::star::style::TabAlign) nVal; else - return sal_False; + return false; } if (!(rAnySeq[2] >>= aSeq[n].DecimalChar)) { @@ -1017,7 +1017,7 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) if ( (rAnySeq[2] >>= aVal) && aVal.getLength() == 1 ) aSeq[n].DecimalChar = aVal.toChar(); else - return sal_False; + return false; } if (!(rAnySeq[3] >>= aSeq[n].FillChar)) { @@ -1025,11 +1025,11 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) if ( (rAnySeq[3] >>= aVal) && aVal.getLength() == 1 ) aSeq[n].FillChar = aVal.toChar(); else - return sal_False; + return false; } } else - return sal_False; + return false; } } @@ -1061,11 +1061,11 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int32 nNewPos = 0; if (!(rVal >>= nNewPos) ) - return sal_False; + return false; if (bConvert) nNewPos = MM100_TO_TWIP ( nNewPos ); if (nNewPos <= 0) - return sal_False; + return false; const SvxTabStop& rTab = maTabStops.front(); SvxTabStop aNewTab ( nNewPos, rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() ); Remove( 0 ); @@ -1073,7 +1073,7 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) break; } } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1084,12 +1084,12 @@ bool SvxTabStopItem::operator==( const SfxPoolItem& rAttr ) const const SvxTabStopItem& rTSI = (SvxTabStopItem&)rAttr; if ( Count() != rTSI.Count() ) - return 0; + return false; for ( sal_uInt16 i = 0; i < Count(); ++i ) if( !(*this)[i].IsEqual( rTSI[i] ) ) - return 0; - return 1; + return false; + return true; } // ----------------------------------------------------------------------- @@ -1314,10 +1314,10 @@ bool SvxPageModelItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMe { case MID_AUTO: rVal <<= (sal_Bool) bAuto; break; case MID_NAME: rVal <<= OUString( GetValue() ); break; - default: OSL_FAIL("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return false; } - return sal_True; + return true; } bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) @@ -1329,7 +1329,7 @@ bool SvxPageModelItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 { case MID_AUTO: bRet = ( rVal >>= bAuto ); break; case MID_NAME: bRet = ( rVal >>= aStr ); if ( bRet ) SetValue(aStr); break; - default: OSL_FAIL("Wrong MemberId!"); return sal_False; + default: OSL_FAIL("Wrong MemberId!"); return false; } return bRet; @@ -1594,7 +1594,7 @@ bool SvxParaVertAlignItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { rVal <<= (sal_Int16)GetValue(); - return sal_True; + return true; } bool SvxParaVertAlignItem::PutValue( const com::sun::star::uno::Any& rVal, @@ -1604,10 +1604,10 @@ bool SvxParaVertAlignItem::PutValue( const com::sun::star::uno::Any& rVal, if((rVal >>= nVal) && nVal >=0 && nVal <= BOTTOM ) { SetValue( (sal_uInt16)nVal ); - return sal_True; + return true; } else - return sal_False; + return false; } bool SvxParaVertAlignItem::operator==( const SfxPoolItem& rItem ) const diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 80b97b0dd919..28f5f07a10ca 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -286,7 +286,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { com::sun::star::awt::FontDescriptor aFontDescriptor; if ( !( rVal >>= aFontDescriptor )) - return sal_False; + return false; aFamilyName = aFontDescriptor.Name; aStyleName = aFontDescriptor.StyleName; @@ -299,7 +299,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { OUString aStr; if(!(rVal >>= aStr)) - return sal_False; + return false; aFamilyName = aStr; } break; @@ -307,7 +307,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { OUString aStr; if(!(rVal >>= aStr)) - return sal_False; + return false; aStyleName = aStr; } break; @@ -315,7 +315,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { sal_Int16 nFamily = sal_Int16(); if(!(rVal >>= nFamily)) - return sal_False; + return false; eFamily = (FontFamily)nFamily; } break; @@ -323,7 +323,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { sal_Int16 nSet = sal_Int16(); if(!(rVal >>= nSet)) - return sal_False; + return false; eTextEncoding = (rtl_TextEncoding)nSet; } break; @@ -331,7 +331,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId) { sal_Int16 nPitch = sal_Int16(); if(!(rVal >>= nPitch)) - return sal_False; + return false; ePitch = (FontPitch)nPitch; } break; @@ -355,7 +355,7 @@ bool SvxFontItem::operator==( const SfxPoolItem& rAttr ) const { if ( ePitch != rItem.ePitch || eTextEncoding != rItem.eTextEncoding ) { - bRet = sal_False; + bRet = false; DBG_WARNING( "FontItem::operator==(): only pitch or rtl_TextEncoding different "); } } @@ -582,7 +582,7 @@ bool SvxPostureItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; eSlant = (awt::FontSlant)nValue; } @@ -595,7 +595,7 @@ bool SvxPostureItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) bool SvxPostureItem::HasBoolValue() const { - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -625,7 +625,7 @@ SvxWeightItem::SvxWeightItem( const FontWeight eWght, const sal_uInt16 nId ) : bool SvxWeightItem::HasBoolValue() const { - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -737,7 +737,7 @@ bool SvxWeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; fValue = (float)nValue; } SetValue( (sal_uInt16)VCLUnoHelper::ConvertFontWeight((float)fValue) ); @@ -917,7 +917,7 @@ bool SvxFontHeightItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const } break; } - return sal_True; + return true; } // Calculate the relative deviation from the expected height. @@ -970,7 +970,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) nProp = 100; double fPoint = aFontHeight.Height; if( fPoint < 0. || fPoint > 10000. ) - return sal_False; + return false; nHeight = (long)( fPoint * 20.0 + 0.5 ); // Twips if (!bConvert) @@ -979,7 +979,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) nProp = aFontHeight.Prop; } else - return sal_False; + return false; } break; case MID_FONTHEIGHT: @@ -991,11 +991,11 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; fPoint = (float)nValue; } if(fPoint < 0. || fPoint > 10000.) - return sal_False; + return false; nHeight = (long)( fPoint * 20.0 + 0.5 ); // Twips if (!bConvert) @@ -1006,7 +1006,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int16 nNew = sal_Int16(); if(!(rVal >>= nNew)) - return sal_True; + return true; nHeight = lcl_GetRealHeight_Impl(nHeight, nProp, ePropUnit, bConvert); @@ -1024,7 +1024,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; fValue = (float)nValue; } sal_Int16 nCoreDiffValue = (sal_Int16)(fValue * 20.); @@ -1034,7 +1034,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } break; } - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -1222,7 +1222,7 @@ bool SvxFontWidthItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) nMemberId &= ~CONVERT_TWIPS; sal_Int16 nVal = sal_Int16(); if(!(rVal >>= nVal)) - return sal_False; + return false; switch(nMemberId) { @@ -1280,7 +1280,7 @@ SvxTextLineItem::SvxTextLineItem( const FontUnderline eSt, const sal_uInt16 nId bool SvxTextLineItem::HasBoolValue() const { - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1510,7 +1510,7 @@ SvxCrossedOutItem::SvxCrossedOutItem( const FontStrikeout eSt, const sal_uInt16 bool SvxCrossedOutItem::HasBoolValue() const { - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1617,12 +1617,12 @@ bool SvxCrossedOutItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetValue((sal_Int16)nValue); } break; } - return sal_True; + return true; } // class SvxShadowedItem ------------------------------------------------- @@ -1987,7 +1987,7 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { sal_Int32 nColor = 0; if(!(rVal >>= nColor)) - return sal_False; + return false; mColor.SetColor( nColor ); return true; @@ -2306,7 +2306,7 @@ bool SvxCaseMapItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { sal_uInt16 nVal = sal_uInt16(); if(!(rVal >>= nVal)) - return sal_False; + return false; switch( nVal ) { @@ -2493,7 +2493,7 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) if( (rVal >>= nVal) && (std::abs(nVal) <= 101)) nEsc = nVal; else - return sal_False; + return false; } break; case MID_ESC_HEIGHT: @@ -2502,7 +2502,7 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) if( (rVal >>= nVal) && (nVal <= 100)) nProp = nVal; else - return sal_False; + return false; } break; case MID_AUTO_ESC: @@ -2630,7 +2630,7 @@ bool SvxLanguageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { lang::Locale aLocale; if(!(rVal >>= aLocale)) - return sal_False; + return false; SetValue( LanguageTag::convertToLanguageType( aLocale, false)); } @@ -3223,7 +3223,7 @@ bool SvxCharRotateItem::PutValue( const com::sun::star::uno::Any& rVal, if((rVal >>= nVal) && (0 == nVal || 900 == nVal || 2700 == nVal)) SetValue( (sal_uInt16)nVal ); else - bRet = sal_False; + bRet = false; break; } @@ -3499,7 +3499,7 @@ SvxScriptSetItem::SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ) SfxPoolItem* SvxScriptSetItem::Clone( SfxItemPool * ) const { SvxScriptSetItem* p = new SvxScriptSetItem( Which(), *GetItemSet().GetPool() ); - p->GetItemSet().Put( GetItemSet(), sal_False ); + p->GetItemSet().Put( GetItemSet(), false ); return p; } @@ -3620,7 +3620,7 @@ void SvxScriptSetItem::GetSlotIds( sal_uInt16 nSlotId, sal_uInt16& rLatin, switch( nSlotId ) { default: - DBG_ASSERT( sal_False, "wrong SlotId for class SvxScriptSetItem" ); + DBG_ASSERT( false, "wrong SlotId for class SvxScriptSetItem" ); // no break - default to font - Id Range !! case SID_ATTR_CHAR_FONT: diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index 32b6b369847c..01806ce70094 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -114,7 +114,7 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal { Reference<XNameContainer> xContainer( xRef, UNO_QUERY ); if( !xContainer.is() ) - return sal_False; + return false; const Sequence< OUString > aNameSequence( xContainer->getElementNames() ); const OUString* pNames = aNameSequence.getConstArray(); @@ -129,7 +129,7 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal aAny = xContainer->getByName( aName ); if( aAny.getValue() == NULL || aAny.getValueType() != ::getCppuType((AttributeData*)0) ) - return sal_False; + return false; pData = (AttributeData*)aAny.getValue(); sal_Int32 pos = aName.indexOf( ':' ); diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx index 63fb473dc9eb..0ac6368c28a7 100644 --- a/editeng/source/misc/swafopt.cxx +++ b/editeng/source/misc/swafopt.cxx @@ -40,13 +40,13 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags() bAFmtDelSpacesBetweenLines = bAFmtByInpDelSpacesAtSttEnd = bAFmtByInpDelSpacesBetweenLines = - bDummy = sal_True; + bDummy = true; bReplaceStyles = bDelEmptyNode = bWithRedlining = bAutoCmpltEndless = - bAutoCmpltAppendBlanc = sal_False; + bAutoCmpltAppendBlanc = false; bAutoCmpltShowAsTip = bSetBorder = @@ -56,10 +56,10 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags() bRightMargin = bAutoCompleteWords = bAutoCmpltCollectWords = - bAutoCmpltKeepList = sal_True; + bAutoCmpltKeepList = true; bDummy6 = bDummy7 = bDummy8 = - sal_False; + false; nRightMargin = 50; // dflt. 50 % nAutoCmpltExpandKey = KEY_RETURN; diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx index c67e8d8496dc..a3da04c6e888 100644 --- a/editeng/source/misc/txtrange.cxx +++ b/editeng/source/misc/txtrange.cxx @@ -242,7 +242,7 @@ void SvxBoundArgs::NoteRange( bool bToggle ) if( nMax < nMin ) return; if( !bClosed ) - bToggle = sal_False; + bToggle = false; sal_uInt16 nIdx = 0; sal_uInt16 nCount = pLongArr->size(); DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" ); @@ -448,7 +448,7 @@ void SvxBoundArgs::Add() nCount = nCount - next; aBoolArr.erase( aBoolArr.begin() + nBoolIdx, aBoolArr.begin() + (nBoolIdx + next) ); if( nBoolIdx ) - aBoolArr[ nBoolIdx - 1 ] = sal_False; + aBoolArr[ nBoolIdx - 1 ] = false; #if OSL_DEBUG_LEVEL > 1 else ++next; diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index ea4624851d46..c1a0b3c517cb 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -311,7 +311,7 @@ void Outliner::UndoActionEnd( sal_uInt16 nId ) void Outliner::InsertUndo( EditUndo* pUndo ) { - pEditEngine->GetUndoManager().AddUndoAction( pUndo, sal_False ); + pEditEngine->GetUndoManager().AddUndoAction( pUndo, false ); } sal_Bool Outliner::IsInUndo() diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index ba28f04635c5..cf1c31a61991 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -540,7 +540,7 @@ bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara,EditView* pView) nTabs = sal::static_int_cast< sal_uInt16 >(aLevel.toInt32()); if( nTabs ) nTabs--; // Level 0 = "heading 1" - bConverted = sal_True; + bConverted = true; } else { diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index fa6a90fd975a..ddce2d39f433 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -1256,7 +1256,7 @@ void SvxUnoTextRangeBase::_setPropertyToDefault(SvxTextForwarder* pForwarder, co return; } - while(0); + while(false); } uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aPropertyName ) diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index a738b762d66b..d37c8a994805 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -440,7 +440,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& */ } - while( 0 ); + while( false ); } catch( const uno::Exception& ) { diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx index f00d0d90189e..bf764daaddab 100644 --- a/editeng/source/xml/xmltxtimp.cxx +++ b/editeng/source/xml/xmltxtimp.cxx @@ -209,7 +209,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r // aParserInput.sSystemId = aMedium.GetName(); xParser->parseStream( aParserInput ); } - while(0); + while(false); } catch( const uno::Exception& ) { |