[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang include/svx svx/source ucb/source

2018-07-31 Thread Libreoffice Gerrit user
 compilerplugins/clang/test/unnecessaryoverride.cxx |   31 +
 compilerplugins/clang/unnecessaryoverride.cxx  |   28 ++
 include/svx/svdview.hxx|2 -
 svx/source/svdraw/svdview.cxx  |5 ---
 ucb/source/ucp/cmis/cmis_datasupplier.cxx  |9 ++
 ucb/source/ucp/cmis/cmis_datasupplier.hxx  |2 -
 ucb/source/ucp/ftp/ftpdirp.cxx |3 --
 ucb/source/ucp/ftp/ftpdirp.hxx |2 -
 ucb/source/ucp/webdav-neon/webdavcontent.cxx   |4 +-
 ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx   |4 --
 ucb/source/ucp/webdav-neon/webdavprovider.hxx  |2 -
 11 files changed, 63 insertions(+), 29 deletions(-)

New commits:
commit 7d13fe52bdb31d1263148567fec009df1de6e330
Author: Noel Grandin 
AuthorDate: Mon Jul 30 15:35:13 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 31 14:59:41 2018 +0200

loplugin:returnconstant in ucb

Change-Id: I2810468e64bba8bc9f8af4dff170bc1ab310fe2f
Reviewed-on: https://gerrit.libreoffice.org/58337
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx 
b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
index 13133a2d27ad..01819ad36a03 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
@@ -30,10 +30,10 @@ namespace cmis
 {
 }
 
-bool DataSupplier::getData()
+void DataSupplier::getData()
 {
 if ( mbCountFinal )
-return true;
+return;
 
 std::vector< uno::Reference< ucb::XContent > > aChildren = 
m_pChildrenProvider->getChildren( );
 
@@ -51,8 +51,6 @@ namespace cmis
 }
 }
 mbCountFinal = true;
-
-return true;
 }
 
 DataSupplier::~DataSupplier()
@@ -90,7 +88,8 @@ namespace cmis
 if ( maResults.size() > nIndex ) // Result already present.
 return true;
 
-if ( getData() && maResults.size() > nIndex )
+getData();
+if ( maResults.size() > nIndex )
 return true;
 
 return false;
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.hxx 
b/ucb/source/ucp/cmis/cmis_datasupplier.hxx
index 619af90e355c..0f618f04bc54 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.hxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.hxx
@@ -39,7 +39,7 @@ namespace cmis
 ChildrenProvider* m_pChildrenProvider;
 sal_Int32 mnOpenMode;
 bool mbCountFinal;
-bool getData();
+void getData();
 ResultList maResults;
 
 public:
