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 .
19 #ifndef SC_VIEWUTIL_HXX
20 #define SC_VIEWUTIL_HXX
22 #include "address.hxx"
23 #include <tools/solar.h>
24 #include <sal/types.h>
33 class ScChangeViewSettings
;
39 enum ScUpdateMode
{ SC_UPDATE_ALL
, SC_UPDATE_CHANGED
, SC_UPDATE_MARKS
};
41 // ---------------------------------------------------------------------------
43 class SC_DLLPUBLIC ScViewUtil
46 static sal_Bool
ExecuteCharMap( const SvxFontItem
& rOldFont
,
48 SvxFontItem
& rNewFont
,
51 static sal_Bool
IsActionShown( const ScChangeAction
& rAction
,
52 const ScChangeViewSettings
& rSettings
,
53 ScDocument
& rDocument
);
55 static void PutItemScript( SfxItemSet
& rShellSet
, const SfxItemSet
& rCoreSet
,
56 sal_uInt16 nWhichId
, sal_uInt16 nScript
);
58 static sal_uInt16
GetEffLanguage( ScDocument
* pDoc
, const ScAddress
& rPos
);
60 static sal_Int32
GetTransliterationType( sal_uInt16 nSlotID
);
62 static bool HasFiltered( const ScRange
& rRange
, ScDocument
* pDoc
);
63 /** Fit a range to cover nRows number of unfiltered rows.
64 @return <TRUE/> if the resulting range covers nRows unfiltered rows. */
65 static bool FitToUnfilteredRows( ScRange
& rRange
, ScDocument
* pDoc
, size_t nRows
);
66 static void UnmarkFiltered( ScMarkData
& rMark
, ScDocument
* pDoc
);
68 static void HideDisabledSlot( SfxItemSet
& rSet
, SfxBindings
& rBindings
, sal_uInt16 nSlotId
);
70 /** Returns true, if the passed view shell is in full screen mode. */
71 static bool IsFullScreen( SfxViewShell
& rViewShell
);
72 /** Enters or leaves full screen mode at the passed view shell. */
73 static void SetFullScreen( SfxViewShell
& rViewShell
, bool bSet
);
76 // ---------------------------------------------------------------------------
90 ScUpdateRect( SCCOL nX1
, SCROW nY1
, SCCOL nX2
, SCROW nY2
);
91 void SetNew( SCCOL nX1
, SCROW nY1
, SCCOL nX2
, SCROW nY2
);
92 sal_Bool
GetDiff( SCCOL
& rX1
, SCROW
& rY1
, SCCOL
& rX2
, SCROW
& rY2
);
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */