22#include <com/sun/star/beans/XPropertySet.hpp>
23#include <com/sun/star/beans/PropertyValue.hpp>
24#include <com/sun/star/embed/XEmbeddedObject.hpp>
28#include <com/sun/star/uno/Any.hxx>
40 switch( rName.toChar() )
48 (rName ==
"ARCHIVE" || rName ==
"ARCHIVES" ) )
83 if( bApplet && rName ==
"OBJECT" )
117 bool bMayScript,
const OUString& rCodeBase,
118 std::u16string_view rDocumentBaseURL )
131 uno::Reference < beans::XPropertySet > xSet(
m_xApplet->getComponent(), uno::UNO_QUERY );
134 xSet->setPropertyValue(
"AppletCode",
uno::Any( rCode ) );
135 xSet->setPropertyValue(
"AppletName",
uno::Any( rName ) );
136 xSet->setPropertyValue(
"AppletIsScript",
uno::Any( bMayScript ) );
137 xSet->setPropertyValue(
"AppletDocBase",
uno::Any( sDocBase ) );
138 if ( !rCodeBase.isEmpty() )
139 xSet->setPropertyValue(
"AppletCodeBase",
uno::Any( rCodeBase ) );
141 xSet->setPropertyValue(
"AppletCodeBase",
uno::Any( sDocBase ) );
147 OUString aCode,
aName, aCodeBase;
148 bool bMayScript =
false;
151 for(
size_t i = 0;
i < nArgCount;
i++ )
155 if( rName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_O_code ) )
157 else if( rName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_O_codebase ) )
159 else if( rName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_O_name ) )
161 else if( rName.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_O_mayscript ) )
165 if( aCode.isEmpty() )
167 CreateApplet( aCode, aName, bMayScript, aCodeBase, rBaseURL );
177 uno::Reference < beans::XPropertySet > xSet(
m_xApplet->getComponent(), uno::UNO_QUERY );
180 uno::Sequence < beans::PropertyValue > aProps;
182 xSet->setPropertyValue(
"AppletCommands",
uno::Any( aProps ) );
187void SwApplet_Impl::AppendParam(
const OUString& rName,
const OUString& rValue )
#define OOO_STRING_SW_HTML_O_Hidden
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
static OUString GetAbsURL(std::u16string_view rTheBaseURIRef, OUString const &rTheRelURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
void FillSequence(css::uno::Sequence< css::beans::PropertyValue > &) const
void Append(const OUString &rCommand, const OUString &rArg)
const OUString & GetArgument() const
const OUString & GetCommand() const
SwApplet_Impl(SfxItemPool &rPool)
void CreateApplet(const OUString &rCode, const OUString &rName, bool bMayScript, const OUString &rCodeBase, std::u16string_view rBaseURL)
SvCommandList m_aCommandList
css::uno::Reference< css::embed::XEmbeddedObject > m_xApplet
static SwHtmlOptType GetOptionType(const OUString &rName, bool bApplet)
css::uno::Reference< css::embed::XEmbeddedObject > CreateEmbeddedObject(const css::uno::Sequence< sal_Int8 > &, OUString &, OUString const *pBaseURL=nullptr)
#define SO3_APPLET_CLASSID
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr sal_uInt16 RES_FRMATR_END(141)
#define OOO_STRING_SVTOOLS_HTML_O_height
#define OOO_STRING_SVTOOLS_HTML_O_mayscript
#define OOO_STRING_SVTOOLS_HTML_O_align
#define OOO_STRING_SVTOOLS_HTML_O_src
#define OOO_STRING_SVTOOLS_HTML_O_code
#define OOO_STRING_SVTOOLS_HTML_O_class
#define OOO_STRING_SVTOOLS_HTML_O_hspace
#define OOO_STRING_SVTOOLS_HTML_O_vspace
#define OOO_STRING_SVTOOLS_HTML_O_type
#define OOO_STRING_SVTOOLS_HTML_O_name
#define OOO_STRING_SVTOOLS_HTML_O_id
#define OOO_STRING_SVTOOLS_HTML_O_width
#define OOO_STRING_SVTOOLS_HTML_O_codebase
#define OOO_STRING_SVTOOLS_HTML_O_alt
#define OOO_STRING_SVTOOLS_HTML_O_style