LibreOffice Module sw (master) 1
|
#include <xmlimp.hxx>
Public Member Functions | |
SwXMLImport (const css::uno::Reference< css::uno::XComponentContext > &rContext, OUString const &implementationName, SvXMLImportFlags nImportFlags) | |
virtual | ~SwXMLImport () noexcept override |
virtual void SAL_CALL | startDocument () override |
virtual void SAL_CALL | endDocument () override |
virtual void SAL_CALL | initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override |
void | InsertStyles (bool bAuto) |
void | FinishStyles () |
SvXMLImportContext * | CreateMetaContext (const sal_Int32 nElement) |
SvXMLImportContext * | CreateScriptContext () |
SvXMLImportContext * | CreateStylesContext (bool bAuto) |
SvXMLImportContext * | CreateMasterStylesContext () |
SvXMLImportContext * | CreateFontDeclsContext () |
SvXMLImportContext * | CreateBodyContentContext () |
SfxStyleFamily | GetStyleFamilyMask () const |
bool | IsInsertMode () const |
bool | IsStylesOnlyMode () const |
bool | IsBlockMode () const |
const SvXMLImportItemMapper & | GetTableItemMapper () const |
SvXMLImportItemMapper & | GetTableItemMapper () |
SvXMLImportContext * | CreateTableItemImportContext (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, XmlStyleFamily nSubFamily, SfxItemSet &rItemSet) |
bool | FindAutomaticStyle (XmlStyleFamily nFamily, const OUString &rName, const SfxItemSet **ppItemSet) const |
void | MergeListsAtDocumentInsertPosition (SwDoc *pDoc) |
virtual void | SetStatistics (const css::uno::Sequence< css::beans::NamedValue > &i_rStats) override |
virtual void | SetViewSettings (const css::uno::Sequence< css::beans::PropertyValue > &aViewProps) override |
virtual void | SetConfigurationSettings (const css::uno::Sequence< css::beans::PropertyValue > &aConfigProps) override |
virtual void | SetDocumentSpecificSettings (const OUString &_rSettingsGroupName, const css::uno::Sequence< css::beans::PropertyValue > &_rSettings) override |
virtual void | initXForms () override |
css::uno::Reference< css::document::XDocumentProperties > | GetDocumentProperties () const |
virtual void | NotifyContainsEmbeddedFont () override |
const SwDoc * | getDoc () const |
SwDoc * | getDoc () |
const OUString & | GetDefTableName () |
std::map< OUString, sal_uInt32 > & | GetTableNameMap () |
Protected Member Functions | |
virtual SvXMLImportContext * | CreateFastContext (sal_Int32 nElement, const ::css::uno::Reference< ::css::xml::sax::XFastAttributeList > &xAttrList) override |
virtual XMLTextImportHelper * | CreateTextImport () override |
virtual XMLShapeImportHelper * | CreateShapeImport () override |
Private Member Functions | |
void | InitItemImport () |
void | FinitItemImport () |
void | UpdateTextCollConditions (SwDoc *pDoc) |
void | setTextInsertMode (const css::uno::Reference< css::text::XTextRange > &rInsertPos) |
void | setStyleInsertMode (SfxStyleFamily nFamilies, bool bOverwrite) |
Private Attributes | |
std::optional< SwNodeIndex > | m_oSttNdIdx |
std::unique_ptr< SvXMLUnitConverter > | m_pTwipUnitConv |
std::unique_ptr< SvXMLImportItemMapper > | m_pTableItemMapper |
rtl::Reference< SvXMLGraphicHelper > | m_xGraphicStorageHandler |
rtl::Reference< SvXMLEmbeddedObjectHelper > | m_xEmbeddedResolver |
SvXMLItemMapEntriesRef | m_xTableItemMap |
SvXMLItemMapEntriesRef | m_xTableColItemMap |
SvXMLItemMapEntriesRef | m_xTableRowItemMap |
SvXMLItemMapEntriesRef | m_xTableCellItemMap |
css::uno::Reference< css::container::XNameContainer > | m_xLateInitSettings |
SfxStyleFamily | m_nStyleFamilyMask |
bool | m_bLoadDoc: 1 |
bool | m_bInsert: 1 |
bool | m_bBlock: 1 |
bool | m_bOrganizerMode: 1 |
bool | m_bInititedXForms: 1 |
SwDoc * | m_pDoc |
OUString | m_sDefTableName |
std::map< OUString, sal_uInt32 > | m_aTableNameMap |
Definition at line 57 of file xmlimp.hxx.
SwXMLImport::SwXMLImport | ( | const css::uno::Reference< css::uno::XComponentContext > & | rContext, |
OUString const & | implementationName, | ||
SvXMLImportFlags | nImportFlags | ||
) |
Definition at line 322 of file xmlimp.cxx.
References All, implementationName, and InitItemImport().
|
overridevirtualnoexcept |
Definition at line 338 of file xmlimp.cxx.
References cleanup(), FinitItemImport(), and SAL_WARN.
SvXMLImportContext * SwXMLImport::CreateBodyContentContext | ( | ) |
Definition at line 67 of file xmltext.cxx.
References IsStylesOnlyMode().
|
overrideprotectedvirtual |
Definition at line 292 of file xmlimp.cxx.
References CreateMetaContext(), GetDocumentProperties(), OFFICE, XML_DOCUMENT, XML_DOCUMENT_CONTENT, XML_DOCUMENT_META, XML_DOCUMENT_SETTINGS, XML_DOCUMENT_STYLES, and XML_ELEMENT.
SvXMLImportContext * SwXMLImport::CreateFontDeclsContext | ( | ) |
Definition at line 1138 of file xmlimp.cxx.
SvXMLImportContext * SwXMLImport::CreateMasterStylesContext | ( | ) |
Definition at line 985 of file xmlfmt.cxx.
SvXMLImportContext * SwXMLImport::CreateMetaContext | ( | const sal_Int32 | nElement | ) |
Definition at line 53 of file xmlmeta.cxx.
References GetDocumentProperties().
Referenced by CreateFastContext().
SvXMLImportContext * SwXMLImport::CreateScriptContext | ( | ) |
Definition at line 25 of file xmlscript.cxx.
References IsInsertMode(), and IsStylesOnlyMode().
|
overrideprotectedvirtual |
Definition at line 1133 of file xmlimp.cxx.
SvXMLImportContext * SwXMLImport::CreateStylesContext | ( | bool | bAuto | ) |
Definition at line 973 of file xmlfmt.cxx.
SvXMLImportContext * SwXMLImport::CreateTableItemImportContext | ( | sal_Int32 | nElement, |
const css::uno::Reference< css::xml::sax::XFastAttributeList > & | xAttrList, | ||
XmlStyleFamily | nSubFamily, | ||
SfxItemSet & | rItemSet | ||
) |
Definition at line 245 of file xmlitemi.cxx.
References GetTableItemMapper(), m_pTableItemMapper, m_pTwipUnitConv, m_xTableCellItemMap, m_xTableColItemMap, m_xTableItemMap, and m_xTableRowItemMap.
|
overrideprotectedvirtual |
Definition at line 1125 of file xmlimp.cxx.
References IsBlockMode(), IsInsertMode(), IsStylesOnlyMode(), and m_bOrganizerMode.
|
overridevirtual |
Definition at line 613 of file xmlimp.cxx.
References SwPosition::Adjust(), applyXFormsSettings(), SwPosition::Assign(), SwContentNode::CanJoinNext(), SwContentNode::CanJoinPrev(), SwTextNode::ChgFormatColl(), SwTextNode::CopyCollFormat(), Count, SwNodes::Delete(), SwPaM::DeleteMark(), SwNode::EndOfSectionIndex(), Exception, fnMoveBackward, SwTextNode::FormatToTextAttr(), SwPaM::GetBound(), SwPosition::GetContentIndex(), SwPaM::GetDoc(), getDoc(), IDocumentDrawModelAccess::GetDrawModel(), SwDoc::getIDocumentDrawModelAccess(), SwNodeIndex::GetIndex(), SwPaM::GetMark(), SwContentNode::GetNoCondAttr(), SwNodeIndex::GetNode(), SwPosition::GetNode(), SwPosition::GetNodeIndex(), SwDoc::GetNodes(), SwPaM::GetPoint(), SwPaM::GetPointContentNode(), SwTextNode::GetText(), SwTextNode::GetTextColl(), SwNode::GetTextNode(), GetXMLToken(), SwPaM::HasMark(), i, SwNode::IsContentNode(), SwNode::IsEndNode(), SwDoc::IsInReading(), IsInsertMode(), SwDoc::IsInXMLImport(), SwDoc::IsOLEPrtNotifyPending(), SwNode::IsSectionNode(), IsStylesOnlyMode(), SwNode::IsTextNode(), SwTextNode::JoinNext(), SwTextNode::JoinPrev(), m_bInititedXForms, m_oSttNdIdx, m_xEmbeddedResolver, m_xGraphicStorageHandler, m_xLateInitSettings, MergeListsAtDocumentInsertPosition(), SwPaM::Move(), SwDoc::PrtOLENotify(), RES_CHRATR_BEGIN(), RES_CHRATR_END(), RES_PARATR_LIST_ID(), SwTextNode::ResetAttr(), SwPosition::SetContent(), SwDoc::SetInReading(), SwDoc::SetInXMLImport(), SdrModel::setLock(), SwPaM::SetMark(), SwNode::StartOfSectionIndex(), SwNode::StartOfSectionNode(), UpdateTextCollConditions(), and XML_XFORM_MODEL_SETTINGS.
bool SwXMLImport::FindAutomaticStyle | ( | XmlStyleFamily | nFamily, |
const OUString & | rName, | ||
const SfxItemSet ** | ppItemSet | ||
) | const |
Definition at line 1043 of file xmlfmt.cxx.
Referenced by SwXMLTableContext::MakeTable().
void SwXMLImport::FinishStyles | ( | ) |
Definition at line 1002 of file xmlfmt.cxx.
References IsInsertMode().
|
private |
Definition at line 239 of file xmlitemi.cxx.
References m_pTableItemMapper, and m_pTwipUnitConv.
Referenced by ~SwXMLImport().
|
inline |
Definition at line 171 of file xmlimp.hxx.
References m_sDefTableName.
SwDoc * SwXMLImport::getDoc | ( | ) |
Definition at line 1670 of file xmlimp.cxx.
References SwXText::GetDoc(), and m_pDoc.
const SwDoc * SwXMLImport::getDoc | ( | ) | const |
Definition at line 1683 of file xmlimp.cxx.
References getDoc().
Referenced by endDocument(), getDoc(), SwXMLTableContext::InsertTableSection(), NotifyContainsEmbeddedFont(), SetConfigurationSettings(), SetStatistics(), SetViewSettings(), and UpdateTextCollConditions().
uno::Reference< document::XDocumentProperties > SwXMLImport::GetDocumentProperties | ( | ) | const |
Definition at line 41 of file xmlmeta.cxx.
References IsBlockMode(), IsInsertMode(), IsStylesOnlyMode(), and m_bOrganizerMode.
Referenced by CreateFastContext(), and CreateMetaContext().
|
inline |
Definition at line 136 of file xmlimp.hxx.
References m_nStyleFamilyMask.
|
inline |
Definition at line 180 of file xmlimp.hxx.
References m_pTableItemMapper.
|
inline |
Definition at line 175 of file xmlimp.hxx.
References m_pTableItemMapper.
Referenced by CreateTableItemImportContext().
|
inline |
Definition at line 172 of file xmlimp.hxx.
References m_aTableNameMap.
|
overridevirtual |
Definition at line 1633 of file xmlimp.cxx.
References aArguments, and m_xLateInitSettings.
|
private |
Definition at line 225 of file xmlitemi.cxx.
References aXMLTableCellItemMap, aXMLTableColItemMap, aXMLTableItemMap, aXMLTableRowItemMap, m_pTableItemMapper, m_pTwipUnitConv, m_xTableCellItemMap, m_xTableColItemMap, m_xTableItemMap, m_xTableRowItemMap, and SvtSaveOptions::ODFSVER_LATEST_EXTENDED.
Referenced by SwXMLImport().
|
overridevirtual |
Definition at line 1653 of file xmlimp.cxx.
References SwDocShell::GetDoc(), SwDoc::GetDocShell(), SwDoc::initXForms(), SwDoc::isXForms(), and m_bInititedXForms.
void SwXMLImport::InsertStyles | ( | bool | bAuto | ) |
Definition at line 994 of file xmlfmt.cxx.
References IsInsertMode().
|
inline |
Definition at line 139 of file xmlimp.hxx.
References m_bBlock.
Referenced by CreateTextImport(), GetDocumentProperties(), and SetViewSettings().
|
inline |
Definition at line 137 of file xmlimp.hxx.
References m_bInsert.
Referenced by CreateScriptContext(), CreateTextImport(), endDocument(), FinishStyles(), GetDocumentProperties(), InsertStyles(), MergeListsAtDocumentInsertPosition(), SetStatistics(), SetViewSettings(), and startDocument().
|
inline |
Definition at line 138 of file xmlimp.hxx.
References m_bLoadDoc.
Referenced by CreateBodyContentContext(), CreateScriptContext(), CreateTextImport(), endDocument(), GetDocumentProperties(), SetStatistics(), SetViewSettings(), and startDocument().
void SwXMLImport::MergeListsAtDocumentInsertPosition | ( | SwDoc * | pDoc | ) |
Definition at line 941 of file xmlimp.cxx.
References SwNodes::Count(), SwDoc::FindNumRulePtr(), SwNumRule::Get(), SwList::GetDefaultListStyleName(), SwDoc::getIDocumentListsAccess(), IDocumentListsAccess::getListByName(), SwContentNode::GetNoCondAttr(), SwDoc::GetNodes(), SwNode::GetNodeType(), index, IsInsertMode(), SwNode::IsTextNode(), m_oSttNdIdx, MAXLEVEL, n, RES_PARATR_LIST_ID(), and SwContentNode::SetAttr().
Referenced by endDocument().
|
overridevirtual |
Definition at line 93 of file xmlfonte.cxx.
References EMBED_FONTS, getDoc(), SwDoc::getIDocumentSettingAccess(), and IDocumentSettingAccess::set().
|
overridevirtual |
Definition at line 1220 of file xmlimp.cxx.
References Any, Exception, sw::proofreadingiterator::get(), getDoc(), SwDoc::getIDocumentDeviceAccess(), IDocumentDeviceAccess::getPrinter(), SfxPrinter::IsKnown(), SwDoc::SetOLEPrtNotifyPending(), and TOOLS_WARN_EXCEPTION.
|
overridevirtual |
Definition at line 1604 of file xmlimp.cxx.
References Any, Exception, IsXMLToken(), m_xLateInitSettings, and XML_XFORM_MODEL_SETTINGS.
|
overridevirtual |
Definition at line 104 of file xmlmeta.cxx.
References o3tl::checked_add(), getDoc(), IDocumentStatistics::GetDocStat(), SwDoc::getIDocumentStatistics(), IsInsertMode(), IsStylesOnlyMode(), SwDocStat::nPage, SwDocStat::nPara, PROGRESS_BAR_STEP, s_stats, IDocumentStatistics::SetDocStat(), ProgressBarHelper::SetReference(), and ProgressBarHelper::SetValue().
|
private |
Definition at line 362 of file xmlimp.cxx.
References m_bInsert, m_bLoadDoc, and m_nStyleFamilyMask.
Referenced by startDocument().
|
private |
|
overridevirtual |
Definition at line 1146 of file xmlimp.cxx.
References ASPECT_CONTENT, BROWSE_MODE, getDoc(), SwDoc::GetDocShell(), SwDoc::getIDocumentSettingAccess(), SfxObjectShell::GetMapUnit(), tools::Rectangle::GetSize(), SwDocShell::GetVisArea(), IsBlockMode(), IsInsertMode(), IsStylesOnlyMode(), m_bOrganizerMode, sanitiseMm100ToTwip(), IDocumentSettingAccess::set(), Size::setHeight(), tools::Rectangle::SetPosX(), tools::Rectangle::SetPosY(), tools::Rectangle::SetSize(), SwDocShell::SetVisArea(), and Size::setWidth().
|
overridevirtual |
Definition at line 377 of file xmlimp.cxx.
References Any, SvXMLEmbeddedObjectHelper::Create(), SvXMLGraphicHelper::Create(), SwXTextRange::CreateXTextRange(), fnMoveBackward, SwCursorShell::GetCursor(), IDocumentDrawModelAccess::GetDrawModel(), SwDoc::GetEditShell(), SwDoc::getIDocumentContentOperations(), SwDoc::getIDocumentDrawModelAccess(), SwDoc::getIDocumentStylePoolAccess(), SwPosition::GetNodeIndex(), SwDoc::GetNodes(), IDocumentDrawModelAccess::GetOrCreateDrawModel(), SwDoc::GetPersist(), SwPaM::GetPoint(), IDocumentStylePoolAccess::GetTextCollFromPool(), IsInsertMode(), IsStylesOnlyMode(), lcl_xml_GetSwXTextCursor(), m_bBlock, m_bOrganizerMode, m_oSttNdIdx, m_xEmbeddedResolver, m_xGraphicStorageHandler, SwPaM::Move(), RES_POOLCOLL_STANDARD, SwDoc::SetInReading(), SwDoc::SetInXMLImport(), SdrModel::setLock(), setStyleInsertMode(), SwDoc::SetTextFormatColl(), setTextInsertMode(), IDocumentContentOperations::SplitNode(), o3tl::tryAccess< bool >(), and u.
|
private |
Definition at line 1008 of file xmlfmt.cxx.
References SwCollCondition::GetCondition(), getDoc(), SwDoc::GetTextFormatColls(), i, nCount, PARA_IN_FOOTER, PARA_IN_HEADER, PARA_IN_TABLEBODY, PARA_IN_TABLEHEAD, RES_CONDTXTFMTCOLL(), SwVectorModifyBase< Value >::size(), and SwFormat::Which().
Referenced by endDocument().
|
private |
Definition at line 89 of file xmlimp.hxx.
Referenced by GetTableNameMap().
|
private |
Definition at line 81 of file xmlimp.hxx.
Referenced by IsBlockMode(), and startDocument().
|
private |
Definition at line 83 of file xmlimp.hxx.
Referenced by endDocument(), and initXForms().
|
private |
Definition at line 77 of file xmlimp.hxx.
Referenced by IsInsertMode(), setStyleInsertMode(), and setTextInsertMode().
|
private |
Definition at line 76 of file xmlimp.hxx.
Referenced by IsStylesOnlyMode(), and setStyleInsertMode().
|
private |
Definition at line 82 of file xmlimp.hxx.
Referenced by CreateTextImport(), GetDocumentProperties(), SetViewSettings(), and startDocument().
|
private |
Definition at line 75 of file xmlimp.hxx.
Referenced by GetStyleFamilyMask(), and setStyleInsertMode().
|
private |
Definition at line 59 of file xmlimp.hxx.
Referenced by endDocument(), MergeListsAtDocumentInsertPosition(), and startDocument().
|
private |
Definition at line 85 of file xmlimp.hxx.
Referenced by getDoc().
|
private |
Definition at line 62 of file xmlimp.hxx.
Referenced by CreateTableItemImportContext(), FinitItemImport(), GetTableItemMapper(), and InitItemImport().
|
private |
Definition at line 61 of file xmlimp.hxx.
Referenced by CreateTableItemImportContext(), FinitItemImport(), and InitItemImport().
|
private |
Definition at line 88 of file xmlimp.hxx.
Referenced by GetDefTableName().
|
private |
Definition at line 66 of file xmlimp.hxx.
Referenced by endDocument(), and startDocument().
|
private |
Definition at line 64 of file xmlimp.hxx.
Referenced by endDocument(), and startDocument().
|
private |
Definition at line 73 of file xmlimp.hxx.
Referenced by endDocument(), initialize(), and SetDocumentSpecificSettings().
|
private |
Definition at line 71 of file xmlimp.hxx.
Referenced by CreateTableItemImportContext(), and InitItemImport().
|
private |
Definition at line 69 of file xmlimp.hxx.
Referenced by CreateTableItemImportContext(), and InitItemImport().
|
private |
Definition at line 68 of file xmlimp.hxx.
Referenced by CreateTableItemImportContext(), and InitItemImport().
|
private |
Definition at line 70 of file xmlimp.hxx.
Referenced by CreateTableItemImportContext(), and InitItemImport().