summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docfld.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-25 12:34:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-26 07:54:04 +0200
commit3caade9b4734245471347c7eb20090607d70f7b7 (patch)
tree2673fe74bab981e3451f42dd1d874e04d9e652e1 /sw/source/core/doc/docfld.cxx
parent5df1bb4b1b222be00d25097660c4ee33542896ea (diff)
simplify some use of SwPosition
by moving the const_cast inside the constructor Change-Id: I1b43a6d3759de250475f0ebc7d65449ff800b570 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137405 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/doc/docfld.cxx')
-rw-r--r--sw/source/core/doc/docfld.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 294be63631e4..b32e3e05e59d 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -1068,7 +1068,7 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, SwFieldIds nFiel
Point aPt;
std::pair<Point, bool> const tmp(aPt, false);
// need pos to get the frame on the correct page
- SwPosition const pos(const_cast<SwTextNode&>(rTextNd), rTField.GetStart());
+ SwPosition const pos(rTextNd, rTField.GetStart());
const SwFrame* pFrame = rTextNd.getLayoutFrame(
rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), &pos, &tmp);