follow org.freedesktop.appearance.color-scheme setting
[LibreOffice.git] / include / sfx2 / safemode.hxx
blob34602c4ea68c4a7af0a4db3f97b7de338090e3f1
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 #ifndef INCLUDED_SFX2_SAFEMODE_HXX
11 #define INCLUDED_SFX2_SAFEMODE_HXX
13 #include <sfx2/dllapi.h>
15 #include <rtl/ustring.hxx>
17 namespace sfx2
19 class SFX2_DLLPUBLIC SafeMode
21 public:
22 /**
23 * Write a flag file to the user profile indicating that the next launch should be in safe mode.
25 * @return Whether the file could be written successfully
27 static bool putFlag();
29 /**
30 * Check the existence of the safe mode flag file.
32 * @return Whether the flag file for the safe mode exists
34 static bool hasFlag();
36 /**
37 * Remove the flag file for the safe mode.
39 * @return Whether the flag file could be removed successfully
41 static bool removeFlag();
43 /**
44 * Write a flag to the user profile indicating that we are currently restarting from safe mode -
45 * that means we don't want to enter safe mode again.
47 * @return Whether the file could be written successfully
49 static bool putRestartFlag();
51 /**
52 * Check the existence of the restart flag file.
54 * @return Whether the restart flag file exists
56 static bool hasRestartFlag();
58 /**
59 * Remove the restart flag file.
61 * @return Whether the flag file could be removed successfully
63 static bool removeRestartFlag();
65 private:
66 /** Returns the path of the safe mode flag file.*/
67 static OUString getFilePath(const OUString& sFilename);
71 #endif
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */