LibreOffice Module xmloff (master) 1
PageMasterPropHdlFactory.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
21#include <enummaps.hxx>
22#include <xmloff/xmlement.hxx>
23#include <xmloff/xmltypes.hxx>
24#include <xmloff/xmltoken.hxx>
25#include "xmlbahdl.hxx"
29#include "PageMasterPropHdl.hxx"
31#include <com/sun/star/text/TextGridMode.hpp>
33#include <osl/diagnose.h>
36#include <com/sun/star/drawing/BitmapMode.hpp>
39
40using namespace ::xmloff::token;
41using namespace ::com::sun::star;
42using namespace ::com::sun::star::drawing;
43
45{
46 { XML_NONE, text::TextGridMode::NONE },
47 { XML_LINE, text::TextGridMode::LINES },
48 { XML_BOTH, text::TextGridMode::LINES_AND_CHARS },
50};
51
53{
54}
55
57{
58}
59
61{
63
65 if( !pHdl )
66 {
67 switch( nType )
68 {
71 break;
73 pHdl = new XMLPMPropHdl_NumFormat;
74 break;
77 break;
80 break;
82 pHdl = new XMLNamedBoolPropertyHdl(
85 break;
88 break;
90 pHdl = new XMLPMPropHdl_Print( XML_CHARTS );
91 break;
93 pHdl = new XMLPMPropHdl_Print( XML_DRAWINGS );
94 break;
96 pHdl = new XMLPMPropHdl_Print( XML_FORMULAS );
97 break;
99 pHdl = new XMLPMPropHdl_Print( XML_GRID );
100 break;
102 pHdl = new XMLPMPropHdl_Print( XML_HEADERS );
103 break;
105 pHdl = new XMLPMPropHdl_Print( XML_OBJECTS );
106 break;
109 break;
112 GetXMLToken( XML_LTR ) );
113 break;
115 pHdl = new XMLNumberNonePropHdl( XML_CONTINUE, 2 );
116 break;
119 break;
122 break;
125 break;
129 break;
130
133 break;
136 break;
139 break;
142 break;
145 break;
148 break;
152 break;
154 pHdl = new XMLRtlGutterPropertyHandler();
155 break;
156
157 default:
158 {
159 OSL_ENSURE(false, "XMLPropertyHandler missing (!)");
160 break;
161 }
162 }
163
164 if( pHdl )
165 PutHdlCache( nType, pHdl );
166 }
167 return pHdl;
168}
169
170/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvXMLEnumMapEntry< sal_uInt16 > const aXML_TextGridMode_ConstantMap[]
#define XML_PM_TYPE_NUMLETTERSYNC
#define XML_PM_TYPE_PRINTOBJECTS
#define XML_PM_TYPE_PRINTORIENTATION
#define XML_PM_TYPE_PRINTGRID
#define XML_PM_TYPE_PAGESTYLELAYOUT
#define XML_PM_TYPE_CENTER_VERTICAL
#define XML_PM_TYPE_PRINTZEROVALUES
#define XML_PM_TYPE_PRINTFORMULAS
#define XML_PM_TYPE_PRINTCHARTS
#define XML_PM_TYPE_PAPERTRAYNUMBER
#define XML_PM_TYPE_PRINTHEADERS
#define XML_PM_TYPE_PRINTDRAWING
#define XML_PM_TYPE_CENTER_HORIZONTAL
#define XML_PM_TYPE_FIRSTPAGENUMBER
#define XML_PM_TYPE_PRINTANNOTATIONS
#define XML_PM_TYPE_PRINTPAGEORDER
#define XML_PM_TYPE_NUMFORMAT
Abstract base-class for different XML-types.
Abstract base-class for different XML-types.
Abstract base-class for different XML-types.
PropertyHandler for a generic xml enumeration type:
Abstract base-class for different XML-types.
PropertyHandler for a named xml bool type:
PropertyHandler for the XML-data-type: XML_TYPE_NUMBER_NONE.
Definition: xmlbahdl.hxx:45
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const override
This method retrieves a PropertyHandler for the given XML-type.
virtual ~XMLPageMasterPropHdlFactory() override
void PutHdlCache(sal_Int32 nType, const XMLPropertyHandler *pHdl) const
Puts a PropertyHandler into the internal cache.
Definition: prhdlfac.cxx:159
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const
This method retrieves a PropertyHandler for the given XML-type.
Definition: prhdlfac.cxx:141
Abstract base-class for different XML-types.
Definition: xmlprhdl.hxx:36
Maps <style:page-layout-properties style:writing-mode="..."> to RtlGutter.
PropertyHandler for the XML-data-type:
Handling of tokens in XML:
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
Definition: xmltoken.cxx:3541
QPRO_FUNC_TYPE nType
SvXMLEnumMapEntry< drawing::FillStyle > const aXML_FillStyle_EnumMap[]
Definition: sdpropls.cxx:420
SvXMLEnumMapEntry< drawing::BitmapMode > const aXML_BitmapMode_EnumMap[]
Definition: sdpropls.cxx:517
SvXMLEnumMapEntry< drawing::RectanglePoint > const aXML_RefPoint_EnumMap[]
Definition: sdpropls.cxx:566
#define XML_SW_TYPE_BITMAPREPOFFSETY
Definition: xmltypes.hxx:292
#define XML_TYPE_LAYOUT_GRID_MODE
Definition: xmltypes.hxx:252
#define XML_SW_TYPE_PRESPAGE_BACKSIZE
Definition: xmltypes.hxx:296
#define XML_SW_TYPE_RTLGUTTER
Definition: xmltypes.hxx:297
#define XML_SW_TYPE_FILLSTYLE
Definition: xmltypes.hxx:286
#define XML_SW_TYPE_LOGICAL_SIZE
Definition: xmltypes.hxx:288
#define XML_SW_TYPE_BITMAP_REFPOINT
Definition: xmltypes.hxx:289
#define XML_TYPE_TEXT_COLUMNS
Definition: xmltypes.hxx:204
#define XML_SW_TYPE_BITMAP_MODE
Definition: xmltypes.hxx:290
#define XML_SW_TYPE_FILLBITMAPSIZE
Definition: xmltypes.hxx:287
#define MID_FLAG_MASK
Definition: xmltypes.hxx:36
#define XML_SW_TYPE_BITMAPREPOFFSETX
Definition: xmltypes.hxx:291