diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-02-20 21:58:52 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-02-21 13:47:14 +0100 |
commit | 6415b0c49c8dffc3d27920b9422531d5debcf767 (patch) | |
tree | ccb183127bed5b237f6d8337154b17dfa2a151bb | |
parent | b1f4bc27c0a6ec868bcce969f87aaf8ffc8b9d1f (diff) |
sw: fix warning in SwTextShell::GetState()
warn:sw.core:31398:31398:sw/source/core/bastyp/index.cxx:322: SwIndex::operator--() wraps around
Change-Id: I5c37a6b5e1fe24bc3b6b84e762bad6577583f3d8
Reviewed-on: https://gerrit.libreoffice.org/68127
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 606239c32398..63d0fe8967a5 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1950,7 +1950,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) // Enable it if we have a valid object other than what form shell knows SwPosition aPos(*GetShell().GetCursor()->GetPoint()); sw::mark::IFieldmark* pFieldBM = GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos); - if ( !pFieldBM ) + if ( !pFieldBM && aPos.nContent.GetIndex() > 0) { --aPos.nContent; pFieldBM = GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos); |