desktop/source/lib/init.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
New commits: commit 59cbf34740bead037b0aed1ece24870324365b7a Author: Muhammet Kara <muhammet.k...@collabora.com> AuthorDate: Tue Oct 8 16:44:09 2019 +0300 Commit: Muhammet Kara <muhammet.k...@collabora.com> CommitDate: Wed Oct 9 17:52:48 2019 +0200 lok: Avoid accidental removal of filter options Change-Id: I178bcb19aa3073ea72a3bc8712e5e904665b1510 Reviewed-on: https://gerrit.libreoffice.org/80463 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.k...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index e468c3ed23f7..63fd3109788f 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2175,15 +2175,9 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha { int bIndex = aFilterOptions.indexOf("WATERMARKEND"); watermarkText = aFilterOptions.copy(aIndex+11, bIndex-(aIndex+11)); - if(aIndex > 0) - { - OUString temp = aFilterOptions.copy(0, aIndex); - aFilterOptions = temp + aFilterOptions.copy(bIndex+12); - } - else - { - aFilterOptions.clear(); - } + + OUString temp = aFilterOptions.copy(0, aIndex); + aFilterOptions = temp + aFilterOptions.copy(bIndex+12); } // 'TakeOwnership' == this is a 'real' SaveAs (that is, the document _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits