svx/source/svdraw/svdattr.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit a42cc82de16d2fb142624a86b892f81522814698
Author: Julien Nabet <serval2...@yahoo.fr>
Date:   Sun Feb 18 11:18:32 2018 +0100

    tdf#114756: fix connector dropdown
    
    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=<optimized out>, __vtt_parm=<optimized 
out>)
        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 <c...@libreoffice.org>
    Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>
    (cherry picked from commit a2721ba03e61a476838d3c518505b05a12ad2a5b)
    Reviewed-on: https://gerrit.libreoffice.org/49973
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

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,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to