diff options
author | Christian Lippka <cl@openoffice.org> | 2001-08-09 13:09:49 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-08-09 13:09:49 +0000 |
commit | 899b65e8ebd67c131ce19e2fe27270fcf5645850 (patch) | |
tree | 92f1c2620fc8923c33ba0770673f6141904abefe /xmloff/source/style/ImageStyle.cxx | |
parent | c3c7522a0923e4aa4013a8dd349913f0224fd081 (diff) |
#88757# added support for encoded images
Diffstat (limited to 'xmloff/source/style/ImageStyle.cxx')
-rw-r--r-- | xmloff/source/style/ImageStyle.cxx | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx index 21109ac76497..76fb25039bd0 100644 --- a/xmloff/source/style/ImageStyle.cxx +++ b/xmloff/source/style/ImageStyle.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ImageStyle.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: thb $ $Date: 2001-07-24 17:06:09 $ + * last change: $Author: cl $ $Date: 2001-08-09 14:05:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -158,11 +158,11 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& { sal_Bool bRet = sal_False; - OUString aURL; + OUString sImageURL; if( rStrName.getLength() ) { - if( rValue >>= aURL ) + if( rValue >>= sImageURL ) { OUString aStrValue; OUStringBuffer aOut; @@ -171,11 +171,14 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, rStrName ); // uri - rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, rExport.AddEmbeddedGraphicObject( aURL ) ); - rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); - rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); - rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); - + const OUString aStr( rExport.AddEmbeddedGraphicObject( sImageURL ) ); + if( aStr.getLength() ) + { + rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aStr ); + rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); + rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); + rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); + } /* // size awt::Size aSize = xBitmap->getSize(); @@ -190,6 +193,12 @@ sal_Bool XMLImageStyle::ImpExportXML( const OUString& rStrName, const uno::Any& */ // Do Write SvXMLElementExport aElem( rExport, XML_NAMESPACE_DRAW, XML_FILL_IMAGE, sal_True, sal_True ); + + if( sImageURL.getLength() ) + { + // optional office:binary-data + rExport.AddEmbeddedGraphicObjectAsBase64( sImageURL ); + } } } |