/* -*- 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 .
*/
namespace com::sun::star::beans { class XPropertySet; } namespace com::sun::star::document { class XEmbeddedObjectResolver; } namespace com::sun::star::document { class XGraphicStorageHandler; } namespace com::sun::star::embed { class XStorage; } namespace com::sun::star::graphic { class XGraphic; } namespace com::sun::star::lang { class XEventListener; } namespace com::sun::star::task { class XStatusIndicator; } namespace com::sun::star::uno { class XComponentContext; } namespace com::sun::star::util { class XNumberFormatsSupplier; } namespace com::sun::star::xml::sax { class XAttributeList; } namespace com::sun::star::xml::sax { class XDocumentHandler; } namespace com::sun::star::xml::sax { class XExtendedDocumentHandler; } namespace com::sun::star::xml::sax { class XLocator; }
class SvXMLNamespaceMap; class SvXMLExport_Impl; class ProgressBarHelper; class XMLEventExport; class XMLFontAutoStylePoolEntry_Impl; class XMLImageMapExport; class XMLErrors; class LanguageTag; enumclass SvXMLErrorFlags;
// Shapes in Writer cannot be named via context menu (#i51726#) #include <unotools/moduleoptions.hxx>
namespace com::sun::star { namespace frame { class XModel; } namespace lang { struct Locale; }
} namespace comphelper { class UnoInterfaceToUniqueIdentifierMapper; }
namespace model { class Theme; } namespace vcl { class ILibreOfficeKitNotifier; }
rtl::Reference<comphelper::AttributeList> mxAttrList; // a common attribute list
OUString msOrigFileName; // the original URL
OUString msFilterName;
OUString msImgFilterName;
std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap; // the namespace map
std::unique_ptr<SvtSecurityMapPersonalInfo> mpAuthorIDs; // map authors to remove personal info
SvXMLUnitConverter maUnitConv; // the unit converter
std::unique_ptr<SvXMLNumFmtExport> mpNumExport;
std::unique_ptr<ProgressBarHelper> mpProgressBarHelper;
// get a new namespace map (used in starmath to have a default namespace) void ResetNamespaceMap();
/// Override this method to export the content of <office:meta>. /// There is a default implementation. virtualvoid ExportMeta_();
/// Override this method to export the content of <office:scripts>. /// There is a default implementation. virtualvoid ExportScripts_();
/// Override this method to export the font declarations /// The default implementation will export the contents of the /// XMLFontAutoStylePool if it has been created. virtualvoid ExportFontDecls_();
/// Override this method to export the content of <style:styles>. /// If bUsed is set, used styles should be exported only. /// Overriding Methods must call this method ! virtualvoid ExportStyles_( bool bUsed );
/// Override this method to export the contents of <style:auto-styles>. virtualvoid ExportAutoStyles_() = 0;
/// Override this method to export the contents of <style:master-styles>. virtualvoid ExportMasterStyles_() = 0;
/// Override this method to export the content of <office:body>. virtualvoid ExportContent_() = 0;
The default implementation will obtain the view settings by calling GetViewSettingsAndViews, and the configuration settings by calling GetConfigurationSettings, and return them together with the proper XML token.
@return the accumulated count of all settings in all groups
*/ virtual sal_Int32 GetDocumentSpecificSettings( ::std::vector< SettingsGroup >& _out_rSettings );
// We write font info to both content.xml and styles.xml, but they are written by different // SvXMLExport instances, and would therefore embed each font file twice, if done naively. On // the other hand, we can't limit the embedding only to content.xml phase, because there it // doesn't handle some style-specific content like headers/footers. These methods are for // passing the "already embedded" information from one instance to another.
/** Add language tag attributes, deciding which are necessary.
@param nPrefix Namespace prefix for *:language, *:script and *:country
@param nPrefixRfc Namespace prefix for *:rfc-language-tag
@param bWriteEmpty Whether to write empty *:language and *:country attribute values in case of an empty locale (denoting system).
*/ void AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPrefixRfc, const css::lang::Locale& rLocale, bool bWriteEmpty);
/** Same as AddLanguageTagAttributes() but with LanguageTag parameter instead of Locale.
*/ void AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPrefixRfc, const LanguageTag& rLanguageTag, bool bWriteEmpty );
// add several attributes to the common attribute list void AddAttributeList( const css::uno::Reference<
css::xml::sax::XAttributeList >& xAttrList );
// Get common attribute list as implementation or interface.
comphelper::AttributeList &GetAttrList() { return *mxAttrList; }
css::uno::Reference< css::xml::sax::XAttributeList > GetXAttrList() const { return mxAttrList; }
// Get document handler. This methods are not const, because the // reference allows modifications through the handler. const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() const{ return mxHandler; }
// Get original URL. const OUString& GetOrigFileName() const { return msOrigFileName; }
/// get Event export, with handlers for script types "None" and /// "StarBasic" already registered; other handlers may be registered, too.
XMLEventExport& GetEventExport();
/// get the export for image maps
XMLImageMapExport& GetImageMapExport();
/** * Record an error condition that occurred during export. The * behavior of SetError can be modified using the error flag * constants.
*/ void SetError( /// error ID, may contain an error flag
sal_Int32 nId, /// string parameters for the error message const css::uno::Sequence< OUString> & rMsgParams, /// original exception message (if applicable) const OUString& rExceptionMessage, /// error location (if applicable) const css::uno::Reference<css::xml::sax::XLocator> & rLocator );
/// returns value of ODF version attribute charconst* GetODFVersionAttributeValue() const;
/// returns the deterministic version for odf export
SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion() const;
// FIXME: this is only for legacy stuff that has not yet been adapted // to implement XMetadatable; this can write duplicate IDs! /// add xml:id and legacy namespace id void SAL_DLLPRIVATE AddAttributeIdLegacy(
sal_uInt16 const nLegacyPrefix, OUString const& rValue);
// The constructor prints a start tag that has the common attributes // of the XMLExport instance attached.
SvXMLElementExport( SvXMLExport& rExp, sal_uInt16 nPrefix, const OUString& rName, bool bIgnWSOutside, bool bIgnWSInside );
SvXMLElementExport( SvXMLExport& rExp, sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, bool bIgnWSOutside, bool bIgnWSInside );
SvXMLElementExport( SvXMLExport& rExp, const OUString& rQName, bool bIgnWSOutside, bool bIgnWSInside );
// These constructors do nothing if bDoSomething is not set
SvXMLElementExport( SvXMLExport& rExp, bool bDoSomething,
sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, bool bIgnWSOutside, bool bIgnWSInside );
// The destructor prints an end tag.
~SvXMLElementExport();
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.