[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 26 18:51:34 UTC 2018


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

New commits:
commit 98c8fefd8aa416a475a80675ef5d458d817b14fd
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 13:03:36 2018 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Oct 26 20:51:04 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/62043
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 24e628d50bda..689bbbf8c712 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1555,17 +1555,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