diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-10-08 16:44:09 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2019-10-09 17:52:48 +0200 |
commit | 59cbf34740bead037b0aed1ece24870324365b7a (patch) | |
tree | dd7c5a74927e47b548cf814f931f71a8b4826b24 /desktop | |
parent | a487021dcf1b540913477d537ba24d0cc462da93 (diff) |
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.kara@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
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 |