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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 20 11:49:35 UTC 2018


 sw/source/filter/ww8/docxattributeoutput.cxx |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 7f0b7410e84a222d8fbee7c4fadd3b40028a068d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 13:03:36 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 20 13:49:14 2018 +0200

    permissionIdAndName is empty in permission-for-user case
    
    merge the two identical branches and make it do what it probably wants to do
    
    Change-Id: I38390a18fcd90349c6bd86f14c67850166b6aeaa
    Reviewed-on: https://gerrit.libreoffice.org/62001
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a759adc24d1a..a71ab90cc5b3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1558,17 +1558,8 @@ void DocxAttributeOutput::DoWritePermissionTagEnd(const OUString & permission)
 {
     OUString permissionIdAndName;
 
-    if (permission.startsWith("permission-for-group:", &permissionIdAndName))
-    {
-        const sal_Int32 sparatorIndex = permissionIdAndName.indexOf(':');
-        const OUString permissionId   = permissionIdAndName.copy(0, sparatorIndex);
-        const OString rId             = OUStringToOString(BookmarkToWord(permissionId), RTL_TEXTENCODING_UTF8).getStr();
-
-        m_pSerializer->singleElementNS(XML_w, XML_permEnd,
-            FSNS(XML_w, XML_id), rId.getStr(),
-            FSEND);
-    }
-    else // if (permission.startsWith("permission-for-user:", &permissionIdAndName))
+    if (permission.startsWith("permission-for-group:", &permissionIdAndName) ||
+        permission.startsWith("permission-for-user:", &permissionIdAndName))
     {
         const sal_Int32 sparatorIndex = permissionIdAndName.indexOf(':');
         const OUString permissionId   = permissionIdAndName.copy(0, sparatorIndex);


More information about the Libreoffice-commits mailing list