summaryrefslogtreecommitdiff
path: root/sw/source/core/fields/expfld.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/fields/expfld.cxx')
-rw-r--r--sw/source/core/fields/expfld.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index ccb47233753d..05a8dee4253e 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -31,7 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <unotools/collatorwrapper.hxx>
#include <unotools/charclass.hxx>
@@ -41,6 +40,7 @@
#include <svx/fontitem.hxx>
#include <com/sun/star/text/SetVariableType.hpp>
#include <unofield.hxx>
+#include <frmfmt.hxx>
#include <fmtfld.hxx>
#include <txtfld.hxx>
#include <fmtanchr.hxx>
@@ -64,9 +64,7 @@
#include <swtable.hxx>
#include <breakit.hxx>
#include <SwStyleNameMapper.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <numrule.hxx>
using namespace ::com::sun::star;
@@ -187,17 +185,20 @@ const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos,
pLayout = (SwLayoutFrm*)((SwFlyFrm*)pLayout)->GetAnchorFrm();
continue;
}
- else if( FLY_AT_CNTNT == rAnchor.GetAnchorId() ||
- FLY_AUTO_CNTNT == rAnchor.GetAnchorId() ||
- FLY_IN_CNTNT == rAnchor.GetAnchorId() )
+ else if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
+ (FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
+ (FLY_AS_CHAR == rAnchor.GetAnchorId()))
{
ASSERT( rAnchor.GetCntntAnchor(), "keine gueltige Position" );
rPos = *rAnchor.GetCntntAnchor();
pTxtNode = rPos.nNode.GetNode().GetTxtNode();
- if( FLY_AT_CNTNT == rAnchor.GetAnchorId() )
- ((SwTxtNode*)pTxtNode)->MakeStartIndex( &rPos.nContent );
+ if ( FLY_AT_PARA == rAnchor.GetAnchorId() )
+ {
+ const_cast<SwTxtNode*>(pTxtNode)->MakeStartIndex(
+ &rPos.nContent );
// oder doch besser das Ende vom (Anker-)TextNode nehmen ??
// ((SwTxtNode*)pTxtNode)->MakeEndIndex( &rPos.nContent );
+ }
// noch nicht abbrechen, kann ja auch noch im
// Header/Footer/Footnote/Fly stehen !!