xref: /aoo42x/main/sc/source/filter/inc/qprostyle.hxx (revision 38d50f7b)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 
25 #ifndef SC_QPROSTYLE_HXX
26 #define SC_QPROSTYLE_HXX
27 
28 #include <sal/config.h>
29 #include "filter.hxx"
30 #include "document.hxx"
31 #include "cell.hxx"
32 #include <tools/string.hxx>
33 
34 #include <tools/color.hxx>
35 #include "flttypes.hxx"
36 #include "ftools.hxx"
37 
38 class ScQProStyle
39 {
40     enum limits { maxsize = 256 };
41     sal_uInt8  maAlign[ maxsize ];
42     sal_uInt8  maFont[ maxsize ];
43 	sal_uInt16 maFontRecord[ maxsize ];
44 	sal_uInt16 maFontHeight[ maxsize ];
45     String     maFontType[ maxsize ];
46 
47     public:
48 	ScQProStyle();
49     void SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, SCTAB nTab, sal_uInt16 nStyle );
setFontRecord(sal_uInt16 nIndex,sal_uInt16 nData,sal_uInt16 nPtSize)50     void setFontRecord(sal_uInt16 nIndex, sal_uInt16 nData, sal_uInt16 nPtSize)
51 	{
52         if (nIndex < maxsize)
53         {
54 		    maFontRecord[ nIndex ] = nData;
55 		    maFontHeight[ nIndex ] = nPtSize;
56         }
57 	}
setFontType(sal_uInt16 nIndex,String & aLabel)58     void setFontType( sal_uInt16 nIndex, String &aLabel )
59         { if (nIndex < maxsize) maFontType[ nIndex ] = aLabel; }
setAlign(sal_uInt16 nIndex,sal_uInt8 nData)60     void setAlign( sal_uInt16 nIndex, sal_uInt8 nData )
61         { if (nIndex < maxsize) maAlign[ nIndex ] = nData; }
setFont(sal_uInt16 nIndex,sal_uInt8 nData)62     void setFont( sal_uInt16 nIndex, sal_uInt8 nData )
63         { if (nIndex < maxsize) maFont[ nIndex ] = nData; }
64 };
65 #endif
66