editeng/source/uno/unoipset.cxx             |   15 +++---
 include/comphelper/propertysetinfo.hxx      |   34 ++++++++++++++
 include/editeng/unoipset.hxx                |    2 
 include/editeng/unotext.hxx                 |   10 ++--
 include/svl/itemprop.hxx                    |   54 ++++++++++++++++++++++-
 include/svx/svddef.hxx                      |    3 -
 include/svx/unoshprp.hxx                    |   64 ++++++++++++++--------------
 sd/source/ui/unoidl/unomodel.cxx            |   28 ++++++------
 svx/source/table/cell.cxx                   |    8 +--
 svx/source/unodraw/unopool.cxx              |    8 +--
 svx/source/unodraw/unoprov.cxx              |    6 +-
 sw/source/core/unocore/unoframe.cxx         |   12 ++---
 sw/source/core/unocore/unomap.cxx           |    4 -
 sw/source/core/unocore/unomap1.cxx          |   26 +++++------
 sw/source/core/unocore/unomapproperties.hxx |   12 ++---
 sw/source/core/unocore/unoparagraph.cxx     |    5 --
 sw/source/core/unocore/unostyle.cxx         |   26 ++++-------
 sw/source/core/unocore/unotbl.cxx           |    4 -
 18 files changed, 198 insertions(+), 123 deletions(-)

