diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-31 09:11:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-01 12:34:37 +0100 |
commit | ae5f89fdcccb2cf74256b04771249fc8afca8794 (patch) | |
tree | 7b9235188fbfc8fb74edf7be3e4c2c351638c8a3 /svx | |
parent | e02efb621fe672aa52e56caa916cf5c3fd0a9cb8 (diff) |
split out SFX_METRIC_ITEM into separate field
instead of overloading the nMemberId field
and thus fix various places that were effectively setting the METRIC
flag and causing a warning in SvxUnoConvertToMM
And fix bug in
sw/source/core/unocore/unomap.cxx
where the PropertyAttribute::READONLY was in the wrong place,
ever since
commit 84a3db80b4fd66c6854b3135b5f69b61fd828e62
Date: Mon Sep 18 23:08:29 2000 +0000
initial import
Change-Id: Ifc2bf56709f19aea75300b2fda62ce551efc26af
Reviewed-on: https://gerrit.libreoffice.org/48950
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/cell.cxx | 8 | ||||
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 8 | ||||
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 152e19046f94..cd59528ae818 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -78,10 +78,10 @@ static const SvxItemPropertySet* ImplGetSvxCellPropertySet() { OUString("Style"), OWN_ATTR_STYLE, cppu::UnoType< css::style::XStyle >::get(), css::beans::PropertyAttribute::MAYBEVOID, 0}, { OUString(UNO_NAME_TEXT_WRITINGMODE), SDRATTR_TEXTDIRECTION, cppu::UnoType<css::text::WritingMode>::get(), 0, 0}, { OUString(UNO_NAME_TEXT_HORZADJUST), SDRATTR_TEXT_HORZADJUST, cppu::UnoType<css::drawing::TextHorizontalAdjust>::get(), 0, 0}, - { OUString(UNO_NAME_TEXT_LEFTDIST), SDRATTR_TEXT_LEFTDIST, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, - { OUString(UNO_NAME_TEXT_LOWERDIST), SDRATTR_TEXT_LOWERDIST, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, - { OUString(UNO_NAME_TEXT_RIGHTDIST), SDRATTR_TEXT_RIGHTDIST, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, - { OUString(UNO_NAME_TEXT_UPPERDIST), SDRATTR_TEXT_UPPERDIST, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, + { OUString(UNO_NAME_TEXT_LEFTDIST), SDRATTR_TEXT_LEFTDIST, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, + { OUString(UNO_NAME_TEXT_LOWERDIST), SDRATTR_TEXT_LOWERDIST, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, + { OUString(UNO_NAME_TEXT_RIGHTDIST), SDRATTR_TEXT_RIGHTDIST, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, + { OUString(UNO_NAME_TEXT_UPPERDIST), SDRATTR_TEXT_UPPERDIST, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, { OUString(UNO_NAME_TEXT_VERTADJUST), SDRATTR_TEXT_VERTADJUST, cppu::UnoType<css::drawing::TextVerticalAdjust>::get(), 0, 0}, { OUString(UNO_NAME_TEXT_WORDWRAP), SDRATTR_TEXT_WORDWRAP, cppu::UnoType<bool>::get(), 0, 0}, diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 9261a71bb830..34019f616f56 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -117,7 +117,7 @@ void SvxUnoDrawPool::getAny( SfxItemPool const * pPool, const comphelper::Proper { const MapUnit eMapUnit = pPool->GetMetric(static_cast<sal_uInt16>(pEntry->mnHandle)); - sal_uInt8 nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM); + sal_uInt8 nMemberId = pEntry->mnMemberId; if( eMapUnit == MapUnit::Map100thMM ) nMemberId &= (~CONVERT_TWIPS); @@ -131,7 +131,7 @@ void SvxUnoDrawPool::getAny( SfxItemPool const * pPool, const comphelper::Proper // check for needed metric translation const MapUnit eMapUnit = pPool->GetMetric(static_cast<sal_uInt16>(pEntry->mnHandle)); - if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != MapUnit::Map100thMM) + if(pEntry->mnMoreFlags & PropertyMoreFlags::METRIC_ITEM && eMapUnit != MapUnit::Map100thMM) { SvxUnoConvertToMM( eMapUnit, rValue ); } @@ -150,7 +150,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn uno::Any aValue( rValue ); const MapUnit eMapUnit = pPool->GetMetric(static_cast<sal_uInt16>(pEntry->mnHandle)); - if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != MapUnit::Map100thMM) + if(pEntry->mnMoreFlags & PropertyMoreFlags::METRIC_ITEM && eMapUnit != MapUnit::Map100thMM) { SvxUnoConvertFromMM( eMapUnit, aValue ); } @@ -183,7 +183,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn default: { std::unique_ptr<SfxPoolItem> pNewItem( pPool->GetDefaultItem( nWhich ).Clone() ); - sal_uInt8 nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM); + sal_uInt8 nMemberId = pEntry->mnMemberId; if( pPool->GetMetric(nWhich) == MapUnit::Map100thMM ) nMemberId &= (~CONVERT_TWIPS); diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 7b47f8755223..83e1ffdf95ab 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -654,12 +654,12 @@ SfxItemPropertyMapEntry const * ImplGetSvxCaptionPropertyMap() { OUString("CaptionType"), SDRATTR_CAPTIONTYPE, cppu::UnoType<sal_Int16>::get(), 0, 0}, { OUString("CaptionIsFixedAngle"), SDRATTR_CAPTIONFIXEDANGLE, cppu::UnoType<bool>::get(), 0, 0}, { OUString("CaptionAngle"), SDRATTR_CAPTIONANGLE, cppu::UnoType<sal_Int32>::get(), 0, 0}, - { OUString("CaptionGap"), SDRATTR_CAPTIONGAP, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, + { OUString("CaptionGap"), SDRATTR_CAPTIONGAP, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, { OUString("CaptionEscapeDirection"), SDRATTR_CAPTIONESCDIR, cppu::UnoType<sal_Int32>::get(), 0, 0}, { OUString("CaptionIsEscapeRelative"), SDRATTR_CAPTIONESCISREL, cppu::UnoType<bool>::get(), 0, 0}, { OUString("CaptionEscapeRelative"), SDRATTR_CAPTIONESCREL, cppu::UnoType<sal_Int32>::get(), 0, 0}, - { OUString("CaptionEscapeAbsolute"), SDRATTR_CAPTIONESCABS, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, - { OUString("CaptionLineLength"), SDRATTR_CAPTIONLINELEN, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, + { OUString("CaptionEscapeAbsolute"), SDRATTR_CAPTIONESCABS, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, + { OUString("CaptionLineLength"), SDRATTR_CAPTIONLINELEN, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, { OUString("CaptionIsFitLineLength"), SDRATTR_CAPTIONFITLINELEN, cppu::UnoType<bool>::get(), 0, 0}, EDGERADIUS_PROPERTIES FILL_PROPERTIES |