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

Takeshi Abe tabe at fixedpoint.jp
Mon Apr 8 15:31:28 PDT 2013


 svx/source/accessibility/AccessibleShape.cxx |    6 +--
 svx/source/dialog/ctredlin.cxx               |   10 +----
 svx/source/dialog/dlgctrl.cxx                |    3 -
 svx/source/items/hlnkitem.cxx                |    3 -
 svx/source/svdraw/svddrag.cxx                |    2 -
 svx/source/svdraw/svdedxv.cxx                |    4 --
 svx/source/svdraw/svdibrow.cxx               |    6 +--
 svx/source/svdraw/svdmodel.cxx               |    8 +---
 svx/source/svdraw/svdobj.cxx                 |    8 ++--
 svx/source/svdraw/svdoole2.cxx               |    6 +--
 svx/source/svdraw/svdotext.cxx               |   12 ++----
 svx/source/svdraw/svdotxln.cxx               |   14 +++----
 svx/source/svdraw/svdpage.cxx                |    4 +-
 svx/source/svdraw/svdpagv.cxx                |    4 +-
 svx/source/svdraw/svdpntv.cxx                |   14 +++----
 svx/source/svdraw/svdpoev.cxx                |    6 +--
 svx/source/svdraw/svdtext.cxx                |    7 +--
 svx/source/svdraw/svdundo.cxx                |   51 ++++++++++-----------------
 svx/source/svdraw/svdview.cxx                |   48 ++++++++++++-------------
 svx/source/svdraw/svdxcgv.cxx                |   12 +++---
 svx/source/table/cell.cxx                    |    3 -
 svx/source/table/tablecolumn.cxx             |    3 -
 svx/source/table/tablecontroller.cxx         |    3 -
 svx/source/table/tablerow.cxx                |    3 -
 24 files changed, 102 insertions(+), 138 deletions(-)

New commits:
commit c70fc41d6b7eb6f56c70b8e85469c5db66837a42
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Apr 9 07:21:20 2013 +0900

    deleting NULL is safe
    
    Change-Id: Ief65149bc88ac4ce8badc7dbce818fca0cdcb201

diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index c35a8aa..007bded 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -112,10 +112,8 @@ AccessibleShape::AccessibleShape (
 
 AccessibleShape::~AccessibleShape (void)
 {
-    if (mpChildrenManager != NULL)
-        delete mpChildrenManager;
-    if (mpText != NULL)
-        delete mpText;
+    delete mpChildrenManager;
+    delete mpText;
     OSL_TRACE ("~AccessibleShape");
 
     // Unregistering from the various broadcasters should be unnecessary
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index aedc318..01b1a8f 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -70,10 +70,7 @@ SvxRedlinEntry::SvxRedlinEntry()
 SvxRedlinEntry::~SvxRedlinEntry()
 {
     RedlinData* pRedDat=(RedlinData*) GetUserData();
-    if(pRedDat!=NULL)
-    {
-        delete pRedDat;
-    }
+    delete pRedDat;
 }
 
 // Functions in the inserts Items of SvxRedlinTable
@@ -149,8 +146,7 @@ SvxRedlinTable::SvxRedlinTable(SvxSimpleTableContainer& rParent,WinBits nBits)
 
 SvxRedlinTable::~SvxRedlinTable()
 {
-    if(pCommentSearcher!=NULL)
-        delete pCommentSearcher;
+    delete pCommentSearcher;
 }
 
 StringCompare SvxRedlinTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRight)
@@ -301,7 +297,7 @@ void SvxRedlinTable::SetCommentParams( const utl::SearchParam* pSearchPara )
 {
     if(pSearchPara!=NULL)
     {
-        if(pCommentSearcher!=NULL) delete pCommentSearcher;
+        delete pCommentSearcher;
 
         pCommentSearcher=new utl::TextSearch(*pSearchPara, LANGUAGE_SYSTEM );
     }
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 4d65bb7..671083f 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -165,8 +165,7 @@ void SvxRectCtl::Resize_Impl()
 
 void SvxRectCtl::InitRectBitmap( void )
 {
-    if( pBitmap )
-        delete pBitmap;
+    delete pBitmap;
 
     const StyleSettings&    rStyles = Application::GetSettings().GetStyleSettings();
     svtools::ColorConfig aColorConfig;
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx
index 1de41eb..4919251 100644
--- a/svx/source/items/hlnkitem.cxx
+++ b/svx/source/items/hlnkitem.cxx
@@ -282,8 +282,7 @@ void SvxHyperlinkItem::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro )
 
 void SvxHyperlinkItem::SetMacroTable( const SvxMacroTableDtor& rTbl )
 {
-    if ( pMacroTable )
-        delete pMacroTable;
+    delete pMacroTable;
 
     pMacroTable = new SvxMacroTableDtor ( rTbl );
 }
diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx
index 9d836f1..0a982d2 100644
--- a/svx/source/svdraw/svddrag.cxx
+++ b/svx/source/svdraw/svddrag.cxx
@@ -26,7 +26,7 @@ void SdrDragStat::Clear(bool bLeaveOne)
         delete aPnts.back();
         aPnts.pop_back();
     }
-    if (pUser!=NULL) delete pUser;
+    delete pUser;
     pUser=NULL;
     aPnts.clear();
     if (bLeaveOne) {
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index f671510..18e1250 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -96,9 +96,7 @@ SdrObjEditView::~SdrObjEditView()
 {
     pTextEditWin = NULL;            // so there's no ShowCursor in SdrEndTextEdit
     if (IsTextEdit()) SdrEndTextEdit();
-    if (pTextEditOutliner!=NULL) {
-        delete pTextEditOutliner;
-    }
+    delete pTextEditOutliner;
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index ff9ba23..d42bbea 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -217,11 +217,9 @@ _SdrItemBrowserControl::_SdrItemBrowserControl(Window* pParent, WinBits nBits):
 
 _SdrItemBrowserControl::~_SdrItemBrowserControl()
 {
-    if(pEditControl)
-        delete pEditControl;
+    delete pEditControl;
 
-    if(pAktChangeEntry)
-        delete pAktChangeEntry;
+    delete pAktChangeEntry;
 
     Clear();
 }
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 70eeeb3..092544d 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -306,8 +306,7 @@ SdrModel::~SdrModel()
         OSL_FAIL(aStr.getStr());
     }
 #endif
-    if (pAktUndoGroup!=NULL)
-        delete pAktUndoGroup;
+    delete pAktUndoGroup;
 
     ClearModel(sal_True);
 
@@ -346,8 +345,7 @@ SdrModel::~SdrModel()
     if( mpForbiddenCharactersTable )
         mpForbiddenCharactersTable->release();
 
-    if(mpNumberFormatter)
-        delete mpNumberFormatter;
+    delete mpNumberFormatter;
 
     delete mpImpl->mpUndoFactory;
     delete mpImpl;
@@ -1515,7 +1513,7 @@ void SdrModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)
 void SdrModel::DeleteMasterPage(sal_uInt16 nPgNum)
 {
     SdrPage* pPg=RemoveMasterPage(nPgNum);
-    if (pPg!=NULL) delete pPg;
+    delete pPg;
 }
 
 SdrPage* SdrModel::RemoveMasterPage(sal_uInt16 nPgNum)
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 0d6d8f2ad..5a5f536 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -275,9 +275,9 @@ SdrObjPlusData::SdrObjPlusData():
 
 SdrObjPlusData::~SdrObjPlusData()
 {
-    if (pBroadcast   !=NULL) delete pBroadcast;
-    if (pUserDataList!=NULL) delete pUserDataList;
-    if (pGluePoints  !=NULL) delete pGluePoints;
+    delete pBroadcast;
+    delete pUserDataList;
+    delete pGluePoints;
 }
 
 SdrObjPlusData* SdrObjPlusData::Clone(SdrObject* pObj1) const
@@ -484,7 +484,7 @@ SdrObject::~SdrObject()
 
     DBG_DTOR(SdrObject,NULL);
     SendUserCall(SDRUSERCALL_DELETE, GetLastBoundRect());
-    if (pPlusData!=NULL) delete pPlusData;
+    delete pPlusData;
 
     if(mpProperties)
     {
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 3029917..e3656a4 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -795,11 +795,9 @@ SdrOle2Obj::~SdrOle2Obj()
     if ( mpImpl->mbConnected )
         Disconnect();
 
-    if( pGraphic!=NULL )
-        delete pGraphic;
+    delete pGraphic;
 
-    if(mpImpl->pGraphicObject!=NULL)
-        delete mpImpl->pGraphicObject;
+    delete mpImpl->pGraphicObject;
 
     if(pModifyListener)
     {
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 19d5fff..6a41d5b 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -193,11 +193,9 @@ SdrTextObj::~SdrTextObj()
             rOutl.SetTextObj( NULL );
     }
 
-    if(mpText!=NULL)
-        delete mpText;
+    delete mpText;
 
-    if (pFormTextBoundRect!=NULL)
-        delete pFormTextBoundRect;
+    delete pFormTextBoundRect;
 
     ImpLinkAbmeldung();
 }
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index 894fcbd..cd54175 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -84,8 +84,7 @@ void SdrText::SetOutlinerParaObject( OutlinerParaObject* pTextObject )
                 mpModel->GetHitTestOutliner().SetTextObj( 0 );
         }
 