New commits:
commit ae5f89fdcccb2cf74256b04771249fc8afca8794
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Wed Jan 31 09:11:09 2018 +0200

    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.gran...@collabora.co.uk>
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 862a4f5caed5..01e014a47530 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -103,14 +103,14 @@ uno::Any SvxItemPropertySet::getPropertyValue( const 
SfxItemPropertySimpleEntry*
         pItem = &(pPool->GetDefaultItem( pMap->nWID ));
 
     const MapUnit eMapUnit = pPool ? 
pPool->GetMetric(static_cast<sal_uInt16>(pMap->nWID)) : MapUnit::Map100thMM;
-    sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
+    sal_uInt8 nMemberId = pMap->nMemberId;
     if( eMapUnit == MapUnit::Map100thMM )
         nMemberId &= (~CONVERT_TWIPS);
 
     if(pItem)
     {
         pItem->QueryValue( aVal, nMemberId );
-        if( pMap->nMemberId & SFX_METRIC_ITEM )
+        if( pMap->nMoreFlags & PropertyMoreFlags::METRIC_ITEM )
         {
             if( eMapUnit != MapUnit::Map100thMM )
             {
@@ -166,7 +166,7 @@ void SvxItemPropertySet::setPropertyValue( const 
SfxItemPropertySimpleEntry* pMa
         const MapUnit eMapUnit = pPool ? 
pPool->GetMetric(static_cast<sal_uInt16>(pMap->nWID)) : MapUnit::Map100thMM;
 
         // check for needed metric translation
-        if( (pMap->nMemberId & SFX_METRIC_ITEM) && eMapUnit != 
MapUnit::Map100thMM )
+        if( (pMap->nMoreFlags & PropertyMoreFlags::METRIC_ITEM) && eMapUnit != 
MapUnit::Map100thMM )
         {
             if ( !bDontConvertNegativeValues || SvxUnoCheckForPositiveValue( 
aValue ) )
                 SvxUnoConvertFromMM( eMapUnit, aValue );
@@ -174,7 +174,7 @@ void SvxItemPropertySet::setPropertyValue( const 
SfxItemPropertySimpleEntry* pMa
 
         SfxPoolItem *pNewItem = pItem->Clone();
 
-        sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
+        sal_uInt8 nMemberId = pMap->nMemberId;
         if( eMapUnit == MapUnit::Map100thMM )
             nMemberId &= (~CONVERT_TWIPS);
 
@@ -198,7 +198,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const 
SfxItemPropertySimpleEntry*
 
     // No UsrAny detected yet, generate Default entry and return this
     const MapUnit eMapUnit = 
mrItemPool.GetMetric(static_cast<sal_uInt16>(pMap->nWID));
-    sal_uInt8 nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM);
+    sal_uInt8 nMemberId = pMap->nMemberId;
     if( eMapUnit == MapUnit::Map100thMM )
         nMemberId &= (~CONVERT_TWIPS);
     uno::Any aVal;
@@ -222,10 +222,10 @@ uno::Any SvxItemPropertySet::getPropertyValue( const 
SfxItemPropertySimpleEntry*
         }
     }
 
-    if( pMap->nMemberId & SFX_METRIC_ITEM )
+    if( pMap->nMoreFlags & PropertyMoreFlags::METRIC_ITEM )
     {
         // check for needed metric translation
-        if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != 
MapUnit::Map100thMM)
+        if(pMap->nMoreFlags & PropertyMoreFlags::METRIC_ITEM && eMapUnit != 
MapUnit::Map100thMM)
         {
             SvxUnoConvertToMM( eMapUnit, aVal );
         }
@@ -299,6 +299,7 @@ void SvxUnoConvertToMM( const MapUnit eSourceMapUnit, 
uno::Any & rMetric ) throw
                 break;
             default:
                 SAL_WARN("editeng", "AW: Missing unit translation to 100th mm, 
" << OString::number(static_cast<sal_Int32>(rMetric.getValueTypeClass())));
+                assert(false);
             }
             break;
         }
diff --git a/include/comphelper/propertysetinfo.hxx 
b/include/comphelper/propertysetinfo.hxx
index 7d3359370106..84a9a28d18ab 100644
--- a/include/comphelper/propertysetinfo.hxx
+++ b/include/comphelper/propertysetinfo.hxx
@@ -27,8 +27,17 @@
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <comphelper/comphelperdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
 #include <memory>
 
+enum class PropertyMoreFlags : sal_uInt8 {
+    NONE            = 0x00,
+    METRIC_ITEM     = 0x01,
+};
+namespace o3tl {
+    template<> struct typed_flags<PropertyMoreFlags> : 
is_typed_flags<PropertyMoreFlags, 0x1> {};
+}
+
 namespace comphelper
 {
 
@@ -37,8 +46,33 @@ struct PropertyMapEntry
     OUString       maName;
     sal_Int32      mnHandle;
     css::uno::Type maType;
+    /// flag bitmap, @see css::beans::PropertyAttribute
     sal_Int16      mnAttributes;
     sal_uInt8      mnMemberId;
+    PropertyMoreFlags mnMoreFlags;
+
+    PropertyMapEntry(OUString _aName, sal_Int32 _nHandle, css::uno::Type const 
& _rType,
+                     sal_Int16 _nAttributes, sal_uInt8 _nMemberId, 
PropertyMoreFlags _nMoreFlags = PropertyMoreFlags::NONE)
+        : maName( _aName )
+        , mnHandle( _nHandle )
+        , maType( _rType )
+        , mnAttributes( _nAttributes )
+        , mnMemberId( _nMemberId )
+        , mnMoreFlags( _nMoreFlags )
+    {
+        assert(mnAttributes <= 0x1ff );
+        assert( (_nMemberId & 0x40) == 0 );
+        // Verify that if METRIC_ITEM is set, we are one of the types 
supported by
+        // SvxUnoConvertToMM.
+        assert(!(_nMoreFlags & PropertyMoreFlags::METRIC_ITEM) ||
+            ( (maType.getTypeClass() == css::uno::TypeClass_BYTE)
+              || (maType.getTypeClass() == css::uno::TypeClass_SHORT)
+              || (maType.getTypeClass() == css::uno::TypeClass_UNSIGNED_SHORT)
+              || (maType.getTypeClass() == css::uno::TypeClass_LONG)
+              || (maType.getTypeClass() == css::uno::TypeClass_UNSIGNED_LONG)
+            ) );
+    }
+    PropertyMapEntry() = default;
 };
 
 typedef std::map<OUString, PropertyMapEntry const *> PropertyMap;
diff --git a/include/editeng/unoipset.hxx b/include/editeng/unoipset.hxx
index 9d8471ca933a..ade689f1379d 100644
--- a/include/editeng/unoipset.hxx
+++ b/include/editeng/unoipset.hxx
@@ -31,8 +31,6 @@ class SfxItemSet;
 class SvxShape;
 struct SvxIDPropertyCombine;
 
-#define SFX_METRIC_ITEM                         (0x40)
-
 class EDITENG_DLLPUBLIC SvxItemPropertySet
 {
     SfxItemPropertyMap          m_aPropertyMap;
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index 4b4eb127aae0..514f83e8b6dd 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -137,15 +137,15 @@ class SvxItemPropertySet;
 
 #define SVX_UNOEDIT_PARA_PROPERTIES \
     {OUString(UNO_NAME_EDIT_PARA_ADJUST),       EE_PARA_JUST,               
::cppu::UnoType<sal_Int16>::get(),            0, MID_PARA_ADJUST }, \
-    {OUString(UNO_NAME_EDIT_PARA_BMARGIN),      EE_PARA_ULSPACE,            
::cppu::UnoType<sal_Int32>::get(),            0, MID_LO_MARGIN|SFX_METRIC_ITEM 
}, \
+    {OUString(UNO_NAME_EDIT_PARA_BMARGIN),      EE_PARA_ULSPACE,            
::cppu::UnoType<sal_Int32>::get(),            0, MID_LO_MARGIN, 
PropertyMoreFlags::METRIC_ITEM }, \
     {OUString(UNO_NAME_EDIT_PARA_IS_HYPHEN),    EE_PARA_HYPHENATE,  
::cppu::UnoType<bool>::get(),                0, 0 }, \
     {OUString(UNO_NAME_EDIT_PARA_LASTLINEADJ),  EE_PARA_JUST,               
::cppu::UnoType<sal_Int16>::get(),            0, MID_LAST_LINE_ADJUST }, \
-    {OUString(UNO_NAME_EDIT_PARA_LMARGIN),      EE_PARA_LRSPACE,    
::cppu::UnoType<sal_Int32>::get(),            0, 
MID_TXT_LMARGIN|SFX_METRIC_ITEM }, \
+    {OUString(UNO_NAME_EDIT_PARA_LMARGIN),      EE_PARA_LRSPACE,    
::cppu::UnoType<sal_Int32>::get(),            0, MID_TXT_LMARGIN, 
PropertyMoreFlags::METRIC_ITEM }, \
     {OUString(UNO_NAME_EDIT_PARA_LINESPACING),  EE_PARA_SBL,                
cppu::UnoType<css::style::LineSpacing>::get(),     0, CONVERT_TWIPS}, \
-    {OUString(UNO_NAME_EDIT_PARA_RMARGIN),      EE_PARA_LRSPACE,    
::cppu::UnoType<sal_Int32>::get(),            0, MID_R_MARGIN|SFX_METRIC_ITEM 
}, \
+    {OUString(UNO_NAME_EDIT_PARA_RMARGIN),      EE_PARA_LRSPACE,    
::cppu::UnoType<sal_Int32>::get(),            0, MID_R_MARGIN, 
PropertyMoreFlags::METRIC_ITEM }, \
     {OUString(UNO_NAME_EDIT_PARA_TAPSTOPS),     EE_PARA_TABS,               
cppu::UnoType<css::uno::Sequence< css::style::TabStop >>::get(), 0, 0 }, \
-    {OUString(UNO_NAME_EDIT_PARA_TMARGIN),      EE_PARA_ULSPACE,            
::cppu::UnoType<sal_Int32>::get(),            0, MID_UP_MARGIN|SFX_METRIC_ITEM 
},\
-    {OUString(UNO_NAME_EDIT_PARA_FIRST_LINE_INDENT),     EE_PARA_LRSPACE,   
::cppu::UnoType<sal_Int32>::get(),            0, 
MID_FIRST_LINE_INDENT|SFX_METRIC_ITEM}, \
+    {OUString(UNO_NAME_EDIT_PARA_TMARGIN),      EE_PARA_ULSPACE,            
::cppu::UnoType<sal_Int32>::get(),            0, MID_UP_MARGIN, 
PropertyMoreFlags::METRIC_ITEM },\
+    {OUString(UNO_NAME_EDIT_PARA_FIRST_LINE_INDENT),     EE_PARA_LRSPACE,   
::cppu::UnoType<sal_Int32>::get(),            0, MID_FIRST_LINE_INDENT, 
PropertyMoreFlags::METRIC_ITEM}, \
     
{OUString(UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION),EE_PARA_HANGINGPUNCTUATION,
  cppu::UnoType<bool>::get(),                0 ,0 }, \
     {OUString(UNO_NAME_EDIT_PARA_IS_CHARACTER_DISTANCE), 
EE_PARA_ASIANCJKSPACING,   cppu::UnoType<bool>::get(),                0 ,0 }, \
     {OUString(UNO_NAME_EDIT_PARA_IS_FORBIDDEN_RULES),    
EE_PARA_FORBIDDENRULES,     cppu::UnoType<bool>::get(),                0 ,0 },\
diff --git a/include/svl/itemprop.hxx b/include/svl/itemprop.hxx
index f674d70b6e6e..9dadda50d351 100644
--- a/include/svl/itemprop.hxx
+++ b/include/svl/itemprop.hxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
 #include <com/sun/star/beans/PropertyState.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <comphelper/propertysetinfo.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <svl/itemset.hxx>
 #include <svl/svldllapi.h>
@@ -35,19 +36,43 @@ struct SfxItemPropertyMapEntry
     sal_uInt16                          nWID;  ///< WhichId of SfxPoolItem
     css::uno::Type                      aType; ///< UNO type of property
     /// flag bitmap, @see css::beans::PropertyAttribute
-    long                                nFlags;
+    sal_Int16                           nFlags;
     /// "member ID" to tell QueryValue/PutValue which property it is
     /// (when multiple properties map to the same nWID)
     sal_uInt8                           nMemberId;
+    PropertyMoreFlags                   nMoreFlags;
 
+    SfxItemPropertyMapEntry(OUString _aName, sal_uInt16 _nWID, css::uno::Type 
const & _rType,
+                               sal_Int16 _nFlags, sal_uInt8 const _nMemberId, 
PropertyMoreFlags _nMoreFlags = PropertyMoreFlags::NONE)
+        : aName(      _aName )
+        , nWID(      _nWID )
+        , aType(     _rType )
+        , nFlags(    _nFlags )
+        , nMemberId( _nMemberId )
+        , nMoreFlags( _nMoreFlags )
+        {
+            assert(_nFlags <= 0x1ff );
+            assert( (_nMemberId & 0x40) == 0 );
+            // Verify that if METRIC_ITEM is set, we are one of the types 
supported by
+            // SvxUnoConvertToMM.
+            assert(!(_nMoreFlags & PropertyMoreFlags::METRIC_ITEM) ||
+                ( (aType.getTypeClass() == css::uno::TypeClass_BYTE)
+                  || (aType.getTypeClass() == css::uno::TypeClass_SHORT)
+                  || (aType.getTypeClass() == 
css::uno::TypeClass_UNSIGNED_SHORT)
+                  || (aType.getTypeClass() == css::uno::TypeClass_LONG)
+                  || (aType.getTypeClass() == 
css::uno::TypeClass_UNSIGNED_LONG)
+                ) );
+        }
 };
 
 struct SfxItemPropertySimpleEntry
 {
     sal_uInt16                          nWID;
     css::uno::Type                      aType;
-    long                                nFlags;
+    /// flag bitmap, @see css::beans::PropertyAttribute
+    sal_Int16                           nFlags;
     sal_uInt8                           nMemberId;
+    PropertyMoreFlags                   nMoreFlags = PropertyMoreFlags::NONE;
 
     SfxItemPropertySimpleEntry()
         : nWID( 0 )
@@ -57,12 +82,34 @@ struct SfxItemPropertySimpleEntry
         }
 
     SfxItemPropertySimpleEntry(sal_uInt16 _nWID, css::uno::Type const & _rType,
-                               long _nFlags)
+                               sal_Int16 _nFlags)
         : nWID(      _nWID )
         , aType(     _rType )
         , nFlags(    _nFlags )
         , nMemberId( 0 )
         {
+            assert(_nFlags <= 0x1ff );
+        }
+
+    SfxItemPropertySimpleEntry(sal_uInt16 _nWID, css::uno::Type const & _rType,
+                               sal_Int16 _nFlags, sal_uInt8 const _nMemberId, 
PropertyMoreFlags _nMoreFlags)
+        : nWID(      _nWID )
+        , aType(     _rType )
+        , nFlags(    _nFlags )
+        , nMemberId( _nMemberId )
+        , nMoreFlags( _nMoreFlags )
+        {
+            assert(_nFlags <= 0x1ff );
+            assert( (_nMemberId & 0x40) == 0 );
+            // Verify that if METRIC_ITEM is set, we are one of the types 
supported by
+            // SvxUnoConvertToMM.
+            assert((_nMoreFlags & PropertyMoreFlags::METRIC_ITEM) &&
+                ( (aType.getTypeClass() == css::uno::TypeClass_BYTE)
+                  || (aType.getTypeClass() == css::uno::TypeClass_SHORT)
+                  || (aType.getTypeClass() == 
css::uno::TypeClass_UNSIGNED_SHORT)
+                  || (aType.getTypeClass() == css::uno::TypeClass_LONG)
+                  || (aType.getTypeClass() == 
css::uno::TypeClass_UNSIGNED_LONG)
+                ) );
         }
 
     SfxItemPropertySimpleEntry( const SfxItemPropertyMapEntry* pMapEntry )
@@ -70,6 +117,7 @@ struct SfxItemPropertySimpleEntry
         , aType( pMapEntry->aType )
         , nFlags( pMapEntry->nFlags )
         , nMemberId( pMapEntry->nMemberId )
+        , nMoreFlags( pMapEntry->nMoreFlags )
         {
         }
 
diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx
index 9ed6ba2bff7c..475a09d9c590 100644
--- a/include/svx/svddef.hxx
+++ b/include/svx/svddef.hxx
@@ -158,6 +158,7 @@ class SvxBoxInfoItem;
 class SvxBoxItem;
 class SvxColorItem;
 class SvxLineItem;
+class SvxTextRotateItem;
 class SvxWritingModeItem;
 class XColorItem;
 
@@ -396,7 +397,7 @@ class XColorItem;
 #define SDRATTR_TABLE_BORDER_INNER              
TypedWhichId<SvxBoxInfoItem>(SDRATTR_TABLE_FIRST+1)
 #define SDRATTR_TABLE_BORDER_TLBR               
TypedWhichId<SvxLineItem>(SDRATTR_TABLE_FIRST+2)
 #define SDRATTR_TABLE_BORDER_BLTR               
TypedWhichId<SvxLineItem>(SDRATTR_TABLE_FIRST+3)
-#define SDRATTR_TABLE_TEXT_ROTATION             (SDRATTR_TABLE_FIRST+4)
+#define SDRATTR_TABLE_TEXT_ROTATION             
TypedWhichId<SvxTextRotateItem>(SDRATTR_TABLE_FIRST+4)
 
 #define SDRATTR_TABLE_LAST                      (SDRATTR_TABLE_TEXT_ROTATION)
 
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 1f34dc5112b2..b68e473e339e 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -196,14 +196,14 @@
 #define FONTWORK_PROPERTIES \
     { OUString("FontWorkStyle"),            XATTR_FORMTXTSTYLE,         
/*ENUM*/::cppu::UnoType<sal_Int32>::get(),    0,  0}, \
     { OUString("FontWorkAdjust"),           XATTR_FORMTXTADJUST,        
/*ENUM*/::cppu::UnoType<sal_Int32>::get(),    0,  0}, \
-    { OUString("FontWorkDistance"),         XATTR_FORMTXTDISTANCE,      
::cppu::UnoType<sal_Int32>::get(),            0,  SFX_METRIC_ITEM}, \
-    { OUString("FontWorkStart"),            XATTR_FORMTXTSTART,         
::cppu::UnoType<sal_Int32>::get(),            0,  SFX_METRIC_ITEM}, \
+    { OUString("FontWorkDistance"),         XATTR_FORMTXTDISTANCE,      
::cppu::UnoType<sal_Int32>::get(),            0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString("FontWorkStart"),            XATTR_FORMTXTSTART,         
::cppu::UnoType<sal_Int32>::get(),            0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
     { OUString("FontWorkMirror"),           XATTR_FORMTXTMIRROR,        
cppu::UnoType<bool>::get(),                        0,  0}, \
     { OUString("FontWorkOutline"),          XATTR_FORMTXTOUTLINE,       
cppu::UnoType<bool>::get(),                        0,  0}, \
     { OUString("FontWorkShadow"),           XATTR_FORMTXTSHADOW,        
/*ENUM*/::cppu::UnoType<sal_Int32>::get(),    0,  0}, \
     { OUString("FontWorkShadowColor"),      XATTR_FORMTXTSHDWCOLOR,     
::cppu::UnoType<sal_Int32>::get(),            0,  0}, \
-    { OUString("FontWorkShadowOffsetX"),    XATTR_FORMTXTSHDWXVAL,      
::cppu::UnoType<sal_Int32>::get(),            0,  SFX_METRIC_ITEM}, \
-    { OUString("FontWorkShadowOffsetY"),    XATTR_FORMTXTSHDWYVAL,      
::cppu::UnoType<sal_Int32>::get(),            0,  SFX_METRIC_ITEM}, \
+    { OUString("FontWorkShadowOffsetX"),    XATTR_FORMTXTSHDWXVAL,      
::cppu::UnoType<sal_Int32>::get(),            0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString("FontWorkShadowOffsetY"),    XATTR_FORMTXTSHDWYVAL,      
::cppu::UnoType<sal_Int32>::get(),            0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
     { OUString("FontWorkHideForm"),         XATTR_FORMTXTHIDEFORM,      
cppu::UnoType<bool>::get(),                        0,  0}, \
     { OUString("FontWorkShadowTransparence"),XATTR_FORMTXTSHDWTRANSP,   
::cppu::UnoType<sal_Int16>::get(),            0,  0},
 
@@ -211,20 +211,20 @@
     { OUString(UNO_NAME_SHADOW),            SDRATTR_SHADOW,             
cppu::UnoType<bool>::get(),    0,      0}, \
     { OUString(UNO_NAME_SHADOWCOLOR),       SDRATTR_SHADOWCOLOR,        
::cppu::UnoType<sal_Int32>::get(),    0,      0}, \
     { OUString(UNO_NAME_SHADOWTRANSPARENCE),SDRATTR_SHADOWTRANSPARENCE, 
::cppu::UnoType<sal_Int16>::get(),    0,      0}, \
-    { OUString(UNO_NAME_SHADOWXDIST),       SDRATTR_SHADOWXDIST,        
::cppu::UnoType<sal_Int32>::get(),    0,      SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_SHADOWYDIST),       SDRATTR_SHADOWYDIST,        
::cppu::UnoType<sal_Int32>::get(),    0,      SFX_METRIC_ITEM},
+    { OUString(UNO_NAME_SHADOWXDIST),       SDRATTR_SHADOWXDIST,        
::cppu::UnoType<sal_Int32>::get(),    0,      0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_SHADOWYDIST),       SDRATTR_SHADOWYDIST,        
::cppu::UnoType<sal_Int32>::get(),    0,      0, 
PropertyMoreFlags::METRIC_ITEM},
 
 #define LINE_PROPERTIES_DEFAULTS\
     { OUString(UNO_NAME_LINECAP),           XATTR_LINECAP,          
::cppu::UnoType<css::drawing::LineCap>::get(),     0,     0}, \
     { OUString(UNO_NAME_LINECOLOR),         XATTR_LINECOLOR,        
::cppu::UnoType<sal_Int32>::get() ,           0,     0}, \
     { OUString(UNO_NAME_LINEENDCENTER),     XATTR_LINEENDCENTER,    
cppu::UnoType<bool>::get() ,           0,     0}, \
-    { OUString(UNO_NAME_LINEENDWIDTH),      XATTR_LINEENDWIDTH,     
::cppu::UnoType<sal_Int32>::get() ,           0,     SFX_METRIC_ITEM}, \
+    { OUString(UNO_NAME_LINEENDWIDTH),      XATTR_LINEENDWIDTH,     
::cppu::UnoType<sal_Int32>::get() ,           0,     0, 
PropertyMoreFlags::METRIC_ITEM}, \
     { OUString(UNO_NAME_LINEJOINT),         XATTR_LINEJOINT,        
::cppu::UnoType<css::drawing::LineJoint>::get(),     0,     0}, \
     { OUString(UNO_NAME_LINESTARTCENTER),   XATTR_LINESTARTCENTER,  
cppu::UnoType<bool>::get() ,           0,     0}, \
-    { OUString(UNO_NAME_LINESTARTWIDTH),    XATTR_LINESTARTWIDTH,   
::cppu::UnoType<sal_Int32>::get() ,           0,     SFX_METRIC_ITEM}, \
+    { OUString(UNO_NAME_LINESTARTWIDTH),    XATTR_LINESTARTWIDTH,   
::cppu::UnoType<sal_Int32>::get() ,           0,     0, 
PropertyMoreFlags::METRIC_ITEM}, \
     { OUString(UNO_NAME_LINESTYLE),         XATTR_LINESTYLE,        
cppu::UnoType<css::drawing::LineStyle>::get() ,        0,     0},  \
     { OUString(UNO_NAME_LINETRANSPARENCE),  XATTR_LINETRANSPARENCE, 
::cppu::UnoType<sal_Int16>::get() ,           0,     0}, \
-    { OUString(UNO_NAME_LINEWIDTH),         XATTR_LINEWIDTH,        
::cppu::UnoType<sal_Int32>::get() ,           0,     SFX_METRIC_ITEM},
+    { OUString(UNO_NAME_LINEWIDTH),         XATTR_LINEWIDTH,        
::cppu::UnoType<sal_Int32>::get() ,           0,     0, 
PropertyMoreFlags::METRIC_ITEM},
 
 #define LINE_PROPERTIES \
     { OUString(UNO_NAME_LINEDASH),          XATTR_LINEDASH,         
::cppu::UnoType<css::drawing::LineDash>::get() ,         0,     MID_LINEDASH},  
 \
@@ -244,8 +244,8 @@
     { OUString(UNO_NAME_FILLBMP_POSITION_OFFSET_X), XATTR_FILLBMP_POSOFFSETX,  
 ::cppu::UnoType<sal_Int32>::get() ,           0,     0}, \
     { OUString(UNO_NAME_FILLBMP_POSITION_OFFSET_Y), XATTR_FILLBMP_POSOFFSETY,  
 ::cppu::UnoType<sal_Int32>::get() ,           0,     0}, \
     { OUString(UNO_NAME_FILLBMP_RECTANGLE_POINT),   XATTR_FILLBMP_POS,         
 ::cppu::UnoType<css::drawing::RectanglePoint>::get() , 0,     0}, \
-    { OUString(UNO_NAME_FILLBMP_SIZE_X),            XATTR_FILLBMP_SIZEX,       
 ::cppu::UnoType<sal_Int32>::get() ,           0,     SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_FILLBMP_SIZE_Y),            XATTR_FILLBMP_SIZEY,       
 ::cppu::UnoType<sal_Int32>::get() ,           0,     SFX_METRIC_ITEM},    \
+    { OUString(UNO_NAME_FILLBMP_SIZE_X),            XATTR_FILLBMP_SIZEX,       
 ::cppu::UnoType<sal_Int32>::get() ,           0,     0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_FILLBMP_SIZE_Y),            XATTR_FILLBMP_SIZEY,       
 ::cppu::UnoType<sal_Int32>::get() ,           0,     0, 
PropertyMoreFlags::METRIC_ITEM},    \
     { OUString(UNO_NAME_FILLBMP_STRETCH),           XATTR_FILLBMP_STRETCH,     
 cppu::UnoType<bool>::get() ,           0,     0}, \
     { OUString(UNO_NAME_FILLBMP_TILE),              XATTR_FILLBMP_TILE,        
 cppu::UnoType<bool>::get() ,           0,     0},\
     { OUString(UNO_NAME_FILLBMP_MODE),              OWN_ATTR_FILLBMP_MODE,     
 ::cppu::UnoType<css::drawing::BitmapMode>::get(),            0,     0},
@@ -273,7 +273,7 @@
     { OUString(UNO_NAME_GRAPHIC_GRAPHICCROP), SDRATTR_GRAFCROP      , 
::cppu::UnoType<css::text::GraphicCrop>::get(), 0, 0 },
 
 #define EDGERADIUS_PROPERTIES \
-    { OUString(UNO_NAME_EDGERADIUS),        SDRATTR_ECKENRADIUS     , 
::cppu::UnoType<sal_Int32>::get()  ,            0,     SFX_METRIC_ITEM},
+    { OUString(UNO_NAME_EDGERADIUS),        SDRATTR_ECKENRADIUS     , 
::cppu::UnoType<sal_Int32>::get()  ,            0,     0, 
PropertyMoreFlags::METRIC_ITEM},
 
 #define TEXT_PROPERTIES_DEFAULTS\
     { OUString(UNO_NAME_TEXT_WRITINGMODE),      SDRATTR_TEXTDIRECTION,         
 ::cppu::UnoType<css::text::WritingMode>::get(),      0,      0},\
@@ -289,14 +289,14 @@
     { OUString(UNO_NAME_TEXT_CONTOURFRAME),     SDRATTR_TEXT_CONTOURFRAME,     
 cppu::UnoType<bool>::get(),        0,      0}, \
     { OUString(UNO_NAME_TEXT_FITTOSIZE),        SDRATTR_TEXT_FITTOSIZE,        
 cppu::UnoType<css::drawing::TextFitToSizeType>::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_MAXFRAMEHEIGHT),   SDRATTR_TEXT_MAXFRAMEHEIGHT,   
 ::cppu::UnoType<sal_Int32>::get(),        0,      SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_TEXT_MAXFRAMEWIDTH),    SDRATTR_TEXT_MAXFRAMEWIDTH,    
 ::cppu::UnoType<sal_Int32>::get(),        0,      SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_TEXT_MINFRAMEHEIGHT),   SDRATTR_TEXT_MINFRAMEHEIGHT,   
 ::cppu::UnoType<sal_Int32>::get(),        0,      SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_TEXT_MINFRAMEWIDTH),    SDRATTR_TEXT_MINFRAMEWIDTH,    
 ::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_MAXFRAMEHEIGHT),   SDRATTR_TEXT_MAXFRAMEHEIGHT,   
 ::cppu::UnoType<sal_Int32>::get(),        0,      0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_TEXT_MAXFRAMEWIDTH),    SDRATTR_TEXT_MAXFRAMEWIDTH,    
 ::cppu::UnoType<sal_Int32>::get(),        0,      0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_TEXT_MINFRAMEHEIGHT),   SDRATTR_TEXT_MINFRAMEHEIGHT,   
 ::cppu::UnoType<sal_Int32>::get(),        0,      0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_TEXT_MINFRAMEWIDTH),    SDRATTR_TEXT_MINFRAMEWIDTH,    
 ::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_FONTINDEPENDENTLINESPACING),SDRATTR_TEXT_USEFIXEDCELLHEIGHT,cppu::UnoType<bool>::get(),
                   0,      0},               \
     { 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}, \
