summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlplug.cxx
diff options
context:
space:
mode:
authorCiorba Edmond <edmond_ciorba@yahoo.com>2013-07-03 16:14:45 +0300
committerAndras Timar <atimar@suse.com>2013-07-11 12:36:20 +0200
commit5dd1b3da57862a6577717544dde56482add89170 (patch)
tree59a18786309d0f1d49b41f06485457cba7d6e5da /sw/source/filter/html/htmlplug.cxx
parent31144904919cf386f7ef6941a2932bc00497ed13 (diff)
fdo#63211 - embed images in HTML export.
Change-Id: I585c85d2cee13ee8954623bd981cb372d78b7952
Diffstat (limited to 'sw/source/filter/html/htmlplug.cxx')
-rw-r--r--sw/source/filter/html/htmlplug.cxx23
1 files changed, 4 insertions, 19 deletions
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index d6f1a3a7df9f..90007cc301fd 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -56,6 +56,8 @@
#include <comphelper/embeddedobjectcontainer.hxx>
#include <comphelper/classids.hxx>
+#include <vcl/cvtgrf.hxx>
+#include <sax/tools/converter.hxx>
using namespace com::sun::star;
@@ -1258,27 +1260,10 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
return rWrt;
{
- Graphic aGrf( *pOLENd->GetGraphic() );
- String aGrfNm;
- const String* pTempFileName = rHTMLWrt.GetOrigFileName();
- if(pTempFileName)
- aGrfNm = *pTempFileName;
-
- sal_uInt16 nErr = XOutBitmap::WriteGraphic( aGrf, aGrfNm,
- OUString("JPG"),
- (XOUTBMP_USE_GIF_IF_POSSIBLE |
- XOUTBMP_USE_NATIVE_IF_POSSIBLE) );
- if( nErr ) // fehlerhaft, da ist nichts auszugeben
- {
- rHTMLWrt.nWarn = WARN_SWG_POOR_LOAD | WARN_SW_WRITE_BASE;
- return rWrt;
- }
- aGrfNm = URIHelper::SmartRel2Abs(
- INetURLObject(rWrt.GetBaseURL()), aGrfNm,
- URIHelper::GetMaybeFileHdl() );
+ Graphic aGraphic( *pOLENd->GetGraphic() );
sal_uLong nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR
: HTML_FRMOPTS_GENIMG;
- OutHTML_Image( rWrt, rFrmFmt, aGrfNm,
+ OutHTML_Image( rWrt, rFrmFmt, aGraphic,
pOLENd->GetTitle(), pOLENd->GetTwipSize(),
nFlags, pMarkToOLE );
}