summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-02 09:22:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-02 07:58:24 +0000
commit1e2bd1771808da00ec959995ab1284c6193a57f5 (patch)
tree67f08641cc63649d1e072b48e1269eb187f509ec /sw
parent04fe439b053f2d361e74975a4b66cd359980976e (diff)
elide the SwSurround enum
no point in redeclaring an existing enum exactly Change-Id: I4fb367e4b27e36601f1f36b629097a87b5f00096 Reviewed-on: https://gerrit.libreoffice.org/34773 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/fmtsrnd.hxx8
-rw-r--r--sw/inc/fmtsrndenum.hxx37
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx11
-rw-r--r--sw/source/core/doc/doclay.cxx4
-rw-r--r--sw/source/core/doc/textboxhelper.cxx2
-rw-r--r--sw/source/core/draw/dcontact.cxx4
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx8
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/inc/sortedobjs.hxx4
-rw-r--r--sw/source/core/inc/txtfly.hxx12
-rw-r--r--sw/source/core/layout/anchoredobject.cxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx38
-rw-r--r--sw/source/core/layout/flowfrm.cxx2
-rw-r--r--sw/source/core/layout/fly.cxx8
-rw-r--r--sw/source/core/layout/flycnt.cxx8
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/sortedobjs.cxx4
-rw-r--r--sw/source/core/layout/tabfrm.cxx12
-rw-r--r--sw/source/core/layout/trvlfrm.cxx4
-rw-r--r--sw/source/core/layout/wsfrm.cxx4
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx2
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx4
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx2
-rw-r--r--sw/source/core/text/itratr.cxx2
-rw-r--r--sw/source/core/text/txtfly.cxx56
-rw-r--r--sw/source/core/unocore/unoframe.cxx2
-rw-r--r--sw/source/filter/html/htmlcss1.cxx6
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx4
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx36
-rw-r--r--sw/source/filter/html/htmlgrin.cxx12
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx6
-rw-r--r--sw/source/filter/html/htmltabw.cxx6
-rw-r--r--sw/source/filter/html/swhtml.cxx22
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx32
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx8
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx14
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx18
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx22
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx15
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx2
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx36
-rw-r--r--sw/source/uibase/shells/basesh.cxx60
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx14
50 files changed, 256 insertions, 323 deletions
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index cc9bce7b6449..02bf0e0c7299 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -20,11 +20,11 @@
#define INCLUDED_SW_INC_FMTSRND_HXX
#include "swdllapi.h"
+#include <com/sun/star/text/WrapTextMode.hpp>
#include <hintids.hxx>
#include <format.hxx>
#include <svl/eitem.hxx>
-#include <fmtsrndenum.hxx>
class IntlWrapper;
// SwFormatSurround: How document content under the frame shall behave.
@@ -34,7 +34,7 @@ class SW_DLLPUBLIC SwFormatSurround: public SfxEnumItem
bool bContour :1;
bool bOutside :1;
public:
- SwFormatSurround( SwSurround eNew = SURROUND_PARALLEL );
+ SwFormatSurround( css::text::WrapTextMode eNew = css::text::WrapTextMode_PARALLEL );
SwFormatSurround( const SwFormatSurround & );
inline SwFormatSurround &operator=( const SwFormatSurround &rCpy );
@@ -50,11 +50,11 @@ public:
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
- SwSurround GetSurround()const { return SwSurround( GetValue() ); }
+ css::text::WrapTextMode GetSurround()const { return css::text::WrapTextMode( GetValue() ); }
bool IsAnchorOnly() const { return bAnchorOnly; }
bool IsContour() const { return bContour; }
bool IsOutside() const { return bOutside; }
- void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( sal_uInt16( eNew ) ); }
+ void SetSurround ( css::text::WrapTextMode eNew ){ SfxEnumItem::SetValue( sal_uInt16( eNew ) ); }
void SetAnchorOnly( bool bNew ) { bAnchorOnly = bNew; }
void SetContour( bool bNew ) { bContour = bNew; }
void SetOutside( bool bNew ) { bOutside = bNew; }
diff --git a/sw/inc/fmtsrndenum.hxx b/sw/inc/fmtsrndenum.hxx
deleted file mode 100644
index 82bbb53ee17b..000000000000
--- a/sw/inc/fmtsrndenum.hxx
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SW_INC_FMTSRNDENUM_HXX
-#define INCLUDED_SW_INC_FMTSRNDENUM_HXX
-
-#include <com/sun/star/text/WrapTextMode.hpp>
-
-enum SwSurround {
- SURROUND_NONE = css::text::WrapTextMode_NONE,
- SURROUND_BEGIN = SURROUND_NONE,
- SURROUND_THROUGHT = css::text::WrapTextMode_THROUGHT,
- SURROUND_PARALLEL = css::text::WrapTextMode_PARALLEL,
- SURROUND_IDEAL = css::text::WrapTextMode_DYNAMIC,
- SURROUND_LEFT = css::text::WrapTextMode_LEFT,
- SURROUND_RIGHT = css::text::WrapTextMode_RIGHT,
- SURROUND_END
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 5e1f71b6c446..c5d8fa09388a 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -26,7 +26,6 @@
#include <paratr.hxx>
#include <poolfmt.hxx>
#include <fmtornt.hxx>
-#include <fmtsrndenum.hxx>
#include <charfmt.hxx>
#include <fmtsrnd.hxx>
#include <docary.hxx>
@@ -1274,12 +1273,12 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
{
aSet.Put( SwFormatAnchor( FLY_AS_CHAR ));
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::LINE_CENTER, text::RelOrientation::PRINT_AREA ) );
- aSet.Put( SwFormatSurround( SURROUND_NONE ) );
+ aSet.Put( SwFormatSurround( css::text::WrapTextMode_NONE ) );
}
else
{
aSet.Put( SwFormatAnchor( FLY_AT_PARA ));
- aSet.Put( SwFormatSurround( SURROUND_PARALLEL ) );
+ 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 ) );
Color aCol( COL_BLACK );
@@ -1305,7 +1304,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
aSet.Put( SwFormatAnchor( 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( SURROUND_IDEAL ));
+ aSet.Put( SwFormatSurround( css::text::WrapTextMode_DYNAMIC ));
}
break;
case RES_POOLFRM_FORMEL:
@@ -1320,7 +1319,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
aSet.Put( SwFormatAnchor( 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( SURROUND_PARALLEL ));
+ aSet.Put( SwFormatSurround( css::text::WrapTextMode_PARALLEL ));
// Set the default width to 3.5 cm, use the minimum value for the height
aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE,
GetMetricVal( CM_1 ) * 3 + GetMetricVal( CM_05 ),
@@ -1333,7 +1332,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
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 ));
- aSet.Put( SwFormatSurround( SURROUND_THROUGHT ));
+ aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGHT ));
}
break;
case RES_POOLFRM_LABEL:
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 0f1c560538ab..38b9f87cdd4b 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -814,7 +814,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
// Also, the width should be 100% and it should also adjust the hight, if changed.
pNewSet->ClearItem();
- pNewSet->Put( SwFormatSurround( SURROUND_NONE ) );
+ pNewSet->Put( SwFormatSurround( css::text::WrapTextMode_NONE ) );
pNewSet->Put( SvxOpaqueItem( RES_OPAQUE, true ) );
sal_Int16 eVert = bBefore ? text::VertOrientation::BOTTOM : text::VertOrientation::TOP;
@@ -1131,7 +1131,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable
// and it should be adjusted to above and middle.
pNewSet->ClearItem();
- pNewSet->Put( SwFormatSurround( SURROUND_NONE ) );
+ pNewSet->Put( SwFormatSurround( css::text::WrapTextMode_NONE ) );
if (nLayerId == rDoc.getIDocumentDrawModelAccess().GetHellId())
{
// Consider drawing objects in the 'invisible' hell layer
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index bd17f1aca24a..b9f5faccfa3f 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -229,7 +229,7 @@ void SwTextBoxHelper::getShapeWrapThrough(const SwFrameFormat* pTextBox, bool& r
{
SwFrameFormat* pShape = SwTextBoxHelper::getOtherTextBoxFormat(pTextBox, RES_FLYFRMFMT);
if (pShape)
- rWrapThrough = pShape->GetSurround().GetSurround() == SURROUND_THROUGHT;
+ rWrapThrough = pShape->GetSurround().GetSurround() == css::text::WrapTextMode_THROUGHT;
}
SwFrameFormat* SwTextBoxHelper::getOtherTextBoxFormat(const SwFrameFormat* pFormat, sal_uInt16 nType)
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index bdb41f98bb39..1d9c68492828 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -139,7 +139,7 @@ bool HasWrap( const SdrObject* pObj )
const SwFrameFormat* pFormat = ::FindFrameFormat( pObj );
if ( pFormat )
{
- return SURROUND_THROUGHT != pFormat->GetSurround().GetSurround();
+ return css::text::WrapTextMode_THROUGHT != pFormat->GetSurround().GetSurround();
}
}
@@ -1101,7 +1101,7 @@ void SwDrawContact::Changed_( const SdrObject& rObj,
// improvement: determine as-character anchored object flag only once.
const bool bAnchoredAsChar = ObjAnchoredAsChar();
const bool bNotify = !(GetFormat()->GetDoc()->IsInDtor()) &&
- ( SURROUND_THROUGHT != GetFormat()->GetSurround().GetSurround() ) &&
+ ( css::text::WrapTextMode_THROUGHT != GetFormat()->GetSurround().GetSurround() ) &&
!bAnchoredAsChar;
switch( eType )
{
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 9083b2ed5f1a..1536cf3c2d1e 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -884,7 +884,7 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj,
SfxItemSet rFlyAttrSet( GetDoc()->GetAttrPool(), aFrameFormatSetRange );
rFlyAttrSet.Put( SwFormatAnchor( FLY_AT_PARA ));
// #i89920#
- rFlyAttrSet.Put( SwFormatSurround( SURROUND_THROUGHT ) );
+ rFlyAttrSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGHT ) );
rDrawObj.SetLayer( getIDocumentDrawModelAccess().GetHeavenId() );
// find anchor position
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index d8cc238366c3..5af9a914bfa4 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1314,7 +1314,7 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
const SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj );
const SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat();
const SwFormatSurround& rSurround = rFormat.GetSurround();
- if ( rSurround.GetSurround() == SURROUND_THROUGHT )
+ if ( rSurround.GetSurround() == css::text::WrapTextMode_THROUGHT )
{
bObjInBackground = true;
}
@@ -1928,7 +1928,7 @@ bool SwFEShell::ImpEndCreate()
SwFormatHoriOrient aHori( nXOffset, text::HoriOrientation::NONE, text::RelOrientation::FRAME );
SwFormatVertOrient aVert( nYOffset, text::VertOrientation::NONE, text::RelOrientation::FRAME );
- aSet.Put( SwFormatSurround( SURROUND_PARALLEL ) );
+ aSet.Put( SwFormatSurround( css::text::WrapTextMode_PARALLEL ) );
aSet.Put( aHori );
aSet.Put( aVert );
@@ -1991,7 +1991,7 @@ bool SwFEShell::ImpEndCreate()
aRelNullPt = rBound.TopLeft();
aSet.Put( aAnch );
- aSet.Put( SwFormatSurround( SURROUND_THROUGHT ) );
+ aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGHT ) );
// OD 2004-03-30 #i26791# - set horizontal position
SwFormatHoriOrient aHori( nXOffset, text::HoriOrientation::NONE, text::RelOrientation::FRAME );
aSet.Put( aHori );
@@ -2719,7 +2719,7 @@ void SwFEShell::CheckUnboundObjects()
aRelNullPt = rBound.TopLeft();
aSet.Put( aAnch );
- aSet.Put( SwFormatSurround( SURROUND_THROUGHT ) );
+ aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGHT ) );
SwFrameFormat* pFormat = getIDocumentLayoutAccess().MakeLayoutFormat( RND_DRAW_OBJECT, &aSet );
SwDrawContact *pContact = new SwDrawContact(
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 3c315709054c..f26b1cf56172 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -728,7 +728,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
SwFlyFrameFormat* pFormat = const_cast<SwFlyFrameFormat*>(pFly->GetFormat());
const SwFormatSurround& rSurround = pFormat->GetSurround();
- bWrapThrough = rSurround.GetSurround() == SURROUND_THROUGHT;
+ bWrapThrough = rSurround.GetSurround() == css::text::WrapTextMode_THROUGHT;
}
const SwPageFrame* pPage = pFrame->FindPageFrame();
diff --git a/sw/source/core/inc/sortedobjs.hxx b/sw/source/core/inc/sortedobjs.hxx
index 2ebdbae2f340..ba3c34408ef4 100644
--- a/sw/source/core/inc/sortedobjs.hxx
+++ b/sw/source/core/inc/sortedobjs.hxx
@@ -34,8 +34,8 @@ class SwAnchoredObject;
- order 1: to-page, 2: to-fly, 3: to-paragraph|to-character|as-character
- anchor node
- wrapping style (inclusive layer)
- - order 1: wrapping style != SURROUND_THROUGHT and not in hell layer,
- 2: wrapping style = SURROUND_THROUGHT or in hell layer
+ - order 1: wrapping style != css::text::WrapTextMode_THROUGHT and not in hell layer,
+ 2: wrapping style = css::text::WrapTextMode_THROUGHT or in hell layer
- wrapping style influence
- order 1: NONE_SUCCESSIVE_POSITIONED, 2: NONE_CONCURRENT_POSITIONED
- again anchor type
diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx
index 7844d8c53cc2..e74d429d974b 100644
--- a/sw/source/core/inc/txtfly.hxx
+++ b/sw/source/core/inc/txtfly.hxx
@@ -21,7 +21,7 @@
#include "swtypes.hxx"
#include "swrect.hxx"
-#include <fmtsrndenum.hxx>
+#include <com/sun/star/text/WrapTextMode.hpp>
#include <vector>
class OutputDevice;
@@ -158,19 +158,19 @@ class SwTextFly
/**
\li There is less than 2cm space on both sides for the text:
- no surround (SURROUND_NONE)
+ no surround (css::text::WrapTextMode_NONE)
\li There is more than 2cm space on only one side:
- surround on that side (SURROUND_LEFT or SURROUND_RIGHT)
+ surround on that side (css::text::WrapTextMode_LEFT or css::text::WrapTextMode_RIGHT)
\li There is more than 2cm space on both sides, the object is
larger than 1.5cm: surround on the wider side
- (SURROUND_LET or SURROUND_RIGHT)
+ (css::text::WrapTextMode_LEFT or css::text::WrapTextMode_RIGHT)
\li There is more than 2cm space on both sides and the object
- width is less than 1.5cm: both sides surround (SURROUND_PARALLEL)
+ width is less than 1.5cm: both sides surround (css::text::WrapTextMode_PARALLEL)
*/
- SwSurround GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredObj ) const;
+ css::text::WrapTextMode GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredObj ) const;
/**
The right margin is the right margin or it is determined by the
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index 98a9a16ab6b8..d3d51c8db6c3 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -427,7 +427,7 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOnObjPos() const
const SwFormatAnchor& rAnchor = rObjFormat.GetAnchor();
if ( ((rAnchor.GetAnchorId() == FLY_AT_CHAR) ||
(rAnchor.GetAnchorId() == FLY_AT_PARA)) &&
- rObjFormat.GetSurround().GetSurround() != SURROUND_THROUGHT )
+ rObjFormat.GetSurround().GetSurround() != css::text::WrapTextMode_THROUGHT )
{
// --> #i34520# - text also wraps around anchored
// objects in the layer Hell - see the text formatting.
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index d55d6ba781e6..546bc1694215 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1142,7 +1142,7 @@ void SwFormatCol::dumpAsXml(xmlTextWriterPtr pWriter) const
}
// Partially implemented inline in hxx
-SwFormatSurround::SwFormatSurround( SwSurround eFly ) :
+SwFormatSurround::SwFormatSurround( css::text::WrapTextMode eFly ) :
SfxEnumItem( RES_SURROUND, sal_uInt16( eFly ) )
{
bAnchorOnly = bContour = bOutside = false;
@@ -1172,37 +1172,7 @@ SfxPoolItem* SwFormatSurround::Clone( SfxItemPool* ) const
sal_uInt16 SwFormatSurround::GetValueCount() const
{
- return SURROUND_END - SURROUND_BEGIN;
-}
-
-namespace
-{
- text::WrapTextMode SwSurroundToWrapMode(SwSurround eSurround)
- {
- text::WrapTextMode eRet;
- switch(eSurround)
- {
- case SURROUND_THROUGHT:
- eRet = css::text::WrapTextMode_THROUGHT;
- break;
- case SURROUND_PARALLEL:
- eRet = css::text::WrapTextMode_PARALLEL;
- break;
- case SURROUND_IDEAL:
- eRet = css::text::WrapTextMode_DYNAMIC;
- break;
- case SURROUND_LEFT:
- eRet = css::text::WrapTextMode_LEFT;
- break;
- case SURROUND_RIGHT:
- eRet = css::text::WrapTextMode_RIGHT;
- break;
- default:
- eRet = css::text::WrapTextMode_NONE;
- break;
- }
- return eRet;
- }
+ return 6;
}
bool SwFormatSurround::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -1213,7 +1183,7 @@ bool SwFormatSurround::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
switch ( nMemberId )
{
case MID_SURROUND_SURROUNDTYPE:
- rVal <<= SwSurroundToWrapMode(GetSurround());
+ rVal <<= GetSurround();
break;
case MID_SURROUND_ANCHORONLY:
rVal <<= IsAnchorOnly();
@@ -1241,7 +1211,7 @@ bool SwFormatSurround::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_SURROUND_SURROUNDTYPE:
{
sal_Int32 eVal = SWUnoHelper::GetEnumAsInt32( rVal );
- if( eVal >= 0 && eVal < SURROUND_END )
+ if( eVal >= css::text::WrapTextMode_NONE && eVal <= css::text::WrapTextMode_RIGHT )
SetValue( static_cast<sal_uInt16>(eVal) );
else {
//exception
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 0924eac33c95..d7b65128fdbf 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -303,7 +303,7 @@ sal_uInt8 SwFlowFrame::BwdMoveNecessary( const SwPageFrame *pPage, const SwRect
const SwFrameFormat& rFormat = pObj->GetFrameFormat();
const SwRect aRect( pObj->GetObjRect() );
if ( aRect.IsOver( rRect ) &&
- rFormat.GetSurround().GetSurround() != SURROUND_THROUGHT )
+ rFormat.GetSurround().GetSurround() != css::text::WrapTextMode_THROUGHT )
{
if( m_rThis.IsLayoutFrame() && //Fly Lower of This?
Is_Lower_Of( &m_rThis, pObj->GetDrawObj() ) )
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index add94cdd7d1a..97e17fc38dd7 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1464,20 +1464,20 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
// Prevent oscillation
SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat();
SwFormatSurround aAttr( rFormat.GetSurround() );
- if( SURROUND_THROUGHT != aAttr.GetSurround() )
+ if( css::text::WrapTextMode_THROUGHT != aAttr.GetSurround() )
{
// When on auto position, we can only set it to
// flow through
if ((rFormat.GetAnchor().GetAnchorId() ==
FLY_AT_CHAR) &&
- (SURROUND_PARALLEL ==
+ (css::text::WrapTextMode_PARALLEL ==
aAttr.GetSurround()))
{
- aAttr.SetSurround( SURROUND_THROUGHT );
+ aAttr.SetSurround( css::text::WrapTextMode_THROUGHT );
}
else
{
- aAttr.SetSurround( SURROUND_PARALLEL );
+ aAttr.SetSurround( css::text::WrapTextMode_PARALLEL );
}
rFormat.LockModify();
rFormat.SetFormatAttr( aAttr );
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 98c553facf31..4d96189c7ea5 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -345,9 +345,9 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
pFormat->LockModify();
SwFormatSurround aMain( pFormat->GetSurround() );
- if ( aMain.GetSurround() == SURROUND_NONE )
+ if ( aMain.GetSurround() == css::text::WrapTextMode_NONE )
{
- aMain.SetSurround( SURROUND_THROUGHT );
+ aMain.SetSurround( css::text::WrapTextMode_THROUGHT );
pFormat->SetFormatAttr( aMain );
}
pFormat->UnlockModify();
@@ -463,10 +463,10 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
rFrameSz.GetHeightPercent() == SwFormatFrameSize::SYNCED )
{
SwFormatSurround aSurround( pFormat->GetSurround() );
- if ( aSurround.GetSurround() == SURROUND_NONE )
+ if ( aSurround.GetSurround() == css::text::WrapTextMode_NONE )
{
pFormat->LockModify();
- aSurround.SetSurround( SURROUND_THROUGHT );
+ aSurround.SetSurround( css::text::WrapTextMode_THROUGHT );
pFormat->SetFormatAttr( aSurround );
pFormat->UnlockModify();
bOsz = false;
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index e9e6535cfb92..ebaedddcc9c2 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2886,7 +2886,7 @@ void Notify_Background( const SdrObject* pObj,
&& pFlyFrame // TODO: do it for draw objects too?
&& pTab->IsFollow() // table starts on previous page?
// "through" means they will actually overlap anyway
- && SURROUND_THROUGHT != pFlyFrame->GetFormat()->GetSurround().GetSurround()
+ && css::text::WrapTextMode_THROUGHT != pFlyFrame->GetFormat()->GetSurround().GetSurround()
// if it's anchored in footer it can't move to other page
&& !pAnchor->FindFooterOrHeader())
{
diff --git a/sw/source/core/layout/sortedobjs.cxx b/sw/source/core/layout/sortedobjs.cxx
index d01f6d583af7..72f9db7256fe 100644
--- a/sw/source/core/layout/sortedobjs.cxx
+++ b/sw/source/core/layout/sortedobjs.cxx
@@ -160,11 +160,11 @@ struct ObjAnchorOrder
const SdrLayerID nHellId = rIDDMA.GetHellId();
const SdrLayerID nInvisibleHellId = rIDDMA.GetInvisibleHellId();
const bool bWrapThroughOrHellListed =
- rFormatListed.GetSurround().GetSurround() == SURROUND_THROUGHT ||
+ rFormatListed.GetSurround().GetSurround() == css::text::WrapTextMode_THROUGHT ||
_pListedAnchoredObj->GetDrawObj()->GetLayer() == nHellId ||
_pListedAnchoredObj->GetDrawObj()->GetLayer() == nInvisibleHellId;
const bool bWrapThroughOrHellNew =
- rFormatNew.GetSurround().GetSurround() == SURROUND_THROUGHT ||
+ rFormatNew.GetSurround().GetSurround() == css::text::WrapTextMode_THROUGHT ||
_pNewAnchoredObj->GetDrawObj()->GetLayer() == nHellId ||
_pNewAnchoredObj->GetDrawObj()->GetLayer() == nInvisibleHellId;
if ( bWrapThroughOrHellListed != bWrapThroughOrHellNew )
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 0c572dd7ebd2..cae056608d41 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2660,15 +2660,15 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
{
const SwFormatSurround &rSur = pFly->GetFormat()->GetSurround();
const SwFormatHoriOrient &rHori= pFly->GetFormat()->GetHoriOrient();
- if ( SURROUND_NONE == rSur.GetSurround() )
+ if ( css::text::WrapTextMode_NONE == rSur.GetSurround() )
{
long nBottom = aRectFnSet.GetBottom(aFlyRect);
if( aRectFnSet.YDiff( nPrtPos, nBottom ) < 0 )
nPrtPos = nBottom;
bInvalidatePrtArea = true;
}
- if ( (SURROUND_RIGHT == rSur.GetSurround() ||
- SURROUND_PARALLEL == rSur.GetSurround())&&
+ if ( (css::text::WrapTextMode_RIGHT == rSur.GetSurround() ||
+ css::text::WrapTextMode_PARALLEL == rSur.GetSurround())&&
text::HoriOrientation::LEFT == rHori.GetHoriOrient() )
{
const long nWidth = aRectFnSet.XDiff(
@@ -2677,8 +2677,8 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
rLeftOffset = std::max( rLeftOffset, nWidth );
bInvalidatePrtArea = true;
}
- if ( (SURROUND_LEFT == rSur.GetSurround() ||
- SURROUND_PARALLEL == rSur.GetSurround())&&
+ if ( (css::text::WrapTextMode_LEFT == rSur.GetSurround() ||
+ css::text::WrapTextMode_PARALLEL == rSur.GetSurround())&&
text::HoriOrientation::RIGHT == rHori.GetHoriOrient() )
{
const long nWidth = aRectFnSet.XDiff(
@@ -4935,7 +4935,7 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
const SwFrameFormat& rAnchoredObjFrameFormat = pAnchoredObj->GetFrameFormat();
const SwFormatSurround &rSur = rAnchoredObjFrameFormat.GetSurround();
- if ( SURROUND_THROUGHT != rSur.GetSurround() )
+ if ( css::text::WrapTextMode_THROUGHT != rSur.GetSurround() )
{
// frames, which the cell is a lower of, aren't relevant
if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 48241a98c41b..7635d9806c3c 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -64,7 +64,7 @@ namespace {
const SwAnchoredObject* pAnchoredObj = GetUserCall( aIter() )->GetAnchoredObj( aIter() );
const SwFormatSurround& rSurround = pAnchoredObj->GetFrameFormat().GetSurround();
const SvxOpaqueItem& rOpaque = pAnchoredObj->GetFrameFormat().GetOpaque();
- bool bInBackground = ( rSurround.GetSurround() == SURROUND_THROUGHT ) && !rOpaque.GetValue();
+ bool bInBackground = ( rSurround.GetSurround() == css::text::WrapTextMode_THROUGHT ) && !rOpaque.GetValue();
bool bBackgroundMatches = ( bInBackground && bSearchBackground ) ||
( !bInBackground && !bSearchBackground );
@@ -2570,7 +2570,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
if( inSelection )
Add( aRegion, pFly->Frame() );
else if ( !pFly->IsAnLower( pStartFrame ) &&
- (rSur.GetSurround() != SURROUND_THROUGHT &&
+ (rSur.GetSurround() != css::text::WrapTextMode_THROUGHT &&
!rSur.IsContour()) )
{
if ( aSortObjs.Contains( *pAnchoredObj ) )
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 050c00e6f878..7863e2ea8d2e 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1900,7 +1900,7 @@ SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
if( aBound.IsOver( aRect ) )
{
const SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat();
- if( SURROUND_THROUGHT != rFormat.GetSurround().GetSurround() )
+ if( css::text::WrapTextMode_THROUGHT != rFormat.GetSurround().GetSurround() )
{
const SwFrame* pAnchor = pAnchoredObj->GetAnchorFrame();
if ( pAnchor && pAnchor->FindFooterOrHeader() == GetUpper() )
@@ -3087,7 +3087,7 @@ static void InvaPercentFlys( SwFrame *pFrame, SwTwips nDiff )
if( pFly->Frame().Height()*10 >
( nDiff + pRel->Prt().Height() )*9 &&
pFly->GetFormat()->GetSurround().GetSurround() !=
- SURROUND_THROUGHT )
+ css::text::WrapTextMode_THROUGHT )
bNotify = false;
}
if( bNotify )
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index b281e52f84ae..373cf036a284 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -175,7 +175,7 @@ SwTwips SwAnchoredObjectPosition::GetTopForObjPos( const SwFrame& _rFrame,
rTextFrame.GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
const SwFormatSurround& rSurround = mpFrameFormat->GetSurround();
- bool bWrapThrough = rSurround.GetSurround() == SURROUND_THROUGHT;
+ bool bWrapThrough = rSurround.GetSurround() == css::text::WrapTextMode_THROUGHT;
// If the frame format is a TextBox of a draw shape, then use the
// surround of the original shape.
SwTextBoxHelper::getShapeWrapThrough(mpFrameFormat, bWrapThrough);
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 55a9d842f33b..fa16f3741b7e 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -161,8 +161,8 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
// determine, if object has no surrounding.
const SwFormatSurround& rSurround = rFrameFormat.GetSurround();
- const bool bNoSurround = rSurround.GetSurround() == SURROUND_NONE;
- const bool bWrapThrough = rSurround.GetSurround() == SURROUND_THROUGHT;
+ const bool bNoSurround = rSurround.GetSurround() == css::text::WrapTextMode_NONE;
+ const bool bWrapThrough = rSurround.GetSurround() == css::text::WrapTextMode_THROUGHT;
// new class <SwEnvironmentOfAnchoredObject>
SwEnvironmentOfAnchoredObject aEnvOfObj( DoesObjFollowsTextFlow() );
diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
index 4e6b35352b36..d3ddf25465cb 100644
--- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
@@ -74,7 +74,7 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
if ( ( bFlyAtFly &&
( eVertOrient == text::VertOrientation::CENTER ||
eVertOrient == text::VertOrientation::BOTTOM ) &&
- SURROUND_THROUGHT != rFrameFormat.GetSurround().GetSurround() &&
+ css::text::WrapTextMode_THROUGHT != rFrameFormat.GetSurround().GetSurround() &&
!GetAnchorFrame().HasFixSize() ) )
{
eVertOrient = text::VertOrientation::TOP;
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 488fe3360e29..0182fd07747e 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -501,7 +501,7 @@ static void lcl_MinMaxNode( SwFrameFormat* pNd, SwMinMaxNodeArgs* pIn )
nMax += rLR.GetLeft();
nMax += rLR.GetRight();
- if( SURROUND_THROUGHT == pNd->GetSurround().GetSurround() )
+ if( css::text::WrapTextMode_THROUGHT == pNd->GetSurround().GetSurround() )
{
pIn->Minimum( nMin );
return;
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 9abedf1d7a28..7c32123aae9e 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -508,7 +508,7 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf )
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
// Only the ones who are opaque and more to the top
if( ! rFly.IsBackgroundTransparent() &&
- SURROUND_THROUGHT == rSur.GetSurround() &&
+ css::text::WrapTextMode_THROUGHT == rSur.GetSurround() &&
( !rSur.IsAnchorOnly() ||
// #i68520#
GetMaster() == rFly.GetAnchorFrame() ||
@@ -599,7 +599,7 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect )
// #i47804# - consider transparent graphics
// and OLE objects.
bool bClipFlyArea =
- ( ( SURROUND_THROUGHT == rSur.GetSurround() )
+ ( ( css::text::WrapTextMode_THROUGHT == rSur.GetSurround() )
// #i68520#
? (pAnchoredObjTmp->GetDrawObj()->GetLayer() != nHellId)
: !rSur.IsContour() ) &&
@@ -1026,7 +1026,7 @@ bool SwTextFly::ForEach( const SwRect &rRect, SwRect* pRect, bool bAvoid ) const
// formatting. In LineIter::DrawText() it is "just"
// necessary to cleverly set the ClippingRegions
const SwFormatAnchor& rAnchor = pFormat->GetAnchor();
- if( ( SURROUND_THROUGHT == rSur.GetSurround() &&
+ if( ( css::text::WrapTextMode_THROUGHT == rSur.GetSurround() &&
( !rSur.IsAnchorOnly() ||
// #i68520#
GetMaster() == pAnchoredObj->GetAnchorFrame() ||
@@ -1109,7 +1109,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly,
// are ignored for computing the margins of other Flys.
// 3301: pNext->Frame().IsOver( rLine ) is necessary
// #i68520#
- SwSurround eSurroundForTextWrap;
+ css::text::WrapTextMode eSurroundForTextWrap;
bool bStop = false;
// #i68520#
@@ -1128,7 +1128,7 @@ void SwTextFly::CalcRightMargin( SwRect &rFly,
if ( pNext == mpCurrAnchoredObj )
continue;
eSurroundForTextWrap = GetSurroundForTextWrap( pNext );
- if( SURROUND_THROUGHT == eSurroundForTextWrap )
+ if( css::text::WrapTextMode_THROUGHT == eSurroundForTextWrap )
continue;
const SwRect aTmp( SwContourCache::CalcBoundRect
@@ -1163,8 +1163,8 @@ void SwTextFly::CalcRightMargin( SwRect &rFly,
if( aTmp.IsOver( aLine ) && nTmpRight > nFlyRight )
{
nFlyRight = nTmpRight;
- if( SURROUND_RIGHT == eSurroundForTextWrap ||
- SURROUND_PARALLEL == eSurroundForTextWrap )
+ if( css::text::WrapTextMode_RIGHT == eSurroundForTextWrap ||
+ css::text::WrapTextMode_PARALLEL == eSurroundForTextWrap )
{
// overrule the FlyFrame
if( nRight > nFlyRight )
@@ -1219,8 +1219,8 @@ void SwTextFly::CalcLeftMargin( SwRect &rFly,
const SwAnchoredObject* pNext = (*mpAnchoredObjList)[ nFlyPos ];
if( pNext == mpCurrAnchoredObj )
continue;
- SwSurround eSurroundForTextWrap = GetSurroundForTextWrap( pNext );
- if( SURROUND_THROUGHT == eSurroundForTextWrap )
+ css::text::WrapTextMode eSurroundForTextWrap = GetSurroundForTextWrap( pNext );
+ if( css::text::WrapTextMode_THROUGHT == eSurroundForTextWrap )
continue;
const SwRect aTmp( SwContourCache::CalcBoundRect
@@ -1273,17 +1273,17 @@ SwRect SwTextFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj,
// added up.
switch( GetSurroundForTextWrap( pAnchoredObj ) )
{
- case SURROUND_LEFT :
+ case css::text::WrapTextMode_LEFT :
{
CalcRightMargin( aFly, nFlyPos, rLine );
break;
}
- case SURROUND_RIGHT :
+ case css::text::WrapTextMode_RIGHT :
{
CalcLeftMargin( aFly, nFlyPos, rLine );
break;
}
- case SURROUND_NONE :
+ case css::text::WrapTextMode_NONE :
{
CalcRightMargin( aFly, nFlyPos, rLine );
CalcLeftMargin( aFly, nFlyPos, rLine );
@@ -1306,11 +1306,11 @@ SwRect SwTextFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj,
// Wrap on both sides up to a frame width of 1.5cm
#define FRAME_MAX 850
-SwSurround SwTextFly::GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredObj ) const
+css::text::WrapTextMode SwTextFly::GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredObj ) const
{
const SwFrameFormat* pFormat = &(pAnchoredObj->GetFrameFormat());
const SwFormatSurround &rFlyFormat = pFormat->GetSurround();
- SwSurround eSurroundForTextWrap = rFlyFormat.GetSurround();
+ css::text::WrapTextMode eSurroundForTextWrap = rFlyFormat.GetSurround();
if( rFlyFormat.IsAnchorOnly() && pAnchoredObj->GetAnchorFrame() != GetMaster() )
{
@@ -1318,26 +1318,26 @@ SwSurround SwTextFly::GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
(FLY_AT_CHAR == rAnchor.GetAnchorId()))
{
- return SURROUND_NONE;
+ return css::text::WrapTextMode_NONE;
}
}
// in cause of run-through and nowrap ignore smartly
- if( SURROUND_THROUGHT == eSurroundForTextWrap ||
- SURROUND_NONE == eSurroundForTextWrap )
+ if( css::text::WrapTextMode_THROUGHT == eSurroundForTextWrap ||
+ css::text::WrapTextMode_NONE == eSurroundForTextWrap )
return eSurroundForTextWrap;
// left is left and right is right
if ( pCurrFrame->IsRightToLeft() )
{
- if ( SURROUND_LEFT == eSurroundForTextWrap )
- eSurroundForTextWrap = SURROUND_RIGHT;
- else if ( SURROUND_RIGHT == eSurroundForTextWrap )
- eSurroundForTextWrap = SURROUND_LEFT;
+ if ( css::text::WrapTextMode_LEFT == eSurroundForTextWrap )
+ eSurroundForTextWrap = css::text::WrapTextMode_RIGHT;
+ else if ( css::text::WrapTextMode_RIGHT == eSurroundForTextWrap )
+ eSurroundForTextWrap = css::text::WrapTextMode_LEFT;
}
// "ideal page wrap":
- if ( SURROUND_IDEAL == eSurroundForTextWrap )
+ if ( css::text::WrapTextMode_DYNAMIC == eSurroundForTextWrap )
{
SwRectFnSet aRectFnSet(pCurrFrame);
const long nCurrLeft = aRectFnSet.GetPrtLeft(*pCurrFrame);
@@ -1347,7 +1347,7 @@ SwSurround SwTextFly::GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO
long nFlyRight = aRectFnSet.GetRight(aRect);
if ( nFlyRight < nCurrLeft || nFlyLeft > nCurrRight )
- eSurroundForTextWrap = SURROUND_PARALLEL;
+ eSurroundForTextWrap = css::text::WrapTextMode_PARALLEL;
else
{
long nLeft = nFlyLeft - nCurrLeft;
@@ -1363,20 +1363,20 @@ SwSurround SwTextFly::GetSurroundForTextWrap( const SwAnchoredObject* pAnchoredO
->getIDocumentSettingAccess()->get(DocumentSettingId::SURROUND_TEXT_WRAP_SMALL )
? TEXT_MIN_SMALL : TEXT_MIN;
- // In case there is no space on either side, then SURROUND_PARALLEL
+ // In case there is no space on either side, then css::text::WrapTextMode_PARALLEL
// gives the same result when doing the initial layout or a layout
- // update after editing, so prefer that over SURROUND_NONE.
+ // update after editing, so prefer that over css::text::WrapTextMode_NONE.
if (nLeft == 0 && nRight == 0)
- return SURROUND_PARALLEL;
+ return css::text::WrapTextMode_PARALLEL;
if( nLeft < textMin )
nLeft = 0;
if( nRight < textMin )
nRight = 0;
if( nLeft )
- eSurroundForTextWrap = nRight ? SURROUND_PARALLEL : SURROUND_LEFT;
+ eSurroundForTextWrap = nRight ? css::text::WrapTextMode_PARALLEL : css::text::WrapTextMode_LEFT;
else
- eSurroundForTextWrap = nRight ? SURROUND_RIGHT: SURROUND_NONE;
+ eSurroundForTextWrap = nRight ? css::text::WrapTextMode_RIGHT: css::text::WrapTextMode_NONE;
}
}
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 4101171cab48..8ea12cb3889b 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1371,7 +1371,7 @@ SdrObject *SwXFrame::GetOrCreateSdrObject(SwFlyFrameFormat &rFormat)
const ::SwFormatSurround& rSurround = rFormat.GetSurround();
pObject->SetLayer(
- ( SURROUND_THROUGHT == rSurround.GetSurround() &&
+ ( css::text::WrapTextMode_THROUGHT == rSurround.GetSurround() &&
!rFormat.GetOpaque().GetValue() ) ? pDoc->getIDocumentDrawModelAccess().GetHellId()
: pDoc->getIDocumentDrawModelAccess().GetHeavenId() );
pDrawModel->GetPage(0)->InsertObject( pObject );
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 6c0e7be260e1..522d922ef935 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1947,7 +1947,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
sal_Int16 eHoriRel = text::RelOrientation::FRAME;
sal_Int16 eVertRel = text::RelOrientation::FRAME;
SwTwips nHoriPos = 0, nVertPos = 0;
- SwSurround eSurround = SURROUND_THROUGHT;
+ css::text::WrapTextMode eSurround = css::text::WrapTextMode_THROUGHT;
if( SVX_CSS1_POS_ABSOLUTE == rPropInfo.m_ePosition )
{
if( SVX_CSS1_LTYPE_TWIP == rPropInfo.m_eLeftType &&
@@ -2025,13 +2025,13 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
{
eHoriOri = text::HoriOrientation::RIGHT;
eHoriRel = nRightSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
- eSurround = SURROUND_LEFT;
+ eSurround = css::text::WrapTextMode_LEFT;
}
else
{
eHoriOri = text::HoriOrientation::LEFT;
eHoriRel = nLeftSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
- eSurround = SURROUND_RIGHT;
+ eSurround = css::text::WrapTextMode_RIGHT;
}
}
rFrameItemSet.Put( aAnchor );
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index a98ebf101369..664c8ce80b33 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -173,13 +173,13 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
// #i26791# - direct positioning for <SwDoc::Insert(..)>
pNewDrawObj->SetRelativePos( Point(rCSS1PropInfo.m_nLeft + nLeftSpace,
rCSS1PropInfo.m_nTop + nUpperSpace) );
- aFrameSet.Put( SwFormatSurround(SURROUND_THROUGHT) );
+ aFrameSet.Put( SwFormatSurround(css::text::WrapTextMode_THROUGHT) );
}
else if( SVX_ADJUST_LEFT == rCSS1PropInfo.m_eFloat ||
text::HoriOrientation::LEFT == eHoriOri )
{
aAnchor.SetType( FLY_AT_PARA );
- aFrameSet.Put( SwFormatSurround(SURROUND_RIGHT) );
+ aFrameSet.Put( SwFormatSurround(css::text::WrapTextMode_RIGHT) );
// #i26791# - direct positioning for <SwDoc::Insert(..)>
pNewDrawObj->SetRelativePos( Point(nLeftSpace, nUpperSpace) );
}
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 175d4d43eca6..62c75640a092 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -744,7 +744,7 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
const SwFormatSurround* pSurround = static_cast<const SwFormatSurround*>(pItem);
sal_Int16 eHoriOri = rFrameFormat.GetHoriOrient().GetHoriOrient();
pStr = nullptr;
- SwSurround eSurround = pSurround->GetSurround();
+ css::text::WrapTextMode eSurround = pSurround->GetSurround();
bool bAnchorOnly = pSurround->IsAnchorOnly();
switch( eHoriOri )
{
@@ -752,12 +752,12 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
{
switch( eSurround )
{
- case SURROUND_NONE:
- case SURROUND_RIGHT:
+ case css::text::WrapTextMode_NONE:
+ case css::text::WrapTextMode_RIGHT:
pStr = OOO_STRING_SVTOOLS_HTML_AL_right;
break;
- case SURROUND_LEFT:
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_LEFT:
+ case css::text::WrapTextMode_PARALLEL:
if( bAnchorOnly )
m_bClearRight = true;
break;
@@ -773,12 +773,12 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
{
switch( eSurround )
{
- case SURROUND_NONE:
- case SURROUND_LEFT:
+ case css::text::WrapTextMode_NONE:
+ case css::text::WrapTextMode_LEFT:
pStr = OOO_STRING_SVTOOLS_HTML_AL_left;
break;
- case SURROUND_RIGHT:
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_RIGHT:
+ case css::text::WrapTextMode_PARALLEL:
if( bAnchorOnly )
m_bClearLeft = true;
break;
@@ -1006,7 +1006,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
const SwFormatSurround* pSurround = static_cast<const SwFormatSurround*>(pItem);
sal_Int16 eHoriOri = rFrameFormat.GetHoriOrient().GetHoriOrient();
- SwSurround eSurround = pSurround->GetSurround();
+ css::text::WrapTextMode eSurround = pSurround->GetSurround();
bool bAnchorOnly = pSurround->IsAnchorOnly();
switch( eHoriOri )
{
@@ -1014,12 +1014,12 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
{
switch( eSurround )
{
- case SURROUND_NONE:
- case SURROUND_RIGHT:
+ case css::text::WrapTextMode_NONE:
+ case css::text::WrapTextMode_RIGHT:
pSurroundString = OOO_STRING_SVTOOLS_HTML_AL_right;
break;
- case SURROUND_LEFT:
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_LEFT:
+ case css::text::WrapTextMode_PARALLEL:
if( bAnchorOnly )
m_bClearRight = true;
break;
@@ -1035,12 +1035,12 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
{
switch( eSurround )
{
- case SURROUND_NONE:
- case SURROUND_LEFT:
+ case css::text::WrapTextMode_NONE:
+ case css::text::WrapTextMode_LEFT:
pSurroundString = OOO_STRING_SVTOOLS_HTML_AL_left;
break;
- case SURROUND_RIGHT:
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_RIGHT:
+ case css::text::WrapTextMode_PARALLEL:
if( bAnchorOnly )
m_bClearLeft = true;
break;
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index c470b691cab7..008b8b8a8e18 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -197,24 +197,24 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
// Horizonale Ausrichtung und Umlauf bestimmen.
sal_Int16 eHoriRel;
- SwSurround eSurround;
+ css::text::WrapTextMode eSurround;
switch( eHoriOri )
{
case text::HoriOrientation::LEFT:
eHoriRel = nLeftSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
- eSurround = SURROUND_RIGHT;
+ eSurround = css::text::WrapTextMode_RIGHT;
break;
case text::HoriOrientation::RIGHT:
eHoriRel = nRightSpace ? text::RelOrientation::PRINT_AREA : text::RelOrientation::FRAME;
- eSurround = SURROUND_LEFT;
+ eSurround = css::text::WrapTextMode_LEFT;
break;
case text::HoriOrientation::CENTER: // fuer Tabellen
eHoriRel = text::RelOrientation::FRAME;
- eSurround = SURROUND_NONE;
+ eSurround = css::text::WrapTextMode_NONE;
break;
default:
eHoriRel = text::RelOrientation::FRAME;
- eSurround = SURROUND_PARALLEL;
+ eSurround = css::text::WrapTextMode_PARALLEL;
break;
}
@@ -279,7 +279,7 @@ void SwHTMLParser::RegisterFlyFrame( SwFrameFormat *pFlyFormat )
// nach vorne verschoben werden.
if( RES_DRAWFRMFMT != pFlyFormat->Which() &&
(FLY_AT_PARA == pFlyFormat->GetAnchor().GetAnchorId()) &&
- SURROUND_THROUGHT == pFlyFormat->GetSurround().GetSurround() )
+ css::text::WrapTextMode_THROUGHT == pFlyFormat->GetSurround().GetSurround() )
{
m_aMoveFlyFrames.push_back( pFlyFormat );
m_aMoveFlyCnts.push_back( m_pPam->GetPoint()->nContent.GetIndex() );
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index cfd6ec670349..8279dd21c241 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -446,7 +446,7 @@ void SwHTMLParser::InsertEmbed()
aAnchor.SetAnchor( m_pPam->GetPoint() );
aFrameSet.Put( aAnchor );
aFrameSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME) );
- aFrameSet.Put( SwFormatSurround( SURROUND_THROUGHT ) );
+ aFrameSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGHT ) );
aFrameSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::PRINT_AREA ) );
}
@@ -1048,7 +1048,7 @@ Writer& OutHTML_FrameFormatOLENode( Writer& rWrt, const SwFrameFormat& rFrameFor
}
if ((FLY_AT_PARA == rFrameFormat.GetAnchor().GetAnchorId()) &&
- SURROUND_THROUGHT == rFrameFormat.GetSurround().GetSurround() )
+ css::text::WrapTextMode_THROUGHT == rFrameFormat.GetSurround().GetSurround() )
{
// Das Plugin ist HIDDEN
sOut.append(' ').append(OOO_STRING_SW_HTML_O_Hidden);
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index e3d7f982b74c..9dd67560d91a 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -3538,20 +3538,20 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
if( !pCurTable->IsNewDoc() )
Reader::ResetFrameFormatAttrs( aFrameSet );
- SwSurround eSurround = SURROUND_NONE;
+ css::text::WrapTextMode eSurround = css::text::WrapTextMode_NONE;
sal_Int16 eHori;
switch( pCurTable->GetTableAdjust(true) )
{
case SVX_ADJUST_RIGHT:
eHori = text::HoriOrientation::RIGHT;
- eSurround = SURROUND_LEFT;
+ eSurround = css::text::WrapTextMode_LEFT;
break;
case SVX_ADJUST_CENTER:
eHori = text::HoriOrientation::CENTER;
break;
case SVX_ADJUST_LEFT:
- eSurround = SURROUND_RIGHT;
+ eSurround = css::text::WrapTextMode_RIGHT;
SAL_FALLTHROUGH;
default:
eHori = text::HoriOrientation::LEFT;
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index d536ff0d44d4..12e71f94848e 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -876,7 +876,7 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode,
// Prioritaet. NONE bedeutet, dass keine horizontale
// Ausrichtung geschrieben wird.
sal_Int16 eFlyHoriOri = text::HoriOrientation::NONE;
- SwSurround eSurround = SURROUND_NONE;
+ css::text::WrapTextMode eSurround = css::text::WrapTextMode_NONE;
sal_uInt8 nFlyPrcWidth = 0;
long nFlyWidth = 0;
sal_uInt16 nFlyHSpace = 0;
@@ -1038,13 +1038,13 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode,
case text::HoriOrientation::LEFT:
// Wenn eine linksbuendigeTabelle keinen rechtsseiigen Durchlauf
// hat, brauchen wir auch kein ALIGN=LEFT in der Tabelle.
- if( eSurround==SURROUND_NONE || eSurround==SURROUND_LEFT )
+ if( eSurround==css::text::WrapTextMode_NONE || eSurround==css::text::WrapTextMode_LEFT )
eTabHoriOri = text::HoriOrientation::NONE;
break;
case text::HoriOrientation::RIGHT:
// Aehnliches gilt fuer rechtsbuendigeTabelle, hier nehmen wir
// stattdessen ein <DIV ALIGN=RIGHT>.
- if( eSurround==SURROUND_NONE || eSurround==SURROUND_RIGHT )
+ if( eSurround==css::text::WrapTextMode_NONE || eSurround==css::text::WrapTextMode_RIGHT )
{
eDivHoriOri = text::HoriOrientation::RIGHT;
eTabHoriOri = text::HoriOrientation::NONE;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 639b5ca1eebb..b3c6d72bf139 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -4471,10 +4471,10 @@ bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly,
// auch keine mit Durchlauf beachten. Dabei handelt es
// sich (noch) um HIDDEN-Controls, und denen weicht man
// besser auch nicht aus.
- SwSurround eSurround = pFormat->GetSurround().GetSurround();
+ css::text::WrapTextMode eSurround = pFormat->GetSurround().GetSurround();
if( bNoSurroundOnly )
{
- if( SURROUND_NONE==eSurround )
+ if( css::text::WrapTextMode_NONE==eSurround )
{
bFound = true;
break;
@@ -4482,12 +4482,12 @@ bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly,
}
if( bSurroundOnly )
{
- if( SURROUND_NONE==eSurround )
+ if( css::text::WrapTextMode_NONE==eSurround )
{
bFound = false;
break;
}
- else if( SURROUND_THROUGHT!=eSurround )
+ else if( css::text::WrapTextMode_THROUGHT!=eSurround )
{
bFound = true;
// weitersuchen: Es koennten ja noch welche ohne
@@ -5094,30 +5094,30 @@ void SwHTMLParser::InsertLineBreak()
((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
(FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
pAPos->nNode == rNodeIdx &&
- pFormat->GetSurround().GetSurround() != SURROUND_NONE )
+ pFormat->GetSurround().GetSurround() != css::text::WrapTextMode_NONE )
{
sal_Int16 eHori = RES_DRAWFRMFMT == pFormat->Which()
? text::HoriOrientation::LEFT
: pFormat->GetHoriOrient().GetHoriOrient();
- SwSurround eSurround = SURROUND_PARALLEL;
+ css::text::WrapTextMode eSurround = css::text::WrapTextMode_PARALLEL;
if( m_pPam->GetPoint()->nContent.GetIndex() )
{
if( bClearLeft && text::HoriOrientation::LEFT==eHori )
- eSurround = SURROUND_RIGHT;
+ eSurround = css::text::WrapTextMode_RIGHT;
else if( bClearRight && text::HoriOrientation::RIGHT==eHori )
- eSurround = SURROUND_LEFT;
+ eSurround = css::text::WrapTextMode_LEFT;
}
else if( (bClearLeft && text::HoriOrientation::LEFT==eHori) ||
(bClearRight && text::HoriOrientation::RIGHT==eHori) )
{
- eSurround = SURROUND_NONE;
+ eSurround = css::text::WrapTextMode_NONE;
}
- if( SURROUND_PARALLEL != eSurround )
+ if( css::text::WrapTextMode_PARALLEL != eSurround )
{
SwFormatSurround aSurround( eSurround );
- if( SURROUND_NONE != eSurround )
+ if( css::text::WrapTextMode_NONE != eSurround )
aSurround.SetAnchorOnly( true );
pFormat->SetFormatAttr( aSurround );
bCleared = true;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index e5ce36a58bb8..80ea26fdb94f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -396,16 +396,16 @@ void DocxAttributeOutput::PopulateFrameProperties(const SwFrameFormat* pFrameFor
switch (pFrameFormat->GetSurround().GetValue())
{
- case SURROUND_NONE:
+ case css::text::WrapTextMode_NONE:
attrList->add( FSNS( XML_w, XML_wrap), "none");
break;
- case SURROUND_THROUGHT:
+ case css::text::WrapTextMode_THROUGHT:
attrList->add( FSNS( XML_w, XML_wrap), "through");
break;
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_PARALLEL:
attrList->add( FSNS( XML_w, XML_wrap), "notBeside");
break;
- case SURROUND_IDEAL:
+ case css::text::WrapTextMode_DYNAMIC:
default:
attrList->add( FSNS( XML_w, XML_wrap), "auto");
break;
@@ -7475,25 +7475,25 @@ void DocxAttributeOutput::FormatSurround( const SwFormatSurround& rSurround )
OString sType, sSide;
switch (rSurround.GetSurround())
{
- case SURROUND_NONE:
+ case css::text::WrapTextMode_NONE:
sType = "topAndBottom";
break;
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_PARALLEL:
sType = "square";
break;
- case SURROUND_IDEAL:
+ case css::text::WrapTextMode_DYNAMIC:
sType = "square";
sSide = "largest";
break;
- case SURROUND_LEFT:
+ case css::text::WrapTextMode_LEFT:
sType = "square";
sSide = "left";
break;
- case SURROUND_RIGHT:
+ case css::text::WrapTextMode_RIGHT:
sType = "square";
sSide = "right";
break;
- case SURROUND_THROUGHT:
+ case css::text::WrapTextMode_THROUGHT:
/* empty type and side means throught */
default:
break;
@@ -7515,16 +7515,16 @@ void DocxAttributeOutput::FormatSurround( const SwFormatSurround& rSurround )
OString sWrap( "auto" );
switch ( rSurround.GetSurround( ) )
{
- case SURROUND_NONE:
+ case css::text::WrapTextMode_NONE:
sWrap = OString( "none" );
break;
- case SURROUND_THROUGHT:
+ case css::text::WrapTextMode_THROUGHT:
sWrap = OString( "through" );
break;
- case SURROUND_IDEAL:
- case SURROUND_PARALLEL:
- case SURROUND_LEFT:
- case SURROUND_RIGHT:
+ case css::text::WrapTextMode_DYNAMIC:
+ case css::text::WrapTextMode_PARALLEL:
+ case css::text::WrapTextMode_LEFT:
+ case css::text::WrapTextMode_RIGHT:
default:
sWrap = OString( "around" );
}
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index f3c1ee8d6d38..4a71fe2c2506 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -717,17 +717,17 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
{
switch (pFrameFormat->GetSurround().GetValue())
{
- case SURROUND_NONE:
+ case css::text::WrapTextMode_NONE:
m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_wrapTopAndBottom, FSEND);
break;
- case SURROUND_THROUGHT:
+ case css::text::WrapTextMode_THROUGHT:
m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_wrapNone, FSEND);
break;
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_PARALLEL:
m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_wrapSquare,
XML_wrapText, "bothSides", FSEND);
break;
- case SURROUND_IDEAL:
+ case css::text::WrapTextMode_DYNAMIC:
default:
m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_wrapSquare,
XML_wrapText, "largest", FSEND);
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 30942293853a..5cb920df4e77 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3040,10 +3040,10 @@ void RtfAttributeOutput::FormatSurround(const SwFormatSurround& rSurround)
{
if (m_rExport.m_bOutFlyFrameAttrs && !m_rExport.m_bRTFFlySyntax)
{
- SwSurround eSurround = rSurround.GetSurround();
- bool bGold = SURROUND_IDEAL == eSurround;
+ css::text::WrapTextMode eSurround = rSurround.GetSurround();
+ bool bGold = css::text::WrapTextMode_DYNAMIC == eSurround;
if (bGold)
- eSurround = SURROUND_PARALLEL;
+ eSurround = css::text::WrapTextMode_PARALLEL;
RTFSurround aMC(bGold, static_cast< sal_uInt8 >(eSurround));
m_aRunText->append(OOO_STRING_SVTOOLS_RTF_FLYMAINCNT);
m_aRunText->append((sal_Int32) aMC.GetValue());
@@ -3055,17 +3055,17 @@ void RtfAttributeOutput::FormatSurround(const SwFormatSurround& rSurround)
boost::optional<sal_Int32> oWrk;
switch (rSurround.GetValue())
{
- case SURROUND_NONE:
+ case css::text::WrapTextMode_NONE:
nWr = 1; // top and bottom
break;
- case SURROUND_THROUGHT:
+ case css::text::WrapTextMode_THROUGHT:
nWr = 3; // none
break;
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_PARALLEL:
nWr = 2; // around
oWrk = 0; // both sides
break;
- case SURROUND_IDEAL:
+ case css::text::WrapTextMode_DYNAMIC:
default:
nWr = 2; // around
oWrk = 3; // largest
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index d92784001782..6de9801c44a8 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -834,7 +834,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
const SwFormatSurround& rSurr = rFormat.GetSurround();
sal_uInt16 nContour = rSurr.IsContour() ? 0x0080 : 0x0040;
- SwSurround eSurround = rSurr.GetSurround();
+ css::text::WrapTextMode eSurround = rSurr.GetSurround();
/*
#i3958#
@@ -843,26 +843,26 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
over the following dummy 0x01 graphic
*/
if (rFrameFormat.IsInline())
- eSurround = SURROUND_THROUGHT;
+ eSurround = css::text::WrapTextMode_THROUGHT;
switch (eSurround)
{
- case SURROUND_NONE:
+ case css::text::WrapTextMode_NONE:
nFlags |= 0x0020;
break;
- case SURROUND_THROUGHT:
+ case css::text::WrapTextMode_THROUGHT:
nFlags |= 0x0060;
break;
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_PARALLEL:
nFlags |= 0x0000 | nContour;
break;
- case SURROUND_IDEAL:
+ case css::text::WrapTextMode_DYNAMIC:
nFlags |= 0x0600 | nContour;
break;
- case SURROUND_LEFT:
+ case css::text::WrapTextMode_LEFT:
nFlags |= 0x0200 | nContour;
break;
- case SURROUND_RIGHT:
+ case css::text::WrapTextMode_RIGHT:
nFlags |= 0x0400 | nContour;
break;
default:
@@ -2123,7 +2123,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat,
// SwWW8ImplReader::Read_GrafLayer() imports these as opaque
// unconditionally, so if both are true, don't export the property.
bool bIsInHeader = sw::IsFlyFrameFormatInHeader(rFormat);
- bool bIsThrought = rFormat.GetSurround().GetValue() == SURROUND_THROUGHT;
+ bool bIsThrought = rFormat.GetSurround().GetValue() == css::text::WrapTextMode_THROUGHT;
if (bIsInHeader)
{
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index e2f2de80205e..9180263ac399 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -801,7 +801,7 @@ void MSWordExportBase::OutputFormat( const SwFormat& rFormat, bool bPapFormat, b
}
if (SfxItemState::SET != aSet.GetItemState(RES_SURROUND))
- aSet.Put(SwFormatSurround(SURROUND_NONE));
+ aSet.Put(SwFormatSurround(css::text::WrapTextMode_NONE));
const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem* >(rFrameFormat.GetAttrSet().GetItem(XATTR_FILLSTYLE)));
if (pXFillStyleItem)
@@ -3734,7 +3734,7 @@ void WW8AttributeOutput::FormatSurround( const SwFormatSurround& rSurround )
m_rWW8Export.InsUInt16( NS_sprm::sprmPWr );
m_rWW8Export.pO->push_back(
- ( SURROUND_NONE != rSurround.GetSurround() ) ? 2 : 1 );
+ ( css::text::WrapTextMode_NONE != rSurround.GetSurround() ) ? 2 : 1 );
}
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index e1c1f8900bff..1ad44eb97329 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1346,7 +1346,7 @@ SdrObject* SwWW8ImplReader::ReadGrafPrimitive(short& rLeft, SfxAllItemSet &rSet)
if( rLeft >= SVBT16ToShort(aHd.cb) ) // Vorsichtsmassmahme
{
- rSet.Put(SwFormatSurround(SURROUND_THROUGHT));
+ rSet.Put(SwFormatSurround(css::text::WrapTextMode_THROUGHT));
switch (SVBT16ToShort(aHd.dpk) & 0xff )
{
case 0:
@@ -2528,23 +2528,23 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// Umfluss-Modus ermitteln
SfxItemSet aFlySet(m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1);
- SwSurround eSurround = SURROUND_PARALLEL;
+ css::text::WrapTextMode eSurround = css::text::WrapTextMode_PARALLEL;
bool bContour = false;
switch (pF->nwr)
{
case 0: // 0 like 2, but doesn't require absolute object
case 2: // 2 wrap around absolute object
- eSurround = SURROUND_PARALLEL;
+ eSurround = css::text::WrapTextMode_PARALLEL;
break;
case 1: // 1 no text next to shape
- eSurround = SURROUND_NONE;
+ eSurround = css::text::WrapTextMode_NONE;
break;
case 3: // 3 wrap as if no object present
- eSurround = SURROUND_THROUGHT;
+ eSurround = css::text::WrapTextMode_THROUGHT;
break;
case 4: // 4 wrap tightly around object
case 5: // 5 wrap tightly, but allow holes
- eSurround = SURROUND_PARALLEL;
+ eSurround = css::text::WrapTextMode_PARALLEL;
bContour = true;
break;
}
@@ -2556,19 +2556,19 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
{
// 0 wrap both sides
case 0:
- eSurround = SURROUND_PARALLEL;
+ eSurround = css::text::WrapTextMode_PARALLEL;
break;
// 1 wrap only on left
case 1:
- eSurround = SURROUND_LEFT;
+ eSurround = css::text::WrapTextMode_LEFT;
break;
// 2 wrap only on right
case 2:
- eSurround = SURROUND_RIGHT;
+ eSurround = css::text::WrapTextMode_RIGHT;
break;
// 3 wrap only on largest side
case 3:
- eSurround = SURROUND_IDEAL;
+ eSurround = css::text::WrapTextMode_DYNAMIC;
break;
}
}
@@ -2611,7 +2611,7 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// #i18732# - Switch on 'follow text flow', if object is laid out
// inside table cell and its wrapping isn't 'SURROUND_THROUGH'
- if (bLayoutInTableCell && eSurround != SURROUND_THROUGHT)
+ if (bLayoutInTableCell && eSurround != css::text::WrapTextMode_THROUGHT)
{
SwFormatFollowTextFlow aFollowTextFlow( true );
aFlySet.Put( aFollowTextFlow );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 02d98ec2d21a..00b1c9610494 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2251,7 +2251,7 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(WW8_CP nStart, WW8_CP nLen,
if( eFrameSize != aSz.GetWidthSizeType() )
aSz.SetWidthSizeType( eFrameSize );
pFrame->SetFormatAttr(aSz);
- pFrame->SetFormatAttr(SwFormatSurround(SURROUND_THROUGHT));
+ pFrame->SetFormatAttr(SwFormatSurround(css::text::WrapTextMode_THROUGHT));
pFrame->SetFormatAttr(SwFormatHoriOrient(0, text::HoriOrientation::LEFT)); //iFOO
// #i43427# - send frame for header/footer into background.
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index e6b3b99ceee4..1362d69c53a7 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3446,7 +3446,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
SwFormatHoriOrient aHori =
m_pTableDesc->m_pTable->GetFrameFormat()->GetHoriOrient();
m_pTableDesc->m_pFlyFormat->SetFormatAttr(aHori);
- m_pTableDesc->m_pFlyFormat->SetFormatAttr( SwFormatSurround( SURROUND_NONE ) );
+ m_pTableDesc->m_pFlyFormat->SetFormatAttr( SwFormatSurround( css::text::WrapTextMode_NONE ) );
}
// #i33818# - The nested table doesn't have to leave
// the table cell. Thus, the Writer fly frame has to follow the text flow.
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index 75b6f0543f29..3e9b6db04103 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -54,13 +54,14 @@ struct WW8SwFlyPara
sal_Int16 nWidth, nHeight; // size
sal_Int16 nNetWidth;
- SwFrameSize eHeightFix; // height fixed or min
- RndStdIds eAnchor; // binding
- short eHRel; // page or page border
- short eVRel; // page or page border
- sal_Int16 eVAlign; // up, down, centered
- sal_Int16 eHAlign; // left, right, centered
- SwSurround eSurround; // wrap mode
+ SwFrameSize eHeightFix; // height fixed or min
+ RndStdIds eAnchor; // binding
+ short eHRel; // page or page border
+ short eVRel; // page or page border
+ sal_Int16 eVAlign; // up, down, centered
+ sal_Int16 eHAlign; // left, right, centered
+ css::text::WrapTextMode
+ eSurround; // wrap mode
sal_uInt8 nXBind, nYBind; // bound relative to what
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index d55d2bf79fa2..72df1b5e25b0 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1759,11 +1759,11 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
memset( this, 0, sizeof( WW8SwFlyPara ) ); // initialize
nNewNetWidth = MINFLY; // minimum
- eSurround = ( rWW.nSp37 > 1 ) ? SURROUND_IDEAL : SURROUND_NONE;
+ eSurround = ( rWW.nSp37 > 1 ) ? css::text::WrapTextMode_DYNAMIC : css::text::WrapTextMode_NONE;
//#i119466 mapping "Around" wrap setting to "Parallel" for table
const bool bIsTable = rIo.m_pPlcxMan->HasParaSprm(0x2416);
if ( bIsTable && rWW.nSp37 == 2 )
- eSurround = SURROUND_PARALLEL;
+ eSurround = css::text::WrapTextMode_PARALLEL;
/*
#95905#, #83307# seems to have gone away now, so reenable parallel
@@ -2036,7 +2036,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
//we no longer need to hack around the header/footer problems
SwFormatSurround aSurround(pFS->eSurround);
- if ( pFS->eSurround == SURROUND_IDEAL )
+ if ( pFS->eSurround == css::text::WrapTextMode_DYNAMIC )
aSurround.SetAnchorOnly( true );
Put( aSurround );
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 8e8a203d59f0..8b9ca44b01d3 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -300,7 +300,7 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame(
// the example gets a border around the frame, the real document doesn't get one
if(!bExample)
aSet.Put(SvxBoxItem( RES_BOX ));
- aSet.Put(SwFormatSurround( SURROUND_NONE ));
+ aSet.Put(SwFormatSurround( css::text::WrapTextMode_NONE ));
rShell.NewFlyFrame(aSet, true );
SwFrameFormat* pRet = rShell.GetFlyFrameFormat();
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index c4ae80ab71a3..632963a2716a 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2311,7 +2311,7 @@ void SwFramePage::Init(const SfxItemSet& rSet, bool bReset)
const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet.Get(RES_SURROUND));
m_pExampleWN->SetWrap ( static_cast< sal_uInt16 >(rSurround.GetSurround()) );
- if ( rSurround.GetSurround() == SURROUND_THROUGHT )
+ if ( rSurround.GetSurround() == css::text::WrapTextMode_THROUGHT )
{
const SvxOpaqueItem& rOpaque = static_cast<const SvxOpaqueItem&>(rSet.Get(RES_OPAQUE));
m_pExampleWN->SetTransparent(!rOpaque.GetValue());
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 881d4ebcb212..bb222d8c3612 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -202,12 +202,12 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet->Get(RES_SURROUND));
- SwSurround nSur = rSurround.GetSurround();
+ css::text::WrapTextMode nSur = rSurround.GetSurround();
const SwFormatAnchor &rAnch = static_cast<const SwFormatAnchor&>(rSet->Get(RES_ANCHOR));
m_nAnchorId = rAnch.GetAnchorId();
if (((m_nAnchorId == FLY_AT_PARA) || (m_nAnchorId == FLY_AT_CHAR))
- && (nSur != SURROUND_NONE))
+ && (nSur != css::text::WrapTextMode_NONE))
{
m_pWrapAnchorOnlyCB->Check( rSurround.IsAnchorOnly() );
}
@@ -226,13 +226,13 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
switch (nSur)
{
- case SURROUND_NONE:
+ case css::text::WrapTextMode_NONE:
{
pBtn = m_pNoWrapRB;
break;
}
- case SURROUND_THROUGHT:
+ case css::text::WrapTextMode_THROUGHT:
{
// transparent ?
pBtn = m_pWrapThroughRB;
@@ -245,13 +245,13 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
break;
}
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_PARALLEL:
{
pBtn = m_pWrapParallelRB;
break;
}
- case SURROUND_IDEAL:
+ case css::text::WrapTextMode_DYNAMIC:
{
pBtn = m_pIdealWrapRB;
break;
@@ -259,9 +259,9 @@ void SwWrapTabPage::Reset(const SfxItemSet *rSet)
default:
{
- if (nSur == SURROUND_LEFT)
+ if (nSur == css::text::WrapTextMode_LEFT)
pBtn = m_pWrapLeftRB;
- else if (nSur == SURROUND_RIGHT)
+ else if (nSur == css::text::WrapTextMode_RIGHT)
pBtn = m_pWrapRightRB;
}
}
@@ -308,21 +308,21 @@ bool SwWrapTabPage::FillItemSet(SfxItemSet *rSet)
}
if (m_pNoWrapRB->IsChecked())
- aSur.SetSurround(SURROUND_NONE);
+ aSur.SetSurround(css::text::WrapTextMode_NONE);
else if (m_pWrapLeftRB->IsChecked())
- aSur.SetSurround(SURROUND_LEFT);
+ aSur.SetSurround(css::text::WrapTextMode_LEFT);
else if (m_pWrapRightRB->IsChecked())
- aSur.SetSurround(SURROUND_RIGHT);
+ aSur.SetSurround(css::text::WrapTextMode_RIGHT);
else if (m_pWrapParallelRB->IsChecked())
- aSur.SetSurround(SURROUND_PARALLEL);
+ aSur.SetSurround(css::text::WrapTextMode_PARALLEL);
else if (m_pWrapThroughRB->IsChecked())
{
- aSur.SetSurround(SURROUND_THROUGHT);
+ aSur.SetSurround(css::text::WrapTextMode_THROUGHT);
if (m_pWrapTransparentCB->IsChecked() && !m_bDrawMode)
aOp.SetValue(false);
}
else if (m_pIdealWrapRB->IsChecked())
- aSur.SetSurround(SURROUND_IDEAL);
+ aSur.SetSurround(css::text::WrapTextMode_DYNAMIC);
aSur.SetAnchorOnly( m_pWrapAnchorOnlyCB->IsChecked() );
bool bContour = m_pWrapOutlineCB->IsChecked() && m_pWrapOutlineCB->IsEnabled();
@@ -496,9 +496,9 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
}
const SwFormatSurround& rSurround = static_cast<const SwFormatSurround&>(rSet.Get(RES_SURROUND));
- SwSurround nSur = rSurround.GetSurround();
+ css::text::WrapTextMode nSur = rSurround.GetSurround();
- m_pWrapTransparentCB->Enable( bEnable && !m_bHtmlMode && nSur == SURROUND_THROUGHT );
+ m_pWrapTransparentCB->Enable( bEnable && !m_bHtmlMode && nSur == css::text::WrapTextMode_THROUGHT );
if(m_bHtmlMode)
{
const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(rSet.Get(RES_HORI_ORIENT));
@@ -508,7 +508,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
const bool bAllHtmlModes =
((m_nAnchorId == FLY_AT_PARA) || (m_nAnchorId == FLY_AT_CHAR)) &&
(eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT);
- m_pWrapAnchorOnlyCB->Enable( bAllHtmlModes && nSur != SURROUND_NONE );
+ m_pWrapAnchorOnlyCB->Enable( bAllHtmlModes && nSur != css::text::WrapTextMode_NONE );
m_pWrapOutsideCB->Hide();
m_pIdealWrapRB->Enable( false );
@@ -573,7 +573,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
m_pWrapParallelRB->Enable( bEnable );
m_pWrapAnchorOnlyCB->Enable(
((m_nAnchorId == FLY_AT_PARA) || (m_nAnchorId == FLY_AT_CHAR))
- && nSur != SURROUND_NONE );
+ && nSur != css::text::WrapTextMode_NONE );
}
ContourHdl(nullptr);
}
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 585b31c91ca2..0728ccad4624 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -1022,8 +1022,8 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if ( !aSur.IsContour() )
{
aSur.SetContour( true );
- if ( aSur.GetSurround() == SURROUND_NONE )
- aSur.SetSurround( SURROUND_PARALLEL );
+ if ( aSur.GetSurround() == css::text::WrapTextMode_NONE )
+ aSur.SetSurround( css::text::WrapTextMode_PARALLEL );
aSet.Put( aSur );
rSh.SetFlyFrameAttr( aSet );
}
@@ -1088,15 +1088,15 @@ void SwBaseShell::Execute(SfxRequest &rReq)
const SwFormatHoriOrient& rHori = static_cast<const SwFormatHoriOrient&>(aSet.Get(RES_HORI_ORIENT));
sal_Int16 eVOrient = rVert.GetVertOrient();
sal_Int16 eHOrient = rHori.GetHoriOrient();
- SwSurround eSurround = rSurround.GetSurround();
+ css::text::WrapTextMode eSurround = rSurround.GetSurround();
switch( eSet )
{
case FLY_AT_FLY:
case FLY_AT_PAGE:
//Wrap through, left or from left, top, from top
- if(eSurround != SURROUND_THROUGHT)
- aSet.Put(SwFormatSurround(SURROUND_THROUGHT));
+ if(eSurround != css::text::WrapTextMode_THROUGHT)
+ aSet.Put(SwFormatSurround(css::text::WrapTextMode_THROUGHT));
if( eVOrient != text::VertOrientation::TOP && eVOrient != text::VertOrientation::NONE)
aSet.Put(SwFormatVertOrient(0, text::VertOrientation::TOP));
@@ -1107,8 +1107,8 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case FLY_AT_PARA:
// left, from left, right, top, no wrap, wrap left and right
- if (eSurround != SURROUND_LEFT && eSurround != SURROUND_RIGHT)
- aSet.Put(SwFormatSurround(SURROUND_LEFT));
+ if (eSurround != css::text::WrapTextMode_LEFT && eSurround != css::text::WrapTextMode_RIGHT)
+ aSet.Put(SwFormatSurround(css::text::WrapTextMode_LEFT));
if( eVOrient != text::VertOrientation::TOP)
aSet.Put(SwFormatVertOrient(0, text::VertOrientation::TOP));
@@ -1119,8 +1119,8 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case FLY_AT_CHAR:
// left, from left, right, top, wrap through
- if(eSurround != SURROUND_THROUGHT)
- aSet.Put(SwFormatSurround(SURROUND_THROUGHT));
+ if(eSurround != css::text::WrapTextMode_THROUGHT)
+ aSet.Put(SwFormatSurround(css::text::WrapTextMode_THROUGHT));
if( eVOrient != text::VertOrientation::TOP)
aSet.Put(SwFormatVertOrient(0, text::VertOrientation::TOP));
@@ -1703,7 +1703,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
const SvxOpaqueItem& rOpaque = static_cast<const SvxOpaqueItem&>(aSet.Get(RES_OPAQUE));
bool bOpaque = rOpaque.GetValue();
- SwSurround nSurround = rWrap.GetSurround();
+ css::text::WrapTextMode nSurround = rWrap.GetSurround();
bool bSet = false;
bool bDisable =
@@ -1718,15 +1718,15 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
( (nAnchorType != FLY_AT_PARA)
&& (nAnchorType != FLY_AT_CHAR)
&& (nAnchorType != FLY_AT_PAGE));
- bSet = nSurround == SURROUND_NONE;
+ bSet = nSurround == css::text::WrapTextMode_NONE;
break;
case FN_FRAME_WRAP:
bDisable |= bHtmlMode;
- bSet = nSurround == SURROUND_PARALLEL;
+ bSet = nSurround == css::text::WrapTextMode_PARALLEL;
break;
case FN_FRAME_WRAP_IDEAL:
bDisable |= bHtmlMode;
- bSet = nSurround == SURROUND_IDEAL;
+ bSet = nSurround == css::text::WrapTextMode_DYNAMIC;
break;
case FN_FRAME_WRAPTHRU:
bDisable |= (bHtmlMode ||
@@ -1734,21 +1734,21 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
&& (nAnchorType != FLY_AT_CHAR)
&& (nAnchorType != FLY_AT_PAGE)));
if(bObj)
- bSet = nSurround == SURROUND_THROUGHT && rSh.GetLayerId();
+ bSet = nSurround == css::text::WrapTextMode_THROUGHT && rSh.GetLayerId();
else
- bSet = nSurround == SURROUND_THROUGHT && bOpaque;
+ bSet = nSurround == css::text::WrapTextMode_THROUGHT && bOpaque;
break;
case FN_FRAME_WRAPTHRU_TRANSP:
bDisable |= bHtmlMode;
if(bObj)
- bSet = nSurround == SURROUND_THROUGHT && !rSh.GetLayerId();
+ bSet = nSurround == css::text::WrapTextMode_THROUGHT && !rSh.GetLayerId();
else
- bSet = nSurround == SURROUND_THROUGHT && !bOpaque;
+ bSet = nSurround == css::text::WrapTextMode_THROUGHT && !bOpaque;
break;
case FN_FRAME_WRAP_CONTOUR:
bDisable |= bHtmlMode;
//no contour available whenn no wrap or wrap through is set
- bDisable |= (nSurround == SURROUND_NONE || nSurround == SURROUND_THROUGHT);
+ bDisable |= (nSurround == css::text::WrapTextMode_NONE || nSurround == css::text::WrapTextMode_THROUGHT);
if( !bDisable )
{
int nSel = rSh.GetSelectionType();
@@ -1775,10 +1775,10 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
bSet = rWrap.IsAnchorOnly();
break;
case FN_FRAME_WRAP_LEFT:
- bSet = nSurround == SURROUND_LEFT;
+ bSet = nSurround == css::text::WrapTextMode_LEFT;
break;
case FN_FRAME_WRAP_RIGHT:
- bSet = nSurround == SURROUND_RIGHT;
+ bSet = nSurround == css::text::WrapTextMode_RIGHT;
break;
}
@@ -1867,26 +1867,26 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
else
rSh.GetFlyFrameAttr(aSet);
SwFormatSurround aWrap( static_cast<const SwFormatSurround&>(aSet.Get(RES_SURROUND)) );
- SwSurround nOldSurround(aWrap.GetSurround());
- SwSurround nSurround = SURROUND_PARALLEL;
+ css::text::WrapTextMode nOldSurround(aWrap.GetSurround());
+ css::text::WrapTextMode nSurround = css::text::WrapTextMode_PARALLEL;
switch (nSlot)
{
case FN_FRAME_NOWRAP:
- nSurround = SURROUND_NONE;
+ nSurround = css::text::WrapTextMode_NONE;
if (aWrap.IsContour())
aWrap.SetContour(false);
break;
case FN_FRAME_WRAP_IDEAL:
- nSurround = SURROUND_IDEAL;
+ nSurround = css::text::WrapTextMode_DYNAMIC;
break;
case FN_WRAP_ANCHOR_ONLY:
aWrap.SetAnchorOnly(!aWrap.IsAnchorOnly());
// keep previous wrapping
- // switch to wrap SURROUND_PARALLEL, if previous wrap is SURROUND_NONE
- if ( nOldSurround != SURROUND_NONE )
+ // switch to wrap css::text::WrapTextMode_PARALLEL, if previous wrap is css::text::WrapTextMode_NONE
+ if ( nOldSurround != css::text::WrapTextMode_NONE )
{
nSurround = nOldSurround;
}
@@ -1899,15 +1899,15 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
aWrap.SetContour(false);
SAL_FALLTHROUGH;
case FN_FRAME_WRAPTHRU:
- nSurround = SURROUND_THROUGHT;
+ nSurround = css::text::WrapTextMode_THROUGHT;
break;
case FN_FRAME_WRAP_LEFT:
- nSurround = SURROUND_LEFT;
+ nSurround = css::text::WrapTextMode_LEFT;
break;
case FN_FRAME_WRAP_RIGHT:
- nSurround = SURROUND_RIGHT;
+ nSurround = css::text::WrapTextMode_RIGHT;
break;
default:
@@ -1919,7 +1919,7 @@ void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
{
// Defaulting the contour wrap on draw objects.
if (bObj && nOldSurround != nSurround &&
- (nOldSurround == SURROUND_NONE || nOldSurround == SURROUND_THROUGHT))
+ (nOldSurround == css::text::WrapTextMode_NONE || nOldSurround == css::text::WrapTextMode_THROUGHT))
{
aWrap.SetContour(true);
}
diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx
index 2f04918f51eb..35ef94e4344d 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -303,24 +303,24 @@ bool SwFormatSurround::GetPresentation
) const
{
sal_uInt16 nId = 0;
- switch ( (SwSurround)GetValue() )
+ switch ( (css::text::WrapTextMode)GetValue() )
{
- case SURROUND_NONE:
+ case css::text::WrapTextMode_NONE:
nId = STR_SURROUND_NONE;
break;
- case SURROUND_THROUGHT:
+ case css::text::WrapTextMode_THROUGHT:
nId = STR_SURROUND_THROUGHT;
break;
- case SURROUND_PARALLEL:
+ case css::text::WrapTextMode_PARALLEL:
nId = STR_SURROUND_PARALLEL;
break;
- case SURROUND_IDEAL:
+ case css::text::WrapTextMode_DYNAMIC:
nId = STR_SURROUND_IDEAL;
break;
- case SURROUND_LEFT:
+ case css::text::WrapTextMode_LEFT:
nId = STR_SURROUND_LEFT;
break;
- case SURROUND_RIGHT:
+ case css::text::WrapTextMode_RIGHT:
nId = STR_SURROUND_RIGHT;
break;
default:;//prevent warning