@@ -354,9 +354,9 @@
 
 #define SPECIAL_CONNECTOR_PROPERTIES \
     CONNECTOR_PROPERTIES \
-    { OUString(UNO_NAME_EDGELINE1DELTA),    SDRATTR_EDGELINE1DELTA,     
::cppu::UnoType<sal_Int32>::get(),       0,     SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_EDGELINE2DELTA),    SDRATTR_EDGELINE2DELTA,     
::cppu::UnoType<sal_Int32>::get(),       0,     SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_EDGELINE3DELTA),    SDRATTR_EDGELINE3DELTA,     
::cppu::UnoType<sal_Int32>::get(),       0,     SFX_METRIC_ITEM}, \
+    { OUString(UNO_NAME_EDGELINE1DELTA),    SDRATTR_EDGELINE1DELTA,     
::cppu::UnoType<sal_Int32>::get(),       0,     0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_EDGELINE2DELTA),    SDRATTR_EDGELINE2DELTA,     
::cppu::UnoType<sal_Int32>::get(),       0,     0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_EDGELINE3DELTA),    SDRATTR_EDGELINE3DELTA,     
::cppu::UnoType<sal_Int32>::get(),       0,     0, 
PropertyMoreFlags::METRIC_ITEM}, \
     { OUString("StartShape"),               OWN_ATTR_EDGE_START_OBJ,    
cppu::UnoType<css::drawing::XShape>::get(),        
css::beans::PropertyAttribute::MAYBEVOID,   0}, \
     { OUString("StartGluePointIndex"),      OWN_ATTR_GLUEID_HEAD,       
::cppu::UnoType<sal_Int32>::get(),       0,     0}, \
     { OUString("StartPosition"),            OWN_ATTR_EDGE_START_POS,    
::cppu::UnoType<css::awt::Point>::get(),     0,   0}, \
@@ -374,13 +374,13 @@
 #define SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS \
     { OUString(UNO_NAME_MEASUREBELOWREFEDGE),       
SDRATTR_MEASUREBELOWREFEDGE,        cppu::UnoType<bool>::get(),        0,  0}, \
     { OUString(UNO_NAME_MEASUREFORMATSTRING),       
SDRATTR_MEASUREFORMATSTRING,        ::cppu::UnoType<OUString>::get(),      0,  
0}, \
-    { OUString(UNO_NAME_MEASUREHELPLINE1LEN),       
SDRATTR_MEASUREHELPLINE1LEN,        ::cppu::UnoType<sal_Int32>::get(),        
0,  SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_MEASUREHELPLINE2LEN),       
SDRATTR_MEASUREHELPLINE2LEN,        ::cppu::UnoType<sal_Int32>::get(),        
0,  SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_MEASUREHELPLINEDIST),       
SDRATTR_MEASUREHELPLINEDIST,        ::cppu::UnoType<sal_Int32>::get(),        
0,  SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_MEASUREHELPLINEOVERHANG),   
SDRATTR_MEASUREHELPLINEOVERHANG,    ::cppu::UnoType<sal_Int32>::get(),        
0,  SFX_METRIC_ITEM}, \
+    { OUString(UNO_NAME_MEASUREHELPLINE1LEN),       
SDRATTR_MEASUREHELPLINE1LEN,        ::cppu::UnoType<sal_Int32>::get(),        
0,  0, PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_MEASUREHELPLINE2LEN),       
SDRATTR_MEASUREHELPLINE2LEN,        ::cppu::UnoType<sal_Int32>::get(),        
0,  0, PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_MEASUREHELPLINEDIST),       
SDRATTR_MEASUREHELPLINEDIST,        ::cppu::UnoType<sal_Int32>::get(),        
0,  0, PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_MEASUREHELPLINEOVERHANG),   
SDRATTR_MEASUREHELPLINEOVERHANG,    ::cppu::UnoType<sal_Int32>::get(),        
0,  0, PropertyMoreFlags::METRIC_ITEM}, \
     { OUString(UNO_NAME_MEASUREKIND),               SDRATTR_MEASUREKIND,       
         ::cppu::UnoType<css::drawing::MeasureKind>::get(),   0,  0}, \
-    { OUString(UNO_NAME_MEASURELINEDIST),           SDRATTR_MEASURELINEDIST,   
         ::cppu::UnoType<sal_Int32>::get(),        0,  SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_MEASUREOVERHANG),           SDRATTR_MEASUREOVERHANG,   
         ::cppu::UnoType<sal_Int32>::get(),        0,  SFX_METRIC_ITEM}, \
+    { OUString(UNO_NAME_MEASURELINEDIST),           SDRATTR_MEASURELINEDIST,   
         ::cppu::UnoType<sal_Int32>::get(),        0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_MEASUREOVERHANG),           SDRATTR_MEASUREOVERHANG,   
         ::cppu::UnoType<sal_Int32>::get(),        0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
     { OUString(UNO_NAME_MEASUREUNIT),               SDRATTR_MEASUREUNIT,       
         ::cppu::UnoType<sal_Int32>::get(),    0,  0},\
     { OUString(UNO_NAME_MEASURESHOWUNIT),           SDRATTR_MEASURESHOWUNIT,   
         cppu::UnoType<bool>::get(),        0,  0}, \
     { OUString(UNO_NAME_MEASURETEXTAUTOANGLE),      
SDRATTR_MEASURETEXTAUTOANGLE,       cppu::UnoType<bool>::get(),        0,  0}, \
@@ -444,8 +444,8 @@
 
 #define SPECIAL_3DSCENEOBJECT_PROPERTIES_DEFAULTS \
     { OUString(UNO_NAME_3D_SCENE_AMBIENTCOLOR),     
SDRATTR_3DSCENE_AMBIENTCOLOR   , ::cppu::UnoType<sal_Int32>::get(),   0,  0}, \
-    { OUString(UNO_NAME_3D_SCENE_DISTANCE),         SDRATTR_3DSCENE_DISTANCE   
    , ::cppu::UnoType<sal_Int32>::get(),   0,  SFX_METRIC_ITEM}, \
