diff options
author | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-11-10 13:50:33 +0800 |
---|---|---|
committer | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-11-10 13:50:33 +0800 |
commit | 8c3fc316ba4b8ebd3900273c788e98130b3dbe4e (patch) | |
tree | faab853a943d7c0b5a990406fd8213c294794fa7 /xmloff/source/script | |
parent | 61e3d4b9cfe7dc0721ee01cabc2702d0ef4932a0 (diff) | |
parent | c6855c9a268d45364f3d7e951c101b256eb9df7d (diff) |
removetooltypes01: #i112600# resync to DEV300_m92; remove tooltypes from xmloff, linguistic, vcl, svtools, accessibility, fpicker, uui and framework
Diffstat (limited to 'xmloff/source/script')
-rw-r--r-- | xmloff/source/script/XMLEventExport.cxx | 25 | ||||
-rw-r--r-- | xmloff/source/script/xmlbasici.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/script/xmlbasici.hxx | 8 | ||||
-rw-r--r-- | xmloff/source/script/xmlscripti.cxx | 8 |
4 files changed, 34 insertions, 15 deletions
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index a67aee443d..31d143c62c 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.cxx @@ -62,7 +62,8 @@ using ::xmloff::token::XML_EVENT_LISTENERS; XMLEventExport::XMLEventExport(SvXMLExport& rExp, const XMLEventNameTranslation* pTranslationTable) : sEventType(RTL_CONSTASCII_USTRINGPARAM("EventType")), - rExport(rExp) + rExport(rExp), + bExtNamespace(false) { AddTranslationTable(pTranslationTable); } @@ -175,6 +176,16 @@ void XMLEventExport::Export( Reference<XNameAccess> & rAccess, } } +void XMLEventExport::ExportExt( Reference<XNameAccess> & rAccess, + sal_Bool bWhitespace ) +{ + // set bExtNamespace flag to use XML_NAMESPACE_OFFICE_EXT namespace + // for events element (not for child elements) + bExtNamespace = true; + Export(rAccess, bWhitespace); + bExtNamespace = false; // reset for future Export calls +} + /// export a singular event and wirte <office:events> container void XMLEventExport::ExportSingleEvent( Sequence<PropertyValue>& rEventValues, @@ -270,13 +281,17 @@ void XMLEventExport::StartElement(sal_Bool bWhitespace) { rExport.IgnorableWhitespace(); } - rExport.StartElement( XML_NAMESPACE_OFFICE, XML_EVENT_LISTENERS, + sal_uInt16 nNamespace = bExtNamespace ? XML_NAMESPACE_OFFICE_EXT + : XML_NAMESPACE_OFFICE; + rExport.StartElement( nNamespace, XML_EVENT_LISTENERS, bWhitespace); } void XMLEventExport::EndElement(sal_Bool bWhitespace) { - rExport.EndElement(XML_NAMESPACE_OFFICE, XML_EVENT_LISTENERS, bWhitespace); + sal_uInt16 nNamespace = bExtNamespace ? XML_NAMESPACE_OFFICE_EXT + : XML_NAMESPACE_OFFICE; + rExport.EndElement(nNamespace, XML_EVENT_LISTENERS, bWhitespace); if (bWhitespace) { rExport.IgnorableWhitespace(); @@ -343,6 +358,10 @@ const XMLEventNameTranslation aStandardEventTable[] = { "OnFieldMerge", XML_NAMESPACE_OFFICE, "field-merge" }, { "OnFieldMergeFinished", XML_NAMESPACE_OFFICE, "field-merge-finished" }, { "OnLayoutFinished", XML_NAMESPACE_OFFICE, "layout-finished" }, + { "OnDoubleClick", XML_NAMESPACE_OFFICE, "dblclick" }, + { "OnRightClick", XML_NAMESPACE_OFFICE, "contextmenu" }, + { "OnChange", XML_NAMESPACE_OFFICE, "content-changed" }, + { "OnCalculate", XML_NAMESPACE_OFFICE, "calculated" }, { NULL, 0, 0 } }; diff --git a/xmloff/source/script/xmlbasici.cxx b/xmloff/source/script/xmlbasici.cxx index 68cd64767f..b612129b1a 100644 --- a/xmloff/source/script/xmlbasici.cxx +++ b/xmloff/source/script/xmlbasici.cxx @@ -40,7 +40,7 @@ using namespace ::com::sun::star::uno; // XMLBasicImportContext // ============================================================================= -XMLBasicImportContext::XMLBasicImportContext( SvXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, +XMLBasicImportContext::XMLBasicImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const Reference< frame::XModel >& rxModel ) :SvXMLImportContext( rImport, nPrfx, rLName ) ,m_xModel( rxModel ) @@ -73,7 +73,7 @@ XMLBasicImportContext::~XMLBasicImportContext() // ----------------------------------------------------------------------------- SvXMLImportContext* XMLBasicImportContext::CreateChildContext( - USHORT nPrefix, const ::rtl::OUString& rLocalName, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const Reference< xml::sax::XAttributeList >& ) { SvXMLImportContext* pContext = 0; @@ -140,7 +140,7 @@ void XMLBasicImportContext::Characters( const ::rtl::OUString& rChars ) // XMLBasicImportChildContext // ============================================================================= -XMLBasicImportChildContext::XMLBasicImportChildContext( SvXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, +XMLBasicImportChildContext::XMLBasicImportChildContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const Reference< xml::sax::XDocumentHandler >& rxHandler ) :SvXMLImportContext( rImport, nPrfx, rLName ) ,m_xHandler( rxHandler ) @@ -156,7 +156,7 @@ XMLBasicImportChildContext::~XMLBasicImportChildContext() // ----------------------------------------------------------------------------- SvXMLImportContext* XMLBasicImportChildContext::CreateChildContext( - USHORT nPrefix, const ::rtl::OUString& rLocalName, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const Reference< xml::sax::XAttributeList >& ) { return new XMLBasicImportChildContext( GetImport(), nPrefix, rLocalName, m_xHandler ); diff --git a/xmloff/source/script/xmlbasici.hxx b/xmloff/source/script/xmlbasici.hxx index 14ca06dc1d..b1c4ca6324 100644 --- a/xmloff/source/script/xmlbasici.hxx +++ b/xmloff/source/script/xmlbasici.hxx @@ -44,12 +44,12 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xHandler; public: - XMLBasicImportContext( SvXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + XMLBasicImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel ); virtual ~XMLBasicImportContext(); - virtual SvXMLImportContext* CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName, + virtual SvXMLImportContext* CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& rxAttrList ); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& rxAttrList ); @@ -70,12 +70,12 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xHandler; public: - XMLBasicImportChildContext( SvXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + XMLBasicImportChildContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler >& rxHandler ); virtual ~XMLBasicImportChildContext(); - virtual SvXMLImportContext* CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName, + virtual SvXMLImportContext* CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx index d1504276a4..0c96063964 100644 --- a/xmloff/source/script/xmlscripti.cxx +++ b/xmloff/source/script/xmlscripti.cxx @@ -61,12 +61,12 @@ private: ::rtl::OUString m_aLanguage; public: - XMLScriptChildContext( SvXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + XMLScriptChildContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& rxModel, const ::rtl::OUString& rLanguage ); virtual ~XMLScriptChildContext(); - virtual SvXMLImportContext* CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName, + virtual SvXMLImportContext* CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); virtual void EndElement(); @@ -74,7 +74,7 @@ public: // ----------------------------------------------------------------------------- -XMLScriptChildContext::XMLScriptChildContext( SvXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, +XMLScriptChildContext::XMLScriptChildContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const Reference< frame::XModel >& rxModel, const ::rtl::OUString& rLanguage ) :SvXMLImportContext( rImport, nPrfx, rLName ) ,m_xModel( rxModel ) @@ -92,7 +92,7 @@ XMLScriptChildContext::~XMLScriptChildContext() // ----------------------------------------------------------------------------- SvXMLImportContext* XMLScriptChildContext::CreateChildContext( - USHORT nPrefix, const ::rtl::OUString& rLocalName, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const Reference< xml::sax::XAttributeList >& xAttrList ) { SvXMLImportContext* pContext = NULL; |