-        if( mpOutlinerParaObject )
-            delete mpOutlinerParaObject;
+        delete mpOutlinerParaObject;
 
         mpOutlinerParaObject = pTextObject;
 
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 30a2b10..055a94d 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -301,20 +301,14 @@ SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1, bool bSave
 
 SdrUndoAttrObj::~SdrUndoAttrObj()
 {
-    if(pUndoSet)
-        delete pUndoSet;
-    if(pRedoSet)
-        delete pRedoSet;
-    if(pRepeatSet)
-        delete pRepeatSet;
-    if(pUndoGroup)
-        delete pUndoGroup;
-    if(pTextUndo)
-        delete pTextUndo;
+    delete pUndoSet;
+    delete pRedoSet;
+    delete pRepeatSet;
+    delete pUndoGroup;
+    delete pTextUndo;
 
     // #i8508#
-    if(pTextRedo)
-        delete pTextRedo;
+    delete pTextRedo;
 }
 
 void SdrUndoAttrObj::Undo()
@@ -331,10 +325,7 @@ void SdrUndoAttrObj::Undo()
         {
             bHaveToTakeRedoSet = sal_False;
 
-            if(pRedoSet)
-            {
-                delete pRedoSet;
-            }
+            delete pRedoSet;
 
             pRedoSet = new SfxItemSet(pObj->GetMergedItemSet());
 
@@ -603,9 +594,9 @@ SdrUndoGeoObj::SdrUndoGeoObj(SdrObject& rNewObj):
 
 SdrUndoGeoObj::~SdrUndoGeoObj()
 {
-    if (pUndoGeo!=NULL) delete pUndoGeo;
-    if (pRedoGeo!=NULL) delete pRedoGeo;
-    if (pUndoGroup!=NULL) delete pUndoGroup;
+    delete pUndoGeo;
+    delete pRedoGeo;
+    delete pUndoGroup;
 }
 
 void SdrUndoGeoObj::Undo()
@@ -622,7 +613,7 @@ void SdrUndoGeoObj::Undo()
     }
     else
     {
-        if (pRedoGeo!=NULL) delete pRedoGeo;
+        delete pRedoGeo;
         pRedoGeo=pObj->GetGeoData();
         pObj->SetGeoData(*pUndoGeo);
     }
@@ -639,7 +630,7 @@ void SdrUndoGeoObj::Redo()
     }
     else
     {
-        if (pUndoGeo!=NULL) delete pUndoGeo;
+        delete pUndoGeo;
         pUndoGeo=pObj->GetGeoData();
         pObj->SetGeoData(*pRedoGeo);
     }
@@ -1095,10 +1086,8 @@ SdrUndoObjSetText::SdrUndoObjSetText(SdrObject& rNewObj, sal_Int32 nText)
 
 SdrUndoObjSetText::~SdrUndoObjSetText()
 {
-    if ( pOldText )
-        delete pOldText;
-    if ( pNewText )
-        delete pNewText;
+    delete pOldText;
+    delete pNewText;
 }
 
 void SdrUndoObjSetText::AfterSetText()
@@ -1495,9 +1484,7 @@ SdrUndoDelPage::SdrUndoDelPage(SdrPage& rNewPg):
 
 SdrUndoDelPage::~SdrUndoDelPage()
 {
-    if (pUndoGroup!=NULL) {
-        delete pUndoGroup;
-    }
+    delete pUndoGroup;
 }
 
 void SdrUndoDelPage::Undo()
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index fff251a..dd6c37f 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -1584,8 +1584,7 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName ) throw(Unk
 
 void SAL_CALL Cell::setAllPropertiesToDefault(  ) throw (RuntimeException)
 {
-    if( mpProperties )
-        delete mpProperties;
+    delete mpProperties;
     mpProperties = new sdr::properties::CellProperties( static_cast< SdrTableObj& >( GetObject() ), this );
 
     SdrOutliner& rOutliner = GetObject().ImpGetDrawOutliner();
diff --git a/svx/source/table/tablecolumn.cxx b/svx/source/table/tablecolumn.cxx
index cd781ec..ca3212c 100644
--- a/svx/source/table/tablecolumn.cxx
+++ b/svx/source/table/tablecolumn.cxx
@@ -224,8 +224,7 @@ void SAL_CALL TableColumn::setFastPropertyValue( sal_Int32 nHandle, const Any& a
         mxTableModel->setModified(sal_True);
     }
 
-    if( pUndo )
-        delete pUndo;
+    delete pUndo;
 }
 
 // -----------------------------------------------------------------------------
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 7400cf7..3cb77ca 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -482,8 +482,7 @@ void SvxTableController::GetState( SfxItemSet& rSet )
         }
         nWhich = aIter.NextWhich();
     }
