32using ::com::sun::star::xml::sax::XFastAttributeList;
33using ::com::sun::star::beans::PropertyValue;
34using ::com::sun::star::uno::Reference;
35using ::com::sun::star::uno::Sequence;
53 const Reference<XFastAttributeList> & xAttrList,
55 const OUString& rApiEventName)
58 OUString sMacroNameVal;
63 sMacroNameVal = aIter.toString();
69 if( sMacroNameVal.getLength() > rApp.getLength()+1 &&
71 ':' == sMacroNameVal[rApp.getLength()] )
73 sLibraryVal =
"StarOffice";
74 sMacroNameVal = sMacroNameVal.copy( rApp.getLength()+1 );
76 else if( sMacroNameVal.getLength() > rDoc.getLength()+1 &&
78 ':' == sMacroNameVal[rDoc.getLength()] )
81 sMacroNameVal = sMacroNameVal.copy( rDoc.getLength()+1 );
84 if (!sMacroNameVal.isEmpty())
85 rImport.NotifyMacroEventRead();
87 Sequence<PropertyValue> aValues
constexpr OUStringLiteral gsLibrary(u"Library")
constexpr OUStringLiteral gsMacroName(u"MacroName")
constexpr OUStringLiteral gsStarBasic(u"StarBasic")
constexpr OUStringLiteral gsEventType(u"EventType")
This class deliberately does not support XWeak, to improve performance when loading large documents.
Import <script:events> element.
void AddEventValues(const OUString &rEventName, const css::uno::Sequence< css::beans::PropertyValue > &rValues)
virtual ~XMLStarBasicContextFactory() override
XMLStarBasicContextFactory()
virtual SvXMLImportContext * CreateContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, XMLEventsImportContext *rEvents, const OUString &rApiEventName) override
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
#define XML_ELEMENT(prefix, name)