/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ #ifndef _SVXSELECTOR_HXX #define _SVXSELECTOR_HXX #include #include #include #include #include #include #include #include #include #define _SVSTDARR_USHORTS #define _SVSTDARR_STRINGSDTOR #include // SvUShorts #include #define SVX_CFGGROUP_FUNCTION 1 #define SVX_CFGFUNCTION_SLOT 2 #define SVX_CFGGROUP_SCRIPTCONTAINER 3 #define SVX_CFGFUNCTION_SCRIPT 4 struct SvxGroupInfo_Impl { USHORT nKind; USHORT nOrd; ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > xBrowseNode; ::rtl::OUString sURL; ::rtl::OUString sHelpText; BOOL bWasOpened; SvxGroupInfo_Impl( USHORT n, USHORT nr ) :nKind( n ) ,nOrd( nr ) ,xBrowseNode() ,sURL() ,sHelpText() ,bWasOpened(FALSE) { } SvxGroupInfo_Impl( USHORT n, USHORT nr, const ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& _rxNode ) :nKind( n ) ,nOrd( nr ) ,xBrowseNode( _rxNode ) ,sURL() ,sHelpText() ,bWasOpened(FALSE) { } SvxGroupInfo_Impl( USHORT n, USHORT nr, const ::rtl::OUString& _rURL, const ::rtl::OUString& _rHelpText ) :nKind( n ) ,nOrd( nr ) ,xBrowseNode() ,sURL( _rURL ) ,sHelpText( _rHelpText ) ,bWasOpened(FALSE) { } }; typedef SvxGroupInfo_Impl* SvxGroupInfoPtr; SV_DECL_PTRARR_DEL(SvxGroupInfoArr_Impl, SvxGroupInfoPtr, 5, 5) class ImageProvider { public: virtual ~ImageProvider() {} virtual Image GetImage( const rtl::OUString& rCommandURL ) = 0; }; class SvxConfigFunctionListBox_Impl : public SvTreeListBox { friend class SvxConfigGroupListBox_Impl; Timer aTimer; SvLBoxEntry* pCurEntry; SvxGroupInfoArr_Impl aArr; SvLBoxEntry* m_pDraggingEntry; DECL_LINK( TimerHdl, Timer* ); virtual void MouseMove( const MouseEvent& rMEvt ); public: SvxConfigFunctionListBox_Impl( Window*, const ResId& ); ~SvxConfigFunctionListBox_Impl(); void ClearAll(); String GetHelpText( SvLBoxEntry *pEntry ); using Window::GetHelpText; SvLBoxEntry* GetLastSelectedEntry(); void FunctionSelected(); // drag n drop methods virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); virtual DragDropMode NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* ); virtual void DragFinished( sal_Int8 ); }; class SvxConfigGroupListBox_Impl : public SvTreeListBox { SvxGroupInfoArr_Impl aArr; bool m_bShowSlots; SvxConfigFunctionListBox_Impl* pFunctionListBox; ImageProvider* m_pImageProvider; ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > m_xFrame; ::com::sun::star::uno::Reference < ::com::sun::star::container::XNameAccess > m_xModuleCommands; Image m_hdImage; Image m_hdImage_hc; Image m_libImage; Image m_libImage_hc; Image m_macImage; Image m_macImage_hc; Image m_docImage; Image m_docImage_hc; ::rtl::OUString m_sMyMacros; ::rtl::OUString m_sProdMacros; Image GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > node, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName ); private: void fillScriptList( const ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& _rxRootNode, SvLBoxEntry* _pParentEntry, bool _bCheapChildsOnDemand ); protected: virtual void RequestingChilds( SvLBoxEntry *pEntry); virtual BOOL Expand( SvLBoxEntry* pParent ); using SvListView::Expand; public: SvxConfigGroupListBox_Impl ( Window* pParent, const ResId&, bool _bShowSlots, const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >& xFrame ); ~SvxConfigGroupListBox_Impl(); void Init(); void Open( SvLBoxEntry*, BOOL ); void ClearAll(); void GroupSelected(); void SetFunctionListBox( SvxConfigFunctionListBox_Impl *pBox ) { pFunctionListBox = pBox; } void SetImageProvider( ImageProvider* provider ) { m_pImageProvider = provider; } }; class SvxScriptSelectorDialog : public ModelessDialog { FixedText aDialogDescription; FixedText aGroupText; SvxConfigGroupListBox_Impl aCategories; FixedText aFunctionText; SvxConfigFunctionListBox_Impl aCommands; OKButton aOKButton; CancelButton aCancelButton; HelpButton aHelpButton; FixedLine aDescription; FixedText aDescriptionText; BOOL m_bShowSlots; Link m_aAddHdl; DECL_LINK( ClickHdl, Button * ); DECL_LINK( SelectHdl, Control* ); DECL_LINK( FunctionDoubleClickHdl, Control* ); void UpdateUI(); void ResizeControls(); public: SvxScriptSelectorDialog ( Window* pParent = NULL, BOOL bShowSlots = FALSE, const ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame >& xFrame = 0 ); ~SvxScriptSelectorDialog ( ); void SetAddHdl( const Link& rLink ) { m_aAddHdl = rLink; } const Link& GetAddHdl() const { return m_aAddHdl; } void SetImageProvider( ImageProvider* provider ) { aCategories.SetImageProvider( provider ); } String GetScriptURL() const; String GetSelectedDisplayName(); String GetSelectedHelpText(); void SetRunLabel(); void SetDialogDescription(const String& rDescription); }; #endif -4'>distro/mimo/mimo-7-4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-26clang-tidy modernize-pass-by-value in comphelperNoel Grandin
Change-Id: I29074d801eaef57f160ce14b943b21831b327ecf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134979 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-29loplugin:finalclass in comphelperNoel Grandin
Change-Id: Ic64151191e46dff81c0a5cb8377f89e1e4afb269 Reviewed-on: https://gerrit.libreoffice.org/81624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): comphelperStephan Bergmann
Change-Id: Ie0d3604b8742aed139131d523f6c7371bc02b7c3 Reviewed-on: https://gerrit.libreoffice.org/76691 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-24find-unneeeded-includes: don't propose to replace o3tl/deleter.hxxGabor Kelemen
As seen while analysing sw/source/core/inc/DocumentChartDataProviderManager.hxx replacing o3tl/deleter.hxx with fw declaration does not work, it compiles only when it is transitively included. This also removes mistakenly added fw declarations and now unnecessary IwyuFilter blacklist items Change-Id: I2d631f0693dbfd0bb0e62218a525113042c9a907 Reviewed-on: https://gerrit.libreoffice.org/66750 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-20loplugin:unusedfields - look for fields that can be const, in comphelperNoel Grandin
idea from tml. Extend the unusedfields plugin to find fields that are only assigned in the constructor. Change-Id: I258d3581afbe651d53ce730c9ba27a4598cd9248 Reviewed-on: https://gerrit.libreoffice.org/57733 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-06coverity#1401328 Uncaught exceptionCaolán McNamara
Change-Id: I358b3c410bc7871c7184da4959b24b9f52b4a4d7 Reviewed-on: https://gerrit.libreoffice.org/45892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-18silence some coverity warningsCaolán McNamara
Change-Id: I5a530e37156b5cd36e8a07ac20851880a46f520d Reviewed-on: https://gerrit.libreoffice.org/44875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-05-09gnome-documents: hold solarmutex on dtor patch as wellCaolán McNamara
Change-Id: I75fe71612116d435606c37185bf55b450425fc25 Reviewed-on: https://gerrit.libreoffice.org/37396 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-10tdf#104830, need an own termination listener for lib objectsMarkus Mohrhard
The destruction of the SwDLL object happens already through the normal termination listener but the other termination listeners might still depend on it. Also the outstanding events might need the SwDLL instance to be still around. This makes the destruction of the instance explicit and at a time when it should be safe. We should use the same code for calc, impress, math and base as well. Change-Id: I50b8f30426f5a4a54e362e748fe962839abca73e Reviewed-on: https://gerrit.libreoffice.org/32856 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-03-30loplugin:nullptr: Find some more cases in templatesStephan Bergmann
Change-Id: I1f127d56e40b04f2b4df85c0afbcfd424d68a8cc