/* -*- 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/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #pragma once #include #include #include #include #include #include #include #include #include #include "providermap.hxx" #include #include namespace com::sun::star::ucb { class XCommandInfo; struct GlobalTransferCommandArgument2; } class UniversalContentBroker : public cppu::WeakImplHelper< css::ucb::XUniversalContentBroker, css::lang::XServiceInfo, css::lang::XInitialization, css::util::XChangesListener> { public: explicit UniversalContentBroker( const css::uno::Reference< css::uno::XComponentContext >& xContext ); virtual ~UniversalContentBroker() override; // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; // XComponent virtual void SAL_CALL dispose() override; virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& Listener ) override; virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& Listener ) override; // XInitialization virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; // XContentProviderManager virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL registerContentProvider( const css::uno::Reference< css::ucb::XContentProvider >& Provider, const OUString& Scheme, sal_Bool ReplaceExisting ) override; virtual void SAL_CALL deregisterContentProvider( const css::uno::Reference< css::ucb::XContentProvider >& Provider, const OUString& Scheme ) override; virtual css::uno::Sequence< css::ucb::ContentProviderInfo > SAL_CALL queryContentProviders() override; virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL queryContentProvider( const OUString& Identifier ) override; // XContentProvider virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent( const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier ) override; virtual sal_Int32 SAL_CALL compareContentIds( const css::uno::Reference< css::ucb::XContentIdentifier >& Id1, const css::uno::Reference< css::ucb::XContentIdentifier >& Id2 ) override; // XContentIdentifierFactory virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL createContentIdentifier( const OUString& ContentId ) override; // XCommandProcessor virtual sal_Int32 SAL_CALL createCommandIdentifier() override; virtual css::uno::Any SAL_CALL execute( const css::ucb::Command& aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) override; virtual void SAL_CALL abort( sal_Int32 CommandId ) override; // XCommandProcessor2 virtual void SAL_CALL releaseCommandIdentifier(sal_Int32 aCommandId) override; // XChangesListener virtual void SAL_CALL changesOccurred( const css::util::ChangesEvent& Event ) override; // XEventListener ( base of XChangesLisetenr ) virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override; private: css::uno::Reference< css::ucb::XContentProvider > queryContentProvider( const OUString& Identifier, bool bResolved ); static css::uno::Reference< css::ucb::XCommandInfo > getCommandInfo(); /// @throws css::uno::Exception void globalTransfer( const css::ucb::GlobalTransferCommandArgument2 & rArg, const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ); /// @throws css::uno::Exception css::uno::Any checkIn( const css::ucb::CheckinArgument& rArg, const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ); /// @throws css::uno::RuntimeException void configureUcb(); bool getContentProviderData( const OUString & rKey1, const OUString & rKey2, ucbhelper::ContentProviderDataList & rListToFill); void prepareAndRegister( const ucbhelper::ContentProviderDataList& rData); css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::util::XChangesNotifier > m_xNotifier; css::uno::Sequence< css::uno::Any > m_aArguments; ProviderMap_Impl m_aProviders; osl::Mutex m_aMutex; std::unique_ptr> m_pDisposeEventListeners; sal_Int32 m_nCommandId; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ibreoffice-5-2+backports'>distro/lhm/libreoffice-5-2+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-07clang-tidy modernize-pass-by-value in scNoel Grandin
Change-Id: Ia7ff651d1cbc119b36a9f8052594d03650988f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137848 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-23tdf#124176 Use pragma once in s*Vincent LE GARREC
sc, scaddins, sccomp, scripting Change-Id: Ia99fec9e238033821cb784810edd4762c09bd5db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112049 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-01-25tdf#92456 improve VLOOKUP perfNoel Grandin
shave 5% of the time here - ref-counting triggered by copying svl::SharedString is significant, so return by const& instead of by value Change-Id: Ic702632da45d75dddab33d6ce1e6f1097ff70de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109900 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-12Revert "loplugin:constfields in sc"Noel Grandin
This reverts commit fb1d3b580763a333bbbfe115d09e1b5cd8849675. Now that we know that making fields has negative side effects like disabling assignment operator generation. Change-Id: Ib48334ffbeb2c768896dd8ced6818aa0b9910b0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90333 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-14sc: rowcol: tdf#50916 convert Valid* methodsNoel Grandin
which means we end up passing around ScDocument* __everywhere__ Change-Id: I44d235ca5e9d57519f068b6880ee7d66f3ceb529 Reviewed-on: https://gerrit.libreoffice.org/83548 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-13sc: rowcol: tdf#50916 create ScSheetLimits to hold by rtl::ReferenceNoel Grandin
ScTokenArray sometimes outlives the ScDocument that created it, which means it accesses dead data when it tries to validate columns and rows. So create the ScSheetLimits class, which ScTokenArray can hold by reference counted pointer. Change-Id: Ic5771734fe4962d12f024fc1b29232124c14208a Reviewed-on: https://gerrit.libreoffice.org/85117 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-12sc: rowcol: tdf#50916 pass ScDocument to the token classesNoel Grandin
needed to create a fake ScDocument for the external ref manager, since it has no ScDocument at all Change-Id: Ia786ac291133e3c438694e81ecfb2590729a853d Reviewed-on: https://gerrit.libreoffice.org/85050 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-18cid#1249470 Uninitialized scalar fieldCaolán McNamara
use comment as an annotation Change-Id: Ia8b5ba157d0d240c4a3e6beed74d66e6d34d1a32 Reviewed-on: https://gerrit.libreoffice.org/83067 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-05make some classes module-privateNoel Grandin
Change-Id: Ice9a57eedb166672dbdfae6da2a172ab77566a19 Reviewed-on: https://gerrit.libreoffice.org/81983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-01loplugin:finalclasses in sc/incNoel Grandin
Change-Id: I6a08a86262deae4bed3a05f77d3041a568f23595 Reviewed-on: https://gerrit.libreoffice.org/81853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-31tdf#42949 Fix IWYU warnings in sc/inc; sc/source/filter/inc/Gabor Kelemen
Found with bin/find-unneeded-includes after recent improvements - remove UNO headers from blacklist - remove newly found unneeded fw declarations - fix up some not self contained headers Change-Id: I605656bc98a64640a78d2ff4de9c7c37326033cf Reviewed-on: https://gerrit.libreoffice.org/62264 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-15loplugin:constfields in scNoel Grandin
Change-Id: If326175d571d15752efd1b63df45b2bc785f7541 Reviewed-on: https://gerrit.libreoffice.org/61653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-02Silence new Clang trunk -Wdefaulted-function-deletedStephan Bergmann
This mostly affects explicitly defaulted functions that had recently been user- declared to silence new GCC trunk -Wdeprecated-copy. It is not entirely clear to me what the best approach is overall, see my mail <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20181001/245321.html> "Re: r343285 - [cxx2a] P0641R2: (Some) type mismatches on defaulted functions only", but lets just explicitly delete those functions for now. Change-Id: If8c72f612f67a8feb8b03c2fb988c807e704ef03 Reviewed-on: https://gerrit.libreoffice.org/61259 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-16remove mempoolNoel Grandin
we've been using the normal memory allocator instead of the sal slab allocator ever since commit bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 Date: Wed Nov 15 16:52:44 2017 +0530 Disable custom allocator Change-Id: I3383962cedb85d56fbec695398901f6ff7057651 Reviewed-on: https://gerrit.libreoffice.org/58577 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-11loplugin:unusedmethodsNoel Grandin
mostly this seems to be fallout from commit 089a4f245325a5be5cd5951d85305d791b4d9cb6 Date: Mon Aug 6 14:55:04 2018 +0200 remove Calc's software interpreter Change-Id: Ib48696e724969a28a7d41155ba1573fd9cd58be6 Reviewed-on: https://gerrit.libreoffice.org/58869 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27sc: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: I4efe3eb088e5f9096be87dd8240504768755112b Reviewed-on: https://gerrit.libreoffice.org/58096 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-06-18tdf#42949 Fix IWYU warnings in sc/inc/[Tt]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here and a bit of fallout management. Change-Id: I347377d7bb2a0cf8acda1ad28b5cc79bb954ab7d Reviewed-on: https://gerrit.libreoffice.org/55726 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-12move implementation of ScMatrixCellResultToken copy-constructorJochen Nitschke
from header to source file. Revert "no matching function for call to 'intrusive_ptr_add_ref'" This reverts commit a49be6bd585ac4610cbf04ca3525f2d90a770367. Also reverts small part of commit fd3fc84e590fc84f62ce3bace668fe40a25f54b5 Change-Id: I5b48cf7e9f830ec411202c5364d0caac76449095 Reviewed-on: https://gerrit.libreoffice.org/47680 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-09no matching function for call to 'intrusive_ptr_add_ref'Stephan Bergmann
...with clang-cl, in instantiation of member function 'boost::intrusive_ptr<const ScMatrix>::intrusive_ptr' requested at sc/inc/token.hxx(291,20): class SC_DLLPUBLIC ScMatrixCellResultToken : public formula::FormulaToken Change-Id: Id8485d937744759ddbe36e8508c54e2a996df4d2 Reviewed-on: https://gerrit.libreoffice.org/47672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-02clang-tidy modernize-use-equals-default in sc/source/core/toolJochen Nitschke
remove default-able copy-ctors/assignments Change-Id: I40255393899275a5825ffef4df3f08c6ce5348c2 Reviewed-on: https://gerrit.libreoffice.org/47140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-30fix ScJumpMatrixToken memory handlingNoel Grandin
ScJumpMatrixToken unconditionally deletes the ScJumpMatrix pointer it receives. But it's copy constructor also just copies that pointer, meaning that we could end up freeing that pointer twice. ScJumpMatrix has no copy constructor, so I just managed it via shared_ptr. Change-Id: I9cf13312afb4f2869fdc878e5f34060614e31842 Reviewed-on: https://gerrit.libreoffice.org/41728 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-24loplugin:constparam in sc part3Noel Grandin
Change-Id: I8abc44b9f0bcd5e39fd8a94abafaf80aadcd26ca Reviewed-on: https://gerrit.libreoffice.org/41496 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-22Introduce ScRefListToken::mbArrayResult for reference results, tdf#58874Eike Rathke
Change-Id: Icd077a82ab0c951667a6566d5c5d47084c46d20d
2017-04-03remove hack for non DBG_UTIL buildsJochen Nitschke
always use a 8bit enum for StackVar correct StackVar types for opcode opSep and opClose in unit test and test them. Change-Id: I89fac97d791eb12667ce5218ff31e798c8711e10 Reviewed-on: https://gerrit.libreoffice.org/36000 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-25loplugin: unnecessary destructor scNoel Grandin
Change-Id: I877bc0927aff7d175c1978fdf3db55d2e048d3b9 Reviewed-on: https://gerrit.libreoffice.org/33510 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16tdf#96475 restore the EmptyDisplayedAsString condition during loadEike Rathke
So also "empty" result cells with a number format applied are displayed empty, instead of 1899-12-30 for example. Change-Id: I5280d0213b8a809a04c5cb152ded58028706493a
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-05-24loplugin:unusedmethods in scNoel Grandin
Change-Id: Ic378126a30be853d10fe174c451cee3c6ded404f Reviewed-on: https://gerrit.libreoffice.org/25109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26C++11: disable ctors instead of not implementing them (sc)Jochen Nitschke
replace the old declare and don't implement pattern with C++11 delete keyword Change-Id: I96c71d512d8dab4ad7c806c2e871604163fc49c1 Reviewed-on: https://gerrit.libreoffice.org/24399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-04-14loplugin:passstuffbyref in scNoel Grandin
Change-Id: I75c483972db787ea9c941eaac0df023f1929b09c
2016-03-18Resolves: tdf#96915 implement other-sheet-local named expressionsEike Rathke
Change-Id: I0d62536caa6eb455473a755067abc585662cd9a5
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I765d2a600f9c57da50c85354688e3ae796750d94
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-07-31TableRef: implement ScTableRefToken::IsGlobal() overrideEike Rathke
To diustinguish from formula::FormulaToken::IsGlobal() virtual dummy implementation error message and spot code that possibly makes false assumptions about svIndex tokens. Change-Id: I5c4a62dc5fdf3a97b7a4d143ce1e419f15a8fdb0
2015-06-21TableRef: make ThisRow work in named expressionsEike Rathke
... including reference update as named expressions don't hold RPN. Change-Id: Ieea19e24f1dcf71d489ff0249bc7d3644e4f0d2b
2015-06-17Resolves: tdf#86305 clone upper left of matrix result if double tokenEike Rathke
Change-Id: I541577e0b99b0144a755e5755adc890c0ca8d204
2015-04-17TableRef: prepare ScTableRefToken to hold the resulting area in RPNEike Rathke
Change-Id: Iaf76cf298dd2f9f9b8d9fb56ecb9e7b29fdc6ca1
2015-04-07TableRef: only #Headers,#Data or #Data,#Totals combinations allowedEike Rathke
According to https://msdn.microsoft.com/en-us/library/dd906358.aspx Take them by their words. Change-Id: I832c860695833ad04338ebd56c5b56805f1aa0a0
2015-03-13add ScTableRefToken::AddItem()Eike Rathke
Change-Id: Iab74e027d9929bc100ad92c2126c17fca1e2e46a
2015-03-12TableRef: use existing ALL instead of yet another bitEike Rathke
Change-Id: I7f8cdba40d1d455927557c31867b822afb9dff7e
2015-03-11TableRef: possible item combinationsEike Rathke
Change-Id: Id02fb58bbb9419d7c70d8265cb990ffc8ebc68ec
2015-03-11TableRef: need to distinguish between entire table and All specifiedEike Rathke
Change-Id: I507b6dfc0ce1a7b0f28142b05e15834ad6e6ac80
2015-03-10virtual ScTableRefToken::SetIndex(); of course..Eike Rathke
Change-Id: I4a43ea664e9db2bb44e0e7f089a71abf6f572b1e
2015-03-05add Item enum to ScTableRefTokenEike Rathke
Change-Id: Ie35d717fd55e6bbde958d3f2be4dac5f489467f9
2015-03-05introduce ScTableRefTokenEike Rathke
Change-Id: Id6f7f0fbc120072cf6a61229838e39c4a53aeee7
2015-02-07loplugin:deletedspecialStephan Bergmann
Change-Id: Ieeca9fe957e7bc6a4cf9d7d6ac57f9ed150aab78
2014-12-22Blind fix for MSVC buildStephan Bergmann
Change-Id: Ib5ed5a6bd598df660c3b865782e6a639e2c657ee
2014-12-22remove scmatrix.hxx include from a header fileMarkus Mohrhard
Change-Id: I153abe3a9c7ff784da16785fd9da8045c3581d8a