summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/shells')
-rw-r--r--sw/source/ui/shells/basesh.cxx58
-rw-r--r--sw/source/ui/shells/drwbassh.cxx12
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx6
-rw-r--r--sw/source/ui/shells/tabsh.cxx6
-rw-r--r--sw/source/ui/shells/textdrw.cxx6
-rw-r--r--sw/source/ui/shells/textidx.cxx6
-rw-r--r--sw/source/ui/shells/textsh.cxx12
7 files changed, 46 insertions, 60 deletions
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 9b38981abbb3..dacf6b45dc89 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -100,9 +100,7 @@
#include <tblafmt.hxx>
#include <caption.hxx>
#include <swwait.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -1063,14 +1061,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case FN_TOOL_ANKER_FRAME:
{
RndStdIds eSet = nSlot == FN_TOOL_ANKER_PAGE
- ? FLY_PAGE
+ ? FLY_AT_PAGE
: nSlot == FN_TOOL_ANKER_PARAGRAPH
- ? FLY_AT_CNTNT
+ ? FLY_AT_PARA
: nSlot == FN_TOOL_ANKER_FRAME
? FLY_AT_FLY
: nSlot == FN_TOOL_ANKER_CHAR
- ? FLY_IN_CNTNT
- : FLY_AUTO_CNTNT;
+ ? FLY_AS_CHAR
+ : FLY_AT_CHAR;
rSh.StartUndo();
if( rSh.IsObjSelected() )
rSh.ChgAnchor( eSet );
@@ -1101,7 +1099,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
switch( eSet )
{
case FLY_AT_FLY:
- case FLY_PAGE:
+ case FLY_AT_PAGE:
//Durchlauf, links oder von links, oben, von oben
if(eSurround != SURROUND_THROUGHT)
@@ -1114,7 +1112,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT));
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
//links, von links, rechts, oben, kein Uml, li+re Umlauf,
if(eSurround != SURROUND_LEFT || eSurround != SURROUND_RIGHT)
aSet.Put(SwFmtSurround(SURROUND_LEFT));
@@ -1126,7 +1124,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
aSet.Put(SwFmtHoriOrient(0, text::HoriOrientation::LEFT));
break;
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
//links, von links, rechts, oben, Durchlauf
if(eSurround != SURROUND_THROUGHT)
aSet.Put(SwFmtSurround(SURROUND_THROUGHT));
@@ -1624,12 +1622,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
rSh.GetFlyFrmAttr(aSet);
RndStdIds eSet = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
- BOOL bSet;
- bSet = (nWhich == FN_TOOL_ANKER_PAGE && eSet == FLY_PAGE) ||
- (nWhich == FN_TOOL_ANKER_PARAGRAPH && eSet == FLY_AT_CNTNT) ||
- (nWhich == FN_TOOL_ANKER_FRAME && eSet == FLY_AT_FLY) ||
- (nWhich == FN_TOOL_ANKER_AT_CHAR && eSet == FLY_AUTO_CNTNT) ||
- (nWhich == FN_TOOL_ANKER_CHAR && eSet == FLY_IN_CNTNT);
+ const BOOL bSet =
+ ((nWhich == FN_TOOL_ANKER_PAGE) &&
+ (eSet == FLY_AT_PAGE))
+ || ((nWhich == FN_TOOL_ANKER_PARAGRAPH) &&
+ (eSet == FLY_AT_PARA))
+ || ((nWhich == FN_TOOL_ANKER_FRAME) &&
+ (eSet == FLY_AT_FLY))
+ || ((nWhich == FN_TOOL_ANKER_AT_CHAR) &&
+ (eSet == FLY_AT_CHAR))
+ || ((nWhich == FN_TOOL_ANKER_CHAR) &&
+ (eSet == FLY_AS_CHAR));
if(nWhich != FN_TOOL_ANKER)
{
USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
@@ -1646,16 +1649,16 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
switch (eSet)
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
nSlotId = FN_TOOL_ANKER_PAGE;
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
nSlotId = FN_TOOL_ANKER_PARAGRAPH;
break;
- case FLY_IN_CNTNT:
+ case FLY_AS_CHAR:
nSlotId = FN_TOOL_ANKER_CHAR;
break;
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
nSlotId = FN_TOOL_ANKER_AT_CHAR;
break;
case FLY_AT_FLY:
@@ -1705,15 +1708,18 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
SwSurround nSurround = rWrap.GetSurround();
BOOL bSet = FALSE;
- BOOL bDisable = nAnchorType == - 1 || nAnchorType == FLY_IN_CNTNT;
- BOOL bHtmlMode = 0 != ::GetHtmlMode(GetView().GetDocShell());
+ bool bDisable =
+ (nAnchorType == - 1) || (nAnchorType == FLY_AS_CHAR);
+ const bool bHtmlMode =
+ 0 != ::GetHtmlMode(GetView().GetDocShell());
switch( nWhich )
{
case FN_FRAME_NOWRAP:
bDisable |=
- ( nAnchorType != FLY_AT_CNTNT &&
- nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE);
+ ( (nAnchorType != FLY_AT_PARA)
+ && (nAnchorType != FLY_AT_CHAR)
+ && (nAnchorType != FLY_AT_PAGE));
bSet = nSurround == SURROUND_NONE;
break;
case FN_FRAME_WRAP:
@@ -1726,7 +1732,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_FRAME_WRAPTHRU:
bDisable |= (bHtmlMode ||
- (nAnchorType != FLY_AT_CNTNT&& nAnchorType != FLY_AUTO_CNTNT && nAnchorType != FLY_PAGE));
+ ( (nAnchorType != FLY_AT_PARA)
+ && (nAnchorType != FLY_AT_CHAR)
+ && (nAnchorType != FLY_AT_PAGE)));
if(bObj)
bSet = nSurround == SURROUND_THROUGHT && rSh.GetLayerId();
else
@@ -1766,7 +1774,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_WRAP_ANCHOR_ONLY:
bDisable |= (bHtmlMode ||
- (nAnchorType != FLY_AT_CNTNT));
+ (nAnchorType != FLY_AT_PARA));
bSet = rWrap.IsAnchorOnly();
break;
case FN_FRAME_WRAP_LEFT:
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index 3f5bb4fe6d77..b9b04526ec89 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -49,9 +49,7 @@
#include <svx/htmlmode.hxx>
#include <uitool.hxx>
#include <fmtornt.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <wview.hxx>
@@ -479,7 +477,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{ // Objekte nicht aneinander ausrichten
USHORT nAnchor = pSh->GetAnchorId();
- if (nAnchor == FLY_IN_CNTNT)
+ if (nAnchor == FLY_AS_CHAR)
{
sal_Int16 nVertOrient = -1;
@@ -509,7 +507,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
}
break;
}
- if (nAnchor == FLY_AT_CNTNT)
+ if (nAnchor == FLY_AT_PARA)
break; // Absatzverankerte Rahmen nicht ausrichten
}
@@ -855,7 +853,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nWidth = pValidation->nHeight;
pValidation->nHeight = nTmp;
}
- if ( eAnchorType == FLY_PAGE || eAnchorType == FLY_AT_FLY )
+ if ((eAnchorType == FLY_AT_PAGE) || (eAnchorType == FLY_AT_FLY))
{
// MinimalPosition
pValidation->nMinHPos = aBoundRect.Left();
@@ -903,7 +901,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nMaxVPos = aBoundRect.Bottom() - pValidation->nHeight;
pValidation->nMaxWidth = aBoundRect.Right() - nH;
}
- else if ( eAnchorType == FLY_AT_CNTNT || eAnchorType == FLY_AUTO_CNTNT )
+ else if ((eAnchorType == FLY_AT_PARA) || (eAnchorType == FLY_AT_CHAR))
{
if (pValidation->nHPos + pValidation->nWidth > aBoundRect.Right())
{
@@ -964,7 +962,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nMaxHeight = pValidation->nMaxVPos + pValidation->nHeight - nV;
pValidation->nMaxWidth = pValidation->nMaxHPos + pValidation->nWidth - nH;
}
- else if ( eAnchorType == FLY_IN_CNTNT )
+ else if (eAnchorType == FLY_AS_CHAR)
{
pValidation->nMinHPos = 0;
pValidation->nMaxHPos = 0;
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 59e4bc01c5e3..24328ab5682f 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -30,6 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <i18npool/lang.h>
#include <svl/slstitm.hxx>
@@ -53,7 +54,6 @@
#include <svx/outliner.hxx>
#include <svx/editstat.hxx>
#include <svx/svdoutl.hxx>
-#include <unoobj.hxx>
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
@@ -67,12 +67,8 @@
#include <swundo.hxx>
#include <breakit.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 20b548efaf91..d2b983c009d3 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -108,16 +108,12 @@
#ifndef _TABLE_HRC
#include <table.hrc>
#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#include <unoobj.hxx>
+#include <unobaseclass.hxx>
#define SwTableShell
#include <sfx2/msg.hxx>
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index ee714ee6ff55..564250daccad 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -39,23 +39,17 @@
#include <com/sun/star/form/FormButtonType.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <edtwin.hxx>
#include <swundo.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#ifndef _POOLFMT_HRC
#include <poolfmt.hrc>
#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <sfx2/docfile.hxx>
#include <svl/urihelper.hxx>
#include <avmedia/mediawindow.hxx>
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 62eeb00dcb20..5bb63a003b9a 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -32,9 +32,7 @@
#include "precompiled_sw.hxx"
#include <hintids.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
#include <svl/stritem.hxx>
@@ -55,6 +53,8 @@
#include "swabstdlg.hxx"
#include <index.hrc>
#include <globals.hrc>
+
+
// STATIC DATA -----------------------------------------------------------
void SwTextShell::ExecIdx(SfxRequest &rReq)
@@ -136,7 +136,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
0 );
SwWrtShell& rSh = GetShell();
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 9dd27b760064..a37ff64d59d7 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -39,9 +39,7 @@
#include <sfx2/objface.hxx>
#include <sfx2/lnkbase.hxx>
-#ifndef __RSC //autogen
#include <tools/errinf.hxx>
-#endif
#include <svx/svdview.hxx>
#include <svl/ptitem.hxx>
#include <svl/stritem.hxx>
@@ -82,9 +80,7 @@
#include <docsh.hxx>
#include <doc.hxx>
#include <uitool.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -112,9 +108,7 @@
#ifndef _POPUP_HRC
#include <popup.hrc>
#endif
-#ifndef _SWERROR_H
#include <swerror.h>
-#endif
#include <SwAppletImpl.hxx>
#include <unochart.hxx>
@@ -566,7 +560,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aCol.Init( nCols, aCol.GetGutterWidth(), aCol.GetWishWidth() );
aMgr.SetCol( aCol );
}
- aMgr.InsertFlyFrm(FLY_AT_CNTNT, aStartPos, aSize);
+ aMgr.InsertFlyFrm(FLY_AT_PARA, aStartPos, aSize);
GetShell().EndAllAction();
GetShell().UnlockPaint();
}
@@ -600,7 +594,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
Size aSize(aMgr.GetSize());
aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width();
Point aPos = aMgr.GetPos();
- RndStdIds eAnchor = FLY_AT_CNTNT;
+ RndStdIds eAnchor = FLY_AT_PARA;
if(pArgs->GetItemState(nSlot, FALSE, &pItem) == SFX_ITEM_SET)
eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue();
if(pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem) == SFX_ITEM_SET)
@@ -764,7 +758,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
SwFlyFrmAttrMgr aFrmMgr( TRUE, &rSh, FRMMGR_TYPE_GRF );
// am FrmMgr muessen die richtigen Parameter eingestellt werden
- aFrmMgr.SetAnchor(FLY_IN_CNTNT);
+ aFrmMgr.SetAnchor(FLY_AS_CHAR);
rSh.SplitNode( FALSE, FALSE );
rSh.SplitNode( FALSE, FALSE );