summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-17 14:15:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-20 06:52:34 +0000
commitd99d143900081dd14e070c7373ba204739d80496 (patch)
tree72fb5e8523e29399d0aff96d3a6fb37dafeaabd6 /sw/source/core
parent8e5437ea859e78f7de2730bfa60ab6d27534f286 (diff)
convert RndStdIds to scoped enum
Change-Id: I029ad67dfcbc40f3953adf485957efcbd97f23d0 Reviewed-on: https://gerrit.libreoffice.org/35328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/access/accdoc.cxx4
-rw-r--r--sw/source/core/access/accframebase.cxx4
-rw-r--r--sw/source/core/access/accfrmobj.cxx8
-rw-r--r--sw/source/core/access/accmap.cxx10
-rw-r--r--sw/source/core/access/accselectionhelper.cxx2
-rw-r--r--sw/source/core/doc/CntntIdxStore.cxx8
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx42
-rw-r--r--sw/source/core/doc/DocumentDrawModelManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx46
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx14
-rw-r--r--sw/source/core/doc/docdesc.cxx4
-rw-r--r--sw/source/core/doc/docdraw.cxx2
-rw-r--r--sw/source/core/doc/docedt.cxx12
-rw-r--r--sw/source/core/doc/docfly.cxx58
-rw-r--r--sw/source/core/doc/docglbl.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx46
-rw-r--r--sw/source/core/doc/docnew.cxx2
-rw-r--r--sw/source/core/doc/docsort.cxx2
-rw-r--r--sw/source/core/doc/tblcpy.cxx4
-rw-r--r--sw/source/core/docnode/ndtbl.cxx4
-rw-r--r--sw/source/core/docnode/node.cxx4
-rw-r--r--sw/source/core/docnode/nodes.cxx2
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx8
-rw-r--r--sw/source/core/draw/dcontact.cxx22
-rw-r--r--sw/source/core/draw/dview.cxx8
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/fields/expfld.cxx10
-rw-r--r--sw/source/core/frmedt/fecopy.cxx70
-rw-r--r--sw/source/core/frmedt/fefly1.cxx86
-rw-r--r--sw/source/core/frmedt/feshview.cxx56
-rw-r--r--sw/source/core/frmedt/fews.cxx14
-rw-r--r--sw/source/core/frmedt/tblsel.cxx4
-rw-r--r--sw/source/core/inc/UndoCore.hxx2
-rw-r--r--sw/source/core/inc/flyfrm.hxx8
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx14
-rw-r--r--sw/source/core/layout/anchoredobject.cxx12
-rw-r--r--sw/source/core/layout/atrfrm.cxx78
-rw-r--r--sw/source/core/layout/calcmove.cxx2
-rw-r--r--sw/source/core/layout/flowfrm.cxx2
-rw-r--r--sw/source/core/layout/fly.cxx14
-rw-r--r--sw/source/core/layout/flycnt.cxx2
-rw-r--r--sw/source/core/layout/flylay.cxx8
-rw-r--r--sw/source/core/layout/flypos.cxx4
-rw-r--r--sw/source/core/layout/frmtool.cxx20
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx4
-rw-r--r--sw/source/core/layout/pagechg.cxx10
-rw-r--r--sw/source/core/layout/sortedobjs.cxx32
-rw-r--r--sw/source/core/layout/tabfrm.cxx6
-rw-r--r--sw/source/core/layout/wsfrm.cxx4
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx2
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx2
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx8
-rw-r--r--sw/source/core/text/frmform.cxx2
-rw-r--r--sw/source/core/text/itratr.cxx4
-rw-r--r--sw/source/core/text/porfly.cxx4
-rw-r--r--sw/source/core/text/txtfly.cxx32
-rw-r--r--sw/source/core/text/txtfrm.cxx12
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx6
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx4
-rw-r--r--sw/source/core/txtnode/thints.cxx2
-rw-r--r--sw/source/core/undo/rolbck.cxx2
-rw-r--r--sw/source/core/undo/unattr.cxx20
-rw-r--r--sw/source/core/undo/undel.cxx4
-rw-r--r--sw/source/core/undo/undobj.cxx8
-rw-r--r--sw/source/core/undo/undobj1.cxx87
-rw-r--r--sw/source/core/undo/undraw.cxx26
-rw-r--r--sw/source/core/undo/untbl.cxx4
-rw-r--r--sw/source/core/undo/untblk.cxx4
-rw-r--r--sw/source/core/unocore/unodraw.cxx38
-rw-r--r--sw/source/core/unocore/unoframe.cxx24
-rw-r--r--sw/source/core/unocore/unoobj2.cxx5
-rw-r--r--sw/source/core/unocore/unotext.cxx2
-rw-r--r--sw/source/core/view/vdraw.cxx2
73 files changed, 545 insertions, 545 deletions
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 0cd8202d849d..84e7298487f2 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -560,7 +560,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
SwFlyFrame *pFlyFrame = pCurrFrame->FindFlyFrame();
const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor();
RndStdIds eAnchorId = rAnchor.GetAnchorId();
- if(eAnchorId == FLY_AS_CHAR)
+ if(eAnchorId == RndStdIds::FLY_AS_CHAR)
{
const SwFrame *pSwFrame = pFlyFrame->GetAnchorFrame();
if(pSwFrame->IsTextFrame())
@@ -584,7 +584,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes()
SdrObject *pObj = rMrkList.GetMark(i)->GetMarkedSdrObj();
SwFrameFormat* pFormat = static_cast<SwDrawContact*>(pObj->GetUserCall())->GetFormat();
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
- if( FLY_AS_CHAR != rAnchor.GetAnchorId() )
+ if( RndStdIds::FLY_AS_CHAR != rAnchor.GetAnchorId() )
pCurrTextFrame = nullptr;
}
}
diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx
index e4021791935b..396cbb0571cf 100644
--- a/sw/source/core/access/accframebase.cxx
+++ b/sw/source/core/access/accframebase.cxx
@@ -336,13 +336,13 @@ bool SwAccessibleFrameBase::GetSelectedState( )
sal_uLong nEndIndex = pEnd->nNode.GetIndex();
if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) )
{
- if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
+ if( rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
if( ((nHere == nStartIndex) && (nIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) )
if( ((nHere == nEndIndex) && (nIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) )
return true;
}
- else if( rAnchor.GetAnchorId() == FLY_AT_PARA )
+ else if( rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA )
{
if( ((nHere > nStartIndex) || pStart->nContent.GetIndex() ==0 )
&& (nHere < nEndIndex ) )
diff --git a/sw/source/core/access/accfrmobj.cxx b/sw/source/core/access/accfrmobj.cxx
index 9c8d51520160..b2471797b673 100644
--- a/sw/source/core/access/accfrmobj.cxx
+++ b/sw/source/core/access/accfrmobj.cxx
@@ -157,7 +157,7 @@ bool SwAccessibleChild::IsBoundAsChar() const
{
const SwFrameFormat* pFrameFormat = ::FindFrameFormat( mpDrawObj );
bRet = pFrameFormat
- && (FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId());
+ && (RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId());
}
else if ( mpWindow )
{
@@ -334,7 +334,7 @@ const SwFrame* SwAccessibleChild::GetParent( const bool bInPagePreview ) const
const SwFlyFrame* pFly = static_cast< const SwFlyFrame *>( mpFrame );
if( pFly->IsFlyInContentFrame() )
{
- // For FLY_AS_CHAR the parent is the anchor
+ // For RndStdIds::FLY_AS_CHAR the parent is the anchor
pParent = pFly->GetAnchorFrame();
OSL_ENSURE( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ),
"parent is not accessible" );
@@ -368,9 +368,9 @@ const SwFrame* SwAccessibleChild::GetParent( const bool bInPagePreview ) const
{
const SwFrameFormat *pFrameFormat = pContact->GetFormat();
OSL_ENSURE( pFrameFormat, "frame format is missing" );
- if( pFrameFormat && FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() )
+ if( pFrameFormat && RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() )
{
- // For FLY_AS_CHAR the parent is the anchor
+ // For RndStdIds::FLY_AS_CHAR the parent is the anchor
pParent = pContact->GetAnchorFrame();
OSL_ENSURE( SwAccessibleChild( pParent ).IsAccessible( bInPagePreview ),
"parent is not accessible" );
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index c925bac2c6fb..959652ef7484 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1152,7 +1152,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
const SwPosition *pPos = rAnchor.GetContentAnchor();
- if(rAnchor.GetAnchorId() == FLY_AT_PAGE)
+ if(rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PAGE)
{
uno::Reference < XAccessible > xAcc( (*aIter).second );
if(xAcc.is())
@@ -1189,7 +1189,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
sal_uLong nEndIndex = pEnd->nNode.GetIndex();
if( ( nHere >= nStartIndex ) && (nHere <= nEndIndex) )
{
- if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
+ if( rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
if( ( ((nHere == nStartIndex) && (nIndex >= pStart->nContent.GetIndex())) || (nHere > nStartIndex) )
&&( ((nHere == nEndIndex) && (nIndex < pEnd->nContent.GetIndex())) || (nHere < nEndIndex) ) )
@@ -1205,7 +1205,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
static_cast < ::accessibility::AccessibleShape* >(xAcc.get())->ResetState( AccessibleStateType::SELECTED );
}
}
- else if( rAnchor.GetAnchorId() == FLY_AT_PARA )
+ else if( rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA )
{
if( ((nHere > nStartIndex) || pStart->nContent.GetIndex() ==0 )
&& (nHere < nEndIndex ) )
@@ -1272,7 +1272,7 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
if (pFrameFormat)
{
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
- if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
+ if( rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
uno::Reference< XAccessible > xAccParent = pAccFrame->getAccessibleParent();
if (xAccParent.is())
@@ -1543,7 +1543,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection(bool bInvalidateFocusMode /*=fa
if (pFrameFormat)
{
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
- if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
+ if( rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
uno::Reference< XAccessible > xPara = pAccShape->getAccessibleParent();
if (xPara.is())
diff --git a/sw/source/core/access/accselectionhelper.cxx b/sw/source/core/access/accselectionhelper.cxx
index 61b25e1a7022..0781b7b04ed2 100644
--- a/sw/source/core/access/accselectionhelper.cxx
+++ b/sw/source/core/access/accselectionhelper.cxx
@@ -292,7 +292,7 @@ Reference<XAccessible> SwAccessibleSelectionHelper::getSelectedAccessibleChild(
if (pFrameFormat)
{
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
- if( rAnchor.GetAnchorId() == FLY_AS_CHAR )
+ if( rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
const SwFrame *pParaFrame = SwAccessibleFrame::GetParent( SwAccessibleChild(pFlyFrame), m_rContext.IsInPagePreview() );
aChild = pParaFrame;
diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx
index 102d4873f202..14775d1e050a 100644
--- a/sw/source/core/doc/CntntIdxStore.cxx
+++ b/sw/source/core/doc/CntntIdxStore.cxx
@@ -326,13 +326,13 @@ void ContentIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCont
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
SwPosition const*const pAPos = rAnchor.GetContentAnchor();
if ( pAPos && ( nNode == pAPos->nNode.GetIndex() ) &&
- ( FLY_AT_PARA == rAnchor.GetAnchorId() ||
- FLY_AT_CHAR == rAnchor.GetAnchorId() ) )
+ ( RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId() ||
+ RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId() ) )
{
bool bSkip = false;
aSave.m_bOther = false;
aSave.m_nContent = pAPos->nContent.GetIndex();
- if ( FLY_AT_CHAR == rAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId() )
{
if( nContent <= aSave.m_nContent )
{
@@ -364,7 +364,7 @@ void ContentIdxStoreImpl::RestoreFlys(SwDoc* pDoc, updater_t& rUpdater, bool bAu
SwFormatAnchor aNew( rFlyAnchor );
SwPosition aNewPos( *rFlyAnchor.GetContentAnchor() );
rUpdater(aNewPos, aEntry.m_nContent);
- if ( FLY_AT_CHAR != rFlyAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AT_CHAR != rFlyAnchor.GetAnchorId() )
{
aNewPos.nContent.Assign( nullptr, 0 );
}
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index a842102340cc..2e4fe3c54cac 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -94,10 +94,10 @@ namespace
SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
if (pAPos &&
- ((FLY_AS_CHAR == pAnchor->GetAnchorId()) ||
- (FLY_AT_CHAR == pAnchor->GetAnchorId()) ||
- (FLY_AT_FLY == pAnchor->GetAnchorId()) ||
- (FLY_AT_PARA == pAnchor->GetAnchorId())) &&
+ ((RndStdIds::FLY_AS_CHAR == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_FLY == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId())) &&
nSttNd <= pAPos->nNode.GetIndex() &&
pAPos->nNode.GetIndex() < nEndNd )
{
@@ -1889,8 +1889,8 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam )
const SwFormatAnchor* pAnchor = &pFly->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
if (pAPos &&
- ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
- (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
aRg.aStart <= pAPos->nNode && pAPos->nNode <= aRg.aEnd )
{
m_rDoc.getIDocumentLayoutAccess().DelLayoutFormat( pFly );
@@ -2734,7 +2734,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
// Didn't set the Anchor yet?
// DrawObjecte must never end up in the Header/Footer!
RndStdIds eAnchorId = pAnchor != nullptr ? pAnchor->GetAnchorId() : pFormat->GetAnchor().GetAnchorId();
- const bool bIsAtContent = (FLY_AT_PAGE != eAnchorId);
+ const bool bIsAtContent = (RndStdIds::FLY_AT_PAGE != eAnchorId);
const SwNodeIndex* pChkIdx = nullptr;
if ( pAnchor == nullptr )
@@ -2753,7 +2753,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
&& m_rDoc.IsInHeaderFooter( *pChkIdx ) )
{
// apply at-page anchor format
- eAnchorId = FLY_AT_PAGE;
+ eAnchorId = RndStdIds::FLY_AT_PAGE;
pFormat->SetFormatAttr( SwFormatAnchor( eAnchorId ) );
}
else if( pAnchor == nullptr
@@ -2763,7 +2763,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
// apply anchor format
SwFormatAnchor aAnch( pAnchor != nullptr ? *pAnchor : pFormat->GetAnchor() );
eAnchorId = aAnch.GetAnchorId();
- if ( eAnchorId == FLY_AT_FLY )
+ if ( eAnchorId == RndStdIds::FLY_AT_FLY )
{
SwPosition aPos( *rRg.GetNode().FindFlyStartNode() );
aAnch.SetAnchor( &aPos );
@@ -2771,9 +2771,9 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
else
{
aAnch.SetAnchor( rRg.GetPoint() );
- if ( eAnchorId == FLY_AT_PAGE )
+ if ( eAnchorId == RndStdIds::FLY_AT_PAGE )
{
- eAnchorId = dynamic_cast<const SdrUnoObj*>( &rDrawObj) != nullptr ? FLY_AS_CHAR : FLY_AT_PARA;
+ eAnchorId = dynamic_cast<const SdrUnoObj*>( &rDrawObj) != nullptr ? RndStdIds::FLY_AS_CHAR : RndStdIds::FLY_AT_PARA;
aAnch.SetType( eAnchorId );
}
}
@@ -2781,7 +2781,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
}
// insert text attribute for as-character anchored drawing object
- if ( eAnchorId == FLY_AS_CHAR )
+ if ( eAnchorId == RndStdIds::FLY_AS_CHAR )
{
bool bAnchorAtPageAsFallback = true;
const SwFormatAnchor& rDrawObjAnchorFormat = pFormat->GetAnchor();
@@ -2801,7 +2801,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
if ( bAnchorAtPageAsFallback )
{
OSL_ENSURE( false, "DocumentContentOperationsManager::InsertDrawObj(..) - missing content anchor for as-character anchored drawing object --> anchor at-page" );
- pFormat->SetFormatAttr( SwFormatAnchor( FLY_AT_PAGE ) );
+ pFormat->SetFormatAttr( SwFormatAnchor( RndStdIds::FLY_AT_PAGE ) );
}
}
@@ -3267,21 +3267,21 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
SwFrameFormat* pFormat = (*m_rDoc.GetSpzFrameFormats())[n];
SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
- bool bAtContent = (pAnchor->GetAnchorId() == FLY_AT_PARA);
+ bool bAtContent = (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA);
if ( !pAPos )
continue;
sal_uLong nSkipAfter = pAPos->nNode.GetIndex();
sal_uLong nStart = rRg.aStart.GetIndex();
switch ( pAnchor->GetAnchorId() )
{
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_FLY:
if(bCopyFlyAtFly)
++nSkipAfter;
else if(m_rDoc.getIDocumentRedlineAccess().IsRedlineMove())
++nStart;
break;
- case FLY_AT_CHAR:
- case FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_PARA:
if(m_rDoc.getIDocumentRedlineAccess().IsRedlineMove())
++nStart;
break;
@@ -3364,8 +3364,8 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
// method <SwNodes::CopyNodes(..)>.
// Thus, the new anchor position in the destination document is found
// by counting the text nodes.
- if ((aAnchor.GetAnchorId() == FLY_AT_PARA) ||
- (aAnchor.GetAnchorId() == FLY_AT_CHAR) )
+ if ((aAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA) ||
+ (aAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR) )
{
// First, determine number of anchor text node in the copied range.
// Note: The anchor text node *have* to be inside the copied range.
@@ -3429,7 +3429,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl(
newPos.nNode = aIdx;
}
// Set the character bound Flys back at the original character
- if ((FLY_AT_CHAR == aAnchor.GetAnchorId()) &&
+ if ((RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) &&
newPos.nNode.GetNode().IsTextNode() )
{
newPos.nContent.Assign( newPos.nNode.GetNode().GetTextNode(), newPos.nContent.GetIndex() );
@@ -4068,7 +4068,7 @@ SwFlyFrameFormat* DocumentContentOperationsManager::InsNoTextNode( const SwPosit
SwFlyFrameFormat *pFormat = nullptr;
if( pNode )
{
- pFormat = m_rDoc.MakeFlySection_( rPos, *pNode, FLY_AT_PARA,
+ pFormat = m_rDoc.MakeFlySection_( rPos, *pNode, RndStdIds::FLY_AT_PARA,
pFlyAttrSet, pFrameFormat );
if( pGrfAttrSet )
pNode->SetAttr( *pGrfAttrSet );
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx
index b97143d3fbe4..ec8fd87235cc 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -307,7 +307,7 @@ bool DocumentDrawModelManager::Search(const SwPaM& rPaM, const SvxSearchItem& rS
// Filter for at-paragraph anchored draw frames.
const SwFrameFormat& rFrameFormat = pPosFlyFrame->GetFormat();
const SwFormatAnchor& rAnchor = rFrameFormat.GetAnchor();
- if (rAnchor.GetAnchorId() != FLY_AT_PARA || rFrameFormat.Which() != RES_DRAWFRMFMT)
+ if (rAnchor.GetAnchorId() != RndStdIds::FLY_AT_PARA || rFrameFormat.Which() != RES_DRAWFRMFMT)
continue;
// Does the shape have matching text?
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index 08e1cff435a7..55d0192c9775 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -115,16 +115,16 @@ SwFrameFormat *DocumentLayoutManager::MakeLayoutFormat( RndStdIds eRequest, cons
switch ( eRequest )
{
- case RND_STD_HEADER:
- case RND_STD_HEADERL:
- case RND_STD_HEADERR:
+ case RndStdIds::HEADER:
+ case RndStdIds::HEADERL:
+ case RndStdIds::HEADERR:
{
bHeader = true;
SAL_FALLTHROUGH;
}
- case RND_STD_FOOTER:
- case RND_STD_FOOTERL:
- case RND_STD_FOOTERR:
+ case RndStdIds::FOOTER:
+ case RndStdIds::FOOTERL:
+ case RndStdIds::FOOTERR:
{
pFormat = new SwFrameFormat( m_rDoc.GetAttrPool(),
(bHeader ? "Right header" : "Right footer"),
@@ -136,14 +136,14 @@ SwFrameFormat *DocumentLayoutManager::MakeLayoutFormat( RndStdIds eRequest, cons
( aTmpIdx,
bHeader ? SwHeaderStartNode : SwFooterStartNode,
m_rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(static_cast<sal_uInt16>( bHeader
- ? ( eRequest == RND_STD_HEADERL
+ ? ( eRequest == RndStdIds::HEADERL
? RES_POOLCOLL_HEADERL
- : eRequest == RND_STD_HEADERR
+ : eRequest == RndStdIds::HEADERR
? RES_POOLCOLL_HEADERR
: RES_POOLCOLL_HEADER )
- : ( eRequest == RND_STD_FOOTERL
+ : ( eRequest == RndStdIds::FOOTERL
? RES_POOLCOLL_FOOTERL
- : eRequest == RND_STD_FOOTERR
+ : eRequest == RndStdIds::FOOTERR
? RES_POOLCOLL_FOOTERR
: RES_POOLCOLL_FOOTER )
) ) );
@@ -159,7 +159,7 @@ SwFrameFormat *DocumentLayoutManager::MakeLayoutFormat( RndStdIds eRequest, cons
}
break;
- case RND_DRAW_OBJECT:
+ case RndStdIds::DRAW_OBJECT:
{
pFormat = m_rDoc.MakeDrawFrameFormat( OUString(), m_rDoc.GetDfltFrameFormat() );
if( pSet ) // Set a few more attributes
@@ -174,11 +174,11 @@ SwFrameFormat *DocumentLayoutManager::MakeLayoutFormat( RndStdIds eRequest, cons
break;
#if OSL_DEBUG_LEVEL > 0
- case FLY_AT_PAGE:
- case FLY_AT_CHAR:
- case FLY_AT_FLY:
- case FLY_AT_PARA:
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_FLY:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AS_CHAR:
OSL_FAIL( "use new interface instead: SwDoc::MakeFlySection!" );
break;
#endif
@@ -269,7 +269,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
{
SwFrameFormat* pTmpFormat = (*pTable)[i];
const SwFormatAnchor &rAnch = pTmpFormat->GetAnchor();
- if ( rAnch.GetAnchorId() == FLY_AT_FLY &&
+ if ( rAnch.GetAnchorId() == RndStdIds::FLY_AT_FLY &&
rAnch.GetContentAnchor()->nNode.GetIndex() == nNodeIdxOfFlyFormat )
{
aToDeleteFrameFormats.push_back( pTmpFormat );
@@ -298,7 +298,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat )
// Delete the character for FlyFrames anchored as char (if necessary)
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
- if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) && rAnchor.GetContentAnchor())
+ if ((RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()) && rAnchor.GetContentAnchor())
{
const SwPosition* pPos = rAnchor.GetContentAnchor();
SwTextNode *pTextNd = pPos->nNode.GetNode().GetTextNode();
@@ -354,7 +354,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
rSource.CallSwClientNotify(sw::CheckDrawFrameFormatLayerHint(&bCheckControlLayer));
bMayNotCopy =
bCheckControlLayer &&
- ((FLY_AT_PARA == rNewAnchor.GetAnchorId()) || (FLY_AT_FLY == rNewAnchor.GetAnchorId()) || (FLY_AT_CHAR == rNewAnchor.GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_PARA == rNewAnchor.GetAnchorId()) || (RndStdIds::FLY_AT_FLY == rNewAnchor.GetAnchorId()) || (RndStdIds::FLY_AT_CHAR == rNewAnchor.GetAnchorId())) &&
pCAnchor && m_rDoc.IsInHeaderFooter(pCAnchor->nNode);
}
@@ -463,7 +463,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
}
}
- if (bSetTextFlyAtt && (FLY_AS_CHAR == rNewAnchor.GetAnchorId()))
+ if (bSetTextFlyAtt && (RndStdIds::FLY_AS_CHAR == rNewAnchor.GetAnchorId()))
{
const SwPosition* pPos = rNewAnchor.GetContentAnchor();
SwFormatFlyCnt aFormat( pDest );
@@ -478,13 +478,13 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
if (SwFrameFormat* pSourceTextBox = SwTextBoxHelper::getOtherTextBoxFormat(&rSource, RES_DRAWFRMFMT))
{
SwFormatAnchor boxAnchor(rNewAnchor);
- if (FLY_AS_CHAR == boxAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AS_CHAR == boxAnchor.GetAnchorId())
{
// AS_CHAR *must not* be set on textbox fly-frame
- boxAnchor.SetType(FLY_AT_CHAR);
+ boxAnchor.SetType(RndStdIds::FLY_AT_CHAR);
}
// presumably these anchors are supported though not sure
- assert(FLY_AT_CHAR == boxAnchor.GetAnchorId() || FLY_AT_PARA == boxAnchor.GetAnchorId());
+ assert(RndStdIds::FLY_AT_CHAR == boxAnchor.GetAnchorId() || RndStdIds::FLY_AT_PARA == boxAnchor.GetAnchorId());
SwFrameFormat* pDestTextBox = CopyLayoutFormat(*pSourceTextBox,
boxAnchor, bSetTextFlyAtt, bMakeFrames);
SwAttrSet aSet(pDest->GetAttrSet());
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 9ee0154171b0..c911c72b09b4 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1271,13 +1271,13 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
{
if ( m_rDoc.GetDocumentSettingManager().get(DocumentSettingId::HTML_MODE) )
{
- aSet.Put( SwFormatAnchor( FLY_AS_CHAR ));
+ aSet.Put( SwFormatAnchor( RndStdIds::FLY_AS_CHAR ));
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::LINE_CENTER, text::RelOrientation::PRINT_AREA ) );
aSet.Put( SwFormatSurround( css::text::WrapTextMode_NONE ) );
}
else
{
- aSet.Put( SwFormatAnchor( FLY_AT_PARA ));
+ aSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PARA ));
aSet.Put( SwFormatSurround( css::text::WrapTextMode_PARALLEL ) );
aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::PRINT_AREA ) );
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::PRINT_AREA ) );
@@ -1301,7 +1301,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
case RES_POOLFRM_GRAPHIC:
case RES_POOLFRM_OLE:
{
- aSet.Put( SwFormatAnchor( FLY_AT_PARA ));
+ aSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PARA ));
aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ));
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
aSet.Put( SwFormatSurround( css::text::WrapTextMode_DYNAMIC ));
@@ -1309,14 +1309,14 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
break;
case RES_POOLFRM_FORMEL:
{
- aSet.Put( SwFormatAnchor( FLY_AS_CHAR ) );
+ aSet.Put( SwFormatAnchor( RndStdIds::FLY_AS_CHAR ) );
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::CHAR_CENTER, text::RelOrientation::FRAME ) );
aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) );
}
break;
case RES_POOLFRM_MARGINAL:
{
- aSet.Put( SwFormatAnchor( FLY_AT_PARA ));
+ aSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PARA ));
aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME ));
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
aSet.Put( SwFormatSurround( css::text::WrapTextMode_PARALLEL ));
@@ -1328,7 +1328,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
break;
case RES_POOLFRM_WATERSIGN:
{
- aSet.Put( SwFormatAnchor( FLY_AT_PAGE ));
+ aSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PAGE ));
aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ));
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::CENTER, text::RelOrientation::FRAME ));
aSet.Put( SvxOpaqueItem( RES_OPAQUE, false ));
@@ -1337,7 +1337,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
break;
case RES_POOLFRM_LABEL:
{
- aSet.Put( SwFormatAnchor( FLY_AS_CHAR ) );
+ aSet.Put( SwFormatAnchor( RndStdIds::FLY_AS_CHAR ) );
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ) );
aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) );
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index bbc3897392c6..52e5600fa6b7 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -257,7 +257,7 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFormatHeader &rHe
const SwFormatHeader &rFormatHead = rDescFrameFormat.GetHeader();
if ( !rFormatHead.IsActive() )
{
- SwFormatHeader aHead( getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_HEADERL, nullptr ) );
+ SwFormatHeader aHead( getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::HEADERL, nullptr ) );
rDescFrameFormat.SetFormatAttr( aHead );
// take over additional attributes (margins, borders ...)
::lcl_DescSetAttr( *rHead.GetHeaderFormat(), *aHead.GetHeaderFormat(), false);
@@ -330,7 +330,7 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFormatFooter &rFo
const SwFormatFooter &rFormatFoot = rDescFrameFormat.GetFooter();
if ( !rFormatFoot.IsActive() )
{
- SwFormatFooter aFoot( getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_FOOTER, nullptr ) );
+ SwFormatFooter aFoot( getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::FOOTER, nullptr ) );
rDescFrameFormat.SetFormatAttr( aFoot );
// Take over additional attributes (margins, borders ...).
::lcl_DescSetAttr( *rFoot.GetFooterFormat(), *aFoot.GetFooterFormat(), false);
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index a6c66c2b232a..28be9b0d92d1 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -420,7 +420,7 @@ bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
SwDrawContact *pC = static_cast<SwDrawContact*>(GetUserCall(pObj));
SwDrawFrameFormat *pFrameFormat = static_cast<SwDrawFrameFormat*>(pC->GetFormat());
if( pFrameFormat &&
- FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() )
+ RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() )
{
rDrawView.MarkObj( pObj, rDrawView.Imp().GetPageView(), true );
--i;
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 5f2c8d0d1d27..4782b010d8ed 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -94,8 +94,8 @@ void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr& rArr )
SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
if (pAPos &&
- ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
- (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
rRg.aStart <= pAPos->nNode && pAPos->nNode < rRg.aEnd )
{
SaveFly aSave( pAPos->nNode.GetIndex() - rRg.aStart.GetIndex(),
@@ -137,8 +137,8 @@ void SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos,
const SwPosition* pAPos = pAnchor->GetContentAnchor();
const SwNodeIndex* pContentIdx;
if (pAPos &&
- ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
- (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
// do not move if the InsPos is in the ContentArea of the Fly
( nullptr == ( pContentIdx = pFormat->GetContent().GetContentIdx() ) ||
!( *pContentIdx < rInsPos &&
@@ -194,8 +194,8 @@ void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
const SwFormatAnchor &rAnch = pFormat->GetAnchor();
SwPosition const*const pAPos = rAnch.GetContentAnchor();
if (pAPos &&
- ((rAnch.GetAnchorId() == FLY_AT_PARA) ||
- (rAnch.GetAnchorId() == FLY_AT_CHAR)) &&
+ ((rAnch.GetAnchorId() == RndStdIds::FLY_AT_PARA) ||
+ (rAnch.GetAnchorId() == RndStdIds::FLY_AT_CHAR)) &&
( bDelFwrd
? rMkNdIdx < pAPos->nNode && pAPos->nNode <= rPtNdIdx
: rPtNdIdx <= pAPos->nNode && pAPos->nNode < rMkNdIdx ))
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 231c1785d518..7bf6cba8e05e 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -218,7 +218,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
if( rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() )
switch( rAnch.GetAnchorId() )
{
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
if( pFlyFormat && rAnch.GetContentAnchor() )
{
const SwFrame* pOld = static_cast<const SwFlyFrameFormat*>(pFlyFormat)->GetFrame( &aRet );
@@ -227,8 +227,8 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
}
break;
- case FLY_AT_PARA:
- case FLY_AT_CHAR: // LAYER_IMPL
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR: // LAYER_IMPL
if( rAnch.GetContentAnchor() )
{
const SwPosition *pPos = rAnch.GetContentAnchor();
@@ -239,7 +239,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
}
break;
- case FLY_AT_FLY: // LAYER_IMPL
+ case RndStdIds::FLY_AT_FLY: // LAYER_IMPL
if( rAnch.GetContentAnchor() )
{
const SwFlyFrameFormat* pFormat = static_cast<SwFlyFrameFormat*>(rAnch.GetContentAnchor()->
@@ -250,7 +250,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch,
}
break;
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
{
sal_uInt16 nPgNum = rAnch.GetPageNum();
const SwPageFrame *pPage = static_cast<SwPageFrame*>(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->Lower());
@@ -285,9 +285,9 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo
RndStdIds nNew = aNewAnch.GetAnchorId();
// Is the new anchor valid?
- if( !aNewAnch.GetContentAnchor() && (FLY_AT_FLY == nNew ||
- (FLY_AT_PARA == nNew) || (FLY_AS_CHAR == nNew) ||
- (FLY_AT_CHAR == nNew) ))
+ if( !aNewAnch.GetContentAnchor() && (RndStdIds::FLY_AT_FLY == nNew ||
+ (RndStdIds::FLY_AT_PARA == nNew) || (RndStdIds::FLY_AS_CHAR == nNew) ||
+ (RndStdIds::FLY_AT_CHAR == nNew) ))
{
return IGNOREANCHOR;
}
@@ -303,7 +303,7 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo
// kind of a show!
rFormat.DelFrames();
- if ( FLY_AS_CHAR == nOld )
+ if ( RndStdIds::FLY_AS_CHAR == nOld )
{
// We need to handle InContents in a special way:
// The TextAttribut needs to be destroyed which, unfortunately, also
@@ -334,7 +334,7 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo
const SfxPoolItem* pItem;
switch( nNew )
{
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
// If no position attributes are received, we have to make sure
// that no forbidden automatic alignment is left.
{
@@ -364,10 +364,10 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo
}
break;
- case FLY_AT_PARA:
- case FLY_AT_CHAR: // LAYER_IMPL
- case FLY_AT_FLY: // LAYER_IMPL
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR: // LAYER_IMPL
+ case RndStdIds::FLY_AT_FLY: // LAYER_IMPL
+ case RndStdIds::FLY_AT_PAGE:
{
// If no position attributes are coming in, we correct the position in a way
// such that the fly's document coordinates are preserved.
@@ -381,7 +381,7 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo
if( text::HoriOrientation::NONE == aOldH.GetHoriOrient() && ( !pItem ||
aOldH.GetPos() == static_cast<const SwFormatHoriOrient*>(pItem)->GetPos() ))
{
- SwTwips nPos = (FLY_AS_CHAR == nOld) ? 0 : aOldH.GetPos();
+ SwTwips nPos = (RndStdIds::FLY_AS_CHAR == nOld) ? 0 : aOldH.GetPos();
nPos += aOldAnchorPos.getX() - aNewAnchorPos.getX();
if( pItem )
@@ -403,7 +403,7 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo
if( text::VertOrientation::NONE == aOldV.GetVertOrient() && (!pItem ||
aOldV.GetPos() == static_cast<const SwFormatVertOrient*>(pItem)->GetPos() ) )
{
- SwTwips nPos = (FLY_AS_CHAR == nOld) ? 0 : aOldV.GetPos();
+ SwTwips nPos = (RndStdIds::FLY_AS_CHAR == nOld) ? 0 : aOldV.GetPos();
nPos += aOldAnchorPos.getY() - aNewAnchorPos.getY();
if( pItem )
{
@@ -766,7 +766,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
// anchored as character.
std::unique_ptr<const SwPosition> xOldAsCharAnchorPos;
const RndStdIds eOldAnchorType = pContact->GetAnchorId();
- if ( !_bSameOnly && eOldAnchorType == FLY_AS_CHAR )
+ if ( !_bSameOnly && eOldAnchorType == RndStdIds::FLY_AS_CHAR )
{
xOldAsCharAnchorPos.reset(new SwPosition(pContact->GetContentAnchor()));
}
@@ -781,8 +781,8 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
switch ( _eAnchorType )
{
- case FLY_AT_PARA:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR:
{
const Point aNewPoint = ( pOldAnchorFrame->IsVertical() ||
pOldAnchorFrame->IsRightToLeft() )
@@ -808,7 +808,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
}
break;
- case FLY_AT_FLY: // LAYER_IMPL
+ case RndStdIds::FLY_AT_FLY: // LAYER_IMPL
{
// Search the closest SwFlyFrame starting from the upper left corner.
SwFrame *pTextFrame;
@@ -834,10 +834,10 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
break;
}
- aNewAnch.SetType( FLY_AT_PAGE );
+ aNewAnch.SetType( RndStdIds::FLY_AT_PAGE );
SAL_FALLTHROUGH;
}
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
{
pNewAnchorFrame = getIDocumentLayoutAccess().GetCurrentLayout()->Lower();
while ( pNewAnchorFrame && !pNewAnchorFrame->Frame().IsInside( aPt ) )
@@ -848,7 +848,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
aNewAnch.SetPageNum( static_cast<const SwPageFrame*>(pNewAnchorFrame)->GetPhyPageNum());
}
break;
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
if( _bSameOnly ) // Change of position/size
{
if( !pOldAnchorFrame )
@@ -871,7 +871,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
bUnmark = ( 0 != i );
Point aPoint( aPt );
aPoint.setX(aPoint.getX() - 1); // Do not load in the DrawObj!
- aNewAnch.SetType( FLY_AS_CHAR );
+ aNewAnch.SetType( RndStdIds::FLY_AS_CHAR );
SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnchorFrame)->GetNode() );
if ( pNewAnchorFrame->Frame().IsInside( aPoint ) )
{
@@ -905,7 +905,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
OSL_ENSURE( false, "unexpected AnchorId." );
}
- if ( (FLY_AS_CHAR != _eAnchorType) &&
+ if ( (RndStdIds::FLY_AS_CHAR != _eAnchorType) &&
pNewAnchorFrame &&
( !_bSameOnly || pNewAnchorFrame != pOldAnchorFrame ) )
{
@@ -1013,8 +1013,8 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat &
const SwFormatAnchor& rAnchor = pSpzFrameFm->GetAnchor();
sal_uLong nTstSttNd;
// #i20622# - to-frame anchored objects are allowed.
- if ( ((rAnchor.GetAnchorId() == FLY_AT_PARA) ||
- (rAnchor.GetAnchorId() == FLY_AT_CHAR)) &&
+ if ( ((rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA) ||
+ (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR)) &&
nullptr != rAnchor.GetContentAnchor() &&
nFlySttNd <= ( nTstSttNd =
rAnchor.GetContentAnchor()->nNode.GetIndex() ) &&
@@ -1034,9 +1034,9 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat &
&rDstAnchor = rDest.GetAnchor();
sal_uLong nEndOfExtras = GetNodes().GetEndOfExtras().GetIndex();
bool bAllowed = false;
- if ( FLY_AT_PAGE == rSrcAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AT_PAGE == rSrcAnchor.GetAnchorId() )
{
- if ( (FLY_AT_PAGE == rDstAnchor.GetAnchorId()) ||
+ if ( (RndStdIds::FLY_AT_PAGE == rDstAnchor.GetAnchorId()) ||
( rDstAnchor.GetContentAnchor() &&
rDstAnchor.GetContentAnchor()->nNode.GetIndex() > nEndOfExtras ))
bAllowed = true;
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 4facb1feac1f..f4b0afb0d8da 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -379,8 +379,8 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
SwPosition const*const pAPos =
pAnchor->GetContentAnchor();
if (pAPos &&
- ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
- (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
aSIdx <= pAPos->nNode &&
pAPos->nNode < aEIdx )
{
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 7a59d8ca5391..0685cf164a9f 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -206,19 +206,19 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
// #i107811# Assure that at-page anchored fly frames have a page num or a
// content anchor set.
if ( !pAnchor ||
- ( FLY_AT_PAGE != pAnchor->GetAnchorId() &&
+ ( RndStdIds::FLY_AT_PAGE != pAnchor->GetAnchorId() &&
!pAnchor->GetContentAnchor() ) ||
- ( FLY_AT_PAGE == pAnchor->GetAnchorId() &&
+ ( RndStdIds::FLY_AT_PAGE == pAnchor->GetAnchorId() &&
!pAnchor->GetContentAnchor() &&
pAnchor->GetPageNum() == 0 ) )
{
// set it again, needed for Undo
SwFormatAnchor aAnch( pFormat->GetAnchor() );
- if (pAnchor && (FLY_AT_FLY == pAnchor->GetAnchorId()))
+ if (pAnchor && (RndStdIds::FLY_AT_FLY == pAnchor->GetAnchorId()))
{
SwPosition aPos( *rAnchPos.nNode.GetNode().FindFlyStartNode() );
aAnch.SetAnchor( &aPos );
- eAnchorId = FLY_AT_FLY;
+ eAnchorId = RndStdIds::FLY_AT_FLY;
}
else
{
@@ -229,7 +229,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
}
eAnchorId = aAnch.GetAnchorId();
- if ( FLY_AT_PAGE != eAnchorId || !pAnchor || aAnch.GetPageNum() == 0)
+ if ( RndStdIds::FLY_AT_PAGE != eAnchorId || !pAnchor || aAnch.GetPageNum() == 0)
{
aAnch.SetAnchor( &rAnchPos );
}
@@ -239,7 +239,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
else
eAnchorId = pFormat->GetAnchor().GetAnchorId();
- if ( FLY_AS_CHAR == eAnchorId )
+ if ( RndStdIds::FLY_AS_CHAR == eAnchorId )
{
const sal_Int32 nStt = rAnchPos.nContent.GetIndex();
SwTextNode * pTextNode = rAnchPos.nNode.GetNode().GetTextNode();
@@ -299,7 +299,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection( RndStdIds eAnchorType,
SwFrameFormat* pFrameFormat, bool bCalledFromShell )
{
SwFlyFrameFormat* pFormat = nullptr;
- if ( !pAnchorPos && (FLY_AT_PAGE != eAnchorType) )
+ if ( !pAnchorPos && (RndStdIds::FLY_AT_PAGE != eAnchorType) )
{
const SwFormatAnchor* pAnch;
if( (pFlySet && SfxItemState::SET == pFlySet->GetItemState(
@@ -307,7 +307,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection( RndStdIds eAnchorType,
( pFrameFormat && SfxItemState::SET == pFrameFormat->GetItemState(
RES_ANCHOR, true, reinterpret_cast<const SfxPoolItem**>(&pAnch) )) )
{
- if ( (FLY_AT_PAGE != pAnch->GetAnchorId()) )
+ if ( (RndStdIds::FLY_AT_PAGE != pAnch->GetAnchorId()) )
{
pAnchorPos = pAnch->GetContentAnchor();
}
@@ -481,7 +481,7 @@ static bool lcl_TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos,
const SwPosition* pPaMEnd = pTmp->End();
const sal_uInt32 nPamStartIndex = pPaMStart->nNode.GetIndex();
const sal_uInt32 nPamEndIndex = pPaMEnd->nNode.GetIndex();
- if (FLY_AT_PARA == nAnchorId)
+ if (RndStdIds::FLY_AT_PARA == nAnchorId)
bOk = (nPamStartIndex < nFlyIndex && nPamEndIndex > nFlyIndex) ||
(((nPamStartIndex == nFlyIndex) && (pPaMStart->nContent.GetIndex() == 0)) &&
(nPamEndIndex > nFlyIndex));
@@ -519,10 +519,10 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso,
const SwFormatAnchor& rAnchor = pFly->GetAnchor();
SwPosition const*const pAPos = rAnchor.GetContentAnchor();
if (pAPos &&
- ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
- (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
- ((FLY_AS_CHAR == rAnchor.GetAnchorId()) && bAsCharAlso)))
+ ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ ((RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()) && bAsCharAlso)))
{
if( pCmpRange &&
!lcl_TstFlyRange( pCmpRange, pAPos, rAnchor.GetAnchorId() ))
@@ -556,9 +556,9 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso,
continue;
const SwFormatAnchor& rAnchor = pFly->GetAnchor();
- if ((FLY_AT_PARA != rAnchor.GetAnchorId()) &&
- (FLY_AT_FLY != rAnchor.GetAnchorId()) &&
- (FLY_AT_CHAR != rAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA != rAnchor.GetAnchorId()) &&
+ (RndStdIds::FLY_AT_FLY != rAnchor.GetAnchorId()) &&
+ (RndStdIds::FLY_AT_CHAR != rAnchor.GetAnchorId()))
{
const SwContentFrame * pContentFrame = pPage->FindFirstBodyContent();
if ( !pContentFrame )
@@ -791,7 +791,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
// To avoid this, we disconnect the attribute from the Format.
const SwFormatAnchor& rAnchor = pNewFormat->GetAnchor();
- if ( FLY_AS_CHAR == rAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId() )
{
const SwPosition *pPos = rAnchor.GetContentAnchor();
SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode();
@@ -849,7 +849,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
pNewSet->Put( SvxULSpaceItem(RES_UL_SPACE) );
// The old one is paragraph-bound to the paragraph in the new one.
- SwFormatAnchor aAnch( FLY_AT_PARA );
+ SwFormatAnchor aAnch( RndStdIds::FLY_AT_PARA );
SwNodeIndex aAnchIdx( *pNewFormat->GetContent().GetContentIdx(), 1 );
pNew = aAnchIdx.GetNode().GetTextNode();
SwPosition aPos( aAnchIdx );
@@ -1108,7 +1108,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable
pNewFormat->SetFormatAttr( *pNewSet );
const SwFormatAnchor& rAnchor = pNewFormat->GetAnchor();
- if ( FLY_AS_CHAR == rAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId() )
{
const SwPosition *pPos = rAnchor.GetContentAnchor();
SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode();
@@ -1149,7 +1149,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable
pNewSet->Put( SwFormatHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ) );
// The old one is paragraph-bound to the new one's paragraph.
- SwFormatAnchor aAnch( FLY_AT_PARA );
+ SwFormatAnchor aAnch( RndStdIds::FLY_AT_PARA );
SwNodeIndex aAnchIdx( *pNewFormat->GetContent().GetContentIdx(), 1 );
pNew = aAnchIdx.GetNode().GetTextNode();
SwPosition aPos( aAnchIdx );
@@ -1467,7 +1467,7 @@ void SwDoc::SetAllUniqueFlyNames()
if ( !bContainsAtPageObjWithContentAnchor )
{
const SwFormatAnchor& rAnchor = pFlyFormat->GetAnchor();
- if ( (FLY_AT_PAGE == rAnchor.GetAnchorId()) &&
+ if ( (RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId()) &&
rAnchor.GetContentAnchor() )
{
bContainsAtPageObjWithContentAnchor = true;
@@ -1553,7 +1553,7 @@ bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const
checkFormats.erase( checkPos );
#endif
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
- if ((FLY_AT_PAGE == rAnchor.GetAnchorId()) ||
+ if ((RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId()) ||
!rAnchor.GetContentAnchor() )
{
return false;
@@ -1602,7 +1602,7 @@ SvxFrameDirection SwDoc::GetTextDirection( const SwPosition& rPos,
{
pItem = nullptr;
const SwFormatAnchor* pAnchor = &pFlyFormat->GetAnchor();
- if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
+ if ((RndStdIds::FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetContentAnchor())
{
pFlyFormat = pAnchor->GetContentAnchor()->nNode.
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 2679bd708879..d579215bcfee 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1225,7 +1225,7 @@ else
{
const SwFrameFormat& rCpyFormat = *pCpyFormat;
SwFormatAnchor aAnchor( rCpyFormat.GetAnchor() );
- if (FLY_AT_PAGE != aAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE != aAnchor.GetAnchorId())
continue;
SAL_INFO( "sw.docappend", "PaAn: " << aAnchor.GetPageNum()
<< " => " << aAnchor.GetPageNum() + pageOffset );
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index c1e47b041d59..f3e1095f8333 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -304,7 +304,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
- if (pAPos && (FLY_AT_PARA == pAnchor->GetAnchorId()) &&
+ if (pAPos && (RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId()) &&
pStart->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode )
return false;
}
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 1addcf3c5ca3..fb1eb20955f8 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -561,8 +561,8 @@ static void lcl_CpyBox( const SwTable& rCpyTable, const SwTableBox* pCpyBox,
SwFormatAnchor const*const pAnchor = &pFly->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
if (pAPos &&
- ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
- (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
aInsIdx <= pAPos->nNode && pAPos->nNode <= aEndNdIdx )
{
pDoc->getIDocumentLayoutAccess().DelLayoutFormat( pFly );
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 5a3abcb11420..e81e481cacba 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1689,8 +1689,8 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
SwPosition const*const pAPos = rAnchor.GetContentAnchor();
if (pAPos &&
- ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
nStt <= pAPos->nNode.GetIndex() &&
pAPos->nNode.GetIndex() < nEnd )
{
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 4962f734223c..96ec1e018fcd 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -528,7 +528,7 @@ const SwPageDesc* SwNode::FindPageDesc( size_t* pPgDescNdIdx ) const
if( pFormat )
{
const SwFormatAnchor* pAnchor = &pFormat->GetAnchor();
- if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
+ if ((RndStdIds::FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetContentAnchor() )
{
pNd = &pAnchor->GetContentAnchor()->nNode.GetNode();
@@ -551,7 +551,7 @@ const SwPageDesc* SwNode::FindPageDesc( size_t* pPgDescNdIdx ) const
break;
}
pAnchor = &pFrameFormat->GetAnchor();
- if ((FLY_AT_PAGE == pAnchor->GetAnchorId()) ||
+ if ((RndStdIds::FLY_AT_PAGE == pAnchor->GetAnchorId()) ||
!pAnchor->GetContentAnchor() )
{
pFlyNd = nullptr;
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index ccc50ee39f72..fd5edbf0bfaa 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -2227,7 +2227,7 @@ void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, bool bDel )
if (pTextNd)
{
pTextNd->RemoveFromList();
- // remove FLY_AS_CHAR *before* adjusting SwNodeIndex
+ // remove RndStdIds::FLY_AS_CHAR *before* adjusting SwNodeIndex
// so their anchor still points to correct node when deleted!
// NOTE: this will call RemoveNode() recursively!
// so adjust our indexes to account for removed nodes
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index 4fbd3b7a5137..cc86094b1808 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -439,10 +439,10 @@ const SwNode* SwBaseLink::GetAnchor() const
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
SwPosition const*const pAPos = rAnchor.GetContentAnchor();
if (pAPos &&
- ((FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
- (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
- (FLY_AT_PARA == rAnchor.GetAnchorId())))
+ ((RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId())))
{
return &pAPos->nNode.GetNode();
}
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index e2e67a0de425..291ae1a58e5e 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1751,7 +1751,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch )
switch ( pAnch->GetAnchorId() )
{
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
{
sal_uInt16 nPgNum = pAnch->GetPageNum();
SwViewShell *pShell = pDrawFrameFormat->getIDocumentLayoutAccess().GetCurrentViewShell();
@@ -1775,12 +1775,12 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch )
}
break;
- case FLY_AT_CHAR:
- case FLY_AT_PARA:
- case FLY_AT_FLY:
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_FLY:
+ case RndStdIds::FLY_AS_CHAR:
{
- if ( pAnch->GetAnchorId() == FLY_AS_CHAR )
+ if ( pAnch->GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
ClrContourCache( GetMaster() );
}
@@ -1792,7 +1792,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch )
SwModify *pModify = nullptr;
if( pAnch->GetContentAnchor() )
{
- if ( pAnch->GetAnchorId() == FLY_AT_FLY )
+ if ( pAnch->GetAnchorId() == RndStdIds::FLY_AT_FLY )
{
SwNodeIndex aIdx( pAnch->GetContentAnchor()->nNode );
SwContentNode* pCNd = pDrawFrameFormat->GetDoc()->GetNodes().GoNext( &aIdx );
@@ -1844,14 +1844,14 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch )
if( bAdd )
{
- if ( FLY_AT_FLY == pAnch->GetAnchorId() && !pFrame->IsFlyFrame() )
+ if ( RndStdIds::FLY_AT_FLY == pAnch->GetAnchorId() && !pFrame->IsFlyFrame() )
{
pFrame = pFrame->FindFlyFrame();
assert(pFrame);
}
// find correct follow for as character anchored objects
- if ((pAnch->GetAnchorId() == FLY_AS_CHAR) &&
+ if ((pAnch->GetAnchorId() == RndStdIds::FLY_AS_CHAR) &&
pFrame->IsTextFrame() )
{
pFrame = lcl_GetFlyInContentAnchor(
@@ -1869,7 +1869,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch )
{
// append 'virtual' drawing object
SwDrawVirtObj* pDrawVirtObj = AddVirtObj();
- if ( pAnch->GetAnchorId() == FLY_AS_CHAR )
+ if ( pAnch->GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
ClrContourCache( pDrawVirtObj );
}
@@ -1878,7 +1878,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch )
pDrawVirtObj->ActionChanged();
}
- if ( pAnch->GetAnchorId() == FLY_AS_CHAR )
+ if ( pAnch->GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
pFrame->InvalidatePrt();
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 9e95c18c6464..7ef966ca04b3 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -218,7 +218,7 @@ void SwDrawView::AddCustomHdl()
}
const SwFormatAnchor &rAnchor = pFrameFormat->GetAnchor();
- if (FLY_AS_CHAR == rAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId())
return;
const SwFrame* pAnch;
@@ -227,7 +227,7 @@ void SwDrawView::AddCustomHdl()
Point aPos(aAnchorPoint);
- if ( FLY_AT_CHAR == rAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId() )
{
// #i28701# - use last character rectangle saved at object
// in order to avoid a format of the anchor frame
@@ -843,7 +843,7 @@ void SwDrawView::CheckPossibilities()
// #i972: protect position if it is a Math object anchored 'as char' and baseline alignment is activated
SwDoc* pDoc = Imp().GetShell()->GetDoc();
const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() )
- && FLY_AS_CHAR == pFly->GetFormat()->GetAnchor().GetAnchorId()
+ && RndStdIds::FLY_AS_CHAR == pFly->GetFormat()->GetAnchor().GetAnchorId()
&& pDoc->GetDocumentSettingManager().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT );
if (bProtectMathPos)
bMoveProtect = true;
@@ -867,7 +867,7 @@ void SwDrawView::CheckPossibilities()
OSL_FAIL( "<SwDrawView::CheckPossibilities()> - missing frame format" );
bProtect = true;
}
- else if ((FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId()) &&
+ else if ((RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId()) &&
rMrkList.GetMarkCount() > 1 )
{
bProtect = true;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 9a094f7dacce..cfc87bffeec7 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -353,7 +353,7 @@ bool SwAutoFormat::HasObjects( const SwNode& rNd )
for( auto pFrameFormat : rFormats )
{
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
- if ((FLY_AT_PAGE != rAnchor.GetAnchorId()) &&
+ if ((RndStdIds::FLY_AT_PAGE != rAnchor.GetAnchorId()) &&
rAnchor.GetContentAnchor() &&
&rAnchor.GetContentAnchor()->nNode.GetNode() == &rNd )
{
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 2e10443c0aa9..8bdac6feb728 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -179,20 +179,20 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos,
const SwFormatAnchor &rAnchor = pFlyFormat->GetAnchor();
- if( FLY_AT_FLY == rAnchor.GetAnchorId() )
+ if( RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId() )
{
// the fly needs to be attached somewhere, so ask it
pLayout = static_cast<const SwLayoutFrame*>(static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame());
continue;
}
- else if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
- (FLY_AS_CHAR == rAnchor.GetAnchorId()))
+ else if ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()))
{
OSL_ENSURE( rAnchor.GetContentAnchor(), "no valid position" );
rPos = *rAnchor.GetContentAnchor();
pTextNode = rPos.nNode.GetNode().GetTextNode();
- if ( FLY_AT_PARA == rAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId() )
{
const_cast<SwTextNode*>(pTextNode)->MakeStartIndex(
&rPos.nContent );
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index d62e5cea4300..bd4f5e6b1ee0 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -108,8 +108,8 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText )
SwFormatAnchor const*const pAnchor = &pFly->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
if (pAPos &&
- ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
- (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
aSttIdx <= pAPos->nNode && pAPos->nNode <= aEndNdIdx )
{
pClpDoc->getIDocumentLayoutAccess().DelLayoutFormat( pFly );
@@ -139,13 +139,13 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText )
SwFrameFormat* pFlyFormat = pFly->GetFormat();
SwFormatAnchor aAnchor( pFlyFormat->GetAnchor() );
- if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
- (FLY_AT_FLY == aAnchor.GetAnchorId()) ||
- (FLY_AS_CHAR == aAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
SwPosition aPos( aSttIdx );
- if ( FLY_AS_CHAR == aAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId() )
{
aPos.nContent.Assign( pTextNd, 0 );
}
@@ -165,7 +165,7 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText )
assert( !inserted && "Fly not contained in Spz-Array" );
}
- if ( FLY_AS_CHAR == aAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId() )
{
// JP 13.02.99 Bug 61863: if a frameselection is passed to the
// clipboard, it should be found at pasting. Therefore
@@ -196,7 +196,7 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText )
{
SfxItemSet aSet( pClpDoc->GetAttrPool(), aFrameFormatSetRange );
- SwFormatAnchor aAnchor( FLY_AT_PARA );
+ SwFormatAnchor aAnchor( RndStdIds::FLY_AT_PARA );
aAnchor.SetAnchor( &aPos );
aSet.Put( aAnchor );
@@ -211,10 +211,10 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText )
SwDrawContact *pContact = static_cast<SwDrawContact*>(GetUserCall( pObj ));
SwFrameFormat *pFormat = pContact->GetFormat();
SwFormatAnchor aAnchor( pFormat->GetAnchor() );
- if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
- (FLY_AT_FLY == aAnchor.GetAnchorId()) ||
- (FLY_AS_CHAR == aAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
aAnchor.SetAnchor( &aPos );
}
@@ -263,7 +263,7 @@ static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrame
{
bRet = false;
}
- else if ( FLY_AT_FLY == rAnchor.GetAnchorId() )
+ else if ( RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId() )
{
if( pTmpFly )
{
@@ -274,7 +274,7 @@ static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrame
}
else
{
- rAnchor.SetType( FLY_AT_PAGE );
+ rAnchor.SetType( RndStdIds::FLY_AT_PAGE );
rAnchor.SetPageNum( rDestShell.GetPageNumber( rInsPt ) );
const SwFrame *pPg = pTmpFrame->FindPageFrame();
rNewPos = pPg->Frame().Pos();
@@ -321,7 +321,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
// insert into the group, when it belongs to an entered group
// or when the object is not anchored as a character
if( pSrcDrwView->IsGroupEntered() ||
- (FLY_AS_CHAR != rAnchor.GetAnchorId()) )
+ (RndStdIds::FLY_AS_CHAR != rAnchor.GetAnchorId()) )
{
SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove &&
@@ -337,10 +337,10 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
SwFormatAnchor aAnchor( rAnchor );
Point aNewAnch;
- if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
- (FLY_AT_FLY == aAnchor.GetAnchorId()) ||
- (FLY_AS_CHAR == aAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
if ( this == pDestShell )
{
@@ -370,7 +370,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
aNewAnch, false );
}
}
- else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )
+ else if ( RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId() )
{
aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) );
const SwRootFrame* pTmpRoot = pDestShell->GetLayout();
@@ -397,7 +397,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
if ( pFormat )
{
SdrObject* pNew = pFormat->FindSdrObject();
- if ( FLY_AS_CHAR != aAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AS_CHAR != aAnchor.GetAnchorId() )
{
Point aPos( rInsPt );
aPos -= aNewAnch;
@@ -482,10 +482,10 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
bRet = true;
Point aNewAnch;
- if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
- (FLY_AT_FLY == aAnchor.GetAnchorId()) ||
- (FLY_AS_CHAR == aAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
if ( this == pDestShell )
{
@@ -524,7 +524,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
aNewAnch, GetDoc() == pDestShell->GetDoc());
}
}
- else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )
+ else if ( RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId() )
{
aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) );
const SwRootFrame* pTmpRoot = pDestShell->GetLayout();
@@ -541,7 +541,7 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
SwFrameFormat *pOldFormat = pFlyFormat;
pFlyFormat = pDestShell->GetDoc()->getIDocumentLayoutAccess().CopyLayoutFormat( *pFlyFormat, aAnchor, true, true );
- if ( FLY_AS_CHAR != aAnchor.GetAnchorId() )
+ if ( RndStdIds::FLY_AS_CHAR != aAnchor.GetAnchorId() )
{
Point aPos( rInsPt );
aPos -= aNewAnch;
@@ -908,7 +908,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc )
if( Imp()->GetDrawView()->IsGroupEntered() &&
RES_DRAWFRMFMT == pCpyFormat->Which() &&
- (FLY_AS_CHAR != pCpyFormat->GetAnchor().GetAnchorId()) )
+ (RndStdIds::FLY_AS_CHAR != pCpyFormat->GetAnchor().GetAnchorId()) )
{
const SdrObject* pSdrObj = pCpyFormat->FindSdrObject();
if( pSdrObj )
@@ -956,9 +956,9 @@ bool SwFEShell::Paste( SwDoc* pClpDoc )
if( bInsWithFormat )
{
SwFormatAnchor aAnchor( pCpyFormat->GetAnchor() );
- if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
- (FLY_AS_CHAR == aAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
SwPosition* pPos = rPaM.GetPoint();
// allow shapes (no controls) in header/footer
@@ -976,11 +976,11 @@ bool SwFEShell::Paste( SwDoc* pClpDoc )
aAnchor.SetAnchor( pPos );
}
- else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )
+ else if ( RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId() )
{
aAnchor.SetPageNum( GetPhyPageNum() );
}
- else if( FLY_AT_FLY == aAnchor.GetAnchorId() )
+ else if( RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId() )
{
Point aPt;
(void)lcl_SetAnchor( *rPaM.GetPoint(), rPaM.GetNode(),
@@ -1171,7 +1171,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1
for ( auto pCpyFormat : *GetDoc()->GetSpzFrameFormats() )
{
SwFormatAnchor aAnchor( pCpyFormat->GetAnchor() );
- if ((FLY_AT_PAGE == aAnchor.GetAnchorId()) &&
+ if ((RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId()) &&
aAnchor.GetPageNum() >= nStartPage && aAnchor.GetPageNum() <= nEndPage)
{
aAnchor.SetPageNum( aAnchor.GetPageNum() - nStartPage + 1);
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 394454cc7ba9..c495a35abf73 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -97,7 +97,7 @@ static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFormatAnchor& rAnchor,
const SwPageFrame *pPg = pCFrame ? pCFrame->FindPageFrame() : nullptr;
rAnchor.SetPageNum( pPg ? pPg->GetPhyPageNum() : 1 );
- rAnchor.SetType( FLY_AT_PAGE );
+ rAnchor.SetType( RndStdIds::FLY_AT_PAGE );
}
return bRet;
}
@@ -117,9 +117,9 @@ static bool lcl_FindAnchorPos(
Point aTmpPnt( rPt );
switch( nNew )
{
- case FLY_AS_CHAR: // also include this?
- case FLY_AT_PARA:
- case FLY_AT_CHAR: // LAYER_IMPL
+ case RndStdIds::FLY_AS_CHAR: // also include this?
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR: // LAYER_IMPL
{
// starting from the upper-left corner of the Fly,
// search nearest ContentFrame
@@ -133,7 +133,7 @@ static bool lcl_FindAnchorPos(
}
SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnch)->GetNode() );
- if ((FLY_AT_CHAR == nNew) || (FLY_AS_CHAR == nNew))
+ if ((RndStdIds::FLY_AT_CHAR == nNew) || (RndStdIds::FLY_AS_CHAR == nNew))
{
// textnode should be found, as only in those
// a content bound frame can be anchored
@@ -159,7 +159,7 @@ static bool lcl_FindAnchorPos(
}
break;
- case FLY_AT_FLY: // LAYER_IMPL
+ case RndStdIds::FLY_AT_FLY: // LAYER_IMPL
{
// starting from the upper-left corner of the Fly
// search nearest SwFlyFrame
@@ -180,10 +180,10 @@ static bool lcl_FindAnchorPos(
}
}
- aNewAnch.SetType( nNew = FLY_AT_PAGE );
+ aNewAnch.SetType( nNew = RndStdIds::FLY_AT_PAGE );
SAL_FALLTHROUGH;
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
pNewAnch = rFrame.FindPageFrame();
aNewAnch.SetPageNum( pNewAnch->GetPhyPageNum() );
break;
@@ -214,8 +214,8 @@ bool sw_ChkAndSetNewAnchor(
SwDoc* pDoc = const_cast<SwDoc*>(rFormat.GetDoc());
#if OSL_DEBUG_LEVEL > 0
- OSL_ENSURE( !(nNew == FLY_AT_PAGE &&
- (FLY_AT_PARA==nOld || FLY_AT_CHAR==nOld || FLY_AS_CHAR==nOld ) &&
+ OSL_ENSURE( !(nNew == RndStdIds::FLY_AT_PAGE &&
+ (RndStdIds::FLY_AT_PARA==nOld || RndStdIds::FLY_AT_CHAR==nOld || RndStdIds::FLY_AS_CHAR==nOld ) &&
pDoc->IsInHeaderFooter( rOldAnch.GetContentAnchor()->nNode )),
"forbidden anchor change in Head/Foot." );
#endif
@@ -316,7 +316,7 @@ const SwFrameFormat* SwFEShell::IsFlyInFly()
SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
SwFrameFormat *pFormat = FindFrameFormat( pObj );
- if( pFormat && FLY_AT_FLY == pFormat->GetAnchor().GetAnchorId() )
+ if( pFormat && RndStdIds::FLY_AT_FLY == pFormat->GetAnchor().GetAnchorId() )
{
const SwFrame* pFly;
if (SwVirtFlyDrawObj* pFlyObj = dynamic_cast<SwVirtFlyDrawObj *>(pObj))
@@ -405,7 +405,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat();
const RndStdIds nAnchorId = rFormat.GetAnchor().GetAnchorId();
- if ( FLY_AS_CHAR == nAnchorId )
+ if ( RndStdIds::FLY_AS_CHAR == nAnchorId )
return aRet;
bool bFlyFrame = dynamic_cast<SwVirtFlyDrawObj *>(pObj) != nullptr;
@@ -425,7 +425,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
const SwFrame* pOldAnch = pFly->GetAnchorFrame();
if( !pOldAnch )
return aRet;
- if ( FLY_AT_PAGE != nAnchorId )
+ if ( RndStdIds::FLY_AT_PAGE != nAnchorId )
{
pFooterOrHeader = pContent->FindFooterOrHeader();
}
@@ -450,7 +450,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
Point aTmpPnt( rAbsPos );
GetLayout()->GetCursorOfst( &aPos, aTmpPnt, &aState );
if (aPos.nNode != GetDoc()->GetNodes().GetEndOfExtras().GetIndex()
- && (nAnchorId != FLY_AT_CHAR || !PosInsideInputField(aPos)))
+ && (nAnchorId != RndStdIds::FLY_AT_CHAR || !PosInsideInputField(aPos)))
{
SwContentNode* pCNode = aPos.nNode.GetNode().GetContentNode();
assert(pCNode);
@@ -460,7 +460,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
const SwFrame *pNewAnch = nullptr;
if( pTextFrame != nullptr )
{
- if ( FLY_AT_PAGE == nAnchorId )
+ if ( RndStdIds::FLY_AT_PAGE == nAnchorId )
{
pNewAnch = pTextFrame->FindPageFrame();
}
@@ -468,7 +468,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
{
pNewAnch = ::FindAnchor( pTextFrame, rAbsPos );
- if( FLY_AT_FLY == nAnchorId ) // LAYER_IMPL
+ if( RndStdIds::FLY_AT_FLY == nAnchorId ) // LAYER_IMPL
{
pNewAnch = pNewAnch->FindFlyFrame();
}
@@ -495,12 +495,12 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
{
aRet = pNewAnch->GetFrameAnchorPos( ::HasWrap( pObj ) );
- if ( bMoveIt || (nAnchorId == FLY_AT_CHAR) )
+ if ( bMoveIt || (nAnchorId == RndStdIds::FLY_AT_CHAR) )
{
SwFormatAnchor aAnch( rFormat.GetAnchor() );
switch ( nAnchorId )
{
- case FLY_AT_PARA:
+ case RndStdIds::FLY_AT_PARA:
{
SwPosition pos = *aAnch.GetContentAnchor();
pos.nNode = *pTextFrame->GetNode();
@@ -508,14 +508,14 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
aAnch.SetAnchor( &pos );
break;
}
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
{
aAnch.SetPageNum( static_cast<const SwPageFrame*>(pNewAnch)->
GetPhyPageNum() );
break;
}
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_FLY:
{
SwPosition aPos( *static_cast<const SwFlyFrame*>(pNewAnch)->GetFormat()->
GetContent().GetContentIdx() );
@@ -523,7 +523,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt )
break;
}
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
{
SwPosition pos = *aAnch.GetContentAnchor();
Point aTmpPnt( rAbsPos );
@@ -631,24 +631,24 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV
RndStdIds eRndId = rAnch.GetAnchorId();
switch( eRndId )
{
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
if( !rAnch.GetPageNum() ) //HotFix: Bug in UpdateByExample
rAnch.SetPageNum( 1 );
break;
- case FLY_AT_FLY:
- case FLY_AT_PARA:
- case FLY_AT_CHAR:
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_FLY:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
if( !bAnchValid )
{
- if( FLY_AT_FLY != eRndId )
+ if( RndStdIds::FLY_AT_FLY != eRndId )
{
rAnch.SetAnchor( &rPos );
}
else if( lcl_SetNewFlyPos( rPos.nNode.GetNode(), rAnch, aPt ) )
{
- eRndId = FLY_AT_PAGE;
+ eRndId = RndStdIds::FLY_AT_PAGE;
}
}
break;
@@ -667,14 +667,14 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV
SwFormatVertOrient aOldV;
SwFormatHoriOrient aOldH;
- if ( FLY_AT_PAGE != eRndId )
+ if ( RndStdIds::FLY_AT_PAGE != eRndId )
{
// First as with page link. Paragraph/character link on if
// everything was shifted. Then the position is valid!
// JP 13.05.98: if necessary also convert the horizontal/vertical
// orientation, to prevent correction during re-anchoring
pOldAnchor = new SwFormatAnchor( rAnch );
- const_cast<SfxItemSet&>(rSet).Put( SwFormatAnchor( FLY_AT_PAGE, 1 ) );
+ const_cast<SfxItemSet&>(rSet).Put( SwFormatAnchor( RndStdIds::FLY_AT_PAGE, 1 ) );
const SfxPoolItem* pItem;
if( SfxItemState::SET == rSet.GetItemState( RES_HORI_ORIENT, false, &pItem )
@@ -708,7 +708,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV
const SwFrame* pAnch = ::FindAnchor( GetLayout(), aPt );
SwPosition aPos( *static_cast<const SwContentFrame*>(pAnch)->GetNode() );
- if ( FLY_AS_CHAR == eRndId )
+ if ( RndStdIds::FLY_AS_CHAR == eRndId )
{
aPos.nContent.Assign( const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pAnch))->GetNode(), 0 );
}
@@ -789,22 +789,22 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName,
SwFormatAnchor* pAnchor = const_cast<SwFormatAnchor*>(static_cast<const SwFormatAnchor*>(pItem));
switch( pAnchor->GetAnchorId())
{
- case FLY_AT_PARA:
- case FLY_AT_CHAR: // LAYER_IMPL
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR: // LAYER_IMPL
+ case RndStdIds::FLY_AS_CHAR:
if( !pAnchor->GetContentAnchor() )
{
pAnchor->SetAnchor( pCursor->GetPoint() );
}
break;
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_FLY:
if( !pAnchor->GetContentAnchor() )
{
lcl_SetNewFlyPos( pCursor->GetNode(),
*pAnchor, GetCursorDocPos() );
}
break;
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
if( !pAnchor->GetPageNum() )
{
pAnchor->SetPageNum( pCursor->GetPageNum(
@@ -882,7 +882,7 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj,
SET_CURR_SHELL( this );
SfxItemSet rFlyAttrSet( GetDoc()->GetAttrPool(), aFrameFormatSetRange );
- rFlyAttrSet.Put( SwFormatAnchor( FLY_AT_PARA ));
+ rFlyAttrSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PARA ));
// #i89920#
rFlyAttrSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGHT ) );
rDrawObj.SetLayer( getIDocumentDrawModelAccess().GetHeavenId() );
@@ -926,7 +926,7 @@ void SwFEShell::GetPageObjs( std::vector<SwFrameFormat*>& rFillArr )
for( auto pFormat : *mpDoc->GetSpzFrameFormats() )
{
- if (FLY_AT_PAGE == pFormat->GetAnchor().GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE == pFormat->GetAnchor().GetAnchorId())
{
rFillArr.push_back( pFormat );
}
@@ -952,7 +952,7 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr )
// FlyFormat is still valid, therefore process
SwFormatAnchor aNewAnchor( pFormat->GetAnchor() );
- if ((FLY_AT_PAGE != aNewAnchor.GetAnchorId()) ||
+ if ((RndStdIds::FLY_AT_PAGE != aNewAnchor.GetAnchorId()) ||
0 >= ( nNewPage = aNewAnchor.GetPageNum() + 1 ) )
// chaos::Anchor has been changed or invalid page number,
// therefore: do not change!
@@ -1003,11 +1003,11 @@ bool SwFEShell::GetFlyFrameAttr( SfxItemSet &rSet ) const
const SwFormatAnchor* pAnchor = static_cast<const SwFormatAnchor*>(pItem);
RndStdIds eType = pAnchor->GetAnchorId();
- if ( FLY_AT_PAGE != eType )
+ if ( RndStdIds::FLY_AT_PAGE != eType )
{
// OD 12.11.2003 #i22341# - content anchor of anchor item is needed.
// Thus, don't overwrite anchor item by default contructed anchor item.
- if ( FLY_AS_CHAR == eType )
+ if ( RndStdIds::FLY_AS_CHAR == eType )
{
rSet.ClearItem( RES_OPAQUE );
rSet.ClearItem( RES_SURROUND );
@@ -1664,7 +1664,7 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj )
OSL_FAIL( "<SwFEShell::GetObjCntType(..)> - missing frame format" );
eType = OBJCNT_NONE;
}
- else if ( FLY_AS_CHAR != pFrameFormat->GetAnchor().GetAnchorId() )
+ else if ( RndStdIds::FLY_AS_CHAR != pFrameFormat->GetAnchor().GetAnchorId() )
{
eType = OBJCNT_GROUPOBJ;
}
@@ -1998,7 +1998,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO
SwFrameFormat * pFrameFormat = pFly ? pFly->GetFormat() : nullptr;
// baseline to baseline alignment should only be applied to formulas anchored as char
- if ( pFly && pFrameFormat && FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() )
+ if ( pFly && pFrameFormat && RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId() )
{
// get baseline from Math object
uno::Any aBaseline;
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 9ff50efd80c9..9df3d900447f 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -362,7 +362,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat();
SwFormatAnchor aAnch( rFormat.GetAnchor() );
RndStdIds nAnchorId = aAnch.GetAnchorId();
- if ( FLY_AS_CHAR == nAnchorId )
+ if ( RndStdIds::FLY_AS_CHAR == nAnchorId )
return false;
if( pOld->IsVertical() )
{
@@ -384,7 +384,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
}
}
switch ( nAnchorId ) {
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
{
OSL_ENSURE( pOld->IsPageFrame(), "Wrong anchor, page expected." );
if( SwMove::UP == nDir )
@@ -398,7 +398,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
}
break;
}
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
{
OSL_ENSURE( pOld->IsContentFrame(), "Wrong anchor, page expected." );
if( SwMove::LEFT == nDir || SwMove::RIGHT == nDir )
@@ -433,7 +433,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
}
SAL_FALLTHROUGH;
}
- case FLY_AT_PARA:
+ case RndStdIds::FLY_AT_PARA:
{
OSL_ENSURE( pOld->IsContentFrame(), "Wrong anchor, page expected." );
if( SwMove::UP == nDir )
@@ -460,7 +460,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
bRet = false;
break;
}
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_FLY:
{
OSL_ENSURE( pOld->IsFlyFrame(), "Wrong anchor, fly frame expected.");
SwPageFrame* pPage = pOld->FindPageFrame();
@@ -753,7 +753,7 @@ void SwFEShell::EndDrag( const Point * )
// DrawUndo on to flyframes are not stored
// The flys change the flag.
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true);
- ChgAnchor( 0, true );
+ ChgAnchor( RndStdIds::FLY_AT_PARA, true );
EndUndo( SwUndoId::END );
@@ -1798,7 +1798,7 @@ bool SwFEShell::ImpEndCreate()
if( bCharBound )
{
- aAnch.SetType( FLY_AS_CHAR );
+ aAnch.SetType( RndStdIds::FLY_AS_CHAR );
aAnch.SetAnchor( &aPos );
}
}
@@ -1872,7 +1872,7 @@ bool SwFEShell::ImpEndCreate()
bAtPage = true;
else
{
- aAnch.SetType( FLY_AT_PARA );
+ aAnch.SetType( RndStdIds::FLY_AT_PARA );
aAnch.SetAnchor( &aPos );
}
}
@@ -1881,7 +1881,7 @@ bool SwFEShell::ImpEndCreate()
{
pPage = pAnch ? pAnch->FindPageFrame() : GetLayout()->GetPageAtPos(aPoint);
- aAnch.SetType( FLY_AT_PAGE );
+ aAnch.SetType( RndStdIds::FLY_AT_PAGE );
aAnch.SetPageNum( pPage->GetPhyPageNum() );
pAnch = pPage; // page becomes an anchor
}
@@ -2008,7 +2008,7 @@ bool SwFEShell::ImpEndCreate()
}
SwFormatVertOrient aVert( nYOffset, text::VertOrientation::NONE, text::RelOrientation::FRAME );
aSet.Put( aVert );
- SwDrawFrameFormat* pFormat = static_cast<SwDrawFrameFormat*>(getIDocumentLayoutAccess().MakeLayoutFormat( RND_DRAW_OBJECT, &aSet ));
+ SwDrawFrameFormat* pFormat = static_cast<SwDrawFrameFormat*>(getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::DRAW_OBJECT, &aSet ));
// #i36010# - set layout direction of the position
pFormat->SetPositionLayoutDir(
text::PositionLayoutDir::PositionInLayoutDirOfAnchor );
@@ -2020,7 +2020,7 @@ bool SwFEShell::ImpEndCreate()
pContact->MoveObjToVisibleLayer( &rSdrObj );
if( bCharBound )
{
- OSL_ENSURE( aAnch.GetAnchorId() == FLY_AS_CHAR, "wrong AnchorType" );
+ OSL_ENSURE( aAnch.GetAnchorId() == RndStdIds::FLY_AS_CHAR, "wrong AnchorType" );
SwTextNode *pNd = aAnch.GetContentAnchor()->nNode.GetNode().GetTextNode();
SwFormatFlyCnt aFormat( pFormat );
pNd->InsertItem(aFormat,
@@ -2177,37 +2177,37 @@ void SwFEShell::BreakMark()
Imp()->GetDrawView()->BrkMarkObj();
}
-short SwFEShell::GetAnchorId() const
+RndStdIds SwFEShell::GetAnchorId() const
{
- short nRet = SHRT_MAX;
+ RndStdIds nRet = (RndStdIds)SHRT_MAX;
if ( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
- if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr )
+ if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr )
{
- nRet = -1;
+ nRet = RndStdIds::UNKNOWN;
break;
}
SwDrawContact *pContact = static_cast<SwDrawContact*>(GetUserCall(pObj));
- short nId = static_cast<short>(pContact->GetFormat()->GetAnchor().GetAnchorId());
- if ( nRet == SHRT_MAX )
+ RndStdIds nId = pContact->GetFormat()->GetAnchor().GetAnchorId();
+ if ( nRet == (RndStdIds)SHRT_MAX )
nRet = nId;
else if ( nRet != nId )
{
- nRet = -1;
+ nRet = RndStdIds::UNKNOWN;
break;
}
}
}
- if ( nRet == SHRT_MAX )
- nRet = -1;
+ if ( nRet == (RndStdIds)SHRT_MAX )
+ nRet = RndStdIds::UNKNOWN;
return nRet;
}
-void SwFEShell::ChgAnchor( int eAnchorId, bool bSameOnly, bool bPosCorr )
+void SwFEShell::ChgAnchor( RndStdIds eAnchorId, bool bSameOnly, bool bPosCorr )
{
OSL_ENSURE( Imp()->HasDrawView(), "ChgAnchor without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
@@ -2216,7 +2216,7 @@ void SwFEShell::ChgAnchor( int eAnchorId, bool bSameOnly, bool bPosCorr )
{
StartAllAction();
- if( GetDoc()->ChgAnchor( rMrkList, (RndStdIds)eAnchorId, bSameOnly, bPosCorr ))
+ if( GetDoc()->ChgAnchor( rMrkList, eAnchorId, bSameOnly, bPosCorr ))
Imp()->GetDrawView()->UnmarkAll();
EndAllAction();
@@ -2299,7 +2299,7 @@ bool SwFEShell::IsGroupSelected()
if ( pObj->IsGroupObject() &&
// --> #i38505# No ungroup allowed for 3d objects
!pObj->Is3DObj() &&
- FLY_AS_CHAR != static_cast<SwDrawContact*>(GetUserCall(pObj))->
+ RndStdIds::FLY_AS_CHAR != static_cast<SwDrawContact*>(GetUserCall(pObj))->
GetFormat()->GetAnchor().GetAnchorId() )
{
return true;
@@ -2320,7 +2320,7 @@ namespace
OSL_FAIL( "<HasSuitableGroupingAnchor> - missing frame format" );
bSuitable = false;
}
- else if (FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId())
+ else if (RndStdIds::FLY_AS_CHAR == pFrameFormat->GetAnchor().GetAnchorId())
{
bSuitable = false;
}
@@ -2569,7 +2569,7 @@ FlyProtectFlags SwFEShell::IsSelObjProtected( FlyProtectFlags eType ) const
// set FlyProtectFlags::Pos if it is a Math object anchored 'as char' and baseline alignment is activated
const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() )
- && FLY_AS_CHAR == pFly->GetFormat()->GetAnchor().GetAnchorId()
+ && RndStdIds::FLY_AS_CHAR == pFly->GetFormat()->GetAnchor().GetAnchorId()
&& mpDoc->GetDocumentSettingManager().get( DocumentSettingId::MATH_BASELINE_ALIGNMENT );
if ((FlyProtectFlags::Pos & eType) && bProtectMathPos)
nChk |= FlyProtectFlags::Pos;
@@ -2656,7 +2656,7 @@ bool SwFEShell::IsAlignPossible() const
SwDrawContact *pC = static_cast<SwDrawContact*>(GetUserCall(pO));
OSL_ENSURE( pC, "No SwDrawContact!");
//only as character bound drawings can be aligned
- bRet = pC && pC->GetFormat()->GetAnchor().GetAnchorId() == FLY_AS_CHAR;
+ bRet = pC && pC->GetFormat()->GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR;
}
if ( bRet )
return Imp()->GetDrawView()->IsAlignPossible();
@@ -2699,7 +2699,7 @@ void SwFEShell::CheckUnboundObjects()
{
const SwFrame *pAnch = ::FindAnchor( pPage, aPt, true );
SwPosition aPos( *static_cast<const SwContentFrame*>(pAnch)->GetNode() );
- aAnch.SetType( FLY_AT_PARA );
+ aAnch.SetType( RndStdIds::FLY_AT_PARA );
aAnch.SetAnchor( &aPos );
const_cast<SwRect&>(GetCharRect()).Pos() = aPt;
}
@@ -2720,7 +2720,7 @@ void SwFEShell::CheckUnboundObjects()
aSet.Put( aAnch );
aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGHT ) );
- SwFrameFormat* pFormat = getIDocumentLayoutAccess().MakeLayoutFormat( RND_DRAW_OBJECT, &aSet );
+ SwFrameFormat* pFormat = getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::DRAW_OBJECT, &aSet );
SwDrawContact *pContact = new SwDrawContact(
static_cast<SwDrawFrameFormat*>(pFormat), pObj );
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 33552c42b699..6cd9d88a398a 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -488,7 +488,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con
SwNodeIndex aAnchIdx(*pFlyFormat->GetContent().GetContentIdx(), 1);
SwTextNode *pTextNode = aAnchIdx.GetNode().GetTextNode();
- SwFormatAnchor aAnc(FLY_AS_CHAR);
+ SwFormatAnchor aAnc(RndStdIds::FLY_AS_CHAR);
sal_Int32 nInsertPos = bBefore ? pTextNode->Len() : 0;
SwPosition aPos(*pTextNode, nInsertPos);
@@ -739,12 +739,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
bool bRTL = false;
bool bVerticalL2R = false;
- if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL
+ if ((RndStdIds::FLY_AT_PAGE == _nAnchorId) || (RndStdIds::FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL
{
const SwFrame* pTmp = pFrame;
// #i22305#
- if ((FLY_AT_PAGE == _nAnchorId) ||
- ((FLY_AT_FLY == _nAnchorId) && !_bFollowTextFlow))
+ if ((RndStdIds::FLY_AT_PAGE == _nAnchorId) ||
+ ((RndStdIds::FLY_AT_FLY == _nAnchorId) && !_bFollowTextFlow))
{
pFrame = pPage;
}
@@ -889,7 +889,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
aPos = aRectFnSet.GetPos(pFrame->Frame());
// #i17567# - allow negative positions
// for fly frames anchor to paragraph/to character.
- if ((_nAnchorId == FLY_AT_PARA) || (_nAnchorId == FLY_AT_CHAR))
+ if ((_nAnchorId == RndStdIds::FLY_AT_PARA) || (_nAnchorId == RndStdIds::FLY_AT_CHAR))
{
// The rectangle, the fly frame can be positioned in, is determined
// horizontally by the frame area of the horizontal environment
@@ -979,7 +979,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
// fly frame). Thus, assure this.
const SwTextFrame* pTextFrame( dynamic_cast<const SwTextFrame*>(pFrame) );
if ( pTextFrame &&
- (_nAnchorId == FLY_AT_CHAR) &&
+ (_nAnchorId == RndStdIds::FLY_AT_CHAR) &&
( _eVertRelOrient == text::RelOrientation::CHAR ||
_eVertRelOrient == text::RelOrientation::TEXT_LINE ) )
{
@@ -1026,7 +1026,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
// position (<aPos.X()> respectively <aPos.Y()>), if object is
// anchored to character and horizontal aligned at character.
if ( pTextFrame &&
- (_nAnchorId == FLY_AT_CHAR) &&
+ (_nAnchorId == RndStdIds::FLY_AT_CHAR) &&
_eHoriRelOrient == text::RelOrientation::CHAR )
{
SwTwips nLeft = 0L;
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 51a416c96005..36fe7d8829b9 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -884,8 +884,8 @@ bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
const SwPosition* pAPos = rAnchor.GetContentAnchor();
if (pAPos &&
- ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
nSttIdx <= ( nIdx = pAPos->nNode.GetIndex() ) &&
nIdx < nEndIdx )
{
diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx
index 4c73adc8ae7d..ced3e9c754a0 100644
--- a/sw/source/core/inc/UndoCore.hxx
+++ b/sw/source/core/inc/UndoCore.hxx
@@ -193,7 +193,7 @@ class SwUndoSetFlyFormat : public SwUndo, public SwClient
std::unique_ptr<SfxItemSet> pItemSet; // the re-/ set attributes
sal_uLong nOldNode, nNewNode;
sal_Int32 nOldContent, nNewContent;
- sal_uInt16 nOldAnchorTyp, nNewAnchorTyp;
+ RndStdIds nOldAnchorTyp, nNewAnchorTyp;
bool bAnchorChgd;
void PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem );
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 2b2b21d1a7ab..fe9faa599388 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -106,10 +106,10 @@ protected:
// but the width will not be re-evaluated based on the attributes.
bool m_bFormatHeightOnly :1;
- bool m_bInCnt :1; ///< FLY_AS_CHAR, anchored as character
- bool m_bAtCnt :1; ///< FLY_AT_PARA, anchored at paragraph
- bool m_bLayout :1; ///< FLY_AT_PAGE, FLY_AT_FLY, at page or at frame
- bool m_bAutoPosition :1; ///< FLY_AT_CHAR, anchored at character
+ bool m_bInCnt :1; ///< RndStdIds::FLY_AS_CHAR, anchored as character
+ bool m_bAtCnt :1; ///< RndStdIds::FLY_AT_PARA, anchored at paragraph
+ bool m_bLayout :1; ///< RndStdIds::FLY_AT_PAGE, RndStdIds::FLY_AT_FLY, at page or at frame
+ bool m_bAutoPosition :1; ///< RndStdIds::FLY_AT_CHAR, anchored at character
friend class SwNoTextFrame; // is allowed to call NotifyBackground
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 53ed59e66e88..5a3ee5cf2ac6 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -302,7 +302,7 @@ void SwAnchoredDrawObject::MakeObjPos()
// determine relative position of drawing object and set it
switch ( pDrawContact->GetAnchorId() )
{
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
{
// indicate that position will be valid after positioning is performed
mbValidPos = true;
@@ -310,16 +310,16 @@ void SwAnchoredDrawObject::MakeObjPos()
// during the format of its anchor frame - see <SwFlyCntPortion::SetBase(..)>
}
break;
- case FLY_AT_PARA:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR:
{
// --> #i32795# - move intrinsic positioning to
// helper method <MakeObjPosAnchoredAtPara()>
MakeObjPosAnchoredAtPara();
}
break;
- case FLY_AT_PAGE:
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_FLY:
{
// --> #i32795# - move intrinsic positioning to
// helper method <MakeObjPosAnchoredAtLayout()>
@@ -529,7 +529,7 @@ void SwAnchoredDrawObject::InvalidatePage_( SwPageFrame* _pPageFrame )
{
// --> #i35007# - correct invalidation for as-character
// anchored objects.
- if ( GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR )
+ if ( GetFrameFormat().GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
_pPageFrame->InvalidateFlyInCnt();
}
@@ -569,7 +569,7 @@ void SwAnchoredDrawObject::InvalidateObjPos()
// --> #i44559# - assure, that text hint is already
// existing in the text frame
if ( dynamic_cast< const SwTextFrame* >(GetAnchorFrame()) != nullptr &&
- (GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
+ (GetFrameFormat().GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR) )
{
SwTextFrame* pAnchorTextFrame( static_cast<SwTextFrame*>(AnchorFrame()) );
if ( pAnchorTextFrame->GetTextNode()->GetpSwpHints() &&
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index d3d51c8db6c3..a1d2080d7856 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -218,7 +218,7 @@ void SwAnchoredObject::CheckCharRectAndTopOfLine(
GetAnchorFrame()->IsTextFrame() )
{
const SwFormatAnchor& rAnch = GetFrameFormat().GetAnchor();
- if ( (rAnch.GetAnchorId() == FLY_AT_CHAR) &&
+ if ( (rAnch.GetAnchorId() == RndStdIds::FLY_AT_CHAR) &&
rAnch.GetContentAnchor() )
{
// --> if requested, assure that anchor frame,
@@ -425,8 +425,8 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos() const
else if ( rObjFormat.getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) )
{
const SwFormatAnchor& rAnchor = rObjFormat.GetAnchor();
- if ( ((rAnchor.GetAnchorId() == FLY_AT_CHAR) ||
- (rAnchor.GetAnchorId() == FLY_AT_PARA)) &&
+ if ( ((rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR) ||
+ (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA)) &&
rObjFormat.GetSurround().GetSurround() != css::text::WrapTextMode_THROUGHT )
{
// --> #i34520# - text also wraps around anchored
@@ -652,7 +652,7 @@ void SwAnchoredObject::UpdateObjInSortedList()
AnchorFrame()->GetDrawObjs()->Update( *this );
// update its position in the sorted object list of its page frame
// note: as-character anchored object aren't registered at a page frame
- if ( GetFrameFormat().GetAnchor().GetAnchorId() != FLY_AS_CHAR )
+ if ( GetFrameFormat().GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR )
{
GetPageFrame()->GetSortedObjs()->Update( *this );
}
@@ -711,8 +711,8 @@ SwTextFrame* SwAnchoredObject::FindAnchorCharFrame()
if ( mpAnchorFrame )
{
const SwFormatAnchor& rAnch = GetFrameFormat().GetAnchor();
- if ((rAnch.GetAnchorId() == FLY_AT_CHAR) ||
- (rAnch.GetAnchorId() == FLY_AS_CHAR))
+ if ((rAnch.GetAnchorId() == RndStdIds::FLY_AT_CHAR) ||
+ (rAnch.GetAnchorId() == RndStdIds::FLY_AS_CHAR))
{
pAnchorCharFrame = &(static_cast<SwTextFrame*>(AnchorFrame())->
GetFrameAtOfst( rAnch.GetContentAnchor()->nContent.GetIndex() ));
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index dacb82753760..c48c8ca64b22 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1503,17 +1503,17 @@ SwFormatAnchor::~SwFormatAnchor()
void SwFormatAnchor::SetAnchor( const SwPosition *pPos )
{
- // anchor only to paragraphs, or start nodes in case of FLY_AT_FLY
+ // anchor only to paragraphs, or start nodes in case of RndStdIds::FLY_AT_FLY
// also allow table node, this is used when a table is selected and is converted to a frame by the UI
assert(!pPos
- || ((FLY_AT_FLY == nAnchorId) &&
+ || ((RndStdIds::FLY_AT_FLY == nAnchorId) &&
dynamic_cast<SwStartNode*>(&pPos->nNode.GetNode()))
- || (FLY_AT_PARA == nAnchorId && dynamic_cast<SwTableNode*>(&pPos->nNode.GetNode()))
+ || (RndStdIds::FLY_AT_PARA == nAnchorId && dynamic_cast<SwTableNode*>(&pPos->nNode.GetNode()))
|| dynamic_cast<SwTextNode*>(&pPos->nNode.GetNode()));
m_pContentAnchor .reset( (pPos) ? new SwPosition( *pPos ) : nullptr );
// Flys anchored AT paragraph should not point into the paragraph content
if (m_pContentAnchor &&
- ((FLY_AT_PARA == nAnchorId) || (FLY_AT_FLY == nAnchorId)))
+ ((RndStdIds::FLY_AT_PARA == nAnchorId) || (RndStdIds::FLY_AT_FLY == nAnchorId)))
{
m_pContentAnchor->nContent.Assign( nullptr, 0 );
}
@@ -1568,19 +1568,19 @@ bool SwFormatAnchor::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
text::TextContentAnchorType eRet;
switch (GetAnchorId())
{
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
eRet = text::TextContentAnchorType_AT_CHARACTER;
break;
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
eRet = text::TextContentAnchorType_AT_PAGE;
break;
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_FLY:
eRet = text::TextContentAnchorType_AT_FRAME;
break;
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
eRet = text::TextContentAnchorType_AS_CHARACTER;
break;
- //case FLY_AT_PARA:
+ //case RndStdIds::FLY_AT_PARA:
default:
eRet = text::TextContentAnchorType_AT_PARAGRAPH;
}
@@ -1591,7 +1591,7 @@ bool SwFormatAnchor::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
break;
case MID_ANCHOR_ANCHORFRAME:
{
- if (m_pContentAnchor && FLY_AT_FLY == nAnchorId)
+ if (m_pContentAnchor && RndStdIds::FLY_AT_FLY == nAnchorId)
{
SwFrameFormat* pFormat = m_pContentAnchor->nNode.GetNode().GetFlyFormat();
if(pFormat)
@@ -1623,10 +1623,10 @@ bool SwFormatAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
switch( SWUnoHelper::GetEnumAsInt32( rVal ) )
{
case text::TextContentAnchorType_AS_CHARACTER:
- eAnchor = FLY_AS_CHAR;
+ eAnchor = RndStdIds::FLY_AS_CHAR;
break;
case text::TextContentAnchorType_AT_PAGE:
- eAnchor = FLY_AT_PAGE;
+ eAnchor = RndStdIds::FLY_AT_PAGE;
if( GetPageNum() > 0 )
{
// If the anchor type is page and a valid page number
@@ -1636,14 +1636,14 @@ bool SwFormatAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
}
break;
case text::TextContentAnchorType_AT_FRAME:
- eAnchor = FLY_AT_FLY;
+ eAnchor = RndStdIds::FLY_AT_FLY;
break;
case text::TextContentAnchorType_AT_CHARACTER:
- eAnchor = FLY_AT_CHAR;
+ eAnchor = RndStdIds::FLY_AT_CHAR;
break;
//case text::TextContentAnchorType_AT_PARAGRAPH:
default:
- eAnchor = FLY_AT_PARA;
+ eAnchor = RndStdIds::FLY_AT_PARA;
break;
}
SetType( eAnchor );
@@ -1655,7 +1655,7 @@ bool SwFormatAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if((rVal >>= nVal) && nVal > 0)
{
SetPageNum( nVal );
- if (FLY_AT_PAGE == GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE == GetAnchorId())
{
// If the anchor type is page and a valid page number
// is set, the content position has to be deleted to not
@@ -1691,7 +1691,7 @@ void SwFormatAnchor::dumpAsXml(xmlTextWriterPtr pWriter) const
}
else
xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("pContentAnchor"), "%p", m_pContentAnchor.get());
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nAnchorType"), BAD_CAST(OString::number(nAnchorId).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nAnchorType"), BAD_CAST(OString::number((int)nAnchorId).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nPageNum"), BAD_CAST(OString::number(nPageNum).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrder"), BAD_CAST(OString::number(mnOrder).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nOrderCounter"), BAD_CAST(OString::number(mnOrderCounter).getStr()));
@@ -2588,13 +2588,13 @@ void SwFrameFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if( pH && pH->IsActive() && !pH->GetHeaderFormat() )
{ //If he doesn't have one, I'll add one
- SwFrameFormat *pFormat = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_HEADER, nullptr );
+ SwFrameFormat *pFormat = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::HEADER, nullptr );
const_cast<SwFormatHeader *>(pH)->RegisterToFormat( *pFormat );
}
if( pF && pF->IsActive() && !pF->GetFooterFormat() )
{ //If he doesn't have one, I'll add one
- SwFrameFormat *pFormat = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFormat( RND_STD_FOOTER, nullptr );
+ SwFrameFormat *pFormat = GetDoc()->getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::FOOTER, nullptr );
const_cast<SwFormatFooter *>(pF)->RegisterToFormat( *pFormat );
}
@@ -2730,7 +2730,7 @@ bool SwFrameFormat::IsLowerOf( const SwFrameFormat& rFormat ) const
// let's try it using the node positions
const SwFormatAnchor* pAnchor = &rFormat.GetAnchor();
- if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetContentAnchor())
+ if ((RndStdIds::FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetContentAnchor())
{
const SwFrameFormats& rFormats = *GetDoc()->GetSpzFrameFormats();
const SwNode* pFlyNd = pAnchor->GetContentAnchor()->nNode.GetNode().
@@ -2749,7 +2749,7 @@ bool SwFrameFormat::IsLowerOf( const SwFrameFormat& rFormat ) const
return true;
pAnchor = &pFormat->GetAnchor();
- if ((FLY_AT_PAGE == pAnchor->GetAnchorId()) ||
+ if ((RndStdIds::FLY_AT_PAGE == pAnchor->GetAnchorId()) ||
!pAnchor->GetContentAnchor() )
{
return false;
@@ -2860,16 +2860,16 @@ void SwFlyFrameFormat::MakeFrames()
SwFormatAnchor aAnchorAttr( GetAnchor() );
switch( aAnchorAttr.GetAnchorId() )
{
- case FLY_AS_CHAR:
- case FLY_AT_PARA:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR:
if( aAnchorAttr.GetContentAnchor() )
{
pModify = aAnchorAttr.GetContentAnchor()->nNode.GetNode().GetContentNode();
}
break;
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_FLY:
if( aAnchorAttr.GetContentAnchor() )
{
//First search in the content because this is O(1)
@@ -2910,7 +2910,7 @@ void SwFlyFrameFormat::MakeFrames()
}
break;
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
{
sal_uInt16 nPgNum = aAnchorAttr.GetPageNum();
SwPageFrame *pPage = static_cast<SwPageFrame*>(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->Lower());
@@ -2955,7 +2955,7 @@ void SwFlyFrameFormat::MakeFrames()
bool bAdd = !pFrame->IsContentFrame() ||
!static_cast<SwContentFrame*>(pFrame)->IsFollow();
- if ( FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrame->IsFlyFrame() )
+ if ( RndStdIds::FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrame->IsFlyFrame() )
{
SwFrame* pFlyFrame = pFrame->FindFlyFrame();
if ( pFlyFrame )
@@ -2964,7 +2964,7 @@ void SwFlyFrameFormat::MakeFrames()
}
else
{
- aAnchorAttr.SetType( FLY_AT_PARA );
+ aAnchorAttr.SetType( RndStdIds::FLY_AT_PARA );
SetFormatAttr( aAnchorAttr );
MakeFrames();
return;
@@ -2993,16 +2993,16 @@ void SwFlyFrameFormat::MakeFrames()
SwFlyFrame *pFly = nullptr; // avoid warnings
switch( aAnchorAttr.GetAnchorId() )
{
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_FLY:
pFly = new SwFlyLayFrame( this, pFrame, pFrame );
break;
- case FLY_AT_PARA:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_CHAR:
pFly = new SwFlyAtContentFrame( this, pFrame, pFrame );
break;
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
pFly = new SwFlyInContentFrame( this, pFrame, pFrame );
break;
@@ -3209,8 +3209,8 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat
mbAnchorNodeChanged( false )
{
const RndStdIds nNewAnchorType( _rNewAnchorFormat.GetAnchorId() );
- if ( ((nNewAnchorType == FLY_AT_PARA) ||
- (nNewAnchorType == FLY_AT_CHAR)) &&
+ if ( ((nNewAnchorType == RndStdIds::FLY_AT_PARA) ||
+ (nNewAnchorType == RndStdIds::FLY_AT_CHAR)) &&
_rNewAnchorFormat.GetContentAnchor() &&
_rNewAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode() )
{
@@ -3492,7 +3492,7 @@ void CheckAnchoredFlyConsistency(SwDoc const& rDoc)
for (auto it = pSpzFrameFormats->begin(); it != pSpzFrameFormats->end(); ++it)
{
SwFormatAnchor const& rAnchor((**it).GetAnchor(false));
- if (FLY_AT_PAGE == rAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId())
{
assert(!rAnchor.GetContentAnchor()
// for invalid documents that lack text:anchor-page-number
@@ -3506,14 +3506,14 @@ void CheckAnchoredFlyConsistency(SwDoc const& rDoc)
assert(std::find(pFlys->begin(), pFlys->end(), *it) != pFlys->end());
switch (rAnchor.GetAnchorId())
{
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_FLY:
assert(rNode.IsStartNode());
break;
- case FLY_AT_PARA:
+ case RndStdIds::FLY_AT_PARA:
assert(rNode.IsTextNode() || rNode.IsTableNode());
break;
- case FLY_AS_CHAR:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
assert(rNode.IsTextNode());
break;
default:
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 7f2a9f06b79a..26eda5e3fef2 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1003,7 +1003,7 @@ bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
continue;
}
- if ( FLY_AS_CHAR == rFormat.GetAnchor().GetAnchorId() )
+ if ( RndStdIds::FLY_AS_CHAR == rFormat.GetAnchor().GetAnchorId() )
{
nMinWidth = std::max( nMinWidth,
bFly ? rFormat.GetFrameSize().GetWidth()
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index d7b65128fdbf..501b16f45c4f 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -326,7 +326,7 @@ sal_uInt8 SwFlowFrame::BwdMoveNecessary( const SwPageFrame *pPage, const SwRect
// flow, because then I wouldn't evade it.
if ( ::IsFrameInSameKontext( pAnchor, &m_rThis ) )
{
- if ( rFormat.GetAnchor().GetAnchorId() == FLY_AT_PARA )
+ if ( rFormat.GetAnchor().GetAnchorId() == RndStdIds::FLY_AT_PARA )
{
// The index of the other one can be retrieved using the anchor attribute.
sal_uLong nTmpIndex = rFormat.GetAnchor().GetContentAnchor()->nNode.GetIndex();
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 4f235b2ebe1b..704f28542f7f 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -714,7 +714,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
// By changing the flow of frame-bound Frames, a vertical alignment
// can be activated/deactivated => MakeFlyPos
- if( FLY_AT_FLY == GetFormat()->GetAnchor().GetAnchorId() )
+ if( RndStdIds::FLY_AT_FLY == GetFormat()->GetAnchor().GetAnchorId() )
rInvFlags |= 0x09;
// Delete contour in the Node if necessary
@@ -1068,12 +1068,12 @@ void SwFlyFrame::ChgRelPos( const Point &rNewPos )
// #i34948# - handle also at-page and at-fly anchored
// Writer fly frames
const RndStdIds eAnchorType = GetFrameFormat().GetAnchor().GetAnchorId();
- if ( eAnchorType == FLY_AT_PAGE )
+ if ( eAnchorType == RndStdIds::FLY_AT_PAGE )
{
aVert.SetVertOrient( text::VertOrientation::NONE );
aVert.SetRelationOrient( text::RelOrientation::PAGE_FRAME );
}
- else if ( eAnchorType == FLY_AT_FLY )
+ else if ( eAnchorType == RndStdIds::FLY_AT_FLY )
{
aVert.SetVertOrient( text::VertOrientation::NONE );
aVert.SetRelationOrient( text::RelOrientation::FRAME );
@@ -1120,13 +1120,13 @@ void SwFlyFrame::ChgRelPos( const Point &rNewPos )
SwFormatHoriOrient aHori( pFormat->GetHoriOrient() );
// #i34948# - handle also at-page and at-fly anchored
// Writer fly frames
- if ( eAnchorType == FLY_AT_PAGE )
+ if ( eAnchorType == RndStdIds::FLY_AT_PAGE )
{
aHori.SetHoriOrient( text::HoriOrientation::NONE );
aHori.SetRelationOrient( text::RelOrientation::PAGE_FRAME );
aHori.SetPosToggle( false );
}
- else if ( eAnchorType == FLY_AT_FLY )
+ else if ( eAnchorType == RndStdIds::FLY_AT_FLY )
{
aHori.SetHoriOrient( text::HoriOrientation::NONE );
aHori.SetRelationOrient( text::RelOrientation::FRAME );
@@ -1469,7 +1469,7 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
// When on auto position, we can only set it to
// flow through
if ((rFormat.GetAnchor().GetAnchorId() ==
- FLY_AT_CHAR) &&
+ RndStdIds::FLY_AT_CHAR) &&
(css::text::WrapTextMode_PARALLEL ==
aAttr.GetSurround()))
{
@@ -2121,7 +2121,7 @@ void SwFrame::InvalidateObjs( const bool _bNoInvaOfAsCharAnchoredObjs )
{
if ( _bNoInvaOfAsCharAnchoredObjs &&
(pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
- == FLY_AS_CHAR) )
+ == RndStdIds::FLY_AS_CHAR) )
{
continue;
}
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 8521e3354ddf..5dcead6ab0a3 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -70,7 +70,7 @@ SwFlyAtContentFrame::SwFlyAtContentFrame( SwFlyFrameFormat *pFormat, SwFrame* pS
SwFlyFreeFrame( pFormat, pSib, pAnch )
{
m_bAtCnt = true;
- m_bAutoPosition = (FLY_AT_CHAR == pFormat->GetAnchor().GetAnchorId());
+ m_bAutoPosition = (RndStdIds::FLY_AT_CHAR == pFormat->GetAnchor().GetAnchorId());
}
// #i28701#
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 496d6b9b9838..59f9e82fd78f 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -503,7 +503,7 @@ void SwFlyLayFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
SwPageFrame *pOldPage = GetPageFrame();
AnchorFrame()->RemoveFly( this );
- if ( FLY_AT_PAGE == pAnch->GetAnchorId() )
+ if ( RndStdIds::FLY_AT_PAGE == pAnch->GetAnchorId() )
{
sal_uInt16 nPgNum = pAnch->GetPageNum();
SwRootFrame *pRoot = getRootFrame();
@@ -813,7 +813,7 @@ void SwPageFrame::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
pFlyFrame->GetVirtDrawObj()->SetOrdNum( nNewNum );
}
- if ( FLY_AS_CHAR == _rNewObj.GetFrameFormat().GetAnchor().GetAnchorId() )
+ if ( RndStdIds::FLY_AS_CHAR == _rNewObj.GetFrameFormat().GetAnchor().GetAnchorId() )
{
return;
}
@@ -853,7 +853,7 @@ void SwPageFrame::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj )
}
if ( GetUpper() )
{
- if (FLY_AS_CHAR !=
+ if (RndStdIds::FLY_AS_CHAR !=
_rToRemoveObj.GetFrameFormat().GetAnchor().GetAnchorId())
{
static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous();
@@ -1173,7 +1173,7 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
const SwDrawContact *pC = static_cast<const SwDrawContact*>(GetUserCall(pSdrObj));
const SwFrameFormat *pFormat = pC->GetFormat();
const SwFormatAnchor &rAnch = pFormat->GetAnchor();
- if ( FLY_AS_CHAR == rAnch.GetAnchorId() )
+ if ( RndStdIds::FLY_AS_CHAR == rAnch.GetAnchorId() )
{
const SwFrame* pAnchorFrame = pC->GetAnchorFrame( pSdrObj );
if( !pAnchorFrame )
diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx
index 0503f5adf247..ca3a8c07748f 100644
--- a/sw/source/core/layout/flypos.cxx
+++ b/sw/source/core/layout/flypos.cxx
@@ -40,7 +40,7 @@ SwPosFlyFrame::SwPosFlyFrame(const SwNodeIndex& rIdx, const SwFrameFormat* pForm
: m_pFrameFormat(pFormat), m_pNodeIndex(const_cast<SwNodeIndex*>(&rIdx)), m_nOrdNum(SAL_MAX_UINT32)
{
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
- if(FLY_AT_PAGE == rAnchor.GetAnchorId())
+ if(RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId())
m_pNodeIndex = new SwNodeIndex(rIdx);
else if(pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell())
pFormat->CallSwClientNotify(sw::GetZOrderHint(m_nOrdNum));
@@ -54,7 +54,7 @@ SwPosFlyFrame::SwPosFlyFrame(const SwNodeIndex& rIdx, const SwFrameFormat* pForm
SwPosFlyFrame::~SwPosFlyFrame()
{
const SwFormatAnchor& rAnchor = m_pFrameFormat->GetAnchor();
- if (FLY_AT_PAGE == rAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId())
{
delete m_pNodeIndex;
}
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index e0fa2f08c59e..2a449affe36c 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -894,7 +894,7 @@ SwContentNotify::~SwContentNotify()
{
SwFrameFormat *pFormat = (*pTable)[i];
const SwFormatAnchor &rAnch = pFormat->GetAnchor();
- if ( FLY_AT_PAGE != rAnch.GetAnchorId() ||
+ if ( RndStdIds::FLY_AT_PAGE != rAnch.GetAnchorId() ||
rAnch.GetContentAnchor() == nullptr )
{
continue;
@@ -956,7 +956,7 @@ SwContentNotify::~SwContentNotify()
for (SwAnchoredObject* pAnchoredObj : *pObjs)
{
if ( pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
- == FLY_AT_CHAR )
+ == RndStdIds::FLY_AT_CHAR )
{
pAnchoredObj->CheckCharRectAndTopOfLine( !pMasterFrame->IsEmpty() );
}
@@ -998,17 +998,17 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
assert( checkPos != checkFormats.end());
checkFormats.erase( checkPos );
#endif
- const bool bFlyAtFly = rAnch.GetAnchorId() == FLY_AT_FLY; // LAYER_IMPL
+ const bool bFlyAtFly = rAnch.GetAnchorId() == RndStdIds::FLY_AT_FLY; // LAYER_IMPL
//Is a frame or a SdrObject described?
const bool bSdrObj = RES_DRAWFRMFMT == pFormat->Which();
// OD 23.06.2003 #108784# - append also drawing objects anchored
// as character.
const bool bDrawObjInContent = bSdrObj &&
- (rAnch.GetAnchorId() == FLY_AS_CHAR);
+ (rAnch.GetAnchorId() == RndStdIds::FLY_AS_CHAR);
if( bFlyAtFly ||
- (rAnch.GetAnchorId() == FLY_AT_PARA) ||
- (rAnch.GetAnchorId() == FLY_AT_CHAR) ||
+ (rAnch.GetAnchorId() == RndStdIds::FLY_AT_PARA) ||
+ (rAnch.GetAnchorId() == RndStdIds::FLY_AT_CHAR) ||
bDrawObjInContent )
{
SdrObject* pSdrObj = nullptr;
@@ -1084,7 +1084,7 @@ static inline bool lcl_ObjConnected(const SwFrameFormat* pFormat, const SwFrame*
static inline bool lcl_InHeaderOrFooter(const SwFrameFormat& rFormat)
{
const SwFormatAnchor& rAnch = rFormat.GetAnchor();
- if (rAnch.GetAnchorId() == FLY_AT_PAGE)
+ if (rAnch.GetAnchorId() == RndStdIds::FLY_AT_PAGE)
return false;
return rFormat.GetDoc()->IsInHeaderFooter(rAnch.GetContentAnchor()->nNode);
}
@@ -1100,7 +1100,7 @@ void AppendAllObjs(const SwFrameFormats* pTable, const SwFrame* pSib)
const auto& rAnch = pFormat->GetAnchor();
// Formats can still remain, because we neither use character bound
// frames nor objects which are anchored to character bounds.
- if ((rAnch.GetAnchorId() != FLY_AT_PAGE) && (rAnch.GetAnchorId() != FLY_AS_CHAR))
+ if ((rAnch.GetAnchorId() != RndStdIds::FLY_AT_PAGE) && (rAnch.GetAnchorId() != RndStdIds::FLY_AS_CHAR))
vFormatsToConnect.push_back(pFormat);
}
const SwFrameFormat* pFirstRequeued(nullptr);
@@ -2304,7 +2304,7 @@ static void lcl_RemoveObjsFromPage( SwFrame* _pFrame )
// #115759# - remove also drawing objects from page
else if ( dynamic_cast<const SwAnchoredDrawObject*>( pObj) != nullptr )
{
- if (pObj->GetFrameFormat().GetAnchor().GetAnchorId() != FLY_AS_CHAR)
+ if (pObj->GetFrameFormat().GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR)
{
pObj->GetPageFrame()->RemoveDrawObjFromPage(
*(static_cast<SwAnchoredDrawObject*>(pObj)) );
@@ -2466,7 +2466,7 @@ static void lcl_AddObjsToPage( SwFrame* _pFrame, SwPageFrame* _pPage )
// #115759# - remove also drawing objects from page
else if ( dynamic_cast<const SwAnchoredDrawObject*>( pObj) != nullptr )
{
- if (pObj->GetFrameFormat().GetAnchor().GetAnchorId() != FLY_AS_CHAR)
+ if (pObj->GetFrameFormat().GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR)
{
pObj->InvalidateObjPos();
_pPage->AppendDrawObjToPage(
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 4eb5d5009516..032f0cf9a304 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -580,8 +580,8 @@ bool SwObjectFormatterTextFrame::CheckMovedFwdCondition(
// which will be on the next page.
if ( !bAnchorIsMovedForward &&
_bAnchoredAtMasterBeforeFormatAnchor &&
- ((_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_CHAR) ||
- (_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_PARA)))
+ ((_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == RndStdIds::FLY_AT_CHAR) ||
+ (_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == RndStdIds::FLY_AT_PARA)))
{
SwFrame* pAnchorFrame = _rAnchoredObj.GetAnchorFrameContainingAnchPos();
OSL_ENSURE( pAnchorFrame->IsTextFrame(),
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 44ca0dd07756..356d5df770f2 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -373,7 +373,7 @@ static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrame *pPage )
{
if( rAnch.GetContentAnchor() )
{
- if (FLY_AT_PAGE == rAnch.GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE == rAnch.GetAnchorId())
{
SwFormatAnchor aAnch( rAnch );
aAnch.SetAnchor( nullptr );
@@ -1518,7 +1518,7 @@ void SwRootFrame::AssertPageFlys( SwPageFrame *pPage )
SwFrameFormat& rFormat = (*pPage->GetSortedObjs())[i]->GetFrameFormat();
const SwFormatAnchor &rAnch = rFormat.GetAnchor();
const sal_uInt16 nPg = rAnch.GetPageNum();
- if ((rAnch.GetAnchorId() == FLY_AT_PAGE) &&
+ if ((rAnch.GetAnchorId() == RndStdIds::FLY_AT_PAGE) &&
nPg != pPage->GetPhyPageNum() )
{
SAL_INFO( "sw.pageframe", nPg << " " << pPage->GetPhyPageNum() );
@@ -1661,11 +1661,11 @@ void SwRootFrame::ImplCalcBrowseWidth()
long nWidth = 0;
switch ( rFormat.GetAnchor().GetAnchorId() )
{
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
nWidth = bFly ? rFormat.GetFrameSize().GetWidth() :
pAnchoredObj->GetObjRect().Width();
break;
- case FLY_AT_PARA:
+ case RndStdIds::FLY_AT_PARA:
{
// #i33170#
// Reactivated old code because
@@ -1812,7 +1812,7 @@ static void lcl_MoveAllLowerObjs( SwFrame* pFrame, const Point& rOffset )
// all except from the as character anchored objects are moved
// when processing the page frame:
- if ( !bPage && (rAnchor.GetAnchorId() != FLY_AS_CHAR) )
+ if ( !bPage && (rAnchor.GetAnchorId() != RndStdIds::FLY_AS_CHAR) )
continue;
SwObjPositioningInProgress aPosInProgress( *pAnchoredObj );
diff --git a/sw/source/core/layout/sortedobjs.cxx b/sw/source/core/layout/sortedobjs.cxx
index 72f9db7256fe..da019d065046 100644
--- a/sw/source/core/layout/sortedobjs.cxx
+++ b/sw/source/core/layout/sortedobjs.cxx
@@ -64,9 +64,9 @@ namespace
{
int GetAnchorWeight(RndStdIds eAnchor)
{
- if (eAnchor == FLY_AT_CHAR)
+ if (eAnchor == RndStdIds::FLY_AT_CHAR)
return 0;
- if (eAnchor == FLY_AS_CHAR)
+ if (eAnchor == RndStdIds::FLY_AS_CHAR)
return 1;
return 2;
}
@@ -86,36 +86,36 @@ struct ObjAnchorOrder
const SwFormatAnchor* pAnchorNew = &(rFormatNew.GetAnchor());
// check for to-page anchored objects
- if ((pAnchorListed->GetAnchorId() == FLY_AT_PAGE) &&
- (pAnchorNew ->GetAnchorId() != FLY_AT_PAGE))
+ if ((pAnchorListed->GetAnchorId() == RndStdIds::FLY_AT_PAGE) &&
+ (pAnchorNew ->GetAnchorId() != RndStdIds::FLY_AT_PAGE))
{
return true;
}
- else if ((pAnchorListed->GetAnchorId() != FLY_AT_PAGE) &&
- (pAnchorNew ->GetAnchorId() == FLY_AT_PAGE))
+ else if ((pAnchorListed->GetAnchorId() != RndStdIds::FLY_AT_PAGE) &&
+ (pAnchorNew ->GetAnchorId() == RndStdIds::FLY_AT_PAGE))
{
return false;
}
- else if ((pAnchorListed->GetAnchorId() == FLY_AT_PAGE) &&
- (pAnchorNew ->GetAnchorId() == FLY_AT_PAGE))
+ else if ((pAnchorListed->GetAnchorId() == RndStdIds::FLY_AT_PAGE) &&
+ (pAnchorNew ->GetAnchorId() == RndStdIds::FLY_AT_PAGE))
{
return pAnchorListed->GetOrder() < pAnchorNew->GetOrder();
}
// Both objects aren't anchored to page.
// Thus, check for to-fly anchored objects
- if ((pAnchorListed->GetAnchorId() == FLY_AT_FLY) &&
- (pAnchorNew ->GetAnchorId() != FLY_AT_FLY))
+ if ((pAnchorListed->GetAnchorId() == RndStdIds::FLY_AT_FLY) &&
+ (pAnchorNew ->GetAnchorId() != RndStdIds::FLY_AT_FLY))
{
return true;
}
- else if ((pAnchorListed->GetAnchorId() != FLY_AT_FLY) &&
- (pAnchorNew ->GetAnchorId() == FLY_AT_FLY))
+ else if ((pAnchorListed->GetAnchorId() != RndStdIds::FLY_AT_FLY) &&
+ (pAnchorNew ->GetAnchorId() == RndStdIds::FLY_AT_FLY))
{
return false;
}
- else if ((pAnchorListed->GetAnchorId() == FLY_AT_FLY) &&
- (pAnchorNew ->GetAnchorId() == FLY_AT_FLY))
+ else if ((pAnchorListed->GetAnchorId() == RndStdIds::FLY_AT_FLY) &&
+ (pAnchorNew ->GetAnchorId() == RndStdIds::FLY_AT_FLY))
{
return pAnchorListed->GetOrder() < pAnchorNew->GetOrder();
}
@@ -136,9 +136,9 @@ struct ObjAnchorOrder
// if not anchored at-paragraph
if (pContentAnchorListed && pContentAnchorNew)
{
- sal_Int32 nListedIndex = pAnchorListed->GetAnchorId() != FLY_AT_PARA ?
+ sal_Int32 nListedIndex = pAnchorListed->GetAnchorId() != RndStdIds::FLY_AT_PARA ?
pContentAnchorListed->nContent.GetIndex() : 0;
- sal_Int32 nNewIndex = pAnchorNew->GetAnchorId() != FLY_AT_PARA ?
+ sal_Int32 nNewIndex = pAnchorNew->GetAnchorId() != RndStdIds::FLY_AT_PARA ?
pContentAnchorNew->nContent.GetIndex() : 0;
if (nListedIndex != nNewIndex)
{
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index ad276edb57c9..e217725bcbc0 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -273,7 +273,7 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrame& _rLayoutFrame,
pAnchoredObj->ClearCharRectAndTopOfLine();
pAnchoredObj->SetCurrRelPos( Point( 0, 0 ) );
if ( pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
- == FLY_AS_CHAR )
+ == RndStdIds::FLY_AS_CHAR )
{
pAnchoredObj->AnchorFrame()
->Prepare( PREP_FLY_ATTR_CHG,
@@ -3683,7 +3683,7 @@ long CalcHeightWithFlys( const SwFrame *pFrame )
// the text flow have to be considered.
const SwFrameFormat& rFrameFormat = pAnchoredObj->GetFrameFormat();
const bool bConsiderObj =
- (rFrameFormat.GetAnchor().GetAnchorId() != FLY_AS_CHAR) &&
+ (rFrameFormat.GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR) &&
pAnchoredObj->GetObjRect().Top() != FAR_AWAY &&
rFrameFormat.GetFollowTextFlow().GetValue() &&
pAnchoredObj->GetPageFrame() == pTmp->FindPageFrame();
@@ -4675,7 +4675,7 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
!( pTabFrame->IsFollow() &&
pTabFrame->FindMaster()->IsRebuildLastLine() ) &&
(pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
- != FLY_AS_CHAR))
+ != RndStdIds::FLY_AS_CHAR))
{
SwPageFrame* pPageFrame = pAnchoredObj->GetPageFrame();
SwPageFrame* pPageOfAnchor = pFrame->FindPageFrame();
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 79ba414c06cf..651a6f12a666 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -3741,8 +3741,8 @@ void SwRootFrame::InvalidateAllObjPos()
for (SwAnchoredObject* pAnchoredObj : rObjs)
{
const SwFormatAnchor& rAnch = pAnchoredObj->GetFrameFormat().GetAnchor();
- if ((rAnch.GetAnchorId() != FLY_AT_PARA) &&
- (rAnch.GetAnchorId() != FLY_AT_CHAR))
+ if ((rAnch.GetAnchorId() != RndStdIds::FLY_AT_PARA) &&
+ (rAnch.GetAnchorId() != RndStdIds::FLY_AT_CHAR))
{
// only to paragraph and to character anchored objects are considered.
continue;
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index fa16f3741b7e..74967f30b76b 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -193,7 +193,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
{
// if object is at-character anchored, determine character-rectangle
// and frame, position has to be oriented at.
- mbAnchorToChar = (FLY_AT_CHAR == rFrameFormat.GetAnchor().GetAnchorId());
+ mbAnchorToChar = (RndStdIds::FLY_AT_CHAR == rFrameFormat.GetAnchor().GetAnchorId());
if ( mbAnchorToChar )
{
const SwFormatAnchor& rAnch = rFrameFormat.GetAnchor();
diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
index d3ddf25465cb..82f731a55521 100644
--- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
@@ -58,7 +58,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
const SvxLRSpaceItem &rLR = rFrameFormat.GetLRSpace();
const SvxULSpaceItem &rUL = rFrameFormat.GetULSpace();
- const bool bFlyAtFly = FLY_AT_FLY == rFrameFormat.GetAnchor().GetAnchorId();
+ const bool bFlyAtFly = RndStdIds::FLY_AT_FLY == rFrameFormat.GetAnchor().GetAnchorId();
// determine position.
// 'vertical' and 'horizontal' position are calculated separately
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 0d39d8319176..129770957527 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -344,9 +344,9 @@ bool SwTaggedPDFHelper::CheckReopenTag()
{
const SwFormatAnchor& rAnchor =
static_cast<const SwFlyFrame*>(&rFrame)->GetFormat()->GetAnchor();
- if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
- (FLY_AT_PAGE == rAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_PAGE == rAnchor.GetAnchorId()))
{
pKeyFrame = static_cast<const SwFlyFrame&>(rFrame).GetAnchorFrame();
bContinue = true;
@@ -1796,7 +1796,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// #i44368# Links in Header/Footer
const SwFormatAnchor &rAnch = pFrameFormat->GetAnchor();
- if (FLY_AT_PAGE != rAnch.GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE != rAnch.GetAnchorId())
{
const SwPosition* pPosition = rAnch.GetContentAnchor();
if ( pPosition && pDoc->IsInHeaderFooter( pPosition->nNode ) )
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index ee4844c48f4d..8a5efa1c706c 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -969,7 +969,7 @@ void SwTextFrame::FormatAdjust( SwTextFormatter &rLine,
bool bOnlyContainsAsCharAnchoredObj =
!IsFollow() && nStrLen == 1 &&
GetDrawObjs() && GetDrawObjs()->size() == 1 &&
- (*GetDrawObjs())[0]->GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR;
+ (*GetDrawObjs())[0]->GetFrameFormat().GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR;
// Still try split text frame if we have columns.
if (FindColFrame())
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 0182fd07747e..f37b593b8d91 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -432,8 +432,8 @@ static void lcl_MinMaxNode( SwFrameFormat* pNd, SwMinMaxNodeArgs* pIn )
{
const SwFormatAnchor& rFormatA = pNd->GetAnchor();
- if ((FLY_AT_PARA != rFormatA.GetAnchorId()) &&
- (FLY_AT_CHAR != rFormatA.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA != rFormatA.GetAnchorId()) &&
+ (RndStdIds::FLY_AT_CHAR != rFormatA.GetAnchorId()))
{
return;
}
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 5386a500808d..b24fe59e84a3 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -157,7 +157,7 @@ void SwTextFrame::MoveFlyInCnt( SwTextFrame *pNew, sal_Int32 nStart, sal_Int32 n
// Consider changed type of <SwSortedList> entries
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
const SwFormatAnchor& rAnch = pAnchoredObj->GetFrameFormat().GetAnchor();
- if (rAnch.GetAnchorId() == FLY_AS_CHAR)
+ if (rAnch.GetAnchorId() == RndStdIds::FLY_AS_CHAR)
{
const SwPosition* pPos = rAnch.GetContentAnchor();
const sal_Int32 nIdx = pPos->nContent.GetIndex();
@@ -346,7 +346,7 @@ void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, const Point &rBase,
SwFrameFormat* pShape = FindFrameFormat(pSdrObj);
const SwFormatAnchor& rAnchor(pShape->GetAnchor());
- if (rAnchor.GetAnchorId() == FLY_AS_CHAR)
+ if (rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR)
{
// This is an inline draw shape, see if it has a textbox.
SwFrameFormat* pTextBox = SwTextBoxHelper::getOtherTextBoxFormat(pShape, RES_DRAWFRMFMT);
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 7c32123aae9e..19e6e18b72d5 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -512,8 +512,8 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf )
( !rSur.IsAnchorOnly() ||
// #i68520#
GetMaster() == rFly.GetAnchorFrame() ||
- ((FLY_AT_PARA != rAnchor.GetAnchorId()) &&
- (FLY_AT_CHAR != rAnchor.GetAnchorId())
+ ((RndStdIds::FLY_AT_PARA != rAnchor.GetAnchorId()) &&
+ (RndStdIds::FLY_AT_CHAR != rAnchor.GetAnchorId())
)
) &&
// #i68520#
@@ -654,7 +654,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// #i26945#
const SwFrameFormat& rFrameFormat = _pAnchoredObj->GetFrameFormat();
const SwFormatAnchor& rNewA = rFrameFormat.GetAnchor();
- if (FLY_AT_PAGE == rNewA.GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE == rNewA.GetAnchorId())
{
if ( bInFootnote )
return false;
@@ -700,27 +700,27 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// If <mpCurrAnchoredObj> is anchored as character, its content
// does not wrap around pNew
- if (FLY_AS_CHAR == rCurrA.GetAnchorId())
+ if (RndStdIds::FLY_AS_CHAR == rCurrA.GetAnchorId())
return false;
// If pNew is anchored to page and <mpCurrAnchoredObj is not anchored
// to page, the content of <mpCurrAnchoredObj> does not wrap around pNew
// If both pNew and <mpCurrAnchoredObj> are anchored to page, we can do
// some more checks
- if (FLY_AT_PAGE == rNewA.GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE == rNewA.GetAnchorId())
{
- if (FLY_AT_PAGE == rCurrA.GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE == rCurrA.GetAnchorId())
{
bEvade = true;
}
else
return false;
}
- else if (FLY_AT_PAGE == rCurrA.GetAnchorId())
+ else if (RndStdIds::FLY_AT_PAGE == rCurrA.GetAnchorId())
return false; // Page anchored ones only avoid page anchored ones
- else if (FLY_AT_FLY == rNewA.GetAnchorId())
+ else if (RndStdIds::FLY_AT_FLY == rNewA.GetAnchorId())
bEvade = true; // Non-page anchored ones avoid frame anchored ones
- else if( FLY_AT_FLY == rCurrA.GetAnchorId() )
+ else if( RndStdIds::FLY_AT_FLY == rCurrA.GetAnchorId() )
return false; // Frame anchored ones do not avoid paragraph anchored ones
// #i57062#
// In order to avoid loop situation, it's decided to adjust
@@ -749,9 +749,9 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
{
// #i26945#
const SwFormatAnchor& rNewA = _pAnchoredObj->GetFrameFormat().GetAnchor();
- OSL_ENSURE( FLY_AS_CHAR != rNewA.GetAnchorId(),
+ OSL_ENSURE( RndStdIds::FLY_AS_CHAR != rNewA.GetAnchorId(),
"Don't call GetTop with a FlyInContentFrame" );
- if (FLY_AT_PAGE == rNewA.GetAnchorId())
+ if (RndStdIds::FLY_AT_PAGE == rNewA.GetAnchorId())
return true; // We always avoid page anchored ones
// If Flys anchored at paragraph are caught in a FlyCnt, then
@@ -805,7 +805,7 @@ bool SwTextFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
!pHeader->IsFooterFrame() &&
pCurrFrame->IsInDocBody() ) ) )
{
- if( pHeader || FLY_AT_FLY == rNewA.GetAnchorId() )
+ if( pHeader || RndStdIds::FLY_AT_FLY == rNewA.GetAnchorId() )
return true;
// Compare indices:
@@ -1030,8 +1030,8 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const
( !rSur.IsAnchorOnly() ||
// #i68520#
GetMaster() == pAnchoredObj->GetAnchorFrame() ||
- ((FLY_AT_PARA != rAnchor.GetAnchorId()) &&
- (FLY_AT_CHAR != rAnchor.GetAnchorId())) ) )
+ ((RndStdIds::FLY_AT_PARA != rAnchor.GetAnchorId()) &&
+ (RndStdIds::FLY_AT_CHAR != rAnchor.GetAnchorId())) ) )
|| aRect.Top() == FAR_AWAY )
continue;
}
@@ -1315,8 +1315,8 @@ css::text::WrapTextMode SwTextFly::GetSurroundForTextWrap( const SwAnchoredObjec
if( rFlyFormat.IsAnchorOnly() && pAnchoredObj->GetAnchorFrame() != GetMaster() )
{
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
- if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()))
{
return css::text::WrapTextMode_NONE;
}
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 25cef9fc8347..d27a21cdadd7 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -515,7 +515,7 @@ bool sw_HideObj( const SwTextFrame& _rFrame,
{
bool bRet( true );
- if (_eAnchorType == FLY_AT_CHAR)
+ if (_eAnchorType == RndStdIds::FLY_AT_CHAR)
{
const IDocumentSettingAccess* pIDSA = _rFrame.GetTextNode()->getIDocumentSettingAccess();
if ( !pIDSA->get(DocumentSettingId::USE_FORMER_TEXT_WRAPPING) &&
@@ -582,7 +582,7 @@ void SwTextFrame::HideAndShowObjects()
// under certain conditions
const RndStdIds eAnchorType( pContact->GetAnchorId() );
const sal_Int32 nObjAnchorPos = pContact->GetContentAnchorIndex().GetIndex();
- if ((eAnchorType != FLY_AT_CHAR) ||
+ if ((eAnchorType != RndStdIds::FLY_AT_CHAR) ||
sw_HideObj( *this, eAnchorType, nObjAnchorPos,
i ))
{
@@ -609,12 +609,12 @@ void SwTextFrame::HideAndShowObjects()
// Determine anchor type only once
const RndStdIds eAnchorType( pContact->GetAnchorId() );
- if (eAnchorType == FLY_AT_PARA)
+ if (eAnchorType == RndStdIds::FLY_AT_PARA)
{
pContact->MoveObjToVisibleLayer( pObj );
}
- else if ((eAnchorType == FLY_AT_CHAR) ||
- (eAnchorType == FLY_AS_CHAR))
+ else if ((eAnchorType == RndStdIds::FLY_AT_CHAR) ||
+ (eAnchorType == RndStdIds::FLY_AS_CHAR))
{
sal_Int32 nHiddenStart;
sal_Int32 nHiddenEnd;
@@ -1686,7 +1686,7 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
// i#28701 - consider all
// to-character anchored objects
if ( pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
- == FLY_AT_CHAR )
+ == RndStdIds::FLY_AT_CHAR )
{
bFormat = true;
break;
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index cec358730c63..7efe6df4ad6a 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -104,7 +104,7 @@ void SwTextFlyCnt::CopyFlyFormat( SwDoc* pDoc )
// disable undo while copying attribute
::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwFormatAnchor aAnchor( pFormat->GetAnchor() );
- if ((FLY_AT_PAGE != aAnchor.GetAnchorId()) &&
+ if ((RndStdIds::FLY_AT_PAGE != aAnchor.GetAnchorId()) &&
(pDoc != pFormat->GetDoc())) // different documents?
{
// JP 03.06.96: dann sorge dafuer, das der koperierte Anker auf
@@ -117,7 +117,7 @@ void SwTextFlyCnt::CopyFlyFormat( SwDoc* pDoc )
SwPosition pos = *aAnchor.GetContentAnchor();
pos.nNode = aIdx;
- if (FLY_AS_CHAR == aAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId())
{
pos.nContent.Assign( pCNd, 0 );
}
@@ -164,7 +164,7 @@ void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode )
aPos.nNode = *pOldNode;
}
- aAnchor.SetType( FLY_AS_CHAR ); // default!
+ aAnchor.SetType( RndStdIds::FLY_AS_CHAR ); // default!
aAnchor.SetAnchor( &aPos );
// beim Ankerwechsel werden immer alle FlyFrames vom Attribut geloescht
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 22264c339ccc..4c8a4f77cb0b 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1116,7 +1116,7 @@ void SwTextNode::Update(
{
const SwFormatAnchor& rAnchor = (*pFormat)->GetAnchor();
const SwPosition* pContentAnchor = rAnchor.GetContentAnchor();
- if (rAnchor.GetAnchorId() == FLY_AT_CHAR && pContentAnchor)
+ if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR && pContentAnchor)
{
// The fly is at-char anchored and has an anchor position.
SwIndex& rEndIdx = const_cast<SwIndex&>(pContentAnchor->nContent);
@@ -1137,7 +1137,7 @@ void SwTextNode::Update(
SwFrameFormat const*const pFormat = (*pFlys)[i];
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
const SwPosition* pContentAnchor = rAnchor.GetContentAnchor();
- if (rAnchor.GetAnchorId() == FLY_AT_CHAR && pContentAnchor)
+ if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR && pContentAnchor)
{
// The fly is at-char anchored and has an anchor position.
SwIndex& rEndIdx = const_cast<SwIndex&>(pContentAnchor->nContent);
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index e38856540c09..ad2e39a843bd 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1287,7 +1287,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
nInsMode |= SetAttrMode::NOTXTATRCHR;
if (pAnchor &&
- (FLY_AS_CHAR == pAnchor->GetAnchorId()) &&
+ (RndStdIds::FLY_AS_CHAR == pAnchor->GetAnchorId()) &&
pAnchor->GetContentAnchor() &&
pAnchor->GetContentAnchor()->nNode == *this &&
pAnchor->GetContentAnchor()->nContent == aIdx )
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 2a2c8c0eba60..eb19b089cd43 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -776,7 +776,7 @@ SwHistoryChangeFlyAnchor::SwHistoryChangeFlyAnchor( SwFrameFormat& rFormat )
: SwHistoryHint( HSTRY_CHGFLYANCHOR )
, m_rFormat( rFormat )
, m_nOldNodeIndex( rFormat.GetAnchor().GetContentAnchor()->nNode.GetIndex() )
- , m_nOldContentIndex( (FLY_AT_CHAR == rFormat.GetAnchor().GetAnchorId())
+ , m_nOldContentIndex( (RndStdIds::FLY_AT_CHAR == rFormat.GetAnchor().GetAnchorId())
? rFormat.GetAnchor().GetContentAnchor()->nContent.GetIndex()
: COMPLETE_STRING )
{
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 0354d15a0d25..d97b3953ced9 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -373,12 +373,12 @@ void SwUndoFormatAttr::SaveFlyAnchor( bool bSvDrwPt )
sal_Int32 nContent = 0;
switch( rAnchor.GetAnchorId() ) {
- case FLY_AS_CHAR:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
nContent = rAnchor.GetContentAnchor()->nContent.GetIndex();
SAL_FALLTHROUGH;
- case FLY_AT_PARA:
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_FLY:
m_nNodeIndex = rAnchor.GetContentAnchor()->nNode.GetIndex();
break;
default:
@@ -401,10 +401,10 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
static_cast<const SwFormatAnchor&>( m_pOldSet->Get( RES_ANCHOR, false ) );
SwFormatAnchor aNewAnchor( rAnchor.GetAnchorId() );
- if (FLY_AT_PAGE != rAnchor.GetAnchorId()) {
+ if (RndStdIds::FLY_AT_PAGE != rAnchor.GetAnchorId()) {
SwNode* pNd = pDoc->GetNodes()[ m_nNodeIndex ];
- if ( (FLY_AT_FLY == rAnchor.GetAnchorId())
+ if ( (RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId())
? ( !pNd->IsStartNode() || (SwFlyStartNode !=
static_cast<SwStartNode*>(pNd)->GetStartNodeType()) )
: !pNd->IsTextNode() ) {
@@ -414,8 +414,8 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
}
SwPosition aPos( *pNd );
- if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId())) {
+ if ((RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())) {
aPos.nContent.Assign( static_cast<SwTextNode*>(pNd), rAnchor.GetPageNum() );
if ( aPos.nContent.GetIndex() > pNd->GetTextNode()->GetText().getLength()) {
// #i35443# - invalid position.
@@ -447,7 +447,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
const SwFormatAnchor &rOldAnch = pFrameFormat->GetAnchor();
// #i54336#
// Consider case, that as-character anchored object has moved its anchor position.
- if (FLY_AS_CHAR == rOldAnch.GetAnchorId()) {
+ if (RndStdIds::FLY_AS_CHAR == rOldAnch.GetAnchorId()) {
// With InContents it's tricky: the text attribute needs to be deleted.
// Unfortunately, this not only destroys the Frames but also the format.
// To prevent that, first detach the connection between attribute and
@@ -491,7 +491,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
m_pOldSet->Put(SwFormatFrameSize(ATT_VAR_SIZE, aDrawOldPt.X(), aDrawOldPt.Y()));
}
- if (FLY_AS_CHAR == aNewAnchor.GetAnchorId()) {
+ if (RndStdIds::FLY_AS_CHAR == aNewAnchor.GetAnchorId()) {
const SwPosition* pPos = aNewAnchor.GetContentAnchor();
SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode();
OSL_ENSURE( pTextNd, "no Text Node at position." );
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 9ed7449890fa..41f48292d105 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -58,7 +58,7 @@ static void lcl_MakeAutoFrames( const SwFrameFormats& rSpzArr, sal_uLong nMovedI
{
SwFrameFormat * pFormat = rSpzArr[n];
const SwFormatAnchor* pAnchor = &pFormat->GetAnchor();
- if (pAnchor->GetAnchorId() == FLY_AT_CHAR)
+ if (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_CHAR)
{
const SwPosition* pAPos = pAnchor->GetContentAnchor();
if( pAPos && nMovedIndex == pAPos->nNode.GetIndex() )
@@ -730,7 +730,7 @@ static void lcl_ReAnchorAtContentFlyFrames( const SwFrameFormats& rSpzArr, SwPos
{
pFormat = static_cast<SwFlyFrameFormat*>(rSpzArr[n]);
pAnchor = &pFormat->GetAnchor();
- if (pAnchor->GetAnchorId() == FLY_AT_PARA)
+ if (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA)
{
pAPos = pAnchor->GetContentAnchor();
if( pAPos && nOldIdx == pAPos->nNode.GetIndex() )
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 6455257b1cfe..7a67c130ccc5 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -557,7 +557,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
pAnchor = &pFormat->GetAnchor();
switch( pAnchor->GetAnchorId() )
{
- case FLY_AS_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
if( nullptr != (pAPos = pAnchor->GetContentAnchor() ) &&
(( DelContentType::CheckNoCntnt & nDelContentType )
? ( pStt->nNode <= pAPos->nNode &&
@@ -576,7 +576,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
n = n >= rSpzArr.size() ? rSpzArr.size() : n+1;
}
break;
- case FLY_AT_PARA:
+ case RndStdIds::FLY_AT_PARA:
{
pAPos = pAnchor->GetContentAnchor();
if( pAPos )
@@ -624,7 +624,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
}
}
break;
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
if( nullptr != (pAPos = pAnchor->GetContentAnchor() ) &&
( pStt->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode ) )
{
@@ -654,7 +654,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
}
}
break;
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_FLY:
if( nullptr != (pAPos = pAnchor->GetContentAnchor() ) &&
pStt->nNode == pAPos->nNode )
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 6e9a9e4d25af..fb6d81acc208 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -44,7 +44,7 @@ SwUndoFlyBase::SwUndoFlyBase( SwFrameFormat* pFormat, SwUndoId nUndoId )
, pFrameFormat(pFormat)
, nNdPgPos(0)
, nCntPos(0)
- , nRndId(0)
+ , nRndId(RndStdIds::FLY_AT_PARA)
, bDelFormat(false)
{
}
@@ -69,7 +69,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame)
SwFormatAnchor aAnchor( (RndStdIds)nRndId );
- if (FLY_AT_PAGE == nRndId)
+ if (RndStdIds::FLY_AT_PAGE == nRndId)
{
aAnchor.SetPageNum( (sal_uInt16)nNdPgPos );
}
@@ -77,7 +77,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame)
{
SwPosition aNewPos(pDoc->GetNodes().GetEndOfContent());
aNewPos.nNode = nNdPgPos;
- if ((FLY_AS_CHAR == nRndId) || (FLY_AT_CHAR == nRndId))
+ if ((RndStdIds::FLY_AS_CHAR == nRndId) || (RndStdIds::FLY_AT_CHAR == nRndId))
{
aNewPos.nContent.Assign( aNewPos.nNode.GetNode().GetContentNode(),
nCntPos );
@@ -98,7 +98,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame)
// Set InContentAttribute not until there is content!
// Otherwise the layout would format the Fly beforehand but would not find
// content; this happened with graphics from the internet.
- if (FLY_AS_CHAR == nRndId)
+ if (RndStdIds::FLY_AS_CHAR == nRndId)
{
// there must be at least the attribute in a TextNode
SwContentNode* pCNd = aAnchor.GetContentAnchor()->nNode.GetNode().GetContentNode();
@@ -119,23 +119,24 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame)
switch( nRndId )
{
- case FLY_AS_CHAR:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
{
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
nNdPgPos = rAnchor.GetContentAnchor()->nNode.GetIndex();
nCntPos = rAnchor.GetContentAnchor()->nContent.GetIndex();
}
break;
- case FLY_AT_PARA:
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_FLY:
{
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
nNdPgPos = rAnchor.GetContentAnchor()->nNode.GetIndex();
}
break;
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
break;
+ default: break;
}
bDelFormat = false;
}
@@ -167,8 +168,8 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
const SwPosition* pPos = rAnchor.GetContentAnchor();
// The positions in Nodes array got shifted.
- nRndId = static_cast<sal_uInt16>(rAnchor.GetAnchorId());
- if (FLY_AS_CHAR == nRndId)
+ nRndId = rAnchor.GetAnchorId();
+ if (RndStdIds::FLY_AS_CHAR == nRndId)
{
nNdPgPos = pPos->nNode.GetIndex();
nCntPos = pPos->nContent.GetIndex();
@@ -185,12 +186,12 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
pTextNd->EraseText( aIdx, 1 );
}
}
- else if (FLY_AT_CHAR == nRndId)
+ else if (RndStdIds::FLY_AT_CHAR == nRndId)
{
nNdPgPos = pPos->nNode.GetIndex();
nCntPos = pPos->nContent.GetIndex();
}
- else if ((FLY_AT_PARA == nRndId) || (FLY_AT_FLY == nRndId))
+ else if ((RndStdIds::FLY_AT_PARA == nRndId) || (RndStdIds::FLY_AT_FLY == nRndId))
{
nNdPgPos = pPos->nNode.GetIndex();
}
@@ -212,19 +213,19 @@ SwUndoInsLayFormat::SwUndoInsLayFormat( SwFrameFormat* pFormat, sal_uLong nNodeI
mnCursorSaveIndexPara( nNodeIdx ), mnCursorSaveIndexPos( nCntIdx )
{
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
- nRndId = static_cast<sal_uInt16>(rAnchor.GetAnchorId());
+ nRndId = rAnchor.GetAnchorId();
bDelFormat = false;
switch( nRndId )
{
- case FLY_AT_PAGE:
+ case RndStdIds::FLY_AT_PAGE:
nNdPgPos = rAnchor.GetPageNum();
break;
- case FLY_AT_PARA:
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_FLY:
nNdPgPos = rAnchor.GetContentAnchor()->nNode.GetIndex();
break;
- case FLY_AS_CHAR:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
{
const SwPosition* pPos = rAnchor.GetContentAnchor();
nCntPos = pPos->nContent.GetIndex();
@@ -281,18 +282,18 @@ void SwUndoInsLayFormat::RepeatImpl(::sw::RepeatContext & rContext)
SwDoc *const pDoc = & rContext.GetDoc();
// get anchor and reset it
SwFormatAnchor aAnchor( pFrameFormat->GetAnchor() );
- if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
- (FLY_AS_CHAR == aAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
SwPosition aPos( *rContext.GetRepeatPaM().GetPoint() );
- if (FLY_AT_PARA == aAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AT_PARA == aAnchor.GetAnchorId())
{
aPos.nContent.Assign( nullptr, 0 );
}
aAnchor.SetAnchor( &aPos );
}
- else if( FLY_AT_FLY == aAnchor.GetAnchorId() )
+ else if( RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId() )
{
SwStartNode const*const pSttNd =
rContext.GetRepeatPaM().GetNode().FindFlyStartNode();
@@ -306,7 +307,7 @@ void SwUndoInsLayFormat::RepeatImpl(::sw::RepeatContext & rContext)
return ;
}
}
- else if (FLY_AT_PAGE == aAnchor.GetAnchorId())
+ else if (RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId())
{
aAnchor.SetPageNum( pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->GetCurrPage( &rContext.GetRepeatPaM() ));
}
@@ -443,7 +444,7 @@ SwUndoSetFlyFormat::SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, SwFrameFormat
rFlyFormat.GetAttrSet().GetRanges() )),
nOldNode( 0 ), nNewNode( 0 ),
nOldContent( 0 ), nNewContent( 0 ),
- nOldAnchorTyp( 0 ), nNewAnchorTyp( 0 ), bAnchorChgd( false )
+ nOldAnchorTyp( RndStdIds::FLY_AT_PARA ), nNewAnchorTyp( RndStdIds::FLY_AT_PARA ), bAnchorChgd( false )
{
}
@@ -470,11 +471,11 @@ void SwUndoSetFlyFormat::GetAnchor( SwFormatAnchor& rAnchor,
sal_uLong nNode, sal_Int32 nContent )
{
RndStdIds nAnchorTyp = rAnchor.GetAnchorId();
- if (FLY_AT_PAGE != nAnchorTyp)
+ if (RndStdIds::FLY_AT_PAGE != nAnchorTyp)
{
SwNode* pNd = pFrameFormat->GetDoc()->GetNodes()[ nNode ];
- if( FLY_AT_FLY == nAnchorTyp
+ if( RndStdIds::FLY_AT_FLY == nAnchorTyp
? ( !pNd->IsStartNode() || SwFlyStartNode !=
static_cast<SwStartNode*>(pNd)->GetStartNodeType() )
: !pNd->IsTextNode() )
@@ -484,8 +485,8 @@ void SwUndoSetFlyFormat::GetAnchor( SwFormatAnchor& rAnchor,
else
{
SwPosition aPos( *pNd );
- if ((FLY_AS_CHAR == nAnchorTyp) ||
- (FLY_AT_CHAR == nAnchorTyp))
+ if ((RndStdIds::FLY_AS_CHAR == nAnchorTyp) ||
+ (RndStdIds::FLY_AT_CHAR == nAnchorTyp))
{
if (nContent > pNd->GetTextNode()->GetText().getLength())
{
@@ -505,7 +506,7 @@ void SwUndoSetFlyFormat::GetAnchor( SwFormatAnchor& rAnchor,
if( !pNd )
{
// invalid position - assign first page
- rAnchor.SetType( FLY_AT_PAGE );
+ rAnchor.SetType( RndStdIds::FLY_AT_PAGE );
rAnchor.SetPageNum( 1 );
}
}
@@ -544,7 +545,7 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext)
if( bAnchorChgd )
{
const SwFormatAnchor& rOldAnch = pFrameFormat->GetAnchor();
- if (FLY_AS_CHAR == rOldAnch.GetAnchorId())
+ if (RndStdIds::FLY_AS_CHAR == rOldAnch.GetAnchorId())
{
// With InContents it's tricky: the text attribute needs to be
// deleted. Unfortunately, this not only destroys the Frames but
@@ -572,7 +573,7 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext)
GetAnchor( aNewAnchor, nOldNode, nOldContent );
pFrameFormat->SetFormatAttr( aNewAnchor );
- if (FLY_AS_CHAR == aNewAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AS_CHAR == aNewAnchor.GetAnchorId())
{
const SwPosition* pPos = aNewAnchor.GetContentAnchor();
SwFormatFlyCnt aFormat( pFrameFormat );
@@ -622,14 +623,14 @@ void SwUndoSetFlyFormat::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
bAnchorChgd = true;
const SwFormatAnchor* pAnchor = static_cast<const SwFormatAnchor*>(pItem);
- switch( nOldAnchorTyp = static_cast<sal_uInt16>(pAnchor->GetAnchorId()) )
+ switch( nOldAnchorTyp = pAnchor->GetAnchorId() )
{
- case FLY_AS_CHAR:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
nOldContent = pAnchor->GetContentAnchor()->nContent.GetIndex();
SAL_FALLTHROUGH;
- case FLY_AT_PARA:
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_FLY:
nOldNode = pAnchor->GetContentAnchor()->nNode.GetIndex();
break;
@@ -638,14 +639,14 @@ void SwUndoSetFlyFormat::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
}
pAnchor = &pFrameFormat->GetAnchor();
- switch( nNewAnchorTyp = static_cast<sal_uInt16>(pAnchor->GetAnchorId()) )
+ switch( nNewAnchorTyp = pAnchor->GetAnchorId() )
{
- case FLY_AS_CHAR:
- case FLY_AT_CHAR:
+ case RndStdIds::FLY_AS_CHAR:
+ case RndStdIds::FLY_AT_CHAR:
nNewContent = pAnchor->GetContentAnchor()->nContent.GetIndex();
SAL_FALLTHROUGH;
- case FLY_AT_PARA:
- case FLY_AT_FLY:
+ case RndStdIds::FLY_AT_PARA:
+ case RndStdIds::FLY_AT_FLY:
nNewNode = pAnchor->GetContentAnchor()->nNode.GetIndex();
break;
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index cd2d23ff1aa1..f76e6bfd883b 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -116,15 +116,15 @@ static void lcl_SendRemoveToUno( SwFormat& rFormat )
static void lcl_SaveAnchor( SwFrameFormat* pFormat, sal_uLong& rNodePos )
{
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
- if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
- (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
- (FLY_AS_CHAR == rAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()))
{
rNodePos = rAnchor.GetContentAnchor()->nNode.GetIndex();
sal_Int32 nContentPos = 0;
- if (FLY_AS_CHAR == rAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId())
{
nContentPos = rAnchor.GetContentAnchor()->nContent.GetIndex();
@@ -142,7 +142,7 @@ static void lcl_SaveAnchor( SwFrameFormat* pFormat, sal_uLong& rNodePos )
pTextNd->EraseText( aIdx, 1 );
}
}
- else if (FLY_AT_CHAR == rAnchor.GetAnchorId())
+ else if (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId())
{
nContentPos = rAnchor.GetContentAnchor()->nContent.GetIndex();
}
@@ -154,10 +154,10 @@ static void lcl_SaveAnchor( SwFrameFormat* pFormat, sal_uLong& rNodePos )
static void lcl_RestoreAnchor( SwFrameFormat* pFormat, sal_uLong& rNodePos )
{
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
- if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
- (FLY_AT_FLY == rAnchor.GetAnchorId()) ||
- (FLY_AS_CHAR == rAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()))
{
const sal_Int32 nContentPos = rAnchor.GetPageNum();
SwNodes& rNds = pFormat->GetDoc()->GetNodes();
@@ -166,15 +166,15 @@ static void lcl_RestoreAnchor( SwFrameFormat* pFormat, sal_uLong& rNodePos )
SwPosition aPos( aIdx );
SwFormatAnchor aTmp( rAnchor.GetAnchorId() );
- if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
- (FLY_AT_CHAR == rAnchor.GetAnchorId()))
+ if ((RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()) ||
+ (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()))
{
aPos.nContent.Assign( aIdx.GetNode().GetContentNode(), nContentPos );
}
aTmp.SetAnchor( &aPos );
pFormat->SetFormatAttr( aTmp );
- if (FLY_AS_CHAR == rAnchor.GetAnchorId())
+ if (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId())
{
SwTextNode *pTextNd = aIdx.GetNode().GetTextNode();
OSL_ENSURE( pTextNd, "no Text Node" );
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index ad8561b5cbaa..03de7f8b5de7 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -421,8 +421,8 @@ SwUndoTableToText::SwUndoTableToText( const SwTable& rTable, sal_Unicode cCh )
SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
if (pAPos &&
- ((FLY_AT_CHAR == pAnchor->GetAnchorId()) ||
- (FLY_AT_PARA == pAnchor->GetAnchorId())) &&
+ ((RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId()) ||
+ (RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId())) &&
nTableStt <= pAPos->nNode.GetIndex() &&
pAPos->nNode.GetIndex() < nTableEnd )
{
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 90452f76592c..3ce8864999e8 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -58,7 +58,7 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
const SwPosition* pAPos = pAnchor->GetContentAnchor();
if (pAPos &&
- (pAnchor->GetAnchorId() == FLY_AT_PARA) &&
+ (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
nSttNode == pAPos->nNode.GetIndex() )
{
if( !pFrameFormats )
@@ -111,7 +111,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor();
SwPosition const*const pAPos = pAnchor->GetContentAnchor();
if (pAPos &&
- (pAnchor->GetAnchorId() == FLY_AT_PARA) &&
+ (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA) &&
nSttNode == pAPos->nNode.GetIndex() )
{
std::vector<SwFrameFormat*>::iterator it;
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index a15bacd7e745..f262c7bae15e 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -130,7 +130,7 @@ public:
{
if(bCreate && !pAnchor)
{
- pAnchor = new SwFormatAnchor(FLY_AS_CHAR);
+ pAnchor = new SwFormatAnchor(RndStdIds::FLY_AS_CHAR);
}
return pAnchor;
}
@@ -598,7 +598,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
SfxItemSet aSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
RES_FRMATR_END-1 );
- SwFormatAnchor aAnchor( FLY_AS_CHAR );
+ SwFormatAnchor aAnchor( RndStdIds::FLY_AS_CHAR );
bool bOpaque = false;
if( pDesc )
{
@@ -675,12 +675,12 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
pInternalPam = new SwUnoInternalPaM(*pDoc);
if (::sw::XTextRangeToSwPaM(*pInternalPam, xRg))
{
- if(FLY_AT_FLY == aAnchor.GetAnchorId() &&
+ if(RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId() &&
!pInternalPam->GetNode().FindFlyStartNode())
{
- aAnchor.SetType(FLY_AS_CHAR);
+ aAnchor.SetType(RndStdIds::FLY_AS_CHAR);
}
- else if (FLY_AT_PAGE == aAnchor.GetAnchorId())
+ else if (RndStdIds::FLY_AT_PAGE == aAnchor.GetAnchorId())
{
aAnchor.SetAnchor(pInternalPam->Start());
}
@@ -688,7 +688,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
else
throw uno::RuntimeException();
}
- else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) && pDoc->getIDocumentLayoutAccess().GetCurrentLayout())
+ else if ((aAnchor.GetAnchorId() != RndStdIds::FLY_AT_PAGE) && pDoc->getIDocumentLayoutAccess().GetCurrentLayout())
{
SwCursorMoveState aState( MV_SETONLYTEXT );
Point aTmp(convertMm100ToTwip(aMM100Pos.X), convertMm100ToTwip(aMM100Pos.Y));
@@ -700,7 +700,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
}
else
{
- aAnchor.SetType(FLY_AT_PAGE);
+ aAnchor.SetType(RndStdIds::FLY_AT_PAGE);
// #i32349# - adjustment of vertical positioning
// attributes no longer needed, because its already got a default.
@@ -749,7 +749,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
for ( size_t i = 0; !bFlyInCnt && i < rMarkList.GetMarkCount(); ++i )
{
const SdrObject *pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
- if (FLY_AS_CHAR == ::FindFrameFormat(const_cast<SdrObject*>(
+ if (RndStdIds::FLY_AS_CHAR == ::FindFrameFormat(const_cast<SdrObject*>(
pObj))->GetAnchor().GetAnchorId())
{
bFlyInCnt = true;
@@ -765,7 +765,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
SwDrawContact* pContact = pDoc->GroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor(
pPage->GetDrawView()->GetMarkedObjectList(),
- FLY_AT_PARA,
+ RndStdIds::FLY_AT_PARA,
true, false );
pPage->GetDrawView()->UnmarkAll();
@@ -799,7 +799,7 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & rShapeG
pDoc->UnGroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(),
- FLY_AT_PARA,
+ RndStdIds::FLY_AT_PARA,
true, false );
pDoc->GetIDocumentUndoRedo().EndUndo( SwUndoId::END, nullptr );
pPage->RemovePageView();
@@ -1080,7 +1080,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aItemSet.Get(pEntry->nWID));
SwPosition aPos(*pFrame->GetFrameFormat()->GetContent().GetContentIdx());
aAnchor.SetAnchor(&aPos);
- aAnchor.SetType(FLY_AT_FLY);
+ aAnchor.SetType(RndStdIds::FLY_AT_FLY);
aItemSet.Put(aAnchor);
pFormat->SetFormatAttr(aItemSet);
bDone = true;
@@ -1117,7 +1117,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
SwFormatAnchor aAnchor( static_cast<const SwFormatAnchor&>(aSet.Get( RES_ANCHOR )) );
- if (aAnchor.GetAnchorId() == FLY_AT_PAGE)
+ if (aAnchor.GetAnchorId() == RndStdIds::FLY_AT_PAGE)
{
// set property <TextRange> not valid for to-page anchored shapes
throw lang::IllegalArgumentException();
@@ -1130,7 +1130,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
aValue >>= xRg;
if (::sw::XTextRangeToSwPaM(*pInternalPam, xRg) )
{
- if (aAnchor.GetAnchorId() == FLY_AS_CHAR)
+ if (aAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR)
{
//delete old SwFormatFlyCnt
//With AnchorAsCharacter the current TextAttribute has to be deleted.
@@ -1259,7 +1259,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
SwFrameFormat *pFlyFormat = FindFrameFormat( pObj );
pFlyFormat->DelFrames();
if( text::TextContentAnchorType_AS_CHARACTER != eNewAnchor &&
- (FLY_AS_CHAR == eOldAnchorId))
+ (RndStdIds::FLY_AS_CHAR == eOldAnchorId))
{
//With AnchorAsCharacter the current TextAttribute has to be deleted.
//Tbis removes the frame format too.
@@ -1282,7 +1282,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
pTextNode->DeleteAttributes(RES_TXTATR_FLYCNT, nIdx);
}
else if( text::TextContentAnchorType_AT_PAGE != eNewAnchor &&
- (FLY_AT_PAGE == eOldAnchorId))
+ (RndStdIds::FLY_AT_PAGE == eOldAnchorId))
{
SwFormatAnchor aNewAnchor( dynamic_cast< const SwFormatAnchor& >( aSet.Get( RES_ANCHOR ) ) );
//if the fly has been anchored at page then it needs to be connected
@@ -1306,7 +1306,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
bSetAttr = false;
}
if( text::TextContentAnchorType_AS_CHARACTER == eNewAnchor &&
- (FLY_AS_CHAR != eOldAnchorId))
+ (RndStdIds::FLY_AS_CHAR != eOldAnchorId))
{
SwPaM aPam(pDoc->GetNodes().GetEndOfContent());
if( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() )
@@ -1484,7 +1484,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
const SwFormatAnchor aAnchor = pFormat->GetAnchor();
- if (aAnchor.GetAnchorId() == FLY_AT_PAGE)
+ if (aAnchor.GetAnchorId() == RndStdIds::FLY_AT_PAGE)
{
// return nothing, because property <TextRange> isn't
// valid for to-page anchored shapes
@@ -2086,7 +2086,7 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor()
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
// return an anchor for non-page bound frames
// and for page bound frames that have a page no == NULL and a content position
- if ((rAnchor.GetAnchorId() != FLY_AT_PAGE) ||
+ if ((rAnchor.GetAnchorId() != RndStdIds::FLY_AT_PAGE) ||
(rAnchor.GetContentAnchor() && !rAnchor.GetPageNum()))
{
const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
@@ -2125,7 +2125,7 @@ void SwXShape::dispose()
!pObj->GetUpGroup() &&
pObj->IsInserted() )
{
- if (pFormat->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
+ if (pFormat->GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR)
{
const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
SwTextNode *pTextNode = rPos.nNode.GetNode().GetTextNode();
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 7de59808c43c..c1222db074da 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1773,7 +1773,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
SwPosition aPos(*pFrame->GetFrameFormat()->GetContent().GetContentIdx());
aAnchor.SetAnchor(&aPos);
- aAnchor.SetType(FLY_AT_FLY);
+ aAnchor.SetType(RndStdIds::FLY_AT_FLY);
aSet.Put(aAnchor);
pDoc->SetFlyFrameAttr( *pFormat, aSet );
bDone = true;
@@ -1902,7 +1902,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORTYPE == nMemberId)
{
SwFormatAnchor aAnchor = static_cast<const SwFormatAnchor&>(aSet.Get(pEntry->nWID));
- if(aAnchor.GetAnchorId() == FLY_AT_FLY)
+ if(aAnchor.GetAnchorId() == RndStdIds::FLY_AT_FLY)
{
const ::SwPosition* pPosition = aAnchor.GetContentAnchor();
SwFrameFormat* pFlyFormat = pPosition ? pPosition->nNode.GetNode().GetFlyFormat() : nullptr;
@@ -1920,7 +1920,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
aSet.Put(aAnchor);
}
}
- else if ((aAnchor.GetAnchorId() != FLY_AT_PAGE) &&
+ else if ((aAnchor.GetAnchorId() != RndStdIds::FLY_AT_PAGE) &&
!aAnchor.GetContentAnchor())
{
SwNode& rNode = pDoc->GetNodes().GetEndOfContent();
@@ -2629,7 +2629,7 @@ void SwXFrame::dispose()
( pObj->GetUserCall() &&
!static_cast<SwContact*>(pObj->GetUserCall())->IsInDTOR() ) ) )
{
- if (pFormat->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
+ if (pFormat->GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR)
{
const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor());
SwTextNode *pTextNode = rPos.nNode.GetNode().GetTextNode();
@@ -2653,7 +2653,7 @@ uno::Reference< text::XTextRange > SwXFrame::getAnchor()
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
// return an anchor for non-page bound frames
// and for page bound frames that have a page no == NULL and a content position
- if ((rAnchor.GetAnchorId() != FLY_AT_PAGE) ||
+ if ((rAnchor.GetAnchorId() != RndStdIds::FLY_AT_PAGE) ||
(rAnchor.GetContentAnchor() && !rAnchor.GetPageNum()))
{
const SwPosition &rPos = *(rAnchor.GetContentAnchor());
@@ -2735,18 +2735,18 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
}
const SfxPoolItem* pItem;
- RndStdIds eAnchorId = FLY_AT_PARA;
+ RndStdIds eAnchorId = RndStdIds::FLY_AT_PARA;
if(SfxItemState::SET == aFrameSet.GetItemState(RES_ANCHOR, false, &pItem) )
{
eAnchorId = static_cast<const SwFormatAnchor*>(pItem)->GetAnchorId();
- if( FLY_AT_FLY == eAnchorId &&
+ if( RndStdIds::FLY_AT_FLY == eAnchorId &&
!aPam.GetNode().FindFlyStartNode())
{
// framebound only where a frame exists
- SwFormatAnchor aAnchor(FLY_AT_PARA);
+ SwFormatAnchor aAnchor(RndStdIds::FLY_AT_PARA);
aFrameSet.Put(aAnchor);
}
- else if ((FLY_AT_PAGE == eAnchorId) &&
+ else if ((RndStdIds::FLY_AT_PAGE == eAnchorId) &&
0 == static_cast<const SwFormatAnchor*>(pItem)->GetPageNum() )
{
SwFormatAnchor aAnchor( *static_cast<const SwFormatAnchor*>(pItem) );
@@ -2769,10 +2769,10 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
SwFormatAnchor* pAnchorItem = nullptr;
// the frame is inserted bound to page
// to prevent conflicts if the to-be-anchored position is part of the to-be-copied text
- if (eAnchorId != FLY_AT_PAGE)
+ if (eAnchorId != RndStdIds::FLY_AT_PAGE)
{
pAnchorItem = static_cast<SwFormatAnchor*>(aFrameSet.Get(RES_ANCHOR).Clone());
- aFrameSet.Put( SwFormatAnchor( FLY_AT_PAGE, 1 ));
+ aFrameSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PAGE, 1 ));
}
aPam.DeleteMark(); // mark position node will be deleted!
@@ -2793,7 +2793,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
}
else
{
- pFormat = pDoc->MakeFlySection( FLY_AT_PARA, aPam.GetPoint(),
+ pFormat = pDoc->MakeFlySection( RndStdIds::FLY_AT_PARA, aPam.GetPoint(),
&aFrameSet, pParentFrameFormat );
}
if(pFormat)
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 0a202afbf3dd..91a84c2e30f0 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -167,7 +167,7 @@ namespace
{
void lcl_CollectFrameAtNodeWithLayout(const SwContentFrame* pCFrame,
FrameClientSortList_t& rFrames,
- const sal_uInt16 nAnchorType)
+ const RndStdIds nAnchorType)
{
auto pObjs = pCFrame->GetDrawObjs();
if(!pObjs)
@@ -202,8 +202,7 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx,
// search all borders, images, and OLEs that are connected to the paragraph
SwDoc* pDoc = rIdx.GetNode().GetDoc();
- const auto nChkType = static_cast< sal_uInt16 >((bAtCharAnchoredObjs)
- ? FLY_AT_CHAR : FLY_AT_PARA);
+ const auto nChkType = bAtCharAnchoredObjs ? RndStdIds::FLY_AT_CHAR : RndStdIds::FLY_AT_PARA;
const SwContentFrame* pCFrame;
const SwContentNode* pCNd;
if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() &&
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index fcde2732ac2d..a22f2e874822 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1627,7 +1627,7 @@ SwXText::convertToTextFrame(
{
const SwFrameFormat* pFrameFormat = (*m_pImpl->m_pDoc->GetSpzFrameFormats())[i];
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
- if ((FLY_AT_PARA == rAnchor.GetAnchorId() || FLY_AT_CHAR == rAnchor.GetAnchorId()) &&
+ if ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId() || RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) &&
aStartPam.Start()->nNode.GetIndex() <= rAnchor.GetContentAnchor()->nNode.GetIndex() &&
aStartPam.End()->nNode.GetIndex() >= rAnchor.GetContentAnchor()->nNode.GetIndex())
{
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index eb4ad0772eca..ddd003c75465 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -229,7 +229,7 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz )
const SwFrame *pAnchor = static_cast<const SwDrawContact*>(pCont)->GetAnchorFrame();
if ( !pAnchor || pAnchor->IsInFly() || !pAnchor->IsValid() ||
!pAnchor->GetUpper() || !pAnchor->FindPageFrame() ||
- (FLY_AS_CHAR == pCont->GetFormat()->GetAnchor().GetAnchorId()) )
+ (RndStdIds::FLY_AS_CHAR == pCont->GetFormat()->GetAnchor().GetAnchorId()) )
{
continue;
}