diff --git a/ucb/source/ucp/ftp/ftpdirp.cxx b/ucb/source/ucp/ftp/ftpdirp.cxx
index f4ab59afbbe8..ca439aa31a8a 100644
--- a/ucb/source/ucp/ftp/ftpdirp.cxx
+++ b/ucb/source/ucp/ftp/ftpdirp.cxx
@@ -1219,7 +1219,7 @@ bool FTPDirectoryParser::parseUNIX_isTime (
  * checked for validity of the given day in the given month and year.
  *
  */
-bool FTPDirectoryParser::setYear (
+void FTPDirectoryParser::setYear (
 DateTime , sal_uInt16 nYear)
 {
 if (nYear < 100)
@@ -1249,7 +1249,6 @@ bool FTPDirectoryParser::setYear (
 }
 
 rDateTime.SetYear(nYear);
-return true;
 }
 
 /*
diff --git a/ucb/source/ucp/ftp/ftpdirp.hxx b/ucb/source/ucp/ftp/ftpdirp.hxx
index 3284c7357fb4..983fab1d29ae 100644
--- a/ucb/source/ucp/ftp/ftpdirp.hxx
+++ b/ucb/source/ucp/ftp/ftpdirp.hxx
@@ -143,7 +143,7 @@ namespace ftp {
 sal_uInt16  nHour,
 DateTime& rDateTime);
 
-static bool setYear (
+static void setYear (
 DateTime& rDateTime,
 sal_uInt16  nYear);
 
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 3113b3c1f5f1..db25abd32205 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1256,8 +1256,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
 
 while ( it != end )
 {
-if ( pProvider->getProperty( (*it).first, aProp ) )
-xRow->appendObject( aProp, (*it).second.value() );
+pProvider->getProperty( (*it).first, aProp );
+xRow->appendObject( aProp, (*it).second.value() );
 
 ++it;
 }
diff --git a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
index 5599b04ff65f..38b840bcbc15 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
@@ -62,7 +62,7 @@ using namespace webdav_ucp;
 // ContentProvider implementation.
 
 
-bool ContentProvider::getProperty(
+void ContentProvider::getProperty(
 const OUString & rPropName, beans::Property & rProp )
 {
 if ( !m_pProps )
@@ -277,8 +277,6 @@ bool ContentProvider::getProperty(
 cppu::UnoType::get(),
 

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

2017-10-16 Thread Stephan Bergmann
 compilerplugins/clang/datamembershadow.cxx|4 +---
 include/svx/IAccessibleParent.hxx |2 +-
 include/svx/sidebar/AreaPropertyPanelBase.hxx |2 +-
 include/svx/sidebar/LinePropertyPanelBase.hxx |2 +-
 svx/source/accessibility/AccessibleTextHelper.cxx |2 +-
 svx/source/inc/DefaultShapesPanel.hxx |4 ++--
 svx/source/inc/ShapesUtil.hxx |4 ++--
 svx/source/inc/cell.hxx   |4 ++--
 svx/source/inc/celltypes.hxx  |4 ++--
 svx/source/inc/tablemodel.hxx |4 ++--
 svx/source/sidebar/PanelFactory.cxx   |2 +-
 svx/source/unodraw/unoshtxt.cxx   |2 +-
 12 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit 2d3535a78aa1b3e2714adfa65cd73bd0fe02427e
Author: Stephan Bergmann 
Date:   Mon Oct 16 17:31:23 2017 +0200

Move svx include files to common include directory

...that are included from various source directories.  Change done in
preparation of loplugin:includeform.

Change-Id: I9191e80aa721c376f17219e4d10eb83929e38e14

diff --git a/compilerplugins/clang/datamembershadow.cxx 
b/compilerplugins/clang/datamembershadow.cxx
index b946b7001759..d07055675ad9 100644
--- a/compilerplugins/clang/datamembershadow.cxx
+++ b/compilerplugins/clang/datamembershadow.cxx
@@ -85,9 +85,7 @@ bool DataMemberShadow::VisitFieldDecl(FieldDecl const * 
fieldDecl)
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/store/source/stortree.hxx")
 || loplugin::isSamePathname(aFileName, SRCDIR 
"/store/source/stordata.hxx"))
 return true;
-if (loplugin::isSamePathname(aFileName, SRCDIR 
"/svx/source/table/cell.hxx")
-|| loplugin::isSamePathname(aFileName, SRCDIR 
"/svx/source/unodraw/../table/cell.hxx")
-|| loplugin::isSamePathname(aFileName, SRCDIR 
"/svx/source/accessibility/../table/cell.hxx"))
+if (loplugin::isSamePathname(aFileName, SRCDIR "/svx/source/inc/cell.hxx"))
 return true;
 if (loplugin::isSamePathname(aFileName, SRCDIR 
"/sw/source/uibase/inc/dbtree.hxx"))
 return true;
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx 
b/svx/source/accessibility/AccessibleTextHelper.cxx
index 0bc3a55b39ee..4859d2e15031 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -62,7 +62,7 @@
 #include "editeng/AccessibleEditableTextPara.hxx"
 #include 
 #include 
-#include "../table/cell.hxx"
+#include "cell.hxx"
 #include "../table/accessiblecell.hxx"
 #include 
 #include 
diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.hxx 
b/svx/source/inc/DefaultShapesPanel.hxx
similarity index 93%
rename from svx/source/sidebar/shapes/DefaultShapesPanel.hxx
rename to svx/source/inc/DefaultShapesPanel.hxx
index 073e2a1ee151..3759b1d859cd 100644
--- a/svx/source/sidebar/shapes/DefaultShapesPanel.hxx
+++ b/svx/source/inc/DefaultShapesPanel.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SD_SOURCE_SIDEBAR_INSERT_DEFAULTSHAPESPANEL_HXX
-#define INCLUDED_SD_SOURCE_SIDEBAR_INSERT_DEFAULTSHAPESPANEL_HXX
+#ifndef INCLUDED_SVX_SOURCE_INC_DEFAULTSHAPESPANEL_HXX
+#define INCLUDED_SVX_SOURCE_INC_DEFAULTSHAPESPANEL_HXX
 
 #include 
 #include 
diff --git a/svx/source/sidebar/shapes/ShapesUtil.hxx 
b/svx/source/inc/ShapesUtil.hxx
similarity index 88%
rename from svx/source/sidebar/shapes/ShapesUtil.hxx
rename to svx/source/inc/ShapesUtil.hxx
index 0ac33f574b45..e6385c9a69d0 100644
--- a/svx/source/sidebar/shapes/ShapesUtil.hxx
+++ b/svx/source/inc/ShapesUtil.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SVX_SOURCE_SIDEBAR_SHAPES_SHAPESUTIL_HXX
-#define INCLUDED_SVX_SOURCE_SIDEBAR_SHAPES_SHAPESUTIL_HXX
+#ifndef INCLUDED_SVX_SOURCE_INC_SHAPESUTIL_HXX
+#define INCLUDED_SVX_SOURCE_INC_SHAPESUTIL_HXX
 #include 
 #include 
 
diff --git a/svx/source/table/cell.hxx b/svx/source/inc/cell.hxx
similarity index 99%
rename from svx/source/table/cell.hxx
rename to svx/source/inc/cell.hxx
index 1bd063dac3f6..3a061c58475d 100644
--- a/svx/source/table/cell.hxx
+++ b/svx/source/inc/cell.hxx
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SVX_SOURCE_TABLE_CELL_HXX
-#define INCLUDED_SVX_SOURCE_TABLE_CELL_HXX
+#ifndef INCLUDED_SVX_SOURCE_INC_CELL_HXX
+#define INCLUDED_SVX_SOURCE_INC_CELL_HXX
 
 #include 
 #include 
diff --git a/svx/source/table/celltypes.hxx b/svx/source/inc/celltypes.hxx
similarity index 96%
rename from svx/source/table/celltypes.hxx
rename to svx/source/inc/celltypes.hxx
index 2200e1661a59..6296ac42d7da 100644
--- a/svx/source/table/celltypes.hxx
+++ 

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

2017-02-13 Thread Noel Grandin
 compilerplugins/clang/unusedenumconstants.py |1 +
 include/svx/sidebar/SelectionAnalyzer.hxx|1 -
 include/svx/svdview.hxx  |1 -
 svx/source/sidebar/SelectionAnalyzer.cxx |5 -
 svx/source/svdraw/svdview.cxx|1 -
 5 files changed, 1 insertion(+), 8 deletions(-)

New commits:
commit ed8773a201bc4954050b87f6d2952525831d3499
Author: Noel Grandin 
Date:   Mon Feb 13 14:52:42 2017 +0200

remove unused Outline enumerator from SelectionAnalyzer::ViewType enum

Change-Id: I256318046b10f6a75542d5cbf4560bb99a6dfff6
Reviewed-on: https://gerrit.libreoffice.org/34239
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/include/svx/sidebar/SelectionAnalyzer.hxx 
b/include/svx/sidebar/SelectionAnalyzer.hxx
index c4ed2fa..d1aebbc 100644
--- a/include/svx/sidebar/SelectionAnalyzer.hxx
+++ b/include/svx/sidebar/SelectionAnalyzer.hxx
@@ -45,7 +45,6 @@ public:
 Master,
 Handout,
 Notes,
-Outline
 };
 static vcl::EnumContext::Context GetContextForSelection_SD (
 const SdrMarkList& rMarkList,
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx 
b/svx/source/sidebar/SelectionAnalyzer.cxx
index 7ee232f..4598667 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -117,9 +117,6 @@ EnumContext::Context 
SelectionAnalyzer::GetContextForSelection_SD (
 case ViewType::Notes:
 eContext = EnumContext::Context::NotesPage;
 break;
-case ViewType::Outline:
-eContext = EnumContext::Context::OutlineText;
-break;
 }
 break;
 
@@ -297,8 +294,6 @@ EnumContext::Context 
SelectionAnalyzer::GetContextForObjectId_SD (
 return EnumContext::Context::HandoutPage;
 case ViewType::Notes:
 return EnumContext::Context::NotesPage;
-case ViewType::Outline:
-return EnumContext::Context::OutlineText;
 default:
 return EnumContext::Context::Unknown;
 }
commit 251decd3205af54772780240849b828984e16a6a
Author: Noel Grandin 
Date:   Mon Feb 13 11:51:28 2017 +0200

remove unused BrkAction enumerator from SdrEventKind

Change-Id: I46c50bbbad5d269b7f15e041db115fa7f37a8168
Reviewed-on: https://gerrit.libreoffice.org/34205
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/compilerplugins/clang/unusedenumconstants.py 
b/compilerplugins/clang/unusedenumconstants.py
index e706c18..856a84e 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -139,6 +139,7 @@ for d in definitionSet:
  "include/vcl/print.hxx", # NupOrderType, from UI combobox
  "sw/source/uibase/inc/swcont.hxx", # RegionMode, from UI; 
ContentTypeId, from UI(registry)
  "sw/inc/toxe.hxx", # ToxAuthorityType (from UI)
+ "include/svx/sxekitm.hxx", # SdrEdgeKind (from UI)
 # represents constants from an external API
  "opencl/inc/opencl_device_selection.h",
  "vcl/inc/sft.hxx",
diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx
index a161157..3caee8e 100644
--- a/include/svx/svdview.hxx
+++ b/include/svx/svdview.hxx
@@ -66,7 +66,6 @@ enum class SdrEventKind {
 MoveAction,
 EndAction,
 BackAction,
-BrkAction,
 EndCreate,
 EndDrag,
 MarkObj,
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 3b602c5..2ee34fc 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -789,7 +789,6 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
 case SdrEventKind::MoveAction: MovAction(aLogicPos); bRet=true; break;
 case SdrEventKind::EndAction: EndAction(); bRet=true; break;
 case SdrEventKind::BackAction: BckAction(); bRet=true; break;
-case SdrEventKind::BrkAction: BrkAction(); bRet=true; break;
 case SdrEventKind::EndMark  : EndAction(); bRet=true; break;
 case SdrEventKind::BrkMark  : {
 BrkAction();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-12 Thread Stephan Bergmann
 compilerplugins/clang/salbool.cxx   |   47 
 include/svx/pagectrl.hxx|4 +--
 svx/source/dialog/pagectrl.cxx  |6 ++--
 svx/source/form/formcontrolling.cxx |2 -
 svx/source/form/tbxform.cxx |6 ++--
 svx/source/inc/tbxform.hxx  |2 -
 6 files changed, 57 insertions(+), 10 deletions(-)

New commits:
commit 03d92f1ca38aa3873158ddec86ad8beebaf928bb
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Sep 12 14:46:39 2014 +0200

svx: sal_Bool - bool

Change-Id: I5b9b730d7060ec146ed0f54c7fe7eb0ca09f7d9c

diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx
index eb83db6..ee1ffbb 100644
--- a/include/svx/pagectrl.hxx
+++ b/include/svx/pagectrl.hxx
@@ -41,8 +41,8 @@ private:
 longnRight;
 
 SvxBoxItem* pBorder;
-sal_BoolbResetBackground;
-sal_BoolbFrameDirection;
+boolbResetBackground;
+boolbFrameDirection;
 sal_Int32   nFrameDirection;
 
 longnHdLeft;
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index 3a1145d..dafd739 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -46,8 +46,8 @@ SvxPageWindow::SvxPageWindow(Window* pParent)
 
 //
 pBorder(0),
-bResetBackground(sal_False),
-bFrameDirection(sal_False),
+bResetBackground(false),
+bFrameDirection(false),
 nFrameDirection(0),
 
 nHdLeft(0),
@@ -169,7 +169,7 @@ void SvxPageWindow::DrawPage(const Point rOrg, const bool 
bSecond, const bool b
 DrawRect(Rectangle(Point(0,0),winSize));
 
 if(bResetBackground)
-bResetBackground = sal_False;
+bResetBackground = false;
 }
 SetLineColor(rFieldTextColor);
 // Shadow
diff --git a/svx/source/form/formcontrolling.cxx 
b/svx/source/form/formcontrolling.cxx
index dfa6e91..893c7f6 100644
--- a/svx/source/form/formcontrolling.cxx
+++ b/svx/source/form/formcontrolling.cxx
@@ -341,7 +341,7 @@ namespace svx
 
 case COMMIT_RECORD:
 {
-sal_Bool bDummy( sal_False );
+sal_Bool bDummy( false );
 bSuccess = m_xFormOperations-commitCurrentRecord( bDummy );
 }
 break;
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index f519dd4..6e202f7 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -64,7 +64,7 @@ SvxFmAbsRecWin::~SvxFmAbsRecWin()
 }
 
 
-void SvxFmAbsRecWin::FirePosition( sal_Bool _bForce )
+void SvxFmAbsRecWin::FirePosition( bool _bForce )
 {
 if ( _bForce || IsValueChangedFromSaved() )
 {
@@ -92,14 +92,14 @@ void SvxFmAbsRecWin::FirePosition( sal_Bool _bForce )
 
 void SvxFmAbsRecWin::LoseFocus()
 {
-FirePosition( sal_False );
+FirePosition( false );
 }
 
 
 void SvxFmAbsRecWin::KeyInput( const KeyEvent rKeyEvent )
 {
 if( rKeyEvent.GetKeyCode() == KEY_RETURN  !GetText().isEmpty() )
-FirePosition( sal_True );
+FirePosition( true );
 else
 NumericField::KeyInput( rKeyEvent );
 }
diff --git a/svx/source/inc/tbxform.hxx b/svx/source/inc/tbxform.hxx
index 8640b7d..adb279f 100644
--- a/svx/source/inc/tbxform.hxx
+++ b/svx/source/inc/tbxform.hxx
@@ -38,7 +38,7 @@ public:
 virtual void LoseFocus() SAL_OVERRIDE;
 
 protected:
-virtual void FirePosition( sal_Bool _bForce );
+virtual void FirePosition( bool _bForce );
 };
 
 
commit e333adb1ff0ffc36a78e50dc4061c1dfb0593d71
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Sep 12 14:46:23 2014 +0200

loplugin:salbool: exclude sal_Bool vars passed to non-const ref

Change-Id: I45b323b326cc56cfc48e0abaa52d51fd86adbf79

diff --git a/compilerplugins/clang/salbool.cxx 
b/compilerplugins/clang/salbool.cxx
index 5eddba6..6cca0fa 100644
--- a/compilerplugins/clang/salbool.cxx
+++ b/compilerplugins/clang/salbool.cxx
@@ -119,6 +119,8 @@ public:
 
 bool VisitUnaryAddrOf(UnaryOperator const * op);
 
+bool VisitCallExpr(CallExpr * expr);
+
 bool VisitCStyleCastExpr(CStyleCastExpr * expr);
 
 bool VisitCXXStaticCastExpr(CXXStaticCastExpr * expr);
@@ -210,6 +212,51 @@ bool SalBool::VisitUnaryAddrOf(UnaryOperator const * op) {
 return true;
 }
 
+bool SalBool::VisitCallExpr(CallExpr * expr) {
+Decl const * d = expr-getCalleeDecl();
+FunctionProtoType const * ft = nullptr;
+if (d != nullptr) {
+FunctionDecl const * fd = dyn_castFunctionDecl(d);
+if (fd != nullptr) {
+PointerType const * pt = fd-getType()-getAsPointerType();
+QualType t2(pt == nullptr ? fd-getType() : pt-getPointeeType());
+ft = t2-getAsFunctionProtoType();
+assert(
+ft != nullptr || !compiler.getLangOpts().CPlusPlus
+|| (fd-getBuiltinID() != Builtin::NotBuiltin
+ isaFunctionNoProtoType(t2)));
+// __builtin_*s have