-    { OUString(UNO_NAME_3D_SCENE_FOCAL_LENGTH),     
SDRATTR_3DSCENE_FOCAL_LENGTH   , ::cppu::UnoType<sal_Int32>::get(),   0,  
SFX_METRIC_ITEM}, \
+    { OUString(UNO_NAME_3D_SCENE_DISTANCE),         SDRATTR_3DSCENE_DISTANCE   
    , ::cppu::UnoType<sal_Int32>::get(),   0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
+    { OUString(UNO_NAME_3D_SCENE_FOCAL_LENGTH),     
SDRATTR_3DSCENE_FOCAL_LENGTH   , ::cppu::UnoType<sal_Int32>::get(),   0,  0, 
PropertyMoreFlags::METRIC_ITEM}, \
     { OUString(UNO_NAME_3D_SCENE_LIGHTCOLOR_1),     
SDRATTR_3DSCENE_LIGHTCOLOR_1       , ::cppu::UnoType<sal_Int32>::get(),   0,  
0}, \
     { OUString(UNO_NAME_3D_SCENE_LIGHTCOLOR_2),     
SDRATTR_3DSCENE_LIGHTCOLOR_2       , ::cppu::UnoType<sal_Int32>::get(),   0,  
0}, \
     { OUString(UNO_NAME_3D_SCENE_LIGHTCOLOR_3),     
SDRATTR_3DSCENE_LIGHTCOLOR_3       , ::cppu::UnoType<sal_Int32>::get(),   0,  
0}, \
@@ -530,7 +530,7 @@
 #define SPECIAL_3DEXTRUDEOBJECT_PROPERTIES \
     { OUString(UNO_NAME_3D_TRANSFORM_MATRIX) 
,OWN_ATTR_3D_VALUE_TRANSFORM_MATRIX,::cppu::UnoType<css::drawing::HomogenMatrix>::get(),
 0, 0}, \
     { OUString(UNO_NAME_3D_POLYPOLYGON3D)    ,OWN_ATTR_3D_VALUE_POLYPOLYGON3D  
 ,::cppu::UnoType<css::drawing::PolyPolygonShape3D>::get(), 0, 0}, \
-    { OUString(UNO_NAME_3D_EXTRUDE_DEPTH)    ,SDRATTR_3DOBJ_DEPTH              
 ,::cppu::UnoType<sal_Int32>::get(), 0, SFX_METRIC_ITEM}, \
+    { OUString(UNO_NAME_3D_EXTRUDE_DEPTH)    ,SDRATTR_3DOBJ_DEPTH              
 ,::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
     { OUString(UNO_NAME_3D_PERCENT_DIAGONAL) ,SDRATTR_3DOBJ_PERCENT_DIAGONAL   
 ,::cppu::UnoType<sal_Int16>::get(), 0, 0},
 
 #define SPECIAL_3DPOLYGONOBJECT_PROPERTIES \
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 0c6d1fd7b877..9eff10023c07 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -179,20 +179,20 @@ void SdUnoForbiddenCharsTable::Notify( SfxBroadcaster&, 
const SfxHint& rHint ) t
     }
 }
 
