Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2175

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/75/2175/1

SwDoc::Overwrite: probably a bad idea to overwrite fieldmarks

Change-Id: Iba94df67c21514cf4f5361bab28629c6d5d9d3e8
(cherry picked from commit 447bb5b5006051672ec526b75bec7db02d2db82e)
---
M sw/source/core/doc/docedt.cxx
1 file changed, 12 insertions(+), 2 deletions(-)



diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 693e2bf..47829ea 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -159,8 +159,18 @@
 static bool lcl_MayOverwrite( const SwTxtNode *pNode, const xub_StrLen nPos )
 {
     sal_Unicode cChr = pNode->GetTxt().GetChar( nPos );
-    return !( ( CH_TXTATR_BREAKWORD == cChr || CH_TXTATR_INWORD == cChr ) &&
-              (0 != pNode->GetTxtAttrForCharAt( nPos ) ) );
+    switch (cChr)
+    {
+        case CH_TXTATR_BREAKWORD:
+        case CH_TXTATR_INWORD:
+            return !pNode->GetTxtAttrForCharAt(nPos);// how could there be none?
+        case CH_TXT_ATR_FIELDSTART:
+        case CH_TXT_ATR_FIELDEND:
+        case CH_TXT_ATR_FORMELEMENT:
+            return false;
+        default:
+            return true;
+    }
 }
 
 static void lcl_SkipAttr( const SwTxtNode *pNode, SwIndex &rIdx, xub_StrLen &rStart )

-- 
To view, visit https://gerrit.libreoffice.org/2175
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba94df67c21514cf4f5361bab28629c6d5d9d3e8
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Michael Stahl <mstahl@redhat.com>

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.