summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-12-10 10:46:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-11 06:57:12 +0100
commit412ca1ff72d2031d327df658a94e63bdcb8583b0 (patch)
tree7f6b173d04d94967d6ac114c216a72e0e44a4940
parentd5d8fa63282a433da9c49d811f04390b8d6ab9cc (diff)
convert SwFrameSize to scoped enum
Change-Id: I7e1e641ff180035c7dcefdcfdd185eadbae32142 Reviewed-on: https://gerrit.libreoffice.org/84850 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/inc/fmtfsize.hxx12
-rw-r--r--sw/qa/extras/layout/layout.cxx10
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx4
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx4
-rw-r--r--sw/source/core/doc/docdesc.cxx2
-rw-r--r--sw/source/core/doc/docfly.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx8
-rw-r--r--sw/source/core/doc/docnew.cxx2
-rw-r--r--sw/source/core/doc/htmltbl.cxx6
-rw-r--r--sw/source/core/doc/tblrwcl.cxx14
-rw-r--r--sw/source/core/docnode/ndtbl.cxx28
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx4
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/core/frmedt/tblsel.cxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx14
-rw-r--r--sw/source/core/layout/fly.cxx24
-rw-r--r--sw/source/core/layout/flylay.cxx2
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/hffrm.cxx2
-rw-r--r--sw/source/core/layout/ssfrm.cxx4
-rw-r--r--sw/source/core/layout/tabfrm.cxx16
-rw-r--r--sw/source/core/layout/wsfrm.cxx10
-rw-r--r--sw/source/core/table/swnewtable.cxx12
-rw-r--r--sw/source/core/table/swtable.cxx4
-rw-r--r--sw/source/core/text/pormulti.cxx2
-rw-r--r--sw/source/core/undo/unattr.cxx4
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/core/unocore/unotbl.cxx6
-rw-r--r--sw/source/filter/html/css1atr.cxx4
-rw-r--r--sw/source/filter/html/htmlcss1.cxx4
-rw-r--r--sw/source/filter/html/htmlflywriter.cxx8
-rw-r--r--sw/source/filter/html/htmlgrin.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx10
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx10
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx3
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx6
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx6
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx10
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx16
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx20
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx4
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx10
-rw-r--r--sw/source/filter/xml/xmltbli.cxx8
-rw-r--r--sw/source/filter/xml/xmltexti.cxx2
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx6
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx16
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx2
-rw-r--r--sw/source/ui/table/rowht.cxx6
-rw-r--r--sw/source/uibase/app/appenv.cxx4
-rw-r--r--sw/source/uibase/app/applab.cxx4
-rw-r--r--sw/source/uibase/dialog/regionsw.cxx4
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx2
-rw-r--r--sw/source/uibase/shells/frmsh.cxx6
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx8
-rw-r--r--sw/source/uibase/shells/textidx.cxx2
-rw-r--r--sw/source/uibase/shells/textsh.cxx4
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx2
-rw-r--r--sw/source/uibase/utlui/attrdesc.cxx4
-rw-r--r--sw/source/uibase/utlui/uitool.cxx8
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx4
70 files changed, 220 insertions, 219 deletions
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index e393d3a44ca3..e2c1e999468e 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -32,12 +32,12 @@ class IntlWrapper;
//Frame size.
-enum SwFrameSize
+enum class SwFrameSize
{
- ATT_VAR_SIZE, ///< Frame is variable in Var-direction.
- ATT_FIX_SIZE, ///< Frame cannot be moved in Var-direction.
- ATT_MIN_SIZE /**< Value in Var-direction gives minimum
- (can be exceeded but not be less). */
+ Variable, ///< Frame is variable in Var-direction.
+ Fixed, ///< Frame cannot be moved in Var-direction.
+ Minimum /**< Value in Var-direction gives minimum
+ (can be exceeded but not be less). */
};
class SW_DLLPUBLIC SwFormatFrameSize: public SvxSizeItem
@@ -64,7 +64,7 @@ class SW_DLLPUBLIC SwFormatFrameSize: public SvxSizeItem
bool HasMetrics() const override;
public:
- SwFormatFrameSize( SwFrameSize eSize = ATT_VAR_SIZE,
+ SwFormatFrameSize( SwFrameSize eSize = SwFrameSize::Variable,
SwTwips nWidth = 0, SwTwips nHeight = 0 );
virtual bool operator==( const SfxPoolItem& ) const override;
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 6b4ab938f94c..eac0b40ddcd0 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -225,7 +225,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInBody)
pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
flySet.Put(anchor);
- SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
flySet.Put(size); // set a size, else we get 1 char per line...
SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
CPPUNIT_ASSERT(pFly != nullptr);
@@ -495,7 +495,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInHeader)
pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
flySet.Put(anchor);
- SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
flySet.Put(size); // set a size, else we get 1 char per line...
SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
CPPUNIT_ASSERT(pFly != nullptr);
@@ -767,7 +767,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInFootnote)
SfxItemSet flySet(pDoc->GetAttrPool(),
svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{});
- SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
flySet.Put(size); // set a size, else we get 1 char per line...
SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
@@ -1147,7 +1147,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInFlys)
pWrtShell->Insert("baz");
SfxItemSet flySet(pDoc->GetAttrPool(),
svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{});
- SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
flySet.Put(size); // set a size, else we get 1 char per line...
pWrtShell->StartOfSection(false);
pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
@@ -1611,7 +1611,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysAtFlys)
pWrtShell->Insert("baz");
SfxItemSet flySet(pDoc->GetAttrPool(),
svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{});
- SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
flySet.Put(size); // set a size, else we get 1 char per line...
pWrtShell->StartOfSection(false);
pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 79601dfddcd5..fefd9f3f8df7 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -602,7 +602,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf109376_redline)
SfxItemSet flySet(pDoc->GetAttrPool(),
svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{});
flySet.Put(anchor);
- SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
flySet.Put(size); // set a size, else we get 1 char per line...
SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
CPPUNIT_ASSERT(pFly != nullptr);
@@ -653,7 +653,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf109376)
SfxItemSet flySet(pDoc->GetAttrPool(),
svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{});
flySet.Put(anchor);
- SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ SwFormatFrameSize size(SwFrameSize::Minimum, 1000, 1000);
flySet.Put(size); // set a size, else we get 1 char per line...
SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
CPPUNIT_ASSERT(pFly != nullptr);
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 767af3a22010..d3b0761128dd 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1627,7 +1627,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
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,
+ aSet.Put( SwFormatFrameSize( SwFrameSize::Minimum,
GetMetricVal( CM_1 ) * 3 + GetMetricVal( CM_05 ),
MM50 ));
}
@@ -1774,7 +1774,7 @@ SwPageDesc* DocumentStylePoolManager::GetPageDescFromPool( sal_uInt16 nId, bool
{
Size aPSize( SvxPaperInfo::GetPaperSize( PAPER_ENV_C65 ) );
LandscapeSwap( aPSize );
- aSet.Put( SwFormatFrameSize( ATT_FIX_SIZE, aPSize.Width(), aPSize.Height() ));
+ aSet.Put( SwFormatFrameSize( SwFrameSize::Fixed, aPSize.Width(), aPSize.Height() ));
aLR.SetLeft( 0 ); aLR.SetRight( 0 );
aUL.SetUpper( 0 ); aUL.SetLower( 0 );
aSet.Put( aLR );
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index d1cc84f8d8e3..eccbe3cc1b3a 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -73,7 +73,7 @@ static void lcl_DefaultPageFormat( sal_uInt16 nPoolFormatId,
// The default page size is obtained from the application
//locale
- SwFormatFrameSize aFrameSize( ATT_FIX_SIZE );
+ SwFormatFrameSize aFrameSize( SwFrameSize::Fixed );
const Size aPhysSize = SvxPaperInfo::GetDefaultPaperSize();
aFrameSize.SetSize( aPhysSize );
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 4451115905a8..0735144328d0 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -1094,12 +1094,12 @@ SwChainRet SwDoc::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest )
aSet.Put( aChain );
SwFormatFrameSize aSize( rSource.GetFrameSize() );
- if ( aSize.GetHeightSizeType() != ATT_FIX_SIZE )
+ if ( aSize.GetHeightSizeType() != SwFrameSize::Fixed )
{
SwFlyFrame *pFly = SwIterator<SwFlyFrame,SwFormat>( rSource ).First();
if ( pFly )
aSize.SetHeight( pFly->getFrameArea().Height() );
- aSize.SetHeightSizeType( ATT_FIX_SIZE );
+ aSize.SetHeightSizeType( SwFrameSize::Fixed );
aSet.Put( aSize );
}
SetAttr( aSet, rSource );
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index de177655f7dd..1b0ac762b6a2 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -247,7 +247,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
if( SfxItemState::SET != pFormat->GetAttrSet().GetItemState( RES_FRM_SIZE ))
{
- SwFormatFrameSize aFormatSize( ATT_VAR_SIZE, 0, DEF_FLY_WIDTH );
+ SwFormatFrameSize aFormatSize( SwFrameSize::Variable, 0, DEF_FLY_WIDTH );
const SwNoTextNode* pNoTextNode = rNode.GetNoTextNode();
if( pNoTextNode )
{
@@ -259,7 +259,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
if( aSize.Height() )
{
aFormatSize.SetHeight( aSize.Height() );
- aFormatSize.SetHeightSizeType( ATT_FIX_SIZE );
+ aFormatSize.SetHeightSizeType( SwFrameSize::Fixed );
}
}
pFormat->SetFormatAttr( aFormatSize );
@@ -768,7 +768,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable,
// The new one should be changeable in its height.
std::unique_ptr<SwFormatFrameSize> aFrameSize(static_cast<SwFormatFrameSize*>(pOldFormat->GetFrameSize().Clone()));
- aFrameSize->SetHeightSizeType( ATT_MIN_SIZE );
+ aFrameSize->SetHeightSizeType( SwFrameSize::Minimum );
pNewSet->Put( std::move(aFrameSize) );
SwStartNode* pSttNd = rDoc.GetNodes().MakeTextSection(
@@ -1076,7 +1076,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable
// The new one should be variable in its height!
Size aSz( rSdrObj.GetCurrentBoundRect().GetSize() );
- SwFormatFrameSize aFrameSize( ATT_MIN_SIZE, aSz.Width(), aSz.Height() );
+ SwFormatFrameSize aFrameSize( SwFrameSize::Minimum, aSz.Width(), aSz.Height() );
pNewSet->Put( aFrameSize );
// Apply the margin to the new Frame.
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 73a39fd9f1f9..db14a1d2b681 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -296,7 +296,7 @@ SwDoc::SwDoc()
getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_STANDARD );
// Set to "Empty Page"
- mpEmptyPageFormat->SetFormatAttr( SwFormatFrameSize( ATT_FIX_SIZE ) );
+ mpEmptyPageFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Fixed ) );
// Set BodyFormat for columns
mpColumnContFormat->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT ) );
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 8e6f8ac1d446..9b5defa3b695 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -289,7 +289,7 @@ void SwHTMLTableLayout::SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol,
nFrameWidth += GetColumn( nCol++ )->GetRelColWidth();
// and reset
- pFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nFrameWidth, 0 ));
+ pFrameFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nFrameWidth, 0 ));
}
void SwHTMLTableLayout::GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan,
@@ -1527,7 +1527,7 @@ static void lcl_ResizeBox( const SwTableBox* pBox, SwTwips* pWidth )
SwTwips nWidth = 0;
for( const SwTableLine *pLine : pBox->GetTabLines() )
lcl_ResizeLine( pLine, &nWidth );
- pBox->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 ));
+ pBox->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nWidth, 0 ));
*pWidth = *pWidth + nWidth;
}
else
@@ -1636,7 +1636,7 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail,
SwFrameFormat *pFlyFrameFormat = FindFlyFrameFormat();
if( pFlyFrameFormat )
{
- SwFormatFrameSize aFlyFrameSize( ATT_VAR_SIZE, m_nRelTabWidth, MINLAY );
+ SwFormatFrameSize aFlyFrameSize( SwFrameSize::Variable, m_nRelTabWidth, MINLAY );
if( m_bUseRelWidth )
{
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index dd150db18b2a..3c701ffc52cb 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1053,8 +1053,8 @@ bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
// Respect the Line's height, reset if needed
SwFormatFrameSize aFSz( pInsLine->GetFrameFormat()->GetFrameSize() );
- if ( bSameHeight && ATT_VAR_SIZE == aFSz.GetHeightSizeType() )
- aFSz.SetHeightSizeType( ATT_MIN_SIZE );
+ if ( bSameHeight && SwFrameSize::Variable == aFSz.GetHeightSizeType() )
+ aFSz.SetHeightSizeType( SwFrameSize::Minimum );
bool bChgLineSz = 0 != aFSz.GetHeight() || bSameHeight;
if ( bChgLineSz )
@@ -1196,7 +1196,7 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
aFindFrame.pNewFrameFormat = static_cast<SwTableBoxFormat*>(pSelBox->ClaimFrameFormat());
SwTwips nBoxSz = aFindFrame.pNewFrameFormat->GetFrameSize().GetWidth();
SwTwips nNewBoxSz = nBoxSz / ( nCnt + 1 );
- aFindFrame.pNewFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE,
+ aFindFrame.pNewFrameFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable,
nNewBoxSz, 0 ) );
aFrameArr.insert( aFindFrame );
@@ -1206,7 +1206,7 @@ bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
// We have a remainder, so we need to define an own Format
// for the last Box.
pLastBoxFormat = new SwTableBoxFormat( *aFindFrame.pNewFrameFormat );
- pLastBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE,
+ pLastBoxFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable,
nBoxSz - ( nNewBoxSz * nCnt ), 0 ) );
}
aLastBoxArr.insert( aLastBoxArr.begin() + nFndPos, pLastBoxFormat );
@@ -1311,7 +1311,7 @@ static void lcl_CalcWidth( SwTableBox* pBox )
for( auto pTabBox : pLine->GetTabBoxes() )
nWidth += pTabBox->GetFrameFormat()->GetFrameSize().GetWidth();
- pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 ));
+ pFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nWidth, 0 ));
// Boxes with Lines can only have Size/Fillorder
pFormat->ResetFormatAttr( RES_LR_SPACE, RES_FRMATR_END - 1 );
@@ -2931,10 +2931,10 @@ static void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewH
nMyNewH = long(aTmp);
}
- SwFrameSize eSize = ATT_MIN_SIZE;
+ SwFrameSize eSize = SwFrameSize::Minimum;
if( !bMinSize &&
( nMyOldH - nMyNewH ) > ( CalcRowRstHeight( pLineFrame ) + ROWFUZZY ))
- eSize = ATT_FIX_SIZE;
+ eSize = SwFrameSize::Fixed;
pFormat->SetFormatAttr( SwFormatFrameSize( eSize, 0, nMyNewH ) );
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index c35ca9731936..43528cb67bcc 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -181,7 +181,7 @@ static SwTableBoxFormat *lcl_CreateDfltBoxFormat( SwDoc &rDoc, std::vector<SwTab
{
SwTableBoxFormat* pBoxFormat = rDoc.MakeTableBoxFormat();
if( USHRT_MAX != nCols )
- pBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE,
+ pBoxFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable,
USHRT_MAX / nCols, 0 ));
::lcl_SetDfltBoxAttr( *pBoxFormat, nId );
rBoxFormatArr[ nId ] = pBoxFormat;
@@ -201,7 +201,7 @@ static SwTableBoxFormat *lcl_CreateAFormatBoxFormat( SwDoc &rDoc, std::vector<Sw
SwTableAutoFormatUpdateFlags::Box,
rDoc.GetNumberFormatter( ) );
if( USHRT_MAX != nCols )
- pBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE,
+ pBoxFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable,
USHRT_MAX / nCols, 0 ));
rBoxFormatArr[ nId ] = pBoxFormat;
}
@@ -430,7 +430,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
nWidth /= nCols;
nWidth *= nCols; // to avoid rounding problems
}
- pTableFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth ));
+ pTableFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nWidth ));
if( !(rInsTableOpts.mnInsMode & SwInsertTableFlags::SplitLayout) )
pTableFormat->SetFormatAttr( SwFormatLayoutSplit( false ));
@@ -467,7 +467,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
if( !bDfltBorders && !pTAFormat )
{
pBoxFormat = MakeTableBoxFormat();
- pBoxFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX / nCols, 0 ));
+ pBoxFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, USHRT_MAX / nCols, 0 ));
}
else
{
@@ -524,7 +524,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
*pNewFormat = *pBoxF;
pBoxF = pNewFormat;
}
- pBoxF->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth ));
+ pBoxF->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nWidth ));
}
}
@@ -695,7 +695,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts,
// All Lines have a left-to-right Fill Order
pLineFormat->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT ));
// The Table's SSize is USHRT_MAX
- pTableFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX ));
+ pTableFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, USHRT_MAX ));
if( !(rInsTableOpts.mnInsMode & SwInsertTableFlags::SplitLayout) )
pTableFormat->SetFormatAttr( SwFormatLayoutSplit( false ));
@@ -966,7 +966,7 @@ lcl_SetTableBoxWidths(SwTable & rTable, size_t const nMaxBoxes,
{
SwTableBoxFormat *pNewFormat = rDoc.MakeTableBoxFormat();
pNewFormat->SetFormatAttr(
- SwFormatFrameSize(ATT_VAR_SIZE, (*pPositions)[n] - nLastPos));
+ SwFormatFrameSize(SwFrameSize::Variable, (*pPositions)[n] - nLastPos));
for (size_t nTmpLine = 0; nTmpLine < rLns.size(); ++nTmpLine)
{
// Have to do an Add here, because the BoxFormat
@@ -980,12 +980,12 @@ lcl_SetTableBoxWidths(SwTable & rTable, size_t const nMaxBoxes,
// propagate size upwards from format, so the table gets the right size
SAL_WARN_IF(rBoxFormat.HasWriterListeners(), "sw.core",
"who is still registered in the format?");
- rBoxFormat.SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nLastPos ));
+ rBoxFormat.SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nLastPos ));
}
else
{
size_t nWidth = nMaxBoxes ? USHRT_MAX / nMaxBoxes : USHRT_MAX;
- rBoxFormat.SetFormatAttr(SwFormatFrameSize(ATT_VAR_SIZE, nWidth));
+ rBoxFormat.SetFormatAttr(SwFormatFrameSize(SwFrameSize::Variable, nWidth));
}
}
@@ -1228,7 +1228,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
// All Lines have a left-to-right Fill Order
pLineFormat->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT ));
// The Table's SSize is USHRT_MAX
- pTableFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, USHRT_MAX ));
+ pTableFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, USHRT_MAX ));
/* If the first node in the selection is a context node and if it
has an item FRAMEDIR set (no default) propagate the item to the
@@ -1350,14 +1350,14 @@ lcl_SetTableBoxWidths2(SwTable & rTable, size_t const nMaxBoxes,
// default width for box at the end of an incomplete line
SwTableBoxFormat *const pNewFormat = rDoc.MakeTableBoxFormat();
size_t nWidth = nMaxBoxes ? USHRT_MAX / nMaxBoxes : USHRT_MAX;
- pNewFormat->SetFormatAttr( SwFormatFrameSize(ATT_VAR_SIZE,
+ pNewFormat->SetFormatAttr( SwFormatFrameSize(SwFrameSize::Variable,
nWidth * (nMissing + 1)) );
pNewFormat->Add(rBoxes.back());
}
}
size_t nWidth = nMaxBoxes ? USHRT_MAX / nMaxBoxes : USHRT_MAX;
// default width for all boxes not at the end of an incomplete line
- rBoxFormat.SetFormatAttr(SwFormatFrameSize(ATT_VAR_SIZE, nWidth));
+ rBoxFormat.SetFormatAttr(SwFormatFrameSize(SwFrameSize::Variable, nWidth));
}
SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
@@ -2823,8 +2823,8 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly,
if( nNewSize != aNew.GetHeight() )
{
aNew.SetHeight( nNewSize );
- if ( ATT_VAR_SIZE == aNew.GetHeightSizeType() )
- aNew.SetHeightSizeType( ATT_MIN_SIZE );
+ if ( SwFrameSize::Variable == aNew.GetHeightSizeType() )
+ aNew.SetHeightSizeType( SwFrameSize::Minimum );
// This position must not be in an overlapped box
const SwPosition aPos(*static_cast<const SwTextFrame*>(pContent)->GetTextNodeFirst());
const SwCursor aTmpCursor( aPos, nullptr );
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index c8e9db3c41a8..8fe8c6d0f5c6 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -456,7 +456,7 @@ bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly, const bool
if ( bOptimize )
nHeight = nTotalHeight / aRowArr.size();
- SwFormatFrameSize aNew( ATT_MIN_SIZE, 0, nHeight );
+ SwFormatFrameSize aNew( SwFrameSize::Minimum, 0, nHeight );
if (GetIDocumentUndoRedo().DoesUndo())
{
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index ce770a70bb4f..8137013ab109 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1326,7 +1326,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
SwFrameFormat *pFormat = pChgFly->GetFormat();
SwFormatFrameSize aFrameSz( pFormat->GetFrameSize() );
aFrameSz.SetWidth( aNewSz.Width() );
- if( ATT_MIN_SIZE != aFrameSz.GetHeightSizeType() )
+ if( SwFrameSize::Minimum != aFrameSz.GetHeightSizeType() )
{
aNewSz.AdjustHeight(pChgFly->getFrameArea().Height() -
pFly->getFramePrintArea().Height() );
@@ -1774,7 +1774,7 @@ void SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf )
const long nWidth = rBound.Right() - rBound.Left();
const long nHeight= rBound.Bottom() - rBound.Top();
- aFrameSet.Put( SwFormatFrameSize( ATT_MIN_SIZE,
+ aFrameSet.Put( SwFormatFrameSize( SwFrameSize::Minimum,
std::max( nWidth, long(MINFLY) ),
std::max( nHeight, long(MINFLY) )));
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 8f9d2af42df5..1e2e08a78c5b 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1981,7 +1981,7 @@ bool SwFEShell::ImpEndCreate()
// For OBJ_NONE a fly is inserted.
const long nWidth = rBound.Right() - rBound.Left();
const long nHeight= rBound.Bottom() - rBound.Top();
- aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, std::max( nWidth, long(MINFLY) ),
+ aSet.Put( SwFormatFrameSize( SwFrameSize::Minimum, std::max( nWidth, long(MINFLY) ),
std::max( nHeight, long(MINFLY) )));
SwFormatHoriOrient aHori( nXOffset, text::HoriOrientation::NONE, text::RelOrientation::FRAME );
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index a020bb44170c..cc88ed1d8578 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -1402,7 +1402,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
}
// set width of the box
- (*ppMergeBox)->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 ));
+ (*ppMergeBox)->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nWidth, 0 ));
if( pUndo )
pUndo->AddNewBox( (*ppMergeBox)->GetSttIdx() );
}
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index e214f9752a73..3ee1be7590e3 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -193,7 +193,7 @@ bool SwFormatFrameSize::HasMetrics() const {
SwFormatFrameSize::SwFormatFrameSize( SwFrameSize eSize, SwTwips nWidth, SwTwips nHeight )
: SvxSizeItem( RES_FRM_SIZE, {nWidth, nHeight} ),
m_eFrameHeightType( eSize ),
- m_eFrameWidthType( ATT_FIX_SIZE )
+ m_eFrameWidthType( SwFrameSize::Fixed )
{
m_nWidthPercent = m_eWidthPercentRelation = m_nHeightPercent = m_eHeightPercentRelation = 0;
}
@@ -261,7 +261,7 @@ bool SwFormatFrameSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
rVal <<= static_cast<sal_Int16>(GetHeightSizeType());
break;
case MID_FRMSIZE_IS_AUTO_HEIGHT:
- rVal <<= ATT_FIX_SIZE != GetHeightSizeType();
+ rVal <<= SwFrameSize::Fixed != GetHeightSizeType();
break;
case MID_FRMSIZE_WIDTH_TYPE:
rVal <<= static_cast<sal_Int16>(GetWidthSizeType());
@@ -379,7 +379,7 @@ bool SwFormatFrameSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_FRMSIZE_SIZE_TYPE:
{
sal_Int16 nType = 0;
- if((rVal >>= nType) && nType >= 0 && nType <= ATT_MIN_SIZE )
+ if((rVal >>= nType) && nType >= 0 && nType <= static_cast<int>(SwFrameSize::Minimum) )
{
SetHeightSizeType(static_cast<SwFrameSize>(nType));
}
@@ -390,13 +390,13 @@ bool SwFormatFrameSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_FRMSIZE_IS_AUTO_HEIGHT:
{
bool bSet = *o3tl::doAccess<bool>(rVal);
- SetHeightSizeType(bSet ? ATT_VAR_SIZE : ATT_FIX_SIZE);
+ SetHeightSizeType(bSet ? SwFrameSize::Variable : SwFrameSize::Fixed);
}
break;
case MID_FRMSIZE_WIDTH_TYPE:
{
sal_Int16 nType = 0;
- if((rVal >>= nType) && nType >= 0 && nType <= ATT_MIN_SIZE )
+ if((rVal >>= nType) && nType >= 0 && nType <= static_cast<int>(SwFrameSize::Minimum) )
{
SetWidthSizeType(static_cast<SwFrameSize>(nType));
}
@@ -419,8 +419,8 @@ void SwFormatFrameSize::dumpAsXml(xmlTextWriterPtr pWriter) const
aSize << GetSize();
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("size"), BAD_CAST(aSize.str().c_str()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrameHeightType"), BAD_CAST(OString::number(m_eFrameHeightType).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrameWidthType"), BAD_CAST(OString::number(m_eFrameWidthType).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrameHeightType"), BAD_CAST(OString::number(static_cast<int>(m_eFrameHeightType)).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrameWidthType"), BAD_CAST(OString::number(static_cast<int>(m_eFrameWidthType)).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nWidthPercent"), BAD_CAST(OString::number(m_nWidthPercent).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eWidthPercentRelation"), BAD_CAST(OString::number(m_eWidthPercentRelation).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nHeightPercent"), BAD_CAST(OString::number(m_nHeightPercent).getStr()));
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index ee4cf8f8587a..76ef0c3f7465 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -146,13 +146,13 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
{
SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
aFrm.Width( rFrameSize.GetWidth() );
- aFrm.Height( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE ? MINFLY : rFrameSize.GetHeight() );
+ aFrm.Height( rFrameSize.GetHeightSizeType() == SwFrameSize::Variable ? MINFLY : rFrameSize.GetHeight() );
}
// Fixed or variable Height?
- if ( rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE )
+ if ( rFrameSize.GetHeightSizeType() == SwFrameSize::Minimum )
m_bMinHeight = true;
- else if ( rFrameSize.GetHeightSizeType() == ATT_FIX_SIZE )
+ else if ( rFrameSize.GetHeightSizeType() == SwFrameSize::Fixed )
mbFixSize = true;
// insert columns, if necessary
@@ -559,16 +559,16 @@ bool SwFlyFrame::FrameSizeChg( const SwFormatFrameSize &rFrameSize )
{
bool bRet = false;
SwTwips nDiffHeight = getFrameArea().Height();
- if ( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE )
+ if ( rFrameSize.GetHeightSizeType() == SwFrameSize::Variable )
mbFixSize = m_bMinHeight = false;
else
{
- if ( rFrameSize.GetHeightSizeType() == ATT_FIX_SIZE )
+ if ( rFrameSize.GetHeightSizeType() == SwFrameSize::Fixed )
{
mbFixSize = true;
m_bMinHeight = false;
}
- else if ( rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE )
+ else if ( rFrameSize.GetHeightSizeType() == SwFrameSize::Minimum )
{
mbFixSize = false;
m_bMinHeight = true;
@@ -1309,13 +1309,13 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
OSL_ENSURE( aRelSize == CalcRel( rFrameSz ), "SwFlyFrame::Format CalcRel problem" );
SwTwips nNewSize = aRectFnSet.IsVert() ? aRelSize.Height() : aRelSize.Width();
- if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ if ( rFrameSz.GetWidthSizeType() != SwFrameSize::Fixed )
{
// #i9046# Autowidth for fly frames
const SwTwips nAutoWidth = lcl_CalcAutoWidth( *this );
if ( nAutoWidth )
{
- if( ATT_MIN_SIZE == rFrameSz.GetWidthSizeType() )
+ if( SwFrameSize::Minimum == rFrameSz.GetWidthSizeType() )
nNewSize = std::max( nNewSize - nLR, nAutoWidth );
else
nNewSize = nAutoWidth;
@@ -1922,7 +1922,7 @@ SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst )
// for the lower frame, which initiated this grow.
const bool bOldFormatHeightOnly = m_bFormatHeightOnly;
const SwFormatFrameSize& rFrameSz = GetFormat()->GetFrameSize();
- if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ if ( rFrameSz.GetWidthSizeType() != SwFrameSize::Fixed )
{
m_bFormatHeightOnly = true;
}
@@ -1934,7 +1934,7 @@ SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst )
static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( false );
}
// #i55416#
- if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ if ( rFrameSz.GetWidthSizeType() != SwFrameSize::Fixed )
{
m_bFormatHeightOnly = bOldFormatHeightOnly;
}
@@ -2033,7 +2033,7 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
// for the lower frame, which initiated this shrink.
const bool bOldFormatHeightOnly = m_bFormatHeightOnly;
const SwFormatFrameSize& rFrameSz = GetFormat()->GetFrameSize();
- if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ if ( rFrameSz.GetWidthSizeType() != SwFrameSize::Fixed )
{
m_bFormatHeightOnly = true;
}
@@ -2041,7 +2041,7 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
static_cast<SwFlyFreeFrame*>(this)->SwFlyFreeFrame::MakeAll(getRootFrame()->GetCurrShell()->GetOut());
static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( false );
// #i55416#
- if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ if ( rFrameSz.GetWidthSizeType() != SwFrameSize::Fixed )
{
m_bFormatHeightOnly = bOldFormatHeightOnly;
}
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 4a7030ea241e..f64c5d3a21ab 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -458,7 +458,7 @@ bool SwFlyFreeFrame::HasEnvironmentAutoSize() const
pToBeCheckedFrame->IsRowFrame() ||
pToBeCheckedFrame->IsFlyFrame() )
{
- bRetVal = ATT_FIX_SIZE !=
+ bRetVal = SwFrameSize::Fixed !=
pToBeCheckedFrame->GetAttrSet()->GetFrameSize().GetHeightSizeType();
break;
}
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 9c804b7c1ff8..df90b17b0f11 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -397,7 +397,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE
// the other hand, this is only rarely used and re-calculation of
// the fly frame does not cause too much trouble. So we keep it this
// way:
- if ( ATT_FIX_SIZE != rFrameSz.GetWidthSizeType() )
+ if ( SwFrameSize::Fixed != rFrameSz.GetWidthSizeType() )
{
// #i50668#, #i50998# - invalidation of position
// of as-character anchored fly frames not needed and can cause
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 7c44bc31b57d..fa5e1044fcad 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -41,7 +41,7 @@ static SwTwips lcl_GetFrameMinHeight(const SwLayoutFrame & rFrame)
switch (rSz.GetHeightSizeType())
{
- case ATT_MIN_SIZE:
+ case SwFrameSize::Minimum:
nMinHeight = rSz.GetHeight();
break;
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index a38c784f146f..14193b09d260 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -213,8 +213,8 @@ void SwFrame::CheckDirChange()
SwTableLine* pLine = const_cast<SwTableLine*>(static_cast<SwCellFrame*>(this)->GetTabBox()->GetUpper());
SwFrameFormat* pFrameFormat = pLine->GetFrameFormat();
SwFormatFrameSize aNew( pFrameFormat->GetFrameSize() );
- if ( ATT_FIX_SIZE != aNew.GetHeightSizeType() )
- aNew.SetHeightSizeType( ATT_MIN_SIZE );
+ if ( SwFrameSize::Fixed != aNew.GetHeightSizeType() )
+ aNew.SetHeightSizeType( SwFrameSize::Minimum );
if ( aNew.GetHeight() < MIN_VERT_CELL_HEIGHT )
aNew.SetHeight( MIN_VERT_CELL_HEIGHT );
SwDoc* pDoc = pFrameFormat->GetDoc();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 42150626aa10..ef0d2727fed2 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -534,7 +534,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrame& rTab, SwRowFrame& rLastLine,
{
{
const SwFormatFrameSize &rSz = pTmpLastLineRow->GetFormat()->GetFrameSize();
- if ( rSz.GetHeightSizeType() == ATT_MIN_SIZE )
+ if ( rSz.GetHeightSizeType() == SwFrameSize::Minimum )
nMinHeight = rSz.GetHeight() - lcl_calcHeightOfRowBeforeThisFrame(*pTmpLastLineRow);
}
@@ -3997,12 +3997,12 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrame* _pRow,
const SwFormatFrameSize &rSz = _pRow->GetFormat()->GetFrameSize();
if ( _pRow->HasFixSize() )
{
- OSL_ENSURE(ATT_FIX_SIZE == rSz.GetHeightSizeType(), "pRow claims to have fixed size");
+ OSL_ENSURE(SwFrameSize::Fixed == rSz.GetHeightSizeType(), "pRow claims to have fixed size");
return rSz.GetHeight();
}
// If this row frame is being split, then row's minimal height shouldn't restrict
// this frame's minimal height, because the rest will go to follow frame.
- else if ( !_pRow->IsInSplit() && rSz.GetHeightSizeType() == ATT_MIN_SIZE )
+ else if ( !_pRow->IsInSplit() && rSz.GetHeightSizeType() == SwFrameSize::Minimum )
{
nHeight = rSz.GetHeight() - lcl_calcHeightOfRowBeforeThisFrame(*_pRow);
}
@@ -4555,7 +4555,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
const SwFormatFrameSize &rSz = pMod->GetFrameSize();
SwTwips nMinHeight = 0;
- if (rSz.GetHeightSizeType() == ATT_MIN_SIZE)
+ if (rSz.GetHeightSizeType() == SwFrameSize::Minimum)
nMinHeight = std::max(rSz.GetHeight() - lcl_calcHeightOfRowBeforeThisFrame(*this),
0L);
@@ -4643,7 +4643,7 @@ bool SwRowFrame::IsRowSplitAllowed() const
// Fixed size rows are never allowed to split:
if ( HasFixSize() )
{
- OSL_ENSURE( ATT_FIX_SIZE == GetFormat()->GetFrameSize().GetHeightSizeType(), "pRow claims to have fixed size" );
+ OSL_ENSURE( SwFrameSize::Fixed == GetFormat()->GetFrameSize().GetHeightSizeType(), "pRow claims to have fixed size" );
return false;
}
@@ -5655,10 +5655,10 @@ SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const
SwFormatFrameSize const& rFrameSize(pFirstRow->GetAttrSet()->GetFrameSize());
if ( pFirstRow->GetPrev() &&
static_cast<const SwRowFrame*>(pFirstRow->GetPrev())->IsRowSpanLine()
- && rFrameSize.GetHeightSizeType() != ATT_FIX_SIZE)
+ && rFrameSize.GetHeightSizeType() != SwFrameSize::Fixed)
{
// Calculate maximum height of all cells with rowspan = 1:
- SwTwips nMaxHeight = rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE
+ SwTwips nMaxHeight = rFrameSize.GetHeightSizeType() == SwFrameSize::Minimum
? rFrameSize.GetHeight()
: 0;
const SwCellFrame* pLower2 = static_cast<const SwCellFrame*>(pFirstRow->Lower());
@@ -5692,7 +5692,7 @@ SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const
const SwFormatFrameSize &rSz = pFirstRow->GetFormat()->GetFrameSize();
SwTwips nMinRowHeight = 0;
- if (rSz.GetHeightSizeType() == ATT_MIN_SIZE)
+ if (rSz.GetHeightSizeType() == SwFrameSize::Minimum)
{
nMinRowHeight = std::max(rSz.GetHeight() - lcl_calcHeightOfRowBeforeThisFrame(*pFirstRow),
0L);
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 0775d895143f..272306df1ba3 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1977,8 +1977,8 @@ void SwFrame::ImplInvalidateLineNum()
void SwFrame::ReinitializeFrameSizeAttrFlags()
{
const SwFormatFrameSize &rFormatSize = GetAttrSet()->GetFrameSize();
- if ( ATT_VAR_SIZE == rFormatSize.GetHeightSizeType() ||
- ATT_MIN_SIZE == rFormatSize.GetHeightSizeType())
+ if ( SwFrameSize::Variable == rFormatSize.GetHeightSizeType() ||
+ SwFrameSize::Minimum == rFormatSize.GetHeightSizeType())
{
mbFixSize = false;
if ( GetType() & (SwFrameType::Header | SwFrameType::Footer | SwFrameType::Row) )
@@ -2004,7 +2004,7 @@ void SwFrame::ReinitializeFrameSizeAttrFlags()
}
}
}
- else if ( rFormatSize.GetHeightSizeType() == ATT_FIX_SIZE )
+ else if ( rFormatSize.GetHeightSizeType() == SwFrameSize::Fixed )
{
if( IsVertical() )
ChgSize( Size( rFormatSize.GetWidth(), getFrameArea().Height()));
@@ -2525,7 +2525,7 @@ SwLayoutFrame::SwLayoutFrame(SwFrameFormat *const pFormat, SwFrame *const pSib)
, m_pLower(nullptr)
{
const SwFormatFrameSize &rFormatSize = pFormat->GetFrameSize();
- if ( rFormatSize.GetHeightSizeType() == ATT_FIX_SIZE )
+ if ( rFormatSize.GetHeightSizeType() == SwFrameSize::Fixed )
mbFixSize = true;
}
@@ -3392,7 +3392,7 @@ void SwLayoutFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBord
{
const SwTwips nBorder = nUpper + nLower;
const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize();
- SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ? rSz.GetHeight() : 0;
+ SwTwips nMinHeight = rSz.GetHeightSizeType() == SwFrameSize::Minimum ? rSz.GetHeight() : 0;
do
{
setFrameAreaSizeValid(true);
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index 69b61fd8b447..78d0525e553c 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -570,7 +570,7 @@ std::unique_ptr<SwBoxSelection> SwTable::CollectBoxSelection( const SwPaM& rPam
{
SwFrameFormat* pFormat = newWidth.first->ClaimFrameFormat();
long nNewWidth = pFormat->GetFrameSize().GetWidth() + newWidth.second;
- pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nNewWidth, 0 ) );
+ pFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nNewWidth, 0 ) );
}
}
else
@@ -923,7 +923,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
FindSuperfluousRows_( rBoxes, pFirstLn, pLastLn );
// pNewFormat will be set to the new master box and the overlapped cells
SwFrameFormat* pNewFormat = pMergeBox->ClaimFrameFormat();
- pNewFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, pSel->mnMergeWidth, 0 ) );
+ pNewFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, pSel->mnMergeWidth, 0 ) );
for( size_t nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
{
const SwSelBoxes& rLineBoxes = pSel->maBoxes[nCurrLine];
@@ -936,7 +936,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
// Even this box will be deleted soon,
// we have to correct the width to avoid side effects
SwFrameFormat* pFormat = pBox->ClaimFrameFormat();
- pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, 0, 0 ) );
+ pFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, 0, 0 ) );
}
else
{
@@ -1172,7 +1172,7 @@ void SwTable::InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nRowIdx, sal_uInt16 nCnt
SwTableLine& rLine = *GetTabLines()[ nRowIdx ];
lcl_FillSelBoxes( aBoxes, rLine );
SwFormatFrameSize aFSz( rLine.GetFrameFormat()->GetFrameSize() );
- if( ATT_VAR_SIZE != aFSz.GetHeightSizeType() )
+ if( SwFrameSize::Variable != aFSz.GetHeightSizeType() )
{
SwFrameFormat* pFrameFormat = rLine.ClaimFrameFormat();
long nNewHeight = aFSz.GetHeight() / ( nCnt + 1 );
@@ -1427,7 +1427,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
SwTableLine* pRow = GetTabLines()[ nFirst ];
SwFrameFormat* pRowFormat = pRow->ClaimFrameFormat();
SwFormatFrameSize aFSz( pRowFormat->GetFrameSize() );
- aFSz.SetHeightSizeType( ATT_MIN_SIZE );
+ aFSz.SetHeightSizeType( SwFrameSize::Minimum );
aFSz.SetHeight( *pSplit - nLast );
pRowFormat->SetFormatAttr( aFSz );
nLast = *pSplit;
@@ -1439,7 +1439,7 @@ bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCn
SwTableLine* pRow = GetTabLines()[ nFirst ];
SwFrameFormat* pRowFormat = pRow->ClaimFrameFormat();
SwFormatFrameSize aFSz( pRowFormat->GetFrameSize() );
- aFSz.SetHeightSizeType( ATT_MIN_SIZE );
+ aFSz.SetHeightSizeType( SwFrameSize::Minimum );
aFSz.SetHeight( rCurr - nLast );
pRowFormat->SetFormatAttr( aFSz );
nLast = rCurr;
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 07667486eb5c..545787995612 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -290,7 +290,7 @@ static void lcl_ModifyLines( SwTableLines &rLines, const long nOld,
for(SwFormat* pFormat : rFormatArr)
{
const SwTwips nBox = lcl_MulDiv64<SwTwips>(pFormat->GetFrameSize().GetWidth(), nNew, nOld);
- SwFormatFrameSize aNewBox( ATT_VAR_SIZE, nBox, 0 );
+ SwFormatFrameSize aNewBox( SwFrameSize::Variable, nBox, 0 );
pFormat->LockModify();
pFormat->SetFormatAttr( aNewBox );
pFormat->UnlockModify();
@@ -326,7 +326,7 @@ static void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld,
{
nBox = nWishedSum;
pFormat = rBox.ClaimFrameFormat();
- SwFormatFrameSize aNewBox( ATT_VAR_SIZE, static_cast< SwTwips >(nBox), 0 );
+ SwFormatFrameSize aNewBox( SwFrameSize::Variable, static_cast< SwTwips >(nBox), 0 );
pFormat->LockModify();
pFormat->SetFormatAttr( aNewBox );
pFormat->UnlockModify();
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 340af76d0510..1ef0c04efd86 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -1941,7 +1941,7 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
return false;
const SwTableLine* pLine = static_cast<const SwRowFrame*>(pUpperFrame->GetUpper())->GetTabLine();
const SwFormatFrameSize& rFrameFormatSize = pLine->GetFrameFormat()->GetFrameSize();
- if ( ATT_VAR_SIZE == rFrameFormatSize.GetHeightSizeType() )
+ if ( SwFrameSize::Variable == rFrameFormatSize.GetHeightSizeType() )
pUpperFrame = pPage;
}
if ( pUpperFrame == pPage && !m_pFrame->IsInFootnote() )
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index d09a2c642862..0401f3b4be17 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -347,7 +347,7 @@ void SwUndoFormatAttr::SaveFlyAnchor( const SwFormat * pFormat, bool bSvDrwPt )
Point aPt( static_cast<const SwFrameFormat*>(pFormat)->FindSdrObject()
->GetRelativePos() );
// store old value as attribute, to keep SwUndoFormatAttr small
- m_pOldSet->Put( SwFormatFrameSize( ATT_VAR_SIZE, aPt.X(), aPt.Y() ) );
+ m_pOldSet->Put( SwFormatFrameSize( SwFrameSize::Variable, aPt.X(), aPt.Y() ) );
}
}
@@ -473,7 +473,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
// change of the Contact object by setting the anchor.
pFrameFormat->CallSwClientNotify(sw::RestoreFlyAnchorHint(aDrawSavePt));
// cache the old value again
- m_pOldSet->Put(SwFormatFrameSize(ATT_VAR_SIZE, aDrawOldPt.X(), aDrawOldPt.Y()));
+ m_pOldSet->Put(SwFormatFrameSize(SwFrameSize::Variable, aDrawOldPt.X(), aDrawOldPt.Y()));
}
if (RndStdIds::FLY_AS_CHAR == aNewAnchor.GetAnchorId()) {
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index a516eb30b958..e2c8459da312 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2695,7 +2695,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault()
pPageFormat->SetFormatAttr(aLR);
pPageFormat->SetFormatAttr(aUL);
SwPageDesc* pStdPgDsc = m_pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD);
- std::shared_ptr<SwFormatFrameSize> aFrameSz(std::make_shared<SwFormatFrameSize>(ATT_FIX_SIZE));
+ std::shared_ptr<SwFormatFrameSize> aFrameSz(std::make_shared<SwFormatFrameSize>(SwFrameSize::Fixed));
if(RES_POOLPAGE_STANDARD == rPageDesc.GetPoolFormatId())
{
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 4618136409f2..3844f4de8fd3 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1439,7 +1439,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID)
{
bool bSet = *o3tl::doAccess<bool>(aValue);
- aFrameSize.SetHeightSizeType(bSet ? ATT_VAR_SIZE : ATT_FIX_SIZE);
+ aFrameSize.SetHeightSizeType(bSet ? SwFrameSize::Variable : SwFrameSize::Fixed);
}
else
{
@@ -1495,7 +1495,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName)
const SwFormatFrameSize& rSize = pLn->GetFrameFormat()->GetFrameSize();
if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID)
{
- aRet <<= ATT_VAR_SIZE == rSize.GetHeightSizeType();
+ aRet <<= SwFrameSize::Variable == rSize.GetHeightSizeType();
}
else
aRet <<= static_cast<sal_Int32>(convertTwipToMm100(rSize.GetSize().Height()));
@@ -1998,7 +1998,7 @@ void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc)
GetProperty(FN_TABLE_WIDTH, 0xff, pWidth);
bool bPutSize = pWidth != nullptr;
- SwFormatFrameSize aSz(ATT_VAR_SIZE);
+ SwFormatFrameSize aSz(SwFrameSize::Variable);
if(pWidth)
{
aSz.PutValue(*pWidth, MID_FRMSIZE_WIDTH);
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 093409868ebc..16edd9b97fee 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -2881,10 +2881,10 @@ static Writer& OutCSS1_SwFormatFrameSize( Writer& rWrt, const SfxPoolItem& rHt,
bool bOutHeight = false;
switch( rFSItem.GetHeightSizeType() )
{
- case ATT_FIX_SIZE:
+ case SwFrameSize::Fixed:
bOutHeight = bool(nMode & Css1FrameSize::FixHeight);
break;
- case ATT_MIN_SIZE:
+ case SwFrameSize::Minimum:
bOutHeight = bool(nMode & Css1FrameSize::MinHeight);
break;
default:
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index e7a1827543a6..c0ace59b4801 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -506,7 +506,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
if( rPropInfo.m_eSizeType == SVX_CSS1_STYPE_TWIP )
{
- rMaster.SetFormatAttr( SwFormatFrameSize( ATT_FIX_SIZE, rPropInfo.m_nWidth,
+ rMaster.SetFormatAttr( SwFormatFrameSize( SwFrameSize::Fixed, rPropInfo.m_nWidth,
rPropInfo.m_nHeight ) );
bChanged = true;
}
@@ -2058,7 +2058,7 @@ void SwHTMLParser::SetVarSize( SvxCSS1PropertyInfo const &rPropInfo,
;
}
- SwFormatFrameSize aFrameSize( ATT_MIN_SIZE, nWidth, nHeight );
+ SwFormatFrameSize aFrameSize( SwFrameSize::Minimum, nWidth, nHeight );
aFrameSize.SetWidthPercent( nPrcWidth );
aFrameSize.SetHeightPercent( nPrcHeight );
rFrameItemSet.Put( aFrameSize );
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 61a255d633a3..8558fdab4b43 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -672,11 +672,11 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat,
}
// WIDTH and/or HEIGHT
- // Output ATT_VAR_SIZE/ATT_MIN_SIZE only, if ANYSIZE is set
+ // Output SwFrameSize::Variable/SwFrameSize::Minimum only, if ANYSIZE is set
if( (nFrameOpts & HtmlFrmOpts::Size) &&
SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) &&
( (nFrameOpts & HtmlFrmOpts::AnySize) ||
- ATT_FIX_SIZE == static_cast<const SwFormatFrameSize *>(pItem)->GetHeightSizeType()) )
+ SwFrameSize::Fixed == static_cast<const SwFormatFrameSize *>(pItem)->GetHeightSizeType()) )
{
const SwFormatFrameSize *pFSItem = static_cast<const SwFormatFrameSize *>(pItem);
sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent();
@@ -938,11 +938,11 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma
}
// "width" and/or "height"
- // Only output ATT_VAR_SIZE/ATT_MIN_SIZE if ANYSIZE is set
+ // Only output SwFrameSize::Variable/SwFrameSize::Minimum if ANYSIZE is set
if( (nFrameOptions & HtmlFrmOpts::Size) &&
SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) &&
( (nFrameOptions & HtmlFrmOpts::AnySize) ||
- ATT_FIX_SIZE == static_cast<const SwFormatFrameSize *>(pItem)->GetHeightSizeType()) )
+ SwFrameSize::Fixed == static_cast<const SwFormatFrameSize *>(pItem)->GetHeightSizeType()) )
{
const SwFormatFrameSize *pFSItem = static_cast<const SwFormatFrameSize *>(pItem);
sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent();
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 488edb6dce06..3eb65061e849 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -778,7 +778,7 @@ IMAGE_SETEVENT:
aTwipSz.setHeight( MINFLY );
}
- SwFormatFrameSize aFrameSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() );
+ SwFormatFrameSize aFrameSize( SwFrameSize::Fixed, aTwipSz.Width(), aTwipSz.Height() );
aFrameSize.SetWidthPercent( nPrcWidth );
aFrameSize.SetHeightPercent( nPrcHeight );
aFrameSet.Put( aFrameSize );
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index a0da671de733..30b12aafbdc3 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -233,7 +233,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
}
// set size
- SwFormatFrameSize aFrameSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() );
+ SwFormatFrameSize aFrameSize( SwFrameSize::Fixed, aTwipSz.Width(), aTwipSz.Height() );
aFrameSize.SetWidthPercent( nPrcWidth );
aFrameSize.SetHeightPercent( nPrcHeight );
rFlyItemSet.Put( aFrameSize );
@@ -513,7 +513,7 @@ bool SwHTMLParser::InsertEmbed()
SwAttrSet aAttrSet(pFormat->GetAttrSet());
aAttrSet.ClearItem(RES_CNTNT);
Size aTwipSize(pDevice->PixelToLogic(aSize, MapMode(MapUnit::MapTwip)));
- SwFormatFrameSize aFrameSize(ATT_FIX_SIZE, aTwipSize.Width(), aTwipSize.Height());
+ SwFormatFrameSize aFrameSize(SwFrameSize::Fixed, aTwipSize.Width(), aTwipSize.Height());
aAttrSet.Put(aFrameSize);
pOLENode->GetDoc()->SetFlyFrameAttr(*pFormat, aAttrSet);
return true;
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index a857534e5803..369bd413a521 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -1569,7 +1569,7 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
nRowHeight += GetTopCellSpace( nTopRow ) +
GetBottomCellSpace( nTopRow, 1 );
- pFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_MIN_SIZE, 0, nRowHeight ) );
+ pFrameFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Minimum, 0, nRowHeight ) );
}
if( pBGBrushItem )
@@ -2391,7 +2391,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
(m_pSwTable->GetTabLines())[0]->ClaimFrameFormat();
(m_pSwTable->GetTabLines())[0]->GetFrameFormat()
- ->SetFormatAttr( SwFormatFrameSize( ATT_MIN_SIZE, 0, m_nHeight ) );
+ ->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Minimum, 0, m_nHeight ) );
}
if( GetBGBrush() )
@@ -2414,7 +2414,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
sal_uInt32 nMin = m_xLayoutInfo->GetMin();
if( nMin > USHRT_MAX )
nMin = USHRT_MAX;
- SwFormatFrameSize aFlyFrameSize( ATT_VAR_SIZE, static_cast<SwTwips>(nMin), MINLAY );
+ SwFormatFrameSize aFlyFrameSize( SwFrameSize::Variable, static_cast<SwTwips>(nMin), MINLAY );
aFlyFrameSize.SetWidthPercent( 100 );
m_pContext->GetFrameFormat()->SetFormatAttr( aFlyFrameSize );
bIsInFlyFrame = false;
@@ -2430,7 +2430,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
sal_uInt32 nMax = m_xLayoutInfo->GetMax();
if( nMax > USHRT_MAX )
nMax = USHRT_MAX;
- SwFormatFrameSize aFlyFrameSize( ATT_VAR_SIZE, static_cast<SwTwips>(nMax), MINLAY );
+ SwFormatFrameSize aFlyFrameSize( SwFrameSize::Variable, static_cast<SwTwips>(nMax), MINLAY );
m_pContext->GetFrameFormat()->SetFormatAttr( aFlyFrameSize );
bIsInFlyFrame = false;
}
@@ -3442,7 +3442,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
true );
aFrameSet.Put( SwFormatSurround(eSurround) );
- SwFormatFrameSize aFrameSize( ATT_VAR_SIZE, 20*MM50, MINLAY );
+ SwFormatFrameSize aFrameSize( SwFrameSize::Variable, 20*MM50, MINLAY );
aFrameSize.SetWidthPercent( 100 );
aFrameSet.Put( aFrameSize );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 70a540baf192..643b15b10fbf 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4248,15 +4248,15 @@ void DocxAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTa
const SwFrameFormat * pLineFormat = pTabLine->GetFrameFormat();
const SwFormatFrameSize& rLSz = pLineFormat->GetFrameSize();
- if ( ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight() )
+ if ( SwFrameSize::Variable != rLSz.GetHeightSizeType() && rLSz.GetHeight() )
{
sal_Int32 nHeight = rLSz.GetHeight();
const char *pRule = nullptr;
switch ( rLSz.GetHeightSizeType() )
{
- case ATT_FIX_SIZE: pRule = "exact"; break;
- case ATT_MIN_SIZE: pRule = "atLeast"; break;
+ case SwFrameSize::Fixed: pRule = "exact"; break;
+ case SwFrameSize::Minimum: pRule = "atLeast"; break;
default: break;
}
@@ -7984,14 +7984,14 @@ void DocxAttributeOutput::FormatFrameSize( const SwFormatFrameSize& rSize )
}
else if ( m_rExport.m_bOutFlyFrameAttrs )
{
- if ( rSize.GetWidth() && rSize.GetWidthSizeType() == ATT_FIX_SIZE )
+ if ( rSize.GetWidth() && rSize.GetWidthSizeType() == SwFrameSize::Fixed )
AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(),
FSNS( XML_w, XML_w ), OString::number( rSize.GetWidth( ) ).getStr() );
if ( rSize.GetHeight() )
{
OString sRule( "exact" );
- if ( rSize.GetHeightSizeType() == ATT_MIN_SIZE )
+ if ( rSize.GetHeightSizeType() == SwFrameSize::Minimum )
sRule = OString( "atLeast" );
AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), 2,
FSNS( XML_w, XML_hRule ), sRule.getStr(),
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 8cc14d097fa0..005e50ba5634 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1400,7 +1400,8 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
// AutoSize of the Text Frame.
const SwFormatFrameSize& rSize = rFrameFormat.GetFrameSize();
pFS->singleElementNS(
- XML_a, (rSize.GetHeightSizeType() == ATT_VAR_SIZE ? XML_spAutoFit : XML_noAutofit));
+ XML_a,
+ (rSize.GetHeightSizeType() == SwFrameSize::Variable ? XML_spAutoFit : XML_noAutofit));
pFS->endElementNS(XML_wps, XML_bodyPr);
pFS->endElementNS(XML_wps, XML_wsp);
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 749613fa7cff..8150c14fcd0b 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -817,16 +817,16 @@ void RtfAttributeOutput::TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTabl
const SwFrameFormat* pLineFormat = pTabLine->GetFrameFormat();
const SwFormatFrameSize& rLSz = pLineFormat->GetFrameSize();
- if (ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight())
+ if (SwFrameSize::Variable != rLSz.GetHeightSizeType() && rLSz.GetHeight())
{
sal_Int32 nHeight = 0;
switch (rLSz.GetHeightSizeType())
{
- case ATT_FIX_SIZE:
+ case SwFrameSize::Fixed:
nHeight = -rLSz.GetHeight();
break;
- case ATT_MIN_SIZE:
+ case SwFrameSize::Minimum:
nHeight = rLSz.GetHeight();
break;
default:
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index d2ae4e6e7b19..256020c82a11 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -83,7 +83,7 @@ namespace myImplHelpers
else
{
const SwFormatFrameSize& rSize = rFormat.GetFrameSize();
- if (ATT_VAR_SIZE != rSize.GetHeightSizeType())
+ if (SwFrameSize::Variable != rSize.GetHeightSizeType())
nDist += rSize.GetHeight();
else
{
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 5ed779dcd069..18698337808b 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2205,9 +2205,9 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab
// output line height sprmTDyaRowHeight
long nHeight = 0;
const SwFormatFrameSize& rLSz = pLineFormat->GetFrameSize();
- if ( ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight() )
+ if ( SwFrameSize::Variable != rLSz.GetHeightSizeType() && rLSz.GetHeight() )
{
- if ( ATT_MIN_SIZE == rLSz.GetHeightSizeType() )
+ if ( SwFrameSize::Minimum == rLSz.GetHeightSizeType() )
nHeight = rLSz.GetHeight();
else
nHeight = -rLSz.GetHeight();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 7c7ea52981ac..d7d30eb99773 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3671,7 +3671,7 @@ void WW8AttributeOutput::FormatFrameSize( const SwFormatFrameSize& rSize )
return; // Fly around graphic -> Auto-size
//???? What about percentages ???
- if ( rSize.GetWidth() && rSize.GetWidthSizeType() == ATT_FIX_SIZE)
+ if ( rSize.GetWidth() && rSize.GetWidthSizeType() == SwFrameSize::Fixed)
{
//"sprmPDxaWidth"
m_rWW8Export.InsUInt16( NS_sprm::sprmPDxaWidth );
@@ -3686,8 +3686,8 @@ void WW8AttributeOutput::FormatFrameSize( const SwFormatFrameSize& rSize )
sal_uInt16 nH = 0;
switch ( rSize.GetHeightSizeType() )
{
- case ATT_VAR_SIZE: break;
- case ATT_FIX_SIZE: nH = static_cast<sal_uInt16>(rSize.GetHeight()) & 0x7fff; break;
+ case SwFrameSize::Variable: break;
+ case SwFrameSize::Fixed: nH = static_cast<sal_uInt16>(rSize.GetHeight()) & 0x7fff; break;
default: nH = static_cast<sal_uInt16>(rSize.GetHeight()) | 0x8000; break;
}
m_rWW8Export.InsUInt16( nH );
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 4f46c66e1fed..bacc90a07ecd 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1782,7 +1782,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
const tools::Rectangle& rSnapRect = pSdrObj->GetSnapRect();
// if necessary adapt width and position of the framework: The
// recorded interior is to remain equally large despite thick edges.
- rFlySet.Put( SwFormatFrameSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE,
+ rFlySet.Put( SwFormatFrameSize(bFixSize ? SwFrameSize::Fixed : SwFrameSize::Variable,
rSnapRect.GetWidth() + 2*nOutside,
rSnapRect.GetHeight() + 2*nOutside) );
}
@@ -1790,7 +1790,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
{
SwFormatFrameSize aSize = rFlySet.Get(RES_FRM_SIZE);
- SwFormatFrameSize aNewSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE,
+ SwFormatFrameSize aNewSize(bFixSize ? SwFrameSize::Fixed : SwFrameSize::Variable,
aSize.GetWidth() + 2*nOutside,
aSize.GetHeight() + 2*nOutside);
aNewSize.SetWidthSizeType(aSize.GetWidthSizeType());
@@ -2980,8 +2980,8 @@ SwFlyFrameFormat* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
tools::Rectangle aInnerDist(pRecord->nDxTextLeft, pRecord->nDyTextTop,
pRecord->nDxTextRight, pRecord->nDyTextBottom);
- SwFormatFrameSize aFrameSize(ATT_FIX_SIZE, pF->nXaRight - pF->nXaLeft, pF->nYaBottom - pF->nYaTop);
- aFrameSize.SetWidthSizeType(pRecord->bAutoWidth ? ATT_VAR_SIZE : ATT_FIX_SIZE);
+ SwFormatFrameSize aFrameSize(SwFrameSize::Fixed, pF->nXaRight - pF->nXaLeft, pF->nYaBottom - pF->nYaTop);
+ aFrameSize.SetWidthSizeType(pRecord->bAutoWidth ? SwFrameSize::Variable : SwFrameSize::Fixed);
rFlySet.Put(aFrameSize);
MatchSdrItemsIntoFlySet( rpObject, rFlySet, pRecord->eLineStyle,
@@ -3096,7 +3096,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
ProcessEscherAlign(pRecord, pF, rFlySet);
- rFlySet.Put(SwFormatFrameSize(ATT_FIX_SIZE, nWidthTw, nHeightTw));
+ rFlySet.Put(SwFormatFrameSize(SwFrameSize::Fixed, nWidthTw, nHeightTw));
SfxItemSet aGrSet(m_rDoc.GetAttrPool(), svl::Items<RES_GRFATR_BEGIN, RES_GRFATR_END-1>{});
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index e0a723aa4f64..809d587eefda 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -357,7 +357,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD,
aAnchor.SetAnchor(m_pPaM->GetPoint());
aFlySet.Put(aAnchor);
- aFlySet.Put( SwFormatFrameSize( ATT_FIX_SIZE, nWidth, nHeight ) );
+ aFlySet.Put( SwFormatFrameSize( SwFrameSize::Fixed, nWidth, nHeight ) );
SwFlyFrameFormat *const pFlyFormat =
m_rDoc.getIDocumentContentOperations().InsertGraphic(
@@ -609,7 +609,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj const * pTextObj,
// Set the size from the WinWord PIC-structure as graphic
// size
- aAttrSet.Put( SwFormatFrameSize( ATT_FIX_SIZE, aPD.nWidth,
+ aAttrSet.Put( SwFormatFrameSize( SwFrameSize::Fixed, aPD.nWidth,
aPD.nHeight ) );
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b1cf6ac76796..2af0bee27c66 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2211,8 +2211,8 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(WW8_CP nStart, WW8_CP nLen,
SwFormatAnchor aAnch( pFrame->GetAnchor() );
aAnch.SetType( RndStdIds::FLY_AT_PARA );
pFrame->SetFormatAttr( aAnch );
- SwFormatFrameSize aSz(ATT_MIN_SIZE, nPageWidth, MINLAY);
- SwFrameSize eFrameSize = ATT_MIN_SIZE;
+ SwFormatFrameSize aSz(SwFrameSize::Minimum, nPageWidth, MINLAY);
+ SwFrameSize eFrameSize = SwFrameSize::Minimum;
if( eFrameSize != aSz.GetWidthSizeType() )
aSz.SetWidthSizeType( eFrameSize );
pFrame->SetFormatAttr(aSz);
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 9bedca2caee7..505a372d27b6 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2369,7 +2369,7 @@ void WW8TabDesc::SetSizePosition(SwFrameFormat* pFrameFormat)
if (pFrameFormat)
{
SwFormatFrameSize aSize = pFrameFormat->GetFrameSize();
- aSize.SetHeightSizeType(ATT_MIN_SIZE);
+ aSize.SetHeightSizeType(SwFrameSize::Minimum);
aSize.SetHeight(MINLAY);
pFrameFormat->SetFormatAttr(aSize);
m_pTable->GetFrameFormat()->SetFormatAttr(SwFormatHoriOrient(0,text::HoriOrientation::FULL));
@@ -2477,7 +2477,7 @@ void WW8TabDesc::CreateSwTable()
// total width of table
if( m_nMaxRight - m_nMinLeft > MINLAY * m_nDefaultSwCols )
{
- SwFormatFrameSize aFrameSize(ATT_FIX_SIZE, m_nSwWidth);
+ SwFormatFrameSize aFrameSize(SwFrameSize::Fixed, m_nSwWidth);
// Don't set relative width if the table has been converted into a floating frame
if ( m_nPercentWidth && (!m_pIo->m_xSFlyPara || !m_pIo->m_xSFlyPara->pFlyFormat) )
aFrameSize.SetWidthPercent(m_nPercentWidth);
@@ -2774,7 +2774,7 @@ void WW8TabDesc::FinishSwTable()
if((1 < groupIt->size()) && groupIt->row(0)[0])
{
SwFrameFormat* pNewFormat = groupIt->row(0)[0]->ClaimFrameFormat();
- pNewFormat->SetFormatAttr(SwFormatFrameSize(ATT_VAR_SIZE, groupIt->nGroupWidth, 0));
+ pNewFormat->SetFormatAttr(SwFormatFrameSize(SwFrameSize::Variable, groupIt->nGroupWidth, 0));
const sal_uInt16 nRowSpan = groupIt->rowsCount();
for (sal_uInt16 n = 0; n < nRowSpan; ++n)
{
@@ -2792,7 +2792,7 @@ void WW8TabDesc::FinishSwTable()
else
{
SwFrameFormat* pFormat = pCurrentBox->ClaimFrameFormat();
- pFormat->SetFormatAttr(SwFormatFrameSize(ATT_VAR_SIZE, 0, 0));
+ pFormat->SetFormatAttr(SwFormatFrameSize(SwFrameSize::Variable, 0, 0));
}
}
}
@@ -3159,15 +3159,15 @@ void WW8TabDesc::AdjustNewBand()
if( m_bClaimLineFormat )
{
m_pTabLine->ClaimFrameFormat(); // necessary because of cell height
- SwFormatFrameSize aF( ATT_MIN_SIZE, 0, 0 ); // default
+ SwFormatFrameSize aF( SwFrameSize::Minimum, 0, 0 ); // default
if (m_pActBand->nLineHeight == 0) // 0 = Auto
- aF.SetHeightSizeType( ATT_VAR_SIZE );
+ aF.SetHeightSizeType( SwFrameSize::Variable );
else
{
if (m_pActBand->nLineHeight < 0) // positive = min, negative = exact
{
- aF.SetHeightSizeType(ATT_FIX_SIZE);
+ aF.SetHeightSizeType(SwFrameSize::Fixed);
m_pActBand->nLineHeight = -m_pActBand->nLineHeight;
}
if (m_pActBand->nLineHeight < MINLAY) // invalid cell height
@@ -3190,7 +3190,7 @@ void WW8TabDesc::AdjustNewBand()
short i; // SW-Index
short j; // WW-Index
short nW; // Width
- SwFormatFrameSize aFS( ATT_FIX_SIZE );
+ SwFormatFrameSize aFS( SwFrameSize::Fixed );
j = m_pActBand->bLEmptyCol ? -1 : 0;
for( i = 0; i < m_pActBand->nSwCols; i++ )
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index ceaed401a577..581153ae3673 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -277,7 +277,7 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
const Size aSizeTwip = OutputDevice::LogicToLogic(
aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MapMode(MapUnit::MapTwip));
- pTempSet->Put( SwFormatFrameSize( ATT_FIX_SIZE, aSizeTwip.Width(),
+ pTempSet->Put( SwFormatFrameSize( SwFrameSize::Fixed, aSizeTwip.Width(),
aSizeTwip.Height() ) );
pTempSet->Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 67ed6c321c21..912b099ed233 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -647,7 +647,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrameFormat &rFormat,
SvxULSpaceItem aHdUL(pHdFormat->GetULSpace());
if (!rSection.IsFixedHeightHeader()) //normal
{
- pHdFormat->SetFormatAttr(SwFormatFrameSize(ATT_MIN_SIZE, 0, rData.nSwHLo));
+ pHdFormat->SetFormatAttr(SwFormatFrameSize(SwFrameSize::Minimum, 0, rData.nSwHLo));
// #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
aHdUL.SetLower( writer_cast<sal_uInt16>(rData.nSwHLo - cMinHdFtHeight) );
@@ -658,7 +658,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrameFormat &rFormat,
{
// #i48832# - set correct spacing between header and body.
const sal_Int32 nHdLowerSpace( std::abs(rSection.maSep.dyaTop) - rData.nSwUp - rData.nSwHLo );
- pHdFormat->SetFormatAttr(SwFormatFrameSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace));
+ pHdFormat->SetFormatAttr(SwFormatFrameSize(SwFrameSize::Fixed, 0, rData.nSwHLo + nHdLowerSpace));
aHdUL.SetLower( static_cast< sal_uInt16 >(nHdLowerSpace) );
pHdFormat->SetFormatAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -674,7 +674,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrameFormat &rFormat,
SvxULSpaceItem aFtUL(pFtFormat->GetULSpace());
if (!rSection.IsFixedHeightFooter()) //normal
{
- pFtFormat->SetFormatAttr(SwFormatFrameSize(ATT_MIN_SIZE, 0, rData.nSwFUp));
+ pFtFormat->SetFormatAttr(SwFormatFrameSize(SwFrameSize::Minimum, 0, rData.nSwFUp));
// #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
aFtUL.SetUpper( writer_cast<sal_uInt16>(rData.nSwFUp - cMinHdFtHeight) );
@@ -685,7 +685,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrameFormat &rFormat,
{
// #i48832# - set correct spacing between footer and body.
const SwTwips nFtUpperSpace( std::abs(rSection.maSep.dyaBottom) - rData.nSwLo - rData.nSwFUp );
- pFtFormat->SetFormatAttr(SwFormatFrameSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace));
+ pFtFormat->SetFormatAttr(SwFormatFrameSize(SwFrameSize::Fixed, 0, rData.nSwFUp + nFtUpperSpace));
aFtUL.SetUpper( static_cast< sal_uInt16 >(nFtUpperSpace) );
pFtFormat->SetFormatAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -1875,7 +1875,7 @@ nLoMgn(rWW.nLoMgn),
nWidth(rWW.nSp28),
nHeight(rWW.nSp45),
nNetWidth(rWW.nSp28),
-eHeightFix(ATT_FIX_SIZE),
+eHeightFix(SwFrameSize::Fixed),
eHRel(text::RelOrientation::PAGE_FRAME),
eVRel(text::RelOrientation::FRAME),
eVAlign(text::VertOrientation::NONE),
@@ -1902,12 +1902,12 @@ bToggelPos(false)
if( nHeight & 0x8000 )
{
nHeight &= 0x7fff;
- eHeightFix = ATT_MIN_SIZE;
+ eHeightFix = SwFrameSize::Minimum;
}
if( nHeight <= MINFLY )
{ // no data, or bad data
- eHeightFix = ATT_MIN_SIZE;
+ eHeightFix = SwFrameSize::Minimum;
nHeight = MINFLY;
}
@@ -2205,7 +2205,7 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM,
aSizeArray[WW8_BOT]*=2;
}
- Put( SwFormatFrameSize( ATT_FIX_SIZE, nWidth+aSizeArray[WW8_LEFT]+
+ Put( SwFormatFrameSize( SwFrameSize::Fixed, nWidth+aSizeArray[WW8_LEFT]+
aSizeArray[WW8_RIGHT], nHeight+aSizeArray[WW8_TOP]
+ aSizeArray[WW8_BOT]) );
}
@@ -2338,7 +2338,7 @@ SwTwips SwWW8ImplReader::MoveOutsideFly(SwFrameFormat *pFlyFormat,
if (pTableFormat)
{
SwFormatFrameSize aSize = pTableFormat->GetFrameSize();
- aSize.SetHeightSizeType(ATT_MIN_SIZE);
+ aSize.SetHeightSizeType(SwFrameSize::Minimum);
aSize.SetHeight(MINLAY);
pFlyFormat->SetFormatAttr(aSize);
SwFormatHoriOrient aHori = pTableFormat->GetHoriOrient();
@@ -2703,7 +2703,7 @@ void SwWW8ImplReader::StopApo()
nNewWidth = ItemGet<SwFormatFrameSize>(aFlySet, RES_FRM_SIZE).GetWidth();
aSize.SetWidth(nNewWidth);
- aSize.SetWidthSizeType(ATT_VAR_SIZE);
+ aSize.SetWidthSizeType(SwFrameSize::Variable);
m_xSFlyPara->pFlyFormat->SetFormatAttr(aSize);
}
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index bab3f526a9a4..0017ea7e0076 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -1055,11 +1055,11 @@ bool SvXMLExportItemMapper::QueryXMLValue(
}
break;
case MID_FRMSIZE_MIN_HEIGHT:
- if( ATT_MIN_SIZE == rFrameSize.GetHeightSizeType() )
+ if( SwFrameSize::Minimum == rFrameSize.GetHeightSizeType() )
bOutHeight = true;
break;
case MID_FRMSIZE_FIX_HEIGHT:
- if( ATT_FIX_SIZE == rFrameSize.GetHeightSizeType() )
+ if( SwFrameSize::Fixed == rFrameSize.GetHeightSizeType() )
bOutHeight = true;
break;
}
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 4db664b1c84c..c1b550596e8b 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -830,7 +830,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
bool bSetHeight = false;
bool bSetWidth = false;
bool bSetSizeType = false;
- SwFrameSize eSizeType = ATT_VAR_SIZE;
+ SwFrameSize eSizeType = SwFrameSize::Variable;
sal_Int32 nMin = MINLAY;
switch( nMemberId )
@@ -854,19 +854,19 @@ bool SvXMLImportItemMapper::PutXMLValue(
bSetWidth = true;
break;
case MID_FRMSIZE_MIN_HEIGHT:
- eSizeType = ATT_MIN_SIZE;
+ eSizeType = SwFrameSize::Minimum;
bSetHeight = true;
nMin = 1;
bSetSizeType = true;
break;
case MID_FRMSIZE_FIX_HEIGHT:
- eSizeType = ATT_FIX_SIZE;
+ eSizeType = SwFrameSize::Fixed;
bSetHeight = true;
nMin = 1;
bSetSizeType = true;
break;
case MID_FRMSIZE_COL_WIDTH:
- eSizeType = ATT_FIX_SIZE;
+ eSizeType = SwFrameSize::Fixed;
bSetWidth = true;
bSetSizeType = true;
break;
@@ -882,7 +882,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
nValue = SAL_MAX_UINT16;
rFrameSize.SetWidth( static_cast<sal_uInt16>(nValue) );
- rFrameSize.SetHeightSizeType( ATT_VAR_SIZE );
+ rFrameSize.SetHeightSizeType( SwFrameSize::Variable );
bOk = true;
}
}
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 5873e9a6bf19..044e2e427ad4 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -790,7 +790,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
{
const SwFormatFrameSize *pSize = static_cast<const SwFormatFrameSize *>(pItem);
nWidth = pSize->GetWidth();
- bRelWidth = ATT_VAR_SIZE == pSize->GetHeightSizeType();
+ bRelWidth = SwFrameSize::Variable == pSize->GetHeightSizeType();
}
}
@@ -1884,7 +1884,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper,
pFrameFormat->ResetAllFormatAttr(); // #i73790# - method renamed
pFrameFormat->SetFormatAttr( aFillOrder );
- pFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nColWidth ) );
+ pFrameFormat->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nColWidth ) );
SwTableLines& rLines = pBox->GetTabLines();
bool bSplitted = false;
@@ -2132,7 +2132,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
if (! bModifyLocked)
pBoxFormat2->UnlockModify();
- pBoxFormat2->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nColWidth ) );
+ pBoxFormat2->SetFormatAttr( SwFormatFrameSize( SwFrameSize::Variable, nColWidth ) );
return pBox;
}
@@ -2750,7 +2750,7 @@ void SwXMLTableContext::MakeTable()
// This must be after the call to MakeTable_, because nWidth might be
// changed there.
pFrameFormat->LockModify();
- SwFormatFrameSize aSize( ATT_VAR_SIZE, m_nWidth );
+ SwFormatFrameSize aSize( SwFrameSize::Variable, m_nWidth );
aSize.SetWidthPercent( nPrcWidth );
pFrameFormat->SetFormatAttr( aSize );
pFrameFormat->UnlockModify();
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index dac99fc9c7ac..383ab6f256ad 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -110,7 +110,7 @@ static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet,
nHeight = convertMm100ToTwip( nHeight );
if( nHeight < MINFLY )
nHeight = MINFLY;
- rItemSet.Put( SwFormatFrameSize( ATT_FIX_SIZE, nWidth, nHeight ) );
+ rItemSet.Put( SwFormatFrameSize( SwFrameSize::Fixed, nWidth, nHeight ) );
}
SwFormatAnchor aAnchor( RndStdIds::FLY_AT_CHAR );
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 8a2dcf3f6766..36be306896bf 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -274,7 +274,7 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame(
else
aSet.Put(SwFormatHoriOrient( rDestination.X(), text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ));
aSet.Put(SwFormatVertOrient( rDestination.Y(), text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ));
- aSet.Put(SwFormatFrameSize( ATT_MIN_SIZE, DEFAULT_ADDRESS_WIDTH, DEFAULT_ADDRESS_HEIGHT ));
+ aSet.Put(SwFormatFrameSize( SwFrameSize::Minimum, DEFAULT_ADDRESS_WIDTH, DEFAULT_ADDRESS_HEIGHT ));
// the example gets a border around the frame, the real document doesn't get one
if(!bExample)
aSet.Put(SvxBoxItem( RES_BOX ));
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index e4147262859e..a95e184de1a1 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1048,7 +1048,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OptionsHdl, weld::Button&, void)
if (!nWidth)
nWidth = USHRT_MAX;
- aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth));
+ aSet.Put(SwFormatFrameSize(SwFrameSize::Variable, nWidth));
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
SwSectionPropertyTabDialog aTabDlg(m_xDialog.get(), aSet, rSh);
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index e90d25598b0a..0fbe9f09d819 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -239,17 +239,17 @@ void SwColumnDlg::ObjectHdl(const weld::ComboBox* pBox)
case LISTBOX_SELECTION :
pSet = m_pSelectionSet.get();
if( m_pSelectionSet )
- pSet->Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth, nWidth));
+ pSet->Put(SwFormatFrameSize(SwFrameSize::Variable, nWidth, nWidth));
break;
case LISTBOX_SECTION :
case LISTBOX_SECTIONS :
pSet = m_pSectionSet.get();
- pSet->Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth, nWidth));
+ pSet->Put(SwFormatFrameSize(SwFrameSize::Variable, nWidth, nWidth));
break;
case LISTBOX_PAGE :
nWidth = m_nPageWidth;
pSet = m_pPageSet.get();
- pSet->Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth, nWidth));
+ pSet->Put(SwFormatFrameSize(SwFrameSize::Variable, nWidth, nWidth));
break;
case LISTBOX_FRAME:
pSet = m_pFrameSet;
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 89ddff3aa9c4..f83dd0232525 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1196,13 +1196,13 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet)
{
if (m_xAutoHeightCB->get_state_changed_from_saved())
{
- SwFrameSize eFrameSize = m_xAutoHeightCB->get_active()? ATT_MIN_SIZE : ATT_FIX_SIZE;
+ SwFrameSize eFrameSize = m_xAutoHeightCB->get_active()? SwFrameSize::Minimum : SwFrameSize::Fixed;
if( eFrameSize != aSz.GetHeightSizeType() )
aSz.SetHeightSizeType(eFrameSize);
}
if (m_xAutoWidthCB->get_state_changed_from_saved())
{
- SwFrameSize eFrameSize = m_xAutoWidthCB->get_active()? ATT_MIN_SIZE : ATT_FIX_SIZE;
+ SwFrameSize eFrameSize = m_xAutoWidthCB->get_active()? SwFrameSize::Minimum : SwFrameSize::Fixed;
if( eFrameSize != aSz.GetWidthSizeType() )
aSz.SetWidthSizeType( eFrameSize );
}
@@ -1217,8 +1217,8 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet)
(aSz.GetWidth() > 0 || aSz.GetWidthPercent() > 0) &&
(aSz.GetHeight() > 0 || aSz.GetHeightPercent() > 0)))
{
- if (aSz.GetHeightSizeType() == ATT_VAR_SIZE) // there is no VAR_SIZE in frames
- aSz.SetHeightSizeType(ATT_MIN_SIZE);
+ if (aSz.GetHeightSizeType() == SwFrameSize::Variable) // there is no VAR_SIZE in frames
+ aSz.SetHeightSizeType(SwFrameSize::Minimum);
bRet |= nullptr != rSet->Put( aSz );
}
@@ -2163,17 +2163,17 @@ void SwFramePage::Init(const SfxItemSet& rSet)
if (!IsInGraficMode())
{
SwFrameSize eSize = rSize.GetHeightSizeType();
- bool bCheck = eSize != ATT_FIX_SIZE;
+ bool bCheck = eSize != SwFrameSize::Fixed;
m_xAutoHeightCB->set_active(bCheck);
HandleAutoCB( bCheck, *m_xHeightFT, *m_xHeightAutoFT, *m_xWidthED->get() );
- if( eSize == ATT_VAR_SIZE )
+ if( eSize == SwFrameSize::Variable )
m_xHeightED->set_value(m_xHeightED->get_min());
eSize = rSize.GetWidthSizeType();
- bCheck = eSize != ATT_FIX_SIZE;
+ bCheck = eSize != SwFrameSize::Fixed;
m_xAutoWidthCB->set_active(bCheck);
HandleAutoCB( bCheck, *m_xWidthFT, *m_xWidthAutoFT, *m_xWidthED->get() );
- if( eSize == ATT_VAR_SIZE )
+ if( eSize == SwFrameSize::Variable )
m_xWidthED->set_value(m_xWidthED->get_min());
if ( !m_bFormat )
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 46deb3d0f602..33a95f2cca83 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -393,7 +393,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
const SwFormatVertOrient& rVert = rSet.Get(RES_VERT_ORIENT);
aVal.nAnchorType = m_nAnchorId;
- aVal.bAutoHeight = rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE;
+ aVal.bAutoHeight = rFrameSize.GetHeightSizeType() == SwFrameSize::Minimum;
aVal.bMirror = rHori.IsPosToggle();
// #i18732#
aVal.bFollowTextFlow = rSet.Get(RES_FOLLOW_TEXT_FLOW).GetValue();
diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx
index 6e0b4809969d..778f9272608d 100644
--- a/sw/source/ui/table/rowht.cxx
+++ b/sw/source/ui/table/rowht.cxx
@@ -38,9 +38,9 @@
void SwTableHeightDlg::Apply()
{
SwTwips nHeight = static_cast< SwTwips >(m_xHeightEdit->denormalize(m_xHeightEdit->get_value(FieldUnit::TWIP)));
- SwFormatFrameSize aSz(ATT_FIX_SIZE, 0, nHeight);
+ SwFormatFrameSize aSz(SwFrameSize::Fixed, 0, nHeight);
- SwFrameSize eFrameSize = m_xAutoHeightCB->get_active() ? ATT_MIN_SIZE : ATT_FIX_SIZE;
+ SwFrameSize eFrameSize = m_xAutoHeightCB->get_active() ? SwFrameSize::Minimum : SwFrameSize::Fixed;
if(eFrameSize != aSz.GetHeightSizeType())
{
aSz.SetHeightSizeType(eFrameSize);
@@ -63,7 +63,7 @@ SwTableHeightDlg::SwTableHeightDlg(weld::Window *pParent, SwWrtShell &rS)
if (pSz)
{
auto nHeight = pSz->GetHeight();
- m_xAutoHeightCB->set_active(pSz->GetHeightSizeType() != ATT_FIX_SIZE);
+ m_xAutoHeightCB->set_active(pSz->GetHeightSizeType() != SwFrameSize::Fixed);
m_xHeightEdit->set_value(m_xHeightEdit->normalize(nHeight), FieldUnit::TWIP);
}
}
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index 23eb98f8d0ec..b99799d380ad 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -381,7 +381,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pDesc->SetUseOn(UseOnPage::All);
// Page size
- rFormat.SetFormatAttr(SwFormatFrameSize(ATT_FIX_SIZE,
+ rFormat.SetFormatAttr(SwFormatFrameSize(SwFrameSize::Fixed,
nPageW + lLeft, nPageH + lUpper));
// Set type of page numbering
@@ -410,7 +410,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Insert Frame
SwFlyFrameAttrMgr aMgr(false, pSh, Frmmgr_Type::ENVELP);
SwFieldMgr aFieldMgr;
- aMgr.SetHeightSizeType(ATT_VAR_SIZE);
+ aMgr.SetHeightSizeType(SwFrameSize::Variable);
// Overwrite defaults!
aMgr.GetAttrSet().Put( SvxBoxItem(RES_BOX) );
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index cf07dc9728c3..a72d7a591cba 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -257,7 +257,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
long lPgWidth, lPgHeight;
lPgWidth = std::max<sal_Int32>(rItem.m_lPWidth, MINLAY);
lPgHeight = std::max<sal_Int32>(rItem.m_lPHeight, MINLAY);
- rFormat.SetFormatAttr( SwFormatFrameSize( ATT_FIX_SIZE, lPgWidth, lPgHeight ));
+ rFormat.SetFormatAttr( SwFormatFrameSize( SwFrameSize::Fixed, lPgWidth, lPgHeight ));
// Numbering type
SvxNumberType aType;
aType.SetNumberingType(SVX_NUM_NUMBER_NONE);
@@ -287,7 +287,7 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
sal_Int32 iResultHeight = rItem.m_lUpper + (rItem.m_nRows - 1) * rItem.m_lVDist + rItem.m_lHeight - rItem.m_lPHeight;
sal_Int32 iWidth = (iResultWidth > 0 ? rItem.m_lWidth - (iResultWidth / rItem.m_nCols) - 1 : rItem.m_lWidth);
sal_Int32 iHeight = (iResultHeight > 0 ? rItem.m_lHeight - (iResultHeight / rItem.m_nRows) - 1 : rItem.m_lHeight);
- SwFormatFrameSize aFrameSize( ATT_FIX_SIZE, iWidth, iHeight );
+ SwFormatFrameSize aFrameSize( SwFrameSize::Fixed, iWidth, iHeight );
pFormat->SetFormatAttr( aFrameSize );
//frame represents label itself, no border space
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index 40b20a9c268a..2aa3c5a93b22 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -76,7 +76,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
rSh.CalcBoundRect(aRect, RndStdIds::FLY_AS_CHAR);
long nWidth = aRect.Width();
- aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth));
+ aSet.Put(SwFormatFrameSize(SwFrameSize::Variable, nWidth));
// height=width for more consistent preview (analog to edit region)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
@@ -186,7 +186,7 @@ void SwWrtShell::StartInsertRegionDialog(const SwSectionData& rSectionData)
SwRect aRect;
CalcBoundRect(aRect, RndStdIds::FLY_AS_CHAR);
long nWidth = aRect.Width();
- aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth));
+ aSet.Put(SwFormatFrameSize(SwFrameSize::Variable, nWidth));
// height=width for more consistent preview (analog to edit region)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index e09d42623ee1..ba631be77816 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -82,7 +82,7 @@ SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, Frmmgr_Type nT
default: nId=0; break;
}
m_aSet.SetParent( &m_pOwnSh->GetFormatFromPool( nId )->GetAttrSet());
- m_aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, DFLT_WIDTH, DFLT_HEIGHT ));
+ m_aSet.Put( SwFormatFrameSize( SwFrameSize::Minimum, DFLT_WIDTH, DFLT_HEIGHT ));
if ( 0 != ::GetHtmlMode(pSh->GetView().GetDocShell()) )
m_aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::PRINT_AREA ) );
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index be2997a8a5db..f3df5d011fb6 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -499,12 +499,12 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
const SwRect &rPg = rSh.GetAnyCurRect(CurRectType::Page);
- SwFormatFrameSize aFrameSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height());
+ SwFormatFrameSize aFrameSize(SwFrameSize::Variable, rPg.Width(), rPg.Height());
aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE));
aSet.Put(aFrameSize);
const SwRect &rPr = rSh.GetAnyCurRect(CurRectType::PagePrt);
- SwFormatFrameSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height());
+ SwFormatFrameSize aPrtSize(SwFrameSize::Variable, rPr.Width(), rPr.Height());
aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA));
aSet.Put(aPrtSize);
@@ -867,7 +867,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
if (pFormat)
{
const SwFormatFrameSize& rFrameSz = pFormat->GetFrameSize();
- if (rFrameSz.GetHeightSizeType() != ATT_FIX_SIZE)
+ if (rFrameSz.GetHeightSizeType() != SwFrameSize::Fixed)
{
rSet.DisableItem( nWhich );
break;
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 13cd9a22b4ad..98e3606f152a 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -316,7 +316,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
const SwRect* pRect = &rSh.GetAnyCurRect(CurRectType::Page);
- SwFormatFrameSize aFrameSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height());
+ SwFormatFrameSize aFrameSize( SwFrameSize::Variable, pRect->Width(), pRect->Height());
aFrameSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) );
aSet.Put( aFrameSize );
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 073fe280c924..2c292bd9b72e 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -375,7 +375,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
}
else
{
- SwFormatFrameSize aSz( ATT_VAR_SIZE, nWidth );
+ SwFormatFrameSize aSz( SwFrameSize::Variable, nWidth );
if(pRep->GetWidthPercent())
{
aSz.SetWidthPercent( static_cast<sal_uInt8>(pRep->GetWidthPercent()) );
@@ -1126,8 +1126,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
std::unique_ptr<SwFormatFrameSize> pHeight = rSh.GetRowHeight();
if ( pHeight )
{
- if (pHeight->GetHeightSizeType() == ATT_VAR_SIZE)
- pHeight->SetHeightSizeType(ATT_MIN_SIZE);
+ if (pHeight->GetHeightSizeType() == SwFrameSize::Variable)
+ pHeight->SetHeightSizeType(SwFrameSize::Minimum);
pHeight->SetHeight(nNewHeight);
rSh.SetRowHeight(*pHeight);
}
@@ -1309,7 +1309,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
std::unique_ptr<SwFormatFrameSize> pSz = rSh.GetRowHeight();
if ( pSz )
{
- if ( ATT_VAR_SIZE == pSz->GetHeightSizeType() )
+ if ( SwFrameSize::Variable == pSz->GetHeightSizeType() )
rSet.DisableItem( nSlot );
}
break;
diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx
index 2ee71262d768..53b5fa1969f2 100644
--- a/sw/source/uibase/shells/textidx.cxx
+++ b/sw/source/uibase/shells/textidx.cxx
@@ -112,7 +112,7 @@ void SwTextShell::ExecIdx(SfxRequest const &rReq)
rSh.CalcBoundRect(aRect, RndStdIds::FLY_AS_CHAR);
long nWidth = aRect.Width();
- aSet.Put(SwFormatFrameSize(ATT_VAR_SIZE, nWidth));
+ aSet.Put(SwFormatFrameSize(SwFrameSize::Variable, nWidth));
// Height = width for a more consistent preview (analogous to edit range)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
const SwTOXBase* pCurTOX = nullptr;
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 0aeb4e807b4b..1486855b4c24 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -859,12 +859,12 @@ SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr)
GetShell().GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->PutAreaListItems(aSet);
const SwRect &rPg = GetShell().GetAnyCurRect(CurRectType::Page);
- SwFormatFrameSize aFrameSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height());
+ SwFormatFrameSize aFrameSize(SwFrameSize::Variable, rPg.Width(), rPg.Height());
aFrameSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE));
aSet.Put(aFrameSize);
const SwRect &rPr = GetShell().GetAnyCurRect(CurRectType::PagePrt);
- SwFormatFrameSize aPrtSize(ATT_VAR_SIZE, rPr.Width(), rPr.Height());
+ SwFormatFrameSize aPrtSize(SwFrameSize::Variable, rPr.Width(), rPr.Height());
aPrtSize.SetWhich(GetPool().GetWhich(FN_GET_PRINT_AREA));
aSet.Put(aPrtSize);
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index f5941793eadb..81b44e58ec51 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -523,7 +523,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
{
SwFormatFrameSize aSz( bHead ? pHeaderFormat->GetFrameSize() :
pFooterFormat->GetFrameSize() );
- aSz.SetHeightSizeType( ATT_FIX_SIZE );
+ aSz.SetHeightSizeType( SwFrameSize::Fixed );
aSz.SetHeight(nPageHeight - aLongULSpace.GetLower() -
aLongULSpace.GetUpper() );
if ( bHead )
diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx
index 44c278a6e750..ff182d415cbe 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -235,9 +235,9 @@ bool SwFormatFrameSize::GetPresentation
rText += ::GetMetricText( GetWidth(), eCoreUnit, ePresUnit, &rIntl ) +
" " + ::EditResId( ::GetMetricId( ePresUnit ) );
}
- if ( ATT_VAR_SIZE != GetHeightSizeType() )
+ if ( SwFrameSize::Variable != GetHeightSizeType() )
{
- const char* pId = ATT_FIX_SIZE == m_eFrameHeightType ?
+ const char* pId = SwFrameSize::Fixed == m_eFrameHeightType ?
STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
rText += ", " + SwResId(pId) + " ";
if ( GetHeightPercent() )
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index f5dfd211129d..dc8639b12dd2 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -243,7 +243,7 @@ static void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet)
const SfxBoolItem& rDynamic = rSet.Get(SID_ATTR_PAGE_DYNAMIC);
// Convert size
- SwFormatFrameSize aFrameSize(rDynamic.GetValue() ? ATT_MIN_SIZE : ATT_FIX_SIZE,
+ SwFormatFrameSize aFrameSize(rDynamic.GetValue() ? SwFrameSize::Minimum : SwFrameSize::Fixed,
rSize.GetSize().Width(),
rSize.GetSize().Height());
aSet.Put(aFrameSize);
@@ -307,7 +307,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SfxItemState::SET)
{
const SvxSizeItem& rSizeItem = rSet.Get(SID_ATTR_PAGE_SIZE);
- SwFormatFrameSize aSize(ATT_FIX_SIZE);
+ SwFormatFrameSize aSize(SwFrameSize::Fixed);
aSize.SetSize(rSizeItem.GetSize());
rMaster.SetFormatAttr(aSize);
}
@@ -500,7 +500,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
const SwFormatFrameSize &rFrameSize = pHeaderFormat->GetFrameSize();
const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType();
- SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != ATT_FIX_SIZE);
+ SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != SwFrameSize::Fixed);
aHeaderSet.Put(aDynamic);
// Left equal right
@@ -550,7 +550,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
const SwFormatFrameSize &rFrameSize = pFooterFormat->GetFrameSize();
const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType();
- SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != ATT_FIX_SIZE);
+ SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != SwFrameSize::Fixed);
aFooterSet.Put(aDynamic);
// Left equal right
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 432a578d3f81..3516b8102096 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -330,7 +330,7 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT )
bSetGrfSize = false;
- pFrameMgr->SetHeightSizeType(ATT_FIX_SIZE);
+ pFrameMgr->SetHeightSizeType(SwFrameSize::Fixed);
}
// Insert the graphic
@@ -542,7 +542,7 @@ bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrame
EnterSelFrameMode();
SwFlyFrameAttrMgr aFrameMgr( true, this, Frmmgr_Type::OLE );
- aFrameMgr.SetHeightSizeType(ATT_FIX_SIZE);
+ aFrameMgr.SetHeightSizeType(SwFrameSize::Fixed);
SwRect aBound;
CalcBoundRect( aBound, aFrameMgr.GetAnchor() );