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: fltglbls.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 ************************************************************************/
33 #include <tools/string.hxx>
34 #include <i18npool/lang.h>
35 #include <svtools/svarray.hxx>
46 class SvNumberFormatter
;
50 extern ExcGlob
*pExcGlob
;
53 extern LotGlob
*pLotGlob
;
55 // ----- Basis-Klasse ----------------------------------------------------
68 FilterGlobals( SwDoc
& rDoc
, const SwPaM
& rPam
);
73 const SwTable
*pTable
;
75 SvNumberFormatter
*pNumFormatter
;
76 LanguageType eDefLanguage
;
78 ULONG nDefFormat
; // = 0xFFFFFFFF
80 void SetRange( USHORT nCS
, USHORT nCE
, USHORT nRS
, USHORT nRE
);
82 BOOL
IsInColRange( USHORT nCol
)
83 { return ( nCol
>= nColStart
&& nCol
<= nColEnd
); }
84 BOOL
IsInRowRange( USHORT nRow
)
85 { return ( nRow
>= nRowStart
&& nRow
<= nRowEnd
); }
86 BOOL
IsInRange( USHORT nCol
, USHORT nRow
)
87 { return IsInRowRange(nRow
) && IsInColRange(nCol
); }
89 void NormalizeCol( USHORT
&rCol
) { rCol
-= nColStart
; }
90 void NormalizeRow( USHORT
&rRow
) { rRow
-= nRowStart
; }
91 void Normalize( USHORT
&rCol
, USHORT
&rRow
)
92 { NormalizeCol( rCol
); NormalizeRow( rRow
); }
94 USHORT
AnzCols() const { return nAnzCols
; }
95 USHORT
AnzRows() const { return nAnzRows
; }
97 BOOL
ColRangeLimitter( USHORT
&rCS
, USHORT
&rCE
);
99 void InsertText( USHORT nCol
, USHORT nRow
, const String
& rStr
);
101 void InsertAttr( const SfxPoolItem
& rItem
);
103 inline void ColLimitter( USHORT
&rCol
);
104 inline void RowLimitter( USHORT
&rRow
);
111 inline void FilterGlobals::ColLimitter( USHORT
&rCol
)
113 if( rCol
< nColStart
)
115 else if( rCol
> nColEnd
)
119 inline void FilterGlobals::RowLimitter( USHORT
&rRow
)
121 if( rRow
< nRowStart
)
123 else if( rRow
> nRowEnd
)