20#ifndef INCLUDED_OOX_CORE_FILTERDETECT_HXX
21#define INCLUDED_OOX_CORE_FILTERDETECT_HXX
25#include <com/sun/star/document/XExtendedFilterDetection.hpp>
26#include <com/sun/star/lang/XServiceInfo.hpp>
27#include <com/sun/star/uno/Any.hxx>
28#include <com/sun/star/uno/Reference.hxx>
29#include <com/sun/star/uno/Sequence.hxx>
30#include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>
33#include <rtl/ustring.hxx>
37 namespace beans {
struct PropertyValue; }
38 namespace io {
class XInputStream; }
39 namespace uno {
class XComponentContext; }
40 namespace xml::sax {
class XFastAttributeList; }
41 namespace xml::sax {
class XFastContextHandler; }
42 namespace xml::sax {
class XLocator; }
45namespace utl {
class MediaDescriptor; }
47namespace oox {
class AttributeList; }
66 explicit FilterDetectDocHandler(
const css::uno::Reference< css::uno::XComponentContext >& rxContext, OUString& rFilter, OUString aFileName );
73 virtual void SAL_CALL
setDocumentLocator(
const css::uno::Reference< css::xml::sax::XLocator >& xLocator )
override;
76 virtual void SAL_CALL
startFastElement( sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs )
override;
77 virtual void SAL_CALL
startUnknownElement(
const OUString& Namespace,
const OUString&
Name,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs )
override;
78 virtual void SAL_CALL
endFastElement( sal_Int32 Element )
override;
80 virtual css::uno::Reference< XFastContextHandler > SAL_CALL
createFastChildContext( sal_Int32 Element,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs )
override;
81 virtual css::uno::Reference< XFastContextHandler > SAL_CALL
createUnknownChildContext(
const OUString& Namespace,
const OUString&
Name,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs )
override;
82 virtual void SAL_CALL
characters(
const OUString& aChars )
override;
99 css::uno::Reference< css::uno::XComponentContext >
mxContext;
107 explicit FilterDetect(
const css::uno::Reference< css::uno::XComponentContext >& rxContext );
133 css::uno::Reference< css::io::XInputStream >
160 virtual OUString SAL_CALL
161 detect( css::uno::Sequence< css::beans::PropertyValue >& rMediaDescSeq )
override;
164 css::uno::Reference< css::uno::XComponentContext >
mxContext;
Provides access to attribute values of an element.
Document handler specifically designed for detecting OOXML file formats.
OUString getFilterNameFromContentType(std::u16string_view rContentType, std::u16string_view rFileName)
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createUnknownChildContext(const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
virtual void SAL_CALL endUnknownElement(const OUString &Namespace, const OUString &Name) override
void parseRelationship(const AttributeList &rAttribs)
::std::vector< sal_Int32 > ContextVector
ContextVector maContextStack
OOXMLVariant maOOXMLVariant
void parseContentTypesOverride(const AttributeList &rAttribs)
virtual void SAL_CALL startUnknownElement(const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
virtual void SAL_CALL endDocument() override
virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > &xLocator) override
virtual void SAL_CALL processingInstruction(const OUString &rTarget, const OUString &rData) override
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
void parseContentTypesDefault(const AttributeList &rAttribs)
FilterDetectDocHandler(const css::uno::Reference< css::uno::XComponentContext > &rxContext, OUString &rFilter, OUString aFileName)
virtual void SAL_CALL characters(const OUString &aChars) override
virtual ~FilterDetectDocHandler() override
virtual void SAL_CALL startDocument() override
virtual void SAL_CALL endFastElement(sal_Int32 Element) override
virtual OUString SAL_CALL detect(css::uno::Sequence< css::beans::PropertyValue > &rMediaDescSeq) override
Detects MS Office 2007 file types and supports package decryption.
css::uno::Reference< css::uno::XComponentContext > mxContext
FilterDetect(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)