LibreOffice Module xmloff (master) 1
PagePropertySetContext.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 <tools/debug.hxx>
26#include <xmloff/xmlimppr.hxx>
27#include <xmloff/xmlprmap.hxx>
28
29
30using namespace ::com::sun::star::uno;
31using namespace ::com::sun::star;
32
34 SvXMLImport& rImport, sal_Int32 nElement,
35 const Reference< xml::sax::XFastAttributeList > & xAttrList,
36 sal_uInt32 nFam,
37 ::std::vector< XMLPropertyState > &rProps,
39 sal_Int32 nStartIndex, sal_Int32 nEndIndex,
40 const PageContextType aTempType ) :
41 SvXMLPropertySetContext( rImport, nElement, xAttrList, nFam,
42 rProps, rMap, nStartIndex, nEndIndex )
43{
44 aType = aTempType;
45}
46
48{
49}
50
51css::uno::Reference< css::xml::sax::XFastContextHandler > PagePropertySetContext::createFastChildContext(
52 sal_Int32 nElement,
53 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
54 ::std::vector< XMLPropertyState > &rProperties,
55 const XMLPropertyState& rProp )
56{
57 sal_Int32 nPos = CTF_PM_GRAPHICPOSITION;
58 sal_Int32 nFil = CTF_PM_GRAPHICFILTER;
59 switch ( aType )
60 {
61 case Header:
62 {
65 }
66 break;
67 case Footer:
68 {
71 }
72 break;
73 default:
74 break;
75 }
76
77 switch( mxMapper->getPropertySetMapper()
78 ->GetEntryContextId( rProp.mnIndex ) )
79 {
83 DBG_ASSERT( rProp.mnIndex >= 2 &&
84 nPos == mxMapper->getPropertySetMapper()
85 ->GetEntryContextId( rProp.mnIndex-2 ) &&
86 nFil == mxMapper->getPropertySetMapper()
87 ->GetEntryContextId( rProp.mnIndex-1 ),
88 "invalid property map!");
89 return
90 new XMLBackgroundImageContext( GetImport(), nElement,
91 xAttrList,
92 rProp,
93 rProp.mnIndex-2,
94 rProp.mnIndex-1,
95 -1,
96 mxMapper->getPropertySetMapper()->FindEntryIndex(CTF_PM_FILLBITMAPMODE),
97 rProperties );
98 break;
99
101 return new XMLTextColumnsContext(GetImport(), nElement, xAttrList, rProp, rProperties);
102 break;
103
106 GetImport(), nElement, rProperties,
107 mxMapper->getPropertySetMapper(), rProp.mnIndex);
108 break;
109 }
110
112 xAttrList,
113 rProperties, rProp );
114}
115
116
117/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define CTF_PM_TEXTCOLUMNS
#define CTF_PM_HEADERGRAPHICURL
#define CTF_PM_FTN_LINE_WEIGHT
#define CTF_PM_HEADERGRAPHICPOSITION
#define CTF_PM_FOOTERGRAPHICFILTER
#define CTF_PM_FILLBITMAPMODE
#define CTF_PM_GRAPHICPOSITION
#define CTF_PM_GRAPHICFILTER
#define CTF_PM_HEADERGRAPHICFILTER
#define CTF_PM_GRAPHICURL
#define CTF_PM_FOOTERGRAPHICURL
#define CTF_PM_FOOTERGRAPHICPOSITION
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, ::std::vector< XMLPropertyState > &rProperties, const XMLPropertyState &rProp) override
This method is called from this instance implementation of CreateChildContext if the element matches ...
PagePropertySetContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, sal_uInt32 nFam, ::std::vector< XMLPropertyState > &rProps, const rtl::Reference< SvXMLImportPropertyMapper > &rMap, sal_Int32 nStartIndex, sal_Int32 nEndIndex, const PageContextType aType)
virtual ~PagePropertySetContext() override
SvXMLImport & GetImport()
Definition: xmlictxt.hxx:60
rtl::Reference< SvXMLImportPropertyMapper > mxMapper
Definition: xmlprcon.hxx:37
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
Definition: xmlprcon.cxx:55
Import the footnote-separator element in page styles.
#define DBG_ASSERT(sCon, aError)
sal_uInt16 nPos
Header
Footer
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:140
sal_Int32 mnIndex
Definition: maptype.hxx:141