[Libreoffice-commits] .: oox/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Dec 1 07:15:11 PST 2012
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(-)
New commits:
commit 1611806226329e5532e6393d0ac2275d7e99eb61
Author: José Guilherme Vanz <guilherme.sft at gmail.com>
Date: Fri Nov 30 22:24:01 2012 -0200
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 at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1211
Reviewed-by: Olivier Hallot <olivier.hallot at alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot at alta.org.br>
diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx
index 70dc48e..04ef753 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 0e2a1cb..212775a 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 9d98b04..bfc6834 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 64aec26..be0b96f 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(),
More information about the Libreoffice-commits
mailing list