diff options
Diffstat (limited to 'sw/source/filter/html/wrthtml.cxx')
-rw-r--r-- | sw/source/filter/html/wrthtml.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 0bfd00b08f17..0d993fcde3d6 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -80,6 +80,7 @@ #include <tools/urlobj.hxx> #include <osl/file.hxx> #include <comphelper/scopeguard.hxx> +#include <unotools/tempfile.hxx> #define MAX_INDENT_LEVEL 20 @@ -156,6 +157,14 @@ SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL ) , m_bParaDotLeaders( false ) { SetBaseURL(rBaseURL); + + if (rBaseURL.isEmpty()) + { + // Paste: set base URL to a tempfile, so images are not lost. + mpTempBaseURL.reset(new utl::TempFile()); + mpTempBaseURL->EnableKillingFile(); + SetBaseURL(mpTempBaseURL->GetURL()); + } } SwHTMLWriter::~SwHTMLWriter() |