sfx2/source/doc/templatedlg.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
New commits: commit 85ea267b7a8fbd5859569db6ef7ac8dd1bd9bcd1 Author: Akshay Deep <akshaydeepi...@gmail.com> Date: Sat May 21 12:37:16 2016 +0530 New Template Manager: Improved search for templates Change-Id: I0a94abe09d82a58d892eb83aea0952d28aeb05ea Reviewed-on: https://gerrit.libreoffice.org/25249 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 848aeb8..2810ef5 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -127,7 +127,18 @@ public: bRet = aExt == "otg" || aExt == "std"; } - return bRet && rItem.aName.matchIgnoreAsciiCase(maKeyword); + return bRet && MatchSubstring(rItem.aName); + } + + bool MatchSubstring( OUString sItemName ) + { + if(maKeyword.isEmpty()) + return false; + sItemName = sItemName.toAsciiLowerCase(); + maKeyword = maKeyword.toAsciiLowerCase(); + if(sItemName.indexOf(maKeyword) >= 0) + return true; + return false; } private: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits