html: "IgnoreImages" Option, which ignores images at export
Change-Id: I7ff6e83fabbc9f58e16b2617207a37e8dd0061d9
This commit is contained in:
@@ -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() )
|
||||
{
|
||||
|
@@ -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)
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user