summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxattributeoutput.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-19 13:03:36 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-10-26 20:51:04 +0200
commit98c8fefd8aa416a475a80675ef5d458d817b14fd (patch)
tree96b398aae0e028929aa6d52d0f764df7f35c2343 /sw/source/filter/ww8/docxattributeoutput.cxx
parentd5a9b1fe0a3452cf3e78535a98f3caa28648ab10 (diff)
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@cib.de>
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx13
1 files changed, 2 insertions, 11 deletions
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);