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

Stephan Bergmann sbergman at redhat.com
Tue May 5 03:48:57 PDT 2015


 sw/source/core/draw/dflyobj.cxx    |    6 +++---
 sw/source/core/frmedt/feshview.cxx |    4 ++--
 sw/source/uibase/shells/grfsh.cxx  |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit ca35b597012154d655ed50e53d9d614098058ab0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue May 5 12:48:27 2015 +0200

    Various loplugin warnings
    
    Change-Id: I8d38521f08441f123a236729c01909f2da4ec478

diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 6ba8e51..4baf26c 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -748,7 +748,7 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F
     ResizeRect( aNewRect, rRef, xFact, yFact );
 
     // Get graphic object size in 100th of mm
-    GraphicObject *pGraphicObject = (GraphicObject *) pSh->GetGraphicObj();
+    GraphicObject const *pGraphicObject = pSh->GetGraphicObj();
     if (!pGraphicObject)
         return;
     const MapMode aMapMode100thmm(MAP_100TH_MM);
@@ -756,14 +756,14 @@ void SwVirtFlyDrawObj::NbcCrop(const Point& rRef, const Fraction& xFact, const F
     if( MAP_PIXEL == pGraphicObject->GetPrefMapMode().GetMapUnit() )
         aGraphicSize = Application::GetDefaultDevice()->PixelToLogic( aGraphicSize, aMapMode100thmm );
     else
-        aGraphicSize = Application::GetDefaultDevice()->LogicToLogic( aGraphicSize, pGraphicObject->GetPrefMapMode(), aMapMode100thmm);
+        aGraphicSize = OutputDevice::LogicToLogic( aGraphicSize, pGraphicObject->GetPrefMapMode(), aMapMode100thmm);
     if( aGraphicSize.A() == 0 || aGraphicSize.B() == 0 )
         return ;
 
     // Get old values for crop in 10th of mm
     SfxItemSet aSet( pSh->GetAttrPool(), RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF );
     pSh->GetCurAttr( aSet );
-    SwCropGrf aCrop( (const SwCropGrf&) aSet.Get(RES_GRFATR_CROPGRF) );
+    SwCropGrf aCrop( static_cast<const SwCropGrf&>(aSet.Get(RES_GRFATR_CROPGRF)) );
 
     Rectangle aCropRectangle(
         convertTwipToMm100(aCrop.GetLeft()),
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 0045a67..cf8481b 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -638,11 +638,11 @@ void SwFEShell::StartCropImage()
         for ( sal_uInt16 i = 0; i < rMarkList.GetMarkCount(); ++i )
         {
             SdrObject *pTmpObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
-            sal_Bool bForget = pTmpObj->ISA(SwVirtFlyDrawObj);
+            bool bForget = pTmpObj->ISA(SwVirtFlyDrawObj);
             if( bForget )
             {
                 pView->UnmarkAll();
-                pView->MarkObj( pTmpObj, Imp()->GetPageView(), sal_False, sal_False );
+                pView->MarkObj( pTmpObj, Imp()->GetPageView(), false, false );
                 break;
             }
         }
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 170f966..86f76c2 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -477,7 +477,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
 
         case SID_OBJECT_CROP:
         {
-            GraphicObject *pGraphicObject = (GraphicObject *) rSh.GetGraphicObj();
+            GraphicObject const *pGraphicObject = rSh.GetGraphicObj();
             if (0 != pGraphicObject  && SDRDRAG_CROP != rSh.GetDragMode()) {
                 rSh.StartCropImage();
             }


More information about the Libreoffice-commits mailing list