From 2b7215e6fa12cd947bdbbe195909642a850cfd69 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 2 Mar 2016 16:39:41 +0200 Subject: loplugin:unuseddefaultparams in oox Change-Id: If05662102e161d3dd56bbb6ed3964e63ba853cf9 --- include/oox/core/fastparser.hxx | 2 +- include/oox/core/xmlfilterbase.hxx | 2 +- include/oox/helper/binaryinputstream.hxx | 2 +- include/oox/helper/binaryoutputstream.hxx | 2 +- include/oox/helper/containerhelper.hxx | 19 ++++++----------- include/oox/ole/axbinarywriter.hxx | 8 ++++---- include/oox/ole/vbaproject.hxx | 3 +-- include/oox/vml/vmlshape.hxx | 3 +-- oox/inc/drawingml/graphicproperties.hxx | 3 +-- oox/inc/drawingml/textcharacterproperties.hxx | 3 +-- oox/source/core/fastparser.cxx | 4 ++-- oox/source/core/xmlfilterbase.cxx | 4 ++-- oox/source/drawingml/fillproperties.cxx | 6 +++--- oox/source/drawingml/textcharacterproperties.cxx | 4 ++-- oox/source/helper/binaryinputstream.cxx | 6 +++--- oox/source/helper/binaryoutputstream.cxx | 7 +++---- oox/source/helper/containerhelper.cxx | 26 +++++------------------- oox/source/ole/axbinarywriter.cxx | 19 ++++++++--------- oox/source/ole/vbaproject.cxx | 4 ++-- oox/source/vml/vmlshape.cxx | 4 ++-- 20 files changed, 50 insertions(+), 81 deletions(-) diff --git a/include/oox/core/fastparser.hxx b/include/oox/core/fastparser.hxx index e19bdeb87026..946e6541dbb6 100644 --- a/include/oox/core/fastparser.hxx +++ b/include/oox/core/fastparser.hxx @@ -71,7 +71,7 @@ public: /** Parses a stream from the passed storage with the specified name. @param bCloseStream True = closes the stream after parsing. */ - void parseStream( StorageBase& rStorage, const OUString& rStreamName, bool bCloseStream = false ) + void parseStream( StorageBase& rStorage, const OUString& rStreamName ) throw( css::xml::sax::SAXException, css::io::IOException, css::uno::RuntimeException ); css::uno::Reference< css::xml::sax::XFastTokenHandler > diff --git a/include/oox/core/xmlfilterbase.hxx b/include/oox/core/xmlfilterbase.hxx index e2415b3f64ca..b55a4217190c 100644 --- a/include/oox/core/xmlfilterbase.hxx +++ b/include/oox/core/xmlfilterbase.hxx @@ -146,7 +146,7 @@ public: @return Added relation Id. */ - OUString addRelation( const OUString& rType, const OUString& rTarget, bool bExternal = false ); + OUString addRelation( const OUString& rType, const OUString& rTarget ); /** Adds new relation to part's relations. diff --git a/include/oox/helper/binaryinputstream.hxx b/include/oox/helper/binaryinputstream.hxx index fba55a0127c7..101f1f0ad580 100644 --- a/include/oox/helper/binaryinputstream.hxx +++ b/include/oox/helper/binaryinputstream.hxx @@ -188,7 +188,7 @@ public: /** Copies nBytes bytes from the current position to the passed output stream. */ - void copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes = SAL_MAX_INT64, sal_Int32 nAtomSize = 1 ); + void copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes = SAL_MAX_INT64 ); protected: /** This dummy default c'tor will never call the c'tor of the virtual base diff --git a/include/oox/helper/binaryoutputstream.hxx b/include/oox/helper/binaryoutputstream.hxx index 486b4efa9d43..8e315fadaa30 100644 --- a/include/oox/helper/binaryoutputstream.hxx +++ b/include/oox/helper/binaryoutputstream.hxx @@ -73,7 +73,7 @@ public: BinaryOutputStream& WriteUInt32(sal_uInt32 x) { writeValue(x); return *this; } BinaryOutputStream& WriteInt64(sal_Int64 x) { writeValue(x); return *this; } - void writeCompressedUnicodeArray( const OUString& rString, bool bCompressed, bool bAllowNulChars = false ); + void writeCompressedUnicodeArray( const OUString& rString, bool bCompressed ); void writeCharArrayUC( const OUString& rString, rtl_TextEncoding eTextEnc, bool bAllowNulChars = false ); diff --git a/include/oox/helper/containerhelper.hxx b/include/oox/helper/containerhelper.hxx index 66d098f869ce..6fc6bd7eb6af 100644 --- a/include/oox/helper/containerhelper.hxx +++ b/include/oox/helper/containerhelper.hxx @@ -150,8 +150,7 @@ public: static OUString getUnusedName( const css::uno::Reference< css::container::XNameAccess >& rxNameAccess, const OUString& rSuggestedName, - sal_Unicode cSeparator, - sal_Int32 nFirstIndexToAppend = 1 ); + sal_Unicode cSeparator ); /** Inserts an object into a name container. @@ -167,8 +166,7 @@ public: static bool insertByName( const css::uno::Reference< css::container::XNameContainer >& rxNameContainer, const OUString& rName, - const css::uno::Any& rObject, - bool bReplaceOldExisting = true ); + const css::uno::Any& rObject ); /** Inserts an object into a name container. @@ -184,13 +182,9 @@ public: @param rObject The object to be inserted. - @param bRenameOldExisting Specifies behaviour if an object with the - suggested name already exists. If false (default), the new object - will be inserted with a name not yet extant in the container (this - is done by appending a numerical index to the suggested name). If - true, the existing object will be removed and inserted with an - unused name, and the new object will be inserted with the suggested - name. + The new object + will be inserted with a name not yet extant in the container (this + is done by appending a numerical index to the suggested name). @return The final name the object is inserted with. Will always be equal to the suggested name, if parameter bRenameOldExisting is @@ -200,8 +194,7 @@ public: const css::uno::Reference< css::container::XNameContainer >& rxNameContainer, const OUString& rSuggestedName, sal_Unicode cSeparator, - const css::uno::Any& rObject, - bool bRenameOldExisting = false ); + const css::uno::Any& rObject ); // std::vector and std::map element access -------------------------------- diff --git a/include/oox/ole/axbinarywriter.hxx b/include/oox/ole/axbinarywriter.hxx index 02fa348c513e..66dc5000dca1 100644 --- a/include/oox/ole/axbinarywriter.hxx +++ b/include/oox/ole/axbinarywriter.hxx @@ -54,7 +54,7 @@ public: position of the wrapped stream at construction time). */ void align( size_t nSize ); - void pad( sal_Int32 nBytes, size_t nAtomSize = 1); + void pad( sal_Int32 nBytes ); /** Aligns the stream according to the passed type and reads a value. */ template< typename Type > @@ -84,13 +84,13 @@ public: { if( startNextProperty() ) maOutStrm.writeAligned< StreamType >( ornValue ); } /** Write a boolean property value to the stream, the respective flag in the property mask is set. */ - void writeBoolProperty( bool orbValue, bool bReverse = false ); + void writeBoolProperty( bool orbValue ); /** Write a pair property the stream, the respective flag in the property mask is set. */ void writePairProperty( AxPairData& orPairData ); /** Write a string property to the stream, the respective flag in the property mask is set. */ - void writeStringProperty( OUString& orValue, bool bCompressed = true ); + void writeStringProperty( OUString& orValue ); /** Skips the next property clears the respective flag in the property mask. */ @@ -100,7 +100,7 @@ public: void finalizeExport(); private: - bool ensureValid( bool bCondition = true ); + bool ensureValid(); bool startNextProperty( bool bSkip = false ); private: diff --git a/include/oox/ole/vbaproject.hxx b/include/oox/ole/vbaproject.hxx index e4ed68255bdb..d5230988e211 100644 --- a/include/oox/ole/vbaproject.hxx +++ b/include/oox/ole/vbaproject.hxx @@ -118,8 +118,7 @@ public: */ void importVbaProject( StorageBase& rVbaPrjStrg, - const GraphicHelper& rGraphicHelper, - bool bDefaultColorBgr = true ); + const GraphicHelper& rGraphicHelper ); bool importVbaProject( StorageBase& rVbaPrjStrg ); diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx index 631359103952..2d3cf21abeb6 100644 --- a/include/oox/vml/vmlshape.hxx +++ b/include/oox/vml/vmlshape.hxx @@ -246,8 +246,7 @@ public: /** Converts position and formatting into the passed existing XShape. */ void convertFormatting( - const css::uno::Reference< css::drawing::XShape >& rxShape, - const ShapeParentAnchor* pParentAnchor = nullptr ) const; + const css::uno::Reference< css::drawing::XShape >& rxShape ) const; protected: explicit ShapeBase( Drawing& rDrawing ); diff --git a/oox/inc/drawingml/graphicproperties.hxx b/oox/inc/drawingml/graphicproperties.hxx index a834681e5331..e8f7222e1281 100644 --- a/oox/inc/drawingml/graphicproperties.hxx +++ b/oox/inc/drawingml/graphicproperties.hxx @@ -44,8 +44,7 @@ struct GraphicProperties /** Writes the properties to the passed property map. */ void pushToPropMap( PropertyMap& rPropMap, - const GraphicHelper& rGraphicHelper, - sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const; + const GraphicHelper& rGraphicHelper ) const; }; } // namespace drawingml diff --git a/oox/inc/drawingml/textcharacterproperties.hxx b/oox/inc/drawingml/textcharacterproperties.hxx index 1720bee0bc69..8f84e8ab0f99 100644 --- a/oox/inc/drawingml/textcharacterproperties.hxx +++ b/oox/inc/drawingml/textcharacterproperties.hxx @@ -77,8 +77,7 @@ struct TextCharacterProperties /** Writes the properties to the passed property set. */ void pushToPropSet( PropertySet& rPropSet, - const ::oox::core::XmlFilterBase& rFilter, - bool bUseOptional = false ) const; + const ::oox::core::XmlFilterBase& rFilter ) const; }; diff --git a/oox/source/core/fastparser.cxx b/oox/source/core/fastparser.cxx index 5465577842ed..6410a42901b6 100644 --- a/oox/source/core/fastparser.cxx +++ b/oox/source/core/fastparser.cxx @@ -126,9 +126,9 @@ void FastParser::parseStream( const Reference< XInputStream >& rxInStream, const parseStream( aInputSource, bCloseStream ); } -void FastParser::parseStream( StorageBase& rStorage, const OUString& rStreamName, bool bCloseStream ) throw( SAXException, IOException, RuntimeException ) +void FastParser::parseStream( StorageBase& rStorage, const OUString& rStreamName ) throw( SAXException, IOException, RuntimeException ) { - parseStream( rStorage.openInputStream( rStreamName ), rStreamName, bCloseStream ); + parseStream( rStorage.openInputStream( rStreamName ), rStreamName ); } } // namespace core diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 062a600981c6..5551dc06ccf8 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -481,11 +481,11 @@ OUString lclAddRelation( const Reference< XRelationshipAccess >& rRelations, sal } // namespace -OUString XmlFilterBase::addRelation( const OUString& rType, const OUString& rTarget, bool bExternal ) +OUString XmlFilterBase::addRelation( const OUString& rType, const OUString& rTarget ) { Reference< XRelationshipAccess > xRelations( getStorage()->getXStorage(), UNO_QUERY ); if( xRelations.is() ) - return lclAddRelation( xRelations, mnRelId ++, rType, rTarget, bExternal ); + return lclAddRelation( xRelations, mnRelId ++, rType, rTarget, false/*bExternal*/ ); return OUString(); } diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index a667bc5a4b19..e8a6001933c7 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -690,7 +690,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, } } -void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const +void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper ) const { sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 ); sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 ); @@ -705,8 +705,8 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe if( maBlipProps.mxGraphic.is() ) { // created transformed graphic - Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, nPhClr ); - xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, xGraphic, rGraphicHelper, nPhClr ); + Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, API_RGB_TRANSPARENT ); + xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, xGraphic, rGraphicHelper, API_RGB_TRANSPARENT ); if (eColorMode == ColorMode_STANDARD && nBrightness == 70 && nContrast == -70) // map MSO 'washout' to our Watermark colormode diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index d7a848d99ef1..acf337ee1a8b 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -182,10 +182,10 @@ void pushToGrabBag( PropertySet& rPropSet, const std::vector& aVe rPropSet.setAnyProperty(PROP_CharInteropGrabBag, makeAny(aGrabBag)); } -void TextCharacterProperties::pushToPropSet( PropertySet& rPropSet, const XmlFilterBase& rFilter, bool bUseOptional ) const +void TextCharacterProperties::pushToPropSet( PropertySet& rPropSet, const XmlFilterBase& rFilter ) const { PropertyMap aPropMap; - pushToPropMap( aPropMap, rFilter, bUseOptional ); + pushToPropMap( aPropMap, rFilter ); rPropSet.setProperties( aPropMap ); pushToGrabBag(rPropSet, maTextEffectsProperties); } diff --git a/oox/source/helper/binaryinputstream.cxx b/oox/source/helper/binaryinputstream.cxx index a8e06835a6ae..7f35f6d3e280 100644 --- a/oox/source/helper/binaryinputstream.cxx +++ b/oox/source/helper/binaryinputstream.cxx @@ -102,17 +102,17 @@ OUString BinaryInputStream::readCompressedUnicodeArray( sal_Int32 nChars, bool b readUnicodeArray( nChars, bAllowNulChars ); } -void BinaryInputStream::copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes, sal_Int32 nAtomSize ) +void BinaryInputStream::copyToStream( BinaryOutputStream& rOutStrm, sal_Int64 nBytes ) { if( nBytes > 0 ) { // make buffer size a multiple of the passed atom size - sal_Int32 nBufferSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, (INPUTSTREAM_BUFFERSIZE / nAtomSize) * nAtomSize ); + sal_Int32 nBufferSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, INPUTSTREAM_BUFFERSIZE ); StreamDataSequence aBuffer( nBufferSize ); while( nBytes > 0 ) { sal_Int32 nReadSize = getLimitedValue< sal_Int32, sal_Int64 >( nBytes, 0, nBufferSize ); - sal_Int32 nBytesRead = readData( aBuffer, nReadSize, nAtomSize ); + sal_Int32 nBytesRead = readData( aBuffer, nReadSize ); rOutStrm.writeData( aBuffer ); if( nReadSize == nBytesRead ) nBytes -= nReadSize; diff --git a/oox/source/helper/binaryoutputstream.cxx b/oox/source/helper/binaryoutputstream.cxx index c5b8daf48e67..c35f15bc1834 100644 --- a/oox/source/helper/binaryoutputstream.cxx +++ b/oox/source/helper/binaryoutputstream.cxx @@ -123,14 +123,13 @@ BinaryOutputStream::writeUnicodeArray( const OUString& rString, bool bAllowNulCh #endif } -void -BinaryOutputStream::writeCompressedUnicodeArray( const OUString& rString, bool bCompressed, bool bAllowNulChars ) +void BinaryOutputStream::writeCompressedUnicodeArray( const OUString& rString, bool bCompressed ) { if ( bCompressed ) // ISO-8859-1 maps all byte values 0xHH to the same Unicode code point U+00HH - writeCharArrayUC( rString, RTL_TEXTENCODING_ISO_8859_1, bAllowNulChars ); + writeCharArrayUC( rString, RTL_TEXTENCODING_ISO_8859_1 ); else - writeUnicodeArray( rString, bAllowNulChars ); + writeUnicodeArray( rString ); } SequenceOutputStream::SequenceOutputStream( StreamDataSequence& rData ) : diff --git a/oox/source/helper/containerhelper.cxx b/oox/source/helper/containerhelper.cxx index 4a9d72317074..2f8b3d5851b6 100644 --- a/oox/source/helper/containerhelper.cxx +++ b/oox/source/helper/containerhelper.cxx @@ -77,12 +77,12 @@ void ValueRangeSet::insert( const ValueRange& rRange ) OUString ContainerHelper::getUnusedName( const Reference< XNameAccess >& rxNameAccess, const OUString& rSuggestedName, - sal_Unicode cSeparator, sal_Int32 nFirstIndexToAppend ) + sal_Unicode cSeparator ) { OSL_ENSURE( rxNameAccess.is(), "ContainerHelper::getUnusedName - missing XNameAccess interface" ); OUString aNewName = rSuggestedName; - sal_Int32 nIndex = nFirstIndexToAppend; + sal_Int32 nIndex = -1; while( rxNameAccess->hasByName( aNewName ) ) aNewName = OUStringBuffer( rSuggestedName ).append( cSeparator ).append( nIndex++ ).makeStringAndClear(); return aNewName; @@ -90,13 +90,13 @@ OUString ContainerHelper::getUnusedName( bool ContainerHelper::insertByName( const Reference< XNameContainer >& rxNameContainer, - const OUString& rName, const Any& rObject, bool bReplaceOldExisting ) + const OUString& rName, const Any& rObject ) { OSL_ENSURE( rxNameContainer.is(), "ContainerHelper::insertByName - missing XNameContainer interface" ); bool bRet = false; try { - if( bReplaceOldExisting && rxNameContainer->hasByName( rName ) ) + if( rxNameContainer->hasByName( rName ) ) rxNameContainer->replaceByName( rName, rObject ); else rxNameContainer->insertByName( rName, rObject ); @@ -112,29 +112,13 @@ bool ContainerHelper::insertByName( OUString ContainerHelper::insertByUnusedName( const Reference< XNameContainer >& rxNameContainer, const OUString& rSuggestedName, sal_Unicode cSeparator, - const Any& rObject, bool bRenameOldExisting ) + const Any& rObject ) { OSL_ENSURE( rxNameContainer.is(), "ContainerHelper::insertByUnusedName - missing XNameContainer interface" ); // find an unused name OUString aNewName = getUnusedName( rxNameContainer, rSuggestedName, cSeparator ); - // rename existing object - if( bRenameOldExisting && rxNameContainer->hasByName( rSuggestedName ) ) - { - try - { - Any aOldObject = rxNameContainer->getByName( rSuggestedName ); - rxNameContainer->removeByName( rSuggestedName ); - rxNameContainer->insertByName( aNewName, aOldObject ); - aNewName = rSuggestedName; - } - catch( Exception& ) - { - OSL_FAIL( "ContainerHelper::insertByUnusedName - cannot rename old object" ); - } - } - // insert the new object and return its resulting name insertByName( rxNameContainer, aNewName, rObject ); return aNewName; diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx index 26247e509c2c..ae731480db48 100644 --- a/oox/source/ole/axbinarywriter.cxx +++ b/oox/source/ole/axbinarywriter.cxx @@ -67,7 +67,7 @@ void AxAlignedOutputStream::writeMemory( const void* opMem, sal_Int32 nBytes, si mnStrmPos = mpOutStrm->tell() - mnWrappedBeginPos; } -void AxAlignedOutputStream::pad( sal_Int32 nBytes, size_t nAtomSize ) +void AxAlignedOutputStream::pad( sal_Int32 nBytes ) { //PRESUMABLY we need to pad with 0's here as appropriate css::uno::Sequence< sal_Int8 > aData( nBytes ); @@ -75,7 +75,7 @@ void AxAlignedOutputStream::pad( sal_Int32 nBytes, size_t nAtomSize ) // set to 0(s), easier to not get fooled by 0's when looking at // binary content...... memset( static_cast( aData.getArray() ), 0, nBytes ); - mpOutStrm->writeData( aData, nAtomSize ); + mpOutStrm->writeData( aData ); mnStrmPos = mpOutStrm->tell() - mnWrappedBeginPos; } @@ -130,10 +130,10 @@ AxBinaryPropertyWriter::AxBinaryPropertyWriter( BinaryOutputStream& rOutStrm, bo mnNextProp = 1; } -void AxBinaryPropertyWriter::writeBoolProperty( bool orbValue, bool bReverse ) +void AxBinaryPropertyWriter::writeBoolProperty( bool orbValue ) { // orbValue == bReverse false then we want to set the bit, e.g. don't skip - startNextProperty( orbValue == bReverse ); + startNextProperty( !orbValue ); } void AxBinaryPropertyWriter::writePairProperty( AxPairData& orPairData ) @@ -142,13 +142,10 @@ void AxBinaryPropertyWriter::writePairProperty( AxPairData& orPairData ) maLargeProps.push_back( ComplexPropVector::value_type( new PairProperty( orPairData ) ) ); } -void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue, bool bCompressed ) +void AxBinaryPropertyWriter::writeStringProperty( OUString& orValue ) { sal_uInt32 nSize = orValue.getLength(); - if ( bCompressed ) - setFlag( nSize, AX_STRING_COMPRESSED ); - else - nSize *= 2; + setFlag( nSize, AX_STRING_COMPRESSED ); maOutStrm.writeAligned< sal_uInt32 >( nSize ); maLargeProps.push_back( ComplexPropVector::value_type( new StringProperty( orValue, nSize ) ) ); startNextProperty(); @@ -187,9 +184,9 @@ void AxBinaryPropertyWriter::finalizeExport() maOutStrm.seek( nPos ); } -bool AxBinaryPropertyWriter::ensureValid( bool bCondition ) +bool AxBinaryPropertyWriter::ensureValid() { - mbValid = mbValid && bCondition && !maOutStrm.isEof(); + mbValid = mbValid && !maOutStrm.isEof(); return mbValid; } diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx index 607bec8282f5..4d2b28c1b8d3 100644 --- a/oox/source/ole/vbaproject.cxx +++ b/oox/source/ole/vbaproject.cxx @@ -167,13 +167,13 @@ bool VbaProject::importVbaProject( StorageBase& rVbaPrjStrg ) return hasModules() || hasDialogs(); } -void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr ) +void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper ) { if( rVbaPrjStrg.isStorage() ) { // load the code modules and forms if( isImportVba() ) - importVba( rVbaPrjStrg, rGraphicHelper, bDefaultColorBgr ); + importVba( rVbaPrjStrg, rGraphicHelper, true/*bDefaultColorBgr*/ ); // copy entire storage into model if( isExportVba() ) copyStorage( rVbaPrjStrg ); diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index ae717edad93d..c8d5476d304e 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -424,13 +424,13 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS return xShape; } -void ShapeBase::convertFormatting( const Reference< XShape >& rxShape, const ShapeParentAnchor* pParentAnchor ) const +void ShapeBase::convertFormatting( const Reference< XShape >& rxShape ) const { if( rxShape.is() ) { /* Calculate shape rectangle. Applications may do something special according to some imported shape client data (e.g. Excel cell anchor). */ - awt::Rectangle aShapeRect = calcShapeRectangle( pParentAnchor ); + awt::Rectangle aShapeRect = calcShapeRectangle( nullptr ); // convert the shape, if the calculated rectangle is not empty if( (aShapeRect.Width > 0) || (aShapeRect.Height > 0) ) -- cgit