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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 15 16:57:12 UTC 2021


 compilerplugins/clang/virtualdead.results              |   28 ++++++-------
 compilerplugins/clang/virtualdead.unusedparams.results |   35 +++++++----------
 sw/inc/IDocumentRedlineAccess.hxx                      |    1 
 sw/source/core/doc/DocumentRedlineManager.cxx          |    5 --
 sw/source/core/doc/tblrwcl.cxx                         |    9 +---
 sw/source/core/docnode/ndtbl.cxx                       |    3 -
 sw/source/core/inc/DocumentRedlineManager.hxx          |    1 
 7 files changed, 34 insertions(+), 48 deletions(-)

New commits:
commit 20635ed31945d500685f7f667f0694410e49906c
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Sep 15 11:42:31 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Sep 15 18:56:36 2021 +0200

    loplugin:virtualdead HasExtraRedlineTable always returns true
    
    Change-Id: Ibc703b4c2adc6c6579cc4be50d274504ba957f45
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122138
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/virtualdead.results b/compilerplugins/clang/virtualdead.results
index 533a0f6edf11..fe2a437e23e8 100644
--- a/compilerplugins/clang/virtualdead.results
+++ b/compilerplugins/clang/virtualdead.results
@@ -10,31 +10,28 @@ basic/source/comp/codegen.cxx:540
 canvas/inc/base/bitmapcanvasbase.hxx:79
     unsigned char canvas::BitmapCanvasBase::hasAlpha()
     1
-canvas/inc/base/bufferedgraphicdevicebase.hxx:107
+canvas/inc/base/bufferedgraphicdevicebase.hxx:105
     void canvas::BufferedGraphicDeviceBase::destroyBuffers()
     empty
-canvas/inc/base/graphicdevicebase.hxx:234
+canvas/inc/base/graphicdevicebase.hxx:233
     unsigned char canvas::GraphicDeviceBase::hasFullScreenMode()
     0
-canvas/inc/base/graphicdevicebase.hxx:239
+canvas/inc/base/graphicdevicebase.hxx:238
     unsigned char canvas::GraphicDeviceBase::enterFullScreenMode(unsigned char,)
     0
-canvas/inc/base/graphicdevicebase.hxx:305
+canvas/inc/base/graphicdevicebase.hxx:304
     void canvas::GraphicDeviceBase::removePropertyChangeListener(const class rtl::OUString &,const class com::sun::star::uno::Reference<class com::sun::star::beans::XPropertyChangeListener> &,)
     empty
-canvas/inc/base/graphicdevicebase.hxx:318
+canvas/inc/base/graphicdevicebase.hxx:317
     void canvas::GraphicDeviceBase::removeVetoableChangeListener(const class rtl::OUString &,const class com::sun::star::uno::Reference<class com::sun::star::beans::XVetoableChangeListener> &,)
     empty
-desktop/source/deployment/registry/inc/dp_backenddb.hxx:119
-    class rtl::OUString dp_registry::backend::BackendDb::getDbNSName()
-    "http://openoffi
 include/basegfx/utils/unopolypolygon.hxx:94
     void basegfx::unotools::UnoPolyPolygon::modifying()const
     empty
 include/connectivity/sdbcx/IRefreshable.hxx:29
     void connectivity::sdbcx::IRefreshableGroups::refreshGroups()
     empty
-include/filter/msfilter/msdffimp.hxx:546
+include/filter/msfilter/msdffimp.hxx:544
     _Bool SvxMSDffManager::ShapeHasText(unsigned long,unsigned long,)const
     1
 include/svl/svdde.hxx:236
@@ -64,7 +61,7 @@ include/unotools/desktopterminationobserver.hxx:36
 include/vbahelper/vbahelperinterface.hxx:74
     int InheritedHelperInterfaceImpl::getCreator()
     1400204879
-sc/source/core/opencl/formulagroupcl.cxx:1069
+sc/source/core/opencl/formulagroupcl.cxx:1070
     void sc::opencl::(anonymous namespace)::DynamicKernelSlidingArgument::GenSlidingWindowFunction(class std::__cxx11::basic_stringstream<char> &,)
     empty
 sc/source/core/opencl/opbase.hxx:202
