/* -*- 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 .
*/ #ifndef INCLUDED_XMLOFF_TXTIMP_HXX #define INCLUDED_XMLOFF_TXTIMP_HXX
class XMLTextListsHelper; class SvXMLImportContext; class SvXMLImportPropertyMapper; class SvXMLImport; class SvXMLStylesContext; class SvxXMLListStyleContext; class XMLPropStyleContext; class SvI18NMap; template<class A> class XMLPropertyBackpatcher; class XMLEventsImportContext;
namespace xmloff { struct ParsedRDFaAttributes;
}
namespace com::sun::star { namespace text { class XText; class XTextCursor; class XTextRange; class XTextContent; class XFormField;
} namespace frame { class XModel; } namespace container { class XNameContainer; class XIndexReplace; } namespace beans { class XPropertySet; } namespace xml::sax { class XFastAttributeList; } namespace util { struct DateTime; }
}
namespace rtl { template <class reference_type> class Reference; }
/// variable type (for XMLSetVarFieldImportContext) enum VarType
{
VarTypeSimple,
VarTypeUserField,
VarTypeSequence // see following NOTE!
};
// NOTE: these values must be distinct from any in "enum VarType" because they // are used as keys to SvI18NMap::Add() #define XML_TEXT_RENAME_TYPE_FRAME 10 #define XML_TEXT_RENAME_TYPE_TABLE 20
class XMLOFF_DLLPUBLIC XMLTextImportHelper : public salhelper::SimpleReferenceObject
{ private:
XMLTextImportHelper(const XMLTextImportHelper&) = delete;
XMLTextImportHelper& operator=(const XMLTextImportHelper&) = delete;
struct Impl;
std::unique_ptr<Impl> m_xImpl; /// ugly, but implementation of this is in XMLPropertyBackpatcher.cxx struct BackpatcherImpl;
std::shared_ptr<BackpatcherImpl> m_xBackpatcherImpl; static std::shared_ptr<BackpatcherImpl> MakeBackpatcherImpl();
// Add parameter <bOutlineLevelAttrFound> (#i73509#) // Add parameter <bSetListAttrs> in order to suppress the handling of the list attributes (#i80724#)
OUString SetStyleAndAttrs( const SvXMLImport & rImport, const css::uno::Reference< css::text::XTextCursor >& rCursor, const OUString& rStyleName, bool bPara, bool bOutlineLevelAttrFound = false,
sal_Int8 nOutlineLevel = -1, bool bSetListAttrs = true, bool bOutlineContentVisible = true);
/** Find a suitable name for the given outline level. * If rStyleName is empty, change it to a previously used or default style * name for that level. Otherwise, leave rStyleName unmodified.
*/ // Adjust 2nd parameter (#i69629#) void FindOutlineStyleName( OUString& rStyleName,
sal_Int8 nOutlineLevel );
// Change method name to reflect change of data structure (#i69629#) void AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel, const OUString& rStyleName );
/// return key appropriate for use with NumberFormat property /// return -1 if style is not found /// (may return whether data style uses the system language)
sal_Int32 GetDataStyleKey( const OUString& sStyleName, bool* pIsSystemLanguage = nullptr );
/// insert new footnote ID. /// Also fixup open references from the backpatch list to this ID. // Code is implemented in XMLPropertyBackpatcher.cxx void InsertFootnoteID(const OUString& sXMLId, sal_Int16 nAPIId);
/// set the proper footnote reference ID, /// or put into backpatch list if ID is unknown // Code is implemented in XMLPropertyBackpatcher.cxx void ProcessFootnoteReference( const OUString& sXMLId, const css::uno::Reference< css::beans::XPropertySet> & xPropSet);
/// insert new sequence ID /// Also fixup open references from backpatch list to this ID. // Code is implemented in XMLPropertyBackpatcher.cxx void InsertSequenceID(const OUString& sXMLId, const OUString& sName,
sal_Int16 nAPIId);
/// set sequence ID or insert into backpatch list // Code is implemented in XMLPropertyBackpatcher.cxx void ProcessSequenceReference( const OUString& sXMLId, const css::uno::Reference< css::beans::XPropertySet> & xPropSet);
// applet helper methods // implemented in sw/filter/xml/txtparai.hxx
// redlining helper methods // (to be implemented in sw/filter/xml/txtparai.hxx)
virtualvoid RedlineAdd( /// redline type (insert, del,... ) const OUString& rType, /// use to identify this redline const OUString& rId, /// name of the author const OUString& rAuthor, /// redline comment const OUString& rComment, /// date+time const css::util::DateTime& rDateTime, /// move id, to find other parts (moveFrom/MoveTo) const OUString& rMoveId, /// merge last paras bool bMergeLastParagraph, const OUString& rStyleName, const OUString& rAutoName);
virtual css::uno::Reference< css::text::XTextCursor> RedlineCreateText( /// needed to get the document
css::uno::Reference< css::text::XTextCursor > & rOldCursor, /// ID used to RedlineAdd() call const OUString& rId);
virtualvoid RedlineSetCursor( /// ID used to RedlineAdd() call const OUString& rId, /// start or end Cursor bool bStart, /// range is not within <text:p> bool bIsOutsideOfParagraph);
/// get the last open redline ID
OUString const & GetOpenRedlineId() const; /// modify the last open redline ID void SetOpenRedlineId( OUString const & rId); /// reset the last open redline ID void ResetOpenRedlineId();
/** redlining : Setter to remember the fact we are inside/outside
* a <text:deletion> element (deleted redline section) */ void SetInsideDeleteContext(boolconst bNew); /** redlining : Getter to know if we are inside
* a <text:deletion> element (deleted redline section) */ bool IsInsideDeleteContext() const;
SvXMLImport & GetXMLImport();
XMLTextListsHelper & GetTextListHelper();
// forwards to TextListHelper; these are used in many places /// push a list context on the list context stack void PushListContext(); /// pop the list context stack void PopListContext();
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.