diff options
author | Harri Pitkänen <hatapitk@iki.fi> | 2012-04-01 09:27:11 +0300 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-02 19:54:10 +0200 |
commit | ce219689caafb5e28e96437bdab18034a5015409 (patch) | |
tree | 50922f9b44eb93d98bbebf484ef2ae41faf45241 | |
parent | b89bf99ff2c8008951d72d58747793790b13299d (diff) |
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.
-rw-r--r-- | cui/source/tabpages/paragrph.cxx | 9 | ||||
-rw-r--r-- | sfx2/inc/sfx2/htmlmode.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 55 | ||||
-rw-r--r-- | sw/source/ui/shells/txtattr.cxx | 2 |
4 files changed, 5 insertions, 62 deletions
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index a2334b5de2ec..24ebdeb8f464 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -611,11 +611,8 @@ void SvxStdParagraphTabPage::Reset( const SfxItemSet& rSet ) aRightIndent.Disable(); aTopDist.Disable(); //HTML3.2 und NS 3.0 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 ) aLastLineLB.Hide(); aLastLineFT.Hide(); aExpandCB.Hide(); - if(!(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE)) ) + if(!(nHtmlMode & HTMLMODE_FULL_STYLES) ) aJustify.Disable(); aSnapToGridCB.Show(sal_False); } diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx index 63b0bfee0bd1..0cbcda816b51 100644 --- a/sfx2/inc/sfx2/htmlmode.hxx +++ b/sfx2/inc/sfx2/htmlmode.hxx @@ -35,7 +35,6 @@ #define HTMLMODE_SOME_STYLES 0x0020 /* mind. MS IE */ #define HTMLMODE_FULL_STYLES 0x0040 /* == SW */ #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_RESERVED1 0x4000 #define HTMLMODE_RESERVED0 0x8000 diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 9d153124bcaf..f0121ce7a933 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -120,30 +120,6 @@ HTMLOutEvent aAnchorEventTable[] = 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 ) { if( nPoolId == RES_POOLCOLL_HTML_DD ) @@ -1077,18 +1053,6 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, 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 ) { OSL_ENSURE( aNumInfo.GetNumRule(), "Wo ist die Numerierung geblieben???" ); @@ -2527,24 +2491,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) do { if ( pHt->GetEnd() && !pHt->HasDummyChar() ) { - if( RES_CHRATR_KERNING == pHt->Which() && - 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 ) + if( *pHt->GetEnd() != nStrPos ) { // Hints mit Ende einsortieren, wenn sie keinen // leeren Bereich aufspannen (Hints, die keinen diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx index 960409744055..272a9fc7fd72 100644 --- a/sw/source/ui/shells/txtattr.cxx +++ b/sw/source/ui/shells/txtattr.cxx @@ -605,7 +605,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet) { bFlag = SVX_ADJUST_BLOCK == eAdjust; 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 ); nSlot = 0; |