summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlplug.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-04-08 17:50:04 +0200
committerJan Holesovsky <kendy@collabora.com>2014-04-08 18:11:53 +0200
commit930f669be1100bfa1447f60cc379d51d18224dff (patch)
tree6071ea2286436e02c2d7cd601bb51b50c7348f63 /sw/source/filter/html/htmlplug.cxx
parent55e39c72d6ac462b201dc0ae0ab0c610a0f13056 (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.cxx19
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;
}