summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorJosé Guilherme Vanz <guilherme.sft@gmail.com>2012-11-30 22:24:01 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-12-01 15:14:52 +0000
commit1611806226329e5532e6393d0ac2275d7e99eb61 (patch)
tree3a3cc502ecdfa8bfc8646c4900349c5dd43ecdc6 /oox
parentb30bfddc2b75aa5a540c4eadfc4f7eca90a8d67f (diff)
Removal ::rtl:: prefixes and macros in oxx
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 <guilherme.sft@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/1211 Reviewed-by: Olivier Hallot <olivier.hallot@alta.org.br> Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/binarycodec.cxx20
-rw-r--r--oox/source/core/filterdetect.cxx30
-rw-r--r--oox/source/core/fragmenthandler2.cxx2
-rw-r--r--oox/source/core/xmlfilterbase.cxx8
4 files changed, 30 insertions, 30 deletions
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>( (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>( (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<aRet.getLength(); ++i )
aRet[i] = make_Pair(
- ::rtl::OUString::createFromAscii(namespaceURIs[i]),
+ OUString::createFromAscii(namespaceURIs[i]),
namespaceIds[i]);
return aRet;
}
@@ -218,7 +218,7 @@ void XmlFilterBase::importDocumentProperties()
Reference< XStorage > 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<XDocument> XmlFilterBase::importFragment( const ::rtl::OUString& aFragmentPath )
+Reference<XDocument> XmlFilterBase::importFragment( const OUString& aFragmentPath )
{
Reference<XDocument> 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(),