summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-07-28 15:20:51 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-07-28 15:34:29 +0200
commitcc7ff6d890ab2cacc7f0273039b15689dad5e0dd (patch)
treedc2edee383227780e915747e1023ba89510d28bb /editeng
parent96c8255875c0ce45c6621999cc1bc4d9a429cb16 (diff)
Three identical functions for a class is a bit too much
Change-Id: Ia949f3fe2cbbc8aa524347854faa23807d58e252 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119606 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/outliner/outliner.cxx20
-rw-r--r--editeng/source/outliner/outlvw.cxx24
2 files changed, 22 insertions, 22 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 49ac38415987..7ffa2de88589 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -194,7 +194,7 @@ void Outliner::Init( OutlinerMode nMode )
SetMaxDepth( 9 );
- switch ( ImplGetOutlinerMode() )
+ switch ( GetOutlinerMode() )
{
case OutlinerMode::TextObject:
case OutlinerMode::TitleObject:
@@ -249,7 +249,7 @@ void Outliner::SetDepth( Paragraph* pPara, sal_Int16 nNewDepth )
ImplInitDepth( nPara, nNewDepth, true );
ImplCalcBulletText( nPara, false, false );
- if ( ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
+ if ( GetOutlinerMode() == OutlinerMode::OutlineObject )
ImplSetLevelDependentStyleSheet( nPara );
DepthChangedHdl(pPara, nPrevFlags);
@@ -374,7 +374,7 @@ std::unique_ptr<OutlinerParaObject> Outliner::CreateParaObject( sal_Int32 nStart
return nullptr;
std::unique_ptr<EditTextObject> xText = pEditEngine->CreateTextObject( nStartPara, nCount );
- const bool bIsEditDoc(OutlinerMode::TextObject == ImplGetOutlinerMode());
+ const bool bIsEditDoc(OutlinerMode::TextObject == GetOutlinerMode());
ParagraphDataVector aParagraphDataVector(nCount);
const sal_Int32 nLastPara(nStartPara + nCount - 1);
@@ -384,7 +384,7 @@ std::unique_ptr<OutlinerParaObject> Outliner::CreateParaObject( sal_Int32 nStart
}
std::unique_ptr<OutlinerParaObject> pPObj(new OutlinerParaObject(std::move(xText), aParagraphDataVector, bIsEditDoc));
- pPObj->SetOutlinerMode(GetMode());
+ pPObj->SetOutlinerMode(GetOutlinerMode());
return pPObj;
}
@@ -443,8 +443,8 @@ void Outliner::SetText( const OUString& rText, Paragraph* pPara )
// In the outliner mode, filter the tabs and set the indentation
// about a LRSpaceItem. In EditEngine mode intend over old tabs
- if( ( ImplGetOutlinerMode() == OutlinerMode::OutlineObject ) ||
- ( ImplGetOutlinerMode() == OutlinerMode::OutlineView ) )
+ if( ( GetOutlinerMode() == OutlinerMode::OutlineObject ) ||
+ ( GetOutlinerMode() == OutlinerMode::OutlineView ) )
{
// Extract Tabs
sal_Int32 nTabs = 0;
@@ -686,7 +686,7 @@ void Outliner::ImplCheckNumBulletItem( sal_Int32 nPara )
void Outliner::ImplSetLevelDependentStyleSheet( sal_Int32 nPara )
{
- DBG_ASSERT( ( ImplGetOutlinerMode() == OutlinerMode::OutlineObject ) || ( ImplGetOutlinerMode() == OutlinerMode::OutlineView ), "SetLevelDependentStyleSheet: Wrong Mode!" );
+ DBG_ASSERT( ( GetOutlinerMode() == OutlinerMode::OutlineObject ) || ( GetOutlinerMode() == OutlinerMode::OutlineView ), "SetLevelDependentStyleSheet: Wrong Mode!" );
SfxStyleSheet* pStyle = GetStyleSheet( nPara );
@@ -1189,7 +1189,7 @@ void Outliner::ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount )
while( nCount && pPara )
{
- if( ImplGetOutlinerMode() != OutlinerMode::TextObject )
+ if( GetOutlinerMode() != OutlinerMode::TextObject )
{
nDepthChangedHdlPrevDepth = pPara->GetDepth();
ParaFlag nPrevFlags = pPara->nFlags;
@@ -1240,7 +1240,7 @@ bool Outliner::ImpCanIndentSelectedPages( OutlinerView* pCurView )
// If the first paragraph is on level 0 it can not indented in any case,
// possible there might be indentations in the following on the 0 level.
- if ( ( mnFirstSelPage == 0 ) && ( ImplGetOutlinerMode() != OutlinerMode::TextObject ) )
+ if ( ( mnFirstSelPage == 0 ) && ( GetOutlinerMode() != OutlinerMode::TextObject ) )
{
if ( nDepthChangedHdlPrevDepth == 1 ) // is the only page
return false;
@@ -2123,7 +2123,7 @@ std::unique_ptr<OutlinerParaObject> Outliner::GetEmptyParaObject() const
{
std::unique_ptr<EditTextObject> pEmptyText = pEditEngine->GetEmptyTextObject();
std::unique_ptr<OutlinerParaObject> pPObj( new OutlinerParaObject( std::move(pEmptyText) ));
- pPObj->SetOutlinerMode(GetMode());
+ pPObj->SetOutlinerMode(GetOutlinerMode());
return pPObj;
}
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 6cd2f6d7515e..cdac21edf282 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -121,7 +121,7 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window const * pFra
break;
case KeyFuncType::DELETE:
{
- if( !bReadOnly && !bSelection && ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TextObject ) )
+ if( !bReadOnly && !bSelection && ( pOwner->GetOutlinerMode() != OutlinerMode::TextObject ) )
{
if( aSel.nEndPos == pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) )
{
@@ -147,14 +147,14 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window const * pFra
{
if ( !bReadOnly && !aKeyCode.IsMod1() && !aKeyCode.IsMod2() )
{
- if ( ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TextObject ) &&
- ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TitleObject ) &&
+ if ( ( pOwner->GetOutlinerMode() != OutlinerMode::TextObject ) &&
+ ( pOwner->GetOutlinerMode() != OutlinerMode::TitleObject ) &&
( bSelection || !aSel.nStartPos ) )
{
Indent( aKeyCode.IsShift() ? -1 : +1 );
bKeyProcessed = true;
}
- else if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) &&
+ else if ( ( pOwner->GetOutlinerMode() == OutlinerMode::TextObject ) &&
!bSelection && !aSel.nEndPos && pOwner->ImplHasNumberFormat( aSel.nEndPara ) )
{
Indent( aKeyCode.IsShift() ? -1 : +1 );
@@ -284,7 +284,7 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa
bool OutlinerView::MouseMove( const MouseEvent& rMEvt )
{
- if( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode())
+ if( ( pOwner->GetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode())
return pEditView->MouseMove( rMEvt );
Point aMousePosWin( pEditView->GetOutputDevice().PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -299,7 +299,7 @@ bool OutlinerView::MouseMove( const MouseEvent& rMEvt )
bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
{
- if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() )
+ if ( ( pOwner->GetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() )
return pEditView->MouseButtonDown( rMEvt );
Point aMousePosWin( pEditView->GetOutputDevice().PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -331,7 +331,7 @@ bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
}
// special case for outliner view in impress, check if double click hits the page icon for toggle
- if( (nPara == EE_PARA_NOT_FOUND) && (pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineView) && (eTarget == MouseTarget::Text) && (rMEvt.GetClicks() == 2) )
+ if( (nPara == EE_PARA_NOT_FOUND) && (pOwner->GetOutlinerMode() == OutlinerMode::OutlineView) && (eTarget == MouseTarget::Text) && (rMEvt.GetClicks() == 2) )
{
ESelection aSel( pEditView->GetSelection() );
nPara = aSel.nStartPara;
@@ -347,7 +347,7 @@ bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
bool OutlinerView::MouseButtonUp( const MouseEvent& rMEvt )
{
- if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() )
+ if ( ( pOwner->GetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() )
return pEditView->MouseButtonUp( rMEvt );
Point aMousePosWin( pEditView->GetOutputDevice().PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -503,7 +503,7 @@ void OutlinerView::Indent( short nDiff )
if( nOldDepth != nNewDepth )
{
- if ( ( nPara == aSel.nStartPara ) && aSel.nStartPara && ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TextObject ))
+ if ( ( nPara == aSel.nStartPara ) && aSel.nStartPara && ( pOwner->GetOutlinerMode() != OutlinerMode::TextObject ))
{
// Special case: the predecessor of an indented paragraph is
// invisible and is now on the same level as the visible
@@ -534,7 +534,7 @@ void OutlinerView::Indent( short nDiff )
pOwner->ImplInitDepth( nPara, nNewDepth, true );
pOwner->ImplCalcBulletText( nPara, false, false );
- if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
+ if ( pOwner->GetOutlinerMode() == OutlinerMode::OutlineObject )
pOwner->ImplSetLevelDependentStyleSheet( nPara );
// Notify App
@@ -690,7 +690,7 @@ void OutlinerView::Paste( bool bUseSpecial )
else
pEditView->Paste();
- if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
+ if ( pOwner->GetOutlinerMode() == OutlinerMode::OutlineObject )
{
const sal_Int32 nParaCount = pOwner->pEditEngine->GetParagraphCount();
@@ -1365,7 +1365,7 @@ void OutlinerView::Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueItera
for ( sal_Int32 n = nChangesStart; n <= nChangesEnd; n++ )
{
- if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
+ if ( pOwner->GetOutlinerMode() == OutlinerMode::OutlineObject )
pOwner->ImplSetLevelDependentStyleSheet( n );
}