diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-04-05 23:36:23 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-04-08 13:15:55 +0200 |
commit | 4aec6c9e3c0f51a6c2476295117d10cd5151d7b2 (patch) | |
tree | 399bd4164b070763fd4b9a25c7671225205b4152 | |
parent | 5f230bcea7da479931653a75719282de923eed9d (diff) |
html: "IgnoreImages" Option, which ignores images at export
Change-Id: I7ff6e83fabbc9f58e16b2617207a37e8dd0061d9
-rw-r--r-- | sw/source/filter/html/htmlflywriter.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.cxx | 22 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.hxx | 4 |
3 files changed, 28 insertions, 1 deletions
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 3f0b14a70202..6060530aaff0 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -811,6 +811,9 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, { SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt; + if (rHTMLWrt.mbSkipImages) + return rHTMLWrt; + // ggf. ein noch offenes Attribut voruebergehend beenden if( !rHTMLWrt.aINetFmts.empty() ) { diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index bf8dac67286d..604b2105f193 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -80,6 +80,8 @@ #define MAX_INDENT_LEVEL 20 +using namespace css; + static sal_Char sIndentTabs[MAX_INDENT_LEVEL+2] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; @@ -129,6 +131,24 @@ SwHTMLWriter::~SwHTMLWriter() delete pNumRuleInfo; } +void SwHTMLWriter::SetupFilterOptions(SfxMedium& rMedium) +{ + const SfxItemSet* pSet = rMedium.GetItemSet(); + if (pSet == NULL) + return; + + const SfxPoolItem* pItem; + if (pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) != SFX_ITEM_SET) + return; + + + OUString sFilterOptions = ((const SfxStringItem*)pItem)->GetValue(); + if (sFilterOptions == "IgnoreImages") + { + mbSkipImages = true; + } +} + sal_uLong SwHTMLWriter::WriteStream() { SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get(); @@ -893,7 +913,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) // DokumentInfo OString sIndent = GetIndentString(); - using namespace ::com::sun::star; + uno::Reference<document::XDocumentProperties> xDocProps; SwDocShell *pDocShell(pDoc->GetDocShell()); if (pDocShell) diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 79b8fb99431c..2e7508e61201 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -281,6 +281,7 @@ class SwHTMLWriter : public Writer protected: sal_uLong WriteStream() SAL_OVERRIDE; + void SetupFilterOptions(SfxMedium& rMedium) SAL_OVERRIDE; public: std::vector<OUString> aImgMapNames; // geschriebene Image Maps @@ -392,6 +393,9 @@ public: sal_Bool bPreserveForm : 1; // die aktuelle Form beibehalten sal_Bool bCfgNetscape4 : 1; // Netscape4 Hacks + + sal_Bool mbSkipImages : 1; + // 23 SwHTMLWriter( const OUString& rBaseURL ); |