LibreOffice Module writerfilter (master) 1
BorderHandler.hxx
Go to the documentation of this file.
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#pragma once
20
21#include <vector>
22#include "LoggedResources.hxx"
23#include "PropertyMap.hxx"
24#include <com/sun/star/table/BorderLine2.hpp>
25#include <com/sun/star/beans/PropertyValue.hpp>
26#include <o3tl/enumarray.hxx>
29
31{
32class PropertyMap;
34{
35private:
36 //todo: order is a guess
37 enum class BorderPosition
38 {
39 Top,
40 Left,
41 Bottom,
42 Right,
46 };
47
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 sal_Int32 m_nThemeShade = 0;
57 sal_Int32 m_nThemeTint = 0;
58
62 std::vector<css::beans::PropertyValue> m_aInteropGrabBag;
63 void appendGrabBag(const OUString& aKey, const OUString& aValue);
64
65 // Properties
66 virtual void lcl_attribute(Id Name, Value & val) override;
67 virtual void lcl_sprm(Sprm & sprm) override;
68
69public:
70 explicit BorderHandler( bool bOOXML );
71 virtual ~BorderHandler() override;
72
74 css::table::BorderLine2 getBorderLine();
75 sal_Int32 getLineDistance() const { return m_nLineDistance;}
76 sal_Int32 getLineType() const { return m_nLineType;}
77 bool getShadow() const { return m_bShadow;}
78 void enableInteropGrabBag(const OUString& aName);
79 css::beans::PropertyValue getInteropGrabBag(const OUString& aName = OUString());
80
82
83};
84}
85
86/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void sprm(Sprm &sprm) override
Receives a SPRM.
An SPRM: Section, Paragraph and Run Modifier.
model::ThemeColorType m_eThemeColorType
css::beans::PropertyValue getInteropGrabBag(const OUString &aName=OUString())
std::vector< css::beans::PropertyValue > m_aInteropGrabBag
void appendGrabBag(const OUString &aKey, const OUString &aValue)
css::table::BorderLine2 getBorderLine()
virtual void lcl_attribute(Id Name, Value &val) override
o3tl::enumarray< BorderPosition, css::table::BorderLine2 > m_aBorderLines
virtual void lcl_sprm(Sprm &sprm) override
model::ComplexColor getComplexColor() const
void enableInteropGrabBag(const OUString &aName)
o3tl::enumarray< BorderPosition, bool > m_aFilledLines
ThemeColorType
std::map< sal_Int32, STLPropertyMapEntry > PropertyMap
sal_uInt32 Id
Left
Right