21#include <com/sun/star/awt/XBitmap.hpp>
22#include <com/sun/star/graphic/XGraphic.hpp>
28#include <rtl/ustring.hxx>
37 if (rStrName.isEmpty())
40 if (!rValue.has<uno::Reference<awt::XBitmap>>())
44 bool bEncoded =
false;
52 auto xBitmap = rValue.get<uno::Reference<awt::XBitmap>>();
53 uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
70 if (xBitmap.is() && xGraphic.is())
78 uno::Any& rValue, OUString& rStrName, SvXMLImport& rImport)
80 bool bHasHRef =
false;
81 bool bHasName =
false;
82 OUString aDisplayName;
83 uno::Reference<graphic::XGraphic> xGraphic;
87 const OUString aStrValue = aIter.toString();
89 switch( aIter.getToken() )
99 aDisplayName = aStrValue;
104 xGraphic = rImport.loadGraphicByURL(aStrValue);
125 if( !aDisplayName.isEmpty() )
128 rStrName, aDisplayName );
129 rStrName = aDisplayName;
132 return bHasName && bHasHRef;
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
OUString EncodeStyleName(const OUString &rName, bool *pEncoded=nullptr) const
bool AddEmbeddedXGraphicAsBase64(css::uno::Reference< css::graphic::XGraphic > const &rxGraphic)
OUString AddEmbeddedXGraphic(css::uno::Reference< css::graphic::XGraphic > const &rxGraphic, OUString &rOutMimeType, OUString const &rRequestedName=OUString())
XMLOFF_DLLPUBLIC bool importXML(css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, css::uno::Any &rValue, OUString &rStrName, SvXMLImport &rImport)
XMLOFF_DLLPUBLIC void exportXML(OUString const &rStrName, css::uno::Any const &rValue, SvXMLExport &rExport)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
const sal_Unicode *const aMimeType[]
#define XMLOFF_WARN_UNKNOWN(area, rIter)
#define XML_ELEMENT(prefix, name)
constexpr sal_uInt16 XML_NAMESPACE_DRAW
constexpr sal_uInt16 XML_NAMESPACE_XLINK