summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-05-11 23:34:55 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2014-05-14 12:39:41 +0300
commit2a98a03904895b6dce7ec53042b0204dbb379d5b (patch)
treee82506acada20cb5c6dab37936846e0e0ac7ca2a /sw
parentb07377b3effd8b64054f923be99cde65e663f025 (diff)
Use transparent color directly
Change-Id: I47693666b3dd218eb8a74b936038c9169b054af1
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/uibase/docvw/edtwin.cxx10
-rw-r--r--sw/source/core/uibase/inc/edtwin.hxx5
-rw-r--r--sw/source/core/uibase/shells/textsh1.cxx6
3 files changed, 3 insertions, 18 deletions
diff --git a/sw/source/core/uibase/docvw/edtwin.cxx b/sw/source/core/uibase/docvw/edtwin.cxx
index 1c37d91c7f03..10db4c642084 100644
--- a/sw/source/core/uibase/docvw/edtwin.cxx
+++ b/sw/source/core/uibase/docvw/edtwin.cxx
@@ -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);
diff --git a/sw/source/core/uibase/inc/edtwin.hxx b/sw/source/core/uibase/inc/edtwin.hxx
index 97a1bdb4db6c..aade966efa8c 100644
--- a/sw/source/core/uibase/inc/edtwin.hxx
+++ b/sw/source/core/uibase/inc/edtwin.hxx
@@ -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; }
diff --git a/sw/source/core/uibase/shells/textsh1.cxx b/sw/source/core/uibase/shells/textsh1.cxx
index 1df06f22da58..d92c8fa1f110 100644
--- a/sw/source/core/uibase/shells/textsh1.cxx
+++ b/sw/source/core/uibase/shells/textsh1.cxx
@@ -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: