1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: viewutil.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_VIEWUTIL_HXX
31 #define SC_VIEWUTIL_HXX
33 #include "address.hxx"
34 #include <tools/solar.h>
35 #include <sal/types.h>
45 class ScChangeViewSettings
;
51 enum ScUpdateMode
{ SC_UPDATE_ALL
, SC_UPDATE_CHANGED
, SC_UPDATE_MARKS
};
53 // ---------------------------------------------------------------------------
55 class ScViewUtil
// static Methoden
58 static BOOL
ExecuteCharMap( const SvxFontItem
& rOldFont
,
60 SvxFontItem
& rNewFont
,
63 static BOOL
IsActionShown( const ScChangeAction
& rAction
,
64 const ScChangeViewSettings
& rSettings
,
65 ScDocument
& rDocument
);
67 static void PutItemScript( SfxItemSet
& rShellSet
, const SfxItemSet
& rCoreSet
,
68 USHORT nWhichId
, USHORT nScript
);
70 static USHORT
GetEffLanguage( ScDocument
* pDoc
, const ScAddress
& rPos
);
72 static sal_Int32
GetTransliterationType( USHORT nSlotID
);
74 static bool HasFiltered( const ScRange
& rRange
, ScDocument
* pDoc
);
75 /** Fit a range to cover nRows number of unfiltered rows.
76 @return <TRUE/> if the resulting range covers nRows unfiltered rows. */
77 static bool FitToUnfilteredRows( ScRange
& rRange
, ScDocument
* pDoc
, size_t nRows
);
78 static void UnmarkFiltered( ScMarkData
& rMark
, ScDocument
* pDoc
);
80 static void HideDisabledSlot( SfxItemSet
& rSet
, SfxBindings
& rBindings
, USHORT nSlotId
);
82 /** Returns true, if the passed view shell is in full screen mode. */
83 static bool IsFullScreen( SfxViewShell
& rViewShell
);
84 /** Enters or leaves full screen mode at the passed view shell. */
85 static void SetFullScreen( SfxViewShell
& rViewShell
, bool bSet
);
88 // ---------------------------------------------------------------------------
106 ScUpdateRect( SCCOL nX1
, SCROW nY1
, SCCOL nX2
, SCROW nY2
);
107 void SetNew( SCCOL nX1
, SCROW nY1
, SCCOL nX2
, SCROW nY2
);
108 BOOL
GetDiff( SCCOL
& rX1
, SCROW
& rY1
, SCCOL
& rX2
, SCROW
& rY2
);
109 #ifdef OLD_SELECTION_PAINT
110 BOOL
GetXorDiff( SCCOL
& rX1
, SCROW
& rY1
, SCCOL
& rX2
, SCROW
& rY2
, BOOL
& rCont
);
111 void GetContDiff( SCCOL
& rX1
, SCROW
& rY1
, SCCOL
& rX2
, SCROW
& rY2
);