[Libreoffice-commits] core.git: 7 commits - include/oox oox/source sc/source sd/qa
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Tue Mar 4 09:45:30 PST 2014
include/oox/drawingml/shapepropertymap.hxx | 1
include/oox/helper/propertymap.hxx | 34
oox/source/drawingml/customshapepresets1.cxx | 564 ++++++++--------
oox/source/drawingml/customshapepresets2.cxx | 560 +++++++--------
oox/source/drawingml/customshapepresets3.cxx | 560 +++++++--------
oox/source/drawingml/customshapepresets4.cxx | 564 ++++++++--------
oox/source/drawingml/customshapepresets5.cxx | 564 ++++++++--------
oox/source/drawingml/customshapepresets6.cxx | 192 ++---
oox/source/drawingml/customshapeproperties.cxx | 58 -
oox/source/drawingml/customshapes/README | 2
oox/source/drawingml/customshapes/generatePresetsCXX.pl | 2
oox/source/drawingml/fillproperties.cxx | 16
oox/source/drawingml/hyperlinkcontext.cxx | 6
oox/source/drawingml/shape.cxx | 48 -
oox/source/drawingml/shapepropertymap.cxx | 2
oox/source/drawingml/textbodyproperties.cxx | 16
oox/source/drawingml/textbodypropertiescontext.cxx | 24
oox/source/drawingml/textcharacterproperties.cxx | 66 -
oox/source/drawingml/textparagraph.cxx | 2
oox/source/drawingml/textparagraphproperties.cxx | 36 -
oox/source/drawingml/textparagraphpropertiescontext.cxx | 24
oox/source/helper/propertymap.cxx | 548 ++++++++-------
oox/source/ole/oleobjecthelper.cxx | 8
oox/source/ppt/pptshapecontext.cxx | 2
oox/source/ppt/pptshapepropertiescontext.cxx | 2
oox/source/ppt/slidefragmenthandler.cxx | 2
oox/source/ppt/slidetransition.cxx | 14
oox/source/ppt/soundactioncontext.cxx | 4
oox/source/vml/vmlshape.cxx | 8
sc/source/filter/oox/drawingfragment.cxx | 2
sc/source/filter/oox/numberformatsbuffer.cxx | 2
sc/source/filter/oox/pagesettings.cxx | 48 -
sc/source/filter/oox/stylesbuffer.cxx | 94 +-
sc/source/filter/oox/viewsettings.cxx | 76 +-
sd/qa/unit/import-tests.cxx | 2
35 files changed, 2118 insertions(+), 2035 deletions(-)
New commits:
commit f17c5c77a65d466d0b436f7efb68823520528776
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Tue Mar 4 17:11:46 2014 +0100
use CPPUNIT_ASSERT_EQUAL to improve error message
Change-Id: I946f4177bef82bbac8058640f216a294582c24a3
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index ad01585..486f7f3 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -356,7 +356,7 @@ void SdFiltersTest::testN828390_5()
const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>(aEdit.GetPool()->GetItem2(EE_PARA_NUMBULLET, 5));
CPPUNIT_ASSERT( pNumFmt );
- CPPUNIT_ASSERT_MESSAGE( "Bullet's relative size is wrong!", pNumFmt->GetNumRule()->GetLevel(1).GetBulletRelSize() == 75 ); // != 25
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's relative size is wrong!", pNumFmt->GetNumRule()->GetLevel(1).GetBulletRelSize(), sal_uInt16(75) ); // != 25
}
}
commit f566585f0882e65778c424640b9312cb19b007b9
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Tue Mar 4 09:34:37 2014 +0100
remove the inheritance to std::map in PropertyMap
Change-Id: Iaaf5b7ab47ffa151cd7c8ea376763d02c883f377
diff --git a/include/oox/drawingml/shapepropertymap.hxx b/include/oox/drawingml/shapepropertymap.hxx
index 16daf31..c2c6896 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -115,7 +115,6 @@ public:
using PropertyMap::setAnyProperty;
using PropertyMap::setProperty;
- using PropertyMap::operator[];
private:
/** Sets an explicit line marker, or creates a named line marker. */
diff --git a/include/oox/helper/propertymap.hxx b/include/oox/helper/propertymap.hxx
index 8c8f212..4b4f416 100644
--- a/include/oox/helper/propertymap.hxx
+++ b/include/oox/helper/propertymap.hxx
@@ -39,7 +39,8 @@ struct PropertyNameVector;
-typedef ::std::map< sal_Int32, ::com::sun::star::uno::Any > PropertyMapBase;
+typedef ::std::map< sal_Int32, ::com::sun::star::uno::Any > PropertyMapType;
+typedef ::std::map< OUString, ::com::sun::star::uno::Any > PropertyNameMap;
/** A helper that maps property identifiers to property values.
@@ -48,7 +49,7 @@ typedef ::std::map< sal_Int32, ::com::sun::star::uno::Any > PropertyMapBase;
name mapping is done internally while the properties are written to
property sets.
*/
-class OOX_DLLPUBLIC PropertyMap : public PropertyMapBase
+class OOX_DLLPUBLIC PropertyMap
{
public:
PropertyMap();
@@ -57,23 +58,33 @@ public:
static const OUString& getPropertyName( sal_Int32 nPropId );
/** Returns true, if the map contains a property with the passed identifier. */
- bool hasProperty( sal_Int32 nPropId ) const
- { return find( nPropId ) != end(); }
+ bool hasProperty( sal_Int32 nPropId ) const;
/** Sets the specified property to the passed value. Does nothing, if the
identifier is invalid. */
- bool setAnyProperty( sal_Int32 nPropId, const ::com::sun::star::uno::Any& rValue )
- { if( nPropId < 0 ) return false; (*this)[ nPropId ] = rValue; return true; }
+ bool setAnyProperty( sal_Int32 nPropId, const ::com::sun::star::uno::Any& rValue );
/** Sets the specified property to the passed value. Does nothing, if the
identifier is invalid. */
template< typename Type >
bool setProperty( sal_Int32 nPropId, const Type& rValue )
- { if( nPropId < 0 ) return false; (*this)[ nPropId ] <<= rValue; return true; }
+ {
+ if( nPropId < 0 )
+ return false;
+
+ maProperties[ nPropId ] <<= rValue;
+ return true;
+ }
+
+ com::sun::star::uno::Any getProperty( sal_Int32 nPropId );
+
+ void erase( sal_Int32 nPropId );
+
+ bool empty() const;
+ size_t size() const;
/** Inserts all properties contained in the passed property map. */
- void assignUsed( const PropertyMap& rPropMap )
- { insert( rPropMap.begin(), rPropMap.end() ); }
+ void assignUsed( const PropertyMap& rPropMap );
/** Inserts all properties contained in the passed property map */
void assignAll( const PropertyMap& rPropMap );
@@ -87,6 +98,8 @@ public:
::com::sun::star::uno::Sequence< OUString >& rNames,
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rValues ) const;
+ void fillPropertyNameMap(PropertyNameMap& rMap) const;
+
/** Creates a property set supporting the XPropertySet interface and inserts all properties. */
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
makePropertySet() const;
@@ -100,6 +113,9 @@ public:
#endif
private:
const PropertyNameVector* mpPropNames;
+
+protected:
+ PropertyMapType maProperties;
};
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index cdc6974..60ef079 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -131,7 +131,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( xShape, UNO_QUERY );
if( xDefaulter.is() ) {
xDefaulter->createCustomShapeDefaults( sConnectorShapeType );
- aPropertyMap[ PROP_Type ] <<= Any( sConnectorShapeType );
+ aPropertyMap.setProperty( PROP_Type, sConnectorShapeType );
}
}
else if (maPresetsMap.find(mnShapePresetType) != maPresetsMap.end())
@@ -146,10 +146,10 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
#endif
}
- aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
- aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY );
- aPropertyMap[ PROP_TextPreRotateAngle ] <<= Any( mnTextRotateAngle );
- aPropertyMap[ PROP_IsPostRotateAngle ] <<= true; // For OpenXML Imports
+ aPropertyMap.setProperty( PROP_MirroredX, (sal_Bool) mbMirroredX );
+ aPropertyMap.setProperty( PROP_MirroredY, (sal_Bool) mbMirroredY );
+ aPropertyMap.setProperty( PROP_TextPreRotateAngle, mnTextRotateAngle );
+ aPropertyMap.setProperty( PROP_IsPostRotateAngle, (sal_Bool)true); // For OpenXML Imports
Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
@@ -211,9 +211,9 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
{
sal_uInt32 i;
PropertyMap aPropertyMap;
- aPropertyMap[ PROP_Type ] <<= OUString( "ooxml-non-primitive" );
- aPropertyMap[ PROP_MirroredX ] <<= Any( mbMirroredX );
- aPropertyMap[ PROP_MirroredY ] <<= Any( mbMirroredY );
+ aPropertyMap.setProperty( PROP_Type, OUString( "ooxml-non-primitive" ));
+ aPropertyMap.setProperty( PROP_MirroredX, (sal_Bool) mbMirroredX );
+ aPropertyMap.setProperty( PROP_MirroredY, (sal_Bool) mbMirroredY );
// Note 1: If Equations are defined - they are processed using internal div by 360 coordinates
// while if they are not, standard ooxml coordinates are used.
// This size specifically affects scaling.
@@ -221,7 +221,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height );
if( maGuideList.size() )
aViewBox = awt::Rectangle( 0, 0, 0, 0 );
- aPropertyMap[ PROP_ViewBox ] <<= aViewBox;
+ aPropertyMap.setProperty( PROP_ViewBox, aViewBox);
Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() );
for ( i = 0; i < maAdjustmentGuideList.size(); i++ )
@@ -232,14 +232,14 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aAdjustmentVal.Name = maAdjustmentGuideList[ i ].maName;
aAdjustmentValues[ i ] = aAdjustmentVal;
}
- aPropertyMap[ PROP_AdjustmentValues ] <<= aAdjustmentValues;
+ aPropertyMap.setProperty( PROP_AdjustmentValues, aAdjustmentValues);
PropertyMap aPath;
Sequence< EnhancedCustomShapeSegment > aSegments( maSegments.size() );
for ( i = 0; i < maSegments.size(); i++ )
aSegments[ i ] = maSegments[ i ];
- aPath[ PROP_Segments ] <<= aSegments;
+ aPath.setProperty( PROP_Segments, aSegments);
if ( maTextRect.has() ) {
Sequence< EnhancedCustomShapeTextFrame > aTextFrames(1);
@@ -247,7 +247,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aTextFrames[0].TopLeft.Second = maTextRect.get().t;
aTextFrames[0].BottomRight.First = maTextRect.get().r;
aTextFrames[0].BottomRight.Second = maTextRect.get().b;
- aPath[ PROP_TextFrames ] <<= aTextFrames;
+ aPath.setProperty( PROP_TextFrames, aTextFrames);
}
sal_uInt32 j, k, nParameterPairs = 0;
@@ -258,7 +258,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
for ( i = 0, k = 0; i < maPath2DList.size(); i++ )
for ( j = 0; j < maPath2DList[ i ].parameter.size(); j++ )
aParameterPairs[ k++ ] = maPath2DList[ i ].parameter[ j ];
- aPath[ PROP_Coordinates ] <<= aParameterPairs;
+ aPath.setProperty( PROP_Coordinates, aParameterPairs);
if ( maPath2DList.size() )
{
@@ -279,17 +279,17 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
aSubViewSize[i].Height = static_cast< sal_Int32 >( maPath2DList[i].h );
OSL_TRACE("set subpath %d size: %d x %d", i, maPath2DList[i].w, maPath2DList[i].h);
}
- aPath[ PROP_SubViewSize ] <<= aSubViewSize;
+ aPath.setProperty( PROP_SubViewSize, aSubViewSize);
}
}
Sequence< PropertyValue > aPathSequence = aPath.makePropertyValueSequence();
- aPropertyMap[ PROP_Path ] <<= aPathSequence;
+ aPropertyMap.setProperty( PROP_Path, aPathSequence);
Sequence< OUString > aEquations( maGuideList.size() );
for ( i = 0; i < maGuideList.size(); i++ )
aEquations[ i ] = maGuideList[ i ].maFormula;
- aPropertyMap[ PROP_Equations ] <<= aEquations;
+ aPropertyMap.setProperty( PROP_Equations, aEquations);
Sequence< PropertyValues > aHandles( maAdjustHandleList.size() );
for ( i = 0; i < maAdjustHandleList.size(); i++ )
@@ -303,48 +303,48 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
// adjustment value is decisive
if ( maAdjustHandleList[ i ].polar )
{
- aHandle[ PROP_Position ] <<= maAdjustHandleList[ i ].pos;
+ aHandle.setProperty( PROP_Position, maAdjustHandleList[ i ].pos);
if ( maAdjustHandleList[ i ].min1.has() )
- aHandle[ PROP_RadiusRangeMinimum ] <<= maAdjustHandleList[ i ].min1.get();
+ aHandle.setProperty( PROP_RadiusRangeMinimum, maAdjustHandleList[ i ].min1.get());
if ( maAdjustHandleList[ i ].max1.has() )
- aHandle[ PROP_RadiusRangeMaximum ] <<= maAdjustHandleList[ i ].max1.get();
+ aHandle.setProperty( PROP_RadiusRangeMaximum, maAdjustHandleList[ i ].max1.get());
/* TODO: AngleMin & AngleMax
if ( maAdjustHandleList[ i ].min2.has() )
- aHandle[ PROP_ ] = maAdjustHandleList[ i ].min2.get();
+ aHandle.setProperty( PROP_ ] = maAdjustHandleList[ i ].min2.get());
if ( maAdjustHandleList[ i ].max2.has() )
- aHandle[ PROP_ ] = maAdjustHandleList[ i ].max2.get();
+ aHandle.setProperty( PROP_ ] = maAdjustHandleList[ i ].max2.get());
*/
}
else
{
- aHandle[ PROP_Position ] <<= maAdjustHandleList[ i ].pos;
+ aHandle.setProperty( PROP_Position, maAdjustHandleList[ i ].pos);
if ( maAdjustHandleList[ i ].gdRef1.has() )
{
// TODO: PROP_RefX and PROP_RefY are not yet part of our file format,
// so the handles will not work after save/reload
sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef1.get() );
if ( nIndex >= 0 )
- aHandle[ PROP_RefX ] <<= nIndex;
+ aHandle.setProperty( PROP_RefX, nIndex);
}
if ( maAdjustHandleList[ i ].gdRef2.has() )
{
sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef2.get() );
if ( nIndex >= 0 )
- aHandle[ PROP_RefY ] <<= nIndex;
+ aHandle.setProperty( PROP_RefY, nIndex);
}
if ( maAdjustHandleList[ i ].min1.has() )
- aHandle[ PROP_RangeXMinimum ] <<= maAdjustHandleList[ i ].min1.get();
+ aHandle.setProperty( PROP_RangeXMinimum, maAdjustHandleList[ i ].min1.get());
if ( maAdjustHandleList[ i ].max1.has() )
- aHandle[ PROP_RangeXMaximum ] <<= maAdjustHandleList[ i ].max1.get();
+ aHandle.setProperty( PROP_RangeXMaximum, maAdjustHandleList[ i ].max1.get());
if ( maAdjustHandleList[ i ].min2.has() )
- aHandle[ PROP_RangeYMinimum ] <<= maAdjustHandleList[ i ].min2.get();
+ aHandle.setProperty( PROP_RangeYMinimum, maAdjustHandleList[ i ].min2.get());
if ( maAdjustHandleList[ i ].max2.has() )
- aHandle[ PROP_RangeYMaximum ] <<= maAdjustHandleList[ i ].max2.get();
+ aHandle.setProperty( PROP_RangeYMaximum, maAdjustHandleList[ i ].max2.get());
}
aHandles[ i ] = aHandle.makePropertyValueSequence();
}
- aPropertyMap[ PROP_Handles ] <<= aHandles;
+ aPropertyMap.setProperty( PROP_Handles, aHandles);
#ifdef DEBUG
SAL_INFO("oox.cscode", "==cscode== begin");
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 563d69e..c9ec724 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -471,7 +471,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
aGraphCrop.Right = static_cast< sal_Int32 >( ( static_cast< double >( aOriginalSize.Width ) * aFillRect.X2 ) / 100000 );
if ( aFillRect.Y2 )
aGraphCrop.Bottom = static_cast< sal_Int32 >( ( static_cast< double >( aOriginalSize.Height ) * aFillRect.Y2 ) / 100000 );
- rPropMap[ PROP_GraphicCrop ] <<= aGraphCrop;
+ rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop);
}
}
}
@@ -523,12 +523,12 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, nPhClr );
xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, xGraphic, rGraphicHelper, nPhClr );
- rPropMap[ PROP_Graphic ] <<= xGraphic;
+ rPropMap.setProperty(PROP_Graphic, xGraphic);
// do we still need to set GraphicURL as well? (TODO)
OUString aGraphicUrl = rGraphicHelper.createGraphicObject( xGraphic );
if( !aGraphicUrl.isEmpty() )
- rPropMap[ PROP_GraphicURL ] <<= aGraphicUrl;
+ rPropMap.setProperty(PROP_GraphicURL, aGraphicUrl);
// cropping
if ( maBlipProps.moClipRect.has() )
@@ -546,7 +546,7 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
aGraphCrop.Right = static_cast< sal_Int32 >( ( static_cast< double >( aOriginalSize.Width ) * oClipRect.X2 ) / 100000 );
if ( oClipRect.Y2 )
aGraphCrop.Bottom = static_cast< sal_Int32 >( ( static_cast< double >( aOriginalSize.Height ) * oClipRect.Y2 ) / 100000 );
- rPropMap[ PROP_GraphicCrop ] <<= aGraphCrop;
+ rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop);
}
}
}
@@ -558,19 +558,19 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
case XML_biLevel: eColorMode = ColorMode_MONO; break;
case XML_grayscl: eColorMode = ColorMode_GREYS; break;
}
- rPropMap[ PROP_GraphicColorMode ] <<= eColorMode;
+ rPropMap.setProperty(PROP_GraphicColorMode, eColorMode);
// brightness and contrast
sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 );
if( nBrightness != 0 )
- rPropMap[ PROP_AdjustLuminance ] <<= nBrightness;
+ rPropMap.setProperty(PROP_AdjustLuminance, nBrightness);
sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 );
if( nContrast != 0 )
- rPropMap[ PROP_AdjustContrast ] <<= nContrast;
+ rPropMap.setProperty(PROP_AdjustContrast, nContrast);
// Media content
if( !maAudio.msEmbed.isEmpty() )
- rPropMap[ PROP_MediaURL ] <<= maAudio.msEmbed;
+ rPropMap.setProperty(PROP_MediaURL, maAudio.msEmbed);
}
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx
index 9f7f063..6e648dc 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -57,10 +57,10 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper& rParent,
}
OUString sTooltip = rAttribs.getString( R_TOKEN( tooltip ) ).get();
if ( !sTooltip.isEmpty() )
- maProperties[ PROP_Representation ] <<= sTooltip;
+ maProperties.setProperty(PROP_Representation, sTooltip);
OUString sFrame = rAttribs.getString( R_TOKEN( tgtFrame ) ).get();
if( !sFrame.isEmpty() )
- maProperties[ PROP_TargetFrame ] <<= sFrame;
+ maProperties.setProperty(PROP_TargetFrame, sFrame);
OUString aAction = rAttribs.getString( XML_action ).get();
if ( !aAction.isEmpty() )
{
@@ -136,7 +136,7 @@ HyperLinkContext::HyperLinkContext( ContextHandler2Helper& rParent,
}
}
if ( !sURL.isEmpty() )
- maProperties[ PROP_URL ] <<= sURL;
+ maProperties.setProperty(PROP_URL, sURL);
// TODO unhandled
// XML_invalidUrl
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index ce29a0c..ce1d3b6 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -154,16 +154,16 @@ table::TablePropertiesPtr Shape::getTableProperties()
void Shape::setDefaults(bool bHeight)
{
- maDefaultShapeProperties[ PROP_TextAutoGrowHeight ] <<= false;
- maDefaultShapeProperties[ PROP_TextWordWrap ] <<= true;
- maDefaultShapeProperties[ PROP_TextLeftDistance ] <<= static_cast< sal_Int32 >( 250 );
- maDefaultShapeProperties[ PROP_TextUpperDistance ] <<= static_cast< sal_Int32 >( 125 );
- maDefaultShapeProperties[ PROP_TextRightDistance ] <<= static_cast< sal_Int32 >( 250 );
- maDefaultShapeProperties[ PROP_TextLowerDistance ] <<= static_cast< sal_Int32 >( 125 );
+ maDefaultShapeProperties.setProperty(PROP_TextAutoGrowHeight, false);
+ maDefaultShapeProperties.setProperty(PROP_TextWordWrap, true);
+ maDefaultShapeProperties.setProperty(PROP_TextLeftDistance, static_cast< sal_Int32 >( 250 ));
+ maDefaultShapeProperties.setProperty(PROP_TextUpperDistance, static_cast< sal_Int32 >( 125 ));
+ maDefaultShapeProperties.setProperty(PROP_TextRightDistance, static_cast< sal_Int32 >( 250 ));
+ maDefaultShapeProperties.setProperty(PROP_TextLowerDistance, static_cast< sal_Int32 >( 125 ));
if (bHeight)
- maDefaultShapeProperties[ PROP_CharHeight ] <<= static_cast< float >( 18.0 );
- maDefaultShapeProperties[ PROP_TextVerticalAdjust ] <<= TextVerticalAdjust_TOP;
- maDefaultShapeProperties[ PROP_ParaAdjust ] <<= static_cast< sal_Int16 >( ParagraphAdjust_LEFT ); // check for RTL?
+ maDefaultShapeProperties.setProperty(PROP_CharHeight, static_cast< float >( 18.0 ));
+ maDefaultShapeProperties.setProperty(PROP_TextVerticalAdjust, TextVerticalAdjust_TOP);
+ maDefaultShapeProperties.setProperty(PROP_ParaAdjust, static_cast< sal_Int16 >( ParagraphAdjust_LEFT )); // check for RTL?
}
::oox::vml::OleObjectInfo& Shape::setOleObjectType()
@@ -475,7 +475,7 @@ Reference< XShape > Shape::createAndInsert(
uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( 1 );
aPolyPolySequence.getArray()[ 0 ] = aPointSequence;
- maShapeProperties[ PROP_PolyPolygon ] <<= aPolyPolySequence;
+ maShapeProperties.setProperty(PROP_PolyPolygon, aPolyPolySequence);
}
else if ( aServiceName == "com.sun.star.drawing.ConnectorShape" )
{
@@ -489,8 +489,8 @@ Reference< XShape > Shape::createAndInsert(
awt::Point aAWTStartPosition( static_cast< sal_Int32 >( aStartPosition.getX() ), static_cast< sal_Int32 >( aStartPosition.getY() ) );
awt::Point aAWTEndPosition( static_cast< sal_Int32 >( aEndPosition.getX() ), static_cast< sal_Int32 >( aEndPosition.getY() ) );
- maShapeProperties[ PROP_StartPosition ] <<= aAWTStartPosition;
- maShapeProperties[ PROP_EndPosition ] <<= aAWTEndPosition;
+ maShapeProperties.setProperty(PROP_StartPosition, aAWTStartPosition);
+ maShapeProperties.setProperty(PROP_EndPosition, aAWTEndPosition);
}
else
{
@@ -510,7 +510,7 @@ Reference< XShape > Shape::createAndInsert(
aMatrix.Line3.Column2 = aTransformation.get(2,1);
aMatrix.Line3.Column3 = aTransformation.get(2,2);
- maShapeProperties[ PROP_Transformation ] <<= aMatrix;
+ maShapeProperties.setProperty(PROP_Transformation, aMatrix);
}
Reference< lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
@@ -631,7 +631,7 @@ Reference< XShape > Shape::createAndInsert(
aShapeProps.assignUsed( mpTextBody->getTextProperties().maPropertyMap );
// Push char properties as well - specifically useful when this is a placeholder
if( mpMasterTextListStyle && mpMasterTextListStyle->getListStyle()[0]->getTextCharacterProperties().moHeight.has() )
- aShapeProps[ PROP_CharHeight ] <<= GetFontHeight( mpMasterTextListStyle->getListStyle()[0]->getTextCharacterProperties().moHeight.get() );
+ aShapeProps.setProperty(PROP_CharHeight, GetFontHeight( mpMasterTextListStyle->getListStyle()[0]->getTextCharacterProperties().moHeight.get() ));
}
// applying properties
@@ -676,19 +676,19 @@ Reference< XShape > Shape::createAndInsert(
// TextFrames have BackColor, not FillColor
if (aShapeProps.hasProperty(PROP_FillColor))
{
- aShapeProps.setProperty(PROP_BackColor, aShapeProps[PROP_FillColor]);
+ aShapeProps.setProperty(PROP_BackColor, aShapeProps.getProperty(PROP_FillColor));
aShapeProps.erase(PROP_FillColor);
}
// TextFrames have BackColorTransparency, not FillTransparence
if (aShapeProps.hasProperty(PROP_FillTransparence))
{
- aShapeProps.setProperty(PROP_BackColorTransparency, aShapeProps[PROP_FillTransparence]);
+ aShapeProps.setProperty(PROP_BackColorTransparency, aShapeProps.getProperty(PROP_FillTransparence));
aShapeProps.erase(PROP_FillTransparence);
}
// TextFrames have BackGrahicURL, not FillBitmapURL
if (aShapeProps.hasProperty(PROP_FillBitmapURL))
{
- aShapeProps.setProperty(PROP_BackGraphicURL, aShapeProps[PROP_FillBitmapURL]);
+ aShapeProps.setProperty(PROP_BackGraphicURL, aShapeProps.getProperty(PROP_FillBitmapURL));
aShapeProps.erase(PROP_FillBitmapURL);
}
// And no LineColor property; individual borders can have colors
@@ -702,7 +702,7 @@ Reference< XShape > Shape::createAndInsert(
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aBorders); ++i)
{
css::table::BorderLine2 aBorderLine = xPropertySet->getPropertyValue(PropertyMap::getPropertyName(aBorders[i])).get<css::table::BorderLine2>();
- aBorderLine.Color = aShapeProps[PROP_LineColor].get<sal_Int32>();
+ aBorderLine.Color = aShapeProps.getProperty(PROP_LineColor).get<sal_Int32>();
if (aLineProperties.moLineWidth.has())
aBorderLine.LineWidth = convertEmuToHmm(aLineProperties.moLineWidth.get());
aShapeProps.setProperty(aBorders[i], uno::makeAny(aBorderLine));
@@ -735,7 +735,7 @@ Reference< XShape > Shape::createAndInsert(
boost::optional<sal_Int32> oShadowDistance;
if (aShapeProps.hasProperty(PROP_ShadowXDistance))
{
- oShadowDistance = aShapeProps[PROP_ShadowXDistance].get<sal_Int32>();
+ oShadowDistance = aShapeProps.getProperty(PROP_ShadowXDistance).get<sal_Int32>();
aShapeProps.erase(PROP_ShadowXDistance);
}
if (aShapeProps.hasProperty(PROP_ShadowYDistance))
@@ -746,7 +746,7 @@ Reference< XShape > Shape::createAndInsert(
boost::optional<sal_Int32> oShadowColor;
if (aShapeProps.hasProperty(PROP_ShadowColor))
{
- oShadowColor = aShapeProps[PROP_ShadowColor].get<sal_Int32>();
+ oShadowColor = aShapeProps.getProperty(PROP_ShadowColor).get<sal_Int32>();
aShapeProps.erase(PROP_ShadowColor);
}
if (aShapeProps.hasProperty(PROP_Shadow))
@@ -793,8 +793,8 @@ Reference< XShape > Shape::createAndInsert(
// Store original fill and line colors of the shape and the theme color name to InteropGrabBag
Sequence< PropertyValue > aProperties( 6 ); //allocate the maximum possible number of slots
sal_Int32 nSize = 2;
- PUT_PROP( aProperties, 0, "OriginalSolidFillClr", aShapeProps[PROP_FillColor] );
- PUT_PROP( aProperties, 1, "OriginalLnSolidFillClr", aShapeProps[PROP_LineColor] );
+ PUT_PROP( aProperties, 0, "OriginalSolidFillClr", aShapeProps.getProperty(PROP_FillColor) );
+ PUT_PROP( aProperties, 1, "OriginalLnSolidFillClr", aShapeProps.getProperty(PROP_LineColor) );
OUString sColorFillScheme = aFillProperties.maFillColor.getSchemeName();
if( !aFillProperties.maFillColor.isPlaceHolder() && !sColorFillScheme.isEmpty() )
{
@@ -857,7 +857,7 @@ Reference< XShape > Shape::createAndInsert(
// which is already saved into StyleFillRef property, so no need to save the explicit values too
if( getFillProperties().moFillType.has() )
putPropertyToGrabBag( "GradFillDefinition", Any( aGradientStops ) );
- putPropertyToGrabBag( "OriginalGradFill", Any( aShapeProps[PROP_FillGradient] ) );
+ putPropertyToGrabBag( "OriginalGradFill", aShapeProps.getProperty(PROP_FillGradient) );
}
}
@@ -1084,7 +1084,7 @@ OUString Shape::finalizeServiceName( XmlFilterBase& rFilter, const OUString& rSe
{
Reference< graphic::XGraphic > xGraphic = rFilter.getGraphicHelper().importEmbeddedGraphic( aGraphicPath );
if( xGraphic.is() )
- maShapeProperties[ PROP_Graphic ] <<= xGraphic;
+ maShapeProperties.setProperty(PROP_Graphic, xGraphic);
}
}
break;
diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx
index edf3354..2ea89e6 100644
--- a/oox/source/drawingml/shapepropertymap.cxx
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -112,7 +112,7 @@ bool ShapePropertyMap::setAnyProperty( ShapePropertyId ePropId, const Any& rValu
}
// set plain property value
- operator[]( nPropId ) = rValue;
+ setAnyProperty( nPropId, rValue );
return true;
}
diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx
index 62d6db1..fadeb93 100644
--- a/oox/source/drawingml/textbodyproperties.cxx
+++ b/oox/source/drawingml/textbodyproperties.cxx
@@ -42,19 +42,19 @@ void TextBodyProperties::pushVertSimulation()
sal_Int32 tVert = moVert.get( XML_horz );
if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) {
// #160799# fake different vertical text modes by top-bottom writing mode
- maPropertyMap[ PROP_TextWritingMode ] <<= WritingMode_TB_RL;
+ maPropertyMap.setProperty( PROP_TextWritingMode, WritingMode_TB_RL);
// workaround for TB_LR as using WritingMode2 doesn't work
if( meVA != TextVerticalAdjust_CENTER )
- maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
- (tVert == XML_vert270) ? TextHorizontalAdjust_RIGHT : TextHorizontalAdjust_LEFT;
+ maPropertyMap.setProperty( PROP_TextHorizontalAdjust,
+ (tVert == XML_vert270) ? TextHorizontalAdjust_RIGHT : TextHorizontalAdjust_LEFT);
if( tVert == XML_vert270 )
- maPropertyMap[ PROP_TextVerticalAdjust ] <<= TextVerticalAdjust_BOTTOM;
+ maPropertyMap.setProperty( PROP_TextVerticalAdjust, TextVerticalAdjust_BOTTOM);
if( ( tVert == XML_vert && meVA == TextVerticalAdjust_TOP ) ||
( tVert == XML_vert270 && meVA == TextVerticalAdjust_BOTTOM ) )
- maPropertyMap[ PROP_TextHorizontalAdjust ] <<= TextHorizontalAdjust_RIGHT;
+ maPropertyMap.setProperty( PROP_TextHorizontalAdjust, TextHorizontalAdjust_RIGHT);
else if( meVA == TextVerticalAdjust_CENTER )
- maPropertyMap[ PROP_TextHorizontalAdjust ] <<= TextHorizontalAdjust_CENTER;
+ maPropertyMap.setProperty( PROP_TextHorizontalAdjust, TextHorizontalAdjust_CENTER);
}
}
@@ -85,9 +85,9 @@ void TextBodyProperties::pushRotationAdjustments( sal_Int32 nRotation )
if( nVal < 0 ) nVal = 0;
if( moInsets[i] )
- maPropertyMap[ aProps[ nOff ] ] <<= static_cast< sal_Int32 >( *moInsets[i] + nVal );
+ maPropertyMap.setProperty( aProps[ nOff ], static_cast< sal_Int32 >( *moInsets[i] + nVal ));
else if( nVal )
- maPropertyMap[ aProps[ nOff ] ] <<= static_cast< sal_Int32 >( nVal );
+ maPropertyMap.setProperty( aProps[ nOff ], static_cast< sal_Int32 >( nVal ));
nOff = (nOff+1) % n;
}
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx
index 81a99e82..1d707d7 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -44,7 +44,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper& rPa
{
// ST_TextWrappingType
sal_Int32 nWrappingType = rAttribs.getToken( XML_wrap, XML_square );
- mrTextBodyProp.maPropertyMap[ PROP_TextWordWrap ] <<= static_cast< sal_Bool >( nWrappingType == XML_square );
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextWordWrap, static_cast< sal_Bool >( nWrappingType == XML_square ));
// ST_Coordinate
OUString sValue;
@@ -59,8 +59,8 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper& rPa
bool bAnchorCenter = rAttribs.getBool( XML_anchorCtr, false );
if( rAttribs.hasAttribute( XML_anchorCtr ) ) {
if( bAnchorCenter )
- mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
- TextHorizontalAdjust_CENTER;
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextHorizontalAdjust,
+ TextHorizontalAdjust_CENTER);
}
// bool bCompatLineSpacing = rAttribs.getBool( XML_compatLnSpc, false );
// bool bForceAA = rAttribs.getBool( XML_forceAA, false );
@@ -91,20 +91,20 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper& rPa
if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert )
mrTextBodyProp.moRotation = -5400000*(tVert==XML_vert270?3:1);
else
- mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
- <<= ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB );
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextWritingMode,
+ ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB ));
}
// ST_TextAnchoringType
if( rAttribs.hasAttribute( XML_anchor ) )
{
mrTextBodyProp.meVA = GetTextVerticalAdjust( rAttribs.getToken( XML_anchor, XML_t ) );
- mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= mrTextBodyProp.meVA;
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextVerticalAdjust, mrTextBodyProp.meVA);
}
// Push defaults
- mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= false;
- mrTextBodyProp.maPropertyMap[ PROP_TextFitToSize ] <<= drawing::TextFitToSizeType_NONE;
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, false);
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextFitToSize, drawing::TextFitToSizeType_NONE);
}
ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& /*rAttribs*/)
@@ -118,14 +118,14 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement
// EG_TextAutofit
case A_TOKEN( noAutofit ):
- mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= false; // CT_TextNoAutofit
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, false); // CT_TextNoAutofit
break;
case A_TOKEN( normAutofit ): // CT_TextNormalAutofit
- mrTextBodyProp.maPropertyMap[ PROP_TextFitToSize ] <<= TextFitToSizeType_AUTOFIT;
- mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= false;
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextFitToSize, TextFitToSizeType_AUTOFIT);
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, false);
break;
case A_TOKEN( spAutoFit ):
- mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= true;
+ mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, true);
break;
case A_TOKEN( scene3d ): // CT_Scene3D
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
index b782761..7f2e3a7 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -42,7 +42,7 @@ namespace drawingml {
void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSourceProps )
{
// overwrite all properties exisiting in rSourceProps
- maHyperlinkPropertyMap.insert( rSourceProps.maHyperlinkPropertyMap.begin(), rSourceProps.maHyperlinkPropertyMap.end() );
+ maHyperlinkPropertyMap.assignUsed( rSourceProps.maHyperlinkPropertyMap );
maLatinFont.assignIfUsed( rSourceProps.maLatinFont );
maLatinThemeFont.assignIfUsed( rSourceProps.maLatinThemeFont );
maAsianFont.assignIfUsed( rSourceProps.maAsianFont );
@@ -77,9 +77,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
bRet = maLatinThemeFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
if (bRet)
{
- rPropMap[ PROP_CharFontName ] <<= aFontName;
- rPropMap[ PROP_CharFontPitch ] <<= nFontPitch;
- rPropMap[ PROP_CharFontFamily ] <<= nFontFamily;
+ rPropMap.setProperty( PROP_CharFontName, aFontName);
+ rPropMap.setProperty( PROP_CharFontPitch, nFontPitch);
+ rPropMap.setProperty( PROP_CharFontFamily, nFontFamily);
}
bRet = maAsianFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
@@ -87,9 +87,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
bRet = maAsianThemeFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
if (bRet)
{
- rPropMap[ PROP_CharFontNameAsian ] <<= aFontName;
- rPropMap[ PROP_CharFontPitchAsian ] <<= nFontFamily;
- rPropMap[ PROP_CharFontFamilyAsian ] <<= nFontPitch;
+ rPropMap.setProperty( PROP_CharFontNameAsian, aFontName);
+ rPropMap.setProperty( PROP_CharFontPitchAsian, nFontFamily);
+ rPropMap.setProperty( PROP_CharFontFamilyAsian, nFontPitch);
}
bRet = maComplexFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
@@ -97,65 +97,65 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
bRet = maComplexThemeFont.getFontData( aFontName, nFontPitch, nFontFamily, rFilter );
if (bRet)
{
- rPropMap[ PROP_CharFontNameComplex ] <<= aFontName;
- rPropMap[ PROP_CharFontPitchComplex ] <<= nFontPitch;
- rPropMap[ PROP_CharFontFamilyComplex ] <<= nFontFamily;
+ rPropMap.setProperty( PROP_CharFontNameComplex, aFontName);
+ rPropMap.setProperty( PROP_CharFontPitchComplex, nFontPitch);
+ rPropMap.setProperty( PROP_CharFontFamilyComplex, nFontFamily);
}
// symbolfont, will now be ... textrun.cxx ... ausgewertet !!!i#113673
if( maCharColor.isUsed() )
- rPropMap[ PROP_CharColor ] <<= maCharColor.getColor( rFilter.getGraphicHelper() );
+ rPropMap.setProperty( PROP_CharColor, maCharColor.getColor( rFilter.getGraphicHelper() ));
if( moLang.has() && !moLang.get().isEmpty() )
{
lang::Locale aLocale( LanguageTag( moLang.get()).getLocale());
- rPropMap[ PROP_CharLocale ] <<= aLocale;
- rPropMap[ PROP_CharLocaleAsian ] <<= aLocale;
- rPropMap[ PROP_CharLocaleComplex ] <<= aLocale;
+ rPropMap.setProperty( PROP_CharLocale, aLocale);
+ rPropMap.setProperty( PROP_CharLocaleAsian, aLocale);
+ rPropMap.setProperty( PROP_CharLocaleComplex, aLocale);
}
if( moHeight.has() )
{
float fHeight = GetFontHeight( moHeight.get() );
- rPropMap[ PROP_CharHeight ] <<= fHeight;
- rPropMap[ PROP_CharHeightAsian ] <<= fHeight;
- rPropMap[ PROP_CharHeightComplex ] <<= fHeight;
+ rPropMap.setProperty( PROP_CharHeight, fHeight);
+ rPropMap.setProperty( PROP_CharHeightAsian, fHeight);
+ rPropMap.setProperty( PROP_CharHeightComplex, fHeight);
}
- rPropMap[ PROP_CharKerning ] <<= (sal_Int16) GetTextSpacingPoint( moSpacing.get( 0 ) );
+ rPropMap.setProperty( PROP_CharKerning, (sal_Int16) GetTextSpacingPoint( moSpacing.get( 0 ) ));
- rPropMap[ PROP_CharUnderline ] <<= GetFontUnderline( moUnderline.get( XML_none ) );
- rPropMap[ PROP_CharStrikeout ] <<= GetFontStrikeout( moStrikeout.get( XML_noStrike ) );
- rPropMap[ PROP_CharCaseMap ] <<= GetCaseMap( moCaseMap.get( XML_none ) );
+ rPropMap.setProperty( PROP_CharUnderline, GetFontUnderline( moUnderline.get( XML_none ) ));
+ rPropMap.setProperty( PROP_CharStrikeout, GetFontStrikeout( moStrikeout.get( XML_noStrike ) ));
+ rPropMap.setProperty( PROP_CharCaseMap, GetCaseMap( moCaseMap.get( XML_none ) ));
if( moBaseline.has() ) {
- rPropMap[ PROP_CharEscapement ] <<= sal_Int16(moBaseline.get( 0 ) / 1000);
- rPropMap[ PROP_CharEscapementHeight ] <<= sal_Int8(DFLT_ESC_PROP);
+ rPropMap.setProperty( PROP_CharEscapement, sal_Int16(moBaseline.get( 0 ) / 1000));
+ rPropMap.setProperty( PROP_CharEscapementHeight, sal_Int8(DFLT_ESC_PROP));
} else {
- rPropMap[ PROP_CharEscapement ] <<= sal_Int16(0);
- rPropMap[ PROP_CharEscapementHeight ] <<= sal_Int8(100); // 100%
+ rPropMap.setProperty( PROP_CharEscapement, sal_Int16(0));
+ rPropMap.setProperty( PROP_CharEscapementHeight, sal_Int8(100)); // 100%
}
if( !bUseOptional || moBold.has() ) {
float fWeight = moBold.get( false ) ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL;
- rPropMap[ PROP_CharWeight ] <<= fWeight;
- rPropMap[ PROP_CharWeightAsian ] <<= fWeight;
- rPropMap[ PROP_CharWeightComplex ] <<= fWeight;
+ rPropMap.setProperty( PROP_CharWeight, fWeight);
+ rPropMap.setProperty( PROP_CharWeightAsian, fWeight);
+ rPropMap.setProperty( PROP_CharWeightComplex, fWeight);
}
if( !bUseOptional || moItalic.has() ) {
awt::FontSlant eSlant = moItalic.get( false ) ? awt::FontSlant_ITALIC : awt::FontSlant_NONE;
- rPropMap[ PROP_CharPosture ] <<= eSlant;
- rPropMap[ PROP_CharPostureAsian ] <<= eSlant;
- rPropMap[ PROP_CharPostureComplex ] <<= eSlant;
+ rPropMap.setProperty( PROP_CharPosture, eSlant);
+ rPropMap.setProperty( PROP_CharPostureAsian, eSlant);
+ rPropMap.setProperty( PROP_CharPostureComplex, eSlant);
}
bool bUnderlineFillFollowText = moUnderlineFillFollowText.get( false );
if( moUnderline.has() && maUnderlineColor.isUsed() && !bUnderlineFillFollowText )
{
- rPropMap[ PROP_CharUnderlineHasColor ] <<= true;
- rPropMap[ PROP_CharUnderlineColor ] <<= maUnderlineColor.getColor( rFilter.getGraphicHelper() );
+ rPropMap.setProperty( PROP_CharUnderlineHasColor, true);
+ rPropMap.setProperty( PROP_CharUnderlineColor, maUnderlineColor.getColor( rFilter.getGraphicHelper() ));
}
}
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx
index 0ac8b05..ac1b7f1 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -112,7 +112,7 @@ void TextParagraph::insertAt(
// bullets have same color as following texts by default
if( !aioBulletList.hasProperty( PROP_BulletColor ) && maRuns.size() > 0
&& (*maRuns.begin())->getTextCharacterProperties().maCharColor.isUsed() )
- aioBulletList[ PROP_BulletColor ] <<= (*maRuns.begin())->getTextCharacterProperties().maCharColor.getColor( rFilterBase.getGraphicHelper() );
+ aioBulletList.setProperty( PROP_BulletColor, (*maRuns.begin())->getTextCharacterProperties().maCharColor.getColor( rFilterBase.getGraphicHelper() ));
float fCharacterSize = nCharHeight > 0 ? GetFontHeight ( nCharHeight ) : pTextParagraphStyle->getCharHeightPoints( 12 );
aParaProp.pushToPropSet( &rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize, true );
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index 65dd0aa..7b87d5c 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -283,15 +283,15 @@ void BulletList::apply( const BulletList& rSource )
void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, PropertyMap& rPropMap ) const
{
if( msNumberingPrefix.hasValue() )
- rPropMap[ PROP_Prefix ] = msNumberingPrefix;
+ rPropMap.setProperty( PROP_Prefix, msNumberingPrefix);
if( msNumberingSuffix.hasValue() )
- rPropMap[ PROP_Suffix ] = msNumberingSuffix;
+ rPropMap.setProperty( PROP_Suffix, msNumberingSuffix);
if( mnStartAt.hasValue() )
- rPropMap[ PROP_StartWith ] = mnStartAt;
- rPropMap[ PROP_Adjust ] <<= HoriOrientation::LEFT;
+ rPropMap.setProperty( PROP_StartWith, mnStartAt);
+ rPropMap.setProperty( PROP_Adjust, HoriOrientation::LEFT);
if( mnNumberingType.hasValue() )
- rPropMap[ PROP_NumberingType ] = mnNumberingType;
+ rPropMap.setProperty( PROP_NumberingType, mnNumberingType);
OUString aBulletFontName;
sal_Int16 nBulletFontPitch = 0;
@@ -321,8 +321,8 @@ void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, P
aFontDesc.CharSet = RTL_TEXTENCODING_SYMBOL;
bSymbolFont = sal_True;
}
- rPropMap[ PROP_BulletFont ] <<= aFontDesc;
- rPropMap[ PROP_BulletFontName ] <<= aBulletFontName;
+ rPropMap.setProperty( PROP_BulletFont, aFontDesc);
+ rPropMap.setProperty( PROP_BulletFontName, aBulletFontName);
}
}
if ( msBulletChar.hasValue() ) {
@@ -338,21 +338,21 @@ void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, P
sBuChar = OUString( &nBuChar, 1 );
}
- rPropMap[ PROP_BulletChar ] <<= sBuChar;
+ rPropMap.setProperty( PROP_BulletChar, sBuChar);
}
if ( maGraphic.hasValue() )
{
Reference< com::sun::star::awt::XBitmap > xBitmap( maGraphic, UNO_QUERY );
if ( xBitmap.is() )
- rPropMap[ PROP_Graphic ] <<= xBitmap;
+ rPropMap.setProperty( PROP_Graphic, xBitmap);
}
if( mnSize.hasValue() )
- rPropMap[ PROP_BulletRelSize ] = mnSize;
+ rPropMap.setProperty( PROP_BulletRelSize, mnSize);
if ( maStyleName.hasValue() )
- rPropMap[ PROP_CharStyleName ] <<= maStyleName;
+ rPropMap.setProperty( PROP_CharStyleName, maStyleName);
if (pFilterBase ) {
if ( maBulletColorPtr->isUsed() )
- rPropMap[ PROP_BulletColor ] <<= maBulletColorPtr->getColor( pFilterBase->getGraphicHelper() );
+ rPropMap.setProperty( PROP_BulletColor, maBulletColorPtr->getColor( pFilterBase->getGraphicHelper() ));
}
}
@@ -409,7 +409,7 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p
com::sun::star::awt::Size aBulletSize;
aBulletSize.Width = aBulletSize.Height = static_cast< sal_Int32 >( ( fCharacterSize * ( 2540.0 / 72.0 ) * 0.8 ) );
- rioBulletMap[ PROP_GraphicSize ] <<= aBulletSize;
+ rioBulletMap.setProperty( PROP_GraphicSize, aBulletSize);
}
boost::optional< sal_Int32 > noParaLeftMargin( moParaLeftMargin );
@@ -420,7 +420,7 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p
if ( noParaLeftMargin )
{
aPropSet.setProperty( PROP_ParaLeftMargin, static_cast< sal_Int32 >(0));
- rioBulletMap[ PROP_LeftMargin ] <<= static_cast< sal_Int32 >( *noParaLeftMargin );
+ rioBulletMap.setProperty( PROP_LeftMargin, static_cast< sal_Int32 >( *noParaLeftMargin ));
noParaLeftMargin = boost::none;
}
if ( noFirstLineIndentation )
@@ -428,11 +428,11 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p
// Force Paragraph property as zero - impress seems to use the value from previous
// (non) bullet line if not set to zero explicitly :(
aPropSet.setProperty( PROP_ParaFirstLineIndent, static_cast< sal_Int32 >(0) );
- rioBulletMap[ PROP_FirstLineOffset ] <<= static_cast< sal_Int32 >( *noFirstLineIndentation );
+ rioBulletMap.setProperty( PROP_FirstLineOffset, static_cast< sal_Int32 >( *noFirstLineIndentation ));
noFirstLineIndentation = boost::none;
}
if ( nNumberingType != NumberingType::BITMAP && !rioBulletMap.hasProperty( PROP_BulletColor ) && pFilterBase )
- rioBulletMap[ PROP_BulletColor ] <<= static_cast< sal_Int32 >( maTextCharacterProperties.maCharColor.getColor( pFilterBase->getGraphicHelper()));
+ rioBulletMap.setProperty( PROP_BulletColor, static_cast< sal_Int32 >( maTextCharacterProperties.maCharColor.getColor( pFilterBase->getGraphicHelper())));
}
if ( bApplyBulletMap )
@@ -448,8 +448,8 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p
if( !rioBulletMap.empty() )
{
// fix default bullet size to be 100%
- if( rioBulletMap.find( PROP_BulletRelSize ) == rioBulletMap.end() )
- rioBulletMap[ PROP_BulletRelSize ] <<= static_cast< sal_Int16 >( 100 );
+ if( !rioBulletMap.hasProperty( PROP_BulletRelSize ) )
+ rioBulletMap.setProperty( PROP_BulletRelSize, static_cast< sal_Int16 >( 100 ));
Sequence< PropertyValue > aBulletPropSeq = rioBulletMap.makePropertyValueSequence();
xNumRule->replaceByIndex( getLevel(), makeAny( aBulletPropSeq ) );
}
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index a47d37f..e592841 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -54,7 +54,7 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H
PropertyMap& rPropertyMap( mrTextParagraphProperties.getTextParagraphPropertyMap() );
// ST_TextAlignType
- rPropertyMap[ PROP_ParaAdjust ] <<= GetParaAdjust( rAttribs.getToken( XML_algn, XML_l ) );
+ rPropertyMap.setProperty( PROP_ParaAdjust, GetParaAdjust( rAttribs.getToken( XML_algn, XML_l ) ));
// TODO see to do the same with RubyAdjust
// ST_Coordinate32
@@ -67,7 +67,7 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H
if ( rAttribs.hasAttribute( XML_latinLnBrk ) )
{
bool bLatinLineBrk = rAttribs.getBool( XML_latinLnBrk, true );
- rPropertyMap[ PROP_ParaIsHyphenation ] <<= bLatinLineBrk;
+ rPropertyMap.setProperty( PROP_ParaIsHyphenation, bLatinLineBrk);
}
// TODO see what to do with Asian hyphenation
@@ -78,7 +78,7 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H
if ( rAttribs.hasAttribute( XML_hangingPunct ) )
{
bool bHangingPunct = rAttribs.getBool( XML_hangingPunct, false );
- rPropertyMap[ PROP_ParaIsHangingPunctuation ] <<= bHangingPunct;
+ rPropertyMap.setProperty( PROP_ParaIsHangingPunctuation, bHangingPunct);
}
// ST_Coordinate
@@ -116,13 +116,13 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler2H
{
sValue = rAttribs.getString( XML_marR ).get();
sal_Int32 nMarR = sValue.isEmpty() ? 0 : GetCoordinate( sValue ) ;
- rPropertyMap[ PROP_ParaRightMargin ] <<= nMarR;
+ rPropertyMap.setProperty( PROP_ParaRightMargin, nMarR);
}
if ( rAttribs.hasAttribute( XML_rtl ) )
{
bool bRtl = rAttribs.getBool( XML_rtl, false );
- rPropertyMap[ PROP_WritingMode ] <<= ( bRtl ? WritingMode2::RL_TB : WritingMode2::LR_TB );
+ rPropertyMap.setProperty( PROP_WritingMode, ( bRtl ? WritingMode2::RL_TB : WritingMode2::LR_TB ));
}
}
@@ -131,9 +131,9 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
{
PropertyMap& rPropertyMap( mrTextParagraphProperties.getTextParagraphPropertyMap() );
if ( maLineSpacing.bHasValue )
- rPropertyMap[ PROP_ParaLineSpacing ] <<= maLineSpacing.toLineSpacing();
+ rPropertyMap.setProperty( PROP_ParaLineSpacing, maLineSpacing.toLineSpacing());
else
- rPropertyMap[ PROP_ParaLineSpacing ] <<= ::com::sun::star::style::LineSpacing( ::com::sun::star::style::LineSpacingMode::PROP, 100 );
+ rPropertyMap.setProperty( PROP_ParaLineSpacing, ::com::sun::star::style::LineSpacing( ::com::sun::star::style::LineSpacingMode::PROP, 100 ));
::std::list< TabStop >::size_type nTabCount = maTabList.size();
@@ -143,20 +143,20 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
TabStop * aArray = aSeq.getArray();
OSL_ENSURE( aArray != NULL, "sequence array is NULL" );
::std::copy( maTabList.begin(), maTabList.end(), aArray );
- rPropertyMap[ PROP_ParaTabStops ] <<= aSeq;
+ rPropertyMap.setProperty( PROP_ParaTabStops, aSeq);
}
if ( mxBlipProps.get() && mxBlipProps->mxGraphic.is() )
mrBulletList.setGraphic( mxBlipProps->mxGraphic );
if( mrBulletList.is() )
- rPropertyMap[ PROP_IsNumbering ] <<= sal_True;
+ rPropertyMap.setProperty( PROP_IsNumbering, sal_True);
sal_Int16 nLevel = mrTextParagraphProperties.getLevel();
- rPropertyMap[ PROP_NumberingLevel ] <<= nLevel;
- rPropertyMap[ PROP_NumberingIsNumber ] <<= sal_True;
+ rPropertyMap.setProperty( PROP_NumberingLevel, nLevel);
+ rPropertyMap.setProperty( PROP_NumberingIsNumber, sal_True);
if( mrTextParagraphProperties.getParaAdjust() )
- rPropertyMap[ PROP_ParaAdjust ] <<= mrTextParagraphProperties.getParaAdjust().get();
+ rPropertyMap.setProperty( PROP_ParaAdjust, mrTextParagraphProperties.getParaAdjust().get());
}
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index 800aaab..968aea1 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -118,15 +118,12 @@ public:
virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) throw (RuntimeException, std::exception);
private:
- typedef ::std::map< OUString, Any > PropertyNameMap;
PropertyNameMap maPropMap;
};
GenericPropertySet::GenericPropertySet( const PropertyMap& rPropMap )
{
- const PropertyNameVector& rPropNames = StaticPropertyNameVector::get();
- for( PropertyMap::const_iterator aIt = rPropMap.begin(), aEnd = rPropMap.end(); aIt != aEnd; ++aIt )
- maPropMap[ rPropNames[ aIt->first ] ] = aIt->second;
+ rPropMap.fillPropertyNameMap(maPropMap);
}
Reference< XPropertySetInfo > SAL_CALL GenericPropertySet::getPropertySetInfo() throw (RuntimeException, std::exception)
@@ -194,6 +191,42 @@ PropertyMap::PropertyMap() :
{
}
+bool PropertyMap::hasProperty( sal_Int32 nPropId ) const
+{
+ return maProperties.find( nPropId ) != maProperties.end();
+}
+
+bool PropertyMap::setAnyProperty( sal_Int32 nPropId, const Any& rValue )
+{
+ if( nPropId < 0 )
+ return false;
+
+ SAL_WARN_IF(sal_Int32(mpPropNames->size()) <= nPropId, "oox", "invalid PropId");
+ maProperties[ nPropId ] = rValue;
+ return true;
+}
+
+Any PropertyMap::getProperty( sal_Int32 nPropId )
+{
+ return maProperties[ nPropId ];
+}
+
+void PropertyMap::erase( sal_Int32 nPropId )
+{
+ maProperties.erase(nPropId);
+}
+
+bool PropertyMap::empty() const
+{
+ return maProperties.empty();
+}
+
+void PropertyMap::assignUsed( const PropertyMap& rPropMap )
+{
+ SAL_WARN_IF(rPropMap.maProperties.size() > maProperties.size(), "oox", "too many properties");
+ maProperties.insert(rPropMap.maProperties.begin(), rPropMap.maProperties.end());
+}
+
const OUString& PropertyMap::getPropertyName( sal_Int32 nPropId )
{
OSL_ENSURE( (0 <= nPropId) && (nPropId < PROP_COUNT), "PropertyMap::getPropertyName - invalid property identifier" );
@@ -202,17 +235,17 @@ const OUString& PropertyMap::getPropertyName( sal_Int32 nPropId )
void PropertyMap::assignAll( const PropertyMap& rPropMap )
{
- for( PropertyMap::const_iterator it=rPropMap.begin(); it != rPropMap.end(); ++it )
- (*this)[it->first] = it->second;
+ for( PropertyMapType::const_iterator it=rPropMap.maProperties.begin(); it != rPropMap.maProperties.end(); ++it )
+ maProperties[it->first] = it->second;
}
Sequence< PropertyValue > PropertyMap::makePropertyValueSequence() const
{
- Sequence< PropertyValue > aSeq( static_cast< sal_Int32 >( size() ) );
- if( !empty() )
+ Sequence< PropertyValue > aSeq( static_cast< sal_Int32 >( maProperties.size() ) );
+ if( !maProperties.empty() )
{
PropertyValue* pValues = aSeq.getArray();
- for( const_iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt, ++pValues )
+ for( PropertyMapType::const_iterator aIt = maProperties.begin(), aEnd = maProperties.end(); aIt != aEnd; ++aIt, ++pValues )
{
OSL_ENSURE( (0 <= aIt->first) && (aIt->first < PROP_COUNT), "PropertyMap::makePropertyValueSequence - invalid property identifier" );
pValues->Name = (*mpPropNames)[ aIt->first ];
@@ -225,13 +258,13 @@ Sequence< PropertyValue > PropertyMap::makePropertyValueSequence() const
void PropertyMap::fillSequences( Sequence< OUString >& rNames, Sequence< Any >& rValues ) const
{
- rNames.realloc( static_cast< sal_Int32 >( size() ) );
- rValues.realloc( static_cast< sal_Int32 >( size() ) );
- if( !empty() )
+ rNames.realloc( static_cast< sal_Int32 >( maProperties.size() ) );
+ rValues.realloc( static_cast< sal_Int32 >( maProperties.size() ) );
+ if( !maProperties.empty() )
{
OUString* pNames = rNames.getArray();
Any* pValues = rValues.getArray();
- for( const_iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt, ++pNames, ++pValues )
+ for( PropertyMapType::const_iterator aIt = maProperties.begin(), aEnd = maProperties.end(); aIt != aEnd; ++aIt, ++pNames, ++pValues )
{
OSL_ENSURE( (0 <= aIt->first) && (aIt->first < PROP_COUNT), "PropertyMap::fillSequences - invalid property identifier" );
if((sal_uInt32)aIt->first <= mpPropNames->size())
@@ -243,6 +276,15 @@ void PropertyMap::fillSequences( Sequence< OUString >& rNames, Sequence< Any >&
}
}
+void PropertyMap::fillPropertyNameMap(PropertyNameMap& rMap) const
+{
+ for(PropertyMapType::const_iterator itr = maProperties.begin(),
+ itrEnd = maProperties.end(); itr != itrEnd; ++itr)
+ {
+ rMap.insert(std::pair<OUString, Any>((*mpPropNames)[itr->first], itr->second));
+ }
+}
+
Reference< XPropertySet > PropertyMap::makePropertySet() const
{
return new GenericPropertySet( *this );
diff --git a/oox/source/ole/oleobjecthelper.cxx b/oox/source/ole/oleobjecthelper.cxx
index 9c43b54..efa94eb 100644
--- a/oox/source/ole/oleobjecthelper.cxx
+++ b/oox/source/ole/oleobjecthelper.cxx
@@ -86,7 +86,7 @@ bool OleObjectHelper::importOleObject( PropertyMap& rPropMap, const OleObjectInf
// linked OLE object - set target URL
if( !rOleObject.maTargetLink.isEmpty() )
{
- rPropMap[ PROP_LinkURL ] <<= rOleObject.maTargetLink;
+ rPropMap.setProperty( PROP_LinkURL, rOleObject.maTargetLink);
bRet = true;
}
}
@@ -107,7 +107,7 @@ bool OleObjectHelper::importOleObject( PropertyMap& rPropMap, const OleObjectInf
OUString aPersistName = aUrl.copy( maEmbeddedObjScheme.getLength() );
if( !aPersistName.isEmpty() )
{
- rPropMap[ PROP_PersistName ] <<= aPersistName;
+ rPropMap.setProperty( PROP_PersistName, aPersistName);
bRet = true;
}
}
@@ -118,8 +118,8 @@ bool OleObjectHelper::importOleObject( PropertyMap& rPropMap, const OleObjectInf
if( bRet )
{
- rPropMap[ PROP_Aspect ] <<= (rOleObject.mbShowAsIcon ? Aspects::MSOLE_ICON : Aspects::MSOLE_CONTENT);
- rPropMap[ PROP_VisualArea ] <<= awt::Rectangle( 0, 0, rObjSize.Width, rObjSize.Height );
+ rPropMap.setProperty( PROP_Aspect, (rOleObject.mbShowAsIcon ? Aspects::MSOLE_ICON : Aspects::MSOLE_CONTENT));
+ rPropMap.setProperty( PROP_VisualArea, awt::Rectangle( 0, 0, rObjSize.Width, rObjSize.Height ));
}
return bRet;
}
diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx
index f5a1e90..2741e74 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -214,7 +214,7 @@ ContextHandlerRef PPTShapeContext::onCreateContext( sal_Int32 aElementToken, con
case PPT_TOKEN( txBody ):
{
oox::drawingml::TextBodyPtr xTextBody( new oox::drawingml::TextBody( mpShapePtr->getTextBody() ) );
- xTextBody->getTextProperties().maPropertyMap[ PROP_FontIndependentLineSpacing ] <<= static_cast< sal_Bool >( sal_True );
+ xTextBody->getTextProperties().maPropertyMap.setProperty( PROP_FontIndependentLineSpacing, static_cast< sal_Bool >( sal_True ));
mpShapePtr->setTextBody( xTextBody );
return new oox::drawingml::TextBodyContext( *this, *xTextBody );
}
diff --git a/oox/source/ppt/pptshapepropertiescontext.cxx b/oox/source/ppt/pptshapepropertiescontext.cxx
index 1dcbda8..77ba83c 100644
--- a/oox/source/ppt/pptshapepropertiescontext.cxx
+++ b/oox/source/ppt/pptshapepropertiescontext.cxx
@@ -54,7 +54,7 @@ ContextHandlerRef PPTShapePropertiesContext::onCreateContext( sal_Int32 aElement
switch( aElementToken )
{
case A_TOKEN( xfrm ):
- mrShape.getShapeProperties()[ PROP_IsPlaceholderDependent ] <<= sal_False;
+ mrShape.getShapeProperties().setProperty( PROP_IsPlaceholderDependent, sal_False);
return ShapePropertiesContext::onCreateContext( aElementToken, rAttribs );
default:
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index b2da147..d001422 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -78,7 +78,7 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
PropertyMap aPropMap;
PropertySet aSlideProp( xSlide );
- aPropMap[ PROP_Visible ] = Any( rAttribs.getBool( XML_show, true ) );
+ aPropMap.setProperty( PROP_Visible, rAttribs.getBool( XML_show, true ));
aSlideProp.setProperties( aPropMap );
return this;
diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
index 7f060c0..6033c61 100644
--- a/oox/source/ppt/slidetransition.cxx
+++ b/oox/source/ppt/slidetransition.cxx
@@ -75,14 +75,14 @@ namespace oox { namespace ppt {
{
try
{
- aProps[ PROP_TransitionType ] <<= mnTransitionType;
- aProps[ PROP_TransitionSubtype ] <<= mnTransitionSubType;
- aProps[ PROP_TransitionDirection ] <<= mbTransitionDirectionNormal;
- aProps[ PROP_Speed ] <<= mnAnimationSpeed;
- aProps[ PROP_TransitionFadeColor ] <<= mnFadeColor;
+ aProps.setProperty( PROP_TransitionType, mnTransitionType);
+ aProps.setProperty( PROP_TransitionSubtype, mnTransitionSubType);
+ aProps.setProperty( PROP_TransitionDirection, mbTransitionDirectionNormal);
+ aProps.setProperty( PROP_Speed, mnAnimationSpeed);
+ aProps.setProperty( PROP_TransitionFadeColor, mnFadeColor);
if( mnAdvanceTime != -1 ) {
- aProps[ PROP_Duration ] <<= mnAdvanceTime/1000;
- aProps[ PROP_Change ] <<= static_cast<sal_Int32>(1);
+ aProps.setProperty( PROP_Duration, mnAdvanceTime/1000);
+ aProps.setProperty( PROP_Change, static_cast<sal_Int32>(1));
}
}
catch( Exception& )
diff --git a/oox/source/ppt/soundactioncontext.cxx b/oox/source/ppt/soundactioncontext.cxx
index 9ab2999..a3104e1 100644
--- a/oox/source/ppt/soundactioncontext.cxx
+++ b/oox/source/ppt/soundactioncontext.cxx
@@ -64,8 +64,8 @@ namespace oox { namespace ppt {
}
if ( !url.isEmpty() )
{
- maSlideProperties[ PROP_Sound ] <<= url;
- maSlideProperties[ PROP_SoundOn ] <<= sal_True;
+ maSlideProperties.setProperty( PROP_Sound, url);
+ maSlideProperties.setProperty( PROP_SoundOn, sal_True);
}
}
}
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 1728b3e..624815e 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -387,13 +387,13 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
// TextFrames have BackColor, not FillColor
if (aPropMap.hasProperty(PROP_FillColor))
{
- aPropMap.setProperty(PROP_BackColor, aPropMap[PROP_FillColor]);
+ aPropMap.setAnyProperty(PROP_BackColor, aPropMap.getProperty(PROP_FillColor));
aPropMap.erase(PROP_FillColor);
}
// TextFrames have BackColorTransparency, not FillTransparence
if (aPropMap.hasProperty(PROP_FillTransparence))
{
- aPropMap.setProperty(PROP_BackColorTransparency, aPropMap[PROP_FillTransparence]);
+ aPropMap.setAnyProperty(PROP_BackColorTransparency, aPropMap.getProperty(PROP_FillTransparence));
aPropMap.erase(PROP_FillTransparence);
}
// And no LineColor property; individual borders can have colors and widths
@@ -409,7 +409,7 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aBorders); ++i)
{
table::BorderLine2 aBorderLine = xPropertySet->getPropertyValue(PropertyMap::getPropertyName(aBorders[i])).get<table::BorderLine2>();
- aBorderLine.Color = aPropMap[PROP_LineColor].get<sal_Int32>();
+ aBorderLine.Color = aPropMap.getProperty(PROP_LineColor).get<sal_Int32>();
if (oLineWidth)
aBorderLine.LineWidth = *oLineWidth;
aPropMap.setProperty(aBorders[i], uno::makeAny(aBorderLine));
@@ -971,7 +971,7 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes
{
Reference< XGraphic > xGraphic = rFilter.getGraphicHelper().importEmbeddedGraphic( aGraphicPath );
if( xGraphic.is() )
- aOleProps[ PROP_Graphic ] <<= xGraphic;
+ aOleProps.setProperty( PROP_Graphic, xGraphic);
}
PropertySet aPropSet( xShape );
diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx
index 7d8c5ba..0da5045 100644
--- a/sc/source/filter/oox/drawingfragment.cxx
+++ b/sc/source/filter/oox/drawingfragment.cxx
@@ -101,7 +101,7 @@ Shape::Shape( const WorksheetHelper& rHelper, const AttributeList& rAttribs, con
void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& rxShapes )
{
OUString sURL;
- getShapeProperties()[ PROP_URL ] >>= sURL;
+ getShapeProperties().getProperty( PROP_URL ) >>= sURL;
getWorksheets().convertSheetNameRef( sURL );
if( !maMacroName.isEmpty() && mxShape.is() )
{
diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx
index a72a436..a7709b3 100644
--- a/sc/source/filter/oox/numberformatsbuffer.cxx
+++ b/sc/source/filter/oox/numberformatsbuffer.cxx
@@ -1946,7 +1946,7 @@ void NumberFormat::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) con
void NumberFormat::writeToPropertyMap( PropertyMap& rPropMap ) const
{
- rPropMap[ PROP_NumberFormat ] <<= maApiData.mnIndex;
+ rPropMap.setProperty( PROP_NumberFormat, maApiData.mnIndex);
}
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index 1f504cb..1f06e82 100644
--- a/sc/source/filter/oox/pagesettings.cxx
+++ b/sc/source/filter/oox/pagesettings.cxx
@@ -972,35 +972,35 @@ void PageSettingsConverter::writePageSettingsProperties(
// write all properties to property set
const UnitConverter& rUnitConv = getUnitConverter();
PropertyMap aPropMap;
- aPropMap[ PROP_IsLandscape ] <<= bLandscape;
- aPropMap[ PROP_FirstPageNumber ] <<= getLimitedValue< sal_Int16, sal_Int32 >( rModel.mbUseFirstPage ? rModel.mnFirstPage : 0, 0, 9999 );
- aPropMap[ PROP_PrintDownFirst ] <<= (rModel.mnPageOrder == XML_downThenOver);
- aPropMap[ PROP_PrintAnnotations ] <<= (rModel.mnCellComments == XML_asDisplayed);
- aPropMap[ PROP_CenterHorizontally ] <<= rModel.mbHorCenter;
- aPropMap[ PROP_CenterVertically ] <<= rModel.mbVerCenter;
- aPropMap[ PROP_PrintGrid ] <<= (!bChartSheet && rModel.mbPrintGrid); // no gridlines in chart sheets
- aPropMap[ PROP_PrintHeaders ] <<= (!bChartSheet && rModel.mbPrintHeadings); // no column/row headings in chart sheets
- aPropMap[ PROP_LeftMargin ] <<= rUnitConv.scaleToMm100( rModel.mfLeftMargin, UNIT_INCH );
- aPropMap[ PROP_RightMargin ] <<= rUnitConv.scaleToMm100( rModel.mfRightMargin, UNIT_INCH );
+ aPropMap.setProperty( PROP_IsLandscape, bLandscape);
+ aPropMap.setProperty( PROP_FirstPageNumber, getLimitedValue< sal_Int16, sal_Int32 >( rModel.mbUseFirstPage ? rModel.mnFirstPage : 0, 0, 9999 ));
+ aPropMap.setProperty( PROP_PrintDownFirst, (rModel.mnPageOrder == XML_downThenOver));
+ aPropMap.setProperty( PROP_PrintAnnotations, (rModel.mnCellComments == XML_asDisplayed));
+ aPropMap.setProperty( PROP_CenterHorizontally, rModel.mbHorCenter);
+ aPropMap.setProperty( PROP_CenterVertically, rModel.mbVerCenter);
+ aPropMap.setProperty( PROP_PrintGrid, (!bChartSheet && rModel.mbPrintGrid)); // no gridlines in chart sheets
+ aPropMap.setProperty( PROP_PrintHeaders, (!bChartSheet && rModel.mbPrintHeadings)); // no column/row headings in chart sheets
+ aPropMap.setProperty( PROP_LeftMargin, rUnitConv.scaleToMm100( rModel.mfLeftMargin, UNIT_INCH ));
+ aPropMap.setProperty( PROP_RightMargin, rUnitConv.scaleToMm100( rModel.mfRightMargin, UNIT_INCH ));
// #i23296# In Calc, "TopMargin" property is distance to top of header if enabled
- aPropMap[ PROP_TopMargin ] <<= rUnitConv.scaleToMm100( maHeaderData.mbHasContent ? rModel.mfHeaderMargin : rModel.mfTopMargin, UNIT_INCH );
+ aPropMap.setProperty( PROP_TopMargin, rUnitConv.scaleToMm100( maHeaderData.mbHasContent ? rModel.mfHeaderMargin : rModel.mfTopMargin, UNIT_INCH ));
// #i23296# In Calc, "BottomMargin" property is distance to bottom of footer if enabled
- aPropMap[ PROP_BottomMargin ] <<= rUnitConv.scaleToMm100( maFooterData.mbHasContent ? rModel.mfFooterMargin : rModel.mfBottomMargin, UNIT_INCH );
- aPropMap[ PROP_HeaderIsOn ] <<= maHeaderData.mbHasContent;
- aPropMap[ PROP_HeaderIsShared ] <<= maHeaderData.mbShareOddEven;
- aPropMap[ PROP_HeaderIsDynamicHeight ] <<= maHeaderData.mbDynamicHeight;
- aPropMap[ PROP_HeaderHeight ] <<= maHeaderData.mnHeight;
- aPropMap[ PROP_HeaderBodyDistance ] <<= maHeaderData.mnBodyDist;
- aPropMap[ PROP_FooterIsOn ] <<= maFooterData.mbHasContent;
- aPropMap[ PROP_FooterIsShared ] <<= maFooterData.mbShareOddEven;
- aPropMap[ PROP_FooterIsDynamicHeight ] <<= maFooterData.mbDynamicHeight;
- aPropMap[ PROP_FooterHeight ] <<= maFooterData.mnHeight;
- aPropMap[ PROP_FooterBodyDistance ] <<= maFooterData.mnBodyDist;
+ aPropMap.setProperty( PROP_BottomMargin, rUnitConv.scaleToMm100( maFooterData.mbHasContent ? rModel.mfFooterMargin : rModel.mfBottomMargin, UNIT_INCH ));
+ aPropMap.setProperty( PROP_HeaderIsOn, maHeaderData.mbHasContent);
+ aPropMap.setProperty( PROP_HeaderIsShared, maHeaderData.mbShareOddEven);
+ aPropMap.setProperty( PROP_HeaderIsDynamicHeight, maHeaderData.mbDynamicHeight);
+ aPropMap.setProperty( PROP_HeaderHeight, maHeaderData.mnHeight);
+ aPropMap.setProperty( PROP_HeaderBodyDistance, maHeaderData.mnBodyDist);
+ aPropMap.setProperty( PROP_FooterIsOn, maFooterData.mbHasContent);
+ aPropMap.setProperty( PROP_FooterIsShared, maFooterData.mbShareOddEven);
+ aPropMap.setProperty( PROP_FooterIsDynamicHeight, maFooterData.mbDynamicHeight);
+ aPropMap.setProperty( PROP_FooterHeight, maFooterData.mnHeight);
+ aPropMap.setProperty( PROP_FooterBodyDistance, maFooterData.mnBodyDist);
// background image
if( !rModel.maGraphicUrl.isEmpty() )
{
- aPropMap[ PROP_BackGraphicURL ] <<= rModel.maGraphicUrl;
- aPropMap[ PROP_BackGraphicLocation ] <<= ::com::sun::star::style::GraphicLocation_TILED;
+ aPropMap.setProperty( PROP_BackGraphicURL, rModel.maGraphicUrl);
+ aPropMap.setProperty( PROP_BackGraphicLocation, ::com::sun::star::style::GraphicLocation_TILED);
}
rPropSet.setProperties( aPropMap );
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index 915fb92..5b8447f 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1046,67 +1046,67 @@ void Font::writeToPropertyMap( PropertyMap& rPropMap, FontPropertyType ePropType
{
if( !maApiData.maLatinFont.maName.isEmpty() )
{
- rPropMap[ PROP_CharFontName ] <<= maApiData.maLatinFont.maName;
- rPropMap[ PROP_CharFontFamily ] <<= maApiData.maLatinFont.mnFamily;
- rPropMap[ PROP_CharFontCharSet ] <<= maApiData.maLatinFont.mnTextEnc;
+ rPropMap.setProperty( PROP_CharFontName, maApiData.maLatinFont.maName);
+ rPropMap.setProperty( PROP_CharFontFamily, maApiData.maLatinFont.mnFamily);
+ rPropMap.setProperty( PROP_CharFontCharSet, maApiData.maLatinFont.mnTextEnc);
}
if( !maApiData.maAsianFont.maName.isEmpty() )
{
- rPropMap[ PROP_CharFontNameAsian ] <<= maApiData.maAsianFont.maName;
- rPropMap[ PROP_CharFontFamilyAsian ] <<= maApiData.maAsianFont.mnFamily;
- rPropMap[ PROP_CharFontCharSetAsian ] <<= maApiData.maAsianFont.mnTextEnc;
+ rPropMap.setProperty( PROP_CharFontNameAsian, maApiData.maAsianFont.maName);
+ rPropMap.setProperty( PROP_CharFontFamilyAsian, maApiData.maAsianFont.mnFamily);
+ rPropMap.setProperty( PROP_CharFontCharSetAsian, maApiData.maAsianFont.mnTextEnc);
}
if( !maApiData.maCmplxFont.maName.isEmpty() )
{
- rPropMap[ PROP_CharFontNameComplex ] <<= maApiData.maCmplxFont.maName;
- rPropMap[ PROP_CharFontFamilyComplex ] <<= maApiData.maCmplxFont.mnFamily;
- rPropMap[ PROP_CharFontCharSetComplex ] <<= maApiData.maCmplxFont.mnTextEnc;
+ rPropMap.setProperty( PROP_CharFontNameComplex, maApiData.maCmplxFont.maName);
+ rPropMap.setProperty( PROP_CharFontFamilyComplex, maApiData.maCmplxFont.mnFamily);
+ rPropMap.setProperty( PROP_CharFontCharSetComplex, maApiData.maCmplxFont.mnTextEnc);
}
}
// font height
if( maUsedFlags.mbHeightUsed )
{
float fHeight = static_cast< float >( maApiData.maDesc.Height / 20.0 ); // twips to points
- rPropMap[ PROP_CharHeight ] <<= fHeight;
- rPropMap[ PROP_CharHeightAsian ] <<= fHeight;
- rPropMap[ PROP_CharHeightComplex ] <<= fHeight;
+ rPropMap.setProperty( PROP_CharHeight, fHeight);
+ rPropMap.setProperty( PROP_CharHeightAsian, fHeight);
+ rPropMap.setProperty( PROP_CharHeightComplex, fHeight);
}
// font weight
if( maUsedFlags.mbWeightUsed )
{
float fWeight = maApiData.maDesc.Weight;
- rPropMap[ PROP_CharWeight ] <<= fWeight;
- rPropMap[ PROP_CharWeightAsian ] <<= fWeight;
- rPropMap[ PROP_CharWeightComplex ] <<= fWeight;
+ rPropMap.setProperty( PROP_CharWeight, fWeight);
+ rPropMap.setProperty( PROP_CharWeightAsian, fWeight);
+ rPropMap.setProperty( PROP_CharWeightComplex, fWeight);
}
// font posture
if( maUsedFlags.mbPostureUsed )
{
- rPropMap[ PROP_CharPosture ] <<= maApiData.maDesc.Slant;
- rPropMap[ PROP_CharPostureAsian ] <<= maApiData.maDesc.Slant;
- rPropMap[ PROP_CharPostureComplex ] <<= maApiData.maDesc.Slant;
+ rPropMap.setProperty( PROP_CharPosture, maApiData.maDesc.Slant);
+ rPropMap.setProperty( PROP_CharPostureAsian, maApiData.maDesc.Slant);
+ rPropMap.setProperty( PROP_CharPostureComplex, maApiData.maDesc.Slant);
}
// character color
if( maUsedFlags.mbColorUsed )
- rPropMap[ PROP_CharColor ] <<= maApiData.mnColor;
+ rPropMap.setProperty( PROP_CharColor, maApiData.mnColor);
// underline style
if( maUsedFlags.mbUnderlineUsed )
- rPropMap[ PROP_CharUnderline ] <<= maApiData.maDesc.Underline;
+ rPropMap.setProperty( PROP_CharUnderline, maApiData.maDesc.Underline);
// strike out style
if( maUsedFlags.mbStrikeoutUsed )
- rPropMap[ PROP_CharStrikeout ] <<= maApiData.maDesc.Strikeout;
+ rPropMap.setProperty( PROP_CharStrikeout, maApiData.maDesc.Strikeout);
// outline style
if( maUsedFlags.mbOutlineUsed )
- rPropMap[ PROP_CharContoured ] <<= maApiData.mbOutline;
+ rPropMap.setProperty( PROP_CharContoured, maApiData.mbOutline);
// shadow style
if( maUsedFlags.mbShadowUsed )
- rPropMap[ PROP_CharShadowed ] <<= maApiData.mbShadow;
+ rPropMap.setProperty( PROP_CharShadowed, maApiData.mbShadow);
// escapement
if( maUsedFlags.mbEscapementUsed )
{
- rPropMap[ PROP_CharEscapement ] <<= maApiData.mnEscapement;
+ rPropMap.setProperty( PROP_CharEscapement, maApiData.mnEscapement);
if( ePropType == FONT_PROPTYPE_TEXT )
- rPropMap[ PROP_CharEscapementHeight ] <<= maApiData.mnEscapeHeight;
+ rPropMap.setProperty( PROP_CharEscapementHeight, maApiData.mnEscapeHeight);
}
}
@@ -1379,16 +1379,16 @@ void Alignment::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const
void Alignment::writeToPropertyMap( PropertyMap& rPropMap ) const
{
- rPropMap[ PROP_HoriJustify ] <<= maApiData.meHorJustify;
- rPropMap[ PROP_HoriJustifyMethod ] <<= maApiData.mnHorJustifyMethod;
- rPropMap[ PROP_VertJustify ] <<= maApiData.mnVerJustify;
- rPropMap[ PROP_VertJustifyMethod ] <<= maApiData.mnVerJustifyMethod;
- rPropMap[ PROP_WritingMode ] <<= maApiData.mnWritingMode;
- rPropMap[ PROP_RotateAngle ] <<= maApiData.mnRotation;
- rPropMap[ PROP_Orientation ] <<= maApiData.meOrientation;
- rPropMap[ PROP_ParaIndent ] <<= maApiData.mnIndent;
- rPropMap[ PROP_IsTextWrapped ] <<= maApiData.mbWrapText;
- rPropMap[ PROP_ShrinkToFit ] <<= maApiData.mbShrink;
+ rPropMap.setProperty( PROP_HoriJustify, maApiData.meHorJustify);
+ rPropMap.setProperty( PROP_HoriJustifyMethod, maApiData.mnHorJustifyMethod);
+ rPropMap.setProperty( PROP_VertJustify, maApiData.mnVerJustify);
+ rPropMap.setProperty( PROP_VertJustifyMethod, maApiData.mnVerJustifyMethod);
+ rPropMap.setProperty( PROP_WritingMode, maApiData.mnWritingMode);
+ rPropMap.setProperty( PROP_RotateAngle, maApiData.mnRotation);
+ rPropMap.setProperty( PROP_Orientation, maApiData.meOrientation);
+ rPropMap.setProperty( PROP_ParaIndent, maApiData.mnIndent);
+ rPropMap.setProperty( PROP_IsTextWrapped, maApiData.mbWrapText);
+ rPropMap.setProperty( PROP_ShrinkToFit, maApiData.mbShrink);
}
@@ -1442,7 +1442,7 @@ void Protection::finalizeImport()
void Protection::writeToPropertyMap( PropertyMap& rPropMap ) const
{
- rPropMap[ PROP_CellProtection ] <<= maApiData.maCellProt;
+ rPropMap.setProperty( PROP_CellProtection, maApiData.maCellProt);
}
void Protection::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const
@@ -1676,15 +1676,15 @@ void Border::writeToPropertyMap( PropertyMap& rPropMap ) const
{
if( maApiData.mbBorderUsed )
{
- rPropMap[ PROP_LeftBorder ] <<= maApiData.maLeft;
- rPropMap[ PROP_RightBorder ] <<= maApiData.maRight;
- rPropMap[ PROP_TopBorder ] <<= maApiData.maTop;
- rPropMap[ PROP_BottomBorder ] <<= maApiData.maBottom;
+ rPropMap.setProperty( PROP_LeftBorder, maApiData.maLeft);
+ rPropMap.setProperty( PROP_RightBorder, maApiData.maRight);
+ rPropMap.setProperty( PROP_TopBorder, maApiData.maTop);
+ rPropMap.setProperty( PROP_BottomBorder, maApiData.maBottom);
}
if( maApiData.mbDiagUsed )
{
- rPropMap[ PROP_DiagonalTLBR ] <<= maApiData.maTLtoBR;
- rPropMap[ PROP_DiagonalBLTR ] <<= maApiData.maBLtoTR;
+ rPropMap.setProperty( PROP_DiagonalTLBR, maApiData.maTLtoBR);
+ rPropMap.setProperty( PROP_DiagonalBLTR, maApiData.maBLtoTR);
}
}
@@ -2079,8 +2079,8 @@ void Fill::writeToPropertyMap( PropertyMap& rPropMap ) const
{
if( maApiData.mbUsed )
{
- rPropMap[ PROP_CellBackColor ] <<= maApiData.mnColor;
- rPropMap[ PROP_IsCellBackgroundTransparent ] <<= maApiData.mbTransparent;
+ rPropMap.setProperty( PROP_CellBackColor, maApiData.mnColor);
+ rPropMap.setProperty( PROP_IsCellBackgroundTransparent, maApiData.mbTransparent);
}
}
@@ -2245,7 +2245,7 @@ void Xf::writeToPropertyMap( PropertyMap& rPropMap ) const
// create and set cell style
if( isCellXf() )
- rPropMap[ PROP_CellStyle ] <<= rStyles.createCellStyle( maModel.mnStyleXfId );
+ rPropMap.setProperty( PROP_CellStyle, rStyles.createCellStyle( maModel.mnStyleXfId ));
if( maModel.mbFontUsed )
rStyles.writeFontToPropertyMap( rPropMap, maModel.mnFontId );
@@ -2260,12 +2260,12 @@ void Xf::writeToPropertyMap( PropertyMap& rPropMap ) const
if( maModel.mbAreaUsed )
rStyles.writeFillToPropertyMap( rPropMap, maModel.mnFillId );
if( maModel.mbAlignUsed || maModel.mbBorderUsed )
- rPropMap[ PROP_RotateReference ] <<= meRotationRef;
+ rPropMap.setProperty( PROP_RotateReference, meRotationRef);
sal_Int32 eRotRef = ::com::sun::star::table::CellVertJustify2::STANDARD;
if (maModel.mbBorderUsed && rStyles.hasBorder(maModel.mnBorderId) && maAlignment.getApiData().mnRotation)
eRotRef = ::com::sun::star::table::CellVertJustify2::BOTTOM;
- rPropMap[ PROP_RotateReference ] <<= eRotRef;
+ rPropMap.setProperty( PROP_RotateReference, eRotRef);
}
void Xf::writeToPropertySet( PropertySet& rPropSet ) const
diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx
index c4c7d50..de36ecf 100644
--- a/sc/source/filter/oox/viewsettings.cxx
+++ b/sc/source/filter/oox/viewsettings.cxx
@@ -419,28 +419,28 @@ void SheetViewSettings::finalizeImport()
// write the sheet view settings into the property sequence
PropertyMap aPropMap;
- aPropMap[ PROP_TableSelected ] <<= bSelected;
- aPropMap[ PROP_CursorPositionX ] <<= aCursor.Column;
- aPropMap[ PROP_CursorPositionY ] <<= aCursor.Row;
- aPropMap[ PROP_HorizontalSplitMode ] <<= nHSplitMode;
- aPropMap[ PROP_VerticalSplitMode ] <<= nVSplitMode;
- aPropMap[ PROP_HorizontalSplitPositionTwips ] <<= nHSplitPos;
- aPropMap[ PROP_VerticalSplitPositionTwips ] <<= nVSplitPos;
- aPropMap[ PROP_ActiveSplitRange ] <<= nActivePane;
- aPropMap[ PROP_PositionLeft ] <<= aFirstPos.Column;
- aPropMap[ PROP_PositionTop ] <<= aFirstPos.Row;
- aPropMap[ PROP_PositionRight ] <<= xModel->maSecondPos.Column;
- aPropMap[ PROP_PositionBottom ] <<= ((nVSplitPos > 0) ? xModel->maSecondPos.Row : xModel->maFirstPos.Row);
- aPropMap[ PROP_ZoomType ] <<= API_ZOOMTYPE_PERCENT;
- aPropMap[ PROP_ZoomValue ] <<= static_cast< sal_Int16 >( xModel->getNormalZoom() );
- aPropMap[ PROP_PageViewZoomValue ] <<= static_cast< sal_Int16 >( xModel->getPageBreakZoom() );
- aPropMap[ PROP_GridColor ] <<= xModel->getGridColor( getBaseFilter() );
- aPropMap[ PROP_ShowPageBreakPreview ] <<= xModel->isPageBreakPreview();
- aPropMap[ PROP_ShowFormulas ] <<= xModel->mbShowFormulas;
- aPropMap[ PROP_ShowGrid ] <<= xModel->mbShowGrid;
- aPropMap[ PROP_HasColumnRowHeaders ] <<= xModel->mbShowHeadings;
- aPropMap[ PROP_ShowZeroValues ] <<= xModel->mbShowZeros;
- aPropMap[ PROP_IsOutlineSymbolsSet ] <<= xModel->mbShowOutline;
+ aPropMap.setProperty( PROP_TableSelected, bSelected);
+ aPropMap.setProperty( PROP_CursorPositionX, aCursor.Column);
+ aPropMap.setProperty( PROP_CursorPositionY, aCursor.Row);
+ aPropMap.setProperty( PROP_HorizontalSplitMode, nHSplitMode);
+ aPropMap.setProperty( PROP_VerticalSplitMode, nVSplitMode);
+ aPropMap.setProperty( PROP_HorizontalSplitPositionTwips, nHSplitPos);
+ aPropMap.setProperty( PROP_VerticalSplitPositionTwips, nVSplitPos);
+ aPropMap.setProperty( PROP_ActiveSplitRange, nActivePane);
+ aPropMap.setProperty( PROP_PositionLeft, aFirstPos.Column);
+ aPropMap.setProperty( PROP_PositionTop, aFirstPos.Row);
+ aPropMap.setProperty( PROP_PositionRight, xModel->maSecondPos.Column);
+ aPropMap.setProperty( PROP_PositionBottom, ((nVSplitPos > 0) ? xModel->maSecondPos.Row : xModel->maFirstPos.Row));
+ aPropMap.setProperty( PROP_ZoomType, API_ZOOMTYPE_PERCENT);
+ aPropMap.setProperty( PROP_ZoomValue, static_cast< sal_Int16 >( xModel->getNormalZoom() ));
+ aPropMap.setProperty( PROP_PageViewZoomValue, static_cast< sal_Int16 >( xModel->getPageBreakZoom() ));
+ aPropMap.setProperty( PROP_GridColor, xModel->getGridColor( getBaseFilter() ));
+ aPropMap.setProperty( PROP_ShowPageBreakPreview, xModel->isPageBreakPreview());
+ aPropMap.setProperty( PROP_ShowFormulas, xModel->mbShowFormulas);
+ aPropMap.setProperty( PROP_ShowGrid, xModel->mbShowGrid);
+ aPropMap.setProperty( PROP_HasColumnRowHeaders, xModel->mbShowHeadings);
+ aPropMap.setProperty( PROP_ShowZeroValues, xModel->mbShowZeros);
+ aPropMap.setProperty( PROP_IsOutlineSymbolsSet, xModel->mbShowOutline);
// store sheet view settings in global view settings object
getViewSettings().setSheetViewSettings( getSheetIndex(), xModel, Any( aPropMap.makePropertyValueSequence() ) );
@@ -567,22 +567,22 @@ void ViewSettings::finalizeImport()
if( xContainer.is() ) try
{
PropertyMap aPropMap;
- aPropMap[ PROP_Tables ] <<= xSheetsNC;
- aPropMap[ PROP_ActiveTable ] <<= rWorksheets.getCalcSheetName( nActiveSheet );
- aPropMap[ PROP_HasHorizontalScrollBar ] <<= rModel.mbShowHorScroll;
- aPropMap[ PROP_HasVerticalScrollBar ] <<= rModel.mbShowVerScroll;
- aPropMap[ PROP_HasSheetTabs ] <<= rModel.mbShowTabBar;
- aPropMap[ PROP_RelativeHorizontalTabbarWidth ] <<= double( rModel.mnTabBarWidth / 1000.0 );
- aPropMap[ PROP_ShowObjects ] <<= nShowMode;
- aPropMap[ PROP_ShowCharts ] <<= nShowMode;
- aPropMap[ PROP_ShowDrawing ] <<= nShowMode;
- aPropMap[ PROP_GridColor ] <<= rxActiveSheetView->getGridColor( getBaseFilter() );
- aPropMap[ PROP_ShowPageBreakPreview ] <<= rxActiveSheetView->isPageBreakPreview();
- aPropMap[ PROP_ShowFormulas ] <<= rxActiveSheetView->mbShowFormulas;
- aPropMap[ PROP_ShowGrid ] <<= rxActiveSheetView->mbShowGrid;
- aPropMap[ PROP_HasColumnRowHeaders ] <<= rxActiveSheetView->mbShowHeadings;
- aPropMap[ PROP_ShowZeroValues ] <<= rxActiveSheetView->mbShowZeros;
- aPropMap[ PROP_IsOutlineSymbolsSet ] <<= rxActiveSheetView->mbShowOutline;
+ aPropMap.setProperty( PROP_Tables, xSheetsNC);
+ aPropMap.setProperty( PROP_ActiveTable, rWorksheets.getCalcSheetName( nActiveSheet ));
+ aPropMap.setProperty( PROP_HasHorizontalScrollBar, rModel.mbShowHorScroll);
+ aPropMap.setProperty( PROP_HasVerticalScrollBar, rModel.mbShowVerScroll);
+ aPropMap.setProperty( PROP_HasSheetTabs, rModel.mbShowTabBar);
+ aPropMap.setProperty( PROP_RelativeHorizontalTabbarWidth, double( rModel.mnTabBarWidth / 1000.0 ));
+ aPropMap.setProperty( PROP_ShowObjects, nShowMode);
+ aPropMap.setProperty( PROP_ShowCharts, nShowMode);
+ aPropMap.setProperty( PROP_ShowDrawing, nShowMode);
+ aPropMap.setProperty( PROP_GridColor, rxActiveSheetView->getGridColor( getBaseFilter() ));
+ aPropMap.setProperty( PROP_ShowPageBreakPreview, rxActiveSheetView->isPageBreakPreview());
+ aPropMap.setProperty( PROP_ShowFormulas, rxActiveSheetView->mbShowFormulas);
+ aPropMap.setProperty( PROP_ShowGrid, rxActiveSheetView->mbShowGrid);
+ aPropMap.setProperty( PROP_HasColumnRowHeaders, rxActiveSheetView->mbShowHeadings);
+ aPropMap.setProperty( PROP_ShowZeroValues, rxActiveSheetView->mbShowZeros);
+ aPropMap.setProperty( PROP_IsOutlineSymbolsSet, rxActiveSheetView->mbShowOutline);
xContainer->insertByIndex( 0, Any( aPropMap.makePropertyValueSequence() ) );
Reference< XViewDataSupplier > xViewDataSuppl( getDocument(), UNO_QUERY_THROW );
commit f1659922a6e152f6a38ab13d7cb308b5728db16c
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Tue Mar 4 09:30:50 2014 +0100
adapt the genrated files to use setProperty
Next step on my way to remove the inheritance from std::map
Change-Id: I96e8e4c05f1bd821a0c1c4de5c78af1706fe50e5
diff --git a/oox/source/drawingml/customshapepresets1.cxx b/oox/source/drawingml/customshapepresets1.cxx
index 1d91970..46b60d5 100644
--- a/oox/source/drawingml/customshapepresets1.cxx
+++ b/oox/source/drawingml/customshapepresets1.cxx
@@ -30,7 +30,7 @@ class ShapeCactionButtonSound : public CustomShapeProvider
PropertyMap aPropertyMap;
{
- aPropertyMap [PROP_AdjustmentValues] <<= Sequence< OUString >(0);
+ aPropertyMap.setProperty(PROP_AdjustmentValues, Sequence< OUString >(0));
}
{
static const char *aStrings[] = {
@@ -59,16 +59,16 @@ class ShapeCactionButtonSound : public CustomShapeProvider
"logwidth",
"logheight"
};
- aPropertyMap [PROP_Equations] <<= createStringSequence( SAL_N_ELEMENTS( aStrings ), aStrings );
+ aPropertyMap.setProperty(PROP_Equations, createStringSequence( SAL_N_ELEMENTS( aStrings ), aStrings ));
}
{
- aPropertyMap [PROP_Handles] <<= Sequence< OUString >(0);
+ aPropertyMap.setProperty(PROP_Handles, Sequence< OUString >(0));
}
{
- aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
+ aPropertyMap.setProperty(PROP_MirroredX, (sal_Bool) sal_False);
}
{
- aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
+ aPropertyMap.setProperty(PROP_MirroredY, (sal_Bool) sal_False);
}
{
Sequence< PropertyValue > aPropSequence (3);
@@ -302,7 +302,7 @@ class ShapeCactionButtonSound : public CustomShapeProvider
}
aPropSequence [2].Value = makeAny (aTextFrameSeq);
}
- aPropertyMap [PROP_Path] <<= aPropSequence;
+ aPropertyMap.setProperty(PROP_Path, aPropSequence);
}
{
awt::Rectangle aRectangle;
@@ -310,9 +310,9 @@ class ShapeCactionButtonSound : public CustomShapeProvider
aRectangle.Y = 0;
aRectangle.Width = 0;
aRectangle.Height = 0;
- aPropertyMap [PROP_ViewBox] <<= aRectangle;
+ aPropertyMap.setProperty(PROP_ViewBox, aRectangle);
}
- aPropertyMap [ PROP_Type ] <<= OUString("ooxml-actionButtonSound");
+ aPropertyMap.setProperty( PROP_Type, OUString("ooxml-actionButtonSound"));
return aPropertyMap;
}
@@ -348,7 +348,7 @@ class ShapeCborderCallout1 : public CustomShapeProvider
aAdjSequence [3].Value = aAny;
aAdjSequence [3].Name = "adj4";
}
- aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
+ aPropertyMap.setProperty(PROP_AdjustmentValues, aAdjSequence);
}
{
static const char *aStrings[] = {
@@ -361,7 +361,7 @@ class ShapeCborderCallout1 : public CustomShapeProvider
"logwidth/2",
"logheight"
};
- aPropertyMap [PROP_Equations] <<= createStringSequence( SAL_N_ELEMENTS( aStrings ), aStrings );
+ aPropertyMap.setProperty(PROP_Equations, createStringSequence( SAL_N_ELEMENTS( aStrings ), aStrings ));
}
{
Sequence< Sequence < PropertyValue > > aPropSequenceSequence (2);
@@ -477,13 +477,13 @@ class ShapeCborderCallout1 : public CustomShapeProvider
}
aPropSequenceSequence [1] = aPropSequence;
}
- aPropertyMap [PROP_Handles] <<= aPropSequenceSequence;
+ aPropertyMap.setProperty(PROP_Handles, aPropSequenceSequence);
}
{
- aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
+ aPropertyMap.setProperty(PROP_MirroredX, (sal_Bool) sal_False);
}
{
- aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
+ aPropertyMap.setProperty(PROP_MirroredY, (sal_Bool) sal_False);
}
{
Sequence< PropertyValue > aPropSequence (3);
@@ -565,7 +565,7 @@ class ShapeCborderCallout1 : public CustomShapeProvider
}
aPropSequence [2].Value = makeAny (aTextFrameSeq);
}
- aPropertyMap [PROP_Path] <<= aPropSequence;
+ aPropertyMap.setProperty(PROP_Path, aPropSequence);
}
{
awt::Rectangle aRectangle;
@@ -573,9 +573,9 @@ class ShapeCborderCallout1 : public CustomShapeProvider
aRectangle.Y = 0;
aRectangle.Width = 0;
aRectangle.Height = 0;
- aPropertyMap [PROP_ViewBox] <<= aRectangle;
+ aPropertyMap.setProperty(PROP_ViewBox, aRectangle);
}
- aPropertyMap [ PROP_Type ] <<= OUString("ooxml-borderCallout1");
+ aPropertyMap.setProperty( PROP_Type, OUString("ooxml-borderCallout1"));
return aPropertyMap;
}
@@ -590,7 +590,7 @@ class ShapeCplaqueTabs : public CustomShapeProvider
PropertyMap aPropertyMap;
{
- aPropertyMap [PROP_AdjustmentValues] <<= Sequence< OUString >(0);
+ aPropertyMap.setProperty(PROP_AdjustmentValues, Sequence< OUString >(0));
}
{
static const char *aStrings[] = {
@@ -609,16 +609,16 @@ class ShapeCplaqueTabs : public CustomShapeProvider
"(10800000)/60000.0",
"(5400000)/60000.0"
};
- aPropertyMap [PROP_Equations] <<= createStringSequence( SAL_N_ELEMENTS( aStrings ), aStrings );
+ aPropertyMap.setProperty(PROP_Equations, createStringSequence( SAL_N_ELEMENTS( aStrings ), aStrings ));
}
{
- aPropertyMap [PROP_Handles] <<= Sequence< OUString >(0);
+ aPropertyMap.setProperty(PROP_Handles, Sequence< OUString >(0));
}
{
- aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
+ aPropertyMap.setProperty(PROP_MirroredX, (sal_Bool) sal_False);
}
{
- aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
+ aPropertyMap.setProperty(PROP_MirroredY, (sal_Bool) sal_False);
}
{
Sequence< PropertyValue > aPropSequence (3);
@@ -762,7 +762,7 @@ class ShapeCplaqueTabs : public CustomShapeProvider
}
aPropSequence [2].Value = makeAny (aTextFrameSeq);
}
- aPropertyMap [PROP_Path] <<= aPropSequence;
+ aPropertyMap.setProperty(PROP_Path, aPropSequence);
}
{
awt::Rectangle aRectangle;
@@ -770,9 +770,9 @@ class ShapeCplaqueTabs : public CustomShapeProvider
aRectangle.Y = 0;
aRectangle.Width = 0;
aRectangle.Height = 0;
- aPropertyMap [PROP_ViewBox] <<= aRectangle;
+ aPropertyMap.setProperty(PROP_ViewBox, aRectangle);
}
- aPropertyMap [ PROP_Type ] <<= OUString("ooxml-plaqueTabs");
+ aPropertyMap.setProperty( PROP_Type, OUString("ooxml-plaqueTabs"));
return aPropertyMap;
}
@@ -803,7 +803,7 @@ class ShapeCcurvedLeftArrow : public CustomShapeProvider
aAdjSequence [2].Value = aAny;
aAdjSequence [2].Name = "adj3";
}
- aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
+ aPropertyMap.setProperty(PROP_AdjustmentValues, aAdjSequence);
}
{
static const char *aStrings[] = {
@@ -869,7 +869,7 @@ class ShapeCcurvedLeftArrow : public CustomShapeProvider
"(?33 )/60000.0",
"(?39 )/60000.0"
};
- aPropertyMap [PROP_Equations] <<= createStringSequence( SAL_N_ELEMENTS( aStrings ), aStrings );
+ aPropertyMap.setProperty(PROP_Equations, createStringSequence( SAL_N_ELEMENTS( aStrings ), aStrings ));
}
{
Sequence< Sequence < PropertyValue > > aPropSequenceSequence (3);
@@ -978,13 +978,13 @@ class ShapeCcurvedLeftArrow : public CustomShapeProvider
}
aPropSequenceSequence [2] = aPropSequence;
}
- aPropertyMap [PROP_Handles] <<= aPropSequenceSequence;
+ aPropertyMap.setProperty(PROP_Handles, aPropSequenceSequence);
}
{
- aPropertyMap [PROP_MirroredX] <<= Any ((sal_Bool) sal_False);
+ aPropertyMap.setProperty(PROP_MirroredX, (sal_Bool) sal_False);
}
{
- aPropertyMap [PROP_MirroredY] <<= Any ((sal_Bool) sal_False);
+ aPropertyMap.setProperty(PROP_MirroredY, (sal_Bool) sal_False);
}
{
Sequence< PropertyValue > aPropSequence (3);
@@ -1198,7 +1198,7 @@ class ShapeCcurvedLeftArrow : public CustomShapeProvider
}
aPropSequence [2].Value = makeAny (aTextFrameSeq);
}
- aPropertyMap [PROP_Path] <<= aPropSequence;
+ aPropertyMap.setProperty(PROP_Path, aPropSequence);
}
{
awt::Rectangle aRectangle;
@@ -1206,9 +1206,9 @@ class ShapeCcurvedLeftArrow : public CustomShapeProvider
aRectangle.Y = 0;
aRectangle.Width = 0;
aRectangle.Height = 0;
- aPropertyMap [PROP_ViewBox] <<= aRectangle;
+ aPropertyMap.setProperty(PROP_ViewBox, aRectangle);
}
- aPropertyMap [ PROP_Type ] <<= OUString("ooxml-curvedLeftArrow");
+ aPropertyMap.setProperty( PROP_Type, OUString("ooxml-curvedLeftArrow"));
return aPropertyMap;
}
@@ -1229,7 +1229,7 @@ class ShapeCoctagon : public CustomShapeProvider
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list