summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-10-26 10:00:05 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-10-26 10:37:20 +0100
commit992859b4377e0b7a3a177f0a69dc4e6fec765483 (patch)
tree880044cb5c6f0142c60c07c12690fb39aa9e0bbc /sw
parent1ccd386cd426e2e92ee6a585dfc8bdf5c9edf6e7 (diff)
Use an enum instead of a constant, and reduce its scope
Change-Id: Ica9d53103ffa98a72b27303352f2f3997a3386d5
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/ssfrm.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 3d94b59ee347..5d0b269af3c7 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -202,8 +202,6 @@ void SwFrm::SetRightLeftMargins( long nRight, long nLeft)
Prt().Width( Frm().Width() - nLeft - nRight );
}
-const sal_uInt16 nMinVertCellHeight = 1135;
-
/// checks the layout direction and invalidates the lower frames rekursivly, if necessary.
void SwFrm::CheckDirChange()
{
@@ -225,13 +223,17 @@ void SwFrm::CheckDirChange()
if ( IsVertical() != GetUpper()->IsVertical() &&
((SwCellFrm*)this)->GetTabBox()->getRowSpan() == 1 )
{
+ enum {
+ MIN_VERT_CELL_HEIGHT = 1135
+ };
+
SwTableLine* pLine = (SwTableLine*)((SwCellFrm*)this)->GetTabBox()->GetUpper();
SwFrmFmt* pFrmFmt = pLine->GetFrmFmt();
SwFmtFrmSize aNew( pFrmFmt->GetFrmSize() );
if ( ATT_FIX_SIZE != aNew.GetHeightSizeType() )
aNew.SetHeightSizeType( ATT_MIN_SIZE );
- if ( aNew.GetHeight() < nMinVertCellHeight )
- aNew.SetHeight( nMinVertCellHeight );
+ if ( aNew.GetHeight() < MIN_VERT_CELL_HEIGHT )
+ aNew.SetHeight( MIN_VERT_CELL_HEIGHT );
SwDoc* pDoc = pFrmFmt->GetDoc();
pDoc->SetAttr( aNew, *pLine->ClaimFrmFmt() );
}