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_TDEFTABLEHANDLER_HXX
20 #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TDEFTABLEHANDLER_HXX
22 #include <resourcemodel/LoggedResources.hxx>
23 #include <boost/shared_ptr.hpp>
25 namespace com
{ namespace sun
{ namespace star
{
34 namespace writerfilter
{
38 class TablePropertyMap
;
39 class TDefTableHandler
: public LoggedProperties
44 ::std::vector
<sal_Int32
> m_aCellBorderPositions
;
45 ::std::vector
<sal_Int32
> m_aCellVertAlign
;
47 ::std::vector
< ::com::sun::star::table::BorderLine2
> m_aLeftBorderLines
;
48 ::std::vector
< ::com::sun::star::table::BorderLine2
> m_aRightBorderLines
;
49 ::std::vector
< ::com::sun::star::table::BorderLine2
> m_aTopBorderLines
;
50 ::std::vector
< ::com::sun::star::table::BorderLine2
> m_aBottomBorderLines
;
51 ::std::vector
< ::com::sun::star::table::BorderLine2
> m_aInsideHBorderLines
;
52 ::std::vector
< ::com::sun::star::table::BorderLine2
> m_aInsideVBorderLines
;
53 ::std::vector
< ::com::sun::star::table::BorderLine2
> m_aTl2brBorderLines
;
54 ::std::vector
< ::com::sun::star::table::BorderLine2
> m_aTr2blBorderLines
;
56 //values of the current border
57 sal_Int32 m_nLineWidth
;
58 sal_Int32 m_nLineType
;
59 sal_Int32 m_nLineColor
;
60 sal_Int32 m_nLineDistance
;
64 OUString m_aInteropGrabBagName
;
65 std::vector
<css::beans::PropertyValue
> m_aInteropGrabBag
;
66 void appendGrabBag(const OUString
& aKey
, const OUString
& aValue
);
68 void localResolve(Id Name
, writerfilter::Reference
<Properties
>::Pointer_t pProperties
);
71 virtual void lcl_attribute(Id Name
, Value
& val
) SAL_OVERRIDE
;
72 virtual void lcl_sprm(Sprm
& sprm
) SAL_OVERRIDE
;
75 TDefTableHandler( bool bOOXML
);
76 virtual ~TDefTableHandler();
78 size_t getCellCount() const;
79 void fillCellProperties( size_t nCell
, ::boost::shared_ptr
< TablePropertyMap
> pCellProperties
) const;
80 ::boost::shared_ptr
<PropertyMap
> getRowProperties() const;
81 sal_Int32
getTableWidth() const;
82 void enableInteropGrabBag(const OUString
& aName
);
83 css::beans::PropertyValue
getInteropGrabBag(const OUString
& aName
= OUString());
84 static OUString
getBorderTypeString(sal_Int32 nType
);
85 static OUString
getThemeColorTypeString(sal_Int32 nType
);
87 typedef boost::shared_ptr
< TDefTableHandler
> TDefTableHandlerPtr
;
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */