Kaydet (Commit) 2c8b1d76 authored tarafından Miklos Vajna's avatar Miklos Vajna

SwHTMLWriter::MakeHeader: indent conditional block

Change-Id: If401b798eca9a60c50669070dfb0a038f0710b3a
üst dfe4e902
...@@ -940,39 +940,39 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) ...@@ -940,39 +940,39 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
OStringBuffer sOut; OStringBuffer sOut;
if (!mbSkipHeaderFooter) if (!mbSkipHeaderFooter)
{ {
sOut.append(OString(OOO_STRING_SVTOOLS_HTML_doctype) + " " + OString(OOO_STRING_SVTOOLS_HTML_doctype40)); sOut.append(OString(OOO_STRING_SVTOOLS_HTML_doctype) + " " + OString(OOO_STRING_SVTOOLS_HTML_doctype40));
HTMLOutFuncs::Out_AsciiTag( Strm(), sOut.makeStringAndClear().getStr() ); HTMLOutFuncs::Out_AsciiTag( Strm(), sOut.makeStringAndClear().getStr() );
// baue den Vorspann // baue den Vorspann
OutNewLine(); OutNewLine();
HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_html ); HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_html );
OutNewLine(); OutNewLine();
HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_head ); HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_head );
IncIndentLevel(); // Inhalt von <HEAD> einruecken IncIndentLevel(); // Inhalt von <HEAD> einruecken
// DokumentInfo // DokumentInfo
OString sIndent = GetIndentString(); OString sIndent = GetIndentString();
uno::Reference<document::XDocumentProperties> xDocProps; uno::Reference<document::XDocumentProperties> xDocProps;
SwDocShell *pDocShell(pDoc->GetDocShell()); SwDocShell *pDocShell(pDoc->GetDocShell());
if (pDocShell) if (pDocShell)
{ {
uno::Reference<document::XDocumentPropertiesSupplier> xDPS( uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocShell->GetModel(), uno::UNO_QUERY_THROW); pDocShell->GetModel(), uno::UNO_QUERY_THROW);
xDocProps.set(xDPS->getDocumentProperties()); xDocProps.set(xDPS->getDocumentProperties());
} }
// xDocProps may be null here (when copying) // xDocProps may be null here (when copying)
SfxFrameHTMLWriter::Out_DocInfo( Strm(), GetBaseURL(), xDocProps, SfxFrameHTMLWriter::Out_DocInfo( Strm(), GetBaseURL(), xDocProps,
sIndent.getStr(), eDestEnc, sIndent.getStr(), eDestEnc,
&aNonConvertableCharacters ); &aNonConvertableCharacters );
// Kommentare und Meta-Tags des ersten Absatzes // Kommentare und Meta-Tags des ersten Absatzes
rHeaderAttrs = OutHeaderAttrs(); rHeaderAttrs = OutHeaderAttrs();
OutFootEndNoteInfo(); OutFootEndNoteInfo();
} }
const SwPageDesc *pPageDesc = 0; const SwPageDesc *pPageDesc = 0;
...@@ -1005,57 +1005,57 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) ...@@ -1005,57 +1005,57 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
if (!mbSkipHeaderFooter) if (!mbSkipHeaderFooter)
{ {
// und nun ... das Style-Sheet!!! // und nun ... das Style-Sheet!!!
if( bCfgOutStyles ) if( bCfgOutStyles )
{ {
OutStyleSheet( *pPageDesc ); OutStyleSheet( *pPageDesc );
} }
// und nun ... das BASIC und JavaScript! // und nun ... das BASIC und JavaScript!
if( pDoc->GetDocShell() ) // nur mit DocShell ist Basic moeglich if( pDoc->GetDocShell() ) // nur mit DocShell ist Basic moeglich
OutBasic(); OutBasic();
DecIndentLevel(); // Inhalt von <HEAD> einruecken DecIndentLevel(); // Inhalt von <HEAD> einruecken
OutNewLine(); OutNewLine();
HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_head, false ); HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_head, false );
// der Body wird nicht eingerueckt, weil sonst alles eingerueckt waere! // der Body wird nicht eingerueckt, weil sonst alles eingerueckt waere!
OutNewLine(); OutNewLine();
sOut.append("<" + OString(OOO_STRING_SVTOOLS_HTML_body)); sOut.append("<" + OString(OOO_STRING_SVTOOLS_HTML_body));
Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
// language // language
OutLanguage( eLang ); OutLanguage( eLang );
// Textfarbe ausgeben, wenn sie an der Standard-Vorlage gesetzt ist // Textfarbe ausgeben, wenn sie an der Standard-Vorlage gesetzt ist
// und sich geaendert hat. // und sich geaendert hat.
OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_text, OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_text,
pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false ), pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false ),
*this ); *this );
// Farben fuer (un)besuchte Links // Farben fuer (un)besuchte Links
OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_link, OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_link,
pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL ), pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL ),
*this ); *this );
OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_vlink, OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_vlink,
pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( RES_POOLCHR_INET_VISIT ), pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( RES_POOLCHR_INET_VISIT ),
*this ); *this );
const SfxItemSet& rItemSet = pPageDesc->GetMaster().GetAttrSet(); const SfxItemSet& rItemSet = pPageDesc->GetMaster().GetAttrSet();
OutBackground( rItemSet, true ); OutBackground( rItemSet, true );
nDirection = GetHTMLDirection( rItemSet ); nDirection = GetHTMLDirection( rItemSet );
OutDirection( nDirection ); OutDirection( nDirection );
if( bCfgOutStyles ) if( bCfgOutStyles )
OutCSS1_BodyTagStyleOpt( *this, rItemSet ); OutCSS1_BodyTagStyleOpt( *this, rItemSet );
// Events anhaengen // Events anhaengen
if( pDoc->GetDocShell() ) // nur mit DocShell ist Basic moeglich if( pDoc->GetDocShell() ) // nur mit DocShell ist Basic moeglich
OutBasicBodyEvents(); OutBasicBodyEvents();
Strm().WriteChar( '>' ); Strm().WriteChar( '>' );
} }
return pPageDesc; return pPageDesc;
......
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