@@ -79,7 +76,10 @@ sc/source/ui/vba/vbasheetobjects.cxx:142
 slideshow/source/engine/animationfactory.cxx:616
     void slideshow::internal::(anonymous namespace)::GenericAnimation::prefetch()
     empty
-vcl/inc/qt5/Qt5FilePicker.hxx:172
+sw/inc/IDocumentRedlineAccess.hxx:132
+    _Bool IDocumentRedlineAccess::HasExtraRedlineTable()const
+    1
+vcl/inc/qt5/Qt5FilePicker.hxx:173
     void Qt5FilePicker::updateAutomaticFileExtension()
     empty
 vcl/inc/salframe.hxx:145
@@ -91,13 +91,13 @@ vcl/inc/salframe.hxx:147
 vcl/inc/salframe.hxx:204
     _Bool SalFrame::MapUnicodeToKeyCode(char16_t,struct o3tl::strong_int<unsigned short, struct LanguageTypeTag>,class vcl::KeyCode &,)
     0
-vcl/inc/salinst.hxx:89
+vcl/inc/salinst.hxx:94
     _Bool SalInstance::SVMainHook(int *,)
     0
-vcl/inc/salinst.hxx:200
+vcl/inc/salinst.hxx:201
     void SalInstance::releaseMainThread()
     empty
-vcl/inc/salinst.hxx:209
+vcl/inc/salinst.hxx:210
     void SalInstance::BeforeAbort(const class rtl::OUString &,_Bool,)
     empty
 vcl/inc/salmenu.hxx:77
diff --git a/compilerplugins/clang/virtualdead.unusedparams.results b/compilerplugins/clang/virtualdead.unusedparams.results
index 2e11394bed89..960cee40e2c2 100644
--- a/compilerplugins/clang/virtualdead.unusedparams.results
+++ b/compilerplugins/clang/virtualdead.unusedparams.results
@@ -31,19 +31,19 @@ basic/source/comp/codegen.cxx:480
 basic/source/comp/codegen.cxx:481
     void (anonymous namespace)::OffSetAccumulator::processOpCode2(enum SbiOpcode,type-parameter-?-?,type-parameter-?-?,)
     000
-canvas/inc/base/bufferedgraphicdevicebase.hxx:229
+canvas/inc/base/bufferedgraphicdevicebase.hxx:227
     void canvas::BufferedGraphicDeviceBase::windowShown(const struct com::sun::star::lang::EventObject &,)
     0
-canvas/inc/base/bufferedgraphicdevicebase.hxx:236
+canvas/inc/base/bufferedgraphicdevicebase.hxx:234
     void canvas::BufferedGraphicDeviceBase::windowHidden(const struct com::sun::star::lang::EventObject &,)
     0
-canvas/inc/base/graphicdevicebase.hxx:239
+canvas/inc/base/graphicdevicebase.hxx:238
     unsigned char canvas::GraphicDeviceBase::enterFullScreenMode(unsigned char,)
     0
-canvas/inc/base/graphicdevicebase.hxx:305
+canvas/inc/base/graphicdevicebase.hxx:304
     void canvas::GraphicDeviceBase::removePropertyChangeListener(const class rtl::OUString &,const class com::sun::star::uno::Reference<class com::sun::star::beans::XPropertyChangeListener> &,)
     00
-canvas/inc/base/graphicdevicebase.hxx:318
+canvas/inc/base/graphicdevicebase.hxx:317
     void canvas::GraphicDeviceBase::removeVetoableChangeListener(const class rtl::OUString &,const class com::sun::star::uno::Reference<class com::sun::star::beans::XVetoableChangeListener> &,)
     00
 canvas/inc/base/integerbitmapbase.hxx:57
@@ -67,13 +67,10 @@ include/cppuhelper/propshlp.hxx:330
 include/drawinglayer/primitive2d/textbreakuphelper.hxx:58
     _Bool drawinglayer::primitive2d::TextBreakupHelper::allowChange(unsigned int,class basegfx::B2DHomMatrix &,unsigned int,unsigned int,)
     0111
