[Libreoffice-commits] core.git: 2 commits - include/svx sc/source svx/source sw/source

Stephan Bergmann sbergman at redhat.com
Tue Jan 21 01:50:48 PST 2014


 include/svx/fmgridcl.hxx         |    2 +-
 include/svx/fmshell.hxx          |    2 +-
 include/svx/gridctrl.hxx         |    2 +-
 include/svx/svdmrkv.hxx          |    4 ++--
 sc/source/ui/view/tabview5.cxx   |    2 +-
 svx/source/fmcomp/fmgridcl.cxx   |    2 +-
 svx/source/fmcomp/gridctrl.cxx   |    2 +-
 svx/source/form/fmshell.cxx      |    2 +-
 svx/source/form/fmshimp.cxx      |    2 +-
 svx/source/inc/fmshimp.hxx       |    2 +-
 svx/source/svdraw/svdmrkv.cxx    |    2 +-
 svx/source/svdraw/svdmrkv1.cxx   |    2 +-
 svx/source/unodraw/unopage.cxx   |    4 ++--
 sw/source/core/frmedt/fecopy.cxx |    4 ++--
 sw/source/ui/ribbar/conform.cxx  |    2 +-
 sw/source/ui/shells/textdrw.cxx  |    2 +-
 16 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 7f9301e7eaff91cbe064d26e6b69b785dd9bb458
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 21 10:49:49 2014 +0100

    warning C4805: '!=' : unsafe mix of type 'sal_Bool' and type 'bool'
    
    Change-Id: I3d4f1ac0debf506e3c4f1ce9143cb8c1cf66925d

diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 30d5892..80518cc 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -363,7 +363,7 @@ public:
     sal_Bool IsMarkPoints() const { return (0L != mpMarkPointsOverlay); }
 
     // Select that additional handles are displayed permanently.
-    void SetPlusHandlesAlwaysVisible(sal_Bool bOn);
+    void SetPlusHandlesAlwaysVisible(bool bOn);
     sal_Bool IsPlusHandlesAlwaysVisible() const { return bPlusHdlAlways; }
 
     // Are Handles visible during TextEdit (in double size)?
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index 00a2da7..ba06592 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -272,7 +272,7 @@ const Rectangle& SdrMarkView::GetMarkedPointsRect() const
     return aMarkedPointsRect;
 }
 
-void SdrMarkView::SetPlusHandlesAlwaysVisible(sal_Bool bOn)
+void SdrMarkView::SetPlusHandlesAlwaysVisible(bool bOn)
 { // TODO: Optimize HandlePaint!
     ForceUndirtyMrkPnt();
     if (bOn!=bPlusHdlAlways) {
commit 98fba37bb1e2c5fd10d57d20d6e139765eb69751
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 21 10:39:12 2014 +0100

    Consistently let SetDesingMode functions take bool argument
    
    ...to avoid "warning C4805: '!=' : unsafe mix of type 'bool' and type 'sal_Bool'
    in opertaion" style errors.  Additionally, mark those functions that are virtual
    overrides as such.
    
    Change-Id: I64f919f7e2d8f6224303f9bac67f6270d58de014

diff --git a/include/svx/fmgridcl.hxx b/include/svx/fmgridcl.hxx
index 306023c..62ef3ae 100644
--- a/include/svx/fmgridcl.hxx
+++ b/include/svx/fmgridcl.hxx
@@ -159,7 +159,7 @@ protected:
     virtual void ColumnResized(sal_uInt16 nId);
     virtual void ColumnMoved(sal_uInt16 nId);
     virtual void DeleteSelectedRows();
-    virtual void SetDesignMode(sal_Bool bMode);
+    virtual void SetDesignMode(bool bMode) SAL_OVERRIDE;
     virtual void CellModified();
     virtual void HideColumn(sal_uInt16 nId);
     virtual void ShowColumn(sal_uInt16 nId);
diff --git a/include/svx/fmshell.hxx b/include/svx/fmshell.hxx
index 42d204d..f0e7eb5 100644
--- a/include/svx/fmshell.hxx
+++ b/include/svx/fmshell.hxx
@@ -162,7 +162,7 @@ public:
             ) const;
 
     sal_Bool    IsDesignMode() const { return m_bDesignMode; }
-    void        SetDesignMode( sal_Bool _bDesignMode );
+    void        SetDesignMode( bool _bDesignMode );
 
 protected:
     void GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich);
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 673f604..9c457b8 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -419,7 +419,7 @@ public:
     sal_uInt16 GetColumnIdFromViewPos( sal_uInt16 nPos ) const { return GetColumnId(nPos + 1); }
     sal_uInt16 GetColumnIdFromModelPos( sal_uInt16 nPos ) const;
 
-    virtual void SetDesignMode(sal_Bool bMode);
+    virtual void SetDesignMode(bool bMode);
     sal_Bool IsDesignMode() const {return m_bDesignMode;}
     sal_Bool IsOpen() const {return m_pSeekCursor != NULL;}
 
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index e53bf10..30d5892 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -222,7 +222,7 @@ public:
     void SetGluePointEditMode(sal_Bool bOn=sal_True) { SetEditMode(bOn?SDREDITMODE_GLUEPOINTEDIT:eEditMode0); }
     sal_Bool IsGluePointEditMode() const { return eEditMode==SDREDITMODE_GLUEPOINTEDIT; }
 
