Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / unotools / pathoptions.hxx
blob6388a54bcc5fe3225d57ea2d9250db0b1e13549f
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
20 #define INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
22 #include <rtl/ustring.hxx>
23 #include <unotools/unotoolsdllapi.h>
24 #include <unotools/options.hxx>
26 #define SVT_SEARCHPATH_DELIMITER ';'
28 class SvtPathOptions_Impl;
30 /*! Handle various defined paths
32 All path functions return URLs!
34 class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtPathOptions final : public utl::detail::Options
36 private:
37 std::shared_ptr<SvtPathOptions_Impl> pImpl;
39 public:
41 enum class Paths : sal_uInt16
43 AddIn,
44 AutoCorrect,
45 AutoText,
46 Backup,
47 Basic,
48 Bitmap,
49 Config,
50 Dictionary,
51 Favorites,
52 Filter,
53 Gallery,
54 Graphic,
55 Help,
56 IconSet,
57 Linguistic,
58 Module,
59 Palette,
60 Plugin,
61 Storage,
62 Temp,
63 Template,
64 UserConfig,
65 Work,
66 Classification,
67 UIConfig,
68 Fingerprint,
69 NumberText,
70 LAST // should always be the last element
74 SvtPathOptions();
75 virtual ~SvtPathOptions() override;
77 // get the paths, not const because of using a mutex
78 const OUString& GetAddinPath() const;
79 const OUString& GetAutoCorrectPath() const;
80 const OUString& GetAutoTextPath() const;
81 const OUString& GetBackupPath() const;
82 const OUString& GetBasicPath() const;
83 const OUString& GetBitmapPath() const;
84 const OUString& GetConfigPath() const;
85 const OUString& GetDictionaryPath() const;
86 const OUString& GetFavoritesPath() const;
87 const OUString& GetFilterPath() const;
88 const OUString& GetGalleryPath() const;
89 const OUString& GetGraphicPath() const;
90 const OUString& GetHelpPath() const;
91 const OUString& GetLinguisticPath() const;
92 const OUString& GetModulePath() const;
93 const OUString& GetIconsetPath() const;
94 const OUString& GetPalettePath() const;
95 const OUString& GetPluginPath() const;
96 const OUString& GetStoragePath() const;
97 const OUString& GetTempPath() const;
98 const OUString& GetTemplatePath() const;
99 const OUString& GetUserConfigPath() const;
100 const OUString& GetWorkPath() const;
101 const OUString& GetFingerprintPath() const;
102 const OUString& GetNumbertextPath() const;
103 const OUString& GetClassificationPath() const;
105 // set the paths
106 void SetAddinPath( const OUString& rPath );
107 void SetAutoCorrectPath( const OUString& rPath );
108 void SetAutoTextPath( const OUString& rPath );
109 void SetBackupPath( const OUString& rPath );
110 void SetBasicPath( const OUString& rPath );
111 void SetBitmapPath( const OUString& rPath );
112 void SetConfigPath( const OUString& rPath );
113 void SetDictionaryPath( const OUString& rPath );
114 void SetFavoritesPath( const OUString& rPath );
115 void SetFilterPath( const OUString& rPath );
116 void SetGalleryPath( const OUString& rPath );
117 void SetGraphicPath( const OUString& rPath );
118 void SetHelpPath( const OUString& rPath );
119 void SetLinguisticPath( const OUString& rPath );
120 void SetModulePath( const OUString& rPath );
121 void SetPalettePath( const OUString& rPath );
122 void SetPluginPath( const OUString& rPath );
123 void SetStoragePath( const OUString& rPath );
124 void SetTempPath( const OUString& rPath );
125 void SetTemplatePath( const OUString& rPath );
126 void SetUserConfigPath( const OUString& rPath );
127 void SetWorkPath( const OUString& rPath );
129 OUString SubstituteVariable( const OUString& rVar ) const;
130 OUString ExpandMacros( const OUString& rPath ) const;
131 OUString UseVariable( const OUString& rVar ) const;
132 bool SearchFile( OUString& rIniFile, Paths ePath = Paths::UserConfig );
135 #endif // INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */