[Libreoffice-commits] core.git: sw/source

Noel Grandin noel at peralex.com
Tue May 5 02:44:47 PDT 2015


 sw/source/uibase/docvw/edtwin.cxx   |    8 ++++----
 sw/source/uibase/inc/edtwin.hxx     |   16 ++++++++--------
 sw/source/uibase/shells/textsh1.cxx |   12 ++++++------
 3 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 7ebed1d63e2ad5728fa81b65fa98f09b0406965d
Author: Noel Grandin <noel at peralex.com>
Date:   Tue May 5 11:43:48 2015 +0200

    fix windows build
    
    Error is "ambiguous call to overloaded function"
    Rename methods to something more specific to avoid this.
    
    Change-Id: Iac275e38cf7fb06be55cd859041acc641c13db35

diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 58957e2..13d140e 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -189,8 +189,8 @@ long    SwEditWin::m_nDDStartPosX = 0;
  * and in case of writer for text(background)color also in /core/sw/source/uibase/docvw/edtwin.cxx
  * (SwEditWin::m_aTextBackColor and SwEditWin::m_aTextColor)
  */
-Color   SwEditWin::m_aTextBackColor(COL_YELLOW);
-Color   SwEditWin::m_aTextColor(COL_RED);
+Color   SwEditWin::m_aWaterCanTextBackColor(COL_YELLOW);
+Color   SwEditWin::m_aWaterCanTextColor(COL_RED);
 
 extern bool     g_bExecuteDrag;
 
@@ -4701,9 +4701,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
                 if( rSh.IsSelection() && !rSh.HasReadonlySel() )
                 {
                     if(nId == RES_CHRATR_BACKGROUND)
-                        rSh.SetAttrItem( SvxBrushItem( SwEditWin::m_aTextBackColor, nId ) );
+                        rSh.SetAttrItem( SvxBrushItem( SwEditWin::m_aWaterCanTextBackColor, nId ) );
                     else
-                        rSh.SetAttrItem( SvxColorItem( SwEditWin::m_aTextColor, nId ) );
+                        rSh.SetAttrItem( SvxColorItem( SwEditWin::m_aWaterCanTextColor, nId ) );
                     rSh.UnSetVisCrsr();
                     rSh.EnterStdMode();
                     rSh.SetVisCrsr(aDocPt);
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index a036583..1fb8f2d 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -71,8 +71,8 @@ friend void     PageNumNotify(  SwViewShell* pVwSh,
 
     static  long    m_nDDStartPosX, m_nDDStartPosY;
 
-    static  Color   m_aTextColor;     // text color; for the watering can
-    static  Color   m_aTextBackColor; // text background; for the watering can
+    static  Color   m_aWaterCanTextColor;     // text color; for the watering can
+    static  Color   m_aWaterCanTextBackColor; // text background; for the watering can
 
     /*
      * timer and handler for scrolling on when the mousepointer
@@ -253,14 +253,14 @@ public:
     sal_uInt16           GetDropAction() const { return m_nDropAction; }
     SotClipboardFormatId GetDropFormat() const { return m_nDropFormat; }
 
-    static Color    GetTextColor() { return m_aTextColor; }
+    static Color    GetWaterCanTextColor() { return m_aWaterCanTextColor; }
 
-    static void     SetTextColor(const Color& rCol ) { m_aTextColor = rCol; }
+    static void     SetWaterCanTextColor(const Color& rCol ) { m_aWaterCanTextColor = rCol; }
 
-    static Color    GetTextBackColor()
-                                            { return m_aTextBackColor; }
-    static void     SetTextBackColor(const Color& rCol )
-                                            { m_aTextBackColor = rCol; }
+    static Color    GetWaterCanTextBackColor()
+                                            { return m_aWaterCanTextBackColor; }
+    static void     SetWaterCanTextBackColor(const Color& rCol )
+                                            { m_aWaterCanTextBackColor = rCol; }
     void            LockKeyInput(bool bSet){m_bLockInput = bSet;}
 
     const SwView &GetView() const { return m_rView; }
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index d6eebc6..0893c42 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1148,7 +1148,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
             {
                 Color aSet = static_cast<const SvxColorItem*>(pItem)->GetValue();
                 SwEditWin& rEditWin = GetView().GetEditWin();
-                SwEditWin::SetTextColor(aSet);
+                SwEditWin::SetWaterCanTextColor(aSet);
                 SwApplyTemplate* pApply = rEditWin.GetApplyTemplate();
 
                 // If there is a selection, then set the color on it
@@ -1171,7 +1171,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
                 aSet = COL_TRANSPARENT;
 
             SwEditWin& rEdtWin = GetView().GetEditWin();
-            SwEditWin::SetTextBackColor(aSet);
+            SwEditWin::SetWaterCanTextBackColor(aSet);
             SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
 
             if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI()))
@@ -1220,9 +1220,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
                 // and reopened, its color resets, while SwEditWin still holds the old one.
                 Color aSet = static_cast<const SvxColorItem*>(pItem)->GetValue();
                 if( nSlot == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT )
-                    SwEditWin::SetTextBackColor(aSet);
+                    SwEditWin::SetWaterCanTextBackColor(aSet);
                 else
-                    SwEditWin::SetTextColor(aSet);
+                    SwEditWin::SetWaterCanTextColor(aSet);
             }
 
             SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
@@ -1233,7 +1233,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
                 {
                     rWrtSh.StartUndo( UNDO_INSATTR );
                     rWrtSh.SetAttrItem(
-                        SvxBrushItem( SwEditWin::GetTextBackColor(), RES_CHRATR_BACKGROUND) );
+                        SvxBrushItem( SwEditWin::GetWaterCanTextBackColor(), RES_CHRATR_BACKGROUND) );
 
                     // Remove MS specific highlight when background is set
                     rWrtSh.SetAttrItem( SvxBrushItem(RES_CHRATR_HIGHLIGHT) );
@@ -1258,7 +1258,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
                 }
                 else
                     rWrtSh.SetAttrItem(
-                        SvxColorItem( SwEditWin::GetTextColor(), RES_CHRATR_COLOR) );
+                        SvxColorItem( SwEditWin::GetWaterCanTextColor(), RES_CHRATR_COLOR) );
             }
             else
             {


More information about the Libreoffice-commits mailing list