summaryrefslogtreecommitdiff
path: root/xmloff/source/style/FillStyleContext.cxx
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2001-08-09 13:09:49 +0000
committerChristian Lippka <cl@openoffice.org>2001-08-09 13:09:49 +0000
commit899b65e8ebd67c131ce19e2fe27270fcf5645850 (patch)
tree92f1c2620fc8923c33ba0770673f6141904abefe /xmloff/source/style/FillStyleContext.cxx
parentc3c7522a0923e4aa4013a8dd349913f0224fd081 (diff)
#88757# added support for encoded images
Diffstat (limited to 'xmloff/source/style/FillStyleContext.cxx')
-rw-r--r--xmloff/source/style/FillStyleContext.cxx42
1 files changed, 40 insertions, 2 deletions
diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx
index 02b80acbaa0c..56414460f0a5 100644
--- a/xmloff/source/style/FillStyleContext.cxx
+++ b/xmloff/source/style/FillStyleContext.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FillStyleContext.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dvo $ $Date: 2001-06-29 21:07:17 $
+ * last change: $Author: cl $ $Date: 2001-08-09 14:03:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -102,6 +102,10 @@
#include "xmlnmspe.hxx"
#endif
+#ifndef _XMLOFF_XMLBASE64IMPORTCONTEXT_HXX
+#include "XMLBase64ImportContext.hxx"
+#endif
+
using namespace ::com::sun::star;
using namespace ::rtl;
@@ -209,8 +213,42 @@ XMLBitmapStyleContext::~XMLBitmapStyleContext()
{
}
+SvXMLImportContext* XMLBitmapStyleContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList )
+{
+ SvXMLImportContext *pContext;
+ if( (XML_NAMESPACE_OFFICE == nPrefix) && xmloff::token::IsXMLToken( rLocalName, xmloff::token::XML_BINARY_DATA ) )
+ {
+ OUString sURL;
+ maAny >>= sURL;
+ if( !sURL.getLength() && !mxBase64Stream.is() )
+ {
+ mxBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64();
+ if( mxBase64Stream.is() )
+ pContext = new XMLBase64ImportContext( GetImport(), nPrefix,
+ rLocalName, xAttrList,
+ mxBase64Stream );
+ }
+ }
+ if( !pContext )
+ {
+ pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+ }
+
+ return pContext;
+}
+
void XMLBitmapStyleContext::EndElement()
{
+ OUString sURL;
+ maAny >>= sURL;
+
+ if( !sURL.getLength() && mxBase64Stream.is() )
+ {
+ sURL = GetImport().ResolveGraphicObjectURLFromBase64( mxBase64Stream );
+ mxBase64Stream = 0;
+ maAny <<= sURL;
+ }
+
uno::Reference< container::XNameContainer > xBitmap( GetImport().GetBitmapHelper() );
try