Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : */
9 : :
10 : : #ifndef __SFX2_TEMPLATEREMOTEVIEW_HXX__
11 : : #define __SFX2_TEMPLATEREMOTEVIEW_HXX__
12 : :
13 : : #include <sfx2/templateabstractview.hxx>
14 : : #include <sfx2/templateproperties.hxx>
15 : :
16 : : #include <com/sun/star/ucb/XCommandEnvironment.hpp>
17 : :
18 : : class TemplateRemoteViewItem;
19 : :
20 : : class TemplateRemoteView : public TemplateAbstractView
21 : : {
22 : : public:
23 : :
24 : : TemplateRemoteView (Window *pParent, WinBits nWinStyle, bool bDisableTransientChildren);
25 : :
26 : : virtual ~TemplateRemoteView ();
27 : :
28 : : // Load repositories from user settings.
29 : : virtual void Populate ();
30 : :
31 : : virtual void reload ();
32 : :
33 : : virtual void filterTemplatesByApp (const FILTER_APPLICATION &eApp);
34 : :
35 : : virtual void showOverlay (bool bVisible);
36 : :
37 : : void setOverlayChangeNameHdl (const Link &rLink);
38 : :
39 : : bool loadRepository (const sal_uInt16 nRepositoryId, bool bRefresh);
40 : :
41 : 0 : const std::vector<TemplateRemoteViewItem*>& getRepositories () const { return maRepositories; }
42 : :
43 : : bool insertRepository (const OUString &rName, const OUString &rURL);
44 : :
45 : : bool deleteRepository (const sal_uInt16 nRepositoryId);
46 : :
47 : : void syncRepositories () const;
48 : :
49 : : private:
50 : :
51 : : DECL_LINK(ChangeNameHdl, TemplateView*);
52 : :
53 : : private:
54 : :
55 : : bool mbIsSynced;
56 : : Link maChangeNameHdl;
57 : : std::vector<TemplateRemoteViewItem*> maRepositories;
58 : : com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xCmdEnv;
59 : : };
60 : :
61 : : #endif // __SFX2_TEMPLATEREMOTEVIEW_HXX__
62 : :
63 : :
64 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|