From e10073d8d028503c122375a34a6ae60d1e315840 Mon Sep 17 00:00:00 2001 From: Michael Brauer Date: Wed, 6 Dec 2000 13:25:52 +0000 Subject: #80689#: preserve Z-Order in XML filter --- sw/source/core/unocore/unoframe.cxx | 10 ++++------ sw/source/filter/xml/xmlexp.cxx | 15 +++++++++++++-- sw/source/filter/xml/xmlimp.cxx | 7 +++++-- 3 files changed, 22 insertions(+), 10 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 959c9a01d71a..9fad5611f8c5 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoframe.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: mib $ $Date: 2000-12-06 11:36:14 $ + * last change: $Author: mib $ $Date: 2000-12-06 14:24:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1256,7 +1256,6 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const uno::Any& a { sal_Int32 nZOrder = - 1; aValue >>= nZOrder; - const SwContact* pContact = pFmt->FindContactObj(); if( nZOrder >= 0) { SdrObject* pObject = @@ -1414,10 +1413,9 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) } else if(FN_UNO_Z_ORDER == pCur->nWID) { - const SwContact* pContact = pFmt->FindContactObj(); - if(pContact) + const SdrObject* pObj = pFmt->FindRealSdrObject(); + if( pObj ) { - const SdrObject* pObj = pContact->GetMaster(); aAny <<= (sal_Int32)pObj->GetOrdNum(); } } diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 8258ea237761..b52bcfabaeec 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlexp.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: mib $ $Date: 2000-12-02 10:57:15 $ + * last change: $Author: mib $ $Date: 2000-12-06 14:25:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,6 +90,12 @@ #ifndef _SWMODULE_HXX //autogen wg. SW_MOD #include #endif +#ifndef _SVDMODEL_HXX +#include +#endif +#ifndef _SVDPAGE_HXX +#include +#endif #ifndef _SWDOCSH_HXX #include @@ -263,6 +269,11 @@ SwXMLExport::SwXMLExport( const Reference< XModel >& rModel, SwPaM& rPaM, SfxObjectShell* pObjSh = pDoc->GetDocShell(); if( pObjSh ) pObjSh->UpdateDocInfoForSave(); // update information + + //Auf die Korrektheit der OrdNums sind wir schon angewiesen. + SdrModel* pModel = pDoc->GetDrawModel(); + if( pModel ) + pModel->GetPage( 0 )->RecalcObjOrdNums(); } XMLTextParagraphExport* SwXMLExport::CreateTextParagraphExport() diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index bc6f16f2c42e..9381ebc0de2e 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlimp.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: mib $ $Date: 2000-12-02 10:57:15 $ + * last change: $Author: mib $ $Date: 2000-12-06 14:25:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -320,6 +320,9 @@ SwXMLImport::SwXMLImport( rDoc.GetTxtCollFromPool(RES_POOLCOLL_STANDARD) ); } } + + // We need a draw model to be able to set the z order + rDoc.MakeDrawModel(); } SwXMLImport::~SwXMLImport() -- cgit v1.2.3