-    void SetDesignMode(sal_Bool bOn=sal_True);
+    void SetDesignMode(bool bOn = true);
     sal_Bool IsDesignMode() const { return bDesignMode; }
 
     void SetFrameDragSingles(sal_Bool bOn=sal_True) { SetFrameHandles(bOn); }
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 681fcc6..87933b4 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -222,7 +222,7 @@ void ScTabView::MakeDrawView( sal_uInt8 nForceDesignMode )
         //  used when switching back from page preview: restore saved design mode state
         //  (otherwise, keep the default from the draw view ctor)
         if ( nForceDesignMode != SC_FORCEMODE_NONE )
-            pDrawView->SetDesignMode( (sal_Bool)nForceDesignMode );
+            pDrawView->SetDesignMode( nForceDesignMode );
 
         //  an der FormShell anmelden
         FmFormShell* pFormSh = aViewData.GetViewShell()->GetFormShell();
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index ac04ace..27b657c 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1068,7 +1068,7 @@ void FmGridControl::propertyChange(const ::com::sun::star::beans::PropertyChange
     }
 }
 
-void FmGridControl::SetDesignMode(sal_Bool bMode)
+void FmGridControl::SetDesignMode(bool bMode)
 {
     sal_Bool bOldMode = IsDesignMode();
     DbGridControl::SetDesignMode(bMode);
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 4c7641b..07a41be 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2537,7 +2537,7 @@ void DbGridControl::AppendNew()
         MoveToPosition(nNewRow - 1);
 }
 
-void DbGridControl::SetDesignMode(sal_Bool bMode)
+void DbGridControl::SetDesignMode(bool bMode)
 {
     if (IsDesignMode() != bMode)
     {
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 40e1ba2..dcf8ce4 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -1450,7 +1450,7 @@ Reference< runtime::XFormController > FmFormShell::GetFormController( const Refe
 }
 
 //------------------------------------------------------------------------
-void FmFormShell::SetDesignMode( sal_Bool _bDesignMode )
+void FmFormShell::SetDesignMode( bool _bDesignMode )
 {
     if ( _bDesignMode == m_bDesignMode )
         return;
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 94d4c2e..1a8794d 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -2799,7 +2799,7 @@ public:
 };
 
 //------------------------------------------------------------------------------
-void FmXFormShell::SetDesignMode(sal_Bool bDesign)
+void FmXFormShell::SetDesignMode(bool bDesign)
 {
     if ( impl_checkDisposed() )
         return;
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 2eb41e9..e2036e7 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -412,7 +412,7 @@ public:
     void SetSelection(const SdrMarkList& rMarkList);
     void SetSelectionDelayed();
 
-    void SetDesignMode(sal_Bool bDesign);
+    void SetDesignMode(bool bDesign);
 
     sal_Bool    GetWizardUsing() const { return m_bUseWizards; }
     void        SetWizardUsing(sal_Bool _bUseThem);
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 4d24c66..2124482 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -2117,7 +2117,7 @@ void SdrMarkView::SetMoveOutside(sal_Bool bOn)
     aHdl.SetMoveOutside(bOn);
 }
 
-void SdrMarkView::SetDesignMode( sal_Bool _bOn )
+void SdrMarkView::SetDesignMode( bool _bOn )
 {
     if ( bDesignMode != _bOn )
     {
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 771f8e8..fbda90a 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -75,7 +75,7 @@ SvxDrawPage::SvxDrawPage( SdrPage* pInPage ) throw()
     // Erzeugen der (hidden) ::com::sun::star::sdbcx::View
     mpView = new SdrView( mpModel );
     if( mpView )
-        mpView->SetDesignMode(sal_True);
+        mpView->SetDesignMode(true);
 }
 
 SvxDrawPage::~SvxDrawPage() throw()
@@ -848,7 +848,7 @@ void SvxDrawPage::ChangeModel( SdrModel* pNewModel )
             delete mpView;
             mpView = new SdrView( mpModel );
             if( mpView )
-                mpView->SetDesignMode(sal_True);
+                mpView->SetDesignMode(true);
         }
     }
 }
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index af1dc82..b9d5a65 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1504,7 +1504,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
 
         sal_Bool bDesignMode = pView->IsDesignMode();
         if( !bDesignMode )
-            pView->SetDesignMode( sal_True );
+            pView->SetDesignMode( true );
 
         // #i50824#
         // method <lcl_RemoveOleObjsFromSdrModel> replaced by <lcl_ConvertSdrOle2ObjsToSdrGrafObjs>
@@ -1537,7 +1537,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
             pView->MoveMarkedObj( aDiff );
             ImpEndCreate();
             if( !bDesignMode )
-                pView->SetDesignMode( sal_False );
+                pView->SetDesignMode( false );
         }
     }
     EndUndo();
diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx
index d74065d..2b15f5f 100644
--- a/sw/source/ui/ribbar/conform.cxx
+++ b/sw/source/ui/ribbar/conform.cxx
@@ -101,7 +101,7 @@ void ConstFormControl::CreateDefaultObject()
         m_pSh->MakeDrawView();
 
     SdrView *pSdrView = m_pSh->GetDrawView();
-    pSdrView->SetDesignMode(sal_True);
+    pSdrView->SetDesignMode(true);
     m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos);
     m_pSh->MoveCreate(aEndPos);
     m_pSh->EndCreate(SDRCREATE_FORCEEND);
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index 5b49b0e..b99cadb 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -50,7 +50,7 @@ void SwBaseShell::InsertURLButton(const OUString& rURL, const OUString& rTarget,
     SdrView *pSdrView = rSh.GetDrawView();
 
     // OBJ_FM_BUTTON
-    pSdrView->SetDesignMode(sal_True);
+    pSdrView->SetDesignMode(true);
     pSdrView->SetCurrentObj(OBJ_FM_BUTTON);
     pSdrView->SetEditMode(sal_False);
 


More information about the Libreoffice-commits mailing list