1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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
{
32 class BorderHandler
: public LoggedProperties
35 //todo: order is a guess
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
;
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
);
64 virtual void lcl_attribute(Id Name
, Value
& val
) SAL_OVERRIDE
;
65 virtual void lcl_sprm(Sprm
& sprm
) SAL_OVERRIDE
;
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
;}
75 void enableInteropGrabBag(const OUString
& aName
);
76 css::beans::PropertyValue
getInteropGrabBag(const OUString
& aName
= OUString());
78 typedef boost::shared_ptr
< BorderHandler
> BorderHandlerPtr
;
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */