fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / inc / viewutil.hxx
blobbbccd75827d291ee515aedc757cf1966ea04a3ed
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/.
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 .
19 #ifndef INCLUDED_SC_SOURCE_UI_INC_VIEWUTIL_HXX
20 #define INCLUDED_SC_SOURCE_UI_INC_VIEWUTIL_HXX
22 #include "address.hxx"
23 #include <sal/types.h>
25 class SfxItemSet;
26 class SfxBindings;
27 class SvxFontItem;
28 class SfxViewShell;
29 class SfxViewFrame;
31 class ScChangeAction;
32 class ScChangeViewSettings;
33 class ScDocument;
34 class ScAddress;
35 class ScRange;
36 class ScMarkData;
37 enum class SvtScriptType;
38 enum ScUpdateMode { SC_UPDATE_ALL, SC_UPDATE_CHANGED, SC_UPDATE_MARKS };
40 class SC_DLLPUBLIC ScViewUtil
42 public:
43 static bool ExecuteCharMap( const SvxFontItem& rOldFont,
44 SfxViewFrame& rFrame,
45 SvxFontItem& rNewFont,
46 OUString& rString );
48 static bool IsActionShown( const ScChangeAction& rAction,
49 const ScChangeViewSettings& rSettings,
50 ScDocument& rDocument );
52 static void PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet,
53 sal_uInt16 nWhichId, SvtScriptType nScript );
55 static sal_uInt16 GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos );
57 static sal_Int32 GetTransliterationType( sal_uInt16 nSlotID );
59 static bool HasFiltered( const ScRange& rRange, ScDocument* pDoc );
60 /** Fit a range to cover nRows number of unfiltered rows.
61 @return <TRUE/> if the resulting range covers nRows unfiltered rows. */
62 static bool FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_t nRows );
63 static void UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc );
65 static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal_uInt16 nSlotId );
67 /** Returns true, if the passed view shell is in full screen mode. */
68 static bool IsFullScreen( SfxViewShell& rViewShell );
69 /** Enters or leaves full screen mode at the passed view shell. */
70 static void SetFullScreen( SfxViewShell& rViewShell, bool bSet );
73 class ScUpdateRect
75 private:
76 SCCOL nOldStartX;
77 SCROW nOldStartY;
78 SCCOL nOldEndX;
79 SCROW nOldEndY;
80 SCCOL nNewStartX;
81 SCROW nNewStartY;
82 SCCOL nNewEndX;
83 SCROW nNewEndY;
84 public:
85 ScUpdateRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
86 void SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
87 bool GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
90 #endif
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */