summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorHarri Pitkänen <hatapitk@iki.fi>2012-08-24 18:53:36 +0300
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2012-08-27 08:11:33 +0000
commitc184419d523a15fd875f0565e268158be27ac703 (patch)
tree1c5bd79aa9c8545f2f53a25f70aa22430df06edb /sw
parent3e9f9e5e4d301fd97a0da8f6625a652fba0ff471 (diff)
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@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/config/viewopt.cxx9
-rw-r--r--sw/source/ui/docvw/edtwin.cxx3
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx17
-rw-r--r--sw/source/ui/ribbar/tbxanchr.cxx4
-rw-r--r--sw/source/ui/shells/basesh.cxx4
-rw-r--r--sw/source/ui/shells/drwbassh.cxx4
-rw-r--r--sw/source/ui/shells/textsh.cxx3
7 files changed, 12 insertions, 32 deletions
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 18ab294d7526..ff7d59a4f9cf 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 bf24d4853aa5..2805bc267c65 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 4f27ffa5c0ff..b05b030db317 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 a84ce96b9d77..8de406251a4c 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 c10d28f79cf9..0dd7b7f1d891 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 df8621b8dab2..69e7bed8b5fe 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 c6a55883f5d2..06ce73601b8a 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;