fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / xmloff / source / style / PageHeaderFooterContext.cxx
blobb58301f48b1b74af48828f0e752fee308c7cc1d4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #include "PageHeaderFooterContext.hxx"
21 #include "xmloff/xmlnmspe.hxx"
22 #include <xmloff/xmltoken.hxx>
23 #include "PagePropertySetContext.hxx"
25 using namespace com::sun::star;
26 using ::xmloff::token::IsXMLToken;
27 using ::xmloff::token::XML_HEADER_FOOTER_PROPERTIES;
29 //------------------------------------------------------------------
31 PageHeaderFooterContext::PageHeaderFooterContext( SvXMLImport& rImport,
32 sal_uInt16 nPrfx,
33 const OUString& rLName,
34 const ::com::sun::star::uno::Reference<
35 ::com::sun::star::xml::sax::XAttributeList>&,
36 ::std::vector< XMLPropertyState > & rTempProperties,
37 const UniReference < SvXMLImportPropertyMapper > &rTempMap,
38 sal_Int32 nStart, sal_Int32 nEnd,
39 const sal_Bool bTempHeader ) :
40 SvXMLImportContext( rImport, nPrfx, rLName ),
41 rProperties(rTempProperties),
42 nStartIndex(nStart),
43 nEndIndex(nEnd),
44 rMap(rTempMap)
46 bHeader = bTempHeader;
49 PageHeaderFooterContext::~PageHeaderFooterContext()
53 SvXMLImportContext *PageHeaderFooterContext::CreateChildContext( sal_uInt16 nPrefix,
54 const OUString& rLName,
55 const ::com::sun::star::uno::Reference<
56 ::com::sun::star::xml::sax::XAttributeList>& xAttrList )
58 SvXMLImportContext *pContext = 0;
60 if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLName, XML_HEADER_FOOTER_PROPERTIES ) )
62 PageContextType aType = Header;
63 if (!bHeader)
64 aType = Footer;
65 pContext = new PagePropertySetContext( GetImport(), nPrefix,
66 rLName, xAttrList,
67 XML_TYPE_PROP_HEADER_FOOTER,
68 rProperties,
69 rMap, nStartIndex, nEndIndex, aType);
73 if( !pContext )
74 pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName );
76 return pContext;
79 void PageHeaderFooterContext::EndElement()
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */