diff options
author | Noel Grandin <noel@peralex.com> | 2014-02-28 09:47:38 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-03 08:59:36 +0200 |
commit | 0786a72308f7c3a47e052b00616f28ab03bc6b32 (patch) | |
tree | c6c027ed60dc464f429d05f017504e4176ec0460 | |
parent | f27e5ecfba4b688af6bcdd9933735f85c59b7401 (diff) |
editeng: sal_Bool->bool
this had to be done in conjunction with changing
include/svx/unoshtxt.hxx
because there are two virtual methods "bool IsValid" in two different
base classes and some subclasses are overriding both base-class
methods at once.
Change-Id: Ib43fc5000b443057caaa513b4efeaa6fd16e4260
-rw-r--r-- | editeng/source/uno/unoedprx.cxx | 78 | ||||
-rw-r--r-- | editeng/source/uno/unofored.cxx | 30 | ||||
-rw-r--r-- | editeng/source/uno/unoforou.cxx | 32 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 32 | ||||
-rw-r--r-- | editeng/source/uno/unoviwou.cxx | 4 | ||||
-rw-r--r-- | include/editeng/unoedprx.hxx | 30 | ||||
-rw-r--r-- | include/editeng/unoedsrc.hxx | 38 | ||||
-rw-r--r-- | include/editeng/unofored.hxx | 16 | ||||
-rw-r--r-- | include/editeng/unoforou.hxx | 18 | ||||
-rw-r--r-- | include/editeng/unotext.hxx | 16 | ||||
-rw-r--r-- | include/editeng/unoviwou.hxx | 2 | ||||
-rw-r--r-- | include/svx/unoshtxt.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleText.cxx | 27 | ||||
-rw-r--r-- | sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/inc/AccessibleOutlineEditSource.hxx | 2 | ||||
-rw-r--r-- | starmath/source/accessibility.cxx | 42 | ||||
-rw-r--r-- | starmath/source/accessibility.hxx | 24 | ||||
-rw-r--r-- | svx/source/accessibility/AccessibleEmptyEditSource.cxx | 16 | ||||
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 2 |
19 files changed, 199 insertions, 218 deletions
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 8643b7fce359..dcc35000838e 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -552,7 +552,7 @@ void SvxAccessibleTextAdapter::SetParaAttribs( sal_Int32 nPara, const SfxItemSet mpTextForwarder->SetParaAttribs( nPara, rSet ); } -void SvxAccessibleTextAdapter::RemoveAttribs( const ESelection& , sal_Bool , sal_uInt16 ) +void SvxAccessibleTextAdapter::RemoveAttribs( const ESelection& , bool , sal_uInt16 ) { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); } @@ -672,14 +672,14 @@ sal_uInt16 SvxAccessibleTextAdapter::CalcEditEngineIndex( sal_Int32 nPara, sal_I -sal_Bool SvxAccessibleTextAdapter::IsValid() const +bool SvxAccessibleTextAdapter::IsValid() const { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); if( mpTextForwarder ) return mpTextForwarder->IsValid(); else - return sal_False; + return false; } LanguageType SvxAccessibleTextAdapter::GetLanguage( sal_Int32 nPara, sal_Int32 nPos ) const @@ -714,12 +714,12 @@ EBulletInfo SvxAccessibleTextAdapter::GetBulletInfo( sal_Int32 nPara ) const return mpTextForwarder->GetBulletInfo( nPara ); } -void SvxAccessibleTextAdapter::SetUpdateModeForAcc(sal_Bool bUp) +void SvxAccessibleTextAdapter::SetUpdateModeForAcc(bool bUp) { return mpTextForwarder->SetUpdateModeForAcc(bUp); } -sal_Bool SvxAccessibleTextAdapter::GetUpdateModeForAcc( ) const +bool SvxAccessibleTextAdapter::GetUpdateModeForAcc( ) const { return mpTextForwarder->GetUpdateModeForAcc(); } @@ -817,12 +817,12 @@ OutputDevice* SvxAccessibleTextAdapter::GetRefDevice() const return mpTextForwarder->GetRefDevice(); } -sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int32& nPara, sal_Int32& nIndex ) const +bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int32& nPara, sal_Int32& nIndex ) const { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); if( !mpTextForwarder->GetIndexAtPoint( rPoint, nPara, nIndex ) ) - return sal_False; + return false; SvxAccessibleTextIndex aIndex; aIndex.SetEEIndex(nPara, nIndex, *this); @@ -846,7 +846,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int DBG_ASSERT(pOutDev!=NULL, "SvxAccessibleTextAdapter::GetIndexAtPoint: No ref device"); if( !pOutDev ) - return sal_False; + return false; AccessibleStringWrap aStringWrap( *pOutDev, aBulletInfo.aFont, aBulletInfo.aText ); @@ -858,7 +858,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int "SvxAccessibleTextIndex::SetIndex: index value overflow"); nIndex = aStringWrap.GetIndexAtPoint( aPoint ); - return sal_True; + return true; } } @@ -869,7 +869,7 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int DBG_ASSERT(pOutDev!=NULL, "SvxAccessibleTextAdapter::GetIndexAtPoint: No ref device"); if( !pOutDev ) - return sal_False; + return false; ESelection aSelection = MakeEESelection( aIndex ); SvxFont aFont = EditEngine::CreateSvxFontFromItemSet( mpTextForwarder->GetAttribs( aSelection ) ); @@ -886,13 +886,13 @@ sal_Bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int "SvxAccessibleTextIndex::SetIndex: index value overflow"); nIndex = (aIndex.GetIndex() + aStringWrap.GetIndexAtPoint( aPoint )); - return sal_True; + return true; } - return sal_True; + return true; } -sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const +bool SvxAccessibleTextAdapter::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -910,7 +910,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_Int32 nPara, sal_Int32 nI nStart = 0; nEnd = aIndex.GetBulletLen(); - return sal_True; + return true; } if( aIndex.InField() ) @@ -926,11 +926,11 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_Int32 nPara, sal_Int32 nI nStart = aIndex.GetIndex() - aIndex.GetFieldOffset(); nEnd = nStart + aIndex.GetFieldLen(); - return sal_True; + return true; } if( !mpTextForwarder->GetWordIndices( nPara, nIndex, nStart, nEnd ) ) - return sal_False; + return false; aIndex.SetEEIndex( nPara, nStart, *this ); DBG_ASSERT(aIndex.GetIndex() >= 0 && @@ -944,7 +944,7 @@ sal_Bool SvxAccessibleTextAdapter::GetWordIndices( sal_Int32 nPara, sal_Int32 nI "SvxAccessibleTextIndex::SetIndex: index value overflow"); nEnd = aIndex.GetIndex(); - return sal_True; + return true; } bool SvxAccessibleTextAdapter::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool /* bInCell */ ) const @@ -1042,7 +1042,7 @@ sal_Int32 SvxAccessibleTextAdapter::GetLineNumberAtIndex( sal_Int32 nPara, sal_I return mpTextForwarder->GetLineNumberAtIndex( nPara, nIndex ); } -sal_Bool SvxAccessibleTextAdapter::Delete( const ESelection& rSel ) +bool SvxAccessibleTextAdapter::Delete( const ESelection& rSel ) { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1055,7 +1055,7 @@ sal_Bool SvxAccessibleTextAdapter::Delete( const ESelection& rSel ) return mpTextForwarder->Delete( MakeEESelection(aStartIndex, aEndIndex ) ); } -sal_Bool SvxAccessibleTextAdapter::InsertText( const OUString& rStr, const ESelection& rSel ) +bool SvxAccessibleTextAdapter::InsertText( const OUString& rStr, const ESelection& rSel ) { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1068,7 +1068,7 @@ sal_Bool SvxAccessibleTextAdapter::InsertText( const OUString& rStr, const ESele return mpTextForwarder->InsertText( rStr, MakeEESelection(aStartIndex, aEndIndex) ); } -sal_Bool SvxAccessibleTextAdapter::QuickFormatDoc( sal_Bool bFull ) +bool SvxAccessibleTextAdapter::QuickFormatDoc( bool bFull ) { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1082,7 +1082,7 @@ sal_Int16 SvxAccessibleTextAdapter::GetDepth( sal_Int32 nPara ) const return mpTextForwarder->GetDepth( nPara ); } -sal_Bool SvxAccessibleTextAdapter::SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) +bool SvxAccessibleTextAdapter::SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1094,43 +1094,29 @@ void SvxAccessibleTextAdapter::SetForwarder( SvxTextForwarder& rForwarder ) mpTextForwarder = &rForwarder; } -sal_Bool SvxAccessibleTextAdapter::HaveImageBullet( sal_Int32 nPara ) const +bool SvxAccessibleTextAdapter::HaveImageBullet( sal_Int32 nPara ) const { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); EBulletInfo aBulletInfo = GetBulletInfo( nPara ); - if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && - aBulletInfo.bVisible && - aBulletInfo.nType == SVX_NUM_BITMAP ) - { - return sal_True; - } - else - { - return sal_False; - } + return ( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && + aBulletInfo.bVisible && + aBulletInfo.nType == SVX_NUM_BITMAP ); } -sal_Bool SvxAccessibleTextAdapter::HaveTextBullet( sal_Int32 nPara ) const +bool SvxAccessibleTextAdapter::HaveTextBullet( sal_Int32 nPara ) const { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); EBulletInfo aBulletInfo = GetBulletInfo( nPara ); - if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && - aBulletInfo.bVisible && - aBulletInfo.nType != SVX_NUM_BITMAP ) - { - return sal_True; - } - else - { - return sal_False; - } + return ( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND && + aBulletInfo.bVisible && + aBulletInfo.nType != SVX_NUM_BITMAP ); } -sal_Bool SvxAccessibleTextAdapter::IsEditable( const ESelection& rSel ) +bool SvxAccessibleTextAdapter::IsEditable( const ESelection& rSel ) { DBG_ASSERT(mpTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); @@ -1185,14 +1171,14 @@ SvxAccessibleTextEditViewAdapter::~SvxAccessibleTextEditViewAdapter() { } -sal_Bool SvxAccessibleTextEditViewAdapter::IsValid() const +bool SvxAccessibleTextEditViewAdapter::IsValid() const { DBG_ASSERT(mpViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder"); if( mpViewForwarder ) return mpViewForwarder->IsValid(); else - return sal_False; + return false; } Rectangle SvxAccessibleTextEditViewAdapter::GetVisArea() const diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 9b1b70e1a22f..88fce45d84b5 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -112,7 +112,7 @@ void SvxEditEngineForwarder::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rEditEngine.SetParaAttribs( nPara, rSet ); } -void SvxEditEngineForwarder::RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) +void SvxEditEngineForwarder::RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) { rEditEngine.RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich ); } @@ -147,7 +147,7 @@ void SvxEditEngineForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESel rEditEngine.QuickSetAttribs( rSet, rSel ); } -sal_Bool SvxEditEngineForwarder::IsValid() const +bool SvxEditEngineForwarder::IsValid() const { // cannot reliably query EditEngine state // while in the middle of an update @@ -374,7 +374,7 @@ OutputDevice* SvxEditEngineForwarder::GetRefDevice() const return rEditEngine.GetRefDevice(); } -sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nPara, sal_Int32& nIndex ) const +bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nPara, sal_Int32& nIndex ) const { Size aSize( rEditEngine.CalcTextWidth(), rEditEngine.GetTextHeight() ); ::std::swap( aSize.Width(), aSize.Height() ); @@ -387,10 +387,10 @@ sal_Bool SvxEditEngineForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nPara = aDocPos.nPara; nIndex = aDocPos.nIndex; - return sal_True; + return true; } -sal_Bool SvxEditEngineForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const +bool SvxEditEngineForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const { ESelection aRes = rEditEngine.GetWord( ESelection(nPara, nIndex, nPara, nIndex), com::sun::star::i18n::WordType::DICTIONARY_WORD ); @@ -400,10 +400,10 @@ sal_Bool SvxEditEngineForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nInd nStart = aRes.nStartPos; nEnd = aRes.nEndPos; - return sal_True; + return true; } - return sal_False; + return false; } bool SvxEditEngineForwarder::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell ) const @@ -432,27 +432,27 @@ sal_Int32 SvxEditEngineForwarder::GetLineNumberAtIndex( sal_Int32 nPara, sal_Int } -sal_Bool SvxEditEngineForwarder::QuickFormatDoc( sal_Bool ) +bool SvxEditEngineForwarder::QuickFormatDoc( bool ) { rEditEngine.QuickFormatDoc(); - return sal_True; + return true; } -sal_Bool SvxEditEngineForwarder::Delete( const ESelection& rSelection ) +bool SvxEditEngineForwarder::Delete( const ESelection& rSelection ) { rEditEngine.QuickDelete( rSelection ); rEditEngine.QuickFormatDoc(); - return sal_True; + return true; } -sal_Bool SvxEditEngineForwarder::InsertText( const OUString& rStr, const ESelection& rSelection ) +bool SvxEditEngineForwarder::InsertText( const OUString& rStr, const ESelection& rSelection ) { rEditEngine.QuickInsertText( rStr, rSelection ); rEditEngine.QuickFormatDoc(); - return sal_True; + return true; } sal_Int16 SvxEditEngineForwarder::GetDepth( sal_Int32 ) const @@ -461,10 +461,10 @@ sal_Int16 SvxEditEngineForwarder::GetDepth( sal_Int32 ) const return -1; } -sal_Bool SvxEditEngineForwarder::SetDepth( sal_Int32, sal_Int16 nNewDepth ) +bool SvxEditEngineForwarder::SetDepth( sal_Int32, sal_Int16 nNewDepth ) { // EditEngine does not support outline depth - return nNewDepth == -1 ? sal_True : sal_False; + return nNewDepth == -1; } const SfxItemSet * SvxEditEngineForwarder::GetEmptyItemSetPtr() diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index 4163643828ad..6f5200009033 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -180,7 +180,7 @@ void SvxOutlinerForwarder::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rS ((SfxItemSet*)&rSet)->SetParent( pOldParent ); } -void SvxOutlinerForwarder::RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) +void SvxOutlinerForwarder::RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) { rOutliner.RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich ); } @@ -236,7 +236,7 @@ void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& rField, sal_Int32 n rOutliner.FieldClicked( rField, nPara, nPos ); } -sal_Bool SvxOutlinerForwarder::IsValid() const +bool SvxOutlinerForwarder::IsValid() const { // cannot reliably query outliner state // while in the middle of an update @@ -371,7 +371,7 @@ OutputDevice* SvxOutlinerForwarder::GetRefDevice() const return rOutliner.GetRefDevice(); } -sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nPara, sal_Int32& nIndex ) const +bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nPara, sal_Int32& nIndex ) const { Size aSize( rOutliner.CalcTextSize() ); ::std::swap( aSize.Width(), aSize.Height() ); @@ -384,10 +384,10 @@ sal_Bool SvxOutlinerForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nP nPara = aDocPos.nPara; nIndex = aDocPos.nIndex; - return sal_True; + return true; } -sal_Bool SvxOutlinerForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const +bool SvxOutlinerForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const { ESelection aRes = rOutliner.GetEditEngine().GetWord( ESelection(nPara, nIndex, nPara, nIndex), com::sun::star::i18n::WordType::DICTIONARY_WORD ); @@ -397,10 +397,10 @@ sal_Bool SvxOutlinerForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex nStart = aRes.nStartPos; nEnd = aRes.nEndPos; - return sal_True; + return true; } - return sal_False; + return false; } bool SvxOutlinerForwarder::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell ) const @@ -428,29 +428,29 @@ sal_Int32 SvxOutlinerForwarder::GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 return rOutliner.GetEditEngine().GetLineNumberAtIndex( nPara, nIndex ); } -sal_Bool SvxOutlinerForwarder::QuickFormatDoc( sal_Bool ) +bool SvxOutlinerForwarder::QuickFormatDoc( bool ) { rOutliner.QuickFormatDoc(); - return sal_True; + return true; } -sal_Bool SvxOutlinerForwarder::Delete( const ESelection& rSelection ) +bool SvxOutlinerForwarder::Delete( const ESelection& rSelection ) { flushCache(); rOutliner.QuickDelete( rSelection ); rOutliner.QuickFormatDoc(); - return sal_True; + return true; } -sal_Bool SvxOutlinerForwarder::InsertText( const OUString& rStr, const ESelection& rSelection ) +bool SvxOutlinerForwarder::InsertText( const OUString& rStr, const ESelection& rSelection ) { flushCache(); rOutliner.QuickInsertText( rStr, rSelection ); rOutliner.QuickFormatDoc(); - return sal_True; + return true; } sal_Int16 SvxOutlinerForwarder::GetDepth( sal_Int32 nPara ) const @@ -467,7 +467,7 @@ sal_Int16 SvxOutlinerForwarder::GetDepth( sal_Int32 nPara ) const return nLevel; } -sal_Bool SvxOutlinerForwarder::SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) +bool SvxOutlinerForwarder::SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) { DBG_ASSERT( 0 <= nPara && nPara < GetParagraphCount(), "SvxOutlinerForwarder::SetDepth: Invalid paragraph index"); @@ -482,11 +482,11 @@ sal_Bool SvxOutlinerForwarder::SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) if( bOutlinerText ) rOutliner.SetLevelDependendStyleSheet( nPara ); - return sal_True; + return true; } } - return sal_False; + return false; } sal_Int32 SvxOutlinerForwarder::GetNumberingStartValue( sal_Int32 nPara ) diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 39505da286f7..b6581bc26b14 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -2216,7 +2216,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion( // set properties for the new text portion ESelection aSel( nPara, nStart, nPara, nEnd ); - pTextForwarder->RemoveAttribs( aSel, sal_False, 0 ); + pTextForwarder->RemoveAttribs( aSel, false, 0 ); pEditSource->UpdateData(); SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() ); @@ -2465,7 +2465,7 @@ void SvxDummyTextSource::SetParaAttribs( sal_Int32, const SfxItemSet& ) { } -void SvxDummyTextSource::RemoveAttribs( const ESelection& , sal_Bool , sal_uInt16 ) +void SvxDummyTextSource::RemoveAttribs( const ESelection& , bool , sal_uInt16 ) { } @@ -2513,9 +2513,9 @@ void SvxDummyTextSource::FieldClicked( const SvxFieldItem&, sal_Int32, sal_Int32 { } -sal_Bool SvxDummyTextSource::IsValid() const +bool SvxDummyTextSource::IsValid() const { - return sal_False; + return false; } void SvxDummyTextSource::SetNotifyHdl( const Link& ) @@ -2562,14 +2562,14 @@ OutputDevice* SvxDummyTextSource::GetRefDevice() const return NULL; } -sal_Bool SvxDummyTextSource::GetIndexAtPoint( const Point&, sal_Int32&, sal_Int32& ) const +bool SvxDummyTextSource::GetIndexAtPoint( const Point&, sal_Int32&, sal_Int32& ) const { - return sal_False; + return false; } -sal_Bool SvxDummyTextSource::GetWordIndices( sal_Int32, sal_Int32, sal_Int32&, sal_Int32& ) const +bool SvxDummyTextSource::GetWordIndices( sal_Int32, sal_Int32, sal_Int32&, sal_Int32& ) const { - return sal_False; + return false; } bool SvxDummyTextSource::GetAttributeRun( sal_Int32&, sal_Int32&, sal_Int32, sal_Int32, bool ) const @@ -2597,9 +2597,9 @@ sal_Int32 SvxDummyTextSource::GetLineNumberAtIndex( sal_Int32 /*nPara*/, sal_Int return 0; } -sal_Bool SvxDummyTextSource::QuickFormatDoc( sal_Bool ) +bool SvxDummyTextSource::QuickFormatDoc( bool ) { - return sal_False; + return false; } sal_Int16 SvxDummyTextSource::GetDepth( sal_Int32 ) const @@ -2607,19 +2607,19 @@ sal_Int16 SvxDummyTextSource::GetDepth( sal_Int32 ) const return -1; } -sal_Bool SvxDummyTextSource::SetDepth( sal_Int32, sal_Int16 nNewDepth ) +bool SvxDummyTextSource::SetDepth( sal_Int32, sal_Int16 nNewDepth ) { - return nNewDepth == 0 ? sal_True : sal_False; + return nNewDepth == 0; } -sal_Bool SvxDummyTextSource::Delete( const ESelection& ) +bool SvxDummyTextSource::Delete( const ESelection& ) { - return sal_False; + return false; } -sal_Bool SvxDummyTextSource::InsertText( const OUString&, const ESelection& ) +bool SvxDummyTextSource::InsertText( const OUString&, const ESelection& ) { - return sal_False; + return false; } const SfxItemSet * SvxDummyTextSource::GetEmptyItemSetPtr() diff --git a/editeng/source/uno/unoviwou.cxx b/editeng/source/uno/unoviwou.cxx index 6753fbb95093..a3554e572995 100644 --- a/editeng/source/uno/unoviwou.cxx +++ b/editeng/source/uno/unoviwou.cxx @@ -46,9 +46,9 @@ Point SvxDrawOutlinerViewForwarder::GetTextOffset() const return aOutputRect.TopLeft() - maTextShapeTopLeft; } -sal_Bool SvxDrawOutlinerViewForwarder::IsValid() const +bool SvxDrawOutlinerViewForwarder::IsValid() const { - return sal_True; + return true; } Rectangle SvxDrawOutlinerViewForwarder::GetVisArea() const diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx index 95624bd8d136..e716dc92c952 100644 --- a/include/editeng/unoedprx.hxx +++ b/include/editeng/unoedprx.hxx @@ -39,7 +39,7 @@ public: virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); - virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + virtual void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ); virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const; virtual sal_uInt16 CalcEditEngineIndex( sal_Int32 nPara, sal_Int32 nLogicalIndex ); @@ -57,7 +57,7 @@ public: virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor ); virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual LanguageType GetLanguage( sal_Int32, sal_Int32 ) const; virtual sal_Int32 GetFieldCount( sal_Int32 nPara ) const; @@ -67,21 +67,21 @@ public: virtual Rectangle GetParaBounds( sal_Int32 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; - virtual sal_Bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; + virtual bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; + virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; virtual bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false ) const; virtual sal_Int32 GetLineCount( sal_Int32 nPara ) const; virtual sal_Int32 GetLineLen( sal_Int32 nPara, sal_Int32 nLine ) const; - virtual void SetUpdateModeForAcc( sal_Bool bUp); - virtual sal_Bool GetUpdateModeForAcc() const; + virtual void SetUpdateModeForAcc( bool bUp); + virtual bool GetUpdateModeForAcc() const; virtual void GetLineBoundaries( /*out*/sal_Int32 &rStart, /*out*/sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) const; virtual sal_Int32 GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const; - virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const OUString&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual bool Delete( const ESelection& ); + virtual bool InsertText( const OUString&, const ESelection& ); + virtual bool QuickFormatDoc( bool bFull = false ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; - virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); + virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); @@ -93,9 +93,9 @@ public: //XTextCopy virtual void CopyText(const SvxTextForwarder& rSource); - void SetForwarder( SvxTextForwarder& ); - sal_Bool HaveImageBullet( sal_Int32 nPara ) const; - sal_Bool HaveTextBullet( sal_Int32 nPara ) const; + void SetForwarder( SvxTextForwarder& ); + bool HaveImageBullet( sal_Int32 nPara ) const; + bool HaveTextBullet( sal_Int32 nPara ) const; /** Query whether all text in given selection is editable @@ -103,7 +103,7 @@ public: be changed, and sal_False if e.g. a field or a bullet is contained therein. */ - sal_Bool IsEditable( const ESelection& rSelection ); + bool IsEditable( const ESelection& rSelection ); private: SvxTextForwarder* mpTextForwarder; @@ -117,7 +117,7 @@ public: virtual ~SvxAccessibleTextEditViewAdapter(); // SvxViewForwarder interface - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx index e8bccfc3c39e..8f117169b7ee 100644 --- a/include/editeng/unoedsrc.hxx +++ b/include/editeng/unoedsrc.hxx @@ -144,7 +144,7 @@ public: virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const = 0; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const = 0; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) = 0; - virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) = 0; + virtual void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) = 0; virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const = 0; virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0; @@ -164,16 +164,16 @@ public: // implementation functions for XParagraphAppend and XTextPortionAppend virtual void AppendParagraph() = 0; - virtual sal_Int32 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ) = 0; + virtual sal_Int32 AppendTextPortion( sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet ) = 0; // XTextCopy virtual void CopyText(const SvxTextForwarder& rSource) = 0; /** Query state of forwarder - @return sal_False, if no longer valid + @return false, if no longer valid */ - virtual sal_Bool IsValid() const = 0; + virtual bool IsValid() const = 0; /** Query language of character at given position on the underlying edit engine @@ -210,8 +210,8 @@ public: virtual EBulletInfo GetBulletInfo( sal_Int32 nPara ) const = 0; virtual OUString GetNumStr(sal_uInt16) const { return OUString(); } - virtual void SetUpdateModeForAcc(sal_Bool) {} - virtual sal_Bool GetUpdateModeForAcc() const { return sal_True; } + virtual void SetUpdateModeForAcc(bool) {} + virtual bool GetUpdateModeForAcc() const { return true; } /** Query the bounding rectangle of the given character @@ -279,10 +279,10 @@ public: @param rIndex[0 .. m-1] Index of character the point is over - @return sal_True, if the point is over any text and both rPara and rIndex are valid + @return true, if the point is over any text and both rPara and rIndex are valid */ - virtual sal_Bool GetIndexAtPoint( const Point& rPoint, sal_Int32& rPara, sal_Int32& rIndex ) const = 0; + virtual bool GetIndexAtPoint( const Point& rPoint, sal_Int32& rPara, sal_Int32& rIndex ) const = 0; /** Get the start and the end index of the word at the given index @@ -305,9 +305,9 @@ public: End index (in the same paragraph), this point to the last character still contained in the query - @return sal_True, if the result is non-empty + @return true, if the result is non-empty */ - virtual sal_Bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& rStart, sal_Int32& rEnd ) const = 0; + virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& rStart, sal_Int32& rEnd ) const = 0; /** Query range of similar attributes @@ -382,9 +382,9 @@ public: @param rSelection The text range to be deleted - @return sal_True if text has been successfully deleted + @return true if text has been successfully deleted */ - virtual sal_Bool Delete( const ESelection& rSelection ) = 0; + virtual bool Delete( const ESelection& rSelection ) = 0; /** Insert/Replace given text in given range and reformat text @@ -394,17 +394,17 @@ public: @param rSel Selection where text should be replaced. The empty selection inserts - @return sal_True if text has been successfully inserted + @return true if text has been successfully inserted */ - virtual sal_Bool InsertText( const OUString& rText, const ESelection& rSel ) = 0; + virtual bool InsertText( const OUString& rText, const ESelection& rSel ) = 0; /** Updates the formatting @see EditEngine::QuickFormatDoc() for details - @return sal_True if text have been successfully reformatted + @return true if text have been successfully reformatted */ - virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ) = 0; + virtual bool QuickFormatDoc( bool bFull = false ) = 0; /** Get the outline depth of given paragraph @@ -425,11 +425,11 @@ public: The depth to set on the given paragraph. The range is [0,n), where n is the maximal outline level. - @return sal_True, if depth could be successfully set. Reasons for + @return true, if depth could be successfully set. Reasons for failure are e.g. the text does not support outline level (EditEngine), or the depth range is exceeded. */ - virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) = 0; + virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) = 0; virtual sal_Int32 GetNumberingStartValue( sal_Int32 nPara ); virtual void SetNumberingStartValue( sal_Int32 nPara, sal_Int32 nNumberingStartValue ); @@ -453,7 +453,7 @@ public: @return sal_False, if no longer valid */ - virtual sal_Bool IsValid() const = 0; + virtual bool IsValid() const = 0; /** Query visible area of the view containing the text diff --git a/include/editeng/unofored.hxx b/include/editeng/unofored.hxx index 95b16188ace8..ea8a9cc99b8a 100644 --- a/include/editeng/unofored.hxx +++ b/include/editeng/unofored.hxx @@ -41,7 +41,7 @@ public: virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); - virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + virtual void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ); virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const; virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; @@ -56,7 +56,7 @@ public: virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor ); virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual LanguageType GetLanguage( sal_Int32, sal_Int32 ) const; virtual sal_Int32 GetFieldCount( sal_Int32 nPara ) const; @@ -66,18 +66,18 @@ public: virtual Rectangle GetParaBounds( sal_Int32 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; - virtual sal_Bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; + virtual bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; + virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; virtual bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false ) const; virtual sal_Int32 GetLineCount( sal_Int32 nPara ) const; virtual sal_Int32 GetLineLen( sal_Int32 nPara, sal_Int32 nLine ) const; virtual void GetLineBoundaries( /*out*/sal_Int32 &rStart, /*out*/sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) const; virtual sal_Int32 GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const; - virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const OUString&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual bool Delete( const ESelection& ); + virtual bool InsertText( const OUString&, const ESelection& ); + virtual bool QuickFormatDoc( bool bFull = false ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; - virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); + virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); diff --git a/include/editeng/unoforou.hxx b/include/editeng/unoforou.hxx index 1ea7f61f830b..5b9c719b1607 100644 --- a/include/editeng/unoforou.hxx +++ b/include/editeng/unoforou.hxx @@ -59,7 +59,7 @@ public: virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); - virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + virtual void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ); virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const; virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; @@ -73,9 +73,9 @@ public: virtual SfxItemPool* GetPool() const; virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ); + virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; Outliner& GetOutliner() const { return rOutliner; } @@ -87,18 +87,18 @@ public: virtual Rectangle GetParaBounds( sal_Int32 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; - virtual sal_Bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; + virtual bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; + virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; virtual bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false ) const; virtual sal_Int32 GetLineCount( sal_Int32 nPara ) const; virtual sal_Int32 GetLineLen( sal_Int32 nPara, sal_Int32 nLine ) const; virtual void GetLineBoundaries( /*out*/sal_Int32& rStart, /*out*/sal_Int32& rEnd, sal_Int32 nPara, sal_Int32 nLine ) const; virtual sal_Int32 GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const; - virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const OUString&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual bool Delete( const ESelection& ); + virtual bool InsertText( const OUString&, const ESelection& ); + virtual bool QuickFormatDoc( bool bFull = false ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; - virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); + virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); virtual sal_Int32 GetNumberingStartValue( sal_Int32 nPara ); virtual void SetNumberingStartValue( sal_Int32 nPara, sal_Int32 nNumberingStartValue ); diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx index d43478d0c6bf..72f7523221f6 100644 --- a/include/editeng/unotext.hxx +++ b/include/editeng/unotext.hxx @@ -178,7 +178,7 @@ public: virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); - virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + virtual void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ); virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const; sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; @@ -194,7 +194,7 @@ public: virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor ); virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual void SetNotifyHdl( const Link& ); virtual LanguageType GetLanguage( sal_Int32, sal_Int32 ) const; @@ -205,18 +205,18 @@ public: virtual Rectangle GetParaBounds( sal_Int32 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; - virtual sal_Bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; + virtual bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; + virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; virtual bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false ) const; virtual sal_Int32 GetLineCount( sal_Int32 nPara ) const; virtual sal_Int32 GetLineLen( sal_Int32 nPara, sal_Int32 nLine ) const; virtual void GetLineBoundaries( /*out*/sal_Int32 &rStart, /*out*/sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) const; virtual sal_Int32 GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const; - virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const OUString&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual bool Delete( const ESelection& ); + virtual bool InsertText( const OUString&, const ESelection& ); + virtual bool QuickFormatDoc( bool bFull = false ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; - virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); + virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); diff --git a/include/editeng/unoviwou.hxx b/include/editeng/unoviwou.hxx index ff3e8dec86e8..3c6ebe927d1c 100644 --- a/include/editeng/unoviwou.hxx +++ b/include/editeng/unoviwou.hxx @@ -39,7 +39,7 @@ public: SvxDrawOutlinerViewForwarder( OutlinerView& rOutl, const Point& rShapePosTopLeft ); virtual ~SvxDrawOutlinerViewForwarder(); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/include/svx/unoshtxt.hxx b/include/svx/unoshtxt.hxx index fd30b64a7a10..09dee0d33627 100644 --- a/include/svx/unoshtxt.hxx +++ b/include/svx/unoshtxt.hxx @@ -71,7 +71,7 @@ public: void unlock(); // the SvxViewForwarder interface - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point&, const MapMode& ) const; virtual Point PixelToLogic( const Point&, const MapMode& ) const; diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index b644e1a18e32..a3da6e364b89 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -56,7 +56,7 @@ public: ScViewForwarder(ScTabViewShell* pViewShell, ScSplitPos eSplitPos, const ScAddress& rCell); virtual ~ScViewForwarder(); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -76,7 +76,7 @@ ScViewForwarder::~ScViewForwarder() { } -sal_Bool ScViewForwarder::IsValid() const +bool ScViewForwarder::IsValid() const { return mpViewShell != NULL; } @@ -156,7 +156,7 @@ public: const EditView* _pEditView); virtual ~ScEditObjectViewForwarder(); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -176,7 +176,7 @@ ScEditObjectViewForwarder::~ScEditObjectViewForwarder() { } -sal_Bool ScEditObjectViewForwarder::IsValid() const +bool ScEditObjectViewForwarder::IsValid() const { return (mpWindow != NULL); } @@ -255,7 +255,7 @@ public: ScPreviewViewForwarder(ScPreviewShell* pViewShell); virtual ~ScPreviewViewForwarder(); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -280,7 +280,7 @@ ScPreviewViewForwarder::~ScPreviewViewForwarder() delete mpTableInfo; } -sal_Bool ScPreviewViewForwarder::IsValid() const +bool ScPreviewViewForwarder::IsValid() const { return mpViewShell != NULL; } @@ -556,7 +556,7 @@ public: ScEditViewForwarder(EditView* pEditView, Window* pWin); virtual ~ScEditViewForwarder(); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -582,14 +582,9 @@ ScEditViewForwarder::~ScEditViewForwarder() { } -sal_Bool ScEditViewForwarder::IsValid() const +bool ScEditViewForwarder::IsValid() const { - sal_Bool bResult(false); - if (mpWindow && mpEditView) - { - bResult = sal_True; - } - return bResult; + return mpWindow && mpEditView; } Rectangle ScEditViewForwarder::GetVisArea() const @@ -1670,7 +1665,7 @@ class ScCsvViewForwarder : public SvxViewForwarder public: explicit ScCsvViewForwarder( Window* pWindow, const Rectangle& rBoundBox ); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -1684,7 +1679,7 @@ ScCsvViewForwarder::ScCsvViewForwarder( Window* pWindow, const Rectangle& rBound { } -sal_Bool ScCsvViewForwarder::IsValid() const +bool ScCsvViewForwarder::IsValid() const { return mpWindow != NULL; } diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx index a5ac5a682673..f5e494288dfa 100644 --- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx +++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx @@ -103,7 +103,7 @@ namespace accessibility return *( const_cast< AccessibleOutlineEditSource* > (this) ); } - sal_Bool AccessibleOutlineEditSource::IsValid() const + bool AccessibleOutlineEditSource::IsValid() const { if( mpOutliner && mpOutlinerView ) { @@ -113,11 +113,11 @@ namespace accessibility for( nCurrView=0, nViews=mpOutliner->GetViewCount(); nCurrView<nViews; ++nCurrView ) { if( mpOutliner->GetView(nCurrView) == mpOutlinerView ) - return sal_True; + return true; } } - return sal_False; + return false; } Rectangle AccessibleOutlineEditSource::GetVisArea() const diff --git a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx index bbbb4da91dfb..f10f217984bb 100644 --- a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx +++ b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx @@ -64,7 +64,7 @@ namespace accessibility virtual SfxBroadcaster& GetBroadcaster() const; // the view forwarder - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 7054b71285d3..58b67eab60ee 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -878,7 +878,7 @@ SmViewForwarder::~SmViewForwarder() { } -sal_Bool SmViewForwarder::IsValid() const +bool SmViewForwarder::IsValid() const { return rEditAcc.GetEditView() != 0; } @@ -1060,7 +1060,7 @@ SfxItemPool* SmTextForwarder::GetPool() const return pEditEngine ? pEditEngine->GetEmptyItemSet().GetPool() : 0; } -void SmTextForwarder::RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) +void SmTextForwarder::RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) { EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) @@ -1102,12 +1102,12 @@ void SmTextForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelection& pEditEngine->QuickSetAttribs( rSet, rSel ); } -sal_Bool SmTextForwarder::IsValid() const +bool SmTextForwarder::IsValid() const { EditEngine *pEditEngine = rEditAcc.GetEditEngine(); // cannot reliably query EditEngine state // while in the middle of an update - return pEditEngine ? pEditEngine->GetUpdateMode() : sal_False; + return pEditEngine && pEditEngine->GetUpdateMode(); } OUString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor ) @@ -1308,23 +1308,23 @@ OutputDevice* SmTextForwarder::GetRefDevice() const return pEditEngine ? pEditEngine->GetRefDevice() : 0; } -sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nPara, sal_Int32& nIndex ) const +bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, sal_Int32& nPara, sal_Int32& nIndex ) const { - sal_Bool bRes = sal_False; + bool bRes = false; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) { EPosition aDocPos = pEditEngine->FindDocPosition( rPos ); nPara = aDocPos.nPara; nIndex = aDocPos.nIndex; - bRes = sal_True; + bRes = true; } return bRes; } -sal_Bool SmTextForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const +bool SmTextForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const { - sal_Bool bRes = sal_False; + bool bRes = false; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) { @@ -1336,7 +1336,7 @@ sal_Bool SmTextForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal nStart = aRes.nStartPos; nEnd = aRes.nEndPos; - bRes = sal_True; + bRes = true; } } @@ -1377,14 +1377,14 @@ sal_Int32 SmTextForwarder::GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nInd return pEditEngine ? pEditEngine->GetLineNumberAtIndex(nPara, nIndex) : 0; } -sal_Bool SmTextForwarder::QuickFormatDoc( sal_Bool /*bFull*/ ) +bool SmTextForwarder::QuickFormatDoc( bool /*bFull*/ ) { - sal_Bool bRes = sal_False; + bool bRes = false; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) { pEditEngine->QuickFormatDoc(); - bRes = sal_True; + bRes = true; } return bRes; } @@ -1395,34 +1395,34 @@ sal_Int16 SmTextForwarder::GetDepth( sal_Int32 /*nPara*/ ) const return -1; } -sal_Bool SmTextForwarder::SetDepth( sal_Int32 /*nPara*/, sal_Int16 nNewDepth ) +bool SmTextForwarder::SetDepth( sal_Int32 /*nPara*/, sal_Int16 nNewDepth ) { // math has no outliner... return -1 == nNewDepth; // is it the value from 'GetDepth' ? } -sal_Bool SmTextForwarder::Delete( const ESelection& rSelection ) +bool SmTextForwarder::Delete( const ESelection& rSelection ) { - sal_Bool bRes = sal_False; + bool bRes = false; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) { pEditEngine->QuickDelete( rSelection ); pEditEngine->QuickFormatDoc(); - bRes = sal_True; + bRes = true; } return bRes; } -sal_Bool SmTextForwarder::InsertText( const OUString& rStr, const ESelection& rSelection ) +bool SmTextForwarder::InsertText( const OUString& rStr, const ESelection& rSelection ) { - sal_Bool bRes = sal_False; + bool bRes = false; EditEngine *pEditEngine = rEditAcc.GetEditEngine(); if (pEditEngine) { pEditEngine->QuickInsertText( rStr, rSelection ); pEditEngine->QuickFormatDoc(); - bRes = sal_True; + bRes = true; } return bRes; } @@ -1493,7 +1493,7 @@ SmEditViewForwarder::~SmEditViewForwarder() { } -sal_Bool SmEditViewForwarder::IsValid() const +bool SmEditViewForwarder::IsValid() const { return rEditAcc.GetEditView() != 0; } diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx index 9cc2578f512c..dc3025e0e377 100644 --- a/starmath/source/accessibility.hxx +++ b/starmath/source/accessibility.hxx @@ -178,7 +178,7 @@ public: SmViewForwarder( SmEditAccessible &rAcc ); virtual ~SmViewForwarder(); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; @@ -207,7 +207,7 @@ public: virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const; virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const; virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ); - virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ); + virtual void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ); virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const; virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const; @@ -220,9 +220,9 @@ public: virtual SfxItemPool* GetPool() const; - virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor ); - virtual void FieldClicked(const SvxFieldItem&, sal_Int32, sal_Int32); - virtual sal_Bool IsValid() const; + virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rpTxtColor, Color*& rpFldColor ); + virtual void FieldClicked(const SvxFieldItem&, sal_Int32, sal_Int32); + virtual bool IsValid() const; virtual LanguageType GetLanguage( sal_Int32, sal_Int32 ) const; virtual sal_Int32 GetFieldCount( sal_Int32 nPara ) const; @@ -232,19 +232,19 @@ public: virtual Rectangle GetParaBounds( sal_Int32 nPara ) const; virtual MapMode GetMapMode() const; virtual OutputDevice* GetRefDevice() const; - virtual sal_Bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; - virtual sal_Bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; + virtual bool GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_Int32& nIndex ) const; + virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int32& nStart, sal_Int32& nEnd ) const; virtual bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell = false ) const; virtual sal_Int32 GetLineCount( sal_Int32 nPara ) const; virtual sal_Int32 GetLineLen( sal_Int32 nPara, sal_Int32 nLine ) const; virtual void GetLineBoundaries( /*out*/sal_Int32 &rStart, /*out*/sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) const; virtual sal_Int32 GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nLine ) const; - virtual sal_Bool Delete( const ESelection& ); - virtual sal_Bool InsertText( const OUString&, const ESelection& ); - virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False ); + virtual bool Delete( const ESelection& ); + virtual bool InsertText( const OUString&, const ESelection& ); + virtual bool QuickFormatDoc( bool bFull = false ); virtual sal_Int16 GetDepth( sal_Int32 nPara ) const; - virtual sal_Bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); + virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ); virtual const SfxItemSet* GetEmptyItemSetPtr(); // implementation functions for XParagraphAppend and XTextPortionAppend @@ -268,7 +268,7 @@ public: SmEditViewForwarder( SmEditAccessible& rAcc ); virtual ~SmEditViewForwarder(); - virtual sal_Bool IsValid() const; + virtual bool IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index a72297b256ed..75273ef962dc 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -107,7 +107,7 @@ namespace accessibility } SfxItemSet GetParaAttribs( sal_Int32 /*nPara*/ ) const { return GetAttribs(ESelection()); } void SetParaAttribs( sal_Int32 /*nPara*/, const SfxItemSet& /*rSet*/ ) {} - void RemoveAttribs( const ESelection& /*rSelection*/, sal_Bool /*bRemoveParaAttribs*/, sal_uInt16 /*nWhich*/ ){} + void RemoveAttribs( const ESelection& /*rSelection*/, bool /*bRemoveParaAttribs*/, sal_uInt16 /*nWhich*/ ){} void GetPortions( sal_Int32 /*nPara*/, std::vector<sal_Int32>& /*rList*/ ) const {} sal_uInt16 GetItemState( const ESelection& /*rSel*/, sal_uInt16 /*nWhich*/ ) const { return 0; } @@ -134,7 +134,7 @@ namespace accessibility } void FieldClicked( const SvxFieldItem&, sal_Int32, sal_Int32 ) {;} - sal_Bool IsValid() const { return sal_True; } + bool IsValid() const { return true; } void SetNotifyHdl( const Link& ) {} LanguageType GetLanguage( sal_Int32, sal_Int32 ) const { return LANGUAGE_DONTKNOW; } @@ -145,8 +145,8 @@ namespace accessibility Rectangle GetParaBounds( sal_Int32 ) const { return Rectangle(); } MapMode GetMapMode() const { return MapMode(); } OutputDevice* GetRefDevice() const { return NULL; } - sal_Bool GetIndexAtPoint( const Point&, sal_Int32&, sal_Int32& ) const { return sal_False; } - sal_Bool GetWordIndices( sal_Int32, sal_Int32, sal_Int32&, sal_Int32& ) const { return sal_False; } + bool GetIndexAtPoint( const Point&, sal_Int32&, sal_Int32& ) const { return false; } + bool GetWordIndices( sal_Int32, sal_Int32, sal_Int32&, sal_Int32& ) const { return false; } bool GetAttributeRun( sal_Int32&, sal_Int32&, sal_Int32, sal_Int32, bool ) const { return false; } sal_Int32 GetLineCount( sal_Int32 nPara ) const { return nPara == 0 ? 1 : 0; } sal_Int32 GetLineLen( sal_Int32, sal_Int32 ) const { return 0; } @@ -161,11 +161,11 @@ namespace accessibility // when that changes: via accessibility API, it would no // longer be possible to enter text in previously empty // shapes). - sal_Bool Delete( const ESelection& ) { return sal_False; } - sal_Bool InsertText( const OUString&, const ESelection& ) { return sal_False; } - sal_Bool QuickFormatDoc( sal_Bool ) { return sal_True; } + bool Delete( const ESelection& ) { return false; } + bool InsertText( const OUString&, const ESelection& ) { return false; } + bool QuickFormatDoc( bool ) { return true; } sal_Int16 GetDepth( sal_Int32 ) const { return -1; } - sal_Bool SetDepth( sal_Int32, sal_Int16 ) { return sal_True; } + bool SetDepth( sal_Int32, sal_Int16 ) { return true; } Rectangle GetVisArea() const { return Rectangle(); } Point LogicToPixel( const Point& rPoint, const MapMode& /*rMapMode*/ ) const { return rPoint; } diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 070c065f532f..99e95d3cc487 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -1120,7 +1120,7 @@ void SvxTextEditSource::unlock() mpImpl->unlock(); } -sal_Bool SvxTextEditSource::IsValid() const +bool SvxTextEditSource::IsValid() const { return mpImpl->IsValid(); } |