summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/basflt/shellio.cxx19
-rw-r--r--sw/source/filter/html/css1atr.cxx10
-rw-r--r--sw/source/filter/html/htmlcss1.cxx13
-rw-r--r--sw/source/filter/html/htmldraw.cxx14
-rw-r--r--sw/source/filter/html/htmlfly.cxx20
-rw-r--r--sw/source/filter/html/htmlform.cxx9
-rw-r--r--sw/source/filter/html/htmlforw.cxx11
-rw-r--r--sw/source/filter/html/htmlgrin.cxx30
-rw-r--r--sw/source/filter/html/htmlplug.cxx8
-rw-r--r--sw/source/filter/html/swhtml.cxx36
-rw-r--r--sw/source/filter/inc/fltshell.hxx4
-rw-r--r--sw/source/filter/rtf/rtfatr.cxx20
-rw-r--r--sw/source/filter/rtf/rtffly.cxx17
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx28
-rw-r--r--sw/source/filter/rtf/wrtrtf.cxx7
-rw-r--r--sw/source/filter/ww1/fltshell.cxx13
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx10
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx16
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx13
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx6
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx12
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx13
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx20
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx13
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx24
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx17
-rw-r--r--sw/source/filter/xml/swxml.cxx7
-rw-r--r--sw/source/filter/xml/xmlexp.cxx5
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx10
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx4
-rw-r--r--sw/source/filter/xml/xmlimp.cxx15
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx1
-rw-r--r--sw/source/filter/xml/xmltble.cxx6
-rw-r--r--sw/source/filter/xml/xmltbli.cxx6
-rw-r--r--sw/source/filter/xml/xmltexte.cxx5
-rw-r--r--sw/source/filter/xml/xmltexti.cxx8
43 files changed, 197 insertions, 305 deletions
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 7a8b35470da2..201d7130616d 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -34,9 +34,7 @@
#include <tools/date.hxx>
#include <tools/time.hxx>
#include <svl/urihelper.hxx>
-#ifndef SVTOOLS_FSTATHELPER_HXX
#include <svl/fstathelper.hxx>
-#endif
#include <unotools/moduleoptions.hxx>
#include <sfx2/docfile.hxx>
#include <svx/lrspitem.hxx>
@@ -60,9 +58,7 @@
#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include <fltini.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <redline.hxx>
#include <swerror.h>
@@ -72,6 +68,7 @@
#include <pausethreadstarting.hxx>
// <--
+
using namespace ::com::sun::star;
//////////////////////////////////////////////////////////////////////////
@@ -241,9 +238,9 @@ ULONG SwReader::Read( const Reader& rOptions )
{
SwPosition const*const pFrameAnchor(
rAnchor.GetCntntAnchor());
- if ( (FLY_PAGE == rAnchor.GetAnchorId())
+ if ( (FLY_AT_PAGE == rAnchor.GetAnchorId())
|| ( pFrameAnchor
- && ( ( (FLY_AT_CNTNT == rAnchor.GetAnchorId())
+ && ( ( (FLY_AT_PARA == rAnchor.GetAnchorId())
&& ( (pUndoPam->GetPoint()->nNode ==
pFrameAnchor->nNode)
|| (pUndoPam->GetMark()->nNode ==
@@ -251,7 +248,7 @@ ULONG SwReader::Read( const Reader& rOptions )
)
)
// #i97570# also check frames anchored AT char
- || ( (FLY_AUTO_CNTNT == rAnchor.GetAnchorId())
+ || ( (FLY_AT_CHAR == rAnchor.GetAnchorId())
&& !IsDestroyFrameAnchoredAtChar(
*pFrameAnchor,
*pUndoPam->GetPoint(),
@@ -262,7 +259,7 @@ ULONG SwReader::Read( const Reader& rOptions )
)
{
if( bChkHeaderFooter &&
- FLY_AT_CNTNT == rAnchor.GetAnchorId() &&
+ (FLY_AT_PARA == rAnchor.GetAnchorId()) &&
RES_DRAWFRMFMT == pFrmFmt->Which() )
{
// DrawObjecte in Kopf-/Fusszeilen ist nicht
@@ -286,15 +283,19 @@ ULONG SwReader::Read( const Reader& rOptions )
pFrmFmt->DelFrms();
}
- if( FLY_PAGE == rAnchor.GetAnchorId() )
+ if (FLY_AT_PAGE == rAnchor.GetAnchorId())
{
if( !rAnchor.GetCntntAnchor() )
+ {
pFrmFmt->MakeFrms();
+ }
else if( pCrsr )
+ {
// seitengebundene Flys eingefuegt, dann schalte
// die Optimierungs-Flags vom SwDoc ab. Sonst
// werden die Flys nicht an der Position erzeugt.
pDoc->SetLoaded( FALSE );
+ }
}
else
pFrmFmt->MakeFrms();
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 6945cf677f51..416c27ccd849 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -35,9 +35,7 @@
#include "hintids.hxx"
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <svl/whiter.hxx>
#include <svx/boxitem.hxx>
#include <svx/ulspitem.hxx>
@@ -2130,8 +2128,8 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor();
switch( rAnchor.GetAnchorId() )
{
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR:
if( text::RelOrientation::FRAME == rHoriOri.GetRelationOrient() ||
text::RelOrientation::PRINT_AREA == rHoriOri.GetRelationOrient() )
{
@@ -2146,7 +2144,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
break;
}
- case FLY_PAGE:
+ case FLY_AT_PAGE:
case FLY_AT_FLY:
{
// position
@@ -2375,7 +2373,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt )
const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor();
RndStdIds eAnchorId = rAnchor.GetAnchorId();
const SwPosition *pAnchorPos = rAnchor.GetCntntAnchor();
- if( FLY_PAGE != eAnchorId && pAnchorPos )
+ if (FLY_AT_PAGE != eAnchorId && pAnchorPos)
{
const SwNode& rNode = pAnchorPos->nNode.GetNode();
if( rNode.IsCntntNode() )
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 1c270e8c243b..bceb542d1a1d 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -39,17 +39,12 @@
#include <svl/urihelper.hxx>
#include <i18npool/mslangid.hxx>
#include <sfx2/docfile.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
#include <svx/fhgtitem.hxx>
#include <svx/brshitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
-#ifndef _SVX_BOXITEM_HXX //autogen
-
#include <svx/boxitem.hxx>
-#endif
#include <svx/fhgtitem.hxx>
#include <svx/flstitem.hxx>
#include <svx/brkitem.hxx>
@@ -2094,7 +2089,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
}
else
{
- aAnchor.SetType( FLY_PAGE );
+ aAnchor.SetType( FLY_AT_PAGE );
aAnchor.SetPageNum( 1 );
}
nHoriPos = rPropInfo.nLeft;
@@ -2102,7 +2097,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
}
else
{
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
aAnchor.SetAnchor( pPam->GetPoint() );
eVertOri = text::VertOrientation::TOP;
eVertRel = text::RelOrientation::CHAR;
@@ -2128,14 +2123,14 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
xub_StrLen nCntnt = pPam->GetPoint()->nContent.GetIndex();
if( nCntnt )
{
- aAnchor.SetType( FLY_AUTO_CNTNT );
+ aAnchor.SetType( FLY_AT_CHAR );
pPam->Move( fnMoveBackward );
eVertOri = text::VertOrientation::CHAR_BOTTOM;
eVertRel = text::RelOrientation::CHAR;
}
else
{
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
eVertOri = text::VertOrientation::TOP;
eVertRel = text::RelOrientation::PRINT_AREA;
}
diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx
index 7debe0e40eec..d2943193de34 100644
--- a/sw/source/filter/html/htmldraw.cxx
+++ b/sw/source/filter/html/htmldraw.cxx
@@ -34,9 +34,7 @@
#include "hintids.hxx"
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdobj.hxx>
@@ -182,7 +180,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
aFrmSet.Put( aULItem );
}
- SwFmtAnchor aAnchor( FLY_IN_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AS_CHAR );
if( SVX_CSS1_POS_ABSOLUTE == rCSS1PropInfo.ePosition &&
SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eLeftType &&
SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eTopType )
@@ -198,7 +196,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
}
else
{
- aAnchor.SetType( FLY_PAGE );
+ aAnchor.SetType( FLY_AT_PAGE );
}
// OD 2004-04-13 #i26791# - direct positioning for <SwDoc::Insert(..)>
pNewDrawObj->SetRelativePos( Point(rCSS1PropInfo.nLeft + nLeftSpace,
@@ -208,7 +206,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
else if( SVX_ADJUST_LEFT == rCSS1PropInfo.eFloat ||
text::HoriOrientation::LEFT == eHoriOri )
{
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
aFrmSet.Put( SwFmtSurround(bHidden ? SURROUND_THROUGHT
: SURROUND_RIGHT) );
// OD 2004-04-13 #i26791# - direct positioning for <SwDoc::Insert(..)>
@@ -219,10 +217,14 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
aFrmSet.Put( SwFmtVertOrient( 0, eVertOri ) );
}
- if( FLY_PAGE == aAnchor.GetAnchorId() )
+ if (FLY_AT_PAGE == aAnchor.GetAnchorId())
+ {
aAnchor.SetPageNum( 1 );
+ }
else if( FLY_AT_FLY != aAnchor.GetAnchorId() )
+ {
aAnchor.SetAnchor( pPam->GetPoint() );
+ }
aFrmSet.Put( aAnchor );
pDoc->Insert( *pPam, *pNewDrawObj, &aFrmSet, NULL );
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 597d851722d8..97b1309e7cec 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -39,12 +39,8 @@
#include "hintids.hxx"
#include <tools/string.hxx>
#include <svl/urihelper.hxx>
-#ifndef _APP_HXX
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/imap.hxx>
@@ -338,12 +334,12 @@ void SwHTMLWriter::CollectFlyFrms()
sal_Int16 eHoriRel = rFrmFmt.GetHoriOrient().GetRelationOrient();
switch( rAnchor.GetAnchorId() )
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
case FLY_AT_FLY:
nMode = aHTMLOutFrmPageFlyTable[eType][nExportMode];
break;
- case FLY_AT_CNTNT:
+ case FLY_AT_PARA:
// Absatz-gebundene Rahmen werden nur dann vor den
// Absatz geschrieben, wenn der Absatz einen Abstand
// hat.
@@ -362,7 +358,7 @@ void SwHTMLWriter::CollectFlyFrms()
nMode = aHTMLOutFrmParaPrtAreaTable[eType][nExportMode];
break;
- case FLY_AUTO_CNTNT:
+ case FLY_AT_CHAR:
if( text::RelOrientation::FRAME == eHoriRel || text::RelOrientation::PRINT_AREA == eHoriRel )
nMode = aHTMLOutFrmParaPrtAreaTable[eType][nExportMode];
else
@@ -594,7 +590,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
const sal_Char *pStr = 0;
RndStdIds eAnchorId = rFrmFmt.GetAnchor().GetAnchorId();
if( (nFrmOpts & HTML_FRMOPT_ALIGN) &&
- (FLY_AT_CNTNT == eAnchorId || FLY_AUTO_CNTNT == eAnchorId) )
+ ((FLY_AT_PARA == eAnchorId) || (FLY_AT_CHAR == eAnchorId)) )
{
// MIB 12.3.98: Ist es nicht schlauer, absatzgebundene
// Rahmen notfalls links auszurichten als sie
@@ -611,7 +607,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
}
if( (nFrmOpts & HTML_FRMOPT_ALIGN) && !pStr &&
( (nFrmOpts & HTML_FRMOPT_S_ALIGN) == 0 ||
- FLY_IN_CNTNT == eAnchorId ) &&
+ (FLY_AS_CHAR == eAnchorId) ) &&
SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, TRUE, &pItem ))
{
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
@@ -764,8 +760,8 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// Umlauf fuer absatzgeb. Grafiken als <BR CLEAR=...> in den String
// schreiben
if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) &&
- (FLY_AT_CNTNT== rFrmFmt.GetAnchor().GetAnchorId() ||
- FLY_AUTO_CNTNT== rFrmFmt.GetAnchor().GetAnchorId()) &&
+ ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) ||
+ (FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) &&
SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, TRUE, &pItem ))
{
const SwFmtSurround* pSurround = (const SwFmtSurround*)pItem;
@@ -1893,7 +1889,7 @@ SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
nOutputMode( nOutMode )
{
const SwFmtAnchor& rAnchor = rPosFly.GetFmt().GetAnchor();
- if( FLY_AUTO_CNTNT==rAnchor.GetAnchorId() &&
+ if ((FLY_AT_CHAR == rAnchor.GetAnchorId()) &&
HTML_POS_INSIDE == GetOutPos() )
{
// Auto-gebundene Rahmen werden ein Zeichen weiter hinten
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index c9c850448f56..4bcb03efa1e8 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -34,22 +34,16 @@
#include <hintids.hxx>
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <vcl/imgcons.hxx>
-#ifndef _TOOLKIT_UNOHLP_HXX
#include <toolkit/helper/vclunohelper.hxx>
-#endif
#include <svtools/htmlkywd.hxx>
#include <svtools/htmltokn.h>
#include <svl/urihelper.hxx>
#include <sfx2/request.hxx>
#include <sfx2/docfile.hxx>
-#ifndef _SFXAPP_HXX
#include <sfx2/viewfrm.hxx>
-#endif
#include <svx/lrspitem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/brshitem.hxx>
@@ -87,13 +81,14 @@
#include <docsh.hxx>
#include <viewsh.hxx>
#include <unodraw.hxx>
-#include <unoobj.hxx>
+#include <unotextrange.hxx>
#include "dcontact.hxx"
#include "swcss1.hxx"
#include "swhtml.hxx"
#include "htmlform.hxx"
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 71a56084c642..a1eda52a1c7c 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -45,18 +45,14 @@
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <hintids.hxx>
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <svl/macitem.hxx>
#include <tools/urlobj.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/htmltokn.h>
#include <svtools/htmlkywd.hxx>
-#include "svl/urihelper.hxx"
-#ifndef _TOOLKIT_UNOHLP_HXX
+#include <svl/urihelper.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#endif
#include <svx/svdouno.hxx>
#include <svx/fmglob.hxx>
#include <svx/brshitem.hxx>
@@ -67,7 +63,7 @@
#include <svx/postitem.hxx>
#include <svx/udlnitem.hxx>
#include <svx/crsditem.hxx>
-#include <unoobj.hxx>
+
#include <docsh.hxx>
#include <fmtanchr.hxx>
#include <docary.hxx>
@@ -81,6 +77,7 @@
#include "htmlfly.hxx"
#include "htmlform.hxx"
+
using namespace ::com::sun::star;
using ::rtl::OUString;
/* */
@@ -1427,7 +1424,7 @@ void SwHTMLWriter::GetControls()
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
const SwPosition *pPos = rAnchor.GetCntntAnchor();
- if( FLY_IN_CNTNT != rAnchor.GetAnchorId() || !pPos )
+ if ((FLY_AS_CHAR != rAnchor.GetAnchorId()) || !pPos)
continue;
const SdrObject *pSdrObj =
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index d172b8894c55..6e463a7a9770 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -33,9 +33,7 @@
#include "hintids.hxx"
#include <vcl/svapp.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <i18npool/mslangid.hxx>
#include <svl/stritem.hxx>
#include <svl/urihelper.hxx>
@@ -208,7 +206,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
BOOL bDontAppend )
{
BOOL bMoveBackward = FALSE;
- SwFmtAnchor aAnchor( FLY_IN_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AS_CHAR );
sal_Int16 eVertRel = text::RelOrientation::FRAME;
if( text::HoriOrientation::NONE != eHoriOri )
@@ -267,14 +265,14 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
xub_StrLen nCntnt = pPam->GetPoint()->nContent.GetIndex();
if( nCntnt )
{
- aAnchor.SetType( FLY_AUTO_CNTNT );
+ aAnchor.SetType( FLY_AT_CHAR );
bMoveBackward = TRUE;
eVertOri = text::VertOrientation::CHAR_BOTTOM;
eVertRel = text::RelOrientation::CHAR;
}
else
{
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
eVertOri = text::VertOrientation::TOP;
eVertRel = text::RelOrientation::PRINT_AREA;
}
@@ -301,7 +299,7 @@ void SwHTMLParser::RegisterFlyFrm( SwFrmFmt *pFlyFmt )
// automatisch verankerte Rahmen muessen noch um eine Position
// nach vorne verschoben werden.
if( RES_DRAWFRMFMT != pFlyFmt->Which() &&
- FLY_AT_CNTNT == pFlyFmt->GetAnchor().GetAnchorId() &&
+ (FLY_AT_PARA == pFlyFmt->GetAnchor().GetAnchorId()) &&
SURROUND_THROUGHT == pFlyFmt->GetSurround().GetSurround() )
{
aMoveFlyFrms.Insert( pFlyFmt, aMoveFlyFrms.Count() );
@@ -778,7 +776,7 @@ IMAGE_SETEVENT:
aMacroItem.SetMacro( aEvents[ n ], *pMacro );
}
- if( FLY_IN_CNTNT == pFlyFmt->GetAnchor().GetAnchorId() &&
+ if ((FLY_AS_CHAR == pFlyFmt->GetAnchor().GetAnchorId()) &&
aAttrTab.pINetFmt->GetSttPara() ==
pPam->GetPoint()->nNode &&
aAttrTab.pINetFmt->GetSttCnt() ==
@@ -1342,20 +1340,16 @@ void SwHTMLParser::StripTrailingPara()
{
ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
- USHORT i;
-
- const SwFrmFmt* pFmt;
- const SwFmtAnchor* pAnchor;
- const SwPosition* pAPos;
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( i=0; i<rFrmFmtTbl.Count(); i++ )
+ for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
{
- pFmt = rFrmFmtTbl[i];
- pAnchor = &pFmt->GetAnchor();
- if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
- (FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId()) &&
+ SwFrmFmt const*const pFmt = rFrmFmtTbl[i];
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
pAPos->nNode == nNodeIdx )
return; // den Knoten duerfen wir nicht loeschen
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index dc08bad8d6dc..a04c577007ef 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -33,8 +33,6 @@
#include <com/sun/star/embed/EmbedStates.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-
-
#include "hintids.hxx"
#include <svl/urihelper.hxx>
#define _SVSTDARR_ULONGS
@@ -42,9 +40,7 @@
#include <vcl/svapp.hxx>
#include <sfx2/frmhtml.hxx>
#include <sfx2/frmhtmlw.hxx>
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sot/storage.hxx>
#include <svx/xoutbmp.hxx>
#include <svx/ulspitem.hxx>
@@ -465,7 +461,7 @@ void SwHTMLParser::InsertEmbed()
}
else
{
- SwFmtAnchor aAnchor( FLY_AT_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_PARA );
aAnchor.SetAnchor( pPam->GetPoint() );
aFrmSet.Put( aAnchor );
aFrmSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME) );
@@ -1167,7 +1163,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
sOut = '\"';
}
- if( FLY_AT_CNTNT == rFrmFmt.GetAnchor().GetAnchorId() &&
+ if ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) &&
SURROUND_THROUGHT == rFrmFmt.GetSurround().GetSurround() )
{
// Das Plugin ist HIDDEN
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index c47739b8925f..d9987b78396d 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2837,7 +2837,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
SwFrmFmt *pFrmFmt = aMoveFlyFrms[ --n ];
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
- ASSERT( FLY_AT_CNTNT==rAnchor.GetAnchorId(),
+ ASSERT( FLY_AT_PARA == rAnchor.GetAnchorId(),
"Nur Auto-Rahmen brauchen eine Spezialbehandlung" );
const SwPosition *pFlyPos = rAnchor.GetCntntAnchor();
ULONG nFlyParaIdx = pFlyPos->nNode.GetIndex();
@@ -2862,7 +2862,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
pAttrPam->GetPoint()->nContent.Assign( pAttrPam->GetCntntNode(),
aMoveFlyCnts[n] );
SwFmtAnchor aAnchor( rAnchor );
- aAnchor.SetType( FLY_AUTO_CNTNT );
+ aAnchor.SetType( FLY_AT_CHAR );
aAnchor.SetAnchor( pAttrPam->GetPoint() );
pFrmFmt->SetFmtAttr( aAnchor );
@@ -4411,27 +4411,23 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
// sonst: Der Absatz enthaelt irgendeinen Rahmen
SwNodeIndex& rNodeIdx = pPam->GetPoint()->nNode;
- SwFrmFmt* pFmt;
- const SwFmtAnchor* pAnchor;
- const SwPosition* pAPos;
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- USHORT i;
BOOL bFound = FALSE;
- for( i=0; i<rFrmFmtTbl.Count(); i++ )
+ for ( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
{
- pFmt = rFrmFmtTbl[i];
- pAnchor = &pFmt->GetAnchor();
+ SwFrmFmt *const pFmt = rFrmFmtTbl[i];
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
// Ein Rahmen wurde gefunden, wenn
// - er absatzgebunden ist, und
// - im aktuellen Absatz verankert ist, und
// - jeder absatzgebunene Rahmen zaehlt, oder
// - (nur Rahmen oder umlauf zaehlen und ) der Rahmen keinen
// Umlauf besitzt
-
- if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
- (FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId()) &&
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
pAPos->nNode == rNodeIdx )
{
if( !(bNoSurroundOnly || bSurroundOnly) )
@@ -5073,18 +5069,16 @@ void SwHTMLParser::InsertLineBreak()
SwTxtNode* pTxtNd = rNodeIdx.GetNode().GetTxtNode();
if( pTxtNd )
{
- SwFrmFmt* pFmt;
- const SwFmtAnchor* pAnchor;
- const SwPosition* pAPos;
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
{
- pFmt = rFrmFmtTbl[i];
- pAnchor = &pFmt->GetAnchor();
- if( 0 != ( pAPos = pAnchor->GetCntntAnchor()) &&
- (FLY_AT_CNTNT == pAnchor->GetAnchorId() ||
- FLY_AUTO_CNTNT == pAnchor->GetAnchorId()) &&
+ SwFrmFmt *const pFmt = rFrmFmtTbl[i];
+ SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
+ SwPosition const*const pAPos = pAnchor->GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == pAnchor->GetAnchorId()) ||
+ (FLY_AT_CHAR == pAnchor->GetAnchorId())) &&
pAPos->nNode == rNodeIdx &&
pFmt->GetSurround().GetSurround() != SURROUND_NONE )
{
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index ec836f2b8549..036933bd4a67 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -36,9 +36,7 @@
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <hintids.hxx>
-#ifndef _KEYCOD_HXX //autogen
#include <vcl/keycod.hxx>
-#endif
#include <tools/datetime.hxx>
#include <svx/brkitem.hxx>
#include <poolfmt.hxx>
@@ -556,7 +554,7 @@ public:
pOut->EndTable(); }
// methoden zur verwaltung von Flys
BOOL IsInFly() { return pOut->IsInFly(); }
- BOOL BeginFly( RndStdIds eAnchor = FLY_AT_CNTNT, BOOL bAbsolutePos = FALSE );
+ BOOL BeginFly( RndStdIds eAnchor = FLY_AT_PARA, BOOL bAbsolutePos = FALSE );
void SetFlyAnchor( RndStdIds eAnchor )
{ pOut->SetFlyAnchor( eAnchor ); }
void SetFlyXPos( short nXPos, sal_Int16 eHRel = com::sun::star::text::RelOrientation::FRAME,
diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx
index 0c85e78dc0e7..ecbcfbfe7c7f 100644
--- a/sw/source/filter/rtf/rtfatr.cxx
+++ b/sw/source/filter/rtf/rtfatr.cxx
@@ -38,9 +38,7 @@
*/
#include <hintids.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <vcl/cvtgrf.hxx>
#include <svl/urihelper.hxx>
#include <svl/stritem.hxx>
@@ -50,9 +48,7 @@
#include <svl/itemiter.hxx>
#include <svx/fontitem.hxx>
#include <svx/hyznitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/lspcitem.hxx>
#include <svx/langitem.hxx>
#include <svx/keepitem.hxx>
@@ -72,16 +68,12 @@
#include <svx/lrspitem.hxx>
#include <svx/boxitem.hxx>
#include <svx/crsditem.hxx>
-#ifndef _SVX_CNTRITEM_HXX //autogen
#include <svx/cntritem.hxx>
-#endif
#include <svx/postitem.hxx>
#include <svx/shdditem.hxx>
#include <svx/wghtitem.hxx>
#include <svx/wrlmitem.hxx>
-#ifndef _SVX_EMPHITEM_HXX
#include <svx/emphitem.hxx>
-#endif
#include <svx/twolinesitem.hxx>
#include <svx/charscaleitem.hxx>
#include <svx/charrotateitem.hxx>
@@ -127,9 +119,7 @@
#include <flddat.hxx>
#include <pagedesc.hxx> // fuer SwPageDesc ...
#include <swtable.hxx> // fuer SwPageDesc ...
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <swrect.hxx>
#include <section.hxx>
#include <wrtswtbl.hxx>
@@ -3592,7 +3582,7 @@ static Writer& OutRTF_SwFmtVertOrient ( Writer& rWrt, const SfxPoolItem& rHt )
const char* pOrient;
RndStdIds eAnchor = rRTFWrt.pFlyFmt->GetAnchor().GetAnchorId();
sal_Int16 eOrient = rFlyVert.GetRelationOrient();
- if( FLY_PAGE == eAnchor )
+ if (FLY_AT_PAGE == eAnchor)
{
if( text::RelOrientation::PAGE_FRAME == eOrient || text::RelOrientation::FRAME == eOrient )
pOrient = OOO_STRING_SVTOOLS_RTF_PVPG;
@@ -3648,7 +3638,7 @@ static Writer& OutRTF_SwFmtHoriOrient( Writer& rWrt, const SfxPoolItem& rHt )
const char* pS;
RndStdIds eAnchor = rRTFWrt.pFlyFmt->GetAnchor().GetAnchorId();
sal_Int16 eOrient = rFlyHori.GetRelationOrient();
- if( FLY_PAGE == eAnchor )
+ if (FLY_AT_PAGE == eAnchor)
{
if( text::RelOrientation::PAGE_FRAME == eOrient || text::RelOrientation::FRAME == eOrient )
pS = OOO_STRING_SVTOOLS_RTF_PHPG;
@@ -3702,12 +3692,12 @@ static Writer& OutRTF_SwFmtAnchor( Writer& rWrt, const SfxPoolItem& rHt )
rRTFWrt.bOutFmtAttr = TRUE;
switch( nId )
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYPAGE;
rWrt.OutULong( rAnchor.GetPageNum() );
break;
- case FLY_AT_CNTNT:
- case FLY_IN_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AS_CHAR:
rWrt.Strm() << OOO_STRING_SVTOOLS_RTF_FLYCNTNT;
break;
}
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index 329ff8fedb41..c6131aa17251 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -64,15 +64,9 @@
#include <txtflcnt.hxx>
#include <fmtflcnt.hxx>
#include <fltini.hxx>
-#ifndef __SGI_STL_DEQUE
#include <deque>
-#endif
-#ifndef __SGI_STL_MAP
#include <map>
-#endif
-#ifndef __SGI_STL_UTILITY
#include <utility>
-#endif
// --> OD 2004-06-30 #i27767#
#include <fmtwrapinfluenceonobjpos.hxx>
// <--
@@ -82,6 +76,7 @@
#include "dcontact.hxx"
// <--
+
using namespace ::com::sun::star;
#define ANCHOR(p) ((SwFmtAnchor*)p)
@@ -459,7 +454,7 @@ void SwRTFParser::SetFlysInDoc()
SwFlyFrmFmt* pFmt = pDoc->MakeFlyFrmFmt( aEmptyStr, pParent );
pFmt->SetFmtAttr( pFlySave->aFlySet );
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- if( FLY_IN_CNTNT != rAnchor.GetAnchorId() )
+ if (FLY_AS_CHAR != rAnchor.GetAnchorId())
{
// korrigiere noch den Absatz, ist immer der vorhergehende !
// JP 20.09.95: wenn es diesen gibt! (DocAnfang!)
@@ -568,7 +563,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// RTF-Defaults setzen:
// --> OD 2004-06-24 #i27767#
- SwFmtAnchor aAnchor( FLY_AT_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_PARA );
SwFmtHoriOrient aHori( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME );
SwFmtVertOrient aVert( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME );
@@ -844,7 +839,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
switch( GetNextToken() )
{
case RTF_FLY_PAGE:
- aAnchor.SetType( FLY_PAGE );
+ aAnchor.SetType( FLY_AT_PAGE );
aAnchor.SetPageNum( USHORT(nTokenValue));
aAnchor.SetAnchor( 0 );
break;
@@ -854,7 +849,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
SwNodeIndex aIdx( pPam->GetPoint()->nNode );
pDoc->GetNodes().GoPrevious( &aIdx );
SwPosition aPos( aIdx );
- aAnchor.SetType( FLY_AT_CNTNT );
+ aAnchor.SetType( FLY_AT_PARA );
aAnchor.SetAnchor( &aPos );
}
break;
@@ -1288,7 +1283,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
RES_VERT_ORIENT,*/ RES_ANCHOR );
const SwPosition* pPos = pPam->GetPoint();
- SwFmtAnchor aAnchor( FLY_IN_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AS_CHAR );
aAnchor.SetAnchor( pPos );
aFlySet.Put( aAnchor );
aFlySet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP ));
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 0b2bd344ccc4..b3c4b28f8524 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -35,18 +35,14 @@
#include <stack>
-#ifndef __RSC //autogen
#include <tools/errinf.hxx>
-#endif
#include <tools/stream.hxx>
#include <svl/itemiter.hxx>
#include <svtools/rtftoken.h>
#include <svl/intitem.hxx>
#include <svx/fhgtitem.hxx>
#include <svx/ulspitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/lspcitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/escpitem.hxx>
@@ -82,18 +78,14 @@
#include <fltini.hxx>
#include <fchrfmt.hxx>
#include <paratr.hxx>
-#ifndef _SECTIOM_HXX
#include <section.hxx>
-#endif
#include <fmtclbl.hxx>
#include <viewsh.hxx>
#include <shellres.hxx>
#include <hfspacingitem.hxx>
#include <tox.hxx>
#include <swerror.h>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#ifndef _STATSTR_HRC
#include <statstr.hrc> // ResId fuer Statusleiste
#endif
@@ -471,8 +463,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
for ( USHORT nI = pFrmFmts->Count(); nI; --nI )
{
const SwFmtAnchor & rAnchor = (*pFrmFmts)[ nI - 1 ]->GetAnchor();
- if ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() )
+ if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()))
{
const SwPosition * pObjPos = rAnchor.GetCntntAnchor();
if ( pObjPos && nNodeIdx == pObjPos->nNode.GetIndex() )
@@ -1270,14 +1262,7 @@ void SwRTFParser::ReadDrawingObject()
sw::util::SetLayer aSetLayer(*pDoc);
aSetLayer.SendObjectToHeaven(*pStroke);
*/
- /*
- FLY_AT_CNTNT, //Absatzgebundener Rahmen <to paragraph>
- FLY_IN_CNTNT, //Zeichengebundener Rahmen <as character>
- FLY_PAGE, //Seitengebundener Rahmen <to page>
- FLY_AT_FLY, //Rahmengebundener Rahmen ( LAYER_IMPL ) <to frame>
- FLY_AUTO_CNTNT, //Automatisch positionierter, absatzgebundener Rahmen <to character>
- */
- SwFmtAnchor aAnchor( FLY_AT_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_PARA );
aAnchor.SetAnchor( pPam->GetPoint() );
aFlySet.Put( aAnchor );
@@ -1343,7 +1328,7 @@ void SwRTFParser::InsertShpObject(SdrObject* pStroke, int _nZOrder)
SwFmtFollowTextFlow aFollowTextFlow( FALSE );
aFlySet.Put( aFollowTextFlow );
- SwFmtAnchor aAnchor( FLY_AT_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_PARA );
aAnchor.SetAnchor( pPam->GetPoint() );
aFlySet.Put( aAnchor );
@@ -3710,8 +3695,9 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
xub_StrLen nPos = pPam->GetPoint()->nContent.GetIndex();
SfxItemSet aSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN,
RES_FRMATR_END-1 );
- aSet.Put( SwFmtAnchor( FLY_IN_CNTNT ));
- pHdFtFmt = pDoc->MakeFlySection( FLY_IN_CNTNT, pPam->GetPoint(), &aSet );
+ aSet.Put( SwFmtAnchor( FLY_AS_CHAR ));
+ pHdFtFmt = pDoc->MakeFlySection( FLY_AS_CHAR,
+ pPam->GetPoint(), &aSet );
pTxtAttr = pPam->GetNode()->GetTxtNode()->GetTxtAttrForCharAt(
nPos, RES_TXTATR_FLYCNT );
diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx
index 9975ee3abf23..e416917646f2 100644
--- a/sw/source/filter/rtf/wrtrtf.cxx
+++ b/sw/source/filter/rtf/wrtrtf.cxx
@@ -46,9 +46,7 @@
#include <svx/brshitem.hxx>
#include <svx/colritem.hxx>
#include <svx/boxitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/ulspitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/frmdiritem.hxx>
@@ -85,6 +83,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+
#if defined(UNX)
const sal_Char SwRTFWriter::sNewLine = '\012';
#else
@@ -1129,7 +1128,7 @@ bool ExportAsInline(const SwFlyFrmFmt& rFlyFrmFmt)
{
//if not an inline element (hack in our limitations here as to only
//graphics like this!!!!
- return rFlyFrmFmt.GetAnchor().GetAnchorId() == FLY_IN_CNTNT;
+ return rFlyFrmFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR;
}
void SwRTFWriter::OutRTFFlyFrms(const SwFlyFrmFmt& rFlyFrmFmt)
@@ -1779,7 +1778,7 @@ short SwRTFWriter::TrueFrameDirection(const SwFrmFmt &rFlyFmt) const
{
pItem = 0;
const SwFmtAnchor* pAnchor = &pFlyFmt2->GetAnchor();
- if( FLY_PAGE != pAnchor->GetAnchorId() &&
+ if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetCntntAnchor() )
{
pFlyFmt2 = pAnchor->GetCntntAnchor()->nNode.
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 6086d7f9230e..5a6d515596b5 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -35,9 +35,7 @@
#include <hintids.hxx>
#include <hints.hxx>
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <svl/urihelper.hxx>
#include <svx/impgrf.hxx>
#include <svx/boxitem.hxx>
@@ -72,13 +70,12 @@
#include <section.hxx> // class SwSection
#include <tblsel.hxx> // class SwSelBoxes
#include <pagedesc.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx> // class SwDocSh
-#endif
#include <fltshell.hxx>
#include <viewsh.hxx>
#include <shellres.hxx>
+
#define MAX_FIELDLEN 64000
using namespace com::sun::star;
@@ -437,7 +434,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
// Damit die Frames bei Einfuegen in existierendes Doc
// erzeugt werden (erst nach Setzen des Ankers!):
if(pDoc->GetRootFrm()
- && FLY_AT_CNTNT == pFmt->GetAnchor().GetAnchorId())
+ && (FLY_AT_PARA == pFmt->GetAnchor().GetAnchorId()))
{
pFmt->MakeFrms();
}
@@ -1285,7 +1282,7 @@ SwFltOutBase::~SwFltOutBase()
}
SwFltOutBase::SwFltOutBase(SwDoc& rDocu)
- : rDoc(rDocu), eFlyAnchor(FLY_AT_CNTNT), bFlyAbsPos(false)
+ : rDoc(rDocu), eFlyAnchor(FLY_AT_PARA), bFlyAbsPos(false)
{
}
@@ -1702,8 +1699,8 @@ BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_CNTNT*/,
ASSERT( FALSE, "SetFlyAnchor() ohne Fly" );
return;
}
- if( eAnchor == FLY_IN_CNTNT ){
- ASSERT( FALSE, "SetFlyAnchor( FLY_IN_CNTNT ) nicht implementiert" );
+ if ( eAnchor == FLY_AS_CHAR ){
+ ASSERT( FALSE, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
return;
}
SwFmtAnchor& rAnchor = (SwFmtAnchor&)GetFlyFrmAttr( RES_ANCHOR );
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index 316f31a8d5d5..486dab533bc0 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -31,9 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-
#include <hintids.hxx>
#include <tools/solar.h>
@@ -46,10 +43,7 @@
#include <svx/shaditem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/lspcitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
-
#include <fmtclds.hxx>
#include <fmtfsize.hxx>
@@ -595,13 +589,13 @@ void Ww1SingleSprmPpc::Start(
sal_Int16 eVRel; // Seite oder Seitenrand
switch ( ( nPpc & 0x30 ) >> 4 ){ // Y - Bindung bestimmt Sw-Bindung
- case 0: eAnchor = FLY_AT_CNTNT; // Vert Margin
+ case 0: eAnchor = FLY_AT_PARA; // Vert Margin
eVRel = text::RelOrientation::PRINT_AREA;
// if( nYPos < 0 )
// nYPos = 0; // koennen wir nicht
break;
/* case 1:*/ // Vert. Seite
- default:eAnchor = FLY_PAGE; // Vert Page oder unknown
+ default:eAnchor = FLY_AT_PAGE; // Vert Page oder unknown
eVRel = text::RelOrientation::FRAME;
break; // 2=Vert. Paragraph, 3=Use Default
}
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index b68f321d35b6..b125a214ef23 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -190,7 +190,7 @@ namespace sw
meWriterType(eTxtBox),
mpStartFrameContent(0),
// --> OD 2007-04-19 #i43447# - move to initialization list
- mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_IN_CNTNT) )
+ mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
// <--
{
switch (rFmt.Which())
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 33c6725e1221..0117b7150a95 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -588,7 +588,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
//fHdr/bx/by/wr/wrk/fRcaSimple/fBelowText/fAnchorLock
USHORT nFlags=0;
//If nFlags isn't 0x14 its overridden by the escher properties
- if( FLY_PAGE == rFmt.GetAnchor().GetAnchorId())
+ if (FLY_AT_PAGE == rFmt.GetAnchor().GetAnchorId())
nFlags = 0x0000;
else
nFlags = 0x0014; // x-rel to text, y-rel to text
@@ -2118,7 +2118,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
{
const RndStdIds eAnchor = _rFrmFmt.GetAnchor().GetAnchorId();
- if ( FLY_IN_CNTNT == eAnchor || FLY_AT_FLY == eAnchor )
+ if ( (FLY_AS_CHAR == eAnchor) || (FLY_AT_FLY == eAnchor) )
{
// no conversion for as-character or at frame anchored objects
return false;
@@ -2167,7 +2167,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
// the fact, that the object is anchored at a paragraph, which has a "column
// break before" attribute
bool bConvDueToAnchoredAtColBreakPara( false );
- if ( ( eAnchor == FLY_AT_CNTNT || eAnchor == FLY_AUTO_CNTNT ) &&
+ if ( ( (eAnchor == FLY_AT_PARA) || (eAnchor == FLY_AT_CHAR) ) &&
_rFrmFmt.GetAnchor().GetCntntAnchor() &&
_rFrmFmt.GetAnchor().GetCntntAnchor()->nNode.GetNode().IsTxtNode() )
{
@@ -2404,7 +2404,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri,
void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt)
{
const RndStdIds eAnchor = rFmt.GetAnchor().GetAnchorId();
- mbInline = (eAnchor == FLY_IN_CNTNT);
+ mbInline = (eAnchor == FLY_AS_CHAR);
SwFmtHoriOrient rHoriOri = rFmt.GetHoriOrient();
SwFmtVertOrient rVertOri = rFmt.GetVertOrient();
@@ -2488,13 +2488,13 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt)
case text::RelOrientation::FRAME:
case text::RelOrientation::FRAME_LEFT: //:-(
case text::RelOrientation::FRAME_RIGHT: //:-(
- if (eAnchor == FLY_PAGE)
+ if (eAnchor == FLY_AT_PAGE)
mnXRelTo = 1;
else
mnXRelTo = 2;
break;
case text::RelOrientation::PRINT_AREA:
- if (eAnchor == FLY_PAGE)
+ if (eAnchor == FLY_AT_PAGE)
mnXRelTo = 0;
else
mnXRelTo = 2;
@@ -2516,13 +2516,13 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt)
mnYRelTo = 1;
break;
case text::RelOrientation::PRINT_AREA:
- if (eAnchor == FLY_PAGE)
+ if (eAnchor == FLY_AT_PAGE)
mnYRelTo = 0;
else
mnYRelTo = 2;
break;
case text::RelOrientation::FRAME:
- if (eAnchor == FLY_PAGE)
+ if (eAnchor == FLY_AT_PAGE)
mnYRelTo = 1;
else
mnYRelTo = 2;
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 554f128b361e..89f2aa54f3f9 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -376,7 +376,7 @@ xub_StrLen SwAttrIter::SearchNext( xub_StrLen nStartPos )
if (nPos >= nStartPos && nPos <= nMinPos)
nMinPos = nPos;
- if (maFlyIter->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AUTO_CNTNT)
+ if (maFlyIter->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_CHAR)
{
++nPos;
if (nPos >= nStartPos && nPos <= nMinPos)
@@ -1301,7 +1301,7 @@ short MSWordExportBase::TrueFrameDirection( const SwFrmFmt &rFlyFmt ) const
{
pItem = 0;
const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor();
- if ( FLY_PAGE != pAnchor->GetAnchorId() &&
+ if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetCntntAnchor() )
{
pFlyFmt = pAnchor->GetCntntAnchor()->nNode.GetNode().GetFlyFmt();
@@ -1359,7 +1359,7 @@ SvxBrushItem WW8Export::TrueFrameBgBrush(const SwFrmFmt &rFlyFmt) const
{
pRet = 0;
const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor();
- if (FLY_PAGE != pAnchor->GetAnchorId() &&
+ if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) &&
pAnchor->GetCntntAnchor())
{
pFlyFmt =
@@ -2497,12 +2497,13 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
aOffset -= aPageRect.Pos();
m_rWW8Export.pFlyOffset = &aOffset;
- m_rWW8Export.eNewAnchorType = FLY_PAGE;
+ m_rWW8Export.eNewAnchorType = FLY_AT_PAGE;
}
m_rWW8Export.mpParentFrame = &rFmt;
if (
- m_rWW8Export.bIsInTable && (FLY_PAGE != rAnch.GetAnchorId()) &&
+ m_rWW8Export.bIsInTable &&
+ (FLY_AT_PAGE != rAnch.GetAnchorId()) &&
!m_rWW8Export.pDoc->GetNodes()[ nStt ]->IsNoTxtNode()
)
{
@@ -2534,7 +2535,7 @@ void AttributeOutputBase::OutputFlyFrame( const sw::Frame& rFmt )
Point* pLayPos;
bool bValidNdPos = false, bValidPgPos = false;
- if ( FLY_PAGE == rFmt.GetFrmFmt().GetAnchor().GetAnchorId() )
+ if (FLY_AT_PAGE == rFmt.GetFrmFmt().GetAnchor().GetAnchorId())
{
// get the Layout Node-Position.
if ( !bValidPgPos )
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index fb5ce68ec654..9eb8fec9de7c 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2897,7 +2897,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
mpParentFrame = 0;
pFlyOffset = 0;
- eNewAnchorType = FLY_PAGE;
+ eNewAnchorType = FLY_AT_PAGE;
nTxtTyp = TXT_MAINTEXT;
// --> OD 2007-04-19 #i43447# - removed
// nFlyWidth = nFlyHeight = 0;
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index c4ad0735d5d4..00c877eb8725 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -404,7 +404,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
const SwFrmFmt &rFlyFmt = rFrame.GetFrmFmt();
const RndStdIds eAn = rFlyFmt.GetAttrSet().GetAnchor(false).GetAnchorId();
- if( eAn == FLY_IN_CNTNT )
+ if (eAn == FLY_AS_CHAR)
{
sal_Int16 eVert = rFlyFmt.GetVertOrient().GetVertOrient();
if ((eVert == text::VertOrientation::CHAR_CENTER) || (eVert == text::VertOrientation::LINE_CENTER))
@@ -465,8 +465,8 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
// Otherwise, an additional paragraph is exported for a graphic, which is
// forced to be treated as inline, because it's anchored inside another frame.
if ( !rFrame.IsInline() &&
- ( ( eAn == FLY_AT_CNTNT && ( bWrtWW8 || !bIsInTable ) ) ||
- eAn == FLY_PAGE ) )
+ ( ((eAn == FLY_AT_PARA) && ( bWrtWW8 || !bIsInTable )) ||
+ (eAn == FLY_AT_PAGE)) )
// <--
{
WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index b20df77e79a1..aef5b0e108e3 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -128,9 +128,7 @@
#include <writerfilter/doctok/sprmids.hxx>
-#if OSL_DEBUG_LEVEL > 1
-# include <fmtcntnt.hxx>
-#endif
+#include <fmtcntnt.hxx>
#include "writerhelper.hxx"
#include "writerwordglue.hxx"
#include "wrtww8.hxx"
@@ -4087,15 +4085,15 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
BYTE nP = 0;
switch ( rAnchor.GetAnchorId() )
{
- case FLY_PAGE:
+ case FLY_AT_PAGE:
// Vert: Page | Horz: Page
nP |= (1 << 4) | (2 << 6);
break;
// Im Fall eine Flys als Zeichen: Absatz-gebunden setzen!!!
case FLY_AT_FLY:
- case FLY_AUTO_CNTNT:
- case FLY_AT_CNTNT:
- case FLY_IN_CNTNT:
+ case FLY_AT_CHAR:
+ case FLY_AT_PARA:
+ case FLY_AS_CHAR:
// Vert: Page | Horz: Page
nP |= (2 << 4) | (0 << 6);
break;
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index eca0e0d77c21..6720af641fe5 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -36,14 +36,10 @@
#include <svl/urihelper.hxx>
#include <rtl/tencinfo.h>
#include <swerror.h>
-#ifndef _NDTXT
#include <ndtxt.hxx>
-#endif
#include <pam.hxx>
#include <shellio.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
@@ -51,6 +47,7 @@
#include "ww8glsy.hxx"
#include "ww8par.hxx"
+
WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
SvStorage *pStg)
: pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0)
@@ -82,10 +79,10 @@ bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx)
RES_DRAWFRMFMT != pFrmFmt->Which() )
continue;
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
- const SwPosition* pAPos;
- if( ( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ) &&
- 0 != ( pAPos = rAnchor.GetCntntAnchor()) &&
+ SwPosition const*const pAPos = rAnchor.GetCntntAnchor();
+ if (pAPos &&
+ ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId())) &&
rIdx == pAPos->nNode.GetIndex() )
{
bRet=true;
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index e1c5b2509228..f8f6303e81e9 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -58,9 +58,7 @@
#include <svx/adjitem.hxx>
#include <svx/wghtitem.hxx>
#include <svx/crsditem.hxx>
-#ifndef _SVX_CNTRITEM_HXX
#include <svx/cntritem.hxx>
-#endif
#include <svx/shdditem.hxx>
#include <svx/fontitem.hxx>
#include <svx/ulspitem.hxx>
@@ -191,13 +189,13 @@ bool SwWW8ImplReader::ReadGrafStart(void* pData, short nDataSiz,
}
pStrm->Read(pData, nDataSiz);
- RndStdIds eAnchor = (SVBT8ToByte(pDo->by) < 2) ? FLY_PAGE : FLY_AT_CNTNT;
+ RndStdIds eAnchor = (SVBT8ToByte(pDo->by) < 2) ? FLY_AT_PAGE : FLY_AT_PARA;
rSet.Put(SwFmtAnchor(eAnchor));
nDrawXOfs2 = nDrawXOfs;
nDrawYOfs2 = nDrawYOfs;
- if( eAnchor == FLY_AT_CNTNT )
+ if (eAnchor == FLY_AT_PARA)
{
if( SVBT8ToByte( pDo->bx ) == 1 ) // Pos: echt links
nDrawXOfs2 = static_cast< short >(nDrawXOfs2 - maSectionManager.GetPageLeft());
@@ -2248,7 +2246,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
{
ASSERT(pRecord || pFSPA, "give me something! to work with for anchoring");
if (!pRecord && !pFSPA)
- return FLY_PAGE;
+ return FLY_AT_PAGE;
SvxMSDffImportRec aRecordFromFSPA;
if (!pRecord)
@@ -2299,7 +2297,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
UINT32 nYRelTo = nCntRelTo > pRecord->nYRelTo ? pRecord->nYRelTo : 1;
// --> OD 2005-03-03 #i43718#
- RndStdIds eAnchor = IsInlineEscherHack() ? FLY_IN_CNTNT : FLY_AUTO_CNTNT;
+ RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR;
// <--
SwFmtAnchor aAnchor( eAnchor );
@@ -2463,7 +2461,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
if (
(pFSPA->nYaTop < 0) && (eVertOri == text::VertOrientation::NONE) &&
- ((eAnchor == FLY_AT_CNTNT) || (eAnchor == FLY_AUTO_CNTNT))
+ ((eAnchor == FLY_AT_PARA) || (eAnchor == FLY_AT_CHAR))
)
{
maTracer.Log(sw::log::eNegativeVertPlacement);
@@ -2846,7 +2844,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
SwFrmFmt *SwWW8ImplReader::AddAutoAnchor(SwFrmFmt *pFmt)
{
- if (pFmt && (pFmt->GetAnchor().GetAnchorId() != FLY_IN_CNTNT))
+ if (pFmt && (pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR))
{
sal_uInt16 nTextAreaWidth = static_cast< sal_uInt16 >( maSectionManager.GetPageWidth() -
maSectionManager.GetPageRight() - maSectionManager.GetPageLeft());
@@ -2861,8 +2859,10 @@ SwFrmFmt *SwWW8ImplReader::AddAutoAnchor(SwFrmFmt *pFmt)
*
* Leave to later and set the correct location then.
*/
- if ((pFmt) && (pFmt->GetAnchor().GetAnchorId() != FLY_IN_CNTNT))
+ if ((pFmt) && (pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR))
+ {
pAnchorStck->AddAnchor(*pPaM->GetPoint(), pFmt);
+ }
return pFmt;
}
@@ -3235,7 +3235,7 @@ void SwWW8ImplReader::GrafikDtor()
void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrmFmt *pFmt)
{
- ASSERT(pFmt->GetAnchor().GetAnchorId() != FLY_IN_CNTNT,
+ ASSERT(pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR,
"Don't use fltanchors with inline frames, slap!");
NewAttr(rPos, SwFltAnchor(pFmt));
}
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 68d3e87c475c..54899f189f12 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -33,9 +33,7 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */
-#ifndef __SGI_STL_ITERATOR
#include <iterator>
-#endif
#include <hintids.hxx>
#include <svl/urihelper.hxx>
#include <svx/impgrf.hxx>
@@ -415,7 +413,7 @@ SwFlyFrmFmt* SwWW8ImplReader::MakeGrafNotInCntnt(const WW8PicDesc& rPD,
// Damit die Frames bei Einfuegen in existierendes Doc erzeugt werden:
if (rDoc.GetRootFrm() &&
- (FLY_AT_CNTNT == pFlyFmt->GetAnchor().GetAnchorId()))
+ (FLY_AT_PARA == pFlyFmt->GetAnchor().GetAnchorId()))
{
pFlyFmt->MakeFrms();
}
@@ -548,9 +546,11 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
// it is anchored in content; because this anchor add
// a character into the textnode.
// IussueZilla task 2806
- if( FLY_IN_CNTNT ==
+ if (FLY_AS_CHAR ==
pFlyFmtOfJustInsertedGraphic->GetAnchor().GetAnchorId() )
+ {
aFlySet.ClearItem( RES_ANCHOR );
+ }
pFlyFmtOfJustInsertedGraphic->SetFmtAttr( aFlySet );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 10aa3d36d6bb..8cb1f0b6d59b 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1649,7 +1649,7 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen,
pPaM->GetPoint()->nNode = pSttIdx->GetIndex() + 1;
pPaM->GetPoint()->nContent.Assign(pPaM->GetCntntNode(), 0);
- SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_CNTNT, pPaM->GetPoint());
+ SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_PARA, pPaM->GetPoint());
pFrame->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, nPageWidth, MINLAY));
pFrame->SetFmtAttr(SwFmtSurround(SURROUND_THROUGHT));
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index afbf4b3593c1..053d6711158a 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3482,7 +3482,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
// --> OD 2005-03-21 #i45301# - anchor nested table inside Writer fly frame
// only at-character, if absolute position object attributes are available.
// Thus, default anchor type is as-character anchored.
- RndStdIds eAnchor( FLY_IN_CNTNT );
+ RndStdIds eAnchor( FLY_AS_CHAR );
// <--
if ( nInTable )
{
@@ -3514,7 +3514,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
// <--
// --> OD 2005-03-21 #i45301# - anchor nested table Writer fly
// frame at-character
- eAnchor = FLY_AUTO_CNTNT;
+ eAnchor = FLY_AT_CHAR;
// <--
}
}
@@ -3532,7 +3532,8 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
"how could we be in a local apo and have no apo");
}
- if ( eAnchor == FLY_AUTO_CNTNT && !maTableStack.empty() && !InEqualApo(nNewInTable) )
+ if ((eAnchor == FLY_AT_CHAR)
+ && !maTableStack.empty() && !InEqualApo(nNewInTable) )
{
pTableDesc->pParentPos = new SwPosition(*pPaM->GetPoint());
SfxItemSet aItemSet(rDoc.GetAttrPool(),
@@ -3560,7 +3561,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
if ( pTableWFlyPara && pTableSFlyPara )
{
WW8FlySet aFlySet( *this, pTableWFlyPara, pTableSFlyPara, false );
- SwFmtAnchor aAnchor( FLY_AUTO_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_CHAR );
aAnchor.SetAnchor( pTableDesc->pParentPos );
aFlySet.Put( aAnchor );
pTableDesc->pFlyFmt->SetFmtAttr( aFlySet );
@@ -3615,8 +3616,8 @@ bool lcl_PamContainsFly(SwPaM & rPam)
switch (pAnchor->GetAnchorId())
{
- case FLY_AT_CNTNT:
- case FLY_AUTO_CNTNT:
+ case FLY_AT_PARA:
+ case FLY_AT_CHAR:
{
const SwPosition* pAPos = pAnchor->GetCntntAnchor();
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index b6b91459fc10..5925751f3c57 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -77,7 +77,7 @@
#include <svx/postitem.hxx>
#include <filter/msfilter/msocximex.hxx>
#include <errhdl.hxx>
-#include <unoobj.hxx>
+#include <unotextrange.hxx>
#include <doc.hxx>
#include <docary.hxx>
#include <docsh.hxx>
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index a0c70239c604..dcbbd4d3ddfe 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -35,12 +35,8 @@
#include "writerhelper.hxx"
#include <com/sun/star/embed/XClassifiedObject.hpp>
-#ifndef __SGI_STL_ALGORITHM
#include <algorithm>
-#endif
-#ifndef __SGI_STL_FUNCTIONAL
#include <functional>
-#endif
#include <osl/endian.h>
#include <sot/storage.hxx>
#include <com/sun/star/drawing/XShape.hpp>
@@ -59,9 +55,7 @@
#include <frmfmt.hxx>
#include <pam.hxx>
#include <ndgrf.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx> // fuer Ole-Node
-#endif
#include <mdiexp.hxx> // Progress
#include <redline.hxx>
#include <fltshell.hxx>
@@ -296,7 +290,7 @@ SwFrmFmt* SwWW8ImplReader::ImportOle(const Graphic* pGrf,
if (!mbNewDoc)
Reader::ResetFrmFmtAttrs( *pTempSet );
- SwFmtAnchor aAnchor( FLY_IN_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AS_CHAR );
aAnchor.SetAnchor( pPaM->GetPoint() );
pTempSet->Put( aAnchor );
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 9f4cba28a4db..8b5984002ebb 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -45,17 +45,11 @@
#include <svl/zformat.hxx>
#include <sfx2/linkmgr.hxx>
-#ifndef _UCBHELPER_CONTENT_HXX_
#include <ucbhelper/content.hxx>
-#endif
-#ifndef _UCBHELPER_CONTENTBROKER_HXX_
#include <ucbhelper/contentbroker.hxx>
-#endif
#include <ucbhelper/commandenvironment.hxx>
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
#include <hintids.hxx>
#include <svx/fontitem.hxx>
#include <svx/fhgtitem.hxx>
@@ -2216,7 +2210,7 @@ eF_ResT SwWW8ImplReader::Read_F_IncludePicture( WW8FieldDesc*, String& rStr )
*/
SfxItemSet aFlySet( rDoc.GetAttrPool(), RES_FRMATR_BEGIN,
RES_FRMATR_END-1 );
- aFlySet.Put( SwFmtAnchor( FLY_IN_CNTNT ) );
+ aFlySet.Put( SwFmtAnchor( FLY_AS_CHAR ) );
aFlySet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME ));
pFlyFmtOfJustInsertedGraphic = rDoc.Insert( *pPaM,
aGrfName,
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 82e2192b52ed..62cfd4cf4ded 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -44,9 +44,7 @@
#include <svx/langitem.hxx>
#include <svx/cmapitem.hxx>
#include <svx/shdditem.hxx>
-#ifndef _SVX_CNTRITEM_HXX //autogen
#include <svx/cntritem.hxx>
-#endif
#include <svx/crsditem.hxx>
#include <svx/postitem.hxx>
#include <svx/wghtitem.hxx>
@@ -65,19 +63,13 @@
#include <svx/boxitem.hxx>
#include <svx/ulspitem.hxx>
#include <svx/lrspitem.hxx>
-#ifndef _SVX_TSTPITEM_HXX //autogen
#include <svx/tstpitem.hxx>
-#endif
#include <svx/akrnitem.hxx>
#include <svx/paperinf.hxx>
-#ifndef _SVX_EMPHITEM_HXX //autogen
#include <svx/emphitem.hxx>
-#endif
#include <svx/forbiddenruleitem.hxx>
#include <svx/twolinesitem.hxx>
-#ifndef _SVX_SCRIPSPACEITEM_HXX
#include <svx/scriptspaceitem.hxx>
-#endif
#include <svx/hngpnctitem.hxx>
#include <svx/pbinitem.hxx>
#include <svx/charscaleitem.hxx>
@@ -1995,7 +1987,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
nYBind = (( rWW.nSp29 & 0x30 ) >> 4);
// --> OD 2005-08-24 #i53725# - absolute positioned objects have to be
// anchored at-paragraph to assure its correct anchor position.
- eAnchor = FLY_AT_CNTNT;
+ eAnchor = FLY_AT_PARA;
// <--
switch (nYBind)
{
@@ -2287,7 +2279,7 @@ void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM)
Reader::ResetFrmFmtAttrs(*this); // Abstand/Umrandung raus
Put(SvxLRSpaceItem(RES_LR_SPACE)); //inline writer ole2 objects start with 0.2cm l/r
- SwFmtAnchor aAnchor(FLY_IN_CNTNT);
+ SwFmtAnchor aAnchor(FLY_AS_CHAR);
aAnchor.SetAnchor(pPaM->GetPoint());
Put(aAnchor);
@@ -2519,8 +2511,10 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
pWWZOrder->InsertTextLayerObject(pOurNewObject);
}
- if (FLY_IN_CNTNT != pSFlyPara->eAnchor)
+ if (FLY_AS_CHAR != pSFlyPara->eAnchor)
+ {
pAnchorStck->AddAnchor(*pPaM->GetPoint(),pSFlyPara->pFlyFmt);
+ }
// merke Pos im Haupttext
pSFlyPara->pMainTextPos = new SwPosition( *pPaM->GetPoint() );
@@ -3206,7 +3200,7 @@ SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion)
subscripting to force the graphic into a centered position on the line, so
we must check when applying sub/super to see if it the subscript range
contains only a single graphic, and if that graphic is anchored as
- FLY_IN_CNTNT and then we can change its anchoring to centered in the line.
+ FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
SwFrmFmt *pRet=0;
SwNodeIndex aBegin(rRegion.Start()->nNode);
@@ -3223,8 +3217,8 @@ SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion)
{
const SwFmtFlyCnt& rFly = pTFlyAttr->GetFlyCnt();
SwFrmFmt *pFlyFmt = rFly.GetFrmFmt();
- if( pFlyFmt &&
- FLY_IN_CNTNT == pFlyFmt->GetAnchor().GetAnchorId() )
+ if (pFlyFmt &&
+ (FLY_AS_CHAR == pFlyFmt->GetAnchor().GetAnchorId()))
{
pRet = pFlyFmt;
}
@@ -3240,7 +3234,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
subscripting to force the graphic into a centered position on the line, so
we must check when applying sub/super to see if it the subscript range
contains only a single graphic, and if that graphic is anchored as
- FLY_IN_CNTNT and then we can change its anchoring to centered in the line.
+ FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
bool bIsGraphicPlacementHack = false;
USHORT nPos;
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 9b653c5eb33d..13a0db1a278d 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -33,7 +33,8 @@
#include "XMLRedlineImportHelper.hxx"
-#include "unoobj.hxx"
+#include <unotextcursor.hxx>
+#include <unotextrange.hxx>
#include <unocrsr.hxx>
#include "doc.hxx"
#include <tools/datetime.hxx>
@@ -161,7 +162,7 @@ void XTextRangeOrNodeIndexPosition::SetAsNodeIndex(
#ifdef DBG_UTIL
sal_Bool bSuccess =
#endif
- SwXTextRange::XTextRangeToSwPaM( aPaM, rRange);
+ ::sw::XTextRangeToSwPaM(aPaM, rRange);
DBG_ASSERT(bSuccess, "illegal range");
// PaM -> Index
@@ -179,7 +180,7 @@ void XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos)
#ifdef DBG_UTIL
sal_Bool bSuccess =
#endif
- SwXTextRange::XTextRangeToSwPaM(aUnoPaM, xRange);
+ ::sw::XTextRangeToSwPaM(aUnoPaM, xRange);
DBG_ASSERT(bSuccess, "illegal range");
rPos = *aUnoPaM.GetPoint();
@@ -499,11 +500,11 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection(
// create (UNO-) cursor
SwPosition aPos(*pRedlineNode);
- SwXTextCursor* pCursor =
- new SwXTextCursor(pXText, aPos, CURSOR_REDLINE, pDoc);
- pCursor->GetCrsr()->Move(fnMoveForward, fnGoNode);
-
- xReturn = (XWordCursor*)pCursor; // cast to avoid ambigiouty
+ SwXTextCursor *const pXCursor =
+ new SwXTextCursor(*pDoc, pXText, CURSOR_REDLINE, aPos);
+ pXCursor->GetCursor()->Move(fnMoveForward, fnGoNode);
+ // cast to avoid ambiguity
+ xReturn = static_cast<text::XWordCursor*>(pXCursor);
}
// else: unknown redline -> Ignore
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 667ae829edb8..49a2dd420533 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -72,7 +72,7 @@
#include <fltini.hxx>
#include <doc.hxx>
#include <docsh.hxx>
-#include <unoobj.hxx>
+#include <unotextrange.hxx>
#include <swmodule.hxx>
#include <SwXMLSectionList.hxx>
@@ -788,9 +788,8 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
}
else if( bInsertMode )
{
- uno::Reference<XTextRange> xInsertTextRange =
- SwXTextRange::CreateTextRangeFromPosition( &rDoc, *rPaM.GetPoint(),
- 0 );
+ const uno::Reference<text::XTextRange> xInsertTextRange =
+ SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), 0);
OUString sTextInsertModeRange(
RTL_CONSTASCII_USTRINGPARAM("TextInsertModeRange"));
xInfoSet->setPropertyValue( sTextInsertModeRange,
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index cd3c5d1734d4..98009fccef38 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -31,7 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -41,7 +40,6 @@
#include <com/sun/star/xforms/XFormsSupplier.hpp>
#include <svx/svdmodel.hxx>
#include <svx/svdpage.hxx>
-#include <svx/xmlgrhlp.hxx>
#include <svx/xmleohlp.hxx>
#include <svx/xmlgrhlp.hxx>
#include <svx/eeitem.hxx>
@@ -58,7 +56,7 @@
#include <docsh.hxx>
#include <docstat.hxx>
#include <swerror.h>
-#include <unoobj.hxx>
+#include <unotext.hxx>
#include <xmltexte.hxx>
#include <xmlexp.hxx>
#include <sfx2/viewsh.hxx>
@@ -76,6 +74,7 @@
#include <pausethreadstarting.hxx>
// <--
+
using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index ad86a2d8cf26..e279b205d4f5 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -43,7 +43,6 @@
#include <format.hxx>
#include <fmtcol.hxx>
#include <hints.hxx>
-#include <unoobj.hxx>
#include <poolfmt.hxx>
#include <charfmt.hxx>
#include <paratr.hxx>
@@ -57,19 +56,11 @@
#include <xmloff/xmltkmap.hxx>
#include "xmlitem.hxx"
#include <xmloff/xmlstyle.hxx>
-#ifndef _XMLOFF_TXTSTYLI_HXX
#include <xmloff/txtstyli.hxx>
-#endif
-#ifndef _XMLOFF_TXTIMP_HXX
#include <xmloff/txtimp.hxx>
-#endif
-#ifndef _XMLOFF_FAMILIES_HXX
#include <xmloff/families.hxx>
-#endif
#include <xmloff/XMLTextMasterStylesContext.hxx>
-#ifndef _XMLOFF_XMLTEXTSHAPESTYLECONTEXT_HXX
#include <xmloff/XMLTextShapeStyleContext.hxx>
-#endif
#include <xmloff/XMLGraphicsDefaultStyle.hxx>
#include "xmlimp.hxx"
#include "xmltbli.hxx"
@@ -79,6 +70,7 @@
#include <unotxdoc.hxx>
#include <docsh.hxx>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx
index 1edeb1fc846a..3fc753058f3c 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -31,15 +31,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include "hintids.hxx"
#include <com/sun/star/text/XTextDocument.hpp>
#include <xmloff/XMLFontAutoStylePool.hxx>
#include <svx/fontitem.hxx>
-#include <unoobj.hxx>
+#include <unotext.hxx>
#include <doc.hxx>
#include <xmlexp.hxx>
+
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::text;
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 17b95cd310af..2d657d6b6e43 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -30,6 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -38,19 +39,17 @@
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/xmlictxt.hxx>
-#ifndef _XMLOFF_TXTIMP_HXX
#include <xmloff/txtimp.hxx>
-#endif
#include <xmloff/nmspmap.hxx>
-#ifndef _XMLOFF_XMLTEXTSHAPEIMPORTHELPER_HXX_
#include <xmloff/XMLTextShapeImportHelper.hxx>
-#endif
#include <xmloff/XMLFontStylesContext.hxx>
#include <xmloff/ProgressBarHelper.hxx>
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
#include <doc.hxx>
-#include <unoobj.hxx>
+#include <TextCursorHelper.hxx>
+#include <unotext.hxx>
+#include <unotextrange.hxx>
#include "unocrsr.hxx"
#include <poolfmt.hxx>
#include <ndtxt.hxx>
@@ -714,9 +713,9 @@ void SwXMLImport::startDocument( void )
}
if( pCrsrSh )
{
- Reference<XTextRange> xInsertTextRange(
- SwXTextRange::CreateTextRangeFromPosition(
- pDoc, *pCrsrSh->GetCrsr()->GetPoint(), 0 ) );
+ const uno::Reference<text::XTextRange> xInsertTextRange(
+ SwXTextRange::CreateXTextRange(
+ *pDoc, *pCrsrSh->GetCrsr()->GetPoint(), 0 ) );
setTextInsertMode( xInsertTextRange );
xTextCursor = GetTextImport()->GetCursor();
pTxtCrsr = 0;
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index e9acd9a7ab77..733bf0749faf 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -45,7 +45,6 @@
#include "docstat.hxx"
#include "docsh.hxx"
#include <doc.hxx>
-#include <unoobj.hxx>
#include "xmlimp.hxx"
#include "xmlexp.hxx"
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 13cb894d6e1f..8ee30bf147db 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -31,10 +31,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextSection.hpp>
#include <hintids.hxx>
#include <rtl/ustrbuf.hxx>
-#include <com/sun/star/text/XTextTable.hpp>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmluconv.hxx>
@@ -44,9 +45,7 @@
#include <svx/brshitem.hxx>
#include <svx/boxitem.hxx>
#include <fmtrowsplt.hxx>
-#ifndef _SVX_FRAMEDIRITEM_HXX
#include <svx/frmdiritem.hxx>
-#endif
#include <list>
#include "swtable.hxx"
@@ -62,7 +61,6 @@
#include <ndole.hxx>
#include <xmloff/nmspmap.hxx>
#include <sfx2/linkmgr.hxx> // for cTokenSeperator
-#include "unoobj.hxx"
#include "unotbl.hxx"
#include "xmltexte.hxx"
#include "xmlexp.hxx"
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 07c09631b531..c88c4abe6443 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -32,7 +32,6 @@
#include "precompiled_sw.hxx"
-
#include "hintids.hxx"
#include <limits.h>
@@ -58,6 +57,7 @@
#include "swtblfmt.hxx"
#include "pam.hxx"
#include "unotbl.hxx"
+#include "unotextrange.hxx"
#include "unocrsr.hxx"
#include "cellatr.hxx"
#include "swddetbl.hxx"
@@ -2926,8 +2926,8 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
SwPosition aPos( *pCNd );
aPos.nContent.Assign( pCNd, 0U );
- Reference < XTextRange > xTextRange =
- SwXTextRange::CreateTextRangeFromPosition( pDoc, aPos, 0 );
+ const uno::Reference< text::XTextRange > xTextRange =
+ SwXTextRange::CreateXTextRange( *pDoc, aPos, 0 );
Reference < XText > xText = xTextRange->getText();
Reference < XTextCursor > xTextCursor =
xText->createTextCursorByRange( xTextRange );
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index c6ca53c00cb1..1ca9f5a83122 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -31,7 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <sot/clsids.hxx>
#include <com/sun/star/embed/XEmbedObjectCreator.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
@@ -44,13 +43,12 @@
#include <xmloff/families.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltoken.hxx>
-#ifndef _XMLOFF_TXTPRMAP_HXX
#include <xmloff/txtprmap.hxx>
-#endif
#include <svx/svdobj.hxx>
#include <doc.hxx>
#include <ndole.hxx>
+#include <fmtcntnt.hxx>
#include <unostyle.hxx>
#include <unoframe.hxx>
#include <ndgrf.hxx>
@@ -65,6 +63,7 @@
#include <sfx2/frmdescr.hxx>
#include <SwStyleNameMapper.hxx>
+
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
using namespace ::com::sun::star;
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 47a1957ee41b..34356f3237ad 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -47,17 +47,16 @@
#include <xmloff/prstylei.hxx>
#include <xmloff/maptype.hxx>
#include <xmloff/xmlprmap.hxx>
-#ifndef _XMLOFF_TXTPRMAP_HXX
#include <xmloff/txtprmap.hxx>
-#endif
#include <xmloff/i18nmap.hxx>
#include "unocrsr.hxx"
-#include "unoobj.hxx"
+#include "TextCursorHelper.hxx"
#include "unoframe.hxx"
#include "doc.hxx"
#include "unocoll.hxx"
#include <fmtfsize.hxx>
#include <fmtanchr.hxx>
+#include <fmtcntnt.hxx>
#include "xmlimp.hxx"
#include "xmltbli.hxx"
#include "xmltexti.hxx"
@@ -76,6 +75,7 @@
#include <svtools/embedhlp.hxx>
#include <svl/urihelper.hxx>
+
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
using namespace ::com::sun::star;
@@ -126,7 +126,7 @@ static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet,
rItemSet.Put( SwFmtFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) );
}
- SwFmtAnchor aAnchor( FLY_AUTO_CNTNT );
+ SwFmtAnchor aAnchor( FLY_AT_CHAR );
rItemSet.Put( aAnchor );
if( pTwipWidth )