summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-09 21:47:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-10 07:36:57 +0100
commit830e5e055760c31693e72e036ad473f4a3c43b55 (patch)
tree6e1cf0033f0a0ff60cc32b31f13e7af44ef38225 /oox
parent09cb778b6eb7d3a5b9029965a1320b49c90e7295 (diff)
pass FastAttributeList around by rtl::Reference
Change-Id: I958a22f60975c74dfaeb8469b4c0cd3759d40130 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx57
-rw-r--r--oox/source/export/vmlexport.cxx79
2 files changed, 60 insertions, 76 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index e2f0602017b6..7f7e6ec3525f 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -198,8 +198,7 @@ void WriteGradientPath(const awt::Gradient& rGradient, const FSHelperPtr& pFS, c
pAttributeList->add(XML_r, OString::number(nRightPercent * PER_PERCENT));
sal_Int32 nBottomPercent = 100 - rGradient.YOffset;
pAttributeList->add(XML_b, OString::number(nBottomPercent * PER_PERCENT));
- sax_fastparser::XFastAttributeListRef xAttributeList(pAttributeList.get());
- pFS->singleElementNS(XML_a, XML_fillToRect, xAttributeList);
+ pFS->singleElementNS(XML_a, XML_fillToRect, pAttributeList);
pFS->endElementNS(XML_a, XML_path);
}
@@ -3946,8 +3945,7 @@ void DrawingML::WriteShapeEffect( std::u16string_view sName, const Sequence< Pro
::Color nRgbClr;
sal_Int32 nAlpha = MAX_PERCENT;
Sequence< PropertyValue > aTransformations;
- sax_fastparser::FastAttributeList *aOuterShdwAttrList = FastSerializerHelper::createAttrList();
- sax_fastparser::XFastAttributeListRef xOuterShdwAttrList( aOuterShdwAttrList );
+ rtl::Reference<sax_fastparser::FastAttributeList> aOuterShdwAttrList = FastSerializerHelper::createAttrList();
for( const auto& rEffectProp : aEffectProps )
{
if( rEffectProp.Name == "Attribs" )
@@ -4079,7 +4077,7 @@ void DrawingML::WriteShapeEffect( std::u16string_view sName, const Sequence< Pro
if( nEffectToken <= 0 )
return;
- mpFS->startElement( nEffectToken, xOuterShdwAttrList );
+ mpFS->startElement( nEffectToken, aOuterShdwAttrList );
if( bContainsColor )
{
@@ -4389,10 +4387,8 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
return;
bool bCameraRotationPresent = false;
- sax_fastparser::FastAttributeList *aCameraAttrList = FastSerializerHelper::createAttrList();
- sax_fastparser::XFastAttributeListRef xCameraAttrList( aCameraAttrList );
- sax_fastparser::FastAttributeList *aCameraRotationAttrList = FastSerializerHelper::createAttrList();
- sax_fastparser::XFastAttributeListRef xRotAttrList( aCameraRotationAttrList );
+ rtl::Reference<sax_fastparser::FastAttributeList> aCameraAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aCameraRotationAttrList = FastSerializerHelper::createAttrList();
for( const auto& rEffectProp : std::as_const(aEffectProps) )
{
if( rEffectProp.Name == "prst" )
@@ -4431,10 +4427,8 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
}
bool bLightRigRotationPresent = false;
- sax_fastparser::FastAttributeList *aLightRigAttrList = FastSerializerHelper::createAttrList();
- sax_fastparser::XFastAttributeListRef xLightAttrList( aLightRigAttrList );
- sax_fastparser::FastAttributeList *aLightRigRotationAttrList = FastSerializerHelper::createAttrList();
- sax_fastparser::XFastAttributeListRef xLightRotAttrList( aLightRigRotationAttrList );
+ rtl::Reference<sax_fastparser::FastAttributeList> aLightRigAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aLightRigRotationAttrList = FastSerializerHelper::createAttrList();
for( const auto& rLightRigProp : std::as_const(aLightRigProps) )
{
if( rLightRigProp.Name == "rig" || rLightRigProp.Name == "dir" )
@@ -4469,10 +4463,10 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
if( aEffectProps.hasElements() )
{
- mpFS->startElementNS( XML_a, XML_camera, xCameraAttrList );
+ mpFS->startElementNS( XML_a, XML_camera, aCameraAttrList );
if( bCameraRotationPresent )
{
- mpFS->singleElementNS( XML_a, XML_rot, xRotAttrList );
+ mpFS->singleElementNS( XML_a, XML_rot, aCameraRotationAttrList );
}
mpFS->endElementNS( XML_a, XML_camera );
}
@@ -4484,10 +4478,10 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
if( aEffectProps.hasElements() )
{
- mpFS->startElementNS( XML_a, XML_lightRig, xLightAttrList );
+ mpFS->startElementNS( XML_a, XML_lightRig, aLightRigAttrList );
if( bLightRigRotationPresent )
{
- mpFS->singleElementNS( XML_a, XML_rot, xLightRotAttrList );
+ mpFS->singleElementNS( XML_a, XML_rot, aLightRigRotationAttrList );
}
mpFS->endElementNS( XML_a, XML_lightRig );
}
@@ -4504,11 +4498,9 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
bool bBevelTPresent = false, bBevelBPresent = false;
Sequence< PropertyValue > aExtrusionColorProps, aContourColorProps;
- sax_fastparser::FastAttributeList *aBevelTAttrList = FastSerializerHelper::createAttrList();
- sax_fastparser::XFastAttributeListRef xBevelTAttrList( aBevelTAttrList );
- sax_fastparser::FastAttributeList *aBevelBAttrList = FastSerializerHelper::createAttrList();
- sax_fastparser::XFastAttributeListRef xBevelBAttrList( aBevelBAttrList );
- sax_fastparser::FastAttributeList *aShape3DAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aBevelTAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aBevelBAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aShape3DAttrList = FastSerializerHelper::createAttrList();
for( const auto& rShape3DProp : std::as_const(aShape3DProps) )
{
if( rShape3DProp.Name == "extrusionH" || rShape3DProp.Name == "contourW" || rShape3DProp.Name == "z" )
@@ -4544,7 +4536,7 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
if ( !aBevelProps.hasElements() )
continue;
- sax_fastparser::FastAttributeList *aBevelAttrList = nullptr;
+ rtl::Reference<sax_fastparser::FastAttributeList> aBevelAttrList;
if( rShape3DProp.Name == "bevelT" )
{
bBevelTPresent = true;
@@ -4578,15 +4570,14 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
}
}
- sax_fastparser::XFastAttributeListRef xAttrList( aShape3DAttrList );
- mpFS->startElementNS( XML_a, XML_sp3d, xAttrList );
+ mpFS->startElementNS( XML_a, XML_sp3d, aShape3DAttrList );
if( bBevelTPresent )
{
- mpFS->singleElementNS( XML_a, XML_bevelT, xBevelTAttrList );
+ mpFS->singleElementNS( XML_a, XML_bevelT, aBevelTAttrList );
}
if( bBevelBPresent )
{
- mpFS->singleElementNS( XML_a, XML_bevelB, xBevelBAttrList );
+ mpFS->singleElementNS( XML_a, XML_bevelB, aBevelBAttrList );
}
if( aExtrusionColorProps.hasElements() )
{
@@ -4661,7 +4652,7 @@ void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet
Sequence< PropertyValue > aAttrs;
aEffect.Value >>= aAttrs;
- sax_fastparser::FastAttributeList *aAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> aAttrList = FastSerializerHelper::createAttrList();
OString sRelId;
for( const auto& rAttr : std::as_const(aAttrs) )
{
@@ -4696,8 +4687,7 @@ void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet
mpFS->startElementNS(XML_a14, XML_imgLayer, FSNS(XML_r, XML_embed), sRelId);
mpFS->startElementNS(XML_a14, XML_imgEffect);
- sax_fastparser::XFastAttributeListRef xAttrList( aAttrList );
- mpFS->singleElementNS( XML_a14, nEffectToken, xAttrList );
+ mpFS->singleElementNS( XML_a14, nEffectToken, aAttrList );
mpFS->endElementNS( XML_a14, XML_imgEffect );
mpFS->endElementNS( XML_a14, XML_imgLayer );
@@ -4776,16 +4766,15 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
return;
// generate a unique id
- sax_fastparser::FastAttributeList* pDocPrAttrList
+ rtl::Reference<sax_fastparser::FastAttributeList> pDocPrAttrList
= sax_fastparser::FastSerializerHelper::createAttrList();
pDocPrAttrList->add(XML_id, OString::number(nDiagramId).getStr());
OUString sName = "Diagram" + OUString::number(nDiagramId);
pDocPrAttrList->add(XML_name, OUStringToOString(sName, RTL_TEXTENCODING_UTF8).getStr());
- sax_fastparser::XFastAttributeListRef xDocPrAttrListRef(pDocPrAttrList);
if (GetDocumentType() == DOCUMENT_DOCX)
{
- mpFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef);
+ mpFS->singleElementNS(XML_wp, XML_docPr, pDocPrAttrList);
mpFS->singleElementNS(XML_wp, XML_cNvGraphicFramePr);
mpFS->startElementNS(XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
@@ -4795,7 +4784,7 @@ void DrawingML::WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rX
{
mpFS->startElementNS(XML_p, XML_nvGraphicFramePr);
- mpFS->singleElementNS(XML_p, XML_cNvPr, xDocPrAttrListRef);
+ mpFS->singleElementNS(XML_p, XML_cNvPr, pDocPrAttrList);
mpFS->singleElementNS(XML_p, XML_cNvGraphicFramePr);
mpFS->startElementNS(XML_p, XML_nvPr);
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 9aa51f583bd4..a9e5dcf6d20c 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -68,7 +68,6 @@ VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr const & pSerializer, VMLText
, m_eVRel( 0 )
, m_bInline( false )
, m_pSdrObject( nullptr )
- , m_pShapeAttrList( nullptr )
, m_nShapeType( ESCHER_ShpInst_Nil )
, m_nShapeFlags(ShapeFlag::NONE)
, m_ShapeStyle( 200 )
@@ -136,7 +135,7 @@ sal_uInt32 VMLExport::EnterGroup( const OUString& rShapeName, const tools::Recta
sal_uInt32 nShapeId = GenerateShapeId();
OStringBuffer aStyle( 200 );
- FastAttributeList *pAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<FastAttributeList> pAttrList = FastSerializerHelper::createAttrList();
pAttrList->add( XML_id, ShapeIdString( nShapeId ) );
@@ -173,7 +172,7 @@ sal_uInt32 VMLExport::EnterGroup( const OUString& rShapeName, const tools::Recta
.makeStringAndClear() );
}
- m_pSerializer->startElementNS( XML_v, XML_group, XFastAttributeListRef( pAttrList ) );
+ m_pSerializer->startElementNS( XML_v, XML_group, pAttrList );
mnGroupLevel++;
return nShapeId;
@@ -671,7 +670,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
case ESCHER_Prop_fillOpacity: // 386
{
sal_uInt32 nValue;
- sax_fastparser::FastAttributeList* pAttrList
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList
= FastSerializerHelper::createAttrList();
bool imageData = false;
@@ -680,7 +679,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
if (pSdrGrafObj && pSdrGrafObj->isSignatureLine() && m_pTextExport)
{
- sax_fastparser::FastAttributeList* pAttrListSignatureLine
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrListSignatureLine
= FastSerializerHelper::createAttrList();
pAttrListSignatureLine->add(XML_issignatureline, "t");
if (!pSdrGrafObj->getSignatureLineId().isEmpty())
@@ -731,7 +730,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
m_pSerializer->singleElementNS(
XML_o, XML_signatureline,
- XFastAttributeListRef(pAttrListSignatureLine));
+ pAttrListSignatureLine);
// Get signature line graphic
const uno::Reference<graphic::XGraphic>& xGraphic
@@ -773,10 +772,10 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
}
if (rProps.GetOpt(ESCHER_Prop_fNoFillHitTest, nValue))
- impl_AddBool(pAttrList, FSNS(XML_o, XML_detectmouseclick), nValue != 0);
+ impl_AddBool(pAttrList.get(), FSNS(XML_o, XML_detectmouseclick), nValue != 0);
if (imageData)
- m_pSerializer->singleElementNS( XML_v, XML_imagedata, XFastAttributeListRef( pAttrList ) );
+ m_pSerializer->singleElementNS( XML_v, XML_imagedata, pAttrList );
else
{
if ( rProps.GetOpt( ESCHER_Prop_fillType, nValue ) )
@@ -805,16 +804,16 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
pAttrList->add( XML_on, "false" );
if ( rProps.GetOpt( ESCHER_Prop_fillColor, nValue ) )
- impl_AddColor( m_pShapeAttrList, XML_fillcolor, nValue );
+ impl_AddColor( m_pShapeAttrList.get(), XML_fillcolor, nValue );
if ( rProps.GetOpt( ESCHER_Prop_fillBackColor, nValue ) )
- impl_AddColor( pAttrList, XML_color2, nValue );
+ impl_AddColor( pAttrList.get(), XML_color2, nValue );
if (rProps.GetOpt(ESCHER_Prop_fillOpacity, nValue))
// Partly undo the transformation at the end of EscherPropertyContainer::CreateFillProperties(): VML opacity is 0..1.
pAttrList->add(XML_opacity, OString::number(double((nValue * 100) >> 16) / 100));
- m_pSerializer->singleElementNS( XML_v, XML_fill, XFastAttributeListRef( pAttrList ) );
+ m_pSerializer->singleElementNS( XML_v, XML_fill, pAttrList );
}
}
@@ -839,13 +838,13 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
case ESCHER_Prop_lineEndCapStyle: // 471
{
sal_uInt32 nValue;
- sax_fastparser::FastAttributeList *pAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList = FastSerializerHelper::createAttrList();
if ( rProps.GetOpt( ESCHER_Prop_lineColor, nValue ) )
- impl_AddColor( pAttrList, XML_color, nValue );
+ impl_AddColor( pAttrList.get(), XML_color, nValue );
if ( rProps.GetOpt( ESCHER_Prop_lineWidth, nValue ) )
- impl_AddInt( pAttrList, XML_weight, nValue );
+ impl_AddInt( pAttrList.get(), XML_weight, nValue );
if ( rProps.GetOpt( ESCHER_Prop_lineDashing, nValue ) )
{
@@ -869,22 +868,22 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
}
if ( rProps.GetOpt( ESCHER_Prop_lineStartArrowhead, nValue ) )
- impl_AddArrowHead( pAttrList, XML_startarrow, nValue );
+ impl_AddArrowHead( pAttrList.get(), XML_startarrow, nValue );
if ( rProps.GetOpt( ESCHER_Prop_lineEndArrowhead, nValue ) )
- impl_AddArrowHead( pAttrList, XML_endarrow, nValue );
+ impl_AddArrowHead( pAttrList.get(), XML_endarrow, nValue );
if ( rProps.GetOpt( ESCHER_Prop_lineStartArrowWidth, nValue ) )
- impl_AddArrowWidth( pAttrList, XML_startarrowwidth, nValue );
+ impl_AddArrowWidth( pAttrList.get(), XML_startarrowwidth, nValue );
if ( rProps.GetOpt( ESCHER_Prop_lineStartArrowLength, nValue ) )
- impl_AddArrowLength( pAttrList, XML_startarrowlength, nValue );
+ impl_AddArrowLength( pAttrList.get(), XML_startarrowlength, nValue );
if ( rProps.GetOpt( ESCHER_Prop_lineEndArrowWidth, nValue ) )
- impl_AddArrowWidth( pAttrList, XML_endarrowwidth, nValue );
+ impl_AddArrowWidth( pAttrList.get(), XML_endarrowwidth, nValue );
if ( rProps.GetOpt( ESCHER_Prop_lineEndArrowLength, nValue ) )
- impl_AddArrowLength( pAttrList, XML_endarrowlength, nValue );
+ impl_AddArrowLength( pAttrList.get(), XML_endarrowlength, nValue );
if ( rProps.GetOpt( ESCHER_Prop_lineJoinStyle, nValue ) )
{
@@ -912,7 +911,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
pAttrList->add( XML_endcap, pEndCap );
}
- m_pSerializer->singleElementNS( XML_v, XML_stroke, XFastAttributeListRef( pAttrList ) );
+ m_pSerializer->singleElementNS( XML_v, XML_stroke, pAttrList );
}
bAlreadyWritten[ ESCHER_Prop_lineColor ] = true;
bAlreadyWritten[ ESCHER_Prop_lineWidth ] = true;
@@ -944,14 +943,14 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
}
if ( bShadow )
{
- sax_fastparser::FastAttributeList *pAttrList = FastSerializerHelper::createAttrList();
- impl_AddBool( pAttrList, XML_on, bShadow );
- impl_AddBool( pAttrList, XML_obscured, bObscured );
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList = FastSerializerHelper::createAttrList();
+ impl_AddBool( pAttrList.get(), XML_on, bShadow );
+ impl_AddBool( pAttrList.get(), XML_obscured, bObscured );
if ( rProps.GetOpt( ESCHER_Prop_shadowColor, nValue ) )
- impl_AddColor( pAttrList, XML_color, nValue );
+ impl_AddColor( pAttrList.get(), XML_color, nValue );
- m_pSerializer->singleElementNS( XML_v, XML_shadow, XFastAttributeListRef( pAttrList ) );
+ m_pSerializer->singleElementNS( XML_v, XML_shadow, pAttrList );
bAlreadyWritten[ ESCHER_Prop_fshadowObscured ] = true;
bAlreadyWritten[ ESCHER_Prop_shadowColor ] = true;
}
@@ -976,7 +975,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
m_pSerializer->singleElementNS(XML_v, XML_path, XML_textpathok, "t");
- sax_fastparser::FastAttributeList* pAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> pAttrList = FastSerializerHelper::createAttrList();
pAttrList->add(XML_on, "t");
pAttrList->add(XML_fitshape, "t");
pAttrList->add(XML_string, OUStringToOString(aTextPathString, RTL_TEXTENCODING_UTF8));
@@ -1001,7 +1000,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
if (!aStyle.isEmpty())
pAttrList->add(XML_style, OUStringToOString(aStyle, RTL_TEXTENCODING_UTF8));
- m_pSerializer->singleElementNS(XML_v, XML_textpath, XFastAttributeListRef(pAttrList));
+ m_pSerializer->singleElementNS(XML_v, XML_textpath, pAttrList);
}
bAlreadyWritten[ESCHER_Prop_gtextUNICODE] = true;
@@ -1018,7 +1017,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const tools::Rectangle&
case ESCHER_Prop_fNoLineDrawDash:
{
// See DffPropertyReader::ApplyLineAttributes().
- impl_AddBool( m_pShapeAttrList, XML_stroked, (opt.nPropValue & 8) != 0 );
+ impl_AddBool( m_pShapeAttrList.get(), XML_stroked, (opt.nPropValue & 8) != 0 );
bAlreadyWritten[ESCHER_Prop_fNoLineDrawDash] = true;
}
break;
@@ -1419,7 +1418,7 @@ sal_Int32 VMLExport::StartShape()
}
// start of the shape
- m_pSerializer->startElementNS( XML_v, nShapeElement, XFastAttributeListRef( m_pShapeAttrList ) );
+ m_pSerializer->startElementNS( XML_v, nShapeElement, m_pShapeAttrList );
OString const textboxStyle(m_TextboxStyle.makeStringAndClear());
@@ -1447,15 +1446,14 @@ sal_Int32 VMLExport::StartShape()
if( pParaObj )
{
- sax_fastparser::FastAttributeList* pTextboxAttrList = FastSerializerHelper::createAttrList();
- sax_fastparser::XFastAttributeListRef xTextboxAttrList(pTextboxAttrList);
+ rtl::Reference<sax_fastparser::FastAttributeList> pTextboxAttrList = FastSerializerHelper::createAttrList();
if (!textboxStyle.isEmpty())
{
pTextboxAttrList->add(XML_style, textboxStyle);
}
// this is reached only in case some text is attached to the shape
- m_pSerializer->startElementNS(XML_v, XML_textbox, xTextboxAttrList);
+ m_pSerializer->startElementNS(XML_v, XML_textbox, pTextboxAttrList);
m_pTextExport->WriteOutliner(*pParaObj);
m_pSerializer->endElementNS(XML_v, XML_textbox);
if( bOwnParaObj )
@@ -1513,12 +1511,10 @@ void VMLExport::EndShape( sal_Int32 nShapeElement )
}
}
}
- sax_fastparser::FastAttributeList* pTextboxAttrList = FastSerializerHelper::createAttrList();
+ rtl::Reference<sax_fastparser::FastAttributeList> pTextboxAttrList = FastSerializerHelper::createAttrList();
if (bBottomToTop)
pTextboxAttrList->add(XML_style, "mso-layout-flow-alt:bottom-to-top");
- sax_fastparser::XFastAttributeListRef xTextboxAttrList(pTextboxAttrList);
- pTextboxAttrList = nullptr;
- m_pSerializer->startElementNS(XML_v, XML_textbox, xTextboxAttrList);
+ m_pSerializer->startElementNS(XML_v, XML_textbox, pTextboxAttrList);
m_pTextExport->WriteVMLTextBox(uno::Reference<drawing::XShape>(xPropertySet, uno::UNO_QUERY_THROW));
@@ -1527,8 +1523,7 @@ void VMLExport::EndShape( sal_Int32 nShapeElement )
if (m_pWrapAttrList)
{
- sax_fastparser::XFastAttributeListRef const pWrapAttrList(m_pWrapAttrList.release());
- m_pSerializer->singleElementNS(XML_w10, XML_wrap, pWrapAttrList);
+ m_pSerializer->singleElementNS(XML_w10, XML_wrap, m_pWrapAttrList);
}
// end of the shape
@@ -1536,7 +1531,7 @@ void VMLExport::EndShape( sal_Int32 nShapeElement )
}
OString const & VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel,
- std::unique_ptr<FastAttributeList> pWrapAttrList,
+ FastAttributeList* pWrapAttrList,
const bool bOOxmlExport )
{
m_pSdrObject = &rObj;
@@ -1544,7 +1539,7 @@ OString const & VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri,
m_eVOri = eVOri;
m_eHRel = eHRel;
m_eVRel = eVRel;
- m_pWrapAttrList = std::move(pWrapAttrList);
+ m_pWrapAttrList = pWrapAttrList;
m_bInline = false;
EscherEx::AddSdrObject(rObj, bOOxmlExport);
return m_sShapeId;
@@ -1557,7 +1552,7 @@ OString const & VMLExport::AddInlineSdrObject( const SdrObject& rObj, const bool
m_eVOri = -1;
m_eHRel = -1;
m_eVRel = -1;
- m_pWrapAttrList.reset();
+ m_pWrapAttrList.clear();
m_bInline = true;
EscherEx::AddSdrObject(rObj, bOOxmlExport);
return m_sShapeId;