-const sal_Int32 WID_MODEL_LANGUAGE           =  1;
-const sal_Int32 WID_MODEL_TABSTOP            =  2;
-const sal_Int32 WID_MODEL_VISAREA            =  3;
-const sal_Int32 WID_MODEL_MAPUNIT            =  4;
-const sal_Int32 WID_MODEL_FORBCHARS          =  5;
-const sal_Int32 WID_MODEL_CONTFOCUS          =  6;
-const sal_Int32 WID_MODEL_DSGNMODE           =  7;
-const sal_Int32 WID_MODEL_BASICLIBS          =  8;
-const sal_Int32 WID_MODEL_RUNTIMEUID         =  9;
-const sal_Int32 WID_MODEL_BUILDID            = 10;
-const sal_Int32 WID_MODEL_HASVALIDSIGNATURES = 11;
-const sal_Int32 WID_MODEL_DIALOGLIBS         = 12;
-const sal_Int32 WID_MODEL_FONTS              = 13;
-const sal_Int32 WID_MODEL_INTEROPGRABBAG     = 14;
+const sal_uInt16 WID_MODEL_LANGUAGE           =  1;
+const sal_uInt16 WID_MODEL_TABSTOP            =  2;
+const sal_uInt16 WID_MODEL_VISAREA            =  3;
+const sal_uInt16 WID_MODEL_MAPUNIT            =  4;
+const sal_uInt16 WID_MODEL_FORBCHARS          =  5;
+const sal_uInt16 WID_MODEL_CONTFOCUS          =  6;
+const sal_uInt16 WID_MODEL_DSGNMODE           =  7;
+const sal_uInt16 WID_MODEL_BASICLIBS          =  8;
+const sal_uInt16 WID_MODEL_RUNTIMEUID         =  9;
+const sal_uInt16 WID_MODEL_BUILDID            = 10;
+const sal_uInt16 WID_MODEL_HASVALIDSIGNATURES = 11;
+const sal_uInt16 WID_MODEL_DIALOGLIBS         = 12;
+const sal_uInt16 WID_MODEL_FONTS              = 13;
+const sal_uInt16 WID_MODEL_INTEROPGRABBAG     = 14;
 
 const SvxItemPropertySet* ImplGetDrawModelPropertySet()
 {
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
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 );
         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to