LibreOffice Module dbaccess (master) 1
xmlHelper.cxx
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
20#include "xmlHelper.hxx"
22#include <xmloff/xmlement.hxx>
24#include <xmloff/xmltoken.hxx>
25#include <xmloff/xmltypes.hxx>
26#include <xmloff/maptype.hxx>
27
28#include <com/sun/star/awt/TextAlign.hpp>
29#include <strings.hxx>
30#include <rtl/ref.hxx>
31
32namespace dbaxml
33{
34 using namespace ::xmloff::token;
35 using namespace ::com::sun::star::awt;
36
38{
39}
40
42{
43
44}
45
47{
48 const XMLPropertyHandler* pHandler = nullptr;
49
50 switch (_nType)
51 {
54 {
55 static const SvXMLEnumMapEntry<bool> aDisplayMap[] =
56 {
57 { XML_VISIBLE, true },
58 { XML_COLLAPSE, false },
59 { XML_TOKEN_INVALID, false }
60 };
62 }
63 pHandler = m_pDisplayHandler.get();
64 break;
65 }
66 if ( !pHandler )
67 pHandler = OControlPropertyHandlerFactory::GetPropertyHandler(_nType);
68 return pHandler;
69}
70
72{
73 static const XMLPropertyMapEntry s_aTableStylesProperties[] =
74 {
75 { nullptr }
76 };
77 rtl::Reference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
78 return new XMLPropertySetMapper(s_aTableStylesProperties, xFac, bForExport);
79}
80
82{
83 static const XMLPropertyMapEntry s_aColumnStylesProperties[] =
84 {
90 { nullptr }
91 };
93 return new XMLPropertySetMapper(s_aColumnStylesProperties, xFac, bForExport);
94}
95
97{
98 static const XMLPropertyMapEntry s_aCellStylesProperties[] =
99 {
138 { nullptr }
139 };
141 return new XMLPropertySetMapper(s_aCellStylesProperties, xFac, bForExport);
142}
143
145{
146 static const XMLPropertyMapEntry s_aStylesProperties[] =
147 {
149 { nullptr }
150 };
152 return new XMLPropertySetMapper(s_aStylesProperties, xFac, true/*bForExport*/);
153}
154
155}
156
157/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< XMLConstantsPropertyHandler > m_pDisplayHandler
Definition: xmlHelper.hxx:39
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 _nType) const override
Definition: xmlHelper.cxx:46
virtual ~OPropertyHandlerFactory() override
Definition: xmlHelper.cxx:41
static rtl::Reference< XMLPropertySetMapper > GetRowStylesPropertySetMapper()
Definition: xmlHelper.cxx:144
static rtl::Reference< XMLPropertySetMapper > GetCellStylesPropertySetMapper(bool bForExport)
Definition: xmlHelper.cxx:96
static rtl::Reference< XMLPropertySetMapper > GetColumnStylesPropertySetMapper(bool bForExport)
Definition: xmlHelper.cxx:81
static rtl::Reference< XMLPropertySetMapper > GetTableStylesPropertySetMapper(bool bForExport)
Definition: xmlHelper.cxx:71
XML_COLLAPSE
XML_TEXT_LINE_THROUGH_TEXT
XML_TEXT_LINE_THROUGH_STYLE
XML_FONT_SIZE
XML_FONT_STYLE
XML_FONT_NAME
XML_LETTER_KERNING
XML_DISPLAY
XML_TOKEN_INVALID
XML_FONT_PITCH
XML_TEXT_UNDERLINE_MODE
XML_FONT_STYLE_NAME
XML_TEXT_UNDERLINE_TYPE
XML_FONT_FAMILY_GENERIC
XML_TEXT_ALIGN
XML_FONT_WEIGHT
XML_TEXT_UNDERLINE_STYLE
XML_TEXT_UNDERLINE_COLOR
XML_ROW_HEIGHT
XML_VISIBLE
XML_FONT_WIDTH
XML_ROTATION_ANGLE
XML_TEXT_EMPHASIZE
XML_TEXT_UNDERLINE_WIDTH
XML_DATA_STYLE_NAME
XML_FONT_RELIEF
XML_TEXT_LINE_THROUGH_TYPE
XML_COLUMN_WIDTH
XML_TEXT_LINE_THROUGH_WIDTH
XML_COLOR
XML_FONT_CHAR_WIDTH
XML_FONT_CHARSET
constexpr OUStringLiteral PROPERTY_FONTHEIGHT(u"FontHeight")
constexpr OUStringLiteral PROPERTY_WIDTH(u"Width")
constexpr OUStringLiteral PROPERTY_FONTCHARWIDTH(u"FontCharWidth")
constexpr OUStringLiteral PROPERTY_CHAR_UNDERLINE_COLOR(u"CharUnderlineColor")
constexpr OUStringLiteral PROPERTY_FONTORIENTATION(u"FontOrientation")
constexpr OUStringLiteral PROPERTY_TEXTCOLOR(u"TextColor")
constexpr OUStringLiteral PROPERTY_CHAR_UNDERLINE(u"CharUnderline")
constexpr OUStringLiteral PROPERTY_NUMBERFORMAT(u"FormatKey")
constexpr OUStringLiteral PROPERTY_FONTKERNING(u"FontKerning")
constexpr OUStringLiteral PROPERTY_FONTPITCH(u"FontPitch")
constexpr OUStringLiteral PROPERTY_CHAR_UNDERLINE_HAS_COLOR(u"CharUnderlineHasColor")
constexpr OUStringLiteral PROPERTY_FONTSLANT(u"FontSlant")
constexpr OUStringLiteral PROPERTY_TEXTEMPHASIS(u"FontEmphasisMark")
constexpr OUStringLiteral PROPERTY_FONTCHARSET(u"FontCharset")
constexpr OUStringLiteral PROPERTY_FONTNAME(u"FontName")
constexpr OUStringLiteral PROPERTY_TEXTLINECOLOR(u"TextLineColor")
constexpr OUStringLiteral PROPERTY_FONTSTYLENAME(u"FontStyleName")
constexpr OUStringLiteral PROPERTY_FONTWEIGHT(u"FontWeight")
constexpr OUStringLiteral PROPERTY_FONTFAMILY(u"FontFamily")
constexpr OUStringLiteral PROPERTY_TEXTRELIEF(u"FontRelief")
constexpr OUStringLiteral PROPERTY_CHAR_STRIKEOUT(u"CharStrikeout")
constexpr OUStringLiteral PROPERTY_FONTWIDTH(u"FontWidth")
constexpr OUStringLiteral PROPERTY_FONTWORDLINEMODE(u"FontWordLineMode")
constexpr OUStringLiteral PROPERTY_HIDDEN(u"Hidden")
constexpr OUStringLiteral PROPERTY_ALIGN(u"Align")
constexpr OUStringLiteral PROPERTY_ROW_HEIGHT(u"RowHeight")
#define CTF_DB_COLUMN_TEXT_ALIGN
Definition: xmlHelper.hxx:31
#define CTF_DB_NUMBERFORMAT
Definition: xmlHelper.hxx:30
#define XML_DB_TYPE_EQUAL
Definition: xmlHelper.hxx:33
#define CTF_DB_ISVISIBLE
Definition: xmlHelper.hxx:28
constexpr sal_uInt16 XML_NAMESPACE_TABLE
constexpr sal_uInt16 XML_NAMESPACE_STYLE
constexpr sal_uInt16 XML_NAMESPACE_FO
#define XML_TYPE_CONTROL_TEXT_EMPHASIZE
#define XML_TYPE_TEXT_POSTURE
#define XML_TYPE_TEXT_CROSSEDOUT_WIDTH
#define XML_TYPE_NUMBER16
#define MID_FLAG_MERGE_PROPERTY
#define XML_TYPE_ROTATION_ANGLE
#define XML_TYPE_TEXT_UNDERLINE_STYLE
#define XML_TYPE_TEXT_WEIGHT
#define XML_TYPE_PROP_PARAGRAPH
#define XML_TYPE_TEXT_CROSSEDOUT_TYPE
#define XML_TYPE_TEXT_CROSSEDOUT_TEXT
#define XML_TYPE_TEXT_UNDERLINE_COLOR
#define XML_TYPE_MEASURE16
#define MID_FLAG_SPECIAL_ITEM
#define MID_FLAG_MULTI_PROPERTY
#define XML_TYPE_TEXT_FONTENCODING
#define XML_TYPE_TEXT_FONTFAMILY
#define XML_TYPE_TEXT_UNDERLINE_HASCOLOR
#define XML_TYPE_FONT_WIDTH
#define XML_TYPE_TEXT_LINE_MODE
#define XML_TYPE_PROP_TEXT
#define XML_TYPE_TEXT_FONTPITCH
#define XML_TYPE_PROP_TABLE_COLUMN
#define XML_TYPE_TEXT_ALIGN
#define XML_TYPE_STRING
#define XML_TYPE_TEXT_UNDERLINE_WIDTH
#define XML_TYPE_MEASURE
#define XML_TYPE_COLOR
#define MID_FLAG_MERGE_ATTRIBUTE
#define XML_TYPE_NUMBER
#define XML_TYPE_PROP_TABLE_ROW
#define XML_TYPE_BOOL
#define XML_TYPE_TEXT_FONT_RELIEF
#define XML_TYPE_TEXT_CROSSEDOUT_STYLE
#define XML_TYPE_TEXT_UNDERLINE_TYPE