Kaydet (Commit) 0b7c8569 authored tarafından Luke Deller's avatar Luke Deller Kaydeden (comit) Caolán McNamara

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/8781Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst fe3dff30
...@@ -653,13 +653,19 @@ OUString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit, ...@@ -653,13 +653,19 @@ OUString SvxBorderLine::GetValueString( SfxMapUnit eSrcUnit,
RID_EMBOSSED, RID_EMBOSSED,
RID_ENGRAVED, RID_ENGRAVED,
RID_OUTSET, 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); 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); aStr += EE_RESSTR(nResId);
}
else else
{ {
OUString sMetric = EE_RESSTR(GetMetricId( eDestUnit )); OUString sMetric = EE_RESSTR(GetMetricId( eDestUnit ));
......
...@@ -588,6 +588,22 @@ String RID_OUTSET ...@@ -588,6 +588,22 @@ String RID_OUTSET
{ {
Text [ en-US ] = "Outset" ; Text [ en-US ] = "Outset" ;
}; };
String RID_FINE_DASHED
{
Text [ en-US ] = "Single, fine dashed";
};
String RID_DOUBLE_THIN
{
Text [ en-US ] = "Double, fixed thin lines";
};
String RID_DASH_DOT
{
Text [ en-US ] = "Single, dash-dot";
};
String RID_DASH_DOT_DOT
{
Text [ en-US ] = "Single, dash-dot-dot";
};
String RID_SVXITEMS_METRIC_MM String RID_SVXITEMS_METRIC_MM
{ {
Text [ en-US ] = "mm" ; Text [ en-US ] = "mm" ;
......
...@@ -282,6 +282,9 @@ ...@@ -282,6 +282,9 @@
#define RID_ENGRAVED (RID_EDIT_START + 245) #define RID_ENGRAVED (RID_EDIT_START + 245)
#define RID_OUTSET (RID_EDIT_START + 246) #define RID_OUTSET (RID_EDIT_START + 246)
#define RID_INSET (RID_EDIT_START + 247) #define RID_INSET (RID_EDIT_START + 247)
#define RID_FINE_DASHED (RID_EDIT_START + 248)
#define RID_DOUBLE_THIN (RID_EDIT_START + 249)
// border lines continue at RID_EDIT_START + 330
// Metric-Text // Metric-Text
#define RID_SVXITEMS_METRIC_MM (RID_EDIT_START + 250) #define RID_SVXITEMS_METRIC_MM (RID_EDIT_START + 250)
...@@ -385,7 +388,11 @@ ...@@ -385,7 +388,11 @@
#define RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION (RID_EDIT_START + 328) #define RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION (RID_EDIT_START + 328)
#define RID_SVXSTR_A11Y_PARAGRAPH_NAME (RID_EDIT_START + 329) #define RID_SVXSTR_A11Y_PARAGRAPH_NAME (RID_EDIT_START + 329)
#if 329 > (RID_EDIT_END-RID_EDIT_START) // Border lines (continued)
#define RID_DASH_DOT (RID_EDIT_START + 330)
#define RID_DASH_DOT_DOT (RID_EDIT_START + 331)
#if 331 > (RID_EDIT_END-RID_EDIT_START)
#error Resource-Ueberlauf in #line, #file #error Resource-Ueberlauf in #line, #file
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment