diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2012-07-11 00:16:18 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-07-14 16:07:39 +0200 |
commit | feca4833447be51e97bcd8f1672e5256bf8c27b2 (patch) | |
tree | b31e4145864a36e99103965a9c44cb4fa5a1631f | |
parent | 9b3348597520781497082a09b1ff8fb4a8709463 (diff) |
Simplify code and correct the erroneous length parameter for "macro:///" and align text
Change-Id: Id9eef27636c5c74857ed05b891514bee70903c3b
-rw-r--r-- | framework/source/lomenubar/MenuItemStatusListener.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/framework/source/lomenubar/MenuItemStatusListener.cxx b/framework/source/lomenubar/MenuItemStatusListener.cxx index e57c53acc958..16a40de5858b 100644 --- a/framework/source/lomenubar/MenuItemStatusListener.cxx +++ b/framework/source/lomenubar/MenuItemStatusListener.cxx @@ -58,17 +58,17 @@ MenuItemStatusListener::statusChanged(const FeatureStateEvent& Event) //For some reason, URLs can slip through as labels, we make sure //this doesn't happen. if ((Event.State >>= oULabel) && - !oULabel.matchAsciiL ("private:", 8, 0) && - !oULabel.matchAsciiL (".uno:", 5, 0) && - !oULabel.matchAsciiL ("slot:", 5, 0) && - !oULabel.matchAsciiL ("service:", 8, 0) && - !oULabel.matchAsciiL (".cmd:", 5, 0) && - !oULabel.matchAsciiL ("macro:///", 5, 0)) + !oULabel.match ("private:", 0) && + !oULabel.match (".uno:", 0) && + !oULabel.match ("slot:", 0) && + !oULabel.match ("service:", 0) && + !oULabel.match (".cmd:", 0) && + !oULabel.match ("macro:///", 0)) { oULabel = oULabel.replace ((sal_Unicode)0x007e, (sal_Unicode)0x005f); gchar* label = g_utf16_to_utf8 (oULabel.getStr(), - oULabel.getLength(), - NULL, NULL, NULL); + oULabel.getLength(), + NULL, NULL, NULL); info->setLabel (label); g_free (label); } |