summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx2
-rw-r--r--editeng/source/editeng/editobj.cxx14
-rw-r--r--editeng/source/editeng/editobj2.hxx7
-rw-r--r--editeng/source/outliner/outliner.cxx26
-rw-r--r--editeng/source/outliner/outlobj.cxx4
-rw-r--r--editeng/source/outliner/outlvw.cxx24
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--include/editeng/editobj.hxx5
-rw-r--r--include/editeng/outliner.hxx35
-rw-r--r--include/editeng/outlobj.hxx5
-rw-r--r--include/svx/svdetc.hxx4
-rw-r--r--include/svx/svdmodel.hxx2
-rw-r--r--include/svx/svdoutl.hxx2
-rw-r--r--include/svx/svdtext.hxx3
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/ui/drawfunc/futext2.cxx2
-rw-r--r--sc/source/ui/unoobj/editsrc.cxx2
-rw-r--r--sd/inc/Outliner.hxx12
-rw-r--r--sd/source/core/drawdoc.cxx12
-rw-r--r--sd/source/core/drawdoc4.cxx6
-rw-r--r--sd/source/core/sdpage.cxx14
-rw-r--r--sd/source/core/text/textapi.cxx4
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx2
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx2
-rw-r--r--sd/source/ui/dlg/SpellDialogChildWindow.cxx2
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx4
-rw-r--r--sd/source/ui/func/fuexpand.cxx8
-rw-r--r--sd/source/ui/func/fuhhconv.cxx4
-rw-r--r--sd/source/ui/func/fuinsfil.cxx4
-rw-r--r--sd/source/ui/func/fusearch.cxx4
-rw-r--r--sd/source/ui/func/fusumry.cxx4
-rw-r--r--sd/source/ui/func/futext.cxx2
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx8
-rw-r--r--sd/source/ui/view/Outliner.cxx2
-rw-r--r--sd/source/ui/view/drtxtob.cxx6
-rw-r--r--sd/source/ui/view/drviews2.cxx4
-rw-r--r--sd/source/ui/view/drviewse.cxx4
-rw-r--r--sd/source/ui/view/outlnvsh.cxx6
-rw-r--r--sd/source/ui/view/outlview.cxx2
-rw-r--r--sd/source/ui/view/sdview.cxx6
-rw-r--r--svx/source/inc/svdoutlinercache.hxx4
-rw-r--r--svx/source/sdr/properties/textproperties.cxx2
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdetc.cxx2
-rw-r--r--svx/source/svdraw/svdmodel.cxx8
-rw-r--r--svx/source/svdraw/svdotext.cxx8
-rw-r--r--svx/source/svdraw/svdotxed.cxx4
-rw-r--r--svx/source/svdraw/svdoutl.cxx6
-rw-r--r--svx/source/svdraw/svdoutlinercache.cxx12
-rw-r--r--svx/source/svdraw/svdtext.cxx2
-rw-r--r--svx/source/table/cell.cxx6
-rw-r--r--svx/source/table/svdotable.cxx2
-rw-r--r--svx/source/table/tablecontroller.cxx2
-rw-r--r--svx/source/table/tablertfimporter.cxx2
-rw-r--r--svx/source/unodraw/unoshtxt.cxx4
-rw-r--r--sw/source/core/fields/textapi.cxx6
-rw-r--r--sw/source/filter/html/htmldrawwriter.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx4
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx2
-rw-r--r--sw/source/uibase/lingu/sdrhhcwrap.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx2
63 files changed, 182 insertions, 171 deletions
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 75a1b07481ed..b96c3f3ee987 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -99,7 +99,7 @@ OutputDevice * lcl_GetParentRefDevice( const uno::Reference< frame::XModel > & x
DrawViewWrapper::DrawViewWrapper( SdrModel* pSdrModel, OutputDevice* pOut)
: E3dView(pSdrModel, pOut)
, m_pMarkHandleProvider(nullptr)
- , m_apOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel))
+ , m_apOutliner(SdrMakeOutliner(OutlinerMode::TextObject, *pSdrModel))
, m_bRestoreMapMode( false )
{
SetBufferedOutputAllowed(true);
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 7190147e28e1..06ac06998e75 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -321,12 +321,12 @@ const SfxItemPool* EditTextObject::GetPool() const
return mpImpl->GetPool();
}
-sal_uInt16 EditTextObject::GetUserType() const
+OutlinerMode EditTextObject::GetUserType() const
{
return mpImpl->GetUserType();
}
-void EditTextObject::SetUserType( sal_uInt16 n )
+void EditTextObject::SetUserType( OutlinerMode n )
{
mpImpl->SetUserType(n);
}
@@ -510,7 +510,7 @@ EditTextObjectImpl::EditTextObjectImpl( EditTextObject* pFront, SfxItemPool* pP
{
nVersion = 0;
nMetric = 0xFFFF;
- nUserType = 0;
+ nUserType = OutlinerMode::DontKnow;
nObjSettings = 0;
pPortionInfo = nullptr;
@@ -604,7 +604,7 @@ EditTextObjectImpl::~EditTextObjectImpl()
}
-void EditTextObjectImpl::SetUserType( sal_uInt16 n )
+void EditTextObjectImpl::SetUserType( OutlinerMode n )
{
nUserType = n;
}
@@ -1207,7 +1207,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
rOStream.WriteUInt16( nMetric );
- rOStream.WriteUInt16( nUserType );
+ rOStream.WriteUInt16( (sal_uInt16)nUserType );
rOStream.WriteUInt32( nObjSettings );
rOStream.WriteBool( bVertical );
@@ -1454,7 +1454,9 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
if ( nVersion >= 600 )
{
- rIStream.ReadUInt16( nUserType );
+ sal_uInt16 nTmp;
+ rIStream.ReadUInt16( nTmp );
+ nUserType = (OutlinerMode)nTmp;
rIStream.ReadUInt32( nObjSettings );
}
diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx
index aeeab195b27a..289427ffceac 100644
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -22,6 +22,7 @@
#include <editeng/editobj.hxx>
#include <editeng/fieldupdater.hxx>
+#include <editeng/outliner.hxx>
#include <editdoc.hxx>
#include <unotools/fontcvt.hxx>
@@ -171,7 +172,7 @@ private:
sal_uInt32 nObjSettings;
sal_uInt16 nMetric;
sal_uInt16 nVersion;
- sal_uInt16 nUserType;
+ OutlinerMode nUserType;
SvtScriptType nScriptType;
bool bOwnerOfPool:1;
@@ -192,8 +193,8 @@ public:
EditTextObjectImpl(const EditTextObjectImpl&) = delete;
EditTextObjectImpl& operator=(const EditTextObjectImpl&) = delete;
- sal_uInt16 GetUserType() const { return nUserType;}
- void SetUserType( sal_uInt16 n );
+ OutlinerMode GetUserType() const { return nUserType;}
+ void SetUserType( OutlinerMode n );
void NormalizeString( svl::SharedStringPool& rPool );
std::vector<svl::SharedString> GetSharedStrings() const;
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 12ae4165f32f..906367c796e1 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -193,7 +193,7 @@ void Outliner::ParagraphDeleted( sal_Int32 nPara )
}
}
-void Outliner::Init( sal_uInt16 nMode )
+void Outliner::Init( OutlinerMode nMode )
{
nOutlinerMode = nMode;
@@ -206,14 +206,14 @@ void Outliner::Init( sal_uInt16 nMode )
switch ( ImplGetOutlinerMode() )
{
- case OUTLINERMODE_TEXTOBJECT:
- case OUTLINERMODE_TITLEOBJECT:
+ case OutlinerMode::TextObject:
+ case OutlinerMode::TitleObject:
break;
- case OUTLINERMODE_OUTLINEOBJECT:
+ case OutlinerMode::OutlineObject:
nCtrl |= EEControlBits::OUTLINER2;
break;
- case OUTLINERMODE_OUTLINEVIEW:
+ case OutlinerMode::OutlineView:
nCtrl |= EEControlBits::OUTLINER;
break;
@@ -259,7 +259,7 @@ void Outliner::SetDepth( Paragraph* pPara, sal_Int16 nNewDepth )
ImplInitDepth( nPara, nNewDepth, true );
ImplCalcBulletText( nPara, false, false );
- if ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+ if ( ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
ImplSetLevelDependendStyleSheet( nPara );
DepthChangedHdl();
@@ -385,7 +385,7 @@ OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32
return nullptr;
EditTextObject* pText = pEditEngine->CreateTextObject( nStartPara, nCount );
- const bool bIsEditDoc(OUTLINERMODE_TEXTOBJECT == ImplGetOutlinerMode());
+ const bool bIsEditDoc(OutlinerMode::TextObject == ImplGetOutlinerMode());
ParagraphDataVector aParagraphDataVector(nCount);
const sal_Int32 nLastPara(nStartPara + nCount - 1);
@@ -448,8 +448,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( ( ImplGetOutlinerMode() == OutlinerMode::OutlineObject ) ||
+ ( ImplGetOutlinerMode() == OutlinerMode::OutlineView ) )
{
// Extract Tabs
sal_uInt16 nTabs = 0;
@@ -693,7 +693,7 @@ void Outliner::ImplCheckNumBulletItem( sal_Int32 nPara )
void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara )
{
- DBG_ASSERT( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) || ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ), "SetLevelDependendStyleSheet: Wrong Mode!" );
+ DBG_ASSERT( ( ImplGetOutlinerMode() == OutlinerMode::OutlineObject ) || ( ImplGetOutlinerMode() == OutlinerMode::OutlineView ), "SetLevelDependendStyleSheet: Wrong Mode!" );
SfxStyleSheet* pStyle = GetStyleSheet( nPara );
@@ -1181,7 +1181,7 @@ void Outliner::ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount )
while( nCount && pPara )
{
- if( ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT )
+ if( ImplGetOutlinerMode() != OutlinerMode::TextObject )
{
nDepthChangedHdlPrevDepth = pPara->GetDepth();
mnDepthChangeHdlPrevFlags = pPara->nFlags;
@@ -1234,7 +1234,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 ) && ( ImplGetOutlinerMode() != OutlinerMode::TextObject ) )
{
if ( nDepthChangedHdlPrevDepth == 1 ) // is the only page
return false;
@@ -1252,7 +1252,7 @@ bool Outliner::ImpCanDeleteSelectedPages( OutlinerView* pCurView )
return RemovingPagesHdl( pCurView );
}
-Outliner::Outliner(SfxItemPool* pPool, sal_uInt16 nMode)
+Outliner::Outliner(SfxItemPool* pPool, OutlinerMode nMode)
: pHdlParagraph(nullptr)
, mnFirstSelPage(0)
, nDepthChangedHdlPrevDepth(0)
diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx
index 9b6512039ec0..9e67af1dee54 100644
--- a/editeng/source/outliner/outlobj.cxx
+++ b/editeng/source/outliner/outlobj.cxx
@@ -110,12 +110,12 @@ bool OutlinerParaObject::isWrongListEqual( const OutlinerParaObject& r ) const
return mpImpl->isWrongListEqual(*r.mpImpl);
}
-sal_uInt16 OutlinerParaObject::GetOutlinerMode() const
+OutlinerMode OutlinerParaObject::GetOutlinerMode() const
{
return mpImpl->mpEditTextObject->GetUserType();
}
-void OutlinerParaObject::SetOutlinerMode(sal_uInt16 nNew)
+void OutlinerParaObject::SetOutlinerMode(OutlinerMode nNew)
{
// create a const pointer to avoid an early call to
// make_unique() in the dereference of mpImpl
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index c4891e228286..5f5a8d1b3df3 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -122,7 +122,7 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window* pFrameWin )
break;
case KeyFuncType::DELETE:
{
- if( !bReadOnly && !bSelection && ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) )
+ if( !bReadOnly && !bSelection && ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TextObject ) )
{
if( aSel.nEndPos == pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) )
{
@@ -148,14 +148,14 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, vcl::Window* pFrameWin )
{
if ( !bReadOnly && !aKeyCode.IsMod1() && !aKeyCode.IsMod2() )
{
- if ( ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TEXTOBJECT ) &&
- ( pOwner->ImplGetOutlinerMode() != OUTLINERMODE_TITLEOBJECT ) &&
+ if ( ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TextObject ) &&
+ ( pOwner->ImplGetOutlinerMode() != OutlinerMode::TitleObject ) &&
( bSelection || !aSel.nStartPos ) )
{
Indent( aKeyCode.IsShift() ? (-1) : (+1) );
bKeyProcessed = true;
}
- else if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) &&
+ else if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) &&
!bSelection && !aSel.nEndPos && pOwner->ImplHasNumberFormat( aSel.nEndPara ) )
{
Indent( aKeyCode.IsShift() ? (-1) : (+1) );
@@ -285,7 +285,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->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode())
return pEditView->MouseMove( rMEvt );
Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -300,7 +300,7 @@ bool OutlinerView::MouseMove( const MouseEvent& rMEvt )
bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
{
- if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() )
+ if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() )
return pEditView->MouseButtonDown( rMEvt );
Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -332,7 +332,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->ImplGetOutlinerMode() == OutlinerMode::OutlineView) && (eTarget == MouseTarget::Text) && (rMEvt.GetClicks() == 2) )
{
ESelection aSel( pEditView->GetSelection() );
nPara = aSel.nStartPara;
@@ -348,7 +348,7 @@ bool OutlinerView::MouseButtonDown( const MouseEvent& rMEvt )
bool OutlinerView::MouseButtonUp( const MouseEvent& rMEvt )
{
- if ( ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_TEXTOBJECT ) || pEditView->GetEditEngine()->IsInSelectionMode() )
+ if ( ( pOwner->ImplGetOutlinerMode() == OutlinerMode::TextObject ) || pEditView->GetEditEngine()->IsInSelectionMode() )
return pEditView->MouseButtonUp( rMEvt );
Point aMousePosWin( pEditView->GetWindow()->PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -506,7 +506,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->ImplGetOutlinerMode() != OutlinerMode::TextObject ))
{
// Special case: the predecessor of an indented paragraph is
// invisible and is now on the same level as the visible
@@ -538,7 +538,7 @@ void OutlinerView::Indent( short nDiff )
pOwner->ImplInitDepth( nPara, nNewDepth, true );
pOwner->ImplCalcBulletText( nPara, false, false );
- if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+ if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
pOwner->ImplSetLevelDependendStyleSheet( nPara );
// Notify App
@@ -689,7 +689,7 @@ void OutlinerView::PasteSpecial()
pOwner->bPasting = true;
pEditView->PasteSpecial();
- if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+ if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
{
const sal_Int32 nParaCount = pOwner->pEditEngine->GetParagraphCount();
@@ -1404,7 +1404,7 @@ sal_uLong OutlinerView::Read( SvStream& rInput, const OUString& rBaseURL, EEText
pOwner->ImplInitDepth( n, nDepth, false );
}
- if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+ if ( pOwner->ImplGetOutlinerMode() == OutlinerMode::OutlineObject )
pOwner->ImplSetLevelDependendStyleSheet( n );
}
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index b84bae177582..56a25dd52c1f 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3615,7 +3615,7 @@ void SvxMSDffManager::ReadObjText( const OUString& rText, SdrObject* pObj )
if ( pText )
{
SdrOutliner& rOutliner = pText->ImpGetDrawOutliner();
- rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
+ rOutliner.Init( OutlinerMode::TextObject );
bool bOldUpdateMode = rOutliner.GetUpdateMode();
rOutliner.SetUpdateMode( false );
@@ -4444,7 +4444,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if ( bCreateNewParaObject )
{
OutlinerParaObject* pNewText = rOutliner.CreateParaObject();
- rOutliner.Init( OUTLINERMODE_TEXTOBJECT );
+ rOutliner.Init( OutlinerMode::TextObject );
static_cast<SdrObjCustomShape*>(pRet)->NbcSetOutlinerParaObject( pNewText );
}
}
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 7ac251cbfe02..5320b57969ac 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2219,7 +2219,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
sal_uInt32 nDestinationInstance = pTextObj->GetDestinationInstance() ;
SdrOutliner& rOutliner = pText->ImpGetDrawOutliner();
if ( ( pText->GetObjInventor() == SdrInventor ) && ( pText->GetObjIdentifier() == OBJ_TITLETEXT ) ) // Outliner-Style for Title-Text object?!? (->of DL)
- rOutliner.Init( OUTLINERMODE_TITLEOBJECT ); // Outliner reset
+ rOutliner.Init( OutlinerMode::TitleObject ); // Outliner reset
bool bOldUpdateMode = rOutliner.GetUpdateMode();
rOutliner.SetUpdateMode( false );
diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx
index c0d4f276c1b7..a3ab3a9e5bb5 100644
--- a/include/editeng/editobj.hxx
+++ b/include/editeng/editobj.hxx
@@ -39,6 +39,7 @@ class SfxStyleSheetPool;
class SvxFieldItem;
class SvxFieldData;
class SvStream;
+enum class OutlinerMode;
namespace editeng {
@@ -85,8 +86,8 @@ public:
std::vector<svl::SharedString> GetSharedStrings() const;
const SfxItemPool* GetPool() const;
- sal_uInt16 GetUserType() const; // For OutlinerMode, it can however not save in compatible format
- void SetUserType( sal_uInt16 n );
+ OutlinerMode GetUserType() const; // For OutlinerMode, it can however not save in compatible format
+ void SetUserType( OutlinerMode n );
bool IsVertical() const;
void SetVertical( bool bVertical );
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 78b2e211eaee..8b71ae12805b 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -560,16 +560,21 @@ struct EBulletInfo
EBulletInfo() : bVisible( false ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {}
};
-#define OUTLINERMODE_DONTKNOW 0x0000
-#define OUTLINERMODE_TEXTOBJECT 0x0001
-#define OUTLINERMODE_TITLEOBJECT 0x0002
-#define OUTLINERMODE_OUTLINEOBJECT 0x0003
-#define OUTLINERMODE_OUTLINEVIEW 0x0004
-
-#define OUTLINERMODE_USERMASK 0x00FF
+enum class OutlinerMode {
+ DontKnow = 0x0000,
+ TextObject = 0x0001,
+ TitleObject = 0x0002,
+ OutlineObject = 0x0003,
+ OutlineView = 0x0004,
+ Subtitle = 0x0101,
+ Note = 0x0201
+};
+namespace o3tl
+{
+ template<> struct typed_flags<OutlinerMode> : is_typed_flags<OutlinerMode, 0x030f> {};
+}
-#define OUTLINERMODE_SUBTITLE (0x0100|OUTLINERMODE_TEXTOBJECT)
-#define OUTLINERMODE_NOTE (0x0200|OUTLINERMODE_TEXTOBJECT)
+#define OUTLINERMODE_USERMASK (OutlinerMode)0x00FF
class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
{
@@ -611,7 +616,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
const sal_Int16 nMinDepth;
sal_Int32 nFirstPage;
- sal_uInt16 nOutlinerMode;
+ OutlinerMode nOutlinerMode;
bool bFirstParaIsEmpty;
sal_uInt8 nBlockInsCallback;
@@ -646,7 +651,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
bool ImpCanDeleteSelectedPages( OutlinerView* pCurView );
bool ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_Int32 nFirstPage, sal_Int32 nPages );
- sal_uInt16 ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
+ OutlinerMode ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
void ImplCheckDepth( sal_Int16& rnDepth ) const;
protected:
@@ -667,11 +672,11 @@ protected:
public:
- Outliner( SfxItemPool* pPool, sal_uInt16 nOutlinerMode );
+ Outliner( SfxItemPool* pPool, OutlinerMode nOutlinerMode );
virtual ~Outliner();
- void Init( sal_uInt16 nOutlinerMode );
- sal_uInt16 GetMode() const { return nOutlinerMode; }
+ void Init( OutlinerMode nOutlinerMode );
+ OutlinerMode GetMode() const { return nOutlinerMode; }
void SetVertical( bool bVertical );
bool IsVertical() const;
@@ -950,7 +955,7 @@ public:
// this is needed for StarOffice Api
void SetLevelDependendStyleSheet( sal_Int32 nPara );
- sal_uInt16 GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
+ OutlinerMode GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
// spell and return a sentence
bool SpellSentence(EditView& rEditView, svx::SpellPortions& rToFill, bool bIsGrammarChecking );
diff --git a/include/editeng/outlobj.hxx b/include/editeng/outlobj.hxx
index f4d9c6a51a65..6bde289e7f73 100644
--- a/include/editeng/outlobj.hxx
+++ b/include/editeng/outlobj.hxx
@@ -27,6 +27,7 @@
#include <o3tl/cow_wrapper.hxx>
class EditTextObject;
+enum class OutlinerMode;
/**
* This is the guts of OutlinerParaObject, refcounted and shared among
@@ -74,8 +75,8 @@ public:
bool isWrongListEqual(const OutlinerParaObject& rCompare) const;
// outliner mode access
- sal_uInt16 GetOutlinerMode() const;
- void SetOutlinerMode(sal_uInt16 nNew);
+ OutlinerMode GetOutlinerMode() const;
+ void SetOutlinerMode(OutlinerMode nNew);
// vertical access
bool IsVertical() const;
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index 6f92187dcb53..577a1d93571d 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -53,7 +53,7 @@ namespace com { namespace sun { namespace star { namespace lang {
* The resulting default font height, however, stays the same (the logical
* font height is converted).
*/
-SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner(sal_uInt16 nOutlinerMode, SdrModel& rMod);
+SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rMod);
/**
* Global default settings for the DrawingEngine.
@@ -95,7 +95,7 @@ public:
// Create an Outliner with the engine-global default values on the heap.
// If pMod != nullptr, the MapMode of the passed model is used.
// The resulting default font height, however, stays the same (the logical font height is converted).
- friend SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner(sal_uInt16 nOutlinerMode, SdrModel& rMod);
+ friend SVX_DLLPUBLIC SdrOutliner* SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rMod);
};
class SfxItemSet;
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 350acefe74dc..d90671311e76 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -580,7 +580,7 @@ public:
void ReformatAllTextObjects();
- SdrOutliner* createOutliner( sal_uInt16 nOutlinerMode );
+ SdrOutliner* createOutliner( OutlinerMode nOutlinerMode );
void disposeOutliner( SdrOutliner* pOutliner );
bool IsWriter() const { return !bMyPool; }
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
index 902574138518..c76fbb9c2345 100644
--- a/include/svx/svdoutl.hxx
+++ b/include/svx/svdoutl.hxx
@@ -34,7 +34,7 @@ protected:
const SdrPage* mpVisualizedPage;
public:
- SdrOutliner( SfxItemPool* pItemPool, sal_uInt16 nMode );
+ SdrOutliner( SfxItemPool* pItemPool, OutlinerMode nMode );
virtual ~SdrOutliner() ;
void SetTextObj( const SdrTextObj* pObj );
diff --git a/include/svx/svdtext.hxx b/include/svx/svdtext.hxx
index b2f6ce112b3d..8338428fe241 100644
--- a/include/svx/svdtext.hxx
+++ b/include/svx/svdtext.hxx
@@ -30,6 +30,7 @@ class SdrOutliner;
class SdrTextObj;
class SdrModel;
class SfxItemSet;
+enum class OutlinerMode;
namespace sdr { namespace properties {
class TextProperties;
@@ -46,7 +47,7 @@ public:
virtual ~SdrText();
virtual void SetModel(SdrModel* pNewModel);
- void ForceOutlinerParaObject( sal_uInt16 nOutlMode );
+ void ForceOutlinerParaObject( OutlinerMode nOutlMode );
virtual void SetOutlinerParaObject( OutlinerParaObject* pTextObject );
OutlinerParaObject* GetOutlinerParaObject() const;
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index b76bd75f990e..d5d793c1470a 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1447,7 +1447,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
std::unique_ptr< EditTextObject > xEditObj(
XclImpStringHelper::CreateTextObject( GetRoot(), *maTextData.mxString ) );
OutlinerParaObject* pOutlineObj = new OutlinerParaObject( *xEditObj );
- pOutlineObj->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+ pOutlineObj->SetOutlinerMode( OutlinerMode::TextObject );
// text object takes ownership of the outliner object
pTextObj->NbcSetOutlinerParaObject( pOutlineObj );
}
diff --git a/sc/source/ui/drawfunc/futext2.cxx b/sc/source/ui/drawfunc/futext2.cxx
index 124c770f9c98..30f6e4f5fc40 100644
--- a/sc/source/ui/drawfunc/futext2.cxx
+++ b/sc/source/ui/drawfunc/futext2.cxx
@@ -27,7 +27,7 @@
SdrOutliner* FuText::MakeOutliner()
{
ScViewData& rViewData = pViewShell->GetViewData();
- SdrOutliner* pOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *pDrDoc);
+ SdrOutliner* pOutl = SdrMakeOutliner(OutlinerMode::OutlineObject, *pDrDoc);
rViewData.UpdateOutlinerFlags(*pOutl);
diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx
index d52b7730d522..ed82fa2d9edd 100644
--- a/sc/source/ui/unoobj/editsrc.cxx
+++ b/sc/source/ui/unoobj/editsrc.cxx
@@ -181,7 +181,7 @@ void ScAnnotationEditSource::UpdateData()
EditTextObject* pEditObj = pEditEngine->CreateTextObject();
OutlinerParaObject* pOPO = new OutlinerParaObject( *pEditObj );
delete pEditObj;
- pOPO->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+ pOPO->SetOutlinerMode( OutlinerMode::TextObject );
pObj->NbcSetOutlinerParaObject( pOPO );
pObj->ActionChanged();
}
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 73434a74ed4d..3c7296a8f1de 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -114,14 +114,14 @@ public:
@param pDoc
The draw document from which to take the content.
@param nMode
- The valid values <const>OUTLINERMODE_DONTKNOW</const>,
- <const>OUTLINERMODE_TEXTOBJECT</const>,
- <const>OUTLINERMODE_TITLEOBJECT</const>,
- <const>OUTLINERMODE_OUTLINEOBJECT</const>, and
- <const>OUTLINERMODE_OUTLINEVIEW</const> are defined in
+ The valid values <const>OutlinerMode::DontKnow</const>,
+ <const>OutlinerMode::TextObject</const>,
+ <const>OutlinerMode::TitleObject</const>,
+ <const>OutlinerMode::OutlineObject</const>, and
+ <const>OutlinerMode::OutlineView</const> are defined in
editeng/outliner.hxx.
*/
- Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode );
+ Outliner( SdDrawDocument* pDoc, OutlinerMode nMode );
virtual ~Outliner();
/// Forbid copy construction and copy assignment
Outliner(const Outliner&) = delete;
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 5b38cd419ac1..2bf77d946ece 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -764,8 +764,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
if (nId == OBJ_TITLETEXT)
{
- if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
- pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
+ if( pOPO && pOPO->GetOutlinerMode() == OutlinerMode::DontKnow )
+ pOPO->SetOutlinerMode( OutlinerMode::TitleObject );
// sal_True: don't delete "hard" attributes when doing this.
if (pTitleSheet)
@@ -773,8 +773,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
}
else if (nId == OBJ_OUTLINETEXT)
{
- if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
- pOPO->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT );
+ if( pOPO && pOPO->GetOutlinerMode() == OutlinerMode::DontKnow )
+ pOPO->SetOutlinerMode( OutlinerMode::OutlineObject );
std::vector<SfxStyleSheetBase*>::iterator iter;
for (iter = aOutlineList.begin(); iter != aOutlineList.end(); ++iter)
@@ -816,7 +816,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
{
if (!mpOutliner && bCreateOutliner)
{
- mpOutliner = new ::sd::Outliner( this, OUTLINERMODE_TEXTOBJECT );
+ mpOutliner = new ::sd::Outliner( this, OutlinerMode::TextObject );
if (mpDocSh)
mpOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
@@ -834,7 +834,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
{
if ( !mpInternalOutliner && bCreateOutliner )
{
- mpInternalOutliner = new ::sd::Outliner( this, OUTLINERMODE_TEXTOBJECT );
+ mpInternalOutliner = new ::sd::Outliner( this, OutlinerMode::TextObject );
// This outliner is only used to create special text objects. As no
// information about portions is saved in this outliner, the update mode
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 3dceb0c7308b..2f9f8ba7debe 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -884,12 +884,12 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj)
Link<EditStatus&,void> aEvtHdl = pOutl->GetStatusEventHdl();
pOutl->SetStatusEventHdl(LINK(this, SdDrawDocument, OnlineSpellEventHdl));
- sal_uInt16 nOldOutlMode = pOutl->GetMode();
- sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
+ OutlinerMode nOldOutlMode = pOutl->GetMode();
+ OutlinerMode nOutlMode = OutlinerMode::TextObject;
if (pObj->GetObjInventor() == SdrInventor &&
pObj->GetObjIdentifier() == OBJ_OUTLINETEXT)
{
- nOutlMode = OUTLINERMODE_OUTLINEOBJECT;
+ nOutlMode = OutlinerMode::OutlineObject;
}
pOutl->Init( nOutlMode );
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 409bf445ac99..001994566324 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -458,8 +458,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
{
SdrOutliner* pOutliner = static_cast<SdDrawDocument*>( GetModel() )->GetInternalOutliner();
- sal_uInt16 nOutlMode = pOutliner->GetMode();
- pOutliner->Init( OUTLINERMODE_TEXTOBJECT );
+ OutlinerMode nOutlMode = pOutliner->GetMode();
+ pOutliner->Init( OutlinerMode::TextObject );
pOutliner->SetStyleSheet( 0, nullptr );
pOutliner->SetVertical( bVertical );
@@ -2384,7 +2384,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
if (!pOutliner)
{
SfxItemPool* pPool = static_cast<SdDrawDocument*>(GetModel())->GetDrawOutliner().GetEmptyItemSet().GetPool();
- pOutl = new ::Outliner( pPool, OUTLINERMODE_OUTLINEOBJECT );
+ pOutl = new ::Outliner( pPool, OutlinerMode::OutlineObject );
pOutl->SetRefDevice( SD_MOD()->GetRefDevice( *static_cast<SdDrawDocument*>( GetModel() )->GetDocSh() ) );
pOutl->SetEditTextObjectPool(pPool);
pOutl->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetModel()->GetStyleSheetPool()));
@@ -2392,7 +2392,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
pOutl->SetUpdateMode( false );
}
- sal_uInt16 nOutlMode = pOutl->GetMode();
+ OutlinerMode nOutlMode = pOutl->GetMode();
Size aPaperSize = pOutl->GetPaperSize();
bool bUpdateMode = pOutl->GetUpdateMode();
pOutl->SetUpdateMode(false);
@@ -2411,7 +2411,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
{
case PRESOBJ_OUTLINE:
{
- pOutl->Init( OUTLINERMODE_OUTLINEOBJECT );
+ pOutl->Init( OutlinerMode::OutlineObject );
aString += "\t";
aString += rString;
@@ -2443,14 +2443,14 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
case PRESOBJ_TITLE:
{
- pOutl->Init( OUTLINERMODE_TITLEOBJECT );
+ pOutl->Init( OutlinerMode::TitleObject );
aString += rString;
}
break;
default:
{
- pOutl->Init( OUTLINERMODE_TEXTOBJECT );
+ pOutl->Init( OutlinerMode::TextObject );
aString += rString;
// check if we need to add a text field
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index 086a06d77169..bae26eff34f4 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -227,7 +227,7 @@ SvxTextForwarder* TextAPIEditSource::GetTextForwarder()
if (!m_xImpl->mpOutliner)
{
//init draw model first
- m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OUTLINERMODE_TEXTOBJECT);
+ m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OutlinerMode::TextObject);
m_xImpl->mpDoc->SetCalcFieldValueHdl(m_xImpl->mpOutliner);
}
@@ -244,7 +244,7 @@ void TextAPIEditSource::SetText( OutlinerParaObject& rText )
if (!m_xImpl->mpOutliner)
{
//init draw model first
- m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OUTLINERMODE_TEXTOBJECT);
+ m_xImpl->mpOutliner = new Outliner(m_xImpl->mpDoc, OutlinerMode::TextObject);
m_xImpl->mpDoc->SetCalcFieldValueHdl(m_xImpl->mpOutliner);
}
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index baee94a6ab61..9f574b55fb33 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -427,7 +427,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
TextApiObject* pTextApi = getTextApiObject( xAnnotation );
if( pTextApi )
{
- std::unique_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT) );
+ std::unique_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OutlinerMode::TextObject) );
mpDoc->SetCalcFieldValueHdl( pOutliner.get() );
pOutliner->SetUpdateMode( true );
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 2998292a717f..19a4729fbe7c 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -326,7 +326,7 @@ void AnnotationWindow::InitControls()
aSettings.SetStyleSettings(aStyleSettings);
mpMeta->SetSettings(aSettings);
- mpOutliner = new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT);
+ mpOutliner = new ::Outliner(GetAnnotationPool(),OutlinerMode::TextObject);
Doc()->SetCalcFieldValueHdl( mpOutliner );
mpOutliner->SetUpdateMode( true );
Rescale();
diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
index 1791ec6c8c35..6870683598a9 100644
--- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
@@ -147,7 +147,7 @@ void SpellDialogChildWindow::ProvideOutliner()
// to create one.
mbOwnOutliner = true;
SdDrawDocument *pDoc = pViewShell->GetDoc();
- mpSdOutliner = new Outliner(pDoc, OUTLINERMODE_TEXTOBJECT);
+ mpSdOutliner = new Outliner(pDoc, OutlinerMode::TextObject);
StartListening(*pDoc);
}
else if( dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr)
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 1ff03d015f09..b1b14713fb15 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -624,8 +624,8 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
if( pObj )
{
Outliner* pOutl = mpDoc->GetInternalOutliner();
- pOutl->Init( OUTLINERMODE_TEXTOBJECT );
- sal_uInt16 nOutlMode = pOutl->GetMode();
+ pOutl->Init( OutlinerMode::TextObject );
+ OutlinerMode nOutlMode = pOutl->GetMode();
EditEngine* pEdit = const_cast< EditEngine* >(&pOutl->GetEditEngine());
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index 17bb5e4700f5..cc163dd7c8f8 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -88,7 +88,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
if (pActualPage)
{
::sd::Outliner* pOutl =
- new ::sd::Outliner( mpDoc, OUTLINERMODE_OUTLINEOBJECT );
+ new ::sd::Outliner( mpDoc, OutlinerMode::OutlineObject );
pOutl->SetUpdateMode(false);
pOutl->EnableUndo(false);
@@ -185,11 +185,11 @@ void FuExpandPage::DoExecute( SfxRequest& )
continue;
OutlinerParaObject* pOutlinerParaObject = pOutl->CreateParaObject( nParaPos, 1);
- pOutlinerParaObject->SetOutlinerMode(OUTLINERMODE_TITLEOBJECT);
+ pOutlinerParaObject->SetOutlinerMode(OutlinerMode::TitleObject);
if( pOutlinerParaObject->GetDepth(0) != -1 )
{
- SdrOutliner* pTempOutl = SdrMakeOutliner(OUTLINERMODE_TITLEOBJECT, *mpDoc);
+ SdrOutliner* pTempOutl = SdrMakeOutliner(OutlinerMode::TitleObject, *mpDoc);
pTempOutl->SetText( *pOutlinerParaObject );
@@ -217,7 +217,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
// create structuring text objects
OutlinerParaObject* pOPO = pOutl->CreateParaObject(++nParaPos, nChildCount);
- SdrOutliner* pTempOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpDoc);
+ SdrOutliner* pTempOutl = SdrMakeOutliner(OutlinerMode::OutlineObject, *mpDoc);
pTempOutl->SetText( *pOPO );
sal_Int32 nParaCount2 = pTempOutl->GetParagraphCount();
diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx
index 7e3a74d39e35..ccec7b0ab1a9 100644
--- a/sd/source/ui/func/fuhhconv.cxx
+++ b/sd/source/ui/func/fuhhconv.cxx
@@ -65,7 +65,7 @@ FuHangulHanjaConversion::FuHangulHanjaConversion (
if ( dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr )
{
bOwnOutliner = true;
- pSdOutliner = new Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
+ pSdOutliner = new Outliner( mpDoc, OutlinerMode::TextObject );
}
else if ( dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr )
{
@@ -112,7 +112,7 @@ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_In
pSdOutliner->EndConversion();
bOwnOutliner = true;
- pSdOutliner = new Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
+ pSdOutliner = new Outliner( mpDoc, OutlinerMode::TextObject );
pSdOutliner->BeginConversion();
}
else if ( pSdOutliner && dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr && bOwnOutliner )
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 113c46e7965a..d54100635ec5 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -444,7 +444,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
- the draw outliner of the drawing engine has to draw something in
between
- the global outliner could be used in SdPage::CreatePresObj */
- std::unique_ptr<SdrOutliner> pOutliner(new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT ));
+ std::unique_ptr<SdrOutliner> pOutliner(new ::sd::Outliner( mpDoc, OutlinerMode::TextObject ));
// set reference device
pOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
@@ -594,7 +594,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
- the draw outliner of the drawing engine has to draw something in
between
- the global outliner could be used in SdPage::CreatePresObj */
- std::unique_ptr< ::Outliner> pOutliner(new ::Outliner( &mpDoc->GetItemPool(), OUTLINERMODE_OUTLINEOBJECT ));
+ std::unique_ptr< ::Outliner> pOutliner(new ::Outliner( &mpDoc->GetItemPool(), OutlinerMode::OutlineObject ));
pOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(mpDoc->GetStyleSheetPool()));
// set reference device
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index 6c839ab1b240..3e1a98608365 100644
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -77,7 +77,7 @@ void FuSearch::DoExecute( SfxRequest& )
if ( dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr )
{
bOwnOutliner = true;
- pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
+ pSdOutliner = new ::sd::Outliner( mpDoc, OutlinerMode::TextObject );
}
else if ( dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr )
{
@@ -115,7 +115,7 @@ void FuSearch::SearchAndReplace( const SvxSearchItem* pSearchItem )
pSdOutliner->EndSpelling();
bOwnOutliner = true;
- pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
+ pSdOutliner = new ::sd::Outliner( mpDoc, OutlinerMode::TextObject );
pSdOutliner->PrepareSpelling();
}
else if ( pSdOutliner && dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr && bOwnOutliner )
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index 3100e0970d76..072d34c67bab 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -159,7 +159,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
pNotesPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
pNotesPage->setHeaderFooterSettings(pActualNotesPage->getHeaderFooterSettings());
- pOutl = new ::sd::Outliner( mpDoc, OUTLINERMODE_OUTLINEOBJECT );
+ pOutl = new ::sd::Outliner( mpDoc, OutlinerMode::OutlineObject );
pOutl->SetUpdateMode(false);
pOutl->EnableUndo(false);
@@ -177,7 +177,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
// #118876#, check if the OutlinerParaObject is created successfully
if( pParaObj )
{
- pParaObj->SetOutlinerMode( OUTLINERMODE_OUTLINEOBJECT );
+ pParaObj->SetOutlinerMode( OutlinerMode::OutlineObject );
pOutl->AddText(*pParaObj);
}
}
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index f5d83bdf8465..c55ddfa783b8 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1043,7 +1043,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag)
nSdrObjKind == OBJ_OUTLINETEXT || !mxTextObj->IsEmptyPresObj() ) )
{
// create new outliner (owned by SdrObjEditView)
- SdrOutliner* pOutl = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpDoc);
+ SdrOutliner* pOutl = SdrMakeOutliner(OutlinerMode::OutlineObject, *mpDoc);
if (bEmptyOutliner)
mpView->SdrEndTextEdit(true);
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index f817a6bdf7f6..3eee8172e629 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1119,11 +1119,11 @@ namespace {
// Get and set up the outliner.
const Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize());
Outliner* pOutliner = rDocument.GetInternalOutliner();
- const sal_uInt16 nSavedOutlMode (pOutliner->GetMode());
+ const OutlinerMode nSavedOutlMode (pOutliner->GetMode());
const bool bSavedUpdateMode (pOutliner->GetUpdateMode());
const Size aSavedPaperSize (pOutliner->GetPaperSize());
- pOutliner->Init(OUTLINERMODE_OUTLINEVIEW);
+ pOutliner->Init(OutlinerMode::OutlineView);
pOutliner->SetPaperSize(aOutRect.GetSize());
pOutliner->SetUpdateMode(true);
pOutliner->Clear();
@@ -1636,8 +1636,8 @@ private:
}
Outliner* pOutliner = mrBase.GetDocument()->GetInternalOutliner();
- pOutliner->Init(OUTLINERMODE_OUTLINEVIEW);
- const sal_uInt16 nSavedOutlMode (pOutliner->GetMode());
+ pOutliner->Init(OutlinerMode::OutlineView);
+ const OutlinerMode nSavedOutlMode (pOutliner->GetMode());
const bool bSavedUpdateMode (pOutliner->GetUpdateMode());
const Size aSavedPaperSize (pOutliner->GetPaperSize());
const MapMode aSavedMapMode (pOutliner->GetRefMapMode());
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 4aca67629b21..5cae4f923ae3 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -137,7 +137,7 @@ private:
OutlinerView* mpOutlineView;
};
-Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
+Outliner::Outliner( SdDrawDocument* pDoc, OutlinerMode nMode )
: SdrOutliner( &pDoc->GetItemPool(), nMode ),
mpImpl(new Implementation()),
meMode(SEARCH),
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 187cbf0879d7..25e0e44f39ab 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -269,7 +269,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
bool bOutlineViewSh = dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr;
if (pOLV &&
- ( pOLV->GetOutliner()->GetMode() == OUTLINERMODE_OUTLINEOBJECT || bOutlineViewSh ) )
+ ( pOLV->GetOutliner()->GetMode() == OutlinerMode::OutlineObject || bOutlineViewSh ) )
{
// Outliner at outline-mode
::Outliner* pOutl = pOLV->GetOutliner();
@@ -279,7 +279,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
Paragraph* pPara = aSelList.empty() ? nullptr : *(aSelList.begin());
// find out if we are a OutlineView
- bool bIsOutlineView(OUTLINERMODE_OUTLINEVIEW == pOLV->GetOutliner()->GetMode());
+ bool bIsOutlineView(OutlinerMode::OutlineView == pOLV->GetOutliner()->GetMode());
// This is ONLY for OutlineViews
if(bIsOutlineView)
@@ -294,7 +294,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
else
{
- // old behaviour for OUTLINERMODE_OUTLINEOBJECT
+ // old behaviour for OutlinerMode::OutlineObject
if(pOutl->GetAbsPos(pPara) > 0)
{
// not at top
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 340936a65148..e610c44c0547 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1943,8 +1943,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else
{
Outliner* pOutl = GetDoc()->GetInternalOutliner();
- pOutl->Init( OUTLINERMODE_TEXTOBJECT );
- sal_uInt16 nOutlMode = pOutl->GetMode();
+ pOutl->Init( OutlinerMode::TextObject );
+ OutlinerMode nOutlMode = pOutl->GetMode();
pOutl->SetStyleSheet( 0, nullptr );
pOutl->QuickInsertField( *pFieldItem, ESelection() );
OutlinerParaObject* pOutlParaObject = pOutl->CreateParaObject();
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index b4f59a6bc9ed..f4216520a528 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1436,8 +1436,8 @@ void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText,
else
{
Outliner* pOutl = GetDoc()->GetInternalOutliner();
- pOutl->Init( OUTLINERMODE_TEXTOBJECT );
- sal_uInt16 nOutlMode = pOutl->GetMode();
+ pOutl->Init( OutlinerMode::TextObject );
+ OutlinerMode nOutlMode = pOutl->GetMode();
SvxURLField aURLField(rURL, rText, SVXURLFORMAT_REPR);
aURLField.SetTargetFrame(rTarget);
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 2c8787db715c..86f71567221a 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1602,7 +1602,7 @@ void OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
OutlinerParaObject* pOPO = pTO ? rOutliner.CreateParaObject(rOutliner.GetAbsPos(pPara), 1) : nullptr;
if (pOPO)
{
- pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
+ pOPO->SetOutlinerMode( OutlinerMode::TitleObject );
pOPO->SetVertical( pTO->IsVerticalWriting() );
if( pTO->GetOutlinerParaObject() && (pOPO->GetTextObject() == pTO->GetOutlinerParaObject()->GetTextObject()) )
{
@@ -1665,11 +1665,11 @@ void OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
bool bNewObject = false;
- sal_uInt16 eOutlinerMode = OUTLINERMODE_TITLEOBJECT;
+ OutlinerMode eOutlinerMode = OutlinerMode::TitleObject;
pTO = static_cast<SdrTextObj*>(pPage->GetPresObj( PRESOBJ_TEXT ));
if( !pTO )
{
- eOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+ eOutlinerMode = OutlinerMode::OutlineObject;
pTO = OutlineView::GetOutlineTextObject( pPage );
}
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 69e5fe26a75d..f3d9457a8a4b 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -94,7 +94,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
{
// initialize Outliner: set Reference Device
bInitOutliner = true;
- mrOutliner.Init( OUTLINERMODE_OUTLINEVIEW );
+ mrOutliner.Init( OutlinerMode::OutlineView );
mrOutliner.SetRefDevice( SD_MOD()->GetRefDevice( rDocSh ) );
//viewsize without the width of the image and number in front
mnPaperWidth = (mrOutlineViewShell.GetActiveWindow()->GetViewSize().Width() - 4000);
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index d10826382acb..969fbc71c99c 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -659,7 +659,7 @@ bool View::SdrBeginTextEdit(
sd::tools::EventMultiplexerEvent::EID_BEGIN_TEXT_EDIT, static_cast<void*>(pObj) );
if( pOutl==nullptr && pObj )
- pOutl = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pObj->GetModel());
+ pOutl = SdrMakeOutliner(OutlinerMode::TextObject, *pObj->GetModel());
// make draw&impress specific initialisations
if( pOutl )
@@ -1257,7 +1257,7 @@ bool View::ShouldToggleOn(
return false;
bool bToggleOn = false;
- std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel));
+ std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OutlinerMode::TextObject, *pSdrModel));
const size_t nMarkCount = GetMarkedObjectCount();
for (size_t nIndex = 0; nIndex < nMarkCount && !bToggleOn; ++nIndex)
{
@@ -1325,7 +1325,7 @@ void View::ChangeMarkedObjectsBulletsNumbering(
const bool bToggleOn = ShouldToggleOn( bToggle, bHandleBullets );
- std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel));
+ std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OutlinerMode::TextObject, *pSdrModel));
std::unique_ptr<OutlinerView> pOutlinerView(new OutlinerView(pOutliner.get(), pWindow));
const size_t nMarkCount = GetMarkedObjectCount();
diff --git a/svx/source/inc/svdoutlinercache.hxx b/svx/source/inc/svdoutlinercache.hxx
index 3bc3212b94d5..f3aa9ec43107 100644
--- a/svx/source/inc/svdoutlinercache.hxx
+++ b/svx/source/inc/svdoutlinercache.hxx
@@ -26,7 +26,7 @@
class SdrModel;
class SdrOutliner;
-
+enum class OutlinerMode;
class SdrOutlinerCache
{
@@ -40,7 +40,7 @@ public:
SdrOutlinerCache( SdrModel* pModel );
~SdrOutlinerCache();
- SdrOutliner* createOutliner( sal_uInt16 nOutlinerMode );
+ SdrOutliner* createOutliner( OutlinerMode nOutlinerMode );
void disposeOutliner( SdrOutliner* pOutliner );
std::vector< SdrOutliner* > GetActiveOutliners() const;
};
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 180b907eba94..de35ec39e3b9 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -405,7 +405,7 @@ namespace sdr
&& !rObj.IsTextEditActive()
&& !rObj.IsLinkedText())
{
- Outliner* pOutliner = SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *rObj.GetModel());
+ Outliner* pOutliner = SdrMakeOutliner(OutlinerMode::OutlineObject, *rObj.GetModel());
const svx::ITextProvider& rTextProvider(getTextProvider());
sal_Int32 nText = rTextProvider.getTextCount();
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index e831650ec33f..2c7bd27a0b8c 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -709,7 +709,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
mxTextEditObj.reset( pObj );
pTextEditOutliner=pGivenOutliner;
if (pTextEditOutliner==nullptr)
- pTextEditOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *mxTextEditObj->GetModel() );
+ pTextEditOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *mxTextEditObj->GetModel() );
{
SvtAccessibilityOptions aOptions;
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 091cfca0ea65..6c4484d02242 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -406,7 +406,7 @@ SdrEngineDefaults& SdrEngineDefaults::GetDefaults()
return *rGlobalData.pDefaults;
}
-SdrOutliner* SdrMakeOutliner(sal_uInt16 nOutlinerMode, SdrModel& rModel)
+SdrOutliner* SdrMakeOutliner(OutlinerMode nOutlinerMode, SdrModel& rModel)
{
SfxItemPool* pPool = &rModel.GetItemPool();
SdrOutliner* pOutl = new SdrOutliner( pPool, nOutlinerMode );
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 4aea8c6f78ae..8f0beef843f9 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -214,15 +214,15 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
// can't create DrawOutliner OnDemand, because I can't get the Pool,
// then (only from 302 onwards!)
- pDrawOutliner = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *this);
+ pDrawOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this);
ImpSetOutlinerDefaults(pDrawOutliner, true);
- pHitTestOutliner = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *this);
+ pHitTestOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this);
ImpSetOutlinerDefaults(pHitTestOutliner, true);
/* Start Text Chaining related code */
// Initialize Chaining Outliner
- pChainingOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *this );
+ pChainingOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *this );
ImpSetOutlinerDefaults(pChainingOutliner, true);
// Make a TextChain
@@ -1953,7 +1953,7 @@ void SdrModel::ReformatAllTextObjects()
ImpReformatAllTextObjects();
}
-SdrOutliner* SdrModel::createOutliner( sal_uInt16 nOutlinerMode )
+SdrOutliner* SdrModel::createOutliner( OutlinerMode nOutlinerMode )
{
if( nullptr == mpOutlinerCache )
mpOutlinerCache = new SdrOutlinerCache(this);
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 11a535d78892..151ff79730da 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1229,9 +1229,9 @@ void SdrTextObj::ImpCheckMasterCachable()
void SdrTextObj::ImpInitDrawOutliner( SdrOutliner& rOutl ) const
{
rOutl.SetUpdateMode(false);
- sal_uInt16 nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+ OutlinerMode nOutlinerMode = OutlinerMode::OutlineObject;
if ( !IsOutlText() )
- nOutlinerMode = OUTLINERMODE_TEXTOBJECT;
+ nOutlinerMode = OutlinerMode::TextObject;
rOutl.Init( nOutlinerMode );
rOutl.SetGlobalCharStretching();
@@ -1520,9 +1520,9 @@ void SdrTextObj::ForceOutlinerParaObject()
SdrText* pText = getActiveText();
if( pText && (pText->GetOutlinerParaObject() == nullptr) )
{
- sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
+ OutlinerMode nOutlMode = OutlinerMode::TextObject;
if( IsTextFrame() && eTextKind == OBJ_OUTLINETEXT )
- nOutlMode = OUTLINERMODE_OUTLINEOBJECT;
+ nOutlMode = OutlinerMode::OutlineObject;
pText->ForceOutlinerParaObject( nOutlMode );
}
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 02b20fe1205d..824f1057836a 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -45,9 +45,9 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
mbInEditMode = true;
- sal_uInt16 nOutlinerMode = OUTLINERMODE_OUTLINEOBJECT;
+ OutlinerMode nOutlinerMode = OutlinerMode::OutlineObject;
if ( !IsOutlText() )
- nOutlinerMode = OUTLINERMODE_TEXTOBJECT;
+ nOutlinerMode = OutlinerMode::TextObject;
rOutl.Init( nOutlinerMode );
rOutl.SetRefDevice( pModel->GetRefDevice() );
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index 998c520c800f..1e3ea5e2e150 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -26,7 +26,7 @@
#include <svl/itempool.hxx>
-SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, sal_uInt16 nMode )
+SdrOutliner::SdrOutliner( SfxItemPool* pItemPool, OutlinerMode nMode )
: Outliner( pItemPool, nMode ),
//mpPaintInfoRec( NULL )
mpVisualizedPage(nullptr)
@@ -44,9 +44,9 @@ void SdrOutliner::SetTextObj( const SdrTextObj* pObj )
if( pObj && pObj != mpTextObj.get() )
{
SetUpdateMode(false);
- sal_uInt16 nOutlinerMode2 = OUTLINERMODE_OUTLINEOBJECT;
+ OutlinerMode nOutlinerMode2 = OutlinerMode::OutlineObject;
if ( !pObj->IsOutlText() )
- nOutlinerMode2 = OUTLINERMODE_TEXTOBJECT;
+ nOutlinerMode2 = OutlinerMode::TextObject;
Init( nOutlinerMode2 );
SetGlobalCharStretching();
diff --git a/svx/source/svdraw/svdoutlinercache.cxx b/svx/source/svdraw/svdoutlinercache.cxx
index 72e0069d8691..65c29b44ad02 100644
--- a/svx/source/svdraw/svdoutlinercache.cxx
+++ b/svx/source/svdraw/svdoutlinercache.cxx
@@ -30,16 +30,16 @@ SdrOutlinerCache::SdrOutlinerCache( SdrModel* pModel )
{
}
-SdrOutliner* SdrOutlinerCache::createOutliner( sal_uInt16 nOutlinerMode )
+SdrOutliner* SdrOutlinerCache::createOutliner( OutlinerMode nOutlinerMode )
{
SdrOutliner* pOutliner = nullptr;
- if( (OUTLINERMODE_OUTLINEOBJECT == nOutlinerMode) && !maModeOutline.empty() )
+ if( (OutlinerMode::OutlineObject == nOutlinerMode) && !maModeOutline.empty() )
{
pOutliner = maModeOutline.back();
maModeOutline.pop_back();
}
- else if( (OUTLINERMODE_TEXTOBJECT == nOutlinerMode) && !maModeText.empty() )
+ else if( (OutlinerMode::TextObject == nOutlinerMode) && !maModeText.empty() )
{
pOutliner = maModeText.back();
maModeText.pop_back();
@@ -76,9 +76,9 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner )
{
if( pOutliner )
{
- sal_uInt16 nOutlMode = pOutliner->GetOutlinerMode();
+ OutlinerMode nOutlMode = pOutliner->GetOutlinerMode();
- if( OUTLINERMODE_OUTLINEOBJECT == nOutlMode )
+ if( OutlinerMode::OutlineObject == nOutlMode )
{
maModeOutline.push_back(pOutliner);
pOutliner->Clear();
@@ -87,7 +87,7 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner )
// Deregister on outliner, might be reused from outliner cache
pOutliner->SetNotifyHdl( Link<EENotify&,void>() );
}
- else if( OUTLINERMODE_TEXTOBJECT == nOutlMode )
+ else if( OutlinerMode::TextObject == nOutlMode )
{
maModeText.push_back(pOutliner);
pOutliner->Clear();
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index 8e804d864d4d..483f7e5efd3c 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -169,7 +169,7 @@ void SdrText::SetModel( SdrModel* pNewModel )
}
}
-void SdrText::ForceOutlinerParaObject( sal_uInt16 nOutlMode )
+void SdrText::ForceOutlinerParaObject( OutlinerMode nOutlMode )
{
if( mpModel && !mpOutlinerParaObject )
{
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 5e517514d111..f4d11deaeca4 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -431,7 +431,7 @@ void Cell::SetModel(SdrModel* pNewModel)
SetStyleSheet( nullptr, true );
SdrText::SetModel( pNewModel );
- ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT );
+ ForceOutlinerParaObject( OutlinerMode::TextObject );
}
}
@@ -713,7 +713,7 @@ sal_Int32 Cell::getMinimumHeight()
Outliner& rOutliner=rTableObj.ImpGetDrawOutliner();
rOutliner.SetPaperSize(aSize);
rOutliner.SetUpdateMode(true);
- ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT );
+ ForceOutlinerParaObject( OutlinerMode::TextObject );
if( GetOutlinerParaObject() )
{
@@ -770,7 +770,7 @@ void Cell::SetOutlinerParaObject( OutlinerParaObject* pTextObject )
maSelection.nStartPara = EE_PARA_MAX_COUNT;
if( pTextObject == nullptr )
- ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT );
+ ForceOutlinerParaObject( OutlinerMode::TextObject );
}
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 07426a042140..2ea9c8abe954 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1747,7 +1747,7 @@ bool SdrTableObj::BegTextEdit(SdrOutliner& rOutl)
mbInEditMode = true;
- rOutl.Init( OUTLINERMODE_TEXTOBJECT );
+ rOutl.Init( OutlinerMode::TextObject );
rOutl.SetRefDevice( pModel->GetRefDevice() );
bool bUpdMerk=rOutl.GetUpdateMode();
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 927bacc98c75..5119b88f4517 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1891,7 +1891,7 @@ void SvxTableController::EditCell( const CellPos& rPos, vcl::Window* pWindow, co
pTableObj->setActiveCell( aPos );
// create new outliner, owner will be the SdrObjEditView
- SdrOutliner* pOutl = mpModel ? SdrMakeOutliner(OUTLINERMODE_OUTLINEOBJECT, *mpModel) : nullptr;
+ SdrOutliner* pOutl = mpModel ? SdrMakeOutliner(OutlinerMode::OutlineObject, *mpModel) : nullptr;
if (pOutl && pTableObj->IsVerticalWriting())
pOutl->SetVertical( true );
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index a2237c47846a..c785bac57e98 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -125,7 +125,7 @@ private:
SdrTableRTFParser::SdrTableRTFParser( SdrTableObj& rTableObj )
: mrTableObj( rTableObj )
-, mpOutliner( SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *rTableObj.GetModel() ) )
+, mpOutliner( SdrMakeOutliner( OutlinerMode::TextObject, *rTableObj.GetModel() ) )
, mrItemPool( rTableObj.GetModel()->GetItemPool() )
, mnLastToken( 0 )
, mbNewDef( false )
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 04988f675cc8..a6ef500eaaca 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -563,9 +563,9 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
if( mpOutliner == nullptr )
{
SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject );
- sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
+ OutlinerMode nOutlMode = OutlinerMode::TextObject;
if( pTextObj && pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_OUTLINETEXT )
- nOutlMode = OUTLINERMODE_OUTLINEOBJECT;
+ nOutlMode = OutlinerMode::OutlineObject;
mpOutliner = mpModel->createOutliner( nOutlMode );
diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx
index 4f3c8552d274..565eb8f9ef01 100644
--- a/sw/source/core/fields/textapi.cxx
+++ b/sw/source/core/fields/textapi.cxx
@@ -125,7 +125,7 @@ SvxTextForwarder* SwTextAPIEditSource::GetTextForwarder()
{
//init draw model first
pImpl->mpDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
- pImpl->mpOutliner = new Outliner( pImpl->mpPool, OUTLINERMODE_TEXTOBJECT );
+ pImpl->mpOutliner = new Outliner( pImpl->mpPool, OutlinerMode::TextObject );
pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
}
@@ -143,7 +143,7 @@ void SwTextAPIEditSource::SetText( OutlinerParaObject& rText )
{
//init draw model first
pImpl->mpDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
- pImpl->mpOutliner = new Outliner( pImpl->mpPool, OUTLINERMODE_TEXTOBJECT );
+ pImpl->mpOutliner = new Outliner( pImpl->mpPool, OutlinerMode::TextObject );
pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
}
@@ -159,7 +159,7 @@ void SwTextAPIEditSource::SetString( const OUString& rText )
{
//init draw model first
pImpl->mpDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
- pImpl->mpOutliner = new Outliner( pImpl->mpPool, OUTLINERMODE_TEXTOBJECT );
+ pImpl->mpOutliner = new Outliner( pImpl->mpPool, OutlinerMode::TextObject );
pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
}
else
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index c9769f8a52e0..3685ea104558 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -293,7 +293,7 @@ Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt,
rWrt.Strm().WriteChar( '>' );
// Was jetzt kommt ist das Gegenstueck zu SdrTextObjectt::SetText()
- Outliner aOutliner(nullptr, OUTLINERMODE_TEXTOBJECT);
+ Outliner aOutliner(nullptr, OutlinerMode::TextObject);
aOutliner.SetUpdateMode( false );
aOutliner.SetText( *pOutlinerParaObj );
OUString aText( aOutliner.GetText( aOutliner.GetParagraph(0),
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 666b6c1501ac..022a59c7e6a5 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -963,7 +963,7 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(OUString &rString, WW8_CP
EditTextObject* pTemporaryText = m_pDrawEditEngine->CreateTextObject();
pRet = new OutlinerParaObject(*pTemporaryText);
- pRet->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+ pRet->SetOutlinerMode( OutlinerMode::TextObject );
delete pTemporaryText;
m_pDrawEditEngine->SetText( OUString() );
@@ -1172,7 +1172,7 @@ void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
bool bVertical = pTextObj->IsVerticalWriting();
EditTextObject* pTemporaryText = m_pDrawEditEngine->CreateTextObject();
OutlinerParaObject* pOp = new OutlinerParaObject(*pTemporaryText);
- pOp->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
+ pOp->SetOutlinerMode( OutlinerMode::TextObject );
pOp->SetVertical( bVertical );
delete pTemporaryText;
pTextObj->NbcSetOutlinerParaObject( pOp );
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index d78167a6d169..38bfe02560ef 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -768,7 +768,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
{
SdrOutliner aTmpOutliner(pDoc->getIDocumentDrawModelAccess().GetDrawModel()->
GetDrawOutliner().GetEmptyItemSet().GetPool(),
- OUTLINERMODE_TEXTOBJECT );
+ OutlinerMode::TextObject );
aTmpOutliner.SetRefDevice( pDoc->getIDocumentDeviceAccess().getPrinter( false ) );
MapMode aMapMode (MAP_TWIP);
aTmpOutliner.SetRefMapMode(aMapMode);
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index acac39f59642..621277e0a475 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -598,7 +598,7 @@ void SwSidebarWin::InitControls()
}
SwDocShell* aShell = mrView.GetDocShell();
- mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT);
+ mpOutliner = new Outliner(&aShell->GetPool(),OutlinerMode::TextObject);
aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner );
mpOutliner->SetUpdateMode( true );
Rescale();
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index 5395ffe7656a..a5a7494ec37f 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -54,7 +54,7 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw,
bool bInteractive ) :
SdrOutliner(pVw->GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->
GetDrawOutliner().GetEmptyItemSet().GetPool(),
- OUTLINERMODE_TEXTOBJECT ),
+ OutlinerMode::TextObject ),
pView( pVw ),
pTextObj( nullptr ),
pOutlView( nullptr ),
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 9c1e436f0f6d..2ab98fea04b9 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -491,7 +491,7 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
{
SwWrtShell *pSh = &GetWrtShell();
SdrView *pSdrView = pSh->GetDrawView();
- SdrOutliner* pOutliner = ::SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrView->GetModel());
+ SdrOutliner* pOutliner = ::SdrMakeOutliner(OutlinerMode::TextObject, *pSdrView->GetModel());
uno::Reference< linguistic2::XSpellChecker1 > xSpell( ::GetSpellChecker() );
if (pOutliner)
{