[Libreoffice-commits] core.git: svx/source
Eike Rathke
erack at redhat.com
Fri May 23 08:42:31 PDT 2014
svx/source/dialog/langbox.cxx | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
New commits:
commit 04ccece7299ac1e57488e5ef36af122edeec2aae
Author: Eike Rathke <erack at redhat.com>
Date: Fri May 23 17:17:18 2014 +0200
feedback color indicator for invalid tags
Change-Id: I235e32587779369c139aedd1961b37d8fcad8f53
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 4d9b3dd..194a0d8 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;
}
More information about the Libreoffice-commits
mailing list