Kaydet (Commit) 2a98a039 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Use transparent color directly

Change-Id: I47693666b3dd218eb8a74b936038c9169b054af1
üst b07377b3
......@@ -183,7 +183,6 @@ long SwEditWin::m_nDDStartPosX = 0;
*/
Color SwEditWin::m_aTextBackColor(COL_YELLOW);
Color SwEditWin::m_aTextColor(COL_RED);
bool SwEditWin::m_bTransparentBackColor = false; // background not transparent
extern bool bExecuteDrag;
......@@ -4679,14 +4678,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if( rSh.IsSelection() && !rSh.HasReadonlySel() )
{
if(nId == RES_CHRATR_BACKGROUND)
{
Color aColor( COL_TRANSPARENT );
if( !SwEditWin::m_bTransparentBackColor )
aColor = SwEditWin::m_aTextBackColor;
rSh.SetAttrItem( SvxBrushItem( aColor, nId ) );
}
rSh.SetAttrItem( SvxBrushItem( SwEditWin::m_aTextBackColor, nId ) );
else
rSh.SetAttrItem( SvxColorItem(SwEditWin::m_aTextColor, nId) );
rSh.SetAttrItem( SvxColorItem( SwEditWin::m_aTextColor, nId ) );
rSh.UnSetVisCrsr();
rSh.EnterStdMode();
rSh.SetVisCrsr(aDocPt);
......
......@@ -73,7 +73,6 @@ friend void PageNumNotify( SwViewShell* pVwSh,
static long m_nDDStartPosX, m_nDDStartPosY;
static Color m_aTextColor; // text color; for the watering can
static bool m_bTransparentBackColor; // transparent background
static Color m_aTextBackColor; // text background; for the watering can
/*
......@@ -260,10 +259,6 @@ public:
{ return m_aTextBackColor; }
void SetTextBackColor(const Color& rCol )
{ m_aTextBackColor = rCol; }
void SetTextBackColorTransparent(bool bSet)
{ m_bTransparentBackColor = bSet; }
bool IsTextBackColorTransparent()
{ return m_bTransparentBackColor; }
void LockKeyInput(bool bSet){m_bLockInput = bSet;}
const SwView &GetView() const { return m_rView; }
......
......@@ -1163,7 +1163,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
SwEditWin& rEdtWin = GetView().GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
rEdtWin.SetTextBackColorTransparent(0 == pItem);
Color aSet;
if(pItem)
{
......@@ -1548,10 +1547,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case SID_ATTR_CHAR_COLOR_BACKGROUND:
{
if(GetView().GetEditWin().IsTextBackColorTransparent())
rSet.Put(SvxColorItem(Color(COL_TRANSPARENT), SID_ATTR_CHAR_COLOR_BACKGROUND));
else
rSet.Put(SvxColorItem(GetView().GetEditWin().GetTextBackColor(), SID_ATTR_CHAR_COLOR_BACKGROUND));
rSet.Put(SvxColorItem(GetView().GetEditWin().GetTextBackColor(), SID_ATTR_CHAR_COLOR_BACKGROUND));
}
break;
case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment