[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 25 09:29:54 UTC 2019
sw/source/uibase/shells/textsh1.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 014ea0d29edce72b0e4b9b5cc6c1760ee8ea5fd1
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Feb 20 21:58:52 2019 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Feb 25 10:29:33 2019 +0100
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 at collabora.com>
(cherry picked from commit 6415b0c49c8dffc3d27920b9422531d5debcf767)
Reviewed-on: https://gerrit.libreoffice.org/68241
Tested-by: Miklos Vajna <vmiklos at collabora.com>
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);
More information about the Libreoffice-commits
mailing list