-    if( pSet )
-        delete pSet;
+    delete pSet;
 }
 
 // --------------------------------------------------------------------
diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx
index a994ce0..936c9ca 100644
--- a/svx/source/table/tablerow.cxx
+++ b/svx/source/table/tablerow.cxx
@@ -298,8 +298,7 @@ void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 nHandle, const Any& aVal
         mxTableModel->setModified(sal_True);
     }
 
-    if( pUndo )
-        delete pUndo;
+    delete pUndo;
 }
 
 // -----------------------------------------------------------------------------
commit 0f9190b1fad6a468a03d13db0345051aef82217a
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Apr 9 06:51:30 2013 +0900

    sal_Bool to bool
    
    Change-Id: Idc97443436502eea5dec27d553374475a22bd7ce

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 8aa6fd2..19d5fff 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -748,7 +748,7 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, boo
 
     if (pPara)
     {
-        sal_Bool bHitTest = sal_False;
+        bool bHitTest = false;
         if( pModel )
             bHitTest = &pModel->GetHitTestOutliner() == &rOutliner;
 
@@ -851,7 +851,7 @@ OutlinerParaObject* SdrTextObj::GetEditOutlinerParaObject() const
 void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXKorreg) const
 {
     OutputDevice* pOut = rOutliner.GetRefDevice();
-    sal_Bool bNoStretching(sal_False);
+    bool bNoStretching(false);
 
     if(pOut && pOut->GetOutDevType() == OUTDEV_PRINTER)
     {
@@ -886,7 +886,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
         // we don't like that.
         if(aSize2.Height() >= aSize1.Height() * 2)
         {
-            bNoStretching = sal_True;
+            bNoStretching = true;
         }
 #endif
     }
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
index a01ab9d..8086cad 100644
--- a/svx/source/svdraw/svdotxln.cxx
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -50,7 +50,7 @@ public:
     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
         const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
 
-    sal_Bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
+    bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
 };
 
 ImpSdrObjTextLink::~ImpSdrObjTextLink()
