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 neccessary. 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
45 @devstatus ready to use
46 *//*-*************************************************************************************************************/
48 class UNOTOOLS_DLLPUBLIC SAL_WARN_UNUSED SvtPrintWarningOptions
: public utl::detail::Options
51 /*-****************************************************************************************************//**
52 @short standard constructor and destructor
53 @descr This will initialize an instance with default values.
54 We implement these class with a refcount mechanism! Every instance of this class increase it
55 at create and decrease it at delete time - but all instances use the same data container!
56 He is implemented as a static member ...
58 @seealso member m_nRefCount
59 @seealso member m_pDataContainer
65 *//*-*****************************************************************************************************/
67 SvtPrintWarningOptions();
68 virtual ~SvtPrintWarningOptions();
70 /*-****************************************************************************************************//**
71 @short interface methods to get and set value of config key "org.openoffice.Office.Common/Print/Warning..."
72 @descr These options describe internal states to enable/disable features of installed office.
74 @seealso configuration package "org.openoffice.Office.Common/_3D-Engine"
75 *//*-*****************************************************************************************************/
77 sal_Bool
IsPaperSize() const;
78 sal_Bool
IsPaperOrientation() const;
79 sal_Bool
IsTransparency() const;
80 sal_Bool
IsModifyDocumentOnPrintingAllowed() const;
82 void SetPaperSize( sal_Bool bState
);
83 void SetPaperOrientation( sal_Bool bState
);
84 void SetTransparency( sal_Bool bState
);
85 void SetModifyDocumentOnPrintingAllowed( sal_Bool bState
);
89 /*-****************************************************************************************************//**
90 @short return a reference to a static mutex
91 @descr These class use his own static mutex to be threadsafe.
92 We create a static mutex only for one ime and use at different times.
97 @return A reference to a static mutex member.
100 *//*-*****************************************************************************************************/
102 UNOTOOLS_DLLPRIVATE
static ::osl::Mutex
& GetOwnStaticMutex();
108 Don't initialize these static member in these header!
109 a) Double dfined symbols will be detected ...
110 b) and unresolved externals exist at linking time.
111 Do it in your source only.
114 static SvtPrintWarningOptions_Impl
* m_pDataContainer
; /// impl. data container as dynamic pointer for smaller memory requirements!
115 static sal_Int32 m_nRefCount
; /// internal ref count mechanism
117 }; // class SvtPrintWarningOptions
119 #endif // #ifndef INCLUDED_unotools_PRINTWARNINGOPTIONS_HXX
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */