summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/app/appenv.cxx20
-rw-r--r--sw/source/ui/app/applab.cxx18
-rw-r--r--sw/source/ui/app/docsh2.cxx35
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx6
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx15
-rw-r--r--sw/source/ui/dialog/regionsw.cxx23
-rw-r--r--sw/source/ui/docvw/edtwin.cxx25
-rw-r--r--sw/source/ui/envelp/labelexp.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx27
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx60
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx54
-rw-r--r--sw/source/ui/misc/glossary.cxx22
-rw-r--r--sw/source/ui/ribbar/conrect.cxx11
-rw-r--r--sw/source/ui/ribbar/drawbase.cxx3
-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
-rw-r--r--sw/source/ui/table/chartins.cxx7
-rw-r--r--sw/source/ui/uiview/view2.cxx19
-rw-r--r--sw/source/ui/uiview/viewtab.cxx4
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx6
-rw-r--r--sw/source/ui/uno/unoatxt.cxx57
-rw-r--r--sw/source/ui/uno/unodispatch.cxx7
-rw-r--r--sw/source/ui/uno/unomod.cxx2
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx43
-rw-r--r--sw/source/ui/uno/unotxvw.cxx97
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx8
-rw-r--r--sw/source/ui/utlui/swrenamexnameddlg.cxx1
-rw-r--r--sw/source/ui/utlui/unotools.cxx3
-rw-r--r--sw/source/ui/wrtsh/select.cxx6
35 files changed, 263 insertions, 426 deletions
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index 7f3acf375b35..57a5bed15f5c 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -43,18 +43,12 @@
#include <svx/svxids.hrc>
#include <svtools/svmedit.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/docfac.hxx>
#include <sfx2/printer.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/dispatch.hxx>
#include <svx/boxitem.hxx>
#include <svx/lrspitem.hxx>
@@ -67,21 +61,13 @@
#include <paratr.hxx>
#include <swmodule.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <frmatr.hxx>
#include <fldbas.hxx>
#include <swundo.hxx>
-#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
#include <IDocumentDeviceAccess.hxx>
-#endif
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <fmtcol.hxx>
#include <frmmgr.hxx>
#include <fldmgr.hxx>
@@ -91,9 +77,7 @@
#include <SwStyleNameMapper.hxx>
#include <crsskip.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
@@ -478,7 +462,7 @@ static USHORT nTitleNo = 0;
if (rItem.bSend)
{
pSh->SttEndDoc(TRUE);
- aMgr.InsertFlyFrm(FLY_PAGE,
+ aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper),
Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0));
@@ -494,7 +478,7 @@ static USHORT nTitleNo = 0;
// Empfaenger
pSh->SttEndDoc(TRUE);
- aMgr.InsertFlyFrm(FLY_PAGE,
+ aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper),
Size (nPageW - rItem.lAddrFromLeft - 566, 0));
pSh->EnterSelFrmMode();
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index d09e522599d7..b6df61c2b968 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -39,15 +39,9 @@
#include <hintids.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/printer.hxx>
@@ -71,21 +65,13 @@
#include <frmatr.hxx>
#include <paratr.hxx>
#include <swmodule.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <fldbas.hxx>
#include <swundo.hxx>
#include <wrtsh.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <fmtcol.hxx>
#include <expfld.hxx>
#include <fldmgr.hxx>
@@ -126,7 +112,7 @@ const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
- aSet.Put(SwFmtAnchor(bPage ? FLY_IN_CNTNT : FLY_PAGE, nPhyPageNum));
+ aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum));
if (!bPage)
{
aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist,
@@ -166,7 +152,7 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem,
sal_uInt16 nPhyPageNum, nVirtPageNum;
rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
- aSet.Put(SwFmtAnchor(bPage ? FLY_IN_CNTNT : FLY_PAGE, nPhyPageNum));
+ aSet.Put(SwFmtAnchor(bPage ? FLY_AS_CHAR : FLY_AT_PAGE, nPhyPageNum));
if (!bPage)
{
aSet.Put(SwFmtHoriOrient(rItem.lLeft + nCol * rItem.lHDist,
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 16728ca544c9..db659545a290 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -30,30 +30,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#ifndef _COM_SUN_STAR_LANG_XMultiServiceFactory_HPP_
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
-#include <comphelper/processfactory.hxx>
-#endif
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/XDispatchHelper.hpp>
+#include <comphelper/processfactory.hxx>
#include <hintids.hxx>
#include <tools/urlobj.hxx>
#include <unotools/tempfile.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <svl/lckbitem.hxx>
#include <svl/eitem.hxx>
-/*
-#include <svl/macitem.hxx>
-*/
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <unotools/pathoptions.hxx>
@@ -90,51 +79,33 @@
#include <swunodef.hxx>
#include <fmtcol.hxx>
#include <swevent.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx> // fuer die aktuelle Sicht
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx> // Dokumenterzeugung
-#endif
#include <wrtsh.hxx>
#include <fldbas.hxx>
#include <viewopt.hxx>
-#ifndef _GLOBDOC_HXX
#include <globdoc.hxx>
-#endif
#include <fldwrap.hxx>
-#ifndef _REDLNDLG_HXX
#include <redlndlg.hxx>
-#endif
#include <docstyle.hxx>
#include <doc.hxx>
#include <pagedesc.hxx>
#include <shellio.hxx>
-#ifndef _PVIEW_HXX
#include <pview.hxx>
-#endif
-#ifndef _SRCVIEW_HXX
#include <srcview.hxx>
-#endif
#include <poolfmt.hxx>
#include <usrpref.hxx>
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
#include <unotxdoc.hxx>
#include <acmplwrd.hxx>
#include <swmodule.hxx>
-#include <unoobj.hxx>
+#include <unobaseclass.hxx>
#include <swwait.hxx>
#include <swcli.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <globals.h>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#ifndef _APP_HRC
#include <app.hrc>
#endif
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 958b9497a08a..6b802ad12797 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -42,9 +42,7 @@
#include <unotools/tempfile.hxx>
#include <uitool.hxx>
#include <svx/dlgutil.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swundo.hxx>
#include <sfx2/dispatch.hxx>
#include <svl/stritem.hxx>
@@ -56,9 +54,7 @@
#include <fldbas.hxx>
#include <poolfmt.hxx>
#include <unotxdoc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <doc.hxx>
#include <wrtsh.hxx>
#include <fmtsrnd.hxx>
@@ -325,7 +321,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_SURROUND,
0 );
- aSet.Put(SwFmtAnchor(FLY_PAGE, 1));
+ aSet.Put(SwFmtAnchor(FLY_AT_PAGE, 1));
if(bAlignLeft)
aSet.Put(SwFmtHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA ));
else
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index ae783c991799..6f8bd1f46664 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -30,6 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <SwSpellDialogChildWindow.hxx>
#include <vcl/msgbox.hxx>
#include <svx/svxacorr.hxx>
@@ -50,21 +51,20 @@
#include <unotools/linguprops.hxx>
#include <unotools/lingucfg.hxx>
#include <doc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <docary.hxx>
#include <frmfmt.hxx>
#include <dcontact.hxx>
#include <edtwin.hxx>
#include <pam.hxx>
#include <drawbase.hxx>
-#include <unoobj.hxx>
+#include <unotextrange.hxx>
#ifndef _DIALOG_HXX
#include <dialog.hrc>
#endif
#include <cmdid.h>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
@@ -258,8 +258,10 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
//mark the start position only if not at start of doc
if(!pWrtShell->IsStartOfDoc())
{
- m_pSpellState->m_xStartRange = SwXTextRange::CreateTextRangeFromPosition(
- pWrtShell->GetDoc(), *pCrsr->Start(), pCrsr->End());
+ m_pSpellState->m_xStartRange =
+ SwXTextRange::CreateXTextRange(
+ *pWrtShell->GetDoc(),
+ *pCrsr->Start(), pCrsr->End());
}
pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, FALSE );
}
@@ -390,7 +392,8 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
if(RET_YES == nRet)
{
SwUnoInternalPaM aPam(*pWrtShell->GetDoc());
- if(SwXTextRange::XTextRangeToSwPaM(aPam, m_pSpellState->m_xStartRange))
+ if (::sw::XTextRangeToSwPaM(aPam,
+ m_pSpellState->m_xStartRange))
{
pWrtShell->SetSelection(aPam);
pWrtShell->SpellStart(DOCPOS_START, DOCPOS_CURR, DOCPOS_START);
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 7d387a2f5943..6714219fb007 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -36,37 +36,24 @@
#include <uitool.hxx>
#include <svl/urihelper.hxx>
#include <svl/PasswordHelper.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
#include <sot/formats.hxx>
-#ifndef _PASSWD_HXX //autogen
#include <sfx2/passwd.hxx>
-#endif
#include <sfx2/docfilt.hxx>
#include <sfx2/request.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/linkmgr.hxx>
-#ifndef _SVX_SIZEITEM_HXX //autogen
-
#include <svx/sizeitem.hxx>
-#endif
#include <svx/htmlcfg.hxx>
#include <section.hxx>
#include <docary.hxx>
#include <regionsw.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <swundo.hxx> // fuer Undo-Ids
@@ -75,12 +62,8 @@
#include <swunodef.hxx>
#include <shellio.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _REGIONSW_HRC
#include <regionsw.hrc>
#endif
@@ -118,7 +101,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
if (!pSet || pSet->Count()==0)
{
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));
@@ -154,7 +137,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
{
SwFmtCol aCol;
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
USHORT nCol = ((SfxUInt16Item *)pItem)->GetValue();
@@ -232,7 +215,7 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSection*, pSect )
SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
0);
SwRect aRect;
- pThis->CalcBoundRect(aRect, FLY_IN_CNTNT);
+ pThis->CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
aSet.Put(SwFmtFrmSize(ATT_VAR_SIZE, nWidth));
// Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 5bef2edb398f..b1b98e136f6d 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -50,16 +50,12 @@
#include <sot/storage.hxx>
#include <svl/macitem.hxx>
#include <unotools/securityoptions.hxx>
-#ifndef __SBX_SBXVARIABLE_HXX //autogen
#include <basic/sbxvar.hxx>
-#endif
#include <svl/ctloptions.hxx>
#include <basic/sbx.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
-#ifndef _SFX_CLIENTSH_HXX
#include <sfx2/ipclient.hxx>
-#endif
#include <sfx2/viewfrm.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
@@ -69,9 +65,6 @@
#include <svx/langitem.hxx>
#include <svx/htmlmode.hxx>
#include <svx/svdview.hxx>
-//#ifndef _SVDVMARK_HXX //autogen
-//#include <svx/svdvmark.hxx>
-//#endif
#include <svx/svdhdl.hxx>
#include <svx/svdoutl.hxx>
#include <svx/editeng.hxx>
@@ -128,12 +121,8 @@
#include <breakit.hxx>
#include <checkit.hxx>
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _DOCVW_HRC
#include <docvw.hrc>
#endif
@@ -1019,7 +1008,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
default: ASSERT( TRUE, "ChangeFly: Unknown direction." );
}
BOOL bSet = FALSE;
- if( FLY_IN_CNTNT == eAnchorId && ( nDir % 2 ) )
+ if ((FLY_AS_CHAR == eAnchorId) && ( nDir % 2 ))
{
long aDiff = aTmp.Top() - aRefPoint.Y();
if( aDiff > 0 )
@@ -1064,7 +1053,8 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
aSet.Put( aVert );
bSet = TRUE;
}
- if( bWeb && FLY_AT_CNTNT == eAnchorId && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ) )
+ if (bWeb && (FLY_AT_PARA == eAnchorId)
+ && ( nDir==MOVE_LEFT_SMALL || nDir==MOVE_RIGHT_BIG ))
{
SwFmtHoriOrient aHori( (SwFmtHoriOrient&)aSet.Get(RES_HORI_ORIENT) );
sal_Int16 eNew;
@@ -1091,11 +1081,13 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
rSh.StartAllAction();
if( bSet )
rSh.SetFlyFrmAttr( aSet );
- BOOL bSetPos = FLY_IN_CNTNT != eAnchorId;
+ BOOL bSetPos = (FLY_AS_CHAR != eAnchorId);
if(bSetPos && bWeb)
{
- if(FLY_PAGE != eAnchorId)
+ if (FLY_AT_PAGE != eAnchorId)
+ {
bSetPos = FALSE;
+ }
else
{
bSetPos = (::GetHtmlMode(rView.GetDocShell()) & HTMLMODE_SOME_ABS_POS) ?
@@ -1185,7 +1177,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
BOOL bDummy;
const bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy );
const bool bHoriMove = !bVertAnchor == !( nDir % 2 );
- const bool bMoveAllowed = !bHoriMove || rSh.GetAnchorId() != FLY_IN_CNTNT;
+ const bool bMoveAllowed =
+ !bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR);
if ( bMoveAllowed )
{
// <--
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 5c32abede88a..450ebabb1a76 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -43,7 +43,7 @@
#include <labfmt.hxx>
#include <unotools.hxx>
#include <unoatxt.hxx>
-#include <unoobj.hxx>
+#include <unomid.h>
#include <unoprnms.hxx>
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 44eb80358ac6..e2fc242d4d7c 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -125,7 +125,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
FreeResource();
SwRect aRect;
- rWrtShell.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rWrtShell.CalcBoundRect(aRect, FLY_AS_CHAR);
nSelectionWidth = aRect.Width();
diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx
index 0443074c2cd5..96bc9b1c90f1 100644
--- a/sw/source/ui/frmdlg/frmmgr.cxx
+++ b/sw/source/ui/frmdlg/frmmgr.cxx
@@ -31,12 +31,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "cmdid.h"
#include "hintids.hxx"
-
#include <svl/stritem.hxx>
#include <svx/protitem.hxx>
#include <svx/boxitem.hxx>
@@ -212,11 +209,11 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
const Size &rSize,
BOOL bAbs )
{
- ASSERT( eAnchorType == FLY_PAGE ||
- eAnchorType == FLY_AT_CNTNT ||
- eAnchorType == FLY_AUTO_CNTNT ||
- eAnchorType == FLY_AT_FLY ||
- eAnchorType == FLY_IN_CNTNT, "Rahmentyp nicht erlaubt" );
+ ASSERT( eAnchorType == FLY_AT_PAGE ||
+ eAnchorType == FLY_AT_PARA ||
+ eAnchorType == FLY_AT_CHAR ||
+ eAnchorType == FLY_AT_FLY ||
+ eAnchorType == FLY_AS_CHAR, "invalid frame type" );
if ( bAbs )
SetAbsPos( rPos );
@@ -238,8 +235,8 @@ void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId )
pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum );
aSet.Put( SwFmtAnchor( eId, nPhyPageNum ) );
- if( FLY_PAGE == eId || FLY_AT_CNTNT == eId || FLY_AUTO_CNTNT == eId
- || FLY_AT_FLY == eId )
+ if ((FLY_AT_PAGE == eId) || (FLY_AT_PARA == eId) || (FLY_AT_CHAR == eId)
+ || (FLY_AT_FLY == eId))
{
SwFmtVertOrient aVertOrient( GetVertOrient() );
SwFmtHoriOrient aHoriOrient( GetHoriOrient() );
@@ -319,7 +316,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nWidth = rVal.nHeight;
rVal.nHeight = nTmp;
}
- if ( eAnchorType == FLY_PAGE || eAnchorType == FLY_AT_FLY )
+ if ((eAnchorType == FLY_AT_PAGE) || (eAnchorType == FLY_AT_FLY))
{
// MinimalPosition
rVal.nMinHPos = aBoundRect.Left();
@@ -369,8 +366,8 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
}
// OD 12.11.2003 #i22341# - handle to character anchored objects vertical
// aligned at character or top of line in a special case
- else if ( eAnchorType == FLY_AT_CNTNT ||
- ( eAnchorType == FLY_AUTO_CNTNT &&
+ else if ((eAnchorType == FLY_AT_PARA) ||
+ ((eAnchorType == FLY_AT_CHAR) &&
!(rVal.nVRelOrient == text::RelOrientation::CHAR) &&
!(rVal.nVRelOrient == text::RelOrientation::TEXT_LINE) ) )
{
@@ -437,7 +434,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
// vertical aligned at character or top of line.
// Note: (1) positive vertical values are positions above the top of line
// (2) negative vertical values are positions below the top of line
- else if ( eAnchorType == FLY_AUTO_CNTNT &&
+ else if ( (eAnchorType == FLY_AT_CHAR) &&
( rVal.nVRelOrient == text::RelOrientation::CHAR ||
rVal.nVRelOrient == text::RelOrientation::TEXT_LINE ) )
{
@@ -484,7 +481,7 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nMaxHeight = aBoundRect.Height();
}
}
- else if ( eAnchorType == FLY_IN_CNTNT )
+ else if ( eAnchorType == FLY_AS_CHAR )
{
rVal.nMinHPos = 0;
rVal.nMaxHPos = 0;
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index eeb58d83c7fd..5c1619948829 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -37,12 +37,8 @@
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
#include <hintids.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/mnemonic.hxx>
@@ -68,9 +64,7 @@
#include <wrtsh.hxx>
#include <swmodule.hxx>
#include <uitool.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <viewopt.hxx>
#include <frmatr.hxx>
#include <frmdlg.hxx>
@@ -881,10 +875,10 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
// Allgemeiner Initialisierungteil
switch(rAnchor.GetAnchorId())
{
- case FLY_PAGE: aAnchorAtPageRB.Check(); break;
- case FLY_AT_CNTNT: aAnchorAtParaRB.Check(); break;
- case FLY_AUTO_CNTNT: aAnchorAtCharRB.Check(); break;
- case FLY_IN_CNTNT: aAnchorAsCharRB.Check(); break;
+ case FLY_AT_PAGE: aAnchorAtPageRB.Check(); break;
+ case FLY_AT_PARA: aAnchorAtParaRB.Check(); break;
+ case FLY_AT_CHAR: aAnchorAtCharRB.Check(); break;
+ case FLY_AS_CHAR: aAnchorAsCharRB.Check(); break;
case FLY_AT_FLY: aAnchorAtFrameRB.Check();break;
default:; //prevent warning
}
@@ -911,7 +905,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
}
if( 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))
{
- if(GetAnchor() == FLY_PAGE)
+ if (GetAnchor() == FLY_AT_PAGE)
{
aAnchorAtParaRB.Check();
}
@@ -1048,8 +1042,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
// Vertikale Position
// fuer zeichengebundene Rahmen Offset umrechenen
SwTwips nY = static_cast< SwTwips >(aAtVertPosED.Denormalize(aAtVertPosED.GetValue(FUNIT_TWIP)));
- if (eAnchorId == FLY_IN_CNTNT)
+ if (eAnchorId == FLY_AS_CHAR)
+ {
nY *= -1;
+ }
aVertOrient.SetPos( nY );
}
pOldItem = GetOldItem(rSet, FN_VERT_ORIENT);
@@ -1188,7 +1184,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
}
BOOL bEnable = TRUE;
- if ( eId == FLY_PAGE )
+ if ( eId == FLY_AT_PAGE )
{
pVMap = bHtmlMode ? aVPageHtmlMap : aVPageMap;
pHMap = bHtmlMode ? aHPageHtmlMap : aHPageMap;
@@ -1200,7 +1196,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
pVMap = bHtmlMode ? aVFlyHtmlMap : aVFrameMap;
pHMap = bHtmlMode ? aHFlyHtmlMap : aHFrameMap;
}
- else if ( eId == FLY_AT_CNTNT )
+ else if ( eId == FLY_AT_PARA )
{
if(bHtmlMode)
{
@@ -1213,7 +1209,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
pHMap = aHParaMap;
}
}
- else if ( eId == FLY_AUTO_CNTNT )
+ else if ( eId == FLY_AT_CHAR )
{
if(bHtmlMode)
{
@@ -1226,7 +1222,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
pHMap = aHCharMap;
}
}
- else if ( eId == FLY_IN_CNTNT )
+ else if ( eId == FLY_AS_CHAR )
{
pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap;
pHMap = 0;
@@ -1257,7 +1253,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
FillRelLB(pVMap, nMapPos, nV, nVRel, aVertRelationLB, aVertRelationFT);
// Edits init
- bEnable = nH == text::HoriOrientation::NONE && eId != FLY_IN_CNTNT;//#61359# warum nicht in Formaten&& !bFormat;
+ bEnable = nH == text::HoriOrientation::NONE && eId != FLY_AS_CHAR;
if (!bEnable)
{
aAtHorzPosED.SetValue( 0, FUNIT_TWIP );
@@ -1281,7 +1277,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
}
else
{
- if ( eId == FLY_IN_CNTNT )
+ if ( eId == FLY_AS_CHAR )
{
if ( nY == LONG_MAX )
nY = 0;
@@ -1608,15 +1604,23 @@ USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
RndStdIds SwFrmPage::GetAnchor()
{
- RndStdIds nRet = FLY_PAGE;
+ RndStdIds nRet = FLY_AT_PAGE;
if(aAnchorAtParaRB.IsChecked())
- nRet = FLY_AT_CNTNT;
+ {
+ nRet = FLY_AT_PARA;
+ }
else if(aAnchorAtCharRB.IsChecked())
- nRet = FLY_AUTO_CNTNT;
+ {
+ nRet = FLY_AT_CHAR;
+ }
else if(aAnchorAsCharRB.IsChecked())
- nRet = FLY_IN_CNTNT;
+ {
+ nRet = FLY_AS_CHAR;
+ }
else if(aAnchorAtFrameRB.IsChecked())
+ {
nRet = FLY_AT_FLY;
+ }
return nRet;
}
@@ -1818,8 +1822,10 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
if ( aVal.nHPos != nAtHorzPosVal )
aAtHorzPosED.SetValue(aAtHorzPosED.Normalize(aVal.nHPos), FUNIT_TWIP);
- SwTwips nUpperOffset = aVal.nAnchorType == FLY_IN_CNTNT ? nUpperBorder : 0;
- SwTwips nLowerOffset = aVal.nAnchorType == FLY_IN_CNTNT ? nLowerBorder : 0;
+ const SwTwips nUpperOffset = (aVal.nAnchorType == FLY_AS_CHAR)
+ ? nUpperBorder : 0;
+ const SwTwips nLowerOffset = (aVal.nAnchorType == FLY_AS_CHAR)
+ ? nLowerBorder : 0;
aAtVertPosED.SetMin(aAtVertPosED.Normalize(aVal.nMinVPos + nLowerOffset + nUpperOffset), FUNIT_TWIP);
aAtVertPosED.SetMax(aAtVertPosED.Normalize(aVal.nMaxVPos), FUNIT_TWIP);
@@ -1905,7 +1911,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
// Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten
if(bHtmlMode && nHtmlMode&HTMLMODE_SOME_ABS_POS &&
- FLY_AUTO_CNTNT == (RndStdIds)GetAnchor())
+ (FLY_AT_CHAR == GetAnchor()))
{
BOOL bSet = FALSE;
if(bHori)
@@ -1977,7 +1983,7 @@ IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB )
else
bAtVertPosModified = TRUE;
- if(bHtmlMode && FLY_AUTO_CNTNT == (RndStdIds)GetAnchor()) // wieder Sonderbehandlung
+ if (bHtmlMode && (FLY_AT_CHAR == GetAnchor()))
{
if(bHori)
{
@@ -2219,7 +2225,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
nOldV = rVert.GetVertOrient(),
nOldVRel = rVert.GetRelationOrient();
- if (eAnchorId == FLY_PAGE)
+ if (eAnchorId == FLY_AT_PAGE)
{
if (nOldHRel == text::RelOrientation::FRAME)
nOldHRel = text::RelOrientation::PAGE_FRAME;
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 3dfad685f732..23862a189c1e 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -36,7 +36,6 @@
#endif
-
#include "hintids.hxx"
#include <vcl/graph.hxx>
#include <svx/htmlmode.hxx>
@@ -141,7 +140,7 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
aWrapIL (SW_RES(IL_WRAP)),
aWrapILH (SW_RES(ILH_WRAP)),
- nAnchorId(FLY_AT_CNTNT),
+ nAnchorId(FLY_AT_PARA),
nHtmlMode(0),
pWrtSh(0),
@@ -254,10 +253,15 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
nAnchorId = rAnch.GetAnchorId();
- if ( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) && nSur != SURROUND_NONE )
+ if (((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR))
+ && (nSur != SURROUND_NONE))
+ {
aWrapAnchorOnlyCB.Check( rSurround.IsAnchorOnly() );
+ }
else
+ {
aWrapAnchorOnlyCB.Enable( FALSE );
+ }
BOOL bContour = rSurround.IsContour();
aWrapOutlineCB.Check( bContour );
@@ -452,7 +456,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
// Anchor
const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
nAnchorId = rAnch.GetAnchorId();
- BOOL bEnable = nAnchorId != FLY_IN_CNTNT;
+ BOOL bEnable = (nAnchorId != FLY_AS_CHAR);
if (!bDrawMode)
{
@@ -521,7 +525,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
}
else
{
- if (aVal.nAnchorType == FLY_IN_CNTNT)
+ if (aVal.nAnchorType == FLY_AS_CHAR)
{
nLeft = nRight;
@@ -566,7 +570,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
sal_Int16 eHOrient = rHori.GetHoriOrient();
sal_Int16 eHRelOrient = rHori.GetRelationOrient();
aWrapOutlineCB.Hide();
- BOOL bAllHtmlModes = (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) &&
+ const bool bAllHtmlModes =
+ ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) &&
(eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT);
aWrapAnchorOnlyCB.Enable( bAllHtmlModes && nSur != SURROUND_NONE );
aWrapOutsideCB.Hide();
@@ -574,17 +579,26 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aWrapTransparentCB.Enable( FALSE );
- aNoWrapRB.Enable( FLY_AT_CNTNT == nAnchorId );
+ aNoWrapRB.Enable( FLY_AT_PARA == nAnchorId );
aWrapParallelRB.Enable( FALSE );
- aWrapLeftRB .Enable( FLY_AT_CNTNT == nAnchorId ||
- (FLY_AUTO_CNTNT == nAnchorId && eHOrient == text::HoriOrientation::RIGHT && eHRelOrient == text::RelOrientation::PRINT_AREA));
- aWrapRightRB .Enable( FLY_AT_CNTNT == nAnchorId ||
- ( FLY_AUTO_CNTNT == nAnchorId && eHOrient == text::HoriOrientation::LEFT && eHRelOrient == text::RelOrientation::PRINT_AREA));
-
- aWrapThroughRB.Enable( (FLY_PAGE == nAnchorId ||
- (FLY_AUTO_CNTNT == nAnchorId && eHRelOrient != text::RelOrientation::PRINT_AREA) || FLY_AT_CNTNT == nAnchorId )
- && bSomeAbsPos &&
- eHOrient != text::HoriOrientation::RIGHT);
+ aWrapLeftRB .Enable
+ ( (FLY_AT_PARA == nAnchorId)
+ || ( (FLY_AT_CHAR == nAnchorId)
+ && (eHOrient == text::HoriOrientation::RIGHT)
+ && (eHRelOrient == text::RelOrientation::PRINT_AREA)));
+ aWrapRightRB .Enable
+ ( (FLY_AT_PARA == nAnchorId)
+ || ( (FLY_AT_CHAR == nAnchorId)
+ && (eHOrient == text::HoriOrientation::LEFT)
+ && (eHRelOrient == text::RelOrientation::PRINT_AREA)));
+
+ aWrapThroughRB.Enable
+ ( ( (FLY_AT_PAGE == nAnchorId)
+ || ( (FLY_AT_CHAR == nAnchorId)
+ && (eHRelOrient != text::RelOrientation::PRINT_AREA))
+ || (FLY_AT_PARA == nAnchorId))
+ && bSomeAbsPos
+ && (eHOrient != text::HoriOrientation::RIGHT));
if(aNoWrapRB.IsChecked() && !aNoWrapRB.IsEnabled())
{
if(aWrapThroughRB.IsEnabled())
@@ -624,7 +638,8 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aIdealWrapRB.Enable( bEnable );
aWrapThroughRB.Enable( bEnable );
aWrapParallelRB.Enable( bEnable );
- aWrapAnchorOnlyCB.Enable( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT)
+ aWrapAnchorOnlyCB.Enable(
+ ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR))
&& nSur != SURROUND_NONE );
}
ContourHdl(0);
@@ -693,10 +708,11 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
{
BOOL bWrapThrough = (pBtn == &aWrapThroughRB);
aWrapTransparentCB.Enable( bWrapThrough && !bHtmlMode );
- bWrapThrough |= ( nAnchorId == FLY_IN_CNTNT );
+ bWrapThrough |= ( nAnchorId == FLY_AS_CHAR );
aWrapOutlineCB.Enable( !bWrapThrough && pBtn != &aNoWrapRB);
aWrapOutsideCB.Enable( !bWrapThrough && aWrapOutlineCB.IsChecked() );
- aWrapAnchorOnlyCB.Enable( (nAnchorId == FLY_AT_CNTNT || nAnchorId == FLY_AUTO_CNTNT) &&
+ aWrapAnchorOnlyCB.Enable(
+ ((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) &&
(pBtn != &aNoWrapRB) );
ContourHdl(0);
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 17afbfb31578..ab8523eb4349 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -30,25 +30,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#ifdef SW_DLLIMPLEMENTATION
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGS
#include <hintids.hxx>
-#ifndef _MENU_HXX //autogen
#include <vcl/menu.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _HELP_HXX //autogen
#include <vcl/help.hxx>
-#endif
#ifndef _SVSTDARR_HXX
#include <svl/svstdarr.hxx>
#endif
@@ -64,7 +57,6 @@
#include <sfx2/viewfrm.hxx>
#include <unocrsr.hxx>
#include <unotools.hxx>
-#include <unoobj.hxx>
#include <comphelper/processfactory.hxx>
#include <ucbhelper/content.hxx>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
@@ -75,12 +67,8 @@
#include <swwait.hxx>
#include <swtypes.hxx>
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#include <glossary.hxx>
#include <gloshdl.hxx>
#include <glosbib.hxx>
@@ -88,20 +76,12 @@
#include <glosdoc.hxx>
#include <macassgn.hxx>
#include <swevent.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <shellio.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _SWERROR_H
#include <swerror.h>
-#endif
#ifndef _GLOBALS_HRC
#include <globals.hrc>
#endif
diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx
index e5540dab1c11..51cdc5a72a1f 100644
--- a/sw/source/ui/ribbar/conrect.cxx
+++ b/sw/source/ui/ribbar/conrect.cxx
@@ -43,21 +43,14 @@
#include <svx/svdview.hxx>
#include <svx/svdocapt.hxx>
#include <svx/outlobj.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <edtwin.hxx>
#include <wrtsh.hxx>
#include <viewopt.hxx>
-#ifndef _DRAWBASE_HXX
#include <drawbase.hxx>
-#endif
-#ifndef _CONRECT_HXX
#include <conrect.hxx>
-#endif
+
/*************************************************************************
|*
@@ -119,7 +112,7 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
case OBJ_TEXT:
if( bMarquee )
{
- m_pSh->ChgAnchor(FLY_IN_CNTNT);
+ m_pSh->ChgAnchor(FLY_AS_CHAR);
if( pObj )
{
diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx
index 764090080aeb..9615f74c81e8 100644
--- a/sw/source/ui/ribbar/drawbase.cxx
+++ b/sw/source/ui/ribbar/drawbase.cxx
@@ -344,7 +344,8 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
if ( xRecorder.is() )
{
SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME);
- aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME, (USHORT)FLY_AT_CNTNT ));
+ aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME,
+ static_cast<USHORT>(FLY_AT_PARA) ));
aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff()));
aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize()));
aReq.Done();
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 );
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index 6c9916e27e0e..0cf308dd4fe4 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -33,9 +33,7 @@
#include <sfx2/viewfrm.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/dispatch.hxx>
#include <sfx2/basedlgs.hxx>
#include <IDocumentUndoRedo.hxx>
@@ -45,24 +43,19 @@
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <docsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <chartins.hxx>
#include <tablemgr.hxx>
#include <frmfmt.hxx>
#include <swtable.hxx>
#include <tblsel.hxx>
-#include <unoobj.hxx>
#include <unochart.hxx>
#include <autoedit.hxx>
#include <doc.hxx>
#include <edtwin.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _CHARTINS_HRC
#include <chartins.hrc>
#endif
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 33acb232821a..45871b718026 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -34,12 +34,6 @@
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
-// #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
-// #include <com/sun/star/lang/Locale.hpp>
-// #endif
-// #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
-// #include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-// #endif
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
@@ -49,9 +43,6 @@
#include <svl/svstdarr.hxx>
#include <svl/aeitem.hxx>
-// #ifndef _FILTER_HXX
-// #include <svtools/filter.hxx>
-// #endif
#include <SwStyleNameMapper.hxx>
#include <docary.hxx>
#include <hintids.hxx>
@@ -69,12 +60,8 @@
#include <svx/viewlayoutitem.hxx>
#include <svx/zoomslideritem.hxx>
#include <svx/htmlmode.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
@@ -94,9 +81,7 @@
#include <svl/whiter.hxx>
#include <svl/ptitem.hxx>
#include <svx/linkmgr.hxx>
-#ifndef __RSC //autogen
#include <tools/errinf.hxx>
-#endif
#include <tools/urlobj.hxx>
#include <svx/svdview.hxx>
#include <swtypes.hxx>
@@ -148,10 +133,6 @@
#include <PostItMgr.hxx>
#include <postit.hxx>
-// #ifndef _FRMMGR_HXX
-// #include <frmmgr.hxx>
-// #endif
-
#include <ndtxt.hxx> //#outline level,added by zhaojianwei
#include <comphelper/processfactory.hxx>
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 316156d0112d..b7528a025b2d 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -347,7 +347,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(aSize.GetWidthPercent())
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtWidth = aRect.Width();
aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
}
@@ -472,7 +472,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(aSize.GetHeightPercent())
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtHeight = aRect.Height();
aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight));
}
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index c850f77b6011..d018adc15cb8 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -30,16 +30,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <vos/mutex.hxx>
#include <sfx2/sfxbasecontroller.hxx>
#include <SwXDocumentSettings.hxx>
#include <SwXPrintPreviewSettings.hxx>
-#ifndef _COMPHELPER_MASTERPROPERTSETINFO_HXX_
#include <comphelper/MasterPropertySetInfo.hxx>
-#endif
-#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
#include <doc.hxx>
@@ -50,7 +47,6 @@
#include <editsh.hxx>
#include <drawdoc.hxx>
#include <svl/zforlist.hxx>
-#include <unoobj.hxx>
#include <unotxdoc.hxx>
#include <cmdid.h>
#include <svx/zoomitem.hxx>
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index b877b9aac7f5..53ab432e25e4 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -34,10 +34,7 @@
#define _SVSTDARR_STRINGS
-
-#ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#endif
#include <vos/mutex.hxx>
#include <tools/debug.hxx>
#include <vcl/svapp.hxx>
@@ -52,7 +49,10 @@
#include <gloslst.hxx>
#include <unoatxt.hxx>
#include <unomap.hxx>
-#include <unoobj.hxx>
+#include <unomid.h>
+#include <unotextbodyhf.hxx>
+#include <unotextrange.hxx>
+#include <TextCursorHelper.hxx>
#include <swevent.hxx>
#include <doc.hxx>
#include <unocrsr.hxx>
@@ -68,6 +68,7 @@
#include <memory>
+
SV_IMPL_REF ( SwDocShell )
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -410,25 +411,25 @@ sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextR
SwCntntNode * pNd = aIdx.GetNode().GetCntntNode();
SwPosition aPos( aIdx, SwIndex( pNd, pNd->Len() ));
- sal_Bool bRet = sal_False;
+ bool bRet = false;
pInsDoc->LockExpFlds();
{
+ SwDoc *const pDoc((pxCursor) ? pxCursor->GetDoc() : pxRange->GetDoc());
+ SwPaM aPam(pDoc->GetNodes());
+ SwPaM * pPam(0);
if(pxCursor)
{
- SwPaM* pUnoCrsr = pxCursor->GetPaM();
- bRet = pxCursor->GetDoc()->CopyRange( *pUnoCrsr, aPos, false )
- || bRet;
+ pPam = pxCursor->GetPaM();
}
else
{
- const ::sw::mark::IMark* const pBkmk = pxRange->GetBookmark();
- if(pBkmk && pBkmk->IsExpanded())
+ if (pxRange->GetPositions(aPam))
{
- SwPaM aTmp(pBkmk->GetOtherMarkPos(), pBkmk->GetMarkPos());
- bRet = pxRange->GetDoc()->CopyRange(aTmp, aPos, false)
- || bRet;
+ pPam = & aPam;
}
}
+ if (!pPam) { return false; }
+ bRet = pDoc->CopyRange( *pPam, aPos, false ) || bRet;
}
pInsDoc->UnlockExpFlds();
@@ -1112,7 +1113,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
}
SwDoc* pDoc = 0;
- if ( pRange && pRange->GetBookmark())
+ if (pRange)
pDoc = pRange->GetDoc();
else if ( pCursor )
pDoc = pCursor->GetDoc();
@@ -1130,29 +1131,23 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
if(!pDoc)
throw uno::RuntimeException();
- SwPaM* pInsertPaM = 0;
- if(pRange)
+
+ SwPaM InsertPaM(pDoc->GetNodes());
+ if (pRange)
{
- const ::sw::mark::IMark* const pBkmk = pRange->GetBookmark();
- if(pBkmk->IsExpanded())
- pInsertPaM = new SwPaM(pBkmk->GetOtherMarkPos(), pBkmk->GetMarkPos());
- else
- pInsertPaM = new SwPaM(pBkmk->GetMarkPos());
+ if (!pRange->GetPositions(InsertPaM))
+ {
+ throw uno::RuntimeException();
+ }
}
else
{
- SwPaM* pCrsr = pCursor->GetPaM();
- if(pCrsr->HasMark())
- pInsertPaM = new SwPaM(*pCrsr->GetPoint(), *pCrsr->GetMark());
- else
- pInsertPaM = new SwPaM(*pCrsr->GetPoint());
+ InsertPaM = *pCursor->GetPaM();
}
- SwTextBlocks* pBlock = pGlossaries->GetGroupDoc(sGroupName);
- sal_Bool bResult = pBlock && !pBlock->GetError() &&
- pDoc->InsertGlossary( *pBlock, sEntryName, *pInsertPaM);
- delete pBlock;
- delete pInsertPaM;
+ ::std::auto_ptr<SwTextBlocks> pBlock(pGlossaries->GetGroupDoc(sGroupName));
+ const bool bResult = pBlock.get() && !pBlock->GetError()
+ && pDoc->InsertGlossary( *pBlock, sEntryName, InsertPaM);
if(!bResult)
throw uno::RuntimeException();
diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx
index 81849559cfc2..d1d06ec87960 100644
--- a/sw/source/ui/uno/unodispatch.cxx
+++ b/sw/source/ui/uno/unodispatch.cxx
@@ -31,17 +31,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <vcl/svapp.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
+#include <svx/dataaccessdescriptor.hxx>
+
#include <unodispatch.hxx>
-#include <unoobj.hxx>
+#include <unobaseclass.hxx>
#include <view.hxx>
#include <cmdid.h>
#include "wrtsh.hxx"
#include "dbmgr.hxx"
-#include <svx/dataaccessdescriptor.hxx>
+
using namespace ::com::sun::star;
using namespace rtl;
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index 906402b8e365..65c6670a78d0 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -35,7 +35,7 @@
#include <swtypes.hxx>
#include <tools/debug.hxx>
#include <unomod.hxx>
-#include <unoobj.hxx>
+#include <unomid.h>
#include <unoprnms.hxx>
#include <unomap.hxx>
#include <prtopt.hxx>
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 4b519bc747fd..a014e08e9564 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -53,7 +53,10 @@
#include <svl/stritem.hxx>
#include <unotxdoc.hxx>
#include <svl/numuno.hxx>
-#include <unoobj.hxx>
+#include <fldbas.hxx>
+#include <unotextbodyhf.hxx>
+#include <unotextrange.hxx>
+#include <unotextcursor.hxx>
#include <unosett.hxx>
#include <unocoll.hxx>
#include <unoredlines.hxx>
@@ -764,19 +767,12 @@ Reference< util::XReplaceDescriptor > SwXTextDocument::createReplaceDescriptor(
SwUnoCrsr* SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & xCrsr)
{
getText();
- XText* pText = xBodyText.get();
+ XText *const pText = xBodyText.get();
SwXBodyText* pBText = (SwXBodyText*)pText;
- xCrsr = pBText->CreateTextCursor(sal_True);
+ SwXTextCursor *const pXTextCursor = pBText->CreateTextCursor(true);
+ xCrsr.set( static_cast<text::XWordCursor*>(pXTextCursor) );
- Reference<XUnoTunnel> xRangeTunnel( xCrsr, UNO_QUERY);
- SwXTextCursor* pxUnoCrsr = 0;
- if(xRangeTunnel.is())
- {
- pxUnoCrsr = reinterpret_cast<SwXTextCursor*>(xRangeTunnel->getSomething(
- SwXTextCursor::getUnoTunnelId()));
- }
-
- SwUnoCrsr* pUnoCrsr = pxUnoCrsr->GetCrsr();
+ SwUnoCrsr *const pUnoCrsr = pXTextCursor->GetCursor();
pUnoCrsr->SetRemainInSection(sal_False);
return pUnoCrsr;
}
@@ -1007,10 +1003,7 @@ Reference< XIndexAccess >
if(!pResultCrsr)
throw RuntimeException();
Reference< XIndexAccess > xRet;
- if(nResult)
- xRet = new SwXTextRanges(pResultCrsr);
- else
- xRet = new SwXTextRanges();
+ xRet = new SwXTextRanges( (nResult) ? pResultCrsr : 0 );
delete pResultCrsr;
return xRet;
}
@@ -1030,11 +1023,10 @@ Reference< XInterface > SwXTextDocument::findFirst(const Reference< util::XSear
Reference< XInterface > xRet;
if(nResult)
{
- Reference< XTextRange > xTempRange = SwXTextRange::CreateTextRangeFromPosition(
- pDocShell->GetDoc(),
- *pResultCrsr->GetPoint(),
- pResultCrsr->GetMark());
- xRet = *new SwXTextCursor(xTempRange->getText(), pResultCrsr);
+ const uno::Reference< text::XText > xParent =
+ ::sw::CreateParentXText(*pDocShell->GetDoc(),
+ *pResultCrsr->GetPoint());
+ xRet = *new SwXTextCursor(xParent, *pResultCrsr);
delete pResultCrsr;
}
return xRet;
@@ -1058,12 +1050,11 @@ Reference< XInterface > SwXTextDocument::findNext(const Reference< XInterface >
Reference< XInterface > xRet;
if(nResult)
{
- Reference< XTextRange > xTempRange = SwXTextRange::CreateTextRangeFromPosition(
- pDocShell->GetDoc(),
- *pResultCrsr->GetPoint(),
- pResultCrsr->GetMark());
+ const uno::Reference< text::XText > xParent =
+ ::sw::CreateParentXText(*pDocShell->GetDoc(),
+ *pResultCrsr->GetPoint());
- xRet = *new SwXTextCursor(xTempRange->getText(), pResultCrsr);
+ xRet = *new SwXTextCursor(xParent, *pResultCrsr);
delete pResultCrsr;
}
return xRet;
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 26feb0bf3117..73c89873819b 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -77,6 +77,10 @@
#include <SwStyleNameMapper.hxx>
#include <crsskip.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <unobookmark.hxx>
+#include <unoparagraph.hxx>
+#include <unocrsrhelper.hxx>
+#include <unotextrange.hxx>
#include <svx/editview.hxx>
#include <sfx2/docfile.hxx>
@@ -104,24 +108,8 @@ SV_IMPL_PTRARR( SelectionChangeListenerArr, XSelectionChangeListenerPtr );
* --------------------------------------------------*/
SwPaM* lcl_createPamCopy(const SwPaM& rPam)
{
- SwPaM* pRet = new SwPaM(*rPam.GetPoint());
- if(rPam.HasMark())
- {
- pRet->SetMark();
- *pRet->GetMark() = *rPam.GetMark();
- }
- if(rPam.GetNext() != (const Ring*)&rPam)
- {
- SwPaM *_pStartCrsr = (SwPaM *)rPam.GetNext();
- do
- {
- //neuen PaM erzeugen
- SwPaM* pPaM = new SwPaM(*_pStartCrsr);
- //und in den Ring einfuegen
- pPaM->MoveTo(pRet);
-
- } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != rPam.GetNext() );
- }
+ SwPaM *const pRet = new SwPaM(*rPam.GetPoint());
+ ::sw::DeepCopyPaM(rPam, *pRet);
return pRet;
}
/******************************************************************
@@ -329,8 +317,9 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
: 0;
if(pCursor && pCursor->GetDoc() == GetView()->GetDocShell()->GetDoc())
- pPam = lcl_createPamCopy(*((SwXTextCursor*)pCursor)->GetPaM());
-
+ {
+ pPam = lcl_createPamCopy(*pCursor->GetPaM());
+ }
}
else if(xPosN.is() &&
xIfcTunnel.is() &&
@@ -346,7 +335,7 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
else if(!pFrame && !pCell && xPos.is())
{
SwUnoInternalPaM aPam(*pDoc);
- if(SwXTextRange::XTextRangeToSwPaM(aPam, xPos))
+ if (::sw::XTextRangeToSwPaM(aPam, xPos))
{
pPam = lcl_createPamCopy(aPam);
}
@@ -429,19 +418,14 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
if(xBkm.is() && xIfcTunnel.is())
{
- SwXBookmark* pBkm = reinterpret_cast<SwXBookmark*>(
- xIfcTunnel->getSomething(SwXBookmark::getUnoTunnelId()));
- if(pBkm && pBkm->GetDoc() == pDoc)
+ ::sw::mark::IMark const*const pMark(
+ SwXBookmark::GetBookmarkInDoc(pDoc, xIfcTunnel) );
+ if (pMark)
{
- IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
- IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->findMark(pBkm->getName());
- if( ppMark != pMarkAccess->getMarksEnd() )
- {
- rSh.EnterStdMode();
- rSh.GotoMark( ppMark->get() );
- }
- return sal_True;
+ rSh.EnterStdMode();
+ rSh.GotoMark(pMark);
}
+ return sal_True;
}
// IndexMark, Index, TextField, Draw, Section, Footnote, Paragraph
//
@@ -1379,8 +1363,10 @@ void SwXTextViewCursor::gotoRange(
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "no text selection" ) ), static_cast < cppu::OWeakObject * > ( this ) );
SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc());
- if(!SwXTextRange::XTextRangeToSwPaM( rDestPam, xRange))
- throw IllegalArgumentException();
+ if (!::sw::XTextRangeToSwPaM(rDestPam, xRange))
+ {
+ throw uno::RuntimeException();
+ }
ShellModes eSelMode = m_pView->GetShellMode();
SwWrtShell& rSh = m_pView->GetWrtShell();
@@ -1435,10 +1421,13 @@ void SwXTextViewCursor::gotoRange(
{
pSrcNode = pCursor->GetPaM()->GetNode();
}
- else if(pRange && pRange->GetBookmark())
+ else if (pRange)
{
- const ::sw::mark::IMark* const pBkmk = pRange->GetBookmark();
- pSrcNode = &(pBkmk->GetMarkPos().nNode.GetNode());
+ SwPaM aPam(pRange->GetDoc()->GetNodes());
+ if (pRange->GetPositions(aPam))
+ {
+ pSrcNode = aPam.GetNode();
+ }
}
else if (pPara && pPara->GetTxtNode())
{
@@ -1713,9 +1702,7 @@ uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::Runt
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- uno::Reference< text::XTextRange > xRg = SwXTextRange::CreateTextRangeFromPosition(pDoc,
- *pShellCrsr->Start(), 0);
- xRet = xRg->getText();
+ xRet = ::sw::CreateParentXText(*pDoc, *pShellCrsr->Start());
}
else
throw uno::RuntimeException();
@@ -1736,8 +1723,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateTextRangeFromPosition(pDoc,
- *pShellCrsr->Start(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), 0);
}
else
throw uno::RuntimeException();
@@ -1758,8 +1744,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno::
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateTextRangeFromPosition(pDoc,
- *pShellCrsr->End(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), 0);
}
else
throw uno::RuntimeException();
@@ -1791,7 +1776,7 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- SwXTextCursor::getTextFromPam(*pShellCrsr, uRet);
+ SwUnoCursorHelper::GetTextFromPam(*pShellCrsr, uRet);
}
default:;//prevent warning
}
@@ -1823,7 +1808,7 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwCursor* pShellCrsr = rSh.GetSwCrsr();
- SwXTextCursor::SetString( *pShellCrsr, aString );
+ SwUnoCursorHelper::SetString(*pShellCrsr, aString);
}
default:;//prevent warning
}
@@ -1852,7 +1837,10 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const
SwPaM* pShellCrsr = rSh.GetCrsr();
SwNode *pNode = pShellCrsr->GetNode();
if (pNode && pNode->IsTxtNode())
- SwXTextCursor::SetPropertyValue(*pShellCrsr, *m_pPropSet, rPropertyName, aValue );
+ {
+ SwUnoCursorHelper::SetPropertyValue(
+ *pShellCrsr, *m_pPropSet, rPropertyName, aValue );
+ }
else
throw RuntimeException();
}
@@ -1871,7 +1859,8 @@ Any SwXTextViewCursor::getPropertyValue( const OUString& rPropertyName )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- aRet = SwXTextCursor::GetPropertyValue( *pShellCrsr, *m_pPropSet, rPropertyName);
+ aRet = SwUnoCursorHelper::GetPropertyValue(
+ *pShellCrsr, *m_pPropSet, rPropertyName);
}
else
throw RuntimeException();
@@ -1920,7 +1909,8 @@ PropertyState SwXTextViewCursor::getPropertyState( const OUString& rPropertyNam
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- eState = SwXTextCursor::GetPropertyState( *pShellCrsr, *m_pPropSet, rPropertyName);
+ eState = SwUnoCursorHelper::GetPropertyState(
+ *pShellCrsr, *m_pPropSet, rPropertyName);
}
else
throw RuntimeException();
@@ -1938,7 +1928,8 @@ Sequence< PropertyState > SwXTextViewCursor::getPropertyStates(
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- aRet = SwXTextCursor::GetPropertyStates(*pShellCrsr, *m_pPropSet, rPropertyNames);
+ aRet = SwUnoCursorHelper::GetPropertyStates(
+ *pShellCrsr, *m_pPropSet, rPropertyNames);
}
return aRet;
}
@@ -1953,7 +1944,8 @@ void SwXTextViewCursor::setPropertyToDefault( const OUString& rPropertyName )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- SwXTextCursor::SetPropertyToDefault( *pShellCrsr, *m_pPropSet, rPropertyName);
+ SwUnoCursorHelper::SetPropertyToDefault(
+ *pShellCrsr, *m_pPropSet, rPropertyName);
}
}
/*-- 29.06.00 17:33:43---------------------------------------------------
@@ -1968,7 +1960,8 @@ Any SwXTextViewCursor::getPropertyDefault( const OUString& rPropertyName )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- aRet = SwXTextCursor::GetPropertyDefault( *pShellCrsr, *m_pPropSet, rPropertyName);
+ aRet = SwUnoCursorHelper::GetPropertyDefault(
+ *pShellCrsr, *m_pPropSet, rPropertyName);
}
return aRet;
}
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 076f7aa7bdb8..d0a0ae2a601d 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -53,9 +53,7 @@
#include <fmturl.hxx>
#include <fmthdft.hxx>
#include <fmtcnct.hxx>
-#ifndef _FMTLINE_HXX
#include <fmtline.hxx>
-#endif
#include <tgrditem.hxx>
#include <hfspacingitem.hxx>
#include <fmtruby.hxx>
@@ -687,13 +685,13 @@ SfxItemPresentation SwFmtAnchor::GetPresentation
USHORT nId = 0;
switch ( GetAnchorId() )
{
- case FLY_AT_CNTNT: //Absatzgebundener Rahmen
+ case FLY_AT_PARA:
nId = STR_FLY_AT_CNTNT;
break;
- case FLY_IN_CNTNT: //Zeichengebundener Rahmen
+ case FLY_AS_CHAR:
nId = STR_FLY_IN_CNTNT;
break;
- case FLY_PAGE: //Seitengebundener Rahmen
+ case FLY_AT_PAGE:
nId = STR_FLY_PAGE;
break;
default:;//prevent warning
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 283da9eaa129..6c07cef2b6c0 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -63,7 +63,6 @@
#include <view.hxx>
#include <wrtsh.hxx>
#include <swmodule.hxx>
-#include <unoobj.hxx>
#include <unocrsr.hxx>
#include "swrenamexnameddlg.hxx"
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index a7d06416b443..c5d8e4b24409 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -59,12 +59,13 @@
#include <view.hxx>
#include <wrtsh.hxx>
#include <swmodule.hxx>
-#include <unoobj.hxx>
+#include <TextCursorHelper.hxx>
#include <unocrsr.hxx>
#include <doc.hxx>
#include <unomid.h>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index c1dd4e2b332c..d848078c266a 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -39,15 +39,9 @@
#include <svl/macitem.hxx>
#include <unotools/charclass.hxx>
#include <svx/scripttypeitem.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
#include <wrtsh.hxx>
#include <frmatr.hxx>
#include <initui.hxx>