diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-11-11 19:18:12 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-11 19:51:22 +0100 |
commit | 2a68ed19e8f35909e5dba691f9552099eae3162f (patch) | |
tree | 6588974e118c8f5824978664bdcc30d168ad8eb9 /include | |
parent | O_RDWR and O_CREAT are defined in fcntl.h (diff) | |
download | core-2a68ed19e8f35909e5dba691f9552099eae3162f.tar.gz core-2a68ed19e8f35909e5dba691f9552099eae3162f.zip |
Revert "Some SvxFontHeightItem clean-up"
This reverts commit d5f93eb47ec4c27e93ad908b0199790c702491a0,
SvxFontHeightItem::SetProp was used to override "dummy" 100% nProp/ePropUnit
values that did not match the computed nHeight value with nProp/ePropUnit values
that are supposed to match the computed nHeight value. Yuck.
Change-Id: Ic12e824054b3c5da7aca766b9b3eb076d1837d9a
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/fhgtitem.hxx | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/editeng/fhgtitem.hxx b/include/editeng/fhgtitem.hxx index a52da1841a0b..3ff3e64bd532 100644 --- a/include/editeng/fhgtitem.hxx +++ b/include/editeng/fhgtitem.hxx @@ -47,10 +47,6 @@ 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; @@ -70,10 +66,8 @@ public: inline SvxFontHeightItem& operator=(const SvxFontHeightItem& rSize) { - DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" ); - nHeight = rSize.nHeight; - nProp = rSize.nProp; - ePropUnit = rSize.ePropUnit; + SetHeightValue( rSize.GetHeight() ); + SetProp( rSize.GetProp(), ePropUnit ); return *this; } @@ -85,6 +79,20 @@ 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, ... |