summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-02-20 21:58:52 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-02-25 10:29:33 +0100
commit014ea0d29edce72b0e4b9b5cc6c1760ee8ea5fd1 (patch)
treeb45c92cfe0a60baa755e87cc37b1992cbcf40409
parentda79a587f359538a5444bfe64e4ada0a8394f7a4 (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> (cherry picked from commit 6415b0c49c8dffc3d27920b9422531d5debcf767) Reviewed-on: https://gerrit.libreoffice.org/68241 Tested-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 71c873313452..5b52a95ffa41 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1966,7 +1966,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);