Kaydet (Commit) ce219689 authored tarafından Harri Pitkänen's avatar Harri Pitkänen Kaydeden (comit) Luboš Luňák

Remove unused HTMLMODE_FIRSTLINE

HTMLMODE_FIRSTLINE was disabled in all HTML export modes. It seems to
have been used to add first line indent for paragraphs in Netscape
version 3 but all currently available export modes use CSS for that.
üst b89bf99f
...@@ -611,11 +611,8 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) ...@@ -611,11 +611,8 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet )
aRightIndent.Disable(); aRightIndent.Disable();
aTopDist.Disable(); //HTML3.2 und NS 3.0 aTopDist.Disable(); //HTML3.2 und NS 3.0
aBottomDist.Disable(); aBottomDist.Disable();
if(!(nHtmlMode & HTMLMODE_FIRSTLINE)) //NS 3.0 aFLineIndent.Disable();
{ aFLineLabel.Disable();
aFLineIndent.Disable();
aFLineLabel.Disable();
}
} }
} }
...@@ -1282,7 +1279,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) ...@@ -1282,7 +1279,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet )
aLastLineLB.Hide(); aLastLineLB.Hide();
aLastLineFT.Hide(); aLastLineFT.Hide();
aExpandCB.Hide(); aExpandCB.Hide();
if(!(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE)) ) if(!(nHtmlMode & HTMLMODE_FULL_STYLES) )
aJustify.Disable(); aJustify.Disable();
aSnapToGridCB.Show(sal_False); aSnapToGridCB.Show(sal_False);
} }
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#define HTMLMODE_SOME_STYLES 0x0020 /* mind. MS IE */ #define HTMLMODE_SOME_STYLES 0x0020 /* mind. MS IE */
#define HTMLMODE_FULL_STYLES 0x0040 /* == SW */ #define HTMLMODE_FULL_STYLES 0x0040 /* == SW */
#define HTMLMODE_PARA_BLOCK 0x0100 #define HTMLMODE_PARA_BLOCK 0x0100
#define HTMLMODE_FIRSTLINE 0x0400 /* First-line intent with Spacer == NS 3.0 */
#define HTMLMODE_SOME_ABS_POS 0x2000 #define HTMLMODE_SOME_ABS_POS 0x2000
#define HTMLMODE_RESERVED1 0x4000 #define HTMLMODE_RESERVED1 0x4000
#define HTMLMODE_RESERVED0 0x8000 #define HTMLMODE_RESERVED0 0x8000
......
...@@ -120,30 +120,6 @@ HTMLOutEvent aAnchorEventTable[] = ...@@ -120,30 +120,6 @@ HTMLOutEvent aAnchorEventTable[] =
static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt ); static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt );
static Writer& OutHTML_HoriSpacer( Writer& rWrt, sal_Int16 nSize )
{
OSL_ENSURE( nSize>0, "horizontaler SPACER mit negativem Wert?" );
if( nSize <= 0 )
return rWrt;
if( Application::GetDefaultDevice() )
{
nSize = (sal_Int16)Application::GetDefaultDevice()
->LogicToPixel( Size(nSize,0), MapMode(MAP_TWIP) ).Width();
}
rtl::OStringBuffer sOut;
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_spacer).append(' ').
append(OOO_STRING_SVTOOLS_HTML_O_type).append('=').
append(OOO_STRING_SVTOOLS_HTML_SPTYPE_horizontal).append(' ').
append(OOO_STRING_SVTOOLS_HTML_O_size).append('=').
append(static_cast<sal_Int32>(nSize)).append('>');
rWrt.Strm() << sOut.getStr();
return rWrt;
}
sal_uInt16 SwHTMLWriter::GetDefListLvl( const String& rNm, sal_uInt16 nPoolId ) sal_uInt16 SwHTMLWriter::GetDefListLvl( const String& rNm, sal_uInt16 nPoolId )
{ {
if( nPoolId == RES_POOLCOLL_HTML_DD ) if( nPoolId == RES_POOLCOLL_HTML_DD )
...@@ -1077,18 +1053,6 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, ...@@ -1077,18 +1053,6 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
rInfo.aToken = rtl::OString(); rInfo.aToken = rtl::OString();
} }
// ??? Warum nicht ueber den Hint-Mechanismus ???
if( rHWrt.IsHTMLMode(HTMLMODE_FIRSTLINE) )
{
const SvxLRSpaceItem& rLRSpaceTmp =
pNodeItemSet ? ((const SvxLRSpaceItem &)pNodeItemSet->Get(RES_LR_SPACE))
: rFmt.GetLRSpace();
if( rLRSpaceTmp.GetTxtFirstLineOfst() > 0 )
{
OutHTML_HoriSpacer( rWrt, rLRSpaceTmp.GetTxtFirstLineOfst() );
}
}
if( nBulletGrfLvl != 255 ) if( nBulletGrfLvl != 255 )
{ {
OSL_ENSURE( aNumInfo.GetNumRule(), "Wo ist die Numerierung geblieben???" ); OSL_ENSURE( aNumInfo.GetNumRule(), "Wo ist die Numerierung geblieben???" );
...@@ -2527,24 +2491,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) ...@@ -2527,24 +2491,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
do { do {
if ( pHt->GetEnd() && !pHt->HasDummyChar() ) if ( pHt->GetEnd() && !pHt->HasDummyChar() )
{ {
if( RES_CHRATR_KERNING == pHt->Which() && if( *pHt->GetEnd() != nStrPos )
rHTMLWrt.IsHTMLMode(HTMLMODE_FIRSTLINE) &&
*pHt->GetEnd() - nStrPos == 1 &&
' ' == rStr.GetChar(nStrPos) &&
((const SvxKerningItem&)pHt->GetAttr()).GetValue() > 0 )
{
// Wenn erlaubt, wird das Ding als Spacer exportiert
bOutChar = sal_False; // Space nicht ausgeben
bWriteBreak = sal_False; // der Absatz ist aber auch nicht leer
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
OutHTML_HoriSpacer( rWrt,
((const SvxKerningItem&)pHt->GetAttr()).GetValue() );
// Der Hint braucht nun doch nicht weiter
// beruecksichtigt werden.
}
else if( *pHt->GetEnd() != nStrPos )
{ {
// Hints mit Ende einsortieren, wenn sie keinen // Hints mit Ende einsortieren, wenn sie keinen
// leeren Bereich aufspannen (Hints, die keinen // leeren Bereich aufspannen (Hints, die keinen
......
...@@ -605,7 +605,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) ...@@ -605,7 +605,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
{ {
bFlag = SVX_ADJUST_BLOCK == eAdjust; bFlag = SVX_ADJUST_BLOCK == eAdjust;
sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell()); sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE) )) if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & HTMLMODE_FULL_STYLES ))
{ {
rSet.DisableItem( nSlot ); rSet.DisableItem( nSlot );
nSlot = 0; nSlot = 0;
......
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