summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/textfld.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/shells/textfld.cxx')
-rw-r--r--sw/source/uibase/shells/textfld.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index ea78347f73a9..c65d5d65da6a 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -691,9 +691,10 @@ FIELD_INSERT:
if(bSuccess)
{
IDocumentMarkAccess* pMarksAccess = rSh.GetDoc()->getIDocumentMarkAccess();
- SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex()-5,
+ SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex() - ODF_FORMFIELD_DEFAULT_LENGTH,
pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex());
- pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), ODF_FORMTEXT);
+ pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), ODF_FORMTEXT,
+ aFieldPam.Start());
}
}
@@ -744,9 +745,10 @@ FIELD_INSERT:
if(bSuccess)
{
IDocumentMarkAccess* pMarksAccess = rSh.GetDoc()->getIDocumentMarkAccess();
- SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex()-5,
+ SwPaM aFieldPam(pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex() - ODF_FORMFIELD_DEFAULT_LENGTH,
pCursorPos->GetPoint()->nNode, pCursorPos->GetPoint()->nContent.GetIndex());
- sw::mark::IFieldmark* pFieldBM = pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), ODF_FORMDATE);
+ sw::mark::IFieldmark* pFieldBM = pMarksAccess->makeFieldBookmark(aFieldPam, OUString(), ODF_FORMDATE,
+ aFieldPam.Start());
// Use a default date format and language
sw::mark::IFieldmark::parameter_map_t* pParameters = pFieldBM->GetParameters();