[Libreoffice-commits] .: cui/source sfx2/inc sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 27 01:11:59 PDT 2012
cui/source/tabpages/swpossizetabpage.cxx | 17 ++++-------------
sfx2/inc/sfx2/htmlmode.hxx | 1 -
sw/source/ui/config/viewopt.cxx | 9 +++------
sw/source/ui/docvw/edtwin.cxx | 3 +--
sw/source/ui/frmdlg/frmpage.cxx | 17 ++++-------------
sw/source/ui/ribbar/tbxanchr.cxx | 4 +---
sw/source/ui/shells/basesh.cxx | 4 +---
sw/source/ui/shells/drwbassh.cxx | 4 +---
sw/source/ui/shells/textsh.cxx | 3 +--
9 files changed, 16 insertions(+), 46 deletions(-)
New commits:
commit c184419d523a15fd875f0565e268158be27ac703
Author: Harri Pitkänen <hatapitk at iki.fi>
Date: Fri Aug 24 18:53:36 2012 +0300
Remove remaining checks for HTMLMODE_SOME_ABS_POS
This HTML mode is never disabled for any HTML export options. Thus
it is not necessary to check for it. Completes the cleanup started
in commit feeb57e0a63cdcd81898050d059e7933f62c5292
Change-Id: I3ea27ea52cdc355f19d0d2fb33ac92262df5d13f
Reviewed-on: https://gerrit.libreoffice.org/488
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 2eb6f25..caa95e0 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -894,14 +894,6 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet)
if(m_bHtmlMode)
{
- if( 0 == (m_nHtmlMode & HTMLMODE_SOME_ABS_POS))
- {
- if(GetAnchorType() == TextContentAnchorType_AT_PAGE)
- {
- m_aToParaRB.Check();
- }
- m_aToPageRB.Enable(sal_False);
- }
m_aHoriMirrorCB.Show(sal_False);
m_aKeepRatioCB.Enable(sal_False);
// #i18732# - hide checkbox in HTML mode
@@ -1227,8 +1219,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB )
m_bAtVertPosModified = sal_True;
// special treatment for HTML-Mode with horz-vert-dependencies
- if(m_bHtmlMode && m_nHtmlMode & HTMLMODE_SOME_ABS_POS &&
- TextContentAnchorType_AT_CHARACTER == GetAnchorType())
+ if(m_bHtmlMode && TextContentAnchorType_AT_CHARACTER == GetAnchorType())
{
sal_Bool bSet = sal_False;
if(bHori)
@@ -1444,7 +1435,7 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor,
if(m_bHtmlMode)
{
m_pVMap = aVParaHtmlMap;
- m_pHMap = m_nHtmlMode & HTMLMODE_SOME_ABS_POS ? aHParaHtmlAbsMap : aHParaHtmlMap;
+ m_pHMap = aHParaHtmlAbsMap;
}
else
{
@@ -1456,8 +1447,8 @@ void SvxSwPosSizeTabPage::InitPos(short nAnchor,
{
if(m_bHtmlMode)
{
- m_pVMap = m_nHtmlMode & HTMLMODE_SOME_ABS_POS ? aVCharHtmlAbsMap : aVCharHtmlMap;
- m_pHMap = m_nHtmlMode & HTMLMODE_SOME_ABS_POS ? aHCharHtmlAbsMap : aHCharHtmlMap;
+ m_pVMap = aVCharHtmlAbsMap;
+ m_pHMap = aHCharHtmlAbsMap;
}
else
{
diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx
index 4d5393c..90af4b2 100644
--- a/sfx2/inc/sfx2/htmlmode.hxx
+++ b/sfx2/inc/sfx2/htmlmode.hxx
@@ -25,7 +25,6 @@
#define HTMLMODE_SOME_STYLES 0x0020 /* mind. MS IE */
#define HTMLMODE_FULL_STYLES 0x0040 /* == SW */
#define HTMLMODE_PARA_BLOCK 0x0100
-#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 18ab294..ff7d59a 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -326,16 +326,13 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
switch ( rHtmlOpt.GetExportMode() )
{
case HTML_CFG_MSIE:
- nRet |= HTMLMODE_FULL_STYLES|
- HTMLMODE_SOME_ABS_POS;
+ nRet |= HTMLMODE_FULL_STYLES;
break;
case HTML_CFG_NS40:
- nRet |= HTMLMODE_FRM_COLUMNS|
- HTMLMODE_SOME_ABS_POS;
+ nRet |= HTMLMODE_FRM_COLUMNS;
break;
case HTML_CFG_WRITER:
- nRet |= HTMLMODE_FRM_COLUMNS|HTMLMODE_FULL_STYLES|
- HTMLMODE_SOME_ABS_POS;
+ nRet |= HTMLMODE_FRM_COLUMNS|HTMLMODE_FULL_STYLES;
break;
}
}
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index bf24d48..2805bc2 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -1160,8 +1160,7 @@ void SwEditWin::ChangeFly( sal_uInt8 nDir, sal_Bool bWeb )
}
else
{
- bSetPos = (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_SOME_ABS_POS) ?
- sal_True : sal_False;
+ bSetPos = sal_True;
}
}
if( bSetPos )
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 4f27ffa..b05b030 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -902,14 +902,6 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
if(bHtmlMode)
{
- if( 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))
- {
- if (GetAnchor() == FLY_AT_PAGE)
- {
- aAnchorAtParaRB.Check();
- }
- aAnchorAtPageRB.Enable(sal_False);
- }
aAutoHeightCB.Enable(sal_False);
aAutoWidthCB.Enable(sal_False);
aMirrorPagesCB.Show(sal_False);
@@ -1189,7 +1181,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
if(bHtmlMode)
{
pVMap = aVParaHtmlMap;
- pHMap = nHtmlMode & HTMLMODE_SOME_ABS_POS ? aHParaHtmlAbsMap : aHParaHtmlMap;
+ pHMap = aHParaHtmlAbsMap;
}
else
{
@@ -1201,8 +1193,8 @@ void SwFrmPage::InitPos(RndStdIds eId,
{
if(bHtmlMode)
{
- pVMap = nHtmlMode & HTMLMODE_SOME_ABS_POS ? aVCharHtmlAbsMap : aVCharHtmlMap;
- pHMap = nHtmlMode & HTMLMODE_SOME_ABS_POS ? aHCharHtmlAbsMap : aHCharHtmlMap;
+ pVMap = aVCharHtmlAbsMap;
+ pHMap = aHCharHtmlAbsMap;
}
else
{
@@ -1878,8 +1870,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
bAtVertPosModified = sal_True;
// special treatment for HTML-Mode with horizonal-vertical-dependencies
- if(bHtmlMode && nHtmlMode&HTMLMODE_SOME_ABS_POS &&
- (FLY_AT_CHAR == GetAnchor()))
+ if(bHtmlMode && (FLY_AT_CHAR == GetAnchor()))
{
sal_Bool bSet = sal_False;
if(bHori)
diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx
index a84ce96..8de4062 100644
--- a/sw/source/ui/ribbar/tbxanchr.cxx
+++ b/sw/source/ui/ribbar/tbxanchr.cxx
@@ -119,10 +119,8 @@ void SwTbxAnchor::Click()
aPopMenu.EnableItem( FN_TOOL_ANCHOR_FRAME, 0 != pWrtShell->IsFlyInFly() );
Rectangle aRect(GetToolBox().GetItemRect(GetId()));
- sal_uInt16 nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current());
- sal_Bool bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS);
- if (bHtmlModeNoAnchor || pWrtShell->IsInHeaderFooter())
+ if (pWrtShell->IsInHeaderFooter())
aPopMenu.RemoveItem(aPopMenu.GetItemPos(FN_TOOL_ANCHOR_PAGE));
if (nActAnchorId)
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index c10d28f..0dd7b7f 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -1586,9 +1586,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
if(nWhich != FN_TOOL_ANCHOR)
{
sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
- if( ( nWhich == FN_TOOL_ANCHOR_PAGE &&
- ((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)))) ||
- ( nWhich == FN_TOOL_ANCHOR_FRAME && !rSh.IsFlyInFly() ) )
+ if( nWhich == FN_TOOL_ANCHOR_FRAME && !rSh.IsFlyInFly() )
rSet.DisableItem(nWhich);
else
rSet.Put(SfxBoolItem(nWhich, bSet));
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index df8621b..69e7bed 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -198,11 +198,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
// Erlaubte Verankerungen:
short nAnchor = pSh->GetAnchorId();
- sal_uInt16 nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT;
+ sal_uInt16 nAllowedAnchors = SVX_OBJ_AT_CNTNT | SVX_OBJ_IN_CNTNT | SVX_OBJ_PAGE;
sal_uInt16 nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
- if( !((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))) )
- nAllowedAnchors |= SVX_OBJ_PAGE;
if ( pSh->IsFlyInFly() )
nAllowedAnchors |= SVX_OBJ_AT_FLY;
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index c6a5588..06ce736 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -806,8 +806,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case FN_INSERT_FRAME_INTERACT_NOCOL :
case FN_INSERT_FRAME_INTERACT:
{
- if ( GetShell().IsSelFrmMode() ||
- (0 != (nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)) || bCrsrInHidden )
+ if ( GetShell().IsSelFrmMode() || bCrsrInHidden )
rSet.DisableItem(nWhich);
}
break;
More information about the Libreoffice-commits
mailing list