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@collabora.co.uk>
This commit is contained in:
Noel Grandin
2021-09-15 11:42:31 +02:00
parent ed1b10b3c0
commit 20635ed319
7 changed files with 34 additions and 48 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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;

View File

@@ -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);

View File

@@ -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() );

View File

@@ -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 )

View File

@@ -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;