-include/editeng/editeng.hxx:484
-    void EditEngine::PaintingFirstLine(int,const class Point &,long,const class Point &,struct o3tl::strong_int<short, struct Degree10Tag>,class OutputDevice &,)
-    110111
-include/editeng/editeng.hxx:487
+include/editeng/editeng.hxx:493
     void EditEngine::ParagraphConnected(int,int,)
     01
-include/filter/msfilter/msdffimp.hxx:546
+include/filter/msfilter/msdffimp.hxx:544
     _Bool SvxMSDffManager::ShapeHasText(unsigned long,unsigned long,)const
     00
 include/oox/dump/dumperbase.hxx:473
@@ -85,7 +82,7 @@ include/oox/dump/dumperbase.hxx:564
 include/oox/dump/oledumper.hxx:165
     void oox::dump::ComCtlObjectBase::implDumpCommonExtra(long,)
     0
-include/oox/export/shapes.hxx:136
+include/oox/export/shapes.hxx:138
     class oox::drawingml::ShapeExport & oox::drawingml::ShapeExport::WriteNonVisualProperties(const class com::sun::star::uno::Reference<class com::sun::star::drawing::XShape> &,)
     0
 include/sfx2/stbitem.hxx:101
@@ -127,7 +124,7 @@ include/vcl/accessibletable.hxx:93
 include/vcl/dndhelp.hxx:62
     void vcl::unohelper::DragAndDropClient::dragExit(const struct com::sun::star::datatransfer::dnd::DropTargetEvent &,)
     0
-include/vcl/opengl/OpenGLContext.hxx:88
+include/vcl/opengl/OpenGLContext.hxx:101
     struct SystemWindowData OpenGLContext::generateWinData(class vcl::Window *,_Bool,)
     10
 include/xmloff/txtimp.hxx:108
@@ -142,7 +139,7 @@ sc/inc/filter.hxx:83
 sc/inc/formulagroup.hxx:144
     class boost::intrusive_ptr<class ScMatrix> sc::FormulaGroupInterpreter::inverseMatrix(const class ScMatrix &,)
     0
-sc/source/core/opencl/formulagroupcl.cxx:1069
+sc/source/core/opencl/formulagroupcl.cxx:1070
     void sc::opencl::(anonymous namespace)::DynamicKernelSlidingArgument::GenSlidingWindowFunction(class std::__cxx11::basic_stringstream<char> &,)
     0
 sdext/source/pdfimport/inc/contentsink.hxx:151
@@ -184,7 +181,7 @@ starmath/source/wordexportbase.hxx:28
 sw/inc/swcrsr.hxx:163
     _Bool SwCursor::LeftRight(_Bool,unsigned short,unsigned short,_Bool,_Bool,_Bool,const class SwRootFrame *,_Bool,)
     11000000
-sw/source/core/access/acccontext.hxx:352
+sw/source/core/access/acccontext.hxx:354
     _Bool SwAccessibleContext::SetSelectedState(_Bool,)
     0
 sw/source/core/inc/txmsrt.hxx:145
@@ -220,19 +217,19 @@ vcl/inc/salgdiimpl.hxx:96
 vcl/inc/salgdiimpl.hxx:151
     void SalGraphicsImpl::copyArea(long,long,long,long,long,long,_Bool,)
     1111110
-vcl/inc/salinst.hxx:89
+vcl/inc/salinst.hxx:94
     _Bool SalInstance::SVMainHook(int *,)
     0
-vcl/inc/salinst.hxx:122
+vcl/inc/salinst.hxx:127
     void SalInstance::GetPrinterQueueState(struct SalPrinterQueueInfo *,)
     0
-vcl/inc/salinst.hxx:164
+vcl/inc/salinst.hxx:165
     class weld::Builder * SalInstance::CreateInterimBuilder(class vcl::Window *,const class rtl::OUString &,const class rtl::OUString &,_Bool,unsigned long,)
     11110
-vcl/inc/salinst.hxx:183
+vcl/inc/salinst.hxx:184
     void SalInstance::AddToRecentDocumentList(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,)
     100
-vcl/inc/salinst.hxx:209
+vcl/inc/salinst.hxx:210
     void SalInstance::BeforeAbort(const class rtl::OUString &,_Bool,)
     00
 vcl/inc/salmenu.hxx:71
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
index 0e4c9e33fb52..c627b3508850 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -129,7 +129,6 @@ public:
     virtual SwRedlineTable& GetRedlineTable() = 0;
     virtual const SwExtraRedlineTable& GetExtraRedlineTable() const = 0;
     virtual SwExtraRedlineTable& GetExtraRedlineTable() = 0;
