Kaydet (Commit) 4aec6c9e authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

html: "IgnoreImages" Option, which ignores images at export

Change-Id: I7ff6e83fabbc9f58e16b2617207a37e8dd0061d9
üst 5f230bce
...@@ -811,6 +811,9 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, ...@@ -811,6 +811,9 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
{ {
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt; SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
if (rHTMLWrt.mbSkipImages)
return rHTMLWrt;
// ggf. ein noch offenes Attribut voruebergehend beenden // ggf. ein noch offenes Attribut voruebergehend beenden
if( !rHTMLWrt.aINetFmts.empty() ) if( !rHTMLWrt.aINetFmts.empty() )
{ {
......
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
#define MAX_INDENT_LEVEL 20 #define MAX_INDENT_LEVEL 20
using namespace css;
static sal_Char sIndentTabs[MAX_INDENT_LEVEL+2] = 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"; "\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() ...@@ -129,6 +131,24 @@ SwHTMLWriter::~SwHTMLWriter()
delete pNumRuleInfo; 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() sal_uLong SwHTMLWriter::WriteStream()
{ {
SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get(); SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
...@@ -893,7 +913,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) ...@@ -893,7 +913,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
// DokumentInfo // DokumentInfo
OString sIndent = GetIndentString(); OString sIndent = GetIndentString();
using namespace ::com::sun::star;
uno::Reference<document::XDocumentProperties> xDocProps; uno::Reference<document::XDocumentProperties> xDocProps;
SwDocShell *pDocShell(pDoc->GetDocShell()); SwDocShell *pDocShell(pDoc->GetDocShell());
if (pDocShell) if (pDocShell)
......
...@@ -281,6 +281,7 @@ class SwHTMLWriter : public Writer ...@@ -281,6 +281,7 @@ class SwHTMLWriter : public Writer
protected: protected:
sal_uLong WriteStream() SAL_OVERRIDE; sal_uLong WriteStream() SAL_OVERRIDE;
void SetupFilterOptions(SfxMedium& rMedium) SAL_OVERRIDE;
public: public:
std::vector<OUString> aImgMapNames; // geschriebene Image Maps std::vector<OUString> aImgMapNames; // geschriebene Image Maps
...@@ -392,6 +393,9 @@ public: ...@@ -392,6 +393,9 @@ public:
sal_Bool bPreserveForm : 1; // die aktuelle Form beibehalten sal_Bool bPreserveForm : 1; // die aktuelle Form beibehalten
sal_Bool bCfgNetscape4 : 1; // Netscape4 Hacks sal_Bool bCfgNetscape4 : 1; // Netscape4 Hacks
sal_Bool mbSkipImages : 1;
// 23 // 23
SwHTMLWriter( const OUString& rBaseURL ); SwHTMLWriter( const OUString& rBaseURL );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment