summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlatr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/html/htmlatr.cxx')
-rw-r--r--sw/source/filter/html/htmlatr.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 3f5f7a0e3673..deedddaf1961 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -948,12 +948,23 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( !rHWrt.bNoAlign && pAdjItem )
OutHTML_SvxAdjust( rWrt, *pAdjItem );
+ rHWrt.bParaDotLeaders = bPara && rHWrt.bCfgPrintLayout && rHWrt.indexOfDotLeaders(
+ pTxtNd->GetAnyFmtColl().GetPoolFmtId(), pTxtNd->GetTxt()) > -1;
+
// und nun ggf. noch die STYLE-Option
if( rHWrt.bCfgOutStyles && rInfo.pItemSet && !bNoStyle)
{
OutCSS1_ParaTagStyleOpt( rWrt, *rInfo.pItemSet );
}
+ if (rHWrt.bParaDotLeaders) {
+ sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_class) + "=\"" +
+ OString(sCSS2_P_CLASS_leaders) + "\"><" +
+ OString(OOO_STRING_SVTOOLS_HTML_O_span);
+ rWrt.Strm().WriteOString( sOut );
+ sOut = "";
+ }
+
rWrt.Strm().WriteChar( '>' );
// Soll ein </P> geschrieben wenrden
@@ -2300,6 +2311,12 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
aFullText += aFootEndNoteSym;
}
+ // Table of Contents or other paragraph with dot leaders?
+ sal_Int32 nIndexTab = rHTMLWrt.indexOfDotLeaders( nPoolId, rStr );
+ if (nIndexTab > -1)
+ // skip part after the tabulator (page number)
+ nEnd = nIndexTab;
+
// gibt es harte Attribute, die als Tags geschrieben werden muessen?
aFullText += rStr;
HTMLEndPosLst aEndPosLst( rWrt.pDoc, rHTMLWrt.pTemplate,
@@ -2630,6 +2647,12 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nEnd > 0 && ' ' == rStr[nEnd-1] )
rHTMLWrt.bLFPossible = true;
+ // dot leaders: print the skipped page number in a different span element
+ if (nIndexTab > -1) {
+ OString sOut = OUStringToOString(rStr.copy(nIndexTab + 1), RTL_TEXTENCODING_ASCII_US);
+ rWrt.Strm().WriteOString( "</span><span>" + sOut + "</span>" );
+ }
+
rHTMLWrt.bTagOn = false;
OutHTML_SwFmtOff( rWrt, aFmtInfo );