[Libreoffice-commits] .: cui/source sfx2/inc sw/source
cui/source/tabpages/paragrph.cxx |9 ++ sfx2/inc/sfx2/htmlmode.hxx|1 sw/source/filter/html/htmlatr.cxx | 55 -- sw/source/ui/shells/txtattr.cxx |2 - 4 files changed, 5 insertions(+), 62 deletions(-) New commits: commit ce219689caafb5e28e96437bdab18034a5015409 Author: Harri Pitkänen hatap...@iki.fi Date: Sun Apr 1 09:27:11 2012 +0300 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. diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index a2334b5..24ebdeb 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 63b0bfe..0cbcda8 100644 --- a/sfx2/inc/sfx2/htmlmode.hxx +++ b/sfx2/inc/sfx2/htmlmode.hxx @@ -35,7 +35,6 @@ #define HTMLMODE_SOME_STYLES0x0020 /* mind. MS IE */ #define HTMLMODE_FULL_STYLES0x0040 /* == 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 9d15312..f0121ce 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( nSize0, 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_castsal_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
[Libreoffice-commits] .: cui/source sfx2/inc sw/source
cui/source/tabpages/border.cxx | 11 --- cui/source/tabpages/swpossizetabpage.cxx |5 - sfx2/inc/sfx2/htmlmode.hxx |1 - sw/source/ui/config/viewopt.cxx |4 ++-- sw/source/ui/frmdlg/frmpage.cxx |7 --- sw/source/ui/frmdlg/wrap.cxx | 21 - 6 files changed, 2 insertions(+), 47 deletions(-) New commits: commit 090454c4c99498a79d87c55e1903132bd068d810 Author: Harri Pitkänen hatap...@iki.fi Date: Tue Nov 8 19:36:21 2011 +0200 Enable features behind HTMLMODE_FULL_ABS_POS for all HTML export modes HTMLMODE_FULL_ABS_POS appears to have been used for enabling accurate margin settings for absolutely positioned graphics objects. If it was disabled one could not set (in HTML editor mode) separate margins for left and right (or bottom/top) sides of the image. The setting was disabled for Netscape and enabled for other browsers. This patch removes the setting and unconditionally enables the feature in HTML editor mode. All modern browsers support margin-{left,right,bottom,top} CSS properties. diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 98d62e9..d6c474f 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -559,17 +559,6 @@ void SvxBorderTabPage::Reset( const SfxItemSet rSet ) aLbShadowColor.Disable(); aFlShadow .Disable(); -sal_uInt16 nLBCount = aLbLineStyle.GetEntryCount(); -// ist es ein Absatzdialog, dann alle Linien fuer -// Sw-Export, sonst ist die Page nicht da -if(!(mbHorEnabled || mbVerEnabled) - 0 == (nHtmlMode HTMLMODE_FULL_ABS_POS) -SFX_ITEM_AVAILABLE rSet.GetItemState(GetWhich( SID_ATTR_PARA_LINESPACE ))) -{ -for( sal_uInt16 i = nLBCount - 1; i LINESTYLE_HTML_MAX; --i) -aLbLineStyle.RemoveEntry(i); -} - if( !(nSWMode SW_BORDER_MODE_TABLE) ) { aUserDefFT.Disable(); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 2d08ded..7874eaa 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -895,11 +895,6 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet rSet) if(m_bHtmlMode) { -if( 0 == (m_nHtmlMode HTMLMODE_FULL_ABS_POS)) -{ -m_aHeightFT .Enable( sal_False ); -m_aHeightMF .Enable( sal_False ); -} if( 0 == (m_nHtmlMode HTMLMODE_SOME_ABS_POS)) { if(GetAnchorType() == TextContentAnchorType_AT_PAGE) diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx index ce1af6f..65e41f6 100644 --- a/sfx2/inc/sfx2/htmlmode.hxx +++ b/sfx2/inc/sfx2/htmlmode.hxx @@ -37,7 +37,6 @@ #define HTMLMODE_PARA_BLOCK 0x0100 #define HTMLMODE_DROPCAPS 0x0200 #define HTMLMODE_FIRSTLINE 0x0400 /* First-line intent with Spacer == NS 3.0 */ -#define HTMLMODE_FULL_ABS_POS 0x1000 #define HTMLMODE_SOME_ABS_POS 0x2000 #define HTMLMODE_RESERVED1 0x4000 #define HTMLMODE_RESERVED0 0x8000 diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index a34679c..32093ab 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -340,7 +340,7 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell) { case HTML_CFG_MSIE: nRet |= HTMLMODE_FULL_STYLES| -HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS; +HTMLMODE_SOME_ABS_POS; break; case HTML_CFG_NS40: nRet |= HTMLMODE_FRM_COLUMNS| @@ -349,7 +349,7 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell) case HTML_CFG_WRITER: nRet |= HTMLMODE_FRM_COLUMNS|HTMLMODE_FULL_STYLES| HTMLMODE_DROPCAPS| -HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS; +HTMLMODE_SOME_ABS_POS; break; } } diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index b321d49..744ab01 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -908,13 +908,6 @@ void SwFrmPage::Reset( const SfxItemSet rSet ) if(bHtmlMode) { -if(nDlgType == DLG_FRM_STD -0 == (nHtmlMode HTMLMODE_FULL_ABS_POS)) -{ -aHeightFT .Enable( sal_False ); -aHeightED .Enable( sal_False ); -aRelHeightCB.Enable( sal_False ); -} if( 0 == (nHtmlMode HTMLMODE_SOME_ABS_POS)) { if (GetAnchor() == FLY_AT_PAGE) diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index
[Libreoffice-commits] .: cui/source sfx2/inc sw/source
cui/source/tabpages/backgrnd.cxx |2 -- cui/source/tabpages/chardlg.cxx |3 +-- sfx2/inc/sfx2/htmlmode.hxx|3 --- sw/source/filter/html/css1atr.cxx |2 +- sw/source/filter/html/htmlatr.cxx |7 +++ sw/source/ui/config/viewopt.cxx | 10 -- 6 files changed, 9 insertions(+), 18 deletions(-) New commits: commit 89b3820c7b8c97480b556b3553cd78aaa12d07d8 Author: Harri Pitkänen hatap...@iki.fi Date: Wed Oct 26 21:48:17 2011 +0300 Export blinking text attribute to HTML in all HTML export modes Previously blinking was not exported in IE mode. IE still does not support blinking (neither does Chrome or Safari) but the extra tag does not make things any worse and allows importing the HTML back to LibreOffice without loss of formatting. Code is also simplified by removing conditionals for options that no longer need to be disabled. diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 8d27b17..b466ea8 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1086,8 +1086,6 @@ void SvxBackgroundTabPage::ShowSelector() if(nHtmlMode HTMLMODE_ON) { -if(!(nHtmlMode HTMLMODE_GRAPH_POS)) -aBtnPosition.Enable(sal_False); aBtnArea.Enable(sal_False); } } diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index a92019e..9d320b4 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -2686,8 +2686,7 @@ void SvxCharEffectsPage::DisableControls( sal_uInt16 nDisable ) void SvxCharEffectsPage::EnableFlash() { -if ( !( ( m_nHtmlMode HTMLMODE_ON ) !( m_nHtmlMode HTMLMODE_BLINK ) ) ) -m_aBlinkingBtn.Show(); +m_aBlinkingBtn.Show(); } // --- diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx index f4db27a..ce1af6f 100644 --- a/sfx2/inc/sfx2/htmlmode.hxx +++ b/sfx2/inc/sfx2/htmlmode.hxx @@ -31,15 +31,12 @@ #define HTMLMODE_ON 0x0001 #define HTMLMODE_PARA_DISTANCE 0x0004 -#define HTMLMODE_SMALL_CAPS 0x0008 #define HTMLMODE_FRM_COLUMNS0x0010 #define HTMLMODE_SOME_STYLES0x0020 /* mind. MS IE */ #define HTMLMODE_FULL_STYLES0x0040 /* == SW */ -#define HTMLMODE_BLINK 0x0080 #define HTMLMODE_PARA_BLOCK 0x0100 #define HTMLMODE_DROPCAPS 0x0200 #define HTMLMODE_FIRSTLINE 0x0400 /* First-line intent with Spacer == NS 3.0 */ -#define HTMLMODE_GRAPH_POS 0x0800 #define HTMLMODE_FULL_ABS_POS 0x1000 #define HTMLMODE_SOME_ABS_POS 0x2000 #define HTMLMODE_RESERVED1 0x4000 diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 5905b72..33bd07a 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2510,7 +2510,7 @@ static Writer OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer rWrt, } const sal_Char *pBStr = 0; -if( pBItem rHTMLWrt.IsHTMLMode(HTMLMODE_BLINK) ) +if( pBItem ) { if( !pBItem-GetValue() ) { diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 2d56070..7354b6c 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1475,9 +1475,8 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem rItem ) break; case RES_CHRATR_BLINK: -if( IsHTMLMode(HTMLMODE_BLINK) ) -eState = ((const SvxBlinkItem)rItem).GetValue() ? HTML_ON_VALUE - : HTML_OFF_VALUE; +eState = ((const SvxBlinkItem)rItem).GetValue() ? HTML_ON_VALUE + : HTML_OFF_VALUE; break; case RES_CHRATR_COLOR: @@ -3030,7 +3029,7 @@ static Writer OutHTML_SwFlyCnt( Writer rWrt, const SfxPoolItem rHt ) static Writer OutHTML_SwBlink( Writer rWrt, const SfxPoolItem rHt ) { SwHTMLWriter rHTMLWrt = (SwHTMLWriter)rWrt; -if( rHTMLWrt.bOutOpts || !rHTMLWrt.IsHTMLMode(HTMLMODE_BLINK) ) +if( rHTMLWrt.bOutOpts ) return rWrt; if( ((const SvxBlinkItem)rHt).GetValue() ) diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index 4d50236..a34679c 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -339,18 +339,16 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell) switch ( rHtmlOpt.GetExportMode() ) { case HTML_CFG_MSIE: -nRet |= HTMLMODE_SMALL_CAPS| -HTMLMODE_FULL_STYLES|HTMLMODE_GRAPH_POS| +nRet |= HTMLMODE_FULL_STYLES| HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS; break; case HTML_CFG_NS40: -