summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-31 09:11:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-01 12:34:37 +0100
commitae5f89fdcccb2cf74256b04771249fc8afca8794 (patch)
tree7b9235188fbfc8fb74edf7be3e4c2c351638c8a3 /sw
parente02efb621fe672aa52e56caa916cf5c3fd0a9cb8 (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 'sw')
-rw-r--r--sw/source/core/unocore/unoframe.cxx12
-rw-r--r--sw/source/core/unocore/unomap.cxx4
-rw-r--r--sw/source/core/unocore/unomap1.cxx26
-rw-r--r--sw/source/core/unocore/unomapproperties.hxx12
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx5
-rw-r--r--sw/source/core/unocore/unostyle.cxx26
-rw-r--r--sw/source/core/unocore/unotbl.cxx4
7 files changed, 41 insertions, 48 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 735e6756a353..ad2f966110a0 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1411,11 +1411,11 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
if (!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
+ const sal_uInt8 nMemberId(pEntry->nMemberId);
uno::Any aValue(_rValue);
// check for needed metric translation
- if(pEntry->nMemberId & SFX_METRIC_ITEM)
+ if(pEntry->nMoreFlags & PropertyMoreFlags::METRIC_ITEM)
{
bool bDoIt(true);
@@ -2001,7 +2001,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
if (!pEntry)
throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
+ const sal_uInt8 nMemberId(pEntry->nMemberId);
if(FN_UNO_ANCHOR_TYPES == pEntry->nWID)
{
@@ -2313,7 +2313,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
// check for needed metric translation
- if(pEntry->nMemberId & SFX_METRIC_ITEM)
+ if(pEntry->nMoreFlags & PropertyMoreFlags::METRIC_ITEM)
{
bool bDoIt(true);
@@ -2569,9 +2569,7 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName )
{
const SfxPoolItem& rDefItem =
pFormat->GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
- const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
-
- rDefItem.QueryValue(aRet, nMemberId);
+ rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
}
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index c179042102ec..51eeee194701 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -675,7 +675,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
static SfxItemPropertyMapEntry const aLinkTargetMap_Impl[] =
{
{ OUString(UNO_LINK_DISPLAY_BITMAP), 0, cppu::UnoType<css::awt::XBitmap>::get(), PropertyAttribute::READONLY, 0xff},
- { OUString(UNO_LINK_DISPLAY_NAME), 0, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xff},
+ { OUString(UNO_LINK_DISPLAY_NAME), 0, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xbf},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
m_aMapEntriesArr[nPropertyId] = aLinkTargetMap_Impl;
@@ -685,7 +685,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{
static SfxItemPropertyMapEntry const aAutoTextGroupMap_Impl[] =
{
- { OUString(UNO_NAME_FILE_PATH), WID_GROUP_PATH, cppu::UnoType<OUString>::get(), PROPERTY_NONE, PropertyAttribute::READONLY},
+ { OUString(UNO_NAME_FILE_PATH), WID_GROUP_PATH, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0},
{ OUString(UNO_NAME_TITLE), WID_GROUP_TITLE, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
diff --git a/sw/source/core/unocore/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx
index 3724e930672e..8f0352f09394 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -617,8 +617,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPageStylePropertyMa
{ OUString(UNO_NAME_HEADER_FILLBMP_POSITION_OFFSET_X), XATTR_FILLBMP_POSOFFSETX, cppu::UnoType<sal_Int32>::get() , 0, 0},
{ OUString(UNO_NAME_HEADER_FILLBMP_POSITION_OFFSET_Y), XATTR_FILLBMP_POSOFFSETY, cppu::UnoType<sal_Int32>::get() , 0, 0},
{ OUString(UNO_NAME_HEADER_FILLBMP_RECTANGLE_POINT), XATTR_FILLBMP_POS, cppu::UnoType<css::drawing::RectanglePoint>::get() , 0, 0},
- { OUString(UNO_NAME_HEADER_FILLBMP_SIZE_X), XATTR_FILLBMP_SIZEX, cppu::UnoType<sal_Int32>::get() , 0, SFX_METRIC_ITEM},
- { OUString(UNO_NAME_HEADER_FILLBMP_SIZE_Y), XATTR_FILLBMP_SIZEY, cppu::UnoType<sal_Int32>::get() , 0, SFX_METRIC_ITEM},
+ { OUString(UNO_NAME_HEADER_FILLBMP_SIZE_X), XATTR_FILLBMP_SIZEX, cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM},
+ { OUString(UNO_NAME_HEADER_FILLBMP_SIZE_Y), XATTR_FILLBMP_SIZEY, cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM},
{ OUString(UNO_NAME_HEADER_FILLBMP_STRETCH), XATTR_FILLBMP_STRETCH, cppu::UnoType<bool>::get() , 0, 0},
{ OUString(UNO_NAME_HEADER_FILLBMP_TILE), XATTR_FILLBMP_TILE, cppu::UnoType<bool>::get() , 0, 0},
{ OUString(UNO_NAME_HEADER_FILLBMP_MODE), OWN_ATTR_FILLBMP_MODE, cppu::UnoType<css::drawing::BitmapMode>::get(), 0, 0},
@@ -645,8 +645,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPageStylePropertyMa
{ OUString(UNO_NAME_FOOTER_FILLBMP_POSITION_OFFSET_X), XATTR_FILLBMP_POSOFFSETX, cppu::UnoType<sal_Int32>::get() , 0, 0},
{ OUString(UNO_NAME_FOOTER_FILLBMP_POSITION_OFFSET_Y), XATTR_FILLBMP_POSOFFSETY, cppu::UnoType<sal_Int32>::get() , 0, 0},
{ OUString(UNO_NAME_FOOTER_FILLBMP_RECTANGLE_POINT), XATTR_FILLBMP_POS, cppu::UnoType<css::drawing::RectanglePoint>::get() , 0, 0},
- { OUString(UNO_NAME_FOOTER_FILLBMP_SIZE_X), XATTR_FILLBMP_SIZEX, cppu::UnoType<sal_Int32>::get() , 0, SFX_METRIC_ITEM},
- { OUString(UNO_NAME_FOOTER_FILLBMP_SIZE_Y), XATTR_FILLBMP_SIZEY, cppu::UnoType<sal_Int32>::get() , 0, SFX_METRIC_ITEM},
+ { OUString(UNO_NAME_FOOTER_FILLBMP_SIZE_X), XATTR_FILLBMP_SIZEX, cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM},
+ { OUString(UNO_NAME_FOOTER_FILLBMP_SIZE_Y), XATTR_FILLBMP_SIZEY, cppu::UnoType<sal_Int32>::get() , 0, 0, PropertyMoreFlags::METRIC_ITEM},
{ OUString(UNO_NAME_FOOTER_FILLBMP_STRETCH), XATTR_FILLBMP_STRETCH, cppu::UnoType<bool>::get() , 0, 0},
{ OUString(UNO_NAME_FOOTER_FILLBMP_TILE), XATTR_FILLBMP_TILE, cppu::UnoType<bool>::get() , 0, 0},
{ OUString(UNO_NAME_FOOTER_FILLBMP_MODE), OWN_ATTR_FILLBMP_MODE, cppu::UnoType<css::drawing::BitmapMode>::get(), 0, 0},
@@ -687,17 +687,17 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetTablePropertyMap()
{ OUString(UNO_NAME_KEEP_TOGETHER), RES_KEEP, cppu::UnoType<bool>::get() , PROPERTY_NONE, 0},
{ OUString(UNO_NAME_SPLIT), RES_LAYOUT_SPLIT, cppu::UnoType<bool>::get() , PROPERTY_NONE, 0},
{ OUString(UNO_NAME_PAGE_NUMBER_OFFSET), RES_PAGEDESC, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::MAYBEVOID, MID_PAGEDESC_PAGENUMOFFSET},
- { OUString(UNO_NAME_PAGE_DESC_NAME), RES_PAGEDESC, cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0xff},
- { OUString(UNO_NAME_RELATIVE_WIDTH), FN_TABLE_RELATIVE_WIDTH,cppu::UnoType<sal_Int16>::get() , PROPERTY_NONE, 0xff },
- { OUString(UNO_NAME_REPEAT_HEADLINE), FN_TABLE_HEADLINE_REPEAT,cppu::UnoType<bool>::get(), PROPERTY_NONE, 0xff},
- { OUString(UNO_NAME_HEADER_ROW_COUNT), FN_TABLE_HEADLINE_COUNT, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0xff},
+ { OUString(UNO_NAME_PAGE_DESC_NAME), RES_PAGEDESC, cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0xbf},
+ { OUString(UNO_NAME_RELATIVE_WIDTH), FN_TABLE_RELATIVE_WIDTH,cppu::UnoType<sal_Int16>::get() , PROPERTY_NONE, 0xbf },
+ { OUString(UNO_NAME_REPEAT_HEADLINE), FN_TABLE_HEADLINE_REPEAT,cppu::UnoType<bool>::get(), PROPERTY_NONE, 0xbf},
+ { OUString(UNO_NAME_HEADER_ROW_COUNT), FN_TABLE_HEADLINE_COUNT, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0xbf},
{ OUString(UNO_NAME_SHADOW_FORMAT), RES_SHADOW, cppu::UnoType<css::table::ShadowFormat>::get(), PROPERTY_NONE, 0},
{ OUString(UNO_NAME_SHADOW_TRANSPARENCE), RES_SHADOW, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, MID_SHADOW_TRANSPARENCE},
{ OUString(UNO_NAME_TOP_MARGIN), RES_UL_SPACE, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, MID_UP_MARGIN|CONVERT_TWIPS},
{ OUString(UNO_NAME_BOTTOM_MARGIN), RES_UL_SPACE, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, MID_LO_MARGIN|CONVERT_TWIPS},
{ OUString(UNO_NAME_BACK_TRANSPARENT), RES_BACKGROUND, cppu::UnoType<bool>::get(), PROPERTY_NONE ,MID_GRAPHIC_TRANSPARENT },
- { OUString(UNO_NAME_WIDTH), FN_TABLE_WIDTH, cppu::UnoType<sal_Int32>::get() , PROPERTY_NONE, 0xff},
- { OUString(UNO_NAME_IS_WIDTH_RELATIVE), FN_TABLE_IS_RELATIVE_WIDTH, cppu::UnoType<bool>::get() , PROPERTY_NONE, 0xff},
+ { OUString(UNO_NAME_WIDTH), FN_TABLE_WIDTH, cppu::UnoType<sal_Int32>::get() , PROPERTY_NONE, 0xbf},
+ { OUString(UNO_NAME_IS_WIDTH_RELATIVE), FN_TABLE_IS_RELATIVE_WIDTH, cppu::UnoType<bool>::get() , PROPERTY_NONE, 0xbf},
{ OUString(UNO_NAME_CHART_ROW_AS_LABEL), FN_UNO_RANGE_ROW_LABEL, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
{ OUString(UNO_NAME_CHART_COLUMN_AS_LABEL), FN_UNO_RANGE_COL_LABEL, cppu::UnoType<bool>::get() , PROPERTY_NONE, 0},
{ OUString(UNO_NAME_TABLE_BORDER), FN_UNO_TABLE_BORDER, cppu::UnoType<css::table::TableBorder>::get(), PropertyAttribute::MAYBEVOID, CONVERT_TWIPS },
@@ -706,7 +706,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetTablePropertyMap()
{ OUString(UNO_NAME_TABLE_COLUMN_SEPARATORS), FN_UNO_TABLE_COLUMN_SEPARATORS, cppu::UnoType< cppu::UnoSequenceType<css::text::TableColumnSeparator> >::get(), PropertyAttribute::MAYBEVOID, 0 },
{ OUString(UNO_NAME_TABLE_COLUMN_RELATIVE_SUM), FN_UNO_TABLE_COLUMN_RELATIVE_SUM, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::READONLY, 0 },
COMMON_TEXT_CONTENT_PROPERTIES
- { OUString(UNO_LINK_DISPLAY_NAME), FN_PARAM_LINK_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xff},
+ { OUString(UNO_LINK_DISPLAY_NAME), FN_PARAM_LINK_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xbf},
{ OUString(UNO_NAME_USER_DEFINED_ATTRIBUTES), RES_UNKNOWNATR_CONTAINER, cppu::UnoType<css::container::XNameContainer>::get(), PropertyAttribute::MAYBEVOID, 0 },
{ OUString(UNO_NAME_TEXT_SECTION), FN_UNO_TEXT_SECTION, cppu::UnoType<css::text::XTextSection>::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY ,0 },
{ OUString(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
@@ -764,7 +764,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetSectionPropertyMap(
{ OUString(UNO_NAME_BACK_GRAPHIC_LOCATION), RES_BACKGROUND, cppu::UnoType<css::style::GraphicLocation>::get(), PROPERTY_NONE ,MID_GRAPHIC_POSITION},
{ OUString(UNO_NAME_BACK_COLOR), RES_BACKGROUND, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE ,MID_BACK_COLOR },
{ OUString(UNO_NAME_BACK_TRANSPARENT), RES_BACKGROUND, cppu::UnoType<bool>::get(), PROPERTY_NONE ,MID_GRAPHIC_TRANSPARENT },
- { OUString(UNO_LINK_DISPLAY_NAME), FN_PARAM_LINK_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xff},
+ { OUString(UNO_LINK_DISPLAY_NAME), FN_PARAM_LINK_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xbf},
{ OUString(UNO_NAME_USER_DEFINED_ATTRIBUTES), RES_UNKNOWNATR_CONTAINER, cppu::UnoType<css::container::XNameContainer>::get(), PropertyAttribute::MAYBEVOID, 0 },
{ OUString(UNO_NAME_FOOTNOTE_IS_COLLECT_AT_TEXT_END), RES_FTN_AT_TXTEND, cppu::UnoType<bool>::get(), PROPERTY_NONE ,MID_COLLECT },
{ OUString(UNO_NAME_FOOTNOTE_IS_RESTART_NUMBERING), RES_FTN_AT_TXTEND, cppu::UnoType<bool>::get(), PROPERTY_NONE , MID_RESTART_NUM },
@@ -984,7 +984,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetBookmarkPropertyMap
{
static SfxItemPropertyMapEntry const aBookmarkPropertyMap_Impl [] =
{
- { OUString(UNO_LINK_DISPLAY_NAME), FN_PARAM_LINK_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xff},
+ { OUString(UNO_LINK_DISPLAY_NAME), FN_PARAM_LINK_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xbf},
COMMON_TEXT_CONTENT_PROPERTIES
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
diff --git a/sw/source/core/unocore/unomapproperties.hxx b/sw/source/core/unocore/unomapproperties.hxx
index 3881ef17767c..0cb31ccf5faf 100644
--- a/sw/source/core/unocore/unomapproperties.hxx
+++ b/sw/source/core/unocore/unomapproperties.hxx
@@ -61,8 +61,8 @@
{ OUString(UNO_NAME_CHAR_LOCALE_COMPLEX), RES_CHRATR_CTL_LANGUAGE , cppu::UnoType<css::lang::Locale>::get() , PropertyAttribute::MAYBEVOID, MID_LANG_LOCALE },
#define REDLINE_NODE_PROPERTIES \
- { OUString(UNO_NAME_START_REDLINE), FN_UNO_REDLINE_NODE_START , cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0xff }, \
- { OUString(UNO_NAME_END_REDLINE), FN_UNO_REDLINE_NODE_END , cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0xff },
+ { OUString(UNO_NAME_START_REDLINE), FN_UNO_REDLINE_NODE_START , cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0xbf }, \
+ { OUString(UNO_NAME_END_REDLINE), FN_UNO_REDLINE_NODE_END , cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0xbf },
#define REDLINE_PROPERTIES \
{OUString(UNO_NAME_REDLINE_AUTHOR), 0, cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},\
@@ -250,7 +250,7 @@
{ OUString(UNO_NAME_CONTENT_SECTION), WID_IDX_CONTENT_SECTION, cppu::UnoType<css::text::XTextSection>::get() , PropertyAttribute::READONLY, 0},\
{ OUString(UNO_NAME_HEADER_SECTION), WID_IDX_HEADER_SECTION, cppu::UnoType<css::text::XTextSection>::get() , PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, 0},\
-#define ANCHOR_TYPES_PROPERTY { OUString(UNO_NAME_ANCHOR_TYPES), FN_UNO_ANCHOR_TYPES, cppu::UnoType< cppu::UnoSequenceType<css::text::TextContentAnchorType> >::get(),PropertyAttribute::READONLY, 0xff},
+#define ANCHOR_TYPES_PROPERTY { OUString(UNO_NAME_ANCHOR_TYPES), FN_UNO_ANCHOR_TYPES, cppu::UnoType< cppu::UnoSequenceType<css::text::TextContentAnchorType> >::get(),PropertyAttribute::READONLY, 0xbf},
// #i18732# #i28701# #i73249#
// all users of COMMON_FRAME_PROPERTIES add the new XATTR_FILL_FIRST, XATTR_FILL_LAST FillStyle,
@@ -315,7 +315,7 @@
{ OUString(UNO_NAME_RIGHT_BORDER_DISTANCE), RES_BOX, cppu::UnoType<sal_Int32>::get(), 0, RIGHT_BORDER_DISTANCE |CONVERT_TWIPS }, \
{ OUString(UNO_NAME_TOP_BORDER_DISTANCE), RES_BOX, cppu::UnoType<sal_Int32>::get(), 0, TOP_BORDER_DISTANCE |CONVERT_TWIPS }, \
{ OUString(UNO_NAME_BOTTOM_BORDER_DISTANCE), RES_BOX, cppu::UnoType<sal_Int32>::get(), 0, BOTTOM_BORDER_DISTANCE|CONVERT_TWIPS }, \
- { OUString(UNO_LINK_DISPLAY_NAME), FN_PARAM_LINK_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xff}, \
+ { OUString(UNO_LINK_DISPLAY_NAME), FN_PARAM_LINK_DISPLAY_NAME, cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0xbf}, \
{ OUString(UNO_NAME_USER_DEFINED_ATTRIBUTES), RES_UNKNOWNATR_CONTAINER, cppu::UnoType<css::container::XNameContainer>::get(), PropertyAttribute::MAYBEVOID, 0 },\
{ OUString(UNO_NAME_Z_ORDER), FN_UNO_Z_ORDER, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0}, \
{ OUString(UNO_NAME_IS_FOLLOWING_TEXT_FLOW), RES_FOLLOW_TEXT_FLOW, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, \
@@ -486,8 +486,8 @@
{ OUString(UNO_NAME_SW_FILLBMP_POSITION_OFFSET_X), XATTR_FILLBMP_POSOFFSETX, cppu::UnoType<sal_Int32>::get(), 0, 0}, \
{ OUString(UNO_NAME_SW_FILLBMP_POSITION_OFFSET_Y), XATTR_FILLBMP_POSOFFSETY, cppu::UnoType<sal_Int32>::get(), 0, 0}, \
{ OUString(UNO_NAME_SW_FILLBMP_RECTANGLE_POINT), XATTR_FILLBMP_POS, cppu::UnoType<css::drawing::RectanglePoint>::get(), 0, 0}, \
- { OUString(UNO_NAME_SW_FILLBMP_SIZE_X), XATTR_FILLBMP_SIZEX, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, \
- { OUString(UNO_NAME_SW_FILLBMP_SIZE_Y), XATTR_FILLBMP_SIZEY, cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, \
+ { OUString(UNO_NAME_SW_FILLBMP_SIZE_X), XATTR_FILLBMP_SIZEX, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
+ { OUString(UNO_NAME_SW_FILLBMP_SIZE_Y), XATTR_FILLBMP_SIZEY, cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
{ OUString(UNO_NAME_SW_FILLBMP_STRETCH), XATTR_FILLBMP_STRETCH, cppu::UnoType<bool>::get(), 0, 0}, \
{ OUString(UNO_NAME_SW_FILLBMP_TILE), XATTR_FILLBMP_TILE, cppu::UnoType<bool>::get(), 0, 0},\
{ OUString(UNO_NAME_SW_FILLBMP_MODE), OWN_ATTR_FILLBMP_MODE, cppu::UnoType<drawing::BitmapMode>::get(), 0, 0}, \
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 1d07c320bb12..f8a0983432e0 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -449,9 +449,8 @@ void SwXParagraph::Impl::GetSinglePropertyValue_Impl(
case RES_BACKGROUND:
{
const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND));
- const sal_uInt8 nMemberId(rEntry.nMemberId & (~SFX_METRIC_ITEM));
- if(!aOriginalBrushItem.QueryValue(rAny, nMemberId))
+ if(!aOriginalBrushItem.QueryValue(rAny, rEntry.nMemberId))
{
OSL_ENSURE(false, "Error getting attribute from RES_BACKGROUND (!)");
}
@@ -500,7 +499,7 @@ void SwXParagraph::Impl::GetSinglePropertyValue_Impl(
}
// check for needed metric translation
- if(rEntry.nMemberId & SFX_METRIC_ITEM)
+ if(rEntry.nMoreFlags & PropertyMoreFlags::METRIC_ITEM)
{
bool bDoIt(true);
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 3f8c632d1c38..536663c0e5ca 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1562,7 +1562,7 @@ const SwPageDesc* SwStyleBase_Impl::GetOldPageDesc()
sal_uInt8 lcl_TranslateMetric(const SfxItemPropertySimpleEntry& rEntry, SwDoc* pDoc, uno::Any& o_aValue)
{
// check for needed metric translation
- if(!(rEntry.nMemberId & SFX_METRIC_ITEM))
+ if(!(rEntry.nMoreFlags & PropertyMoreFlags::METRIC_ITEM))
return rEntry.nMemberId;
// exception: If these ItemTypes are used, do not convert when these are negative
// since this means they are intended as percent values
@@ -1571,13 +1571,13 @@ sal_uInt8 lcl_TranslateMetric(const SfxItemPropertySimpleEntry& rEntry, SwDoc* p
&& o_aValue.get<sal_Int32>() < 0)
return rEntry.nMemberId;
if(!pDoc)
- return rEntry.nMemberId & (~SFX_METRIC_ITEM);
+ return rEntry.nMemberId;
const SfxItemPool& rPool = pDoc->GetAttrPool();
const MapUnit eMapUnit(rPool.GetMetric(rEntry.nWID));
if(eMapUnit != MapUnit::Map100thMM)
SvxUnoConvertFromMM(eMapUnit, o_aValue);
- return rEntry.nMemberId & (~SFX_METRIC_ITEM);
+ return rEntry.nMemberId;
}
template<>
void SwXStyle::SetPropertyValue<HINT_BEGIN>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
@@ -2177,8 +2177,7 @@ template<>
uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_PAGEDESC)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, SwStyleBase_Impl& rBase)
{
PrepareStyleBase(rBase);
- const sal_uInt8 nMemberId(rEntry.nMemberId & (~SFX_METRIC_ITEM));
- if(MID_PAGEDESC_PAGEDESCNAME != nMemberId)
+ if(MID_PAGEDESC_PAGEDESCNAME != rEntry.nMemberId)
return GetStyleProperty<HINT_BEGIN>(rEntry, rPropSet, rBase);
// special handling for RES_PAGEDESC
const SfxPoolItem* pItem;
@@ -2276,9 +2275,8 @@ uno::Any SwXStyle::GetStyleProperty<sal_uInt16(RES_BACKGROUND)>(const SfxItemPro
PrepareStyleBase(rBase);
const SfxItemSet& rSet = rBase.GetItemSet();
const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rSet, RES_BACKGROUND));
- const sal_uInt8 nMemberId(rEntry.nMemberId & (~SFX_METRIC_ITEM));
uno::Any aResult;
- if(!aOriginalBrushItem.QueryValue(aResult, nMemberId))
+ if(!aOriginalBrushItem.QueryValue(aResult, rEntry.nMemberId))
SAL_WARN("sw.uno", "error getting attribute from RES_BACKGROUND.");
return aResult;
}
@@ -2307,7 +2305,7 @@ uno::Any SwXStyle::GetStyleProperty<HINT_BEGIN>(const SfxItemPropertySimpleEntry
if(rEntry.aType == cppu::UnoType<sal_Int16>::get() && aResult.getValueType() == cppu::UnoType<sal_Int32>::get())
aResult <<= static_cast<sal_Int16>(aResult.get<sal_Int32>());
// check for needed metric translation
- if(rEntry.nMemberId & SFX_METRIC_ITEM && GetDoc())
+ if(rEntry.nMoreFlags & PropertyMoreFlags::METRIC_ITEM && GetDoc())
{
const SfxItemPool& rPool = GetDoc()->GetAttrPool();
const MapUnit eMapUnit(rPool.GetMetric(rEntry.nWID));
@@ -3239,8 +3237,7 @@ uno::Sequence<uno::Any> SwXPageStyle::GetPropertyValues_Impl(const uno::Sequence
rtl::Reference<SwDocStyleSheet> xStyle(new SwDocStyleSheet(*static_cast<SwDocStyleSheet*>(pBase)));
const SfxItemSet& rSet = xStyle->GetItemSet();
const SfxPoolItem& rItem = rSet.Get(FN_PARAM_FTN_INFO);
- const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
- rItem.QueryValue(aRet[nProp], nMemberId);
+ rItem.QueryValue(aRet[nProp], pEntry->nMemberId);
}
break;
default:
@@ -3560,11 +3557,11 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
continue;
}
- const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
+ const sal_uInt8 nMemberId(pEntry->nMemberId);
bool bDone(false);
// check for needed metric translation
- if(pEntry->nMemberId & SFX_METRIC_ITEM)
+ if(pEntry->nMoreFlags & PropertyMoreFlags::METRIC_ITEM)
{
bool bDoIt(true);
@@ -3967,9 +3964,8 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl(
case RES_BACKGROUND:
{
const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(*mpSet, RES_BACKGROUND));
- const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));
- if(!aOriginalBrushItem.QueryValue(aTarget, nMemberId))
+ if(!aOriginalBrushItem.QueryValue(aTarget, pEntry->nMemberId))
{
OSL_ENSURE(false, "Error getting attribute from RES_BACKGROUND (!)");
}
@@ -4019,7 +4015,7 @@ uno::Sequence< uno::Any > SwXAutoStyle::GetPropertyValues_Impl(
}
// check for needed metric translation
- if(pEntry->nMemberId & SFX_METRIC_ITEM)
+ if(pEntry->nMoreFlags & PropertyMoreFlags::METRIC_ITEM)
{
bool bDoIt(true);
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 9ee71e613a54..210eb3881b19 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2502,7 +2502,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- if(0xFF == pEntry->nMemberId)
+ if(0xBF == pEntry->nMemberId)
{
lcl_SetSpecialProperty(pFormat, pEntry, aValue);
}
@@ -2754,7 +2754,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
if(pFormat)
{
- if(0xFF == pEntry->nMemberId)
+ if(0xBF == pEntry->nMemberId)
{
aRet = lcl_GetSpecialProperty(pFormat, pEntry );
}