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 .
22 #include <svtools/svtdllapi.h>
23 #include <sal/types.h>
24 #include <tools/color.hxx>
27 namespace osl
{ class Mutex
; }
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 SvtOptionsDrawinglayer_Impl
;
38 /*-************************************************************************************************************
39 @short collect information about startup features
40 @devstatus ready to use
41 *//*-*************************************************************************************************************/
43 class SVT_DLLPUBLIC SvtOptionsDrawinglayer
47 SvtOptionsDrawinglayer();
48 ~SvtOptionsDrawinglayer();
50 /*-****************************************************************************************************
51 @short interface methods to get and set value of config key "org.openoffice.Office.Common/Drawinglayer/..."
52 @descr These options describe internal states to enable/disable features of installed office.
55 SetOverlayBuffer() => Activate this field for letting Overlay use a buffer
58 SetPaintBuffer() => Activate this field for letting Paint use a prerender buffer
61 SetStripeColorA() => Set first of two colors which overlay uses to draw stripes
64 SetStripeColorB() => Set second of two colors which overlay uses to draw stripes
67 SetStripeLength() => Set length of a single stripe in pixels
69 @seealso configuration package "org.openoffice.Office.Common/Drawinglayer"
70 *//*-*****************************************************************************************************/
72 bool IsOverlayBuffer() const;
73 bool IsPaintBuffer() const;
74 Color
GetStripeColorA() const;
75 Color
GetStripeColorB() const;
76 sal_uInt16
GetStripeLength() const;
79 bool IsOverlayBuffer_Calc() const;
80 bool IsOverlayBuffer_Writer() const;
81 bool IsOverlayBuffer_DrawImpress() const;
84 bool IsPaintBuffer_Calc() const;
85 bool IsPaintBuffer_Writer() const;
86 bool IsPaintBuffer_DrawImpress() const;
89 sal_uInt32
GetMaximumPaperWidth() const;
90 sal_uInt32
GetMaximumPaperHeight() const;
91 sal_uInt32
GetMaximumPaperLeftMargin() const;
92 sal_uInt32
GetMaximumPaperRightMargin() const;
93 sal_uInt32
GetMaximumPaperTopMargin() const;
94 sal_uInt32
GetMaximumPaperBottomMargin() const;
96 // #i95644# helper to check if AA is allowed on this system. Currently, for WIN it's disabled
97 // and OutDevSupportType::TransparentRect is checked (this hits XRenderExtension, e.g.
98 // currently for SunRay as long as not supported there)
99 bool IsAAPossibleOnThisSystem() const;
102 bool IsAntiAliasing() const;
103 bool IsSnapHorVerLinesToDiscrete() const;
104 bool IsSolidDragCreate() const;
105 bool IsRenderDecoratedTextDirect() const;
106 bool IsRenderSimpleTextDirect() const;
107 sal_uInt32
GetQuadratic3DRenderLimit() const;
108 sal_uInt32
GetQuadraticFormControlRenderLimit() const;
110 void SetAntiAliasing( bool bState
);
112 // #i97672# selection settings
113 bool IsTransparentSelection() const;
114 sal_uInt16
GetTransparentSelectionPercent() const;
115 sal_uInt16
GetSelectionMaximumLuminancePercent() const;
117 // get system highlight color, limited to the maximum allowed luminance
118 // (defined in GetSelectionMaximumLuminancePercent() in SvtOptionsDrawinglayer,
119 // combined with Application::GetSettings().GetStyleSettings().GetHighlightColor())
120 Color
getHilightColor() const;
124 /*-****************************************************************************************************
125 @short return a reference to a static mutex
126 @descr These class use his own static mutex to be threadsafe.
127 We create a static mutex only for one ime and use at different times.
128 @return A reference to a static mutex member.
129 *//*-*****************************************************************************************************/
130 SVT_DLLPRIVATE
static ::osl::Mutex
& GetOwnStaticMutex();
132 std::shared_ptr
<SvtOptionsDrawinglayer_Impl
> m_pImpl
;
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */