summaryrefslogtreecommitdiffstats
path: root/comphelper/source/container
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-06-29 21:24:12 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-06-29 21:52:54 +0000
commitba0a57702cdef7a0389c06841711d7e3079d471c (patch)
tree223c0dd50de4b71cf7df9d0073f7cacca1f18c8d /comphelper/source/container
parentSVGWriter: fix build with C++98 compilers (diff)
downloadcore-ba0a57702cdef7a0389c06841711d7e3079d471c.tar.gz
core-ba0a57702cdef7a0389c06841711d7e3079d471c.zip
remove OUString wrap for string literals
For some functions and all kinds of Exceptions. CannotConvertException CloseVetoException DisposedException EmptyUndoStackException ErrorCodeIOException Exception GridInvalidDataException GridInvalidModelException IOException IllegalAccessException IllegalArgumentException IllegalTypeException IndexOutOfBoundsException NoMasterException NoSuchElementException NoSupportException PropertyVetoException RuntimeException SAXException ScannerException StorageWrappedTargetException UnsupportedFlavorException VetoException WrappedTargetException ZipIOException throwGenericSQLException throwIllegallArgumentException createInstance createInstanceWithContext forName getByName getPackageManager getPropertyValue getUnpackedValueOrDefault getValueByName hasPropertyByName openKey setName setPropertyValue supportsService bash command: for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx' | cut -d ':' -f1 | sort -u | xargs sed -i -e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g" -e "s/\($i.*\)\"+ /\1\" + /g"; done Change-Id: Iaf8e641b0abf28c082906014f87a183517630535 Reviewed-on: https://gerrit.libreoffice.org/4624 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'comphelper/source/container')
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx14
-rw-r--r--comphelper/source/container/enumerablemap.cxx12
2 files changed, 13 insertions, 13 deletions
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index fb90a0b216e7..94c9348da5b1 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -160,7 +160,7 @@ sal_Bool EmbeddedObjectContainer::CommitImageSubStorage()
{
// get the open mode from the parent storage
sal_Int32 nMode = 0;
- uno::Any aAny = xSet->getPropertyValue( OUString("OpenMode") );
+ uno::Any aAny = xSet->getPropertyValue("OpenMode");
if ( aAny >>= nMode )
bReadOnlyMode = !(nMode & embed::ElementModes::WRITE );
} // if ( xSet.is() )
@@ -352,7 +352,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::Get_Impl( con
{
// get the open mode from the parent storage
sal_Int32 nMode = 0;
- uno::Any aAny = xSet->getPropertyValue( OUString("OpenMode") );
+ uno::Any aAny = xSet->getPropertyValue("OpenMode");
if ( aAny >>= nMode )
bReadOnlyMode = !(nMode & embed::ElementModes::WRITE );
}
@@ -584,7 +584,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::InsertEmbedde
// it is correct so for now, but what if somebody introduces a new stream based embedded object?
// Probably introducing of such an object must be restricted ( a storage must be used! ).
uno::Reference< beans::XPropertySet > xProps( xNewStream, uno::UNO_QUERY_THROW );
- xProps->setPropertyValue( OUString( "MediaType" ),
+ xProps->setPropertyValue("MediaType",
uno::makeAny( OUString( "application/vnd.sun.star.oleobject" ) ) );
}
catch (uno::Exception const& e)
@@ -1185,7 +1185,7 @@ uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetGraphicStream( c
uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY );
if ( xSet.is() )
{
- uno::Any aAny = xSet->getPropertyValue( OUString("MediaType") );
+ uno::Any aAny = xSet->getPropertyValue("MediaType");
aAny >>= *pMediaType;
}
}
@@ -1240,13 +1240,13 @@ sal_Bool EmbeddedObjectContainer::InsertGraphicStream( const com::sun::star::uno
if ( !xPropSet.is() )
throw uno::RuntimeException();
- xPropSet->setPropertyValue( OUString("UseCommonStoragePasswordEncryption"),
+ xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption",
uno::makeAny( (sal_Bool)sal_True ) );
uno::Any aAny;
aAny <<= rMediaType;
- xPropSet->setPropertyValue( OUString("MediaType"), aAny );
+ xPropSet->setPropertyValue("MediaType", aAny );
- xPropSet->setPropertyValue( OUString("Compressed"),
+ xPropSet->setPropertyValue("Compressed",
uno::makeAny( (sal_Bool)sal_True ) );
}
catch (const uno::Exception&)
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx
index e79f2a0875c7..1896a6059b59 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -372,27 +372,27 @@ namespace comphelper
Type aKeyType, aValueType;
if ( !( _arguments[0] >>= aKeyType ) )
- throw IllegalArgumentException( OUString("com.sun.star.uno.Type expected."), *this, 1 );
+ throw IllegalArgumentException("com.sun.star.uno.Type expected.", *this, 1 );
if ( !( _arguments[1] >>= aValueType ) )
- throw IllegalArgumentException( OUString("com.sun.star.uno.Type expected."), *this, 2 );
+ throw IllegalArgumentException("com.sun.star.uno.Type expected.", *this, 2 );
Sequence< Pair< Any, Any > > aInitialValues;
bool bMutable = true;
if ( nArgumentCount == 3 )
{
if ( !( _arguments[2] >>= aInitialValues ) )
- throw IllegalArgumentException( OUString("[]com.sun.star.beans.Pair<any,any> expected."), *this, 2 );
+ throw IllegalArgumentException("[]com.sun.star.beans.Pair<any,any> expected.", *this, 2 );
bMutable = false;
}
// for the value, anything is allowed, except VOID
if ( ( aValueType.getTypeClass() == TypeClass_VOID ) || ( aValueType.getTypeClass() == TypeClass_UNKNOWN ) )
- throw IllegalTypeException( OUString( "Unsupported value type." ), *this );
+ throw IllegalTypeException("Unsupported value type.", *this );
// create the comparator for the KeyType, and throw if the type is not supported
::std::auto_ptr< IKeyPredicateLess > pComparator( getStandardLessPredicate( aKeyType, NULL ) );
if ( !pComparator.get() )
- throw IllegalTypeException( OUString( "Unsupported key type." ), *this );
+ throw IllegalTypeException("Unsupported key type.", *this );
// init members
m_aData.m_aKeyType = aKeyType;
@@ -746,7 +746,7 @@ namespace comphelper
if ( m_disposed )
throw DisposedException( OUString(), m_rParent );
if ( m_mapPos == m_rMapData.m_pValues->end() )
- throw NoSuchElementException( OUString( "No more elements." ), m_rParent );
+ throw NoSuchElementException("No more elements.", m_rParent );
Any aNextElement;
switch ( m_eType )