[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Sat Feb 22 11:57:05 PST 2014
sw/inc/fmtfsize.hxx | 50 +++++++++++++++++++--------------------
sw/source/core/layout/atrfrm.cxx | 50 +++++++++++++++++++--------------------
sw/source/ui/utlui/attrdesc.cxx | 2 -
3 files changed, 51 insertions(+), 51 deletions(-)
New commits:
commit 01d306abb9abba4b5b195637d9eb2aa24b828b99
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Sat Feb 22 20:48:23 2014 +0100
SwFmtFrmSize: rename member variables missing their prefixes
Change-Id: I4c8876b6be795b7b7af26e7a449a63ec2320d729
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index d9af054..407d05a 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -40,13 +40,13 @@ enum SwFrmSize
class SW_DLLPUBLIC SwFmtFrmSize: public SfxPoolItem
{
- Size aSize;
- SwFrmSize eFrmHeightType;
- SwFrmSize eFrmWidthType;
- sal_uInt8 nWidthPercent;
- sal_Int16 eWidthPercentRelation;
- sal_uInt8 nHeightPercent;
- sal_Int16 eHeightPercentRelation;
+ Size m_aSize;
+ SwFrmSize m_eFrmHeightType;
+ SwFrmSize m_eFrmWidthType;
+ sal_uInt8 m_nWidthPercent;
+ sal_Int16 m_eWidthPercentRelation;
+ sal_uInt8 m_nHeightPercent;
+ sal_Int16 m_eHeightPercentRelation;
// For tables: width can be given in percent.
@@ -77,28 +77,28 @@ public:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- SwFrmSize GetHeightSizeType() const { return eFrmHeightType; }
- void SetHeightSizeType( SwFrmSize eSize ) { eFrmHeightType = eSize; }
+ SwFrmSize GetHeightSizeType() const { return m_eFrmHeightType; }
+ void SetHeightSizeType( SwFrmSize eSize ) { m_eFrmHeightType = eSize; }
- SwFrmSize GetWidthSizeType() const { return eFrmWidthType; }
- void SetWidthSizeType( SwFrmSize eSize ) { eFrmWidthType = eSize; }
+ SwFrmSize GetWidthSizeType() const { return m_eFrmWidthType; }
+ void SetWidthSizeType( SwFrmSize eSize ) { m_eFrmWidthType = eSize; }
- const Size& GetSize() const { return aSize; }
- void SetSize( const Size &rNew ) { aSize = rNew; }
+ const Size& GetSize() const { return m_aSize; }
+ void SetSize( const Size &rNew ) { m_aSize = rNew; }
- SwTwips GetHeight() const { return aSize.Height(); }
- SwTwips GetWidth() const { return aSize.Width(); }
- void SetHeight( const SwTwips nNew ) { aSize.Height() = nNew; }
- void SetWidth ( const SwTwips nNew ) { aSize.Width() = nNew; }
+ SwTwips GetHeight() const { return m_aSize.Height(); }
+ SwTwips GetWidth() const { return m_aSize.Width(); }
+ void SetHeight( const SwTwips nNew ) { m_aSize.Height() = nNew; }
+ void SetWidth ( const SwTwips nNew ) { m_aSize.Width() = nNew; }
- sal_uInt8 GetHeightPercent() const{ return nHeightPercent; }
- sal_Int16 GetHeightPercentRelation() const { return eHeightPercentRelation; }
- sal_uInt8 GetWidthPercent() const { return nWidthPercent; }
- sal_Int16 GetWidthPercentRelation() const { return eWidthPercentRelation; }
- void SetHeightPercent( sal_uInt8 n ) { nHeightPercent = n; }
- void SetHeightPercentRelation ( sal_Int16 n ) { eHeightPercentRelation = n; }
- void SetWidthPercent ( sal_uInt8 n ) { nWidthPercent = n; }
- void SetWidthPercentRelation ( sal_Int16 n ) { eWidthPercentRelation = n; }
+ sal_uInt8 GetHeightPercent() const{ return m_nHeightPercent; }
+ sal_Int16 GetHeightPercentRelation() const { return m_eHeightPercentRelation; }
+ sal_uInt8 GetWidthPercent() const { return m_nWidthPercent; }
+ sal_Int16 GetWidthPercentRelation() const { return m_eWidthPercentRelation; }
+ void SetHeightPercent( sal_uInt8 n ) { m_nHeightPercent = n; }
+ void SetHeightPercentRelation ( sal_Int16 n ) { m_eHeightPercentRelation = n; }
+ void SetWidthPercent ( sal_uInt8 n ) { m_nWidthPercent = n; }
+ void SetWidthPercentRelation ( sal_Int16 n ) { m_eWidthPercentRelation = n; }
};
inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(sal_Bool bInP) const
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 9367bca..2a36d1c 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -171,35 +171,35 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt )
SwFmtFrmSize::SwFmtFrmSize( SwFrmSize eSize, SwTwips nWidth, SwTwips nHeight )
: SfxPoolItem( RES_FRM_SIZE ),
- aSize( nWidth, nHeight ),
- eFrmHeightType( eSize ),
- eFrmWidthType( ATT_FIX_SIZE )
+ m_aSize( nWidth, nHeight ),
+ m_eFrmHeightType( eSize ),
+ m_eFrmWidthType( ATT_FIX_SIZE )
{
- nWidthPercent = eWidthPercentRelation = nHeightPercent = eHeightPercentRelation = 0;
+ m_nWidthPercent = m_eWidthPercentRelation = m_nHeightPercent = m_eHeightPercentRelation = 0;
}
SwFmtFrmSize& SwFmtFrmSize::operator=( const SwFmtFrmSize& rCpy )
{
- aSize = rCpy.GetSize();
- eFrmHeightType = rCpy.GetHeightSizeType();
- eFrmWidthType = rCpy.GetWidthSizeType();
- nHeightPercent = rCpy.GetHeightPercent();
- eHeightPercentRelation = rCpy.GetHeightPercentRelation();
- nWidthPercent = rCpy.GetWidthPercent();
- eWidthPercentRelation = rCpy.GetWidthPercentRelation();
+ m_aSize = rCpy.GetSize();
+ m_eFrmHeightType = rCpy.GetHeightSizeType();
+ m_eFrmWidthType = rCpy.GetWidthSizeType();
+ m_nHeightPercent = rCpy.GetHeightPercent();
+ m_eHeightPercentRelation = rCpy.GetHeightPercentRelation();
+ m_nWidthPercent = rCpy.GetWidthPercent();
+ m_eWidthPercentRelation = rCpy.GetWidthPercentRelation();
return *this;
}
bool SwFmtFrmSize::operator==( const SfxPoolItem& rAttr ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
- return( eFrmHeightType == ((SwFmtFrmSize&)rAttr).eFrmHeightType &&
- eFrmWidthType == ((SwFmtFrmSize&)rAttr).eFrmWidthType &&
- aSize == ((SwFmtFrmSize&)rAttr).GetSize()&&
- nWidthPercent == ((SwFmtFrmSize&)rAttr).GetWidthPercent() &&
- eWidthPercentRelation == ((SwFmtFrmSize&)rAttr).GetWidthPercentRelation() &&
- nHeightPercent == ((SwFmtFrmSize&)rAttr).GetHeightPercent() &&
- eHeightPercentRelation == ((SwFmtFrmSize&)rAttr).GetHeightPercentRelation() );
+ return( m_eFrmHeightType == ((SwFmtFrmSize&)rAttr).m_eFrmHeightType &&
+ m_eFrmWidthType == ((SwFmtFrmSize&)rAttr).m_eFrmWidthType &&
+ m_aSize == ((SwFmtFrmSize&)rAttr).GetSize()&&
+ m_nWidthPercent == ((SwFmtFrmSize&)rAttr).GetWidthPercent() &&
+ m_eWidthPercentRelation == ((SwFmtFrmSize&)rAttr).GetWidthPercentRelation() &&
+ m_nHeightPercent == ((SwFmtFrmSize&)rAttr).GetHeightPercent() &&
+ m_eHeightPercentRelation == ((SwFmtFrmSize&)rAttr).GetHeightPercentRelation() );
}
SfxPoolItem* SwFmtFrmSize::Clone( SfxItemPool* ) const
@@ -216,8 +216,8 @@ bool SwFmtFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
case MID_FRMSIZE_SIZE:
{
awt::Size aTmp;
- aTmp.Height = TWIP_TO_MM100(aSize.Height());
- aTmp.Width = TWIP_TO_MM100(aSize.Width());
+ aTmp.Height = TWIP_TO_MM100(m_aSize.Height());
+ aTmp.Width = TWIP_TO_MM100(m_aSize.Width());
rVal.setValue(&aTmp, ::getCppuType((const awt::Size*)0));
}
break;
@@ -246,14 +246,14 @@ bool SwFmtFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
case MID_FRMSIZE_WIDTH :
- rVal <<= (sal_Int32)TWIP_TO_MM100(aSize.Width());
+ rVal <<= (sal_Int32)TWIP_TO_MM100(m_aSize.Width());
break;
case MID_FRMSIZE_HEIGHT:
// #95848# returned size should never be zero.
// (there was a bug that allowed for setting height to 0.
// Thus there some documents existing with that not allowed
// attribut value which may cause problems on import.)
- rVal <<= (sal_Int32)TWIP_TO_MM100(aSize.Height() < MINLAY ? MINLAY : aSize.Height() );
+ rVal <<= (sal_Int32)TWIP_TO_MM100(m_aSize.Height() < MINLAY ? MINLAY : m_aSize.Height() );
break;
case MID_FRMSIZE_SIZE_TYPE:
rVal <<= (sal_Int16)GetHeightSizeType();
@@ -292,7 +292,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
aTmp.Width() = MM100_TO_TWIP(aTmp.Width());
}
if(aTmp.Height() && aTmp.Width())
- aSize = aTmp;
+ m_aSize = aTmp;
else
bRet = false;
}
@@ -359,7 +359,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
nWd = MM100_TO_TWIP(nWd);
if(nWd < MINLAY)
nWd = MINLAY;
- aSize.Width() = nWd;
+ m_aSize.Width() = nWd;
}
else
bRet = false;
@@ -374,7 +374,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
nHg = MM100_TO_TWIP(nHg);
if(nHg < MINLAY)
nHg = MINLAY;
- aSize.Height() = nHg;
+ m_aSize.Height() = nHg;
}
else
bRet = false;
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 3a1f3b0..3cc57ef 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -349,7 +349,7 @@ SfxItemPresentation SwFmtFrmSize::GetPresentation
}
if ( ATT_VAR_SIZE != GetHeightSizeType() )
{
- const sal_uInt16 nId = ATT_FIX_SIZE == eFrmHeightType ?
+ const sal_uInt16 nId = ATT_FIX_SIZE == m_eFrmHeightType ?
STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
rText = rText + ", " + SW_RESSTR( nId ) + " ";
if ( GetHeightPercent() )
More information about the Libreoffice-commits
mailing list