Commits

Anonymous committed 025c436

textalignment01: #i105270# - correct check on property import/export flags (MID_FLAG_NO_PROPERTY...) on filling of property set for the import

Comments (0)

Files changed (1)

xmloff/source/style/xmlimppr.cxx

 		const OUString& rPropName = rPropMapper->GetEntryAPIName( nIdx );
 		const sal_Int32 nPropFlags = rPropMapper->GetEntryFlags( nIdx );
 
-		if ( ( 0 == ( nPropFlags & MID_FLAG_NO_PROPERTY ) ) &&
+        // --> OD #i105270#
+        // correction: check on MID_FLAG_NO_PROPERTY_IMPORT 
+        // instead of on MID_FLAG_NO_PROPERTY.
+        // Note: MID_FLAG_NO_PROPERTY also includes MID_FLAG_NO_PROPERTY_EXPORT
+        if ( ( 0 == ( nPropFlags & MID_FLAG_NO_PROPERTY_IMPORT ) ) &&
              ( ( 0 != ( nPropFlags & MID_FLAG_MUST_EXIST ) ) ||
-               rPropSetInfo->hasPropertyByName( rPropName ) )    )
+               rPropSetInfo->hasPropertyByName( rPropName ) ) )
+        // <--
 		{
             // try setting the property
             try
 		const OUString& rPropName = rPropMapper->GetEntryAPIName( nIdx );
 		const sal_Int32 nPropFlags = rPropMapper->GetEntryFlags( nIdx );
 
-		if ( ( 0 == ( nPropFlags & MID_FLAG_NO_PROPERTY ) ) &&
+        // --> OD #i105270#
+        // correction: check on MID_FLAG_NO_PROPERTY_IMPORT 
+        // instead of on MID_FLAG_NO_PROPERTY.
+        // Note: MID_FLAG_NO_PROPERTY also includes MID_FLAG_NO_PROPERTY_EXPORT
+        if ( ( 0 == ( nPropFlags & MID_FLAG_NO_PROPERTY_IMPORT ) ) &&
              ( ( 0 != ( nPropFlags & MID_FLAG_MUST_EXIST ) ) ||
                !rPropSetInfo.is() ||
                (rPropSetInfo.is() && rPropSetInfo->hasPropertyByName( rPropName )) ) )
+        // <--
 		{
 			// save property into property pair structure
             aPropertyPairs.push_back( PropertyPair( &rPropName, &rProp.maValue ) );