@@ -168,7 +168,7 @@ bool SdrTextObj::ReloadLinkedText( bool bForceLoad)
     if( pData )
     {
         DateTime                    aFileDT( DateTime::EMPTY );
-        sal_Bool                        bExists = sal_True, bLoad = sal_False;
+        bool                        bExists = true, bLoad = false;
 
         try
         {
@@ -184,13 +184,13 @@ bool SdrTextObj::ReloadLinkedText( bool bForceLoad)
         }
         catch( ... )
         {
-            bExists = sal_False;
+            bExists = false;
         }
 
         if( bExists )
         {
             if( bForceLoad )
-                bLoad = sal_True;
+                bLoad = true;
             else
                 bLoad = ( aFileDT > pData->aFileDate0 );
 
@@ -209,7 +209,7 @@ bool SdrTextObj::ReloadLinkedText( bool bForceLoad)
 bool SdrTextObj::LoadText(const String& rFileName, const String& /*rFilterName*/, rtl_TextEncoding eCharSet)
 {
     INetURLObject   aFileURL( rFileName );
-    sal_Bool            bRet = sal_False;
+    bool            bRet = false;
 
     if( aFileURL.GetProtocol() == INET_PROT_NOT_VALID )
     {
@@ -233,14 +233,14 @@ bool SdrTextObj::LoadText(const String& rFileName, const String& /*rFilterName*/
         cRTF[4] = 0;
         pIStm->Read(cRTF, 5);
 
-        sal_Bool bRTF = cRTF[0] == '{' && cRTF[1] == '\\' && cRTF[2] == 'r' && cRTF[3] == 't' && cRTF[4] == 'f';
+        bool bRTF = cRTF[0] == '{' && cRTF[1] == '\\' && cRTF[2] == 'r' && cRTF[3] == 't' && cRTF[4] == 'f';
 
         pIStm->Seek(0);
 
         if( !pIStm->GetError() )
         {
             SetText( *pIStm, aFileURL.GetMainURL( INetURLObject::NO_DECODE ), sal::static_int_cast< sal_uInt16 >( bRTF ? EE_FORMAT_RTF : EE_FORMAT_TEXT ) );
-            bRet = sal_True;
+            bRet = true;
         }
 
         delete pIStm;
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index ad737bf..16f5bb8 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -218,7 +218,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
 
 void SdrObjList::Clear()
 {
-    sal_Bool bObjectsRemoved(sal_False);
+    bool bObjectsRemoved(false);
 
     while( ! maList.empty())
     {
@@ -230,7 +230,7 @@ void SdrObjList::Clear()
         // to delete the object and thus refresh visualisations
         pObj->GetViewContact().flushViewObjectContacts(true);
 
-        bObjectsRemoved = sal_True;
+        bObjectsRemoved = true;
 
         // sent remove hint (after removal, see RemoveObject())
         if(pModel)
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index c2f957d..cd13358 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -291,13 +291,13 @@ void SdrPageView::CompleteRedraw(SdrPaintWindow& rPaintWindow, const Region& rRe
     if(GetPage())
     {
         SdrPageWindow* pPageWindow = FindPageWindow(rPaintWindow);
-        sal_Bool bIsTempTarget(sal_False);
+        bool bIsTempTarget(false);
 
         if(!pPageWindow)
         {
             // create temp PageWindow
             pPageWindow = new SdrPageWindow(*((SdrPageView*)this), rPaintWindow);
-            bIsTempTarget = sal_True;
+            bIsTempTarget = true;
         }
 
         // do the redraw
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 6d7ca24..db7feab 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -271,7 +271,7 @@ void SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
         return;
     }
 
-    sal_Bool bObjChg=!bSomeObjChgdFlag; // if sal_True, evaluate for ComeBack timer
+    bool bObjChg=!bSomeObjChgdFlag; // if true, evaluate for ComeBack timer
     if (bObjChg) {
         SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
         if (pSdrHint!=NULL) {
@@ -1046,13 +1046,13 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, sal_Bool bReplaceAll)
 {
 #ifdef DBG_UTIL
     {
-        sal_Bool bHasEEFeatureItems=sal_False;
+        bool bHasEEFeatureItems=false;
         SfxItemIter aIter(rAttr);
         const SfxPoolItem* pItem=aIter.FirstItem();
         while (!bHasEEFeatureItems && pItem!=NULL) {
             if (!IsInvalidItem(pItem)) {
                 sal_uInt16 nW=pItem->Which();
-                if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=sal_True;
+                if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=true;
             }
             pItem=aIter.NextItem();
         }
@@ -1159,12 +1159,12 @@ void SdrPaintView::MakeVisible(const Rectangle& rRect, Window& rWin)
     if( aActualSize.Height() > 0 && aActualSize.Width() > 0 )
     {
         Size aNewSize(rRect.GetSize());
-        sal_Bool bNewScale=sal_False;
-        sal_Bool bNeedMoreX=aNewSize.Width()>aActualSize.Width();
-        sal_Bool bNeedMoreY=aNewSize.Height()>aActualSize.Height();
+        bool bNewScale=false;
+        bool bNeedMoreX=aNewSize.Width()>aActualSize.Width();
+        bool bNeedMoreY=aNewSize.Height()>aActualSize.Height();
         if (bNeedMoreX || bNeedMoreY)
         {
-            bNewScale=sal_True;
+            bNewScale=true;
             // set new MapMode (Size+Org) and invalidate everything
             Fraction aXFact(aNewSize.Width(),aActualSize.Width());
             Fraction aYFact(aNewSize.Height(),aActualSize.Height());
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index fd00983..e6324da 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -371,7 +371,7 @@ void SdrPolyEditView::RipUpAtMarkedPoints()
             {
                 if( bUndo )
                     AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj));
-                sal_Bool bKorregFlag(sal_False);
+                bool bKorregFlag(false);
                 sal_uInt32 nMax(pObj->GetHdlCount());
 
                 for(SdrUShortCont::const_reverse_iterator it = pPts->rbegin(); it != pPts->rend(); ++it)
@@ -391,10 +391,10 @@ void SdrPolyEditView::RipUpAtMarkedPoints()
                     if(nNewPt0Idx)
                     {
                         // correction necessary?
-                        DBG_ASSERT(bKorregFlag==sal_False,"Multiple index corrections at SdrPolyEditView::RipUp().");
+                        DBG_ASSERT(bKorregFlag==false,"Multiple index corrections at SdrPolyEditView::RipUp().");
                         if(!bKorregFlag)
                         {
-                            bKorregFlag = sal_True;
+                            bKorregFlag = true;
 
                             SdrUShortCont aReplaceSet;
                             for(SdrUShortCont::const_iterator it2 = pPts->begin(); it2 != pPts->end(); ++it2)
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index c336546..894fcbd 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -137,8 +137,8 @@ void SdrText::SetModel( SdrModel* pNewModel )
         // see whether we need to use AutoGrow!
         sal_uIntPtr nOldFontHgt=pOldModel->GetDefaultFontHeight();
         sal_uIntPtr nNewFontHgt=pNewModel->GetDefaultFontHeight();
-        sal_Bool bDefHgtChanged=nNewFontHgt!=nOldFontHgt;
-        sal_Bool bSetHgtItem=bDefHgtChanged && !bHgtSet;
+        bool bDefHgtChanged=nNewFontHgt!=nOldFontHgt;
+        bool bSetHgtItem=bDefHgtChanged && !bHgtSet;
         if (bSetHgtItem)
         {
             // fix the value of HeightItem, so
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 19f6098..30a2b10 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -267,8 +267,8 @@ SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1, bool bSave
     bStyleSheet = bStyleSheet1;
 
     SdrObjList* pOL = rNewObj.GetSubList();
-    sal_Bool bIsGroup(pOL!=NULL && pOL->GetObjCount());
-    sal_Bool bIs3DScene(bIsGroup && pObj->ISA(E3dScene));
+    bool bIsGroup(pOL!=NULL && pOL->GetObjCount());
+    bool bIs3DScene(bIsGroup && pObj->ISA(E3dScene));
 
     if(bIsGroup)
     {
@@ -320,7 +320,7 @@ SdrUndoAttrObj::~SdrUndoAttrObj()
 void SdrUndoAttrObj::Undo()
 {
     E3DModifySceneSnapRectUpdater aUpdater(pObj);
-    sal_Bool bIs3DScene(pObj && pObj->ISA(E3dScene));
+    bool bIs3DScene(pObj && pObj->ISA(E3dScene));
 
     // Trigger PageChangeCall
     ImpShowPageOfThisObject();
@@ -420,7 +420,7 @@ void SdrUndoAttrObj::Undo()
 void SdrUndoAttrObj::Redo()
 {
     E3DModifySceneSnapRectUpdater aUpdater(pObj);
-    sal_Bool bIs3DScene(pObj && pObj->ISA(E3dScene));
+    bool bIs3DScene(pObj && pObj->ISA(E3dScene));
 
     if(!pUndoGroup || bIs3DScene)
     {
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 19e5acf..c8e7d17 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -814,7 +814,7 @@ sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
                     MarkObj(rVEvt.pRootObj,rVEvt.pPV);
                     if (eHit==SDRHIT_TEXTEDIT)
                     {
-                        sal_Bool bRet2(pActualOutDev && OUTDEV_WINDOW == pActualOutDev->GetOutDevType() &&
+                        bool bRet2(pActualOutDev && OUTDEV_WINDOW == pActualOutDev->GetOutDevType() &&
                             SdrBeginTextEdit(rVEvt.pObj, rVEvt.pPV, (Window*)pActualOutDev, sal_False, (SdrOutliner*)0L));
 
                         if(bRet2)
@@ -921,9 +921,9 @@ sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
     if (bRet && pActualOutDev!=NULL && pActualOutDev->GetOutDevType()==OUTDEV_WINDOW) {
         Window* pWin=(Window*)pActualOutDev;
         // left mouse button pressed?
-        sal_Bool bLeftDown=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseDown;
+        bool bLeftDown=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseDown;
         // left mouse button released?
-        sal_Bool bLeftUp=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseUp;
+        bool bLeftUp=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseUp;
         // left mouse button pressed or held?
         sal_Bool bLeftDown1=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && !rVEvt.bMouseUp;
         pWin->SetPointer(GetPreferedPointer(rVEvt.aLogicPos,pWin,
@@ -1047,14 +1047,14 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
         default: break;
     }
 
-    sal_Bool bMarkHit=eHit==SDRHIT_MARKEDOBJECT;
+    bool bMarkHit=eHit==SDRHIT_MARKEDOBJECT;
     SdrHdl* pHdl=aVEvt.pHdl;
     // now check the pointers for dragging
     if (pHdl!=NULL || bMarkHit) {
         SdrHdlKind eHdl= pHdl!=NULL ? pHdl->GetKind() : HDL_MOVE;
-        sal_Bool bCorner=pHdl!=NULL && pHdl->IsCornerHdl();
-        sal_Bool bVertex=pHdl!=NULL && pHdl->IsVertexHdl();
-        sal_Bool bMov=eHdl==HDL_MOVE;
+        bool bCorner=pHdl!=NULL && pHdl->IsCornerHdl();
+        bool bVertex=pHdl!=NULL && pHdl->IsVertexHdl();
+        bool bMov=eHdl==HDL_MOVE;
         if (bMov && (eDragMode==SDRDRAG_MOVE || eDragMode==SDRDRAG_RESIZE || bMarkedHitMovesAlways)) {
             if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // because double click or drag & drop is possible
             return Pointer(POINTER_MOVE);
@@ -1065,11 +1065,11 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
                     return Pointer(POINTER_NOTALLOWED);
 
                 // are 3D objects selected?
-                sal_Bool b3DObjSelected = sal_False;
+                bool b3DObjSelected = false;
                 for (sal_uInt32 a=0; !b3DObjSelected && a<GetMarkedObjectCount(); a++) {
                     SdrObject* pObj = GetMarkedObjectByIndex(a);
                     if(pObj && pObj->ISA(E3dObject))
-                        b3DObjSelected = sal_True;
+                        b3DObjSelected = true;
                 }
                 // If we have a 3D object, go on despite !IsShearAllowed,
                 // because then we have a rotation instead of a shear.
@@ -1093,18 +1093,18 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice*
                 if (bCorner || bVertex || bMov) {
                     SdrHdl* pH1=aHdl.GetHdl(HDL_REF1);
                     SdrHdl* pH2=aHdl.GetHdl(HDL_REF2);
-                    sal_Bool b90=sal_False;
-                    sal_Bool b45=sal_False;
+                    bool b90=false;
+                    bool b45=false;
                     Point aDif;
                     if (pH1!=NULL && pH2!=NULL) {
                         aDif=pH2->GetPos()-pH1->GetPos();
                         b90=(aDif.X()==0) || aDif.Y()==0;
                         b45=b90 || (Abs(aDif.X())==Abs(aDif.Y()));
                     }
-                    sal_Bool bNo=sal_False;
-                    if (!IsMirrorAllowed(sal_True,sal_True)) bNo=sal_True; // any mirroring is forbidden
-                    if (!IsMirrorAllowed(sal_False,sal_False) && !b45) bNo=sal_True; // mirroring freely is forbidden
-                    if (!IsMirrorAllowed(sal_True,sal_False) && !b90) bNo=sal_True;  // mirroring horizontally/vertically is allowed
+                    bool bNo=false;
+                    if (!IsMirrorAllowed(sal_True,sal_True)) bNo=true; // any mirroring is forbidden
+                    if (!IsMirrorAllowed(sal_False,sal_False) && !b45) bNo=true; // mirroring freely is forbidden
+                    if (!IsMirrorAllowed(sal_True,sal_False) && !b90) bNo=true;  // mirroring horizontally/vertically is allowed
                     if (bNo) return Pointer(POINTER_NOTALLOWED);
                     if (b90) {
                         return Pointer(POINTER_MIRROR);
@@ -1234,7 +1234,7 @@ XubString SdrView::GetStatusText()
         // position of the next line of the same paragraph, if there is one.
         sal_uInt16 nParaLine=0;
         sal_uIntPtr nParaLineAnz=pTextEditOutliner->GetLineCount(aSel.nEndPara);
-        sal_Bool bBrk=sal_False;
+        bool bBrk=false;
         while (!bBrk) {
             sal_uInt16 nLen=pTextEditOutliner->GetLineLen(aSel.nEndPara,nParaLine);
             sal_Bool bLastLine=(nParaLine==nParaLineAnz-1);
@@ -1242,8 +1242,8 @@ XubString SdrView::GetStatusText()
                 nCol-=nLen;
                 nLin++;
                 nParaLine++;
-            } else bBrk=sal_True;
-            if (nLen==0) bBrk=sal_True; // to be sure
+            } else bBrk=true;
+            if (nLen==0) bBrk=true; // to be sure
         }
 
         aStr.SearchAndReplaceAscii("%1", OUString::valueOf(nPar + 1));
@@ -1296,10 +1296,10 @@ SdrViewContext SdrView::GetContext() const
 
     if( HasMarkablePoints() && !IsFrameHandles() )
     {
-        sal_Bool bPath=sal_True;
+        bool bPath=true;
         for( sal_uIntPtr nMarkNum = 0; nMarkNum < nMarkAnz && bPath; nMarkNum++ )
             if (!GetMarkedObjectByIndex(nMarkNum)->ISA(SdrPathObj))
-                bPath=sal_False;
+                bPath=false;
 
         if( bPath )
             return SDRCONTEXT_POINTEDIT;
@@ -1307,7 +1307,7 @@ SdrViewContext SdrView::GetContext() const
 
     if( GetMarkedObjectCount() )
     {
-        sal_Bool bGraf = sal_True, bMedia = sal_True, bTable = sal_True;
+        bool bGraf = true, bMedia = true, bTable = true;
 
         for( sal_uIntPtr nMarkNum = 0; nMarkNum < nMarkAnz && ( bGraf || bMedia ); nMarkNum++ )
         {
@@ -1318,13 +1318,13 @@ SdrViewContext SdrView::GetContext() const
                 continue;
 
             if( !pMarkObj->ISA( SdrGrafObj ) )
-                bGraf = sal_False;
+                bGraf = false;
 
             if( !pMarkObj->ISA( SdrMediaObj ) )
-                bMedia = sal_False;
+                bMedia = false;
 
             if( !pMarkObj->ISA( ::sdr::table::SdrTableObj ) )
-                bTable = sal_False;
+                bTable = false;
         }
 
         if( bGraf )
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index e8f3a9f..72268f6 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -130,7 +130,7 @@ sal_Bool SdrExchangeView::Paste(const XubString& rStr, const Point& rPos, SdrObj
     if (pLst==NULL) return sal_False;
     SdrLayerID nLayer;
     if (!ImpGetPasteLayer(pLst,nLayer)) return sal_False;
-    sal_Bool bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
+    bool bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
     if (bUnmark) UnmarkAllObj();
     Rectangle aTextRect(0,0,500,500);
     SdrPage* pPage=pLst->GetPage();
@@ -167,7 +167,7 @@ sal_Bool SdrExchangeView::Paste(SvStream& rInput, const String& rBaseURL, sal_uI
     if (pLst==NULL) return sal_False;
     SdrLayerID nLayer;
     if (!ImpGetPasteLayer(pLst,nLayer)) return sal_False;
-    sal_Bool bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
+    bool bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
     if (bUnmark) UnmarkAllObj();
     Rectangle aTextRect(0,0,500,500);
     SdrPage* pPage=pLst->GetPage();
@@ -250,7 +250,7 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
     if (pLst==NULL)
         return sal_False;
 
-    sal_Bool bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
+    bool bUnmark=(nOptions&(SDRINSERT_DONTMARK|SDRINSERT_ADDMARK))==0 && !IsTextEdit();
     if (bUnmark)
         UnmarkAllObj();
 
@@ -258,7 +258,7 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
     // Calculate the necessary factors first.
     MapUnit eSrcUnit=pSrcMod->GetScaleUnit();
     MapUnit eDstUnit=pMod->GetScaleUnit();
-    sal_Bool bResize=eSrcUnit!=eDstUnit;
+    bool bResize=eSrcUnit!=eDstUnit;
     Fraction xResize,yResize;
     Point aPt0;
     if (bResize)
@@ -282,7 +282,7 @@ sal_Bool SdrExchangeView::Paste(const SdrModel& rMod, const Point& rPos, SdrObjL
         Size  aSiz(aDist.X(),aDist.Y());
         sal_uIntPtr nCloneErrCnt=0;
         sal_uIntPtr nOb,nObAnz=pSrcPg->GetObjCount();
-        sal_Bool bMark=pMarkPV!=NULL && !IsTextEdit() && (nOptions&SDRINSERT_DONTMARK)==0;
+        bool bMark=pMarkPV!=NULL && !IsTextEdit() && (nOptions&SDRINSERT_DONTMARK)==0;
 
         // #i13033#
         // New mechanism to re-create the connections of cloned connectors
@@ -431,7 +431,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
             pMarkPV=pPV;
     }
 
-    sal_Bool bMark=pMarkPV!=NULL && !IsTextEdit() && (nOptions&SDRINSERT_DONTMARK)==0;
+    bool bMark=pMarkPV!=NULL && !IsTextEdit() && (nOptions&SDRINSERT_DONTMARK)==0;
     if (bMark)
     { // select object the first PageView we found
         MarkObj(pObj,pMarkPV);


More information about the Libreoffice-commits mailing list