summaryrefslogtreecommitdiff
path: root/svx/source/dialog
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-05-23 17:17:18 +0200
committerEike Rathke <erack@redhat.com>2014-05-23 17:42:06 +0200
commit04ccece7299ac1e57488e5ef36af122edeec2aae (patch)
tree54a0330296bc2feb09ffc57a87b1820a319b187a /svx/source/dialog
parentc2ce981dfb40c36797620e8d026f616571b98082 (diff)
feedback color indicator for invalid tags
Change-Id: I235e32587779369c139aedd1961b37d8fcad8f53
Diffstat (limited to 'svx/source/dialog')
-rw-r--r--svx/source/dialog/langbox.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 4d9b3dd7ec9a..194a0d8a3f6d 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -707,6 +707,7 @@ sal_Int32 SvxLanguageComboBox::ImplGetSavedValue() const
IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ )
{
+ EditedAndValid eOldState = meEditedAndValid;
OUString aStr( vcl::I18nHelper::filterFormattingChars( GetText()));
if (aStr.isEmpty())
meEditedAndValid = EDITED_INVALID;
@@ -744,6 +745,24 @@ IMPL_LINK( SvxLanguageComboBox, EditModifyHdl, SvxLanguageComboBox*, /*pEd*/ )
}
}
}
+ if (eOldState != meEditedAndValid)
+ {
+ if (meEditedAndValid == EDITED_INVALID)
+ {
+#if 0
+ //! Gives white on white!?! instead of white on reddish.
+ SetControlBackground( ::Color( RGB_COLORDATA( 0xff, 0x65, 0x63)));
+ SetControlForeground( ::Color( COL_WHITE));
+#else
+ SetControlForeground( ::Color( RGB_COLORDATA( 0xf0, 0, 0)));
+#endif
+ }
+ else
+ {
+ SetControlForeground();
+ SetControlBackground();
+ }
+ }
return 0;
}