Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : : #ifndef INCLUDED_BORDERHANDLER_HXX
20 : : #define INCLUDED_BORDERHANDLER_HXX
21 : :
22 : : #include <WriterFilterDllApi.hxx>
23 : : #include <resourcemodel/LoggedResources.hxx>
24 : : #include <boost/shared_ptr.hpp>
25 : : #include <com/sun/star/table/BorderLine2.hpp>
26 : :
27 : : namespace writerfilter {
28 : : namespace dmapper
29 : : {
30 : : class PropertyMap;
31 : : class WRITERFILTER_DLLPRIVATE BorderHandler : public LoggedProperties
32 : : {
33 : : public:
34 : : //todo: order is a guess
35 : : enum BorderPosition
36 : : {
37 : : BORDER_TOP,
38 : : BORDER_LEFT,
39 : : BORDER_BOTTOM,
40 : : BORDER_RIGHT,
41 : : BORDER_HORIZONTAL,
42 : : BORDER_VERTICAL,
43 : : BORDER_COUNT
44 : : };
45 : :
46 : : private:
47 : : sal_Int8 m_nCurrentBorderPosition;
48 : : //values of the current border
49 : : sal_Int32 m_nLineWidth;
50 : : sal_Int32 m_nLineType;
51 : : sal_Int32 m_nLineColor;
52 : : sal_Int32 m_nLineDistance;
53 : : bool m_bOOXML;
54 : :
55 : : bool m_aFilledLines[BORDER_COUNT];
56 : : ::com::sun::star::table::BorderLine2 m_aBorderLines[BORDER_COUNT];
57 : :
58 : : // Properties
59 : : virtual void lcl_attribute(Id Name, Value & val);
60 : : virtual void lcl_sprm(Sprm & sprm);
61 : :
62 : : public:
63 : : BorderHandler( bool bOOXML );
64 : : virtual ~BorderHandler();
65 : :
66 : : ::boost::shared_ptr<PropertyMap> getProperties();
67 : : ::com::sun::star::table::BorderLine2 getBorderLine();
68 : 48 : sal_Int32 getLineDistance() const { return m_nLineDistance;}
69 : : };
70 : : typedef boost::shared_ptr< BorderHandler > BorderHandlerPtr;
71 : : }}
72 : :
73 : : #endif //
74 : :
75 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|