-    virtual bool HasExtraRedlineTable() const = 0;
 
     virtual bool IsInRedlines(const SwNode& rNode) const = 0;
 
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index af2965f9d4bd..00608633c969 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -1165,11 +1165,6 @@ SwExtraRedlineTable& DocumentRedlineManager::GetExtraRedlineTable()
     return maExtraRedlineTable;
 }
 
-bool DocumentRedlineManager::HasExtraRedlineTable() const
-{
-    return true;
-}
-
 bool DocumentRedlineManager::IsInRedlines(const SwNode & rNode) const
 {
     SwPosition aPos(rNode);
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 55a1d32ec661..f529742e429c 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -724,8 +724,7 @@ void DeleteBox_( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
             pShareFormats->RemoveFormat( *rTableBoxes[ nDelPos ]->GetFrameFormat() );
 
         // Before deleting the 'Table Box' from memory - delete any redlines attached to it
-        if ( rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().HasExtraRedlineTable() )
-            rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableCellRedline( rTable.GetFrameFormat()->GetDoc(), *(rTableBoxes[nDelPos]), true, RedlineType::Any );
+        rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableCellRedline( rTable.GetFrameFormat()->GetDoc(), *(rTableBoxes[nDelPos]), true, RedlineType::Any );
         delete rTableBoxes[nDelPos];
         rTableBoxes.erase( rTableBoxes.begin() + nDelPos );
 
@@ -777,8 +776,7 @@ void DeleteBox_( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
 
             SwTableLine* pTabLineToDelete = rTable.GetTabLines()[ nDelPos ];
             // Before deleting the 'Table Line' from memory - delete any redlines attached to it
-            if ( rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().HasExtraRedlineTable() )
-                rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, RedlineType::Any );
+            rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, RedlineType::Any );
             delete pTabLineToDelete;
             rTable.GetTabLines().erase( rTable.GetTabLines().begin() + nDelPos );
             break;      // we cannot delete more
@@ -792,8 +790,7 @@ void DeleteBox_( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
 
         SwTableLine* pTabLineToDelete = pBox->GetTabLines()[ nDelPos ];
         // Before deleting the 'Table Line' from memory - delete any redlines attached to it
-        if ( rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().HasExtraRedlineTable() )
-            rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, RedlineType::Any );
+        rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, RedlineType::Any );
         delete pTabLineToDelete;
         pBox->GetTabLines().erase( pBox->GetTabLines().begin() + nDelPos );
     } while( pBox->GetTabLines().empty() );
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index a2b62674923b..aeaa4042a6f2 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2503,8 +2503,7 @@ void SwTableNode::RemoveRedlines()
 {
     SwDoc& rDoc = GetDoc();
     SwTable& rTable = GetTable();
-    if (rDoc.getIDocumentRedlineAccess().HasExtraRedlineTable())
-        rDoc.getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteAllTableRedlines(rDoc, rTable, true, RedlineType::Any);
+    rDoc.getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteAllTableRedlines(rDoc, rTable, true, RedlineType::Any);
 }
 
 void SwDoc::GetTabCols( SwTabCols &rFill, const SwCellFrame* pBoxFrame )
diff --git a/sw/source/core/inc/DocumentRedlineManager.hxx b/sw/source/core/inc/DocumentRedlineManager.hxx
index 7008abfd1636..62a57ac65e2a 100644
--- a/sw/source/core/inc/DocumentRedlineManager.hxx
+++ b/sw/source/core/inc/DocumentRedlineManager.hxx
@@ -51,7 +51,6 @@ public:
     virtual SwRedlineTable& GetRedlineTable() override;
     virtual const SwExtraRedlineTable& GetExtraRedlineTable() const override;
     virtual SwExtraRedlineTable& GetExtraRedlineTable() override;
-    virtual bool HasExtraRedlineTable() const override;
 
     virtual bool IsInRedlines(const SwNode& rNode) const override;
 


More information about the Libreoffice-commits mailing list