1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
20 #ifndef INCLUDED_UNOTOOLS_PRINTWARNINGOPTIONS_HXX
21 #define INCLUDED_UNOTOOLS_PRINTWARNINGOPTIONS_HXX
23 #include <unotools/unotoolsdllapi.h>
24 #include <sal/types.h>
25 #include <osl/mutex.hxx>
26 #include <rtl/ustring.hxx>
27 #include <unotools/options.hxx>
29 /*-************************************************************************************************************
30 @short forward declaration to our private date container implementation
31 @descr We use these class as internal member to support small memory requirements.
32 You can create the container if it is necessary. The class which use these mechanism
33 is faster and smaller then a complete implementation!
34 *//*-*************************************************************************************************************/
36 class SvtPrintWarningOptions_Impl
;
38 /*-************************************************************************************************************
39 @short collect information about startup features
40 @devstatus ready to use
41 *//*-*************************************************************************************************************/
43 class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtPrintWarningOptions
: public utl::detail::Options
46 /*-****************************************************************************************************
47 @short standard constructor and destructor
48 @descr This will initialize an instance with default values.
49 We implement these class with a refcount mechanism! Every instance of this class increase it
50 at create and decrease it at delete time - but all instances use the same data container!
51 He is implemented as a static member ...
53 @seealso member m_nRefCount
54 @seealso member m_pDataContainer
55 *//*-*****************************************************************************************************/
57 SvtPrintWarningOptions();
58 virtual ~SvtPrintWarningOptions();
60 /*-****************************************************************************************************
61 @short interface methods to get and set value of config key "org.openoffice.Office.Common/Print/Warning..."
62 @descr These options describe internal states to enable/disable features of installed office.
64 @seealso configuration package "org.openoffice.Office.Common/_3D-Engine"
65 *//*-*****************************************************************************************************/
67 bool IsPaperSize() const;
68 bool IsPaperOrientation() const;
69 bool IsTransparency() const;
70 bool IsModifyDocumentOnPrintingAllowed() const;
72 void SetPaperSize( bool bState
);
73 void SetPaperOrientation( bool bState
);
74 void SetTransparency( bool bState
);
75 void SetModifyDocumentOnPrintingAllowed( bool bState
);
79 /*-****************************************************************************************************
80 @short return a reference to a static mutex
81 @descr These class use his own static mutex to be threadsafe.
82 We create a static mutex only for one ime and use at different times.
83 @return A reference to a static mutex member.
84 *//*-*****************************************************************************************************/
86 UNOTOOLS_DLLPRIVATE
static ::osl::Mutex
& GetOwnStaticMutex();
92 Don't initialize these static members in these headers!
93 a) Double defined symbols will be detected ...
94 b) and unresolved externals exist at linking time.
95 Do it in your source only.
98 static SvtPrintWarningOptions_Impl
* m_pDataContainer
;
99 static sal_Int32 m_nRefCount
;
101 }; // class SvtPrintWarningOptions
103 #endif // INCLUDED_UNOTOOLS_PRINTWARNINGOPTIONS_HXX
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */