From a42cc82de16d2fb142624a86b892f81522814698 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 18 Feb 2018 11:18:32 +0100 Subject: tdf#114756: fix connector dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bt: 0 0x00007fffef4738d3 in SdrEdgeKindItem::GetValueTextByPos(unsigned short) const (this=0x5555587ff770, nPos=0) at /home/julien/lo/libreoffice/svx/source/svdraw/svdattr.cxx:1307 1 0x00007fffba50f71b in SvxConnectionPage::FillTypeLB() (this=0x55555c4d2a90) at /home/julien/lo/libreoffice/cui/source/tabpages/connect.cxx:507 2 0x00007fffba50be46 in SvxConnectionPage::SvxConnectionPage(vcl::Window*, SfxItemSet const&) (this=0x55555c4d2a90, pWindow=0x55555c46cc70, rInAttrs= SfxItemSet of pool 0x555557883790 with parent 0x0 and Which ranges: [(1000, 1234), (4003, 4057)], __in_chrg=, __vtt_parm=) at /home/julien/lo/libreoffice/cui/source/tabpages/connect.cxx:98 See https://bugs.documentfoundation.org/attachment.cgi?id=139972 Change-Id: I24ba9e0140668d666da686e3f8a05587b46e923f Reviewed-on: https://gerrit.libreoffice.org/49924 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit a2721ba03e61a476838d3c518505b05a12ad2a5b) Reviewed-on: https://gerrit.libreoffice.org/49973 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- svx/source/svdraw/svdattr.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'svx/source') diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index e7447041e23b..a6f6af0391e9 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -1304,7 +1304,15 @@ sal_uInt16 SdrEdgeKindItem::GetValueCount() const { return 4; } OUString SdrEdgeKindItem::GetValueTextByPos(sal_uInt16 nPos) const { - return ImpGetResStr(STR_ItemValEDGE_ORTHOLINES+nPos); + static const char* ITEMVALEDGES[] = + { + STR_ItemValEDGE_ORTHOLINES, + STR_ItemValEDGE_THREELINES, + STR_ItemValEDGE_ONELINE, + STR_ItemValEDGE_BEZIER + }; + assert(nPos < SAL_N_ELEMENTS(ITEMVALEDGES) && "wrong pos!"); + return ImpGetResStr(ITEMVALEDGES[nPos]); } bool SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres, -- cgit v1.2.3