basic/source/sbx/sbxarray.cxx | 6 basic/source/sbx/sbxbase.cxx | 10 basic/source/sbx/sbxobj.cxx | 8 basic/source/sbx/sbxvar.cxx | 15 - chart2/source/controller/inc/ChartController.hxx | 2 compilerplugins/clang/store/unnecessaryvirtual.cxx | 261 +++++++++------------ compilerplugins/clang/store/unnecessaryvirtual.py | 57 ---- fpicker/source/office/RemoteFilesDialog.hxx | 4 framework/inc/macros/xserviceinfo.hxx | 2 i18npool/inc/localedata.hxx | 26 +- i18npool/inc/transliterationImpl.hxx | 2 include/basic/sbxcore.hxx | 2 include/canvas/rendering/isurface.hxx | 2 include/sax/tools/documenthandleradapter.hxx | 8 include/sfx2/viewfrm.hxx | 6 include/svtools/ServerDetailsControls.hxx | 2 include/svx/svdotext.hxx | 2 include/svx/textchainflow.hxx | 6 include/vcl/split.hxx | 1 include/vcl/window.hxx | 1 include/xmloff/xmlnume.hxx | 2 sd/inc/drawdoc.hxx | 6 slideshow/source/engine/eventmultiplexer.cxx | 14 - slideshow/source/engine/slide/shapemanagerimpl.hxx | 3 slideshow/source/engine/slideshowimpl.cxx | 3 slideshow/source/inc/eventmultiplexer.hxx | 28 -- svx/source/inc/fmobj.hxx | 2 svx/source/table/cell.hxx | 2 sw/inc/unotbl.hxx | 4 sw/source/uibase/ribbar/workctrl.cxx | 2 vcl/inc/BitmapSymmetryCheck.hxx | 4 vcl/inc/salbmp.hxx | 4 vcl/qa/cppunit/BitmapFilterTest.cxx | 2 vcl/qa/cppunit/BitmapTest.cxx | 4 vcl/source/window/menubarwindow.hxx | 8 vcl/source/window/paint.cxx | 6 vcl/source/window/split.cxx | 18 - 37 files changed, 171 insertions(+), 364 deletions(-)
New commits: commit d9e627039245dc42f003a7cf75642f619a621513 Author: Noel Grandin <n...@peralex.com> Date: Tue Nov 17 11:16:07 2015 +0200 loplugin:unnecessaryvirtual update the plugin with lessons learned from the mergeclasses plugin and re-run it Change-Id: I9d622eb3d05fceaf8fa764c533c8fa5dfb4c7711 Reviewed-on: https://gerrit.libreoffice.org/20015 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 9484d9e..ab44f57 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -492,7 +492,7 @@ SbxVariable* SbxArray::Find( const OUString& rName, SbxClassType t ) return p; } -bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 nVer ) +bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 /*nVer*/ ) { sal_uInt16 nElem; Clear(); @@ -517,8 +517,6 @@ bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 nVer ) break; } } - if( bRes ) - bRes = LoadPrivateData( rStrm, nVer ); nFlags = f; return bRes; } @@ -545,7 +543,7 @@ bool SbxArray::StoreData( SvStream& rStrm ) const return false; } } - return StorePrivateData( rStrm ); + return true; } // #100883 Method to set method directly to parameter array diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index b868238..12bb9b7 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -290,16 +290,6 @@ bool SbxBase::StoreData( SvStream& ) const return false; } -bool SbxBase::LoadPrivateData( SvStream&, sal_uInt16 ) -{ - return true; -} - -bool SbxBase::StorePrivateData( SvStream& ) const -{ - return true; -} - bool SbxBase::LoadCompleted() { return true; diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index dc20af6..3704d28 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -606,10 +606,6 @@ bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer ) aDfltProp = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm, RTL_TEXTENCODING_ASCII_US); sal_Size nPos = rStrm.Tell(); rStrm.ReadUInt32( nSize ); - if( !LoadPrivateData( rStrm, nVer ) ) - { - return false; - } sal_Size nNewPos = rStrm.Tell(); nPos += nSize; DBG_ASSERT( nPos >= nNewPos, "SBX: Loaded too much data" ); @@ -647,10 +643,6 @@ bool SbxObject::StoreData( SvStream& rStrm ) const write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aDfltProp, RTL_TEXTENCODING_ASCII_US); sal_Size nPos = rStrm.Tell(); rStrm.WriteUInt32( 0L ); - if( !StorePrivateData( rStrm ) ) - { - return false; - } sal_Size nNew = rStrm.Tell(); rStrm.Seek( nPos ); rStrm.WriteUInt32( nNew - nPos ); diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx index 548ce03..2bbe508 100644 --- a/basic/source/sbx/sbxvar.cxx +++ b/basic/source/sbx/sbxvar.cxx @@ -574,11 +574,6 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer ) pInfo = new SbxInfo; pInfo->LoadData( rStrm, (sal_uInt16) cMark ); } - // Load private data only, if it is a SbxVariable - if( GetClass() == SbxCLASS_VARIABLE && !LoadPrivateData( rStrm, nVer ) ) - { - return false; - } Broadcast( SBX_HINT_DATACHANGED ); nHash = MakeHashCode( maName ); SetModified( true ); @@ -625,15 +620,7 @@ bool SbxVariable::StoreData( SvStream& rStrm ) const { rStrm.WriteUChar( 0 ); } - // Save private data only, if it is a SbxVariable - if( GetClass() == SbxCLASS_VARIABLE ) - { - return StorePrivateData( rStrm ); - } - else - { - return true; - } + return true; } // SbxInfo diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx index b9fb2d8..2e41d86 100644 --- a/chart2/source/controller/inc/ChartController.hxx +++ b/chart2/source/controller/inc/ChartController.hxx @@ -371,7 +371,7 @@ public: void execute_MouseButtonUp( const MouseEvent& rMEvt ); void execute_Resize(); void execute_Command( const CommandEvent& rCEvt ); - virtual bool execute_KeyInput( const KeyEvent& rKEvt ); + bool execute_KeyInput( const KeyEvent& rKEvt ); /** get help text to be shown in a quick help diff --git a/compilerplugins/clang/store/unnecessaryvirtual.cxx b/compilerplugins/clang/store/unnecessaryvirtual.cxx index 53688cb..5a6d633 100644 --- a/compilerplugins/clang/store/unnecessaryvirtual.cxx +++ b/compilerplugins/clang/store/unnecessaryvirtual.cxx @@ -13,6 +13,7 @@ #include <set> #include "plugin.hxx" #include "compat.hxx" +#include <fstream> /** Dump a list of virtual methods and a list of methods overriding virtual methods. @@ -20,31 +21,51 @@ Then we will post-process the 2 lists and find the set of virtual methods which The process goes something like this: $ make check - $ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unnecessaryvirtual' check > log.txt - $ ./compilerplugins/clang/unnecessaryvirtual.py log.txt > result.txt + $ make FORCE_COMPILE_ALL=1 COMPILER_PLUGIN_TOOL='unnecessaryvirtual' check + $ ./compilerplugins/clang/unnecessaryvirtual.py unnecessaryvirtual.log > result.txt $ for dir in *; do make FORCE_COMPILE_ALL=1 UPDATE_FILES=$dir COMPILER_PLUGIN_TOOL='removevirtuals' $dir; done Note that the actual process may involve a fair amount of undoing, hand editing, and general messing around to get it to work :-) -TODO function template instantiations are not handled TODO some boost bind stuff appears to confuse it, notably in the xmloff module +TODO does not find destructors that don't need to be virtual */ namespace { +// try to limit the voluminous output a little +static std::set<std::string> definitionSet; +static std::set<std::string> overridingSet; + class UnnecessaryVirtual: public RecursiveASTVisitor<UnnecessaryVirtual>, public loplugin::Plugin { public: explicit UnnecessaryVirtual(InstantiationData const & data): Plugin(data) {} - virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + virtual void run() override + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + + // dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes + // writing to the same logfile + std::string output; + for (const std::string & s : definitionSet) + output += "definition:\t" + s + "\n"; + for (const std::string & s : overridingSet) + output += "overriding:\t" + s + "\n"; + ofstream myfile; + myfile.open( SRCDIR "/unnecessaryvirtual.log", ios::app | ios::out); + myfile << output; + myfile.close(); + } + bool shouldVisitTemplateInstantiations () const { return true; } - bool VisitCXXRecordDecl( const CXXRecordDecl* decl ); bool VisitCXXMethodDecl( const CXXMethodDecl* decl ); - bool VisitCXXConstructExpr( const CXXConstructExpr* expr ); - void printTemplateInstantiations( const CXXRecordDecl *decl ); + bool VisitCallExpr(CallExpr* ); +private: + std::string fullyQualifiedName(const FunctionDecl* functionDecl); }; static std::string niceName(const CXXMethodDecl* functionDecl) @@ -64,147 +85,48 @@ static std::string niceName(const CXXMethodDecl* functionDecl) return s; } -static bool startsWith(const std::string& s, const char* other) -{ - return s.compare(0, strlen(other), other) == 0; -} - -static bool isStandardStuff(const std::string& s) -{ - // ignore UNO interface definitions, cannot change those - return startsWith(s, "com::sun::star::") - // ignore stuff in the C++ stdlib and boost - || startsWith(s, "std::") || startsWith(s, "boost::") || startsWith(s, "__gnu_debug::") - // can't change our rtl layer - || startsWith(s, "rtl::"); -} - -void UnnecessaryVirtual::printTemplateInstantiations( const CXXRecordDecl *recordDecl ) +std::string UnnecessaryVirtual::fullyQualifiedName(const FunctionDecl* functionDecl) { - for(auto functionDecl = recordDecl->method_begin(); - functionDecl != recordDecl->method_end(); ++functionDecl) - { - if (!functionDecl->isUserProvided() || !functionDecl->isVirtual()) { - continue; - } - if (isa<CXXDestructorDecl>(*functionDecl)) { - continue; - } - std::string aNiceName = niceName(*functionDecl); - if (isStandardStuff(aNiceName)) { - continue; - } - if (functionDecl->size_overridden_methods() == 0) { - cout << "definition:\t" << aNiceName << endl; - } else { - for (auto iter = functionDecl->begin_overridden_methods(); - iter != functionDecl->end_overridden_methods(); ++iter) - { - const CXXMethodDecl *pOverriddenMethod = *iter; - // we only care about the first level override to establish that a virtual qualifier was useful. - if (pOverriddenMethod->isPure() || pOverriddenMethod->size_overridden_methods() == 0) { - std::string aOverriddenNiceName = niceName(pOverriddenMethod); - if (isStandardStuff(aOverriddenNiceName)) { - continue; - } - cout << "overriding:\t" << aOverriddenNiceName << endl; - } - } - } - } - for(auto baseSpecifier = recordDecl->bases_begin(); - baseSpecifier != recordDecl->bases_end(); ++baseSpecifier) - { - QualType qt = baseSpecifier->getType().getDesugaredType(compiler.getASTContext()); - if (!qt->isRecordType()) { - continue; - } - const CXXRecordDecl *pSuperclassCXXRecordDecl = qt->getAsCXXRecordDecl(); - std::string aNiceName = pSuperclassCXXRecordDecl->getQualifiedNameAsString(); - if (isStandardStuff(aNiceName)) { - continue; - } - printTemplateInstantiations(pSuperclassCXXRecordDecl); + std::string ret = compat::getReturnType(*functionDecl).getCanonicalType().getAsString(); + ret += " "; + if (isa<CXXMethodDecl>(functionDecl)) { + const CXXRecordDecl* recordDecl = dyn_cast<CXXMethodDecl>(functionDecl)->getParent(); + ret += recordDecl->getQualifiedNameAsString(); + ret += "::"; + } + ret += functionDecl->getNameAsString() + "("; + bool bFirst = true; + for (const ParmVarDecl *pParmVarDecl : functionDecl->params()) { + if (bFirst) + bFirst = false; + else + ret += ","; + ret += pParmVarDecl->getType().getCanonicalType().getAsString(); } -} - -// I need to check construct expressions to see if we are instantiating any templates -// which will effectively generate new methods -bool UnnecessaryVirtual::VisitCXXConstructExpr( const CXXConstructExpr* constructExpr ) -{ - if (ignoreLocation(constructExpr)) { - return true; + ret += ")"; + if (isa<CXXMethodDecl>(functionDecl) && dyn_cast<CXXMethodDecl>(functionDecl)->isConst()) { + ret += " const"; } - const CXXConstructorDecl* pConstructorDecl = constructExpr->getConstructor(); - const CXXRecordDecl* recordDecl = pConstructorDecl->getParent(); - printTemplateInstantiations(recordDecl); - return true; -} -// I need to visit class definitions, so I can scan through the classes they extend to check if -// we have any template instantiations that will create new methods -bool UnnecessaryVirtual::VisitCXXRecordDecl( const CXXRecordDecl* recordDecl ) -{ - if (ignoreLocation(recordDecl)) { - return true; - } - if(!recordDecl->hasDefinition()) { - return true; - } - // ignore uninstantiated templates - if (recordDecl->getTemplateInstantiationPattern()) { - return true; - } - // ignore stuff that forms part of the stable URE interface - if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc( - recordDecl->getLocation()))) { - return true; - } - for(auto baseSpecifier = recordDecl->bases_begin(); - baseSpecifier != recordDecl->bases_end(); ++baseSpecifier) - { - QualType qt = baseSpecifier->getType().getDesugaredType(compiler.getASTContext()); - if (!qt->isRecordType()) { - continue; - } - const CXXRecordDecl *pSuperclassCXXRecordDecl = qt->getAsCXXRecordDecl(); - printTemplateInstantiations(pSuperclassCXXRecordDecl); - } - return true; + return ret; } -bool UnnecessaryVirtual::VisitCXXMethodDecl( const CXXMethodDecl* functionDecl ) +bool UnnecessaryVirtual::VisitCXXMethodDecl( const CXXMethodDecl* methodDecl ) { - if (ignoreLocation(functionDecl)) { - return true; - } - functionDecl = functionDecl->getCanonicalDecl(); - // ignore uninstantiated template methods - if (functionDecl->getTemplatedKind() != FunctionDecl::TemplatedKind::TK_NonTemplate - || functionDecl->getParent()->getDescribedClassTemplate() != nullptr) { - return true; - } - // ignore stuff that forms part of the stable URE interface - if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc( - functionDecl->getNameInfo().getLoc()))) { - return true; - } - if (isStandardStuff(functionDecl->getParent()->getQualifiedNameAsString())) { - return true; - } + methodDecl = methodDecl->getCanonicalDecl(); - std::string aNiceName = niceName(functionDecl); + std::string aNiceName = niceName(methodDecl); // for destructors, we need to check if any of the superclass' destructors are virtual - if (isa<CXXDestructorDecl>(functionDecl)) { + if (isa<CXXDestructorDecl>(methodDecl)) { /* TODO I need to check if the base class has any virtual functions, since overriding classes will simply get a compiler-provided virtual destructor by default. - if (!functionDecl->isVirtual() && !functionDecl->isPure()) { + if (!methodDecl->isVirtual() && !methodDecl->isPure()) { return true; } std::set<std::string> overriddenSet; - const CXXRecordDecl *pRecordDecl = functionDecl->getParent(); + const CXXRecordDecl *pRecordDecl = methodDecl->getParent(); for(auto baseSpecifier = pRecordDecl->bases_begin(); baseSpecifier != pRecordDecl->bases_end(); ++baseSpecifier) { @@ -227,32 +149,77 @@ bool UnnecessaryVirtual::VisitCXXMethodDecl( const CXXMethodDecl* functionDecl ) return true; } - if (!functionDecl->isVirtual()) { + if (!methodDecl->isVirtual()) { return true; } - if (isStandardStuff(aNiceName)) { - return true; - } - if (functionDecl->size_overridden_methods() == 0) { - cout << "definition:\t" << aNiceName << endl; + if (methodDecl->size_overridden_methods() == 0) { + // ignore stuff that forms part of the stable URE interface + if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc( + methodDecl->getNameInfo().getLoc()))) { + return true; + } + // ignore templates and template instantiations, + // I just cannot get clang to give me decent overriding method data out of them + if (methodDecl->getParent()->getDescribedClassTemplate() + || methodDecl->getParent()->getTemplateInstantiationPattern()) + return true; + if (aNiceName.find("processOpCode2") != std::string::npos) + { + methodDecl->dump(); + cout << "definition " << aNiceName << endl; + } + definitionSet.insert(aNiceName); } else { - for (auto iter = functionDecl->begin_overridden_methods(); - iter != functionDecl->end_overridden_methods(); ++iter) + for (auto iter = methodDecl->begin_overridden_methods(); + iter != methodDecl->end_overridden_methods(); ++iter) { - const CXXMethodDecl *pOverriddenMethod = *iter; + const CXXMethodDecl *overriddenMethod = *iter; // we only care about the first level override to establish that a virtual qualifier was useful. - if (pOverriddenMethod->isPure() || pOverriddenMethod->size_overridden_methods() == 0) { - std::string aOverriddenNiceName = niceName(pOverriddenMethod); - if (isStandardStuff(aOverriddenNiceName)) { - continue; - } - cout << "overriding:\t" << aOverriddenNiceName << endl; + if (overriddenMethod->isPure() || overriddenMethod->size_overridden_methods() == 0) { + std::string aOverriddenNiceName = niceName(overriddenMethod); + overridingSet.insert(aOverriddenNiceName); + if (aNiceName.find("processOpCode2") != std::string::npos) + { + methodDecl->dump(); + cout << "overriding " << aNiceName << endl; + } } } } return true; } +// prevent recursive templates from blowing up the stack +static std::set<std::string> traversedFunctionSet; + +bool UnnecessaryVirtual::VisitCallExpr(CallExpr* expr) +{ + // Note that I don't ignore ANYTHING here, because I want to get calls to my code that result + // from template instantiation deep inside the STL and other external code + + FunctionDecl* calleeFunctionDecl = expr->getDirectCallee(); + if (calleeFunctionDecl == nullptr) { + Expr* callee = expr->getCallee()->IgnoreParenImpCasts(); + DeclRefExpr* dr = dyn_cast<DeclRefExpr>(callee); + if (dr) { + calleeFunctionDecl = dyn_cast<FunctionDecl>(dr->getDecl()); + if (calleeFunctionDecl) + goto gotfunc; + } + return true; + } + +gotfunc: + // if we see a call to a function, it may effectively create new code, + // if the function is templated. However, if we are inside a template function, + // calling another function on the same template, the same problem occurs. + // Rather than tracking all of that, just traverse anything we have not already traversed. + if (traversedFunctionSet.insert(fullyQualifiedName(calleeFunctionDecl)).second) + TraverseFunctionDecl(calleeFunctionDecl); + + return true; +} + loplugin::Plugin::Registration< UnnecessaryVirtual > X("unnecessaryvirtual", false); diff --git a/compilerplugins/clang/store/unnecessaryvirtual.py b/compilerplugins/clang/store/unnecessaryvirtual.py index 4bce4de..e05f16c 100755 --- a/compilerplugins/clang/store/unnecessaryvirtual.py +++ b/compilerplugins/clang/store/unnecessaryvirtual.py @@ -1,60 +1,13 @@ #!/usr/bin/python import sys +import io definitionSet = set() overridingSet = set() -# things we need to exclude for reasons like : -# - we can't see the override because it's a MS-Windows-only thing. -# - they involve function template instantiations, which I can't handle -exclusionSet = set( - "basegfx::unotools::UnoPolyPolygon::void-modifying()const", - "SalLayout::_Bool-DrawTextSpecial(class SalGraphics &,sal_uInt32,)const", - "SalLayout::_Bool-IsKashidaPosValid(int,)const", - "SalLayout::void-DisableGlyphInjection(_Bool,)", - "SalObject::void-Enable(_Bool,)", - "PropertyWrapperBase::void-SetValue(const ::com::sun::star::uno::Any &,)" - "canvas::IColorBuffer::enum canvas::IColorBuffer::Format-getFormat()const", - "canvas::IColorBuffer::sal_uInt32-getHeight()const", - "canvas::IColorBuffer::sal_uInt32-getStride()const", - "canvas::IColorBuffer::sal_uInt32-getWidth()const", - "canvas::IColorBuffer::sal_uInt8 *-lock()const", - "canvas::IColorBuffer::void-unlock()const", - "canvas::IRenderModule::::basegfx::B2IVector-getPageSize()", - "canvas::IRenderModule::::boost::shared_ptr<ISurface>-createSurface(const ::basegfx::B2IVector &,)", - "canvas::IRenderModule::_Bool-isError()", - "canvas::IRenderModule::void-beginPrimitive(enum canvas::IRenderModule::PrimitiveType,)", - "canvas::IRenderModule::void-endPrimitive()", - "canvas::IRenderModule::void-lock()const", - "canvas::IRenderModule::void-pushVertex(const struct canvas::Vertex &,)", - "canvas::IRenderModule::void-unlock()const", - "canvas::ISurface::_Bool-isValid()", - "canvas::ISurface::_Bool-selectTexture()", - "canvas::ISurface::_Bool-update(const ::basegfx::B2IPoint &,const ::basegfx::B2IRange &,struct canvas::IColorBuffer &,)", - "SalFrame::void-Flush(const class Rectangle &,)", - "SalFrame::void-SetRepresentedURL(const class rtl::OUString &,)", - "SalLayout::_Bool-DrawTextSpecial(class SalGraphics &,sal_uInt32,)const", - "SalLayout::_Bool-GetBoundRect(class SalGraphics &,class Rectangle &,)const", - "SalLayout::_Bool-IsKashidaPosValid(int,)const", - "SalLayout::void-DisableGlyphInjection(_Bool,)", - "writerfilter::ooxml::OOXMLFactory_ns::Id-getResourceId(Id,sal_Int32,)", - "writerfilter::ooxml::OOXMLFactory_ns::_Bool-getElementId(Id,Id,enum writerfilter::ooxml::ResourceType_t &,Id &,)", - "writerfilter::ooxml::OOXMLFactory_ns::_Bool-getListValue(Id,const class rtl::OUString &,sal_uInt32 &,)", - "writerfilter::ooxml::OOXMLFactory_ns::const struct writerfilter::ooxml::AttributeInfo *-getAttributeInfoArray(Id,)", - "sd::ZeroconfService::void-clear()", - "sd::ZeroconfService::void-setup()", - "slideshow::internal::EnumAnimation::ValueType-getUnderlyingValue()const", - "slideshow::internal::EnumAnimation::_Bool-operator()(ValueType,)", - "basegfx::unotools::UnoPolyPolygon::void-modifying()const", - "DdeTopic::_Bool-Execute(const class rtl::OUString *,)", - "DdeTopic::class DdeData *-Get(enum SotClipboardFormatId,)", - "DdeTopic::_Bool-Put(const class DdeData *,)", - "DdeTopic::_Bool-MakeItem(const class rtl::OUString &,)", - "DdeTopic::_Bool-StartAdviseLoop()", - ) -with open(sys.argv[1]) as txt: +with io.open(sys.argv[1], "rb", buffering=1024*1024) as txt: for line in txt: if line.startswith("definition:\t"): @@ -67,10 +20,8 @@ with open(sys.argv[1]) as txt: clazzName = line[idx1+1 : len(line)-1] overridingSet.add(clazzName) -for clazz in sorted(definitionSet - overridingSet - exclusionSet): - # these involve function template instantiations, which I can't handle - if not clazz.startswith("basebmp::BitmapDevice::"): - print clazz +for clazz in sorted(definitionSet - overridingSet): + print clazz # add an empty line at the end to make it easier for the removevirtuals plugin to mmap() the output file print diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx index 991da0a..b05399d 100644 --- a/fpicker/source/office/RemoteFilesDialog.hxx +++ b/fpicker/source/office/RemoteFilesDialog.hxx @@ -76,7 +76,7 @@ public: virtual void dispose() override; virtual void Resize() override; virtual short Execute() override; - virtual void Show(); + void Show(); // SvtFileDialog_Base @@ -91,7 +91,7 @@ public: virtual const OUString& GetPath() override; virtual std::vector<OUString> GetPathList() const override; virtual bool ContentIsFolder( const OUString& rURL ) override; - virtual bool ContentIsDocument( const OUString& rURL ); + bool ContentIsDocument( const OUString& rURL ); virtual OUString getCurrentFileText() const override; virtual void setCurrentFileText( const OUString& rText, bool bSelectAll = false ) override; diff --git a/framework/inc/macros/xserviceinfo.hxx b/framework/inc/macros/xserviceinfo.hxx index 2a39faf..e8fb47d 100644 --- a/framework/inc/macros/xserviceinfo.hxx +++ b/framework/inc/macros/xserviceinfo.hxx @@ -151,7 +151,7 @@ namespace framework{ static css::uno::Sequence< OUString > SAL_CALL impl_getStaticSupportedServiceNames( ); \ static OUString SAL_CALL impl_getStaticImplementationName ( ); \ /* Helper for initialization of service by using own reference! */ \ - virtual void SAL_CALL impl_initService ( ); \ + void SAL_CALL impl_initService ( ); \ #define DECLARE_XSERVICEINFO \ DECLARE_XSERVICEINFO_NOFACTORY \ diff --git a/i18npool/inc/localedata.hxx b/i18npool/inc/localedata.hxx index 9ef4ca9..d61b92c 100644 --- a/i18npool/inc/localedata.hxx +++ b/i18npool/inc/localedata.hxx @@ -90,31 +90,31 @@ public: virtual css::uno::Sequence< Currency2 > SAL_CALL getAllCurrencies2( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override; virtual css::uno::Sequence< FormatElement > SAL_CALL getAllFormats( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override; virtual css::uno::Sequence< Implementation > SAL_CALL getCollatorImplementations( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override; - virtual OUString SAL_CALL getCollatorRuleByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException, std::exception); + OUString SAL_CALL getCollatorRuleByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException, std::exception); virtual css::uno::Sequence< OUString > SAL_CALL getTransliterations( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override; virtual ForbiddenCharacters SAL_CALL getForbiddenCharacters( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override; virtual css::uno::Sequence< OUString > SAL_CALL getReservedWord( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override ; - virtual css::uno::Sequence< OUString > SAL_CALL getBreakIteratorRules( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) ; + css::uno::Sequence< OUString > SAL_CALL getBreakIteratorRules( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) ; virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getAllInstalledLocaleNames() throw(css::uno::RuntimeException, std::exception) override; virtual css::uno::Sequence< OUString > SAL_CALL getSearchOptions( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override; virtual css::uno::Sequence< OUString > SAL_CALL getCollationOptions( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override; - virtual css::uno::Sequence< css::uno::Sequence< beans::PropertyValue > > SAL_CALL getContinuousNumberingLevels( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); - virtual css::uno::Sequence< css::uno::Reference< container::XIndexAccess > > SAL_CALL getOutlineNumberingLevels( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); + css::uno::Sequence< css::uno::Sequence< beans::PropertyValue > > SAL_CALL getContinuousNumberingLevels( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); + css::uno::Sequence< css::uno::Reference< container::XIndexAccess > > SAL_CALL getOutlineNumberingLevels( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); // XLocaleData4 virtual css::uno::Sequence< OUString > SAL_CALL getDateAcceptancePatterns( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override; // following methods are used by indexentry service - virtual css::uno::Sequence< OUString > SAL_CALL getIndexAlgorithm( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException); - virtual OUString SAL_CALL getDefaultIndexAlgorithm( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException); - virtual OUString SAL_CALL getIndexKeysByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException); - virtual OUString SAL_CALL getIndexModuleByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException); - virtual css::uno::Sequence< UnicodeScript > SAL_CALL getUnicodeScripts( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); - virtual css::uno::Sequence< OUString > SAL_CALL getFollowPageWords( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); - virtual bool SAL_CALL hasPhonetic( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException); - virtual bool SAL_CALL isPhonetic( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException); - virtual OUString SAL_CALL getHangingCharacters( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); + css::uno::Sequence< OUString > SAL_CALL getIndexAlgorithm( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException); + OUString SAL_CALL getDefaultIndexAlgorithm( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException); + OUString SAL_CALL getIndexKeysByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException); + OUString SAL_CALL getIndexModuleByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException); + css::uno::Sequence< UnicodeScript > SAL_CALL getUnicodeScripts( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); + css::uno::Sequence< OUString > SAL_CALL getFollowPageWords( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); + bool SAL_CALL hasPhonetic( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException); + bool SAL_CALL isPhonetic( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException); + OUString SAL_CALL getHangingCharacters( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception); //XServiceInfo virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override; diff --git a/i18npool/inc/transliterationImpl.hxx b/i18npool/inc/transliterationImpl.hxx index 990a552..e50b63a 100644 --- a/i18npool/inc/transliterationImpl.hxx +++ b/i18npool/inc/transliterationImpl.hxx @@ -108,7 +108,7 @@ private: css::uno::Reference< XLocaleData4 > mxLocaledata; css::uno::Reference< css::i18n::XExtendedTransliteration > caseignore; - virtual bool SAL_CALL loadModuleByName( const OUString& implName, + bool SAL_CALL loadModuleByName( const OUString& implName, css::uno::Reference<css::i18n::XExtendedTransliteration> & body, const css::lang::Locale& rLocale) throw(css::uno::RuntimeException); diff --git a/include/basic/sbxcore.hxx b/include/basic/sbxcore.hxx index 260d045..4cc57fa 100644 --- a/include/basic/sbxcore.hxx +++ b/include/basic/sbxcore.hxx @@ -54,8 +54,6 @@ protected: SbxBase& operator=( const SbxBase& ); virtual ~SbxBase(); - virtual bool LoadPrivateData( SvStream&, sal_uInt16 ); - virtual bool StorePrivateData( SvStream& ) const; virtual sal_uInt32 GetCreator() const { return 0; } virtual sal_uInt16 GetVersion() const { return 0; } virtual sal_uInt16 GetSbxId() const { return 0; } diff --git a/include/canvas/rendering/isurface.hxx b/include/canvas/rendering/isurface.hxx index 896a439..3f266f9 100644 --- a/include/canvas/rendering/isurface.hxx +++ b/include/canvas/rendering/isurface.hxx @@ -68,8 +68,6 @@ namespace canvas virtual bool update( const ::basegfx::B2IPoint& rDestPos, const ::basegfx::B2IRange& rSourceRect, IColorBuffer& rSource ) = 0; - - virtual ::basegfx::B2IVector getSize() = 0; }; typedef std::shared_ptr< ISurface > ISurfaceSharedPtr; diff --git a/include/sax/tools/documenthandleradapter.hxx b/include/sax/tools/documenthandleradapter.hxx index 10b945f..b36a497 100644 --- a/include/sax/tools/documenthandleradapter.hxx +++ b/include/sax/tools/documenthandleradapter.hxx @@ -88,12 +88,12 @@ namespace sax ; protected: - virtual void SAL_CALL + void SAL_CALL setDelegate(const css::uno::Reference< css::xml::sax::XDocumentHandler >& delegate) { m_handler = delegate; } - virtual css::uno::Reference< css::xml::sax::XDocumentHandler > SAL_CALL + css::uno::Reference< css::xml::sax::XDocumentHandler > SAL_CALL getDelegate() { return m_handler; @@ -210,12 +210,12 @@ namespace sax { } - virtual void SAL_CALL + void SAL_CALL setDelegate(const css::uno::Reference< css::xml::sax::XExtendedDocumentHandler >& delegate) { m_handler = delegate; } - virtual css::uno::Reference< css::xml::sax::XExtendedDocumentHandler > SAL_CALL + css::uno::Reference< css::xml::sax::XExtendedDocumentHandler > SAL_CALL getDelegate() { return m_handler; diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index cbb0686..bc89068 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -143,9 +143,9 @@ public: static void ActivateToolPanel( const css::uno::Reference< css::frame::XFrame >& i_rFrame, const OUString& i_rPanelURL ); // interne Handler - SAL_DLLPRIVATE virtual bool SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder ); - SAL_DLLPRIVATE virtual const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const; - SAL_DLLPRIVATE virtual void InvalidateBorderImpl( const SfxViewShell *pSh ); + SAL_DLLPRIVATE bool SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder ); + SAL_DLLPRIVATE const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const; + SAL_DLLPRIVATE void InvalidateBorderImpl( const SfxViewShell *pSh ); virtual SfxObjectShell* GetObjectShell() override; sal_uInt16 GetCurViewId() const; diff --git a/include/svtools/ServerDetailsControls.hxx b/include/svtools/ServerDetailsControls.hxx index b86a23d..8a2289e 100644 --- a/include/svtools/ServerDetailsControls.hxx +++ b/include/svtools/ServerDetailsControls.hxx @@ -57,7 +57,7 @@ class DetailsContainer virtual void setUsername( const OUString& /*rUsername*/ ) { }; virtual void setPassword( const OUString& ) { }; - virtual void setActive( bool bActive = true ); + void setActive( bool bActive = true ); protected: void notifyChange( ); diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index 149963c..132b5b8 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -558,7 +558,7 @@ public: virtual void onEditOutlinerStatusEvent( EditStatus* pEditStatus ); /** called from the SdrObjEditView during text edit when a chain of boxes is to be updated */ - virtual void onChainingEvent(); + void onChainingEvent(); diff --git a/include/svx/textchainflow.hxx b/include/svx/textchainflow.hxx index e214854..557aa9e 100644 --- a/include/svx/textchainflow.hxx +++ b/include/svx/textchainflow.hxx @@ -40,10 +40,10 @@ public: // Check for flow events in Outliner virtual void CheckForFlowEvents(SdrOutliner *); - virtual void ExecuteUnderflow(SdrOutliner *); + void ExecuteUnderflow(SdrOutliner *); // Uses two outliners: one for the non-overflow text and one for overflowing (might be the same) - virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *); + void ExecuteOverflow(SdrOutliner *, SdrOutliner *); bool IsOverflow() const; bool IsUnderflow() const; @@ -65,7 +65,7 @@ protected: TextChain *GetTextChain() const; virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *); - virtual void impMoveChainedTextToNextLink(SdrOutliner *); + void impMoveChainedTextToNextLink(SdrOutliner *); virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *); diff --git a/include/vcl/split.hxx b/include/vcl/split.hxx index ceeb007..a80304e 100644 --- a/include/vcl/split.hxx +++ b/include/vcl/split.hxx @@ -68,7 +68,6 @@ public: void StartSplit(); void EndSplit(); void Split(); - virtual void Splitting( Point& rSplitPos ); virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 67a9aac..0691427 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -840,7 +840,6 @@ public: virtual void KeyUp( const KeyEvent& rKEvt ); virtual void PrePaint(vcl::RenderContext& rRenderContext); virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); - virtual void PostPaint(vcl::RenderContext& rRenderContext); void Erase(vcl::RenderContext& rRenderContext); virtual void Erase() override diff --git a/include/xmloff/xmlnume.hxx b/include/xmloff/xmlnume.hxx index 44124ed..d522399 100644 --- a/include/xmloff/xmlnume.hxx +++ b/include/xmloff/xmlnume.hxx @@ -57,7 +57,7 @@ class XMLOFF_DLLPUBLIC SvxXMLNumRuleExport protected: /// Override this to add attributes to the <list-style> element. - SAL_DLLPRIVATE virtual void AddListStyleAttributes(); + SAL_DLLPRIVATE void AddListStyleAttributes(); SAL_DLLPRIVATE bool exportStyle( const css::uno::Reference< css::style::XStyle >& rStyle ); SAL_DLLPRIVATE void exportOutline(); diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 6343217..23e5ecf 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -139,12 +139,12 @@ class SD_DLLPUBLIC SdDrawDocument : public FmFormModel private: OUString msDocAccTitle; public: - SAL_DLLPRIVATE virtual void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; } - SAL_DLLPRIVATE virtual const OUString getDocAccTitle() const { return msDocAccTitle; } + SAL_DLLPRIVATE void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; } + SAL_DLLPRIVATE const OUString getDocAccTitle() const { return msDocAccTitle; } private: bool bReadOnly; public: - SAL_DLLPRIVATE virtual bool getDocReadOnly() const { return bReadOnly; } + SAL_DLLPRIVATE bool getDocReadOnly() const { return bReadOnly; } private: ::sd::Outliner* mpOutliner; ///< local outliner for outline mode ::sd::Outliner* mpInternalOutliner; ///< internal outliner for creation of text objects diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index 95eb58d..ef9a959 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -177,7 +177,6 @@ struct EventMultiplexerImpl maViewRepaintHandlers(), maShapeListenerHandlers(), maUserPaintEventHandlers(), - maShapeCursorHandlers(), maMouseClickHandlers(), maMouseDoubleClickHandlers(), maMouseMoveHandlers(), @@ -235,9 +234,6 @@ struct EventMultiplexerImpl UserPaintEventHandlerSharedPtr, std::vector<UserPaintEventHandlerSharedPtr> > ImplUserPaintEventHandlers; typedef ThreadUnsafeListenerContainer< - ShapeCursorEventHandlerSharedPtr, - std::vector<ShapeCursorEventHandlerSharedPtr> > ImplShapeCursorHandlers; - typedef ThreadUnsafeListenerContainer< PrioritizedHandlerEntry<HyperlinkHandler>, std::vector<PrioritizedHandlerEntry<HyperlinkHandler> > > ImplHyperLinkHandlers; @@ -292,7 +288,6 @@ struct EventMultiplexerImpl ImplRepaintHandlers maViewRepaintHandlers; ImplShapeListenerHandlers maShapeListenerHandlers; ImplUserPaintEventHandlers maUserPaintEventHandlers; - ImplShapeCursorHandlers maShapeCursorHandlers; ImplMouseHandlers maMouseClickHandlers; ImplMouseHandlers maMouseDoubleClickHandlers; ImplMouseHandlers maMouseMoveHandlers; @@ -1004,15 +999,6 @@ bool EventMultiplexer::notifyShapeListenerRemoved( { return pHandler->listenerRemoved( xListener, xShape ); } ); } -bool EventMultiplexer::notifyShapeCursorChange( - const uno::Reference<drawing::XShape>& xShape, - sal_Int16 nPointerShape ) -{ - return mpImpl->maShapeCursorHandlers.applyAll( - [&xShape, &nPointerShape]( const ShapeCursorEventHandlerSharedPtr& pHandler ) - { return pHandler->cursorChanged( xShape, nPointerShape ); } ); -} - bool EventMultiplexer::notifyUserPaintColor( RGBColor const& rUserColor ) { return mpImpl->maUserPaintEventHandlers.applyAll( diff --git a/slideshow/source/engine/slide/shapemanagerimpl.hxx b/slideshow/source/engine/slide/shapemanagerimpl.hxx index ea95070..5fbe14f 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.hxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.hxx @@ -149,9 +149,6 @@ private: virtual bool listenerRemoved( const css::uno::Reference< css::presentation::XShapeEventListener>& xListener, const css::uno::Reference< css::drawing::XShape>& xShape ) override; - // ShapeCursorEventHandler interface - - bool cursorChanged( const css::uno::Reference< css::drawing::XShape>& xShape, sal_Int16 nCursor ); diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 0fb582f..943c540 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1932,9 +1932,6 @@ void SlideShowImpl::setShapeCursor( // existing entry found, update with new cursor ID aIter->second = nPointerShape; } - - maEventMultiplexer.notifyShapeCursorChange(xShape, - nPointerShape); } bool SlideShowImpl::requestCursor( sal_Int16 nCursorShape ) diff --git a/slideshow/source/inc/eventmultiplexer.hxx b/slideshow/source/inc/eventmultiplexer.hxx index b92cd44..3691425 100644 --- a/slideshow/source/inc/eventmultiplexer.hxx +++ b/slideshow/source/inc/eventmultiplexer.hxx @@ -124,23 +124,6 @@ public: typedef ::boost::shared_ptr< UserPaintEventHandler > UserPaintEventHandlerSharedPtr; -/** Interface for handling view events. - - Classes implementing this interface can be added to an - EventMultiplexer object, and are called from there to - handle view events. -*/ -class ShapeCursorEventHandler -{ -public: - virtual ~ShapeCursorEventHandler() {} - - virtual bool cursorChanged( const css::uno::Reference< css::drawing::XShape>& xShape, - sal_Int16 nCursor ) = 0; -}; - -typedef ::boost::shared_ptr< ShapeCursorEventHandler > ShapeCursorEventHandlerSharedPtr; - /** This class multiplexes user-activated and slide-show global events. @@ -532,17 +515,6 @@ public: bool notifyShapeListenerRemoved( const css::uno::Reference<css::presentation::XShapeEventListener>& xListener, const css::uno::Reference<css::drawing::XShape>& xShape ); - /** A new shape cursor was set - - This method announces that the given cursor was set for the - specified shape. - - @return true, if at least one handler successfully processed - the notification. - */ - bool notifyShapeCursorChange( const css::uno::Reference<css::drawing::XShape>& xShape, - sal_Int16 nPointerShape ); - /** Notify a new user paint color Sending this notification also implies that user paint is diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx index a4fe85c..dba50cf 100644 --- a/svx/source/inc/fmobj.hxx +++ b/svx/source/inc/fmobj.hxx @@ -78,7 +78,7 @@ public: SAL_DLLPRIVATE virtual void SetModel(SdrModel* pNewModel) override; - SAL_DLLPRIVATE virtual void clonedFrom(const FmFormObj* _pSource); + SAL_DLLPRIVATE void clonedFrom(const FmFormObj* _pSource); SAL_DLLPRIVATE static css::uno::Reference< css::uno::XInterface> ensureModelEnv( const css::uno::Reference< css::uno::XInterface>& _rSourceContainer, diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx index 22f216c..20ab6b4 100644 --- a/svx/source/table/cell.hxx +++ b/svx/source/table/cell.hxx @@ -76,7 +76,7 @@ public: OutlinerParaObject* GetEditOutlinerParaObject() const; SVX_DLLPRIVATE void SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr ); SVX_DLLPRIVATE virtual SfxStyleSheet* GetStyleSheet() const override; - SVX_DLLPRIVATE virtual void TakeTextAnchorRect(Rectangle& rAnchorRect) const; + SVX_DLLPRIVATE void TakeTextAnchorRect(Rectangle& rAnchorRect) const; SVX_DLLPRIVATE virtual const SfxItemSet& GetItemSet() const override; SVX_DLLPRIVATE void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, bool bClearAllItems); diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 73770e3..c04b006 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -114,11 +114,11 @@ public: virtual OUString SAL_CALL getFormula( ) throw(css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL setFormula( const OUString& aFormula ) throw(css::uno::RuntimeException, std::exception) override; virtual double SAL_CALL getValue( ) throw(css::uno::RuntimeException, std::exception) override; - virtual double SAL_CALL getValue( ) const throw(css::uno::RuntimeException, std::exception) + double SAL_CALL getValue( ) const throw(css::uno::RuntimeException, std::exception) { return const_cast<SwXCell*>(this)->getValue(); }; virtual void SAL_CALL setValue( double nValue ) throw(css::uno::RuntimeException, std::exception) override; virtual css::table::CellContentType SAL_CALL getType( ) throw(css::uno::RuntimeException, std::exception) override; - virtual css::table::CellContentType SAL_CALL getType( ) const throw(css::uno::RuntimeException, std::exception) + css::table::CellContentType SAL_CALL getType( ) const throw(css::uno::RuntimeException, std::exception) { return const_cast<SwXCell*>(this)->getType(); }; virtual sal_Int32 SAL_CALL getError( ) throw(css::uno::RuntimeException, std::exception) override; diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index 8217ad8..e420a5e 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -625,7 +625,7 @@ public: virtual ~SwJumpToSpecificBox_Impl(); protected: - virtual void Select(); + void Select(); virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; }; diff --git a/vcl/inc/BitmapSymmetryCheck.hxx b/vcl/inc/BitmapSymmetryCheck.hxx index 576a61c..586b498 100644 --- a/vcl/inc/BitmapSymmetryCheck.hxx +++ b/vcl/inc/BitmapSymmetryCheck.hxx @@ -20,10 +20,10 @@ public: BitmapSymmetryCheck(); virtual ~BitmapSymmetryCheck(); - bool check(Bitmap& rBitmap); + static bool check(Bitmap& rBitmap); protected: - virtual bool checkImpl(BitmapReadAccess* pReadAccess); + static bool checkImpl(BitmapReadAccess* pReadAccess); }; #endif // INCLUDED_VCL_INC_BITMAPSYMMETRYCHECK_HXX diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx index ded6eca..bf52514 100644 --- a/vcl/inc/salbmp.hxx +++ b/vcl/inc/salbmp.hxx @@ -72,7 +72,7 @@ public: virtual bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) = 0; - virtual bool GetChecksum(ChecksumType& rChecksum) const + bool GetChecksum(ChecksumType& rChecksum) const { updateChecksum(); if (!mbChecksumValid) @@ -82,7 +82,7 @@ public: return mbChecksumValid; } - virtual void InvalidateChecksum() + void InvalidateChecksum() { mbChecksumValid = false; } diff --git a/vcl/qa/cppunit/BitmapFilterTest.cxx b/vcl/qa/cppunit/BitmapFilterTest.cxx index e0cf3ef..ade5acb 100644 --- a/vcl/qa/cppunit/BitmapFilterTest.cxx +++ b/vcl/qa/cppunit/BitmapFilterTest.cxx @@ -109,7 +109,7 @@ void BitmapFilterTest::testBlurCorrectness() // Check that the bitmap is horizontally and vertically symmetrical BitmapSymmetryCheck symmetryCheck; - CPPUNIT_ASSERT(symmetryCheck.check(aBitmap24Bit)); + CPPUNIT_ASSERT(BitmapSymmetryCheck::check(aBitmap24Bit)); { Bitmap::ScopedReadAccess aReadAccess(aBitmap24Bit); diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index b0c234b..c20c12b 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -121,7 +121,7 @@ void BitmapTest::testScale() CPPUNIT_ASSERT_EQUAL(static_cast<long>(10), aBitmap24Bit.GetSizePixel().Height()); // Check symmetry of the bitmap - CPPUNIT_ASSERT(aBitmapSymmetryCheck.check(aBitmap24Bit)); + CPPUNIT_ASSERT(BitmapSymmetryCheck::check(aBitmap24Bit)); if (bExportBitmap) { @@ -137,7 +137,7 @@ void BitmapTest::testScale() // After scaling the bitmap should still be symmetrical. This check guarantees that // scaling doesn't misalign the bitmap. - CPPUNIT_ASSERT(aBitmapSymmetryCheck.check(aBitmap24Bit)); + CPPUNIT_ASSERT(BitmapSymmetryCheck::check(aBitmap24Bit)); if (bExportBitmap) { diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx index 0197904..f59ddea 100644 --- a/vcl/source/window/menubarwindow.hxx +++ b/vcl/source/window/menubarwindow.hxx @@ -147,10 +147,10 @@ public: Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId); void RemoveMenuBarButton(sal_uInt16 nId); bool HandleMenuButtonEvent(sal_uInt16 i_nButtonId); - virtual void SetMBWHideAccel (bool val) { mbHideAccel = val; } - virtual bool GetMBWHideAccel (void) const { return mbHideAccel; } - virtual void SetMBWMenuKey (bool val) { mbMenuKey = val; } - virtual bool GetMBWMenuKey (void) const { return mbMenuKey; } + void SetMBWHideAccel(bool val) { mbHideAccel = val; } + bool GetMBWHideAccel() const { return mbHideAccel; } + void SetMBWMenuKey(bool val) { mbMenuKey = val; } + bool GetMBWMenuKey() const { return mbMenuKey; } }; #endif // INCLUDED_VCL_SOURCE_WINDOW_MENUBARWINDOW_HXX diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 6dd4da8..3a13be3 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -607,8 +607,6 @@ void Window::ImplCallPaint(const vcl::Region* pRegion, sal_uInt16 nPaintFlags) aHelper.DoPaint(pRegion); else mpWindowImpl->mnPaintFlags = 0; - - PostPaint(*this); } void Window::ImplCallOverlapPaint() @@ -1028,10 +1026,6 @@ void Window::PrePaint(vcl::RenderContext& /*rRenderContext*/) { } -void Window::PostPaint(vcl::RenderContext& /*rRenderContext*/) -{ -} - void Window::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) { CallEventListeners(VCLEVENT_WINDOW_PAINT, const_cast<Rectangle *>(&rRect)); diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index de21f16..a39f30b 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -233,8 +233,6 @@ void Splitter::MouseButtonDown( const MouseEvent& rMEvt ) else aPos.Y() = mnLastSplitPos; ImplSplitMousePos( aPos ); - Splitting( aPos ); - ImplSplitMousePos( aPos ); long nTemp = mnSplitPos; if ( mbHorzSplit ) SetSplitPosPixel( aPos.X() ); @@ -283,8 +281,6 @@ void Splitter::Tracking( const TrackingEvent& rTEvt ) //Point aNewPos = mpRefWin->ScreenToOutputPixel( OutputToScreenPixel( rTEvt.GetMouseEvent().GetPosPixel() ) ); Point aNewPos = mpRefWin->NormalizedScreenToOutputPixel( OutputToNormalizedScreenPixel( rTEvt.GetMouseEvent().GetPosPixel() ) ); ImplSplitMousePos( aNewPos ); - Splitting( aNewPos ); - ImplSplitMousePos( aNewPos ); if ( mbHorzSplit ) { @@ -407,8 +403,6 @@ void Splitter::ImplKbdTracking( vcl::KeyCode aKeyCode ) break; } ImplSplitMousePos( aNewPos ); - Splitting( aNewPos ); - ImplSplitMousePos( aNewPos ); if ( mbHorzSplit ) { @@ -453,10 +447,6 @@ void Splitter::EndSplit() maEndSplitHdl.Call( this ); } -void Splitter::Splitting( Point& /* rSplitPos */ ) -{ -} - void Splitter::SetDragRectPixel( const Rectangle& rDragRect, vcl::Window* _pRefWin ) { maDragRect = rDragRect; @@ -484,8 +474,6 @@ void Splitter::StartDrag() // Start-Position ermitteln maDragPos = mpRefWin->GetPointerPosPixel(); ImplSplitMousePos( maDragPos ); - Splitting( maDragPos ); - ImplSplitMousePos( maDragPos ); if ( mbHorzSplit ) mnStartSplitPos = maDragPos.X(); else @@ -516,8 +504,6 @@ void Splitter::ImplStartKbdSplitting() else maDragPos = Point( aSize.Width()/2, ImplSplitterActive() ? aPos.Y() : mnSplitPos ); ImplSplitMousePos( maDragPos ); - Splitting( maDragPos ); - ImplSplitMousePos( maDragPos ); if ( mbHorzSplit ) mnStartSplitPos = maDragPos.X(); else @@ -540,8 +526,6 @@ void Splitter::ImplRestoreSplitter() } ImplSplitMousePos( aPos ); - Splitting( aPos ); - ImplSplitMousePos( aPos ); long nTemp = mnSplitPos; if ( mbHorzSplit ) SetSplitPosPixel( aPos.X() ); @@ -632,8 +616,6 @@ void Splitter::KeyInput( const KeyEvent& rKEvt ) else aPos.Y() = 0; ImplSplitMousePos( aPos ); - Splitting( aPos ); - ImplSplitMousePos( aPos ); long nTemp = mnSplitPos; if ( mbHorzSplit ) SetSplitPosPixel( aPos.X() ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits