diff options
author | Jim Raykowski <raykowj@gmail.com> | 2020-09-22 23:03:32 -0800 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-23 12:51:36 +0200 |
commit | 2f135f9e319beb0aea28c26eb9e39e50a6851a6e (patch) | |
tree | 939164881721856076f139fd5659c44e44e89975 | |
parent | fd9422febc384208558487bfe4a69ec89ab0ddca (diff) |
tdf#127729 Don't include empty string presentations in search
description text
Change-Id: Ica123561e46b63368c73065595a91701814eafa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103228
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 6a989cb2f2a5..78d7a5676f44 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2140,7 +2140,13 @@ OUString& SvxSearchDialog::BuildAttrText_Impl( OUString& rStr, { OUString aStr; rPool.GetPresentation(*rItem.pItem, eMapUnit, aStr, aIntlWrapper); - rStr += aStr; + if (aStr.isEmpty()) + { + if (rStr.endsWith(", ")) + rStr = rStr.copy(0, rStr.lastIndexOf(",")); + } + else + rStr += aStr; } else if ( rItem.nSlot == SID_ATTR_BRUSH_CHAR ) { |