diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-10-18 15:07:42 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-11-07 10:45:07 +0100 |
commit | f05615df9410cadacfef6843f9c7b6966840d963 (patch) | |
tree | 96cdde333de089b628769a1da587724c772e06b0 /sw | |
parent | b2503f187341f9a37737f34c7fc6a02d03c2e84e (diff) |
MS export: don't need to manually swapout images after swapin them
We have some good auto mechanisms for that.
Change-Id: I487dbf4a5fc69c7563dfbc5c21f9ebdb05ba6b9e
Diffstat (limited to 'sw')
-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 |
4 files changed, 2 insertions, 17 deletions
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(); } } } |