LibreOffice Module unotools (master) 1
pathoptions.hxx
Go to the documentation of this file.
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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
20#define INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
21
22#include <rtl/ustring.hxx>
24#include <unotools/options.hxx>
25
26#define SVT_SEARCHPATH_DELIMITER ';'
27
29
35{
36private:
37 std::shared_ptr<SvtPathOptions_Impl> pImpl;
38
39public:
40
41 enum class Paths : sal_uInt16
42 {
43 AddIn,
44 AutoCorrect,
45 AutoText,
46 Backup,
47 Basic,
48 Bitmap,
49 Config,
51 Favorites,
52 Filter,
53 Gallery,
54 Graphic,
55 Help,
56 IconSet,
57 Linguistic,
58 Module,
59 Palette,
60 Plugin,
61 Storage,
62 Temp,
64 UserConfig,
65 Work,
66 Classification,
67 UIConfig,
68 Fingerprint,
69 NumberText,
70 LAST // should always be the last element
71 };
72
73
75 virtual ~SvtPathOptions() override;
76
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;
104
105 // set the paths
106 void SetAutoTextPath( const OUString& rPath );
107 void SetBasicPath( const OUString& rPath );
108 void SetTempPath( const OUString& rPath );
109
110 OUString SubstituteVariable( const OUString& rVar ) const;
111 OUString ExpandMacros( const OUString& rPath ) const;
112 OUString UseVariable( const OUString& rVar ) const;
113 bool SearchFile( OUString& rIniFile, Paths ePath = Paths::UserConfig );
114};
115
116#endif // INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
117
118/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< SvtPathOptions_Impl > pImpl
Definition: pathoptions.hxx:37
#define SAL_WARN_UNUSED
#define UNOTOOLS_DLLPUBLIC