[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/unx
compilerplugins/clang/unusedfields.only-used-in-constructor.results |6 ++ compilerplugins/clang/unusedfields.writeonly.results|6 ++ vcl/inc/unx/glyphcache.hxx |1 - vcl/unx/generic/glyphs/freetype_glyphcache.cxx |9 - 4 files changed, 4 insertions(+), 18 deletions(-) New commits: commit dabedcaf27b0af1e38a611b8d8e48444f848e01d Author: Noel Grandin AuthorDate: Sun Jul 23 16:27:45 2023 +0200 Commit: Noel Grandin CommitDate: Tue Jul 25 07:56:37 2023 +0200 loplugin:unusedfields Change-Id: If9c76b9c500a5bee0fbf20a44597a250b7fa2af0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154808 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unusedfields.only-used-in-constructor.results b/compilerplugins/clang/unusedfields.only-used-in-constructor.results index 01db79dd80aa..a81c93483c6c 100644 --- a/compilerplugins/clang/unusedfields.only-used-in-constructor.results +++ b/compilerplugins/clang/unusedfields.only-used-in-constructor.results @@ -910,6 +910,8 @@ vcl/inc/sft.hxx:177 vcl::TTGlobalFontInfo_ fsSelection sal_uInt16 vcl/inc/svimpbox.hxx:118 SvImpLBox m_aFctSet ImpLBSelEng +vcl/inc/unx/glyphcache.hxx:146 +FreetypeFont mnLoadFlags FT_Int vcl/inc/unx/i18n_ic.hxx:40 SalI18N_InputContext maPreeditStartCallback XIMCallback vcl/inc/unx/i18n_ic.hxx:41 @@ -938,8 +940,6 @@ vcl/source/gdi/jobset.cxx:39 (anonymous namespace)::ImplOldJobSetupData cDeviceName char[32] vcl/source/gdi/jobset.cxx:40 (anonymous namespace)::ImplOldJobSetupData cPortName char[32] -vcl/source/gdi/pdfextoutdevdata.cxx:107 -vcl::GlobalSyncData mStructIdMap std::vector vcl/source/pdf/PDFiumLibrary.cxx:430 vcl::pdf::(anonymous namespace)::PDFiumDocumentImpl m_aFormCallbacks FPDF_FORMFILLINFO vcl/unx/gtk3/a11y/atkhypertext.cxx:31 @@ -972,5 +972,3 @@ xmloff/inc/XMLThemeContext.hxx:46 XMLThemeColorsContext m_aColorScheme std::vector xmloff/source/text/XMLTextListBlockContext.hxx:40 XMLTextListBlockContext mbSetDefaults _Bool -xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx:87 -(anonymous namespace)::SaveODFItem m_nODF sal_Int16 diff --git a/compilerplugins/clang/unusedfields.writeonly.results b/compilerplugins/clang/unusedfields.writeonly.results index 098cd9e859a5..09664da6ea79 100644 --- a/compilerplugins/clang/unusedfields.writeonly.results +++ b/compilerplugins/clang/unusedfields.writeonly.results @@ -1248,6 +1248,8 @@ vcl/inc/svdata.hxx:464 ImplSVEvent mpInstanceRef VclPtr vcl/inc/toolbarvalue.hxx:47 ToolbarValue mbIsTopDockingArea _Bool +vcl/inc/unx/glyphcache.hxx:146 +FreetypeFont mnLoadFlags FT_Int vcl/inc/unx/gtk/gtkdata.hxx:226 DocumentFocusListener m_aRefList o3tl::sorted_vector > vcl/inc/unx/gtk/gtkframe.hxx:81 @@ -1260,8 +1262,6 @@ vcl/source/components/dtranscomp.cxx:210 vcl::(anonymous namespace)::GenericDragSource m_xTrans css::uno::Reference vcl/source/fontsubset/sft.cxx:109 vcl::(anonymous namespace)::TTGlyphMetrics lsb sal_Int16 -vcl/source/gdi/pdfextoutdevdata.cxx:107 -vcl::GlobalSyncData mStructIdMap std::vector vcl/unx/generic/app/wmadaptor.cxx:1268 _mwmhints deco unsigned long vcl/unx/generic/app/wmadaptor.cxx:1268 @@ -1332,8 +1332,6 @@ xmlsecurity/inc/certificateviewer.hxx:51 CertificateViewer mxGeneralPage std::unique_ptr xmlsecurity/inc/certificateviewer.hxx:52 CertificateViewer mxDetailsPage std::unique_ptr -xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx:87 -(anonymous namespace)::SaveODFItem m_nODF sal_Int16 xmlsecurity/source/helper/pdfsignaturehelper.cxx:237 (anonymous namespace)::PageChecksum m_nPageContent BitmapChecksum xmlsecurity/source/helper/pdfsignaturehelper.cxx:238 diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index f5ce328b0aa1..6d778d15d6c7 100644 --- a/vcl/inc/unx/glyphcache.hxx +++ b/vcl/inc/unx/glyphcache.hxx @@ -143,7 +143,6 @@ private: int mnWidth; int mnPrioAntiAlias; std::shared_ptr mxFontInfo; -FT_Int mnLoadFlags; double mfStretch; FT_FaceRec_*maFaceFT; FT_SizeRec_*maSizeFT; diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 2543b76b5719..5745f94a223e 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -394,13 +394,10 @@ FreetypeFont::FreetypeFont(FreetypeFontInstance& rFontInstance, std::shared_ptr< mnSin( 0 ), mnPrioAntiAlias(nDefaultPrioAntiAlias), mxFontInfo(std::move(xFI)), -mnLoadFlags( 0 ), maFaceFT( nullptr ), maSizeFT( nullptr ), mbFaceOk( false ) { -int nPrioEmbedded = nDefaultPrioEmbedded; - maFaceFT = mxFontInfo->GetFaceFT(); const
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/jsdialog
compilerplugins/clang/badstatics.cxx |1 vcl/inc/jsdialog/jsdialogbuilder.hxx |9 + vcl/jsdialog/jsdialogbuilder.cxx | 56 +-- 3 files changed, 64 insertions(+), 2 deletions(-) New commits: commit 09847cdbd435c1f6ac8c0ac0256f8be488edd194 Author: Szymon Kłos AuthorDate: Wed May 18 23:28:30 2022 +0200 Commit: Szymon Kłos CommitDate: Tue May 31 22:09:42 2022 +0200 jsdialog: introduce popup management Popup windows are managed by vcl (some moving between parents happens on show/hide popup). We need to access correct popup window to correctly close popup in LOK. So remember popup instances. Change-Id: I9e1ba18ded5a1bf675f95bd7178043eebd9bbd5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134576 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134675 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135197 Tested-by: Jenkins Reviewed-by: Szymon Kłos diff --git a/compilerplugins/clang/badstatics.cxx b/compilerplugins/clang/badstatics.cxx index 9539559f699e..3b80278a2f4f 100644 --- a/compilerplugins/clang/badstatics.cxx +++ b/compilerplugins/clang/badstatics.cxx @@ -208,6 +208,7 @@ public: .Class("ScDocument").GlobalNamespace()) // not owning || name == "s_aLOKWindowsMap" // LOK only, guarded by assert, and LOK never tries to perform a VCL cleanup || name == "s_aLOKWeldBuildersMap" // LOK only, similar case as above +|| name == "s_aLOKPopupsMap" // LOK only, similar case as above || name == "m_pNotebookBarWeldedWrapper" // LOK only, warning about map's key, no VCL cleanup performed || name == "gStaticManager" // vcl/source/graphic/Manager.cxx - stores non-owning pointers || name == "aThreadedInterpreterPool"// ScInterpreterContext(Pool), not owning diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 0b0289240bf6..a25aeac55c10 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -304,6 +304,11 @@ public: weld::Widget* pWidget); static void RemoveWindowWidget(const std::string& nWindowId); +// we need to remember original popup window to close it properly (its handled by vcl) +static void RememberPopup(const std::string& nWindowId, VclPtr pWidget); +static void ForgetPopup(const std::string& nWindowId); +static vcl::Window* FindPopup(const std::string& nWindowId); + private: const std::string& GetTypeOfJSON() const; VclPtr& GetContentWindow(); @@ -700,6 +705,8 @@ public: class JSPopover : public JSWidget { +vcl::LOKWindowId mnWindowId; + public: JSPopover(JSDialogSender* pSender, DockingWindow* pPopover, SalInstanceBuilder* pBuilder, bool bTakeOwnership); @@ -707,6 +714,8 @@ public: virtual void popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect, weld::Placement ePlace = weld::Placement::Under) override; virtual void popdown() override; + +void set_window_id(vcl::LOKWindowId nWindowId) { mnWindowId = nWindowId; } }; class JSBox : public JSWidget diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index b1ca111a07f7..3648d33b3ebc 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -27,6 +27,14 @@ #include #include +static std::map& GetLOKPopupsMap() +{ +// Map to remember the LOKWindowId <-> vcl popup binding. +static std::map s_aLOKPopupsMap; + +return s_aLOKPopupsMap; +} + namespace { void response_help(vcl::Window* pWindow) @@ -670,6 +678,8 @@ JSInstanceBuilder::~JSInstanceBuilder() [it](std::string& sId) { it->second.erase(sId.c_str()); }); } } + +GetLOKPopupsMap().erase(std::to_string(m_nWindowId)); } std::map& JSInstanceBuilder::GetLOKWeldWidgetsMap() @@ -762,6 +772,28 @@ void JSInstanceBuilder::RemoveWindowWidget(const std::string& nWindowId) } } +void JSInstanceBuilder::RememberPopup(const std::string& nWindowId, VclPtr pWidget) +{ +GetLOKPopupsMap()[nWindowId] = pWidget; +} + +void JSInstanceBuilder::ForgetPopup(const std::string& nWindowId) +{ +auto it = GetLOKPopupsMap().find(nWindowId); +if (it != GetLOKPopupsMap().end()) +GetLOKPopupsMap().erase(it); +} + +vcl::Window* JSInstanceBuilder::FindPopup(const std::string& nWindowId) +{ +const auto it = GetLOKPopupsMap().find(nWindowId); + +if (it != GetLOKPopupsMap().end()) +return it->second; + +return nullptr; +} + const std::string& JSInstanceBuilder::GetTypeOfJSON() const { return m_sTypeOfJSON; } VclPtr& JSInstanceBuilder::GetContentWindow() @@ -1048,8 +1080,9 @@ std::unique_ptr
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/Library_vcl.mk vcl/source
compilerplugins/clang/mergeclasses.results |1 - vcl/Library_vcl.mk |1 - vcl/inc/opengl/DeviceInfo.hxx | 23 --- vcl/inc/opengl/win/WinDeviceInfo.hxx |7 ++- vcl/inc/opengl/x11/X11DeviceInfo.hxx |6 ++ vcl/source/opengl/DeviceInfo.cxx | 14 -- vcl/source/opengl/win/WinDeviceInfo.cxx|4 7 files changed, 4 insertions(+), 52 deletions(-) New commits: commit fe40f6457800d4ce3d50a84b53f33b775087871f Author: Stephan Bergmann AuthorDate: Tue Mar 22 10:25:04 2022 +0100 Commit: Stephan Bergmann CommitDate: Tue Mar 22 11:41:54 2022 +0100 Win/X11OpenGLDeviceInfo don't need a common base class Change-Id: I9fc7e763b8cf055c3aabaaa97fe8c85ebc5e71b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131926 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results index e5076145b74d..096b0722fea7 100644 --- a/compilerplugins/clang/mergeclasses.results +++ b/compilerplugins/clang/mergeclasses.results @@ -96,7 +96,6 @@ merge LwpDLVListHead with LwpPropList merge LwpMarker with LwpStoryMarker merge ObservableThread with SwAsyncRetrieveInputStreamThread merge OldBasicPassword with basic::SfxScriptLibraryContainer -merge OpenGLDeviceInfo with X11OpenGLDeviceInfo merge PPTExBulletProvider with PPTWriter merge PriorityHBox with PriorityMergedHBox merge PropertyAccessorBase with GenericPropertyAccessor diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 31cf81c8bd0d..a0f61992b74b 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -604,7 +604,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ else # !DISABLE_GUI $(eval $(call gb_Library_add_exception_objects,vcl,\ -vcl/source/opengl/DeviceInfo \ vcl/source/opengl/OpenGLContext \ vcl/source/opengl/OpenGLHelper \ $(if $(filter SKIA,$(BUILD_TYPE)), \ diff --git a/vcl/inc/opengl/DeviceInfo.hxx b/vcl/inc/opengl/DeviceInfo.hxx deleted file mode 100644 index b0ad3a6cfec6.. --- a/vcl/inc/opengl/DeviceInfo.hxx +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_VCL_INC_OPENGL_DEVICEINFO_HXX -#define INCLUDED_VCL_INC_OPENGL_DEVICEINFO_HXX - -class OpenGLDeviceInfo -{ -public: -virtual ~OpenGLDeviceInfo() = 0; - -virtual bool isDeviceBlocked() = 0; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/opengl/win/WinDeviceInfo.hxx b/vcl/inc/opengl/win/WinDeviceInfo.hxx index 04d97406b54a..e79905c24c37 100644 --- a/vcl/inc/opengl/win/WinDeviceInfo.hxx +++ b/vcl/inc/opengl/win/WinDeviceInfo.hxx @@ -12,14 +12,13 @@ #include -#include #include #include #include #include -class VCL_DLLPUBLIC WinOpenGLDeviceInfo : public OpenGLDeviceInfo +class VCL_DLLPUBLIC WinOpenGLDeviceInfo { private: OUString maDriverVersion; @@ -54,9 +53,7 @@ private: public: WinOpenGLDeviceInfo(); -virtual ~WinOpenGLDeviceInfo() override; - -virtual bool isDeviceBlocked() override; +bool isDeviceBlocked(); const OUString& GetDriverVersion() const { diff --git a/vcl/inc/opengl/x11/X11DeviceInfo.hxx b/vcl/inc/opengl/x11/X11DeviceInfo.hxx index d51de3a69a2e..e55f24d23ec8 100644 --- a/vcl/inc/opengl/x11/X11DeviceInfo.hxx +++ b/vcl/inc/opengl/x11/X11DeviceInfo.hxx @@ -10,11 +10,9 @@ #ifndef INCLUDED_VCL_INC_OPENGL_X11_X11DEVICEINFO_HXX #define INCLUDED_VCL_INC_OPENGL_X11_X11DEVICEINFO_HXX -#include - #include -class X11OpenGLDeviceInfo final : public OpenGLDeviceInfo +class X11OpenGLDeviceInfo final { private: bool mbIsMesa; @@ -41,7 +39,7 @@ private: public: X11OpenGLDeviceInfo(); -virtual bool isDeviceBlocked() override; +bool isDeviceBlocked(); const OString& GetVendor() const { diff --git a/vcl/source/opengl/DeviceInfo.cxx b/vcl/source/opengl/DeviceInfo.cxx deleted file mode 100644 index f4bce64a88d8.. --- a/vcl/source/opengl/DeviceInfo.cxx +++ /dev/null @@ -1,14 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include - -OpenGLDeviceInfo::~OpenGLDeviceInfo() {} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/opengl/win/WinDeviceInfo.cxx
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/source
compilerplugins/clang/unusedfields.only-used-in-constructor.results | 86 +-- compilerplugins/clang/unusedfields.readonly.results | 246 +- compilerplugins/clang/unusedfields.untouched.results| 46 - compilerplugins/clang/unusedfields.writeonly.results| 88 +-- vcl/inc/pdf/pdfwriter_impl.hxx |1 vcl/source/gdi/pdfwriter_impl.cxx | 90 --- 6 files changed, 134 insertions(+), 423 deletions(-) New commits: commit c09aec4cb6e9bcbbe58999541fb2bdf7f54c3b44 Author: Noel Grandin AuthorDate: Wed Sep 15 11:55:27 2021 +0200 Commit: Noel Grandin CommitDate: Wed Sep 15 13:37:15 2021 +0200 loplugin:unusedfields m_pSoftMaskStream is dead since commit 581e7d7057afa87036d84e42c0e0a8a7368e20c7 Author: Joseph Powers Date: Thu Sep 1 20:51:15 2011 -0700 unusedcode.easy: PDFWriter cleanup Change-Id: If397981fb09a7b74ba2294513c13186cc51ad5fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122139 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unusedfields.only-used-in-constructor.results b/compilerplugins/clang/unusedfields.only-used-in-constructor.results index 62a919d09124..179546d3c256 100644 --- a/compilerplugins/clang/unusedfields.only-used-in-constructor.results +++ b/compilerplugins/clang/unusedfields.only-used-in-constructor.results @@ -10,7 +10,7 @@ basic/qa/cppunit/test_global_as_new.cxx:28 (anonymous namespace)::GlobalAsNewTest lib class BasicDLL binaryurp/source/unmarshal.hxx:86 binaryurp::Unmarshal buffer_ com::sun::star::uno::Sequence -binaryurp/source/writer.hxx:147 +binaryurp/source/writer.hxx:136 binaryurp::Writer state_ struct binaryurp::WriterState canvas/source/tools/surfaceproxy.hxx:104 canvas::SurfaceProxy mpPageManager canvas::PageManagerSharedPtr @@ -42,6 +42,10 @@ connectivity/source/drivers/evoab2/EApi.h:125 (anonymous) ext char * connectivity/source/drivers/evoab2/NStatement.hxx:54 connectivity::evoab::FieldSort bAscending _Bool +connectivity/source/drivers/firebird/Driver.hxx:46 +connectivity::firebird::FirebirdDriver m_firebirdTMPDirectory ::utl::TempFile +connectivity/source/drivers/firebird/Driver.hxx:47 +connectivity::firebird::FirebirdDriver m_firebirdLockDirectory ::utl::TempFile connectivity/source/inc/component/CResultSet.hxx:41 connectivity::component::OComponentResultSet m_bBookmarkable _Bool connectivity/source/inc/dbase/DResultSet.hxx:40 @@ -68,9 +72,9 @@ connectivity/source/inc/flat/EResultSet.hxx:39 connectivity::flat::OFlatResultSet m_bBookmarkable _Bool connectivity/source/inc/java/lang/Object.hxx:37 connectivity::SDBThreadAttach m_aGuard jvmaccess::class VirtualMachine::AttachGuard -cppcanvas/source/mtfrenderer/textaction.cxx:808 +cppcanvas/source/mtfrenderer/textaction.cxx:805 cppcanvas::internal::(anonymous namespace)::EffectTextAction maTextLineInfo const tools::TextLineInfo -cppcanvas/source/mtfrenderer/textaction.cxx:1643 +cppcanvas/source/mtfrenderer/textaction.cxx:1626 cppcanvas::internal::(anonymous namespace)::OutlineAction maTextLineInfo const tools::TextLineInfo cppu/source/threadpool/threadpool.cxx:352 _uno_ThreadPool dummy sal_Int32 @@ -138,8 +142,6 @@ cui/source/inc/tabstpge.hxx:86 SvxTabulatorTabPage m_aCenterWin class TabWin_Impl cui/source/inc/tabstpge.hxx:87 SvxTabulatorTabPage m_aDezWin class TabWin_Impl -cui/source/inc/tipofthedaydlg.hxx:39 -TipOfTheDayDialog m_nDay sal_Int32 cui/source/options/optcolor.cxx:237 (anonymous namespace)::ColorConfigWindow_Impl::Entry m_aDefaultColor class Color dbaccess/source/core/api/RowSet.hxx:107 @@ -164,18 +166,12 @@ dbaccess/source/core/dataaccess/connection.hxx:101 dbaccess::OConnection m_nInAppend std::atomic dbaccess/source/core/inc/databasecontext.hxx:84 dbaccess::ODatabaseContext m_aBasicDLL class BasicDLL -desktop/qa/desktop_lib/test_desktop_lib.cxx:2902 - class AllSettings & drawinglayer/inc/texture/texture3d.hxx:54 drawinglayer::texture::GeoTexSvxBitmapEx maBitmapEx class BitmapEx drawinglayer/inc/texture/texture3d.hxx:55 drawinglayer::texture::GeoTexSvxBitmapEx maBitmap class Bitmap drawinglayer/inc/texture/texture3d.hxx:57 drawinglayer::texture::GeoTexSvxBitmapEx maTransparence class Bitmap -drawinglayer/source/geometry/viewinformation2d.cxx:81 -drawinglayer::geometry::ImpViewInformation2D mxViewInformation uno::Sequence -drawinglayer/source/geometry/viewinformation2d.cxx:85 -drawinglayer::geometry::ImpViewInformation2D mxExtendedInformation uno::Sequence drawinglayer/source/tools/emfphelperdata.hxx:197 emfplushelper::EmfPlusHelperData mnFrameRight sal_Int32 drawinglayer/source/tools/emfphelperdata.hxx:198 @@ -222,17 +218,17 @@ include/basic/basmgr.hxx:56 BasicError nReason enum BasicErrorReason
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/Library_vclplug_gtk4.mk vcl/unx
compilerplugins/clang/reservedid.cxx |4 vcl/Library_vclplug_gtk4.mk |7 - vcl/inc/unx/gtk/gtkframe.hxx | 14 ++- vcl/inc/unx/gtk/gtkinst.hxx |6 - vcl/unx/gtk3/gtkframe.cxx | 127 ++--- vcl/unx/gtk3/gtkinst.cxx | 147 ++ vcl/unx/gtk4/contentprovider.hxx | 20 vcl/unx/gtk4/gtkframe.cxx |2 vcl/unx/gtk4/gtkinst.cxx |2 vcl/unx/gtk4/transferableprovider.cxx | 118 +++ vcl/unx/gtk4/transferableprovider.hxx | 51 +++ 11 files changed, 299 insertions(+), 199 deletions(-) New commits: commit 0ec9a51609b78c9aa85b01a4902711923324b025 Author: Caolán McNamara AuthorDate: Thu Jun 24 15:53:37 2021 +0100 Commit: Caolán McNamara CommitDate: Fri Jun 25 16:56:49 2021 +0200 gtk4 dnd into external apps It's always hard to bootstrap dnd because so much of it has to work before any of it works. Typically dnd and cnp are strongly related so getting cnp working first is the way to go before trying dnd. Change-Id: I645f56dc5f8cb0e3a31e0ff8bbaab610366b6312 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117798 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/compilerplugins/clang/reservedid.cxx b/compilerplugins/clang/reservedid.cxx index 9927e9c50307..eac62a5b9671 100644 --- a/compilerplugins/clang/reservedid.cxx +++ b/compilerplugins/clang/reservedid.cxx @@ -197,8 +197,6 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) { // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h && s != "_ADOUser" // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h -&& s != "_ClipboardContent" // vcl/unx/gtk3/gtkinst.cxx -&& s != "_ClipboardContentClass" // vcl/unx/gtk3/gtkinst.cxx && s != "_FcPattern" // vcl/inc/unx/fc_fontoptions.hxx && s != "_GdkDisplay" // vcl/unx/gtk/xid_fullscreen_on_all_monitors.c @@ -212,6 +210,8 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) { && s != "_NotifyingLayout" // vcl/unx/gtk4/notifyinglayout.cxx && s != "_SurfacePaintable" // vcl/unx/gtk3/gtkinst.cxx && s != "_SurfacePaintableClass" // vcl/unx/gtk3/gtkinst.cxx +&& s != "_TransferableContent" // vcl/unx/gtk4/transferableprovider.cxx +&& s != "_TransferableContentClass" // vcl/unx/gtk4/transferableprovider.cxx && s != "_XRegion" // vcl/unx/generic/gdi/x11cairotextrender.cxx && s != "_XTrap") // vcl/unx/generic/gdi/xrender_peer.hxx { diff --git a/vcl/Library_vclplug_gtk4.mk b/vcl/Library_vclplug_gtk4.mk index 98349413a1d3..8b2d55d9d944 100644 --- a/vcl/Library_vclplug_gtk4.mk +++ b/vcl/Library_vclplug_gtk4.mk @@ -92,12 +92,13 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gtk4,\ vcl/unx/gtk4/salnativewidgets-gtk \ vcl/unx/gtk4/gtkframe \ vcl/unx/gtk4/gtkobject \ - vcl/unx/gtk4/gtksalmenu \ - vcl/unx/gtk4/glomenu \ - vcl/unx/gtk4/gloactiongroup \ +vcl/unx/gtk4/gtksalmenu \ +vcl/unx/gtk4/glomenu \ +vcl/unx/gtk4/gloactiongroup \ vcl/unx/gtk4/hudawareness \ vcl/unx/gtk4/notifyinglayout \ vcl/unx/gtk4/surfacepaintable \ +vcl/unx/gtk4/transferableprovider \ )) ifeq ($(OS),LINUX) diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 57005e89a64e..7dcb722968bc 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -61,6 +61,8 @@ class GtkDnDTransferable; class GtkSalMenu; +struct VclToGtkHelper; + class GtkSalFrame final : public SalFrame { struct IMHandler @@ -264,6 +266,10 @@ class GtkSalFrame final : public SalFrame static GdkDragAction signalDragMotion(GtkDropTargetAsync *dest, GdkDrop *drop, double x, double y, gpointer frame); static void signalDragLeave(GtkDropTargetAsync *dest, GdkDrop *drop, gpointer frame); static gboolean signalDragDrop(GtkDropTargetAsync* context, GdkDrop* drop, double x, double y, gpointer frame); + +static void signalDragFailed(GdkDrag* drag, GdkDragCancelReason reason, gpointer frame); +static void signalDragDelete(GdkDrag* drag, gpointer frame); +static void signalDragEnd(GdkDrag* drag, gpointer frame); #else static gboolean signalDragMotion(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, gpointer frame); @@ -460,10 +466,10 @@ public: m_pDragSource = nullptr; } -#if !GTK_CHECK_VERSION(4, 0, 0) -void startDrag(gint nButton, gint nDragOriginX, gint nDragOriginY, - GdkDragAction sourceActions, GtkTargetList* pTargetList); -#endif +void startDrag(const
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/unx
compilerplugins/clang/reservedid.cxx |2 vcl/inc/unx/gtk/gtkinst.hxx | 15 + vcl/unx/gtk3/gtkinst.cxx | 264 +++ 3 files changed, 255 insertions(+), 26 deletions(-) New commits: commit bf571610d3498b98bae30042fb23a4c0f4a4 Author: Caolán McNamara AuthorDate: Mon May 31 12:26:18 2021 +0100 Commit: Caolán McNamara CommitDate: Mon May 31 15:06:40 2021 +0200 gtk4: enable cut and paste into other applications Change-Id: I9924a9af10532254dc368e274e4a20c6706e4239 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116445 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/compilerplugins/clang/reservedid.cxx b/compilerplugins/clang/reservedid.cxx index 169942f9c392..0792c96b2da6 100644 --- a/compilerplugins/clang/reservedid.cxx +++ b/compilerplugins/clang/reservedid.cxx @@ -197,6 +197,8 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) { // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h && s != "_ADOUser" // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h +&& s != "_ClipboardContent" // vcl/unx/gtk3/gtkinst.cxx +&& s != "_ClipboardContentClass" // vcl/unx/gtk3/gtkinst.cxx && s != "_FcPattern" // vcl/inc/unx/fc_fontoptions.hxx && s != "_GdkDisplay" // vcl/unx/gtk/xid_fullscreen_on_all_monitors.c diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx index f389c6433b9c..3aaa03d1ddb6 100644 --- a/vcl/inc/unx/gtk/gtkinst.hxx +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -65,12 +65,23 @@ struct VclToGtkHelper #else std::vector FormatsToGtk(const css::uno::Sequence ); #endif -#if !GTK_CHECK_VERSION(4, 0, 0) +#if GTK_CHECK_VERSION(4, 0, 0) +void setSelectionData(const css::uno::Reference , + GdkContentProvider* provider, + const char* mime_type, + GOutputStream* stream, + int io_priority, + GCancellable* cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +#else void setSelectionData(const css::uno::Reference , GtkSelectionData *selection_data, guint info); #endif private: -#if !GTK_CHECK_VERSION(4, 0, 0) +#if GTK_CHECK_VERSION(4, 0, 0) +OString makeGtkTargetEntry(const css::datatransfer::DataFlavor& rFlavor); +#else GtkTargetEntry makeGtkTargetEntry(const css::datatransfer::DataFlavor& rFlavor); #endif }; diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index a60f33790505..43e419aa2305 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -889,7 +889,16 @@ public: virtual void SAL_CALL removeClipboardListener( const Reference< css::datatransfer::clipboard::XClipboardListener >& listener ) override; -#if !GTK_CHECK_VERSION(4, 0, 0) +#if GTK_CHECK_VERSION(4, 0, 0) +GdkContentFormats* ref_formats(); +void write_mime_type_async(GdkContentProvider* provider, + const char* mime_type, + GOutputStream* stream, + int io_priority, + GCancellable* cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +#else void ClipboardGet(GtkSelectionData *selection_data, guint info); #endif void OwnerPossiblyChanged(GdkClipboard *clipboard); @@ -927,7 +936,25 @@ Reference< css::datatransfer::XTransferable > VclGtkClipboard::getContents() return m_aContents; } -#if !GTK_CHECK_VERSION(4, 0, 0) +#if GTK_CHECK_VERSION(4, 0, 0) +void VclGtkClipboard::write_mime_type_async(GdkContentProvider* provider, +const char* mime_type, +GOutputStream* stream, +int io_priority, +GCancellable* cancellable, +GAsyncReadyCallback callback, +gpointer user_data) +{ +if (!m_aContents.is()) +return; +// tdf#129809 take a reference in case m_aContents is replaced during this +// call +Reference xCurrentContents(m_aContents); +m_aConversionHelper.setSelectionData(xCurrentContents, provider, mime_type, + stream, io_priority, cancellable, + callback, user_data); +} +#else void VclGtkClipboard::ClipboardGet(GtkSelectionData *selection_data, guint info) { if (!m_aContents.is()) @@ -991,6 +1018,9 @@ void VclGtkClipboard::OwnerPossiblyChanged(GdkClipboard* clipboard) if (!m_aContents.is()) return; +#if
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/source
compilerplugins/clang/singlevalfields.could-be-bool.results | 30 compilerplugins/clang/singlevalfields.results | 450 ++-- vcl/inc/canvasbitmap.hxx|1 vcl/source/filter/eps/eps.cxx |4 vcl/source/helper/canvasbitmap.cxx | 32 5 files changed, 244 insertions(+), 273 deletions(-) New commits: commit 65c001867fa02ae69b280d5ebd513275f32c089e Author: Noel Grandin AuthorDate: Mon Apr 12 20:52:00 2021 +0200 Commit: Noel Grandin CommitDate: Tue Apr 13 12:36:56 2021 +0200 loplugin:singlevalfields Change-Id: I429e2e947f426ad16e22d3b99d48714aba96417d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114033 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/singlevalfields.could-be-bool.results b/compilerplugins/clang/singlevalfields.could-be-bool.results index 655250eeed6d..9e2d1e01bc7a 100644 --- a/compilerplugins/clang/singlevalfields.could-be-bool.results +++ b/compilerplugins/clang/singlevalfields.could-be-bool.results @@ -1,7 +1,7 @@ -connectivity/source/inc/dbase/dindexnode.hxx:120 +connectivity/source/inc/dbase/dindexnode.hxx:119 connectivity::dbase::ONDXPage bNoDelete unsigned int -cui/source/inc/cfg.hxx:233 +cui/source/inc/cfg.hxx:234 SvxConfigEntry nId sal_uInt16 desktop/source/app/main.c:29 @@ -13,9 +13,6 @@ editeng/source/misc/hangulhanja.cxx:78 editeng/source/misc/svxacorr.cxx:233 GetIgnoreTranslWrapper bIsInit int -filter/source/graphicfilter/eps/eps.cxx:140 -(anonymous namespace)::PSWriter nNextChrSetId -sal_uInt8 include/opencl/openclwrapper.hxx:46 openclwrapper::GPUEnv mnIsUserCreated int @@ -37,7 +34,7 @@ include/vcl/headbar.hxx:209 include/vcl/toolkit/dialog.hxx:54 Dialog mnMousePositioned tools::Long -jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:191 +jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:199 (anonymous) g_bInGetJavaVM sig_atomic_t libreofficekit/source/gtk/tilebuffer.hxx:232 @@ -46,22 +43,22 @@ libreofficekit/source/gtk/tilebuffer.hxx:232 sal/rtl/cipher.cxx:113 (anonymous namespace)::Cipher_Impl m_algorithm rtlCipherAlgorithm -sc/source/filter/inc/stylesbuffer.hxx:289 +sc/source/filter/inc/stylesbuffer.hxx:288 oox::xls::ApiAlignmentData mnHorJustifyMethod sal_Int32 -sc/source/filter/inc/stylesbuffer.hxx:291 +sc/source/filter/inc/stylesbuffer.hxx:290 oox::xls::ApiAlignmentData mnVerJustifyMethod sal_Int32 -sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1083 +sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1084 (anonymous namespace)::ScPagePreviewCountData nHeaders tools::Long -sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1084 +sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1085 (anonymous namespace)::ScPagePreviewCountData nTables tools::Long -sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1086 +sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx:1087 (anonymous namespace)::ScPagePreviewCountData nFooters tools::Long -sc/source/ui/vba/vbahyperlink.hxx:84 +sc/source/ui/vba/vbahyperlink.hxx:83 ScVbaHyperlink mnType tools::Long sd/qa/unit/tiledrendering/tiledrendering.cxx:854 @@ -79,7 +76,7 @@ soltools/cpp/cpp.h:121 svx/source/inc/cell.hxx:202 sdr::table::Cell mnCellContentType css::table::CellContentType -svx/source/table/tablertfimporter.cxx:56 +svx/source/table/tablertfimporter.cxx:57 sdr::table::(anonymous namespace)::RTFCellDefault mnRowSpan sal_Int32 sw/source/filter/ww8/docxexport.hxx:98 @@ -94,9 +91,12 @@ sw/source/uibase/inc/tautofmt.hxx:48 vcl/inc/unx/i18n_ic.hxx:32 SalI18N_InputContext mbUseable int -vcl/inc/unx/salframe.h:126 +vcl/inc/unx/salframe.h:125 X11SalFrame mbInputFocus int +vcl/source/filter/eps/eps.cxx:141 +(anonymous namespace)::PSWriter nNextChrSetId +sal_uInt8 vcl/unx/generic/app/saldata.cxx:449 EmitFontpathWarning bOnce int @@ -112,6 +112,6 @@ vcl/workben/icontest.cxx:145 workdir/LexTarget/l10ntools/source/cfglex.cxx:2293 /home/noel/libo2/workdir/LexTarget/l10ntools/source/cfglex.cxx bText int -writerfilter/source/dmapper/PageBordersHandler.hxx:48 +writerfilter/source/dmapper/PageBordersHandler.hxx:47 writerfilter::dmapper::PageBordersHandler m_eOffsetFrom class SectionPropertyMap::BorderOffsetFrom diff --git a/compilerplugins/clang/singlevalfields.results b/compilerplugins/clang/singlevalfields.results index cd8595bef3b8..b2f91d4d97a1 100644 --- a/compilerplugins/clang/singlevalfields.results +++ b/compilerplugins/clang/singlevalfields.results @@ -55,7 +55,7 @@ canvas/inc/rendering/irendermodule.hxx:37 chart2/source/controller/dialogs/DataBrowser.cxx:201 chart::impl::SeriesHeader m_aUpdateDataTimer UpdateDataTimer
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc
compilerplugins/clang/unnecessaryvirtual.results | 24 --- vcl/inc/salbmp.hxx |2 - 2 files changed, 10 insertions(+), 16 deletions(-) New commits: commit 07f7afec7832b0d45bef8d883eb3587d06c4673a Author: Noel AuthorDate: Sun Dec 13 20:36:02 2020 +0200 Commit: Noel Grandin CommitDate: Mon Dec 14 08:37:34 2020 +0100 loplugin:unnecessaryvirtual Change-Id: Ie083afe2763b21e0abada228e4007b9b387c2d39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107660 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unnecessaryvirtual.results b/compilerplugins/clang/unnecessaryvirtual.results index 3f2163bdff4c..1d3821d7c2af 100644 --- a/compilerplugins/clang/unnecessaryvirtual.results +++ b/compilerplugins/clang/unnecessaryvirtual.results @@ -216,14 +216,6 @@ chart2/source/inc/ModifyListenerCallBack.hxx:41 void chart::ModifyListenerCallBack::~ModifyListenerCallBack() chart2/source/inc/WeakListenerAdapter.hxx:56 void chart::WeakListenerAdapter::disposing(const struct com::sun::star::lang::EventObject &,) -cui/source/inc/splitcelldlg.hxx:40 -_Bool SvxSplitTableDlg::IsHorizontal()const -cui/source/inc/splitcelldlg.hxx:41 -_Bool SvxSplitTableDlg::IsProportional()const -cui/source/inc/splitcelldlg.hxx:42 -long SvxSplitTableDlg::GetCount()const -cui/source/inc/splitcelldlg.hxx:44 -void SvxSplitTableDlg::SetSplitVerticalByDefault() extensions/source/dbpilots/unoautopilot.hxx:81 class cppu::IPropertyArrayHelper * dbp::OUnoAutoPilot::createArrayHelper()const extensions/source/propctrlr/commoncontrol.hxx:130 @@ -304,9 +296,9 @@ include/vbahelper/vbareturntypes.hxx:39 type-parameter-0-0 ooo::vba::DefaultReturnHelper::getValue() include/vcl/customweld.hxx:45 class rtl::OUString weld::CustomWidgetController::GetHelpText()const -include/vcl/toolkit/dialog.hxx:96 +include/vcl/toolkit/dialog.hxx:98 void Dialog::set_content_area(class VclBox *,) -include/vcl/weld.hxx:96 +include/vcl/weld.hxx:100 void weld::Widget::set_visible(_Bool,) sc/source/core/opencl/formulagroupcl.cxx:1061 _Bool sc::opencl::(anonymous namespace)::DynamicKernelSlidingArgument::NeedParallelReduction()const @@ -410,14 +402,16 @@ sw/inc/flypos.hxx:37 void SwPosFlyFrame::~SwPosFlyFrame() toolkit/inc/controls/geometrycontrolmodel.hxx:182 void OGeometryControlModel::fillProperties(class com::sun::star::uno::Sequence &,class com::sun::star::uno::Sequence &,)const -vcl/inc/jsdialog/jsdialogbuilder.hxx:182 +vcl/inc/jsdialog/jsdialogbuilder.hxx:190 void JSWidget::show() -vcl/inc/jsdialog/jsdialogbuilder.hxx:188 +vcl/inc/jsdialog/jsdialogbuilder.hxx:196 void JSWidget::hide() -vcl/inc/jsdialog/jsdialogbuilder.hxx:195 +vcl/inc/jsdialog/jsdialogbuilder.hxx:203 void JSWidget::set_sensitive(_Bool,) -vcl/inc/jsdialog/jsdialogbuilder.hxx:201 +vcl/inc/jsdialog/jsdialogbuilder.hxx:209 class com::sun::star::uno::Reference JSWidget::get_drop_target() +vcl/inc/salbmp.hxx:118 +void SalBitmap::updateChecksum()const vcl/inc/salframe.hxx:145 void SalFrame::SetRepresentedURL(const class rtl::OUString &,) vcl/inc/salframe.hxx:194 @@ -454,7 +448,7 @@ vcl/inc/unx/saldisp.hxx:195 void SalXLib::StopTimer() vcl/inc/unx/saldisp.hxx:197 _Bool SalXLib::CheckTimeout(_Bool,) -vcl/inc/unx/saldisp.hxx:405 +vcl/inc/unx/saldisp.hxx:404 void SalX11Display::Yield() vcl/inc/unx/salframe.h:207 void X11SalFrame::updateGraphics(_Bool,) diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx index 1f5ea18cb048..14d695874ef9 100644 --- a/vcl/inc/salbmp.hxx +++ b/vcl/inc/salbmp.hxx @@ -115,7 +115,7 @@ protected: bool mbChecksumValid; protected: -virtual void updateChecksum() const; +void updateChecksum() const; // helper function to convert data in 1,2,4 bpp formats to a 8/24/32bpp format enum class BitConvert { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/source
compilerplugins/clang/singlevalfields.results | 31 +++--- vcl/inc/svimpbox.hxx |1 vcl/source/treelist/svimpbox.cxx | 118 -- 3 files changed, 18 insertions(+), 132 deletions(-) New commits: commit 1e701a9d1cf67532026014d627ab96d28e8b8476 Author: Noel Grandin AuthorDate: Thu Aug 20 13:19:58 2020 +0200 Commit: Noel Grandin CommitDate: Thu Aug 20 16:05:19 2020 +0200 loplugin:singlevalfields Change-Id: I4cd20d1a449196b68c7dbe153c60e68b9563bea9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101049 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/singlevalfields.results b/compilerplugins/clang/singlevalfields.results index 545d50c5d753..dc00798c88b6 100644 --- a/compilerplugins/clang/singlevalfields.results +++ b/compilerplugins/clang/singlevalfields.results @@ -130,12 +130,9 @@ cui/source/options/optgdlg.cxx:1127 cui/source/options/optjava.hxx:59 SvxJavaOptionsPage m_aResetIdle cui options SvxJavaOptionsPage Reset -dbaccess/source/ui/inc/directsql.hxx:68 -dbaui::DirectSQLDialog m_aHighlighter +dbaccess/source/ui/inc/sqledit.hxx:43 +dbaui::SQLEditView m_aHighlighter 1 -dbaccess/source/ui/inc/JoinExchange.hxx:38 -dbaui::OJoinExchObj m_pDragListener -0 desktop/source/app/app.cxx:480 desktop::Desktop::Init bTryHardOfficeconfigBroken 0 @@ -151,16 +148,16 @@ drawinglayer/source/primitive2d/sceneprimitive2d.cxx:481 drawinglayer/source/processor2d/vclhelperbufferdevice.cxx:340 drawinglayer::impBufferDevice::paint bDoSaveForVisualControl 0 -drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:953 +drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:954 drawinglayer::processor2d::VclMetafileProcessor2D::processGraphicPrimitive2D bSuppressPDFExtOutDevDataSupport 0 -drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:1307 +drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:1308 drawinglayer::processor2d::VclMetafileProcessor2D::processTextHierarchyParagraphPrimitive2D bSuppressPDFExtOutDevDataSupport 0 -drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2069 +drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2070 drawinglayer::processor2d::VclMetafileProcessor2D::processUnifiedTransparencePrimitive2D bForceToMetafile 0 -drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2170 +drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2171 drawinglayer::processor2d::VclMetafileProcessor2D::processTransparencePrimitive2D bForceToBigTransparentVDev 0 drawinglayer/source/tools/converters.cxx:91 @@ -349,9 +346,6 @@ include/vcl/settings.hxx:146 include/vcl/settings.hxx:147 DialogStyle action_area_border 5 -include/vcl/toolkit/longcurr.hxx:62 -LongCurrencyFormatter mbThousandSep -1 include/vcl/toolkit/treelistbox.hxx:213 SvTreeListBox nIndent 20 @@ -559,10 +553,10 @@ sd/source/ui/inc/DrawController.hxx:292 sd/source/ui/inc/pubdlg.hxx:151 SdPublishingDlg aAssistentFunc 6 -sd/source/ui/inc/View.hxx:237 +sd/source/ui/inc/View.hxx:240 sd::View maDropErrorIdle sd View DropError -sd/source/ui/inc/View.hxx:238 +sd/source/ui/inc/View.hxx:241 sd::View maDropInsertFileIdle sd View DropInsertFile sd/source/ui/inc/ViewTabBar.hxx:146 @@ -985,6 +979,9 @@ vcl/inc/salwtype.hxx:162 vcl/inc/svdata.hxx:315 ImplSVNWFData mbMenuBarDockingAreaCommonBG 0 +vcl/inc/svimpbox.hxx:128 +SvImpLBox m_bContextMenuHandling +0 vcl/source/bitmap/bitmap.cxx:140 Bitmap::~Bitmap save 0 @@ -1084,10 +1081,10 @@ vcl/source/outdev/bitmap.cxx:1243 vcl/unx/gtk3/a11y/gtk3atkutil.cxx:694 ooo_atk_util_ensure_event_listener bInited 1 -vcl/unx/gtk3/gtk3gtkinst.cxx:15444 +vcl/unx/gtk3/gtk3gtkinst.cxx:15466 (anonymous namespace)::ensure_intercept_drawing_area_accessibility bDone 1 -vcl/unx/gtk3/gtk3gtkinst.cxx:15472 +vcl/unx/gtk3/gtk3gtkinst.cxx:15494 (anonymous namespace)::ensure_disable_ctrl_page_up_down_bindings bDone 1 workdir/LexTarget/l10ntools/source/xrmlex.cxx:706 @@ -1096,7 +1093,7 @@ workdir/LexTarget/l10ntools/source/xrmlex.cxx:706 writerfilter/source/dmapper/DomainMapper_Impl.hxx:148 writerfilter::dmapper::FieldParagraph m_bRemove 0 -writerfilter/source/dmapper/SettingsTable.cxx:269 +writerfilter/source/dmapper/SettingsTable.cxx:271 writerfilter::dmapper::SettingsTable_Impl m_pThemeFontLangProps 3 writerfilter/source/rtftok/rtfdocumentimpl.hxx:873 diff --git a/vcl/inc/svimpbox.hxx b/vcl/inc/svimpbox.hxx index 34f2500b5ea2..3def46700396 100644 --- a/vcl/inc/svimpbox.hxx +++ b/vcl/inc/svimpbox.hxx @@ -125,7 +125,6 @@ private: boolm_bUpdateMode : 1; boolm_bSubLstOpLR : 1;// open/close sublist with cursor left/right, defaulted with false -bool
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/skia vcl/source vcl/unx vcl/workben
compilerplugins/clang/unusedmethods.results|2 vcl/inc/unx/freetype_glyphcache.hxx|5 vcl/inc/unx/freetypetextrender.hxx |5 vcl/inc/unx/genpspgraphics.h |5 vcl/inc/unx/glyphcache.hxx | 65 +- vcl/skia/x11/textrender.cxx|2 vcl/source/font/fontcache.cxx |3 vcl/source/gdi/impglyphitem.cxx|8 vcl/unx/generic/gdi/cairotextrender.cxx|2 vcl/unx/generic/gdi/freetypetextrender.cxx | 60 ++--- vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 92 +++- vcl/unx/generic/glyphs/glyphcache.cxx | 257 + vcl/unx/generic/print/genpspgraphics.cxx | 40 +-- vcl/workben/docxfuzzer.cxx |4 vcl/workben/fodpfuzzer.cxx |4 vcl/workben/fodsfuzzer.cxx |4 vcl/workben/fodtfuzzer.cxx |4 vcl/workben/htmlfuzzer.cxx |4 vcl/workben/mmlfuzzer.cxx |4 vcl/workben/pptfuzzer.cxx |4 vcl/workben/pptxfuzzer.cxx |4 vcl/workben/rtffuzzer.cxx |4 vcl/workben/scrtffuzzer.cxx|4 vcl/workben/wksfuzzer.cxx |4 vcl/workben/wmffuzzer.cxx |4 vcl/workben/ww2fuzzer.cxx |4 vcl/workben/ww6fuzzer.cxx |4 vcl/workben/ww8fuzzer.cxx |4 vcl/workben/xlsfuzzer.cxx |4 vcl/workben/xlsxfuzzer.cxx |4 30 files changed, 112 insertions(+), 502 deletions(-) New commits: commit f73980ed151e3d04b02cc463cf9fd6432f14ba03 Author: Caolán McNamara AuthorDate: Tue May 19 16:36:36 2020 +0100 Commit: Caolán McNamara CommitDate: Fri May 22 13:28:50 2020 +0200 Related: tdf#132536 drop FreetypeManager FreetypeFont caching the FreetypeFont only makes sense in the context of the FreetypeFontInstance it belongs to so remove the faux "garbage collection" and just have FreetypeFontInstance own the FreetypeFont and keep it simple. Setting a value low enough to make the garbage collection kick in just crasheed libreoffice by pulling FreetypeFont out from under living FreetypeFontInstance seeing as the Cache/Uncache was by the FreeTypeTextRenderImpl not the FreetypeFontInstance which had HarfBuff faces which continued to point to the removed FreetypeFont There is still a cache at the LogicalFontInstance level, so this aligns the libfreetype platforms with windows, mac etc. Change-Id: Iac669fae8dc1df81a5bc10d2943d84a2ff623180 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94546 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/compilerplugins/clang/unusedmethods.results b/compilerplugins/clang/unusedmethods.results index a17231a1400e..a3bdde1e599f 100644 --- a/compilerplugins/clang/unusedmethods.results +++ b/compilerplugins/clang/unusedmethods.results @@ -1768,8 +1768,6 @@ vcl/inc/skia/utils.hxx:62 void SkiaHelper::dump(const class SkBitmap &,const char *) vcl/inc/skia/zone.hxx:22 void SkiaZone::relaxWatchdogTimings() -vcl/inc/unx/glyphcache.hxx:108 -void FreetypeManager::ClearFontOptions() vcl/inc/unx/gtk/gtkframe.hxx:217 void ensure_dbus_setup(struct _GdkWindow *,class GtkSalFrame *) vcl/inc/unx/saldisp.hxx:377 diff --git a/vcl/inc/unx/freetype_glyphcache.hxx b/vcl/inc/unx/freetype_glyphcache.hxx index 29554b60e244..c375ba2ff5d4 100644 --- a/vcl/inc/unx/freetype_glyphcache.hxx +++ b/vcl/inc/unx/freetype_glyphcache.hxx @@ -106,7 +106,7 @@ class SAL_DLLPUBLIC_RTTI FreetypeFontInstance : public LogicalFontInstance { friend rtl::Reference FreetypeFontFace::CreateFontInstance(const FontSelectPattern&) const; -FreetypeFont* mpFreetypeFont; +std::unique_ptr mxFreetypeFont; virtual hb_font_t* ImplInitHbFont() override; virtual bool ImplGetGlyphBoundRect(sal_GlyphId, tools::Rectangle&, bool) const override; @@ -117,8 +117,7 @@ protected: public: virtual ~FreetypeFontInstance() override; -void SetFreetypeFont(FreetypeFont* p); -FreetypeFont* GetFreetypeFont() const { return mpFreetypeFont; } +FreetypeFont& GetFreetypeFont() const { return *mxFreetypeFont; } virtual bool GetGlyphOutline(sal_GlyphId, basegfx::B2DPolyPolygon&, bool) const override; }; diff --git a/vcl/inc/unx/freetypetextrender.hxx b/vcl/inc/unx/freetypetextrender.hxx index 4c15fb9bfec5..ccc1db0157d2 100644 --- a/vcl/inc/unx/freetypetextrender.hxx +++ b/vcl/inc/unx/freetypetextrender.hxx @@ -22,14 +22,15 @@ #include -class FreetypeFont; +class FreetypeFontInstance; // Generic implementation that uses freetype, but DrawTextLayout() // still needs implementing (e.g. by
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc
compilerplugins/clang/unusedmethods.results |2 -- vcl/inc/fontinstance.hxx|9 - 2 files changed, 11 deletions(-) New commits: commit 649593b5232beade06d279981c045c6388f9163a Author: Caolán McNamara AuthorDate: Fri May 15 20:16:39 2020 +0100 Commit: Caolán McNamara CommitDate: Fri May 15 22:19:17 2020 +0200 ReleaseHbFont is unused LogicalFontInstance dtor does call hb_font_destroy though Change-Id: I59d9711f1934966cddd73c5e62c8929f08b1359a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94335 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/compilerplugins/clang/unusedmethods.results b/compilerplugins/clang/unusedmethods.results index 4da3b5cc4be1..f3650915fd32 100644 --- a/compilerplugins/clang/unusedmethods.results +++ b/compilerplugins/clang/unusedmethods.results @@ -1696,8 +1696,6 @@ vcl/inc/fontinstance.hxx:69 void LogicalFontInstance::SetAverageWidthFactor(double) vcl/inc/fontinstance.hxx:70 double LogicalFontInstance::GetAverageWidthFactor() const -vcl/inc/fontinstance.hxx:93 -void LogicalFontInstance::ReleaseHbFont() vcl/inc/fontselect.hxx:48 _Bool FontSelectPattern::operator!=(const class FontSelectPattern &) const vcl/inc/graphic/GraphicID.hxx:39 diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx index 365ce74d1099..4aff50c9577e 100644 --- a/vcl/inc/fontinstance.hxx +++ b/vcl/inc/fontinstance.hxx @@ -90,7 +90,6 @@ protected: // Takes ownership of pHbFace. static hb_font_t* InitHbFont(hb_face_t* pHbFace); virtual hb_font_t* ImplInitHbFont() { assert(false); return hb_font_get_empty(); } -inline void ReleaseHbFont(); private: // cache of Unicode characters and replacement font names @@ -113,14 +112,6 @@ inline hb_font_t* LogicalFontInstance::GetHbFont() return m_pHbFont; } -inline void LogicalFontInstance::ReleaseHbFont() -{ -if (!m_pHbFont) -return; -hb_font_destroy(m_pHbFont); -m_pHbFont = nullptr; -} - inline void LogicalFontInstance::DecodeOpenTypeTag(const uint32_t nTableTag, char* pTagName) { pTagName[0] = static_cast(nTableTag >> 24); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/source
compilerplugins/clang/singlevalfields.could-be-bool.results | 10 compilerplugins/clang/singlevalfields.results | 215 +--- vcl/inc/slider.hxx |1 vcl/source/control/slider.cxx | 25 - 4 files changed, 112 insertions(+), 139 deletions(-) New commits: commit c81c383be787ec5f9acbca51f75ea5b28b63c63a Author: Noel Grandin AuthorDate: Thu Feb 6 11:33:17 2020 +0200 Commit: Noel Grandin CommitDate: Fri Feb 7 10:17:54 2020 +0100 loplugin:singlevalfields Change-Id: I5d1b08532e6a4e444d61ff8ee1b913999df40ae9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88079 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/singlevalfields.could-be-bool.results b/compilerplugins/clang/singlevalfields.could-be-bool.results index bf3deb0e247a..7c0d9d3961b7 100644 --- a/compilerplugins/clang/singlevalfields.could-be-bool.results +++ b/compilerplugins/clang/singlevalfields.could-be-bool.results @@ -11,7 +11,7 @@ dbaccess/source/ui/inc/tabletree.hxx:149 dbaui::TableTreeListBox m_nTextColumn int desktop/source/app/main.c:29 -/media/disk2/libo7/desktop/source/app/main.c g_Exiting +/home/noel/libo2/desktop/source/app/main.c g_Exiting int editeng/source/misc/hangulhanja.cxx:78 editeng::HangulHanjaConversion_Impl m_eConvType @@ -74,10 +74,10 @@ sd/qa/unit/tiledrendering/tiledrendering.cxx:959 (anonymous namespace)::ViewCallback m_nPart int soltools/cpp/_tokens.c:35 -/media/disk2/libo7/soltools/cpp/_tokens.c EBCDIC_ExternTokenDetected +/home/noel/libo2/soltools/cpp/_tokens.c EBCDIC_ExternTokenDetected int soltools/cpp/_tokens.c:36 -/media/disk2/libo7/soltools/cpp/_tokens.c EBCDIC_StartTokenDetected +/home/noel/libo2/soltools/cpp/_tokens.c EBCDIC_StartTokenDetected int soltools/cpp/cpp.h:121 includelist always @@ -110,13 +110,13 @@ vcl/unx/generic/app/saldata.cxx:502 X11SalData::XError bOnce int vcl/unx/generic/app/sm.cxx:184 -/media/disk2/libo7/vcl/unx/generic/app/sm.cxx nSmDel +/home/noel/libo2/vcl/unx/generic/app/sm.cxx nSmDel int vcl/workben/icontest.cxx:147 (anonymous namespace)::IconTestApp nRet int workdir/LexTarget/l10ntools/source/cfglex.cxx:2293 -/media/disk2/libo7/workdir/LexTarget/l10ntools/source/cfglex.cxx bText +/home/noel/libo2/workdir/LexTarget/l10ntools/source/cfglex.cxx bText int writerfilter/source/dmapper/PageBordersHandler.hxx:53 writerfilter::dmapper::PageBordersHandler m_eOffsetFrom diff --git a/compilerplugins/clang/singlevalfields.results b/compilerplugins/clang/singlevalfields.results index 66ba809a0ec6..5c4f47158587 100644 --- a/compilerplugins/clang/singlevalfields.results +++ b/compilerplugins/clang/singlevalfields.results @@ -1,7 +1,10 @@ -avmedia/inc/mediacontrol.hxx:74 +avmedia/inc/mediacontrol.hxx:72 avmedia::MediaControl maIdle avmedia MediaControl Idle -avmedia/source/framework/soundhandler.hxx:118 +avmedia/inc/mediacontrol.hxx:73 +avmedia::MediaControl maChangeTimeIdle +avmedia MediaControl Change Time Idle +avmedia/source/framework/soundhandler.hxx:115 avmedia::SoundHandler m_aUpdateIdle avmedia SoundHandler Update basctl/source/basicide/baside2.hxx:86 @@ -170,19 +173,19 @@ helpcompiler/inc/BasCodeTagger.hxx:29 BasicCodeTagger m_Highlighter 0 i18npool/source/localedata/localedata.cxx:52 -/media/disk2/libo7/i18npool/source/localedata/localedata.cxx lcl_DATA_EN +/home/noel/libo2/i18npool/source/localedata/localedata.cxx lcl_DATA_EN localedata_en i18npool/source/localedata/localedata.cxx:53 -/media/disk2/libo7/i18npool/source/localedata/localedata.cxx lcl_DATA_ES +/home/noel/libo2/i18npool/source/localedata/localedata.cxx lcl_DATA_ES localedata_es i18npool/source/localedata/localedata.cxx:54 -/media/disk2/libo7/i18npool/source/localedata/localedata.cxx lcl_DATA_EURO +/home/noel/libo2/i18npool/source/localedata/localedata.cxx lcl_DATA_EURO localedata_euro i18npool/source/localedata/localedata.cxx:55 -/media/disk2/libo7/i18npool/source/localedata/localedata.cxx lcl_DATA_OTHERS +/home/noel/libo2/i18npool/source/localedata/localedata.cxx lcl_DATA_OTHERS localedata_others idlc/source/idlccompile.cxx:51 -/media/disk2/libo7/idlc/source/idlccompile.cxx yydebug +/home/noel/libo2/idlc/source/idlccompile.cxx yydebug 0 include/basegfx/pixel/bpixel.hxx:42 basegfx::BPixel::(anonymous union)::(anonymous) mnValue @@ -268,12 +271,6 @@ include/svtools/svparser.hxx:74 include/svtools/tabbar.hxx:323 TabBar mnOffY 0 -include/svtools/valueset.hxx:227 -ValueSet mbSelection -0 -include/svtools/valueset.hxx:233 -ValueSet mbFullMode -1 include/svx/ctredlin.hxx:91 SvxRedlinTable aDaTiFirst 0 @@ -340,18 +337,18 @@ include/vcl/settings.hxx:146 include/vcl/settings.hxx:147
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc
compilerplugins/clang/unusedmethods.py |2 compilerplugins/clang/unusedmethods.results| 144 - compilerplugins/clang/unusedmethods.unused-returns.results | 34 +-- vcl/inc/svimpbox.hxx |1 4 files changed, 66 insertions(+), 115 deletions(-) New commits: commit f10b43f9d1b4e14441a9204bc0c79003645f0f98 Author: Noel Grandin AuthorDate: Sat Nov 16 11:10:38 2019 +0200 Commit: Noel Grandin CommitDate: Sun Nov 17 07:15:22 2019 +0100 loplugin:unusedmethods Change-Id: I04deb5a1dee5b8a9a4508d28552ffe0b67288993 Reviewed-on: https://gerrit.libreoffice.org/82977 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unusedmethods.py b/compilerplugins/clang/unusedmethods.py index d4af2f712bf7..8497719b8f77 100755 --- a/compilerplugins/clang/unusedmethods.py +++ b/compilerplugins/clang/unusedmethods.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import sys import re diff --git a/compilerplugins/clang/unusedmethods.results b/compilerplugins/clang/unusedmethods.results index 76a8b3d457b9..6f41c1d5b301 100644 --- a/compilerplugins/clang/unusedmethods.results +++ b/compilerplugins/clang/unusedmethods.results @@ -66,6 +66,8 @@ connectivity/source/inc/OTypeInfo.hxx:47 _Bool connectivity::OTypeInfo::operator!=(const struct connectivity::OTypeInfo &) const cui/source/dialogs/SpellAttrib.hxx:73 _Bool svx::SpellErrorDescription::operator==(const struct svx::SpellErrorDescription &) const +cui/source/inc/cfg.hxx:333 +class rtl::OUString SvxMenuEntriesListBox::get_text(int) cui/source/inc/cfgutil.hxx:142 _Bool CuiConfigFunctionListBox::get_iter_first(class weld::TreeIter &) const cui/source/inc/cfgutil.hxx:144 @@ -144,14 +146,6 @@ editeng/inc/edtspell.hxx:109 class __gnu_debug::_Safe_iterator > >, class std::__debug::vector >, struct std::random_access_iterator_tag> WrongList::end() const extensions/source/scanner/scanner.hxx:86 void ScannerManager::SetData(void *) -fpicker/source/office/iodlgimp.hxx:194 -void SvtExpFileDlg_Impl::SetNoFilterListSelection() -fpicker/source/office/PlacesListBox.hxx:59 -const class weld::Button & PlacesListBox::GetAddButton() const -fpicker/source/office/PlacesListBox.hxx:60 -const class weld::Button & PlacesListBox::GetDeleteButton() const -fpicker/source/office/PlacesListBox.hxx:61 -class weld::TreeView & PlacesListBox::GetPlacesListBox() hwpfilter/source/mzstring.h:99 class MzString & MzString::operator<<(unsigned char) hwpfilter/source/mzstring.h:101 @@ -496,7 +490,7 @@ include/i18nlangtag/languagetag.hxx:263 enum LanguageTag::ScriptType LanguageTag::getScriptType() const include/o3tl/any.hxx:155 class boost::optional o3tl::tryAccess(const class com::sun::star::uno::Any &) -include/o3tl/cow_wrapper.hxx:310 +include/o3tl/cow_wrapper.hxx:323 type-parameter-?-? * o3tl::cow_wrapper::get() include/o3tl/enumarray.hxx:105 typename type-parameter-?-?::value_type * o3tl::enumarray_iterator::operator->() const @@ -544,8 +538,6 @@ include/opencl/openclconfig.hxx:57 _Bool OpenCLConfig::ImplMatcher::operator!=(const struct OpenCLConfig::ImplMatcher &) const include/opencl/OpenCLZone.hxx:47 _Bool OpenCLZone::isInInitialTest() -include/sfx2/basedlgs.hxx:102 - SfxFloatingWindow::SfxFloatingWindow(class SfxBindings *,class SfxChildWindow *,class vcl::Window *,const class rtl::OString &,const class rtl::OUString &,const class com::sun::star::uno::Reference &) include/sfx2/charwin.hxx:64 void SvxCharView::connect_focus_in(const class Link &) include/sfx2/charwin.hxx:65 @@ -568,16 +560,6 @@ include/svl/lockfilecommon.hxx:58 void svt::LockFileCommon::SetURL(const class rtl::OUString &) include/svtools/DocumentToGraphicRenderer.hxx:106 _Bool DocumentToGraphicRenderer::isImpress() const -include/svtools/imagemgr.hxx:128 -class Image SvFileInformationManager::GetFolderImage(const struct svtools::VolumeInfo &) -include/svtools/inettbc.hxx:68 -void SvtURLBox::SetBaseURL(const class rtl::OUString &) -include/svtools/inettbc.hxx:72 -void SvtURLBox::SetOnlyDirectories(_Bool) -include/svtools/inettbc.hxx:73 -void SvtURLBox::SetNoURLSelection(_Bool) -include/svtools/inettbc.hxx:82 -void SvtURLBox::EnableAutocompletion(_Bool) include/svx/autoformathelper.hxx:145 _Bool AutoFormatBase::operator==(const class AutoFormatBase &) include/svx/ClassificationEditView.hxx:38 @@ -698,8 +680,6 @@ include/vcl/animate/AnimationBitmap.hxx:69 _Bool AnimationBitmap::operator!=(const struct AnimationBitmap &) const include/vcl/BitmapColor.hxx:39 void BitmapColor::SetAlpha(unsigned char) -include/vcl/builder.hxx:475 -_Bool VclBuilderContainer::hasBuilder() const include/vcl/ColorMask.hxx:113 void ColorMask::GetColorFor16BitMSB(class BitmapColor &,const unsigned char *) const
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/source
compilerplugins/clang/useuniqueptr.cxx | 11 ++- vcl/inc/svdata.hxx |2 vcl/source/app/svapp.cxx| 16 +--- vcl/source/app/svdata.cxx |1 vcl/source/bitmap/BitmapConvolutionMatrixFilter.cxx | 71 vcl/source/bitmap/BitmapEmbossGreyFilter.cxx|8 +- vcl/source/bitmap/BitmapMedianFilter.cxx| 47 + vcl/source/bitmap/BitmapMosaicFilter.cxx|7 - vcl/source/bitmap/BitmapPopArtFilter.cxx| 57 +++- vcl/source/bitmap/BitmapSobelGreyFilter.cxx |8 +- vcl/source/bitmap/bitmap.cxx| 21 ++--- vcl/source/gdi/bitmapex.cxx |8 +- vcl/source/gdi/impvect.cxx | 37 -- vcl/source/gdi/pdfwriter_impl.cxx |6 - vcl/source/gdi/print.cxx| 24 ++ 15 files changed, 142 insertions(+), 182 deletions(-) New commits: commit 1cd32bcf1b92bd53320717626601135623dadd55 Author: Noel Grandin AuthorDate: Mon Dec 10 11:28:59 2018 +0200 Commit: Noel Grandin CommitDate: Tue Dec 11 06:26:48 2018 +0100 loplugin:useuniqueptr in vcl Change-Id: I24eca813321fd3919bba9d37c285484f865ea2ea Reviewed-on: https://gerrit.libreoffice.org/64877 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx index 1f0f9d649317..71f842bde07e 100644 --- a/compilerplugins/clang/useuniqueptr.cxx +++ b/compilerplugins/clang/useuniqueptr.cxx @@ -477,14 +477,15 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C // linked list if (parentName == "ScFunctionList" || parentName == "SwNodes" || parentName == "SwUnoCursor" || parentName == "SortedResultSet" -|| parentName == "Atom") +|| parentName == "Atom" || parentName == "RegionBand" || parentName == "WMFWriter" +|| parentName == "Scheduler" || parentName == "OpenGLContext") return; // manual ref counting if (parentName == "ScBroadcastAreaSlot") return; // complicated if (parentName == "SwFormatField" || parentName == "FontPropertyBox" || parentName == "SdFontPropertyBox" -|| parentName == "SwHTMLParser") +|| parentName == "SwHTMLParser" || parentName == "PDFWriterImpl") return; if (functionDecl->getIdentifier()) @@ -516,6 +517,12 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C // very dodgy if (name == "UCBStorage::OpenStorage_Impl") return; +// complicated ownership +if (name == "ParseCMAP" || name == "OpenGLSalBitmap::CreateTexture" || name == "X11SalGraphicsImpl::drawAlphaBitmap") +return; +// complicated delete +if (name == "X11SalObject::CreateObject") +return; } report( diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 208e180ceeba..beb877f728ff 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -191,7 +191,7 @@ struct ImplSVGDIData OpenGLContext* mpLastContext = nullptr;// Last OpenGLContext VclPtr mpFirstPrinter; // First Printer VclPtr mpLastPrinter; // Last Printer -ImplPrnQueueList* mpPrinterQueueList = nullptr; // List of all printer queue +std::unique_ptr mpPrinterQueueList; // List of all printer queue std::shared_ptr mxScreenFontList; // Screen-Font-List std::shared_ptr mxScreenFontCache; // Screen-Font-Cache ImplDirectFontSubstitution* mpDirectFontSubst = nullptr; // Font-Substitutions defined in Tools->Options->Fonts diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 41a342635437..c73769ebcc8a 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -813,19 +813,17 @@ ImplSVEvent * Application::PostKeyEvent( VclEventId nEvent, vcl::Window *pWin, K if( pWin && pKeyEvent ) { -ImplPostEventData* pPostEventData = new ImplPostEventData( nEvent, pWin, *pKeyEvent ); +std::unique_ptr pPostEventData(new ImplPostEventData( nEvent, pWin, *pKeyEvent )); nEventId = PostUserEvent( LINK( nullptr, Application, PostEventHandler ), - pPostEventData ); + pPostEventData.get() ); if( nEventId ) { pPostEventData->mnEventId = nEventId; -ImplGetSVData()->maAppData.maPostedEventList.emplace_back( pWin, pPostEventData ); +ImplGetSVData()->maAppData.maPostedEventList.emplace_back( pWin, pPostEventData.release() ); } -else -delete pPostEventData; } return nEventId; @@ -846,19 +844,17 @@
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/source
compilerplugins/clang/unusedenumconstants.writeonly.results |2 -- vcl/inc/brdwin.hxx |3 +-- vcl/source/window/dialog.cxx|2 +- vcl/source/window/floatwin.cxx |2 +- 4 files changed, 3 insertions(+), 6 deletions(-) New commits: commit 7a581b977e7972ed893b49cbdbc6b69176f7c71b Author: Noel Grandin AuthorDate: Mon Nov 26 14:33:21 2018 +0200 Commit: Noel Grandin CommitDate: Tue Nov 27 14:42:22 2018 +0100 remove unused BorderWindowStyle enum value Change-Id: I05ae398b75bbafe9b144a90e6735cf7d5e532ce4 Reviewed-on: https://gerrit.libreoffice.org/64097 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unusedenumconstants.writeonly.results b/compilerplugins/clang/unusedenumconstants.writeonly.results index 27d446c21c76..ee5b2d40244f 100644 --- a/compilerplugins/clang/unusedenumconstants.writeonly.results +++ b/compilerplugins/clang/unusedenumconstants.writeonly.results @@ -10410,8 +10410,6 @@ uui/source/iahndl-errorhandler.cxx:148 enum Source SOURCE_SVX uui/source/iahndl-errorhandler.cxx:148 enum Source SOURCE_UUI -vcl/inc/brdwin.hxx:35 -enum BorderWindowStyle Border vcl/inc/headless/svpgdi.hxx:74 enum PaintMode Over vcl/inc/headless/svpinst.hxx:65 diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index 431b839aadce..6a7fbcc2cada 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -32,13 +32,12 @@ enum class DrawButtonFlags; enum class BorderWindowStyle { NONE = 0x, Overlap = 0x0001, -Border = 0x0002, Float= 0x0004, Frame= 0x0008, App = 0x0010 }; namespace o3tl { -template<> struct typed_flags : is_typed_flags {}; +template<> struct typed_flags : is_typed_flags {}; }; enum class BorderWindowHitTest { diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index e59deb0b685a..dc19e56c5738 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -468,7 +468,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag ) } else { -VclPtrInstance pBorderWin( pParent, nStyle, BorderWindowStyle::Overlap | BorderWindowStyle::Border ); +VclPtrInstance pBorderWin( pParent, nStyle, BorderWindowStyle::Overlap ); SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, nullptr ); pBorderWin->mpWindowImpl->mpClientWindow = this; pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder ); diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 77aca029ca29..91482016b557 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -94,7 +94,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle ) else { VclPtr pBorderWin; -BorderWindowStyle nBorderStyle = BorderWindowStyle::Border | BorderWindowStyle::Float; +BorderWindowStyle nBorderStyle = BorderWindowStyle::Float; if (nStyle & WB_OWNERDRAWDECORATION) nBorderStyle |= BorderWindowStyle::Frame; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/unx
compilerplugins/clang/unusedenumconstants.untouched.results | 12 --- vcl/inc/unx/saldisp.hxx |5 - vcl/unx/generic/app/saldisp.cxx | 44 ++-- 3 files changed, 23 insertions(+), 38 deletions(-) New commits: commit fe39cd0df3e1c9e1e4ea71b3759371cbcca944dd Author: Noel Grandin AuthorDate: Wed Nov 21 13:48:54 2018 +0200 Commit: Noel Grandin CommitDate: Thu Nov 22 07:34:34 2018 +0100 convert SalRGB to scoped enum and remove unused values Change-Id: Id10c18e832d54a6e530c3fe197b230d2d511d79c Reviewed-on: https://gerrit.libreoffice.org/63739 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results b/compilerplugins/clang/unusedenumconstants.untouched.results index 1bc5f5f600d5..df0a83601656 100644 --- a/compilerplugins/clang/unusedenumconstants.untouched.results +++ b/compilerplugins/clang/unusedenumconstants.untouched.results @@ -544,18 +544,6 @@ vcl/inc/salptype.hxx:44 enum SalPrinterError General vcl/inc/unx/saldisp.hxx:65 srv_vendor_t vendor_none -vcl/inc/unx/saldisp.hxx:77 -enum SalRGB RGBA -vcl/inc/unx/saldisp.hxx:77 -enum SalRGB RBGA -vcl/inc/unx/saldisp.hxx:78 -enum SalRGB GBRA -vcl/inc/unx/saldisp.hxx:78 -enum SalRGB GRBA -vcl/inc/unx/saldisp.hxx:79 -enum SalRGB BRGA -vcl/inc/unx/saldisp.hxx:79 -enum SalRGB BGRA vcl/source/gdi/CommonSalLayout.cxx:129 enum (anonymous namespace)::VerticalOrientation Rotated vcl/unx/gtk3/gtk3gtkinst.cxx:2524 diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index 44fb08b87a91..c5bc241a37cc 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -71,12 +71,9 @@ extern "C" srv_vendor_t sal_GetServerVendor( Display *p_display ); // MSB/Bigendian view (Color == RGB, r=0xFF, g=0xFF00, b=0xFF) -enum SalRGB { RGB, RBG, +enum class SalRGB { RGB, RBG, GBR, GRB, BGR, BRG, - RGBA, RBGA, - GBRA, GRBA, - BGRA, BRGA, otherSalRGB }; class SalVisual : public XVisualInfo diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index e454587bafe0..ba436d4b3945 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2393,7 +2393,7 @@ bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateDat } SalVisual::SalVisual(): -eRGBMode_(RGB), nRedShift_(0), nGreenShift_(0), nBlueShift_(0), nRedBits_(0), nGreenBits_(0), +eRGBMode_(SalRGB::RGB), nRedShift_(0), nGreenShift_(0), nBlueShift_(0), nRedBits_(0), nGreenBits_(0), nBlueBits_(0) {} @@ -2414,46 +2414,46 @@ SalVisual::SalVisual( const XVisualInfo* pXVI ) if( red_mask == 0xFF ) if( green_mask == 0xFF00 ) if( blue_mask == 0xFF ) -eRGBMode_ = RGB; +eRGBMode_ = SalRGB::RGB; else -eRGBMode_ = otherSalRGB; +eRGBMode_ = SalRGB::otherSalRGB; else if( blue_mask == 0xFF00 ) if( green_mask == 0xFF ) -eRGBMode_ = RBG; +eRGBMode_ = SalRGB::RBG; else -eRGBMode_ = otherSalRGB; +eRGBMode_ = SalRGB::otherSalRGB; else -eRGBMode_ = otherSalRGB; +eRGBMode_ = SalRGB::otherSalRGB; else if( green_mask == 0xFF ) if( red_mask == 0xFF00 ) if( blue_mask == 0xFF ) -eRGBMode_ = GRB; +eRGBMode_ = SalRGB::GRB; else -eRGBMode_ = otherSalRGB; +eRGBMode_ = SalRGB::otherSalRGB; else if( blue_mask == 0xFF00 ) if( red_mask == 0xFF ) -eRGBMode_ = GBR; +eRGBMode_ = SalRGB::GBR; else -eRGBMode_ = otherSalRGB; +eRGBMode_ = SalRGB::otherSalRGB; else -eRGBMode_ = otherSalRGB; +eRGBMode_ = SalRGB::otherSalRGB; else if( blue_mask == 0xFF ) if( red_mask == 0xFF00 ) if( green_mask == 0xFF ) -eRGBMode_ = BRG; +eRGBMode_ = SalRGB::BRG; else -eRGBMode_ = otherSalRGB; +eRGBMode_ = SalRGB::otherSalRGB; else if( green_mask == 0xFF00 ) if( red_mask == 0xFF ) -eRGBMode_ = BGR; +eRGBMode_ = SalRGB::BGR; else -
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/source
compilerplugins/clang/unusedenumconstants.untouched.results |2 -- vcl/inc/regband.hxx |2 +- vcl/source/gdi/region.cxx |2 +- vcl/source/gdi/regionband.cxx |2 +- 4 files changed, 3 insertions(+), 5 deletions(-) New commits: commit 58bc1cba20c48f518eded86f10a73ebf42ce8bd4 Author: Noel Grandin AuthorDate: Wed Nov 21 13:51:32 2018 +0200 Commit: Noel Grandin CommitDate: Thu Nov 22 07:34:59 2018 +0100 convert LineType to scoped enum and remove unused LINE_HORIZONTAL Change-Id: I39ee05b444b4da46758ff30176e041a02bee54e8 Reviewed-on: https://gerrit.libreoffice.org/63740 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results b/compilerplugins/clang/unusedenumconstants.untouched.results index df0a83601656..1c4ba9a3aa9e 100644 --- a/compilerplugins/clang/unusedenumconstants.untouched.results +++ b/compilerplugins/clang/unusedenumconstants.untouched.results @@ -538,8 +538,6 @@ ucb/source/ucp/webdav-neon/DAVTypes.hxx:195 enum webdav_ucp::Depth DAVINFINITY ucbhelper/source/client/proxydecider.cxx:119 enum ucbhelper::proxydecider_impl::InternetProxyDecider_Impl::ProxyType Manual -vcl/inc/regband.hxx:45 -enum LineType LINE_HORIZONTAL vcl/inc/salptype.hxx:44 enum SalPrinterError General vcl/inc/unx/saldisp.hxx:65 diff --git a/vcl/inc/regband.hxx b/vcl/inc/regband.hxx index e81b1e127fc9..c7b9e611947b 100644 --- a/vcl/inc/regband.hxx +++ b/vcl/inc/regband.hxx @@ -42,7 +42,7 @@ struct ImplRegionBandSep boolmbRemoved; }; -enum LineType { LINE_ASCENDING, LINE_DESCENDING, LINE_HORIZONTAL }; +enum class LineType { Ascending, Descending }; // element for the list with x-separations struct ImplRegionBandPoint diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index ce2d60ba7d66..b363cd019b40 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -128,7 +128,7 @@ namespace // in other places (but seems to be the wrong way.) const long nTop (::std::min(aStart.Y(), aEnd.Y())); const long nBottom (::std::max(aStart.Y(), aEnd.Y())); -const LineType eLineType (aStart.Y() > aEnd.Y() ? LINE_DESCENDING : LINE_ASCENDING); +const LineType eLineType (aStart.Y() > aEnd.Y() ? LineType::Descending : LineType::Ascending); // Make sure that the current line is covered by bands. pRegionBand->ImplAddMissingBands(nTop,nBottom); diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx index 549979862e01..0b7f13b4323c 100644 --- a/vcl/source/gdi/regionband.cxx +++ b/vcl/source/gdi/regionband.cxx @@ -445,7 +445,7 @@ void RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi return; } -LineType eLineType = (rStartPt.Y() > rEndPt.Y()) ? LINE_DESCENDING : LINE_ASCENDING; +LineType eLineType = (rStartPt.Y() > rEndPt.Y()) ? LineType::Descending : LineType::Ascending; if ( rStartPt.X() == rEndPt.X() ) { // vertical line ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/Library_vcl.mk vcl/source
compilerplugins/clang/badstatics.cxx |1 vcl/Library_vcl.mk |1 vcl/inc/graphic/Manager.hxx | 71 vcl/inc/impgraph.hxx | 27 ++-- vcl/source/gdi/graph.cxx | 26 +--- vcl/source/gdi/impgraph.cxx | 76 - vcl/source/graphic/Manager.cxx | 200 +++ 7 files changed, 371 insertions(+), 31 deletions(-) New commits: commit a2b53fece14f745853bcfe1a300c3dceb580e148 Author: Tomaž VajngerlDate: Wed Apr 4 17:51:26 2018 +0900 vcl: Add a internal (memory) manager for Graphic objects This adds vcl::graphic::Manager which is a manager singleton that tracks all the creation fo graphic objects and swaps them out on a time and allocation basis. Time based - every number of seconds it looks for Graphics that weren't used for a time. Allocation based - when creating a new Graphic and the total of Graphic uses more than the total amount of memory for Graphics defined in configuration, it tries to release the Graphics that weren't used for a time. Change-Id: I5dbf74db4a6455d32c4abcbad7be21c7f0534642 Reviewed-on: https://gerrit.libreoffice.org/52396 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/compilerplugins/clang/badstatics.cxx b/compilerplugins/clang/badstatics.cxx index 697a50c8f9b0..d91f3b430a30 100644 --- a/compilerplugins/clang/badstatics.cxx +++ b/compilerplugins/clang/badstatics.cxx @@ -199,6 +199,7 @@ public: || (loplugin::DeclCheck(pVarDecl).Var("aAllListeners") .Class("ScAddInListener").GlobalNamespace()) // not owning || name == "s_pLOKWindowsMap" // LOK only, guarded by assert, and LOK never tries to perform a VCL cleanup +|| name == "gStaticManager" // vcl/source/graphic/Manager.cxx - stores non-owning pointers ) // these variables appear unproblematic { return true; diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index b6212ba959a4..c854e94bad45 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -305,6 +305,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/graphic/GraphicObject \ vcl/source/graphic/GraphicObject2 \ vcl/source/graphic/grfattr \ +vcl/source/graphic/Manager \ vcl/source/graphic/UnoGraphic \ vcl/source/graphic/UnoGraphicDescriptor \ vcl/source/graphic/UnoGraphicObject \ diff --git a/vcl/inc/graphic/Manager.hxx b/vcl/inc/graphic/Manager.hxx new file mode 100644 index ..ec3761534493 --- /dev/null +++ b/vcl/inc/graphic/Manager.hxx @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_VCL_INC_GRAPHIC_MANAGER_HXX +#define INCLUDED_VCL_INC_GRAPHIC_MANAGER_HXX + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +class ImpGraphic; + +namespace vcl +{ +namespace graphic +{ +class Manager final +{ +private: +std::unordered_set m_pImpGraphicList; +sal_Int64 mnTotalCacheSize; +sal_Int64 mnUsedSize; +Timer maSwapOutTimer; + +Manager(); + +void registerGraphic(std::shared_ptr& rImpGraphic, OUString const& rsContext); + +DECL_LINK(SwapOutTimerHandler, Timer*, void); + +public: +static Manager& get(); + +void swappedIn(const ImpGraphic* pImpGraphic); +void swappedOut(const ImpGraphic* pImpGraphic); + +void reduceGraphicMemory(); +void changeExisting(const ImpGraphic* pImpGraphic, sal_Int64 nOldSize); +void unregisterGraphic(ImpGraphic* pImpGraphic); + +std::shared_ptr copy(std::shared_ptr const& pImpGraphic); +std::shared_ptr newInstance(); +std::shared_ptr newInstance(const Bitmap& rBitmap); +std::shared_ptr newInstance(const BitmapEx& rBitmapEx); +std::shared_ptr newInstance(const VectorGraphicDataPtr& rVectorGraphicDataPtr); +std::shared_ptr newInstance(const Animation& rAnimation); +std::shared_ptr newInstance(const GDIMetaFile& rMtf); +}; +} +} // end namespace vcl::graphic + +#endif // INCLUDED_VCL_INC_GRAPHIC_MANAGER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index a60296fde556..a24f786a5b86 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -21,6 +21,7 @@ #define INCLUDED_VCL_INC_IMPGRAPH_HXX #include +#include "graphic/Manager.hxx" struct ImpSwapInfo { @@ -32,6 +33,7 @@ class OutputDevice; class
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc writerfilter/source
compilerplugins/clang/unusedfields.cxx | 21 +++-- compilerplugins/clang/unusedfields.readonly.results | 56 --- compilerplugins/clang/unusedfields.untouched.results | 52 -- compilerplugins/clang/unusedfields.writeonly.results | 70 +-- vcl/inc/svdata.hxx |1 writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 writerfilter/source/rtftok/rtfdocumentimpl.hxx |2 7 files changed, 110 insertions(+), 94 deletions(-) New commits: commit 4887f9fe2d5bdbf8d760d88a984439efbdf37d5a Author: Noel GrandinDate: Wed Nov 8 14:56:41 2017 +0200 loplugin:unusedfields Change-Id: Ie8a2c6462ddc708140e725847199c8234ab6b592 Reviewed-on: https://gerrit.libreoffice.org/44528 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unusedfields.cxx b/compilerplugins/clang/unusedfields.cxx index 22d13f37eddc..7f11d2fb84ab 100644 --- a/compilerplugins/clang/unusedfields.cxx +++ b/compilerplugins/clang/unusedfields.cxx @@ -159,11 +159,11 @@ private: CalleeWrapper calleeFunctionDecl); llvm::Optional getCallee(CallExpr const *); -RecordDecl * insideMoveOrCopyDeclParent; -RecordDecl * insideStreamOutputOperator; +RecordDecl * insideMoveOrCopyDeclParent = nullptr; +RecordDecl * insideStreamOutputOperator = nullptr; // For reasons I do not understand, parentFunctionDecl() is not reliable, so // we store the parent function on the way down the AST. -FunctionDecl * insideFunctionDecl; +FunctionDecl * insideFunctionDecl = nullptr; }; void UnusedFields::run() @@ -361,18 +361,21 @@ bool startswith(const std::string& rStr, const char* pSubStr) bool UnusedFields::TraverseCXXConstructorDecl(CXXConstructorDecl* cxxConstructorDecl) { +auto copy = insideMoveOrCopyDeclParent; if (!ignoreLocation(cxxConstructorDecl) && cxxConstructorDecl->isThisDeclarationADefinition()) { if (cxxConstructorDecl->isCopyOrMoveConstructor()) insideMoveOrCopyDeclParent = cxxConstructorDecl->getParent(); } bool ret = RecursiveASTVisitor::TraverseCXXConstructorDecl(cxxConstructorDecl); -insideMoveOrCopyDeclParent = nullptr; +insideMoveOrCopyDeclParent = copy; return ret; } bool UnusedFields::TraverseCXXMethodDecl(CXXMethodDecl* cxxMethodDecl) { +auto copy1 = insideMoveOrCopyDeclParent; +auto copy2 = insideFunctionDecl; if (!ignoreLocation(cxxMethodDecl) && cxxMethodDecl->isThisDeclarationADefinition()) { if (cxxMethodDecl->isCopyAssignmentOperator() || cxxMethodDecl->isMoveAssignmentOperator()) @@ -380,13 +383,15 @@ bool UnusedFields::TraverseCXXMethodDecl(CXXMethodDecl* cxxMethodDecl) } insideFunctionDecl = cxxMethodDecl; bool ret = RecursiveASTVisitor::TraverseCXXMethodDecl(cxxMethodDecl); -insideMoveOrCopyDeclParent = nullptr; -insideFunctionDecl = nullptr; +insideMoveOrCopyDeclParent = copy1; +insideFunctionDecl = copy2; return ret; } bool UnusedFields::TraverseFunctionDecl(FunctionDecl* functionDecl) { +auto copy1 = insideStreamOutputOperator; +auto copy2 = insideFunctionDecl; if (functionDecl->getLocation().isValid() && !ignoreLocation(functionDecl) && functionDecl->isThisDeclarationADefinition()) { if (functionDecl->getOverloadedOperator() == OO_LessLess @@ -398,8 +403,8 @@ bool UnusedFields::TraverseFunctionDecl(FunctionDecl* functionDecl) } insideFunctionDecl = functionDecl; bool ret = RecursiveASTVisitor::TraverseFunctionDecl(functionDecl); -insideStreamOutputOperator = nullptr; -insideFunctionDecl = nullptr; +insideStreamOutputOperator = copy1; +insideFunctionDecl = copy2; return ret; } diff --git a/compilerplugins/clang/unusedfields.readonly.results b/compilerplugins/clang/unusedfields.readonly.results index f819f56a312b..de6aa98570ca 100644 --- a/compilerplugins/clang/unusedfields.readonly.results +++ b/compilerplugins/clang/unusedfields.readonly.results @@ -64,6 +64,10 @@ connectivity/source/drivers/evoab2/EApi.h:130 (anonymous) code char * connectivity/source/drivers/evoab2/EApi.h:131 (anonymous) country char * +connectivity/source/drivers/firebird/Driver.hxx:52 +connectivity::firebird::FirebirdDriver m_firebirdTMPDirectory ::utl::TempFile +connectivity/source/drivers/firebird/Driver.hxx:53 +connectivity::firebird::FirebirdDriver m_firebirdLockDirectory ::utl::TempFile connectivity/source/inc/dbase/DIndexIter.hxx:36 connectivity::dbase::OIndexIterator m_pOperator file::OBoolOperator * connectivity/source/inc/dbase/DIndexIter.hxx:37 @@ -207,11 +211,11 @@ filter/source/xsltdialog/xmlfiltersettingsdialog.hxx:143 framework/inc/dispatch/dispatchprovider.hxx:81
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/unx
compilerplugins/clang/unusedenumconstants.py | 30 ++- vcl/inc/unx/salframe.h |1 vcl/unx/generic/app/wmadaptor.cxx| 20 -- 3 files changed, 21 insertions(+), 30 deletions(-) New commits: commit d1eb3c86b0ae5fb2a237b6a35b823e9569e2dcf6 Author: Noel GrandinDate: Mon Feb 20 09:47:16 2017 +0200 remove unused ModalDialogue from WMWindowType enum Change-Id: I22269d6d1868b744f48274ff53ca46fa93ce9fc1 Reviewed-on: https://gerrit.libreoffice.org/34455 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py index 803aaff..089927e 100755 --- a/compilerplugins/clang/unusedenumconstants.py +++ b/compilerplugins/clang/unusedenumconstants.py @@ -63,11 +63,7 @@ def startswith_one_of( srcLoc, fileSet ): return True; return False; -untouchedSet = set() -for d in definitionSet: -if d in readSet or d in writeSet: -continue -srcLoc = definitionToSourceLocationMap[d]; +def is_ignore(srcLoc): if startswith_one_of(srcLoc, [ # this is all representations of on-disk or external data structures @@ -118,6 +114,8 @@ for d in definitionSet: "include/basic/sbxdef.hxx", # SbxDataType "connectivity/source/inc/dbase/DTable.hxx", # ODbaseTable::DBFType "codemaker/source/javamaker/classfile.hxx", # AccessFlags + "basic/source/inc/filefmt.hxx", # FileOffset + "basic/source/inc/opcodes.hxx", # SbiOpcode # unit test code "cppu/source/uno/check.cxx", # general weird nonsense going on @@ -146,7 +144,7 @@ for d in definitionSet: "binaryurp/source/specialfunctionids.hxx", # binaryurp::SpecialFunctionIds "connectivity/source/inc/odbc/OTools.hxx", # ODBC3SQLFunctionId "include/formula/grammar.hxx", # FormulaGrammar::Grammar - "include/formula/opcode.hxx", # OpCode + "basic/source/sbx/sbxres.hxx", # StringId # Windows or OSX only "include/canvas/rendering/icolorbuffer.hxx", "include/vcl/commandevent.hxx", @@ -159,7 +157,7 @@ for d in definitionSet: # must match some other enum "include/editeng/bulletitem.hxx", "include/editeng/svxenum.hxx", - "include/formula/opcode.hxx", + "include/formula/opcode.hxx", # OpCode "include/i18nutil/paper.hxx", "include/oox/drawingml/shapepropertymap.hxx", "include/svl/nfkeytab.hx", @@ -194,9 +192,19 @@ for d in definitionSet: "include/i18nlangtag/applelangid.hxx", # AppleLanguageId "connectivity/source/drivers/firebird/Util.hxx", # firebird::BlobSubtype ]): -continue + return True +if d[1] == "UNKNOWN" or d[1] == "LAST" or d[1].endswith("NONE") or d[1].endswith("None") or d[1].endswith("EQUAL_SIZE"): +return True +return False -if d[1] == "UNKNOWN" or d[1].endswith("NONE") or d[1].endswith("None") or d[1].endswith("EQUAL_SIZE"): continue + +untouchedSet = set() +for d in definitionSet: +if d in readSet or d in writeSet: +continue +srcLoc = definitionToSourceLocationMap[d]; +if (is_ignore(srcLoc)): +continue untouchedSet.add((d[0] + " " + d[1], srcLoc)) @@ -205,6 +213,8 @@ for d in writeSet: if d in readSet: continue srcLoc = definitionToSourceLocationMap[d]; +if (is_ignore(srcLoc)): +continue writeonlySet.add((d[0] + " " + d[1], srcLoc)) readonlySet = set() @@ -212,6 +222,8 @@ for d in readSet: if d in writeSet: continue srcLoc = definitionToSourceLocationMap[d]; +if (is_ignore(srcLoc)): +continue readonlySet.add((d[0] + " " + d[1], srcLoc)) # sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index 510ebd1..69702fc 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -53,7 +53,6 @@ namespace vcl_sal { class WMAdaptor; class NetWMAdaptor; class GnomeWMAdaptor; } enum class WMWindowType { Normal, -ModalDialogue, ModelessDialogue, Utility, Splash, diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index c8dfecb..559bc1c 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -1067,17 +1067,6 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const int nStateAtoms = 0; // set NET_WM_STATE_MODAL -if( m_aWMAtoms[ NET_WM_STATE_MODAL ] -&& pFrame->meWindowType == WMWindowType::ModalDialogue ) -{ -aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MODAL ]; -/* - *
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc
compilerplugins/clang/unusedenumconstants.py |1 + vcl/inc/CommonSalLayout.hxx |2 ++ 2 files changed, 3 insertions(+) New commits: commit 3e33fbd269e9ad3c2e72fe6f6780a77f4a5b3c78 Author: Noel GrandinDate: Wed Feb 8 13:37:50 2017 +0200 restore constant to VerticalOrientation Removed in commit f4826959c1a5b0e6d2849d4240668b2087582848 "new loplugin:unusedenumconstants". And add a comment. Change-Id: I63d6f46aa92e31db08e51e47a62104dc7d3d3359 Reviewed-on: https://gerrit.libreoffice.org/34057 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py index 9b4a821..df7c885 100755 --- a/compilerplugins/clang/unusedenumconstants.py +++ b/compilerplugins/clang/unusedenumconstants.py @@ -105,6 +105,7 @@ for d in definitionSet: "vcl/source/filter/jpeg/transupp.h", "include/vcl/bitmapex.hxx", # TransparentType "vcl/inc/sft.hxx", # CompositeFlags, WidthClass, WeightClass + "vcl/inc/CommonSalLayout.hxx", # VerticalOrientation # unit test code "cppu/source/uno/check.cxx", # general weird nonsense going on diff --git a/vcl/inc/CommonSalLayout.hxx b/vcl/inc/CommonSalLayout.hxx index 0521048..c9af545 100644 --- a/vcl/inc/CommonSalLayout.hxx +++ b/vcl/inc/CommonSalLayout.hxx @@ -90,8 +90,10 @@ public: boolIsKashidaPosValid(int nCharPos) const final override; }; +// these must match the values in vcl/source/gdi/VerticalOrientationData.cxx enum class VerticalOrientation { Upright= 0, +Rotated= 1, TransformedUpright = 2, TransformedRotated = 3 }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc vcl/Library_vcl.mk vcl/source
compilerplugins/clang/mergeclasses.results |1 vcl/Library_vcl.mk |2 vcl/inc/displayconnectiondispatch.hxx | 32 +- vcl/inc/salinst.hxx |3 vcl/inc/svdata.hxx |6 - vcl/inc/xconnection.hxx | 64 vcl/source/app/salvtables.cxx |5 vcl/source/app/svapp.cxx|4 vcl/source/app/svmain.cxx |2 vcl/source/helper/displayconnectiondispatch.cxx | 127 vcl/source/helper/xconnection.cxx | 127 11 files changed, 167 insertions(+), 206 deletions(-) New commits: commit c752aad43352478ef7065ca7ab844650811e6745 Author: Noel GrandinDate: Mon Jul 4 10:41:44 2016 +0200 merge vcl::DisplayConnectionDispatch with vcl::DisplayConnection Change-Id: I0eb83905896e1d7549a5bd4adde45e9d69209401 Reviewed-on: https://gerrit.libreoffice.org/26888 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results index aa8ff7d..1785f4c 100644 --- a/compilerplugins/clang/mergeclasses.results +++ b/compilerplugins/clang/mergeclasses.results @@ -390,7 +390,6 @@ merge tdoc_ucp::OfficeDocumentsEventListener with tdoc_ucp::ContentProvider merge toolkit::ScrollableInterface with toolkit::ScrollableWrapper merge unographic::GraphicTransformer with unographic::Graphic merge vcl::DeletionNotifier with SalFrame -merge vcl::DisplayConnectionDispatch with vcl::DisplayConnection merge vcl::ExtOutDevData with vcl::PDFExtOutDevData merge vcl::SolarThreadExecutor with vcl::solarthread::detail::GenericSolarThreadExecutor merge vclcanvas::DeviceHelper with vclcanvas::SpriteDeviceHelper diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 8068cff..307c371 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -320,11 +320,11 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/helper/canvasbitmap \ vcl/source/helper/canvastools \ vcl/source/helper/commandinfoprovider \ +vcl/source/helper/displayconnectiondispatch \ vcl/source/helper/evntpost \ vcl/source/helper/lazydelete \ vcl/source/helper/strhelper \ vcl/source/helper/threadex \ -vcl/source/helper/xconnection \ vcl/source/app/brand \ vcl/source/app/dbggui \ vcl/source/app/dndhelp \ diff --git a/vcl/inc/displayconnectiondispatch.hxx b/vcl/inc/displayconnectiondispatch.hxx index da90d29..72d6279 100644 --- a/vcl/inc/displayconnectiondispatch.hxx +++ b/vcl/inc/displayconnectiondispatch.hxx @@ -21,24 +21,46 @@ #define INCLUDED_VCL_INC_DISPLAYCONNECTIONDISPATCH_HXX #include - #include #include +#include +#include +#include +#include namespace vcl { -class DisplayConnectionDispatch: +class DisplayConnectionDispatch : public cppu::WeakImplHelper< css::awt::XDisplayConnection > { +::osl::Mutexm_aMutex; +::std::list< css::uno::Reference< css::awt::XEventHandler > > +m_aHandlers; +::std::list< css::uno::Reference< css::awt::XEventHandler > > +m_aErrorHandlers; +css::uno::Any m_aAny; public: -virtual bool dispatchEvent(void * pData, int nBytes) = 0; +DisplayConnectionDispatch(); +~DisplayConnectionDispatch() override; + +void start(); +void terminate(); + +bool dispatchEvent( void* pData, int nBytes ); + +// XDisplayConnection +virtual void SAL_CALL addEventHandler( const css::uno::Any& window, const css::uno::Reference< css::awt::XEventHandler >& handler, sal_Int32 eventMask ) throw(std::exception) override; +virtual void SAL_CALL removeEventHandler( const css::uno::Any& window, const css::uno::Reference< css::awt::XEventHandler >& handler ) throw(std::exception) override; +virtual void SAL_CALL addErrorHandler( const css::uno::Reference< css::awt::XEventHandler >& handler ) throw(std::exception) override; +virtual void SAL_CALL removeErrorHandler( const css::uno::Reference< css::awt::XEventHandler >& handler ) throw(std::exception) override; +virtual css::uno::Any SAL_CALL getIdentifier() throw(std::exception) override; -protected: -virtual ~DisplayConnectionDispatch() {} }; } + + #endif // INCLUDED_VCL_INC_DISPLAYCONNECTIONDISPATCH_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index c86d1f3..b6a93fc 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -153,8 +153,7 @@ public: voidSetEventCallback( rtl::Reference< vcl::DisplayConnectionDispatch > const & pInstance ) { m_pEventInst = pInstance; } -bool
[Libreoffice-commits] core.git: compilerplugins/clang vcl/inc
compilerplugins/clang/constantfunction.cxx | 10 ++ vcl/inc/unx/gtk/gtkdata.hxx|4 +--- 2 files changed, 11 insertions(+), 3 deletions(-) New commits: commit 6409db7838751a3671485f035b9f975eb5ca23f2 Author: Stephan Bergmann sberg...@redhat.com Date: Thu Mar 26 10:30:26 2015 +0100 loplugin:constantfunction: vcl/unx/gtk3 Change-Id: Ieedf89bebb59e783dfe13ef2d5ae7ba3347cdc62 diff --git a/compilerplugins/clang/constantfunction.cxx b/compilerplugins/clang/constantfunction.cxx index c89e6b7..4ca710f 100644 --- a/compilerplugins/clang/constantfunction.cxx +++ b/compilerplugins/clang/constantfunction.cxx @@ -128,6 +128,10 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) { if (aFileName == SRCDIR /filter/source/svg/svgreader.cxx) { return true; } +// vcl/unx/gtk3 re-using vcl/unx/gtk: +if (aFileName.find(/../../gtk/) != std::string::npos) { +return true; +} // used by code generated by python if (getFilename(pFunctionDecl-getCanonicalDecl()-getLocStart()) == SRCDIR /writerfilter/source/ooxml/OOXMLFastContextHandler.hxx) { return true; @@ -400,6 +404,12 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) { if (aFunctionName == SwVectorModifyBase::dumpAsXml) { return true; } +// vcl/unx/gtk3 re-using vcl/unx/gtk: +if (aFunctionName == GtkData::initNWF +|| aFunctionName == GtkSalFrame::EnsureAppMenuWatch) +{ +return true; +} // can't mess with the TYPEINIT macros in include/tools/rtti.hxx or the LINK macros in include/tools/link.hxx std::string aImmediateMacro = ; diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index e270204..416b583 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -176,9 +176,7 @@ public: virtual void PostUserEvent() SAL_OVERRIDE; -#if GTK_CHECK_VERSION(3,0,0) -guint32 GetLastUserEventTime( bool /* b */ ) { return GDK_CURRENT_TIME; } // horrible hack -#else +#if !GTK_CHECK_VERSION(3,0,0) virtual bool Dispatch( XEvent *pEvent ) SAL_OVERRIDE; #endif }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits