diff options
author | Michael Brauer <mib@openoffice.org> | 2001-03-16 11:50:15 +0000 |
---|---|---|
committer | Michael Brauer <mib@openoffice.org> | 2001-03-16 11:50:15 +0000 |
commit | f01e1c62a13865dfbb012cac4d1e956002ec3334 (patch) | |
tree | 091b862a67710040348e89e1e84cea74d701e06e /xmloff | |
parent | 522346ef0113ddc009e7790d9c5f4ae475067264 (diff) |
Don't import/export class id of outplace object
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.cxx | 24 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.hxx | 8 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 16 | ||||
-rw-r--r-- | xmloff/source/text/txtparai.cxx | 15 |
5 files changed, 40 insertions, 37 deletions
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 7052dfae93b2..1697d02b59b9 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLTextFrameContext.cxx,v $ * - * $Revision: 1.31 $ + * $Revision: 1.32 $ * - * last change: $Author: mib $ $Date: 2001-03-14 10:30:23 $ + * last change: $Author: mib $ $Date: 2001-03-16 12:49:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -383,7 +383,6 @@ XMLTextFrameContext::XMLTextFrameContext( OUString sChainNextName; OUString sHRef; OUString sFilterName; - OUString sClassId; OUString sCode; OUString sObject; OUString sArchive; @@ -566,9 +565,6 @@ XMLTextFrameContext::XMLTextFrameContext( } } break; - case XML_TOK_TEXT_FRAME_CLASS_ID: - sClassId = rValue; - break; case XML_TOK_TEXT_FRAME_CODE: sCode = rValue; break; @@ -591,14 +587,17 @@ XMLTextFrameContext::XMLTextFrameContext( } if( (XML_TEXT_FRAME_APPLET == nType || XML_TEXT_FRAME_PLUGIN == nType || - XML_TEXT_FRAME_GRAPHIC == nType || XML_TEXT_FRAME_OLE == nType) + XML_TEXT_FRAME_GRAPHIC == nType || XML_TEXT_FRAME_OBJECT == nType || + XML_TEXT_FRAME_OBJECT_OLE == nType) && !sHRef.getLength() ) return; // no URL: no image or OLE object switch ( nType) { - case XML_TEXT_FRAME_OLE: + case XML_TEXT_FRAME_OBJECT: + case XML_TEXT_FRAME_OBJECT_OLE: { + OUString sClassId; OUString sURL( GetImport().ResolveEmbeddedObjectURL( sHRef, sClassId ) ); if( sURL.getLength() ) @@ -772,10 +771,11 @@ XMLTextFrameContext::XMLTextFrameContext( xPropSet->setPropertyValue( sGraphicRotation, aAny ); } - if( XML_TEXT_FRAME_OLE != nType - && XML_TEXT_FRAME_APPLET != nType - && XML_TEXT_FRAME_PLUGIN!= nType - && XML_TEXT_FRAME_FLOATING_FRAME != nType) + if( XML_TEXT_FRAME_OBJECT != nType && + XML_TEXT_FRAME_OBJECT_OLE != nType && + XML_TEXT_FRAME_APPLET != nType && + XML_TEXT_FRAME_PLUGIN!= nType && + XML_TEXT_FRAME_FLOATING_FRAME != nType) { Reference < XTextContent > xTxtCntnt( xPropSet, UNO_QUERY ); xTxtImport->InsertTextContent( xTxtCntnt ); diff --git a/xmloff/source/text/XMLTextFrameContext.hxx b/xmloff/source/text/XMLTextFrameContext.hxx index 8baed0678971..dce73ba93f41 100644 --- a/xmloff/source/text/XMLTextFrameContext.hxx +++ b/xmloff/source/text/XMLTextFrameContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLTextFrameContext.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: mtg $ $Date: 2001-03-09 16:02:08 $ + * last change: $Author: mib $ $Date: 2001-03-16 12:49:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,8 +77,8 @@ namespace com { namespace sun { namespace star { #define XML_TEXT_FRAME_TEXTBOX 1 #define XML_TEXT_FRAME_GRAPHIC 2 -#define XML_TEXT_FRAME_STAR 3 -#define XML_TEXT_FRAME_OLE 4 +#define XML_TEXT_FRAME_OBJECT 3 +#define XML_TEXT_FRAME_OBJECT_OLE 4 #define XML_TEXT_FRAME_APPLET 5 #define XML_TEXT_FRAME_PLUGIN 6 #define XML_TEXT_FRAME_FLOATING_FRAME 7 diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index f8140b75ba40..6e1209db61c6 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtimp.cxx,v $ * - * $Revision: 1.57 $ + * $Revision: 1.58 $ * - * last change: $Author: mib $ $Date: 2001-03-13 15:50:56 $ + * last change: $Author: mib $ $Date: 2001-03-16 12:49:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1328,6 +1328,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( sal_Bool bOrdered = sal_False; sal_Bool bHeading = sal_False; sal_Bool bContent = sal_True; + sal_Bool bObjectOLE = sal_False; sal_uInt16 nToken = rTokenMap.Get( nPrefix, rLocalName ); switch( nToken ) { @@ -1450,8 +1451,9 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( } break; - case XML_TOK_TEXT_OBJECT_PAGE: case XML_TOK_TEXT_OBJECT_OLE_PAGE: + bObjectOLE = sal_True; + case XML_TOK_TEXT_OBJECT_PAGE: if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType ) @@ -1460,9 +1462,9 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( XML_TEXT_TYPE_TEXTBOX == eType ? TextContentAnchorType_AT_FRAME : TextContentAnchorType_AT_PAGE; pContext = new XMLTextFrameContext( rImport, nPrefix, - rLocalName, xAttrList, - eAnchorType, - XML_TEXT_FRAME_OLE ); + rLocalName, xAttrList, eAnchorType, + bObjectOLE ? XML_TEXT_FRAME_OBJECT + : XML_TEXT_FRAME_OBJECT_OLE ); bContent = sal_False; } break; diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index e74c7bd34d88..633782f4760f 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtparae.cxx,v $ * - * $Revision: 1.66 $ + * $Revision: 1.67 $ * - * last change: $Author: mib $ $Date: 2001-03-14 10:30:23 $ + * last change: $Author: mib $ $Date: 2001-03-16 12:49:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2091,11 +2091,10 @@ void XMLTextParagraphExport::_exportTextEmbedded( // xlink:href - OUString sURL, sClassId; - getTextEmbeddedObjectProperties( rPropSet, sURL, sClassId ); + OUString sURL; + sal_Bool bExtern; + getTextEmbeddedObjectProperties( rPropSet, sURL, bExtern ); - if( sClassId.getLength() ) - GetExport().AddAttribute(XML_NAMESPACE_DRAW, sXML_class_id, sClassId ); sURL = GetExport().AddEmbeddedObject( sURL ); GetExport().AddAttribute(XML_NAMESPACE_XLINK, sXML_href, sURL ); @@ -2106,8 +2105,7 @@ void XMLTextParagraphExport::_exportTextEmbedded( GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_actuate, sXML_onLoad ); - const sal_Char *pElem = sClassId.getLength() ? sXML_object_ole - : sXML_object; + const sal_Char *pElem = bExtern ? sXML_object_ole : sXML_object; SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_DRAW, pElem, sal_False, sal_True ); @@ -2172,7 +2170,7 @@ void XMLTextParagraphExport::exportTextEmbedded( void XMLTextParagraphExport::getTextEmbeddedObjectProperties( const Reference < XPropertySet >& rPropSet, - OUString& rStreamName, OUString& rClassId ) const + OUString& rStreamName, sal_Bool& r ) const { } diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 1e68a292e1b0..11dcd8ce2976 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtparai.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: mtg $ $Date: 2001-02-23 14:42:56 $ + * last change: $Author: mib $ $Date: 2001-03-16 12:49:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1470,6 +1470,7 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( { SvXMLImportContext *pContext = 0; + sal_Bool bObjectOLE = sal_False; switch( nToken ) { case XML_TOK_TEXT_SPAN: @@ -1627,12 +1628,14 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( XML_TEXT_FRAME_PLUGIN ); break; - case XML_TOK_TEXT_OBJECT: case XML_TOK_TEXT_OBJECT_OLE: + bObjectOLE = sal_True; + case XML_TOK_TEXT_OBJECT: pContext = new XMLTextFrameContext( rImport, nPrefix, - rLocalName, xAttrList, - TextContentAnchorType_AS_CHARACTER, - XML_TEXT_FRAME_OLE ); + rLocalName, xAttrList, + TextContentAnchorType_AS_CHARACTER, + bObjectOLE ? XML_TEXT_FRAME_OBJECT + : XML_TEXT_FRAME_OBJECT_OLE ); break; case XML_TOK_DRAW_A: |