summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-11-11 18:39:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-11-11 18:39:20 +0100
commitd5f93eb47ec4c27e93ad908b0199790c702491a0 (patch)
tree557a89c8833f91e5b370fb72194ce8e974f0e3f4 /include
parent047830de46fc40629dc9bdf1e8b9f427b6648c36 (diff)
Some SvxFontHeightItem clean-up
...and operator= shall probably copy rSize.ePropUnit... Change-Id: I112c02b3a3b2ce23f3d03f03881136e05be29017
Diffstat (limited to 'include')
-rw-r--r--include/editeng/fhgtitem.hxx24
1 files changed, 8 insertions, 16 deletions
diff --git a/include/editeng/fhgtitem.hxx b/include/editeng/fhgtitem.hxx
index 3ff3e64bd532..a52da1841a0b 100644
--- a/include/editeng/fhgtitem.hxx
+++ b/include/editeng/fhgtitem.hxx
@@ -47,6 +47,10 @@ public:
SvxFontHeightItem( const sal_uLong nSz /*= 240*/, const sal_uInt16 nPropHeight /*= 100*/,
const sal_uInt16 nId );
+ SvxFontHeightItem(
+ sal_uInt16 wid, sal_uInt32 height, sal_uInt16 prop,
+ SfxMapUnit propUnit);
+
// "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE;
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const SAL_OVERRIDE;
@@ -66,8 +70,10 @@ public:
inline SvxFontHeightItem& operator=(const SvxFontHeightItem& rSize)
{
- SetHeightValue( rSize.GetHeight() );
- SetProp( rSize.GetProp(), ePropUnit );
+ DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
+ nHeight = rSize.nHeight;
+ nProp = rSize.nProp;
+ ePropUnit = rSize.ePropUnit;
return *this;
}
@@ -79,20 +85,6 @@ public:
sal_uInt32 GetHeight() const { return nHeight; }
- void SetHeightValue( sal_uInt32 nNewHeight )
- {
- DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
- nHeight = nNewHeight;
- }
-
- void SetProp( const sal_uInt16 nNewProp,
- SfxMapUnit eUnit = SFX_MAPUNIT_RELATIVE )
- {
- DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
- nProp = nNewProp;
- ePropUnit = eUnit;
- }
-
sal_uInt16 GetProp() const { return nProp; }
SfxMapUnit GetPropUnit() const { return ePropUnit; } // Percent, Twip, ...