summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-04 14:00:40 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 11:21:26 +0200
commite52779d2f8722c713f72aedbf475267440d729f0 (patch)
tree0f2f15b2a7645e0b75f8057c96c90e05e1a6e7df /sot
parente9c4ee996d5a6bf895072613ac4e488346ee5b05 (diff)
remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx33
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx2
2 files changed, 15 insertions, 20 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index e7b1275aca19..9f9d50dd6e12 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1675,7 +1675,7 @@ void UCBStorage_Impl::Init()
{
// Hack! Avoid access to the manifest file until mediatype is not available in the first segment of a
// disk spanned file
- m_aContentType = m_aOriginalContentType = OUString( "application/vnd.sun.xml.impress" );
+ m_aContentType = m_aOriginalContentType = "application/vnd.sun.xml.impress";
}
else if ( m_pContent )
{
@@ -1794,11 +1794,10 @@ void UCBStorage_Impl::ReadContent()
// create cursor for access to children
Sequence< OUString > aProps(4);
- OUString* pProps = aProps.getArray();
- pProps[0] = OUString("Title");
- pProps[1] = OUString("IsFolder");
- pProps[2] = OUString("MediaType");
- pProps[3] = OUString("Size");
+ aProps[0] = "Title";
+ aProps[1] = "IsFolder";
+ aProps[2] = "MediaType";
+ aProps[3] = "Size";
::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS;
try
@@ -2017,9 +2016,9 @@ void UCBStorage_Impl::GetProps( sal_Int32& nProps, Sequence < Sequence < Propert
if ( !m_bIsRoot )
aPath += m_aName;
aPath += "/";
- aProps[0].Name = OUString("MediaType");
+ aProps[0].Name = "MediaType";
aProps[0].Value <<= (OUString ) m_aContentType;
- aProps[1].Name = OUString("FullPath");
+ aProps[1].Name = "FullPath";
aProps[1].Value <<= (OUString ) aPath;
rSequence[ nProps++ ] = aProps;
@@ -2040,9 +2039,9 @@ void UCBStorage_Impl::GetProps( sal_Int32& nProps, Sequence < Sequence < Propert
// properties of streams
OUString aElementPath( aPath );
aElementPath += pElement->m_aName;
- aProps[0].Name = OUString("MediaType");
+ aProps[0].Name = "MediaType";
aProps[0].Value <<= (OUString ) pElement->GetContentType();
- aProps[1].Name = OUString("FullPath");
+ aProps[1].Name = "FullPath";
aProps[1].Value <<= (OUString ) aElementPath;
rSequence[ nProps++ ] = aProps;
}
@@ -2088,11 +2087,9 @@ bool UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
continue;
Sequence < OUString > aNames(1);
- OUString* pNames = aNames.getArray();
- pNames[0] = OUString( "Title" );
+ aNames[0] = "Title";
Sequence < Any > aValues(1);
- Any* pValues = aValues.getArray();
- pValues[0] = makeAny( OUString( m_aName ) );
+ aValues[0] = makeAny( OUString( m_aName ) );
Content aNewFolder;
if ( !pContent->insertNewContent( rCurr.Type, aNames, aValues, aNewFolder ) )
@@ -2190,7 +2187,7 @@ sal_Int16 UCBStorage_Impl::Commit()
if ( pElement->m_xStream->m_bIsOLEStorage )
{
// OLE storage should be stored encrytped, if the storage uses encryption
- pElement->m_xStream->m_aContentType = OUString("application/vnd.sun.star.oleobject");
+ pElement->m_xStream->m_aContentType = "application/vnd.sun.star.oleobject";
Any aValue;
aValue <<= (sal_Bool)sal_True;
pElement->m_xStream->m_pContent->setPropertyValue("Encrypted", aValue );
@@ -3192,8 +3189,7 @@ OUString UCBStorage::CreateLinkFile( const OUString& rName )
// assemble a new folder name in the destination folder
INetURLObject aObj( rName );
OUString aTmpName = aObj.GetName();
- OUString aTitle = OUString( "content." );
- aTitle += aTmpName;
+ OUString aTitle = "content." + aTmpName;
// create a folder and store its URL
Content aFolder( aFolderURL, Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
@@ -3231,8 +3227,7 @@ OUString UCBStorage::CreateLinkFile( const OUString& rName )
OUString aURL = aObj.GetMainURL( INetURLObject::NO_DECODE );
// store it as key/value pair
- OUString aLink = OUString("ContentURL=");
- aLink += aURL;
+ OUString aLink = "ContentURL=" + aURL;
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(*pStream, aLink, RTL_TEXTENCODING_UTF8);
pStream->Flush();
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 712f3518b7b2..b2d14402f4b4 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -76,7 +76,7 @@ OLESimpleStorage::~OLESimpleStorage()
uno::Sequence< OUString > SAL_CALL OLESimpleStorage::impl_staticGetSupportedServiceNames()
{
uno::Sequence< OUString > aRet(1);
- aRet[0] = OUString("com.sun.star.embed.OLESimpleStorage");
+ aRet[0] = "com.sun.star.embed.OLESimpleStorage";
return aRet;
}