diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-04-08 17:50:04 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-04-08 18:11:53 +0200 |
commit | 930f669be1100bfa1447f60cc379d51d18224dff (patch) | |
tree | 6071ea2286436e02c2d7cd601bb51b50c7348f63 /sw/source/filter/html/htmlplug.cxx | |
parent | 55e39c72d6ac462b201dc0ae0ab0c610a0f13056 (diff) |
liblo: Return early everywhere where we potentially export images.
To avoid searching the node(s).
Change-Id: I1ddf962113ead192435c174ff3bf607596e4bfc3
Diffstat (limited to 'sw/source/filter/html/htmlplug.cxx')
-rw-r--r-- | sw/source/filter/html/htmlplug.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 421239b285c1..f124b6b991a0 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1247,7 +1247,10 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, sal_Bool bInCntnr ) { - SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt; + SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); + + if (rHTMLWrt.mbSkipImages) + return rWrt; const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt(); sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1; @@ -1257,14 +1260,12 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, if( !pOLENd ) return rWrt; - { - Graphic aGraphic( *pOLENd->GetGraphic() ); - sal_uLong nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR - : HTML_FRMOPTS_GENIMG; - OutHTML_Image( rWrt, rFrmFmt, aGraphic, - pOLENd->GetTitle(), pOLENd->GetTwipSize(), - nFlags, "ole" ); - } + Graphic aGraphic( *pOLENd->GetGraphic() ); + sal_uLong nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR + : HTML_FRMOPTS_GENIMG; + OutHTML_Image( rWrt, rFrmFmt, aGraphic, + pOLENd->GetTitle(), pOLENd->GetTwipSize(), + nFlags, "ole" ); return rWrt; } |