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

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 10 08:42:57 UTC 2020


 sw/source/core/crsr/swcrsr.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit cb28054d831c38ef645f635ecd80475fb5735679
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jun 9 11:36:06 2020 +0200
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Wed Jun 10 10:42:18 2020 +0200

    tdf#133641 sw: fix crash double-clicking CH_TXT_ATR_FORMELEMENT
    
    Only search for separator if there is one.
    
    (regression from 1c94842e053a20a739a181d38a35c324df3e62a7)
    
    Change-Id: I6697faa7cb83cab48084f9710f8c5018b9e738e2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95905
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 9a7c84a44b9f..9756c57dee3f 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1422,7 +1422,8 @@ bool SwCursor::SelectWordWT( SwViewShell const * pViewShell, sal_Int16 nWordType
         // Should we select the whole fieldmark?
         const IDocumentMarkAccess* pMarksAccess = GetDoc()->getIDocumentMarkAccess( );
         sw::mark::IFieldmark const*const pMark(pMarksAccess->getFieldmarkFor(*GetPoint()));
-        if ( pMark )
+        if (pMark && (IDocumentMarkAccess::GetType(*pMark) == IDocumentMarkAccess::MarkType::TEXT_FIELDMARK
+                      || IDocumentMarkAccess::GetType(*pMark) == IDocumentMarkAccess::MarkType::DATE_FIELDMARK))
         {
             *GetPoint() = sw::mark::FindFieldSep(*pMark);
             ++GetPoint()->nContent; // Don't select the separator


More information about the Libreoffice-commits mailing list