From 1611806226329e5532e6393d0ac2275d7e99eb61 Mon Sep 17 00:00:00 2001 From: José Guilherme Vanz Date: Fri, 30 Nov 2012 22:24:01 -0200 Subject: Removal ::rtl:: prefixes and macros in oxx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes some ::rtl:: prefixes and RTL_CONSTASCII_STRINGPARAM, RTL_CONSTASCII_USTRINGPARAM macros in oxx. Change-Id: I12bfb2528e8a9aaf3f119a1e6f0ae0246d16a772 Signed-off-by: José Guilherme Vanz Reviewed-on: https://gerrit.libreoffice.org/1211 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot --- oox/source/core/binarycodec.cxx | 20 ++++++++++---------- oox/source/core/filterdetect.cxx | 30 +++++++++++++++--------------- oox/source/core/fragmenthandler2.cxx | 2 +- oox/source/core/xmlfilterbase.cxx | 8 ++++---- 4 files changed, 30 insertions(+), 30 deletions(-) (limited to 'oox') diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx index 70dc48e20301..04ef75363207 100644 --- a/oox/source/core/binarycodec.cxx +++ b/oox/source/core/binarycodec.cxx @@ -179,15 +179,15 @@ bool BinaryCodec_XOR::initCodec( const uno::Sequence< beans::NamedValue >& aData bool bResult = sal_False; ::comphelper::SequenceAsHashMap aHashData( aData ); - uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95EncryptionKey" ) ), uno::Sequence< sal_Int8 >() ); + uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault("XOR95EncryptionKey", uno::Sequence< sal_Int8 >() ); if ( aKey.getLength() == 16 ) { (void)memcpy( mpnKey, aKey.getConstArray(), 16 ); bResult = sal_True; - mnBaseKey = (sal_uInt16)aHashData.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95BaseKey" ) ), (sal_Int16)0 ); - mnHash = (sal_uInt16)aHashData.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95PasswordHash" ) ), (sal_Int16)0 ); + mnBaseKey = (sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95BaseKey", (sal_Int16)0 ); + mnHash = (sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95PasswordHash", (sal_Int16)0 ); } else OSL_FAIL( "Unexpected key size!\n" ); @@ -198,9 +198,9 @@ bool BinaryCodec_XOR::initCodec( const uno::Sequence< beans::NamedValue >& aData uno::Sequence< beans::NamedValue > BinaryCodec_XOR::getEncryptionData() { ::comphelper::SequenceAsHashMap aHashData; - aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95EncryptionKey" ) ) ] <<= uno::Sequence( (sal_Int8*)mpnKey, 16 ); - aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95BaseKey" ) ) ] <<= (sal_Int16)mnBaseKey; - aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95PasswordHash" ) ) ] <<= (sal_Int16)mnHash; + aHashData[ OUString("XOR95EncryptionKey") ] <<= uno::Sequence( (sal_Int8*)mpnKey, 16 ); + aHashData[ OUString("XOR95BaseKey") ] <<= (sal_Int16)mnBaseKey; + aHashData[ OUString("XOR95PasswordHash") ] <<= (sal_Int16)mnHash; return aHashData.getAsConstNamedValueList(); } @@ -286,12 +286,12 @@ bool BinaryCodec_RCF::initCodec( const uno::Sequence< beans::NamedValue >& aData bool bResult = sal_False; ::comphelper::SequenceAsHashMap aHashData( aData ); - uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97EncryptionKey" ) ), uno::Sequence< sal_Int8 >() ); + uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault("STD97EncryptionKey", uno::Sequence< sal_Int8 >() ); if ( aKey.getLength() == RTL_DIGEST_LENGTH_MD5 ) { (void)memcpy( mpnDigestValue, aKey.getConstArray(), RTL_DIGEST_LENGTH_MD5 ); - uno::Sequence< sal_Int8 > aUniqueID = aHashData.getUnpackedValueOrDefault( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97UniqueID" ) ), uno::Sequence< sal_Int8 >() ); + uno::Sequence< sal_Int8 > aUniqueID = aHashData.getUnpackedValueOrDefault("STD97UniqueID", uno::Sequence< sal_Int8 >() ); if ( aUniqueID.getLength() == 16 ) { (void)memcpy( mpnUnique, aUniqueID.getConstArray(), 16 ); @@ -309,8 +309,8 @@ bool BinaryCodec_RCF::initCodec( const uno::Sequence< beans::NamedValue >& aData uno::Sequence< beans::NamedValue > BinaryCodec_RCF::getEncryptionData() { ::comphelper::SequenceAsHashMap aHashData; - aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97EncryptionKey" ) ) ] <<= uno::Sequence< sal_Int8 >( (sal_Int8*)mpnDigestValue, RTL_DIGEST_LENGTH_MD5 ); - aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97UniqueID" ) ) ] <<= uno::Sequence< sal_Int8 >( (sal_Int8*)mpnUnique, 16 ); + aHashData[ OUString("STD97EncryptionKey") ] <<= uno::Sequence< sal_Int8 >( (sal_Int8*)mpnDigestValue, RTL_DIGEST_LENGTH_MD5 ); + aHashData[ OUString("STD97UniqueID") ] <<= uno::Sequence< sal_Int8 >( (sal_Int8*)mpnUnique, 16 ); return aHashData.getAsConstNamedValueList(); } diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 0e2a1cb64f32..212775a50a1f 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -162,7 +162,7 @@ void FilterDetectDocHandler::parseRelationship( const AttributeList& rAttribs ) { // use '/' to representent the root of the zip package ( and provide a 'file' scheme to // keep the XUriReference implementation happy ) - Reference< com::sun::star::uri::XUriReference > xBase = xFac->parse( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("file:///" ) ) ); + Reference< com::sun::star::uri::XUriReference > xBase = xFac->parse( OUString("file:///") ); Reference< com::sun::star::uri::XUriReference > xPart = xFac->parse( rAttribs.getString( XML_Target, OUString() ) ); Reference< com::sun::star::uri::XUriReference > xAbs = xFac->makeAbsolute( xBase, xPart, sal_True, com::sun::star::uri::RelativeUriExcessParentSegments_RETAIN ); @@ -178,35 +178,35 @@ void FilterDetectDocHandler::parseRelationship( const AttributeList& rAttribs ) OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& rContentType ) const { - if( rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" ) ) || - rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.ms-word.document.macroEnabled.main+xml" ) ) ) + if( rContentType.equalsAscii("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" ) || + rContentType.equalsAscii("application/vnd.ms-word.document.macroEnabled.main+xml" ) ) return CREATE_OUSTRING( "writer_MS_Word_2007" ); - if( rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml" ) ) || - rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.ms-word.template.macroEnabledTemplate.main+xml" ) ) ) + if( rContentType.equalsAscii("application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml") || + rContentType.equalsAscii("application/vnd.ms-word.template.macroEnabledTemplate.main+xml") ) return CREATE_OUSTRING( "writer_MS_Word_2007_Template" ); - if( rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" ) ) || - rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.ms-excel.sheet.macroEnabled.main+xml" ) ) ) + if( rContentType.equalsAscii("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml") || + rContentType.equalsAscii("application/vnd.ms-excel.sheet.macroEnabled.main+xml") ) return CREATE_OUSTRING( "MS Excel 2007 XML" ); - if( rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml" ) ) || - rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.ms-excel.template.macroEnabled.main+xml" ) ) ) + if( rContentType.equalsAscii("application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml") || + rContentType.equalsAscii("application/vnd.ms-excel.template.macroEnabled.main+xml") ) return CREATE_OUSTRING( "MS Excel 2007 XML Template" ); if ( rContentType == "application/vnd.ms-excel.sheet.binary.macroEnabled.main" ) return CREATE_OUSTRING( "MS Excel 2007 Binary" ); - if( rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml" ) ) || - rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml" ) ) ) + if( rContentType.equalsAscii("application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml") || + rContentType.equalsAscii("application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml") ) return CREATE_OUSTRING( "MS PowerPoint 2007 XML" ); - if( rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml" ) ) || - rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml" ) ) ) + if( rContentType.equalsAscii("application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml") || + rContentType.equalsAscii("application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml") ) return CREATE_OUSTRING( "MS PowerPoint 2007 XML AutoPlay" ); - if( rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml" ) ) || - rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.ms-powerpoint.template.macroEnabled.main+xml" ) ) ) + if( rContentType.equalsAscii("application/vnd.openxmlformats-officedocument.presentationml.template.main+xml") || + rContentType.equalsAscii("application/vnd.ms-powerpoint.template.macroEnabled.main+xml") ) return CREATE_OUSTRING( "MS PowerPoint 2007 XML Template" ); return OUString(); diff --git a/oox/source/core/fragmenthandler2.cxx b/oox/source/core/fragmenthandler2.cxx index 9d98b04c1b1b..bfc68343a1b9 100644 --- a/oox/source/core/fragmenthandler2.cxx +++ b/oox/source/core/fragmenthandler2.cxx @@ -67,7 +67,7 @@ bool FragmentHandler2::prepareMceContext( sal_Int32 nElement, const AttributeLis case MCE_TOKEN( Choice ): { - OUString aRequires = rAttribs.getString( ( XML_Requires ), OUString(RTL_CONSTASCII_USTRINGPARAM("none")) ); + OUString aRequires = rAttribs.getString( ( XML_Requires ), OUString("none") ); aRequires = getFilter().getNamespaceURL( aRequires ); if( getFilter().getNamespaceId( aRequires ) > 0 && !aMceState.empty() && aMceState.back() == MCE_STARTED ) aMceState.back() = MCE_FOUND_CHOICE; diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 64aec26887cc..be0b96f225fc 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -171,7 +171,7 @@ namespace Sequence< Pair< OUString, sal_Int32 > > aRet(STATIC_ARRAY_SIZE(namespaceIds)); for( sal_Int32 i=0; i xDocumentStorage ( ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( OFOPXML_STORAGE_FORMAT_STRING, xInputStream ) ); Reference< XInterface > xTemp = xContext->getServiceManager()->createInstanceWithContext( - ::rtl::OUString("com.sun.star.document.OOXMLDocumentPropertiesImporter"), + "com.sun.star.document.OOXMLDocumentPropertiesImporter", xContext); Reference< XOOXMLDocumentPropertiesImporter > xImporter( xTemp, UNO_QUERY ); Reference< XDocumentPropertiesSupplier > xPropSupplier( xModel, UNO_QUERY); @@ -311,7 +311,7 @@ sal_Int32 XmlFilterBase::getNamespaceId( const OUString& rUrl ) return mxImpl->maFastParser.getNamespaceId( rUrl ); } -Reference XmlFilterBase::importFragment( const ::rtl::OUString& aFragmentPath ) +Reference XmlFilterBase::importFragment( const OUString& aFragmentPath ) { Reference xRet; @@ -628,7 +628,7 @@ XmlFilterBase& XmlFilterBase::exportDocumentProperties( Reference< XDocumentProp for( sal_Int32 i = 0, end = aStats.getLength(); i < end; ++i ) { ::com::sun::star::uno::Any aValue = aStats[ i ].Value; - ::rtl::OUString sValue; + OUString sValue; bool bHaveString = aValue >>= sValue; OSL_TRACE ("#\t%s=%s [%s]\n", OUStringToOString( aStats[ i ].Name, RTL_TEXTENCODING_UTF8 ).getStr(), -- cgit