[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Feb 21 12:47:38 UTC 2019


 sw/source/uibase/shells/textsh1.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6415b0c49c8dffc3d27920b9422531d5debcf767
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Feb 20 21:58:52 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Feb 21 13:47:14 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>

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);


More information about the Libreoffice-commits mailing list