Bump version to 4.3-4
[LibreOffice.git] / writerfilter / source / dmapper / BorderHandler.hxx
blobb0160395432bf3e0bcd07b444ea33d89434cd90b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_BORDERHANDLER_HXX
20 #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_BORDERHANDLER_HXX
22 #include <vector>
23 #include <resourcemodel/LoggedResources.hxx>
24 #include <boost/shared_ptr.hpp>
25 #include <com/sun/star/table/BorderLine2.hpp>
26 #include <com/sun/star/beans/PropertyValue.hpp>
28 namespace writerfilter {
29 namespace dmapper
31 class PropertyMap;
32 class BorderHandler : public LoggedProperties
34 public:
35 //todo: order is a guess
36 enum BorderPosition
38 BORDER_TOP,
39 BORDER_LEFT,
40 BORDER_BOTTOM,
41 BORDER_RIGHT,
42 BORDER_HORIZONTAL,
43 BORDER_VERTICAL,
44 BORDER_COUNT
47 private:
48 sal_Int8 m_nCurrentBorderPosition;
49 //values of the current border
50 sal_Int32 m_nLineWidth;
51 sal_Int32 m_nLineType;
52 sal_Int32 m_nLineColor;
53 sal_Int32 m_nLineDistance;
54 bool m_bShadow;
55 bool m_bOOXML;
57 bool m_aFilledLines[BORDER_COUNT];
58 ::com::sun::star::table::BorderLine2 m_aBorderLines[BORDER_COUNT];
59 OUString m_aInteropGrabBagName;
60 std::vector<css::beans::PropertyValue> m_aInteropGrabBag;
61 void appendGrabBag(const OUString& aKey, const OUString& aValue);
63 // Properties
64 virtual void lcl_attribute(Id Name, Value & val) SAL_OVERRIDE;
65 virtual void lcl_sprm(Sprm & sprm) SAL_OVERRIDE;
67 public:
68 BorderHandler( bool bOOXML );
69 virtual ~BorderHandler();
71 ::boost::shared_ptr<PropertyMap> getProperties();
72 ::com::sun::star::table::BorderLine2 getBorderLine();
73 sal_Int32 getLineDistance() const { return m_nLineDistance;}
74 bool getShadow();
75 void enableInteropGrabBag(const OUString& aName);
76 css::beans::PropertyValue getInteropGrabBag(const OUString& aName = OUString());
78 typedef boost::shared_ptr< BorderHandler > BorderHandlerPtr;
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */