diff options
author | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2010-11-24 14:50:34 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2010-11-24 14:50:34 +0100 |
commit | a46d569b32133c040fffddeae2b59135f78893af (patch) | |
tree | d98273d660ebfda830cc4efddab1c5cbee295e70 /sw/source | |
parent | 9553dacde794b890505a0c9f4ec4e96c9bd6e88a (diff) |
n#652204: Font color selection didn't effect new text
Fixed the font color selection behavior: selecting a color when no
text is selected doesn't turn the paintbrush mode anymore.
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/shells/textsh1.cxx | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 53076e7aed5f..8f8ecca3b901 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -1109,30 +1109,15 @@ void SwTextShell::Execute(SfxRequest &rReq) SwEditWin& rEditWin = GetView().GetEditWin(); rEditWin.SetTextColor(aSet); SwApplyTemplate* pApply = rEditWin.GetApplyTemplate(); - SvxColorItem aItem(aSet, RES_CHRATR_COLOR); - // besteht eine Selektion, wird sie gleich gefaerbt - if(!pApply && rWrtSh.HasSelection()) + // If there is a selection, then set the color on it + // otherwise, it'll be the color for the next text to be typed + if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT) { rWrtSh.SetAttr(SvxColorItem (aSet, RES_CHRATR_COLOR)); } - else if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT) - { - GetView().GetViewFrame()->GetDispatcher()->Execute(SID_ATTR_CHAR_COLOR_EXT); - } rReq.Done(); -/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht - SwEditWin& rEdtWin = GetView().GetEditWin(); - - SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); - SvxColorItem aItem(aSet, RES_CHRATR_COLOR); - - if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_EXT) - { - GetShell().SetAttr(aItem); - } -*/ } } break; |