/* -*- 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 namespace com :: sun :: star :: ucb { class XContent; } // class SvtFileView ----------------------------------------------------- class SvtFileView_Impl; struct SvtContentEntry; /// the result of an action in the FileView enum FileViewResult { eSuccess, eFailure, eTimeout, eStillRunning }; enum FileViewMode { eDetailedList, eIcon }; /// describes parameters for doing an action on the FileView asynchronously struct FileViewAsyncAction { sal_uInt32 nMinTimeout; /// minimum time to wait for a result, in milliseconds sal_uInt32 nMaxTimeout; /// maximum time to wait for a result, in milliseconds, until eTimeout is returned Link aFinishHandler; /// the handler to be called when the action is finished. Called in every case, no matter of the result FileViewAsyncAction() : nMinTimeout(0), nMaxTimeout (0) { } }; class SvtFileView { private: std::unique_ptr mpImpl; css::uno::Sequence maDenyList; DECL_LINK(HeaderSelect_Impl, int, void); public: SvtFileView(weld::Window* pTopLevel, std::unique_ptr xTreeView, std::unique_ptr xIconView, bool bOnlyFolder, bool bMultiSelection, bool bShowType = true); ~SvtFileView(); void SetViewMode( FileViewMode eMode ); const OUString& GetViewURL() const; OUString GetURL(const weld::TreeIter& rEntry) const; OUString GetCurrentURL() const; bool GetParentURL( OUString& _rParentURL ) const; void CreatedFolder( const OUString& rUrl, const OUString& rNewFolder ); void set_help_id(const OString& rHelpId); OString get_help_id() const; void grab_focus(); bool has_focus() const; OUString get_selected_text() const; weld::Widget* identifier() const; // just to uniquely identify this widget /** initialize the view with the content of a folder given by URL, and apply an immediate filter @param rFolderURL the URL of the folder whose content is to be read @param rFilter the initial filter to be applied @param pAsyncDescriptor If not , this struct describes the parameters for doing the action asynchronously. */ FileViewResult Initialize( const OUString& rFolderURL, const OUString& rFilter, const FileViewAsyncAction* pAsyncDescriptor, const css::uno::Sequence< OUString >& rDenyList ); /** reads the current content of the current folder again, and applies the given filter to it Note 1: The folder is really read a second time. This implies that any new elements (which were not present when you called Initialize the last time) are now displayed. Note 2: This method must not be called when you previously initialized the view from a sequence of strings, or a UNO content object. @param rFilter the filter to be applied @param pAsyncDescriptor If not , this struct describes the parameters for doing the action asynchronously. */ FileViewResult ExecuteFilter( const OUString& rFilter, const FileViewAsyncAction* pAsyncDescriptor ); /** cancels a running async action (if any) @seealso Initialize @seealso ExecuteFilter @seealso FileViewAsyncAction */ void CancelRunningAsyncAction(); /** initializes the view with the parent folder of the current folder @param rNewURL the URL of the folder which we just navigated to @param pAsyncDescriptor If not , this struct describes the parameters for doing the action asynchronously. */ FileViewResult PreviousLevel( const FileViewAsyncAction* pAsyncDescriptor ); void SetNoSelection(); void SetSelectHdl( const Link& rHdl ); void SetDoubleClickHdl( const Link& rHdl ); void SetOpenDoneHdl( const Link& rHdl ); sal_uInt32 GetSelectionCount() const; SvtContentEntry* FirstSelected() const; void selected_foreach(const std::function& func); void EnableDelete( bool bEnable ); // save and load column size and sort order OUString GetConfigString() const; void SetConfigString( std::u16string_view rCfgStr ); void EndInplaceEditing(); ::std::vector< SvtContentEntry > GetContent(); }; // struct SvtContentEntry ------------------------------------------------ struct SvtContentEntry { bool mbIsFolder; OUString maURL; SvtContentEntry( OUString aURL, bool bIsFolder ) : mbIsFolder( bIsFolder ), maURL(std::move( aURL )) {} }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /libreoffice-7-1+backports'>distro/lhm/libreoffice-7-1+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-16XUnoTunnel->dynamic_cast in connectivityyNoel Grandin
Change-Id: Ibe5e87a1ef1bdc11451e8fe240d017f1ef60dfe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145556 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-04-20loplugin:passstuffbyrefNoel Grandin
Change-Id: I336fd329b577b6fa141265d8bc7ce67784bd7306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-23tdf#124176 Use pragma once in connectivityVincent LE GARREC
Change-Id: I4a57cd6dcbc180fe9a378d2713c687a66476ee79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111979 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-18compact namespace: connectivityNoel Grandin
Change-Id: I4f7999672ba15d9f453ded9accb3991b8150c32d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-16tdf#42949 Fix IWYU warnings in connectivity/*/*hxxGabor Kelemen
Except for non Linux specific parts: connectivity/source/drivers/macab/ connectivity/source/inc/ado/ Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iba6d0cd0effdac777be6fbc8f12f2e92cae47887 Reviewed-on: https://gerrit.libreoffice.org/84174 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-09-06tdf#39593 use isUnoTunnelIdArkadiy Illarionov
Adapt getUnoTunnelId methods where required: rename or make public. Change-Id: I0fd2120bf9f0ff1aa690329a65ff64a154c89315 Reviewed-on: https://gerrit.libreoffice.org/78680 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-22loplugin:constmethod in connectivityNoel Grandin
Change-Id: Idd81089279b23d93276107d84446c77e49d42b77 Reviewed-on: https://gerrit.libreoffice.org/77933 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-20Fix typoAndrea Gelmini
Change-Id: I6a22d7b302bd8ef8e06d93f73a13929625a444f7 Reviewed-on: https://gerrit.libreoffice.org/70996 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-11Fix typosAndrea Gelmini
Change-Id: I7fd04d0e09fcbf6d9f2a5ec617f23e08f7bc5fa3 Reviewed-on: https://gerrit.libreoffice.org/52697 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-20inline typedefs in connectivity/StdTypeDefsNoel Grandin
Change-Id: I614833ed2418ff99057c7d496ddb64f06e8395db Reviewed-on: https://gerrit.libreoffice.org/46809 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-07loplugin:countusersofdefaultparams in connectivityNoel Grandin
Change-Id: Ia613257f2de1395c6629c1c37026ed48d4b927c8 Reviewed-on: https://gerrit.libreoffice.org/45854 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>
2016-10-27Remove bogus comments about ~IPropertyArrayHelper not being virtualStephan Bergmann
...which isn't true at least ever since b525a3115f54576017a576ff842dede5e2e3545d "initial import", but got copy/pasted all over the place Change-Id: I47d3d8a594aef3ac3736d7176ae964a118821014
2016-05-30com::sun::star->css in connectivityNoel Grandin
Change-Id: I9489e92dc89a6d83a26ff4f0d9aad26acd28ad9f Reviewed-on: https://gerrit.libreoffice.org/25537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-06Avoid reserved identifiersStephan Bergmann
Change-Id: I2217920ced336189a94c0a5d1e3ac0ccd3912881
2015-10-30loplugin:unusedmethodsNoel Grandin
Change-Id: Id3b5cd75d4357336ed592ef11a3f34d209f8e95f Reviewed-on: https://gerrit.libreoffice.org/19636 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2014-06-04connectivity: fix includesThomas Arnhold
Change-Id: I5d5dc6871789865189c78fe9135e7f8bff829489