diff options
-rw-r--r-- | oox/source/export/drawingml.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/writerhelper.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8gr.cxx | 4 |
5 files changed, 2 insertions, 20 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 0629f2c45d33..7a9689b8a91a 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -891,9 +891,6 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia ) sMediaType = "image/x-emf"; pExtension = ".emf"; } - - if (bSwapped) - const_cast<Graphic&>(rGraphic).SwapOut(); } else { diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 2c508672f1f5..b027e46ce708 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4089,8 +4089,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size // Not in cache, then need to write it. m_rDrawingML.SetFS( m_pSerializer ); // to be sure that we write to the right stream - bool bSwapped = pGraphic->IsSwapOut(); - if (bSwapped) + if (pGraphic->IsSwapOut()) { if (pGrfNode) { @@ -4103,9 +4102,6 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size OUString aImageId = m_rDrawingML.WriteImage( *pGraphic ); - if (bSwapped) - const_cast<Graphic*>(pGraphic)->SwapOut(); - aRelId = OUStringToOString( aImageId, RTL_TEXTENCODING_UTF8 ); m_aRelIdCache[pGraphic] = aRelId; } diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index dfd6c8826449..fbf0871b5312 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3641,8 +3641,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw if (rGraphic.GetType()==GRAPHIC_NONE) return; - bool bSwapped = rGraphic.IsSwapOut(); - if (bSwapped) + if (rGraphic.IsSwapOut()) { // always swapin via the Node const_cast<SwGrfNode*>(pGrfNode)->SwapIn(); @@ -3818,9 +3817,6 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw else m_rExport.Strm().WriteCharPtr("}}}}"); // Close SV, SP, SHPINST and SHP. - if (bSwapped) - const_cast<Graphic&>(rGraphic).SwapOut(); - m_rExport.Strm().WriteCharPtr(SAL_NEWLINE_STRING); } diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 0fc558f546b1..ad68371f945b 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -700,11 +700,8 @@ namespace sw SwGrfNode *pGrfNode = const_cast<SwGrfNode*>(rNd.GetGrfNode()); if (pGrfNode && (GRAPHIC_NONE != pGrfNode->GetGrf().GetType())) { - bool bWasSwappedOut = pGrfNode->GetGrfObj().IsSwappedOut(); pGrfNode->SwapIn(); aGrTwipSz = pGrfNode->GetTwipSize(); - if (bWasSwappedOut) - pGrfNode->SwapOut(); } } diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index fad72e8fd029..27ed033c8e4e 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -725,7 +725,6 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd, else { Graphic& rGrf = const_cast<Graphic&>(rGrfNd.GetGrf()); - bool bSwapped = rGrf.IsSwapOut(); // always swapin via the Node const_cast<SwGrfNode&>(rGrfNd).SwapIn(); @@ -753,9 +752,6 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd, WritePICFHeader(rStrm, rFly, 8, nWidth, nHeight, rGrfNd.GetpSwAttrSet()); WriteWindowMetafileBits(rStrm, aMeta); - - if (bSwapped) - rGrf.SwapOut(); } } } |