1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "xmlHelper.hxx"
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/families.hxx>
#include <xmloff/controlpropertyhdl.hxx>
#include <xmloff/xmltkmap.hxx>
#include <connectivity/dbtools.hxx>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/propertysetinfo.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/awt/ImageScaleMode.hpp>
#include <xmloff/prstylei.hxx>
#include <strings.hxx>
#include "xmlEnums.hxx"
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/report/ForceNewPage.hpp>
#include <com/sun/star/report/ReportPrintOption.hpp>
#include <com/sun/star/report/KeepTogether.hpp>
#include <xmloff/xmlement.hxx>
#include <xmloff/xmltypes.hxx>
#include <xmloff/maptype.hxx>
#include <com/sun/star/report/XReportControlFormat.hpp>
#include <com/sun/star/form/ListSourceType.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <xmloff/EnumPropertyHdl.hxx>
#include <osl/diagnose.h>
#define XML_RPT_ALIGNMENT (XML_DB_TYPES_START+1)
namespace rptxml
{
using namespace ::xmloff::token;
using namespace ::com::sun::star::awt;
using namespace ::com::sun::star;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::form;
using namespace ::com::sun::star::beans;
OPropertyHandlerFactory::OPropertyHandlerFactory()
{
}
OPropertyHandlerFactory::~OPropertyHandlerFactory()
{
}
const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32 _nType) const
{
const XMLPropertyHandler* pHandler = nullptr;
sal_Int32 nType = _nType;
nType &= MID_FLAG_MASK;
switch(nType)
{
case XML_RPT_ALIGNMENT:
{
static SvXMLEnumMapEntry<style::VerticalAlignment> const pXML_VerticalAlign_Enum[] =
{
{ XML_TOP, style::VerticalAlignment_TOP },
{ XML_MIDDLE, style::VerticalAlignment_MIDDLE },
{ XML_BOTTOM, style::VerticalAlignment_BOTTOM },
{ XML_TOKEN_INVALID, style::VerticalAlignment(0) }
};
pHandler = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum );
}
break;
case XML_SD_TYPES_START+34: // XML_SD_TYPE_IMAGE_SCALE_MODE
pHandler = new xmloff::ImageScaleModeHandler();
break;
default:
break;
}
if ( !pHandler )
pHandler = OControlPropertyHandlerFactory::GetPropertyHandler(_nType);
else
PutHdlCache(nType, pHandler);
return pHandler;
}
#define MAP_CONST_T_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE, context, SvtSaveOptions::ODFSVER_010, false }
#define MAP_CONST_P_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFSVER_010, false }
#define MAP_CONST_S( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_SECTION, context, SvtSaveOptions::ODFSVER_010, false }
#define MAP_CONST_C_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE_CELL, context, SvtSaveOptions::ODFSVER_010, false }
#define MAP_END() { nullptr, 0, 0, XML_TOKEN_INVALID, 0 ,0, SvtSaveOptions::ODFSVER_010, false}
rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _bOldFormat, bool bForExport)
{
if ( _bOldFormat )
{
static const XMLPropertyMapEntry s_aXMLCellStylesProperties[] =
{
MAP_CONST_C_ASCII( PROPERTY_FORMATKEY, STYLE, DATA_STYLE_NAME, XML_TYPE_NUMBER | MID_FLAG_SPECIAL_ITEM, CTF_RPT_NUMBERFORMAT ),
MAP_CONST_C_ASCII( PROPERTY_CONTROLBACKGROUND,
FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_CONST_C_ASCII( PROPERTY_VERTICALALIGN, STYLE, VERTICAL_ALIGN, XML_RPT_ALIGNMENT, 0 ),
MAP_CONST_C_ASCII( PROPERTY_CONTROLBACKGROUNDTRANSPARENT,
FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
MAP_CONST_P_ASCII( PROPERTY_CONTROLBACKGROUND,
FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_CONST_P_ASCII( PROPERTY_CONTROLBACKGROUNDTRANSPARENT,
FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
MAP_CONST_C_ASCII( "BorderLeft", FO, BORDER_LEFT, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderRight", FO, BORDER_RIGHT, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderTop", FO, BORDER_TOP, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END()
};
return new XMLPropertySetMapper(s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
}
else
{
static const XMLPropertyMapEntry s_aXMLCellStylesProperties[] =
{
MAP_CONST_C_ASCII( PROPERTY_FORMATKEY, STYLE, DATA_STYLE_NAME, XML_TYPE_NUMBER | MID_FLAG_SPECIAL_ITEM, CTF_RPT_NUMBERFORMAT ),
MAP_CONST_C_ASCII( PROPERTY_CONTROLBACKGROUND,
FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_CONST_C_ASCII( PROPERTY_CONTROLBACKGROUNDTRANSPARENT,
FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
MAP_CONST_C_ASCII( PROPERTY_VERTICALALIGN,
STYLE, VERTICAL_ALIGN, XML_RPT_ALIGNMENT, 0 ),
MAP_CONST_C_ASCII( "BorderLeft", FO, BORDER_LEFT, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderRight", FO, BORDER_RIGHT, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderTop", FO, BORDER_TOP, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END()
};
return new XMLPropertySetMapper(s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
}
}
const XMLPropertyMapEntry* OXMLHelper::GetTableStyleProps()
{
static const XMLPropertyMapEntry aXMLTableStylesProperties[] =
{
MAP_CONST_T_ASCII( PROPERTY_BACKCOLOR, FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_CONST_T_ASCII( PROPERTY_BACKTRANSPARENT,FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT | MID_FLAG_MERGE_ATTRIBUTE, 0 ),
MAP_END()
};
return aXMLTableStylesProperties;
}
const XMLPropertyMapEntry* OXMLHelper::GetRowStyleProps()
{
static const XMLPropertyMapEntry aXMLStylesProperties[] =
{
MAP_CONST_S("Height", STYLE, ROW_HEIGHT, XML_TYPE_PROP_TABLE_ROW | XML_TYPE_MEASURE, 0),
MAP_CONST_S("MinHeight", STYLE, MIN_ROW_HEIGHT, XML_TYPE_PROP_TABLE_ROW | XML_TYPE_MEASURE, 0),
MAP_END()
};
return aXMLStylesProperties;
}
const XMLPropertyMapEntry* OXMLHelper::GetColumnStyleProps()
{
static const XMLPropertyMapEntry aXMLColumnStylesProperties[] =
{
MAP_CONST_S( "Width", STYLE, COLUMN_WIDTH, XML_TYPE_PROP_TABLE_COLUMN|XML_TYPE_MEASURE, 0 ),
MAP_END()
};
return aXMLColumnStylesProperties;
}
const SvXMLEnumMapEntry<sal_Int16>* OXMLHelper::GetReportPrintOptions()
{
static const SvXMLEnumMapEntry<sal_Int16> s_aXML_EnumMap[] =
{
{ XML_NOT_WITH_REPORT_HEADER, report::ReportPrintOption::NOT_WITH_REPORT_HEADER },
{ XML_NOT_WITH_REPORT_FOOTER, report::ReportPrintOption::NOT_WITH_REPORT_FOOTER },
{ XML_NOT_WITH_REPORT_HEADER_NOR_FOOTER, report::ReportPrintOption::NOT_WITH_REPORT_HEADER_FOOTER },
{ XML_TOKEN_INVALID, 0 }
};
return s_aXML_EnumMap;
}
const SvXMLEnumMapEntry<sal_Int16>* OXMLHelper::GetForceNewPageOptions()
{
static const SvXMLEnumMapEntry<sal_Int16> s_aXML_EnumMap[] =
{
{ XML_BEFORE_SECTION, report::ForceNewPage::BEFORE_SECTION },
{ XML_AFTER_SECTION, report::ForceNewPage::AFTER_SECTION },
{ XML_BEFORE_AFTER_SECTION, report::ForceNewPage::BEFORE_AFTER_SECTION },
{ XML_TOKEN_INVALID, 0 }
};
return s_aXML_EnumMap;
}
const SvXMLEnumMapEntry<sal_Int16>* OXMLHelper::GetKeepTogetherOptions()
{
static const SvXMLEnumMapEntry<sal_Int16> s_aXML_EnumMap[] =
{
{ XML_WHOLE_GROUP, report::KeepTogether::WHOLE_GROUP },
{ XML_WITH_FIRST_DETAIL, report::KeepTogether::WITH_FIRST_DETAIL },
{ XML_TOKEN_INVALID, 0 }
};
return s_aXML_EnumMap;
}
const SvXMLEnumMapEntry<sal_Int32>* OXMLHelper::GetCommandTypeOptions()
{
static const SvXMLEnumMapEntry<sal_Int32> s_aXML_EnumMap[] =
{
{ XML_TABLE, CommandType::TABLE },
{ XML_QUERY, CommandType::QUERY },
{ XML_TOKEN_INVALID, 0 }
};
return s_aXML_EnumMap;
}
#define PROPERTY_ID_FONTNAME 1
#define PROPERTY_ID_FONTHEIGHT 2
#define PROPERTY_ID_FONTWIDTH 3
#define PROPERTY_ID_FONTSTYLENAME 4
#define PROPERTY_ID_FONTFAMILY 5
#define PROPERTY_ID_FONTCHARSET 6
#define PROPERTY_ID_FONTPITCH 7
#define PROPERTY_ID_FONTCHARWIDTH 8
#define PROPERTY_ID_FONTWEIGHT 9
#define PROPERTY_ID_FONTSLANT 10
#define PROPERTY_ID_FONTUNDERLINE 11
#define PROPERTY_ID_FONTSTRIKEOUT 12
#define PROPERTY_ID_FONTORIENTATION 13
#define PROPERTY_ID_FONTKERNING 14
#define PROPERTY_ID_FONTWORDLINEMODE 15
#define PROPERTY_ID_FONTTYPE 16
void OXMLHelper::copyStyleElements(const bool _bOld,const OUString& _sStyleName,const SvXMLStylesContext* _pAutoStyles,const uno::Reference<beans::XPropertySet>& _xProp)
{
if ( !_xProp.is() || _sStyleName.isEmpty() || !_pAutoStyles )
return;
XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext *>(_pAutoStyles->FindStyleChildContext(XmlStyleFamily::TABLE_CELL,_sStyleName)));
if ( !pAutoStyle )
return;
css::awt::FontDescriptor aFont;
static comphelper::PropertyMapEntry const pMap[] =
{
{OUString(PROPERTY_FONTNAME), PROPERTY_ID_FONTNAME, cppu::UnoType<decltype(aFont.Name)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_CHARFONTHEIGHT), PROPERTY_ID_FONTHEIGHT, cppu::UnoType<decltype(aFont.Height)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTWIDTH), PROPERTY_ID_FONTWIDTH, cppu::UnoType<decltype(aFont.Width)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTSTYLENAME), PROPERTY_ID_FONTSTYLENAME, cppu::UnoType<decltype(aFont.StyleName)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTFAMILY), PROPERTY_ID_FONTFAMILY, cppu::UnoType<decltype(aFont.Family)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTCHARSET), PROPERTY_ID_FONTCHARSET, cppu::UnoType<decltype(aFont.CharSet)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTPITCH), PROPERTY_ID_FONTPITCH, cppu::UnoType<decltype(aFont.Pitch)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTCHARWIDTH), PROPERTY_ID_FONTCHARWIDTH, cppu::UnoType<decltype(aFont.CharacterWidth)>::get(),PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTWEIGHT), PROPERTY_ID_FONTWEIGHT, cppu::UnoType<decltype(aFont.Weight)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_CHARPOSTURE), PROPERTY_ID_FONTSLANT, cppu::UnoType<decltype(aFont.Slant)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTUNDERLINE), PROPERTY_ID_FONTUNDERLINE, cppu::UnoType<decltype(aFont.Underline)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_CHARSTRIKEOUT), PROPERTY_ID_FONTSTRIKEOUT, cppu::UnoType<decltype(aFont.Strikeout)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTORIENTATION), PROPERTY_ID_FONTORIENTATION, cppu::UnoType<decltype(aFont.Orientation)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTKERNING), PROPERTY_ID_FONTKERNING, cppu::UnoType<decltype(aFont.Kerning)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_CHARWORDMODE), PROPERTY_ID_FONTWORDLINEMODE, cppu::UnoType<decltype(aFont.WordLineMode)>::get() ,PropertyAttribute::BOUND,0},
{OUString(PROPERTY_FONTTYPE), PROPERTY_ID_FONTTYPE, cppu::UnoType<decltype(aFont.Type)>::get() ,PropertyAttribute::BOUND,0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
try
{
pAutoStyle->FillPropertySet(_xProp);
if ( _bOld && _xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_CHARHIDDEN) )
_xProp->setPropertyValue(PROPERTY_CHARHIDDEN,uno::makeAny(false));
uno::Reference<beans::XPropertySet> xProp = comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap));
pAutoStyle->FillPropertySet(xProp);
xProp->getPropertyValue(PROPERTY_FONTNAME) >>= aFont.Name;
xProp->getPropertyValue(PROPERTY_CHARFONTHEIGHT) >>= aFont.Height;
xProp->getPropertyValue(PROPERTY_FONTWIDTH) >>= aFont.Width;
xProp->getPropertyValue(PROPERTY_FONTSTYLENAME) >>= aFont.StyleName;
xProp->getPropertyValue(PROPERTY_FONTFAMILY) >>= aFont.Family;
xProp->getPropertyValue(PROPERTY_FONTCHARSET) >>= aFont.CharSet;
xProp->getPropertyValue(PROPERTY_FONTPITCH) >>= aFont.Pitch;
xProp->getPropertyValue(PROPERTY_FONTCHARWIDTH) >>= aFont.CharacterWidth;
xProp->getPropertyValue(PROPERTY_FONTWEIGHT) >>= aFont.Weight;
xProp->getPropertyValue(PROPERTY_CHARPOSTURE) >>= aFont.Slant;
xProp->getPropertyValue(PROPERTY_FONTUNDERLINE) >>= aFont.Underline;
xProp->getPropertyValue(PROPERTY_CHARSTRIKEOUT) >>= aFont.Strikeout;
xProp->getPropertyValue(PROPERTY_FONTORIENTATION) >>= aFont.Orientation;
xProp->getPropertyValue(PROPERTY_FONTKERNING) >>= aFont.Kerning;
xProp->getPropertyValue(PROPERTY_CHARWORDMODE) >>= aFont.WordLineMode;
xProp->getPropertyValue(PROPERTY_FONTTYPE) >>= aFont.Type;
uno::Reference<report::XReportControlFormat> xReportControlModel(_xProp,uno::UNO_QUERY);
if ( xReportControlModel.is() && !aFont.Name.isEmpty() )
{
try
{
xReportControlModel->setFontDescriptor(aFont);
}
catch(const beans::UnknownPropertyException &){}
}
}
catch(uno::Exception&)
{
OSL_FAIL("OXMLHelper::copyStyleElements -> exception caught");
}
}
uno::Reference<beans::XPropertySet> OXMLHelper::createBorderPropertySet()
{
static comphelper::PropertyMapEntry const pMap[] =
{
{OUString(PROPERTY_BORDERLEFT), 0, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0},
{OUString(PROPERTY_BORDERRIGHT), 1, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0},
{OUString(PROPERTY_BORDERTOP), 2, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0},
{OUString(PROPERTY_BORDERBOTTOM), 3, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap));
}
std::unique_ptr<SvXMLTokenMap> OXMLHelper::GetReportElemTokenMap()
{
static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_REPORT_HEADER, XML_TOK_REPORT_HEADER },
{ XML_NAMESPACE_REPORT, XML_PAGE_HEADER , XML_TOK_PAGE_HEADER },
{ XML_NAMESPACE_REPORT, XML_GROUP, XML_TOK_GROUP },
{ XML_NAMESPACE_REPORT, XML_DETAIL , XML_TOK_DETAIL },
{ XML_NAMESPACE_REPORT, XML_PAGE_FOOTER , XML_TOK_PAGE_FOOTER },
{ XML_NAMESPACE_REPORT, XML_REPORT_FOOTER, XML_TOK_REPORT_FOOTER },
{ XML_NAMESPACE_REPORT, XML_HEADER_ON_NEW_PAGE, XML_TOK_HEADER_ON_NEW_PAGE },
{ XML_NAMESPACE_REPORT, XML_FOOTER_ON_NEW_PAGE, XML_TOK_FOOTER_ON_NEW_PAGE },
{ XML_NAMESPACE_REPORT, XML_COMMAND_TYPE, XML_TOK_COMMAND_TYPE },
{ XML_NAMESPACE_REPORT, XML_COMMAND, XML_TOK_COMMAND },
{ XML_NAMESPACE_REPORT, XML_FILTER, XML_TOK_FILTER },
{ XML_NAMESPACE_REPORT, XML_CAPTION, XML_TOK_CAPTION },
{ XML_NAMESPACE_REPORT, XML_ESCAPE_PROCESSING, XML_TOK_ESCAPE_PROCESSING },
{ XML_NAMESPACE_REPORT, XML_FUNCTION, XML_TOK_REPORT_FUNCTION },
{ XML_NAMESPACE_OFFICE, XML_MIMETYPE, XML_TOK_REPORT_MIMETYPE },
{ XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_REPORT_NAME },
{ XML_NAMESPACE_REPORT, XML_MASTER_DETAIL_FIELDS, XML_TOK_MASTER_DETAIL_FIELDS },
{ XML_NAMESPACE_DRAW, XML_FRAME, XML_TOK_SUB_FRAME },
{ XML_NAMESPACE_OFFICE, XML_BODY, XML_TOK_SUB_BODY },
XML_TOKEN_MAP_END
};
return std::make_unique<SvXMLTokenMap>( aElemTokenMap );
}
std::unique_ptr<SvXMLTokenMap> OXMLHelper::GetSubDocumentElemTokenMap()<--- The function 'GetSubDocumentElemTokenMap' is never used.
{
static const SvXMLTokenMapEntry aElemTokenMap[]=
{
{ XML_NAMESPACE_REPORT, XML_MASTER_DETAIL_FIELD, XML_TOK_MASTER_DETAIL_FIELD},
{ XML_NAMESPACE_REPORT, XML_MASTER, XML_TOK_MASTER},
{ XML_NAMESPACE_REPORT, XML_DETAIL, XML_TOK_SUB_DETAIL},
XML_TOKEN_MAP_END
};
return std::make_unique<SvXMLTokenMap>( aElemTokenMap );
}
const SvXMLEnumMapEntry<sal_Int16>* OXMLHelper::GetImageScaleOptions()
{
static const SvXMLEnumMapEntry<sal_Int16> s_aXML_EnumMap[] =
{
{ XML_ISOTROPIC, awt::ImageScaleMode::ISOTROPIC },
{ XML_ANISOTROPIC, awt::ImageScaleMode::ANISOTROPIC },
{ XML_TOKEN_INVALID, 0 }
};
return s_aXML_EnumMap;
}
} // rptxml
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|