compilerplugins/clang/test/unusedfields.cxx | 15 ++- compilerplugins/clang/unusedfields.cxx | 29 +++++ compilerplugins/clang/unusedfields.readonly.results | 92 +++++++++++++++---- compilerplugins/clang/unusedfields.untouched.results | 40 +++----- compilerplugins/clang/unusedfields.writeonly.results | 32 +++--- cui/source/inc/cuitabarea.hxx | 4 cui/source/tabpages/tpbitmap.cxx | 11 -- include/sfx2/charwin.hxx | 3 include/svtools/inettbc.hxx | 10 -- sc/inc/chartlis.hxx | 4 sc/source/core/data/documen2.cxx | 8 - sc/source/core/data/document.cxx | 14 -- sc/source/core/opencl/formulagroupcl.cxx | 15 --- sc/source/core/tool/chartlis.cxx | 27 ----- sfx2/source/control/charwin.cxx | 16 --- svtools/source/control/inettbc.cxx | 27 ----- sw/inc/htmltbl.hxx | 2 sw/source/core/doc/htmltbl.cxx | 33 ------ vcl/source/control/combobox.cxx | 1 19 files changed, 159 insertions(+), 224 deletions(-)
New commits: commit e9586cf0b5fda0092fdca3ab4db470e8fd765adf Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue Apr 10 09:40:19 2018 +0200 loplugin:unusedfield improvements improve the read-only check to ignore reads from fields that are guarded by a boolean check, something like: if (field) field.foo(); this produces some false positives at the moment because I'm not correctly handling the else block, but also some useful new dead code. Change-Id: Id21fa1a56c171d09d979769b978b6eef14e8b695 Reviewed-on: https://gerrit.libreoffice.org/52664 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/compilerplugins/clang/test/unusedfields.cxx b/compilerplugins/clang/test/unusedfields.cxx index db71aeb199e4..fe81c88ed205 100644 --- a/compilerplugins/clang/test/unusedfields.cxx +++ b/compilerplugins/clang/test/unusedfields.cxx @@ -31,8 +31,7 @@ struct Bar // expected-error@-11 {{write m_bar3b [loplugin:unusedfields]}} // expected-error@-12 {{write m_bar4 [loplugin:unusedfields]}} // expected-error@-13 {{write m_bar7 [loplugin:unusedfields]}} -// expected-error@-14 {{write m_barfunctionpointer [loplugin:unusedfields]}} -// expected-error@-15 {{write m_bar9 [loplugin:unusedfields]}} +// expected-error@-14 {{write m_bar9 [loplugin:unusedfields]}} { int m_bar1; int m_bar2 = 1; @@ -161,4 +160,16 @@ struct ReadOnlyAnalysis2 ReadOnlyAnalysis2 global { 1 }; +struct ReadOnlyAnalysis3 +// expected-error@-1 {{read m_f1 [loplugin:unusedfields]}} +{ + int m_f1; + + void func1() + { + if (m_f1) + m_f1 = 1; + } +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/unusedfields.cxx b/compilerplugins/clang/unusedfields.cxx index 17ec24bc5c8e..ead4192bdf88 100644 --- a/compilerplugins/clang/unusedfields.cxx +++ b/compilerplugins/clang/unusedfields.cxx @@ -13,7 +13,8 @@ #include <string> #include <iostream> #include <fstream> -#include <set> +#include <unordered_set> +#include <vector> #include <algorithm> #include <sys/file.h> #include <unistd.h> @@ -152,6 +153,7 @@ public: bool TraverseCXXConstructorDecl( CXXConstructorDecl* ); bool TraverseCXXMethodDecl( CXXMethodDecl* ); bool TraverseFunctionDecl( FunctionDecl* ); + bool TraverseIfStmt( IfStmt* ); private: MyFieldInfo niceName(const FieldDecl*); @@ -168,6 +170,7 @@ private: // For reasons I do not understand, parentFunctionDecl() is not reliable, so // we store the parent function on the way down the AST. FunctionDecl * insideFunctionDecl = nullptr; + std::vector<FieldDecl const *> insideConditionalCheckOfMemberSet; }; void UnusedFields::run() @@ -414,6 +417,21 @@ bool UnusedFields::TraverseFunctionDecl(FunctionDecl* functionDecl) return ret; } +bool UnusedFields::TraverseIfStmt(IfStmt* ifStmt) +{ + FieldDecl const * memberFieldDecl = nullptr; + Expr const * cond = ifStmt->getCond()->IgnoreParenImpCasts(); + if (auto memberExpr = dyn_cast<MemberExpr>(cond)) + { + if ((memberFieldDecl = dyn_cast<FieldDecl>(memberExpr->getMemberDecl()))) + insideConditionalCheckOfMemberSet.push_back(memberFieldDecl); + } + bool ret = RecursiveASTVisitor::TraverseIfStmt(ifStmt); + if (memberFieldDecl) + insideConditionalCheckOfMemberSet.pop_back(); + return ret; +} + bool UnusedFields::VisitMemberExpr( const MemberExpr* memberExpr ) { const ValueDecl* decl = memberExpr->getMemberDecl(); @@ -643,6 +661,13 @@ void UnusedFields::checkReadOnly(const FieldDecl* fieldDecl, const Expr* memberE return; } + // if we're inside a block that looks like + // if (fieldDecl) + // .... + // then writes to this field don't matter, because unless we find another write to this field, this field is dead + if (std::find(insideConditionalCheckOfMemberSet.begin(), insideConditionalCheckOfMemberSet.end(), fieldDecl) != insideConditionalCheckOfMemberSet.end()) + return; + auto parentsRange = compiler.getASTContext().getParents(*memberExpr); const Stmt* child = memberExpr; const Stmt* parent = parentsRange.begin() == parentsRange.end() ? nullptr : parentsRange.begin()->get<Stmt>(); @@ -987,7 +1012,7 @@ llvm::Optional<CalleeWrapper> UnusedFields::getCallee(CallExpr const * callExpr) return llvm::Optional<CalleeWrapper>(); } -loplugin::Plugin::Registration< UnusedFields > X("unusedfields", false); +loplugin::Plugin::Registration< UnusedFields > X("unusedfields", true); } diff --git a/compilerplugins/clang/unusedfields.readonly.results b/compilerplugins/clang/unusedfields.readonly.results index ea8c740e10a0..a0f0f9327f87 100644 --- a/compilerplugins/clang/unusedfields.readonly.results +++ b/compilerplugins/clang/unusedfields.readonly.results @@ -150,11 +150,9 @@ cppu/source/uno/check.cxx:134 (anonymous namespace)::Char3 c3 char cppu/source/uno/check.cxx:138 (anonymous namespace)::Char4 chars struct (anonymous namespace)::Char3 -cui/source/inc/cuicharmap.hxx:86 - SvxCharacterMap m_pFavCharView VclPtr<class SvxCharView> [16] cui/source/options/optcolor.cxx:254 ColorConfigWindow_Impl aModuleOptions class SvtModuleOptions -cui/source/options/optpath.cxx:77 +cui/source/options/optpath.cxx:78 OptPath_Impl m_aDefOpt class SvtDefaultOptions cui/source/options/personalization.hxx:34 SvxPersonalizationTabPage m_vDefaultPersonaImages VclPtr<class PushButton> [3] @@ -162,11 +160,13 @@ cui/source/options/personalization.hxx:85 SelectPersonaDialog m_vResultList VclPtr<class PushButton> [9] cui/source/options/personalization.hxx:86 SelectPersonaDialog m_vSearchSuggestions VclPtr<class PushButton> [6] +cui/source/options/treeopt.cxx:468 + OptionsGroupInfo m_bLoadError _Bool dbaccess/source/core/api/RowSetBase.hxx:87 dbaccess::ORowSetBase m_aEmptyValue connectivity::ORowSetValue dbaccess/source/core/api/RowSetBase.hxx:98 dbaccess::ORowSetBase m_aErrors ::connectivity::SQLError -dbaccess/source/core/dataaccess/documentcontainer.cxx:65 +dbaccess/source/core/dataaccess/documentcontainer.cxx:64 dbaccess::LocalNameApproval m_aErrors ::connectivity::SQLError dbaccess/source/core/inc/ContentHelper.hxx:109 dbaccess::OContentHelper m_aErrorHelper const ::connectivity::SQLError @@ -206,8 +206,12 @@ extensions/source/propctrlr/eformshelper.hxx:62 pcr::EFormsHelper m_aSubmissionUINames pcr::MapStringToPropertySet extensions/source/propctrlr/eformshelper.hxx:64 pcr::EFormsHelper m_aBindingUINames pcr::MapStringToPropertySet +extensions/source/update/check/updatehdl.hxx:85 + UpdateHandler mbStringsLoaded _Bool filter/source/graphicfilter/eps/eps.cxx:113 PSWriter pVDev ScopedVclPtrInstance<class VirtualDevice> +filter/source/graphicfilter/icgm/cgm.hxx:62 + CGM mbPicture _Bool filter/source/graphicfilter/icgm/chart.hxx:44 DataNode nBoxX1 sal_Int16 filter/source/graphicfilter/icgm/chart.hxx:45 @@ -224,6 +228,14 @@ filter/source/xsltdialog/xmlfiltersettingsdialog.hxx:143 XMLFilterSettingsDialog maModuleOpt class SvtModuleOptions framework/inc/dispatch/dispatchprovider.hxx:81 framework::DispatchProvider m_aProtocolHandlerCache class framework::HandlerCache +framework/inc/helper/uiconfigelementwrapperbase.hxx:127 + framework::UIConfigElementWrapperBase m_bConfigListening _Bool +framework/inc/xml/menudocumenthandler.hxx:133 + framework::OReadMenuBarHandler m_bMenuMode _Bool +framework/inc/xml/menudocumenthandler.hxx:160 + framework::OReadMenuHandler m_bMenuPopupMode _Bool +framework/inc/xml/menudocumenthandler.hxx:190 + framework::OReadMenuPopupHandler m_bMenuMode _Bool framework/source/fwe/classes/addonsoptions.cxx:299 framework::AddonsOptions_Impl m_aEmptyAddonToolBar Sequence<Sequence<struct com::sun::star::beans::PropertyValue> > i18npool/inc/textconversion.hxx:80 @@ -260,6 +272,8 @@ include/filter/msfilter/svdfppt.hxx:886 ImplPPTParaPropSet nDontKnow2bit06 sal_uInt16 include/oox/core/contexthandler2.hxx:220 oox::core::ContextHandler2Helper mnRootStackSize size_t +include/oox/ole/axbinarywriter.hxx:151 + oox::ole::AxBinaryPropertyWriter maStreamProps oox::ole::AxBinaryPropertyWriter::ComplexPropVector include/registry/refltype.hxx:65 RTUik m_Data1 sal_uInt32 include/registry/refltype.hxx:66 @@ -271,7 +285,7 @@ include/registry/refltype.hxx:68 include/registry/refltype.hxx:69 RTUik m_Data5 sal_uInt32 include/sfx2/charmapcontrol.hxx:44 - SfxCharmapCtrl m_pFavCharView VclPtr<class SvxCharView> [16] + SfxCharmapCtrl m_pFavCharView VclPtr<class SvxCharViewControl> [16] include/sfx2/msg.hxx:95 SfxTypeAttrib nAID sal_uInt16 include/sfx2/msg.hxx:96 @@ -288,17 +302,33 @@ include/sfx2/msg.hxx:118 SfxType0 pType const std::type_info * include/sfx2/sidebar/ResourceManager.hxx:108 sfx2::sidebar::ResourceManager maMiscOptions class SvtMiscOptions -include/svl/ondemand.hxx:59 +include/svl/adrparse.hxx:52 + SvAddressParser m_bHasFirst _Bool +include/svl/ondemand.hxx:58 OnDemandLocaleDataWrapper aSysLocale class SvtSysLocale include/svtools/editsyntaxhighlighter.hxx:33 MultiLineEditSyntaxHighlight m_aColorConfig svtools::ColorConfig +include/svtools/inettbc.hxx:100 + URLBox aBaseURL class rtl::OUString +include/svtools/inettbc.hxx:101 + URLBox aPlaceHolder class rtl::OUString +include/svtools/inettbc.hxx:104 + URLBox eSmartProtocol enum INetProtocol +include/svtools/inettbc.hxx:105 + URLBox bOnlyDirectories _Bool +include/svtools/inettbc.hxx:106 + URLBox bHistoryDisabled _Bool +include/svx/sdr/overlay/overlayanimatedbitmapex.hxx:51 + sdr::overlay::OverlayAnimatedBitmapEx mbOverlayState _Bool include/svx/sdr/overlay/overlaymanager.hxx:73 sdr::overlay::OverlayManager maDrawinglayerOpt class SvtOptionsDrawinglayer include/svx/svdmark.hxx:140 SdrMarkList maPointName class rtl::OUString include/svx/svdmark.hxx:141 SdrMarkList maGluePointName class rtl::OUString -include/svx/svdpntv.hxx:142 +include/svx/svdoedge.hxx:161 + SdrEdgeObj mbBoundRectCalculationRunning _Bool +include/svx/svdpntv.hxx:169 SdrPaintView maDrawinglayerOpt class SvtOptionsDrawinglayer include/test/sheet/xdatapilottable.hxx:31 apitest::XDataPilotTable xCellForChange css::uno::Reference<css::table::XCell> @@ -309,7 +339,7 @@ include/test/sheet/xnamedranges.hxx:38 include/test/sheet/xspreadsheets2.hxx:46 apitest::XSpreadsheets2 xDocument css::uno::Reference<css::sheet::XSpreadsheetDocument> include/unoidl/unoidl.hxx:443 - unoidl::ConstantValue union unoidl::ConstantValue::(anonymous at /media/noel/disk2/libo4/include/unoidl/unoidl.hxx:443:5) + unoidl::ConstantValue union unoidl::ConstantValue::(anonymous at /home/noel/libo3/include/unoidl/unoidl.hxx:443:5) include/unoidl/unoidl.hxx:444 unoidl::ConstantValue::(anonymous) booleanValue _Bool include/unoidl/unoidl.hxx:445 @@ -340,6 +370,10 @@ include/vcl/filter/pdfdocument.hxx:174 vcl::filter::PDFNameElement m_nLength sal_uInt64 include/vcl/opengl/OpenGLContext.hxx:57 OpenGLCapabilitySwitch mbLimitedShaderRegisters _Bool +include/vcl/opengl/OpenGLContext.hxx:180 + OpenGLContext mpLastFramebuffer class OpenGLFramebuffer * +include/vcl/ppdparser.hxx:134 + psp::PPDParser::PPDConstraint m_pKey1 const class psp::PPDKey * include/xmloff/nmspmap.hxx:70 SvXMLNamespaceMap sEmpty const class rtl::OUString libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx:51 @@ -390,18 +424,24 @@ sal/rtl/uuid.cxx:64 UUID clock_seq_low sal_uInt8 sal/rtl/uuid.cxx:65 UUID node sal_uInt8 [6] +sc/inc/chartlis.hxx:72 + ScChartListener bSeriesRangesScheduled _Bool sc/inc/compiler.hxx:126 ScRawToken::(anonymous union)::(anonymous) eItem class ScTableRefToken::Item sc/inc/compiler.hxx:127 - ScRawToken::(anonymous) table struct (anonymous struct at /media/noel/disk2/libo4/sc/inc/compiler.hxx:124:9) + ScRawToken::(anonymous) table struct (anonymous struct at /home/noel/libo3/sc/inc/compiler.hxx:124:9) sc/inc/compiler.hxx:132 ScRawToken::(anonymous) pMat class ScMatrix * sc/inc/formulagroup.hxx:42 sc::FormulaGroupEntry::(anonymous) mpCells class ScFormulaCell ** sc/inc/reordermap.hxx:21 sc::ColRowReorderMapType maData sc::ColRowReorderMapType::DataType +sc/source/core/inc/adiasync.hxx:41 + ScAddInAsync::(anonymous) pStr class rtl::OUString * sc/source/core/inc/interpre.hxx:105 ScTokenStack pPointer const formula::FormulaToken *[512] +sc/source/core/opencl/formulagroupcl.cxx:1239 + sc::opencl::ParallelReductionVectorRef mpClmem2 cl_mem sc/source/filter/inc/autofilterbuffer.hxx:178 oox::xls::FilterColumn mxSettings std::shared_ptr<FilterSettingsBase> sc/source/filter/inc/commentsbuffer.hxx:42 @@ -410,6 +450,8 @@ sc/source/filter/inc/defnamesbuffer.hxx:84 oox::xls::DefinedNameBase maRefAny css::uno::Any sc/source/filter/inc/htmlpars.hxx:56 ScHTMLStyles maEmpty const class rtl::OUString +sc/source/filter/inc/namebuff.hxx:85 + RangeNameBufferWK3::Entry nAbsInd sal_uInt16 sc/source/filter/inc/qproform.hxx:57 QProToSc mnAddToken struct TokenId sc/source/filter/inc/stylesbuffer.hxx:675 @@ -422,10 +464,14 @@ sc/source/filter/inc/xepage.hxx:122 XclExpChartPageSettings maData struct XclPageData sc/source/filter/inc/xltracer.hxx:82 XclTracer mbEnabled _Bool +sc/source/filter/xml/xmlcelli.hxx:96 + ScXMLTableRowCellContext mbEditEngineHasText _Bool sc/source/ui/inc/csvruler.hxx:35 ScCsvRuler maBackgrDev ScopedVclPtrInstance<class VirtualDevice> sc/source/ui/inc/csvruler.hxx:36 ScCsvRuler maRulerDev ScopedVclPtrInstance<class VirtualDevice> +sc/source/ui/inc/tabcont.hxx:38 + ScTabControl bErrorShown _Bool sc/source/ui/vba/vbaformatconditions.hxx:35 ScVbaFormatConditions mxSheetConditionalEntries css::uno::Reference<css::sheet::XSheetConditionalEntries> sc/source/ui/vba/vbaformatconditions.hxx:36 @@ -434,6 +480,8 @@ sc/source/ui/vba/vbaformatconditions.hxx:37 ScVbaFormatConditions mxRangeParent css::uno::Reference<ov::excel::XRange> sc/source/ui/vba/vbaformatconditions.hxx:38 ScVbaFormatConditions mxParentRangePropertySet css::uno::Reference<css::beans::XPropertySet> +sd/inc/Outliner.hxx:282 + SdOutliner mpFirstObj class SdrObject * sd/inc/sdmod.hxx:118 SdModule gImplImpressPropertySetInfoCache SdExtPropertySetInfoCache sd/inc/sdmod.hxx:119 @@ -450,6 +498,8 @@ sd/source/ui/sidebar/MasterPageContainer.cxx:154 sd::sidebar::MasterPageContainer::Implementation maLargePreviewNotAvailable class Image sd/source/ui/sidebar/MasterPageContainer.cxx:155 sd::sidebar::MasterPageContainer::Implementation maSmallPreviewNotAvailable class Image +sd/source/ui/slideshow/showwindow.hxx:103 + sd::ShowWindow mbMouseCursorHidden _Bool sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx:97 sd::slidesorter::controller::Animator maElapsedTime ::canvas::tools::ElapsedTime sd/source/ui/table/TableDesignPane.hxx:99 @@ -468,14 +518,16 @@ starmath/source/view.cxx:855 SmViewShell_Impl aOpts class SvtMiscOptions store/source/storbios.cxx:59 OStoreSuperBlock m_aMarked OStoreSuperBlock::L -svl/source/crypto/cryptosign.cxx:280 +svl/source/crypto/cryptosign.cxx:279 (anonymous namespace)::(anonymous) status SECItem -svl/source/crypto/cryptosign.cxx:301 +svl/source/crypto/cryptosign.cxx:300 (anonymous namespace)::(anonymous) timeStampToken SECItem svl/source/misc/strmadpt.cxx:55 SvDataPipe_Impl::Page m_aBuffer sal_Int8 [1] svl/source/uno/pathservice.cxx:36 PathService m_aOptions class SvtPathOptions +svtools/source/contnr/fileview.cxx:331 + SvtFileView_Impl mpNameTrans class NameTranslator_Impl * svtools/source/control/headbar.cxx:38 ImplHeadItem maHelpId class rtl::OString svtools/source/control/headbar.cxx:39 @@ -498,10 +550,12 @@ svtools/source/dialogs/insdlg.cxx:52 OleObjectDescriptor dwFullUserTypeName sal_uInt32 svtools/source/dialogs/insdlg.cxx:53 OleObjectDescriptor dwSrcOfCopy sal_uInt32 -svtools/source/table/gridtablerenderer.cxx:70 +svtools/source/table/gridtablerenderer.cxx:69 svt::table::CachedSortIndicator m_sortAscending class BitmapEx -svtools/source/table/gridtablerenderer.cxx:71 +svtools/source/table/gridtablerenderer.cxx:70 svt::table::CachedSortIndicator m_sortDescending class BitmapEx +svx/inc/sdr/overlay/overlayrectangle.hxx:44 + sdr::overlay::OverlayRectangle mbOverlayState _Bool svx/source/inc/datanavi.hxx:225 svxform::XFormsPage m_aMethodString class svxform::MethodString svx/source/inc/datanavi.hxx:226 @@ -520,6 +574,10 @@ sw/inc/calc.hxx:194 SwCalc m_aSysLocale class SvtSysLocale sw/inc/hints.hxx:188 SwAttrSetChg m_bDelSet _Bool +sw/inc/htmltbl.hxx:177 + SwHTMLTableLayout m_pLeftFillerBox class SwTableBox * +sw/inc/htmltbl.hxx:178 + SwHTMLTableLayout m_pRightFillerBox class SwTableBox * sw/inc/shellio.hxx:140 SwReader pStg tools::SvRef<SotStorage> sw/inc/swevent.hxx:71 @@ -532,8 +590,12 @@ sw/source/core/doc/swstylemanager.cxx:59 SwStyleManager aAutoParaPool class StylePool sw/source/core/doc/tblrwcl.cxx:83 CpyTabFrame::(anonymous) nSize SwTwips +sw/source/core/inc/swblocks.hxx:68 + SwImpBlocks m_bInPutMuchBlocks _Bool sw/source/core/text/atrhndl.hxx:48 SwAttrHandler::SwAttrStack pInitialArray class SwTextAttr *[3] +sw/source/filter/html/swhtml.hxx:497 + SwHTMLParser m_bBodySeen _Bool sw/source/filter/inc/rtf.hxx:32 RTFSurround::(anonymous) nVal sal_uInt8 sw/source/ui/dbui/dbinsdlg.cxx:115 @@ -552,7 +614,7 @@ sw/source/uibase/inc/labimg.hxx:49 SwLabItem m_aBin class rtl::OUString sw/source/uibase/inc/optload.hxx:94 CaptionComboBox aDefault class rtl::OUString -toolkit/source/awt/vclxtoolkit.cxx:432 +toolkit/source/awt/vclxtoolkit.cxx:433 (anonymous namespace)::VCLXToolkit mxSelection css::uno::Reference<css::datatransfer::clipboard::XClipboard> ucb/source/ucp/gio/gio_mount.hxx:46 OOoMountOperationClass parent_class GMountOperationClass @@ -596,7 +658,7 @@ unoidl/source/unoidlprovider.cxx:456 unoidl::detail::MapEntry data struct unoidl::detail::(anonymous namespace)::Memory32 unotools/source/config/pathoptions.cxx:90 SvtPathOptions_Impl m_aEmptyString class rtl::OUString -unotools/source/config/saveopt.cxx:78 +unotools/source/config/saveopt.cxx:77 SvtSaveOptions_Impl bROUserAutoSave _Bool vcl/inc/printerinfomanager.hxx:73 psp::PrinterInfoManager::SystemPrintQueue m_aComment class rtl::OUString diff --git a/compilerplugins/clang/unusedfields.untouched.results b/compilerplugins/clang/unusedfields.untouched.results index bd61aa8e9a08..e2cb089eb3a9 100644 --- a/compilerplugins/clang/unusedfields.untouched.results +++ b/compilerplugins/clang/unusedfields.untouched.results @@ -5,9 +5,9 @@ avmedia/source/vlc/wrapper/Types.hxx:44 avmedia/source/vlc/wrapper/Types.hxx:45 libvlc_event_t::(anonymous union)::(anonymous) dummy2 const char * avmedia/source/vlc/wrapper/Types.hxx:46 - libvlc_event_t::(anonymous) padding struct (anonymous struct at /media/noel/disk2/libo4/avmedia/source/vlc/wrapper/Types.hxx:43:7) + libvlc_event_t::(anonymous) padding struct (anonymous struct at /home/noel/libo3/avmedia/source/vlc/wrapper/Types.hxx:43:7) avmedia/source/vlc/wrapper/Types.hxx:47 - libvlc_event_t u union (anonymous union at /media/noel/disk2/libo4/avmedia/source/vlc/wrapper/Types.hxx:41:5) + libvlc_event_t u union (anonymous union at /home/noel/libo3/avmedia/source/vlc/wrapper/Types.hxx:41:5) avmedia/source/vlc/wrapper/Types.hxx:53 libvlc_track_description_t psz_name char * basctl/source/inc/dlged.hxx:122 @@ -76,12 +76,6 @@ include/svtools/unoevent.hxx:162 SvEventDescriptor xParentRef css::uno::Reference<css::uno::XInterface> include/svx/ClassificationDialog.hxx:63 svx::ClassificationDialog m_nInsertMarkings sal_Int16 -include/svx/xmlgrhlp.hxx:60 - SvXMLGraphicHelper maGrfURLs SvXMLGraphicHelper::URLPairVector -include/svx/xmlgrhlp.hxx:61 - SvXMLGraphicHelper maGrfObjs SvXMLGraphicHelper::GraphicObjectVector -include/svx/xmlgrhlp.hxx:63 - SvXMLGraphicHelper maURLSet ::std::set<OUString> include/vcl/pdfwriter.hxx:548 vcl::PDFWriter::PDFSignContext m_pDerEncoded sal_Int8 * include/vcl/pdfwriter.hxx:550 @@ -180,15 +174,15 @@ sd/source/ui/table/TableDesignPane.hxx:113 sd::TableDesignPane aImpl class sd::TableDesignWidget sd/source/ui/view/DocumentRenderer.cxx:1319 sd::DocumentRenderer::Implementation mxObjectShell SfxObjectShellRef -sd/source/ui/view/viewshel.cxx:1217 +sd/source/ui/view/viewshel.cxx:1215 sd::KeepSlideSorterInSyncWithPageChanges m_aDrawLock sd::slidesorter::view::class SlideSorterView::DrawLock -sd/source/ui/view/viewshel.cxx:1218 +sd/source/ui/view/viewshel.cxx:1216 sd::KeepSlideSorterInSyncWithPageChanges m_aModelLock sd::slidesorter::controller::class SlideSorterController::ModelChangeLock -sd/source/ui/view/viewshel.cxx:1219 +sd/source/ui/view/viewshel.cxx:1217 sd::KeepSlideSorterInSyncWithPageChanges m_aUpdateLock sd::slidesorter::controller::class PageSelector::UpdateLock -sd/source/ui/view/viewshel.cxx:1220 +sd/source/ui/view/viewshel.cxx:1218 sd::KeepSlideSorterInSyncWithPageChanges m_aContext sd::slidesorter::controller::class SelectionObserver::Context -sd/source/ui/view/ViewShellBase.cxx:193 +sd/source/ui/view/ViewShellBase.cxx:191 sd::ViewShellBase::Implementation mpPageCacheManager std::shared_ptr<slidesorter::cache::PageCacheManager> sfx2/source/doc/doctempl.cxx:115 DocTempl::DocTempl_EntryData_Impl mxObjShell class SfxObjectShellLock @@ -202,24 +196,22 @@ starmath/inc/view.hxx:218 SmViewShell maGraphicController class SmGraphicController starmath/source/accessibility.hxx:273 SmEditSource rEditAcc class SmEditAccessible & -svl/source/crypto/cryptosign.cxx:121 +svl/source/crypto/cryptosign.cxx:120 (anonymous namespace)::(anonymous) extnID SECItem -svl/source/crypto/cryptosign.cxx:122 +svl/source/crypto/cryptosign.cxx:121 (anonymous namespace)::(anonymous) critical SECItem -svl/source/crypto/cryptosign.cxx:123 +svl/source/crypto/cryptosign.cxx:122 (anonymous namespace)::(anonymous) extnValue SECItem -svl/source/crypto/cryptosign.cxx:281 +svl/source/crypto/cryptosign.cxx:280 (anonymous namespace)::(anonymous) statusString SECItem -svl/source/crypto/cryptosign.cxx:282 +svl/source/crypto/cryptosign.cxx:281 (anonymous namespace)::(anonymous) failInfo SECItem svtools/source/svhtml/htmlkywd.cxx:558 - HTML_OptionEntry union HTML_OptionEntry::(anonymous at /media/noel/disk2/libo4/svtools/source/svhtml/htmlkywd.cxx:558:5) + HTML_OptionEntry union HTML_OptionEntry::(anonymous at /home/noel/libo3/svtools/source/svhtml/htmlkywd.cxx:558:5) svtools/source/svhtml/htmlkywd.cxx:560 HTML_OptionEntry::(anonymous) sToken const sal_Char * svtools/source/svhtml/htmlkywd.cxx:561 HTML_OptionEntry::(anonymous) pUToken const class rtl::OUString * -sw/inc/ddefld.hxx:42 - sw::InRangeSearchHint m_rNodes class SwNodes & sw/source/core/crsr/crbm.cxx:64 (anonymous namespace)::CursorStateHelper m_aSaveState class SwCursorSaveState sw/source/core/frmedt/fetab.cxx:77 @@ -230,10 +222,6 @@ sw/source/uibase/inc/splittbl.hxx:30 SwSplitTableDlg m_xHorzBox std::unique_ptr<weld::RadioButton> sw/source/uibase/inc/splittbl.hxx:31 SwSplitTableDlg m_xContentCopyRB std::unique_ptr<weld::RadioButton> -sw/source/uibase/inc/srtdlg.hxx:32 - SwSortDlg m_xTypLbl std::unique_ptr<weld::Label> -sw/source/uibase/inc/tautofmt.hxx:41 - SwAutoFormatDlg m_xFormatting std::unique_ptr<weld::Container> sw/source/uibase/inc/uivwimp.hxx:95 SwView_Impl xTmpSelDocSh class SfxObjectShellLock sw/source/uibase/inc/unodispatch.hxx:46 @@ -262,5 +250,7 @@ vcl/source/gdi/jobset.cxx:35 ImplOldJobSetupData cPortName char [32] vcl/source/uitest/uno/uitest_uno.cxx:35 UITestUnoObj mpUITest std::unique_ptr<UITest> +vcl/unx/gtk3/gtk3gtkinst.cxx:1937 + CrippledViewport viewport GtkViewport vcl/unx/gtk/a11y/atkhypertext.cxx:29 (anonymous) atk_hyper_link AtkHyperlink diff --git a/compilerplugins/clang/unusedfields.writeonly.results b/compilerplugins/clang/unusedfields.writeonly.results index 9fbc90d76dfb..bde0bf943e7a 100644 --- a/compilerplugins/clang/unusedfields.writeonly.results +++ b/compilerplugins/clang/unusedfields.writeonly.results @@ -216,7 +216,7 @@ framework/inc/services/layoutmanager.hxx:258 framework::LayoutManager m_bGlobalSettings _Bool framework/source/layoutmanager/toolbarlayoutmanager.hxx:285 framework::ToolbarLayoutManager m_bGlobalSettings _Bool -framework/source/services/frame.cxx:422 +framework/source/services/frame.cxx:421 (anonymous namespace)::Frame m_pWindowCommandDispatch class framework::WindowCommandDispatch * include/basic/basmgr.hxx:52 BasicError nReason enum BasicErrorReason @@ -236,6 +236,8 @@ include/editeng/adjustitem.hxx:39 SvxAdjustItem bLeft _Bool include/LibreOfficeKit/LibreOfficeKit.h:108 _LibreOfficeKitDocumentClass nSize size_t +include/LibreOfficeKit/LibreOfficeKit.h:310 + _LibreOfficeKitDocumentClass getPartInfo char *(*)(LibreOfficeKitDocument *, int) include/opencl/openclwrapper.hxx:36 openclwrapper::KernelEnv mpkProgram cl_program include/opencl/openclwrapper.hxx:52 @@ -252,14 +254,10 @@ include/svx/float3d.hxx:177 Svx3DWin pControllerItem class Svx3DCtrlItem * include/svx/imapdlg.hxx:118 SvxIMapDlg aIMapItem class SvxIMapDlgItem -include/svx/langbox.hxx:158 - LanguageBox m_bWithCheckmark _Bool -include/svx/srchdlg.hxx:232 +include/svx/srchdlg.hxx:234 SvxSearchDialog pSearchController class SvxSearchController * -include/svx/srchdlg.hxx:233 +include/svx/srchdlg.hxx:235 SvxSearchDialog pOptionsController class SvxSearchController * -include/svx/xmlgrhlp.hxx:70 - SvXMLGraphicHelper mbDirect _Bool include/vcl/opengl/OpenGLContext.hxx:41 GLWindow bMultiSampleSupported _Bool include/vcl/salnativewidgets.hxx:415 @@ -388,7 +386,7 @@ sc/source/filter/xml/xmldrani.hxx:75 ScXMLDatabaseRangeContext bIsSelection _Bool sc/source/filter/xml/xmlexternaltabi.hxx:113 ScXMLExternalRefCellContext mnCellType sal_Int16 -sc/source/ui/inc/AccessibleText.hxx:195 +sc/source/ui/inc/AccessibleText.hxx:194 ScAccessiblePreviewHeaderCellTextData mbRowHeader _Bool sc/source/ui/inc/datastream.hxx:108 sc::DataStream mnSettings sal_uInt32 @@ -408,7 +406,7 @@ sd/source/filter/ppt/ppt97animations.hxx:51 Ppt97AnimationInfoAtom nUnknown1 sal_uInt8 sd/source/filter/ppt/ppt97animations.hxx:52 Ppt97AnimationInfoAtom nUnknown2 sal_uInt8 -sd/source/ui/inc/animobjs.hxx:129 +sd/source/ui/inc/animobjs.hxx:128 sd::AnimationWindow pControllerItem class sd::AnimationControllerItem * sd/source/ui/inc/navigatr.hxx:123 SdNavigatorWin mpNavigatorCtrlItem class SdNavigatorControllerItem * @@ -440,17 +438,17 @@ starmath/inc/view.hxx:158 SmCmdBoxWindow aController class SmEditController store/source/storbase.hxx:248 store::PageData m_aMarked store::PageData::L -svl/source/crypto/cryptosign.cxx:145 +svl/source/crypto/cryptosign.cxx:144 (anonymous namespace)::(anonymous) version SECItem -svl/source/crypto/cryptosign.cxx:147 +svl/source/crypto/cryptosign.cxx:146 (anonymous namespace)::(anonymous) reqPolicy SECItem -svl/source/crypto/cryptosign.cxx:148 +svl/source/crypto/cryptosign.cxx:147 (anonymous namespace)::(anonymous) nonce SECItem -svl/source/crypto/cryptosign.cxx:149 +svl/source/crypto/cryptosign.cxx:148 (anonymous namespace)::(anonymous) certReq SECItem -svl/source/crypto/cryptosign.cxx:150 +svl/source/crypto/cryptosign.cxx:149 (anonymous namespace)::(anonymous) extensions (anonymous namespace)::Extension * -svl/source/crypto/cryptosign.cxx:194 +svl/source/crypto/cryptosign.cxx:193 (anonymous namespace)::SigningCertificateV2 certs struct (anonymous namespace)::ESSCertIDv2 ** svl/source/misc/inethist.cxx:48 INetURLHistory_Impl::head_entry m_nMagic sal_uInt32 @@ -499,7 +497,7 @@ sw/source/filter/inc/rtf.hxx:29 sw/source/filter/inc/rtf.hxx:30 RTFSurround::(anonymous union)::(anonymous) nJunk sal_uInt8 sw/source/filter/inc/rtf.hxx:31 - RTFSurround::(anonymous) Flags struct (anonymous struct at /media/noel/disk2/libo4/sw/source/filter/inc/rtf.hxx:27:9) + RTFSurround::(anonymous) Flags struct (anonymous struct at /home/noel/libo3/sw/source/filter/inc/rtf.hxx:27:9) ucb/source/ucp/gio/gio_mount.hxx:46 OOoMountOperationClass parent_class GMountOperationClass ucb/source/ucp/gio/gio_mount.hxx:49 @@ -576,5 +574,5 @@ vcl/unx/gtk/hudawareness.cxx:20 (anonymous) connection GDBusConnection * vcl/unx/gtk/hudawareness.cxx:23 (anonymous) notify GDestroyNotify -writerfilter/source/dmapper/PropertyMap.hxx:199 +writerfilter/source/dmapper/PropertyMap.hxx:198 writerfilter::dmapper::SectionPropertyMap m_nDebugSectionNumber sal_Int32 diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index ba2760d4fb26..6d6997e0df13 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -536,10 +536,6 @@ private: Size rBitmapSize; Size rFilledSize; Size rZoomedSize; - sal_Int64 nFilledWidthPercent; - sal_Int64 nFilledHeightPercent; - sal_Int64 nZoomedWidthPercent; - sal_Int64 nZoomedHeightPercent; DECL_LINK( ModifyBitmapHdl, ValueSet*, void ); DECL_LINK( ClickScaleHdl, Button*, void ); DECL_LINK( ModifyBitmapStyleHdl, ListBox&, void ); diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 1b9312715ac5..69df65a60225 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -83,11 +83,7 @@ SvxBitmapTabPage::SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInA m_bLogicalSize(false), m_aXFillAttr ( rInAttrs.GetPool() ), m_rXFSet ( m_aXFillAttr.GetItemSet() ), - mpView(nullptr), - nFilledWidthPercent(0), - nFilledHeightPercent(0), - nZoomedWidthPercent(0), - nZoomedHeightPercent(0) + mpView(nullptr) { get(m_pBitmapLB,"BITMAP"); get(m_pBitmapStyleLB, "bitmapstyle"); @@ -479,11 +475,6 @@ void SvxBitmapTabPage::CalculateBitmapPresetSize() rZoomedSize.setWidth( nObjectWidth ); rZoomedSize.setHeight( rBitmapSize.Height()*nObjectWidth/rBitmapSize.Width() ); } - - nFilledWidthPercent = static_cast<sal_Int64>(rFilledSize.Width()*100/rBitmapSize.Width()); - nFilledHeightPercent = static_cast<sal_Int64>(rFilledSize.Width()*100/rBitmapSize.Height()); - nZoomedWidthPercent = static_cast<sal_Int64>(rZoomedSize.Width()*100/rBitmapSize.Width()); - nZoomedHeightPercent = static_cast<sal_Int64>(rZoomedSize.Height()*100/rBitmapSize.Height()); } } diff --git a/include/sfx2/charwin.hxx b/include/sfx2/charwin.hxx index 976e1f3999cb..0db93a2f1302 100644 --- a/include/sfx2/charwin.hxx +++ b/include/sfx2/charwin.hxx @@ -91,8 +91,6 @@ public: void setMouseClickHdl(const Link<SvxCharViewControl*,void> &rLink); - DECL_LINK(ContextMenuSelectHdl, Menu*, bool); - protected: virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) override; @@ -107,7 +105,6 @@ private: bool maHasInsert; Link<SvxCharViewControl*, void> maMouseClickHdl; - Link<SvxCharViewControl*, void> maClearClickHdl; }; #endif diff --git a/include/svtools/inettbc.hxx b/include/svtools/inettbc.hxx index 46debbb9fafb..c3fa0e4bf530 100644 --- a/include/svtools/inettbc.hxx +++ b/include/svtools/inettbc.hxx @@ -97,14 +97,8 @@ class SVT_DLLPUBLIC URLBox friend class SvtURLBox_Impl; Idle aChangedIdle; - OUString aBaseURL; - OUString aPlaceHolder; rtl::Reference< MatchContext_Impl > pCtx; std::unique_ptr<SvtURLBox_Impl> pImpl; - INetProtocol eSmartProtocol; - bool bAutoCompleteMode : 1; - bool bOnlyDirectories : 1; - bool bHistoryDisabled : 1; std::unique_ptr<weld::ComboBoxText> m_xWidget; @@ -125,13 +119,9 @@ public: void append_text(const OUString& rStr) { m_xWidget->append_text(rStr); } void EnableAutocomplete() { m_xWidget->set_entry_completion(true); } - INetProtocol GetSmartProtocol() const { return eSmartProtocol; } OUString GetURL(); static OUString ParseSmart( const OUString& aText, const OUString& aBaseURL ); - - bool MatchesPlaceHolder( const OUString& sToMatch ) const - { return ( !aPlaceHolder.isEmpty() ) && ( aPlaceHolder == sToMatch ); } }; #endif diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index 2537e15613d2..38642699f3dd 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -69,7 +69,6 @@ private: ScDocument* mpDoc; bool bUsed:1; // for ScChartListenerCollection::FreeUnused bool bDirty:1; - bool bSeriesRangesScheduled:1; ScChartListener& operator=( const ScChartListener& ) = delete; @@ -105,8 +104,6 @@ public: void UpdateChartIntersecting( const ScRange& rRange ); - // if chart series ranges are to be updated later on (e.g. DeleteTab, InsertTab) - void UpdateScheduledSeriesRanges(); void UpdateSeriesRanges(); ExternalRefListener* GetExtRefListener(); @@ -190,7 +187,6 @@ public: void SetRangeDirty( const ScRange& rRange ); // for example rows/columns - void UpdateScheduledSeriesRanges(); void UpdateChartsContainingTab( SCTAB nTab ); bool operator==( const ScChartListenerCollection& r ) const; diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index ac245b3516e0..f213947c3e46 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -803,9 +803,6 @@ bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress ) SetNoListening( false ); StartAllListeners(); - // sheet names of references may not be valid until sheet is moved - pChartListenerCollection->UpdateScheduledSeriesRanges(); - sc::SetFormulaDirtyContext aFormulaDirtyCxt; SetAllFormulasDirty(aFormulaDirtyCxt); @@ -893,10 +890,7 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM if (pValidationList) pValidationList->UpdateInsertTab(aCxt); - - // sheet names of references may not be valid until sheet is copied - pChartListenerCollection->UpdateScheduledSeriesRanges(); - } + } else bValid = false; } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 878887211ccb..9bf363cec196 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -567,10 +567,6 @@ bool ScDocument::InsertTab( pValidationList->UpdateInsertTab(aCxt); } - // sheet names of references are not valid until sheet is inserted - if ( pChartListenerCollection ) - pChartListenerCollection->UpdateScheduledSeriesRanges(); - bValid = true; } else @@ -667,10 +663,6 @@ bool ScDocument::InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames, pValidationList->UpdateInsertTab(aCxt); } - // sheet names of references are not valid until sheet is inserted - if ( pChartListenerCollection ) - pChartListenerCollection->UpdateScheduledSeriesRanges(); - bValid = true; } else @@ -762,9 +754,6 @@ bool ScDocument::DeleteTab( SCTAB nTab ) sc::SetFormulaDirtyContext aFormulaDirtyCxt; SetAllFormulasDirty(aFormulaDirtyCxt); } - // sheet names of references are not valid until sheet is deleted - if (pChartListenerCollection) - pChartListenerCollection->UpdateScheduledSeriesRanges(); if (comphelper::LibreOfficeKit::isActive()) { @@ -863,9 +852,6 @@ bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets ) sc::SetFormulaDirtyContext aFormulaDirtyCxt; SetAllFormulasDirty(aFormulaDirtyCxt); } - // sheet names of references are not valid until sheet is deleted - if (pChartListenerCollection) - pChartListenerCollection->UpdateScheduledSeriesRanges(); if (comphelper::LibreOfficeKit::isActive()) { diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index fc0a30ef523d..84ee1cc30798 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -1177,7 +1177,7 @@ public: ParallelReductionVectorRef( const ScCalcConfig& config, const std::string& s, FormulaTreeNodeRef ft, std::shared_ptr<SlidingFunctionBase>& CodeGen, int index ) : - Base(config, s, ft, index), mpCodeGen(CodeGen), mpClmem2(nullptr) + Base(config, s, ft, index), mpCodeGen(CodeGen) { FormulaToken* t = ft->GetFormulaToken(); if (t->GetType() != formula::svDoubleVectorRef) @@ -1211,17 +1211,6 @@ public: return nCurWindowSize; } - ~ParallelReductionVectorRef() - { - if (mpClmem2) - { - cl_int err; - err = clReleaseMemObject(mpClmem2); - SAL_WARN_IF(err != CL_SUCCESS, "sc.opencl", "clReleaseMemObject failed: " << openclwrapper::errorString(err)); - mpClmem2 = nullptr; - } - } - size_t GetArrayLength() const { return mpDVR->GetArrayLength(); } size_t GetWindowSize() const { return mpDVR->GetRefRowSize(); } @@ -1235,8 +1224,6 @@ protected: const formula::DoubleVectorRefToken* mpDVR; // from parent nodes std::shared_ptr<SlidingFunctionBase> mpCodeGen; - // controls whether to invoke the reduction kernel during marshaling or not - cl_mem mpClmem2; }; class Reduction : public SlidingFunctionBase diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index 81b3c79dd9ed..8ed6bfcabed7 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -98,8 +98,7 @@ ScChartListener::ScChartListener( const OUString& rName, ScDocument* pDocP, maName(rName), mpDoc( pDocP ), bUsed( false ), - bDirty( false ), - bSeriesRangesScheduled( false ) + bDirty( false ) { ScRefTokenHelper::getTokensFromRangeList(*mpTokens, *rRangeList); } @@ -111,8 +110,7 @@ ScChartListener::ScChartListener( const OUString& rName, ScDocument* pDocP, vect maName(rName), mpDoc( pDocP ), bUsed( false ), - bDirty( false ), - bSeriesRangesScheduled( false ) + bDirty( false ) { } @@ -123,8 +121,7 @@ ScChartListener::ScChartListener( const ScChartListener& r ) : maName(r.maName), mpDoc( r.mpDoc ), bUsed( false ), - bDirty( r.bDirty ), - bSeriesRangesScheduled( r.bSeriesRangesScheduled ) + bDirty( r.bDirty ) { if ( r.pUnoData ) pUnoData.reset( new ScChartUnoData( *r.pUnoData ) ); @@ -322,15 +319,6 @@ void ScChartListener::ChangeListening( const ScRangeListRef& rRangeListRef, SetDirty( true ); } -void ScChartListener::UpdateScheduledSeriesRanges() -{ - if ( bSeriesRangesScheduled ) - { - bSeriesRangesScheduled = false; - UpdateSeriesRanges(); - } -} - void ScChartListener::UpdateChartIntersecting( const ScRange& rRange ) { ScTokenRef pToken; @@ -370,7 +358,6 @@ bool ScChartListener::operator==( const ScChartListener& r ) const bool b2 = (r.mpTokens.get() && !r.mpTokens->empty()); if (mpDoc != r.mpDoc || bUsed != r.bUsed || bDirty != r.bDirty || - bSeriesRangesScheduled != r.bSeriesRangesScheduled || GetName() != r.GetName() || b1 != b2) return false; @@ -693,14 +680,6 @@ void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange ) } } -void ScChartListenerCollection::UpdateScheduledSeriesRanges() -{ - for (auto const& it : m_Listeners) - { - it.second->UpdateScheduledSeriesRanges(); - } -} - void ScChartListenerCollection::UpdateChartsContainingTab( SCTAB nTab ) { ScRange aRange( 0, 0, nTab, MAXCOL, MAXROW, nTab ); diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx index 174d6ec5e759..7724f2df3a2b 100644 --- a/sfx2/source/control/charwin.cxx +++ b/sfx2/source/control/charwin.cxx @@ -330,26 +330,10 @@ void SvxCharViewControl::createContextMenu() ScopedVclPtrInstance<PopupMenu> pItemMenu; pItemMenu->InsertItem(0,SfxResId(STR_CLEAR_CHAR)); pItemMenu->InsertItem(1,SfxResId(STR_CLEAR_ALL_CHAR)); - pItemMenu->SetSelectHdl(LINK(this, SvxCharViewControl, ContextMenuSelectHdl)); pItemMenu->Execute(this, tools::Rectangle(maPosition,Size(1,1)), PopupMenuFlags::ExecuteDown); Invalidate(); } -IMPL_LINK(SvxCharViewControl, ContextMenuSelectHdl, Menu*, pMenu, bool) -{ - sal_uInt16 nMenuId = pMenu->GetCurItemId(); - - switch(nMenuId) - { - case 0: - maClearClickHdl.Call(this); - break; - default: - break; - } - return false; -} - void SvxCharViewControl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle&) { rRenderContext.SetFont(maFont); diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index a8cb237c19a8..afa2101417a2 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -492,10 +492,9 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL, MatchContext_Impl::MatchContext_Impl(URLBox* pBoxP, const OUString& rText) : Thread( "MatchContext_Impl" ) , aLink( LINK( this, MatchContext_Impl, Select_Impl ) ) - , aBaseURL( pBoxP->aBaseURL ) , aText( rText ) , pBox( pBoxP ) - , bOnlyDirectories( pBoxP->bOnlyDirectories ) + , bOnlyDirectories( false ) , stopped_(false) , commandId_(0) { @@ -579,8 +578,6 @@ IMPL_LINK_NOARG( MatchContext_Impl, Select_Impl, void*, void ) } } - pBox->bAutoCompleteMode = true; - // insert all completed strings into the listbox pBox->Clear(); @@ -1155,7 +1152,7 @@ void MatchContext_Impl::doExecute() INetProtocol eBaseProt = INetURLObject::CompareProtocolScheme( aBaseURL ); if ( aBaseURL.isEmpty() ) eBaseProt = INetURLObject::CompareProtocolScheme( SvtPathOptions().GetWorkPath() ); - INetProtocol eSmartProt = pBox->GetSmartProtocol(); + INetProtocol eSmartProt = INetProtocol::NotValid; // if the user input is a valid URL, go on with it // otherwise it could be parsed smart with a predefined smart protocol @@ -2022,11 +2019,7 @@ IMPL_LINK_NOARG(URLBox, TryAutoComplete, Timer *, void) } URLBox::URLBox(weld::ComboBoxText* pWidget) - : eSmartProtocol(INetProtocol::NotValid) - , bAutoCompleteMode(false) - , bOnlyDirectories(false) - , bHistoryDisabled(false) - , m_xWidget(pWidget) + : m_xWidget(pWidget) { Init(); @@ -2059,8 +2052,6 @@ URLBox::~URLBox() void URLBox::UpdatePicklistForSmartProtocol_Impl() { m_xWidget->clear(); - if ( bHistoryDisabled ) - return; // read history pick list Sequence< Sequence< PropertyValue > > seqPicklist = SvtHistoryOptions().GetList( ePICKLIST ); @@ -2082,12 +2073,6 @@ void URLBox::UpdatePicklistForSmartProtocol_Impl() seqPropertySet[nProperty].Value >>= sURL; aCurObj.SetURL( sURL ); - if ( !sURL.isEmpty() && ( eSmartProtocol != INetProtocol::NotValid ) ) - { - if( aCurObj.GetProtocol() != eSmartProtocol ) - break; - } - OUString aURL( aCurObj.GetMainURL( INetURLObject::DecodeMechanism::WithCharset ) ); if ( !aURL.isEmpty() ) @@ -2146,8 +2131,6 @@ OUString URLBox::GetURL() ::osl::MutexGuard aGuard( theSvtMatchContextMutex::get() ); OUString aText(m_xWidget->get_active_text()); - if ( MatchesPlaceHolder( aText ) ) - return aPlaceHolder; // try to get the right case preserving URL from the list of URLs for(std::vector<OUString>::iterator i = pImpl->aCompletions.begin(), j = pImpl->aURLs.begin(); i != pImpl->aCompletions.end() && j != pImpl->aURLs.end(); ++i, ++j) @@ -2170,8 +2153,6 @@ OUString URLBox::GetURL() { // no autocompletion for wildcards INetURLObject aTempObj; - if ( eSmartProtocol != INetProtocol::NotValid ) - aTempObj.SetSmartProtocol( eSmartProtocol ); if ( aTempObj.SetSmartURL( aText ) ) return aTempObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ); else @@ -2180,7 +2161,7 @@ OUString URLBox::GetURL() if ( aObj.GetProtocol() == INetProtocol::NotValid ) { - OUString aName = ParseSmart( aText, aBaseURL ); + OUString aName = ParseSmart( aText, OUString() ); aObj.SetURL(aName); OUString aURL( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); if ( aURL.isEmpty() ) diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index 3902b208665d..966b7c407f96 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -174,8 +174,6 @@ class SwHTMLTableLayout std::vector<std::unique_ptr<SwHTMLTableLayoutCell>> m_aCells; const SwTable *m_pSwTable; ///< SwTable (Top-Table only). - SwTableBox *m_pLeftFillerBox; ///< Left filler-box (table in table only). - SwTableBox *m_pRightFillerBox; ///< Right filler-box (table in Table only). sal_uLong m_nMin; ///< Minimal width of table (Twips). sal_uLong m_nMax; ///< Maximal width of table (Twips). diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index fdc029cfb177..9b84c72100f2 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -159,8 +159,6 @@ SwHTMLTableLayout::SwHTMLTableLayout( const SwTable * pTable, : m_aColumns( nCls ) , m_aCells( static_cast<size_t>(nRws)*nCls ) , m_pSwTable( pTable ) - , m_pLeftFillerBox( nullptr ) - , m_pRightFillerBox( nullptr ) , m_nMin( 0 ) , m_nMax( 0 ) , m_nRows( nRws ) @@ -1109,15 +1107,6 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv } } - // Filler cells - if( !IsTopTable() ) - { - if( m_pLeftFillerBox && nAbsLeftFill<MINLAY+m_nInhLeftBorderWidth ) - nAbsLeftFill = MINLAY+m_nInhLeftBorderWidth; - if( m_pRightFillerBox && nAbsRightFill<MINLAY+m_nInhRightBorderWidth ) - nAbsRightFill = MINLAY+m_nInhRightBorderWidth; - } - // Read just the available space m_nRelLeftFill = 0; m_nRelRightFill = 0; @@ -1507,17 +1496,12 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv break; } - OSL_ENSURE( !m_pLeftFillerBox || m_nRelLeftFill>0, - "We don't have a width for the left filler box!" ); - OSL_ENSURE( !m_pRightFillerBox || m_nRelRightFill>0, - "We don't have a width for the right filler box!" ); - // Filler widths are added to the outer columns, if there are no boxes // for them after the first pass (nWidth>0) or their width would become // too small or if there are COL tags and the filler width corresponds // to the border width. // In the last case we probably exported the table ourselves. - if( m_nRelLeftFill && !m_pLeftFillerBox && + if( m_nRelLeftFill && ( m_nWidthSet>0 || nAbsLeftFill<MINLAY+m_nInhLeftBorderWidth || (HasColTags() && nAbsLeftFill < nAbsLeftSpace+nParentInhAbsLeftSpace+20) ) ) { @@ -1527,7 +1511,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv m_nRelLeftFill = 0; m_nInhAbsLeftSpace = nAbsLeftSpace + nParentInhAbsLeftSpace; } - if( m_nRelRightFill && !m_pRightFillerBox && + if( m_nRelRightFill && ( m_nWidthSet>0 || nAbsRightFill<MINLAY+m_nInhRightBorderWidth || (HasColTags() && nAbsRightFill < nAbsRightSpace+nParentInhAbsRightSpace+20) ) ) { @@ -1684,19 +1668,6 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail, #endif } - else - { - if( m_pLeftFillerBox ) - { - m_pLeftFillerBox->GetFrameFormat()->SetFormatAttr( - SwFormatFrameSize( ATT_VAR_SIZE, m_nRelLeftFill, 0 )); - } - if( m_pRightFillerBox ) - { - m_pRightFillerBox->GetFrameFormat()->SetFormatAttr( - SwFormatFrameSize( ATT_VAR_SIZE, m_nRelRightFill, 0 )); - } - } } void SwHTMLTableLayout::Resize_( sal_uInt16 nAbsAvail, bool bRecalc ) diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 1cb790dada78..9f8bd524e0e1 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -58,7 +58,6 @@ struct ComboBox::Impl sal_Int32 m_nMaxWidthChars; Link<ComboBox&,void> m_SelectHdl; Link<ComboBox&,void> m_DoubleClickHdl; - Link<ComboBox&,void> m_EntryActivateHdl; explicit Impl(ComboBox & rThis) : m_rThis(rThis) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits