diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-03-27 14:45:43 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2003-03-27 14:45:43 +0000 |
commit | 70de0c38fd177b3c95837118c5fb35e380c87e90 (patch) | |
tree | bb54ac0c5769dcfc89fdaeb151ffac6eb18154de /sw/source/filter/xml/xmltexte.cxx | |
parent | 5aff37cd51879a41365f2ceb0e927bdf57ffddb3 (diff) |
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'sw/source/filter/xml/xmltexte.cxx')
-rw-r--r-- | sw/source/filter/xml/xmltexte.cxx | 63 |
1 files changed, 23 insertions, 40 deletions
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index edea7b16d1f2..426c5abf43c5 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmltexte.cxx,v $ * - * $Revision: 1.26 $ + * $Revision: 1.27 $ * - * last change: $Author: mib $ $Date: 2001-11-26 11:37:14 $ + * last change: $Author: hr $ $Date: 2003-03-27 15:42:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -288,26 +288,6 @@ SwXMLTextParagraphExport::~SwXMLTextParagraphExport() { } -void SwXMLTextParagraphExport::getTextEmbeddedObjectProperties( - const Reference < XPropertySet >& rPropSet, - OUString& rURL, - sal_Bool& rExtern ) const -{ - SwOLENode *pOLENd = GetNoTxtNode( rPropSet )->GetOLENode(); - SwOLEObj& rOLEObj = pOLENd->GetOLEObj(); - - rURL = sEmbeddedObjectProtocol; - rURL += rOLEObj.GetName(); - SvInfoObject *pInfo = - pOLENd->GetDoc()->GetPersist()->Find( rOLEObj.GetName() ); - DBG_ASSERT( pInfo, "no info object for OLE object found" ); - if( pInfo ) - { - SvGlobalName aClassName( pInfo->GetClassName() ); - rExtern = aOutplaceClassId == aClassName; - } -} - void SwXMLTextParagraphExport::setTextEmbeddedGraphicURL( const Reference < XPropertySet >& rPropSet, OUString& rURL) const @@ -360,29 +340,32 @@ void lcl_addOutplaceProperties( if( pEmbed ) { const Rectangle& rVisArea = pEmbed->GetVisArea(); - Any aAny; + if( !rVisArea.IsEmpty() ) + { + Any aAny; - aAny <<= (sal_Int32)rVisArea.Left(); - *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_LEFT ), aAny ); - pStates++; + aAny <<= (sal_Int32)rVisArea.Left(); + *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_LEFT ), aAny ); + pStates++; - aAny <<= (sal_Int32)rVisArea.Top(); - *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_TOP ), aAny ); - pStates++; + aAny <<= (sal_Int32)rVisArea.Top(); + *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_TOP ), aAny ); + pStates++; - aAny <<= (sal_Int32)rVisArea.GetWidth(); - *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_WIDTH ), aAny ); - pStates++; + aAny <<= (sal_Int32)rVisArea.GetWidth(); + *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_WIDTH ), aAny ); + pStates++; - aAny <<= (sal_Int32)rVisArea.GetHeight(); - *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_HEIGHT ), aAny ); - pStates++; + aAny <<= (sal_Int32)rVisArea.GetHeight(); + *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_HEIGHT ), aAny ); + pStates++; - aAny <<= (sal_Int32)pEmbed->GetViewAspect(); - *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_DRAW_ASPECT ), aAny ); - pStates++; + aAny <<= (sal_Int32)pEmbed->GetViewAspect(); + *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_DRAW_ASPECT ), aAny ); + pStates++; - // TODO: aspect + // TODO: aspect + } } } @@ -551,7 +534,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( if( (rExport.getExportFlags() & EXPORT_EMBEDDED) == 0 ) { OUString sURL( sEmbeddedObjectProtocol ); - sURL += rOLEObj.GetName(); + sURL += pInfo->GetStorageName(); sURL = GetExport().AddEmbeddedObject( sURL ); lcl_addURL( rExport, sURL, sal_False ); } |