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

Tor Lillqvist tml at collabora.com
Sun Sep 20 06:48:11 PDT 2015


 svx/source/svdraw/svdotext.cxx              |    6 +++---
 svx/source/svdraw/svdotextdecomposition.cxx |    2 +-
 svx/source/svdraw/textchainflow.cxx         |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 20b7959ab980310119232fd2395008a89d6ea581
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Sep 20 16:46:31 2015 +0300

    WaE: loplugin:cstylecast
    
    Change-Id: I953467bd0713a462cb9dcf66c8119eb1883553a2

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 3ad8f71..b9f4ca9 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1422,7 +1422,7 @@ void SdrTextObj::impHandleChainingEventsDuringDecomposition(SdrOutliner &rOutlin
     // Some debug output
     size_t nObjCount = pPage->GetObjCount();
     for (unsigned i = 0; i < nObjCount; i++) {
-        SdrTextObj *pCurObj = (SdrTextObj *) pPage->GetObj(i);
+        SdrTextObj *pCurObj = static_cast<SdrTextObj *>(pPage->GetObj(i));
 
         if (pCurObj == this) {
             SAL_INFO("svx.chaining", "Working on TextBox " << i);
commit 16964a87c08b46c4fce0695812cbc249225fca41
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Sep 20 16:45:02 2015 +0300

    WaE: loplugin:literaltoboolconversion
    
    Change-Id: Ib7cf1a0d4033fe2807a21de2c4bbcddb079e4128

diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 71d4649..fc701b2 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -255,7 +255,7 @@ SdrTextObj *TextChainFlow::GetNextLink() const
 
 OutlinerParaObject *TextChainFlow::impGetOverflowingParaObject(SdrOutliner *)
 {   // XXX: Should never be called (to be deleted)
-    assert(0);
+    assert(false);
     return NULL;
     //return mpOverflChText->CreateOverflowingParaObject(pOutliner,
 //                                                      mpNextLink->GetOutlinerParaObject());
commit aac58c62758e0915b3a590700abecffb4d2c25de
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Sep 20 16:42:53 2015 +0300

    WaE: loop index type 'unsigned int' is narrower than length type 'size_t'
    
    Change-Id: I2e0999468686e8c5521b7342903df5a68f8648d0

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 9705624..aa06f1c 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1993,7 +1993,7 @@ SdrObject *ImpGetObjByName(SdrObjList *pObjList, OUString const& aObjName)
 {
     // scan the whole list
     size_t nObjCount = pObjList->GetObjCount();
-    for (unsigned i = 0; i < nObjCount; i++) {
+    for (size_t i = 0; i < nObjCount; i++) {
         SdrObject *pCurObj = pObjList->GetObj(i);
 
         if (pCurObj->GetName() == aObjName) {
commit f66ecf00ed232dd04d5d9b9afd833aa2be981141
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Sep 20 16:41:09 2015 +0300

    WaE: passing OUString by value, rather pass by reference
    
    Change-Id: Ic6842bdb382c05912399db86aa08765d8653a019

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index cc3f479..9705624 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1989,7 +1989,7 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus )
 /* Begin chaining code */
 
 // XXX: Make it a method somewhere?
-SdrObject *ImpGetObjByName(SdrObjList *pObjList, OUString aObjName)
+SdrObject *ImpGetObjByName(SdrObjList *pObjList, OUString const& aObjName)
 {
     // scan the whole list
     size_t nObjCount = pObjList->GetObjCount();
@@ -2005,7 +2005,7 @@ SdrObject *ImpGetObjByName(SdrObjList *pObjList, OUString aObjName)
 }
 
 // XXX: Make it a (private) method of SdrTextObj
-void ImpUpdateChainLinks(SdrTextObj *pTextObj, OUString aNextLinkName)
+void ImpUpdateChainLinks(SdrTextObj *pTextObj, OUString const& aNextLinkName)
 {
     // XXX: Current implementation constraints text boxes to be on the same page
 


More information about the Libreoffice-commits mailing list