21#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
22#include <com/sun/star/uno/Sequence.hxx>
23#include <com/sun/star/uno/Reference.hxx>
24#include <com/sun/star/uno/Exception.hpp>
25#include <com/sun/star/util/MeasureUnit.hpp>
26#include <com/sun/star/beans/PropertyAttribute.hpp>
27#include <com/sun/star/frame/XModel.hpp>
28#include <com/sun/star/uno/XComponentContext.hpp>
31#include <osl/diagnose.h>
45 const css::uno::Reference< css::uno::XComponentContext >& xContext,
61 catch( lang::IllegalArgumentException& )
66 uno::Reference< document::XDocumentProperties >::query( xDoc );
68 throw lang::IllegalArgumentException();
74 uno::Reference< xml::sax::XDocumentHandler > xDocHandler =
GetDocHandler();
81 static const ::comphelper::PropertyMapEntry aInfoMap[] =
83 { OUString(
"Class"), 0,
85 beans::PropertyAttribute::MAYBEVOID, 0},
87 uno::Reference< beans::XPropertySet > xConvPropSet(
88 ::comphelper::GenericPropertySet_CreateInstance(
89 new ::comphelper::PropertySetInfo( aInfoMap ) ) );
93 uno::Reference< beans::XPropertySet > xPropSet =
104 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
105 "com.sun.star.comp.Oasis2OOoTransformer", aArgs, xContext),
106 uno::UNO_QUERY_THROW );
110 catch( css::uno::Exception& )
112 OSL_FAIL(
"Cannot instantiate com.sun.star.comp.Oasis2OOoTransformer!");
117 xDocHandler->startDocument();
125 while( USHRT_MAX !=
nPos )
135 OUString::createFromAscii(pVersion) );
143 xDocHandler->endDocument();
165extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
167 css::uno::XComponentContext *context,
168 css::uno::Sequence<css::uno::Any>
const &)
173extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
175 css::uno::Sequence<css::uno::Any>
const&)
177 return cppu::acquire(
Reference< XPropertySet > PropertySetMerger_CreateInstance(const Reference< XPropertySet > &rPropSet1, const Reference< XPropertySet > &rPropSet2) noexcept
const SvXMLNamespaceMap & GetNamespaceMap() const
char const * GetODFVersionAttributeValue() const
returns value of ODF version attribute
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
SvXMLExportFlags getExportFlags() const
const css::uno::Reference< css::frame::XModel > & GetModel() const
virtual void ExportMeta_()
Override this method to export the content of <office:meta>.
void addChaffWhenEncryptedStorage()
const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() const
virtual void SAL_CALL setSourceDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
void SetDocHandler(const css::uno::Reference< css::xml::sax::XDocumentHandler > &rHandler)
const css::uno::Reference< css::beans::XPropertySet > & getExportInfo() const
const css::uno::Reference< css::uno::XComponentContext > & getComponentContext() const
comphelper::AttributeList & GetAttrList()
const OUString & GetNameByKey(sal_uInt16 nKey) const
sal_uInt16 GetFirstKey() const
OUString GetAttrNameByKey(sal_uInt16 nKey) const
sal_uInt16 GetNextKey(sal_uInt16 nOldKey) const
void AddAttribute(const OUString &sName, const OUString &sValue)
css::uno::Type const & get()
static OUString GetGeneratorString()
constexpr OUStringLiteral implementationName
Handling of tokens in XML:
XMLTokenEnum
The enumeration of all XML tokens.
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
constexpr sal_uInt16 XML_NAMESPACE_OFFICE