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 "LoggedResources.hxx"
25 #include <com/sun/star/table/BorderLine2.hpp>
26 #include <com/sun/star/beans/PropertyValue.hpp>
27 #include <o3tl/enumarray.hxx>
29 namespace writerfilter
{
33 class BorderHandler
: public LoggedProperties
36 //todo: order is a guess
37 enum class BorderPosition
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
;
56 o3tl::enumarray
<BorderPosition
, bool> m_aFilledLines
;
57 o3tl::enumarray
<BorderPosition
, css::table::BorderLine2
> m_aBorderLines
;
58 OUString m_aInteropGrabBagName
;
59 std::vector
<css::beans::PropertyValue
> m_aInteropGrabBag
;
60 void appendGrabBag(const OUString
& aKey
, const OUString
& aValue
);
63 virtual void lcl_attribute(Id Name
, Value
& val
) override
;
64 virtual void lcl_sprm(Sprm
& sprm
) override
;
67 explicit BorderHandler( bool bOOXML
);
68 virtual ~BorderHandler() override
;
70 ::tools::SvRef
<PropertyMap
> getProperties();
71 css::table::BorderLine2
getBorderLine();
72 sal_Int32
getLineDistance() const { return m_nLineDistance
;}
73 bool getShadow() { return m_bShadow
;}
74 void enableInteropGrabBag(const OUString
& aName
);
75 css::beans::PropertyValue
getInteropGrabBag(const OUString
& aName
= OUString());
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */