summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
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 /sw/source/filter/html
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>
Diffstat (limited to 'sw/source/filter/html')
-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
6 files changed, 16 insertions, 16 deletions
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 );