nss: upgrade to release 3.73
[LibreOffice.git] / include / svtools / place.hxx
blob2cae08bf2e7ab4a04c5aded62b65b327d1d341ea
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #pragma once
12 #include <tools/urlobj.hxx>
14 class Place
16 private:
17 OUString msName;
18 INetURLObject maUrl;
20 bool mbEditable;
22 public:
24 Place( const OUString& sName, const OUString& sUrl, bool bEditable = false ) :
25 msName( sName ),
26 maUrl( sUrl ),
27 mbEditable( bEditable ) {};
29 void SetName(const OUString& aName ) { msName = aName; }
30 void SetUrl(const OUString& aUrl ) { maUrl.SetURL( aUrl ); }
32 OUString& GetName( ) { return msName; }
33 OUString GetUrl( ) const { return maUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ); }
34 INetURLObject& GetUrlObject( ) { return maUrl; }
35 bool IsLocal( ) const { return maUrl.GetProtocol() == INetProtocol::File; }
36 bool IsEditable( ) const { return mbEditable; }
39 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */