1*b8a377c6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*b8a377c6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*b8a377c6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*b8a377c6SAndrew Rist  * distributed with this work for additional information
6*b8a377c6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*b8a377c6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*b8a377c6SAndrew Rist  * "License"); you may not use this file except in compliance
9*b8a377c6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*b8a377c6SAndrew Rist  *
11*b8a377c6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*b8a377c6SAndrew Rist  *
13*b8a377c6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*b8a377c6SAndrew Rist  * software distributed under the License is distributed on an
15*b8a377c6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b8a377c6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*b8a377c6SAndrew Rist  * specific language governing permissions and limitations
18*b8a377c6SAndrew Rist  * under the License.
19*b8a377c6SAndrew Rist  *
20*b8a377c6SAndrew Rist  *************************************************************/
21*b8a377c6SAndrew Rist 
22*b8a377c6SAndrew Rist 
23cdf0e10cSrcweir #ifndef INCLUDED_SECTIONCOLUMNHANDLER_HXX
24cdf0e10cSrcweir #define INCLUDED_SECTIONCOLUMNHANDLER_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <WriterFilterDllApi.hxx>
27cdf0e10cSrcweir #include <resourcemodel/LoggedResources.hxx>
28cdf0e10cSrcweir #include <boost/shared_ptr.hpp>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir 
31cdf0e10cSrcweir namespace writerfilter {
32cdf0e10cSrcweir namespace dmapper
33cdf0e10cSrcweir {
34cdf0e10cSrcweir class PropertyMap;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir struct _Column
37cdf0e10cSrcweir {
38cdf0e10cSrcweir     sal_Int32 nWidth;
39cdf0e10cSrcweir     sal_Int32 nSpace;
40cdf0e10cSrcweir };
41cdf0e10cSrcweir 
42cdf0e10cSrcweir 
43cdf0e10cSrcweir class WRITERFILTER_DLLPRIVATE SectionColumnHandler : public LoggedProperties
44cdf0e10cSrcweir {
45cdf0e10cSrcweir     bool        bEqualWidth;
46cdf0e10cSrcweir     sal_Int32   nSpace;
47cdf0e10cSrcweir     sal_Int32   nNum;
48cdf0e10cSrcweir     bool        bSep;
49cdf0e10cSrcweir     std::vector<_Column> aCols;
50cdf0e10cSrcweir 
51cdf0e10cSrcweir     _Column   aTempColumn;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir     // Properties
54cdf0e10cSrcweir     virtual void lcl_attribute(Id Name, Value & val);
55cdf0e10cSrcweir     virtual void lcl_sprm(Sprm & sprm);
56cdf0e10cSrcweir 
57cdf0e10cSrcweir public:
58cdf0e10cSrcweir     SectionColumnHandler();
59cdf0e10cSrcweir     virtual ~SectionColumnHandler();
60cdf0e10cSrcweir 
IsEqualWidth() const61cdf0e10cSrcweir     bool        IsEqualWidth() const { return bEqualWidth; }
GetSpace() const62cdf0e10cSrcweir     sal_Int32   GetSpace() const { return nSpace; }
GetNum() const63cdf0e10cSrcweir     sal_Int32   GetNum() const { return nNum; }
IsSeparator() const64cdf0e10cSrcweir     bool        IsSeparator() const { return bSep; }
65cdf0e10cSrcweir 
GetColumns() const66cdf0e10cSrcweir     const std::vector<_Column>& GetColumns() const { return aCols;}
67cdf0e10cSrcweir 
68cdf0e10cSrcweir };
69cdf0e10cSrcweir typedef boost::shared_ptr< SectionColumnHandler >          SectionColumnHandlerPtr;
70cdf0e10cSrcweir }}
71cdf0e10cSrcweir 
72cdf0e10cSrcweir #endif //
73