[Libreoffice-commits] core.git: Branch 'feature/sidebar' - svx/source
Oliver-Rainer Wittmann
orw at apache.org
Fri May 10 05:00:38 PDT 2013
svx/source/sidebar/text/TextPropertyPanel.hrc | 2 ++
svx/source/sidebar/text/TextPropertyPanel.src | 5 +++++
svx/source/sidebar/text/TextUnderlineControl.cxx | 15 ++++++++++++---
3 files changed, 19 insertions(+), 3 deletions(-)
New commits:
commit 694e020504fb82bfbfbb4f371ff43a9d33e3054d
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Fri May 3 09:56:38 2013 +0000
Related: #i122140# add 'None' entry to underline style...
drop-down-list in text property panel
(cherry picked from commit 3c4045722f20bddddef9143c4f393e6f251f6d2d)
Change-Id: Ieffbd19318742dd133fce1b96d7cad2d7c457975
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hrc b/svx/source/sidebar/text/TextPropertyPanel.hrc
index 146d51c..0244ee5 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hrc
+++ b/svx/source/sidebar/text/TextPropertyPanel.hrc
@@ -91,6 +91,8 @@
#define IMG_DASH_DOT_DOT_SEL 48
#define IMG_WAVE_SEL 49
+#define STR_WITHOUT 50
+
//popup window font color
#define VS_FONT_COLOR 1
#define STR_AUTOMATICE 2
diff --git a/svx/source/sidebar/text/TextPropertyPanel.src b/svx/source/sidebar/text/TextPropertyPanel.src
index cd5ce56..d1ca9c3 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.src
+++ b/svx/source/sidebar/text/TextPropertyPanel.src
@@ -346,6 +346,11 @@ Control RID_POPUPPANEL_TEXTPAGE_UNDERLINE
ImageBitmap = Bitmap{File = "symphony/selected-line10.bmp";};
};
+ String STR_WITHOUT
+ {
+ Text [ en-US ] = "(Without)";
+ };
+
//tips
String STR_SINGLE
{
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index 2499f0a..8c2227b 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -80,6 +80,10 @@ void TextUnderlineControl::initial()
maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
+ // 'none' item
+ maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_NONEFIELD | WB_MENUSTYLEVALUESET );
+ maVSUnderline.SetText( String(SVX_RES(STR_WITHOUT) ) );
+
maVSUnderline.InsertItem(1, maIMGSingle ,String(SVX_RES(STR_SINGLE)));
maVSUnderline.SetItemData(1, (void*)(sal_uInt64)UNDERLINE_SINGLE);
@@ -185,6 +189,9 @@ void TextUnderlineControl::Rearrange(FontUnderline eLine)
maVSUnderline.GrabFocus();
break;
case UNDERLINE_NONE:
+ maVSUnderline.SelectItem(0);
+ maVSUnderline.GrabFocus();
+ break;
default:
maVSUnderline.SelectItem(1);
maVSUnderline.SetNoSelection();
@@ -196,10 +203,12 @@ void TextUnderlineControl::Rearrange(FontUnderline eLine)
IMPL_LINK(TextUnderlineControl, VSSelectHdl, void *, pControl)
{
- if(pControl == &maVSUnderline)
+ if ( pControl == &maVSUnderline )
{
- sal_uInt16 iPos = maVSUnderline.GetSelectItemId();
- FontUnderline eUnderline = (FontUnderline)(sal_uInt64)maVSUnderline.GetItemData( iPos );
+ const sal_uInt16 iPos = maVSUnderline.GetSelectItemId();
+ const FontUnderline eUnderline = ( iPos == 0 )
+ ? UNDERLINE_NONE
+ : (FontUnderline)(sal_uInt64)maVSUnderline.GetItemData( iPos );
SvxUnderlineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE);
More information about the Libreoffice-commits
mailing list