summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLTextFrameContext.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-08-12 07:51:02 +0000
committerOliver Bolte <obo@openoffice.org>2004-08-12 07:51:02 +0000
commitd0431b4c5511449fd55cbfd492e21fa1bf7ac7ed (patch)
tree160968767adfd6a9c7e423abcf1c1f14f5898962 /xmloff/source/text/XMLTextFrameContext.cxx
parent8b12658d59c149679367f85e0d866dc6f31f9b80 (diff)
INTEGRATION: CWS jmf2 (1.58.12); FILE MERGED
2004/07/28 19:57:14 ka 1.58.12.1: #i3316#: support for media objects
Diffstat (limited to 'xmloff/source/text/XMLTextFrameContext.cxx')
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx35
1 files changed, 32 insertions, 3 deletions
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index c76f88e01952..62d25443b2f3 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextFrameContext.cxx,v $
*
- * $Revision: 1.58 $
+ * $Revision: 1.59 $
*
- * last change: $Author: rt $ $Date: 2004-07-13 08:36:31 $
+ * last change: $Author: obo $ $Date: 2004-08-12 08:51:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1491,7 +1491,35 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
pContext = GetImport().GetShapeImport()->CreateFrameChildContext(
GetImport(), nPrefix, rLocalName, xAttrList, xShapes, m_xAttrList );
}
- else
+ else if( XML_TEXT_FRAME_PLUGIN == nFrameType )
+ {
+ bool bMedia = false;
+
+ // check, if we have a media object
+ for( sal_Int16 n = 0, nAttrCount = ( xAttrList.is() ? xAttrList->getLength() : 0 ); n < nAttrCount; ++n )
+ {
+ OUString aLocalName;
+ sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( xAttrList->getNameByIndex( n ), &aLocalName );
+
+ if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( aLocalName, XML_MIME_TYPE ) )
+ {
+ if( 0 == xAttrList->getValueByIndex( n ).compareToAscii( "application/vnd.sun.star.media" ) )
+ bMedia = true;
+
+ // leave this loop
+ n = nAttrCount - 1;
+ }
+ }
+
+ if( bMedia )
+ {
+ Reference < XShapes > xShapes;
+ pContext = GetImport().GetShapeImport()->CreateFrameChildContext(
+ GetImport(), nPrefix, rLocalName, xAttrList, xShapes, m_xAttrList );
+ }
+ }
+
+ if( !pContext )
{
pContext = new XMLTextFrameContext_Impl( GetImport(), nPrefix,
@@ -1500,6 +1528,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
nFrameType,
m_xAttrList );
}
+
m_xImplContext = pContext;
}
}