diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-09-01 12:44:39 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-09-05 22:13:17 +0000 |
commit | c75af8578d921040e1baf8414edd7239969bcd45 (patch) | |
tree | 2c9310a3da94d1859fd80f03a7217bbfec938b67 /xmlscript/source/xmlmod_imexp | |
parent | 72fa23ba0e13e6cf8a7ffb0476863d4399af0da1 (diff) |
kill RTL_CONSTASCII_USTRINGPARAM in xmlscript
Plus rtl::OUString cleanup
Only on rebased files
Change-Id: Icddaa20742cc45f08e5a48790447fcf8865f4bd6
Reviewed-on: https://gerrit.libreoffice.org/527
Reviewed-by: Olivier Hallot <olivier.hallot@alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
Diffstat (limited to 'xmlscript/source/xmlmod_imexp')
-rw-r--r-- | xmlscript/source/xmlmod_imexp/imp_share.hxx | 3 | ||||
-rw-r--r-- | xmlscript/source/xmlmod_imexp/xmlmod_export.cxx | 19 | ||||
-rw-r--r-- | xmlscript/source/xmlmod_imexp/xmlmod_import.cxx | 34 |
3 files changed, 16 insertions, 40 deletions
diff --git a/xmlscript/source/xmlmod_imexp/imp_share.hxx b/xmlscript/source/xmlmod_imexp/imp_share.hxx index 272111889a4f..abf5f0ac3abf 100644 --- a/xmlscript/source/xmlmod_imexp/imp_share.hxx +++ b/xmlscript/source/xmlmod_imexp/imp_share.hxx @@ -33,9 +33,6 @@ #include <vector> -#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) ) - - using namespace ::rtl; using namespace ::std; using namespace ::com::sun::star; diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx index c1c6a7169bd9..6036cc8afa95 100644 --- a/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx +++ b/xmlscript/source/xmlmod_imexp/xmlmod_export.cxx @@ -24,7 +24,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star; -using ::rtl::OUString; namespace xmlscript { @@ -39,26 +38,22 @@ SAL_CALL exportScriptModule( { xOut->startDocument(); - OUString aDocTypeStr( RTL_CONSTASCII_USTRINGPARAM( + OUString aDocTypeStr( "<!DOCTYPE script:module PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\"" - " \"module.dtd\">" ) ); + " \"module.dtd\">"); xOut->unknown( aDocTypeStr ); xOut->ignorableWhitespace( OUString() ); - OUString aModuleName( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":module") ); + OUString aModuleName( XMLNS_SCRIPT_PREFIX ":module" ); XMLElement* pModElement = new XMLElement( aModuleName ); Reference< xml::sax::XAttributeList > xAttributes( pModElement ); - pModElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("xmlns:" XMLNS_SCRIPT_PREFIX) ), - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_URI) ) ); + pModElement->addAttribute( "xmlns:" XMLNS_SCRIPT_PREFIX, XMLNS_SCRIPT_URI ); - pModElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":name") ), - rMod.aName ); - pModElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":language") ), - rMod.aLanguage ); + pModElement->addAttribute( XMLNS_SCRIPT_PREFIX ":name", rMod.aName ); + pModElement->addAttribute( XMLNS_SCRIPT_PREFIX ":language", rMod.aLanguage ); if( !rMod.aModuleType.isEmpty() ) - pModElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_SCRIPT_PREFIX ":moduleType") ), - rMod.aModuleType ); + pModElement->addAttribute( XMLNS_SCRIPT_PREFIX ":moduleType", rMod.aModuleType ); xOut->ignorableWhitespace( OUString() ); xOut->startElement( aModuleName, xAttributes ); diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx index ae8b996b80a8..ec13ec5bfb5e 100644 --- a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx +++ b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx @@ -80,9 +80,7 @@ Reference< xml::input::XElement > ModuleElement::startChildElement( Reference< xml::input::XAttributes > const & /*xAttributes*/ ) throw (xml::sax::SAXException, RuntimeException) { - throw xml::sax::SAXException( - OUString( RTL_CONSTASCII_USTRINGPARAM("unexpected element!") ), - Reference< XInterface >(), Any() ); + throw xml::sax::SAXException("unexpected element!", Reference< XInterface >(), Any() ); } //__________________________________________________________________________________________________ @@ -129,12 +127,9 @@ void ModuleImport::startDocument( Reference< xml::input::XNamespaceMapping > const & xNamespaceMapping ) throw (xml::sax::SAXException, RuntimeException) { - XMLNS_SCRIPT_UID = xNamespaceMapping->getUidByUri( - OUSTR(XMLNS_SCRIPT_URI) ); - XMLNS_LIBRARY_UID = xNamespaceMapping->getUidByUri( - OUSTR(XMLNS_LIBRARY_URI) ); - XMLNS_XLINK_UID = xNamespaceMapping->getUidByUri( - OUSTR(XMLNS_XLINK_URI) ); + XMLNS_SCRIPT_UID = xNamespaceMapping->getUidByUri( XMLNS_SCRIPT_URI ); + XMLNS_LIBRARY_UID = xNamespaceMapping->getUidByUri( XMLNS_LIBRARY_URI ); + XMLNS_XLINK_UID = xNamespaceMapping->getUidByUri( XMLNS_XLINK_URI ); } //__________________________________________________________________________________________________ @@ -163,31 +158,20 @@ Reference< xml::input::XElement > ModuleImport::startRootElement( { if (XMLNS_SCRIPT_UID != nUid) { - throw xml::sax::SAXException( - OUString( RTL_CONSTASCII_USTRINGPARAM("illegal namespace!") ), - Reference< XInterface >(), Any() ); + throw xml::sax::SAXException( "illegal namespace!", Reference< XInterface >(), Any() ); } // window else if ( rLocalName == "module" ) { - mrModuleDesc.aName = xAttributes->getValueByUidName( - XMLNS_SCRIPT_UID, - OUString( RTL_CONSTASCII_USTRINGPARAM("name") ) ); - mrModuleDesc.aLanguage = xAttributes->getValueByUidName( - XMLNS_SCRIPT_UID, - OUString( RTL_CONSTASCII_USTRINGPARAM("language") ) ); - mrModuleDesc.aModuleType = xAttributes->getValueByUidName( - XMLNS_SCRIPT_UID, - OUString( RTL_CONSTASCII_USTRINGPARAM("moduleType") ) ); + mrModuleDesc.aName = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "name" ); + mrModuleDesc.aLanguage = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "language" ); + mrModuleDesc.aModuleType = xAttributes->getValueByUidName( XMLNS_SCRIPT_UID, "moduleType" ); return new ModuleElement( rLocalName, xAttributes, 0, this ); } else { - throw xml::sax::SAXException( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "illegal root element (expected module) given: ") ) + - rLocalName, Reference< XInterface >(), Any() ); + throw xml::sax::SAXException("illegal root element (expected module) given: " + rLocalName, Reference< XInterface >(), Any() ); } } //__________________________________________________________________________________________________ |