diff options
author | Luke Deller <luke@deller.id.au> | 2014-03-28 23:01:44 +1100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-31 15:30:50 +0000 |
commit | 0b7c8569782ecc5023d221f2063a664d008beb7b (patch) | |
tree | 7c37d6c38d37881dbbc6a7beb5bae855d9177250 /editeng/source/items/borderline.cxx | |
parent | fe3dff30205d4b6b276e3687edda48c19de1547f (diff) |
Presentation string for recently-added border types
LibreOffice will show a textual description of a style in some contexts
eg in the Organizer tab of the dialog for modifying a style.
This change updates the description of border line types to support
recently-added types: FINE_DASHED, DOUBLE_THIN, DASH_DOT, DASH_DOT_DOT
Also this fixes an out-of-bounds array access in
SvxBorderLine::GetValueString
Change-Id: Ia354a05ab1455eb8bcc079c6e51419a0cc6429d6
Reviewed-on: https://gerrit.libreoffice.org/8781
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng/source/items/borderline.cxx')
-rw-r--r-- | editeng/source/items/borderline.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 1edc7d129106..a2a77d1332bc 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -653,13 +653,19 @@ OUString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, RID_EMBOSSED, RID_ENGRAVED, RID_OUTSET, - RID_INSET + RID_INSET, + RID_FINE_DASHED, + RID_DOUBLE_THIN, + RID_DASH_DOT, + RID_DASH_DOT_DOT }; - sal_uInt16 nResId = aStyleIds[m_nStyle]; OUString aStr = "(" + ::GetColorString( aColor ) + OUString(cpDelim); - if ( nResId ) + if ( m_nStyle < sizeof(aStyleIds)/sizeof(*aStyleIds) ) + { + sal_uInt16 nResId = aStyleIds[m_nStyle]; aStr += EE_RESSTR(nResId); + } else { OUString sMetric = EE_RESSTR(GetMetricId( eDestUnit )); |