2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2007-04-11 12:24:38 +00:00
|
|
|
|
2013-10-23 19:09:35 +02:00
|
|
|
#ifndef INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX
|
|
|
|
#define INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX
|
2007-04-11 12:24:38 +00:00
|
|
|
|
2013-11-09 15:30:56 -06:00
|
|
|
#include <sal/config.h>
|
|
|
|
#include <xmloff/dllapi.h>
|
|
|
|
#include <sal/types.h>
|
2007-04-11 12:24:38 +00:00
|
|
|
#include <rtl/ustring.hxx>
|
|
|
|
#include <vector>
|
|
|
|
#include <xmloff/attrlist.hxx>
|
2014-06-30 09:53:06 +02:00
|
|
|
#include <rtl/ref.hxx>
|
|
|
|
#include <salhelper/simplereferenceobject.hxx>
|
2007-04-11 12:24:38 +00:00
|
|
|
#include <com/sun/star/container/XIndexAccess.hpp>
|
|
|
|
|
|
|
|
namespace com { namespace sun { namespace star {
|
|
|
|
namespace style { class XStyle; }
|
2007-07-06 08:41:18 +00:00
|
|
|
namespace container { class XIndexReplace; class XNameAccess;}
|
2007-04-11 12:24:38 +00:00
|
|
|
namespace beans { class XPropertySet; }
|
|
|
|
} } }
|
|
|
|
|
|
|
|
class SvXMLExport;
|
|
|
|
class XMLPropertyHandlerFactory;
|
|
|
|
class XMLPropertySetMapper;
|
|
|
|
class SvXMLExportPropertyMapper;
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 12:24:38 +00:00
|
|
|
struct XMLPageExportNameEntry
|
|
|
|
{
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sPageMasterName;
|
|
|
|
OUString sStyleName;
|
2007-04-11 12:24:38 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2014-06-30 09:53:06 +02:00
|
|
|
class XMLOFF_DLLPUBLIC XMLPageExport : public salhelper::SimpleReferenceObject
|
2007-04-11 12:24:38 +00:00
|
|
|
{
|
|
|
|
SvXMLExport& rExport;
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString sIsPhysical;
|
|
|
|
const OUString sFollowStyle;
|
2007-04-11 12:24:38 +00:00
|
|
|
|
2015-10-23 10:32:47 +02:00
|
|
|
css::uno::Reference< css::container::XNameAccess > xPageStyles;
|
2007-04-11 12:24:38 +00:00
|
|
|
|
|
|
|
::std::vector< XMLPageExportNameEntry > aNameVector;
|
2014-03-27 17:24:01 +02:00
|
|
|
SAL_DLLPRIVATE bool findPageMasterName( const OUString& rStyleName, OUString& rPMName ) const;
|
2007-04-11 12:24:38 +00:00
|
|
|
|
2014-06-30 09:53:06 +02:00
|
|
|
rtl::Reference < XMLPropertyHandlerFactory > xPageMasterPropHdlFactory;
|
|
|
|
rtl::Reference < XMLPropertySetMapper > xPageMasterPropSetMapper;
|
|
|
|
rtl::Reference < SvXMLExportPropertyMapper > xPageMasterExportPropMapper;
|
2007-04-11 12:24:38 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
SvXMLExport& GetExport() { return rExport; }
|
|
|
|
|
2015-01-20 12:38:10 +02:00
|
|
|
void collectPageMasterAutoStyle(
|
2015-10-23 10:32:47 +02:00
|
|
|
const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString& rPageMasterName );
|
2007-04-11 12:24:38 +00:00
|
|
|
|
|
|
|
virtual void exportMasterPageContent(
|
2015-10-23 10:32:47 +02:00
|
|
|
const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
|
2014-02-13 10:51:01 +02:00
|
|
|
bool bAutoStyles );
|
2007-04-11 12:24:38 +00:00
|
|
|
|
2014-03-27 17:24:01 +02:00
|
|
|
bool exportStyle(
|
2015-10-23 10:32:47 +02:00
|
|
|
const css::uno::Reference< css::style::XStyle >& rStyle,
|
2014-03-27 17:24:01 +02:00
|
|
|
bool bAutoStyles );
|
2007-04-11 12:24:38 +00:00
|
|
|
|
2014-03-27 17:24:01 +02:00
|
|
|
void exportStyles( bool bUsed, bool bAutoStyles );
|
2007-04-11 12:24:38 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
XMLPageExport( SvXMLExport& rExp );
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~XMLPageExport() override;
|
2007-04-11 12:24:38 +00:00
|
|
|
|
2014-03-27 17:24:01 +02:00
|
|
|
void collectAutoStyles( bool bUsed ) { exportStyles( bUsed, true ); }
|
2007-04-11 12:24:38 +00:00
|
|
|
void exportAutoStyles();
|
2014-03-27 17:24:01 +02:00
|
|
|
void exportMasterStyles( bool bUsed ) { exportStyles( bUsed, false ); }
|
2008-03-07 15:16:19 +00:00
|
|
|
|
|
|
|
//text grid enhancement for better CJK support
|
|
|
|
void exportDefaultStyle();
|
2007-04-11 12:24:38 +00:00
|
|
|
};
|
|
|
|
|
2013-10-23 19:09:35 +02:00
|
|
|
#endif // INCLUDED_XMLOFF_XMLPAGEEXPORT_HXX
|
2007-04-11 12:24:38 +00:00
|
|
|
|
2010-10-27 13:11:31 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|