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 __SVTOOLS_PLACE_HXX__
11 : : #define __SVTOOLS_PLACE_HXX__
12 : :
13 : : #include <tools/urlobj.hxx>
14 : :
15 [ # # ]: 0 : class Place
16 : : {
17 : : private:
18 : : OUString msName;
19 : : INetURLObject maUrl;
20 : :
21 : : bool mbEditable;
22 : :
23 : : public:
24 : :
25 : 0 : Place( OUString sName, rtl::OUString sUrl, bool bEditable = false ) :
26 : : msName( sName ),
27 : : maUrl( sUrl ),
28 [ # # ]: 0 : mbEditable( bEditable ) {};
29 : :
30 : 0 : void SetName(const OUString& aName ) { msName = aName; }
31 : 0 : void SetUrl(const OUString& aUrl ) { maUrl.SetURL( aUrl ); }
32 : :
33 : 0 : OUString& GetName( ) { return msName; }
34 : 0 : OUString GetUrl( ) { return maUrl.GetMainURL( INetURLObject::NO_DECODE ); }
35 : 0 : INetURLObject& GetUrlObject( ) { return maUrl; }
36 : 0 : bool IsLocal( ) { return maUrl.GetProtocol() == INET_PROT_FILE; }
37 : 0 : bool IsEditable( ) { return mbEditable; }
38 : : };
39 : :
40 : : #endif // __SVTOOLS_PLACE_HXX__
41 : :
42 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|