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.
Harri
From 3773ce91815b57add5646247d86e4ce1c6f3613e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Harri=20Pitk=C3=A4nen?= <hatapitk@iki.fi>
Date: Tue, 8 Nov 2011 19:36:21 +0200
Subject: [PATCH] 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.
---
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(-)
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 75b99eb..f7ce654 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -480,12 +480,6 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
nTop = aVal.nVPos - aVal.nMinVPos;
nBottom = aVal.nMaxHeight - aVal.nHeight;
- if (bHtmlMode && 0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS))
- {
- nLeft = nRight = ( nLeft + nRight ) / 2;
- nTop = nBottom = ( nTop + nBottom ) / 2;
- }
- else
{
if (aVal.nAnchorType == FLY_AS_CHAR)
{
@@ -620,20 +614,6 @@ int SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet)
--------------------------------------------------------------------*/
IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
{
- if(bHtmlMode && 0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS))
- {
- sal_Int64 nValue = pEdit->GetValue();
- if (pEdit == &aLeftMarginED)
- aRightMarginED.SetUserValue(nValue, FUNIT_NONE);
- else if (pEdit == &aRightMarginED)
- aLeftMarginED.SetUserValue(nValue, FUNIT_NONE);
- else if (pEdit == &aTopMarginED)
- aBottomMarginED.SetUserValue(nValue, FUNIT_NONE);
- else if (pEdit == &aBottomMarginED)
- aTopMarginED.SetUserValue(nValue, FUNIT_NONE);
- }
- else
- {
sal_Int64 nValue = pEdit->GetValue();
MetricField *pOpposite = 0;
@@ -655,7 +635,6 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
if (nValue + nOpposite > Max(pEdit->GetMax(), pOpposite->GetMax()))
pOpposite->SetValue(pOpposite->GetMax() - nValue);
}
- }
return 0;
}
--
1.7.7.1
Context
- [Libreoffice] [PATCH] Enable features behind HTMLMODE_FULL_ABS_POS for all HTML export modes · Harri Pitkänen
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.