vcl/source/image/ImplImageTree.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit fb02d9f64198635e2c3c1593816ba8ec75782f9f Author: Muhammet Kara <[email protected]> AuthorDate: Wed Mar 27 20:45:24 2019 +0300 Commit: Andras Timar <[email protected]> CommitDate: Wed Mar 27 21:47:03 2019 +0100 Fix icon load error for uno commands with params Change-Id: I80be21b551cbd4eb029cb660fca98aef2727d584 Reviewed-on: https://gerrit.libreoffice.org/69850 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index 30d9d9d38b7d..1a41d175a0b1 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -291,6 +291,21 @@ bool ImplImageTree::loadImage(OUString const & rName, OUString const & rStyle, B aCurrentStyle = fallbackStyle(aCurrentStyle); } + + /* If the uno command has parameters, passed in from a toolbar, + * recover from failure by removing the parameters from the file name + */ + if (rName.indexOf("%3f") > 0) + { + OUString sName(rName); + sal_Int32 nStart = sName.indexOf("%3f"); + sal_Int32 nEnd = sName.lastIndexOf("."); + + sName = sName.replaceAt(nStart, nEnd - nStart, ""); + + return loadImage(sName, rStyle, rBitmap, localized, eFlags, nScalePercentage); + } + return false; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
