diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 21:24:12 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-06-29 21:52:54 +0000 |
commit | ba0a57702cdef7a0389c06841711d7e3079d471c (patch) | |
tree | 223c0dd50de4b71cf7df9d0073f7cacca1f18c8d | |
parent | 8a7ede404ca4980f169c4ce634805ea5c1b6b56e (diff) |
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>
515 files changed, 2270 insertions, 2270 deletions
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx index 7cfce56eff4a..139939d984ab 100644 --- a/basic/source/classes/errobject.cxx +++ b/basic/source/classes/errobject.cxx @@ -164,7 +164,7 @@ void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const u throw (uno::RuntimeException) { if ( !Number.hasValue() ) - throw uno::RuntimeException( OUString("Missing Required Parameter"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Missing Required Parameter", uno::Reference< uno::XInterface >() ); Number >>= m_nNumber; Description >>= m_sDescription; Source >>= m_sSource; diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 09746adfe131..3ef3255a3030 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -221,7 +221,7 @@ SbxObject* StarBASIC::getVBAGlobals( ) { try { - xDocFac->createInstance( OUString( "ooo.vba.VBAGlobals" ) ); + xDocFac->createInstance("ooo.vba.VBAGlobals"); } catch(const Exception& ) { diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index efcaed41ee5a..b6abe419ef3d 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1455,10 +1455,10 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib, if ( xProps.is() ) { - xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) ); + xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) ); // #87671 Allow encryption - xProps->setPropertyValue( OUString("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) ); + xProps->setPropertyValue("UseCommonStoragePasswordEncryption", uno::makeAny( sal_True ) ); Reference< XOutputStream > xOutput = xElementStream->getOutputStream(); Reference< XNameContainer > xLib( pLib ); @@ -1596,10 +1596,10 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, if ( xProps.is() ) { OUString aMime("text/xml"); - xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) ); + xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) ); // #87671 Allow encryption - xProps->setPropertyValue( OUString("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) ); + xProps->setPropertyValue("UseCommonStoragePasswordEncryption", uno::makeAny( sal_True ) ); xOut = xInfoStream->getOutputStream(); } @@ -2070,10 +2070,10 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto throw uno::RuntimeException(); } OUString aMime( "text/xml" ); - xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) ); + xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) ); // #87671 Allow encryption - xProps->setPropertyValue( OUString("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) ); + xProps->setPropertyValue("UseCommonStoragePasswordEncryption", uno::makeAny( sal_True ) ); xOut = xInfoStream->getOutputStream(); } @@ -2698,7 +2698,7 @@ void SAL_CALL SfxLibraryContainer::initializeFromDocument( const Reference< XSto try { Reference< XServiceInfo > xSI( _rxDocument, UNO_QUERY_THROW ); - if ( xSI->supportsService( OUString("com.sun.star.document.OfficeDocument"))) + if ( xSI->supportsService("com.sun.star.document.OfficeDocument")) { xDocStorage.set( _rxDocument->getDocumentStorage(), UNO_QUERY_THROW ); } @@ -2913,7 +2913,7 @@ void SAL_CALL SfxLibraryContainer::setVBACompatibilityMode( ::sal_Bool _vbacompa { Reference< XModel > xModel( mxOwnerDocument ); // weak-ref -> ref Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW ); - xFactory->createInstance( OUString( "ooo.vba.VBAGlobals")); + xFactory->createInstance("ooo.vba.VBAGlobals"); } catch(const Exception& ) { diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 33fbc60c190e..635cccae173c 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -292,7 +292,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement { Reference< frame::XModel > xModel( mxOwnerDocument ); // weak-ref -> ref Reference< XMultiServiceFactory > xFactory( xModel, UNO_QUERY_THROW ); - xFactory->createInstance( OUString( "ooo.vba.VBAGlobals" ) ); + xFactory->createInstance("ooo.vba.VBAGlobals"); } catch(const Exception& ) { @@ -322,7 +322,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement { Reference<frame::XModel > xModel( mxOwnerDocument ); Reference< XMultiServiceFactory> xSF( xModel, UNO_QUERY_THROW ); - mxCodeNameAccess.set( xSF->createInstance( OUString("ooo.vba.VBAObjectModuleObjectProvider" ) ), UNO_QUERY ); + mxCodeNameAccess.set( xSF->createInstance("ooo.vba.VBAObjectModuleObjectProvider"), UNO_QUERY ); } catch(const Exception& ) {} @@ -699,7 +699,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, throw uno::RuntimeException(); } OUString aMime( "text/xml" ); - xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) ); + xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) ); // Set encryption key setStreamKey( xSourceStream, pLib->maPassword ); @@ -843,7 +843,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, throw uno::RuntimeException(); } OUString aMime( "text/xml" ); - xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) ); + xProps->setPropertyValue("MediaType", uno::makeAny( aMime ) ); Reference< XOutputStream > xOut = xSourceStream->getOutputStream(); Reference< XNameContainer > xLib( pLib ); diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx index be946383d975..b926dadf5523 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx @@ -281,7 +281,7 @@ extern "C" typelib_TypeClass cpp_vtable_call( OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!\n" ); if ( nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex ) { - throw RuntimeException( OUString("illegal vtable index!"), + throw RuntimeException("illegal vtable index!", reinterpret_cast<XInterface *>( pCppI ) ); } @@ -378,7 +378,7 @@ extern "C" typelib_TypeClass cpp_vtable_call( } default: { - throw RuntimeException( OUString("no member description found!"), + throw RuntimeException("no member description found!", reinterpret_cast<XInterface *>( pCppI ) ); } } diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx index ffdf38f92084..900798e0e27c 100644 --- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx @@ -281,7 +281,7 @@ extern "C" typelib_TypeClass cpp_vtable_call( OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!\n" ); if ( nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex ) { - throw RuntimeException( OUString("illegal vtable index!"), + throw RuntimeException("illegal vtable index!", reinterpret_cast<XInterface *>( pCppI ) ); } @@ -378,7 +378,7 @@ extern "C" typelib_TypeClass cpp_vtable_call( } default: { - throw RuntimeException( OUString("no member description found!"), + throw RuntimeException("no member description found!", reinterpret_cast<XInterface *>( pCppI ) ); } } diff --git a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx index af5c4a245ee4..456b44e73f3a 100644 --- a/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx @@ -245,7 +245,7 @@ static typelib_TypeClass cpp_mediate( "### illegal vtable index!" ); if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex) { - throw RuntimeException( OUString( "illegal vtable index!" ), (XInterface *)pCppI ); + throw RuntimeException("illegal vtable index!", (XInterface *)pCppI ); } // determine called method @@ -340,7 +340,7 @@ static typelib_TypeClass cpp_mediate( } default: { - throw RuntimeException(OUString( "no member description found!" ), (XInterface *)pCppI ); + throw RuntimeException("no member description found!", (XInterface *)pCppI ); } } return eRet; diff --git a/bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx index 39caf1a43214..7ba9b77660ea 100644 --- a/bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx @@ -281,7 +281,7 @@ extern "C" typelib_TypeClass cpp_vtable_call( OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!\n" ); if ( nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex ) { - throw RuntimeException( OUString("illegal vtable index!"), + throw RuntimeException("illegal vtable index!", reinterpret_cast<XInterface *>( pCppI ) ); } @@ -378,7 +378,7 @@ extern "C" typelib_TypeClass cpp_vtable_call( } default: { - throw RuntimeException( OUString("no member description found!"), + throw RuntimeException("no member description found!", reinterpret_cast<XInterface *>( pCppI ) ); } } diff --git a/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx b/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx index f9d220931000..038fd01b1e09 100644 --- a/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx +++ b/bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx @@ -246,7 +246,7 @@ static typelib_TypeClass __cdecl cpp_mediate( "### illegal vtable index!" ); if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex) { - throw RuntimeException( OUString("illegal vtable index!"), + throw RuntimeException("illegal vtable index!", (XInterface *)pThis ); } diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx index dadae1f64499..0a9a4d60045c 100644 --- a/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx @@ -242,7 +242,7 @@ extern "C" typelib_TypeClass cpp_vtable_call( OSL_ENSURE( nFunctionIndex < pTD->nMapFunctionIndexToMemberIndex, "### illegal vtable index!\n" ); if ( nFunctionIndex >= pTD->nMapFunctionIndexToMemberIndex ) - throw RuntimeException( OUString("Illegal vtable index!"), + throw RuntimeException("Illegal vtable index!", reinterpret_cast<XInterface *>( pCppI ) ); // Determine called method @@ -345,7 +345,7 @@ extern "C" typelib_TypeClass cpp_vtable_call( } default: { - throw RuntimeException( OUString("No member description found!"), + throw RuntimeException("No member description found!", reinterpret_cast<XInterface *>( pCppI ) ); } } diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx index 89ef16f16172..21e7979b34ff 100644 --- a/canvas/source/factory/cf_service.cxx +++ b/canvas/source/factory/cf_service.cxx @@ -180,11 +180,11 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) : if( xEntryNameAccess.is() ) { Sequence<OUString> implementationList; - if( (xEntryNameAccess->getByName( OUString("PreferredImplementations") ) >>= implementationList) ) + if( (xEntryNameAccess->getByName("PreferredImplementations") >>= implementationList) ) m_aAvailableImplementations.push_back( std::make_pair(*pCurr,implementationList) ); - if( (xEntryNameAccess->getByName( OUString("AcceleratedImplementations") ) >>= implementationList) ) + if( (xEntryNameAccess->getByName("AcceleratedImplementations") >>= implementationList) ) m_aAcceleratedImplementations.push_back( std::make_pair(*pCurr,implementationList) ); - if( (xEntryNameAccess->getByName( OUString("AntialiasingImplementations") ) >>= implementationList) ) + if( (xEntryNameAccess->getByName("AntialiasingImplementations") >>= implementationList) ) m_aAAImplementations.push_back( std::make_pair(*pCurr,implementationList) ); } diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 4671811d74c1..f838433b0dab 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -236,7 +236,7 @@ namespace sal_Int32 nResult = 0x000000; try { - xSceneProperties->getPropertyValue(OUString("D3DSceneAmbientColor")) >>= nResult; + xSceneProperties->getPropertyValue("D3DSceneAmbientColor") >>= nResult; } catch( const uno::Exception & ex ) { @@ -253,7 +253,7 @@ namespace { try { - xSceneProperties->setPropertyValue(OUString("D3DSceneAmbientColor"), + xSceneProperties->setPropertyValue("D3DSceneAmbientColor", uno::makeAny( rColor.GetColor())); } catch( const uno::Exception & ex ) 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 ) diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index f3bc92f9e174..82a1b29de8bb 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -463,7 +463,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool bLockFile ) // b) ... or we must get it from the given URL OUString sURL = getUnpackedValueOrDefault(MediaDescriptor::PROP_URL(), OUString()); if (sURL.isEmpty()) - throw css::uno::Exception( OUString( "Found no URL." ), + throw css::uno::Exception("Found no URL.", css::uno::Reference< css::uno::XInterface >()); // Parse URL! Only the main part has to be used further. E.g. a jumpmark can make trouble @@ -482,7 +482,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference throw(::com::sun::star::uno::RuntimeException) { if ( !_rxPostData.is() ) - throw css::lang::IllegalArgumentException( OUString( "Found invalid PostData." ), + throw css::lang::IllegalArgumentException("Found invalid PostData.", css::uno::Reference< css::uno::XInterface >(), 1); // PostData can't be used in read/write mode! @@ -642,7 +642,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, sal_Bool else { sal_Bool bRequestReadOnly = bReadOnly; - aContent.getPropertyValue( OUString( "IsReadOnly" ) ) >>= bReadOnly; + aContent.getPropertyValue("IsReadOnly") >>= bReadOnly; if ( bReadOnly && !bRequestReadOnly && bModeRequestedExplicitly ) return sal_False; // the document is explicitly requested with WRITEABLE mode } diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index 733bf2645873..68ef68ceda5f 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -273,10 +273,10 @@ sal_Bool MimeConfigurationHelper::GetVerbByShortcut( const OUString& aVerbShortc if ( xVerbsConfig.is() && ( xVerbsConfig->getByName( aVerbShortcut ) >>= xVerbsProps ) && xVerbsProps.is() ) { embed::VerbDescriptor aTempDescr; - if ( ( xVerbsProps->getByName( OUString( "VerbID" ) ) >>= aTempDescr.VerbID ) - && ( xVerbsProps->getByName( OUString( "VerbUIName" ) ) >>= aTempDescr.VerbName ) - && ( xVerbsProps->getByName( OUString( "VerbFlags" ) ) >>= aTempDescr.VerbFlags ) - && ( xVerbsProps->getByName( OUString( "VerbAttributes" ) ) >>= aTempDescr.VerbAttributes ) ) + if ( ( xVerbsProps->getByName("VerbID") >>= aTempDescr.VerbID ) + && ( xVerbsProps->getByName("VerbUIName") >>= aTempDescr.VerbName ) + && ( xVerbsProps->getByName("VerbFlags") >>= aTempDescr.VerbFlags ) + && ( xVerbsProps->getByName("VerbAttributes") >>= aTempDescr.VerbAttributes ) ) { aDescriptor = aTempDescr; bResult = sal_True; @@ -467,7 +467,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu OUString aEntryDocName; if ( ( xObjConfig->getByName( aClassIDs[nInd] ) >>= xObjectProps ) && xObjectProps.is() - && ( xObjectProps->getByName( OUString( "ObjectDocumentServiceName" ) ) >>= aEntryDocName ) + && ( xObjectProps->getByName("ObjectDocumentServiceName") >>= aEntryDocName ) && aEntryDocName == aDocName ) { return GetObjPropsFromConfigEntry( GetSequenceClassIDRepresentation( aClassIDs[nInd] ), @@ -501,7 +501,7 @@ OUString MimeConfigurationHelper::GetFactoryNameByStringClassID( const OUString& try { if ( xObjConfig.is() && ( xObjConfig->getByName( aStringClassID.toAsciiUpperCase() ) >>= xObjectProps ) && xObjectProps.is() ) - xObjectProps->getByName( OUString( "ObjectFactory" ) ) >>= aResult; + xObjectProps->getByName("ObjectFactory") >>= aResult; } catch( uno::Exception& ) { @@ -537,7 +537,7 @@ OUString MimeConfigurationHelper::GetFactoryNameByDocumentName( const OUString& OUString( "ObjectDocumentServiceName" ) ) >>= aEntryDocName ) && aEntryDocName == aDocName ) { - xObjectProps->getByName( OUString( "ObjectFactory" ) ) >>= aResult; + xObjectProps->getByName("ObjectFactory") >>= aResult; break; } } @@ -851,7 +851,7 @@ uno::Sequence< beans::PropertyValue > MimeConfigurationHelper::SearchForFilter( if ( xFilterEnum->nextElement() >>= aProps ) { SequenceAsHashMap aPropsHM( aProps ); - sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( OUString("Flags"), + sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault("Flags", (sal_Int32)0 ); if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) ) { diff --git a/comphelper/source/misc/numberedcollection.cxx b/comphelper/source/misc/numberedcollection.cxx index 2f3e357f0167..50255eebb523 100644 --- a/comphelper/source/misc/numberedcollection.cxx +++ b/comphelper/source/misc/numberedcollection.cxx @@ -109,7 +109,7 @@ void SAL_CALL NumberedCollection::releaseNumber(::sal_Int32 nNumber) ::osl::ResettableMutexGuard aLock(m_aMutex); if (nNumber == css::frame::UntitledNumbersConst::INVALID_NUMBER) - throw css::lang::IllegalArgumentException (OUString("Special valkud INVALID_NUMBER not allowed as input parameter."), m_xOwner.get(), 1); + throw css::lang::IllegalArgumentException ("Special valkud INVALID_NUMBER not allowed as input parameter.", m_xOwner.get(), 1); TDeadItemList lDeadItems; TNumberedItemHash::iterator pComponent; diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx index 8bd744f77946..569d492d1049 100644 --- a/comphelper/source/misc/numbers.cxx +++ b/comphelper/source/misc/numbers.cxx @@ -42,7 +42,7 @@ sal_Int16 getNumberFormatType(const staruno::Reference<starutil::XNumberFormats> { staruno::Reference<starbeans::XPropertySet> xFormat(xFormats->getByKey(nKey)); if (xFormat.is()) - xFormat->getPropertyValue(OUString( "Type" )) >>= nReturn; + xFormat->getPropertyValue("Type") >>= nReturn; } catch(...) { diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index d9077ab882f6..1b371487ad31 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -231,7 +231,7 @@ sal_Int32 OStorageHelper::GetXStorageFormat( uno::Reference< beans::XPropertySet > xStorProps( xStorage, uno::UNO_QUERY_THROW ); OUString aMediaType; - xStorProps->getPropertyValue( OUString( "MediaType" ) ) >>= aMediaType; + xStorProps->getPropertyValue("MediaType") >>= aMediaType; sal_Int32 nResult = 0; diff --git a/comphelper/source/processfactory/processfactory.cxx b/comphelper/source/processfactory/processfactory.cxx index 5690cc005477..a193a6eb897a 100644 --- a/comphelper/source/processfactory/processfactory.cxx +++ b/comphelper/source/processfactory/processfactory.cxx @@ -74,7 +74,7 @@ Reference< XComponentContext > getComponentContext( uno::Reference<beans::XPropertySet> const xProps( factory, uno::UNO_QUERY ); if (xProps.is()) { try { - xRet.set( xProps->getPropertyValue( OUString("DefaultContext") ), + xRet.set( xProps->getPropertyValue("DefaultContext"), uno::UNO_QUERY ); } catch (beans::UnknownPropertyException & e) { diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 572715e334d1..906e62e513d3 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -147,7 +147,7 @@ void SAL_CALL UNOMemoryStream::closeInput() throw (NotConnectedException, IOExce void SAL_CALL UNOMemoryStream::seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException) { if( (location < 0) || (location > SAL_MAX_INT32) ) - throw IllegalArgumentException( OUString("this implementation does not support more than 2GB!"), Reference< XInterface >(static_cast<OWeakObject*>(this)), 0 ); + throw IllegalArgumentException("this implementation does not support more than 2GB!", Reference< XInterface >(static_cast<OWeakObject*>(this)), 0 ); // seek operation should be able to resize the stream if ( location > static_cast< sal_Int64 >( maData.size() ) ) @@ -179,7 +179,7 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) t if( nNewSize > SAL_MAX_INT32 ) { OSL_ASSERT(false); - throw IOException( OUString("this implementation does not support more than 2GB!"), Reference< XInterface >(static_cast<OWeakObject*>(this)) ); + throw IOException("this implementation does not support more than 2GB!", Reference< XInterface >(static_cast<OWeakObject*>(this)) ); } if( static_cast< sal_Int32 >( nNewSize ) > static_cast< sal_Int32 >( maData.size() ) ) diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 9746196d0336..8ccf9d050fdc 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -219,7 +219,7 @@ Date DBTypeConversion::getNULLDate(const Reference< XNumberFormatsSupplier > &xS { // get the null date Date aDate; - xSupplier->getNumberFormatSettings()->getPropertyValue(OUString("NullDate")) >>= aDate; + xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= aDate; return aDate; } catch ( const Exception& ) @@ -459,7 +459,7 @@ OUString DBTypeConversion::getFormattedValue(const Reference<XColumn>& xVariant, { Reference< XNumberFormatsSupplier > xSupplier( xFormatter->getNumberFormatsSupplier(), UNO_SET_THROW ); Reference< XPropertySet > xFormatterSettings( xSupplier->getNumberFormatSettings(), UNO_SET_THROW ); - OSL_VERIFY( xFormatterSettings->getPropertyValue( OUString( "NullDate" ) ) >>= aFormatterNullDate ); + OSL_VERIFY( xFormatterSettings->getPropertyValue("NullDate") >>= aFormatterNullDate ); } catch( const Exception& ) { diff --git a/connectivity/source/commontools/ParamterSubstitution.cxx b/connectivity/source/commontools/ParamterSubstitution.cxx index 15ad7c9ad9ea..e628a6349d93 100644 --- a/connectivity/source/commontools/ParamterSubstitution.cxx +++ b/connectivity/source/commontools/ParamterSubstitution.cxx @@ -35,7 +35,7 @@ namespace connectivity ::osl::MutexGuard aGuard(m_aMutex); comphelper::SequenceAsHashMap aArgs(_aArguments); uno::Reference< sdbc::XConnection > xConnection; - xConnection = aArgs.getUnpackedValueOrDefault(OUString("ActiveConnection"),xConnection); + xConnection = aArgs.getUnpackedValueOrDefault("ActiveConnection",xConnection); m_xConnection = xConnection; } //------------------------------------------------------------------------------ diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx index 9918cf15839a..afcebaa37333 100644 --- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx +++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx @@ -90,7 +90,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ Reference< XRow > xRow(xRet,UNO_QUERY); ::comphelper::SequenceAsHashMap aMap(m_aConnectionInfo); Sequence< Any > aTypeInfoSettings; - aTypeInfoSettings = aMap.getUnpackedValueOrDefault(OUString("TypeInfoSettings"),aTypeInfoSettings); + aTypeInfoSettings = aMap.getUnpackedValueOrDefault("TypeInfoSettings",aTypeInfoSettings); if ( xRow.is() ) { diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index 788fc88dd0a5..86527aa6ea98 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -141,7 +141,7 @@ namespace dbtools { Reference< XPropertySet > xDataSource( xConnectionAsChild->getParent(), UNO_QUERY_THROW ); Reference< XPropertySet > xDataSourceSettings( - xDataSource->getPropertyValue( OUString( "Settings" ) ), + xDataSource->getPropertyValue("Settings"), UNO_QUERY_THROW ); _out_setting = xDataSourceSettings->getPropertyValue( OUString::createFromAscii( _asciiName ) ); diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index c80fb1f46295..1ea9b14bdc5d 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -133,10 +133,10 @@ sal_Int32 getDefaultNumberFormat(const Reference< XPropertySet >& _xColumn, try { // determine the datatype of the column - _xColumn->getPropertyValue(OUString("Type")) >>= nDataType; + _xColumn->getPropertyValue("Type") >>= nDataType; if (DataType::NUMERIC == nDataType || DataType::DECIMAL == nDataType) - _xColumn->getPropertyValue(OUString("Scale")) >>= nScale; + _xColumn->getPropertyValue("Scale") >>= nScale; } catch (Exception&) { @@ -144,7 +144,7 @@ sal_Int32 getDefaultNumberFormat(const Reference< XPropertySet >& _xColumn, } return getDefaultNumberFormat(nDataType, nScale, - ::cppu::any2bool(_xColumn->getPropertyValue(OUString("IsCurrency"))), + ::cppu::any2bool(_xColumn->getPropertyValue("IsCurrency")), _xTypes, _rLocale); } @@ -295,8 +295,8 @@ Reference< XConnection > getConnection_allowException( try { xProp->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPwd; - bPwdReq = ::cppu::any2bool(xProp->getPropertyValue(OUString("IsPasswordRequired"))); - xProp->getPropertyValue(OUString("User")) >>= sUser; + bPwdReq = ::cppu::any2bool(xProp->getPropertyValue("IsPasswordRequired")); + xProp->getPropertyValue("User") >>= sUser; } catch(Exception&) { @@ -349,7 +349,7 @@ Reference< XConnection> getConnection(const Reference< XRowSet>& _rxRowSet) thro Reference< XConnection> xReturn; Reference< XPropertySet> xRowSetProps(_rxRowSet, UNO_QUERY); if (xRowSetProps.is()) - xRowSetProps->getPropertyValue(OUString("ActiveConnection")) >>= xReturn; + xRowSetProps->getPropertyValue("ActiveConnection") >>= xReturn; return xReturn; } @@ -371,7 +371,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R // 1. already connected? Reference< XConnection > xExistingConn( - xRowSetProps->getPropertyValue( OUString( "ActiveConnection" ) ), + xRowSetProps->getPropertyValue("ActiveConnection"), UNO_QUERY ); if ( xExistingConn.is() @@ -383,7 +383,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R { if ( _bSetAsActiveConnection ) { - xRowSetProps->setPropertyValue( OUString( "ActiveConnection" ), makeAny( xExistingConn ) ); + xRowSetProps->setPropertyValue("ActiveConnection", makeAny( xExistingConn ) ); // no auto disposer needed, since we did not create the connection } @@ -395,9 +395,9 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R const OUString sUserProp( "User" ); OUString sDataSourceName; - xRowSetProps->getPropertyValue(OUString("DataSourceName")) >>= sDataSourceName; + xRowSetProps->getPropertyValue("DataSourceName") >>= sDataSourceName; OUString sURL; - xRowSetProps->getPropertyValue(OUString("URL")) >>= sURL; + xRowSetProps->getPropertyValue("URL") >>= sURL; Reference< XConnection > xPureConnection; if (!sDataSourceName.isEmpty()) @@ -672,7 +672,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect if ( xComposerFac.is() ) { - Reference< XSingleSelectQueryComposer > xComposer(xComposerFac->createInstance( OUString("com.sun.star.sdb.SingleSelectQueryComposer")),UNO_QUERY); + Reference< XSingleSelectQueryComposer > xComposer(xComposerFac->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"),UNO_QUERY); if ( xComposer.is() ) { xComposer->setQuery( sStatementToExecute ); @@ -1235,19 +1235,19 @@ catch(const Exception&) //------------------------------------------------------------------------------ sal_Bool canInsert(const Reference< XPropertySet>& _rxCursorSet) { - return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(OUString("Privileges"))) & Privilege::INSERT) != 0)); + return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::INSERT) != 0)); } //------------------------------------------------------------------------------ sal_Bool canUpdate(const Reference< XPropertySet>& _rxCursorSet) { - return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(OUString("Privileges"))) & Privilege::UPDATE) != 0)); + return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::UPDATE) != 0)); } //------------------------------------------------------------------------------ sal_Bool canDelete(const Reference< XPropertySet>& _rxCursorSet) { - return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue(OUString("Privileges"))) & Privilege::DELETE) != 0)); + return ((_rxCursorSet.is() && (getINT32(_rxCursorSet->getPropertyValue("Privileges")) & Privilege::DELETE) != 0)); } // ----------------------------------------------------------------------------- Reference< XDataSource> findDataSource(const Reference< XInterface >& _xParent) @@ -1284,19 +1284,19 @@ Reference< XSingleSelectQueryComposer > getComposedRowSetStatement( const Refere OUString sCommand; sal_Bool bEscapeProcessing = sal_False; - OSL_VERIFY( _rxRowSet->getPropertyValue( OUString( "CommandType" ) ) >>= nCommandType ); - OSL_VERIFY( _rxRowSet->getPropertyValue( OUString( "Command" ) ) >>= sCommand ); - OSL_VERIFY( _rxRowSet->getPropertyValue( OUString( "EscapeProcessing" ) ) >>= bEscapeProcessing ); + OSL_VERIFY( _rxRowSet->getPropertyValue("CommandType") >>= nCommandType ); + OSL_VERIFY( _rxRowSet->getPropertyValue("Command") >>= sCommand ); + OSL_VERIFY( _rxRowSet->getPropertyValue("EscapeProcessing") >>= bEscapeProcessing ); StatementComposer aComposer( xConn, sCommand, nCommandType, bEscapeProcessing ); // append sort - aComposer.setOrder( getString( _rxRowSet->getPropertyValue( OUString( "Order" ) ) ) ); + aComposer.setOrder( getString( _rxRowSet->getPropertyValue("Order") ) ); // append filter sal_Bool bApplyFilter = sal_True; - _rxRowSet->getPropertyValue( OUString( "ApplyFilter" ) ) >>= bApplyFilter; + _rxRowSet->getPropertyValue("ApplyFilter") >>= bApplyFilter; if ( bApplyFilter ) - aComposer.setFilter( getString( _rxRowSet->getPropertyValue( OUString( "Filter" ) ) ) ); + aComposer.setFilter( getString( _rxRowSet->getPropertyValue("Filter") ) ); aComposer.getQuery(); diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index 23b4f53b2036..bf9fad695f08 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -563,7 +563,7 @@ bool getBooleanDataSourceSetting( const Reference< XConnection >& _rxConnection, if ( xDataSourceProperties.is() ) { Reference< XPropertySet > xSettings( - xDataSourceProperties->getPropertyValue( OUString( "Settings") ), + xDataSourceProperties->getPropertyValue("Settings"), UNO_QUERY_THROW ); OSL_VERIFY( xSettings->getPropertyValue( OUString::createFromAscii( _pAsciiSettingName ) ) >>= bValue ); @@ -587,7 +587,7 @@ bool getDataSourceSetting( const Reference< XInterface >& _xChild, const OUStrin return false; const Reference< XPropertySet > xSettings( - xDataSourceProperties->getPropertyValue( OUString( "Settings") ), + xDataSourceProperties->getPropertyValue("Settings"), UNO_QUERY_THROW ); @@ -617,7 +617,7 @@ sal_Bool isDataSourcePropertyEnabled(const Reference<XInterface>& _xProp,const O if ( xProp.is() ) { Sequence< PropertyValue > aInfo; - xProp->getPropertyValue(OUString("Info")) >>= aInfo; + xProp->getPropertyValue("Info") >>= aInfo; const PropertyValue* pValue =::std::find_if(aInfo.getConstArray(), aInfo.getConstArray() + aInfo.getLength(), ::std::bind2nd(TPropertyValueEqualFunctor(),_sProperty)); diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx index 625872fa22c3..820c57ee1d14 100644 --- a/connectivity/source/commontools/formattedcolumnvalue.cxx +++ b/connectivity/source/commontools/formattedcolumnvalue.cxx @@ -129,7 +129,7 @@ namespace dbtools _rData.m_xColumnUpdate.set( _rxColumn, UNO_QUERY ); // determine the field type, and whether it's a numeric field - OSL_VERIFY( _rxColumn->getPropertyValue( OUString( "Type" ) ) >>= _rData.m_nFieldType ); + OSL_VERIFY( _rxColumn->getPropertyValue("Type") >>= _rData.m_nFieldType ); switch ( _rData.m_nFieldType ) { @@ -172,7 +172,7 @@ namespace dbtools // some more formatter settings _rData.m_nKeyType = ::comphelper::getNumberFormatType( xNumberFormatsSupp->getNumberFormats(), _rData.m_nFormatKey ); Reference< XPropertySet > xFormatSettings( xNumberFormatsSupp->getNumberFormatSettings(), UNO_QUERY_THROW ); - OSL_VERIFY( xFormatSettings->getPropertyValue( OUString( "NullDate" ) ) >>= _rData.m_aNullDate ); + OSL_VERIFY( xFormatSettings->getPropertyValue("NullDate") >>= _rData.m_aNullDate ); // remember the formatter _rData.m_xFormatter = i_rNumberFormatter; diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx index bcf49827364c..f928945c5811 100644 --- a/connectivity/source/commontools/paramwrapper.cxx +++ b/connectivity/source/commontools/paramwrapper.cxx @@ -185,11 +185,11 @@ namespace param { // TODO : aParamType & nScale can be obtained within the constructor .... sal_Int32 nParamType = DataType::VARCHAR; - OSL_VERIFY( m_xDelegator->getPropertyValue( OUString( "Type" ) ) >>= nParamType ); + OSL_VERIFY( m_xDelegator->getPropertyValue("Type") >>= nParamType ); sal_Int32 nScale = 0; - if ( m_xDelegatorPSI->hasPropertyByName( OUString( "Scale" ) ) ) - OSL_VERIFY( m_xDelegator->getPropertyValue( OUString( "Scale" ) ) >>= nScale ); + if ( m_xDelegatorPSI->hasPropertyByName("Scale") ) + OSL_VERIFY( m_xDelegator->getPropertyValue("Scale") >>= nScale ); if ( m_xValueDestination.is() ) { diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx index bf8092fe5c24..82d170266684 100644 --- a/connectivity/source/commontools/predicateinput.cxx +++ b/connectivity/source/commontools/predicateinput.cxx @@ -140,7 +140,7 @@ namespace dbtools if ( !pReturn ) { // is it a text field ? sal_Int32 nType = DataType::OTHER; - _rxField->getPropertyValue( OUString( "Type" ) ) >>= nType; + _rxField->getPropertyValue("Type") >>= nType; if ( ( DataType::CHAR == nType ) || ( DataType::VARCHAR == nType ) @@ -199,10 +199,10 @@ namespace dbtools try { Reference< XPropertySetInfo > xPSI( _rxField->getPropertySetInfo() ); - if ( xPSI.is() && xPSI->hasPropertyByName( OUString( "FormatKey" ) ) ) + if ( xPSI.is() && xPSI->hasPropertyByName("FormatKey") ) { sal_Int32 nFormatKey = 0; - _rxField->getPropertyValue( OUString( "FormatKey" ) ) >>= nFormatKey; + _rxField->getPropertyValue("FormatKey") >>= nFormatKey; if ( nFormatKey && m_xFormatter.is() ) { Locale aFormatLocale; diff --git a/connectivity/source/commontools/statementcomposer.cxx b/connectivity/source/commontools/statementcomposer.cxx index 0954fd02de9f..51b492c8b8bd 100644 --- a/connectivity/source/commontools/statementcomposer.cxx +++ b/connectivity/source/commontools/statementcomposer.cxx @@ -148,12 +148,12 @@ namespace dbtools // a native query ? sal_Bool bQueryEscapeProcessing = sal_False; - xQuery->getPropertyValue( OUString( "EscapeProcessing" ) ) >>= bQueryEscapeProcessing; + xQuery->getPropertyValue("EscapeProcessing") >>= bQueryEscapeProcessing; if ( !bQueryEscapeProcessing ) break; // the command used by the query - xQuery->getPropertyValue( OUString( "Command" ) ) >>= sStatement; + xQuery->getPropertyValue("Command") >>= sStatement; if ( sStatement.isEmpty() ) break; @@ -161,7 +161,7 @@ namespace dbtools Reference< XMultiServiceFactory > xFactory( _rData.xConnection, UNO_QUERY_THROW ); ::utl::SharedUNOComponent< XSingleSelectQueryComposer > xComposer; xComposer.set( - xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), + xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY_THROW ); @@ -188,7 +188,7 @@ namespace dbtools if ( bApplyFilter ) { OUString sFilter; - OSL_VERIFY( xQuery->getPropertyValue( OUString( "Filter" ) ) >>= sFilter ); + OSL_VERIFY( xQuery->getPropertyValue("Filter") >>= sFilter ); xComposer->setFilter( sFilter ); } @@ -206,7 +206,7 @@ namespace dbtools { // create an composer Reference< XMultiServiceFactory > xFactory( _rData.xConnection, UNO_QUERY_THROW ); - Reference< XSingleSelectQueryComposer > xComposer( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), + Reference< XSingleSelectQueryComposer > xComposer( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY_THROW ); xComposer->setElementaryQuery( sStatement ); diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index 71cb3e4d442d..d956fde6d165 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -295,7 +295,7 @@ static sal_Bool lcl_IsEmptyOrHidden( const Reference<XSpreadsheets>& xSheets, co if (xProp.is()) { sal_Bool bVisible = sal_Bool(); - Any aVisAny = xProp->getPropertyValue( OUString("IsVisible") ); + Any aVisAny = xProp->getPropertyValue("IsVisible"); if ( aVisAny >>= bVisible ) if (!bVisible) return sal_True; // hidden @@ -338,7 +338,7 @@ static sal_Bool lcl_IsUnnamed( const Reference<XDatabaseRanges>& xRanges, const { try { - Any aUserAny = xRangeProp->getPropertyValue( OUString("IsUserDefined") ); + Any aUserAny = xRangeProp->getPropertyValue("IsUserDefined"); sal_Bool bUserDefined = sal_Bool(); if ( aUserAny >>= bUserDefined ) bUnnamed = !bUserDefined; @@ -423,7 +423,7 @@ Reference< XResultSet > SAL_CALL OCalcDatabaseMetaData::getTables( Reference<XPropertySet> xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { - Any aRangesAny = xDocProp->getPropertyValue( OUString("DatabaseRanges") ); + Any aRangesAny = xDocProp->getPropertyValue("DatabaseRanges"); Reference<XDatabaseRanges> xRanges; if ( aRangesAny >>= xRanges ) { diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 2809c857320f..93e4166580a0 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -569,7 +569,7 @@ void OCalcTable::construct() Reference<XPropertySet> xDocProp( xDoc, UNO_QUERY ); if ( xDocProp.is() ) { - Reference<XDatabaseRanges> xRanges(xDocProp->getPropertyValue( OUString("DatabaseRanges") ),UNO_QUERY); + Reference<XDatabaseRanges> xRanges(xDocProp->getPropertyValue("DatabaseRanges"),UNO_QUERY); if ( xRanges.is() && xRanges->hasByName( m_Name ) ) { @@ -583,7 +583,7 @@ void OCalcTable::construct() sal_Bool bRangeHeader = sal_True; Reference<XPropertySet> xFiltProp( xDBRange->getFilterDescriptor(), UNO_QUERY ); if ( xFiltProp.is() ) - xFiltProp->getPropertyValue(OUString("ContainsHeader")) >>= bRangeHeader; + xFiltProp->getPropertyValue("ContainsHeader") >>= bRangeHeader; Reference<XSheetCellRange> xSheetRange( xRefer->getReferredCells(), UNO_QUERY ); Reference<XCellRangeAddressable> xAddr( xSheetRange, UNO_QUERY ); @@ -617,7 +617,7 @@ void OCalcTable::construct() if (xProp.is()) { ::com::sun::star::util::Date aDateStruct; - if ( xProp->getPropertyValue( OUString("NullDate") ) >>= aDateStruct ) + if ( xProp->getPropertyValue("NullDate") >>= aDateStruct ) m_aNullDate = ::Date( aDateStruct.Day, aDateStruct.Month, aDateStruct.Year ); } } diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 506b016d907c..b2788e6107c1 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -438,7 +438,7 @@ void OFlatTable::construct() m_xNumberFormatter.set( NumberFormatter::create( m_pConnection->getDriver()->getComponentContext()), UNO_QUERY_THROW); m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier); Reference<XPropertySet> xProp(xSupplier->getNumberFormatSettings(),UNO_QUERY); - xProp->getPropertyValue(OUString("NullDate")) >>= m_aNullDate; + xProp->getPropertyValue("NullDate") >>= m_aNullDate; INetURLObject aURL; aURL.SetURL(getEntry()); diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index d296773404b8..251a8526aa34 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -323,7 +323,7 @@ namespace connectivity if ( xProp.is() ) { sal_Int32 nMode = 0; - xProp->getPropertyValue(OUString("OpenMode")) >>= nMode; + xProp->getPropertyValue("OpenMode") >>= nMode; if ( (nMode & ElementModes::WRITE) != ElementModes::WRITE ) { aProperties.put( "readonly", OUString( "true" ) ); @@ -853,7 +853,7 @@ namespace connectivity //......................................................... // ask for the system locale setting if ( xNode.is() ) - xNode->getPropertyValue( OUString( "ooSetupSystemLocale" ) ) >>= sLocaleString; + xNode->getPropertyValue("ooSetupSystemLocale") >>= sLocaleString; } catch( const Exception& ) { diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx index 44b946d1ea63..12faa6a34f67 100644 --- a/connectivity/source/drivers/kab/KDriver.cxx +++ b/connectivity/source/drivers/kab/KDriver.cxx @@ -194,7 +194,7 @@ bool KabImplModule::impl_doAllowNewKDEVersion() UNO_QUERY_THROW ); sal_Bool bDisableCheck = sal_False; - xSettings->getPropertyValue( OUString( "DisableKDEMaximumVersionCheck" ) ) >>= bDisableCheck; + xSettings->getPropertyValue("DisableKDEMaximumVersionCheck") >>= bDisableCheck; return bDisableCheck != sal_False; } diff --git a/connectivity/source/drivers/mozab/MColumnAlias.cxx b/connectivity/source/drivers/mozab/MColumnAlias.cxx index cad5f7ed77ff..df9254b3d6fc 100644 --- a/connectivity/source/drivers/mozab/MColumnAlias.cxx +++ b/connectivity/source/drivers/mozab/MColumnAlias.cxx @@ -100,7 +100,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su { //............................................................. Reference< XNameAccess > xAliasesNode; - xDriverNode->getPropertyValue( OUString("ColumnAliases") ) >>= xAliasesNode; + xDriverNode->getPropertyValue("ColumnAliases") >>= xAliasesNode; OSL_ENSURE( xAliasesNode.is(), "OColumnAlias::setAlias: missing the aliases node!" ); // this is a set of string nodes diff --git a/connectivity/source/drivers/mozab/MConfigAccess.cxx b/connectivity/source/drivers/mozab/MConfigAccess.cxx index 2fabd5f97f90..dd4281a81bb5 100644 --- a/connectivity/source/drivers/mozab/MConfigAccess.cxx +++ b/connectivity/source/drivers/mozab/MConfigAccess.cxx @@ -125,10 +125,10 @@ namespace connectivity Reference< XPropertySet > xDriverNode = createDriverConfigNode( xFactory ); Reference< XPropertySet > xMozPrefsNode; if ( xDriverNode.is() ) - xDriverNode->getPropertyValue( OUString("MozillaPreferences" ) ) >>= xMozPrefsNode; + xDriverNode->getPropertyValue("MozillaPreferences") >>= xMozPrefsNode; OSL_ENSURE( xMozPrefsNode.is(), "getPreferredProfileName: could not access the node for the mozilla preferences!" ); if ( xMozPrefsNode.is() ) - xMozPrefsNode->getPropertyValue( OUString("ProfileName" ) ) >>= sPreferredName; + xMozPrefsNode->getPropertyValue("ProfileName") >>= sPreferredName; if ( xMozPrefsNode.is() ) xMozPrefsNode->getPropertyValue( OUString::createFromAscii(sNode) ) >>= sDescription; if (sDescription.getLength() == 0) @@ -157,10 +157,10 @@ namespace connectivity Reference< XPropertySet > xDriverNode = createDriverConfigNode( xFactory ); Reference< XPropertySet > xMozPrefsNode; if ( xDriverNode.is() ) - xDriverNode->getPropertyValue( OUString("MozillaPreferences" ) ) >>= xMozPrefsNode; + xDriverNode->getPropertyValue("MozillaPreferences") >>= xMozPrefsNode; OSL_ENSURE( xMozPrefsNode.is(), "getPreferredProfileName: could not access the node for the mozilla preferences!" ); if ( xMozPrefsNode.is() ) - xMozPrefsNode->getPropertyValue( OUString("ProfileName" ) ) >>= sPreferredName; + xMozPrefsNode->getPropertyValue("ProfileName") >>= sPreferredName; } catch( const Exception& ) { diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index 1e56e719ad12..f7384cc18807 100644 --- a/connectivity/source/drivers/mozab/MDriver.cxx +++ b/connectivity/source/drivers/mozab/MDriver.cxx @@ -134,7 +134,7 @@ Reference< XConnection > SAL_CALL MozabDriver::connect( const OUString& url, con { ::osl::MutexGuard aGuard(m_aMutex); //We must make sure we create an com.sun.star.mozilla.MozillaBootstrap brfore call any mozilla codes - Reference<XInterface> xInstance = m_xMSFactory->createInstance(OUString( "com.sun.star.mozilla.MozillaBootstrap") ); + Reference<XInterface> xInstance = m_xMSFactory->createInstance("com.sun.star.mozilla.MozillaBootstrap"); OSL_ENSURE( xInstance.is(), "failed to create instance" ); OConnection* pCon = reinterpret_cast<OConnection*>((*m_pCreationFunc)(this)); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx index 9e91043dd41a..6248f7c8da92 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx @@ -61,7 +61,7 @@ nsProfile::nsProfile() Reference<XMultiServiceFactory> xFactory = ::comphelper::getProcessServiceFactory(); OSL_ENSURE( xFactory.is(), "can't get service factory" ); - Reference<XInterface> xInstance = xFactory->createInstance(OUString("com.sun.star.mozilla.MozillaBootstrap") ); + Reference<XInterface> xInstance = xFactory->createInstance("com.sun.star.mozilla.MozillaBootstrap"); OSL_ENSURE( xInstance.is(), "failed to create instance" ); xMozillaBootstrap = Reference<XMozillaBootstrap>(xInstance,UNO_QUERY); diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx index 35e625d53898..087d541e3441 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx @@ -108,7 +108,7 @@ MDatabaseMetaDataHelper::~MDatabaseMetaDataHelper() Reference<XMultiServiceFactory> xFactory = ::comphelper::getProcessServiceFactory(); OSL_ENSURE( xFactory.is(), "can't get service factory" ); - Reference<XInterface> xInstance = xFactory->createInstance(OUString("com.sun.star.mozilla.MozillaBootstrap") ); + Reference<XInterface> xInstance = xFactory->createInstance("com.sun.star.mozilla.MozillaBootstrap"); OSL_ENSURE( xInstance.is(), "failed to create instance" ); xMozillaBootstrap = Reference<XMozillaBootstrap>(xInstance,UNO_QUERY); m_bProfileExists = xMozillaBootstrap->shutdownProfile() > 0; @@ -550,7 +550,7 @@ sal_Bool MDatabaseMetaDataHelper::getTableStrings( OConnection* Reference<XMozillaBootstrap> xMozillaBootstrap; Reference<XMultiServiceFactory> xFactory = ::comphelper::getProcessServiceFactory(); OSL_ENSURE( xFactory.is(), "can't get service factory" ); - Reference<XInterface> xInstance = xFactory->createInstance(OUString("com.sun.star.mozilla.MozillaBootstrap") ); + Reference<XInterface> xInstance = xFactory->createInstance("com.sun.star.mozilla.MozillaBootstrap"); OSL_ENSURE( xInstance.is(), "failed to create instance" ); xMozillaBootstrap = Reference<XMozillaBootstrap>(xInstance,UNO_QUERY); m_bProfileExists = sal_False; diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx index b086571a2e1b..a7783c956df9 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx @@ -80,7 +80,7 @@ sal_Int32 MNSMozabProxy::StartProxy(RunArgs * args,::com::sun::star::mozilla::Mo { Reference<XMultiServiceFactory> xFactory = ::comphelper::getProcessServiceFactory(); OSL_ENSURE( xFactory.is(), "can't get service factory" ); - ::com::sun::star::uno::Reference<XInterface> xInstance = xFactory->createInstance(OUString("com.sun.star.mozilla.MozillaBootstrap") ); + ::com::sun::star::uno::Reference<XInterface> xInstance = xFactory->createInstance("com.sun.star.mozilla.MozillaBootstrap"); OSL_ENSURE( xInstance.is(), "failed to create instance" ); xRunner = ::com::sun::star::uno::Reference< ::com::sun::star::mozilla::XProxyRunner >(xInstance,UNO_QUERY); } diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx index 4be34d8f9cba..fb274ccccaea 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx @@ -301,7 +301,7 @@ sal_Bool isProfileLocked(OConnection* _pCon) ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); OSL_ENSURE( xFactory.is(), "can't get service factory" ); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInstance = xFactory->createInstance(OUString("com.sun.star.mozilla.MozillaBootstrap") ); + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInstance = xFactory->createInstance("com.sun.star.mozilla.MozillaBootstrap"); OSL_ENSURE( xInstance.is(), "failed to create instance" ); xMozillaBootstrap = ::com::sun::star::uno::Reference< ::com::sun::star::mozilla::XMozillaBootstrap >(xInstance,::com::sun::star::uno::UNO_QUERY); if (_pCon) diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx index c5eca28f922d..e085bcb236a8 100644 --- a/connectivity/source/drivers/postgresql/pq_connection.cxx +++ b/connectivity/source/drivers/postgresql/pq_connection.cxx @@ -585,7 +585,7 @@ void Connection::initialize( const Sequence< Any >& aArguments ) m_settings.pConnection = PQconnectdbParams( keywords.c_array(), values.c_array(), 0 ); } if( ! m_settings.pConnection ) - throw RuntimeException( OUString( "pq_driver: out of memory" ), + throw RuntimeException("pq_driver: out of memory", Reference< XInterface > () ); if( PQstatus( m_settings.pConnection ) == CONNECTION_BAD ) { diff --git a/connectivity/workben/little/main.cxx b/connectivity/workben/little/main.cxx index d8d00fc6d1d1..dbfd24857875 100644 --- a/connectivity/workben/little/main.cxx +++ b/connectivity/workben/little/main.cxx @@ -58,7 +58,7 @@ void _cdecl main( int argc, char * argv[] ) if(!xFac.is()) return; - m_xDriver = Reference<XDriver>(xFac->createInstance(OUString("com.sun.star.sdbc.driver.dbase.Driver")),UNO_QUERY); + m_xDriver = Reference<XDriver>(xFac->createInstance("com.sun.star.sdbc.driver.dbase.Driver"),UNO_QUERY); if(m_xDriver.is()) { diff --git a/connectivity/workben/testmoz/main.cxx b/connectivity/workben/testmoz/main.cxx index a5d251c1756e..87d6854200f3 100644 --- a/connectivity/workben/testmoz/main.cxx +++ b/connectivity/workben/testmoz/main.cxx @@ -252,10 +252,10 @@ Reference< XMultiServiceFactory > InitializeFac( void ) // Create unconfigured Ucb: Reference< XUniversalContentBroker > xUcb - ( xSMgr->createInstance( OUString("com.sun.star.ucb.UniversalContentBroker") ), UNO_QUERY_THROW ); + ( xSMgr->createInstance("com.sun.star.ucb.UniversalContentBroker"), UNO_QUERY_THROW ); Reference< XContentProvider > xFileProvider - ( xSMgr->createInstance( OUString("com.sun.star.ucb.FileContentProvider") ), UNO_QUERY_THROW ); + ( xSMgr->createInstance("com.sun.star.ucb.FileContentProvider"), UNO_QUERY_THROW ); xUcb->registerContentProvider( xFileProvider, OUString("file"), sal_True ); return xSMgr; diff --git a/cppuhelper/test/testpropshlp.cxx b/cppuhelper/test/testpropshlp.cxx index c67c1ecbf43e..b7a30a8288dd 100644 --- a/cppuhelper/test/testpropshlp.cxx +++ b/cppuhelper/test/testpropshlp.cxx @@ -220,7 +220,7 @@ void test_PropertyArrayHelper() OSL_ENSURE( aP.Type == getPropertyTable1()[i].Type, "Type not correct" ); } - OSL_ENSURE( !a1.hasPropertyByName( OUString("never exist") ), "hasPropertyByName not correct" ); + OSL_ENSURE( !a1.hasPropertyByName("never exist"), "hasPropertyByName not correct" ); try { a1.getPropertyByName( OUString("never exist") ); @@ -873,7 +873,7 @@ void test_PropertySetHelper() sal_Bool b = sal_True; Any aBool; aBool.setValue( &b , getCppuBooleanType() ); - xPS->setPropertyValue( OUString("BOOL"), aBool ); + xPS->setPropertyValue("BOOL", aBool ); OSL_FAIL( "PropertySetHelper: exeption not thrown" ); } catch( PropertyVetoException & /*e*/ ) @@ -900,7 +900,7 @@ void test_PropertySetHelper() sal_Bool b = sal_True; Any aBool; aBool.setValue( &b , getCppuBooleanType() ); - xPS->setPropertyValue( OUString("Does not exist"), aBool ); + xPS->setPropertyValue("Does not exist", aBool ); OSL_FAIL( "PropertySetHelper: exeption not thrown" ); } catch( UnknownPropertyException & /*e*/ ) @@ -923,7 +923,7 @@ void test_PropertySetHelper() try { Any aBool; - aBool = xPS->getPropertyValue( OUString("Does not exist") ); + aBool = xPS->getPropertyValue("Does not exist"); OSL_FAIL( "PropertySetHelper: exeption not thrown" ); } catch( UnknownPropertyException & /*e*/ ) @@ -944,7 +944,7 @@ void test_PropertySetHelper() try { Any aBool; - xPS->setPropertyValue( OUString("INT32"), aBool ); + xPS->setPropertyValue("INT32", aBool ); OSL_FAIL( "PropertySetHelper: exeption not thrown" ); } catch( IllegalArgumentException & /*e*/ ) @@ -966,7 +966,7 @@ void test_PropertySetHelper() { Any aINT32; aINT32 <<= (sal_Int32 ) 16; - xPS->setPropertyValue( OUString("INT16"), aINT32 ); + xPS->setPropertyValue("INT16", aINT32 ); OSL_FAIL( "PropertySetHelper: exeption not thrown" ); } catch( IllegalArgumentException & /*e*/ ) @@ -987,7 +987,7 @@ void test_PropertySetHelper() Any aValue; - aValue = xPS->getPropertyValue( OUString("BOOL") ); + aValue = xPS->getPropertyValue("BOOL"); sal_Bool b = *( (sal_Bool*)aValue.getValue()); OSL_ENSURE( ! b, "PropertySetHelper: wrong BOOL value" ); aValue = ((XFastPropertySet *)pPS)->getFastPropertyValue( PROPERTY_BOOL ); @@ -997,8 +997,8 @@ void test_PropertySetHelper() sal_Int16 n16(0); aValue <<=(sal_Int16)22; - xPS->setPropertyValue( OUString("INT16"), aValue ); - aValue = xPS->getPropertyValue( OUString("INT16") ); + xPS->setPropertyValue("INT16", aValue ); + aValue = xPS->getPropertyValue("INT16"); aValue >>= n16; OSL_ENSURE( 22 == n16 , "PropertySetHelper: wrong INT16 value" ); aValue <<= (sal_Int16)44; @@ -1010,8 +1010,8 @@ void test_PropertySetHelper() // widening conversion aValue <<= (sal_Int16)55; - xPS->setPropertyValue( OUString("INT32"), aValue ); - aValue = xPS->getPropertyValue( OUString("INT32") ); + xPS->setPropertyValue("INT32", aValue ); + aValue = xPS->getPropertyValue("INT32"); sal_Int32 n32(0); aValue >>= n32; OSL_ENSURE( 55 == n32 , "PropertySetHelper: wrong INT32 value" ); @@ -1064,7 +1064,7 @@ void test_PropertySetHelper() Any aValue; aValue <<= (sal_Int16)22; - xPS->setPropertyValue( OUString("INT16"), aValue ); + xPS->setPropertyValue("INT16", aValue ); aValue <<= (sal_Int16) 44; ((XFastPropertySet *)pPS)->setFastPropertyValue( PROPERTY_INT16, aValue ); aValue <<= (sal_Int16)100;// exception diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index 54be5c8038e9..cb345ca020ac 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -502,7 +502,7 @@ SAL_IMPLEMENT_MAIN() } if (!(aImplName.isEmpty() || aServiceName.isEmpty())) - throw RuntimeException( OUString("give component exOR service name!" ), Reference< XInterface >() ); + throw RuntimeException("give component exOR service name!", Reference< XInterface >() ); if (aImplName.isEmpty() && aServiceName.isEmpty()) { if (! aUnoUrl.endsWithIgnoreAsciiCaseAsciiL( @@ -516,7 +516,7 @@ SAL_IMPLEMENT_MAIN() Reference<XInterface>() ); } if (!aImplName.isEmpty() && aLocation.isEmpty()) - throw RuntimeException( OUString("give component location!" ), Reference< XInterface >() ); + throw RuntimeException("give component location!", Reference< XInterface >() ); if (!aServiceName.isEmpty() && !aLocation.isEmpty()) out( "\n> warning: service name given, will ignore location!" ); @@ -541,7 +541,7 @@ SAL_IMPLEMENT_MAIN() if (nTokens != 3 || aUnoUrl.getLength() < 10 || !aUnoUrl.copy( 0, 4 ).equalsIgnoreAsciiCase( OUString("uno:") )) { - throw RuntimeException( OUString("illegal uno url given!" ), Reference< XInterface >() ); + throw RuntimeException("illegal uno url given!", Reference< XInterface >() ); } nIndex = 0; OUString aConnectDescr( aUnoUrl.getToken( 0, ';', nIndex ).copy( 4 ) ); // uno:CONNECTDESCR;iiop;InstanceName diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 174a3fd4e296..d5249ddb2e88 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -738,7 +738,7 @@ Image SfxConfigGroupListBox_Impl::GetImage( Any aAny = xModuleManager->getByName(appModule); if( sal_True != ( aAny >>= moduleDescr ) ) { - throw RuntimeException(OUString("SFTreeListBox::Init: failed to get PropertyValue"), Reference< XInterface >()); + throw RuntimeException("SFTreeListBox::Init: failed to get PropertyValue", Reference< XInterface >()); } beans::PropertyValue const * pmoduleDescr = moduleDescr.getConstArray(); @@ -812,7 +812,7 @@ OUString SfxConfigGroupListBox_Impl::MapCommand2UIName(const OUString& sCommand) if (xModuleConf.is()) { ::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand)); - sUIName = lProps.getUnpackedValueOrDefault(OUString("Name"), OUString()); + sUIName = lProps.getUnpackedValueOrDefault("Name", OUString()); } } catch(const css::uno::RuntimeException&) @@ -898,7 +898,7 @@ void SfxConfigGroupListBox_Impl::GroupSelected() } Any value = - xPropSet->getPropertyValue( OUString("URI") ); + xPropSet->getPropertyValue("URI"); value >>= uri; String* pScriptURI = new String( uri ); diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 1f2105ce28d2..98e8a38e8582 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -544,7 +544,7 @@ Image SvxConfigGroupListBox::GetImage( Any aAny = xModuleManager->getByName(appModule); if( sal_True != ( aAny >>= moduleDescr ) ) { - throw RuntimeException(OUString("SFTreeListBox::Init: failed to get PropertyValue"), Reference< XInterface >()); + throw RuntimeException("SFTreeListBox::Init: failed to get PropertyValue", Reference< XInterface >()); } beans::PropertyValue const * pmoduleDescr = moduleDescr.getConstArray(); diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 672ff5e3e297..b0a73ef88736 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -737,7 +737,7 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton ) mspNode.set( mspUserData->GetNode() , UNO_QUERY ); pParent = m_pScriptsBox->GetParent( pParent ); } - xProp->getPropertyValue( OUString("URI" ) ) >>= tmpString; + xProp->getPropertyValue("URI") >>= tmpString; const String scriptURL( tmpString ); if ( mspNode.is() ) diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 729ed7c8614a..6489201e24fc 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -433,7 +433,7 @@ CanvasSettings::CanvasSettings() : if( xEntryNameAccess.is() ) { Sequence<OUString> preferredImplementations; - if( (xEntryNameAccess->getByName( OUString("PreferredImplementations") ) >>= preferredImplementations) ) + if( (xEntryNameAccess->getByName("PreferredImplementations") >>= preferredImplementations) ) maAvailableImplementations.push_back( std::make_pair(*pCurr,preferredImplementations) ); } @@ -471,7 +471,7 @@ sal_Bool CanvasSettings::IsHardwareAccelerationAvailable() const pCurrImpl->trim() ), UNO_QUERY_THROW ); bool bHasAccel(false); - if( (xPropSet->getPropertyValue(OUString("HardwareAcceleration")) >>= bHasAccel) ) + if( (xPropSet->getPropertyValue("HardwareAcceleration") >>= bHasAccel) ) if( bHasAccel ) { mbHWAccelAvailable = true; @@ -499,7 +499,7 @@ sal_Bool CanvasSettings::IsHardwareAccelerationEnabled() const if( !mxForceFlagNameAccess.is() ) return true; - if( !(mxForceFlagNameAccess->getByName( OUString("ForceSafeServiceImpl") ) >>= bForceLastEntry) ) + if( !(mxForceFlagNameAccess->getByName("ForceSafeServiceImpl") >>= bForceLastEntry) ) return true; return !bForceLastEntry; diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 54ae41ab44bc..ada076ea622f 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -436,10 +436,10 @@ void SfxSaveTabPage::Reset( const SfxItemSet& ) while(xList->hasMoreElements()) { SequenceAsHashMap aFilter(xList->nextElement()); - OUString sFilter = aFilter.getUnpackedValueOrDefault(OUString("Name"),OUString()); + OUString sFilter = aFilter.getUnpackedValueOrDefault("Name",OUString()); if (!sFilter.isEmpty()) { - sal_Int32 nFlags = aFilter.getUnpackedValueOrDefault(OUString("Flags"),sal_Int32()); + sal_Int32 nFlags = aFilter.getUnpackedValueOrDefault("Flags",sal_Int32()); lList.push_back(sFilter); lAlienList.push_back(0 != (nFlags & SFX_FILTER_ALIEN)); lODFList.push_back( isODFFormat( sFilter ) ); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 1a35b045a30a..a952c896474c 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -518,7 +518,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) // is this a calc document Reference< XServiceInfo > xSI( pDocSh->GetModel(), UNO_QUERY ); if ( xSI.is() ) - bUseStarFormat = xSI->supportsService( OUString( "com.sun.star.sheet.SpreadsheetDocument" ) ); + bUseStarFormat = xSI->supportsService("com.sun.star.sheet.SpreadsheetDocument"); } pNumFmtShell->SetUseStarFormat( bUseStarFormat ); diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 8fcd11a74b41..7df61d796494 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -208,7 +208,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, if ( o_pKeyColumnNames->empty() ) { - ::dbtools::throwGenericSQLException( OUString( "Could not find any key column." ), *this ); + ::dbtools::throwGenericSQLException("Could not find any key column.", *this ); } for ( SelectColumnsMetaData::const_iterator keyColumn = o_pKeyColumnNames->begin(); diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index 5132258ccea0..c0ec4352fdda 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -1353,7 +1353,7 @@ namespace dbmm SharedStorage xScriptsRoot( aDocStorage.getScriptsRoot( _eScriptType ) ); if ( !xScriptsRoot.is() ) - throw RuntimeException( OUString( "internal error" ), NULL ); + throw RuntimeException("internal error", NULL ); // loop through the script libraries Sequence< OUString > aStorageElements( xScriptsRoot->getElementNames() ); diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index dde2f9a63fb4..ccd37872ff50 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -388,8 +388,8 @@ sal_Bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _r Reference<XPropertySet> xProp(xAdminDialog,UNO_QUERY); sal_Bool bSuccess = sal_False; - xProp->getPropertyValue(OUString("OpenDatabase")) >>= bSuccess; - xProp->getPropertyValue(OUString("StartTableWizard")) >>= _bShouldStartTableWizard; + xProp->getPropertyValue("OpenDatabase") >>= bSuccess; + xProp->getPropertyValue("StartTableWizard") >>= _bShouldStartTableWizard; return bSuccess; } diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 632ff19760d5..0ca0dfa61770 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -864,7 +864,7 @@ void ODBExport::exportComponent(XPropertySet* _xProp) OUString sValue; _xProp->getPropertyValue(PROPERTY_PERSISTENT_NAME) >>= sValue; sal_Bool bIsForm = sal_True; - _xProp->getPropertyValue(OUString("IsForm")) >>= bIsForm; + _xProp->getPropertyValue("IsForm") >>= bIsForm; if ( bIsForm ) sValue = OUString("forms/") + sValue; else diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 96ea9ed860d9..f5d8603cd321 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -329,7 +329,7 @@ sal_Int32 ReadThroughComponent( xDocStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ ); uno::Reference< beans::XPropertySet > xProps( xDocStream, uno::UNO_QUERY_THROW ); - uno::Any aAny = xProps->getPropertyValue( OUString("Encrypted" ) ); + uno::Any aAny = xProps->getPropertyValue("Encrypted"); aAny >>= bEncrypted; } catch (const packages::WrongPasswordException&) diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 24b20c388877..727da5ad59ab 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -118,7 +118,7 @@ namespace dbaui Reference< XComponentSupplier > xCompSupp( i_rComponent, UNO_QUERY_THROW ); Reference< XComponent > xComponent( xCompSupp->getComponent(), UNO_QUERY_THROW ); if ( !impl_constructFrom( xComponent ) ) - throw RuntimeException( OUString( "Illegal component type." ), NULL ); + throw RuntimeException("Illegal component type.", NULL ); xComponentCommandProcessor.set( i_rComponent, UNO_QUERY_THROW ); xDocumentDefinitionProperties.set( i_rComponent, UNO_QUERY_THROW ); } diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 6d0cc35db670..ea4c339b2763 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1591,7 +1591,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const try { Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); - OSL_VERIFY( xRowSetProps->getPropertyValue( OUString("AllowInserts") ) >>= bAllowInsertions ); + OSL_VERIFY( xRowSetProps->getPropertyValue("AllowInserts") >>= bAllowInsertions ); } catch( const Exception& ) { @@ -1610,7 +1610,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const try { Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW ); - OSL_VERIFY( xRowSetProps->getPropertyValue( OUString("AllowDeletes") ) >>= bAllowDeletions ); + OSL_VERIFY( xRowSetProps->getPropertyValue("AllowDeletes") >>= bAllowDeletions ); OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ROWCOUNT ) >>= nRowCount ); OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ISNEW ) >>= bInsertionRow ); } @@ -1727,9 +1727,9 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const break; // no datasource -> no edit mode sal_Int32 nDataSourcePrivileges = ::comphelper::getINT32(xDataSourceSet->getPropertyValue(PROPERTY_PRIVILEGES)); - sal_Bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(OUString("AllowInserts"))); - sal_Bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(OUString("AllowUpdates"))); - sal_Bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(OUString("AllowDeletes"))); + sal_Bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowInserts")); + sal_Bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowUpdates")); + sal_Bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowDeletes")); if (!bInsertAllowedAndPossible && !bUpdateAllowedAndPossible && !bDeleteAllowedAndPossible) break; // no insert/update/delete -> no edit mode @@ -2000,9 +2000,9 @@ void SbaXDataBrowserController::ExecuteSearch() // prohibit the synchronization of the grid's display with the cursor's position Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY); OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::ExecuteSearch : no model set ?!"); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_False))); - xModelSet->setPropertyValue(OUString("AlwaysShowCursor"), ::comphelper::makeBoolAny(sal_Bool(sal_True))); - xModelSet->setPropertyValue(OUString("CursorColor"), makeAny(sal_Int32(COL_LIGHTRED))); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_False))); + xModelSet->setPropertyValue("AlwaysShowCursor", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("CursorColor", makeAny(sal_Int32(COL_LIGHTRED))); Reference< ::com::sun::star::util::XNumberFormatsSupplier > xNFS(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), sal_True, getORB())); @@ -2025,9 +2025,9 @@ void SbaXDataBrowserController::ExecuteSearch() } // restore the grid's normal operating state - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_True))); - xModelSet->setPropertyValue(OUString("AlwaysShowCursor"), ::comphelper::makeBoolAny(sal_Bool(sal_False))); - xModelSet->setPropertyValue(OUString("CursorColor"), Any()); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("AlwaysShowCursor", ::comphelper::makeBoolAny(sal_Bool(sal_False))); + xModelSet->setPropertyValue("CursorColor", Any()); } //------------------------------------------------------------------------------ @@ -2568,9 +2568,9 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pIn // let the grid snyc it's display with the cursor Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY); OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnFoundData : no model set ?!"); - Any aOld = xModelSet->getPropertyValue(OUString("DisplayIsSynchron")); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_True))); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), aOld); + Any aOld = xModelSet->getPropertyValue("DisplayIsSynchron"); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("DisplayIsSynchron", aOld); // and move to the field Reference< ::com::sun::star::container::XIndexAccess > aColumnControls(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY); @@ -2615,9 +2615,9 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformatio // let the grid snyc its display with the cursor Reference< XPropertySet > xModelSet(getControlModel(), UNO_QUERY); OSL_ENSURE(xModelSet.is(), "SbaXDataBrowserController::OnCanceledNotFound : no model set ?!"); - Any aOld = xModelSet->getPropertyValue(OUString("DisplayIsSynchron")); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), ::comphelper::makeBoolAny(sal_Bool(sal_True))); - xModelSet->setPropertyValue(OUString("DisplayIsSynchron"), aOld); + Any aOld = xModelSet->getPropertyValue("DisplayIsSynchron"); + xModelSet->setPropertyValue("DisplayIsSynchron", ::comphelper::makeBoolAny(sal_Bool(sal_True))); + xModelSet->setPropertyValue("DisplayIsSynchron", aOld); } catch( const Exception& ) { diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index aeb4b026ad21..d1f507d77d27 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -311,14 +311,14 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen try { if ( !xFrame.is() ) - throw IllegalArgumentException( OUString( "need a frame" ), *this, 1 ); + throw IllegalArgumentException("need a frame", *this, 1 ); xParent = xFrame->getContainerWindow(); VCLXWindow* pParentComponent = VCLXWindow::GetImplementation(xParent); Window* pParentWin = pParentComponent ? pParentComponent->GetWindow() : NULL; if (!pParentWin) { - throw IllegalArgumentException( OUString( "Parent window is null" ), *this, 1 ); + throw IllegalArgumentException("Parent window is null", *this, 1 ); } m_aInitParameters.assign( aArguments ); @@ -326,7 +326,7 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen ODataView* pView = getView(); if ( !pView ) - throw RuntimeException( OUString( "unable to create a view" ), *this ); + throw RuntimeException("unable to create a view", *this ); if ( m_bReadOnly || m_bPreview ) pView->EnableInput( sal_False ); @@ -1084,7 +1084,7 @@ Reference< XLayoutManager > OGenericUnoController::getLayoutManager(const Refere { try { - xLayoutManager.set(xPropSet->getPropertyValue( OUString( "LayoutManager" )),UNO_QUERY); + xLayoutManager.set(xPropSet->getPropertyValue("LayoutManager"),UNO_QUERY); } catch ( Exception& ) { diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 278e9f1fd730..0bee0cd4063c 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -616,9 +616,9 @@ void SbaTableQueryBrowser::initializePreviewMode() Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY); if ( xDataSourceSet.is() ) { - xDataSourceSet->setPropertyValue(OUString("AllowInserts"),makeAny(sal_False)); - xDataSourceSet->setPropertyValue(OUString("AllowUpdates"),makeAny(sal_False)); - xDataSourceSet->setPropertyValue(OUString("AllowDeletes"),makeAny(sal_False)); + xDataSourceSet->setPropertyValue("AllowInserts",makeAny(sal_False)); + xDataSourceSet->setPropertyValue("AllowUpdates",makeAny(sal_False)); + xDataSourceSet->setPropertyValue("AllowDeletes",makeAny(sal_False)); } } @@ -1563,7 +1563,7 @@ void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame: { Reference< XPropertySet > xFrameProps( m_aCurrentFrame.getFrame(), UNO_QUERY_THROW ); Reference< XLayoutManager > xLayouter( - xFrameProps->getPropertyValue( OUString( "LayoutManager" ) ), + xFrameProps->getPropertyValue("LayoutManager"), UNO_QUERY ); if ( xLayouter.is() ) diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 009300b4da0c..aee6df61a43b 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1822,7 +1822,7 @@ String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDes Reference<XPropertySet> xFormSet = xNumberFormatter->getNumberFormatsSupplier()->getNumberFormats()->getByKey(nFormatKey); OSL_ENSURE(xFormSet.is(),"XPropertySet is null!"); OUString sFormat; - xFormSet->getPropertyValue(OUString("FormatString")) >>= sFormat; + xFormSet->getPropertyValue("FormatString") >>= sFormat; if ( !bTextFormat ) { diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 964fb6b5a310..52069d2a0a16 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -594,7 +594,7 @@ DBG_NAME(OConnectionHelper) } else { - Any aContentType = aParent.getPropertyValue( OUString("ContentType") ); + Any aContentType = aParent.getPropertyValue("ContentType"); aContentType >>= sContentType; } diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index fb0558e79d18..12b1dde86309 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -823,7 +823,7 @@ void ODatabaseExport::ensureFormatter() SvNumberFormatsSupplierObj* pSupplierImpl = (SvNumberFormatsSupplierObj*)sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId())); m_pFormatter = pSupplierImpl ? pSupplierImpl->GetNumberFormatter() : NULL; Reference<XPropertySet> xNumberFormatSettings = xSupplier->getNumberFormatSettings(); - xNumberFormatSettings->getPropertyValue(OUString("NullDate")) >>= m_aNullDate; + xNumberFormatSettings->getPropertyValue("NullDate") >>= m_aNullDate; } } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 2aeae40dace0..e6ec4e70712e 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1134,7 +1134,7 @@ namespace ::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::NO_DECODE ), Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - if ( ( aCnt.getPropertyValue( OUString("AnchorName") ) >>= sAnchor ) ) + if ( ( aCnt.getPropertyValue("AnchorName") >>= sAnchor ) ) { if ( !sAnchor.isEmpty() ) diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index f2b7a0e23a55..a6888b5180df 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2028,8 +2028,8 @@ void Desktop::EnableOleAutomation() SAL_INFO( "desktop.app", "desktop (jl97489) ::Desktop::EnableOleAutomation" ); #ifdef WNT Reference< XMultiServiceFactory > xSMgr= comphelper::getProcessServiceFactory(); - xSMgr->createInstance(OUString("com.sun.star.bridge.OleApplicationRegistration")); - xSMgr->createInstance(OUString("com.sun.star.comp.ole.EmbedServer")); + xSMgr->createInstance("com.sun.star.bridge.OleApplicationRegistration"); + xSMgr->createInstance("com.sun.star.comp.ole.EmbedServer"); #endif } @@ -2110,8 +2110,8 @@ void Desktop::PreloadConfigurationData() a >>= xCmdAccess; if ( xCmdAccess.is() ) { - xCmdAccess->getByName( OUString( ".uno:BasicShapes" )); - xCmdAccess->getByName( OUString( ".uno:EditGlossary" )); + xCmdAccess->getByName(".uno:BasicShapes"); + xCmdAccess->getByName(".uno:EditGlossary"); } } catch ( const ::com::sun::star::uno::Exception& ) @@ -2123,7 +2123,7 @@ void Desktop::PreloadConfigurationData() a = xNameAccess->getByName( aCalcDoc ); a >>= xCmdAccess; if ( xCmdAccess.is() ) - xCmdAccess->getByName( OUString( ".uno:InsertObjectStarMath" )); + xCmdAccess->getByName(".uno:InsertObjectStarMath"); } catch ( const ::com::sun::star::uno::Exception& ) { @@ -2135,7 +2135,7 @@ void Desktop::PreloadConfigurationData() a = xNameAccess->getByName( aDrawDoc ); a >>= xCmdAccess; if ( xCmdAccess.is() ) - xCmdAccess->getByName( OUString( ".uno:Polygon" )); + xCmdAccess->getByName(".uno:Polygon"); } catch ( const ::com::sun::star::uno::Exception& ) { @@ -2149,7 +2149,7 @@ void Desktop::PreloadConfigurationData() a = xNameAccess->getByName( aWriterDoc ); a >>= xWindowAccess; if ( xWindowAccess.is() ) - xWindowAccess->getByName( OUString( "private:resource/toolbar/standardbar" )); + xWindowAccess->getByName("private:resource/toolbar/standardbar"); } catch ( const ::com::sun::star::uno::Exception& ) { @@ -2159,7 +2159,7 @@ void Desktop::PreloadConfigurationData() a = xNameAccess->getByName( aCalcDoc ); a >>= xWindowAccess; if ( xWindowAccess.is() ) - xWindowAccess->getByName( OUString( "private:resource/toolbar/standardbar" )); + xWindowAccess->getByName("private:resource/toolbar/standardbar"); } catch ( const ::com::sun::star::uno::Exception& ) { @@ -2169,7 +2169,7 @@ void Desktop::PreloadConfigurationData() a = xNameAccess->getByName( aDrawDoc ); a >>= xWindowAccess; if ( xWindowAccess.is() ) - xWindowAccess->getByName( OUString( "private:resource/toolbar/standardbar" )); + xWindowAccess->getByName("private:resource/toolbar/standardbar"); } catch ( const ::com::sun::star::uno::Exception& ) { @@ -2179,7 +2179,7 @@ void Desktop::PreloadConfigurationData() a = xNameAccess->getByName( aImpressDoc ); a >>= xWindowAccess; if ( xWindowAccess.is() ) - xWindowAccess->getByName( OUString( "private:resource/toolbar/standardbar" )); + xWindowAccess->getByName("private:resource/toolbar/standardbar"); } catch ( const ::com::sun::star::uno::Exception& ) { diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index 53ee92ea8561..fbaf3e1eae63 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -332,7 +332,7 @@ static void impl_setNeedsCompatCheck() Any value = makeAny( OUString("never") ); - pset->setPropertyValue( OUString("LastCompatibilityCheckID"), value ); + pset->setPropertyValue("LastCompatibilityCheckID", value ); Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges(); } catch (const Exception&) {} @@ -361,14 +361,14 @@ static bool impl_needsCompatCheck() Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >( theConfigProvider->createInstanceWithArguments( OUString(aAccessSrvc), theArgs ), UNO_QUERY_THROW ); - Any result = pset->getPropertyValue( OUString("LastCompatibilityCheckID") ); + Any result = pset->getPropertyValue("LastCompatibilityCheckID"); result >>= aLastCheckBuildID; if ( aLastCheckBuildID != aCurrentBuildID ) { bNeedsCheck = true; result <<= aCurrentBuildID; - pset->setPropertyValue( OUString("LastCompatibilityCheckID"), result ); + pset->setPropertyValue("LastCompatibilityCheckID", result ); Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges(); } #ifdef DEBUG diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index af1576460532..21964b4a9096 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -80,7 +80,7 @@ TheExtensionManager::TheExtensionManager( Window *pParent, uno::Sequence< uno::Any >( args, 1 )), uno::UNO_QUERY_THROW); try { //throws css::container::NoSuchElementException, css::lang::WrappedTargetException - uno::Any value = xNameAccessRepositories->getByName( OUString( "WebsiteLink" ) ); + uno::Any value = xNameAccessRepositories->getByName("WebsiteLink"); m_sGetExtensionsURL = value.get< OUString > (); } catch ( const uno::Exception& ) @@ -380,7 +380,7 @@ bool TheExtensionManager::supportsOptions( const uno::Reference< deployment::XPa uno::Reference< XInterface> xIntNode = anyNode.get< uno::Reference< XInterface > >(); uno::Reference< container::XNameAccess > xNode( xIntNode, uno::UNO_QUERY_THROW ); - uno::Any anyLeaves = xNode->getByName( OUString("Leaves") ); + uno::Any anyLeaves = xNode->getByName("Leaves"); uno::Reference< XInterface > xIntLeaves = anyLeaves.get< uno::Reference< XInterface > >(); uno::Reference< container::XNameAccess > xLeaves( xIntLeaves, uno::UNO_QUERY_THROW ); @@ -393,7 +393,7 @@ bool TheExtensionManager::supportsOptions( const uno::Reference< deployment::XPa uno::Reference< beans::XPropertySet > xLeaf( xIntLeaf, uno::UNO_QUERY_THROW ); //investigate the Id property if it matches the extension identifier which //has been passed in. - uno::Any anyValue = xLeaf->getPropertyValue( OUString("Id") ); + uno::Any anyValue = xLeaf->getPropertyValue("Id"); OUString sId = anyValue.get< OUString >(); if ( sId == aId.Value ) diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx index 6f8017f54520..2bc3e990b626 100644 --- a/dtrans/source/cnttype/wbench/testcnttype.cxx +++ b/dtrans/source/cnttype/wbench/testcnttype.cxx @@ -184,7 +184,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) } Reference< XMimeContentTypeFactory > - xMCntTypeFactory( g_xFactory->createInstance( OUString("com.sun.star.datatransfer.MimeContentTypeFactory") ), UNO_QUERY ); + xMCntTypeFactory( g_xFactory->createInstance("com.sun.star.datatransfer.MimeContentTypeFactory"), UNO_QUERY ); if ( !xMCntTypeFactory.is( ) ) { diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index 696ca9ca030a..d4f6f9dbdb7d 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -84,7 +84,7 @@ Reference< XClipboard > SAL_CALL ClipboardManager::getClipboard( const OUString& // object is disposed already if (rBHelper.bDisposed) - throw DisposedException(OUString("object is disposed."), + throw DisposedException("object is disposed.", static_cast < XClipboardManager * > (this)); ClipboardMap::iterator iter = @@ -105,13 +105,13 @@ void SAL_CALL ClipboardManager::addClipboard( const Reference< XClipboard >& xCl // check parameter if (!xClipboard.is()) - throw IllegalArgumentException(OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast < XClipboardManager * > (this), 1); // the name "default" is reserved for internal use OUString aName = xClipboard->getName(); if ( m_aDefaultName == aName ) - throw IllegalArgumentException(OUString("name reserved"), + throw IllegalArgumentException("name reserved", static_cast < XClipboardManager * > (this), 1); // try to add new clipboard to the list @@ -154,7 +154,7 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames() MutexGuard aGuard(m_aMutex); if (rBHelper.bDisposed) - throw DisposedException(OUString("object is disposed."), + throw DisposedException("object is disposed.", static_cast < XClipboardManager * > (this)); if (rBHelper.bInDispose) diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 5a2c1e9daac6..ef7d410aa039 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -83,7 +83,7 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( Runtime MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -103,7 +103,7 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -117,7 +117,7 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra OUString SAL_CALL CWinClipboard::getName( ) throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -135,7 +135,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException ) MutexGuard aGuard( m_aMutex ); if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -149,7 +149,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException ) sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); if ( NULL != m_pImpl.get( ) ) @@ -170,12 +170,12 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); // check input parameter if ( !listener.is( ) ) - throw IllegalArgumentException( OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast< XClipboardEx* >( this ), 1 ); @@ -190,12 +190,12 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar throw( RuntimeException ) { if ( rBHelper.bDisposed ) - throw DisposedException( OUString("object is already disposed"), + throw DisposedException("object is already disposed", static_cast< XClipboardEx* >( this ) ); // check input parameter if ( !listener.is( ) ) - throw IllegalArgumentException( OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast< XClipboardEx* >( this ), 1 ); diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index b3199216cd6c..3cbf4c80e639 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -2091,8 +2091,8 @@ void SvxPropertyValuesToItemSet( if (pEntry->nFlags & beans::PropertyAttribute::READONLY) // should be PropertyVetoException which is not yet defined for the new import API's functions - throw uno::RuntimeException( OUString( "Property is read-only: " ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); - //throw PropertyVetoException ( OUString( "Property is read-only: " ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); + throw uno::RuntimeException("Property is read-only: " + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); + //throw PropertyVetoException ("Property is read-only: " + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); if (pEntry->nWID == WID_FONTDESC) { diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 06868e7b4a20..128a5eb3060f 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -508,7 +508,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag // no need to let the file stay after the stream is removed since the embedded document // can not be stored directly uno::Reference< beans::XPropertySet > xTempStreamProps( xTempInpStream, uno::UNO_QUERY_THROW ); - xTempStreamProps->getPropertyValue( OUString( "Uri" ) ) >>= aTempFileURL; + xTempStreamProps->getPropertyValue("Uri") >>= aTempFileURL; } catch( const uno::Exception& ) { @@ -857,7 +857,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ // no need to let the file stay after the stream is removed since the embedded document // can not be stored directly uno::Reference< beans::XPropertySet > xTempStreamProps( xTempStream, uno::UNO_QUERY_THROW ); - xTempStreamProps->getPropertyValue( OUString( "Uri" ) ) >>= aTempFileURL; + xTempStreamProps->getPropertyValue("Uri") >>= aTempFileURL; } catch( const uno::Exception& ) { diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 0ccd7b1028aa..58567275318e 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -102,7 +102,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta OUString aMediaType; try { - uno::Any aAny = xPropSet->getPropertyValue( OUString( "MediaType" ) ); + uno::Any aAny = xPropSet->getPropertyValue("MediaType"); aAny >>= aMediaType; } catch ( const uno::Exception& ) diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index b9deda50e7a7..44b4c59c0e52 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -366,7 +366,7 @@ sal_Bool DocumentHolder::SetFrameLMVisibility( const uno::Reference< frame::XFra { uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager; uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "LayoutManager" )) >>= xLayoutManager; + xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; if ( xLayoutManager.is() ) { xLayoutManager->setVisible( bVisible ); @@ -690,7 +690,7 @@ sal_Bool DocumentHolder::ShowUI( const uno::Reference< ::com::sun::star::frame:: try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "LayoutManager" )) >>= xOwnLM; + xPropSet->getPropertyValue("LayoutManager") >>= xOwnLM; xDocAreaAcc = xContainerLM->getDockingAreaAcceptor(); } catch( const uno::Exception& ){} @@ -783,7 +783,7 @@ sal_Bool DocumentHolder::HideUI( const uno::Reference< ::com::sun::star::frame:: try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "LayoutManager" )) >>= xOwnLM; + xPropSet->getPropertyValue("LayoutManager") >>= xOwnLM; } catch( const uno::Exception& ) {} @@ -860,7 +860,7 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() uno::Reference< ::com::sun::star::frame::XLayoutManager > xOwnLM; try { uno::Reference< beans::XPropertySet > xPropSet( m_xFrame, uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "LayoutManager" )) >>= xOwnLM; + xPropSet->getPropertyValue("LayoutManager") >>= xOwnLM; } catch( const uno::Exception& ) {} @@ -972,12 +972,12 @@ sal_Bool DocumentHolder::LoadDocToFrame( sal_Bool bInPlace ) OUString sUrl; uno::Reference< lang::XServiceInfo> xServiceInfo(xDoc,uno::UNO_QUERY); if ( xServiceInfo.is() - && xServiceInfo->supportsService(OUString("com.sun.star.report.ReportDefinition")) ) + && xServiceInfo->supportsService("com.sun.star.report.ReportDefinition") ) { sUrl = OUString(".component:DB/ReportDesign"); } else if( xServiceInfo.is() - && xServiceInfo->supportsService( OUString("com.sun.star.chart2.ChartDocument") )) + && xServiceInfo->supportsService("com.sun.star.chart2.ChartDocument")) sUrl = OUString("private:factory/schart"); else sUrl = OUString("private:object"); diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 734f8c5461bc..d3bb4ccbeb11 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -151,7 +151,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta throw uno::RuntimeException(); try { - uno::Any aAny = xPropSet->getPropertyValue( OUString( "MediaType" )); + uno::Any aAny = xPropSet->getPropertyValue("MediaType"); aAny >>= aMediaType; } catch ( const uno::Exception& ) @@ -183,7 +183,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta throw uno::RuntimeException(); try { - uno::Any aAny = xPropSet->getPropertyValue( OUString( "MediaType" )); + uno::Any aAny = xPropSet->getPropertyValue("MediaType"); aAny >>= aMediaType; if ( aMediaType == "application/vnd.sun.star.oleobject" ) aEmbedFactory = OUString( "com.sun.star.embed.OLEEmbeddedObjectFactory" ); diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 3773a21f4fc3..306ba5a0151a 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -274,7 +274,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() && ( aFilterName == "Calc MS Excel 2007 XML" || aFilterName == "Impress MS PowerPoint 2007 XML" || aFilterName == "MS Word 2007 XML" ) ) { uno::Reference< container::XNameAccess > xFilterFactory( - m_xFactory->createInstance( OUString( "com.sun.star.document.FilterFactory" )), + m_xFactory->createInstance("com.sun.star.document.FilterFactory"), uno::UNO_QUERY_THROW ); OUString aDocServiceName; @@ -326,7 +326,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() xDocument->close( sal_True ); uno::Reference< beans::XPropertySet > xStorProps( xTmpStorage, uno::UNO_QUERY_THROW ); OUString aMediaType; - xStorProps->getPropertyValue( OUString( "MediaType" ) ) >>= aMediaType; + xStorProps->getPropertyValue("MediaType") >>= aMediaType; xTmpStorage->dispose(); // look for the related embedded object factory @@ -728,9 +728,9 @@ namespace if (bCopied) { - xNativeTempFile->setPropertyValue(OUString("RemoveFile"), + xNativeTempFile->setPropertyValue("RemoveFile", uno::makeAny(sal_False)); - uno::Any aUrl = xNativeTempFile->getPropertyValue(OUString("Uri")); + uno::Any aUrl = xNativeTempFile->getPropertyValue("Uri"); aUrl >>= sUrl; xNativeTempFile = uno::Reference<beans::XPropertySet>(); @@ -742,7 +742,7 @@ namespace } else { - xNativeTempFile->setPropertyValue(OUString("RemoveFile"), + xNativeTempFile->setPropertyValue("RemoveFile", uno::makeAny(sal_True)); } #else diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 8f88131b8e1a..f352fdd32c24 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -84,8 +84,8 @@ OUString GetNewTempFileURL_Impl( const uno::Reference< lang::XMultiServiceFactor uno::UNO_QUERY_THROW ); try { - xTempFile->setPropertyValue( OUString( "RemoveFile" ), uno::makeAny( sal_False ) ); - uno::Any aUrl = xTempFile->getPropertyValue( OUString( "Uri" )); + xTempFile->setPropertyValue("RemoveFile", uno::makeAny( sal_False ) ); + uno::Any aUrl = xTempFile->getPropertyValue("Uri"); aUrl >>= aResult; } catch ( const uno::Exception& ) @@ -164,8 +164,8 @@ OUString GetNewFilledTempFile_Impl( const uno::Reference< embed::XOptimizedStora xParentStorage->copyStreamElementData( aEntryName, xTempStream ); - xTempFile->setPropertyValue( OUString( "RemoveFile" ), uno::makeAny( sal_False ) ); - uno::Any aUrl = xTempFile->getPropertyValue( OUString( "Uri" )); + xTempFile->setPropertyValue("RemoveFile", uno::makeAny( sal_False ) ); + uno::Any aUrl = xTempFile->getPropertyValue("Uri"); aUrl >>= aResult; } catch( const uno::RuntimeException& ) @@ -189,7 +189,7 @@ void SetStreamMediaType_Impl( const uno::Reference< io::XStream >& xStream, cons if ( !xPropSet.is() ) throw uno::RuntimeException(); // TODO: all the storage streams must support XPropertySet - xPropSet->setPropertyValue( OUString( "MediaType" ), uno::makeAny( aMediaType ) ); + xPropSet->setPropertyValue("MediaType", uno::makeAny( aMediaType ) ); } #endif //------------------------------------------------------ @@ -199,7 +199,7 @@ void LetCommonStoragePassBeUsed_Impl( const uno::Reference< io::XStream >& xStre if ( !xPropSet.is() ) throw uno::RuntimeException(); // Only StorageStreams must be provided here, they must implement the interface - xPropSet->setPropertyValue( OUString( "UseCommonStoragePasswordEncryption" ), + xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption", uno::makeAny( (sal_Bool)sal_True ) ); } #ifdef WNT diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index cd60186efab2..1df837c44a0f 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -202,7 +202,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream( throw uno::RuntimeException(); uno::Reference< document::XTypeDetection > xTypeDetection( - xFactory->createInstance( OUString( "com.sun.star.document.TypeDetection" )), + xFactory->createInstance("com.sun.star.document.TypeDetection"), uno::UNO_QUERY_THROW ); OUString aTypeName; @@ -273,8 +273,8 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io throw uno::RuntimeException(); try { - xNativeTempFile->setPropertyValue( OUString( "RemoveFile" ), uno::makeAny( sal_False ) ); - uno::Any aUrl = xNativeTempFile->getPropertyValue( OUString( "Uri" )); + xNativeTempFile->setPropertyValue("RemoveFile", uno::makeAny( sal_False ) ); + uno::Any aUrl = xNativeTempFile->getPropertyValue("Uri"); aUrl >>= aNativeTempURL; } catch ( uno::Exception& ) diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 488451ef1f2b..be1cf8db8e88 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -848,7 +848,7 @@ void DocumentHolder::show() uno::Reference< beans::XPropertySet > xLMProps( m_xFrame->getLayoutManager(), uno::UNO_QUERY ); if ( xLMProps.is() ) { - xLMProps->setPropertyValue( OUString( "MenuBarCloser" ), + xLMProps->setPropertyValue("MenuBarCloser", uno::makeAny( uno::Reference< frame::XStatusListener >() ) ); } diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx index 909917863368..2f482e6575f1 100644 --- a/extensions/source/abpilot/fieldmappingimpl.cxx +++ b/extensions/source/abpilot/fieldmappingimpl.cxx @@ -104,7 +104,7 @@ namespace abp #ifdef DBG_UTIL sal_Bool bSuccess = #endif - xDialogProps->getPropertyValue( OUString( "FieldMapping" ) ) >>= aMapping; + xDialogProps->getPropertyValue("FieldMapping") >>= aMapping; DBG_ASSERT( bSuccess, "fieldmapping::invokeDialog: invalid property type for FieldMapping!" ); // and copy it into the map diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index ed7627e2bdf7..29b7f6c4f492 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -316,7 +316,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, const OUSt { try { - Any a = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + Any a = xPropSet->getPropertyValue("LayoutManager"); a >>= xLayoutManager; } catch ( const uno::Exception& ) diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index d3598d10019e..60a1fc95e94f 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -914,7 +914,7 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); if ( xFactory.is() ) - m_xParser.set( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY ); + m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); OUString aString("SELECT * FROM "); @@ -1074,7 +1074,7 @@ void BibDataManager::setActiveDataSource(const OUString& rURL) aPropertySet->setPropertyValue("ActiveConnection", aVal); Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); if ( xFactory.is() ) - m_xParser.set( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY ); + m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); if(xOldConnection.is()) xOldConnection->dispose(); @@ -1167,7 +1167,7 @@ void BibDataManager::setActiveDataTable(const OUString& rTable) Reference< XMultiServiceFactory > xFactory(xConnection, UNO_QUERY); if ( xFactory.is() ) - m_xParser.set( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY ); + m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); OUString aString("SELECT * FROM "); @@ -1408,7 +1408,7 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel( xPropSet->setPropertyValue( FM_PROP_NAME,aFieldName); xPropSet->setPropertyValue( FM_PROP_CONTROLSOURCE, makeAny( rName ) ); - xPropSet->setPropertyValue( OUString( "NativeWidgetLook" ), makeAny( (sal_Bool)sal_True ) ); + xPropSet->setPropertyValue("NativeWidgetLook", makeAny( (sal_Bool)sal_True ) ); Reference< XFormComponent > aFormComp(xModel,UNO_QUERY ); diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 77dbb9a91e51..77e019c4514c 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -111,7 +111,7 @@ namespace dbp try { OUString sDataSourceName; - rContext.xForm->getPropertyValue(OUString("DataSourceName")) >>= sDataSourceName; + rContext.xForm->getPropertyValue("DataSourceName") >>= sDataSourceName; Reference< XConnection > xConnection; bool bEmbedded = ::dbtools::isEmbeddedInDatabase( rContext.xForm, xConnection ); @@ -129,9 +129,9 @@ namespace dbp implFillTables(xConnection); OUString sCommand; - OSL_VERIFY( rContext.xForm->getPropertyValue( OUString("Command") ) >>= sCommand ); + OSL_VERIFY( rContext.xForm->getPropertyValue("Command") >>= sCommand ); sal_Int32 nCommandType = CommandType::TABLE; - OSL_VERIFY( rContext.xForm->getPropertyValue( OUString("CommandType") ) >>= nCommandType ); + OSL_VERIFY( rContext.xForm->getPropertyValue("CommandType") >>= nCommandType ); // search the entry of the given type with the given name for ( sal_uInt16 nLookup = 0; nLookup < m_aTable.GetEntryCount(); ++nLookup ) @@ -167,13 +167,13 @@ namespace dbp xOldConn = getFormConnection(); OUString sDataSource = m_aDatasource.GetSelectEntry(); - rContext.xForm->setPropertyValue( OUString("DataSourceName"), makeAny( sDataSource ) ); + rContext.xForm->setPropertyValue("DataSourceName", makeAny( sDataSource ) ); } OUString sCommand = m_aTable.GetSelectEntry(); sal_Int32 nCommandType = reinterpret_cast< sal_IntPtr >( m_aTable.GetEntryData( m_aTable.GetSelectEntryPos() ) ); - rContext.xForm->setPropertyValue( OUString("Command"), makeAny( sCommand ) ); - rContext.xForm->setPropertyValue( OUString("CommandType"), makeAny( nCommandType ) ); + rContext.xForm->setPropertyValue("Command", makeAny( sCommand ) ); + rContext.xForm->setPropertyValue("CommandType", makeAny( nCommandType ) ); if ( !rContext.bEmbedded ) setFormConnection( xOldConn, sal_False ); diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx index 32a152be18df..507525ce80a4 100644 --- a/extensions/source/dbpilots/controlwizard.cxx +++ b/extensions/source/dbpilots/controlwizard.cxx @@ -232,9 +232,9 @@ namespace dbp sal_Int32 nCommandType = CommandType::COMMAND; try { - rContext.xForm->getPropertyValue(OUString("DataSourceName")) >>= sDataSource; - rContext.xForm->getPropertyValue(OUString("Command")) >>= sCommand; - rContext.xForm->getPropertyValue(OUString("CommandType")) >>= nCommandType; + rContext.xForm->getPropertyValue("DataSourceName") >>= sDataSource; + rContext.xForm->getPropertyValue("Command") >>= sCommand; + rContext.xForm->getPropertyValue("CommandType") >>= nCommandType; } catch(const Exception&) { @@ -298,7 +298,7 @@ namespace dbp sal_Int16 nClassId = FormComponentType::CONTROL; try { - getContext().xObjectModel->getPropertyValue(OUString("ClassId")) >>= nClassId; + getContext().xObjectModel->getPropertyValue("ClassId") >>= nClassId; } catch(const Exception&) { @@ -457,7 +457,7 @@ namespace dbp try { if ( !::dbtools::isEmbeddedInDatabase(m_aContext.xForm,xConn) ) - m_aContext.xForm->getPropertyValue(OUString("ActiveConnection")) >>= xConn; + m_aContext.xForm->getPropertyValue("ActiveConnection") >>= xConn; } catch(const Exception&) { @@ -487,7 +487,7 @@ namespace dbp } else { - m_aContext.xForm->setPropertyValue( OUString("ActiveConnection"), makeAny( _rxConn ) ); + m_aContext.xForm->setPropertyValue("ActiveConnection", makeAny( _rxConn ) ); } } catch(const Exception&) @@ -558,8 +558,8 @@ namespace dbp if (m_aContext.xForm.is()) { // collect some properties of the form - OUString sObjectName = ::comphelper::getString(m_aContext.xForm->getPropertyValue(OUString("Command"))); - sal_Int32 nObjectType = ::comphelper::getINT32(m_aContext.xForm->getPropertyValue(OUString("CommandType"))); + OUString sObjectName = ::comphelper::getString(m_aContext.xForm->getPropertyValue("Command")); + sal_Int32 nObjectType = ::comphelper::getINT32(m_aContext.xForm->getPropertyValue("CommandType")); // calculate the connection the rowset is working with Reference< XConnection > xConnection; @@ -604,7 +604,7 @@ namespace dbp // not interested in any results, only in the fields Reference< XPropertySet > xStatementProps(xStatement, UNO_QUERY); - xStatementProps->setPropertyValue(OUString("MaxRows"), makeAny(sal_Int32(0))); + xStatementProps->setPropertyValue("MaxRows", makeAny(sal_Int32(0))); // TODO: think about handling local SQLExceptions here ... Reference< XColumnsSupplier > xSupplyCols(xStatement->executeQuery(), UNO_QUERY); diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 866a34e5227e..20eae70f083e 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -176,12 +176,12 @@ namespace dbp } // ListSourceType: SQL - getContext().xObjectModel->setPropertyValue(OUString("ListSourceType"), makeAny((sal_Int32)ListSourceType_SQL)); + getContext().xObjectModel->setPropertyValue("ListSourceType", makeAny((sal_Int32)ListSourceType_SQL)); if (isListBox()) { // BoundColumn: 1 - getContext().xObjectModel->setPropertyValue(OUString("BoundColumn"), makeAny((sal_Int16)1)); + getContext().xObjectModel->setPropertyValue("BoundColumn", makeAny((sal_Int16)1)); // build the statement to set as list source OUString sStatement = "SELECT " + @@ -189,7 +189,7 @@ namespace dbp " FROM " + OUString( getSettings().sListContentTable ); Sequence< OUString > aListSource(1); aListSource[0] = sStatement; - getContext().xObjectModel->setPropertyValue(OUString("ListSource"), makeAny(aListSource)); + getContext().xObjectModel->setPropertyValue("ListSource", makeAny(aListSource)); } else { @@ -201,7 +201,7 @@ namespace dbp } // the bound field - getContext().xObjectModel->setPropertyValue(OUString("DataField"), makeAny(OUString(getSettings().sLinkedFormField))); + getContext().xObjectModel->setPropertyValue("DataField", makeAny(OUString(getSettings().sLinkedFormField))); } catch(const Exception&) { diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx index 9e315a8d5811..ef1754a002ad 100644 --- a/extensions/source/dbpilots/optiongrouplayouter.cxx +++ b/extensions/source/dbpilots/optiongrouplayouter.cxx @@ -119,28 +119,28 @@ namespace dbp aButtonPosition.Y = aShapePosition.Y + (i+1) * nTempHeight + nTopSpace; Reference< XPropertySet > xRadioModel( - xDocFactory->createInstance(OUString("com.sun.star.form.component.RadioButton")), + xDocFactory->createInstance("com.sun.star.form.component.RadioButton"), UNO_QUERY); // the label - xRadioModel->setPropertyValue(OUString("Label"), makeAny(OUString(*aLabelIter))); + xRadioModel->setPropertyValue("Label", makeAny(OUString(*aLabelIter))); // the value - xRadioModel->setPropertyValue(OUString("RefValue"), makeAny(OUString(*aValueIter))); + xRadioModel->setPropertyValue("RefValue", makeAny(OUString(*aValueIter))); // default selection if (_rSettings.sDefaultField == *aLabelIter) - xRadioModel->setPropertyValue(OUString("DefaultState"), makeAny(sal_Int16(1))); + xRadioModel->setPropertyValue("DefaultState", makeAny(sal_Int16(1))); // the connection to the database field if (0 != _rSettings.sDBField.Len()) - xRadioModel->setPropertyValue(OUString("DataField"), makeAny(OUString(_rSettings.sDBField))); + xRadioModel->setPropertyValue("DataField", makeAny(OUString(_rSettings.sDBField))); // the name for the model - xRadioModel->setPropertyValue(OUString("Name"), makeAny(sElementsName)); + xRadioModel->setPropertyValue("Name", makeAny(sElementsName)); // create a shape for the radio button Reference< XControlShape > xRadioShape( - xDocFactory->createInstance(OUString("com.sun.star.drawing.ControlShape")), + xDocFactory->createInstance("com.sun.star.drawing.ControlShape"), UNO_QUERY); Reference< XPropertySet > xShapeProperties(xRadioShape, UNO_QUERY); @@ -155,7 +155,7 @@ namespace dbp // the name of the shape if (xShapeProperties.is()) - xShapeProperties->setPropertyValue(OUString("Name"), makeAny(sElementsName)); + xShapeProperties->setPropertyValue("Name", makeAny(sElementsName)); // add to the page xPageShapes->add(xRadioShape.get()); @@ -164,7 +164,7 @@ namespace dbp // set the GroupBox as "LabelControl" for the RadioButton // (_after_ having inserted the model into the page!) - xRadioModel->setPropertyValue(OUString("LabelControl"), makeAny(_rContext.xObjectModel)); + xRadioModel->setPropertyValue("LabelControl", makeAny(_rContext.xObjectModel)); } // group the shapes diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx index 8bef4db3a7dd..91c6fa92ca33 100644 --- a/extensions/source/logging/loggerconfig.cxx +++ b/extensions/source/logging/loggerconfig.cxx @@ -272,7 +272,7 @@ namespace logging // the log level sal_Int32 nLogLevel( LogLevel::OFF ); - OSL_VERIFY( xLoggerSettings->getByName( OUString( "LogLevel" ) ) >>= nLogLevel ); + OSL_VERIFY( xLoggerSettings->getByName("LogLevel") >>= nLogLevel ); _rxLogger->setLevel( nLogLevel ); // the default handler, if any diff --git a/extensions/source/logging/loghandler.cxx b/extensions/source/logging/loghandler.cxx index 2fc4939ae9fd..4184718f4532 100644 --- a/extensions/source/logging/loghandler.cxx +++ b/extensions/source/logging/loghandler.cxx @@ -81,10 +81,10 @@ namespace logging m_rMutex.acquire(); if ( !getIsInitialized() ) - throw DisposedException( OUString( "component not initialized" ), NULL ); + throw DisposedException("component not initialized", NULL ); if ( m_rBHelper.bDisposed ) - throw DisposedException( OUString( "component already disposed" ), NULL ); + throw DisposedException("component already disposed", NULL ); // fallback settings, in case they weren't passed at construction time if ( !getFormatter().is() ) diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 57e573802729..febc7aebac80 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -182,9 +182,9 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) // currently ignore errors in this code uno::Reference< beans::XPropertySet > xFrameProps( m_xFrame, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xLMProps; - xFrameProps->getPropertyValue( OUString("LayoutManager") ) >>= xLMProps; + xFrameProps->getPropertyValue("LayoutManager") >>= xLMProps; if ( xLMProps.is() ) - xLMProps->setPropertyValue( OUString("AutomaticToolbars"), uno::makeAny( (sal_Bool)sal_False ) ); + xLMProps->setPropertyValue("AutomaticToolbars", uno::makeAny( (sal_Bool)sal_False ) ); } catch( const uno::Exception& ) {} @@ -300,7 +300,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) uno::Reference< presentation::XPresentationSupplier > xPresSuppl( m_xComponent, uno::UNO_QUERY_THROW ); uno::Reference< presentation::XPresentation > xPres( xPresSuppl->getPresentation(), uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xProps( xPresSuppl->getPresentation(), uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( OUString( "IsFullScreen" ), uno::makeAny( sal_False ) ); + xProps->setPropertyValue("IsFullScreen", uno::makeAny( sal_False ) ); xPres->start(); } catch( const uno::Exception& ) diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index b3b7b525ed40..0ef5557213f8 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -405,15 +405,15 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName, throw RuntimeException(); break; case DISP_E_OVERFLOW: - throw CannotConvertException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr); break; case DISP_E_PARAMNOTFOUND: - throw IllegalArgumentException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw IllegalArgumentException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )) ; break; case DISP_E_TYPEMISMATCH: - throw CannotConvertException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::UNKNOWN, ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); break; case DISP_E_UNKNOWNINTERFACE: @@ -423,7 +423,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName, throw RuntimeException(); break; case DISP_E_PARAMNOTOPTIONAL: - throw CannotConvertException(OUString("call to OLE object failed"),static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed",static_cast<XInterface*>( static_cast<XWeak*>(this)) , TypeClass_UNKNOWN, FailReason::NO_DEFAULT_AVAILABLE, uArgErr); break; default: @@ -1174,7 +1174,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, } if( !bConvRet) // conversion of return or out parameter failed - throw CannotConvertException( OUString("Call to COM object failed. Conversion of return or out value failed"), + throw CannotConvertException("Call to COM object failed. Conversion of return or out value failed", Reference<XInterface>( static_cast<XWeak*>(this), UNO_QUERY ), TypeClass_UNKNOWN, FailReason::UNKNOWN, 0);// lookup error code // conversion of return or out parameter failed @@ -1198,15 +1198,15 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, throw IllegalArgumentException(); break; case DISP_E_OVERFLOW: - throw CannotConvertException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr); break; case DISP_E_PARAMNOTFOUND: - throw IllegalArgumentException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw IllegalArgumentException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); break; case DISP_E_TYPEMISMATCH: - throw CannotConvertException(OUString("call to OLE object failed"),static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed",static_cast<XInterface*>( static_cast<XWeak*>(this)) , TypeClass_UNKNOWN, FailReason::UNKNOWN, uArgErr); break; case DISP_E_UNKNOWNINTERFACE: @@ -1216,7 +1216,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, throw RuntimeException() ; break; case DISP_E_PARAMNOTOPTIONAL: - throw CannotConvertException(OUString("call to OLE object failed"), static_cast<XInterface*>( + throw CannotConvertException("call to OLE object failed", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::NO_DEFAULT_AVAILABLE, uArgErr); break; default: @@ -1525,7 +1525,7 @@ uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const OUString& aName, con "returned DISP_E_NONAMEDARGS",0, ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); break; case DISP_E_OVERFLOW: - throw CannotConvertException(OUString("[automation bridge] Call failed."), + throw CannotConvertException("[automation bridge] Call failed.", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr); break; @@ -2157,7 +2157,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, "returned DISP_E_NONAMEDARGS",0, ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); break; case DISP_E_OVERFLOW: - throw CannotConvertException(OUString("[automation bridge] Call failed."), + throw CannotConvertException("[automation bridge] Call failed.", static_cast<XInterface*>( static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr); break; diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index 404e438af421..b1f11d42c731 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -320,7 +320,7 @@ void XPlugin_Impl::handleSpecialArgs() try { uno::Reference< XPropertySet > xProp( m_xModel, UNO_QUERY ); - Any aProp = xProp->getPropertyValue( OUString( "URL" ) ); + Any aProp = xProp->getPropertyValue("URL"); aProp >>= aURL; } catch(const UnknownPropertyException &) @@ -390,7 +390,7 @@ void XPlugin_Impl::handleSpecialArgs() try { uno::Reference< XPropertySet > xProp( m_xModel, UNO_QUERY ); - Any aProp = xProp->getPropertyValue( OUString( "URL" ) ); + Any aProp = xProp->getPropertyValue("URL"); aProp >>= aURL; } catch(const UnknownPropertyException &) @@ -462,7 +462,7 @@ OUString XPlugin_Impl::getCreationURL() uno::Reference< com::sun::star::beans::XPropertySet > xPS( m_xModel, UNO_QUERY ); if( xPS.is() ) { - Any aValue = xPS->getPropertyValue( OUString("URL") ); + Any aValue = xPS->getPropertyValue("URL"); aValue >>= aRet; } return aRet; @@ -660,9 +660,9 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, { try { - xPS->setPropertyValue( OUString("URL"), aAny ); + xPS->setPropertyValue("URL", aAny ); aAny <<= mimetype; - xPS->setPropertyValue( OUString("TYPE"), aAny ); + xPS->setPropertyValue("TYPE", aAny ); } catch(...) { @@ -724,7 +724,7 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, { Any aAny; aAny <<= m_aDescription.Mimetype; - xPS->setPropertyValue( OUString("TYPE"), aAny ); + xPS->setPropertyValue("TYPE", aAny ); } catch(...) { @@ -1140,7 +1140,7 @@ PluginOutputStream::PluginOutputStream( XPlugin_Impl* pPlugin, sal_uInt32 len, sal_uInt32 lastmod ) : PluginStream( pPlugin, url, len, lastmod ), - m_xStream( pPlugin->getServiceManager()->createInstance( OUString("com.sun.star.io.DataOutputStream") ), UNO_QUERY ) + m_xStream( pPlugin->getServiceManager()->createInstance("com.sun.star.io.DataOutputStream"), UNO_QUERY ) { Guard< Mutex > aGuard( m_pPlugin->getMutex() ); diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 789d3a85acfa..28332e210695 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -512,15 +512,15 @@ namespace pcr if ( !( xModel.is() && xBinding.is() && !sFacetName.isEmpty() ) ) return InteractiveSelectionResult_Cancelled; - xDialogProps->setPropertyValue( OUString( "FormModel" ), makeAny( xModel ) ); - xDialogProps->setPropertyValue( OUString( "Binding" ), makeAny( xBinding ) ); - xDialogProps->setPropertyValue( OUString( "FacetName" ), makeAny( sFacetName ) ); + xDialogProps->setPropertyValue("FormModel", makeAny( xModel ) ); + xDialogProps->setPropertyValue("Binding", makeAny( xBinding ) ); + xDialogProps->setPropertyValue("FacetName", makeAny( sFacetName ) ); if ( !xDialog->execute() ) // cancelled return InteractiveSelectionResult_Cancelled; - _rData = xDialogProps->getPropertyValue( OUString( "ConditionValue" ) ); + _rData = xDialogProps->getPropertyValue("ConditionValue"); return InteractiveSelectionResult_ObtainedValue; } catch( const Exception& ) diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index aaa0e94c38ff..e35dfd7239a2 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2644,10 +2644,10 @@ namespace pcr // initialize the dialog Reference< XPropertySet > xDialogProps( xDialog, UNO_QUERY_THROW ); - xDialogProps->setPropertyValue( OUString( "QueryComposer" ), makeAny( xComposer ) ); - xDialogProps->setPropertyValue( OUString( "RowSet" ), makeAny( m_xComponent ) ); - xDialogProps->setPropertyValue( OUString( "ParentWindow" ), makeAny( VCLUnoHelper::GetInterface( impl_getDefaultDialogParent_nothrow() ) ) ); - xDialogProps->setPropertyValue( OUString( "Title" ), makeAny( sPropertyUIName ) ); + xDialogProps->setPropertyValue("QueryComposer", makeAny( xComposer ) ); + xDialogProps->setPropertyValue("RowSet", makeAny( m_xComponent ) ); + xDialogProps->setPropertyValue("ParentWindow", makeAny( VCLUnoHelper::GetInterface( impl_getDefaultDialogParent_nothrow() ) ) ); + xDialogProps->setPropertyValue("Title", makeAny( sPropertyUIName ) ); _rClearBeforeDialog.clear(); bSuccess = ( xDialog->execute() != 0 ); diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index e08f75bd8522..2d46ae622ccf 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -602,7 +602,7 @@ namespace pcr if ( !xPSI->hasPropertyByName( PROPERTY_ANCHOR ) ) return false; Reference< XServiceInfo > xSI( m_xAssociatedShape, UNO_QUERY_THROW ); - if ( xSI->supportsService( OUString( "com.sun.star.sheet.Shape" ) ) ) + if ( xSI->supportsService("com.sun.star.sheet.Shape") ) return true; } catch( const Exception& ) diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 079e6f0b8a15..f88455a5a543 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -516,7 +516,7 @@ namespace pcr { xKeys->getByIndex( key ) >>= xKey; sal_Int32 nKeyType = 0; - xKey->getPropertyValue( OUString( "Type" ) ) >>= nKeyType; + xKey->getPropertyValue("Type") >>= nKeyType; if ( nKeyType != KeyType::FOREIGN ) continue; @@ -540,7 +540,7 @@ namespace pcr if ( xKeyColumn.is() ) { xKeyColumn->getPropertyValue( PROPERTY_NAME ) >>= sColumnName; - xKeyColumn->getPropertyValue( OUString( "RelatedColumn" ) ) >>= sRelatedColumnName; + xKeyColumn->getPropertyValue("RelatedColumn") >>= sRelatedColumnName; _rLeftFields[ column ] = sColumnName; _rRightFields[ column ] = sRelatedColumnName; diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index d474093b93f3..4af7ef6426ed 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -103,7 +103,7 @@ namespace pcr if ( _rxContext.is() ) { Reference< XHierarchicalNameAccess > xTypeDescProv( - _rxContext->getValueByName( OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) ), + _rxContext->getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"), UNO_QUERY_THROW ); m_xTypeDescription = Reference< XEnumTypeDescription >( xTypeDescProv->getByHierarchicalName( m_aEnumType.getTypeName() ), UNO_QUERY_THROW ); @@ -380,7 +380,7 @@ namespace pcr Reference< XIntrospectionAccess > xIntrospectionAccess( xIntrospection->inspect( makeAny( _rxIntrospectee ) ) ); if ( !xIntrospectionAccess.is() ) - throw RuntimeException( OUString( "The introspection service could not handle the given component." ), *this ); + throw RuntimeException("The introspection service could not handle the given component.", *this ); m_xComponent = Reference< XPropertySet >( xIntrospectionAccess->queryAdapter( XPropertySet::static_type() ), UNO_QUERY_THROW ); // now that we survived so far, remember m_xComponentIntrospectionAccess diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index eb58101ec1d6..647a2e33e0c2 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -360,7 +360,7 @@ namespace pcr ::osl::MutexGuard aGuard( m_aMutex ); if (_rxFrame.is() && haveView()) - throw RuntimeException(OUString("Unable to attach to a second frame."),*this); + throw RuntimeException("Unable to attach to a second frame.",*this); // revoke as focus listener from the old container window stopContainerWindowListening(); @@ -376,7 +376,7 @@ namespace pcr VCLXWindow* pContainerWindow = VCLXWindow::GetImplementation(xContainerWindow); Window* pParentWin = pContainerWindow ? pContainerWindow->GetWindow() : NULL; if (!pParentWin) - throw RuntimeException(OUString("The frame is invalid. Unable to extract the container window."),*this); + throw RuntimeException("The frame is invalid. Unable to extract the container window.",*this); if ( Construct( pParentWin ) ) { diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index a68c8d0489d4..89228a0cc15d 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -240,7 +240,7 @@ void SAL_CALL StringRepresentation::initialize(const uno::Sequence< uno::Any > & if ( m_xContext.is() ) { uno::Reference< container::XHierarchicalNameAccess > xTypeDescProv( - m_xContext->getValueByName( OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) ), + m_xContext->getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"), uno::UNO_QUERY_THROW ); m_xTypeDescription.set( xTypeDescProv->getByHierarchicalName( sConstantName ), uno::UNO_QUERY_THROW ); diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index 58b262789c2a..d671ebcbf4a0 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -878,7 +878,7 @@ sal_Bool SAL_CALL ScannerManager::configureScannerAndScan( ScannerContext& rCont uno::Reference< XScannerManager > xThis( this ); if( rContext.InternalData != 0 || rContext.ScannerName != OUString( "TWAIN" ) ) - throw ScannerException( OUString( "Scanner does not exist" ), xThis, ScanError_InvalidContext ); + throw ScannerException("Scanner does not exist", xThis, ScanError_InvalidContext ); ReleaseData(); @@ -892,7 +892,7 @@ void SAL_CALL ScannerManager::startScan( const ScannerContext& rContext, const u uno::Reference< XScannerManager > xThis( this ); if( rContext.InternalData != 0 || rContext.ScannerName != OUString( "TWAIN" ) ) - throw ScannerException( OUString( "Scanner does not exist" ), xThis, ScanError_InvalidContext ); + throw ScannerException("Scanner does not exist", xThis, ScanError_InvalidContext ); ReleaseData(); aTwain.PerformTransfer( *this, rxListener ); @@ -905,7 +905,7 @@ ScanError SAL_CALL ScannerManager::getError( const ScannerContext& rContext ) uno::Reference< XScannerManager > xThis( this ); if( rContext.InternalData != 0 || rContext.ScannerName != OUString( "TWAIN" ) ) - throw ScannerException( OUString( "Scanner does not exist" ), xThis, ScanError_InvalidContext ); + throw ScannerException("Scanner does not exist", xThis, ScanError_InvalidContext ); return( ( aTwain.GetState() == TWAIN_STATE_CANCELED ) ? ScanError_ScanCanceled : ScanError_ScanErrorNone ); } diff --git a/fileaccess/source/FileAccess.cxx b/fileaccess/source/FileAccess.cxx index 00327b4047a4..28e3b695c561 100644 --- a/fileaccess/source/FileAccess.cxx +++ b/fileaccess/source/FileAccess.cxx @@ -341,7 +341,7 @@ sal_Bool OFileAccess::isReadOnly( const OUString& FileURL ) { INetURLObject aURLObj( FileURL, INET_PROT_FILE ); ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() ); - Any aRetAny = aCnt.getPropertyValue( OUString( "IsReadOnly" ) ); + Any aRetAny = aCnt.getPropertyValue("IsReadOnly"); sal_Bool bRet = sal_False; aRetAny >>= bRet; return bRet; @@ -354,7 +354,7 @@ void OFileAccess::setReadOnly( const OUString& FileURL, sal_Bool bReadOnly ) ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() ); Any aAny; aAny <<= bReadOnly; - aCnt.setPropertyValue( OUString( "IsReadOnly" ), aAny ); + aCnt.setPropertyValue("IsReadOnly", aAny ); } void OFileAccess::createFolder( const OUString& NewFolderURL ) @@ -457,7 +457,7 @@ DateTime OFileAccess::getDateTimeModified( const OUString& FileURL ) Reference< XCommandEnvironment > aCmdEnv; ucbhelper::Content aYoung( aFileObj.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv, comphelper::getProcessComponentContext() ); - aYoung.getPropertyValue( OUString("DateModified" ) ) >>= aDateTime; + aYoung.getPropertyValue("DateModified") >>= aDateTime; return aDateTime; } @@ -758,7 +758,7 @@ sal_Bool OFileAccess::isHidden( const OUString& FileURL ) { INetURLObject aURLObj( FileURL, INET_PROT_FILE ); ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() ); - Any aRetAny = aCnt.getPropertyValue( OUString( "IsHidden" ) ); + Any aRetAny = aCnt.getPropertyValue("IsHidden"); sal_Bool bRet = sal_False; aRetAny >>= bRet; return bRet; @@ -771,7 +771,7 @@ void OFileAccess::setHidden( const OUString& FileURL, sal_Bool bHidden ) ucbhelper::Content aCnt( aURLObj.GetMainURL( INetURLObject::NO_DECODE ), mxEnvironment, comphelper::getProcessComponentContext() ); Any aAny; aAny <<= bHidden; - aCnt.setPropertyValue( OUString( "IsHidden" ), aAny ); + aCnt.setPropertyValue("IsHidden", aAny ); } //================================================================================================== diff --git a/filter/source/graphic/GraphicExportDialog.cxx b/filter/source/graphic/GraphicExportDialog.cxx index 9d3af13b744b..d26339420811 100644 --- a/filter/source/graphic/GraphicExportDialog.cxx +++ b/filter/source/graphic/GraphicExportDialog.cxx @@ -126,15 +126,15 @@ void GraphicExportDialog::setSourceDocument( const Reference<XComponent>& xDocum if ( xServiceInfo.is() ) { - if ( xServiceInfo->supportsService( OUString( "com.sun.star.presentation.PresentationDocument" ) ) ) + if ( xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument") ) { aConfigPath = OUString( "Office.Impress/Layout/Other/MeasureUnit" ); } - else if ( xServiceInfo->supportsService( OUString( "com.sun.star.drawing.DrawingDocument" ) ) ) + else if ( xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument") ) { aConfigPath = OUString( "Office.Draw/Layout/Other/MeasureUnit" ); } - else if ( xServiceInfo->supportsService( OUString( "com.sun.star.text.TextDocument" ) ) ) + else if ( xServiceInfo->supportsService("com.sun.star.text.TextDocument") ) { aConfigPath = OUString( "Office.Writer/Layout/Other/MeasureUnit" ); } diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx index 4eb15f7d081b..b9118228a742 100644 --- a/filter/source/msfilter/mscodec.cxx +++ b/filter/source/msfilter/mscodec.cxx @@ -168,15 +168,15 @@ sal_Bool MSCodec_Xor95::InitCodec( const uno::Sequence< beans::NamedValue >& aDa sal_Bool bResult = sal_False; ::comphelper::SequenceAsHashMap aHashData( aData ); - uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault( OUString( "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; - mnKey = (sal_uInt16)aHashData.getUnpackedValueOrDefault( OUString( "XOR95BaseKey" ), (sal_Int16)0 ); - mnHash = (sal_uInt16)aHashData.getUnpackedValueOrDefault( OUString( "XOR95PasswordHash" ), (sal_Int16)0 ); + mnKey = (sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95BaseKey", (sal_Int16)0 ); + mnHash = (sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95PasswordHash", (sal_Int16)0 ); } else OSL_FAIL( "Unexpected key size!\n" ); @@ -293,12 +293,12 @@ sal_Bool MSCodec_Std97::InitCodec( const uno::Sequence< beans::NamedValue >& aDa sal_Bool bResult = sal_False; ::comphelper::SequenceAsHashMap aHashData( aData ); - uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault( OUString( "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( m_pDigestValue, aKey.getConstArray(), RTL_DIGEST_LENGTH_MD5 ); - uno::Sequence< sal_Int8 > aUniqueID = aHashData.getUnpackedValueOrDefault( OUString( "STD97UniqueID" ), uno::Sequence< sal_Int8 >() ); + uno::Sequence< sal_Int8 > aUniqueID = aHashData.getUnpackedValueOrDefault("STD97UniqueID", uno::Sequence< sal_Int8 >() ); if ( aUniqueID.getLength() == 16 ) { (void)memcpy( m_pDocId, aUniqueID.getConstArray(), 16 ); diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index 0088fc7b2c37..a8b56a02bf53 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -137,7 +137,7 @@ CustomToolBarImportHelper::createMenu( const OUString& rName, const uno::Referen uno::Reference< container::XIndexContainer > xPopup( xCfgManager->createSettings(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xPopup, uno::UNO_QUERY_THROW ); // set name for menubar - xProps->setPropertyValue( OUString("UIName"), uno::makeAny( rName ) ); + xProps->setPropertyValue("UIName", uno::makeAny( rName ) ); if ( xPopup.is() ) { uno::Sequence< beans::PropertyValue > aPopupMenu( 4 ); diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index cc922bcbed03..41307b7b6631 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -7358,7 +7358,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) aXFillBitmapItem.GetGraphicObject().GetUniqueID(), RTL_TEXTENCODING_ASCII_US); - xPropSet->setPropertyValue( OUString("FillBitmapURL"), Any( aURL ) ); + xPropSet->setPropertyValue("FillBitmapURL", Any( aURL ) ); const XFillBmpStretchItem aStretchItem(( const XFillBmpStretchItem&)pObj->GetMergedItem( XATTR_FILLBMP_STRETCH )); const XFillBmpTileItem aTileItem(( const XFillBmpTileItem&)pObj->GetMergedItem( XATTR_FILLBMP_TILE )); diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index 9218eb75483e..e2549afa5d22 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -995,12 +995,12 @@ sal_Bool T602ImportFilterDialog::OptionsDlg() ous[2] = getResStr(T602FILTER_STR_ENCODING_CP895); ous[3] = getResStr(T602FILTER_STR_ENCODING_KOI8CS2); any <<= ous; - xPSetCodeLB->setPropertyValue(OUString( "StringItemList" ), any); + xPSetCodeLB->setPropertyValue("StringItemList", any); Sequence < sal_Int16 > shr(1); shr[0] = ini.forcecode ? ((sal_Int16) ini.xcode) + 1 : 0; any <<= shr; - xPSetCodeLB->setPropertyValue(OUString( "SelectedItems" ), any); + xPSetCodeLB->setPropertyValue("SelectedItems", any); Reference < XInterface > AzbCheckBoxModel = _Inst("com.sun.star.awt.UnoControlCheckBoxModel"); Reference < XPropertySet > xPSetAzbukaCB( AzbCheckBoxModel, UNO_QUERY ); diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index b5c82909b07e..55b7d4dcd0e9 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -115,7 +115,7 @@ static bool checkComponent( Reference< XComponent >& rxComponent, const OUString if ( rServiceName == "com.sun.star.drawing.DrawingDocument" ) { // so if we want a draw we need to check if its not an impress - if( !xInfo->supportsService( OUString( "com.sun.star.presentation.PresentationDocument") ) ) + if( !xInfo->supportsService("com.sun.star.presentation.PresentationDocument") ) return true; } else @@ -475,8 +475,8 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) { try { - xGrfResolver = Reference< XGraphicObjectResolver >::query( xDocFac->createInstance( OUString( "com.sun.star.document.ExportGraphicObjectResolver" ) ) ); - xObjectResolver = Reference< XEmbeddedObjectResolver >::query( xDocFac->createInstance( OUString( "com.sun.star.document.ExportEmbeddedObjectResolver" ) ) ); + xGrfResolver = Reference< XGraphicObjectResolver >::query( xDocFac->createInstance("com.sun.star.document.ExportGraphicObjectResolver") ); + xObjectResolver = Reference< XEmbeddedObjectResolver >::query( xDocFac->createInstance("com.sun.star.document.ExportEmbeddedObjectResolver") ); } catch( const Exception& ) { diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index ed6eff22bead..6e5bb13b1358 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -522,7 +522,7 @@ void OComboBoxModel::loadData( bool _bForce ) // otherwise look for the alias Reference<XPropertySet> xFormProp(xForm,UNO_QUERY); Reference< XColumnsSupplier > xSupplyFields; - xFormProp->getPropertyValue(OUString("SingleSelectQueryComposer")) >>= xSupplyFields; + xFormProp->getPropertyValue("SingleSelectQueryComposer") >>= xSupplyFields; // search the field DBG_ASSERT(xSupplyFields.is(), "OComboBoxModel::loadData : invalid query composer !"); diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index 7ed3cbe9326e..2f183b5f96c6 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -620,7 +620,7 @@ void OEditModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm ) if ( !m_bMaxTextLenModified ) { sal_Int32 nFieldLen = 0; - xField->getPropertyValue(OUString("Precision") ) >>= nFieldLen; + xField->getPropertyValue("Precision") >>= nFieldLen; if (nFieldLen && nFieldLen <= USHRT_MAX) { diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index e7775267abb9..71f063b08834 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -405,7 +405,7 @@ namespace frm // create a query composer Reference< XColumnsSupplier > xSuppColumns; - xFormProps->getPropertyValue(OUString("SingleSelectQueryComposer")) >>= xSuppColumns; + xFormProps->getPropertyValue("SingleSelectQueryComposer") >>= xSuppColumns; const Reference< XConnection > xConnection( ::dbtools::getConnection( xForm ), UNO_SET_THROW ); const Reference< XNameAccess > xFieldNames( xSuppColumns->getColumns(), UNO_SET_THROW ); diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 991219bf7353..773c7a5603db 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -601,7 +601,7 @@ void OFormattedModel::updateFormatterNullDate() // calc the current NULL date Reference< XNumberFormatsSupplier > xSupplier( calcFormatsSupplier() ); if ( xSupplier.is() ) - xSupplier->getNumberFormatSettings()->getPropertyValue( OUString( "NullDate" ) ) >>= m_aNullDate; + xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= m_aNullDate; } //------------------------------------------------------------------------------ @@ -774,7 +774,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor Reference<XNumberFormatsSupplier> xSupplier = calcFormatsSupplier(); m_bNumeric = getBOOL( getPropertyValue( PROPERTY_TREATASNUMERIC ) ); m_nKeyType = getNumberFormatType( xSupplier->getNumberFormats(), nFormatKey ); - xSupplier->getNumberFormatSettings()->getPropertyValue( OUString("NullDate") ) >>= m_aNullDate; + xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= m_aNullDate; OEditBaseModel::onConnectedDbColumn( _rxForm ); } diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 138ea2009128..8cfdb4967550 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -880,7 +880,7 @@ bool OImageControlControl::impl_isEmptyGraphics_nothrow() const { Reference< XPropertySet > xModelProps( const_cast< OImageControlControl* >( this )->getModel(), UNO_QUERY_THROW ); Reference< XGraphic > xGraphic; - OSL_VERIFY( xModelProps->getPropertyValue( OUString( "Graphic" ) ) >>= xGraphic ); + OSL_VERIFY( xModelProps->getPropertyValue("Graphic") >>= xGraphic ); bIsEmpty = !xGraphic.is(); } catch( const Exception& ) diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 2abbf0925823..67b6f7c69ae9 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -765,7 +765,7 @@ namespace frm { // otherwise look for the alias Reference< XColumnsSupplier > xSupplyFields; - xFormProps->getPropertyValue(OUString("SingleSelectQueryComposer")) >>= xSupplyFields; + xFormProps->getPropertyValue("SingleSelectQueryComposer") >>= xSupplyFields; // search the field DBG_ASSERT(xSupplyFields.is(), "OListBoxModel::loadData : invalid query composer !"); @@ -891,7 +891,7 @@ namespace frm try { Reference< XPropertySet > xBoundField( xColumns->getByIndex( *aBoundColumn ), UNO_QUERY_THROW ); - OSL_VERIFY( xBoundField->getPropertyValue( OUString("Type") ) >>= m_nBoundColumnType ); + OSL_VERIFY( xBoundField->getPropertyValue("Type") >>= m_nBoundColumnType ); } catch( const Exception& ) { diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index f3b9f899602c..d089eef3b363 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -680,7 +680,7 @@ namespace frm ImageProducer *pImgProd = GetImageProducer(); // grab the ImageURL OUString sURL; - getPropertyValue( OUString("ImageURL") ) >>= sURL; + getPropertyValue("ImageURL") >>= sURL; if (!m_pMedium) { if ( ::svt::GraphicAccess::isSupportedURL( sURL ) ) diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index abbb105708f1..53ba7655d1aa 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -123,7 +123,7 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn break; Reference< XMultiServiceFactory > xDocFac( xDoc, UNO_QUERY_THROW ); - Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance( OUString("ooo.vba.VBACodeNameProvider") ), UNO_QUERY ); + Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance("ooo.vba.VBACodeNameProvider"), UNO_QUERY ); if ( !xNameQuery.is() ) break; @@ -146,7 +146,7 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn Reference< XPropertySet > xProps( xElement, UNO_QUERY_THROW ); OUString sServiceName; - xProps->getPropertyValue( OUString("DefaultControl") ) >>= sServiceName; + xProps->getPropertyValue("DefaultControl") >>= sServiceName; Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( m_xContext->getServiceManager()->createInstanceWithContext("ooo.vba.VBAToOOEventDesc", m_xContext), UNO_QUERY_THROW ); Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( sServiceName , sCodeName ); @@ -870,7 +870,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper bool bHandleVbaEvents = false; try { - _rxElement->getPropertyValue(OUString("GenerateVbaEvents") ) >>= bHandleVbaEvents; + _rxElement->getPropertyValue("GenerateVbaEvents") >>= bHandleVbaEvents; } catch( const Exception& ) { diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index d59bcdd03dc0..f2e2de68f670 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -1251,7 +1251,7 @@ namespace frm Reference< XMultiServiceFactory > xFactory( ::dbtools::getConnection( m_xCursor ), UNO_QUERY ); if ( xFactory.is() ) { - m_xParser.set( xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), UNO_QUERY ); + m_xParser.set( xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY ); OSL_ENSURE( m_xParser.is(), "FormOperations::impl_ensureInitializedParser_nothrow: factory did not create a parser for us!" ); } } diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx index 1d2c029808bb..ac631145bef3 100644 --- a/forms/source/xforms/datatyperepository.cxx +++ b/forms/source/xforms/datatyperepository.cxx @@ -157,7 +157,7 @@ namespace xforms Repository::iterator aTypePos = implLocate( typeName ); if ( aTypePos->second->getIsBasic() ) - throw VetoException( OUString( "This is a built-in type and cannot be removed." ), *this ); + throw VetoException("This is a built-in type and cannot be removed.", *this ); // TODO: localize this error message m_aRepository.erase( aTypePos ); diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx index 83b346074c39..27cc7efb075c 100644 --- a/fpicker/source/office/fpsmartcontent.cxx +++ b/fpicker/source/office/fpsmartcontent.cxx @@ -224,7 +224,7 @@ namespace svt try { OUString sTitle; - m_pContent->getPropertyValue( OUString( "Title" ) ) >>= sTitle; + m_pContent->getPropertyValue("Title") >>= sTitle; _rTitle = sTitle; // from here on, we definitely know that the content is valid diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx index 8717e9144692..6af193dfc383 100644 --- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx +++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx @@ -102,8 +102,8 @@ void SAL_CALL ModuleAcceleratorConfiguration::initialize(const css::uno::Sequenc } else { ::comphelper::SequenceAsHashMap lArgs(lArguments); - m_sModule = lArgs.getUnpackedValueOrDefault(OUString("ModuleIdentifier"), OUString()); - m_sLocale = lArgs.getUnpackedValueOrDefault(OUString("Locale") , OUString("x-default")); + m_sModule = lArgs.getUnpackedValueOrDefault("ModuleIdentifier", OUString()); + m_sLocale = lArgs.getUnpackedValueOrDefault("Locale", OUString("x-default")); } if (m_sModule.isEmpty()) diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx index 974a8d1b7207..a4f58f7ba78c 100644 --- a/framework/source/fwe/classes/actiontriggercontainer.cxx +++ b/framework/source/fwe/classes/actiontriggercontainer.cxx @@ -81,7 +81,7 @@ throw ( ::com::sun::star::uno::Exception, RuntimeException) else if ( aServiceSpecifier.equalsAscii( SERVICENAME_ACTIONTRIGGERSEPARATOR )) return (OWeakObject *)( new ActionTriggerSeparatorPropertySet()); else - throw com::sun::star::uno::RuntimeException( OUString( "Unknown service specifier!" ), (OWeakObject *)this ); + throw com::sun::star::uno::RuntimeException("Unknown service specifier!", (OWeakObject *)this ); } diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index 3996d6d87374..6f67b8a14e03 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -102,7 +102,7 @@ throw ( Exception, RuntimeException ) else if ( aServiceSpecifier.equalsAscii( SERVICENAME_ACTIONTRIGGERSEPARATOR )) return (OWeakObject *)( new ActionTriggerSeparatorPropertySet()); else - throw com::sun::star::uno::RuntimeException( OUString( "Unknown service specifier!" ), (OWeakObject *)this ); + throw com::sun::star::uno::RuntimeException("Unknown service specifier!", (OWeakObject *)this ); } Reference< XInterface > SAL_CALL RootActionTriggerContainer::createInstanceWithArguments( const OUString& ServiceSpecifier, const Sequence< Any >& /*Arguments*/ ) diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx index 96149e4338d2..782eb2447f4a 100644 --- a/framework/source/fwe/helper/actiontriggerhelper.cxx +++ b/framework/source/fwe/helper/actiontriggerhelper.cxx @@ -74,13 +74,13 @@ void GetMenuItemAttributes( Reference< XPropertySet > xActionTriggerPropertySet, try { // mandatory properties - a = xActionTriggerPropertySet->getPropertyValue( OUString( "Text" ) ); + a = xActionTriggerPropertySet->getPropertyValue("Text"); a >>= aMenuLabel; - a = xActionTriggerPropertySet->getPropertyValue( OUString( "CommandURL" ) ); + a = xActionTriggerPropertySet->getPropertyValue("CommandURL"); a >>= aCommandURL; - a = xActionTriggerPropertySet->getPropertyValue( OUString( "Image" ) ); + a = xActionTriggerPropertySet->getPropertyValue("Image"); a >>= xBitmap; - a = xActionTriggerPropertySet->getPropertyValue( OUString( "SubContainer" ) ); + a = xActionTriggerPropertySet->getPropertyValue("SubContainer"); a >>= xSubContainer; } catch (const Exception&) @@ -90,7 +90,7 @@ void GetMenuItemAttributes( Reference< XPropertySet > xActionTriggerPropertySet, // optional properties try { - a = xActionTriggerPropertySet->getPropertyValue( OUString( "HelpURL" ) ); + a = xActionTriggerPropertySet->getPropertyValue("HelpURL"); a >>= aHelpURL; } catch (const Exception&) @@ -260,7 +260,7 @@ Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* p // Retrieve the menu attributes and set them in our PropertySet OUString aLabel = pMenu->GetItemText( nItemId ); a <<= aLabel; - xPropSet->setPropertyValue( OUString( "Text" ), a ); + xPropSet->setPropertyValue("Text", a ); OUString aCommandURL = pMenu->GetItemCommand( nItemId ); @@ -271,7 +271,7 @@ Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* p } a <<= aCommandURL; - xPropSet->setPropertyValue( OUString( "CommandURL" ), a ); + xPropSet->setPropertyValue("CommandURL", a ); Image aImage = pMenu->GetItemImage( nItemId ); if ( !!aImage ) @@ -279,7 +279,7 @@ Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* p // We use our own optimized XBitmap implementation Reference< XBitmap > xBitmap( static_cast< cppu::OWeakObject* >( new ImageWrapper( aImage )), UNO_QUERY ); a <<= xBitmap; - xPropSet->setPropertyValue( OUString( "Image" ), a ); + xPropSet->setPropertyValue("Image", a ); } } catch (const Exception&) @@ -351,7 +351,7 @@ void FillActionTriggerContainerWithMenu( const Menu* pMenu, Reference< XIndexCon Reference< XIndexContainer > xSubContainer = CreateActionTriggerContainer( rActionTriggerContainer ); a <<= xSubContainer; - xPropSet->setPropertyValue( OUString( "SubContainer" ), a ); + xPropSet->setPropertyValue("SubContainer", a ); FillActionTriggerContainerWithMenu( pPopupMenu, xSubContainer ); } } diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx index e3c1de422067..40d09c187181 100644 --- a/framework/source/fwe/helper/undomanagerhelper.cxx +++ b/framework/source/fwe/helper/undomanagerhelper.cxx @@ -673,7 +673,7 @@ namespace framework ? rUndoManager.GetUndoActionCount( IUndoManager::TopLevel ) : rUndoManager.GetRedoActionCount( IUndoManager::TopLevel ); if ( nElements == 0 ) - throw EmptyUndoStackException( OUString( "stack is empty" ), getXUndoManager() ); + throw EmptyUndoStackException("stack is empty", getXUndoManager() ); aGuard.clear(); // <--- SYNCHRONIZED diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 97ec8ce35ca2..8ffd7a20587b 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -262,7 +262,7 @@ throw( SAXException, RuntimeException ) { try { - xPropSet->setPropertyValue( OUString( "UIName" ), makeAny( aUIName ) ); + xPropSet->setPropertyValue("UIName", makeAny( aUIName ) ); } catch ( const UnknownPropertyException& ) { @@ -699,7 +699,7 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw { try { - xPropSet->getPropertyValue( OUString( "UIName" )) >>= aUIName; + xPropSet->getPropertyValue("UIName") >>= aUIName; } catch ( const UnknownPropertyException& ) { diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index da7085f63aeb..e3a2defc1dda 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -154,7 +154,7 @@ ConstItemContainer::ConstItemContainer( const Reference< XIndexAccess >& rSource Reference< XPropertySet > xPropSet( rSourceContainer, UNO_QUERY ); if ( xPropSet.is() ) { - xPropSet->getPropertyValue( OUString( "UIName" )) >>= m_aUIName; + xPropSet->getPropertyValue("UIName") >>= m_aUIName; } } catch ( const Exception& ) diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index 9063fbee5b3e..047abd88bc29 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -94,7 +94,7 @@ RootItemContainer::RootItemContainer( const Reference< XIndexAccess >& rSourceCo Reference< XPropertySet > xPropSet( rSourceContainer, UNO_QUERY ); if ( xPropSet.is() ) { - xPropSet->getPropertyValue( OUString( "UIName" )) >>= m_aUIName; + xPropSet->getPropertyValue("UIName") >>= m_aUIName; } } catch ( const Exception& ) diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx index 64421ce7b377..af078dc26b9f 100644 --- a/framework/source/helper/oframes.cxx +++ b/framework/source/helper/oframes.cxx @@ -262,7 +262,7 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex ) throw( IndexOutOfBoundsExce sal_uInt32 nCount = m_pFrameContainer->getCount(); if ( nIndex < 0 || ( sal::static_int_cast< sal_uInt32 >( nIndex ) >= nCount )) - throw IndexOutOfBoundsException( OUString("OFrames::getByIndex - Index out of bounds"), + throw IndexOutOfBoundsException("OFrames::getByIndex - Index out of bounds", (OWeakObject *)this ); // Set default return value. diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index bb04155f389d..e9fa7cb0e89c 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -195,7 +195,7 @@ void LayoutManager::impl_clearUpMenuBar() { try { - xPropSet->getPropertyValue( OUString( "XMenuBar" )) >>= xMenuBar; + xPropSet->getPropertyValue("XMenuBar") >>= xMenuBar; } catch (const beans::UnknownPropertyException&) { @@ -640,7 +640,7 @@ void LayoutManager::implts_writeWindowStateData( const OUString& aName, const UI try { // Check persistent flag of the user interface element - xPropSet->getPropertyValue( OUString( "Persistent" )) >>= bPersistent; + xPropSet->getPropertyValue("Persistent") >>= bPersistent; } catch (const beans::UnknownPropertyException&) { @@ -1495,7 +1495,7 @@ throw (RuntimeException) { try { - xPropSet->getPropertyValue( OUString( "XMenuBar" )) >>= xMenuBar; + xPropSet->getPropertyValue("XMenuBar") >>= xMenuBar; } catch (const beans::UnknownPropertyException&) { diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 4491671f34a5..670c2a4f2f0b 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1596,7 +1596,7 @@ void ToolbarLayoutManager::implts_writeWindowStateData( const UIElement& rElemen try { // Check persistent flag of the user interface element - xPropSet->getPropertyValue( OUString( "Persistent" )) >>= bPersistent; + xPropSet->getPropertyValue("Persistent") >>= bPersistent; } catch (const beans::UnknownPropertyException&) { @@ -3888,7 +3888,7 @@ throw (uno::RuntimeException) xPropSet = uno::Reference< beans::XPropertySet >( xCfgMgr->getSettings( rEvent.ResourceURL, sal_False ), uno::UNO_QUERY ); if ( xPropSet.is() ) - xPropSet->getPropertyValue( OUString( "UIName" )) >>= aUIName; + xPropSet->getPropertyValue("UIName") >>= aUIName; } catch (const container::NoSuchElementException&) { diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 9af8eb7d3aa6..24096470b5f0 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -715,7 +715,7 @@ void SAL_CALL AutoRecovery::addStatusListener(const css::uno::Reference< css::fr throw(css::uno::RuntimeException) { if (!xListener.is()) - throw css::uno::RuntimeException(OUString("Invalid listener reference."), static_cast< css::frame::XDispatch* >(this)); + throw css::uno::RuntimeException("Invalid listener reference.", static_cast< css::frame::XDispatch* >(this)); // container is threadsafe by using a shared mutex! m_lListener.addInterface(aURL.Complete, xListener); @@ -750,7 +750,7 @@ void SAL_CALL AutoRecovery::removeStatusListener(const css::uno::Reference< css: throw(css::uno::RuntimeException) { if (!xListener.is()) - throw css::uno::RuntimeException(OUString("Invalid listener reference."), static_cast< css::frame::XDispatch* >(this)); + throw css::uno::RuntimeException("Invalid listener reference.", static_cast< css::frame::XDispatch* >(this)); // container is threadsafe by using a shared mutex! m_lListener.removeInterface(aURL.Complete, xListener); } diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx index 9600598ae2dc..514f9dd11217 100644 --- a/framework/source/services/license.cxx +++ b/framework/source/services/license.cxx @@ -255,7 +255,7 @@ css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::Na // if we find a date there, compare it to baseinstall license date OUString aAcceptDate; - if (pset->getPropertyValue(OUString("ooLicenseAcceptDate")) >>= aAcceptDate) + if (pset->getPropertyValue("ooLicenseAcceptDate") >>= aAcceptDate) { // get LicenseFileDate from base install OUString aLicenseURL = aLicensePath; @@ -290,7 +290,7 @@ css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::Na // write org.openoffice.Setup/ooLicenseAcceptDate aAcceptDate = _getCurrentDateString(); - pset->setPropertyValue(OUString("ooLicenseAcceptDate"), makeAny(aAcceptDate)); + pset->setPropertyValue("ooLicenseAcceptDate", makeAny(aAcceptDate)); Reference< XChangesBatch >(pset, UNO_QUERY_THROW)->commitChanges(); // enable quickstarter diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx index cc748de85248..4889ff281b84 100644 --- a/framework/source/services/taskcreatorsrv.cxx +++ b/framework/source/services/taskcreatorsrv.cxx @@ -247,7 +247,7 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai css::uno::Reference< css::awt::XWindowPeer > xPeer = xToolkit->createWindow( aDescriptor ); css::uno::Reference< css::awt::XWindow > xWindow ( xPeer, css::uno::UNO_QUERY ); if ( ! xWindow.is()) - throw css::uno::Exception(OUString("TaskCreator service was not able to create suitable frame window."), + throw css::uno::Exception("TaskCreator service was not able to create suitable frame window.", static_cast< ::cppu::OWeakObject* >(this)); if (bTopWindow) xPeer->setBackground(::svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor); diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index fd7a4eb759cd..fa3bf1a31a03 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -773,7 +773,7 @@ void ImageManagerImpl::initialize( const Sequence< Any >& aArguments ) if ( xPropSet.is() ) { long nOpenMode = 0; - if ( xPropSet->getPropertyValue( OUString( "OpenMode" )) >>= nOpenMode ) + if ( xPropSet->getPropertyValue("OpenMode") >>= nOpenMode ) m_bReadOnly = !( nOpenMode & ElementModes::WRITE ); } } diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 270473c05fca..dfadbe57429a 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -810,8 +810,8 @@ void SAL_CALL ModuleUIConfigurationManager::initialize( const Sequence< Any >& a if ( !m_bInitialized ) { ::comphelper::SequenceAsHashMap lArgs(aArguments); - m_aModuleIdentifier = lArgs.getUnpackedValueOrDefault(OUString("ModuleIdentifier"), OUString()); - m_aModuleShortName = lArgs.getUnpackedValueOrDefault(OUString("ModuleShortName"), OUString()); + m_aModuleIdentifier = lArgs.getUnpackedValueOrDefault("ModuleIdentifier", OUString()); + m_aModuleShortName = lArgs.getUnpackedValueOrDefault("ModuleShortName", OUString()); for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) { @@ -847,7 +847,7 @@ void SAL_CALL ModuleUIConfigurationManager::initialize( const Sequence< Any >& a if ( xPropSet.is() ) { long nOpenMode = 0; - Any a = xPropSet->getPropertyValue( OUString( "OpenMode" )); + Any a = xPropSet->getPropertyValue("OpenMode"); if ( a >>= nOpenMode ) m_bReadOnly = !( nOpenMode & ElementModes::WRITE ); } diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 29d9d88229e6..82367ab6957c 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -1137,7 +1137,7 @@ void SAL_CALL UIConfigurationManager::setStorage( const Reference< XStorage >& S try { long nOpenMode = 0; - Any a = xPropSet->getPropertyValue( OUString( "OpenMode" )); + Any a = xPropSet->getPropertyValue("OpenMode"); if ( a >>= nOpenMode ) m_bReadOnly = !( nOpenMode & ElementModes::WRITE ); } diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index 2d8d036b97d4..0e97c0fcd3fe 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -104,7 +104,7 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra try { Reference< XNameContainer > xNameContainer; - if ( xStyleFamilies->getByName( OUString( "PageStyles" )) >>= xNameContainer ) + if ( xStyleFamilies->getByName("PageStyles") >>= xNameContainer ) { Sequence< OUString > aSeqNames = xNameContainer->getElementNames(); diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 6cdf841bdd34..12a56d083f13 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -605,7 +605,7 @@ void StatusBarManager::DataChanged( const DataChangedEvent& rDCEvt ) css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; css::uno::Reference< css::beans::XPropertySet > xPropSet( m_xFrame, css::uno::UNO_QUERY ); if ( xPropSet.is() ) - xPropSet->getPropertyValue( OUString( "LayoutManager" )) >>= xLayoutManager; + xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; if ( xLayoutManager.is() ) { aGuard.unlock(); diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 5bd44ee752e7..5f1637b516d0 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -163,7 +163,7 @@ static ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager { try { - xPropSet->getPropertyValue( OUString( "LayoutManager" )) >>= xLayoutManager; + xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; } catch (const RuntimeException&) { @@ -443,7 +443,7 @@ void ToolBarManager::UpdateControllers() Reference< XLayoutManager > xLayoutManager; Reference< XPropertySet > xFramePropSet( m_xFrame, UNO_QUERY ); if ( xFramePropSet.is() ) - a = xFramePropSet->getPropertyValue( OUString( "LayoutManager" )); + a = xFramePropSet->getPropertyValue("LayoutManager"); a >>= xLayoutManager; Reference< XDockableWindow > xDockable( VCLUnoHelper::GetInterface( m_pToolBar ), UNO_QUERY ); if ( xLayoutManager.is() && xDockable.is() ) @@ -1095,7 +1095,7 @@ void ToolBarManager::CreateControllers() try { sal_Bool bSupportVisible = sal_True; - Any a( xPropSet->getPropertyValue( OUString( "SupportsVisible" )) ); + Any a( xPropSet->getPropertyValue("SupportsVisible") ); a >>= bSupportVisible; if (bSupportVisible) { @@ -1463,7 +1463,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine try { OUString aUIName; - xPropSet->getPropertyValue( OUString( "UIName" )) >>= aUIName; + xPropSet->getPropertyValue("UIName") >>= aUIName; if ( !aUIName.isEmpty() ) m_pToolBar->SetText( aUIName ); } @@ -1987,7 +1987,7 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) if ( xPropSet.is() ) { Reference< XUIConfigurationPersistence > xUICfgMgr; - if (( xPropSet->getPropertyValue( OUString( "ConfigurationSource" )) >>= xUICfgMgr ) && ( xUICfgMgr.is() )) + if (( xPropSet->getPropertyValue("ConfigurationSource") >>= xUICfgMgr ) && ( xUICfgMgr.is() )) xUICfgMgr->store(); } } diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 39cfd555bccb..56bf0f14ab08 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -113,7 +113,7 @@ Reference< XLayoutManager > getLayoutManagerFromFrame( const Reference< XFrame > try { - xPropSet->getPropertyValue( OUString( "LayoutManager" )) >>= xLayoutManager; + xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; } catch ( const UnknownPropertyException& ) { @@ -296,8 +296,8 @@ Sequence< Sequence< com::sun::star::beans::PropertyValue > > ToolbarsMenuControl { OUString aResName; sal_Int16 nType( -1 ); - xPropSet->getPropertyValue( OUString( "Type" )) >>= nType; - xPropSet->getPropertyValue( OUString( "ResourceURL" )) >>= aResName; + xPropSet->getPropertyValue("Type") >>= nType; + xPropSet->getPropertyValue("ResourceURL") >>= aResName; if (( nType == ::com::sun::star::ui::UIElementType::TOOLBAR ) && !aResName.isEmpty() ) @@ -677,7 +677,7 @@ void SAL_CALL ToolbarsMenuController::itemSelected( const css::awt::MenuEvent& r { try { - xPropSet->setPropertyValue( OUString( "RefreshContextToolbarVisibility" ), makeAny( sal_True )); + xPropSet->setPropertyValue("RefreshContextToolbarVisibility", makeAny( sal_True )); } catch ( const RuntimeException& ) { diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index 2a184523155f..cabe884a59ce 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -153,7 +153,7 @@ CollatorImpl::createCollator(const lang::Locale& rLocale, const OUString& servic } } Reference < XInterface > xI = - m_xContext->getServiceManager()->createInstanceWithContext( OUString("com.sun.star.i18n.Collator_") + serviceName, m_xContext ); + m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.i18n.Collator_" + serviceName, m_xContext ); if (xI.is()) { Reference < XCollator > xC; diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx index 780741e06a62..0640e259b183 100644 --- a/include/vbahelper/vbacollectionimpl.hxx +++ b/include/vbahelper/vbacollectionimpl.hxx @@ -240,7 +240,7 @@ protected: virtual css::uno::Any getItemByStringIndex( const OUString& sIndex ) throw (css::uno::RuntimeException) { if ( !m_xNameAccess.is() ) - throw css::uno::RuntimeException( OUString( "ScVbaCollectionBase string index access not supported by this object" ), css::uno::Reference< css::uno::XInterface >() ); + throw css::uno::RuntimeException("ScVbaCollectionBase string index access not supported by this object", css::uno::Reference< css::uno::XInterface >() ); if( mbIgnoreCase ) { @@ -260,7 +260,7 @@ protected: virtual css::uno::Any getItemByIntIndex( const sal_Int32 nIndex ) throw (css::uno::RuntimeException) { if ( !m_xIndexAccess.is() ) - throw css::uno::RuntimeException( OUString( "ScVbaCollectionBase numeric index access not supported by this object" ), css::uno::Reference< css::uno::XInterface >() ); + throw css::uno::RuntimeException("ScVbaCollectionBase numeric index access not supported by this object", css::uno::Reference< css::uno::XInterface >() ); if ( nIndex <= 0 ) { throw css::lang::IndexOutOfBoundsException( diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx index 96b4ef3b0f51..00eb8857db21 100644 --- a/io/test/stm/datatest.cxx +++ b/io/test/stm/datatest.cxx @@ -142,7 +142,7 @@ void ODataStreamTest::testInvariant( if( info.is() ) { ERROR_ASSERT( info->supportsService( TestName ), "XServiceInfo test failed" ); - ERROR_ASSERT( ! info->supportsService( OUString("bla bluzb") ) , "XServiceInfo test failed" ); + ERROR_ASSERT( ! info->supportsService("bla bluzb") , "XServiceInfo test failed" ); } } @@ -694,7 +694,7 @@ void OObjectStreamTest::testInvariant( const OUString& TestName, if( info.is() ) { ERROR_ASSERT( info->supportsService( TestName ), "XServiceInfo test failed" ); - ERROR_ASSERT( ! info->supportsService( OUString("bla bluzb") ) , "XServiceInfo test failed" ); + ERROR_ASSERT( ! info->supportsService("bla bluzb") , "XServiceInfo test failed" ); } } @@ -812,57 +812,57 @@ sal_Bool compareMyPropertySet( Reference< XPropertySet > &r1 , Reference < XProp { sal_Bool b = sal_True; - if( r1->getPropertyValue( OUString("long") ).getValueType() == getCppuVoidType() || - r2->getPropertyValue( OUString("long") ).getValueType() == getCppuVoidType() ) { + if( r1->getPropertyValue("long").getValueType() == getCppuVoidType() || + r2->getPropertyValue("long").getValueType() == getCppuVoidType() ) { // one of the objects is not the correct propertyset ! fprintf( stderr, "compareMyPropertySet: 1\n" ); return sal_False; } - b = b && ( r1->getPropertyValue( OUString("long") ) == - r2->getPropertyValue( OUString("long") ) ); + b = b && ( r1->getPropertyValue("long") == + r2->getPropertyValue("long") ); if( ! b ) fprintf( stderr, "compareMyPropertySet: 2\n" ); - b = b && ( r1->getPropertyValue( OUString("float") ) == - r2->getPropertyValue( OUString("float") ) ); + b = b && ( r1->getPropertyValue("float") == + r2->getPropertyValue("float") ); if( ! b ){ float f1(0.0); float f2(0.0); - r1->getPropertyValue( OUString("float") ) >>= f1; - r2->getPropertyValue( OUString("float") ) >>= f2; + r1->getPropertyValue("float") >>= f1; + r2->getPropertyValue("float") >>= f2; fprintf( stderr, "compareMyPropertySet: %f %f 3\n",f1,f2 ); } - b = b && ( r1->getPropertyValue( OUString("double") ) == - r2->getPropertyValue( OUString("double" )) ); + b = b && ( r1->getPropertyValue("double") == + r2->getPropertyValue("double") ); if( ! b ) fprintf( stderr, "compareMyPropertySet: 4\n" ); sal_Bool b1(sal_False), b2(sal_False); - Any a =r1->getPropertyValue( OUString("bool") ); + Any a =r1->getPropertyValue("bool"); a >>= b1; - a = r2->getPropertyValue( OUString("bool") ); + a = r2->getPropertyValue("bool"); a >>= b2; b = b && ( (b1 && b2) || b1 == b2 ); if( ! b ) fprintf( stderr, "compareMyPropertySet: 5\n" ); -// b = b && r1->getPropertyValue( OUString("bool") ) == -// r2->getPropertyValue( OUString("bool") ) ); +// b = b && r1->getPropertyValue("bool") == +// r2->getPropertyValue("bool") ); - b = b && ( r1->getPropertyValue( OUString("byte") ) == - r2->getPropertyValue( OUString("byte") ) ); + b = b && ( r1->getPropertyValue("byte") == + r2->getPropertyValue("byte") ); if( ! b ) fprintf( stderr, "compareMyPropertySet: 6\n" ); - b = b && ( r1->getPropertyValue( OUString("char") ) == - r2->getPropertyValue( OUString("char") ) ); + b = b && ( r1->getPropertyValue("char") == + r2->getPropertyValue("char") ); if( ! b ) fprintf( stderr, "compareMyPropertySet: 7\n" ); - b = b && ( r1->getPropertyValue( OUString("string") ) == - r2->getPropertyValue( OUString("string") )); + b = b && ( r1->getPropertyValue("string") == + r2->getPropertyValue("string")); if( ! b ) fprintf( stderr, "compareMyPropertySet: 8\n" ); - Any o1 = r1->getPropertyValue( OUString("object") ); - Any o2 = r2->getPropertyValue( OUString("object") ); + Any o1 = r1->getPropertyValue("object"); + Any o2 = r2->getPropertyValue("object"); if( o1.getValueType() == getCppuType( (Reference<XPersistObject>*)0 ) ) { @@ -943,34 +943,34 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream > Any any; sal_Int32 i = 0x83482; any <<= i; - rProp->setPropertyValue( OUString( "long") , any ); + rProp->setPropertyValue("long", any ); float f = (float)42.23; any <<= f; - rProp->setPropertyValue( OUString( "float") , any ); + rProp->setPropertyValue("float", any ); double d = 233.321412; any <<= d; - rProp->setPropertyValue( OUString( "double") , any ); + rProp->setPropertyValue("double", any ); sal_Bool b = sal_True; any.setValue( &b , getCppuBooleanType() ); - rProp->setPropertyValue( OUString( "bool") , any ); + rProp->setPropertyValue("bool", any ); sal_Int8 by = 120; any <<= by; - rProp->setPropertyValue( OUString( "byte") , any ); + rProp->setPropertyValue("byte", any ); sal_Unicode c = 'h'; any.setValue( &c , getCppuCharType() ); - rProp->setPropertyValue( OUString( "char") , any ); + rProp->setPropertyValue("char", any ); OUString str( "hi du !" ); any <<= str; - rProp->setPropertyValue( OUString( "string") , any ); + rProp->setPropertyValue("string", any ); any <<= persistRef; - rProp->setPropertyValue( OUString( "object") , any ); + rProp->setPropertyValue("object", any ); // do read and write rOut->writeObject( persistRef ); @@ -981,8 +981,8 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream > ERROR_ASSERT( compareMyPropertySet( rProp , rPropRead ) , "objects has not been read properly !" ); // destroy selfreferences - rProp->setPropertyValue( OUString("object"), Any() ); - rPropRead->setPropertyValue( OUString("object"), Any() ); + rProp->setPropertyValue("object", Any() ); + rPropRead->setPropertyValue("object", Any() ); } { @@ -993,7 +993,7 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream > // buffering and marks work correctly for( int i = 0 ; i < 2000 ; i ++ ) { - Reference < XInterface > x = m_rFactory->createInstance(OUString("test.com.sun.star.io.PersistTest")); + Reference < XInterface > x = m_rFactory->createInstance("test.com.sun.star.io.PersistTest"); Reference< XPersistObject > persistRef( x , UNO_QUERY ); Reference < XPropertySet > rProp( persistRef , UNO_QUERY ); @@ -1002,39 +1002,39 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream > Any any; sal_Int32 i = 0x83482; any <<= i; - rProp->setPropertyValue( OUString( "long") , any ); + rProp->setPropertyValue("long", any ); float f = 42.23; any <<= f; - rProp->setPropertyValue( OUString( "float") , any ); + rProp->setPropertyValue("float", any ); double d = 233.321412; any <<= d; - rProp->setPropertyValue( OUString( "double") , any ); + rProp->setPropertyValue("double", any ); sal_Bool b = sal_True; any.setValue( &b , getCppuBooleanType() ); - rProp->setPropertyValue( OUString( "bool") , any ); + rProp->setPropertyValue("bool", any ); sal_Int8 by = 120; any <<= by; - rProp->setPropertyValue( OUString( "byte") , any ); + rProp->setPropertyValue("byte", any ); sal_Unicode c = 'h'; any.setValue( &c , getCppuCharType() ); - rProp->setPropertyValue( OUString( "char") , any ); + rProp->setPropertyValue("char", any ); OUString str( "hi du !" ); any <<= str; - rProp->setPropertyValue( OUString( "string") , any ); + rProp->setPropertyValue("string", any ); - x = m_rFactory->createInstance(OUString("test.com.sun.star.io.PersistTest")); + x = m_rFactory->createInstance("test.com.sun.star.io.PersistTest"); Reference <XPersistObject > persist2ndRef( x , UNO_QUERY ); // Note : persist2ndRef contains coincident values, but also coincident values must be // saved properly ! any <<= persist2ndRef; - rProp->setPropertyValue( OUString("object") , any ); + rProp->setPropertyValue("object", any ); // simply test, if markable operations and object operations do not interfere sal_Int32 nMark = markableOut->createMark(); diff --git a/io/test/stm/marktest.cxx b/io/test/stm/marktest.cxx index f4b94bb4444e..6730d2d49c85 100644 --- a/io/test/stm/marktest.cxx +++ b/io/test/stm/marktest.cxx @@ -131,7 +131,7 @@ sal_Int32 OMarkableOutputStreamTest::test( } else { - Reference < XInterface > x = m_rFactory->createInstance( OUString("com.sun.star.io.Pipe")); + Reference < XInterface > x = m_rFactory->createInstance("com.sun.star.io.Pipe"); Reference< XOutputStream > rPipeOutput( x , UNO_QUERY ); Reference < XInputStream > rPipeInput( x , UNO_QUERY ); @@ -498,7 +498,7 @@ sal_Int32 OMarkableInputStreamTest::test( testInvariant( TestName , TestObject ); } else { - Reference < XInterface > x = m_rFactory->createInstance( OUString("com.sun.star.io.Pipe")); + Reference < XInterface > x = m_rFactory->createInstance("com.sun.star.io.Pipe"); Reference< XOutputStream > rPipeOutput( x , UNO_QUERY ); Reference < XInputStream > rPipeInput( x , UNO_QUERY ); diff --git a/io/test/testconnection.cxx b/io/test/testconnection.cxx index 2b6369674c05..aa91a2aeb0b4 100644 --- a/io/test/testconnection.cxx +++ b/io/test/testconnection.cxx @@ -174,7 +174,7 @@ int SAL_CALL main( int argc, char * argv[] ) createRegistryServiceFactory( OUString( "applicat.rdb") ) ); Reference< XImplementationRegistration > xImplReg( - xMgr->createInstance( OUString("com.sun.star.registry.ImplementationRegistration") ), UNO_QUERY ); + xMgr->createInstance("com.sun.star.registry.ImplementationRegistration"), UNO_QUERY ); OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); OUString aLibName = @@ -195,7 +195,7 @@ int SAL_CALL main( int argc, char * argv[] ) OUString("com.sun.star.connection.Acceptor") ) , UNO_QUERY ); Reference < XConnector > rConnector( - xMgr->createInstance( OUString("com.sun.star.connection.Connector") ) , UNO_QUERY ); + xMgr->createInstance("com.sun.star.connection.Connector") , UNO_QUERY ); printf( "Testing sockets" ); @@ -210,7 +210,7 @@ int SAL_CALL main( int argc, char * argv[] ) // check, if errornous strings make any problem rAcceptor = Reference< XAcceptor > ( - xMgr->createInstance( OUString("com.sun.star.connection.Acceptor") ), + xMgr->createInstance("com.sun.star.connection.Acceptor"), UNO_QUERY ); try diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx index b415238713c7..99d2f4cdd26a 100644 --- a/mysqlc/source/mysqlc_databasemetadata.cxx +++ b/mysqlc/source/mysqlc_databasemetadata.cxx @@ -1495,7 +1495,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes() const char * table_types[] = {"TABLE", "VIEW"}; sal_Int32 requiredVersion[] = {0, 50000}; - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; rtl_TextEncoding encoding = m_rConnection.getConnectionEncoding(); @@ -1517,7 +1517,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo() throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getTypeInfo"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; @@ -1561,7 +1561,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCatalogs() { OSL_TRACE("ODatabaseMetaData::getCatalogs"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; try { @@ -1596,7 +1596,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getSchemas() { OSL_TRACE("ODatabaseMetaData::getSchemas"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; try { @@ -1641,7 +1641,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getColumnPrivileges"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), @@ -1684,7 +1684,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getColumns"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), sPattern(OUStringToOString(schemaPattern, m_rConnection.getConnectionEncoding()).getStr()), @@ -1809,7 +1809,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getProcedures"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), @@ -1854,7 +1854,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getVersionColumns"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; lcl_setRows_throw(xResultSet, 16,rRows); return xResultSet; @@ -1870,7 +1870,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getExportedKeys"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), sch(OUStringToOString(schema, m_rConnection.getConnectionEncoding()).getStr()), @@ -1911,7 +1911,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys( { OSL_TRACE("ODatabaseMetaData::getImportedKeys"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), @@ -1952,7 +1952,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getPrimaryKeys"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), @@ -1995,7 +1995,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getIndexInfo"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), @@ -2038,7 +2038,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getBestRowIdentifier"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), @@ -2079,7 +2079,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getTablePrivileges"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string cat(catalog.hasValue()? OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""), @@ -2144,7 +2144,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference( throw(SQLException, RuntimeException) { OSL_TRACE("ODatabaseMetaData::getCrossReference"); - Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance(OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY); + Reference< XResultSet > xResultSet(getOwnConnection().getDriver().getFactory()->createInstance("org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY); std::vector< std::vector< Any > > rRows; std::string primaryCat(primaryCatalog.hasValue()? OUStringToOString(getStringFromAny(primaryCatalog), m_rConnection.getConnectionEncoding()).getStr():""), diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx index 7a6a32640122..abd29776ba03 100644 --- a/mysqlc/source/mysqlc_driver.cxx +++ b/mysqlc/source/mysqlc_driver.cxx @@ -210,7 +210,7 @@ Reference< XConnection > SAL_CALL MysqlCDriver::connect(const OUString& url, con impl_initCppConn_lck_throw(); OSL_POSTCOND( cppDriver, "MySQLCDriver::connect: internal error." ); if ( !cppDriver ) - throw RuntimeException( OUString( "MySQLCDriver::connect: internal error." ), *this ); + throw RuntimeException("MySQLCDriver::connect: internal error.", *this ); } Reference< XConnection > xConn; diff --git a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx index 988f15e896ab..0fae160a15a9 100644 --- a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx +++ b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx @@ -123,7 +123,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) // gets the server component context as property of the office component factory Reference< XPropertySet > xPropSet( xInterface, UNO_QUERY ); - xPropSet->getPropertyValue( OUString("DefaultContext") ) >>= xComponentContext; + xPropSet->getPropertyValue("DefaultContext") >>= xComponentContext; // gets the service manager from the office Reference< XMultiComponentFactory > xMultiComponentFactoryServer( diff --git a/odk/examples/cpp/remoteclient/remoteclient.cxx b/odk/examples/cpp/remoteclient/remoteclient.cxx index c8886b006b65..36d90fe014b1 100644 --- a/odk/examples/cpp/remoteclient/remoteclient.cxx +++ b/odk/examples/cpp/remoteclient/remoteclient.cxx @@ -145,7 +145,7 @@ sal_Int32 PipeClientMain::run( const Sequence< OUString > & aArguments ) throw ( { try { Reference < XInterface > r = - m_xSMgr->createInstance( OUString("com.sun.star.bridge.UnoUrlResolver") ); + m_xSMgr->createInstance("com.sun.star.bridge.UnoUrlResolver"); Reference < XUnoUrlResolver > rResolver( r , UNO_QUERY ); // connect to the remote process and retrieve the initial object diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 3d84a94abc40..12f53e460fc5 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -633,7 +633,7 @@ Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescript #if USE_TLS_NSS // Retrieve the valid key so we can get its size later SequenceAsHashMap aHashData( aEncryptionData ); - Sequence<sal_Int8> validKey( aHashData.getUnpackedValueOrDefault( OUString("AES128EncryptionKey"), Sequence<sal_Int8>() ) ); + Sequence<sal_Int8> validKey( aHashData.getUnpackedValueOrDefault("AES128EncryptionKey", Sequence<sal_Int8>() ) ); PK11SlotInfo *aSlot( PK11_GetBestSlot( CKM_AES_ECB, NULL ) ); sal_uInt8 *key = new sal_uInt8[ validKey.getLength() ]; diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 49e234405da5..a79512bb6772 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -289,7 +289,7 @@ bool lcl_isSeriesAttachedToFirstAxis( sal_Int32 nAxisIndex = 0; Reference< beans::XPropertySet > xProp( xDataSeries, uno::UNO_QUERY_THROW ); if( xProp.is() ) - xProp->getPropertyValue( OUString( "AttachedAxisIndex" ) ) >>= nAxisIndex; + xProp->getPropertyValue("AttachedAxisIndex") >>= nAxisIndex; bResult = (0==nAxisIndex); } catch( const uno::Exception & ex ) @@ -465,7 +465,7 @@ OUString ChartExport::parseFormula( const OUString& rRange ) { try { - xParser.set( xSF->createInstance( OUString("com.sun.star.sheet.FormulaParser") ), UNO_QUERY ); + xParser.set( xSF->createInstance("com.sun.star.sheet.FormulaParser"), UNO_QUERY ); } catch( Exception& ) { @@ -477,12 +477,12 @@ OUString ChartExport::parseFormula( const OUString& rRange ) Reference< XPropertySet > xParserProps( xParser, uno::UNO_QUERY ); if( xParserProps.is() ) { - xParserProps->setPropertyValue( OUString("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) ); + xParserProps->setPropertyValue("FormulaConvention", uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) ); } uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) ); if( xParserProps.is() ) { - xParserProps->setPropertyValue( OUString("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) ); + xParserProps->setPropertyValue("FormulaConvention", uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) ); } aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) ); } @@ -910,7 +910,7 @@ void ChartExport::exportTitle( Reference< XShape > xShape ) Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY ); if( xPropSet.is()) { - xPropSet->getPropertyValue( OUString( "String" )) >>= sText; + xPropSet->getPropertyValue("String") >>= sText; } if( sText.isEmpty() ) return; @@ -927,7 +927,7 @@ void ChartExport::exportTitle( Reference< XShape > xShape ) // TODO: bodyPr const char* sWritingMode = NULL; sal_Bool bVertical = sal_False; - xPropSet->getPropertyValue( OUString( "StackedText" )) >>= bVertical; + xPropSet->getPropertyValue("StackedText") >>= bVertical; if( bVertical ) sWritingMode = "wordArtVert"; @@ -1416,7 +1416,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_ sal_Bool bJapaneseCandleSticks = sal_False; Reference< beans::XPropertySet > xCTProp( xChartType, uno::UNO_QUERY ); if( xCTProp.is()) - xCTProp->getPropertyValue( OUString("Japanese")) >>= bJapaneseCandleSticks; + xCTProp->getPropertyValue("Japanese") >>= bJapaneseCandleSticks; exportCandleStickSeries( xDSCnt->getDataSeries(), bJapaneseCandleSticks, nAttachedAxis ); return; @@ -1448,7 +1448,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_ { Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY ); if( xSeqProp.is()) - xSeqProp->getPropertyValue(OUString("Role")) >>= aRole; + xSeqProp->getPropertyValue("Role") >>= aRole; // "main" sequence if( aRole.equals( aLabelRole )) { diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx index cd2e2f988ef2..46c0d5971f23 100644 --- a/package/source/zipapi/XUnbufferedStream.cxx +++ b/package/source/zipapi/XUnbufferedStream.cxx @@ -79,7 +79,7 @@ XUnbufferedStream::XUnbufferedStream( } if (mnZipSize < 0) - throw ZipIOException(OUString("The stream seems to be broken!"), uno::Reference< XInterface >()); + throw ZipIOException("The stream seems to be broken!", uno::Reference< XInterface >()); sal_Bool bHaveEncryptData = ( rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0 ) ? sal_True : sal_False; sal_Bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? sal_True : sal_False; diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 06632c828f89..cb8fd95d2543 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -95,7 +95,7 @@ public: , nMembersSet (0) { if ( ! used ) - throw RuntimeException(OUString("pyuno._createUnoStructHelper failed to create new dictionary"), Reference< XInterface > ()); + throw RuntimeException("pyuno._createUnoStructHelper failed to create new dictionary", Reference< XInterface > ()); } ~fillStructState() { diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 96d8c15fc795..00252180764f 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -136,7 +136,7 @@ static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl ) if( ! globalDict.is() ) // FATAL ! { - throw RuntimeException( OUString( "can't find __main__ module" ), Reference< XInterface > ()); + throw RuntimeException("can't find __main__ module", Reference< XInterface > ()); } runtimeImpl = PyDict_GetItemString( globalDict.get() , "pyuno_runtime" ); } @@ -272,7 +272,7 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx ) c->xIntrospection = Introspection::create(ctx); - Any a = ctx->getValueByName(OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) ); + Any a = ctx->getValueByName("/singletons/com.sun.star.reflection.theTypeDescriptionManager"); a >>= c->xTdMgr; if( ! c->xTdMgr.is() ) throw RuntimeException( @@ -302,7 +302,7 @@ void Runtime::initialize( const Reference< XComponentContext > & ctx ) if( runtime.is() && impl->cargo->valid ) { - throw RuntimeException( OUString( "pyuno runtime has already been initialized before" ), + throw RuntimeException("pyuno runtime has already been initialized before", Reference< XInterface > () ); } PyRef keep( RuntimeImpl::create( ctx ) ); @@ -362,7 +362,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const { if( ! impl->cargo->valid ) { - throw RuntimeException( OUString( "pyuno runtime must be initialized before calling any2PyObject" ), + throw RuntimeException("pyuno runtime must be initialized before calling any2PyObject", Reference< XInterface > () ); } @@ -615,7 +615,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con { if( ! impl->cargo->valid ) { - throw RuntimeException( OUString( "pyuno runtime must be initialized before calling any2PyObject" ), + throw RuntimeException("pyuno runtime must be initialized before calling any2PyObject", Reference< XInterface > () ); } diff --git a/registry/test/testmerge.cxx b/registry/test/testmerge.cxx index f1b063c0d4e7..0982d28d1606 100644 --- a/registry/test/testmerge.cxx +++ b/registry/test/testmerge.cxx @@ -188,102 +188,102 @@ void test_merge() /////////////////////////////////////////////////////////////////////////// - REG_ENSURE(!rootKey.openKey(OUString("/stardiv/IchbineinMergeKey"), key1), "testMerge error 5"); + REG_ENSURE(!rootKey.openKey("/stardiv/IchbineinMergeKey", key1), "testMerge error 5"); - REG_ENSURE(!key1.openKey(OUString("MergeKey1"), mkey1), "testMerge error 6"); + REG_ENSURE(!key1.openKey("MergeKey1", mkey1), "testMerge error 6"); REG_ENSURE(!mkey1.closeKey(), "testMerge error 7"); - REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey1"), mkey1), "testMerge error 8"); + REG_ENSURE(!key1.openKey("/MergeKey1/MK1SubKey1", mkey1), "testMerge error 8"); REG_ENSURE(!mkey1.closeKey(), "testMerge error 9"); - REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey1/KeyWithLongValue"), mkey1), "testMerge error 10"); + REG_ENSURE(!key1.openKey("/MergeKey1/MK1SubKey1/KeyWithLongValue", mkey1), "testMerge error 10"); REG_ENSURE(!mkey1.closeKey(), "testMerge error 11"); - REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey2"), mkey1), "testMerge error 12"); + REG_ENSURE(!key1.openKey("/MergeKey1/MK1SubKey2", mkey1), "testMerge error 12"); REG_ENSURE(!mkey1.closeKey(), "testMerge error 13"); - REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey2/KeyWithStringValue"), mkey1), "testMerge error 14"); + REG_ENSURE(!key1.openKey("/MergeKey1/MK1SubKey2/KeyWithStringValue", mkey1), "testMerge error 14"); REG_ENSURE(!mkey1.closeKey(), "testMerge error 15"); - REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey3"), mkey1), "testMerge error 16"); + REG_ENSURE(!key1.openKey("/MergeKey1/MK1SubKey3", mkey1), "testMerge error 16"); REG_ENSURE(!mkey1.closeKey(), "testMerge error 17"); - REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue"), mkey1), "testMerge error 18"); + REG_ENSURE(!key1.openKey("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue", mkey1), "testMerge error 18"); REG_ENSURE(!mkey1.closeKey(), "testMerge error 19"); - REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey4"), mkey1), "testMerge error 20"); + REG_ENSURE(!key1.openKey("/MergeKey1/MK1SubKey4", mkey1), "testMerge error 20"); REG_ENSURE(!mkey1.closeKey(), "testMerge error 21"); - REG_ENSURE(!key1.openKey(OUString("/MergeKey1/MK1SubKey4/KeyWithBinaryValue"), mkey1), "testMerge error 22"); + REG_ENSURE(!key1.openKey("/MergeKey1/MK1SubKey4/KeyWithBinaryValue", mkey1), "testMerge error 22"); REG_ENSURE(!mkey1.closeKey(), "testMerge error 23"); REG_ENSURE(!key1.closeKey(), "testMerge error 24"); /////////////////////////////////////////////////////////////////////////// - REG_ENSURE(!rootKey.openKey(OUString("/stardiv/IchbineinMergeKey"), key2), "testMerge error 25"); + REG_ENSURE(!rootKey.openKey("/stardiv/IchbineinMergeKey", key2), "testMerge error 25"); - REG_ENSURE(!key2.openKey(OUString("MergeKey2"), mkey2), "testMerge error 26"); + REG_ENSURE(!key2.openKey("MergeKey2", mkey2), "testMerge error 26"); REG_ENSURE(!mkey2.closeKey(), "testMerge error 27"); - REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey1"), mkey2), "testMerge error 28"); + REG_ENSURE(!key2.openKey("/MergeKey2/MK2SubKey1", mkey2), "testMerge error 28"); REG_ENSURE(!mkey2.closeKey(), "testMerge error 29"); - REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey1/KeyWithBinaryValue"), mkey2), "testMerge error 30"); + REG_ENSURE(!key2.openKey("/MergeKey2/MK2SubKey1/KeyWithBinaryValue", mkey2), "testMerge error 30"); REG_ENSURE(!mkey2.closeKey(), "testMerge error 31"); - REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey2"), mkey2), "testMerge error 31"); + REG_ENSURE(!key2.openKey("/MergeKey2/MK2SubKey2", mkey2), "testMerge error 31"); REG_ENSURE(!mkey2.closeKey(), "testMerge error 33"); - REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue"), mkey2), "testMerge error 34"); + REG_ENSURE(!key2.openKey("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue", mkey2), "testMerge error 34"); REG_ENSURE(!mkey2.closeKey(), "testMerge error 35"); - REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey3"), mkey2), "testMerge error 36"); + REG_ENSURE(!key2.openKey("/MergeKey2/MK2SubKey3", mkey2), "testMerge error 36"); REG_ENSURE(!mkey2.closeKey(), "testMerge error 37"); - REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey3/KeyWithStringValue"), mkey2), "testMerge error 38"); + REG_ENSURE(!key2.openKey("/MergeKey2/MK2SubKey3/KeyWithStringValue", mkey2), "testMerge error 38"); REG_ENSURE(!mkey2.closeKey(), "testMerge error 39"); - REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey4"), mkey2), "testMerge error 40"); + REG_ENSURE(!key2.openKey("/MergeKey2/MK2SubKey4", mkey2), "testMerge error 40"); REG_ENSURE(!mkey2.closeKey(), "testMerge error 41"); - REG_ENSURE(!key2.openKey(OUString("/MergeKey2/MK2SubKey4/KeyWithLongValue"), mkey2), "testMerge error 42"); + REG_ENSURE(!key2.openKey("/MergeKey2/MK2SubKey4/KeyWithLongValue", mkey2), "testMerge error 42"); REG_ENSURE(!mkey2.closeKey(), "testMerge error 43"); REG_ENSURE(!key2.closeKey(), "testMerge error 44"); /////////////////////////////////////////////////////////////////////////// - REG_ENSURE(!rootKey.openKey(OUString("/stardiv/IchbineinMergeKey"), key1u2), "testMerge error 40"); + REG_ENSURE(!rootKey.openKey("/stardiv/IchbineinMergeKey", key1u2), "testMerge error 40"); - REG_ENSURE(!key1u2.openKey(OUString("MergeKey1u2"), mkey1u2), "testMerge error 41"); + REG_ENSURE(!key1u2.openKey("MergeKey1u2", mkey1u2), "testMerge error 41"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 42"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey11"), mkey1u2), "testMerge error 43"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK1SubKey11", mkey1u2), "testMerge error 43"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 44"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey11/KeyWithLongValue"), mkey1u2), "testMerge error 45"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK1SubKey11/KeyWithLongValue", mkey1u2), "testMerge error 45"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 46"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey12"), mkey1u2), "testMerge error 47"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK1SubKey12", mkey1u2), "testMerge error 47"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 48"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey12/KeyWithStringValue"), mkey1u2), "testMerge error 49"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK1SubKey12/KeyWithStringValue", mkey1u2), "testMerge error 49"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 50"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey13"), mkey1u2), "testMerge error 51"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK1SubKey13", mkey1u2), "testMerge error 51"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 52"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue"), mkey1u2), "testMerge error 53"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue", mkey1u2), "testMerge error 53"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 54"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey21"), mkey1u2), "testMerge error 55"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK2SubKey21", mkey1u2), "testMerge error 55"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 56"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue"), mkey1u2), "testMerge error 57"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue", mkey1u2), "testMerge error 57"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 58"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey22"), mkey1u2), "testMerge error 59"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK2SubKey22", mkey1u2), "testMerge error 59"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 60"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey22/KeyWithLongValue"), mkey1u2), "testMerge error 61"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK2SubKey22/KeyWithLongValue", mkey1u2), "testMerge error 61"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 62"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey23"), mkey1u2), "testMerge error 63"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK2SubKey23", mkey1u2), "testMerge error 63"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 64"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK2SubKey23/KeyWithStringValue"), mkey1u2), "testMerge error 65"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK2SubKey23/KeyWithStringValue", mkey1u2), "testMerge error 65"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 66"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK12SubKey1u2"), mkey1u2), "testMerge error 67"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK12SubKey1u2", mkey1u2), "testMerge error 67"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 68"); - REG_ENSURE(!key1u2.openKey(OUString("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue"), mkey1u2), "testMerge error 69"); + REG_ENSURE(!key1u2.openKey("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue", mkey1u2), "testMerge error 69"); REG_ENSURE(!mkey1u2.closeKey(), "testMerge error 70"); REG_ENSURE(!key1u2.closeKey(), "testMerge error 71"); @@ -295,7 +295,7 @@ void test_merge() sal_Int32 int32Value; sal_uInt8 *Value; - REG_ENSURE(!rootKey.openKey(OUString("/stardiv/IchbineinMergeKey"), key1), "testMerge error 72"); + REG_ENSURE(!rootKey.openKey("/stardiv/IchbineinMergeKey", key1), "testMerge error 72"); REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1/MK1SubKey1/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 73"); REG_ENSURE(valueType == RG_VALUETYPE_LONG && valueSize == sizeof(sal_Int32), "testMerge error 74"); diff --git a/registry/test/testregcpp.cxx b/registry/test/testregcpp.cxx index 87b06d04ce93..95adc988bc63 100644 --- a/registry/test/testregcpp.cxx +++ b/registry/test/testregcpp.cxx @@ -388,8 +388,8 @@ void test_registry_CppApi() REG_ENSURE(!key5.createKey(OUString("1"), key4), "test_registry_CppApi error 6b"); REG_ENSURE(!key4.createKey(OUString("2"), key3), "test_registry_CppApi error 6c"); - REG_ENSURE(!key5.openKey(OUString("1"), key4), "test_registry_CppApi error 6d"); - REG_ENSURE(!rootKey.openKey(OUString("/myThirdKey/1"), key4), "test_registry_CppApi error 6e"); + REG_ENSURE(!key5.openKey("1", key4), "test_registry_CppApi error 6d"); + REG_ENSURE(!rootKey.openKey("/myThirdKey/1", key4), "test_registry_CppApi error 6e"); REG_ENSURE(key4.getName() == "/myThirdKey/1", "test_registry_CppApi error 6f"); REG_ENSURE(!rootKey.createKey(OUString("myFourthKey"), key6), "test_registry_CppApi error 7"); @@ -426,22 +426,22 @@ void test_registry_CppApi() REG_ENSURE(!key7.closeKey(), "test_registry_CppApi error 7k1"); delete pSubKeyNames; - REG_ENSURE(!rootKey.openKey(OUString("/mySixthKey/myFirstLink"), key6), "test_registry_CppApi error 7l"); + REG_ENSURE(!rootKey.openKey("/mySixthKey/myFirstLink", key6), "test_registry_CppApi error 7l"); // REG_ENSURE(key6.getName() == "/myFourthKey/X", "test_registry_CppApi error 7m"); - REG_ENSURE(!rootKey.openKey(OUString("myFifthKey"), key6), "test_registry_CppApi error 7m1"); + REG_ENSURE(!rootKey.openKey("myFifthKey", key6), "test_registry_CppApi error 7m1"); REG_ENSURE(!key6.createLink(OUString("mySecondLink"), OUString("/mySixthKey/myFirstLink")), "test_registry_CppApi error 7m2"); - REG_ENSURE(!rootKey.openKey(OUString("/myFifthKey/mySecondLink"), key6), "test_registry_CppApi error 7m3"); + REG_ENSURE(!rootKey.openKey("/myFifthKey/mySecondLink", key6), "test_registry_CppApi error 7m3"); // REG_ENSURE(key6.getName() == "/myFourthKey/X", "test_registry_CppApi error 7m4"); REG_ENSURE(!rootKey.createKey(OUString("/myFifthKey/mySecondLink/myFirstLinkSubKey"), key7), "test_registry_CppApi error 7m5"); REG_ENSURE(key7.getName() == "/myFourthKey/X/myFirstLinkSubKey", "test_registry_CppApi error 7m6"); REG_ENSURE(!key7.createLink(OUString("myThirdLink"), OUString("/myFifthKey/mySecondLink")), "test_registry_CppApi error 7m7"); - REG_ENSURE(!rootKey.openKey(OUString("/myFourthKey/X/myFirstLinkSubKey/myThirdLink"), key7), "test_registry_CppApi error 7m8"); -// REG_ENSURE(!key7.openKey(OUString("/myFirstLinkSubKey/myThirdLink/myFirstLinkSubKey/myThirdLink"), key6), "test_registry_CppApi error 7m9"); + REG_ENSURE(!rootKey.openKey("/myFourthKey/X/myFirstLinkSubKey/myThirdLink", key7), "test_registry_CppApi error 7m8"); +// REG_ENSURE(!key7.openKey("/myFirstLinkSubKey/myThirdLink/myFirstLinkSubKey/myThirdLink", key6), "test_registry_CppApi error 7m9"); // REG_ENSURE(key7.getName() == "/myFourthKey/X", "test_registry_CppApi error 7m10"); REG_ENSURE(!key7.closeKey(), "test_registry_CppApi error 7m11"); @@ -451,7 +451,7 @@ void test_registry_CppApi() OUString("/myFourthKey/X/myFirstLinkSubKey/myThirdLink")), "test_registry_CppApi error 7m13"); -// REG_ENSURE(rootKey.openKey(OUString("/myFourthKey/X/myFirstLinkSubKey/myThirdLink"), key7) == REG_DETECT_RECURSION, +// REG_ENSURE(rootKey.openKey("/myFourthKey/X/myFirstLinkSubKey/myThirdLink", key7) == REG_DETECT_RECURSION, // "test_registry_CppApi error 7m14"); // REG_ENSURE(key7.closeKey() == REG_INVALID_KEY, "test_registry_CppApi error 7m11"); @@ -483,11 +483,11 @@ void test_registry_CppApi() REG_ENSURE(!rootKey.createKey(OUString("/TEST"), key8), "test_registry_CppApi error 8"); REG_ENSURE(!rootKey.createKey(OUString("/TEST/Child1"), key8), "test_registry_CppApi error 8a"); REG_ENSURE(!rootKey.createKey(OUString("/TEST/Child2"), key8), "test_registry_CppApi error 8a1"); - REG_ENSURE(!rootKey.openKey(OUString("/TEST"), key9), "test_registry_CppApi error 8b"); + REG_ENSURE(!rootKey.openKey("/TEST", key9), "test_registry_CppApi error 8b"); REG_ENSURE(!key8.closeKey() && !key9.closeKey(), "test_registry_CppApi error 8b1"); - REG_ENSURE(!rootKey.openKey(OUString("/TEST"), key8), "test_registry_CppApi error 8b"); + REG_ENSURE(!rootKey.openKey("/TEST", key8), "test_registry_CppApi error 8b"); REG_ENSURE(!key8.closeKey(), "test_registry_CppApi error 8c"); - REG_ENSURE(!rootKey.openKey(OUString("TEST"), key8), "test_registry_CppApi error 8c"); + REG_ENSURE(!rootKey.openKey("TEST", key8), "test_registry_CppApi error 8c"); REG_ENSURE(!key8.closeKey(), "test_registry_CppApi error 8d"); @@ -582,13 +582,13 @@ void test_registry_CppApi() REG_ENSURE(!rootKey.deleteKey(OUString("myFirstKey")), "test_registry_CppApi error 15"); REG_ENSURE(!key2.closeKey(), "test_registry_CppApi error 16"); - REG_ENSURE(!rootKey.openKey(OUString("mySecondKey"), key2), "test_registry_CppApi error 17"); + REG_ENSURE(!rootKey.openKey("mySecondKey", key2), "test_registry_CppApi error 17"); REG_ENSURE(!key5.closeKey(), "test_registry_CppApi error 18"); REG_ENSURE(!rootKey.deleteKey(OUString("myThirdKey")), "test_registry_CppApi error 19"); - REG_ENSURE(rootKey.openKey(OUString("myThirdKey"), key5), "test_registry_CppApi error 20"); + REG_ENSURE(rootKey.openKey("myThirdKey", key5), "test_registry_CppApi error 20"); REG_ENSURE(!key2.closeKey() && !rootKey.closeKey(), "test_registry_CppApi error 21"); @@ -648,7 +648,7 @@ void test_registry_CppApi() REG_ENSURE(!key3.closeKey(), "test_registry_CppApi error 43"); - REG_ENSURE(!rootKey.openKey(OUString("/allFromTest3/reg2FirstKey/reg2FirstSubKey"), key1), + REG_ENSURE(!rootKey.openKey("/allFromTest3/reg2FirstKey/reg2FirstSubKey", key1), "test_registry_CppApi error 43.a)"); REG_ENSURE(!rootKey.deleteKey(OUString("/allFromTest3/reg2FirstKey/reg2FirstSubKey")), "test_registry_CppApi error 44"); REG_ENSURE(key1.getValueInfo(OUString(), &valueType, &valueSize) == REG_INVALID_KEY, diff --git a/remotebridges/examples/officeclient.cxx b/remotebridges/examples/officeclient.cxx index 400459e8e081..f0821311b80d 100644 --- a/remotebridges/examples/officeclient.cxx +++ b/remotebridges/examples/officeclient.cxx @@ -145,7 +145,7 @@ sal_Int32 OfficeClientMain::run( const Sequence< OUString > & aArguments ) throw try { registerServices(); Reference < XInterface > r = - m_xSMgr->createInstance( OUString("com.sun.star.bridge.UnoUrlResolver") ); + m_xSMgr->createInstance("com.sun.star.bridge.UnoUrlResolver"); Reference < XUnoUrlResolver > rResolver( r , UNO_QUERY ); r = rResolver->resolve( aArguments.getConstArray()[0] ); diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx index 334991a6eb7a..c8c26b2b29f3 100644 --- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx +++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx @@ -144,7 +144,7 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl ) UNO_QUERY ); if (! xConnector.is()) - throw RuntimeException( OUString("no connector!" ), Reference< XInterface >() ); + throw RuntimeException("no connector!", Reference< XInterface >() ); Reference< XConnection > xConnection( xConnector->connect( aConnectDescr ) ); diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx index 9aa5090f07f6..61428aaa6106 100644 --- a/reportdesign/source/core/api/FormattedField.cxx +++ b/reportdesign/source/core/api/FormattedField.cxx @@ -262,7 +262,7 @@ uno::Reference< util::XNumberFormatsSupplier > SAL_CALL OFormattedField::getForm { uno::Reference< beans::XPropertySet> xProp(::dbtools::findDataSource(getParent()),uno::UNO_QUERY); if ( xProp.is() ) - m_xFormatsSupplier.set(xProp->getPropertyValue(OUString("NumberFormatsSupplier")),uno::UNO_QUERY); + m_xFormatsSupplier.set(xProp->getPropertyValue("NumberFormatsSupplier"),uno::UNO_QUERY); } } return m_xFormatsSupplier; diff --git a/reportdesign/source/core/api/Group.cxx b/reportdesign/source/core/api/Group.cxx index 353d3695e080..ef6e015b9118 100644 --- a/reportdesign/source/core/api/Group.cxx +++ b/reportdesign/source/core/api/Group.cxx @@ -193,7 +193,7 @@ uno::Reference< report::XSection > SAL_CALL OGroup::getFooter() throw (container void SAL_CALL OGroup::setGroupOn( ::sal_Int16 _groupon ) throw (lang::IllegalArgumentException, uno::RuntimeException) { if ( _groupon < report::GroupOn::DEFAULT || _groupon > report::GroupOn::INTERVAL ) - throwIllegallArgumentException(OUString("com::sun::star::report::GroupOn") + throwIllegallArgumentException("com::sun::star::report::GroupOn" ,*this ,1 ,m_xContext); @@ -220,7 +220,7 @@ void SAL_CALL OGroup::setGroupInterval( ::sal_Int32 _groupinterval ) throw (uno: void SAL_CALL OGroup::setKeepTogether( ::sal_Int16 _keeptogether ) throw (lang::IllegalArgumentException, uno::RuntimeException) { if ( _keeptogether < report::KeepTogether::NO || _keeptogether > report::KeepTogether::WITH_FIRST_DETAIL ) - throwIllegallArgumentException(OUString("com::sun::star::report::KeepTogether") + throwIllegallArgumentException("com::sun::star::report::KeepTogether" ,*this ,1 ,m_xContext); diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index e715ed56bc08..4e34b48a3a07 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -200,7 +200,7 @@ void lcl_setModelReadOnly(const uno::Reference< embed::XStorage >& _xStorage,::b uno::Reference<beans::XPropertySet> xProp(_xStorage,uno::UNO_QUERY); sal_Int32 nOpenMode = embed::ElementModes::READ; if ( xProp.is() ) - xProp->getPropertyValue(OUString("OpenMode")) >>= nOpenMode; + xProp->getPropertyValue("OpenMode") >>= nOpenMode; _rModel->SetReadOnly((nOpenMode & embed::ElementModes::WRITE) != embed::ElementModes::WRITE); } @@ -755,9 +755,9 @@ void OReportDefinition::init() if ( xStorProps.is()) { OUString sMediaType; - xStorProps->getPropertyValue( OUString("MediaType")) >>= sMediaType; + xStorProps->getPropertyValue("MediaType") >>= sMediaType; if ( sMediaType.isEmpty() ) - xStorProps->setPropertyValue( OUString("MediaType"),uno::makeAny(MIMETYPE_OASIS_OPENDOCUMENT_REPORT)); + xStorProps->setPropertyValue("MediaType",uno::makeAny(MIMETYPE_OASIS_OPENDOCUMENT_REPORT)); } m_pImpl->m_pObjectContainer.reset( new comphelper::EmbeddedObjectContainer(m_pImpl->m_xStorage , static_cast<cppu::OWeakObject*>(this) ) ); } @@ -917,7 +917,7 @@ void SAL_CALL OReportDefinition::setCaption( const OUString& _caption ) throw (u void SAL_CALL OReportDefinition::setGroupKeepTogether( ::sal_Int16 _groupkeeptogether ) throw (uno::RuntimeException) { if ( _groupkeeptogether < report::GroupKeepTogether::PER_PAGE || _groupkeeptogether > report::GroupKeepTogether::PER_COLUMN ) - throwIllegallArgumentException(OUString("com::sun::star::report::GroupKeepTogether") + throwIllegallArgumentException("com::sun::star::report::GroupKeepTogether" ,*this ,1 ,m_aProps->m_xContext); @@ -933,7 +933,7 @@ void SAL_CALL OReportDefinition::setGroupKeepTogether( ::sal_Int16 _groupkeeptog void SAL_CALL OReportDefinition::setPageHeaderOption( ::sal_Int16 _pageheaderoption ) throw (uno::RuntimeException) { if ( _pageheaderoption < report::ReportPrintOption::ALL_PAGES || _pageheaderoption > report::ReportPrintOption::NOT_WITH_REPORT_HEADER_FOOTER ) - throwIllegallArgumentException(OUString("com::sun::star::report::ReportPrintOption") + throwIllegallArgumentException("com::sun::star::report::ReportPrintOption" ,*this ,1 ,m_aProps->m_xContext); @@ -949,7 +949,7 @@ void SAL_CALL OReportDefinition::setPageHeaderOption( ::sal_Int16 _pageheaderopt void SAL_CALL OReportDefinition::setPageFooterOption( ::sal_Int16 _pagefooteroption ) throw (uno::RuntimeException) { if ( _pagefooteroption < report::ReportPrintOption::ALL_PAGES || _pagefooteroption > report::ReportPrintOption::NOT_WITH_REPORT_HEADER_FOOTER ) - throwIllegallArgumentException(OUString("com::sun::star::report::ReportPrintOption") + throwIllegallArgumentException("com::sun::star::report::ReportPrintOption" ,*this ,1 ,m_aProps->m_xContext); @@ -976,7 +976,7 @@ void SAL_CALL OReportDefinition::setCommand( const OUString& _command ) throw (u void SAL_CALL OReportDefinition::setCommandType( ::sal_Int32 _commandtype ) throw (uno::RuntimeException) { if ( _commandtype < sdb::CommandType::TABLE || _commandtype > sdb::CommandType::COMMAND ) - throwIllegallArgumentException(OUString("com::sun::star::sdb::CommandType") + throwIllegallArgumentException("com::sun::star::sdb::CommandType" ,*this ,1 ,m_aProps->m_xContext); @@ -1284,11 +1284,11 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u void OReportDefinition::fillArgs(::comphelper::MediaDescriptor& _aDescriptor) { uno::Sequence<beans::PropertyValue> aComponentData; - aComponentData = _aDescriptor.getUnpackedValueOrDefault(OUString("ComponentData"),aComponentData); + aComponentData = _aDescriptor.getUnpackedValueOrDefault("ComponentData",aComponentData); if ( aComponentData.getLength() && (!m_pImpl->m_xActiveConnection.is() || !m_pImpl->m_xNumberFormatsSupplier.is()) ) { ::comphelper::SequenceAsHashMap aComponentDataMap( aComponentData ); - m_pImpl->m_xActiveConnection = aComponentDataMap.getUnpackedValueOrDefault(OUString("ActiveConnection"),m_pImpl->m_xActiveConnection); + m_pImpl->m_xActiveConnection = aComponentDataMap.getUnpackedValueOrDefault("ActiveConnection",m_pImpl->m_xActiveConnection); m_pImpl->m_xNumberFormatsSupplier = dbtools::getNumberFormats(m_pImpl->m_xActiveConnection); } if ( !m_pImpl->m_xNumberFormatsSupplier.is() ) @@ -1297,7 +1297,7 @@ void OReportDefinition::fillArgs(::comphelper::MediaDescriptor& _aDescriptor) } lcl_stripLoadArguments( _aDescriptor, m_pImpl->m_aArgs ); OUString sCaption; - sCaption = _aDescriptor.getUnpackedValueOrDefault(OUString("DocumentTitle"),sCaption); + sCaption = _aDescriptor.getUnpackedValueOrDefault("DocumentTitle",sCaption); setCaption(sCaption); } // ----------------------------------------------------------------------------- @@ -1476,14 +1476,14 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); SvtSaveOptions aSaveOpt; - xInfoSet->setPropertyValue(OUString("UsePrettyPrinting"), uno::makeAny(aSaveOpt.IsPrettyPrinting())); + xInfoSet->setPropertyValue("UsePrettyPrinting", uno::makeAny(aSaveOpt.IsPrettyPrinting())); if ( aSaveOpt.IsSaveRelFSys() ) { const OUString sVal( aDescriptor.getUnpackedValueOrDefault(aDescriptor.PROP_DOCUMENTBASEURL(),OUString()) ); - xInfoSet->setPropertyValue(OUString("BaseURI"), uno::makeAny(sVal)); + xInfoSet->setPropertyValue("BaseURI", uno::makeAny(sVal)); } - const OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault(OUString("HierarchicalDocumentName"),OUString()) ); - xInfoSet->setPropertyValue(OUString("StreamRelPath"), uno::makeAny(sHierarchicalDocumentName)); + const OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault("HierarchicalDocumentName",OUString()) ); + xInfoSet->setPropertyValue("StreamRelPath", uno::makeAny(sHierarchicalDocumentName)); sal_Int32 nArgsLen = aDelegatorArguments.getLength(); @@ -1506,7 +1506,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS uno::Reference<XComponent> xCom(static_cast<OWeakObject*>(this),uno::UNO_QUERY); if( !bErr ) { - xInfoSet->setPropertyValue(OUString("StreamName"), uno::makeAny(OUString("settings.xml"))); + xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("settings.xml"))); if( !WriteThroughComponent( xCom, "settings.xml", "com.sun.star.comp.report.XMLSettingsExporter", @@ -1522,7 +1522,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS if( !bErr ) { - xInfoSet->setPropertyValue(OUString("StreamName"), uno::makeAny(OUString("meta.xml"))); + xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("meta.xml"))); if( !WriteThroughComponent( xCom, "meta.xml", "com.sun.star.comp.report.XMLMetaExporter", @@ -1538,7 +1538,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS if( !bErr ) { - xInfoSet->setPropertyValue(OUString("StreamName"), uno::makeAny(OUString("styles.xml"))); + xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("styles.xml"))); if( !WriteThroughComponent( xCom, "styles.xml", "com.sun.star.comp.report.XMLStylesExporter", @@ -1554,7 +1554,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS if ( !bErr ) { - xInfoSet->setPropertyValue(OUString("StreamName"), uno::makeAny(OUString("content.xml"))); + xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("content.xml"))); if( !WriteThroughComponent( xCom, "content.xml", "com.sun.star.comp.report.ExportFilter", @@ -2224,14 +2224,14 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co if ( aServiceSpecifier.indexOf( "com.sun.star.report." ) == 0 ) { if ( aServiceSpecifier == SERVICE_SHAPE ) - xShape.set(SvxUnoDrawMSFactory::createInstance( OUString("com.sun.star.drawing.CustomShape") ),uno::UNO_QUERY_THROW); + xShape.set(SvxUnoDrawMSFactory::createInstance("com.sun.star.drawing.CustomShape"),uno::UNO_QUERY_THROW); else if ( aServiceSpecifier == SERVICE_FORMATTEDFIELD || aServiceSpecifier == SERVICE_FIXEDTEXT || aServiceSpecifier == SERVICE_FIXEDLINE || aServiceSpecifier == SERVICE_IMAGECONTROL ) - xShape.set(SvxUnoDrawMSFactory::createInstance( OUString("com.sun.star.drawing.ControlShape") ),uno::UNO_QUERY_THROW); + xShape.set(SvxUnoDrawMSFactory::createInstance("com.sun.star.drawing.ControlShape"),uno::UNO_QUERY_THROW); else - xShape.set(SvxUnoDrawMSFactory::createInstance( OUString("com.sun.star.drawing.OLE2Shape") ),uno::UNO_QUERY_THROW); + xShape.set(SvxUnoDrawMSFactory::createInstance("com.sun.star.drawing.OLE2Shape"),uno::UNO_QUERY_THROW); } else if ( aServiceSpecifier.indexOf( "com.sun.star.form.component." ) == 0 ) { @@ -2243,10 +2243,10 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co ) { uno::Reference< style::XStyle> xStyle = new OStyle(); - xStyle->setName(OUString("Default")); + xStyle->setName("Default"); uno::Reference<beans::XPropertySet> xProp(xStyle,uno::UNO_QUERY); OUString sTray; - xProp->getPropertyValue(OUString("PrinterPaperTray"))>>= sTray; + xProp->getPropertyValue("PrinterPaperTray")>>= sTray; return xStyle.get(); } @@ -2567,17 +2567,17 @@ uno::Reference< container::XNameAccess > SAL_CALL OReportDefinition::getStyleFam uno::Reference< container::XNameContainer> xPageStyles = new OStylesHelper(::getCppuType(static_cast< uno::Reference<style::XStyle>* >(NULL))); xStyles->insertByName(OUString("PageStyles"),uno::makeAny(xPageStyles)); - uno::Reference< style::XStyle> xPageStyle(createInstance(OUString("com.sun.star.style.PageStyle")),uno::UNO_QUERY); + uno::Reference< style::XStyle> xPageStyle(createInstance("com.sun.star.style.PageStyle"),uno::UNO_QUERY); xPageStyles->insertByName(xPageStyle->getName(),uno::makeAny(xPageStyle)); uno::Reference< container::XNameContainer> xFrameStyles = new OStylesHelper(::getCppuType(static_cast< uno::Reference<style::XStyle>* >(NULL))); xStyles->insertByName(OUString("FrameStyles"),uno::makeAny(xFrameStyles)); - uno::Reference< style::XStyle> xFrameStyle(createInstance(OUString("com.sun.star.style.FrameStyle")),uno::UNO_QUERY); + uno::Reference< style::XStyle> xFrameStyle(createInstance("com.sun.star.style.FrameStyle"),uno::UNO_QUERY); xFrameStyles->insertByName(xFrameStyle->getName(),uno::makeAny(xFrameStyle)); uno::Reference< container::XNameContainer> xGraphicStyles = new OStylesHelper(::getCppuType(static_cast< uno::Reference<style::XStyle>* >(NULL))); xStyles->insertByName(OUString("graphics"),uno::makeAny(xGraphicStyles)); - uno::Reference< style::XStyle> xGraphicStyle(createInstance(OUString("com.sun.star.style.GraphicStyle")),uno::UNO_QUERY); + uno::Reference< style::XStyle> xGraphicStyle(createInstance("com.sun.star.style.GraphicStyle"),uno::UNO_QUERY); xGraphicStyles->insertByName(xGraphicStyle->getName(),uno::makeAny(xGraphicStyle)); } return m_pImpl->m_xStyles; diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx index e7d760b7f81c..5cf4a655f482 100644 --- a/reportdesign/source/core/api/Section.cxx +++ b/reportdesign/source/core/api/Section.cxx @@ -317,7 +317,7 @@ void OSection::checkNotPageHeaderFooter() void SAL_CALL OSection::setForceNewPage( ::sal_Int16 _forcenewpage ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException) { if ( _forcenewpage < report::ForceNewPage::NONE || _forcenewpage > report::ForceNewPage::BEFORE_AFTER_SECTION ) - throwIllegallArgumentException(OUString("com::sun::star::report::ForceNewPage") + throwIllegallArgumentException("com::sun::star::report::ForceNewPage" ,*this ,1 ,m_xContext); @@ -335,7 +335,7 @@ void SAL_CALL OSection::setForceNewPage( ::sal_Int16 _forcenewpage ) throw (lang void SAL_CALL OSection::setNewRowOrCol( ::sal_Int16 _newroworcol ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException) { if ( _newroworcol < report::ForceNewPage::NONE || _newroworcol > report::ForceNewPage::BEFORE_AFTER_SECTION ) - throwIllegallArgumentException(OUString("com::sun::star::report::ForceNewPage") + throwIllegallArgumentException("com::sun::star::report::ForceNewPage" ,*this ,1 ,m_xContext); @@ -450,19 +450,19 @@ uno::Reference< report::XReportComponent > SAL_CALL OSection::createReportCompon switch( aFind - aRet.begin() ) { case 0: - xRet.set(xFac->createInstance(OUString("com.sun.star.form.component.FixedText")),uno::UNO_QUERY); + xRet.set(xFac->createInstance("com.sun.star.form.component.FixedText"),uno::UNO_QUERY); break; case 1: - xRet.set(xFac->createInstance(OUString("com.sun.star.awt.UnoControlFixedLineModel")),uno::UNO_QUERY); + xRet.set(xFac->createInstance("com.sun.star.awt.UnoControlFixedLineModel"),uno::UNO_QUERY); break; case 2: - xRet.set(xFac->createInstance(OUString("com.sun.star.form.component.DatabaseImageControl")),uno::UNO_QUERY); + xRet.set(xFac->createInstance("com.sun.star.form.component.DatabaseImageControl"),uno::UNO_QUERY); break; case 3: - xRet.set(xFac->createInstance(OUString("com.sun.star.form.component.FormattedField")),uno::UNO_QUERY); + xRet.set(xFac->createInstance("com.sun.star.form.component.FormattedField"),uno::UNO_QUERY); break; case 4: - xRet.set(xFac->createInstance(OUString("com.sun.star.drawing.ControlShape")),uno::UNO_QUERY); + xRet.set(xFac->createInstance("com.sun.star.drawing.ControlShape"),uno::UNO_QUERY); break; default: break; diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index ad81cdc06ff8..b2b6d66783e3 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -99,7 +99,7 @@ sal_uInt16 OObjectBase::getObjectType(const uno::Reference< report::XReportCompo return OBJ_DLG_IMAGECONTROL; if ( xServiceInfo->supportsService( SERVICE_FORMATTEDFIELD )) return OBJ_DLG_FORMATTEDFIELD; - if ( xServiceInfo->supportsService( OUString("com.sun.star.drawing.OLE2Shape") ) ) + if ( xServiceInfo->supportsService("com.sun.star.drawing.OLE2Shape") ) return OBJ_OLE2; if ( xServiceInfo->supportsService( SERVICE_SHAPE )) return OBJ_CUSTOMSHAPE; @@ -1215,7 +1215,7 @@ void OOle2Obj::impl_createDataProvider_nothrow(const uno::Reference< frame::XMod if( xReceiver.is() ) { uno::Reference< lang::XMultiServiceFactory> xFac(_xModel,uno::UNO_QUERY); - uno::Reference< chart2::data::XDatabaseDataProvider > xDataProvider( xFac->createInstance(OUString("com.sun.star.chart2.data.DataProvider")),uno::UNO_QUERY); + uno::Reference< chart2::data::XDatabaseDataProvider > xDataProvider( xFac->createInstance("com.sun.star.chart2.data.DataProvider"),uno::UNO_QUERY); xReceiver->attachDataProvider( xDataProvider.get() ); } } @@ -1238,7 +1238,7 @@ void OOle2Obj::initializeOle() { uno::Reference< beans::XPropertySet > xChartProps( xCompSupp->getComponent(), uno::UNO_QUERY ); if ( xChartProps.is() ) - xChartProps->setPropertyValue(OUString("NullDate"),uno::makeAny(util::DateTime(0,0,0,0,1,1,1900))); + xChartProps->setPropertyValue("NullDate",uno::makeAny(util::DateTime(0,0,0,0,1,1,1900))); } } } @@ -1279,7 +1279,7 @@ void OOle2Obj::initializeChart( const uno::Reference< frame::XModel>& _xModel) uno::Reference< style::XStyle> getUsedStyle(const uno::Reference< report::XReportDefinition>& _xReport) { uno::Reference<container::XNameAccess> xStyles = _xReport->getStyleFamilies(); - uno::Reference<container::XNameAccess> xPageStyles(xStyles->getByName(OUString("PageStyles")),uno::UNO_QUERY); + uno::Reference<container::XNameAccess> xPageStyles(xStyles->getByName("PageStyles"),uno::UNO_QUERY); uno::Reference< style::XStyle> xReturn; uno::Sequence< OUString> aSeq = xPageStyles->getElementNames(); diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx index 1032158af108..97168a5213b9 100644 --- a/reportdesign/source/core/sdr/formatnormalizer.cxx +++ b/reportdesign/source/core/sdr/formatnormalizer.cxx @@ -145,10 +145,10 @@ namespace rptui for ( sal_Int32 i=0; i<nCount; ++i ) { xColumn.set( _rxColumns->getByIndex( i ), UNO_QUERY_THROW ); - OSL_VERIFY( xColumn->getPropertyValue( OUString( "Name" ) ) >>= aField.sName ); - OSL_VERIFY( xColumn->getPropertyValue( OUString( "Type" ) ) >>= aField.nDataType ); - OSL_VERIFY( xColumn->getPropertyValue( OUString( "Scale" ) ) >>= aField.nScale ); - OSL_VERIFY( xColumn->getPropertyValue( OUString( "IsCurrency" ) ) >>= aField.bIsCurrency ); + OSL_VERIFY( xColumn->getPropertyValue("Name") >>= aField.sName ); + OSL_VERIFY( xColumn->getPropertyValue("Type") >>= aField.nDataType ); + OSL_VERIFY( xColumn->getPropertyValue("Scale") >>= aField.nScale ); + OSL_VERIFY( xColumn->getPropertyValue("IsCurrency") >>= aField.bIsCurrency ); _inout_rFields.push_back( aField ); } } diff --git a/reportdesign/source/filter/xml/dbloader2.cxx b/reportdesign/source/filter/xml/dbloader2.cxx index dd4820b2f63b..477fa617daeb 100644 --- a/reportdesign/source/filter/xml/dbloader2.cxx +++ b/reportdesign/source/filter/xml/dbloader2.cxx @@ -49,7 +49,7 @@ OUString SAL_CALL ORptTypeDetection::detect( Sequence< ::com::sun::star::beans:: { ::comphelper::SequenceAsHashMap aTemp(Descriptor); - OUString sTemp = aTemp.getUnpackedValueOrDefault(OUString("URL"),OUString()); + OUString sTemp = aTemp.getUnpackedValueOrDefault("URL",OUString()); if ( !sTemp.isEmpty() ) { @@ -64,7 +64,7 @@ OUString SAL_CALL ORptTypeDetection::detect( Sequence< ::com::sun::star::beans:: if ( xProp.is() ) { OUString sMediaType; - xProp->getPropertyValue( OUString("MediaType") ) >>= sMediaType; + xProp->getPropertyValue("MediaType") >>= sMediaType; if ( sMediaType == MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII ) return OUString("StarBaseReport"); ::comphelper::disposeComponent(xProp); diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index 60a93cbf3d89..627853a6a73d 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -1501,7 +1501,7 @@ void ORptExport::exportShapes(const Reference< XSection>& _xSection,bool _bAddPa SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr<SvXMLElementExport> pSubDocument; SAL_WNODEPRECATED_DECLARATIONS_POP - uno::Reference< frame::XModel> xModel(xShape->getPropertyValue(OUString("Model")),uno::UNO_QUERY); + uno::Reference< frame::XModel> xModel(xShape->getPropertyValue("Model"),uno::UNO_QUERY); if ( xModel.is() ) // special handling for chart object { pSubDocument.reset(new SvXMLElementExport(*this,XML_NAMESPACE_REPORT, XML_SUB_DOCUMENT, sal_False, sal_False)); diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index a990058c3799..d556f41df63f 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -306,8 +306,8 @@ void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any > { ::osl::MutexGuard aGuard(m_aMutex); comphelper::SequenceAsHashMap aArgs(_aArguments); - m_xDelegatee = aArgs.getUnpackedValueOrDefault(OUString("DocumentHandler"),m_xDelegatee); - m_xModel = aArgs.getUnpackedValueOrDefault(OUString("Model"),m_xModel); + m_xDelegatee = aArgs.getUnpackedValueOrDefault("DocumentHandler",m_xDelegatee); + m_xModel = aArgs.getUnpackedValueOrDefault("Model",m_xModel); OSL_ENSURE(m_xDelegatee.is(),"No document handler avialable!"); if ( !m_xDelegatee.is() || !m_xModel.is() ) diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index 2f46b990a0bd..e75591fbdd55 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -328,8 +328,8 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any > { ::osl::MutexGuard aGuard(m_aMutex); comphelper::SequenceAsHashMap aArgs(_aArguments); - m_xDelegatee = aArgs.getUnpackedValueOrDefault(OUString("DocumentHandler"),m_xDelegatee); - m_xModel = aArgs.getUnpackedValueOrDefault(OUString("Model"),m_xModel); + m_xDelegatee = aArgs.getUnpackedValueOrDefault("DocumentHandler",m_xDelegatee); + m_xModel = aArgs.getUnpackedValueOrDefault("Model",m_xModel); OSL_ENSURE(m_xDelegatee.is(),"No document handler avialable!"); if ( !m_xDelegatee.is() || !m_xModel.is() ) diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index fa83c1668f55..1a1e17df65f6 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -247,7 +247,7 @@ sal_Int32 ReadThroughComponent( xDocStream = xStorage->openStreamElement( sStreamName, embed::ElementModes::READ ); uno::Reference< beans::XPropertySet > xProps( xDocStream, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( OUString("Encrypted") ) >>= bEncrypted; + xProps->getPropertyValue("Encrypted") >>= bEncrypted; } catch (const packages::WrongPasswordException&) { @@ -551,9 +551,9 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) ::comphelper::MediaDescriptor aDescriptor(rDescriptor); uno::Reference<beans::XPropertySet> xProp = comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap)); const OUString sVal( aDescriptor.getUnpackedValueOrDefault(aDescriptor.PROP_DOCUMENTBASEURL(),OUString()) ); - xProp->setPropertyValue(OUString("BaseURI"), uno::makeAny(sVal)); - const OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault(OUString("HierarchicalDocumentName"),OUString()) ); - xProp->setPropertyValue(OUString("StreamRelPath"), uno::makeAny(sHierarchicalDocumentName)); + xProp->setPropertyValue("BaseURI", uno::makeAny(sVal)); + const OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault("HierarchicalDocumentName",OUString()) ); + xProp->setPropertyValue("StreamRelPath", uno::makeAny(sHierarchicalDocumentName)); uno::Reference<XComponent> xModel(GetModel(),UNO_QUERY); static const OUString s_sMeta("meta.xml"); diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx index e2574d109280..5ad27abcdb6a 100644 --- a/reportdesign/source/ui/dlg/DateTime.cxx +++ b/reportdesign/source/ui/dlg/DateTime.cxx @@ -182,7 +182,7 @@ OUString ODateTimeDialog::getFormatStringByKey(::sal_Int32 _nNumberFormatKey,con uno::Reference< beans::XPropertySet> xFormSet = _xFormats->getByKey(_nNumberFormatKey); OSL_ENSURE(xFormSet.is(),"XPropertySet is null!"); OUString sFormat; - xFormSet->getPropertyValue(OUString("FormatString")) >>= sFormat; + xFormSet->getPropertyValue("FormatString") >>= sFormat; double nValue = 0; if ( _bTime ) diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index cd92312151c8..84330da1ea85 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -64,7 +64,7 @@ FormulaDialog::FormulaDialog(Window* pParent else m_sFormula = _sFormula; } - m_xParser.set(_xServiceFactory->createInstance(OUString("org.libreoffice.report.pentaho.SOFormulaParser")),uno::UNO_QUERY); + m_xParser.set(_xServiceFactory->createInstance("org.libreoffice.report.pentaho.SOFormulaParser"),uno::UNO_QUERY); if ( m_xParser.is() ) m_xOpCodeMapper = m_xParser->getFormulaOpCodeMapper(); fill(); diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx index 261c6b573e7a..de062e880fc0 100644 --- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx +++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx @@ -150,7 +150,7 @@ void SAL_CALL DataProviderHandler::inspect(const uno::Reference< uno::XInterface } } m_xDataProvider.set(m_xFormComponent,uno::UNO_QUERY); - m_xReportComponent.set( xNameCont->getByName( OUString( "ReportComponent" ) ), uno::UNO_QUERY ); + m_xReportComponent.set( xNameCont->getByName("ReportComponent"), uno::UNO_QUERY ); if ( m_xDataProvider.is() ) { ::boost::shared_ptr<AnyConverter> aNoConverter(new AnyConverter()); @@ -242,7 +242,7 @@ void DataProviderHandler::impl_updateChartTitle_throw(const uno::Any& _aValue) uno::Reference<chart2::XTitle> xTitle = xTitled->getTitleObject(); if ( !xTitle.is() ) { - xTitle.set(m_xContext->getServiceManager()->createInstanceWithContext(OUString("com.sun.star.chart2.Title"),m_xContext),uno::UNO_QUERY); + xTitle.set(m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.chart2.Title",m_xContext),uno::UNO_QUERY); xTitled->setTitleObject(xTitle); } if ( xTitle.is() ) @@ -496,7 +496,7 @@ bool DataProviderHandler::impl_dialogLinkedFields_nothrow( ::osl::ClearableMutex uno::Sequence<uno::Any> aSeq(6); beans::PropertyValue aParam; aParam.Name = OUString("ParentWindow"); - aParam.Value <<= m_xContext->getValueByName( OUString("DialogParentWindow")); + aParam.Value <<= m_xContext->getValueByName("DialogParentWindow"); aSeq[0] <<= aParam; aParam.Name = OUString("Detail"); aParam.Value <<= m_xDataProvider; @@ -529,7 +529,7 @@ bool DataProviderHandler::impl_dialogChartType_nothrow( ::osl::ClearableMutexGua uno::Sequence<uno::Any> aSeq(2); beans::PropertyValue aParam; aParam.Name = OUString("ParentWindow"); - aParam.Value <<= m_xContext->getValueByName( OUString("DialogParentWindow")); + aParam.Value <<= m_xContext->getValueByName("DialogParentWindow"); aSeq[0] <<= aParam; aParam.Name = OUString("ChartModel"); aParam.Value <<= m_xChartModel; diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx index bb5088dc365a..0fb154686b65 100644 --- a/reportdesign/source/ui/inspection/DefaultInspection.cxx +++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx @@ -251,7 +251,7 @@ namespace rptui if ( !m_xComponent.is() ) try { - m_xComponent.set(m_xContext->getServiceManager()->createInstanceWithContext(OUString("com.sun.star.form.inspection.DefaultFormComponentInspectorModel"),m_xContext),UNO_QUERY_THROW); + m_xComponent.set(m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.form.inspection.DefaultFormComponentInspectorModel",m_xContext),UNO_QUERY_THROW); } catch(const Exception &) { diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 3c9339bc61e1..db31b307098d 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -336,7 +336,7 @@ void SAL_CALL GeometryHandler::inspect( const uno::Reference< uno::XInterface > m_xReportComponent->removePropertyChangeListener(PROPERTY_DATAFIELD,static_cast< beans::XPropertyChangeListener* >( this )); const uno::Reference< container::XNameContainer > xObjectAsContainer( _rxInspectee, uno::UNO_QUERY ); - m_xReportComponent.set( xObjectAsContainer->getByName( OUString( "ReportComponent" ) ), uno::UNO_QUERY ); + m_xReportComponent.set( xObjectAsContainer->getByName("ReportComponent"), uno::UNO_QUERY ); const OUString sRowSet("RowSet"); if ( xObjectAsContainer->hasByName( sRowSet ) ) @@ -1408,7 +1408,7 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr ::osl::ClearableMutexGuard aGuard( m_aMutex ); inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled; - const uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName( OUString("DialogParentWindow")) ,uno::UNO_QUERY); + const uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName("DialogParentWindow") ,uno::UNO_QUERY); const uno::Reference< report::XReportControlFormat> xReportControlFormat(m_xReportComponent,uno::UNO_QUERY); aGuard.clear(); @@ -1430,7 +1430,7 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr OUString sFormula; m_xReportComponent->getPropertyValue(PropertyName) >>= sFormula; - const uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName( OUString("DialogParentWindow")) ,uno::UNO_QUERY); + const uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName("DialogParentWindow") ,uno::UNO_QUERY); uno::Reference< uno::XComponentContext > xContext = m_xContext; uno::Reference< beans::XPropertySet > xRowSet( m_xRowSet,uno::UNO_QUERY); aGuard.clear(); @@ -1448,7 +1448,7 @@ inspection::InteractiveSelectionResult SAL_CALL GeometryHandler::onInteractivePr ::osl::ClearableMutexGuard aGuard( m_aMutex ); inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled; - const uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName( OUString("DialogParentWindow")) ,uno::UNO_QUERY); + const uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName("DialogParentWindow") ,uno::UNO_QUERY); const uno::Reference< report::XShape> xShape(m_xReportComponent,uno::UNO_QUERY); aGuard.clear(); @@ -1565,15 +1565,15 @@ bool GeometryHandler::impl_dialogFilter_nothrow( OUString& _out_rSelectedClause, try { xFactory = m_xContext->getServiceManager(); - xInspectorWindow.set(m_xContext->getValueByName( OUString("DialogParentWindow")) ,uno::UNO_QUERY); - uno::Reference<sdbc::XConnection> xCon(m_xContext->getValueByName( OUString("ActiveConnection")) ,uno::UNO_QUERY); + xInspectorWindow.set(m_xContext->getValueByName("DialogParentWindow") ,uno::UNO_QUERY); + uno::Reference<sdbc::XConnection> xCon(m_xContext->getValueByName("ActiveConnection") ,uno::UNO_QUERY); if ( !xCon.is() ) return false; uno::Reference< beans::XPropertySet> xRowSetProp(m_xRowSet,uno::UNO_QUERY); if ( !m_xRowSet.is() ) { - m_xRowSet.set(xFactory->createInstanceWithContext(OUString("com.sun.star.sdb.RowSet"),m_xContext),uno::UNO_QUERY); + m_xRowSet.set(xFactory->createInstanceWithContext("com.sun.star.sdb.RowSet",m_xContext),uno::UNO_QUERY); xRowSetProp.set(m_xRowSet,uno::UNO_QUERY); xRowSetProp->setPropertyValue(PROPERTY_ACTIVECONNECTION,uno::makeAny(xCon)); ::comphelper::copyProperties(m_xReportComponent,xRowSetProp); @@ -2045,7 +2045,7 @@ void GeometryHandler::impl_initFieldList_nothrow( uno::Sequence< OUString >& _rF _rFieldNames.realloc(0); try { - uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName( OUString("DialogParentWindow")) ,uno::UNO_QUERY); + uno::Reference< awt::XWindow> xInspectorWindow(m_xContext->getValueByName("DialogParentWindow") ,uno::UNO_QUERY); Window* pInspectorWindow = VCLUnoHelper::GetWindow( xInspectorWindow ); WaitObject aWaitCursor( pInspectorWindow ); @@ -2059,7 +2059,7 @@ void GeometryHandler::impl_initFieldList_nothrow( uno::Sequence< OUString >& _rF OUString sObjectName; OSL_VERIFY( xFormSet->getPropertyValue( PROPERTY_COMMAND ) >>= sObjectName ); // when there is no command we don't need to ask for columns - uno::Reference<sdbc::XConnection> xCon(m_xContext->getValueByName( OUString("ActiveConnection")) ,uno::UNO_QUERY); + uno::Reference<sdbc::XConnection> xCon(m_xContext->getValueByName("ActiveConnection") ,uno::UNO_QUERY); if ( !sObjectName.isEmpty() && xCon.is() ) { sal_Int32 nObjectType = sdb::CommandType::COMMAND; diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 43f67fcb4123..725d3f9ff5cd 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -1023,7 +1023,7 @@ bool openDialogFormula_nothrow( OUString& _in_out_rFormula xServiceFactory.set(xFactory,uno::UNO_QUERY); Window* pParent = VCLUnoHelper::GetWindow( _xInspectorWindow ); - uno::Reference< report::meta::XFunctionManager> xMgr(xFactory->createInstanceWithContext(OUString("org.libreoffice.report.pentaho.SOFunctionManager"),_xContext),uno::UNO_QUERY); + uno::Reference< report::meta::XFunctionManager> xMgr(xFactory->createInstanceWithContext("org.libreoffice.report.pentaho.SOFunctionManager",_xContext),uno::UNO_QUERY); if ( xMgr.is() ) { ::boost::shared_ptr< formula::IFunctionManager > pFormulaManager(new FunctionManager(xMgr) ); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 66fe96caffa3..220f31e61276 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -1692,7 +1692,7 @@ void OReportController::impl_initialize( ) ::comphelper::MediaDescriptor aDescriptor( m_xReportDefinition->getArgs() ); OUString sHierarchicalDocumentName; - sHierarchicalDocumentName = aDescriptor.getUnpackedValueOrDefault(OUString("HierarchicalDocumentName"),sHierarchicalDocumentName); + sHierarchicalDocumentName = aDescriptor.getUnpackedValueOrDefault("HierarchicalDocumentName",sHierarchicalDocumentName); if ( sHierarchicalDocumentName.isEmpty() && getConnection().is() ) { @@ -3331,7 +3331,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) } ::svx::ODataAccessDescriptor aDescriptor(aValue); SequenceAsHashMap aMap(aValue); - uno::Reference<report::XSection> xSection = aMap.getUnpackedValueOrDefault(OUString("Section"),xCurrentSection); + uno::Reference<report::XSection> xSection = aMap.getUnpackedValueOrDefault("Section",xCurrentSection); uno::Reference<report::XReportDefinition> xReportDefinition = xSection->getReportDefinition(); getDesignView()->setMarked(xSection,sal_True); @@ -3343,7 +3343,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) aPos.X = nLeftMargin; // LLA: new feature, add the Label in dependency of the given DND_ACTION one section up, normal or one section down - sal_Int8 nDNDAction = aMap.getUnpackedValueOrDefault(OUString("DNDAction"), sal_Int8(0)); + sal_Int8 nDNDAction = aMap.getUnpackedValueOrDefault("DNDAction", sal_Int8(0)); pSectionWindow[1] = pSectionWindow[0]; sal_Bool bLabelAboveTextField = nDNDAction == DND_ACTION_COPY; if ( bLabelAboveTextField || nDNDAction == DND_ACTION_LINK ) @@ -3416,7 +3416,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) { uno::Reference< beans::XPropertySet > xParamCol( xParams->getByIndex(i), uno::UNO_QUERY_THROW ); OUString sParamName; - OSL_VERIFY( xParamCol->getPropertyValue( OUString( "Name" ) ) >>= sParamName ); + OSL_VERIFY( xParamCol->getPropertyValue("Name") >>= sParamName ); if ( sParamName == sColumnName ) { xField = xParamCol; diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index 17809a41db67..bd8a5a325aed 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -110,7 +110,7 @@ PropBrw::PropBrw(const Reference< XComponentContext >& _xORB, Window* pParent, O // create a frame wrapper for myself m_xMeAsFrame = Frame::create( m_xORB ); m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) ); - m_xMeAsFrame->setName( OUString("report property browser") ); // change name! + m_xMeAsFrame->setName("report property browser"); // change name! } catch (Exception&) { @@ -344,7 +344,7 @@ OUString PropBrw::GetHeadlineName( const uno::Sequence< Reference<uno::XInterfac aName = String(ModuleRes(RID_STR_BRWTITLE_PROPERTIES)); uno::Reference< container::XNameContainer > xNameCont(_aObjects[0],uno::UNO_QUERY); - Reference< lang::XServiceInfo > xServiceInfo( xNameCont->getByName(OUString("ReportComponent")), UNO_QUERY ); + Reference< lang::XServiceInfo > xServiceInfo( xNameCont->getByName("ReportComponent"), UNO_QUERY ); if ( xServiceInfo.is() ) { sal_uInt16 nResId = 0; diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 4661256854c4..58b2e4410c3d 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -492,7 +492,7 @@ void SaxExpatParser::parseStream( const InputSource& structSource) if( ! entity.structSource.aInputStream.is() ) { - throw SAXException( OUString("No input source") , + throw SAXException("No input source", Reference< XInterface > () , Any() ); } @@ -507,7 +507,7 @@ void SaxExpatParser::parseStream( const InputSource& structSource) entity.pParser = XML_ParserCreate( 0 ); if( ! entity.pParser ) { - throw SAXException( OUString("Couldn't create parser") , + throw SAXException("Couldn't create parser", Reference< XInterface > (), Any() ); } diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 1a80ed1ab65a..d373762bbcc9 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -441,7 +441,7 @@ void FastSaxParser::parseStream( const InputSource& maStructSource) throw (SAXEx entity.maStructSource = maStructSource; if( !entity.maStructSource.aInputStream.is() ) - throw SAXException( OUString( "No input source" ), Reference< XInterface >(), Any() ); + throw SAXException("No input source", Reference< XInterface >(), Any() ); entity.maConverter.setInputStream( entity.maStructSource.aInputStream ); if( !entity.maStructSource.sEncoding.isEmpty() ) @@ -450,7 +450,7 @@ void FastSaxParser::parseStream( const InputSource& maStructSource) throw (SAXEx // create parser with proper encoding entity.mpParser = XML_ParserCreate( 0 ); if( !entity.mpParser ) - throw SAXException( OUString( "Couldn't create parser" ), Reference< XInterface >(), Any() ); + throw SAXException("Couldn't create parser", Reference< XInterface >(), Any() ); // set all necessary C-Callbacks XML_SetUserData( entity.mpParser, this ); diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 888ed7df52a7..2f96cca7f6f3 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -33,7 +33,7 @@ FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& { Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext(), UNO_SET_THROW ); Reference< lang::XMultiComponentFactory > xFactory( xContext->getServiceManager(), UNO_SET_THROW ); - mxTokenHandler.set( xFactory->createInstanceWithContext( OUString( "com.sun.star.xml.sax.FastTokenHandler"), xContext ), UNO_QUERY_THROW ); + mxTokenHandler.set( xFactory->createInstanceWithContext("com.sun.star.xml.sax.FastTokenHandler", xContext ), UNO_QUERY_THROW ); mpSerializer->setFastTokenHandler( mxTokenHandler ); mpSerializer->setOutputStream( xOutputStream ); diff --git a/sax/test/sax/testsax.cxx b/sax/test/sax/testsax.cxx index 3840da724f90..2e228b824c26 100644 --- a/sax/test/sax/testsax.cxx +++ b/sax/test/sax/testsax.cxx @@ -225,7 +225,7 @@ Reference < XInputStream > createStreamFromSequence( const Reference < XMultiServiceFactory > &xSMgr ) { Reference < XInterface > xOutStreamService = - xSMgr->createInstance( OUString("com.sun.star.io.Pipe") ); + xSMgr->createInstance("com.sun.star.io.Pipe"); OSL_ASSERT( xOutStreamService.is() ); Reference< XOutputStream > rOutStream( xOutStreamService , UNO_QUERY ); OSL_ASSERT( rOutStream.is() ); diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx index a330e242f746..486752081668 100644 --- a/sax/test/saxdemo.cxx +++ b/sax/test/saxdemo.cxx @@ -573,7 +573,7 @@ int main (int argc, char **argv) //---------------------- // The SAX-Writer demo //---------------------- - x= xSMgr->createInstance( OUString("com.sun.star.xml.sax.Writer") ); + x= xSMgr->createInstance("com.sun.star.xml.sax.Writer"); if( x.is() ) { printf( "start writing to %s\n" , argv[2] ); diff --git a/sc/qa/extras/regression-test.cxx b/sc/qa/extras/regression-test.cxx index 9c6cbcbc4f18..f455259de688 100644 --- a/sc/qa/extras/regression-test.cxx +++ b/sc/qa/extras/regression-test.cxx @@ -143,7 +143,7 @@ void ScChartRegressionTest::setUp() // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure, // which is a private symbol to us, gets called m_xCalcComponent = - getMultiServiceFactory()->createInstance(OUString("com.sun.star.comp.Calc.SpreadsheetDocument")); + getMultiServiceFactory()->createInstance("com.sun.star.comp.Calc.SpreadsheetDocument"); CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is()); mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) ); } diff --git a/sc/qa/extras/scdatabaserangeobj.cxx b/sc/qa/extras/scdatabaserangeobj.cxx index 527497bfeaf8..6721918ebc01 100644 --- a/sc/qa/extras/scdatabaserangeobj.cxx +++ b/sc/qa/extras/scdatabaserangeobj.cxx @@ -63,7 +63,7 @@ uno::Reference< uno::XInterface > ScDatabaseRangeObj::init( const OUString& rDBN uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< beans::XPropertySet > xPropSet(xDoc, UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xNameAccess( xPropSet->getPropertyValue(OUString("DatabaseRanges")), UNO_QUERY_THROW); + uno::Reference< container::XNameAccess > xNameAccess( xPropSet->getPropertyValue("DatabaseRanges"), UNO_QUERY_THROW); uno::Reference< sheet::XDatabaseRange > xDBRange( xNameAccess->getByName(rDBName), UNO_QUERY_THROW); CPPUNIT_ASSERT(xDBRange.is()); return xDBRange; diff --git a/sc/qa/extras/scdatapilotfieldobj.cxx b/sc/qa/extras/scdatapilotfieldobj.cxx index 637dadad64f8..dea89587885c 100644 --- a/sc/qa/extras/scdatapilotfieldobj.cxx +++ b/sc/qa/extras/scdatapilotfieldobj.cxx @@ -76,7 +76,7 @@ uno::Reference< uno::XInterface > ScDataPilotFieldObj::init() CPPUNIT_ASSERT(xDPT.is()); uno::Sequence<OUString> aElementNames = xDPT->getElementNames(); - uno::Reference< sheet::XDataPilotDescriptor > xDPDsc(xDPT->getByName(OUString("DataPilot1")),UNO_QUERY_THROW); + uno::Reference< sheet::XDataPilotDescriptor > xDPDsc(xDPT->getByName("DataPilot1"),UNO_QUERY_THROW); CPPUNIT_ASSERT(xDPDsc.is()); uno::Reference< container::XIndexAccess > xIA( xDPDsc->getDataPilotFields(), UNO_QUERY_THROW); uno::Reference< uno::XInterface > xReturnValue( xIA->getByIndex(0), UNO_QUERY_THROW); diff --git a/sc/qa/extras/scdatapilottableobj.cxx b/sc/qa/extras/scdatapilottableobj.cxx index 55ea705ce842..e0eed8476bfb 100644 --- a/sc/qa/extras/scdatapilottableobj.cxx +++ b/sc/qa/extras/scdatapilottableobj.cxx @@ -96,7 +96,7 @@ uno::Reference< uno::XInterface > ScDataPilotTableObj::init() uno::Reference< sheet::XDataPilotTables > xDPT = xDPTS->getDataPilotTables(); CPPUNIT_ASSERT(xDPT.is()); - uno::Reference< sheet::XDataPilotTable > xDPTable(xDPT->getByName(OUString("DataPilotTable")),UNO_QUERY_THROW); + uno::Reference< sheet::XDataPilotTable > xDPTable(xDPT->getByName("DataPilotTable"),UNO_QUERY_THROW); CPPUNIT_ASSERT(xDPTable.is()); return xDPTable; @@ -133,7 +133,7 @@ uno::Reference< uno::XInterface > ScDataPilotTableObj::initDP2() uno::Reference< sheet::XDataPilotTables > xDPT = xDPTS->getDataPilotTables(); CPPUNIT_ASSERT(xDPT.is()); - uno::Reference< sheet::XDataPilotTable > xDPTable(xDPT->getByName(OUString("DataPilotTable2")),UNO_QUERY_THROW); + uno::Reference< sheet::XDataPilotTable > xDPTable(xDPT->getByName("DataPilotTable2"),UNO_QUERY_THROW); CPPUNIT_ASSERT(xDPTable.is()); return xDPTable; diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index a0244374302d..f82f1eb5e68f 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -454,7 +454,7 @@ void ScFiltersTest::setUp() // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure, // which is a private symbol to us, gets called m_xCalcComponent = - getMultiServiceFactory()->createInstance(OUString("com.sun.star.comp.Calc.SpreadsheetDocument")); + getMultiServiceFactory()->createInstance("com.sun.star.comp.Calc.SpreadsheetDocument"); CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is()); } diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 5dbadba82182..20699208d48b 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -304,7 +304,7 @@ void ScExportTest::setUp() // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure, // which is a private symbol to us, gets called m_xCalcComponent = - getMultiServiceFactory()->createInstance(OUString("com.sun.star.comp.Calc.SpreadsheetDocument")); + getMultiServiceFactory()->createInstance("com.sun.star.comp.Calc.SpreadsheetDocument"); CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is()); } diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 8861a9d2d8a2..f53a4302d2d2 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -2028,7 +2028,7 @@ void ScFiltersTest::setUp() // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure, // which is a private symbol to us, gets called m_xCalcComponent = - getMultiServiceFactory()->createInstance(OUString("com.sun.star.comp.Calc.SpreadsheetDocument")); + getMultiServiceFactory()->createInstance("com.sun.star.comp.Calc.SpreadsheetDocument"); CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is()); } diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx index 38a1ffdf0804..5498ee62b095 100644 --- a/sc/source/core/tool/charthelper.cxx +++ b/sc/source/core/tool/charthelper.cxx @@ -317,7 +317,7 @@ void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj ); uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY ); if ( xProps.is() && - ( xProps->getPropertyValue( OUString( "DisableDataTableDialog" ) ) >>= bDisableDataTableDialog ) && + ( xProps->getPropertyValue("DisableDataTableDialog") >>= bDisableDataTableDialog ) && bDisableDataTableDialog ) { ScChartListenerCollection* pCollection = pDocument->GetChartListenerCollection(); @@ -407,7 +407,7 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, Sd svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj ); uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY ); if ( xProps.is() && - ( xProps->getPropertyValue( OUString( "DisableDataTableDialog" ) ) >>= bDisableDataTableDialog ) && + ( xProps->getPropertyValue("DisableDataTableDialog") >>= bDisableDataTableDialog ) && bDisableDataTableDialog ) { if ( bSameDoc ) @@ -424,9 +424,9 @@ void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, Sd } else { - xProps->setPropertyValue( OUString( "DisableDataTableDialog" ), + xProps->setPropertyValue("DisableDataTableDialog", uno::makeAny( sal_False ) ); - xProps->setPropertyValue( OUString( "DisableComplexChartTypes" ), + xProps->setPropertyValue("DisableComplexChartTypes", uno::makeAny( sal_False ) ); } } diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 9a3b02ed9a72..926866d094cb 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3079,7 +3079,7 @@ static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCe uno::Reference< sheet::XSheetCellRange > xSheetRange( xCellRange, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xSheetRange->getSpreadsheet(), uno::UNO_QUERY_THROW ); OUString sCodeName; - xProps->getPropertyValue( OUString( "CodeName" ) ) >>= sCodeName; + xProps->getPropertyValue("CodeName") >>= sCodeName; // #TODO #FIXME ideally we should 'throw' here if we don't get a valid parent, but... it is possible // to create a module ( and use 'Option VBASupport 1' ) for a calc document, in this scenario there // are *NO* special document module objects ( of course being able to switch between vba/non vba mode at diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index e8f88282b614..f28f3da458d4 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -3325,7 +3325,7 @@ static void lcl_getChartSubTitle(const Reference<XChartDocument>& xChartDoc, return; OUString aTitle; - Any any = xProp->getPropertyValue( OUString("String") ); + Any any = xProp->getPropertyValue("String"); if (any >>= aTitle) rSubTitle = aTitle; } diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx index d078272470d7..5dcd7dcc21fb 100644 --- a/sc/source/filter/excel/xltoolbar.cxx +++ b/sc/source/filter/excel/xltoolbar.cxx @@ -158,7 +158,7 @@ bool ScCTB::ImportCustomToolBar( ScCTBWrapper& rWrapper, CustomToolBarImportHelp uno::Reference< beans::XPropertySet > xProps( xIndexContainer, uno::UNO_QUERY_THROW ); WString& name = tb.getName(); // set UI name for toolbar - xProps->setPropertyValue( OUString("UIName"), uno::makeAny( name.getString() ) ); + xProps->setPropertyValue("UIName", uno::makeAny( name.getString() ) ); OUString sToolBarName = sToolbarPrefix.concat( name.getString() ); for ( std::vector< ScTBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it ) diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 3dcb8ba8697f..0062479be778 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1749,7 +1749,7 @@ void ScXMLExport::_ExportStyles( sal_Bool bUsed ) uno::Reference <lang::XMultiServiceFactory> xMultiServiceFactory(GetModel(), uno::UNO_QUERY); if (xMultiServiceFactory.is()) { - uno::Reference <beans::XPropertySet> xProperties(xMultiServiceFactory->createInstance(OUString("com.sun.star.sheet.Defaults")), uno::UNO_QUERY); + uno::Reference <beans::XPropertySet> xProperties(xMultiServiceFactory->createInstance("com.sun.star.sheet.Defaults"), uno::UNO_QUERY); if (xProperties.is()) aStylesExp.exportDefaultStyle(xProperties, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME), xCellStylesExportPropertySetMapper); if (pSharedData->HasShapes()) @@ -1763,7 +1763,7 @@ void ScXMLExport::_ExportStyles( sal_Bool bUsed ) uno::Reference <container::XNameAccess> xStylesFamilies(xStyleFamiliesSupplier->getStyleFamilies()); if (xStylesFamilies.is()) { - uno::Reference <container::XIndexAccess> xCellStyles(xStylesFamilies->getByName(OUString("CellStyles")), uno::UNO_QUERY); + uno::Reference <container::XIndexAccess> xCellStyles(xStylesFamilies->getByName("CellStyles"), uno::UNO_QUERY); if (xCellStyles.is()) { sal_Int32 nCount(xCellStyles->getCount()); @@ -3009,7 +3009,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape, if (xShapeProps.is()) { sal_Int32 nZOrder = 0; - if (xShapeProps->getPropertyValue(OUString("ZOrder")) >>= nZOrder) + if (xShapeProps->getPropertyValue("ZOrder") >>= nZOrder) { OUStringBuffer sBuffer; ::sax::Converter::convertNumber(sBuffer, nZOrder); @@ -4490,7 +4490,7 @@ void ScXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>& uno::Reference <lang::XMultiServiceFactory> xMultiServiceFactory(GetModel(), uno::UNO_QUERY); if (xMultiServiceFactory.is()) { - uno::Reference <beans::XPropertySet> xProperties(xMultiServiceFactory->createInstance(OUString("com.sun.star.comp.SpreadsheetSettings")), uno::UNO_QUERY); + uno::Reference <beans::XPropertySet> xProperties(xMultiServiceFactory->createInstance("com.sun.star.comp.SpreadsheetSettings"), uno::UNO_QUERY); if (xProperties.is()) SvXMLUnitConverter::convertPropertySet(rProps, xProperties); diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 3e80d97194a8..972d990d82b0 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2585,7 +2585,7 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa } } } - uno::Reference <uno::XInterface> xInterface = xMultiServiceFactory->createInstance(OUString("com.sun.star.comp.SpreadsheetSettings")); + uno::Reference <uno::XInterface> xInterface = xMultiServiceFactory->createInstance("com.sun.star.comp.SpreadsheetSettings"); uno::Reference <beans::XPropertySet> xProperties(xInterface, uno::UNO_QUERY); if (xProperties.is()) SvXMLUnitConverter::convertPropertySet(xProperties, aConfigProps); @@ -2765,7 +2765,7 @@ void ScXMLImport::AddStyleRange(const table::CellRangeAddress& rCellRange) { uno::Reference <lang::XMultiServiceFactory> xMultiServiceFactory(GetModel(), uno::UNO_QUERY); if (xMultiServiceFactory.is()) - xSheetCellRanges.set(uno::Reference <sheet::XSheetCellRangeContainer>(xMultiServiceFactory->createInstance(OUString("com.sun.star.sheet.SheetCellRanges")), uno::UNO_QUERY)); + xSheetCellRanges.set(uno::Reference <sheet::XSheetCellRangeContainer>(xMultiServiceFactory->createInstance("com.sun.star.sheet.SheetCellRanges"), uno::UNO_QUERY)); OSL_ENSURE(xSheetCellRanges.is(), "didn't get SheetCellRanges"); } diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 477f151cbba6..e96a1ecc8f9e 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -577,7 +577,7 @@ void XMLTableStyleContext::SetDefaults() uno::Reference <lang::XMultiServiceFactory> xMultiServiceFactory(GetImport().GetModel(), uno::UNO_QUERY); if (xMultiServiceFactory.is()) { - uno::Reference <beans::XPropertySet> xProperties(xMultiServiceFactory->createInstance(OUString("com.sun.star.sheet.Defaults")), uno::UNO_QUERY); + uno::Reference <beans::XPropertySet> xProperties(xMultiServiceFactory->createInstance("com.sun.star.sheet.Defaults"), uno::UNO_QUERY); if (xProperties.is()) FillPropertySet(xProperties); } diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 1df21c52dfe9..b09d16932a37 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -134,7 +134,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(const uno::Reference<uno::XCo aParserInput.aInputStream = xDocStream->getInputStream(); uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY ); - uno::Any aAny = xSet->getPropertyValue( OUString("Encrypted") ); + uno::Any aAny = xSet->getPropertyValue("Encrypted"); aAny >>= bEncrypted; } catch( const packages::WrongPasswordException& ) @@ -381,7 +381,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) { sal_Int32 nProgressRange(1000000); xStatusIndicator->start(ScGlobal::GetRscString(STR_LOAD_DOC), nProgressRange); - xInfoSet->setPropertyValue(OUString("ProgressRange"), uno::makeAny(nProgressRange)); + xInfoSet->setPropertyValue("ProgressRange", uno::makeAny(nProgressRange)); } // Set base URI @@ -601,14 +601,14 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) } // Set Code Names - uno::Any aAny = xInfoSet->getPropertyValue(OUString("ScriptConfiguration")); + uno::Any aAny = xInfoSet->getPropertyValue("ScriptConfiguration"); uno::Reference <container::XNameAccess> xCodeNameAccess; if( aAny >>= xCodeNameAccess ) XMLCodeNameProvider::set( xCodeNameAccess, &rDoc ); // VBA compatibility bool bVBACompat = false; - if ( (xInfoSet->getPropertyValue(OUString("VBACompatibilityMode")) >>= bVBACompat) && bVBACompat ) + if ( (xInfoSet->getPropertyValue("VBACompatibilityMode") >>= bVBACompat) && bVBACompat ) { /* Set library container to VBA compatibility mode, this forces loading the Basic project, which in turn creates the @@ -673,7 +673,7 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XCompon uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY ); if (xSet.is()) { - xSet->setPropertyValue(OUString("MediaType"), uno::makeAny(sMediaType)); + xSet->setPropertyValue("MediaType", uno::makeAny(sMediaType)); OUString aUseCommonPassPropName("UseCommonStoragePasswordEncryption"); // advise storage impl to use common encryption diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index eec20b57ae7c..ac0749b9101a 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -1040,7 +1040,7 @@ void ScChildrenShapes::AddShape(const uno::Reference<drawing::XShape>& xShape, s uno::Reference< beans::XPropertySet > xShapeProp(xShape, uno::UNO_QUERY); if (xShapeProp.is()) { - uno::Any aPropAny = xShapeProp->getPropertyValue(OUString( "LayerID" )); + uno::Any aPropAny = xShapeProp->getPropertyValue("LayerID"); sal_Int16 nLayerID = 0; if( aPropAny >>= nLayerID ) { diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 919d59e35bff..795902e4d4c7 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1088,7 +1088,7 @@ void ScInputBarGroup::TriggerToolboxLayout() if ( xPropSet.is() ) { - com::sun::star::uno::Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + com::sun::star::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; } diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 2f1f0e2e8855..c272a2729e97 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -2851,7 +2851,7 @@ uno::Reference< uno::XInterface > GetDocModuleObject( SfxObjectShell& rDocSh, St uno::Reference< uno::XInterface > xDocModuleApiObject; if ( xSF.is() ) { - xVBACodeNamedObjectAccess.set( xSF->createInstance( OUString( "ooo.vba.VBAObjectModuleObjectProvider")), uno::UNO_QUERY ); + xVBACodeNamedObjectAccess.set( xSF->createInstance("ooo.vba.VBAObjectModuleObjectProvider"), uno::UNO_QUERY ); xDocModuleApiObject.set( xVBACodeNamedObjectAccess->getByName( sCodeName ), uno::UNO_QUERY ); } return xDocModuleApiObject; diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 5673502d6599..695cbda432cc 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -289,7 +289,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( OUString("PluginURL"), + xSet->setPropertyValue("PluginURL", uno::makeAny( OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) ); } } @@ -685,7 +685,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* { //get dialog size: awt::Size aDialogAWTSize; - if( xDialogProps->getPropertyValue( OUString("Size") ) + if( xDialogProps->getPropertyValue("Size") >>= aDialogAWTSize ) { Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height ); @@ -693,12 +693,12 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* { //calculate and set new position Point aDialogPos = pViewShell->GetChartDialogPos( aDialogSize, aRect ); - xDialogProps->setPropertyValue( OUString("Position"), + xDialogProps->setPropertyValue("Position", uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } //tell the dialog to unlock controller - xDialogProps->setPropertyValue( OUString("UnlockControllersOnExecute"), + xDialogProps->setPropertyValue("UnlockControllersOnExecute", uno::makeAny( sal_True ) ); } diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index e2265717498e..356c65923ae6 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -211,7 +211,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { try { - aCaller = xProps->getPropertyValue( OUString("Name") ); + aCaller = xProps->getPropertyValue("Name"); } catch( uno::Exception& ) {} } diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx index 4efb484410aa..0a2ff0debffc 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -254,7 +254,7 @@ namespace calc if ( xProp.is() ) { CellContentType eResultType; - if ( (xProp->getPropertyValue(OUString( "FormulaResultType" ) ) >>= eResultType) && eResultType == CellContentType_VALUE ) + if ( (xProp->getPropertyValue("FormulaResultType") >>= eResultType) && eResultType == CellContentType_VALUE ) bHasValue = sal_True; } } @@ -417,10 +417,10 @@ namespace calc if ( xOldFormat.is() ) { // use the locale of the existing format - xOldFormat->getPropertyValue( OUString( "Locale" ) ) >>= aLocale; + xOldFormat->getPropertyValue("Locale") >>= aLocale; sal_Int16 nOldType = ::comphelper::getINT16( - xOldFormat->getPropertyValue( OUString( "Type" ) ) ); + xOldFormat->getPropertyValue("Type") ); if ( nOldType & NumberFormat::LOGICAL ) bWasBoolean = sal_True; } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 635fa1af9713..81e4953c2bcb 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1802,7 +1802,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum { Reference< beans::XPropertySet > xSeqProp( xLS->getValues(), uno::UNO_QUERY ); OUString aRole; - if( xSeqProp.is() && (xSeqProp->getPropertyValue(OUString("Role")) >>= aRole) && + if( xSeqProp.is() && (xSeqProp->getPropertyValue("Role") >>= aRole) && aRole.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("categories")) ) bThisIsCategories = bHasCategories = true; } diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 31038d8c41e7..2fa6324264c0 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -85,7 +85,7 @@ public: { ScDocument* pDoc = mpDocShell->GetDocument(); if ( !pDoc ) - throw uno::RuntimeException( OUString(""), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("", uno::Reference< uno::XInterface >() ); uno::Sequence< uno::Any > aArgs(2); // access the application object ( parent for workbook ) diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index fe9a594a8534..8c71f3f74112 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -278,7 +278,7 @@ static sal_Bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, uno::Reference < beans::XPropertySet > xShapeProp (xShape, uno::UNO_QUERY); if (xShapeProp.is()) { - xShapeProp->getPropertyValue( OUString( "CaptionPoint" ) ) >>= rCaptionPoint; + xShapeProp->getPropertyValue("CaptionPoint") >>= rCaptionPoint; bReturn = sal_True; } } @@ -446,7 +446,7 @@ void SAL_CALL ScShapeObj::setPropertyValue( } } else - throw lang::IllegalArgumentException(OUString("only XCell or XSpreadsheet objects allowed"), static_cast<cppu::OWeakObject*>(this), 0); + throw lang::IllegalArgumentException("only XCell or XSpreadsheet objects allowed", static_cast<cppu::OWeakObject*>(this), 0); } else if ( aNameString.EqualsAscii( SC_UNONAME_IMAGEMAP ) ) { diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index d8eb7f321e67..0d6d94e99f51 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -52,7 +52,7 @@ GetUnnamedDataBaseRanges( ScDocShell* pShell ) throw ( uno::RuntimeException ) if ( pShell ) xModel.set( pShell->GetModel(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xModelProps( xModel, uno::UNO_QUERY_THROW ); - uno::Reference< sheet::XUnnamedDatabaseRanges > xUnnamedDBRanges( xModelProps->getPropertyValue( OUString("UnnamedDatabaseRanges") ), uno::UNO_QUERY_THROW ); + uno::Reference< sheet::XUnnamedDatabaseRanges > xUnnamedDBRanges( xModelProps->getPropertyValue("UnnamedDatabaseRanges"), uno::UNO_QUERY_THROW ); return xUnnamedDBRanges; } @@ -68,7 +68,7 @@ GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet ) throw ( uno::RuntimeExc uno::Reference< sheet::XDatabaseRange > xDBRange( xUnnamedDBRanges->getByTable( nSheet ) , uno::UNO_QUERY_THROW ); sal_Bool bHasAuto = false; uno::Reference< beans::XPropertySet > xProps( xDBRange, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( OUString("AutoFilter") ) >>= bHasAuto; + xProps->getPropertyValue("AutoFilter") >>= bHasAuto; if ( bHasAuto ) { xDataBaseRange=xDBRange; @@ -82,7 +82,7 @@ ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRang ScCellRangesBase* pScCellRangesBase = ScCellRangesBase::getImplementation( xRange ); if ( !pScCellRangesBase ) { - throw uno::RuntimeException( OUString( "Failed to access underlying doc shell uno range object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to access underlying doc shell uno range object", uno::Reference< uno::XInterface >() ); } return pScCellRangesBase->GetDocShell(); } @@ -262,7 +262,7 @@ getUnoSheetModuleObj( const uno::Reference< sheet::XSpreadsheet >& xSheet ) thro { uno::Reference< beans::XPropertySet > xProps( xSheet, uno::UNO_QUERY_THROW ); OUString sCodeName; - xProps->getPropertyValue( OUString("CodeName") ) >>= sCodeName; + xProps->getPropertyValue("CodeName") >>= sCodeName; // #TODO #FIXME ideally we should 'throw' here if we don't get a valid parent, but... it is possible // to create a module ( and use 'Option VBASupport 1' ) for a calc document, in this scenario there // are *NO* special document module objects ( of course being able to switch between vba/non vba mode at @@ -324,7 +324,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& { uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY_THROW ); uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance( OUString( "ooo.vba.VBAObjectModuleObjectProvider")), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance("ooo.vba.VBAObjectModuleObjectProvider"), uno::UNO_QUERY_THROW ); // set up the module info for the workbook and sheets in the nealy created // spreadsheet ScDocument* pDoc = pShell->GetDocument(); diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx index 12208dde8812..aa3114d0fde7 100644 --- a/sc/source/ui/vba/excelvbahelper.hxx +++ b/sc/source/ui/vba/excelvbahelper.hxx @@ -79,7 +79,7 @@ template < typename ImplObject > if ( xTunnel.is() ) pObj = reinterpret_cast<ImplObject*>( xTunnel->getSomething(ImplObject::getUnoTunnelId())); if ( bThrow && !pObj ) - throw css::uno::RuntimeException( OUString( "Internal error, can't exctract implementation object" ), rxWrapperIf ); + throw css::uno::RuntimeException("Internal error, can't exctract implementation object", rxWrapperIf ); return pObj; } // ============================================================================ diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 13c62fe16826..bc19d9f4b200 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -282,15 +282,15 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException) if ( ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape ) { uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW ); - if ( xShapeServiceInfo->supportsService( OUString( "com.sun.star.drawing.Text" ) ) ) + if ( xShapeServiceInfo->supportsService("com.sun.star.drawing.Text") ) { return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, xModel ) ) ); } } return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, xModel, ScVbaShape::getType( xShape ) ) ) ); } - else if( xServiceInfo->supportsService( OUString("com.sun.star.sheet.SheetCellRange") ) || - xServiceInfo->supportsService( OUString("com.sun.star.sheet.SheetCellRanges") ) ) + else if( xServiceInfo->supportsService("com.sun.star.sheet.SheetCellRange") || + xServiceInfo->supportsService("com.sun.star.sheet.SheetCellRanges") ) { uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY); if ( !xRange.is() ) @@ -316,10 +316,10 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException ) uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW); ScTabViewShell* pViewShell = excel::getCurrentBestViewShell(mxContext); if ( !pViewShell ) - throw uno::RuntimeException( OUString("No ViewShell available"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("No ViewShell available", uno::Reference< uno::XInterface >() ); ScViewData* pTabView = pViewShell->GetViewData(); if ( !pTabView ) - throw uno::RuntimeException( OUString("No ViewData available"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("No ViewData available", uno::Reference< uno::XInterface >() ); sal_Int32 nCursorX = pTabView->GetCurX(); sal_Int32 nCursorY = pTabView->GetCurY(); @@ -438,7 +438,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::Runtime } } else - throw uno::RuntimeException( OUString( "Invalid prarameter. It should be a string or False" ), + throw uno::RuntimeException("Invalid prarameter. It should be a string or False", uno::Reference< uno::XInterface >() ); } @@ -539,7 +539,7 @@ ScVbaApplication::getActiveSheet() throw (uno::RuntimeException) if ( !result.is() ) { // Fixme - check if this is reasonable/desired behavior - throw uno::RuntimeException( OUString( "No activeSheet available" ), + throw uno::RuntimeException("No activeSheet available", uno::Reference< uno::XInterface >() ); } return result; @@ -571,7 +571,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro bScroll = aScroll; } else - throw uno::RuntimeException( OUString( "second parameter should be boolean" ), + throw uno::RuntimeException("second parameter should be boolean", uno::Reference< uno::XInterface >() ); } @@ -617,7 +617,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro //and the createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) to get a root browse::XBrowseNode. //for query XInvocation interface. //but how to directly get the XInvocation? - throw uno::RuntimeException( OUString( "invalid reference for range name, it should be procedure name" ), + throw uno::RuntimeException("invalid reference for range name, it should be procedure name", uno::Reference< uno::XInterface >() ); } return; @@ -652,7 +652,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro } return; } - throw uno::RuntimeException( OUString( "invalid reference or name" ), + throw uno::RuntimeException("invalid reference or name", uno::Reference< uno::XInterface >() ); } @@ -705,7 +705,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException) break; } default: - throw uno::RuntimeException( OUString("Unknown value for Cursor pointer"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Unknown value for Cursor pointer", uno::Reference< uno::XInterface >() ); // TODO: isn't this a flaw in the API? It should be allowed to throw an // IllegalArgumentException, or so } @@ -803,8 +803,8 @@ ScVbaApplication::setDisplayScrollBars( sal_Bool bSet ) throw (uno::RuntimeExce // use uno here as it does all he repainting etc. magic uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xView, uno::UNO_QUERY ); - xProps->setPropertyValue( OUString("HasVerticalScrollBar"), uno::makeAny( bSet ) ); - xProps->setPropertyValue( OUString("HasHorizontalScrollBar"), uno::makeAny( bSet ) ); + xProps->setPropertyValue("HasVerticalScrollBar", uno::makeAny( bSet ) ); + xProps->setPropertyValue("HasHorizontalScrollBar", uno::makeAny( bSet ) ); } sal_Bool SAL_CALL diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index 4e59d1b3dce7..e8d006e66c89 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -64,7 +64,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno: { ScVbaChart* pChart = static_cast< ScVbaChart* >( xChart.get() ); if ( !pChart ) - throw uno::RuntimeException( OUString( "Object failure, can't access chart implementation" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Object failure, can't access chart implementation", uno::Reference< uno::XInterface >() ); uno::Reference< beans::XPropertySet > xAxisPropertySet; if (((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue))) @@ -96,18 +96,18 @@ public: // primary sal_Bool bBool = false; uno::Reference< beans::XPropertySet > xDiagramPropertySet( pChart->xDiagramPropertySet() ); - if ( ( xDiagramPropertySet->getPropertyValue( OUString( "HasXAxis" ) ) >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue("HasXAxis") >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlPrimary, xlCategory ) ); - if ( ( xDiagramPropertySet->getPropertyValue( OUString( "HasYAxis" ) ) >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue("HasYAxis") >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlPrimary, xlSeriesAxis ) ); if ( pChart->is3D() ) mCoordinates.push_back( AxesCoordinate( xlPrimary, xlValue ) ); // secondary - if ( ( xDiagramPropertySet->getPropertyValue( OUString( "HasSecondaryXAxis" ) ) >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue("HasSecondaryXAxis") >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlSecondary, xlCategory ) ); - if ( ( xDiagramPropertySet->getPropertyValue( OUString( "HasSecondaryYAxis" ) ) >>= bBool ) && bBool ) + if ( ( xDiagramPropertySet->getPropertyValue("HasSecondaryYAxis") >>= bBool ) && bBool ) mCoordinates.push_back( AxesCoordinate( xlSecondary, xlSeriesAxis ) ); } @@ -160,7 +160,7 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup) sal_Int32 nAxisGroup = xlPrimary; sal_Int32 nType = -1; if ( !_nType.hasValue() || ( ( _nType >>= nType ) == false ) ) - throw uno::RuntimeException( OUString( "Axes::Item Failed to extract type" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Axes::Item Failed to extract type", uno::Reference< uno::XInterface >() ); if ( _oAxisGroup.hasValue() ) _oAxisGroup >>= nAxisGroup ; diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx index f52eec90a38b..242d877213e8 100644 --- a/sc/source/ui/vba/vbaaxis.cxx +++ b/sc/source/ui/vba/vbaaxis.cxx @@ -38,7 +38,7 @@ ScVbaAxis::getChartPtr() throw( uno::RuntimeException ) { ScVbaChart* pChart = static_cast< ScVbaChart* >( moChartParent.get() ); if ( !pChart ) - throw uno::RuntimeException( OUString("Can't access parent chart impl"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can't access parent chart impl", uno::Reference< uno::XInterface >() ); return pChart; } @@ -232,13 +232,13 @@ ScVbaAxis::setHasTitle( ::sal_Bool _bHasTitle ) throw (script::BasicErrorExcepti switch(nType) { case xlCategory: - pChart->mxDiagramPropertySet->setPropertyValue( OUString("HasXAxisTitle"), uno::makeAny(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue("HasXAxisTitle", uno::makeAny(_bHasTitle)); break; case xlSeriesAxis: - pChart->mxDiagramPropertySet->setPropertyValue( OUString("HasZAxisTitle"), uno::makeAny(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue("HasZAxisTitle", uno::makeAny(_bHasTitle)); break; default: // xlValue: - pChart->mxDiagramPropertySet->setPropertyValue( OUString("HasYAxisTitle"), uno::makeAny(_bHasTitle)); + pChart->mxDiagramPropertySet->setPropertyValue("HasYAxisTitle", uno::makeAny(_bHasTitle)); } } @@ -259,13 +259,13 @@ ScVbaAxis::getHasTitle( ) throw (script::BasicErrorException, uno::RuntimeExcep switch(nType) { case xlCategory: - pChart->mxDiagramPropertySet->getPropertyValue( OUString("HasXAxisTitle") ) >>= bHasTitle; + pChart->mxDiagramPropertySet->getPropertyValue("HasXAxisTitle") >>= bHasTitle; break; case xlSeriesAxis: - pChart->mxDiagramPropertySet->getPropertyValue( OUString("HasZAxisTitle") ) >>= bHasTitle; + pChart->mxDiagramPropertySet->getPropertyValue("HasZAxisTitle") >>= bHasTitle; break; default: // xlValue: - pChart->mxDiagramPropertySet->getPropertyValue( OUString("HasYAxisTitle") ) >>= bHasTitle; + pChart->mxDiagramPropertySet->getPropertyValue("HasYAxisTitle") >>= bHasTitle; } } catch (const uno::Exception& e) @@ -281,7 +281,7 @@ ScVbaAxis::setMinorUnit( double _fMinorUnit ) throw (script::BasicErrorException try { if (isValueAxis()) - mxPropertySet->setPropertyValue( OUString("StepHelp"), uno::makeAny(_fMinorUnit)); + mxPropertySet->setPropertyValue("StepHelp", uno::makeAny(_fMinorUnit)); } catch (uno::Exception& ) { @@ -296,7 +296,7 @@ ScVbaAxis::getMinorUnit( ) throw (script::BasicErrorException, uno::RuntimeExce try { if (isValueAxis()) - mxPropertySet->getPropertyValue( OUString("StepHelp")) >>= fMinor; + mxPropertySet->getPropertyValue("StepHelp") >>= fMinor; } catch (uno::Exception& ) { @@ -311,7 +311,7 @@ ScVbaAxis::setMinorUnitIsAuto( ::sal_Bool _bMinorUnitIsAuto ) throw (script::Bas try { if (isValueAxis()) - mxPropertySet->setPropertyValue( OUString( "AutoStepHelp" ), uno::makeAny(_bMinorUnitIsAuto)); + mxPropertySet->setPropertyValue("AutoStepHelp", uno::makeAny(_bMinorUnitIsAuto)); } catch (uno::Exception& ) { @@ -327,7 +327,7 @@ ScVbaAxis::getMinorUnitIsAuto( ) throw (script::BasicErrorException, uno::Runti { if (isValueAxis()) { - mxPropertySet->getPropertyValue( OUString( "AutoStepHelp") ) >>= bIsAuto; + mxPropertySet->getPropertyValue("AutoStepHelp") >>= bIsAuto; } } catch (uno::Exception& ) @@ -357,7 +357,7 @@ ScVbaAxis::setMajorUnit( double _fMajorUnit ) throw (script::BasicErrorException { if (isValueAxis()) { - mxPropertySet->setPropertyValue( OUString("StepMain"), uno::makeAny(_fMajorUnit)); + mxPropertySet->setPropertyValue("StepMain", uno::makeAny(_fMajorUnit)); } } catch (uno::Exception& ) @@ -373,7 +373,7 @@ ScVbaAxis::getMajorUnit( ) throw (script::BasicErrorException, uno::RuntimeExce try { if (isValueAxis()) - mxPropertySet->getPropertyValue( OUString("StepMain")) >>= fMax; + mxPropertySet->getPropertyValue("StepMain") >>= fMax; } catch (uno::Exception& ) { @@ -389,7 +389,7 @@ ScVbaAxis::setMajorUnitIsAuto( ::sal_Bool _bMajorUnitIsAuto ) throw (script::Bas { if (isValueAxis()) { - mxPropertySet->setPropertyValue( OUString( "AutoStepMain" ), uno::makeAny( _bMajorUnitIsAuto )); + mxPropertySet->setPropertyValue("AutoStepMain", uno::makeAny( _bMajorUnitIsAuto )); } } catch (uno::Exception& ) @@ -406,7 +406,7 @@ ScVbaAxis::getMajorUnitIsAuto( ) throw (script::BasicErrorException, uno::Runti { if (isValueAxis()) { - mxPropertySet->getPropertyValue( OUString( "AutoStepMain")) >>= bIsAuto; + mxPropertySet->getPropertyValue("AutoStepMain") >>= bIsAuto; } } catch (uno::Exception& ) @@ -423,7 +423,7 @@ ScVbaAxis::setMaximumScale( double _fMaximumScale ) throw (script::BasicErrorExc { if ( isValueAxis() ) { - mxPropertySet->setPropertyValue( OUString( "Max" ), uno::makeAny(_fMaximumScale)); + mxPropertySet->setPropertyValue("Max", uno::makeAny(_fMaximumScale)); } } catch ( uno::Exception& ) @@ -440,7 +440,7 @@ ScVbaAxis::getMaximumScale( ) throw (script::BasicErrorException, uno::RuntimeE { if (isValueAxis()) { - mxPropertySet->getPropertyValue( OUString( "Max" )) >>= fMax; + mxPropertySet->getPropertyValue("Max") >>= fMax; } } catch (uno::Exception& ) @@ -457,7 +457,7 @@ ScVbaAxis::setMaximumScaleIsAuto( ::sal_Bool _bMaximumScaleIsAuto ) throw (scrip try { if ( isValueAxis() ) - mxPropertySet->setPropertyValue( OUString( "AutoMax" ), uno::makeAny( _bMaximumScaleIsAuto )); + mxPropertySet->setPropertyValue("AutoMax", uno::makeAny( _bMaximumScaleIsAuto )); } catch ( uno::Exception& ) @@ -474,7 +474,7 @@ ScVbaAxis::getMaximumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru try { if (isValueAxis()) - mxPropertySet->getPropertyValue( OUString( "AutoMax" ) ) >>= bIsAuto; + mxPropertySet->getPropertyValue("AutoMax") >>= bIsAuto; } catch ( uno::Exception& ) { @@ -489,7 +489,7 @@ ScVbaAxis::setMinimumScale( double _fMinimumScale ) throw (script::BasicErrorExc try { if (isValueAxis()) - mxPropertySet->setPropertyValue( OUString("Min"), uno::makeAny( _fMinimumScale ) ); + mxPropertySet->setPropertyValue("Min", uno::makeAny( _fMinimumScale ) ); } catch ( uno::Exception& ) { @@ -504,7 +504,7 @@ ScVbaAxis::getMinimumScale( ) throw (script::BasicErrorException, uno::RuntimeE try { if (isValueAxis()) - mxPropertySet->getPropertyValue( OUString( "Min")) >>= fMin; + mxPropertySet->getPropertyValue("Min") >>= fMin; } catch (const uno::Exception& e) { @@ -520,7 +520,7 @@ ScVbaAxis::setMinimumScaleIsAuto( ::sal_Bool _bMinimumScaleIsAuto ) throw (scrip { if (isValueAxis()) { - mxPropertySet->setPropertyValue( OUString("AutoMin"), uno::makeAny(_bMinimumScaleIsAuto)); + mxPropertySet->setPropertyValue("AutoMin", uno::makeAny(_bMinimumScaleIsAuto)); } } catch (uno::Exception& ) @@ -537,7 +537,7 @@ ScVbaAxis::getMinimumScaleIsAuto( ) throw (script::BasicErrorException, uno::Ru { if (isValueAxis()) { - mxPropertySet->getPropertyValue( OUString("AutoMin") ) >>= bIsAuto; + mxPropertySet->getPropertyValue("AutoMin") >>= bIsAuto; } } catch (uno::Exception& ) @@ -563,10 +563,10 @@ ScVbaAxis::setScaleType( ::sal_Int32 _nScaleType ) throw (script::BasicErrorExce switch (_nScaleType) { case xlScaleLinear: - mxPropertySet->setPropertyValue( OUString( "Logarithmic" ), uno::makeAny( sal_False ) ); + mxPropertySet->setPropertyValue("Logarithmic", uno::makeAny( sal_False ) ); break; case xlScaleLogarithmic: - mxPropertySet->setPropertyValue( OUString( "Logarithmic" ), uno::makeAny( sal_True ) ); + mxPropertySet->setPropertyValue("Logarithmic", uno::makeAny( sal_True ) ); break; default: // According to MS the paramenter is ignored and no Error is thrown diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index 38ee47e8c919..1e2a223bd90e 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -167,7 +167,7 @@ public: table::BorderLine aBorderLine; if ( getBorderLine( aBorderLine ) ) return uno::makeAny( OORGBToXLRGB( aBorderLine.Color ) ); - throw uno::RuntimeException( OUString( "No Implementation available" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("No Implementation available", uno::Reference< uno::XInterface >() ); } void SAL_CALL setColor( const uno::Any& _color ) throw (uno::RuntimeException) { @@ -180,7 +180,7 @@ public: setBorderLine( aBorderLine ); } else - throw uno::RuntimeException( OUString( "No Implementation available" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("No Implementation available", uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL getColorIndex() throw (uno::RuntimeException) @@ -231,7 +231,7 @@ public: break; } } - throw uno::RuntimeException( OUString( "Method failed" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() ); } void SAL_CALL setWeight( const uno::Any& _weight ) throw (uno::RuntimeException) { @@ -255,12 +255,12 @@ public: aBorderLine.OuterLineWidth = OOLineHairline; break; default: - throw uno::RuntimeException( OUString( "Bad param" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() ); } setBorderLine( aBorderLine ); } else - throw uno::RuntimeException( OUString( "Method failed" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL getLineStyle() throw (uno::RuntimeException) @@ -289,12 +289,12 @@ public: case XlLineStyle::xlSlantDashDot: break; default: - throw uno::RuntimeException( OUString( "Bad param" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() ); } setBorderLine( aBorderLine ); } else - throw uno::RuntimeException( OUString( "Method failed" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() ); } }; diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx index 496c8d6d2cec..6d398cdfdddc 100644 --- a/sc/source/ui/vba/vbacharacters.cxx +++ b/sc/source/ui/vba/vbacharacters.cxx @@ -87,7 +87,7 @@ void SAL_CALL ScVbaCharacters::setFont( const uno::Reference< excel::XFont >& /*_font*/ ) throw (css::uno::RuntimeException) { // #TODO #FIXME needs implementation, or can't be done? - throw uno::RuntimeException( OUString( "Not Implemented"), uno::Reference< XInterface >() ); + throw uno::RuntimeException("Not Implemented", uno::Reference< XInterface >() ); } diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 81904861106a..578b5a26cf1b 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -74,10 +74,10 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException ScCellRangesBase* pUno= dynamic_cast< ScCellRangesBase* >( xIf.get() ); ScDocShell* pDocShell = NULL; if ( !pUno ) - throw uno::RuntimeException( OUString("Failed to obtain the impl class from the drawpage"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to obtain the impl class from the drawpage", uno::Reference< uno::XInterface >() ); pDocShell = pUno->GetDocShell(); if ( !pDocShell ) - throw uno::RuntimeException( OUString("Failed to obtain the docshell implclass"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to obtain the docshell implclass", uno::Reference< uno::XInterface >() ); uno::Reference< sheet::XSpreadsheetDocument > xSpreadsheetDocument( pDocShell->GetModel(), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XSpreadsheets > xSpreadsheets = xSpreadsheetDocument->getSheets(); diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx index d6f18cc40bbc..6f801d3dd757 100644 --- a/sc/source/ui/vba/vbacomment.cxx +++ b/sc/source/ui/vba/vbacomment.cxx @@ -47,7 +47,7 @@ ScVbaComment::ScVbaComment( mxRange( xRange ) { if ( !xRange.is() ) - throw lang::IllegalArgumentException( OUString( "range is not set " ), uno::Reference< uno::XInterface >() , 1 ); + throw lang::IllegalArgumentException("range is not set ", uno::Reference< uno::XInterface >() , 1 ); uno::Reference< text::XSimpleText > xAnnoText( getAnnotation(), uno::UNO_QUERY ); } @@ -200,7 +200,7 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An xAnnoText->insertString( xRange, sText, bOverwrite ); return xAnnoText->getString(); } - throw uno::RuntimeException( OUString( "ScVbaComment::Text - bad Start value " ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("ScVbaComment::Text - bad Start value ", uno::Reference< uno::XInterface >() ); } else if ( aText.hasValue() ) { diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index 1f6ce312547b..292171658082 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -105,8 +105,8 @@ ScVbaFont::setSuperscript( const uno::Any& aValue ) throw ( uno::RuntimeExceptio nValue = SUPERSCRIPT; nValue2 = SUPERSCRIPTHEIGHT; } - xProps->setPropertyValue( OUString( "CharEscapement" ), ( uno::Any )nValue ); - xProps->setPropertyValue( OUString( "CharEscapementHeight" ), ( uno::Any )nValue2 ); + xProps->setPropertyValue("CharEscapement", ( uno::Any )nValue ); + xProps->setPropertyValue("CharEscapementHeight", ( uno::Any )nValue2 ); } uno::Any SAL_CALL @@ -138,7 +138,7 @@ ScVbaFont::getSuperscript() throw ( uno::RuntimeException ) xCell.set( xCellRange->getCellByPosition( 0,0 ) ); uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell ); short nValue = 0; - xProps->getPropertyValue( OUString( "CharEscapement" ) ) >>= nValue; + xProps->getPropertyValue("CharEscapement") >>= nValue; return uno::makeAny( ( nValue == SUPERSCRIPT ) ); } @@ -178,8 +178,8 @@ ScVbaFont::setSubscript( const uno::Any& aValue ) throw ( uno::RuntimeException nValue2 = SUBSCRIPTHEIGHT; } - xProps->setPropertyValue( OUString( "CharEscapementHeight" ), ( uno::Any )nValue2 ); - xProps->setPropertyValue( OUString( "CharEscapement" ), ( uno::Any )nValue ); + xProps->setPropertyValue("CharEscapementHeight", ( uno::Any )nValue2 ); + xProps->setPropertyValue("CharEscapement", ( uno::Any )nValue ); } @@ -213,7 +213,7 @@ ScVbaFont::getSubscript() throw ( uno::RuntimeException ) uno::Reference< beans::XPropertySet > xProps = lcl_TextProperties( xCell ); short nValue = NORMAL; - xProps->getPropertyValue( OUString( "CharEscapement" ) ) >>= nValue; + xProps->getPropertyValue("CharEscapement") >>= nValue; return uno::makeAny( ( nValue == SUBSCRIPT ) ); } @@ -258,7 +258,7 @@ void SAL_CALL ScVbaFont::setStandardFontSize( const uno::Any& /*aValue*/ ) throw( uno::RuntimeException ) { //XXX #TODO# #FIXME# - //mxFont->setPropertyValue( OUString( "CharSize" ), ( uno::Any )fValue ); + //mxFont->setPropertyValue("CharSize", ( uno::Any )fValue ); throw uno::RuntimeException( OUString("setStandardFontSize not supported"), uno::Reference< uno::XInterface >() ); } @@ -379,10 +379,10 @@ ScVbaFont::setUnderline( const uno::Any& aValue ) throw ( uno::RuntimeException nValue = awt::FontUnderline::DOUBLE; break; default: - throw uno::RuntimeException( OUString("Unknown value for Underline"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Unknown value for Underline", uno::Reference< uno::XInterface >() ); } - mxFont->setPropertyValue( OUString( "CharUnderline" ), ( uno::Any )nValue ); + mxFont->setPropertyValue("CharUnderline", ( uno::Any )nValue ); } @@ -394,7 +394,7 @@ ScVbaFont::getUnderline() throw ( uno::RuntimeException ) return aNULL(); sal_Int32 nValue = awt::FontUnderline::NONE; - mxFont->getPropertyValue( OUString( "CharUnderline" ) ) >>= nValue; + mxFont->getPropertyValue("CharUnderline") >>= nValue; switch ( nValue ) { case awt::FontUnderline::DOUBLE: @@ -407,7 +407,7 @@ ScVbaFont::getUnderline() throw ( uno::RuntimeException ) nValue = excel::XlUnderlineStyle::xlUnderlineStyleNone; break; default: - throw uno::RuntimeException( OUString("Unknown value retrieved for Underline"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Unknown value retrieved for Underline", uno::Reference< uno::XInterface >() ); } return uno::makeAny( nValue ); @@ -454,14 +454,14 @@ ScVbaFont::getColor() throw (uno::RuntimeException) { // #TODO #FIXME - behave like getXXX above ( wrt. GetDataSet ) uno::Any aAny; - aAny = OORGBToXLRGB( mxFont->getPropertyValue( OUString( "CharColor" ) ) ); + aAny = OORGBToXLRGB( mxFont->getPropertyValue("CharColor") ); return aAny; } void SAL_CALL ScVbaFont::setOutlineFont( const uno::Any& aValue ) throw ( uno::RuntimeException ) { - mxFont->setPropertyValue( OUString( "CharContoured" ), aValue ); + mxFont->setPropertyValue("CharContoured", aValue ); } uno::Any SAL_CALL @@ -470,7 +470,7 @@ ScVbaFont::getOutlineFont() throw (uno::RuntimeException) if ( GetDataSet() ) if ( GetDataSet()->GetItemState( ATTR_FONT_CONTOUR, sal_True, NULL) == SFX_ITEM_DONTCARE ) return aNULL(); - return mxFont->getPropertyValue( OUString( "CharContoured" ) ); + return mxFont->getPropertyValue("CharContoured"); } OUString diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index e6de881b81e4..abe63a30ccb7 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -803,7 +803,7 @@ ScVbaFormat<Ifc1>::getCurrentDataSet( ) throw ( uno::RuntimeException ) { SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() ); if ( !pDataSet ) - throw uno::RuntimeException( OUString( "Can't access Itemset for XPropertySet" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can't access Itemset for XPropertySet", uno::Reference< uno::XInterface >() ); return pDataSet; } diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index ce4f8969538d..5ffec53ee5da 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -140,7 +140,7 @@ ScVbaFormatCondition::notifyRange() throw ( script::BasicErrorException ) { try { - mxParentRangePropertySet->setPropertyValue( OUString("ConditionalFormat"), uno::makeAny( mxSheetConditionalEntries) ); + mxParentRangePropertySet->setPropertyValue("ConditionalFormat", uno::makeAny( mxSheetConditionalEntries) ); } catch (uno::Exception& ) { diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index e0bf2411bada..3824cf0e4e22 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -203,7 +203,7 @@ ScVbaFormatConditions::notifyRange() throw ( script::BasicErrorException ) { try { - mxParentRangePropertySet->setPropertyValue( OUString("ConditionalFormat"), uno::makeAny( mxSheetConditionalEntries )); + mxParentRangePropertySet->setPropertyValue("ConditionalFormat", uno::makeAny( mxSheetConditionalEntries )); } catch (uno::Exception& ) { diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx index 197b311a4f88..9af64aab38f2 100644 --- a/sc/source/ui/vba/vbahelper.cxx +++ b/sc/source/ui/vba/vbahelper.cxx @@ -517,7 +517,7 @@ OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeExcepti break; } default: - throw uno::RuntimeException( OUString( "Invalid type, can't convert" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid type, can't convert", uno::Reference< uno::XInterface >() ); } return sString; } diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx index cd261d3a0704..f88ebb600b84 100644 --- a/sc/source/ui/vba/vbahyperlink.cxx +++ b/sc/source/ui/vba/vbahyperlink.cxx @@ -53,7 +53,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch UrlComponents aUrlComp; OUString aTextToDisplay; if( !(rAddress >>= aUrlComp.first) || aUrlComp.first.isEmpty() ) - throw uno::RuntimeException( OUString( "Cannot get address" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Cannot get address", uno::Reference< uno::XInterface >() ); rSubAddress >>= aUrlComp.second; rScreenTip >>= maScreenTip; rTextToDisplay >>= aTextToDisplay; @@ -82,7 +82,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch } // create and initialize a new URL text field uno::Reference< lang::XMultiServiceFactory > xFactory( ScVbaRange::getUnoModel( xAnchorRange ), uno::UNO_QUERY_THROW ); - uno::Reference< text::XTextContent > xUrlField( xFactory->createInstance( OUString( "com.sun.star.text.TextField.URL" ) ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextContent > xUrlField( xFactory->createInstance("com.sun.star.text.TextField.URL"), uno::UNO_QUERY_THROW ); mxTextField.set( xUrlField, uno::UNO_QUERY_THROW ); setUrlComponents( aUrlComp ); setTextToDisplay( aTextToDisplay ); @@ -153,14 +153,14 @@ OUString ScVbaHyperlink::getTextToDisplay() throw (uno::RuntimeException) { ensureTextField(); OUString aTextToDisplay; - mxTextField->getPropertyValue( OUString( "Representation" ) ) >>= aTextToDisplay; + mxTextField->getPropertyValue("Representation") >>= aTextToDisplay; return aTextToDisplay; } void ScVbaHyperlink::setTextToDisplay( const OUString& rTextToDisplay ) throw (uno::RuntimeException) { ensureTextField(); - mxTextField->setPropertyValue( OUString( "Representation" ), uno::Any( rTextToDisplay ) ); + mxTextField->setPropertyValue("Representation", uno::Any( rTextToDisplay ) ); } sal_Int32 SAL_CALL ScVbaHyperlink::getType() throw (uno::RuntimeException) @@ -207,7 +207,7 @@ ScVbaHyperlink::UrlComponents ScVbaHyperlink::getUrlComponents() throw (uno::Run { ensureTextField(); OUString aUrl; - mxTextField->getPropertyValue( OUString( "URL" ) ) >>= aUrl; + mxTextField->getPropertyValue("URL") >>= aUrl; sal_Int32 nHashPos = aUrl.indexOf( '#' ); if( nHashPos < 0 ) return UrlComponents( aUrl, OUString() ); @@ -220,7 +220,7 @@ void ScVbaHyperlink::setUrlComponents( const UrlComponents& rUrlComp ) throw (un OUStringBuffer aUrl( rUrlComp.first ); if( !rUrlComp.second.isEmpty() ) aUrl.append( sal_Unicode( '#' ) ).append( rUrlComp.second ); - mxTextField->setPropertyValue( OUString( "URL" ), uno::Any( aUrl.makeStringAndClear() ) ); + mxTextField->setPropertyValue("URL", uno::Any( aUrl.makeStringAndClear() ) ); } namespace hyperlink diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx index 8004e3c9eb6a..dc93fc3357db 100644 --- a/sc/source/ui/vba/vbahyperlinks.cxx +++ b/sc/source/ui/vba/vbahyperlinks.cxx @@ -37,7 +37,7 @@ bool lclContains( const ScRangeList& rScOuter, const uno::Reference< excel::XRan { const ScRangeList& rScInner = ScVbaRange::getScRangeList( rxInner ); if( rScInner.empty() || rScOuter.empty() ) - throw uno::RuntimeException( OUString( "Empty range objects" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Empty range objects", uno::Reference< uno::XInterface >() ); for( size_t nIndex = 0, nCount = rScInner.size(); nIndex < nCount; ++nIndex ) if( !rScOuter.In( *rScInner[ nIndex ] ) ) diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index 3782a100b7ee..840c7956ad67 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -86,7 +86,7 @@ ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, m_aPattColor.SetColor( (sal_uInt32)0x0 ); m_nPattern = 0L; if ( !m_xProps.is() ) - throw lang::IllegalArgumentException( OUString( "properties"), uno::Reference< uno::XInterface >(), 2 ); + throw lang::IllegalArgumentException("properties", uno::Reference< uno::XInterface >(), 2 ); } uno::Any @@ -250,7 +250,7 @@ ScVbaInterior::GetMixedColorComp( sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 n uno::Reference< container::XNameContainer > ScVbaInterior::GetAttributeContainer() { - return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue( OUString( "UserDefinedAttributes" ) ), uno::UNO_QUERY_THROW ); + return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue("UserDefinedAttributes"), uno::UNO_QUERY_THROW ); } sal_Int32 ScVbaInterior::GetAttributeData( uno::Any aValue ) @@ -289,7 +289,7 @@ ScVbaInterior::SetUserDefinedAttributes( const OUString& sName, const uno::Any& if( xNameContainer->hasByName( sName ) ) xNameContainer->removeByName( sName ); xNameContainer->insertByName( sName, aValue ); - m_xProps->setPropertyValue( OUString( "UserDefinedAttributes" ), uno::makeAny( xNameContainer ) ); + m_xProps->setPropertyValue("UserDefinedAttributes", uno::makeAny( xNameContainer ) ); } } // OOo do not support below API @@ -311,7 +311,7 @@ ScVbaInterior::setPattern( const uno::Any& _pattern ) throw (uno::RuntimeExcepti SetMixedColor(); } else - throw uno::RuntimeException( OUString( "Invalid Pattern index" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid Pattern index", uno::Reference< uno::XInterface >() ); } Color ScVbaInterior::GetBackColor() @@ -359,7 +359,7 @@ ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (uno::Runt SetMixedColor(); } else - throw uno::RuntimeException( OUString( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid Pattern Color", uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL ScVbaInterior::getPatternColorIndex() throw (uno::RuntimeException) @@ -382,7 +382,7 @@ ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) throw setPatternColor( uno::makeAny( OORGBToXLRGB( nPattColor ) ) ); } else - throw uno::RuntimeException( OUString( "Invalid Pattern Color" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid Pattern Color", uno::Reference< uno::XInterface >() ); } OUString diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx index 5ee50155c401..9ed7663143c3 100644 --- a/sc/source/ui/vba/vbamenubars.cxx +++ b/sc/source/ui/vba/vbamenubars.cxx @@ -93,7 +93,7 @@ ScVbaMenuBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw return uno::makeAny( xMenuBar ); } - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } // XHelperInterface diff --git a/sc/source/ui/vba/vbaoleobject.cxx b/sc/source/ui/vba/vbaoleobject.cxx index 0db97d234915..0a93da53089e 100644 --- a/sc/source/ui/vba/vbaoleobject.cxx +++ b/sc/source/ui/vba/vbaoleobject.cxx @@ -43,7 +43,7 @@ ScVbaOLEObject::ScVbaOLEObject( const uno::Reference< XHelperInterface >& xParen xChild.set( xChild->getParent(), uno::UNO_QUERY_THROW ); uno::Reference<frame::XModel> xModel( xChild->getParent(), uno::UNO_QUERY_THROW ); uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( OUString( "ooo.vba.ControlProvider" ), mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext("ooo.vba.ControlProvider", mxContext ), uno::UNO_QUERY_THROW ); m_xControl.set( xControlProvider->createControl( xControlShape, xModel ) ); } diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx index 780ed0e5467a..64ae5ce2254a 100644 --- a/sc/source/ui/vba/vbapagebreak.cxx +++ b/sc/source/ui/vba/vbapagebreak.cxx @@ -36,7 +36,7 @@ ScVbaPageBreak<Ifc1>::ScVbaPageBreak( const uno::Reference< XHelperInterface >& template< typename Ifc1 > sal_Int32 ScVbaPageBreak<Ifc1>::getType() throw (uno::RuntimeException) { - uno::Any aValue = mxRowColPropertySet->getPropertyValue( OUString( "IsStartOfNewPage" )); + uno::Any aValue = mxRowColPropertySet->getPropertyValue("IsStartOfNewPage"); sal_Bool hasPageBreak = false; aValue >>= hasPageBreak; @@ -61,11 +61,11 @@ void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException) if( type == excel::XlPageBreak::xlPageBreakNone ) { - mxRowColPropertySet->setPropertyValue( OUString( "IsStartOfNewPage" ), uno::makeAny(sal_False)); + mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::makeAny(sal_False)); return; } - mxRowColPropertySet->setPropertyValue( OUString( "IsStartOfNewPage" ), uno::makeAny(sal_True)); + mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::makeAny(sal_True)); if( type == excel::XlPageBreak::xlPageBreakManual ) maTablePageBreakData.ManualBreak = sal_True; else @@ -75,7 +75,7 @@ void ScVbaPageBreak<Ifc1>::setType(sal_Int32 type) throw (uno::RuntimeException) template< typename Ifc1 > void ScVbaPageBreak<Ifc1>::Delete() throw ( script::BasicErrorException, uno::RuntimeException) { - mxRowColPropertySet->setPropertyValue( OUString( "IsStartOfNewPage" ), uno::makeAny(sal_False)); + mxRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::makeAny(sal_False)); } template< typename Ifc1 > diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index 09100e25062e..6456cdb0c7e5 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -171,7 +171,7 @@ uno::Any RangePageBreaks::Add( const css::uno::Any& Before ) throw ( css::script sal_Int32 nAPIRowColIndex = getAPIStartofRange( xRange ); uno::Reference< container::XIndexAccess > xIndexAccess = getRowColContainer(); uno::Reference< beans::XPropertySet > xRowColPropertySet( xIndexAccess->getByIndex(nAPIRowColIndex), uno::UNO_QUERY_THROW ); - xRowColPropertySet->setPropertyValue( OUString( "IsStartOfNewPage" ), uno::makeAny(sal_True)); + xRowColPropertySet->setPropertyValue("IsStartOfNewPage", uno::makeAny(sal_True)); sheet::TablePageBreakData aTablePageBreakData; aTablePageBreakData.ManualBreak = sal_True; aTablePageBreakData.Position = nAPIRowColIndex; diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx index 465467dd9f74..cefd6b24b999 100644 --- a/sc/source/ui/vba/vbapagesetup.cxx +++ b/sc/source/ui/vba/vbapagesetup.cxx @@ -51,13 +51,13 @@ ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent // query for current page style mxModel.set( xModel, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xSheetProps( mxSheet, uno::UNO_QUERY_THROW ); - uno::Any aValue = xSheetProps->getPropertyValue( OUString( "PageStyle" )); + uno::Any aValue = xSheetProps->getPropertyValue("PageStyle"); OUString aStyleName; aValue >>= aStyleName; uno::Reference< style::XStyleFamiliesSupplier > xStyleFamiliesSup( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xStyleFamilies = xStyleFamiliesSup->getStyleFamilies(); - uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(OUString( "PageStyles")), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY_THROW ); mxPageProps.set( xPageStyle->getByName(aStyleName), uno::UNO_QUERY_THROW ); mnOrientLandscape = excel::XlPageOrientation::xlLandscape; mnOrientPortrait = excel::XlPageOrientation::xlPortrait; @@ -140,7 +140,7 @@ void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) throw (css::uno:: uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeException) { - return mxPageProps->getPropertyValue( OUString( "ScaleToPagesY")); + return mxPageProps->getPropertyValue("ScaleToPagesY"); } void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException) @@ -154,7 +154,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) fitToPagesTall >>= scaleToPageY; } - mxPageProps->setPropertyValue( OUString( "ScaleToPagesY"), uno::makeAny( scaleToPageY )); + mxPageProps->setPropertyValue("ScaleToPagesY", uno::makeAny( scaleToPageY )); } catch( uno::Exception& ) { @@ -163,7 +163,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeException) { - return mxPageProps->getPropertyValue( OUString( "ScaleToPagesX")); + return mxPageProps->getPropertyValue("ScaleToPagesX"); } void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) throw (css::uno::RuntimeException) @@ -177,7 +177,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) fitToPagesWide >>= scaleToPageX; } - mxPageProps->setPropertyValue( OUString( "ScaleToPagesX"), uno::makeAny( scaleToPageX )); + mxPageProps->setPropertyValue("ScaleToPagesX", uno::makeAny( scaleToPageX )); } catch( uno::Exception& ) { @@ -186,7 +186,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException) { - return mxPageProps->getPropertyValue( OUString( "PageScale")); + return mxPageProps->getPropertyValue("PageScale"); } void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException) @@ -214,9 +214,9 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru // these only exist in S08 sal_uInt16 nScale = 0; - mxPageProps->setPropertyValue( OUString( "ScaleToPages"), uno::makeAny( nScale )); - mxPageProps->setPropertyValue( OUString( "ScaleToPagesX"), uno::makeAny( nScale )); - mxPageProps->setPropertyValue( OUString( "ScaleToPagesY"), uno::makeAny( nScale )); + mxPageProps->setPropertyValue("ScaleToPages", uno::makeAny( nScale )); + mxPageProps->setPropertyValue("ScaleToPagesX", uno::makeAny( nScale )); + mxPageProps->setPropertyValue("ScaleToPagesY", uno::makeAny( nScale )); } catch( beans::UnknownPropertyException& ) { @@ -229,7 +229,7 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru { } - mxPageProps->setPropertyValue( OUString( "PageScale"), uno::makeAny( pageScale )); + mxPageProps->setPropertyValue("PageScale", uno::makeAny( pageScale )); } OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeException) @@ -237,7 +237,7 @@ OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeExcept OUString leftHeader; try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); if( xHeaderContent.is() ) { uno::Reference< text::XText > xText = xHeaderContent->getLeftText(); @@ -255,12 +255,12 @@ void SAL_CALL ScVbaPageSetup::setLeftHeader( const OUString& leftHeader) throw ( { try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); if( xHeaderContent.is() ) { uno::Reference< text::XText > xText = xHeaderContent->getLeftText(); xText->setString( leftHeader ); - mxPageProps->setPropertyValue( OUString( "RightPageHeaderContent"), uno::makeAny(xHeaderContent) ); + mxPageProps->setPropertyValue("RightPageHeaderContent", uno::makeAny(xHeaderContent) ); } } catch( uno::Exception& ) @@ -273,7 +273,7 @@ OUString SAL_CALL ScVbaPageSetup::getCenterHeader() throw (css::uno::RuntimeExce OUString centerHeader; try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); if( xHeaderContent.is() ) { uno::Reference< text::XText > xText = xHeaderContent->getCenterText(); @@ -291,12 +291,12 @@ void SAL_CALL ScVbaPageSetup::setCenterHeader( const OUString& centerHeader) thr { try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); if( xHeaderContent.is() ) { uno::Reference< text::XText > xText = xHeaderContent->getCenterText(); xText->setString( centerHeader ); - mxPageProps->setPropertyValue( OUString( "RightPageHeaderContent"), uno::makeAny(xHeaderContent) ); + mxPageProps->setPropertyValue("RightPageHeaderContent", uno::makeAny(xHeaderContent) ); } } catch( uno::Exception& ) @@ -309,7 +309,7 @@ OUString SAL_CALL ScVbaPageSetup::getRightHeader() throw (css::uno::RuntimeExcep OUString rightHeader; try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); if( xHeaderContent.is() ) { uno::Reference< text::XText > xText = xHeaderContent->getRightText(); @@ -327,12 +327,12 @@ void SAL_CALL ScVbaPageSetup::setRightHeader( const OUString& rightHeader) throw { try { - uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW); if( xHeaderContent.is() ) { uno::Reference< text::XText > xText = xHeaderContent->getRightText(); xText->setString( rightHeader ); - mxPageProps->setPropertyValue( OUString( "RightPageHeaderContent"), uno::makeAny(xHeaderContent) ); + mxPageProps->setPropertyValue("RightPageHeaderContent", uno::makeAny(xHeaderContent) ); } } catch( uno::Exception& ) @@ -345,7 +345,7 @@ OUString SAL_CALL ScVbaPageSetup::getLeftFooter() throw (css::uno::RuntimeExcept OUString leftFooter; try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); if( xFooterContent.is() ) { uno::Reference< text::XText > xText = xFooterContent->getLeftText(); @@ -363,12 +363,12 @@ void SAL_CALL ScVbaPageSetup::setLeftFooter( const OUString& leftFooter) throw ( { try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); if( xFooterContent.is() ) { uno::Reference< text::XText > xText = xFooterContent->getLeftText(); xText->setString( leftFooter ); - mxPageProps->setPropertyValue( OUString( "RightPageFooterContent"), uno::makeAny(xFooterContent) ); + mxPageProps->setPropertyValue("RightPageFooterContent", uno::makeAny(xFooterContent) ); } } catch( uno::Exception& ) @@ -381,7 +381,7 @@ OUString SAL_CALL ScVbaPageSetup::getCenterFooter() throw (css::uno::RuntimeExce OUString centerFooter; try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); if( xFooterContent.is() ) { uno::Reference< text::XText > xText = xFooterContent->getCenterText(); @@ -399,12 +399,12 @@ void SAL_CALL ScVbaPageSetup::setCenterFooter( const OUString& centerFooter) thr { try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); if( xFooterContent.is() ) { uno::Reference< text::XText > xText = xFooterContent->getCenterText(); xText->setString( centerFooter ); - mxPageProps->setPropertyValue( OUString( "RightPageFooterContent"), uno::makeAny(xFooterContent) ); + mxPageProps->setPropertyValue("RightPageFooterContent", uno::makeAny(xFooterContent) ); } } catch( uno::Exception& ) @@ -418,7 +418,7 @@ OUString SAL_CALL ScVbaPageSetup::getRightFooter() throw (css::uno::RuntimeExcep OUString rightFooter; try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); if( xFooterContent.is() ) { uno::Reference< text::XText > xText = xFooterContent->getRightText(); @@ -436,12 +436,12 @@ void SAL_CALL ScVbaPageSetup::setRightFooter( const OUString& rightFooter) throw { try { - uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW); if( xFooterContent.is() ) { uno::Reference< text::XText > xText = xFooterContent->getRightText(); xText->setString( rightFooter ); - mxPageProps->setPropertyValue( OUString( "RightPageFooterContent"), uno::makeAny(xFooterContent) ); + mxPageProps->setPropertyValue("RightPageFooterContent", uno::makeAny(xFooterContent) ); } } catch( uno::Exception& ) @@ -454,7 +454,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException) sal_Int32 order = excel::XlOrder::xlDownThenOver; try { - uno::Any aValue = mxPageProps->getPropertyValue( OUString( "PrintDownFirst")); + uno::Any aValue = mxPageProps->getPropertyValue("PrintDownFirst"); sal_Bool bPrintDownFirst = false; aValue >>= bPrintDownFirst; if( !bPrintDownFirst ) @@ -483,7 +483,7 @@ void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::Runtim try { - mxPageProps->setPropertyValue( OUString( "PrintDownFirst"), uno::makeAny( bOrder )); + mxPageProps->setPropertyValue("PrintDownFirst", uno::makeAny( bOrder )); } catch( uno::Exception& ) { @@ -495,7 +495,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() throw (css::uno::Runtime sal_Int16 number = 0; try { - uno::Any aValue = mxPageProps->getPropertyValue( OUString( "FirstPageNumber")); + uno::Any aValue = mxPageProps->getPropertyValue("FirstPageNumber"); aValue >>= number; } catch( uno::Exception& ) @@ -521,7 +521,7 @@ void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) thr { uno::Any aValue; aValue <<= (sal_Int16)firstPageNumber; - mxPageProps->setPropertyValue( OUString( "FirstPageNumber"), aValue ); + mxPageProps->setPropertyValue("FirstPageNumber", aValue ); } catch( uno::Exception& ) { @@ -533,7 +533,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() throw (css::uno::Runtime sal_Bool centerVertically = false; try { - uno::Any aValue = mxPageProps->getPropertyValue( OUString( "CenterVertically")); + uno::Any aValue = mxPageProps->getPropertyValue("CenterVertically"); aValue >>= centerVertically; } catch( uno::Exception& ) @@ -546,7 +546,7 @@ void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) th { try { - mxPageProps->setPropertyValue( OUString( "CenterVertically"), uno::makeAny( centerVertically )); + mxPageProps->setPropertyValue("CenterVertically", uno::makeAny( centerVertically )); } catch( uno::Exception& ) { @@ -558,7 +558,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() throw (css::uno::Runti sal_Bool centerHorizontally = false; try { - uno::Any aValue = mxPageProps->getPropertyValue( OUString( "CenterHorizontally")); + uno::Any aValue = mxPageProps->getPropertyValue("CenterHorizontally"); aValue >>= centerHorizontally; } catch( uno::Exception& ) @@ -571,7 +571,7 @@ void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally { try { - mxPageProps->setPropertyValue( OUString( "CenterHorizontally"), uno::makeAny( centerHorizontally )); + mxPageProps->setPropertyValue("CenterHorizontally", uno::makeAny( centerHorizontally )); } catch( uno::Exception& ) { @@ -583,7 +583,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeExc sal_Bool printHeadings = false; try { - uno::Any aValue = mxPageProps->getPropertyValue( OUString( "PrintHeaders")); + uno::Any aValue = mxPageProps->getPropertyValue("PrintHeaders"); aValue >>= printHeadings; } catch( uno::Exception& ) @@ -596,7 +596,7 @@ void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (c { try { - mxPageProps->setPropertyValue( OUString( "PrintHeaders"), uno::makeAny( printHeadings )); + mxPageProps->setPropertyValue("PrintHeaders", uno::makeAny( printHeadings )); } catch( uno::Exception& ) { diff --git a/sc/source/ui/vba/vbapalette.cxx b/sc/source/ui/vba/vbapalette.cxx index b9fa93374473..97712de6077d 100644 --- a/sc/source/ui/vba/vbapalette.cxx +++ b/sc/source/ui/vba/vbapalette.cxx @@ -97,8 +97,8 @@ ScVbaPalette::getPalette() const if ( m_pShell ) xProps.set( m_pShell->GetModel(), uno::UNO_QUERY_THROW ); else - throw uno::RuntimeException( OUString( "Can't extract palette, no doc shell" ), uno::Reference< uno::XInterface >() ); - xIndex.set( xProps->getPropertyValue( OUString("ColorPalette") ), uno::UNO_QUERY ); + throw uno::RuntimeException("Can't extract palette, no doc shell", uno::Reference< uno::XInterface >() ); + xIndex.set( xProps->getPropertyValue("ColorPalette"), uno::UNO_QUERY ); if ( !xIndex.is() ) return new DefaultPalette(); return xIndex; diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx index 01734f6649ec..085de1731084 100644 --- a/sc/source/ui/vba/vbapane.cxx +++ b/sc/source/ui/vba/vbapane.cxx @@ -48,7 +48,7 @@ ScVbaPane::setScrollColumn( sal_Int32 _scrollcolumn ) throw (uno::RuntimeExcepti { if( _scrollcolumn < 1 ) { - throw uno::RuntimeException( OUString( "Column number should not less than 1" ), + throw uno::RuntimeException("Column number should not less than 1", uno::Reference< uno::XInterface >() ); } m_xViewPane->setFirstVisibleColumn( _scrollcolumn - 1 ); @@ -65,7 +65,7 @@ ScVbaPane::setScrollRow( sal_Int32 _scrollrow ) throw (uno::RuntimeException) { if( _scrollrow < 1 ) { - throw uno::RuntimeException( OUString( "Row number should not less than 1" ), + throw uno::RuntimeException("Row number should not less than 1", uno::Reference< uno::XInterface >() ); } m_xViewPane->setFirstVisibleRow( _scrollrow - 1 ); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 7c6af046efb3..348e8b7371e4 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -249,7 +249,7 @@ ScCellRangesBase* ScVbaRange::getCellRangesBase() throw ( uno::RuntimeException return ScCellRangesBase::getImplementation( mxRanges ); if( mxRange.is() ) return ScCellRangesBase::getImplementation( mxRange ); - throw uno::RuntimeException( OUString("General Error creating range - Unknown" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("General Error creating range - Unknown", uno::Reference< uno::XInterface >() ); } ScCellRangeObj* ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException ) @@ -261,7 +261,7 @@ SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException ) { SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() ); if ( !pDataSet ) - throw uno::RuntimeException( OUString( "Can't access Itemset for range" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can't access Itemset for range", uno::Reference< uno::XInterface >() ); return pDataSet; } @@ -390,7 +390,7 @@ getDocShellFromIf( const uno::Reference< uno::XInterface >& xIf ) throw ( uno::R { ScCellRangesBase* pUno = ScCellRangesBase::getImplementation( xIf ); if ( !pUno ) - throw uno::RuntimeException( OUString( "Failed to access underlying uno range object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to access underlying uno range object", uno::Reference< uno::XInterface >() ); return pUno->GetDocShell(); } @@ -428,7 +428,7 @@ getDocumentFromRange( const uno::Reference< table::XCellRange >& xRange ) { ScDocShell* pDocShell = getDocShellFromRange( xRange ); if ( !pDocShell ) - throw uno::RuntimeException( OUString( "Failed to access underlying docshell from uno range object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to access underlying docshell from uno range object", uno::Reference< uno::XInterface >() ); ScDocument* pDoc = pDocShell->GetDocument(); return pDoc; } @@ -481,14 +481,14 @@ const ScRangeList& ScVbaRange::getScRangeList() throw (uno::RuntimeException) { if( ScCellRangesBase* pScRangesBase = getCellRangesBase() ) return pScRangesBase->GetRangeList(); - throw uno::RuntimeException( OUString( "Cannot obtain UNO range implementation object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Cannot obtain UNO range implementation object", uno::Reference< uno::XInterface >() ); } const ScRangeList& ScVbaRange::getScRangeList( const uno::Reference< excel::XRange >& rxRange ) throw (uno::RuntimeException) { if( ScVbaRange* pScVbaRange = getImplementation( rxRange ) ) return pScVbaRange->getScRangeList(); - throw uno::RuntimeException( OUString( "Cannot obtain VBA range implementation object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Cannot obtain VBA range implementation object", uno::Reference< uno::XInterface >() ); } @@ -1311,10 +1311,10 @@ uno::Reference< sheet::XSheetCellRange > lclExpandToMerged( const uno::Reference uno::Reference< sheet::XSheetCellRangeContainer > lclExpandToMerged( const uno::Reference< sheet::XSheetCellRangeContainer >& rxCellRanges, bool bRecursive ) throw (uno::RuntimeException) { if( !rxCellRanges.is() ) - throw uno::RuntimeException( OUString( "Missing cell ranges object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Missing cell ranges object", uno::Reference< uno::XInterface >() ); sal_Int32 nCount = rxCellRanges->getCount(); if( nCount < 1 ) - throw uno::RuntimeException( OUString( "Missing cell ranges object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Missing cell ranges object", uno::Reference< uno::XInterface >() ); ScRangeList aScRanges; for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex ) @@ -1418,7 +1418,7 @@ table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam, break; } default: - throw uno::RuntimeException( OUString( "Can't extact CellRangeAddress from type" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can't extact CellRangeAddress from type", uno::Reference< uno::XInterface >() ); } return lclGetRangeAddress( xRangeParam ); } @@ -1429,7 +1429,7 @@ lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno uno::Reference< XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW ); ScDocument* pDoc = getDocumentFromRange(xRange); if ( !pDoc ) - throw uno::RuntimeException( OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() ); ScVbaPalette aPalette( pDoc->GetDocumentShell() ); uno::Reference< XCollection > borders( new ScVbaBorders( xParent, xContext, xRange, aPalette ) ); return borders; @@ -1458,9 +1458,9 @@ ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const mbIsColumns( bIsColumns ) { if ( !xContext.is() ) - throw lang::IllegalArgumentException( OUString( "context is not set " ), uno::Reference< uno::XInterface >() , 1 ); + throw lang::IllegalArgumentException("context is not set ", uno::Reference< uno::XInterface >() , 1 ); if ( !xRange.is() ) - throw lang::IllegalArgumentException( OUString( "range is not set " ), uno::Reference< uno::XInterface >() , 1 ); + throw lang::IllegalArgumentException("range is not set ", uno::Reference< uno::XInterface >() , 1 ); uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxParent, mxContext, xRange ) ); m_Areas = new ScVbaRangeAreas( mxParent, mxContext, xIndex, mbIsRows, mbIsColumns ); @@ -2116,7 +2116,7 @@ ScVbaRange::Font() throw ( script::BasicErrorException, uno::RuntimeException) else if ( mxRanges.is() ) xProps.set(mxRanges, ::uno::UNO_QUERY ); if ( !pDoc ) - throw uno::RuntimeException( OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() ); ScVbaPalette aPalette( pDoc->GetDocumentShell() ); ScCellRangeObj* pRangeObj = NULL; @@ -2238,7 +2238,7 @@ ScVbaRange::Select() throw (uno::RuntimeException) { ScCellRangesBase* pUnoRangesBase = getCellRangesBase(); if ( !pUnoRangesBase ) - throw uno::RuntimeException( OUString( "Failed to access underlying uno range object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to access underlying uno range object", uno::Reference< uno::XInterface >() ); ScDocShell* pShell = pUnoRangesBase->GetDocShell(); if ( pShell ) { @@ -2372,10 +2372,10 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException) aRange.aEnd.SetRow( aRange.aStart.Row() + ( nEndRow - nStartRow )); } else - throw uno::RuntimeException( OUString( "Illegal param" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Illegal param", uno::Reference< uno::XInterface >() ); if ( aRange.aStart.Row() < 0 || aRange.aEnd.Row() < 0 ) - throw uno::RuntimeException( OUString("Internal failure, illegal param"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Internal failure, illegal param", uno::Reference< uno::XInterface >() ); // return a normal range ( even for multi-selection uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) ); return new ScVbaRange( mxParent, mxContext, xRange, true ); @@ -2416,10 +2416,10 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException) aRange.aEnd.SetCol( aRange.aStart.Col() + ( nEndCol - nStartCol )); } else - throw uno::RuntimeException( OUString( "Illegal param" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Illegal param", uno::Reference< uno::XInterface >() ); if ( aRange.aStart.Col() < 0 || aRange.aEnd.Col() < 0 ) - throw uno::RuntimeException( OUString("Internal failure, illegal param"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Internal failure, illegal param", uno::Reference< uno::XInterface >() ); } // Columns() - no params uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) ); @@ -2493,7 +2493,7 @@ void ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException) { if ( m_Areas->getCount() > 1 ) - throw uno::RuntimeException( OUString("That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() ); if ( Destination.hasValue() ) { uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW ); @@ -2523,7 +2523,7 @@ void ScVbaRange::Cut(const ::uno::Any& Destination) throw (uno::RuntimeException) { if ( m_Areas->getCount() > 1 ) - throw uno::RuntimeException( OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() ); if (Destination.hasValue()) { uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW ); @@ -2850,7 +2850,7 @@ void SAL_CALL ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, const uno::Any& SkipBlanks, const uno::Any& Transpose ) throw (::com::sun::star::uno::RuntimeException) { if ( m_Areas->getCount() > 1 ) - throw uno::RuntimeException( OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() ); ScDocShell* pShell = getScDocShell(); uno::Reference< frame::XModel > xModel( ( pShell ? pShell->GetModel() : NULL ), uno::UNO_QUERY_THROW ); @@ -2983,7 +2983,7 @@ ScVbaRange::getHidden() throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps = getRowOrColumnProps( mxRange, mbIsRows ); if ( !( xProps->getPropertyValue( ISVISIBLE ) >>= bIsVisible ) ) - throw uno::RuntimeException( OUString( "Failed to get IsVisible property"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to get IsVisible property", uno::Reference< uno::XInterface >() ); } catch( const uno::Exception& e ) { @@ -3033,7 +3033,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un // sanity check required params if ( What.isEmpty() ) - throw uno::RuntimeException( OUString( "Range::Replace, missing params" ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Replace, missing params", uno::Reference< uno::XInterface >() ); OUString sWhat = VBAToRegexp( What); // #TODO #FIXME SearchFormat & ReplacesFormat are not processed // What do we do about MatchByte.. we don't seem to support that @@ -3063,7 +3063,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un else if ( nLook == excel::XlLookAt::xlWhole ) bSearchWords = sal_True; else - throw uno::RuntimeException( OUString( "Range::Replace, illegal value for LookAt" ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Replace, illegal value for LookAt", uno::Reference< uno::XInterface >() ); // set global search props ( affects the find dialog // and of course the defaults for this method newOptions.SetWordOnly( bSearchWords ); @@ -3079,7 +3079,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un else if ( nSearchOrder == excel::XlSearchOrder::xlByRows ) bSearchByRow = sal_True; else - throw uno::RuntimeException( OUString( "Range::Replace, illegal value for SearchOrder" ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder", uno::Reference< uno::XInterface >() ); newOptions.SetRowDirection( bSearchByRow ); xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::makeAny( bSearchByRow ) ); @@ -3134,7 +3134,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L if( What >>= sWhat ) { if( sWhat.isEmpty() ) - throw uno::RuntimeException( OUString( "Range::Find, missing params" ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Find, missing params", uno::Reference< uno::XInterface >() ); } else if( What >>= nWhat ) { @@ -3145,7 +3145,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L sWhat = OUString::valueOf( fWhat ); } else - throw uno::RuntimeException( OUString( "Range::Find, missing params" ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Find, missing params", uno::Reference< uno::XInterface >() ); OUString sSearch = VBAToRegexp( sWhat ); @@ -3168,10 +3168,10 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L { // After must be a single cell in the range if( xAfterRange->getCount() > 1 ) - throw uno::RuntimeException( OUString( "After must be a single cell." ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("After must be a single cell.", uno::Reference< uno::XInterface >() ); uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY ); if( !xCell.is() ) - throw uno::RuntimeException( OUString( "After must be in range." ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("After must be in range.", uno::Reference< uno::XInterface >() ); xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW ); } @@ -3194,7 +3194,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L nSearchType = SVX_SEARCHIN_VALUE; break; default: - throw uno::RuntimeException( OUString( "Range::Replace, illegal value for LookIn." ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Replace, illegal value for LookIn.", uno::Reference< uno::XInterface >() ); } newOptions.SetCellType( nSearchType ); xDescriptor->setPropertyValue( "SearchType", uno::makeAny( nSearchType ) ); @@ -3211,7 +3211,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L else if ( nLookAt == excel::XlLookAt::xlWhole ) bSearchWords = sal_True; else - throw uno::RuntimeException( OUString( "Range::Replace, illegal value for LookAt" ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Replace, illegal value for LookAt", uno::Reference< uno::XInterface >() ); newOptions.SetWordOnly( bSearchWords ); xDescriptor->setPropertyValue( SC_UNO_SRCHWORDS, uno::makeAny( bSearchWords ) ); } @@ -3226,7 +3226,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L else if ( nSearchOrder == excel::XlSearchOrder::xlByRows ) bSearchByRow = sal_True; else - throw uno::RuntimeException( OUString( "Range::Replace, illegal value for SearchOrder" ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder", uno::Reference< uno::XInterface >() ); newOptions.SetRowDirection( bSearchByRow ); xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::makeAny( bSearchByRow ) ); @@ -3244,7 +3244,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L else if( nSearchDirection == excel::XlSearchDirection::xlPrevious ) bSearchBackwards = sal_True; else - throw uno::RuntimeException( OUString( "Range::Replace, illegal value for SearchDirection" ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Replace, illegal value for SearchDirection", uno::Reference< uno::XInterface >() ); newOptions.SetBackward( bSearchBackwards ); xDescriptor->setPropertyValue( "SearchBackwards", uno::makeAny( bSearchBackwards ) ); } @@ -3256,7 +3256,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L { // SearchCaseSensitive if( !( MatchCase >>= bMatchCase ) ) - throw uno::RuntimeException( OUString( "Range::Replace, illegal value for MatchCase" ) , uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Replace, illegal value for MatchCase", uno::Reference< uno::XInterface >() ); } xDescriptor->setPropertyValue( SC_UNO_SRCHCASE, uno::makeAny( bMatchCase ) ); @@ -3303,11 +3303,11 @@ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Refere OUString sRangeName = ::comphelper::getString( Key ); table::CellRangeAddress aRefAddr; if ( !pDocSh ) - throw uno::RuntimeException( OUString("Range::Sort no docshell to calculate key param"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Sort no docshell to calculate key param", uno::Reference< uno::XInterface >() ); xKeyRange = getRangeForName( xContext, sRangeName, pDocSh, aRefAddr ); } else - throw uno::RuntimeException( OUString("Range::Sort illegal type value for key param"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Sort illegal type value for key param", uno::Reference< uno::XInterface >() ); uno::Reference< table::XCellRange > xKey; xKey.set( xKeyRange->getCellRange(), uno::UNO_QUERY_THROW ); return xKey; @@ -3325,7 +3325,7 @@ const OUString& sPropName ) throw( uno::RuntimeException ) if ( pProp->Name.equals( sPropName ) ) return count; if ( count == nItems ) - throw uno::RuntimeException( OUString("Range::Sort unknown sort property"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Sort unknown sort property", uno::Reference< uno::XInterface >() ); return -1; //should never reach here ( satisfy compiler ) } @@ -3361,7 +3361,7 @@ void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRan aTableField.IsAscending = false; } else - throw uno::RuntimeException( OUString( "Illegal Key param" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Illegal Key param", uno::Reference< uno::XInterface >() ); } @@ -3371,7 +3371,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& { // #TODO# #FIXME# can we do something with Type if ( m_Areas->getCount() > 1 ) - throw uno::RuntimeException( OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() ); sal_Int16 nDataOption1 = excel::XlSortDataOption::xlSortNormal; sal_Int16 nDataOption2 = excel::XlSortDataOption::xlSortNormal; @@ -3379,7 +3379,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& ScDocument* pDoc = getScDocument(); if ( !pDoc ) - throw uno::RuntimeException( OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() ); RangeHelper thisRange( mxRange ); table::CellRangeAddress thisRangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); @@ -3503,7 +3503,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any& ScDocShell* pDocShell = getScDocShell(); xKey1 = processKey( Key1, mxContext, pDocShell ); if ( !xKey1.is() ) - throw uno::RuntimeException( OUString("Range::Sort needs a key1 param"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Range::Sort needs a key1 param", uno::Reference< uno::XInterface >() ); if ( Key2.hasValue() ) xKey2 = processKey( Key2, mxContext, pDocShell ); @@ -3598,7 +3598,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException) nSID = SID_CURSORBLKRIGHT; break; default: - throw uno::RuntimeException( OUString( ": Invalid ColumnIndex" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(": Invalid ColumnIndex", uno::Reference< uno::XInterface >() ); } if ( pDispatcher ) { @@ -3638,11 +3638,11 @@ uno::Reference< excel::XCharacters > SAL_CALL ScVbaRange::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException) { if ( !isSingleCellRange() ) - throw uno::RuntimeException( OUString( "Can't create Characters property for multicell range " ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can't create Characters property for multicell range ", uno::Reference< uno::XInterface >() ); uno::Reference< text::XSimpleText > xSimple(mxRange->getCellByPosition(0,0) , uno::UNO_QUERY_THROW ); ScDocument* pDoc = getDocumentFromRange(mxRange); if ( !pDoc ) - throw uno::RuntimeException( OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() ); ScVbaPalette aPalette( pDoc->GetDocumentShell() ); return new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length ); @@ -3677,7 +3677,7 @@ ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException) mode = sheet::CellDeleteMode_LEFT; break; default: - throw uno::RuntimeException( OUString( "Illegal parameter " ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Illegal parameter ", uno::Reference< uno::XInterface >() ); } } else @@ -3872,7 +3872,7 @@ uno::Reference< excel::XRange > ScVbaRange::getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException ) { if ( !m_Areas.is() ) - throw uno::RuntimeException( OUString("No areas available"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("No areas available", uno::Reference< uno::XInterface >() ); uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( ++nIndex ), uno::Any() ), uno::UNO_QUERY_THROW ); return xRange; } @@ -4409,7 +4409,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const if ( pRange ) { if ( pRange->isSingleCellRange() ) - throw uno::RuntimeException( OUString( "Can't create AutoFilter" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can't create AutoFilter", uno::Reference< uno::XInterface >() ); RangeHelper currentRegion( pRange->mxRange ); autoFiltAddress = currentRegion.getCellRangeAddressable()->getRangeAddress(); } @@ -4444,7 +4444,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const xDataBaseRange.set( xDBRanges->getByTable(nSheet ), uno::UNO_QUERY_THROW ); } if ( !xDataBaseRange.is() ) - throw uno::RuntimeException( OUString( "Failed to find the autofilter placeholder range" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to find the autofilter placeholder range", uno::Reference< uno::XInterface >() ); uno::Reference< beans::XPropertySet > xDBRangeProps( xDataBaseRange, uno::UNO_QUERY_THROW ); // set autofilt @@ -4556,7 +4556,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const nConn = sheet::FilterConnection_AND; break; default: - throw uno::RuntimeException( OUString( "UnknownOption" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("UnknownOption", uno::Reference< uno::XInterface >() ); } @@ -4651,7 +4651,7 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /*CopyOrigin*/ ) thro mode = sheet::CellInsertMode_DOWN; break; default: - throw uno::RuntimeException( OUString( "Illegal parameter " ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Illegal parameter ", uno::Reference< uno::XInterface >() ); } } else @@ -4730,7 +4730,7 @@ ScVbaRange::Hyperlinks( const uno::Any& aIndex ) throw (uno::RuntimeException) uno::Reference< excel::XHyperlinks > xSheetHlinks( xWorksheet->Hyperlinks( uno::Any() ), uno::UNO_QUERY_THROW ); ScVbaHyperlinksRef xScSheetHlinks( dynamic_cast< ScVbaHyperlinks* >( xSheetHlinks.get() ) ); if( !xScSheetHlinks.is() ) - throw uno::RuntimeException( OUString( "Cannot obtain hyperlinks implementation object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Cannot obtain hyperlinks implementation object", uno::Reference< uno::XInterface >() ); // create a new local hyperlinks object based on the sheet hyperlinks ScVbaHyperlinksRef xHlinks( new ScVbaHyperlinks( getParent(), mxContext, xScSheetHlinks, getScRangeList() ) ); @@ -4835,7 +4835,7 @@ uno::Any SAL_CALL ScVbaRange::getPrefixCharacter() throw (uno::RuntimeException) return lclGetPrefixVariant( lclGetPrefixChar( mxRange ) ); if( mxRanges.is() ) return lclGetPrefixVariant( lclGetPrefixChar( mxRanges ) ); - throw uno::RuntimeException( OUString( "Unexpected empty Range object" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Unexpected empty Range object", uno::Reference< uno::XInterface >() ); } uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException) @@ -4844,7 +4844,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException) // In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception if( m_Areas->getCount() > 1 ) - throw uno::RuntimeException( OUString( "Can not get Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can not get Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() ); sal_Bool bShowDetail = false; @@ -4876,7 +4876,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException) } else { - throw uno::RuntimeException( OUString( "Can not set Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can not set Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() ); } return aNULL(); } @@ -4887,7 +4887,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru // In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception if( m_Areas->getCount() > 1 ) - throw uno::RuntimeException( OUString( "Can not set Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can not set Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() ); bool bShowDetail = extractBoolFromAny( aShowDetail ); @@ -4912,7 +4912,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru } else { - throw uno::RuntimeException( OUString( "Can not set Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Can not set Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() ); } } @@ -5077,7 +5077,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const eCmd = FILL_GROWTH; break; case excel::XlAutoFillType::xlFillFormats: - throw uno::RuntimeException( OUString( "xlFillFormat not supported for AutoFill" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("xlFillFormat not supported for AutoFill", uno::Reference< uno::XInterface >() ); case excel::XlAutoFillType::xlFillValues: case excel::XlAutoFillType::xlFillSeries: case excel::XlAutoFillType::xlLinearTrend: diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx index 03196a46ba5f..82eaebaf717f 100644 --- a/sc/source/ui/vba/vbastyle.cxx +++ b/sc/source/ui/vba/vbastyle.cxx @@ -31,7 +31,7 @@ uno::Reference< container::XNameAccess > ScVbaStyle::getStylesNameContainer( const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) { uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( xModel, uno::UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( OUString( "CellStyles" ) ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName("CellStyles"), uno::UNO_QUERY_THROW ); return xStylesAccess; } @@ -49,7 +49,7 @@ void ScVbaStyle::initialise() throw ( uno::RuntimeException ) if (!mxModel.is() ) DebugHelper::exception(SbERR_METHOD_FAILED, OUString( "XModel Interface could not be retrieved") ); uno::Reference< lang::XServiceInfo > xServiceInfo( mxPropertySet, uno::UNO_QUERY_THROW ); - if ( !xServiceInfo->supportsService( OUString( "com.sun.star.style.CellStyle" ) ) ) + if ( !xServiceInfo->supportsService("com.sun.star.style.CellStyle") ) { DebugHelper::exception(SbERR_METHOD_FAILED, OUString() ); } diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index df854d17d593..869490b58d27 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -121,7 +121,7 @@ ScVbaStyles::Add( const OUString& _sName, const uno::Any& _aBasedOn ) throw (scr } } - uno::Reference< style::XStyle > xStyle( mxMSF->createInstance( OUString("com.sun.star.style.CellStyle")), uno::UNO_QUERY_THROW ); + uno::Reference< style::XStyle > xStyle( mxMSF->createInstance("com.sun.star.style.CellStyle"), uno::UNO_QUERY_THROW ); if (!mxNameContainerCellStyles->hasByName(_sName)) { diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx index 994ca2971f73..be666a2e7376 100644 --- a/sc/source/ui/vba/vbatextboxshape.cxx +++ b/sc/source/ui/vba/vbatextboxshape.cxx @@ -50,7 +50,7 @@ ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) t ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL; if ( !pDoc ) - throw uno::RuntimeException( OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() ); uno::Reference< text::XSimpleText > xSimple( m_xTextRange, uno::UNO_QUERY_THROW ); ScVbaPalette aPalette( pDoc->GetDocumentShell() ); diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx index 3f4d105c3808..e4fbd1fcc08a 100644 --- a/sc/source/ui/vba/vbatitle.hxx +++ b/sc/source/ui/vba/vbatitle.hxx @@ -68,7 +68,7 @@ public: { try { - xShapePropertySet->setPropertyValue( OUString("String"), css::uno::makeAny( Text )); + xShapePropertySet->setPropertyValue("String", css::uno::makeAny( Text )); } catch ( css::uno::Exception& ) { @@ -80,7 +80,7 @@ public: OUString sText; try { - xShapePropertySet->getPropertyValue( OUString("String") ) >>= sText; + xShapePropertySet->getPropertyValue("String") >>= sText; } catch ( css::uno::Exception& ) { @@ -117,7 +117,7 @@ public: { try { - xShapePropertySet->setPropertyValue(OUString("TextRotation"), css::uno::makeAny(_nOrientation*100)); + xShapePropertySet->setPropertyValue("TextRotation", css::uno::makeAny(_nOrientation*100)); } catch (css::uno::Exception& ) { @@ -129,7 +129,7 @@ public: sal_Int32 nSOOrientation = 0; try { - xShapePropertySet->getPropertyValue( OUString("TextRotation")) >>= nSOOrientation; + xShapePropertySet->getPropertyValue("TextRotation") >>= nSOOrientation; } catch (css::uno::Exception& ) { diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx index 51332f5d4f5f..807118617b3e 100644 --- a/sc/source/ui/vba/vbavalidation.cxx +++ b/sc/source/ui/vba/vbavalidation.cxx @@ -233,10 +233,10 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un sheet::ValidationType nValType = sheet::ValidationType_ANY; xProps->getPropertyValue( STYPE ) >>= nValType; if ( nValType != sheet::ValidationType_ANY ) - throw uno::RuntimeException( OUString( "validation object already exists" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("validation object already exists", uno::Reference< uno::XInterface >() ); sal_Int32 nType = -1; if ( !Type.hasValue() || !( Type >>= nType ) ) - throw uno::RuntimeException( OUString( "missing required param" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("missing required param", uno::Reference< uno::XInterface >() ); Delete(); // set up defaults OUString sFormula1; @@ -250,7 +250,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un // for validate list // at least formula1 is required if ( !Formula1.hasValue() ) - throw uno::RuntimeException( OUString( "missing param" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("missing param", uno::Reference< uno::XInterface >() ); nValType = sheet::ValidationType_LIST; xProps->setPropertyValue( STYPE, uno::makeAny(nValType )); // #TODO validate required params @@ -262,7 +262,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un xProps->setPropertyValue( STYPE, uno::makeAny(nValType )); break; default: - throw uno::RuntimeException( OUString( "unsupported operation..." ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("unsupported operation...", uno::Reference< uno::XInterface >() ); } sheet::ValidationAlertStyle eStyle = sheet::ValidationAlertStyle_STOP; @@ -283,7 +283,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un eStyle = sheet::ValidationAlertStyle_INFO; break; default: - throw uno::RuntimeException( OUString( "bad param..." ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("bad param...", uno::Reference< uno::XInterface >() ); } } diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 99ec6ebe5704..9b7e9c6cb437 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -103,13 +103,13 @@ public: { ScModelObj* pModel = static_cast< ScModelObj* >( m_xModel.get() ); if ( !pModel ) - throw uno::RuntimeException( OUString( "Cannot obtain current document" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Cannot obtain current document", uno::Reference< uno::XInterface >() ); ScDocShell* pDocShell = (ScDocShell*)pModel->GetEmbeddedObject(); if ( !pDocShell ) - throw uno::RuntimeException( OUString( "Cannot obtain docshell" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Cannot obtain docshell", uno::Reference< uno::XInterface >() ); ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel ); if ( !pViewShell ) - throw uno::RuntimeException( OUString( "Cannot obtain view shell" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Cannot obtain view shell", uno::Reference< uno::XInterface >() ); SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); uno::Sequence<sal_Int32> aSheets( nTabCount ); @@ -290,7 +290,7 @@ ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*P /* sal_Int32 nSheets = 0; sal_Int32 nPosition = 0; - throw uno::RuntimeException( OUString("No Implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("No Implemented", uno::Reference< uno::XInterface >() ); sal_Bool bSheets = ( Sheets >>= nSheets ); sal_Bool bPosition = ( Position >>= nPosition ); if ( bSheets || bPosition ) // at least one param specified @@ -444,7 +444,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE else if (nwindowState == xlNormal) pWork -> Restore(); else - throw uno::RuntimeException( OUString( "Invalid Parameter" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid Parameter", uno::Reference< uno::XInterface >() ); } } diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx index 3a36112d4a2a..02bbc1491bce 100644 --- a/sc/source/ui/vba/vbaworkbook.cxx +++ b/sc/source/ui/vba/vbaworkbook.cxx @@ -371,7 +371,7 @@ ScVbaWorkbook::Names( const uno::Any& aIndex ) throw (uno::RuntimeException) { uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_SET_THROW ); uno::Reference< beans::XPropertySet > xProps( xModel, uno::UNO_QUERY_THROW ); - uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( OUString("NamedRanges") ), uno::UNO_QUERY_THROW ); + uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue("NamedRanges"), uno::UNO_QUERY_THROW ); uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, xModel ) ); if ( aIndex.hasValue() ) return uno::Any( xNames->Item( aIndex, uno::Any() ) ); @@ -400,7 +400,7 @@ OUString SAL_CALL ScVbaWorkbook::getCodeName() throw (css::uno::RuntimeException) { uno::Reference< beans::XPropertySet > xModelProp( getModel(), uno::UNO_QUERY_THROW ); - return xModelProp->getPropertyValue( OUString( "CodeName" ) ).get< OUString >(); + return xModelProp->getPropertyValue("CodeName").get< OUString >(); } sal_Int64 diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx index 5198fc8b53ff..5c5d4c96e0a5 100644 --- a/sc/source/ui/vba/vbaworkbooks.cxx +++ b/sc/source/ui/vba/vbaworkbooks.cxx @@ -88,7 +88,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >& { uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY_THROW ); uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance( OUString( "ooo.vba.VBAObjectModuleObjectProvider")), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xVBACodeNamedObjectAccess( xSF->createInstance("ooo.vba.VBAObjectModuleObjectProvider"), uno::UNO_QUERY_THROW ); // set up the module info for the workbook and sheets in the nealy created // spreadsheet ScDocument* pDoc = pShell->GetDocument(); @@ -266,7 +266,7 @@ ScVbaWorkbooks::isSpreadSheetFile( const OUString& sType ) OUString ScVbaWorkbooks::getFileFilterType( const OUString& rFileName ) { - uno::Reference< document::XTypeDetection > xTypeDetect( mxContext->getServiceManager()->createInstanceWithContext(OUString("com.sun.star.document.TypeDetection"), mxContext), uno::UNO_QUERY_THROW ); + uno::Reference< document::XTypeDetection > xTypeDetect( mxContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection", mxContext), uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aMediaDesc(1); aMediaDesc[ 0 ].Name = OUString("URL" ); aMediaDesc[ 0 ].Value <<= rFileName; @@ -317,7 +317,7 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/ Format >>= nFormat; // val of nFormat overwritten if extracted // validate param if ( nFormat < 1 || nFormat > 6 ) - throw uno::RuntimeException( OUString( "Illegal value for Format" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Illegal value for Format", uno::Reference< uno::XInterface >() ); } sal_Int16 nDelim = getCurrentDelim(); @@ -330,14 +330,14 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/ { // Need to check Delimiter param if ( !Delimiter.hasValue() ) - throw uno::RuntimeException( OUString( "Expected value for Delimiter" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Expected value for Delimiter", uno::Reference< uno::XInterface >() ); OUString sStr; Delimiter >>= sStr; String aUniStr( sStr ); if ( aUniStr.Len() ) nDelim = aUniStr.GetChar(0); else - throw uno::RuntimeException( OUString( "Incorrect value for Delimiter" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Incorrect value for Delimiter", uno::Reference< uno::XInterface >() ); } getCurrentDelim() = nDelim; //set new current @@ -352,7 +352,7 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/ sProps[ nIndex ].Value <<= OUString("com.sun.star.sheet.SpreadsheetDocument"); } else if ( !isSpreadSheetFile( sType ) ) - throw uno::RuntimeException( OUString("Bad Format"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Bad Format", uno::Reference< uno::XInterface >() ); uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( openDocument( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW ); uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent ); diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index f96df2ffc0ac..b31a0abe28e5 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -362,7 +362,7 @@ ScVbaWorksheet::getEnableSelection() throw (uno::RuntimeException) return excel::XlEnableSelection::xlNoSelection; } else - throw uno::RuntimeException(OUString( "Sheet Name does not exist. "), + throw uno::RuntimeException("Sheet Name does not exist. ", uno::Reference< XInterface >() ); } @@ -403,7 +403,7 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx } } else - throw uno::RuntimeException(OUString( "Sheet Name does not exist. "), + throw uno::RuntimeException("Sheet Name does not exist. ", uno::Reference< XInterface >() ); } @@ -802,7 +802,7 @@ ScVbaWorksheet::Names( const css::uno::Any& aIndex ) throw (uno::RuntimeExceptio // #163498# initialize Names object with correct parent (this worksheet) // TODO: real sheet-local names... uno::Reference< beans::XPropertySet > xProps( mxModel, uno::UNO_QUERY_THROW ); - uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue( OUString("NamedRanges") ), uno::UNO_QUERY_THROW ); + uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue("NamedRanges"), uno::UNO_QUERY_THROW ); uno::Reference< XCollection > xNames( new ScVbaNames( this, mxContext, xNamedRanges, mxModel ) ); if ( aIndex.hasValue() ) return uno::Any( xNames->Item( aIndex, uno::Any() ) ); @@ -950,7 +950,7 @@ ScVbaWorksheet::getValue( const OUString& aPropertyName ) throw (beans::UnknownP uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW ); uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( OUString( "ooo.vba.ControlProvider" ), mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext("ooo.vba.ControlProvider", mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) ); return uno::makeAny( xControl ); } @@ -1062,7 +1062,7 @@ OUString SAL_CALL ScVbaWorksheet::getCodeName() throw (css::uno::RuntimeException) { uno::Reference< beans::XPropertySet > xSheetProp( mxSheet, uno::UNO_QUERY_THROW ); - return xSheetProp->getPropertyValue( OUString( "CodeName" ) ).get< OUString >(); + return xSheetProp->getPropertyValue("CodeName").get< OUString >(); } sal_Int16 diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index bb6d23ee6b3e..bc04f26df62e 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -361,7 +361,7 @@ ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeExcep } } else - throw uno::RuntimeException( OUString( "Visible property doesn't support non boolean #FIXME" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Visible property doesn't support non boolean #FIXME", uno::Reference< uno::XInterface >() ); } void SAL_CALL @@ -369,7 +369,7 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException) { ScTabViewShell* pViewShell = excel::getBestViewShell( mxModel ); if ( !pViewShell ) - throw uno::RuntimeException( OUString( "Cannot obtain view shell" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Cannot obtain view shell", uno::Reference< uno::XInterface >() ); ScMarkData& rMarkData = pViewShell->GetViewData()->GetMarkData(); sal_Bool bReplace = sal_True; diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx index e629922fe88f..ae5a1f4285cc 100644 --- a/sc/source/ui/vba/vbawsfunction.cxx +++ b/sc/source/ui/vba/vbawsfunction.cxx @@ -182,7 +182,7 @@ ScVbaWSFunction::invoke(const OUString& FunctionName, const uno::Sequence< uno:: OUString( "com.sun.star.sheet.FunctionAccess" ), mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xPropSet( xFunctionAccess, uno::UNO_QUERY_THROW ); - xPropSet->setPropertyValue( OUString( "IsArrayFunction" ), uno::Any( bAsArray ) ); + xPropSet->setPropertyValue("IsArrayFunction", uno::Any( bAsArray ) ); aRet = xFunctionAccess->callFunction( FunctionName, aParamTemp ); } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 6e4aadb9a508..6073baf1abce 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1633,9 +1633,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { try { - xProp->getPropertyValue( OUString("IsDirectionToSimplified") ) >>= bToSimplified; - xProp->getPropertyValue( OUString("IsUseCharacterVariants") ) >>= bUseVariants; - xProp->getPropertyValue( OUString("IsTranslateCommonTerms") ) >>= bCommonTerms; + xProp->getPropertyValue("IsDirectionToSimplified") >>= bToSimplified; + xProp->getPropertyValue("IsUseCharacterVariants") >>= bUseVariants; + xProp->getPropertyValue("IsTranslateCommonTerms") >>= bCommonTerms; } catch( Exception& ) { diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 4749116dd446..b15ff3e6ccc1 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -344,7 +344,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xInfo; xStyles->getByName( pNameItem->GetValue() ) >>= xInfo; OUString aUIName; - xInfo->getPropertyValue( OUString("DisplayName") ) >>= aUIName; + xInfo->getPropertyValue("DisplayName") >>= aUIName; if ( !aUIName.isEmpty() ) rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) ); } diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 7edc66a4240a..554d7370e986 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -464,7 +464,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu( const ScDPLabelData& rLabelData = pDPData->maLabels; mpDPFieldPopup.reset(new ScCheckListMenuWindow(this, pViewData->GetDocument())); - mpDPFieldPopup->setName(OUString("DataPilot field member popup")); + mpDPFieldPopup->setName("DataPilot field member popup"); mpDPFieldPopup->setExtendedData(pDPData.release()); mpDPFieldPopup->setOKAction(new DPFieldPopupOKAction(this)); { diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx index b477f0d1dba3..c695605abf0f 100644 --- a/sc/source/ui/view/tabvwshg.cxx +++ b/sc/source/ui/view/tabvwshg.cxx @@ -72,26 +72,26 @@ void ScTabViewShell::InsertURLButton( const String& rName, const String& rURL, uno::Any aAny; aAny <<= OUString(rName); - xPropSet->setPropertyValue( OUString( "Label" ), aAny ); + xPropSet->setPropertyValue("Label", aAny ); OUString aTmp = INetURLObject::GetAbsURL( pDoc->GetDocumentShell()->GetMedium()->GetBaseURL(), rURL ); aAny <<= aTmp; - xPropSet->setPropertyValue( OUString( "TargetURL" ), aAny ); + xPropSet->setPropertyValue("TargetURL", aAny ); if( rTarget.Len() ) { aAny <<= OUString(rTarget); - xPropSet->setPropertyValue( OUString( "TargetFrame" ), aAny ); + xPropSet->setPropertyValue("TargetFrame", aAny ); } form::FormButtonType eButtonType = form::FormButtonType_URL; aAny <<= eButtonType; - xPropSet->setPropertyValue( OUString( "ButtonType" ), aAny ); + xPropSet->setPropertyValue("ButtonType", aAny ); if ( ::avmedia::MediaWindow::isMediaURL( rURL ) ) { aAny <<= sal_True; - xPropSet->setPropertyValue( OUString( "DispatchURLInternal" ), aAny ); + xPropSet->setPropertyValue("DispatchURLInternal", aAny ); } Point aPos; diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx index c6b19691cf0f..0826a3054641 100644 --- a/scripting/source/dlgprov/dlgevtatt.cxx +++ b/scripting/source/dlgprov/dlgevtatt.cxx @@ -118,9 +118,9 @@ namespace dlgprov try { Reference< XPropertySet > xProps( rxControl->getModel(), UNO_QUERY_THROW ); - xProps->getPropertyValue( OUString("Name" ) ) >>= msDialogCodeName; + xProps->getPropertyValue("Name") >>= msDialogCodeName; xProps.set( mxListener, UNO_QUERY_THROW ); - xProps->setPropertyValue( OUString("Model" ), args[ 0 ] ); + xProps->setPropertyValue("Model", args[ 0 ] ); } catch( const Exception& ) { @@ -171,7 +171,7 @@ namespace dlgprov { uno::Reference< beans::XPropertySet > xModelProps( rxModel, uno::UNO_QUERY_THROW ); uno::Reference< script::vba::XVBACompatibility > xVBACompat( - xModelProps->getPropertyValue( OUString( "BasicLibraries" ) ), uno::UNO_QUERY_THROW ); + xModelProps->getPropertyValue("BasicLibraries"), uno::UNO_QUERY_THROW ); mbUseFakeVBAEvents = xVBACompat->getVBACompatibilityMode(); } catch( uno::Exception& ) @@ -202,7 +202,7 @@ namespace dlgprov Reference< XMultiComponentFactory > xSMgr( m_xContext->getServiceManager() ); if ( xSMgr.is() ) { - Reference< ooo::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext( OUString( "ooo.vba.VBAToOOEventDesc" ), m_xContext ), UNO_QUERY ); + Reference< ooo::vba::XVBAToOOEventDescGen > xVBAToOOEvtDesc( xSMgr->createInstanceWithContext("ooo.vba.VBAToOOEventDesc", m_xContext ), UNO_QUERY ); if ( xVBAToOOEvtDesc.is() ) xEventsSupplier.set( xVBAToOOEvtDesc->getEventSupplier( xControl, sControlName ), UNO_QUERY ); @@ -220,7 +220,7 @@ namespace dlgprov Reference< XControlModel > xControlModel = xControl->getModel(); Reference< XPropertySet > xProps( xControlModel, uno::UNO_QUERY ); OUString sName; - xProps->getPropertyValue( OUString("Name") ) >>= sName; + xProps->getPropertyValue("Name") >>= sName; if ( xEventCont.is() ) { Sequence< OUString > aNames = xEventCont->getElementNames(); @@ -362,7 +362,7 @@ namespace dlgprov Reference< XPropertySet > xProps( xDlgControl->getModel(), UNO_QUERY ); try { - xProps->getPropertyValue( OUString("Name" ) ) >>= sDialogCodeName; + xProps->getPropertyValue("Name") >>= sDialogCodeName; } catch( Exception& ){} } diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index 32a993020d26..e7954d8c2b41 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -124,7 +124,7 @@ static OUString aResourceResolverPropName("ResourceResolver"); Reference< container::XNameContainer > lcl_createControlModel(const Reference< XComponentContext >& i_xContext) { Reference< XMultiComponentFactory > xSMgr_( i_xContext->getServiceManager(), UNO_QUERY_THROW ); - Reference< container::XNameContainer > xControlModel( xSMgr_->createInstanceWithContext( OUString( "com.sun.star.awt.UnoControlDialogModel" ), i_xContext ), UNO_QUERY_THROW ); + Reference< container::XNameContainer > xControlModel( xSMgr_->createInstanceWithContext("com.sun.star.awt.UnoControlDialogModel", i_xContext ), UNO_QUERY_THROW ); return xControlModel; } Reference< container::XNameContainer > lcl_createDialogModel( const Reference< XComponentContext >& i_xContext, @@ -268,7 +268,7 @@ static OUString aResourceResolverPropName("ResourceResolver"); { if ( !m_BasicInfo.get() ) // shouln't get here - throw RuntimeException( OUString( "No information to create dialog" ), Reference< XInterface >() ); + throw RuntimeException("No information to create dialog", Reference< XInterface >() ); Reference< resource::XStringResourceManager > xStringResourceManager = getStringResourceFromDialogLibrary( m_BasicInfo->mxDlgLib ); OUString aURL("" ); diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 5061fe8b4ea5..92df40d6ad3f 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -475,18 +475,18 @@ public: virtual void SAL_CALL insertByName( const OUString&, const Any& ) throw (lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, RuntimeException) { - throw RuntimeException( OUString("ReadOnly container"), Reference< XInterface >() ); + throw RuntimeException("ReadOnly container", Reference< XInterface >() ); } virtual void SAL_CALL removeByName( const OUString& ) throw (::com::sun::star::container::NoSuchElementException, lang::WrappedTargetException, RuntimeException) { - throw RuntimeException( OUString("ReadOnly container"), Reference< XInterface >() ); + throw RuntimeException("ReadOnly container", Reference< XInterface >() ); } // XNameReplace virtual void SAL_CALL replaceByName( const OUString&, const Any& ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, RuntimeException) { - throw RuntimeException( OUString("ReadOnly container"), Reference< XInterface >() ); + throw RuntimeException("ReadOnly container", Reference< XInterface >() ); } @@ -674,7 +674,7 @@ EventListener::setShellFromModel() try { uno::Reference< beans::XPropertySet > xProps( m_xModel, UNO_QUERY_THROW ); - uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue( OUString( "BasicLibraries" ) ), uno::UNO_QUERY_THROW ); + uno::Reference< script::vba::XVBACompatibility > xVBAMode( xProps->getPropertyValue("BasicLibraries"), uno::UNO_QUERY_THROW ); msProject = xVBAMode->getProjectName(); } catch ( uno::Exception& ) {} @@ -902,7 +902,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce uno::Reference< beans::XPropertySet > xProps; OSL_TRACE("Getting properties"); xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( OUString( "Name" ) ) >>= sName; + xProps->getPropertyValue("Name") >>= sName; } } //dumpEvent( evt ); diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index 853f089d0c26..9b48cd8495ff 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -66,7 +66,7 @@ public: // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure, // which is a private symbol to us, gets called - m_xDrawComponent = getMultiServiceFactory()->createInstance(OUString("com.sun.star.comp.Draw.PresentationDocument")); + m_xDrawComponent = getMultiServiceFactory()->createInstance("com.sun.star.comp.Draw.PresentationDocument"); CPPUNIT_ASSERT_MESSAGE("no impress component!", m_xDrawComponent.is()); } diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 2f901f55ec9e..16552a8d3e5a 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -2553,7 +2553,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a // try to get the aspect when available ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xShapeProps( mXShape, ::com::sun::star::uno::UNO_QUERY_THROW ); - xShapeProps->getPropertyValue( OUString( "Aspect" ) ) >>= nAspect; + xShapeProps->getPropertyValue("Aspect") >>= nAspect; } catch( ::com::sun::star::uno::Exception& ) {} @@ -3125,7 +3125,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a // try to get the aspect when available ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xShapeProps( mXShape, ::com::sun::star::uno::UNO_QUERY_THROW ); - xShapeProps->getPropertyValue( OUString( "Aspect" ) ) >>= nAspect; + xShapeProps->getPropertyValue("Aspect") >>= nAspect; } catch( ::com::sun::star::uno::Exception& ) {} diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx index efa58fdbc02b..78f606e67c2c 100644 --- a/sd/source/filter/eppt/pptexsoundcollection.cxx +++ b/sd/source/filter/eppt/pptexsoundcollection.cxx @@ -38,7 +38,7 @@ ExSoundEntry::ExSoundEntry(const OUString& rString) ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); sal_Int64 nVal = 0; - ::cppu::convertPropertyValue( nVal, aCnt.getPropertyValue( OUString( "Size" ) ) ); + ::cppu::convertPropertyValue( nVal, aCnt.getPropertyValue("Size") ); nFileSize = (sal_uInt32)nVal; } catch( ::com::sun::star::uno::Exception& ) diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx index d9fd8fd8f4c4..8e9e70498e8a 100644 --- a/sd/source/filter/eppt/pptx-stylesheet.cxx +++ b/sd/source/filter/eppt/pptx-stylesheet.cxx @@ -239,7 +239,7 @@ void PPTExParaSheet::SetStyleSheet( const ::com::sun::star::uno::Reference< ::co if ( nLineSpacing > 0 ) // if nLinespacing is < 0 the linespacing is an absolute spacing { sal_Bool bFixedLineSpacing = sal_False; - uno::Any aAny = rXPropSet->getPropertyValue( OUString( "FontIndependentLineSpacing" ) ); + uno::Any aAny = rXPropSet->getPropertyValue("FontIndependentLineSpacing"); if( !(aAny >>= bFixedLineSpacing) || !bFixedLineSpacing ) { const FontCollectionEntry* pDesc = rFontCollection.GetById( rCharLevel.mnFont ); diff --git a/sd/source/ui/sidebar/PanelFactory.cxx b/sd/source/ui/sidebar/PanelFactory.cxx index cba8657a6831..dbdd48b593bd 100644 --- a/sd/source/ui/sidebar/PanelFactory.cxx +++ b/sd/source/ui/sidebar/PanelFactory.cxx @@ -168,7 +168,7 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( pBase = pController->GetViewShellBase(); } if (pBase == NULL) - throw RuntimeException(OUString("can not get ViewShellBase for frame"), NULL); + throw RuntimeException("can not get ViewShellBase for frame", NULL); // Get bindings from given arguments. const sal_uInt64 nBindingsValue (aArguments.getOrDefault("SfxBindings", sal_uInt64(0))); diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 4c4d3bed98ca..66707c360d23 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -1582,7 +1582,7 @@ void CurrentPageSetter::operator() (bool) // Switch to the page last edited by setting the CurrentPage // property. Reference<beans::XPropertySet> xSet (mrBase.GetController(), UNO_QUERY_THROW); - xSet->setPropertyValue (OUString("CurrentPage"), aPage); + xSet->setPropertyValue ("CurrentPage", aPage); } catch (const RuntimeException&) { diff --git a/sdext/source/minimizer/unodialog.cxx b/sdext/source/minimizer/unodialog.cxx index 352aff0903e2..f1a3e7062dcb 100644 --- a/sdext/source/minimizer/unodialog.cxx +++ b/sdext/source/minimizer/unodialog.cxx @@ -149,7 +149,7 @@ Reference< XButton > UnoDialog::insertButton( const OUString& rName, Reference< Reference< XInterface > xButtonModel( insertControlModel( OUString( "com.sun.star.awt.UnoControlButtonModel" ), rName, rPropertyNames, rPropertyValues ) ); Reference< XPropertySet > xPropertySet( xButtonModel, UNO_QUERY_THROW ); - xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) ); + xPropertySet->setPropertyValue("Name", Any( rName ) ); xButton = Reference< XButton >( mxDialog->getControl( rName ), UNO_QUERY_THROW ); if ( xActionListener.is() ) @@ -174,7 +174,7 @@ Reference< XFixedText > UnoDialog::insertFixedText( const OUString& rName, const { Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlFixedTextModel" ), rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW ); - xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) ); + xPropertySet->setPropertyValue("Name", Any( rName ) ); xFixedText = Reference< XFixedText >( mxDialog->getControl( rName ), UNO_QUERY_THROW ); } catch ( Exception& ) @@ -192,7 +192,7 @@ Reference< XCheckBox > UnoDialog::insertCheckBox( const OUString& rName, const S { Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlCheckBoxModel" ), rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW ); - xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) ); + xPropertySet->setPropertyValue("Name", Any( rName ) ); xCheckBox = Reference< XCheckBox >( mxDialog->getControl( rName ), UNO_QUERY_THROW ); } catch ( Exception& ) @@ -210,7 +210,7 @@ Reference< XControl > UnoDialog::insertFormattedField( const OUString& rName, co { Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlFormattedFieldModel" ), rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW ); - xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) ); + xPropertySet->setPropertyValue("Name", Any( rName ) ); xControl = Reference< XControl >( mxDialog->getControl( rName ), UNO_QUERY_THROW ); } catch ( Exception& ) @@ -228,7 +228,7 @@ Reference< XComboBox > UnoDialog::insertComboBox( const OUString& rName, const S { Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlComboBoxModel" ), rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW ); - xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) ); + xPropertySet->setPropertyValue("Name", Any( rName ) ); xControl = Reference< XComboBox >( mxDialog->getControl( rName ), UNO_QUERY_THROW ); } catch ( Exception& ) @@ -246,7 +246,7 @@ Reference< XRadioButton > UnoDialog::insertRadioButton( const OUString& rName, c { Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlRadioButtonModel" ), rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW ); - xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) ); + xPropertySet->setPropertyValue("Name", Any( rName ) ); xControl = Reference< XRadioButton >( mxDialog->getControl( rName ), UNO_QUERY_THROW ); } catch ( Exception& ) @@ -264,7 +264,7 @@ Reference< XListBox > UnoDialog::insertListBox( const OUString& rName, const Seq { Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlListBoxModel" ), rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW ); - xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) ); + xPropertySet->setPropertyValue("Name", Any( rName ) ); xControl = Reference< XListBox >( mxDialog->getControl( rName ), UNO_QUERY_THROW ); } catch ( Exception& ) @@ -282,7 +282,7 @@ Reference< XControl > UnoDialog::insertImage( const OUString& rName, const Seque { Reference< XPropertySet > xPropertySet( insertControlModel( OUString( "com.sun.star.awt.UnoControlImageControlModel" ), rName, rPropertyNames, rPropertyValues ), UNO_QUERY_THROW ); - xPropertySet->setPropertyValue( OUString( "Name" ), Any( rName ) ); + xPropertySet->setPropertyValue("Name", Any( rName ) ); xControl = Reference< XControl >( mxDialog->getControl( rName ), UNO_QUERY_THROW ); } catch ( Exception& ) diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 032ac5777721..8dc8453cad1f 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -129,13 +129,13 @@ namespace { uno::UNO_QUERY_THROW ); OUString aFilename( rFilename.copy(rFilename.lastIndexOf('/')+1) ); OUString aLabel; - xPropSet->getPropertyValue(OUString( "Label" )) >>= aLabel; + xPropSet->getPropertyValue("Label") >>= aLabel; const char pFileName[] = "%FILENAME"; aLabel = aLabel.replaceAt( aLabel.indexOfAsciiL(pFileName,SAL_N_ELEMENTS(pFileName)-1), SAL_N_ELEMENTS(pFileName)-1, aFilename ); - xPropSet->setPropertyValue(OUString( "Label" ), + xPropSet->setPropertyValue("Label", uno::makeAny(aLabel)); uno::Sequence<OUString> aListboxItems(3); diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index ceceadd2a213..d0521e453bbf 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -1105,8 +1105,8 @@ double PresenterController::GetSlideAspectRatio (void) const Reference<beans::XPropertySet> xProperties(xSlides->getByIndex(0),UNO_QUERY_THROW); sal_Int32 nWidth (28000); sal_Int32 nHeight (21000); - if ((xProperties->getPropertyValue(OUString("Width")) >>= nWidth) - && (xProperties->getPropertyValue(OUString("Height")) >>= nHeight) + if ((xProperties->getPropertyValue("Width") >>= nWidth) + && (xProperties->getPropertyValue("Height") >>= nHeight) && nHeight > 0) { nSlideAspectRatio = double(nWidth) / double(nHeight); diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx index f361912f3882..2f1aeaa22778 100644 --- a/sdext/source/presenter/PresenterScreen.cxx +++ b/sdext/source/presenter/PresenterScreen.cxx @@ -157,7 +157,7 @@ Any SAL_CALL PresenterScreenJob::execute( } Reference< XServiceInfo > xInfo( xModel, UNO_QUERY ); - if( xInfo.is() && xInfo->supportsService( OUString( "com.sun.star.presentation.PresentationDocument" ) ) ) + if( xInfo.is() && xInfo->supportsService("com.sun.star.presentation.PresentationDocument") ) { // Create a new listener that waits for the full screen presentation // to start and to end. It takes care of its own lifetime. diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index daad9e1c5284..084f7186a7c3 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -854,8 +854,8 @@ double PresenterSlideSorter::GetSlideAspectRatio (void) const Reference<beans::XPropertySet> xProperties(xSlides->getByIndex(0),UNO_QUERY_THROW); sal_Int32 nWidth (28000); sal_Int32 nHeight (21000); - if ((xProperties->getPropertyValue(OUString("Width")) >>= nWidth) - && (xProperties->getPropertyValue(OUString("Height")) >>= nHeight) + if ((xProperties->getPropertyValue("Width") >>= nWidth) + && (xProperties->getPropertyValue("Height") >>= nHeight) && nHeight > 0) { nSlideAspectRatio = double(nWidth) / double(nHeight); diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index b3ffefdd6ffa..3c128351423c 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -237,7 +237,7 @@ sal_uInt32 CheckPasswd_Impl { sal_Bool bIsEncrypted = sal_False; try { - xStorageProps->getPropertyValue( OUString("HasEncryptedEntries") ) + xStorageProps->getPropertyValue("HasEncryptedEntries") >>= bIsEncrypted; } catch( uno::Exception& ) { @@ -914,7 +914,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) if ( xSet.is() ) { // copy protocols - aRet = xSet->getPropertyValue( OUString("Protocols") ); + aRet = xSet->getPropertyValue("Protocols"); Sequence < OUString > aTmp; aRet >>= aTmp; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 1fdd6c1041ef..b83a9bf7ee47 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -653,7 +653,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) { try { - Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; } catch ( const ::com::sun::star::uno::RuntimeException& ) diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index cd0676159005..4fecc9ef2c4e 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -177,7 +177,7 @@ sal_Bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor ) ::ucbhelper::Content aCnt( INetURLObject( _rURL ).GetMainURL( INetURLObject::NO_DECODE ), Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - if ( ( aCnt.getPropertyValue( OUString("AnchorName") ) >>= sAnchor ) ) + if ( ( aCnt.getPropertyValue("AnchorName") >>= sAnchor ) ) { if ( !sAnchor.isEmpty() ) @@ -435,7 +435,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask , if (xHelpTask->setComponent( xHelpWindow, Reference< XController >() )) { // Customize UI ... - xHelpTask->setName( OUString("OFFICE_HELP_TASK") ); + xHelpTask->setName("OFFICE_HELP_TASK"); Reference< XPropertySet > xProps(xHelpTask, UNO_QUERY); if (xProps.is()) @@ -458,7 +458,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask , return NULL; } - xHelpContent->setName(OUString("OFFICE_HELP")); + xHelpContent->setName("OFFICE_HELP"); rHelpTask = xHelpTask; rHelpContent = xHelpContent; diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index e822d9d7dc0d..dd46236c1365 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -254,7 +254,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( { OStringBuffer sOut; OUString aStr; - uno::Any aAny = xSet->getPropertyValue( OUString("FrameURL") ); + uno::Any aAny = xSet->getPropertyValue("FrameURL"); if ( (aAny >>= aStr) && !aStr.isEmpty() ) { String aURL = INetURLObject( aStr ).GetMainURL( INetURLObject::DECODE_TO_IURI ); @@ -270,7 +270,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( } } - aAny = xSet->getPropertyValue( OUString("FrameName") ); + aAny = xSet->getPropertyValue("FrameName"); if ( (aAny >>= aStr) && !aStr.isEmpty() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name) @@ -281,13 +281,13 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( } sal_Int32 nVal = SIZE_NOT_SET; - aAny = xSet->getPropertyValue( OUString("FrameMarginWidth") ); + aAny = xSet->getPropertyValue("FrameMarginWidth"); if ( (aAny >>= nVal) && nVal != SIZE_NOT_SET ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_marginwidth) .append('=').append(nVal); } - aAny = xSet->getPropertyValue( OUString("FrameMarginHeight") ); + aAny = xSet->getPropertyValue("FrameMarginHeight"); if ( (aAny >>= nVal) && nVal != SIZE_NOT_SET ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_marginheight) @@ -295,10 +295,10 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( } sal_Bool bVal = sal_True; - aAny = xSet->getPropertyValue( OUString("FrameIsAutoScroll") ); + aAny = xSet->getPropertyValue("FrameIsAutoScroll"); if ( (aAny >>= bVal) && !bVal ) { - aAny = xSet->getPropertyValue( OUString("FrameIsScrollingMode") ); + aAny = xSet->getPropertyValue("FrameIsScrollingMode"); if ( aAny >>= bVal ) { const sal_Char *pStr = bVal ? sHTML_SC_yes : sHTML_SC_no; @@ -308,10 +308,10 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor( } // frame border (MS+Netscape-Extension) - aAny = xSet->getPropertyValue( OUString("FrameIsAutoBorder") ); + aAny = xSet->getPropertyValue("FrameIsAutoBorder"); if ( (aAny >>= bVal) && !bVal ) { - aAny = xSet->getPropertyValue( OUString("FrameIsBorder") ); + aAny = xSet->getPropertyValue("FrameIsBorder"); if ( aAny >>= bVal ) { const char* pStr = bVal ? sHTML_SC_yes : sHTML_SC_no; diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 9acf705ee3be..9053ab381d2b 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -217,7 +217,7 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest if ( xSet.is() ) { - com::sun::star::uno::Any aProp = xSet->getPropertyValue(OUString("DispatchRecorderSupplier")); + com::sun::star::uno::Any aProp = xSet->getPropertyValue("DispatchRecorderSupplier"); com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorderSupplier > xSupplier; com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > xRecorder; aProp >>= xSupplier; @@ -1250,7 +1250,7 @@ void SfxDispatcher::SetMenu_Impl() if ( xPropSet.is() ) { com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager; - com::sun::star::uno::Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + com::sun::star::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; if ( xLayoutManager.is() ) { @@ -1314,7 +1314,7 @@ void SfxDispatcher::Update_Impl( sal_Bool bForce ) { try { - com::sun::star::uno::Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" ) ); + com::sun::star::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; } catch (const com::sun::star::uno::Exception&) @@ -2160,7 +2160,7 @@ void SfxDispatcher::HideUI( sal_Bool bHide ) if ( xPropSet.is() ) { com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager; - com::sun::star::uno::Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + com::sun::star::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; if ( xLayoutManager.is() ) xLayoutManager->setVisible( !bHide ); diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 3fa185592ed5..a95b59f10840 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -815,7 +815,7 @@ com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorder > SfxRe if(xSet.is()) { - com::sun::star::uno::Any aProp = xSet->getPropertyValue(OUString("DispatchRecorderSupplier")); + com::sun::star::uno::Any aProp = xSet->getPropertyValue("DispatchRecorderSupplier"); com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorderSupplier > xSupplier; aProp >>= xSupplier; if(xSupplier.is()) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index d11cdf920aab..c00d384093b7 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1805,7 +1805,7 @@ void FileDialogHelper_Impl::addFilters( const String& rFactory, uno::Reference< XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory(); uno::Reference< XContainerQuery > xFilterCont( - xSMGR->createInstance(OUString("com.sun.star.document.FilterFactory")), + xSMGR->createInstance("com.sun.star.document.FilterFactory"), UNO_QUERY); if ( ! xFilterCont.is() ) return; diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 8df390fd1f20..7943e6606957 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -148,7 +148,7 @@ sal_Bool HasDocumentValidSignature( const css::uno::Reference< css::frame::XMode css::uno::Reference< css::beans::XPropertySet > xPropSet( xModel, css::uno::UNO_QUERY ); if ( xPropSet.is() ) { - Any a = xPropSet->getPropertyValue( OUString( "HasValidSignatures" )); + Any a = xPropSet->getPropertyValue("HasValidSignatures"); sal_Bool bReturn = sal_Bool(); if ( a >>= bReturn ) return bReturn; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 3d81345f8767..c1d3b1714a4d 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2768,18 +2768,18 @@ IMPL_LINK( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox ) try { uno::Sequence< beans::PropertyValue > aPropSeq; - uno::Any aCommand = xUICommands->getByName(OUString(".uno:StyleNewByExample")); + uno::Any aCommand = xUICommands->getByName(".uno:StyleNewByExample"); OUString sLabel = lcl_GetLabel( aCommand ); pMenu->InsertItem( SID_STYLE_NEW_BY_EXAMPLE, sLabel ); pMenu->SetHelpId(SID_STYLE_NEW_BY_EXAMPLE, HID_TEMPLDLG_NEWBYEXAMPLE); - aCommand = xUICommands->getByName(OUString(".uno:StyleUpdateByExample")); + aCommand = xUICommands->getByName(".uno:StyleUpdateByExample"); sLabel = lcl_GetLabel( aCommand ); pMenu->InsertItem( SID_STYLE_UPDATE_BY_EXAMPLE, sLabel ); pMenu->SetHelpId(SID_STYLE_UPDATE_BY_EXAMPLE, HID_TEMPLDLG_UPDATEBYEXAMPLE); - aCommand = xUICommands->getByName(OUString(".uno:LoadStyles")); + aCommand = xUICommands->getByName(".uno:LoadStyles"); sLabel = lcl_GetLabel( aCommand ); pMenu->InsertItem( SID_TEMPLATE_LOAD, sLabel ); pMenu->SetHelpId(SID_TEMPLATE_LOAD, ".uno:LoadStyles"); diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index d83b1950dc7d..f410703ed421 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -1907,7 +1907,7 @@ SfxDocumentMetaData::loadFromStorage( css::uno::Reference<css::beans::XPropertySet> xPropArg = getURLProperties(Medium); try { - xPropArg->getPropertyValue(OUString("BaseURI")) + xPropArg->getPropertyValue("BaseURI") >>= input.sSystemId; input.sSystemId += OUString("/").concat( OUString(s_meta)); diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 574bc54603a6..932b1a9209e3 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -241,7 +241,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri aActuralFilterData[nInd].Value >>= aActualFilterTypeName; ::comphelper::SequenceAsHashMap aProps1( xTypeDetection->getByName( aActualFilterTypeName ) ); uno::Sequence< OUString > aAllExt = - aProps1.getUnpackedValueOrDefault( OUString("Extensions"), uno::Sequence< OUString >() ); + aProps1.getUnpackedValueOrDefault("Extensions", uno::Sequence< OUString >() ); //To-do: check if aAllExt is empty first OUString aExt = aAllExt[0]; @@ -269,7 +269,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri uno::Reference< document::XTypeDetection > xTypeDetector( xTypeDetection, uno::UNO_QUERY ); ::comphelper::SequenceAsHashMap aProps2( xTypeDetection->getByName( xTypeDetector->queryTypeByURL( rTemplateName ) ) ); OUString aFilterName = - aProps2.getUnpackedValueOrDefault( OUString("PreferredFilter"), OUString() ); + aProps2.getUnpackedValueOrDefault("PreferredFilter", OUString() ); uno::Sequence< beans::PropertyValue > aArgs( 3 ); aArgs[0].Name = OUString("FilterName"); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index e44449f5be65..25af1e48b852 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -475,7 +475,7 @@ util::DateTime SfxMedium::GetInitFileDate( sal_Bool bIgnoreOldValue ) uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv; ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() ); - aContent.getPropertyValue( OUString("DateModified" ) ) >>= pImp->m_aDateTime; + aContent.getPropertyValue("DateModified") >>= pImp->m_aDateTime; pImp->m_bGotDateTime = true; } catch ( const ::com::sun::star::uno::Exception& ) @@ -535,7 +535,7 @@ OUString SfxMedium::GetBaseURL( bool bForSaving ) { try { - Any aAny = pImp->aContent.getPropertyValue( OUString("BaseURI" ) ); + Any aAny = pImp->aContent.getPropertyValue("BaseURI"); aAny >>= aBaseURL; } catch ( const ::com::sun::star::uno::Exception& ) @@ -1050,7 +1050,7 @@ bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) // MediaDescriptor does this check also, the duplication should be avoided in future Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv; ::ucbhelper::Content aContent( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() ); - aContent.getPropertyValue( OUString( "IsReadOnly" ) ) >>= bContentReadonly; + aContent.getPropertyValue("IsReadOnly") >>= bContentReadonly; } catch( const uno::Exception& ) {} @@ -1895,7 +1895,7 @@ void SfxMedium::Transfer_Impl() aAny <<= pSegmentSize->GetValue(); uno::Reference < beans::XPropertySet > xSet( pImp->xStorage, uno::UNO_QUERY ); - xSet->setPropertyValue( OUString("SegmentSize"), aAny ); + xSet->setPropertyValue("SegmentSize", aAny ); // copy the temporary storage into the disk spanned package GetStorage()->copyToStorage( xStor ); @@ -1974,7 +1974,7 @@ void SfxMedium::Transfer_Impl() // LongName wasn't defined anywhere, only used here... get the Title instead // as it's less probably empty OUString aFileName; - Any aAny = aDestContent.getPropertyValue( OUString("Title" ) ); + Any aAny = aDestContent.getPropertyValue("Title"); aAny >>= aFileName; if ( aFileName.isEmpty() ) aFileName = GetURLObject().getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); @@ -3098,7 +3098,7 @@ SvKeyValueIterator* SfxMedium::GetHeaderAttributes_Impl() { try { - Any aAny = pImp->aContent.getPropertyValue( OUString("MediaType") ); + Any aAny = pImp->aContent.getPropertyValue("MediaType"); OUString aContentType; aAny >>= aContentType; diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 2d162b211cc3..0ba7deddd46d 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1377,7 +1377,7 @@ sal_Bool SfxDocTplService_Impl::WriteUINamesForTemplateDir_Impl( const OUString& uno::UNO_QUERY_THROW ); OUString aTempURL; - uno::Any aUrl = xTempFile->getPropertyValue( OUString("Uri") ); + uno::Any aUrl = xTempFile->getPropertyValue("Uri"); aUrl >>= aTempURL; uno::Reference< io::XStream > xStream( xTempFile, uno::UNO_QUERY_THROW ); @@ -1835,14 +1835,14 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, if ( !xApplConfig.is() ) throw uno::RuntimeException(); - xApplConfig->getByName( OUString( "ooSetupFactoryActualTemplateFilter" ) ) >>= aFilterName; + xApplConfig->getByName("ooSetupFactoryActualTemplateFilter") >>= aFilterName; if ( aFilterName.isEmpty() ) throw uno::RuntimeException(); // find the related type name OUString aTypeName; uno::Reference< container::XNameAccess > xFilterFactory( - xFactory->createInstance( OUString("com.sun.star.document.FilterFactory") ), + xFactory->createInstance("com.sun.star.document.FilterFactory"), uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aFilterData; @@ -1861,16 +1861,16 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, mxType.is() ? uno::Reference< container::XNameAccess >( mxType, uno::UNO_QUERY_THROW ) : uno::Reference< container::XNameAccess >( - xFactory->createInstance( OUString("com.sun.star.document.TypeDetection") ), + xFactory->createInstance("com.sun.star.document.TypeDetection"), uno::UNO_QUERY_THROW ); SequenceAsHashMap aTypeProps( xTypeDetection->getByName( aTypeName ) ); uno::Sequence< OUString > aAllExt = - aTypeProps.getUnpackedValueOrDefault( OUString("Extensions"), Sequence< OUString >() ); + aTypeProps.getUnpackedValueOrDefault("Extensions", Sequence< OUString >() ); if ( !aAllExt.getLength() ) throw uno::RuntimeException(); - OUString aMediaType = aTypeProps.getUnpackedValueOrDefault( OUString("MediaType"), OUString() ); + OUString aMediaType = aTypeProps.getUnpackedValueOrDefault("MediaType", OUString() ); OUString aExt = aAllExt[0]; if ( aMediaType.isEmpty() || aExt.isEmpty() ) diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index a2701549606a..9df4e68de3f7 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -461,7 +461,7 @@ const ::comphelper::SequenceAsHashMap& ModelData_Impl::GetModuleProps() //------------------------------------------------------------------------- OUString ModelData_Impl::GetDocServiceName() { - return GetModuleProps().getUnpackedValueOrDefault(OUString("ooSetupFactoryDocumentService"), OUString()); + return GetModuleProps().getUnpackedValueOrDefault("ooSetupFactoryDocumentService", OUString()); } //------------------------------------------------------------------------- @@ -510,7 +510,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter if ( aProps.getLength() ) { ::comphelper::SequenceAsHashMap aFiltHM( aProps ); - sal_Int32 nFlags = aFiltHM.getUnpackedValueOrDefault( OUString("Flags"), + sal_Int32 nFlags = aFiltHM.getUnpackedValueOrDefault("Flags", (sal_Int32)0 ); if ( ( ( nFlags & nMust ) == nMust ) && !( nFlags & nDont ) ) aFilterProps = aProps; @@ -768,13 +768,13 @@ sal_Int8 ModelData_Impl::CheckFilter( const OUString& aFilterName ) m_pOwner->GetFilterConfiguration()->getByName( aFilterName ) >>= aFilterProps; aFiltPropsHM = ::comphelper::SequenceAsHashMap( aFilterProps ); - nFiltFlags = aFiltPropsHM.getUnpackedValueOrDefault( OUString("Flags"), (sal_Int32)0 ); + nFiltFlags = aFiltPropsHM.getUnpackedValueOrDefault("Flags", (sal_Int32)0 ); } // only a temporary solution until default filter retrieving feature is implemented // then GetDocServiceDefaultFilter() must be used ::comphelper::SequenceAsHashMap aDefFiltPropsHM = GetDocServiceDefaultFilterCheckFlags( 3, 0 ); - sal_Int32 nDefFiltFlags = aDefFiltPropsHM.getUnpackedValueOrDefault( OUString("Flags"), (sal_Int32)0 ); + sal_Int32 nDefFiltFlags = aDefFiltPropsHM.getUnpackedValueOrDefault("Flags", (sal_Int32)0 ); // if the old filter is not acceptable // and there is no default filter or it is not acceptable for requested parameters then proceed with saveAs @@ -794,9 +794,9 @@ sal_Int8 ModelData_Impl::CheckFilter( const OUString& aFilterName ) { // the default filter is acceptable and the old filter is alian one // so ask to make a saveAs operation - OUString aUIName = aFiltPropsHM.getUnpackedValueOrDefault( OUString("UIName"), + OUString aUIName = aFiltPropsHM.getUnpackedValueOrDefault("UIName", OUString() ); - OUString aDefUIName = aDefFiltPropsHM.getUnpackedValueOrDefault( OUString("UIName"), + OUString aDefUIName = aDefFiltPropsHM.getUnpackedValueOrDefault("UIName", OUString() ); OUString aPreusedFilterName = GetDocProps().getUnpackedValueOrDefault( OUString("PreusedFilterName"), @@ -1014,7 +1014,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, m_pOwner->GetFilterConfiguration()->getByName( aOldFilterName ) >>= aOldFilterProps; ::comphelper::SequenceAsHashMap aOldFiltPropsHM( aOldFilterProps ); - sal_Int32 nOldFiltFlags = aOldFiltPropsHM.getUnpackedValueOrDefault( OUString("Flags"), (sal_Int32)0 ); + sal_Int32 nOldFiltFlags = aOldFiltPropsHM.getUnpackedValueOrDefault("Flags", (sal_Int32)0 ); if ( bSetStandardName || ( nOldFiltFlags & nMust ) != nMust || nOldFiltFlags & nDont ) { @@ -1225,7 +1225,7 @@ OUString ModelData_Impl::GetRecommendedDir( const OUString& aSuggestedDir ) OUString aRecommendedDir; if ( ( !aSuggestedDir.isEmpty() || GetStorable()->hasLocation() ) - && !GetMediaDescr().getUnpackedValueOrDefault( OUString("RepairPackage"), + && !GetMediaDescr().getUnpackedValueOrDefault("RepairPackage", sal_False ) ) { INetURLObject aLocation; @@ -1280,7 +1280,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con { // adjust the extension to the type uno::Reference< container::XNameAccess > xTypeDetection = uno::Reference< container::XNameAccess >( - comphelper::getProcessServiceFactory()->createInstance( OUString("com.sun.star.document.TypeDetection") ), + comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.TypeDetection"), uno::UNO_QUERY ); if ( xTypeDetection.is() ) { @@ -1320,7 +1320,7 @@ uno::Reference< container::XNameAccess > SfxStoringHelper::GetFilterConfiguratio if ( !m_xFilterCFG.is() ) { m_xFilterCFG = uno::Reference< container::XNameAccess >( - comphelper::getProcessServiceFactory()->createInstance( OUString("com.sun.star.document.FilterFactory") ), + comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.FilterFactory"), uno::UNO_QUERY ); if ( !m_xFilterCFG.is() ) @@ -1533,17 +1533,17 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel } // The Dispatch supports parameter FolderName that overwrites SuggestedSaveAsDir - OUString aSuggestedDir = aModelData.GetMediaDescr().getUnpackedValueOrDefault( OUString( "FolderName" ), OUString() ); + OUString aSuggestedDir = aModelData.GetMediaDescr().getUnpackedValueOrDefault("FolderName", OUString() ); if ( aSuggestedDir.isEmpty() ) { - aSuggestedDir = aModelData.GetMediaDescr().getUnpackedValueOrDefault( OUString( "SuggestedSaveAsDir" ), OUString() ); + aSuggestedDir = aModelData.GetMediaDescr().getUnpackedValueOrDefault("SuggestedSaveAsDir", OUString() ); if ( aSuggestedDir.isEmpty() ) - aSuggestedDir = aModelData.GetDocProps().getUnpackedValueOrDefault( OUString( "SuggestedSaveAsDir" ), OUString() ); + aSuggestedDir = aModelData.GetDocProps().getUnpackedValueOrDefault("SuggestedSaveAsDir", OUString() ); } - aSuggestedName = aModelData.GetMediaDescr().getUnpackedValueOrDefault( OUString( "SuggestedSaveAsName" ), OUString() ); + aSuggestedName = aModelData.GetMediaDescr().getUnpackedValueOrDefault("SuggestedSaveAsName", OUString() ); if ( aSuggestedName.isEmpty() ) - aSuggestedName = aModelData.GetDocProps().getUnpackedValueOrDefault( OUString( "SuggestedSaveAsName" ), OUString() ); + aSuggestedName = aModelData.GetDocProps().getUnpackedValueOrDefault("SuggestedSaveAsName", OUString() ); OUString sStandardDir; ::comphelper::SequenceAsHashMap::const_iterator aStdDirIter = diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index d8f4319163fa..71b6763717e4 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1108,9 +1108,9 @@ void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteract try { uno::Reference < beans::XPropertySet > xPropSet( GetStorage(), uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "Version" ) ) >>= aVersion; - xPropSet->getPropertyValue( OUString( "HasEncryptedEntries" ) ) >>= bIsEncrypted; - xPropSet->getPropertyValue( OUString( "HasNonEncryptedEntries" ) ) >>= bHasNonEncrypted; + xPropSet->getPropertyValue("Version") >>= aVersion; + xPropSet->getPropertyValue("HasEncryptedEntries") >>= bIsEncrypted; + xPropSet->getPropertyValue("HasNonEncryptedEntries") >>= bHasNonEncrypted; } catch( uno::Exception& ) { @@ -1561,7 +1561,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon { Sequence< uno::Any > aArgs( 1 ); aArgs[ 0 ] = *pCaller; - xProps->setPropertyValue( OUString("Caller"), uno::makeAny( aArgs ) ); + xProps->setPropertyValue("Caller", uno::makeAny( aArgs ) ); } } aRet = xScript->invoke( aParams, aOutParamIndex, aOutParam ); @@ -1962,7 +1962,7 @@ sal_Bool SfxObjectShell_Impl::hasTrustedScriptingSignature( sal_Bool bAllowUIToA try { uno::Reference < beans::XPropertySet > xPropSet( rDocShell.GetStorage(), uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "Version" ) ) >>= aVersion; + xPropSet->getPropertyValue("Version") >>= aVersion; } catch( uno::Exception& ) { diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 5549414df17e..bff362c066cd 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1330,7 +1330,7 @@ uno::Sequence< security::DocumentSignatureInformation > SfxObjectShell::ImplAnal try { uno::Reference < beans::XPropertySet > xPropSet( GetStorage(), uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "Version" ) ) >>= aVersion; + xPropSet->getPropertyValue("Version") >>= aVersion; } catch( uno::Exception& ) { @@ -1408,7 +1408,7 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) { // check the version of the document uno::Reference < beans::XPropertySet > xPropSet( GetStorage(), uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "Version" ) ) >>= aODFVersion; + xPropSet->getPropertyValue("Version") >>= aODFVersion; } catch( uno::Exception& ) {} diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 29d9d2d44266..ffdb470f4cfd 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -363,7 +363,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto { try { - xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aDataFlavor.MimeType ) ); + xProps->setPropertyValue("MediaType", uno::makeAny( aDataFlavor.MimeType ) ); } catch( uno::Exception& ) { @@ -387,7 +387,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto try { // older versions can not have this property set, it exists only starting from ODF1.2 - xProps->setPropertyValue( OUString("Version" ), uno::makeAny( ODFVER_012_TEXT ) ); + xProps->setPropertyValue("Version", uno::makeAny( ODFVER_012_TEXT ) ); } catch( uno::Exception& ) { @@ -444,7 +444,7 @@ sal_Bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage try { uno::Reference < beans::XPropertySet > xPropSet( xStorage, uno::UNO_QUERY_THROW ); - Any a = xPropSet->getPropertyValue( OUString("MediaType" ) ); + Any a = xPropSet->getPropertyValue("MediaType"); OUString aMediaType; if ( !(a>>=aMediaType) || aMediaType.isEmpty() ) { @@ -680,7 +680,7 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) // treat the package as broken if the mediatype was retrieved as a fallback uno::Reference< beans::XPropertySet > xStorProps( xStorage, uno::UNO_QUERY_THROW ); - xStorProps->getPropertyValue( OUString( "MediaTypeFallbackUsed" ) ) + xStorProps->getPropertyValue("MediaTypeFallbackUsed") >>= bWarnMediaTypeFallback; if ( pRepairPackageItem && pRepairPackageItem->GetValue() ) @@ -876,7 +876,7 @@ sal_uInt32 SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell* pDo if( xServiceManager.is() ) { xFilterCFG = com::sun::star::uno::Reference< XNameAccess >( - xServiceManager->createInstance( OUString("com.sun.star.document.FilterFactory") ), + xServiceManager->createInstance("com.sun.star.document.FilterFactory"), UNO_QUERY ); } @@ -1161,7 +1161,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl try { uno::Reference < beans::XPropertySet > xPropSet( GetStorage(), uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "Version" ) ) >>= aODFVersion; + xPropSet->getPropertyValue("Version") >>= aODFVersion; } catch( uno::Exception& ) {} @@ -1349,7 +1349,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl if ( !xProps.is() ) throw uno::RuntimeException(); - xProps->setPropertyValue( OUString("MediaType"), + xProps->setPropertyValue("MediaType", uno::makeAny( aDataFlavor.MimeType ) ); } catch( uno::Exception& ) @@ -1578,7 +1578,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl try { uno::Reference < beans::XPropertySet > xPropSet( rMedium.GetStorage(), uno::UNO_QUERY_THROW ); - xPropSet->getPropertyValue( OUString( "Version" ) ) >>= aVersion; + xPropSet->getPropertyValue("Version") >>= aVersion; } catch( uno::Exception& ) { @@ -1895,7 +1895,7 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit ) uno::Reference < beans::XPropertySet > xPropSet( xNewStor, uno::UNO_QUERY ); if ( xPropSet.is() ) { - Any a = xPropSet->getPropertyValue( OUString("MediaType" ) ); + Any a = xPropSet->getPropertyValue("MediaType"); OUString aMediaType; if ( !(a>>=aMediaType) || aMediaType.isEmpty() ) { @@ -3558,7 +3558,7 @@ sal_Bool SfxObjectShell::WriteThumbnail( sal_Bool bEncrypted, uno::Reference < beans::XPropertySet > xSet( xStream, uno::UNO_QUERY ); if ( xSet.is() ) - xSet->setPropertyValue( OUString("MediaType"), + xSet->setPropertyValue("MediaType", uno::makeAny( OUString("image/png") ) ); if ( bEncrypted ) { diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 64e5b4314721..2c2d58aa50d4 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -137,7 +137,7 @@ OString lclGetVBAGlobalConstName( const Reference< XInterface >& rxComponent ) if( xProps.is() ) try { OUString aConstName; - xProps->getPropertyValue( OUString( "ThisVBADocObj" ) ) >>= aConstName; + xProps->getPropertyValue("ThisVBADocObj") >>= aConstName; return OUStringToOString( aConstName, RTL_TEXTENCODING_ASCII_US ); } catch (const uno::Exception&) // not supported diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx index 07857565212c..9a59132ccdf9 100644 --- a/sfx2/source/doc/plugin.cxx +++ b/sfx2/source/doc/plugin.cxx @@ -136,9 +136,9 @@ throw( uno::RuntimeException ) uno::Reference< beans::XPropertySet > xProp( xModel, ::uno::UNO_QUERY ); if( xProp.is() ) { - uno::Any aValue = xProp->getPropertyValue( OUString( "URL" ) ); + uno::Any aValue = xProp->getPropertyValue("URL"); aValue >>= maURL; - aValue = xProp->getPropertyValue( OUString( "TYPE" ) ); + aValue = xProp->getPropertyValue("TYPE"); aValue >>= maMimeType; } } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index b8d5790d8e17..210dd73c03aa 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2462,7 +2462,7 @@ void SAL_CALL SfxBaseModel::removeDocumentEventListener( const Reference< docume void SAL_CALL SfxBaseModel::notifyDocumentEvent( const OUString&, const Reference< frame::XController2 >&, const Any& ) throw ( lang::IllegalArgumentException, lang::NoSupportException, RuntimeException ) { - throw lang::NoSupportException( OUString( "SfxBaseModel controlls all the sent notifications itself!" ), Reference< XInterface >() ); + throw lang::NoSupportException("SfxBaseModel controlls all the sent notifications itself!", Reference< XInterface >() ); } Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getCmisPropertiesValues() @@ -2980,10 +2980,10 @@ void SfxBaseModel::impl_store( const OUString& sURL m_pData->m_pObjectShell->AddLog( OUString( OSL_LOG_PREFIX "Can't store shared document!" ) ); m_pData->m_pObjectShell->StoreLog(); - uno::Sequence< beans::NamedValue > aNewEncryptionData = aArgHash.getUnpackedValueOrDefault( OUString( "EncryptionData" ), uno::Sequence< beans::NamedValue >() ); + uno::Sequence< beans::NamedValue > aNewEncryptionData = aArgHash.getUnpackedValueOrDefault("EncryptionData", uno::Sequence< beans::NamedValue >() ); if ( !aNewEncryptionData.getLength() ) { - OUString aNewPassword = aArgHash.getUnpackedValueOrDefault( OUString( "Password" ), OUString() ); + OUString aNewPassword = aArgHash.getUnpackedValueOrDefault("Password", OUString() ); aNewEncryptionData = ::comphelper::OStorageHelper::CreatePackageEncryptionData( aNewPassword ); } @@ -2995,7 +2995,7 @@ void SfxBaseModel::impl_store( const OUString& sURL else { // if the password is changed a special error should be used in case of shared document - throw task::ErrorCodeIOException( OUString( "Cant change password for shared document." ), uno::Reference< uno::XInterface >(), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ); + throw task::ErrorCodeIOException("Cant change password for shared document.", uno::Reference< uno::XInterface >(), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ); } } #endif diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index e5b188b3c592..a6140b7363ac 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -702,7 +702,7 @@ throw (::com::sun::star::uno::RuntimeException) { try { - xPropSet->getPropertyValue( OUString( "ResourceURL" )) >>= aSubToolBarResName; + xPropSet->getPropertyValue("ResourceURL") >>= aSubToolBarResName; } catch ( com::sun::star::beans::UnknownPropertyException& ) { @@ -752,7 +752,7 @@ throw (::com::sun::star::uno::RuntimeException) xLayoutManager->setElementPos( aSubToolBarResName, aEvent.FloatingPosition ); xLayoutManager->showElement( aSubToolBarResName ); - xProp->setPropertyValue( OUString( "Persistent" ), a ); + xProp->setPropertyValue("Persistent", a ); } } catch ( ::com::sun::star::uno::RuntimeException& ) diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index bacba1ce0d3f..c9c4d350c667 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -326,7 +326,7 @@ void SfxFrame::SetPresentationMode( sal_Bool bSet ) if ( xPropSet.is() ) { - Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; } @@ -378,7 +378,7 @@ void SfxFrame::SetMenuBarOn_Impl( sal_Bool bOn ) if ( xPropSet.is() ) { - Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 9816437de6b1..6e22e9470a6d 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -376,7 +376,7 @@ void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::queryClosing( const la pShell->TakeFrameOwnership_Impl(); } - throw util::CloseVetoException(OUString("Controller disagree ..."),static_cast< ::cppu::OWeakObject*>(this)); + throw util::CloseVetoException("Controller disagree ...",static_cast< ::cppu::OWeakObject*>(this)); } } } @@ -1260,8 +1260,8 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect ) { Reference< beans::XPropertySet > xFrameProps( m_pData->m_xFrame, uno::UNO_QUERY_THROW ); Reference< beans::XPropertySet > xLayouterProps( - xFrameProps->getPropertyValue( OUString( "LayoutManager" ) ), uno::UNO_QUERY_THROW ); - xLayouterProps->setPropertyValue( OUString( "PreserveContentSize" ), uno::makeAny( sal_True ) ); + xFrameProps->getPropertyValue("LayoutManager"), uno::UNO_QUERY_THROW ); + xLayouterProps->setPropertyValue("PreserveContentSize", uno::makeAny( sal_True ) ); } catch (const uno::Exception&) { diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 97f9344c1678..8768d788c918 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2868,7 +2868,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) { try { - Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; } catch ( Exception& ) @@ -2922,7 +2922,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) { try { - Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; } catch ( Exception& ) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 0f58a322dfe0..fa00d8b09012 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -456,7 +456,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) { try { - Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" )); + Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; if ( xLayoutManager.is() ) { diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx index d1b4b0deb542..790d6e630564 100644 --- a/shell/source/backends/gconfbe/gconfaccess.cxx +++ b/shell/source/backends/gconfbe/gconfaccess.cxx @@ -70,7 +70,7 @@ GConfClient* getGconfClient() mClient = gconf_client_get_default(); if (!mClient) { - throw uno::RuntimeException(OUString("GconfBackend:GconfLayer: Cannot Initialize Gconf connection"),NULL); + throw uno::RuntimeException("GconfBackend:GconfLayer: Cannot Initialize Gconf connection",NULL); } static const char * const PreloadValuesList[] = diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx index 298da1d05fac..20ca8f7acd94 100644 --- a/shell/source/cmdmail/cmdmailmsg.cxx +++ b/shell/source/cmdmail/cmdmailmsg.cxx @@ -153,7 +153,7 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName ) else if( 0 == aName.compareToAscii( "attachment" ) && m_Attachments.getLength() ) return makeAny( m_Attachments ); - throw NoSuchElementException( OUString("key not found: ") + aName, + throw NoSuchElementException("key not found: " + aName, static_cast < XNameAccess * > (this) ); } diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 7687faed8b41..05b16f2dc42f 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -161,7 +161,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM // Retrieve the value for "Program" node and append it feed senddoc with it // using the (undocumented) --mailclient switch - xNameAccess->getByName( OUString("Program") ) >>= aMailer; + xNameAccess->getByName("Program") >>= aMailer; if( !aMailer.isEmpty() ) { diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx index 49c134467920..9ea07be1a223 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx @@ -53,7 +53,7 @@ namespace NULL, error.getRef()); if(!proxy) - throw RuntimeException(OUString("couldnt get a proxy!"),NULL); + throw RuntimeException("couldnt get a proxy!",NULL); return proxy; } } diff --git a/shell/source/win32/workbench/TestSmplMail.cxx b/shell/source/win32/workbench/TestSmplMail.cxx index f4d6bba45c0a..f0fbb18e6a9c 100644 --- a/shell/source/win32/workbench/TestSmplMail.cxx +++ b/shell/source/win32/workbench/TestSmplMail.cxx @@ -88,7 +88,7 @@ int SAL_CALL main(int , char*, char* ) try { Reference< XSimpleMailClientSupplier > xSmplMailClientSuppl( - g_xFactory->createInstance( OUString("com.sun.star.system.SimpleSystemMail") ), UNO_QUERY ); + g_xFactory->createInstance("com.sun.star.system.SimpleSystemMail"), UNO_QUERY ); if ( !xSmplMailClientSuppl.is() ) { diff --git a/shell/source/win32/workbench/TestSysShExec.cxx b/shell/source/win32/workbench/TestSysShExec.cxx index 9a2d84cd0717..6d6ffb302420 100644 --- a/shell/source/win32/workbench/TestSysShExec.cxx +++ b/shell/source/win32/workbench/TestSysShExec.cxx @@ -91,7 +91,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* ) //------------------------------------------------- Reference< XSystemShellExecute > xSysShExec( - g_xFactory->createInstance( OUString("com.sun.star.system.SystemShellExecute") ), UNO_QUERY ); + g_xFactory->createInstance("com.sun.star.system.SystemShellExecute"), UNO_QUERY ); if ( !xSysShExec.is() ) { diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx index b1c8395220ec..61568b498aab 100644 --- a/slideshow/source/engine/shapes/backgroundshape.cxx +++ b/slideshow/source/engine/shapes/backgroundshape.cxx @@ -153,8 +153,8 @@ namespace slideshow sal_Int32 nDocWidth=0; sal_Int32 nDocHeight=0; - xPropSet->getPropertyValue( OUString("Width") ) >>= nDocWidth; - xPropSet->getPropertyValue( OUString("Height") ) >>= nDocHeight; + xPropSet->getPropertyValue("Width") >>= nDocWidth; + xPropSet->getPropertyValue("Height") >>= nDocHeight; mpMtf = pMtf; maBounds = ::basegfx::B2DRectangle( 0,0,nDocWidth, nDocHeight ); diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index b1317a51545c..6c958a0c406e 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -445,7 +445,7 @@ bool ShapeImporter::isSkip( OUString layerName; uno::Reference<beans::XPropertySet> xPropLayerSet( xLayer, uno::UNO_QUERY ); - const uno::Any& a(xPropLayerSet->getPropertyValue(OUString("Name")) ); + const uno::Any& a(xPropLayerSet->getPropertyValue("Name") ); bool const bRet = (a >>= layerName); if(bRet) { diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 43b041126760..e061641f1844 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -1231,8 +1231,8 @@ basegfx::B2ISize SlideImpl::getSlideSizeImpl() const sal_Int32 nDocWidth = 0; sal_Int32 nDocHeight = 0; - xPropSet->getPropertyValue( OUString("Width") ) >>= nDocWidth; - xPropSet->getPropertyValue( OUString("Height") ) >>= nDocHeight; + xPropSet->getPropertyValue("Width") >>= nDocWidth; + xPropSet->getPropertyValue("Height") >>= nDocHeight; return basegfx::B2ISize( nDocWidth, nDocHeight ); } diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 5ce6a9ba913f..a37cdbc3f0fb 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1450,13 +1450,13 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult uno::Any aPropLayer; aPropLayer <<= layerName; - xLayerPropSet->setPropertyValue(OUString("Name"), aPropLayer); + xLayerPropSet->setPropertyValue("Name", aPropLayer); aPropLayer <<= true; - xLayerPropSet->setPropertyValue(OUString("IsVisible"), aPropLayer); + xLayerPropSet->setPropertyValue("IsVisible", aPropLayer); aPropLayer <<= false; - xLayerPropSet->setPropertyValue(OUString("IsLocked"), aPropLayer); + xLayerPropSet->setPropertyValue("IsLocked", aPropLayer); PolygonMap::iterator aIter=maPolygons.begin(); @@ -1518,27 +1518,27 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult //Give the built PointSequenceSequence. uno::Any aParam; aParam <<= aRetval; - aXPropSet->setPropertyValue( OUString("PolyPolygon"), aParam ); + aXPropSet->setPropertyValue("PolyPolygon", aParam ); //LineStyle : SOLID by default uno::Any aAny; drawing::LineStyle eLS; eLS = drawing::LineStyle_SOLID; aAny <<= eLS; - aXPropSet->setPropertyValue( OUString("LineStyle"), aAny ); + aXPropSet->setPropertyValue("LineStyle", aAny ); //LineColor sal_uInt32 nLineColor; nLineColor = pPolyPoly->getRGBALineColor(); //Transform polygon color from RRGGBBAA to AARRGGBB aAny <<= RGBAColor2UnoColor(nLineColor); - aXPropSet->setPropertyValue( OUString("LineColor"), aAny ); + aXPropSet->setPropertyValue("LineColor", aAny ); //LineWidth double fLineWidth; fLineWidth = pPolyPoly->getStrokeWidth(); aAny <<= (sal_Int32)fLineWidth; - aXPropSet->setPropertyValue( OUString("LineWidth"), aAny ); + aXPropSet->setPropertyValue("LineWidth", aAny ); // make polygons special xLayerManager->attachShapeToLayer(rPolyShape, xDrawnInSlideshow); diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 02e65bd8ff93..7a8c90a86416 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -1106,7 +1106,7 @@ sal_Int32 SotStorage::GetFormatID( const com::sun::star::uno::Reference < com::s return 0; OUString aMediaType; - xProps->getPropertyValue( OUString("MediaType") ) >>= aMediaType; + xProps->getPropertyValue("MediaType") >>= aMediaType; if ( !aMediaType.isEmpty() ) { ::com::sun::star::datatransfer::DataFlavor aDataFlavor; diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index ed0a7f5026d5..f64fcc60c4b7 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -674,7 +674,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM ::com::sun::star::uno::Sequence < sal_Int8 > aSequ( (sal_Int8*) pBuffer, RTL_DIGEST_LENGTH_SHA1 ); ::com::sun::star::uno::Any aAny; aAny <<= aSequ; - m_pContent->setPropertyValue( OUString("EncryptionKey"), aAny ); + m_pContent->setPropertyValue("EncryptionKey", aAny ); } } } @@ -1719,7 +1719,7 @@ void UCBStorage_Impl::Init() { // get the manifest information from the package try { - Any aAny = m_pContent->getPropertyValue( OUString("MediaType") ); + Any aAny = m_pContent->getPropertyValue("MediaType"); OUString aTmp; if ( ( aAny >>= aTmp ) && !aTmp.isEmpty() ) m_aContentType = m_aOriginalContentType = aTmp; @@ -1855,7 +1855,7 @@ void UCBStorage_Impl::ReadContent() ::ucbhelper::Content aContent( aName, xComEnv, comphelper::getProcessComponentContext() ); OUString aMediaType; - Any aAny = aContent.getPropertyValue( OUString("MediaType") ); + Any aAny = aContent.getPropertyValue("MediaType"); if ( ( aAny >>= aMediaType ) && ( aMediaType.compareToAscii("application/vnd.sun.star.oleobject") == 0 ) ) pElement->m_bIsStorage = sal_True; else if ( aMediaType.isEmpty() ) @@ -2191,7 +2191,7 @@ sal_Int16 UCBStorage_Impl::Commit() pElement->m_xStream->m_aContentType = OUString("application/vnd.sun.star.oleobject"); Any aValue; aValue <<= (sal_Bool) sal_True; - pElement->m_xStream->m_pContent->setPropertyValue(OUString("Encrypted"), aValue ); + pElement->m_xStream->m_pContent->setPropertyValue("Encrypted", aValue ); } pContent = pElement->GetContent(); @@ -2203,7 +2203,7 @@ sal_Int16 UCBStorage_Impl::Commit() nLocalRet = COMMIT_RESULT_SUCCESS; Any aAny; aAny <<= (OUString) pElement->m_aName; - pContent->setPropertyValue( OUString("Title"), aAny ); + pContent->setPropertyValue("Title", aAny ); } if ( pElement->IsLoaded() && pElement->GetContentType() != pElement->GetOriginalContentType() ) @@ -2212,7 +2212,7 @@ sal_Int16 UCBStorage_Impl::Commit() nLocalRet = COMMIT_RESULT_SUCCESS; Any aAny; aAny <<= (OUString) pElement->GetContentType(); - pContent->setPropertyValue( OUString("MediaType"), aAny ); + pContent->setPropertyValue("MediaType", aAny ); } if ( nLocalRet != COMMIT_RESULT_NOTHING_TO_DO ) @@ -2263,7 +2263,7 @@ sal_Int16 UCBStorage_Impl::Commit() // clipboard format and ClassId will be retrieved from the media type when the file is loaded again Any aType; aType <<= (OUString) m_aContentType; - m_pContent->setPropertyValue( OUString("MediaType"), aType ); + m_pContent->setPropertyValue("MediaType", aType ); if ( m_bIsLinked ) { diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx index ea0b9d7722aa..27411fb1512d 100644 --- a/sot/source/unoolestorage/xolesimplestorage.cxx +++ b/sot/source/unoolestorage/xolesimplestorage.cxx @@ -360,7 +360,7 @@ void SAL_CALL OLESimpleStorage::insertByName( const OUString& aName, const uno:: } catch( const uno::Exception& e ) { - throw lang::WrappedTargetException( OUString( "Insert has failed!" ), + throw lang::WrappedTargetException("Insert has failed!", uno::Reference< uno::XInterface >(), uno::makeAny( e ) ); } @@ -417,7 +417,7 @@ void SAL_CALL OLESimpleStorage::replaceByName( const OUString& aName, const uno: { uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetException( OUString("Can't copy raw stream"), + throw lang::WrappedTargetException("Can't copy raw stream", uno::Reference< uno::XInterface >(), aCaught ); } diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 4c36dc546037..b3a708f2ec44 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -1661,7 +1661,7 @@ ImplIntrospection::ImplIntrospection( const Reference<XMultiServiceFactory> & rX mpTypeProviderCache = NULL; // Spezielle Klassen holen -// Reference< XInterface > xServiceIface = m_xSMgr->createInstance( OUString("com.sun.star.reflection.CoreReflection") ); +// Reference< XInterface > xServiceIface = m_xSMgr->createInstance("com.sun.star.reflection.CoreReflection"); // if( xServiceIface.is() ) // mxCoreReflection = Reference< XIdlReflection >::query( xServiceIface ); Reference< XPropertySet > xProps( rXSMgr, UNO_QUERY ); @@ -1686,14 +1686,14 @@ ImplIntrospection::ImplIntrospection( const Reference<XMultiServiceFactory> & rX Reference< XInterface >() ); } - mxElementAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XElementAccess") ); - mxNameContainerClass = mxCoreReflection->forName( OUString("com.sun.star.container.XNameContainer") ); - mxNameAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XNameAccess") ); - mxIndexContainerClass = mxCoreReflection->forName( OUString("com.sun.star.container.XIndexContainer") ); - mxIndexAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XIndexAccess") ); - mxEnumerationAccessClass = mxCoreReflection->forName( OUString("com.sun.star.container.XEnumerationAccess") ); - mxInterfaceClass = mxCoreReflection->forName( OUString("com.sun.star.uno.XInterface") ); - mxAggregationClass = mxCoreReflection->forName( OUString("com.sun.star.uno.XAggregation") ); + mxElementAccessClass = mxCoreReflection->forName("com.sun.star.container.XElementAccess"); + mxNameContainerClass = mxCoreReflection->forName("com.sun.star.container.XNameContainer"); + mxNameAccessClass = mxCoreReflection->forName("com.sun.star.container.XNameAccess"); + mxIndexContainerClass = mxCoreReflection->forName("com.sun.star.container.XIndexContainer"); + mxIndexAccessClass = mxCoreReflection->forName("com.sun.star.container.XIndexAccess"); + mxEnumerationAccessClass = mxCoreReflection->forName("com.sun.star.container.XEnumerationAccess"); + mxInterfaceClass = mxCoreReflection->forName("com.sun.star.uno.XInterface"); + mxAggregationClass = mxCoreReflection->forName("com.sun.star.uno.XAggregation"); mbDisposed = sal_False; } @@ -1888,7 +1888,7 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS OUString sOWName( pTD->pTypeName ); if( !xRefl.is() ) { - xRefl = Reference< XIdlReflection >( xMgr->createInstance( OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY ); + xRefl = Reference< XIdlReflection >( xMgr->createInstance("com.sun.star.reflection.CoreReflection"), UNO_QUERY ); OSL_ENSURE( xRefl.is(), "### no corereflection!" ); } xRetClass = xRefl->forName( sOWName ); diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 9c2a2ab3387d..8640f53fbcdc 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -1144,7 +1144,7 @@ Sequence< OUString > InvocationService::getSupportedServiceNames(void) throw( Ru //-------------------------------------------------------------------------------------------------- Reference<XInterface> InvocationService::createInstance(void) throw( Exception, RuntimeException ) { - //TODO:throw( Exception(OUString("no default construction of invocation adapter possible!"), *this) ); + //TODO:throw( Exception("no default construction of invocation adapter possible!", *this) ); return Reference<XInterface>(); // dummy } @@ -1160,7 +1160,7 @@ Reference<XInterface> InvocationService::createInstanceWithArguments( } else { - //TODO:throw( Exception(OUString("no default construction of invocation adapter possible!"), *this) ); + //TODO:throw( Exception("no default construction of invocation adapter possible!", *this) ); return Reference<XInterface>(); } } diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index daccbe6ea757..5e7dd1b045e5 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -256,7 +256,7 @@ bool askForRetry(css::uno::Any const & rException) if (xContext.is()) { css::uno::Reference< css::task::XInteractionHandler > xHandler; - xContext->getValueByName(OUString("java-vm.interaction-handler")) + xContext->getValueByName("java-vm.interaction-handler") >>= xHandler; if (xHandler.is()) { @@ -278,26 +278,26 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext( OUString("com.sun.star.configuration.ConfigurationRegistry"), xCtx ); - if(!xConfRegistry.is()) throw css::uno::RuntimeException(OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); + if(!xConfRegistry.is()) throw css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", 0); css::uno::Reference<css::registry::XSimpleRegistry> xConfRegistry_simple(xConfRegistry, css::uno::UNO_QUERY); - if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException(OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); + if(!xConfRegistry_simple.is()) throw css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", 0); xConfRegistry_simple->open(OUString("org.openoffice.Inet"), sal_True, sal_False); css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey(); // if ooInetProxyType is not 0 then read the settings - css::uno::Reference<css::registry::XRegistryKey> proxyEnable= xRegistryRootKey->openKey(OUString("Settings/ooInetProxyType")); + css::uno::Reference<css::registry::XRegistryKey> proxyEnable= xRegistryRootKey->openKey("Settings/ooInetProxyType"); if( proxyEnable.is() && 0 != proxyEnable->getLongValue()) { // read ftp proxy name - css::uno::Reference<css::registry::XRegistryKey> ftpProxy_name = xRegistryRootKey->openKey(OUString("Settings/ooInetFTPProxyName")); + css::uno::Reference<css::registry::XRegistryKey> ftpProxy_name = xRegistryRootKey->openKey("Settings/ooInetFTPProxyName"); if(ftpProxy_name.is() && !ftpProxy_name->getStringValue().isEmpty()) { OUString ftpHost = OUString("ftp.proxyHost="); ftpHost += ftpProxy_name->getStringValue(); // read ftp proxy port - css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey(OUString("Settings/ooInetFTPProxyPort")); + css::uno::Reference<css::registry::XRegistryKey> ftpProxy_port = xRegistryRootKey->openKey("Settings/ooInetFTPProxyPort"); if(ftpProxy_port.is() && ftpProxy_port->getLongValue()) { OUString ftpPort = OUString("ftp.proxyPort="); ftpPort += OUString::valueOf(ftpProxy_port->getLongValue()); @@ -308,13 +308,13 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, } // read http proxy name - css::uno::Reference<css::registry::XRegistryKey> httpProxy_name = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPProxyName")); + css::uno::Reference<css::registry::XRegistryKey> httpProxy_name = xRegistryRootKey->openKey("Settings/ooInetHTTPProxyName"); if(httpProxy_name.is() && !httpProxy_name->getStringValue().isEmpty()) { OUString httpHost = OUString("http.proxyHost="); httpHost += httpProxy_name->getStringValue(); // read http proxy port - css::uno::Reference<css::registry::XRegistryKey> httpProxy_port = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPProxyPort")); + css::uno::Reference<css::registry::XRegistryKey> httpProxy_port = xRegistryRootKey->openKey("Settings/ooInetHTTPProxyPort"); if(httpProxy_port.is() && httpProxy_port->getLongValue()) { OUString httpPort = OUString("http.proxyPort="); httpPort += OUString::valueOf(httpProxy_port->getLongValue()); @@ -325,13 +325,13 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, } // read https proxy name - css::uno::Reference<css::registry::XRegistryKey> httpsProxy_name = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPSProxyName")); + css::uno::Reference<css::registry::XRegistryKey> httpsProxy_name = xRegistryRootKey->openKey("Settings/ooInetHTTPSProxyName"); if(httpsProxy_name.is() && !httpsProxy_name->getStringValue().isEmpty()) { OUString httpsHost = OUString("https.proxyHost="); httpsHost += httpsProxy_name->getStringValue(); // read https proxy port - css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey(OUString("Settings/ooInetHTTPSProxyPort")); + css::uno::Reference<css::registry::XRegistryKey> httpsProxy_port = xRegistryRootKey->openKey("Settings/ooInetHTTPSProxyPort"); if(httpsProxy_port.is() && httpsProxy_port->getLongValue()) { OUString httpsPort = OUString("https.proxyPort="); httpsPort += OUString::valueOf(httpsProxy_port->getLongValue()); @@ -342,7 +342,7 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, } // read nonProxyHosts - css::uno::Reference<css::registry::XRegistryKey> nonProxies_name = xRegistryRootKey->openKey(OUString("Settings/ooInetNoProxy")); + css::uno::Reference<css::registry::XRegistryKey> nonProxies_name = xRegistryRootKey->openKey("Settings/ooInetNoProxy"); if(nonProxies_name.is() && !nonProxies_name->getStringValue().isEmpty()) { OUString httpNonProxyHosts = OUString("http.nonProxyHosts="); OUString ftpNonProxyHosts= OUString("ftp.nonProxyHosts="); @@ -382,7 +382,7 @@ void getDefaultLocaleFromConfig( css::uno::Reference<css::registry::XRegistryKey> xRegistryRootKey = xConfRegistry_simple->getRootKey(); // read locale - css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey(OUString("L10N/ooLocale")); + css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey("L10N/ooLocale"); if(locale.is() && !locale->getStringValue().isEmpty()) { OUString language; OUString country; @@ -441,7 +441,7 @@ void getJavaPropsFromSafetySettings( if (xRegistryRootKey.is()) { - css::uno::Reference<css::registry::XRegistryKey> key_NetAccess= xRegistryRootKey->openKey(OUString("VirtualMachine/NetAccess")); + css::uno::Reference<css::registry::XRegistryKey> key_NetAccess= xRegistryRootKey->openKey("VirtualMachine/NetAccess"); if (key_NetAccess.is()) { sal_Int32 val= key_NetAccess->getLongValue(); @@ -1176,12 +1176,12 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( // call java.lang.System.setProperty // String setProperty( String key, String value) jclass jcSystem= pJNIEnv->FindClass("java/lang/System"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java/lang/System"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java/lang/System", 0); jmethodID jmSetProps= pJNIEnv->GetStaticMethodID( jcSystem, "setProperty","(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.setProperty", 0); jstring jsPropName= pJNIEnv->NewString( aPropertyName.getStr(), aPropertyName.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); // remove the property if it does not have a value ( user left the dialog field empty) // or if the port is set to 0 @@ -1192,14 +1192,14 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( { // call java.lang.System.getProperties jmethodID jmGetProps= pJNIEnv->GetStaticMethodID( jcSystem, "getProperties","()Ljava/util/Properties;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.getProperties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.getProperties", 0); jobject joProperties= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetProps); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.getProperties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.getProperties", 0); // call java.util.Properties.remove jclass jcProperties= pJNIEnv->FindClass("java/util/Properties"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java/util/Properties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java/util/Properties", 0); jmethodID jmRemove= pJNIEnv->GetMethodID( jcProperties, "remove", "(Ljava/lang/Object;)Ljava/lang/Object;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID java.util.Properties.remove"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.util.Properties.remove", 0); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName); // special calse for ftp.nonProxyHosts and http.nonProxyHosts. The office only @@ -1207,7 +1207,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( if (!aPropertyName2.isEmpty()) { jstring jsPropName2= pJNIEnv->NewString( aPropertyName2.getStr(), aPropertyName2.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsPropName2); } } @@ -1215,20 +1215,20 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( { // Change the Value of the property jstring jsPropValue= pJNIEnv->NewString( aPropertyValue.getStr(), aPropertyValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName, jsPropValue); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0); // special calse for ftp.nonProxyHosts and http.nonProxyHosts. The office only // has a value for two java properties if (!aPropertyName2.isEmpty()) { jstring jsPropName2= pJNIEnv->NewString( aPropertyName2.getStr(), aPropertyName2.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); jsPropValue= pJNIEnv->NewString( aPropertyValue.getStr(), aPropertyValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsPropName2, jsPropValue); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0); } } @@ -1238,7 +1238,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( if (bSecurityChanged) { jmethodID jmGetSecur= pJNIEnv->GetStaticMethodID( jcSystem,"getSecurityManager","()Ljava/lang/SecurityManager;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.getSecurityManager"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.getSecurityManager", 0); jobject joSecur= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetSecur); if (joSecur != 0) { @@ -1252,9 +1252,9 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( // The SecurityManagers class Name must be com.sun.star.lib.sandbox.SandboxSecurity jclass jcSec= pJNIEnv->GetObjectClass( joSecur); jclass jcClass= pJNIEnv->FindClass("java/lang/Class"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java.lang.Class"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java.lang.Class", 0); jmethodID jmName= pJNIEnv->GetMethodID( jcClass,"getName","()Ljava/lang/String;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID java.lang.Class.getName"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.lang.Class.getName", 0); jstring jsClass= (jstring) pJNIEnv->CallObjectMethod( jcSec, jmName); const jchar* jcharName= pJNIEnv->GetStringChars( jsClass, NULL); OUString sName( jcharName); @@ -1269,9 +1269,9 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( { // call SandboxSecurity.reset jmethodID jmReset= pJNIEnv->GetMethodID( jcSec,"reset","()V"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID com.sun.star.lib.sandbox.SandboxSecurity.reset", 0); pJNIEnv->CallVoidMethod( joSecur, jmReset); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallVoidMethod com.sun.star.lib.sandbox.SandboxSecurity.reset"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallVoidMethod com.sun.star.lib.sandbox.SandboxSecurity.reset", 0); } } } @@ -1426,32 +1426,32 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) // creat Java Properties as JNI strings jstring jsFtpProxyHost= pJNIEnv->NewString( sFtpProxyHost.getStr(), sFtpProxyHost.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); jstring jsFtpProxyPort= pJNIEnv->NewString( sFtpProxyPort.getStr(), sFtpProxyPort.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); jstring jsFtpNonProxyHosts= pJNIEnv->NewString( sFtpNonProxyHosts.getStr(), sFtpNonProxyHosts.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); jstring jsHttpProxyHost= pJNIEnv->NewString( sHttpProxyHost.getStr(), sHttpProxyHost.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); jstring jsHttpProxyPort= pJNIEnv->NewString( sHttpProxyPort.getStr(), sHttpProxyPort.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); jstring jsHttpNonProxyHosts= pJNIEnv->NewString( sHttpNonProxyHosts.getStr(), sHttpNonProxyHosts.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); // prepare java.lang.System.setProperty jclass jcSystem= pJNIEnv->FindClass("java/lang/System"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java/lang/System"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java/lang/System", 0); jmethodID jmSetProps= pJNIEnv->GetStaticMethodID( jcSystem, "setProperty","(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.setProperty", 0); // call java.lang.System.getProperties jmethodID jmGetProps= pJNIEnv->GetStaticMethodID( jcSystem, "getProperties","()Ljava/util/Properties;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetStaticMethodID java.lang.System.getProperties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetStaticMethodID java.lang.System.getProperties", 0); jobject joProperties= pJNIEnv->CallStaticObjectMethod( jcSystem, jmGetProps); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.getProperties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.getProperties", 0); // prepare java.util.Properties.remove jclass jcProperties= pJNIEnv->FindClass("java/util/Properties"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:FindClass java/util/Properties"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java/util/Properties", 0); if (set_reset) { @@ -1471,44 +1471,44 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) if( propName.equals( sFtpProxyHost)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyHost, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0); } else if( propName.equals( sFtpProxyPort)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpProxyPort, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0); } else if( propName.equals( sFtpNonProxyHosts)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsFtpNonProxyHosts, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0); } else if( propName.equals( sHttpProxyHost)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyHost, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0); } else if( propName.equals( sHttpProxyPort)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpProxyPort, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0); } else if( propName.equals( sHttpNonProxyHosts)) { jstring jsVal= pJNIEnv->NewString( propValue.getStr(), propValue.getLength()); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:NewString"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:NewString", 0); pJNIEnv->CallStaticObjectMethod( jcSystem, jmSetProps, jsHttpNonProxyHosts, jsVal); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:CallStaticObjectMethod java.lang.System.setProperty"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:CallStaticObjectMethod java.lang.System.setProperty", 0); } } } @@ -1516,7 +1516,7 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) { // call java.util.Properties.remove jmethodID jmRemove= pJNIEnv->GetMethodID( jcProperties, "remove", "(Ljava/lang/Object;)Ljava/lang/Object;"); - if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException(OUString("JNI:GetMethodID java.util.Property.remove"), 0); + if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.util.Property.remove", 0); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyHost); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpProxyPort); pJNIEnv->CallObjectMethod( joProperties, jmRemove, jsFtpNonProxyHosts); diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx index 21fc5a37baa9..600e3ae900e7 100644 --- a/stoc/test/testconv.cxx +++ b/stoc/test/testconv.cxx @@ -668,7 +668,7 @@ SAL_IMPLEMENT_MAIN() try { Reference< XImplementationRegistration > xImplReg( - xMgr->createInstance( OUString("com.sun.star.registry.ImplementationRegistration") ), UNO_QUERY ); + xMgr->createInstance("com.sun.star.registry.ImplementationRegistration"), UNO_QUERY ); OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); OUString aLibName( diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx index f8a89ab85d9e..e0e04358b821 100644 --- a/stoc/test/testcorefl.cxx +++ b/stoc/test/testcorefl.cxx @@ -86,9 +86,9 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Reference< XHierarchicalNameAccess > xHNameAccess( xRefl, UNO_QUERY ); OSL_ENSURE(xHNameAccess.is(), "### cannot get XHierarchicalNameAccess!" ); - OSL_ENSURE(xRefl->forName(OUString("ModuleA.StructA"))->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 2b"); - OSL_ENSURE(xRefl->forName(OUString("ModuleA.ExceptionB"))->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 2c"); - OSL_ENSURE(xRefl->forName(OUString("ModuleA.ModuleB.EnumA")).is(), "test_RegCoreReflection(): error 2e"); + OSL_ENSURE(xRefl->forName("ModuleA.StructA")->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 2b"); + OSL_ENSURE(xRefl->forName("ModuleA.ExceptionB")->getTypeClass() == TypeClass_EXCEPTION, "test_RegCoreReflection(): error 2c"); + OSL_ENSURE(xRefl->forName("ModuleA.ModuleB.EnumA").is(), "test_RegCoreReflection(): error 2e"); OSL_ENSURE(*(const sal_Bool *)xHNameAccess->getByHierarchicalName(OUString("ModuleC.aConstBoolean")).getValue() == aConstBoolean, "test_RegCoreReflection(): error 4c"); @@ -100,7 +100,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) // Enums - xClass = xRefl->forName(OUString("ModuleA.ModuleB.EnumA")); + xClass = xRefl->forName("ModuleA.ModuleB.EnumA"); OSL_ENSURE(xClass.is(), "test_RegCoreReflection(): error 5"); @@ -119,9 +119,9 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) // Interface - Reference< XIdlClass > xA = xRefl->forName( OUString("ModuleC.XInterfaceB") ); + Reference< XIdlClass > xA = xRefl->forName("ModuleC.XInterfaceB"); - xClass = xRefl->forName(OUString("ModuleC.XInterfaceB")); + xClass = xRefl->forName("ModuleC.XInterfaceB"); OSL_ENSURE(xClass == xA, "test_RegCoreReflection(): error 7"); OSL_ENSURE(xClass.is(), "test_RegCoreReflection(): error 7a"); @@ -150,7 +150,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterTypes().getLength() == 1, "test_RegCoreReflection(): error 17"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterTypes().getArray()[0]->getTypeClass() == TypeClass_SHORT, "test_RegCoreReflection(): error 18"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aName == OUString( "aShort" ), "test_RegCoreReflection(): error 18a"); - OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aType == xRefl->forName( OUString( "short" ) ), "test_RegCoreReflection(): error 18b"); + OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aType == xRefl->forName("short"), "test_RegCoreReflection(): error 18b"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getParameterInfos().getArray()[0].aMode == ParamMode_IN, "test_RegCoreReflection(): error 18c"); OSL_ENSURE(xClass->getMethods().getArray()[4]->getExceptionTypes().getLength() == 0, "test_RegCoreReflection(): error 19"); OSL_ENSURE(xClass->getMethods().getArray()[5]->getName() == OUString("methodC"), "test_RegCoreReflection(): error 20"); @@ -187,10 +187,10 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) // SequenceReflections - OSL_ENSURE(xRefl->forName( OUString("[]ModuleA.StructA") )->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 48"); - OSL_ENSURE(xRefl->forName( OUString("[]ModuleA.StructA") )->getComponentType().is(), "test_RegCoreReflection(): error 49"); - OSL_ENSURE(xRefl->forName( OUString("[][]ModuleA.StructA") )->getComponentType()->getComponentType()->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 50"); - OSL_ENSURE(xRefl->forName( OUString("[]com.sun.star.uno.XInterface") ) == xRefl->forName(OUString( "ModuleA.StructC" ))->getField(OUString("aInterfaceSeq"))->getType(), "test_RegCoreReflection(): error 51"); + OSL_ENSURE(xRefl->forName("[]ModuleA.StructA")->getTypeClass() == TypeClass_SEQUENCE, "test_RegCoreReflection(): error 48"); + OSL_ENSURE(xRefl->forName("[]ModuleA.StructA")->getComponentType().is(), "test_RegCoreReflection(): error 49"); + OSL_ENSURE(xRefl->forName("[][]ModuleA.StructA")->getComponentType()->getComponentType()->getName() == OUString("ModuleA.StructA"), "test_RegCoreReflection(): error 50"); + OSL_ENSURE(xRefl->forName("[]com.sun.star.uno.XInterface") == xRefl->forName("ModuleA.StructC")->getField(OUString("aInterfaceSeq"))->getType(), "test_RegCoreReflection(): error 51"); StructC aStructC; aStructC.aLong = aConstLong; @@ -201,7 +201,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any aAny; - xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aInterfaceSeq"))->getType()->createObject(aAny); + xRefl->forName("ModuleA.StructC")->getField(OUString("aInterfaceSeq"))->getType()->createObject(aAny); OSL_ENSURE(aAny.getValueType() == ::getCppuType( (const Sequence<Reference< XInterface > > *)0 ), "test_RegCoreReflection(): error 51a"); @@ -210,26 +210,26 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) sal_Int32 nLong = aConstLong * 2; aAny.setValue( &nLong, ::getCppuType( (const sal_Int32 *)0 ) ); - OSL_ENSURE(*(sal_Int32*)xRefl->forName(OUString( "ModuleA.StructA" ))->getField(OUString( "aLong" ))->get( + OSL_ENSURE(*(sal_Int32*)xRefl->forName("ModuleA.StructA")->getField(OUString( "aLong" ))->get( Any(&aStructC, ::getCppuType( (const StructC *)0 ))).getValue() == aConstLong, "test_RegCoreReflection(): error 52"); - OSL_ENSURE(xRefl->forName(OUString("ModuleA.StructA"))->getField(OUString( "aLong" ))->getAccessMode() == FieldAccessMode_READWRITE, "test_RegCoreReflection(): error 52a"); - Reference< XIdlField2 > rField ( xRefl->forName(OUString( "ModuleA.StructC" ))->getField(OUString( "aLong" )) , UNO_QUERY ); + OSL_ENSURE(xRefl->forName("ModuleA.StructA")->getField(OUString( "aLong" ))->getAccessMode() == FieldAccessMode_READWRITE, "test_RegCoreReflection(): error 52a"); + Reference< XIdlField2 > rField ( xRefl->forName("ModuleA.StructC")->getField(OUString( "aLong" )) , UNO_QUERY ); rField->set(aStructAny, aAny); - OSL_ENSURE(*(sal_Int32*)xRefl->forName(OUString("ModuleA.StructB"))->getField(OUString( "aLong" ))->get(aStructAny).getValue() == *(sal_Int32*)aAny.getValue(), "test_RegCoreReflection(): error 53"); + OSL_ENSURE(*(sal_Int32*)xRefl->forName("ModuleA.StructB")->getField(OUString( "aLong" ))->get(aStructAny).getValue() == *(sal_Int32*)aAny.getValue(), "test_RegCoreReflection(): error 53"); - xRefl->forName( OUString("[]ModuleA.StructA") )->createObject(aAny); + xRefl->forName("[]ModuleA.StructA")->createObject(aAny); OSL_ENSURE( aAny.getValueTypeName() == "[]ModuleA.StructA", "test_RegCoreReflection(): error 54" ); - xRefl->forName(OUString("[][]ModuleA.StructA"))->createObject(aAny); + xRefl->forName("[][]ModuleA.StructA")->createObject(aAny); OSL_ENSURE( aAny.getValueTypeName() == "[][]ModuleA.StructA", "test_RegCoreReflection(): error 56" ); - OSL_ENSURE(xRefl->forName(OUString("[][][]unsigned long"))->getComponentType()->getComponentType()->getComponentType()->getTypeClass() == TypeClass_UNSIGNED_LONG, "test_RegCoreReflection(): error 62"); + OSL_ENSURE(xRefl->forName("[][][]unsigned long")->getComponentType()->getComponentType()->getComponentType()->getTypeClass() == TypeClass_UNSIGNED_LONG, "test_RegCoreReflection(): error 62"); try { fprintf( stderr, "%1\n" ); - Any bla = xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString"))->get(Any()); + Any bla = xRefl->forName("ModuleA.StructC")->getField(OUString("aString"))->get(Any()); OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 63"); return sal_False; } @@ -243,7 +243,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any blup; blup <<= aStructC; Any gulp; - rField = Reference< XIdlField2 > ( xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString")) , UNO_QUERY); + rField = Reference< XIdlField2 > ( xRefl->forName("ModuleA.StructC")->getField(OUString("aString")) , UNO_QUERY); rField->set( blup, gulp); OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 64"); return sal_False; @@ -260,8 +260,8 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any blup; blup <<= aStructC; rField = Reference< XIdlField2 > ( - xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString")) , UNO_QUERY); - xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString"))->set(blup, gulp); + xRefl->forName("ModuleA.StructC")->getField(OUString("aString")) , UNO_QUERY); + xRefl->forName("ModuleA.StructC")->getField(OUString("aString"))->set(blup, gulp); OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 65"); return sal_False; } @@ -273,7 +273,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) gulp <<= OUString(OUString("Test")); Any blup; blup <<= aStructC; - xRefl->forName(OUString("ModuleA.StructC"))->getField(OUString("aString"))->set(blup, gulp); + xRefl->forName("ModuleA.StructC")->getField(OUString("aString"))->set(blup, gulp); Reference< XInterfaceA > xAI = new OInterfaceA(); @@ -284,7 +284,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any a; a <<= xAI; - Any bla = xRefl->forName(OUString("ModuleC.XInterfaceA"))->getMethod(OUString("methodC"))->invoke(a, params); + Any bla = xRefl->forName("ModuleC.XInterfaceA")->getMethod(OUString("methodC"))->invoke(a, params); OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 66"); return sal_False; } @@ -302,7 +302,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any a; a <<= xAI; - Any bla = xRefl->forName(OUString("ModuleC.XInterfaceA"))->getMethod(OUString("methodC"))->invoke(a, params); + Any bla = xRefl->forName("ModuleC.XInterfaceA")->getMethod(OUString("methodC"))->invoke(a, params); } try { @@ -313,7 +313,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any a; a <<= xAI; - Any bla = xRefl->forName(OUString("ModuleC.XInterfaceA"))->getMethod(OUString("methodC"))->invoke(a, params); + Any bla = xRefl->forName("ModuleC.XInterfaceA")->getMethod(OUString("methodC"))->invoke(a, params); OSL_ENSURE(sal_False, "test_RegCoreReflection(): error 67"); return sal_False; } @@ -328,7 +328,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any a; a <<= xAI; - bool result = (xRefl->forName(OUString("ModuleC.XInterfaceA"))->getMethod(OUString("methodC"))->invoke(a, params).getValueType() + bool result = (xRefl->forName("ModuleC.XInterfaceA")->getMethod(OUString("methodC"))->invoke(a, params).getValueType() == ::getCppuType( (const Sequence<StructB> *)0 )); (void)result; OSL_ENSURE(result, "test_RegCoreReflection(): error 68"); diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx index e48bb44f59d6..779096ac3e7c 100644 --- a/stoc/test/testiadapter.cxx +++ b/stoc/test/testiadapter.cxx @@ -939,7 +939,7 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT ) static sal_Bool test_adapter( const Reference< XMultiServiceFactory > & xMgr ) { Reference< XInvocationAdapterFactory > xAdapFac( - xMgr->createInstance( OUString("com.sun.star.script.InvocationAdapterFactory") ), UNO_QUERY ); + xMgr->createInstance("com.sun.star.script.InvocationAdapterFactory"), UNO_QUERY ); Reference< XInvocationAdapterFactory2 > xAdapFac2( xAdapFac, UNO_QUERY_THROW ); Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() ); @@ -984,9 +984,9 @@ static sal_Bool test_adapter( const Reference< XMultiServiceFactory > & xMgr ) static sal_Bool test_invocation( const Reference< XMultiServiceFactory > & xMgr ) { Reference< XInvocationAdapterFactory > xAdapFac( - xMgr->createInstance( OUString("com.sun.star.script.InvocationAdapterFactory") ), UNO_QUERY ); + xMgr->createInstance("com.sun.star.script.InvocationAdapterFactory"), UNO_QUERY ); Reference< XSingleServiceFactory > xInvocFac( - xMgr->createInstance( OUString("com.sun.star.script.Invocation") ), UNO_QUERY ); + xMgr->createInstance("com.sun.star.script.Invocation"), UNO_QUERY ); Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() ); Any aOriginal( &xOriginal, ::getCppuType( &xOriginal ) ); diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx index bcec385465bb..9f2da08d27ad 100644 --- a/stoc/test/testintrosp.cxx +++ b/stoc/test/testintrosp.cxx @@ -1186,7 +1186,7 @@ SAL_IMPLEMENT_MAIN() try { Reference< XImplementationRegistration > xImplReg( - xMgr->createInstance( OUString("com.sun.star.registry.ImplementationRegistration") ), UNO_QUERY ); + xMgr->createInstance("com.sun.star.registry.ImplementationRegistration"), UNO_QUERY ); OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); // Register services @@ -1195,7 +1195,7 @@ SAL_IMPLEMENT_MAIN() xImplReg->registerImplementation(OUString("com.sun.star.loader.SharedLibrary"), libName, Reference< XSimpleRegistry >() ); fprintf(stderr, "2\n" ); - Reference< XIdlReflection > xRefl( xMgr->createInstance( OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY ); + Reference< XIdlReflection > xRefl( xMgr->createInstance("com.sun.star.reflection.CoreReflection"), UNO_QUERY ); OSL_ENSURE( xRefl.is(), "### no corereflection!" ); // Introspection @@ -1205,7 +1205,7 @@ SAL_IMPLEMENT_MAIN() xImplReg->registerImplementation(OUString("com.sun.star.loader.SharedLibrary"), libName, Reference< XSimpleRegistry >() ); fprintf(stderr, "4\n" ); - Reference< XIntrospection > xIntrosp( xMgr->createInstance( OUString("com.sun.star.beans.Introspection") ), UNO_QUERY ); + Reference< XIntrospection > xIntrosp( xMgr->createInstance("com.sun.star.beans.Introspection"), UNO_QUERY ); OSL_ENSURE( xRefl.is(), "### no corereflection!" ); fprintf(stderr, "before test_introsp\n" ); diff --git a/stoc/test/testloader.cxx b/stoc/test/testloader.cxx index edb4a281a3ff..b4a84d3e9660 100644 --- a/stoc/test/testloader.cxx +++ b/stoc/test/testloader.cxx @@ -103,7 +103,7 @@ SAL_IMPLEMENT_MAIN() OSL_ENSURE( xServInfo.is(), "testloader error4"); OSL_ENSURE( xServInfo->getImplementationName() == "com.sun.star.comp.stoc.DLLComponentLoader", "testloader error5"); - OSL_ENSURE( xServInfo->supportsService(OUString( "com.sun.star.loader.SharedLibrary") ), "testloader error6"); + OSL_ENSURE( xServInfo->supportsService("com.sun.star.loader.SharedLibrary"), "testloader error6"); OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "testloader error7"); xIFace.clear(); diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx index 9d23f95ca8b1..014ae2fcdb55 100644 --- a/stoc/test/testregistry.cxx +++ b/stoc/test/testregistry.cxx @@ -189,7 +189,7 @@ void test_SimpleRegistry( OSL_ENSURE( xServInfo.is(), "test_SimpleRegistry error2"); OSL_ENSURE( xServInfo->getImplementationName() == "com.sun.star.comp.stoc.SimpleRegistry", "test_SimpleRegistry error3"); - OSL_ENSURE( xServInfo->supportsService(OUString( "com.sun.star.registry.SimpleRegistry")), "test_SimpleRegistry error4"); + OSL_ENSURE( xServInfo->supportsService("com.sun.star.registry.SimpleRegistry"), "test_SimpleRegistry error4"); OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "test_SimpleRegistry error5"); xServInfo.clear(); @@ -336,7 +336,7 @@ void test_SimpleRegistry( } xRootKey = xReg->getRootKey(); - xKey = xRootKey->openKey( OUString( "LinkTest" ) ); + xKey = xRootKey->openKey("LinkTest"); OSL_ENSURE( xKey.is() && xKey->isValid() && xKey->getKeyName() == "/ThirdKey/FirstSubKey/WithSubSubKey", "test_SimpleRegistry error 1213" ); xKey->closeKey(); OSL_ENSURE( @@ -344,7 +344,7 @@ void test_SimpleRegistry( registry::RegistryKeyType_LINK, "test_SimpleRegistry error 1214" ); - xKey = xRootKey->openKey(OUString( "FirstKey/SecondSubKey" )); + xKey = xRootKey->openKey("FirstKey/SecondSubKey"); OSL_ENSURE( !xKey.is(), "test_SimpleRegistry error 27" ); // Test Links @@ -352,7 +352,7 @@ void test_SimpleRegistry( xKey->createLink(OUString( "MyFirstLink" ), OUString( "/ThirdKey/FirstSubKey" )); - xKey = xRootKey->openKey(OUString( "/FifthKey/MyFirstLink" )); + xKey = xRootKey->openKey("/FifthKey/MyFirstLink"); OSL_ENSURE( xKey->isValid(), "test_SimpleRegistry error 27" ); OSL_ENSURE( xKey->getKeyName() == OUString( "/ThirdKey/FirstSubKey" ), "test_SimpleRegistry error 28" ); @@ -381,7 +381,7 @@ void test_SimpleRegistry( try { - xRootKey->openKey(OUString( "/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" )); + xRootKey->openKey("/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink"); } catch(InvalidRegistryException&) { @@ -395,7 +395,7 @@ void test_SimpleRegistry( xRootKey->createLink(OUString( "/FourthKey/MySecondLink" ), OUString( "/ThirdKey/FirstSubKey/WithSubSubKey" )); - xKey = xRootKey->openKey(OUString( "SixthKey" )); + xKey = xRootKey->openKey("SixthKey"); seqNames = xKey->getKeyNames(); seqKeys = xKey->openKeys(); @@ -446,7 +446,7 @@ void test_DefaultRegistry( Reference< XPropertySet > xPropSet( rSMgr, UNO_QUERY); OSL_ENSURE( xPropSet.is(), "test_DefaultRegistry error0"); - Any aPropertyAny( xPropSet->getPropertyValue( OUString("Registry") ) ); + Any aPropertyAny( xPropSet->getPropertyValue("Registry") ); OSL_ENSURE( aPropertyAny.hasValue(), "test_DefaultRegistry error1"); Reference<XSimpleRegistry> xReg; @@ -458,7 +458,7 @@ void test_DefaultRegistry( OSL_ENSURE( xServInfo.is(), "test_DefaultRegistry error2"); OSL_ENSURE( xServInfo->getImplementationName() == OUString( "com.sun.star.comp.stoc.NestedRegistry" ), "test_DefualtRegistry error3"); - OSL_ENSURE( xServInfo->supportsService(OUString( "com.sun.star.registry.NestedRegistry" )), "test_DefaultRegistry error4"); + OSL_ENSURE( xServInfo->supportsService("com.sun.star.registry.NestedRegistry"), "test_DefaultRegistry error4"); OSL_ENSURE( xServInfo->getSupportedServiceNames().getLength() == 1, "test_DefaultRegistry error5"); xServInfo.clear(); @@ -468,7 +468,7 @@ void test_DefaultRegistry( { Reference<XRegistryKey> xRootKey(xReg->getRootKey()); - Reference<XRegistryKey> xKey = xRootKey->openKey(OUString( "/UCR/com/sun/star/registry/XSimpleRegistry" )); + Reference<XRegistryKey> xKey = xRootKey->openKey("/UCR/com/sun/star/registry/XSimpleRegistry"); OSL_ENSURE( xKey->getKeyName() == OUString( "/UCR/com/sun/star/registry/XSimpleRegistry" ), "test_DefaultRegistry error 7" ); @@ -485,11 +485,11 @@ void test_DefaultRegistry( xReg->mergeKey(OUString( "Test" ), testreg ); } - xKey = xRootKey->openKey(OUString( "Test/ThirdKey/FirstSubKey/WithSubSubKey" )); + xKey = xRootKey->openKey("Test/ThirdKey/FirstSubKey/WithSubSubKey"); if (xKey.is()) xKey->setLongValue(123456789); - xKey = xRootKey->openKey(OUString( "Test/ThirdKey/FirstSubKey" )); + xKey = xRootKey->openKey("Test/ThirdKey/FirstSubKey"); if (xKey.is()) { xKey->createKey(OUString( "SecondSubSubKey" )); @@ -499,7 +499,7 @@ void test_DefaultRegistry( OSL_ENSURE( seqNames.getLength() == 2, "test_DefaultRegistry error 8" ); } - xKey = xRootKey->openKey(OUString( "/Test/ThirdKey" )); + xKey = xRootKey->openKey("/Test/ThirdKey"); if (xKey.is()) { RegistryValueType valueType = xKey->getValueType(); @@ -535,7 +535,7 @@ void test_DefaultRegistry( xKey->createLink(OUString( "MyFirstLink" ), OUString( "/Test/ThirdKey/FirstSubKey" )); - xKey = xRootKey->openKey(OUString( "/Test/FifthKey/MyFirstLink" )); + xKey = xRootKey->openKey("/Test/FifthKey/MyFirstLink"); OSL_ENSURE( xKey->isValid(), "test_DefaultRegistry error 18" ); OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey" ), "test_DefaultRegistry error 19" ); @@ -565,7 +565,7 @@ void test_DefaultRegistry( try { - xRootKey->openKey(OUString( "/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" )); + xRootKey->openKey("/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink"); } catch(InvalidRegistryException&) { @@ -578,7 +578,7 @@ void test_DefaultRegistry( xRootKey->deleteLink(OUString( "/Test/FifthKey/MyFirstLink/WithSubSubKey/MyFourthLink" )); - xKey = xRootKey->openKey(OUString( "/Test/DefaultLink/SecondSubSubKey" )); + xKey = xRootKey->openKey("/Test/DefaultLink/SecondSubSubKey"); if (xKey.is()) { OSL_ENSURE( xKey->getKeyName() == OUString( "/Test/ThirdKey/FirstSubKey/SecondSubSubKey" ), "test_DefaultRegistry error 23" ); @@ -590,7 +590,7 @@ void test_DefaultRegistry( "test_DefaultRegistry error 24" ); } - xKey = xRootKey->openKey(OUString( "Test" )); + xKey = xRootKey->openKey("Test"); OSL_ENSURE( xKey->isValid(), "test_DefaultRegistry error 25" ); xRootKey->deleteKey(OUString( "Test" )); @@ -608,7 +608,7 @@ void test_DefaultRegistry( testreg2); } - xKey = xRootKey->openKey(OUString( "/AllFromTestreg2/ThirdKey/FirstSubKey" )); + xKey = xRootKey->openKey("/AllFromTestreg2/ThirdKey/FirstSubKey"); if (xKey.is()) { xRootKey->deleteKey(OUString( "/AllFromTestreg2" )); diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx index b8e100f18952..e2d073f6bfc9 100644 --- a/stoc/test/testsmgr_cpnt.cxx +++ b/stoc/test/testsmgr_cpnt.cxx @@ -222,14 +222,14 @@ extern "C" void SAL_CALL test_ServiceManager() OSL_ENSURE( nLen == 8, "more than 6 factories" ); // try to get an instance for a unknown service - OSL_VERIFY( !xSMgr->createInstance(OUString("bla.blup.Q")).is() ); + OSL_VERIFY( !xSMgr->createInstance("bla.blup.Q").is() ); // // First test : register service via the internal function of the component itself // { Reference< XImplementationRegistration > - xInst( xSMgr->createInstance(OUString("com.sun.star.registry.ImplementationRegistration")), UNO_QUERY ); + xInst( xSMgr->createInstance("com.sun.star.registry.ImplementationRegistration"), UNO_QUERY ); OSL_ENSURE( xInst.is(), "no ImplementationRegistration" ); try { @@ -248,7 +248,7 @@ extern "C" void SAL_CALL test_ServiceManager() // tests, if a service provider can be instantiated. - Reference< XInterface > xIFace(xSMgr->createInstance(OUString("com.sun.star.ts.TestManagerImpl"))); + Reference< XInterface > xIFace(xSMgr->createInstance("com.sun.star.ts.TestManagerImpl")); OSL_ENSURE( xIFace.is(), "loadable service not found" ); // remove the service diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index bb8c6c86c5a1..5d5bfefe1616 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -429,7 +429,7 @@ void SAL_CALL FSStorage::copyToStorage( const uno::Reference< embed::XStorage >& catch( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OUString("Can't copy raw stream"), + throw embed::StorageWrappedTargetException("Can't copy raw stream", uno::Reference< io::XInputStream >(), aCaught ); } @@ -537,7 +537,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement( catch( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OUString("Can't copy raw stream"), + throw embed::StorageWrappedTargetException("Can't copy raw stream", uno::Reference< io::XInputStream >(), aCaught ); } @@ -645,7 +645,7 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement( catch( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OUString("Can't copy raw stream"), + throw embed::StorageWrappedTargetException("Can't copy raw stream", uno::Reference< io::XInputStream >(), aCaught ); } @@ -718,7 +718,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::cloneStreamElement( const OUSt catch( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OUString("Can't copy raw stream"), + throw embed::StorageWrappedTargetException("Can't copy raw stream", uno::Reference< io::XInputStream >(), aCaught ); } @@ -916,7 +916,7 @@ void SAL_CALL FSStorage::renameElement( const OUString& aElementName, const OUSt catch( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OUString("Can't copy raw stream"), + throw embed::StorageWrappedTargetException("Can't copy raw stream", uno::Reference< io::XInputStream >(), aCaught ); } @@ -1001,7 +1001,7 @@ void SAL_CALL FSStorage::copyElementTo( const OUString& aElementName, catch( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OUString("Can't copy raw stream"), + throw embed::StorageWrappedTargetException("Can't copy raw stream", uno::Reference< io::XInputStream >(), aCaught ); } @@ -1531,7 +1531,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl catch( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw embed::StorageWrappedTargetException( OUString("Can't copy raw stream"), + throw embed::StorageWrappedTargetException("Can't copy raw stream", uno::Reference< io::XInputStream >(), aCaught ); } diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx index 3f142093417b..67b20b9ebcfa 100644 --- a/svl/source/misc/documentlockfile.cxx +++ b/svl/source/misc/documentlockfile.cxx @@ -120,7 +120,7 @@ bool DocumentLockFile::CreateOwnLockFile() // try to let the file be hidden if possible try { - aTargetContent.setPropertyValue( OUString( "IsHidden" ), uno::makeAny( sal_True ) ); + aTargetContent.setPropertyValue("IsHidden", uno::makeAny( sal_True ) ); } catch( uno::Exception& ) {} } catch( ucb::NameClashException& ) diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx index 49443c868261..62e413a8973a 100644 --- a/svl/source/misc/sharecontrolfile.cxx +++ b/svl/source/misc/sharecontrolfile.cxx @@ -110,7 +110,7 @@ void ShareControlFile::OpenStream() // try to let the file be hidden if possible try { - aContent.setPropertyValue( OUString( "IsHidden" ), uno::makeAny( sal_True ) ); + aContent.setPropertyValue("IsHidden", uno::makeAny( sal_True ) ); } catch( uno::Exception& ) {} // Try to open one more time diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 3e9c3b0b9275..fad97e943f14 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -515,7 +515,7 @@ vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, co // problems with decoding OSL_FAIL( "Problem with decoding\n" ); - throw RuntimeException( OUString("Can't decode!"), Reference< XInterface >() ); + throw RuntimeException("Can't decode!", Reference< XInterface >() ); } @@ -595,7 +595,7 @@ OUString PasswordContainer::EncodePasswords( vector< OUString > lines, const OUS // problems with encoding OSL_FAIL( "Problem with encoding\n" ); - throw RuntimeException( OUString("Can't encode!"), Reference< XInterface >() ); + throw RuntimeException("Can't encode!", Reference< XInterface >() ); } //------------------------------------------------------------------------- @@ -889,7 +889,7 @@ OUString PasswordContainer::GetMasterPassword( const Reference< XInteractionHand { PasswordRequestMode aRMode = PasswordRequestMode_PASSWORD_ENTER; if( !m_pStorageFile || !m_pStorageFile->useStorage() ) - throw NoMasterException( OUString("Password storing is not active!"), Reference< XInterface >(), aRMode ); + throw NoMasterException("Password storing is not active!", Reference< XInterface >(), aRMode ); if( m_aMasterPasswd.isEmpty() && aHandler.is() ) { @@ -938,7 +938,7 @@ OUString PasswordContainer::GetMasterPassword( const Reference< XInteractionHand } if ( m_aMasterPasswd.isEmpty() ) - throw NoMasterException( OUString("No master password!"), Reference< XInterface >(), aRMode ); + throw NoMasterException("No master password!", Reference< XInterface >(), aRMode ); return m_aMasterPasswd; } diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index 6fe10375d750..39e337381775 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -256,8 +256,8 @@ namespace svt ::ucbhelper::Content aCnt( aTargetURL, xEnvironment, comphelper::getProcessComponentContext() ); try { - aCnt.getPropertyValue( OUString( "Size" ) ) >>= pData->maSize; - aCnt.getPropertyValue( OUString( "DateModified" ) ) >>= aDT; + aCnt.getPropertyValue("Size") >>= pData->maSize; + aCnt.getPropertyValue("DateModified") >>= aDT; } catch (...) {} } diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx index 4291e0686752..c7f008e8e87a 100644 --- a/svtools/source/control/toolbarmenuacc.cxx +++ b/svtools/source/control/toolbarmenuacc.cxx @@ -596,7 +596,7 @@ void ToolbarMenuAcc::ThrowIfDisposed (void) throw (DisposedException) { if(rBHelper.bDisposed || rBHelper.bInDispose || !mpParent) { - throw DisposedException ( OUString("object has been already disposed"), static_cast<XWeak*>(this)); + throw DisposedException ("object has been already disposed", static_cast<XWeak*>(this)); } } diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index dc5887ce6124..295153228f7e 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -1226,7 +1226,7 @@ void AssignmentPersistentData::Commit() if ( xProp.is() ) { OUString sName; - xProp->getPropertyValue(OUString("DataSourceName")) >>= sName; + xProp->getPropertyValue("DataSourceName") >>= sName; INetURLObject aURL( sName ); if( aURL.GetProtocol() != INET_PROT_NOT_VALID ) diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index cca25679c349..2ba079b0e2bb 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -135,8 +135,8 @@ void SvObjectServerList::FillInsertObjects() { OUString aUIName; OUString aClassID; - xEntry->getByName( OUString( "ObjectUIName" ) ) >>= aUIName; - xEntry->getByName( OUString( "ClassID" ) ) >>= aClassID; + xEntry->getByName("ObjectUIName") >>= aUIName; + xEntry->getByName("ClassID") >>= aClassID; if ( !aUIName.isEmpty() ) { diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index 70e92aa504e4..c2e2a3bd7996 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -239,9 +239,9 @@ void SvFilterOptionsDialog::setSourceDocument( const uno::Reference< lang::XComp ( xDoc, uno::UNO_QUERY ); if ( xServiceInfo.is() ) { - if ( xServiceInfo->supportsService( OUString( "com.sun.star.presentation.PresentationDocument" ) ) ) + if ( xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument") ) aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Impress/Layout/Other/MeasureUnit" ) ); - else if ( xServiceInfo->supportsService( OUString( "com.sun.star.drawing.DrawingDocument" ) ) ) + else if ( xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument") ) aConfigPath = String( RTL_CONSTASCII_USTRINGPARAM( "Office.Draw/Layout/Other/MeasureUnit" ) ); if ( aConfigPath.Len() ) { diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index b7c30adcc100..c9e648b75940 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -347,9 +347,9 @@ awt::Size ExportDialog::GetOriginalSize() sal_Int32 nWidth = 0; sal_Int32 nHeight= 0; com::sun::star::uno::Any aAny; - aAny = xPagePropSet->getPropertyValue(OUString("Width")); + aAny = xPagePropSet->getPropertyValue("Width"); aAny >>= nWidth; - aAny = xPagePropSet->getPropertyValue(OUString("Height")); + aAny = xPagePropSet->getPropertyValue("Height"); aAny >>= nHeight; aShapesRange = basegfx::B2DRange( 0, 0, nWidth, nHeight ); } diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index daaa2d405d32..5397dc7450f2 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -402,7 +402,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal { Reference< XGridDataModel > const xDataModel( aValue, UNO_QUERY ); if ( !xDataModel.is() ) - throw GridInvalidDataException( OUString( "Invalid data model." ), *this ); + throw GridInvalidDataException("Invalid data model.", *this ); m_pTableModel->setDataModel( xDataModel ); impl_checkTableModelInit(); @@ -414,7 +414,7 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal // obtain new col model Reference< XGridColumnModel > const xColumnModel( aValue, UNO_QUERY ); if ( !xColumnModel.is() ) - throw GridInvalidModelException( OUString( "Invalid column model." ), *this ); + throw GridInvalidModelException("Invalid column model.", *this ); // remove all old columns m_pTableModel->removeAllColumns(); diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 4c74be5e50ec..7b675a902250 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -123,7 +123,7 @@ Reference< XLayoutManager > ToolboxController::getLayoutManager() const { try { - xLayoutManager.set(xPropSet->getPropertyValue( OUString( "LayoutManager" )),UNO_QUERY); + xLayoutManager.set(xPropSet->getPropertyValue("LayoutManager"),UNO_QUERY); } catch ( Exception& ) { diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index a08b93f3d8b6..fd7d5b3200a0 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -1449,7 +1449,7 @@ void SVTXRoadmap::propertyChange( const ::com::sun::star::beans::PropertyChangeE xRoadmapItem = evt.Source; sal_Int32 nID = 0; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropertySet( xRoadmapItem, ::com::sun::star::uno::UNO_QUERY ); - ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(OUString( "ID" )); + ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue("ID"); aValue >>= nID; ::com::sun::star::uno::Any rVal = evt.NewValue; @@ -1498,11 +1498,11 @@ RMItemData SVTXRoadmap::GetRMItemData( const ::com::sun::star::container::Contai ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropertySet( xRoadmapItem, ::com::sun::star::uno::UNO_QUERY ); if ( xPropertySet.is() ) { - ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(OUString( "Label" )); + ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue("Label"); aValue >>= aCurRMItemData.Label; - aValue = xPropertySet->getPropertyValue(OUString( "ID" )); + aValue = xPropertySet->getPropertyValue("ID"); aValue >>= aCurRMItemData.n_ID; - aValue = xPropertySet->getPropertyValue(OUString( "Enabled" )); + aValue = xPropertySet->getPropertyValue("Enabled"); aValue >>= aCurRMItemData.b_Enabled; } else diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 007bded67b08..49ca5cc19332 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -219,7 +219,7 @@ void AccessibleShape::UpdateStates (void) try { drawing::FillStyle aFillStyle; - bShapeIsOpaque = ( xSet->getPropertyValue (OUString("FillStyle")) >>= aFillStyle) + bShapeIsOpaque = ( xSet->getPropertyValue ("FillStyle") >>= aFillStyle) && aFillStyle == drawing::FillStyle_SOLID; } catch (::com::sun::star::beans::UnknownPropertyException&) @@ -642,7 +642,7 @@ sal_Int32 SAL_CALL AccessibleShape::getForeground (void) if (aSet.is()) { uno::Any aColor; - aColor = aSet->getPropertyValue (OUString("LineColor")); + aColor = aSet->getPropertyValue ("LineColor"); aColor >>= nColor; } } @@ -668,7 +668,7 @@ sal_Int32 SAL_CALL AccessibleShape::getBackground (void) if (aSet.is()) { uno::Any aColor; - aColor = aSet->getPropertyValue (OUString("FillColor")); + aColor = aSet->getPropertyValue ("FillColor"); aColor >>= nColor; } } @@ -984,7 +984,7 @@ OUString uno::Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY); if (xSet.is()) { - uno::Any aZOrder (xSet->getPropertyValue (OUString("ZOrder"))); + uno::Any aZOrder (xSet->getPropertyValue ("ZOrder")); aZOrder >>= nIndex; // Add one to be not zero based. diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx index fc8c2e4c7077..571fcbebba5f 100644 --- a/svx/source/core/graphichelper.cxx +++ b/svx/source/core/graphichelper.cxx @@ -270,7 +270,7 @@ void GraphicHelper::SaveShapeAsGraphic( const Reference< drawing::XShape >& xSha Reference< XInputStream > xGraphStream; if( aMimeType == aExportMimeType ) { - xShapeSet->getPropertyValue( OUString( "GraphicStream" ) ) >>= xGraphStream; + xShapeSet->getPropertyValue("GraphicStream") >>= xGraphStream; } if( xGraphStream.is() ) diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 472d9c323f4b..22d913abd922 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -464,10 +464,10 @@ void SvxSearchDialog::Construct_Impl() uno::Any aRet = xDirectAccess->getByName(sProperty); aRet >>= sTemp; m_pComponentFrame->get_label_widget()->SetText(sTemp); - aRet = xDirectAccess->getByName(OUString( "ComponentSearchCommandLabel1")); + aRet = xDirectAccess->getByName("ComponentSearchCommandLabel1"); aRet >>= sTemp; m_pSearchComponent1PB->SetText( sTemp ); - aRet = xDirectAccess->getByName(OUString( "ComponentSearchCommandLabel2")); + aRet = xDirectAccess->getByName("ComponentSearchCommandLabel2"); aRet >>= sTemp; m_pSearchComponent2PB->SetText( sTemp ); } diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index b5e9b8e20539..129a3657450f 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -119,7 +119,7 @@ namespace svx try { Reference< XTablesSupplier > xSupTab; - _rxForm->getPropertyValue(OUString("SingleSelectQueryComposer")) >>= xSupTab; + _rxForm->getPropertyValue("SingleSelectQueryComposer") >>= xSupTab; if(xSupTab.is()) { diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx index 182e74fd49d1..2d5be88f04b0 100644 --- a/svx/source/fmcomp/dbaobjectex.cxx +++ b/svx/source/fmcomp/dbaobjectex.cxx @@ -82,7 +82,7 @@ namespace svx Reference<XPropertySet> xProp; m_aDescriptor[daComponent] >>= xProp; if ( xProp.is() ) - xProp->getPropertyValue(OUString("IsForm")) >>= bForm; + xProp->getPropertyValue("IsForm") >>= bForm; } catch(Exception) {} diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 4ea2577202a0..9cc3518ea5d1 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -336,7 +336,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) // not interested in any results Reference< XPropertySet > xStatProps(xStatement,UNO_QUERY); - xStatProps->setPropertyValue(OUString("MaxRows"), makeAny(sal_Int32(0))); + xStatProps->setPropertyValue("MaxRows", makeAny(sal_Int32(0))); xResultSet = xStatement->executeQuery(); Reference< XColumnsSupplier > xSupplyCols(xResultSet, UNO_QUERY); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 71fb78094dd6..86a9b256ebf0 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -3071,7 +3071,7 @@ void DbFilterField::Update() Reference<XPropertySet> xFormProp(xForm,UNO_QUERY); Reference< XTablesSupplier > xSupTab; - xFormProp->getPropertyValue(OUString("SingleSelectQueryComposer")) >>= xSupTab; + xFormProp->getPropertyValue("SingleSelectQueryComposer") >>= xSupTab; Reference< XConnection > xConnection(getRowSetConnection(xForm)); if (!xSupTab.is()) diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 83358a73284c..1437ef2435fc 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -1455,7 +1455,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt // retrieve the datebase of the Numberformatter try { - xSupplier->getNumberFormatSettings()->getPropertyValue(OUString("NullDate")) >>= m_aNullDate; + xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= m_aNullDate; } catch(Exception&) { diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index 66ab3f32c3d9..5b7c5a72521c 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -221,7 +221,7 @@ FmPropBrw::FmPropBrw( const Reference< XComponentContext >& _xORB, SfxBindings* m_xFrameContainerWindow = VCLUnoHelper::GetInterface ( pContainerWindow ); m_xMeAsFrame->initialize( m_xFrameContainerWindow ); - m_xMeAsFrame->setName( OUString("form property browser") ); + m_xMeAsFrame->setName("form property browser"); } catch (Exception&) { diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index 87a69ac93420..204338ea74e5 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -97,20 +97,20 @@ namespace svxform Reference< XServiceInfo > xDocumentSI( _rxDocument, UNO_QUERY ); if ( xDocumentSI.is() ) { - if ( xDocumentSI->supportsService( OUString( "com.sun.star.text.TextDocument" ) ) - || xDocumentSI->supportsService( OUString( "com.sun.star.text.WebDocument" ) ) + if ( xDocumentSI->supportsService("com.sun.star.text.TextDocument") + || xDocumentSI->supportsService("com.sun.star.text.WebDocument") ) { _rFamilyName = OUString( "ParagraphStyles" ); _rStyleName = OUString( "Standard" ); } - else if ( xDocumentSI->supportsService( OUString( "com.sun.star.sheet.SpreadsheetDocument" ) ) ) + else if ( xDocumentSI->supportsService("com.sun.star.sheet.SpreadsheetDocument") ) { _rFamilyName = OUString( "CellStyles" ); _rStyleName = OUString( "Default" ); } - else if ( xDocumentSI->supportsService( OUString( "com.sun.star.drawing.DrawingDocument" ) ) - || xDocumentSI->supportsService( OUString( "com.sun.star.presentation.PresentationDocument" ) ) + else if ( xDocumentSI->supportsService("com.sun.star.drawing.DrawingDocument") + || xDocumentSI->supportsService("com.sun.star.presentation.PresentationDocument") ) { _rFamilyName = OUString( "graphics" ); @@ -203,7 +203,7 @@ namespace svxform // the names of the family, and the style - depends on the document type we live in OUString sFamilyName, sStyleName; if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies.get(), sFamilyName, sStyleName ) ) - throw RuntimeException( OUString( "unknown document type!" ), NULL ); + throw RuntimeException("unknown document type!", NULL ); // the concrete style Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY_THROW ); diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index d7738dbc4128..c62dd0f66473 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -556,7 +556,7 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > { // create and insert (into the destination) a copy of the form xCurrentDestForm.set( - ::comphelper::getProcessServiceFactory()->createInstance(OUString( "com.sun.star.form.component.DataForm" ) ), + ::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.form.component.DataForm"), UNO_QUERY_THROW ); ::comphelper::copyProperties( xCurrentSourceForm, xCurrentDestForm ); diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index d07b31282f92..7696f882dc42 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -928,7 +928,7 @@ namespace svxform { Reference< XControl > xControl( aEvent.Source, UNO_QUERY_THROW ); Reference< XPropertySet > xProps( xControl->getModel(), UNO_QUERY_THROW ); - aCaller = xProps->getPropertyValue( OUString("Name") ); + aCaller = xProps->getPropertyValue("Name"); } catch( Exception& ) {} } diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 854d8f1d41a3..46a7d6e190de 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1662,7 +1662,7 @@ sal_Bool FmXFormShell::GetY2KState(sal_uInt16& n) { try { - Any aVal( xSet->getPropertyValue(OUString("TwoDigitDateStart")) ); + Any aVal( xSet->getPropertyValue("TwoDigitDateStart") ); aVal >>= n; return sal_True; } @@ -1695,7 +1695,7 @@ void FmXFormShell::SetY2KState(sal_uInt16 n) { Any aVal; aVal <<= n; - xSet->setPropertyValue(OUString("TwoDigitDateStart"), aVal); + xSet->setPropertyValue("TwoDigitDateStart", aVal); } catch(Exception&) { @@ -1736,7 +1736,7 @@ void FmXFormShell::SetY2KState(sal_uInt16 n) { Any aVal; aVal <<= n; - xSet->setPropertyValue(OUString("TwoDigitDateStart"), aVal); + xSet->setPropertyValue("TwoDigitDateStart", aVal); } catch(Exception&) { diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 7b07764c60e8..b66d2ed5f5f8 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -121,7 +121,7 @@ private: // SfxObjectShellRef is good here since the model controls the lifetime of the shell SfxObjectShellRef const xObjectShell = m_rModel.GetObjectShell(); ENSURE_OR_THROW( xObjectShell.Is(), "no object shell!" ); - xListenerProps->setPropertyValue( OUString( "Model" ), makeAny( xObjectShell->GetModel() ) ); + xListenerProps->setPropertyValue("Model", makeAny( xObjectShell->GetModel() ) ); m_vbaListener = xScriptListener; } diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 913e8b99255c..033c72545f3c 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -221,7 +221,7 @@ namespace svxform if ( !sDataSourceName.isEmpty() ) xDsProperties = xDsProperties.query( OStaticDataAccessTools().getDataSource( sDataSourceName, _rContext ) ); if ( xDsProperties.is() ) - xDsProperties->getPropertyValue( OUString( "Info" ) ) >>= aInfo; + xDsProperties->getPropertyValue("Info") >>= aInfo; } catch( const Exception& ) { @@ -410,7 +410,7 @@ namespace svxform switch ( nClassId ) { case FormComponentType::SCROLLBAR: - _rxControlModel->setPropertyValue( OUString( "LiveScroll" ), makeAny( (sal_Bool)sal_True ) ); + _rxControlModel->setPropertyValue("LiveScroll", makeAny( (sal_Bool)sal_True ) ); // NO break! case FormComponentType::SPINBUTTON: { diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 7145abb1e60f..d2280fa433e9 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3101,7 +3101,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) { Reference< XMultiServiceFactory > xFactory( xConnection, UNO_QUERY_THROW ); m_xComposer.set( - xFactory->createInstance( OUString( "com.sun.star.sdb.SingleSelectQueryComposer" ) ), + xFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), UNO_QUERY_THROW ); Reference< XPropertySet > xSet( xForm, UNO_QUERY ); @@ -3181,7 +3181,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) xQueryColumns->getByName(pRefValues[j].Name) >>= xSet; // get the RealName - xSet->getPropertyValue(OUString("RealName")) >>= aRealName; + xSet->getPropertyValue("RealName") >>= aRealName; // compare the condition field name and the RealName if (aCompare(aRealName, pRefValues[j].Name)) @@ -3194,7 +3194,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) for (sal_Int32 n = 0, nCount = xColumnsByIndex->getCount(); n < nCount; n++) { xColumnsByIndex->getByIndex(n) >>= xSet; - xSet->getPropertyValue(OUString("RealName")) >>= aRealName; + xSet->getPropertyValue("RealName") >>= aRealName; if (aCompare(aRealName, pRefValues[j].Name)) { // get the column by its alias @@ -3694,7 +3694,7 @@ namespace return sal_True; Reference< XPropertySet > xDataSourceSettings( - xDataSource->getPropertyValue( OUString( "Settings" ) ), + xDataSource->getPropertyValue("Settings"), UNO_QUERY_THROW ); sal_Bool bShouldValidate = true; diff --git a/svx/source/form/formtoolbars.cxx b/svx/source/form/formtoolbars.cxx index e978c9e59933..43cbe8231829 100644 --- a/svx/source/form/formtoolbars.cxx +++ b/svx/source/form/formtoolbars.cxx @@ -41,7 +41,7 @@ namespace svxform // the layout manager Reference< XPropertySet > xFrameProps( _rxFrame, UNO_QUERY ); if ( xFrameProps.is() ) - xFrameProps->getPropertyValue( OUString( "LayoutManager" ) ) >>= m_xLayouter; + xFrameProps->getPropertyValue("LayoutManager") >>= m_xLayouter; } //-------------------------------------------------------------------- diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index e1af74e63f0d..e2d816e3b91f 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -236,7 +236,7 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa util::DateTime aDateTimeModified; DateTime aDateTime( DateTime::EMPTY ); - aCnt.getPropertyValue( OUString( "DateModified" ) ) >>= aDateTimeModified; + aCnt.getPropertyValue("DateModified") >>= aDateTimeModified; ::utl::typeConvert( aDateTimeModified, aDateTime ); rData.aThemeChangeDate = aDateTime; rData.aThemeChangeTime = aDateTime; diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 06c8d158af6c..692a67027002 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -271,7 +271,7 @@ sal_Bool FileExists( const INetURLObject& rURL ) ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); OUString aTitle; - aCnt.getPropertyValue( OUString("Title") ) >>= aTitle; + aCnt.getPropertyValue("Title") >>= aTitle; bRet = ( !aTitle.isEmpty() ); } catch( const ucb::ContentCreationException& ) diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index f2c4c5a744e1..ac342d346923 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1196,7 +1196,7 @@ sal_Bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, s ::ucbhelper::Content aCnt( rFileOrDirURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); sal_Bool bFolder = false; - aCnt.getPropertyValue( OUString("IsFolder") ) >>= bFolder; + aCnt.getPropertyValue("IsFolder") >>= bFolder; if( bFolder ) { diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index c3c3e43473a5..cf8dc1ce4fdb 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -49,7 +49,7 @@ namespace { try { - const uno::Any aNumber(xSet->getPropertyValue(OUString("Number"))); + const uno::Any aNumber(xSet->getPropertyValue("Number")); aNumber >>= nRetval; } catch(const uno::Exception&) diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 9b5e9e486480..2f5d2cd83acf 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -78,8 +78,8 @@ using namespace ::com::sun::star; { // Printer and VirtualDevice, or rather: no OutDev uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - const_cast< SdrPageWindow* >( this )->mxControlContainer = uno::Reference< awt::XControlContainer >(xFactory->createInstance(OUString("com.sun.star.awt.UnoControlContainer")), uno::UNO_QUERY); - uno::Reference< awt::XControlModel > xModel(xFactory->createInstance(OUString("com.sun.star.awt.UnoControlContainerModel")), uno::UNO_QUERY); + const_cast< SdrPageWindow* >( this )->mxControlContainer = uno::Reference< awt::XControlContainer >(xFactory->createInstance("com.sun.star.awt.UnoControlContainer"), uno::UNO_QUERY); + uno::Reference< awt::XControlModel > xModel(xFactory->createInstance("com.sun.star.awt.UnoControlContainerModel"), uno::UNO_QUERY); uno::Reference< awt::XControl > xControl(mxControlContainer, uno::UNO_QUERY); if (xControl.is()) xControl->setModel(xModel); diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index d00e0b8fa548..1d37bfc95ed3 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -452,7 +452,7 @@ uno::Reference< ::com::sun::star::frame::XLayoutManager > SAL_CALL SdrLightEmbed uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj)); try { - xMan.set(xFrame->getPropertyValue( OUString("LayoutManager") ),uno::UNO_QUERY); + xMan.set(xFrame->getPropertyValue("LayoutManager"),uno::UNO_QUERY); } catch ( uno::Exception& ) { diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index 7a8f76383d06..ebbd5f2a4f0b 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -175,7 +175,7 @@ bool SdrTextObj::ReloadLinkedText( bool bForceLoad) DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); ::ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::NO_DECODE ), ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - ::com::sun::star::uno::Any aAny( aCnt.getPropertyValue( OUString( "DateModified" ) ) ); + ::com::sun::star::uno::Any aAny( aCnt.getPropertyValue("DateModified") ); ::com::sun::star::util::DateTime aDateTime; aAny >>= aDateTime; diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index 06697135ebab..82d7fe31ce66 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -310,7 +310,7 @@ SdrUnoObj& SdrUnoObj::operator= (const SdrUnoObj& rObj) uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY); if (xSet.is()) { - uno::Any aValue( xSet->getPropertyValue( OUString("DefaultControl")) ); + uno::Any aValue( xSet->getPropertyValue("DefaultControl") ); OUString aStr; if( aValue >>= aStr ) diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index 61e7dfceb589..3204f2fd67f4 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -295,7 +295,7 @@ Reference<XAccessible > SAL_CALL AccessibleCell::getAccessibleAtPoint ( const : // Transform coordinates from internal to pixel. if (maShapeTreeInfo.GetViewForwarder() == NULL) - throw uno::RuntimeException (OUString("AccessibleCell has no valid view forwarder"),static_cast<uno::XWeak*>(this)); + throw uno::RuntimeException ("AccessibleCell has no valid view forwarder",static_cast<uno::XWeak*>(this)); ::Size aPixelSize( maShapeTreeInfo.GetViewForwarder()->LogicToPixel(::Size(aCellRect.GetWidth(), aCellRect.GetHeight())) ); ::Point aPixelPosition( maShapeTreeInfo.GetViewForwarder()->LogicToPixel( aCellRect.TopLeft() )); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 781a9b55c5d5..779753c45b5f 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1536,7 +1536,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame try { Reference< lang::XServiceInfo > xServices( rFrame->getController()->getModel(), UNO_QUERY_THROW ); - m_bIsWriter = xServices->supportsService(OUString("com.sun.star.text.TextDocument")); + m_bIsWriter = xServices->supportsService("com.sun.star.text.TextDocument"); } catch(const uno::Exception& ) { @@ -1739,11 +1739,11 @@ struct SvxStyleToolBoxControl::Impl { Reference< style::XStyleFamiliesSupplier > xStylesSupplier( xModel, UNO_QUERY_THROW ); Reference< lang::XServiceInfo > xServices( xModel, UNO_QUERY_THROW ); - bSpecModeWriter = xServices->supportsService(OUString("com.sun.star.text.TextDocument")); + bSpecModeWriter = xServices->supportsService("com.sun.star.text.TextDocument"); if(bSpecModeWriter) { Reference<container::XNameAccess> xParaStyles; - xStylesSupplier->getStyleFamilies()->getByName(OUString("ParagraphStyles")) >>= + xStylesSupplier->getStyleFamilies()->getByName("ParagraphStyles") >>= xParaStyles; static const sal_Char* aWriterStyles[] = { @@ -1762,7 +1762,7 @@ struct SvxStyleToolBoxControl::Impl Reference< beans::XPropertySet > xStyle; xParaStyles->getByName( OUString::createFromAscii( aWriterStyles[nStyle] )) >>= xStyle; OUString sName; - xStyle->getPropertyValue(OUString("DisplayName")) >>= sName; + xStyle->getPropertyValue("DisplayName") >>= sName; if( !sName.isEmpty() ) aDefaultStyles.push_back(sName); } @@ -1795,7 +1795,7 @@ struct SvxStyleToolBoxControl::Impl { Reference< beans::XPropertySet > xStyle( xCellStyles->getByName( sStyleName), UNO_QUERY_THROW ); OUString sName; - xStyle->getPropertyValue(OUString("DisplayName")) >>= sName; + xStyle->getPropertyValue("DisplayName") >>= sName; if( !sName.isEmpty() ) aDefaultStyles.push_back(sName); } diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 9bbd7345a4e2..74a2abfbb2f3 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -201,7 +201,7 @@ long FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) if (xPropSet.is()) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" ) ); + css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; if (xLayoutManager.is()) { @@ -937,7 +937,7 @@ void SAL_CALL ExitSearchToolboxController::execute( sal_Int16 /*KeyModifier*/ ) if (xPropSet.is()) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" ) ); + css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; if (xLayoutManager.is()) { @@ -1060,7 +1060,7 @@ void SAL_CALL FindbarDispatcher::dispatch( const css::util::URL& aURL, const css return; css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" ) ); + css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; if (!xLayoutManager.is()) return; diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index f8cebfe4249f..80e34e6d1216 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -2130,7 +2130,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO { try { - aBaseline = xSet->getPropertyValue( OUString( "BaseLine" ) ); + aBaseline = xSet->getPropertyValue("BaseLine"); } catch ( uno::Exception& ) { diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index d0b1b4daa2ab..d204c4ab2694 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -359,7 +359,7 @@ sal_uLong SwXMLTextBlocks::PutBlockText( const String& rShort, const String& , OUString aMime ( "text/xml" ); Any aAny; aAny <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny ); + xSet->setPropertyValue("MediaType", aAny ); uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream(); uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY); xSrc->setOutputStream(xOut); @@ -478,7 +478,7 @@ void SwXMLTextBlocks::WriteInfo( void ) OUString aMime ( "text/xml" ); Any aAny; aAny <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny ); + xSet->setPropertyValue("MediaType", aAny ); uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream(); uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY); xSrc->setOutputStream(xOut); @@ -548,7 +548,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable( OUString aMime( "text/xml" ); Any aAny; aAny <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny ); + xSet->setPropertyValue("MediaType", aAny ); uno::Reference < io::XOutputStream > xOutputStream = xDocStream->getOutputStream(); // get XML writer diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 856c2f8a7771..8e6324b5639c 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -439,7 +439,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, uno::RuntimeException) { // nothing to set here - throw lang::IllegalArgumentException( OUString("Property is read-only: ") + throw lang::IllegalArgumentException("Property is read-only: " + PropertyName, static_cast< cppu::OWeakObject * >(this), 0 ); } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 3527b89809f5..d046ba854c99 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -111,7 +111,7 @@ public: try { uno::Reference< beans::XPropertySet > xProps( mpDocShell->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xLibContainer( xProps->getPropertyValue( OUString("BasicLibraries") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xLibContainer( xProps->getPropertyValue("BasicLibraries"), uno::UNO_QUERY_THROW ); OUString sProjectName( "Standard"); if ( !mpDocShell->GetBasicManager()->GetName().isEmpty() ) { diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index f2b3a5d51a99..deeb5ba397d1 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1182,7 +1182,7 @@ void makeRedline( SwPaM& rPaM, //todo: what about REDLINE_FMTCOLL? comphelper::SequenceAsHashMap aPropMap( rRedlineProperties ); uno::Any aAuthorValue; - aAuthorValue = aPropMap.getUnpackedValueOrDefault( OUString("RedlineAuthor"), aAuthorValue); + aAuthorValue = aPropMap.getUnpackedValueOrDefault("RedlineAuthor", aAuthorValue); sal_uInt16 nAuthor = 0; OUString sAuthor; if( aAuthorValue >>= sAuthor ) @@ -1190,7 +1190,7 @@ void makeRedline( SwPaM& rPaM, OUString sComment; uno::Any aCommentValue; - aCommentValue = aPropMap.getUnpackedValueOrDefault( OUString("RedlineComment"), aCommentValue); + aCommentValue = aPropMap.getUnpackedValueOrDefault("RedlineComment", aCommentValue); SwRedlineData aRedlineData( eType, nAuthor ); if( aCommentValue >>= sComment ) @@ -1198,7 +1198,7 @@ void makeRedline( SwPaM& rPaM, ::util::DateTime aStamp; uno::Any aDateTimeValue; - aDateTimeValue = aPropMap.getUnpackedValueOrDefault( OUString("RedlineDateTime"), aDateTimeValue); + aDateTimeValue = aPropMap.getUnpackedValueOrDefault("RedlineDateTime", aDateTimeValue); if( aDateTimeValue >>= aStamp ) { aRedlineData.SetTimeStamp( diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 6fb4cfb0e346..70b65282efab 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1107,7 +1107,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); //mit Layout kann der Anker umgesetzt werden, ohne dass sich die Position aendert if(pFmt) { @@ -1828,7 +1828,7 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName ) if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw uno::RuntimeException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(pFmt) { const SfxItemSet& rSet = pFmt->GetAttrSet(); @@ -1922,7 +1922,7 @@ void SwXShape::addPropertyChangeListener( uno::RuntimeException ) { if ( !xShapeAgg.is() ) - throw uno::RuntimeException( OUString( "no shape aggregate" ), *this ); + throw uno::RuntimeException("no shape aggregate", *this ); // must be handled by the aggregate uno::Reference< beans::XPropertySet > xShapeProps; @@ -1937,7 +1937,7 @@ void SwXShape::removePropertyChangeListener( uno::RuntimeException ) { if ( !xShapeAgg.is() ) - throw uno::RuntimeException( OUString( "no shape aggregate" ), *this ); + throw uno::RuntimeException("no shape aggregate", *this ); // must be handled by the aggregate uno::Reference< beans::XPropertySet > xShapeProps; @@ -2366,9 +2366,9 @@ awt::Point SwXShape::_GetAttrPosition() { awt::Point aAttrPos; - uno::Any aHoriPos( getPropertyValue( OUString("HoriOrientPosition") ) ); + uno::Any aHoriPos( getPropertyValue("HoriOrientPosition") ); aHoriPos >>= aAttrPos.X; - uno::Any aVertPos( getPropertyValue( OUString("VertOrientPosition") ) ); + uno::Any aVertPos( getPropertyValue("VertOrientPosition") ); aVertPos >>= aAttrPos.Y; // #i35798# - fallback, if attribute position is (0,0) // and no anchor position is applied to the drawing object diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 6a202bf4cbdb..a6e0554bdf2f 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2046,7 +2046,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(pField) { diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 0273a1edbf4c..a667b3750d20 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -842,7 +842,7 @@ SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pD // Get the style families uno::Reference < XNameAccess > xFamilies = xFamilySupplier->getStyleFamilies(); // Get the Frame family (and keep it for later) - const ::uno::Any aAny = xFamilies->getByName ( OUString( "FrameStyles" ) ); + const ::uno::Any aAny = xFamilies->getByName ("FrameStyles"); aAny >>= mxStyleFamily; // In the derived class, we'll ask mxStyleFamily for the relevant default style // mxStyleFamily is initialised in the SwXFrame constructor @@ -850,21 +850,21 @@ SwXFrame::SwXFrame(FlyCntType eSet, const :: SfxItemPropertySet* pSet, SwDoc *pD { case FLYCNTTYPE_FRM: { - uno::Any aAny2 = mxStyleFamily->getByName ( OUString( "Frame" ) ); + uno::Any aAny2 = mxStyleFamily->getByName ("Frame"); aAny2 >>= mxStyleData; pProps = new SwFrameProperties_Impl( ); } break; case FLYCNTTYPE_GRF: { - uno::Any aAny2 = mxStyleFamily->getByName ( OUString( "Graphics" ) ); + uno::Any aAny2 = mxStyleFamily->getByName ("Graphics"); aAny2 >>= mxStyleData; pProps = new SwGraphicProperties_Impl( ); } break; case FLYCNTTYPE_OLE: { - uno::Any aAny2 = mxStyleFamily->getByName ( OUString( "OLE" ) ); + uno::Any aAny2 = mxStyleFamily->getByName ("OLE"); aAny2 >>= mxStyleData; pProps = new SwOLEProperties_Impl( ); } @@ -1023,7 +1023,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: { bool bNextFrame = false; if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwDoc* pDoc = pFmt->GetDoc(); if ( ((eType == FLYCNTTYPE_GRF) && isGRFATR(pEntry->nWID)) || @@ -1903,7 +1903,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName ) if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw uno::RuntimeException( OUString( "setPropertyToDefault: property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("setPropertyToDefault: property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); bool bNextFrame; if( pEntry->nWID && diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index e221f80ecfa7..4386311abfc4 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -465,7 +465,7 @@ void SAL_CALL SwXTextPortion::SetPropertyValues_Impl( if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); SwUnoCursorHelper::SetPropertyValue( *pUnoCrsr, *m_pPropSet, pPropertyNames[nProp], pValues[nProp]); @@ -510,11 +510,11 @@ uno::Sequence< uno::Any > SwXTextPortion::getPropertyValues( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Unknown property exception caught", static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("WrappedTargetException caught", static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 6f2e620b54fe..403407fc9d4a 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -1223,7 +1223,7 @@ void SAL_CALL SwXMeta::setParent(uno::Reference< uno::XInterface > const& /*xParent*/) throw (uno::RuntimeException, lang::NoSupportException) { - throw lang::NoSupportException(OUString("setting parent not supported"), *this); + throw lang::NoSupportException("setting parent not supported", *this); } // XElementAccess diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 749b53d823af..88e5f0d4b796 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1290,12 +1290,12 @@ throw (uno::RuntimeException) } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString("Unknown property exception caught"), + throw uno::RuntimeException("Unknown property exception caught", static_cast<cppu::OWeakObject *>(this)); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString("WrappedTargetException caught"), + throw uno::RuntimeException("WrappedTargetException caught", static_cast<cppu::OWeakObject *>(this)); } diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 68b135c2a605..4f8e08375bbf 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -331,7 +331,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons if(pEntry) { if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwFtnInfo aFtnInfo(pDoc->GetFtnInfo()); switch(pEntry->nWID) { @@ -642,7 +642,7 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const if(pEntry) { if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwEndNoteInfo aEndInfo(pDoc->GetEndNoteInfo()); switch(pEntry->nWID) { @@ -874,7 +874,7 @@ void SwXLineNumberingProperties::setPropertyValue( if(pEntry) { if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwLineNumberInfo aInfo(pDoc->GetLineNumberInfo()); switch(pEntry->nWID) { @@ -2512,7 +2512,7 @@ void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any& if (!pEntry) throw UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); switch(pEntry->nWID) { diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index a57b4d5075af..a3b7ca557818 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -549,7 +549,7 @@ void SwXTextSearch::setPropertyValue(const OUString& rPropertyName, const uno::A if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); sal_Bool bVal = sal_False; if(aValue.getValueType() == ::getBooleanCppuType()) bVal = *(sal_Bool*)aValue.getValue(); diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index a7d3b1764680..1eaa460e8597 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1261,7 +1261,7 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) : case SFX_STYLE_FAMILY_CHAR: { nMapId = PROPERTY_MAP_CHAR_STYLE; - aAny = xFamilies->getByName ( OUString( "CharacterStyles" ) ); + aAny = xFamilies->getByName ("CharacterStyles"); // Get the Frame family (and keep it for later) aAny >>= mxStyleFamily; } @@ -1269,20 +1269,20 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) : case SFX_STYLE_FAMILY_PARA: { nMapId = bIsConditional ? PROPERTY_MAP_CONDITIONAL_PARA_STYLE : PROPERTY_MAP_PARA_STYLE; - aAny = xFamilies->getByName ( OUString( "ParagraphStyles" ) ); + aAny = xFamilies->getByName ("ParagraphStyles"); // Get the Frame family (and keep it for later) aAny >>= mxStyleFamily; - aAny = mxStyleFamily->getByName ( OUString( "Standard" ) ); + aAny = mxStyleFamily->getByName ("Standard"); aAny >>= mxStyleData; } break; case SFX_STYLE_FAMILY_PAGE: { nMapId = PROPERTY_MAP_PAGE_STYLE; - aAny = xFamilies->getByName ( OUString( "PageStyles" ) ); + aAny = xFamilies->getByName ("PageStyles"); // Get the Frame family (and keep it for later) aAny >>= mxStyleFamily; - aAny = mxStyleFamily->getByName ( OUString( "Standard" ) ); + aAny = mxStyleFamily->getByName ("Standard"); aAny >>= mxStyleData; } break; @@ -2111,7 +2111,7 @@ void SAL_CALL SwXStyle::SetPropertyValues_Impl( (!bIsConditional && pNames[nProp].equalsAsciiL(SW_PROP_NAME(UNO_NAME_PARA_STYLE_CONDITIONS)))) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if(aBaseImpl.mxNewBase.is()) { lcl_SetStyleProperty(*pEntry, *pPropSet, pValues[nProp], aBaseImpl, @@ -2456,11 +2456,11 @@ uno::Sequence< uno::Any > SwXStyle::getPropertyValues( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Unknown property exception caught", static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("WrappedTargetException caught", static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; @@ -2707,9 +2707,9 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >& if( !pEntry ) throw beans::UnknownPropertyException ( OUString( "Property is unknown: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nWID == FN_UNO_FOLLOW_STYLE || pEntry->nWID == FN_UNO_NUM_RULES ) - throw uno::RuntimeException ( OUString( "Cannot reset: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException ("Cannot reset: " + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY ) - throw uno::RuntimeException( OUString( "setPropertiesToDefault: property is read-only: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("setPropertiesToDefault: property is read-only: " + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if( pEntry->nWID == RES_PARATR_OUTLINELEVEL ) static_cast<SwTxtFmtColl*>(pTargetFmt)->DeleteAssignmentToListLevelOfOutlineStyle(); @@ -3023,7 +3023,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl( if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ( OUString( "Property is read-only: " ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException ("Property is read-only: " + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if(GetBasePool()) { @@ -3466,11 +3466,11 @@ uno::Sequence< uno::Any > SwXPageStyle::getPropertyValues( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Unknown property exception caught", static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("WrappedTargetException caught", static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; @@ -3992,11 +3992,11 @@ uno::Sequence< uno::Any > SwXAutoStyle::getPropertyValues ( } catch (beans::UnknownPropertyException &) { - throw uno::RuntimeException(OUString( "Unknown property exception caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Unknown property exception caught", static_cast < cppu::OWeakObject * > ( this ) ); } catch (lang::WrappedTargetException &) { - throw uno::RuntimeException(OUString( "WrappedTargetException caught" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("WrappedTargetException caught", static_cast < cppu::OWeakObject * > ( this ) ); } return aValues; diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 49fc1a3b6ee1..8110f66fbf41 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1351,7 +1351,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, if (!pEntry) throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); switch(pEntry->nWID) { @@ -1724,7 +1724,7 @@ sal_Bool SwXTextTableCursor::splitRange(sal_Int16 Count, sal_Bool Horizontal) th { SolarMutexGuard aGuard; if (Count <= 0) - throw uno::RuntimeException( OUString( "Illegal first argument: needs to be > 0" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("Illegal first argument: needs to be > 0", static_cast < cppu::OWeakObject * > ( this ) ); sal_Bool bRet = sal_False; SwUnoCrsr* pUnoCrsr = GetCrsr(); if(pUnoCrsr) @@ -1772,7 +1772,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); pTblCrsr->MakeBoxSels(); SwDoc* pDoc = pUnoCrsr->GetDoc(); switch(pEntry->nWID ) @@ -2293,7 +2293,7 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex { // attachToRange must only be called once if(!bIsDescriptor) /* already attached ? */ - throw uno::RuntimeException( OUString( "SwXTextTable: already attached to range." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("SwXTextTable: already attached to range.", static_cast < cppu::OWeakObject * > ( this ) ); uno::Reference<XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY); SwXTextRange* pRange = 0; @@ -3037,7 +3037,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, if(pFmt) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(0xFF == pEntry->nMemberId) { @@ -3860,7 +3860,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, if(pEntry) { if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException( OUString( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SwDoc* pDoc = pTblCrsr->GetDoc(); { diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 07b60035c1aa..441e7142eca1 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2537,7 +2537,7 @@ throw (uno::RuntimeException) if (::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { if ( !aPam.GetNode()->GetTxtNode() ) - throw uno::RuntimeException( OUString("Invalid text range"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid text range", uno::Reference< uno::XInterface >() ); SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx index 4f3432c20feb..a70bbce6e49c 100644 --- a/sw/source/filter/html/SwAppletImpl.cxx +++ b/sw/source/filter/html/SwAppletImpl.cxx @@ -137,14 +137,14 @@ void SwApplet_Impl::CreateApplet( const OUString& rCode, const OUString& rName, uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( OUString("AppletCode"), uno::makeAny( rCode ) ); - xSet->setPropertyValue( OUString("AppletName"), uno::makeAny( rName ) ); - xSet->setPropertyValue( OUString("AppletIsScript"), uno::makeAny( sal_Bool(bMayScript) ) ); - xSet->setPropertyValue( OUString("AppletDocBase"), uno::makeAny( sDocBase ) ); + xSet->setPropertyValue("AppletCode", uno::makeAny( rCode ) ); + xSet->setPropertyValue("AppletName", uno::makeAny( rName ) ); + xSet->setPropertyValue("AppletIsScript", uno::makeAny( sal_Bool(bMayScript) ) ); + xSet->setPropertyValue("AppletDocBase", uno::makeAny( sDocBase ) ); if ( !rCodeBase.isEmpty() ) - xSet->setPropertyValue( OUString("AppletCodeBase"), uno::makeAny( rCodeBase ) ); + xSet->setPropertyValue("AppletCodeBase", uno::makeAny( rCodeBase ) ); else - xSet->setPropertyValue( OUString("AppletCodeBase"), uno::makeAny( sDocBase ) ); + xSet->setPropertyValue("AppletCodeBase", uno::makeAny( sDocBase ) ); } } #ifdef SOLAR_JAVA @@ -185,7 +185,7 @@ void SwApplet_Impl::FinishApplet() { uno::Sequence < beans::PropertyValue > aProps; aCommandList.FillSequence( aProps ); - xSet->setPropertyValue( OUString("AppletCommands"), uno::makeAny( aProps ) ); + xSet->setPropertyValue("AppletCommands", uno::makeAny( aProps ) ); } } diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index ec85cccaf179..1f553615cd6d 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -623,25 +623,25 @@ static void lcl_html_setFixedFontProperty( DEFAULTFONT_FLAGS_ONLYONE ) ); Any aTmp; aTmp <<= OUString( aFixedFont.GetName() ); - rPropSet->setPropertyValue( OUString("FontName"), aTmp ); + rPropSet->setPropertyValue("FontName", aTmp ); aTmp <<= OUString( aFixedFont.GetStyleName() ); - rPropSet->setPropertyValue( OUString("FontStyleName"), + rPropSet->setPropertyValue("FontStyleName", aTmp ); aTmp <<= (sal_Int16) aFixedFont.GetFamily(); - rPropSet->setPropertyValue( OUString("FontFamily"), aTmp ); + rPropSet->setPropertyValue("FontFamily", aTmp ); aTmp <<= (sal_Int16) aFixedFont.GetCharSet(); - rPropSet->setPropertyValue( OUString("FontCharset"), + rPropSet->setPropertyValue("FontCharset", aTmp ); aTmp <<= (sal_Int16) aFixedFont.GetPitch(); - rPropSet->setPropertyValue( OUString("FontPitch"), aTmp ); + rPropSet->setPropertyValue("FontPitch", aTmp ); float fVal(10.); aTmp.setValue( &fVal, ::getCppuType(&fVal )); - rPropSet->setPropertyValue( OUString("FontHeight"), aTmp ); + rPropSet->setPropertyValue("FontHeight", aTmp ); } class SwHTMLFormPendingStackData_Impl: public SwPendingStackData @@ -1408,7 +1408,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend ) Any aTmp; aTmp <<= OUString(sName); - xFormPropSet->setPropertyValue( OUString("Name"), aTmp ); + xFormPropSet->setPropertyValue("Name", aTmp ); if( aAction.Len() ) { @@ -1421,12 +1421,12 @@ void SwHTMLParser::NewForm( sal_Bool bAppend ) aAction = aURLObj.GetPartBeforeLastName(); } aTmp <<= OUString(aAction); - xFormPropSet->setPropertyValue( OUString("TargetURL"), + xFormPropSet->setPropertyValue("TargetURL", aTmp ); FormSubmitMethod eMethod = (FormSubmitMethod)nMethod; aTmp.setValue( &eMethod, ::getCppuType((const FormSubmitMethod*)0) ); - xFormPropSet->setPropertyValue( OUString("SubmitMethod"), + xFormPropSet->setPropertyValue("SubmitMethod", aTmp ); FormSubmitEncoding eEncType = (FormSubmitEncoding)nEncType; @@ -1705,21 +1705,21 @@ void SwHTMLParser::InsertInput() Any aTmp; aTmp <<= OUString(sName); - xPropSet->setPropertyValue( OUString("Name"), aTmp ); + xPropSet->setPropertyValue("Name", aTmp ); if( HTML_IT_HIDDEN != eType ) { if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) { aTmp <<= (sal_Int16) (sal_Int16)nTabIndex ; - xPropSet->setPropertyValue( OUString("TabIndex"), aTmp ); + xPropSet->setPropertyValue("TabIndex", aTmp ); } if( bDisabled ) { sal_Bool bFalse = sal_False; aTmp.setValue(&bFalse, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("Enabled"), aTmp ); + xPropSet->setPropertyValue("Enabled", aTmp ); } } @@ -1736,10 +1736,10 @@ void SwHTMLParser::InsertInput() { if( !bValue ) aTmp <<= OUString( OOO_STRING_SVTOOLS_HTML_on ); - xPropSet->setPropertyValue( OUString("RefValue"), + xPropSet->setPropertyValue("RefValue", aTmp ); aTmp <<= OUString(); - xPropSet->setPropertyValue( OUString("Label"), + xPropSet->setPropertyValue("Label", aTmp ); // Beim RadioButton darf die DefaultChecked-Property // erst gesetzt werden, wenn das Control angelegt und ein @@ -1781,7 +1781,7 @@ void SwHTMLParser::InsertInput() OUString("ButtonType"), aTmp ); aTmp <<= (sal_Int16) 0 ; - xPropSet->setPropertyValue( OUString("Border"), + xPropSet->setPropertyValue("Border", aTmp ); } break; @@ -1810,7 +1810,7 @@ void SwHTMLParser::InsertInput() ; } aTmp <<= OUString(sText); - xPropSet->setPropertyValue( OUString("Label"), + xPropSet->setPropertyValue("Label", aTmp ); aTmp.setValue( &eButtonType, @@ -1842,7 +1842,7 @@ void SwHTMLParser::InsertInput() if( HTML_IT_PASSWORD == eType ) { aTmp <<= (sal_Int16)'*' ; - xPropSet->setPropertyValue( OUString("EchoChar"), + xPropSet->setPropertyValue("EchoChar", aTmp ); } @@ -1855,7 +1855,7 @@ void SwHTMLParser::InsertInput() break; case HTML_IT_HIDDEN: - xPropSet->setPropertyValue( OUString("HiddenValue"), + xPropSet->setPropertyValue("HiddenValue", aTmp ); bHidden = sal_True; break; @@ -1936,7 +1936,7 @@ void SwHTMLParser::InsertInput() if( HTML_IT_RADIO == eType ) { aTmp <<= (sal_Int16) nChecked ; - xPropSet->setPropertyValue( OUString("DefaultState"), aTmp ); + xPropSet->setPropertyValue("DefaultState", aTmp ); } if( HTML_IT_IMAGE == eType ) @@ -1945,7 +1945,7 @@ void SwHTMLParser::InsertInput() // Download der Grafik erst dann am XModel anmelden kann, // wenn das Control eingefuegt ist. aTmp <<= OUString( URIHelper::SmartRel2Abs(INetURLObject(sBaseURL), sImgSrc, Link(), false)); - xPropSet->setPropertyValue( OUString("ImageURL"), + xPropSet->setPropertyValue("ImageURL", aTmp ); } @@ -2107,15 +2107,15 @@ void SwHTMLParser::NewTextArea() Any aTmp; aTmp <<= OUString(sName); - xPropSet->setPropertyValue( OUString("Name"), aTmp ); + xPropSet->setPropertyValue("Name", aTmp ); sal_Bool bTrue = sal_True; aTmp.setValue( &bTrue, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("MultiLine"), + xPropSet->setPropertyValue("MultiLine", aTmp ); - xPropSet->setPropertyValue( OUString("VScroll"), aTmp ); + xPropSet->setPropertyValue("VScroll", aTmp ); if( HTML_WM_OFF == nWrap ) - xPropSet->setPropertyValue( OUString("HScroll"), + xPropSet->setPropertyValue("HScroll", aTmp ); if( HTML_WM_HARD == nWrap ) xPropSet->setPropertyValue( @@ -2124,7 +2124,7 @@ void SwHTMLParser::NewTextArea() if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) { aTmp <<= (sal_Int16)nTabIndex ; - xPropSet->setPropertyValue( OUString("TabIndex"), + xPropSet->setPropertyValue("TabIndex", aTmp ); } @@ -2134,7 +2134,7 @@ void SwHTMLParser::NewTextArea() { sal_Bool bFalse = sal_False; aTmp.setValue( &bFalse, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("Enabled"), + xPropSet->setPropertyValue("Enabled", aTmp ); } @@ -2202,7 +2202,7 @@ void SwHTMLParser::EndTextArea() Any aTmp; aTmp <<= OUString(pFormImpl->GetText()); - rPropSet->setPropertyValue( OUString("DefaultText"), + rPropSet->setPropertyValue("DefaultText", aTmp ); pFormImpl->EraseText(); @@ -2385,12 +2385,12 @@ void SwHTMLParser::NewSelect() Any aTmp; aTmp <<= OUString(sName); - xPropSet->setPropertyValue( OUString("Name"), aTmp ); + xPropSet->setPropertyValue("Name", aTmp ); if( nTabIndex >= TABINDEX_MIN && nTabIndex <= TABINDEX_MAX ) { aTmp <<= (sal_Int16)nTabIndex ; - xPropSet->setPropertyValue( OUString("TabIndex"), + xPropSet->setPropertyValue("TabIndex", aTmp ); } @@ -2398,7 +2398,7 @@ void SwHTMLParser::NewSelect() { sal_Bool bFalse = sal_False; aTmp.setValue( &bFalse, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("Enabled"), + xPropSet->setPropertyValue("Enabled", aTmp ); } @@ -2408,7 +2408,7 @@ void SwHTMLParser::NewSelect() { sal_Bool bTrue = sal_True; aTmp.setValue( &bTrue, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( OUString("Dropdown"), + xPropSet->setPropertyValue("Dropdown", aTmp ); } else @@ -2519,7 +2519,7 @@ void SwHTMLParser::EndSelect() aAny.setValue( &aValueList, ::getCppuType((uno::Sequence<OUString>*)0) ); - rPropSet->setPropertyValue( OUString("ListSource"), + rPropSet->setPropertyValue("ListSource", aAny ); size_t nSelCnt = pFormImpl->GetSelectedList().size(); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 79afa49ea834..d976e1a7a53e 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -974,7 +974,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, append('=').append(TypeNames[eType]); } - aTmp = xPropSet->getPropertyValue( OUString("Name") ); + aTmp = xPropSet->getPropertyValue("Name"); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { @@ -986,7 +986,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, sOut.append('\"'); } - aTmp = xPropSet->getPropertyValue( OUString("Enabled") ); + aTmp = xPropSet->getPropertyValue("Enabled"); if( aTmp.getValueType() == ::getBooleanCppuType() && !*(sal_Bool*)aTmp.getValue() ) { @@ -1314,7 +1314,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } else if( TYPE_CHECKBOX == eType || TYPE_RADIO == eType ) { - aTmp = xPropSet->getPropertyValue(OUString("Label")); + aTmp = xPropSet->getPropertyValue("Label"); if( aTmp.getValueType() == ::getCppuType((const OUString*)0) && !((OUString*)aTmp.getValue())->isEmpty() ) { diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 6e5235f4ded2..d6f1a3a7df9f 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -417,15 +417,15 @@ void SwHTMLParser::InsertEmbed() if ( xSet.is() ) { if( bHasURL ) - xSet->setPropertyValue( OUString("PluginURL"), + xSet->setPropertyValue("PluginURL", uno::makeAny( OUString( aURL ) ) ); if( bHasType ) - xSet->setPropertyValue( OUString("PluginMimeType"), + xSet->setPropertyValue("PluginMimeType", uno::makeAny( OUString( aType ) ) ); uno::Sequence < beans::PropertyValue > aProps; aCmdLst.FillSequence( aProps ); - xSet->setPropertyValue( OUString("PluginCommands"), uno::makeAny( aProps ) ); + xSet->setPropertyValue("PluginCommands", uno::makeAny( aProps ) ); } } @@ -887,23 +887,23 @@ void SwHTMLParser::InsertFloatingFrame() sal_Bool bHasBorder = aFrameDesc.HasFrameBorder(); Size aMargin = aFrameDesc.GetMargin(); - xSet->setPropertyValue( OUString("FrameURL"), uno::makeAny( OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) ); - xSet->setPropertyValue( OUString("FrameName"), uno::makeAny( aName ) ); + xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( aFrameDesc.GetURL().GetMainURL( INetURLObject::NO_DECODE ) ) ) ); + xSet->setPropertyValue("FrameName", uno::makeAny( aName ) ); if ( eScroll == ScrollingAuto ) - xSet->setPropertyValue( OUString("FrameIsAutoScroll"), + xSet->setPropertyValue("FrameIsAutoScroll", uno::makeAny( sal_True ) ); else - xSet->setPropertyValue( OUString("FrameIsScrollingMode"), + xSet->setPropertyValue("FrameIsScrollingMode", uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) ); - xSet->setPropertyValue( OUString("FrameIsBorder"), + xSet->setPropertyValue("FrameIsBorder", uno::makeAny( bHasBorder ) ); - xSet->setPropertyValue( OUString("FrameMarginWidth"), + xSet->setPropertyValue("FrameMarginWidth", uno::makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( OUString("FrameMarginHeight"), + xSet->setPropertyValue("FrameMarginHeight", uno::makeAny( sal_Int32( aMargin.Height() ) ) ); } } @@ -1023,7 +1023,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, OUString aStr; String aURL; - aAny = xSet->getPropertyValue( OUString("PluginURL") ); + aAny = xSet->getPropertyValue("PluginURL"); if( (aAny >>= aStr) && !aStr.isEmpty() ) { aURL = URIHelper::simpleNormalizedMakeRelative( rWrt.GetBaseURL(), @@ -1040,7 +1040,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, } OUString aType; - aAny = xSet->getPropertyValue( OUString("PluginMimeType") ); + aAny = xSet->getPropertyValue("PluginMimeType"); if( (aAny >>= aType) && !aType.isEmpty() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type) @@ -1072,7 +1072,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // CODEBASE OUString aCd; - aAny = xSet->getPropertyValue( OUString("AppletCodeBase") ); + aAny = xSet->getPropertyValue("AppletCodeBase"); if( (aAny >>= aCd) && !aCd.isEmpty() ) { String sCodeBase( URIHelper::simpleNormalizedMakeRelative(rWrt.GetBaseURL(), aCd) ); @@ -1088,7 +1088,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // CODE OUString aClass; - aAny = xSet->getPropertyValue( OUString("AppletCode") ); + aAny = xSet->getPropertyValue("AppletCode"); aAny >>= aClass; sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_code) .append("=\""); @@ -1098,7 +1098,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // NAME OUString aAppletName; - aAny = xSet->getPropertyValue( OUString("AppletName") ); + aAny = xSet->getPropertyValue("AppletName"); aAny >>= aAppletName; if( !aAppletName.isEmpty() ) { @@ -1110,7 +1110,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, } sal_Bool bScript = sal_False; - aAny = xSet->getPropertyValue( OUString("AppletIsScript") ); + aAny = xSet->getPropertyValue("AppletIsScript"); aAny >>= bScript; if( bScript ) sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_mayscript); @@ -1149,7 +1149,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // und ein </APPLET> schreiben uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( OUString("AppletCommands") ); + aAny = xSet->getPropertyValue("AppletCommands"); aAny >>= aProps; SvCommandList aCommands; @@ -1208,7 +1208,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // fuer Plugins die Parameter als Optionen schreiben uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( OUString("PluginCommands") ); + aAny = xSet->getPropertyValue("PluginCommands"); aAny >>= aProps; SvCommandList aCommands; diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index d8a4faf258d2..c628862df1dc 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -408,7 +408,7 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg, OUString aMime("application/binary"); uno::Any aAny2; aAny2 <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny2 ); + xSet->setPropertyValue("MediaType", aAny2 ); pDoc->WriteLayoutCache( *pStream ); } @@ -522,7 +522,7 @@ bool SwXMLWriter::WriteThroughComponent( OUString aMime("text/xml"); uno::Any aAny; aAny <<= aMime; - xSet->setPropertyValue( OUString("MediaType"), aAny ); + xSet->setPropertyValue("MediaType", aAny ); OUString aUseCommonPassPropName("UseCommonStoragePasswordEncryption"); diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index fca627d3af85..84ab0971bf98 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -414,7 +414,7 @@ void SwXMLExport::GetConfigurationSettings( Sequence < PropertyValue >& rProps) Reference< XMultiServiceFactory > xFac( GetModel(), UNO_QUERY ); if( xFac.is() ) { - Reference< XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), UNO_QUERY ); + Reference< XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), UNO_QUERY ); if( xProps.is() ) SvXMLUnitConverter::convertPropertySet( rProps, xProps ); } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 2be3074a4004..c5f20d05c0b1 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1088,7 +1088,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if( !xFac.is() ) return; - Reference< XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), UNO_QUERY ); + Reference< XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), UNO_QUERY ); if( !xProps.is() ) return; diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 54217e8d2e4b..3e7703538952 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -297,35 +297,35 @@ static void lcl_addFrameProperties( return; OUString aURL; - Any aAny = xSet->getPropertyValue( OUString("FrameURL") ); + Any aAny = xSet->getPropertyValue("FrameURL"); aAny >>= aURL; OUString aName; - aAny = xSet->getPropertyValue( OUString("FrameName")); + aAny = xSet->getPropertyValue("FrameName"); aAny >>= aName; sal_Bool bIsAutoScroll = sal_False, bIsScrollingMode; - aAny = xSet->getPropertyValue( OUString("FrameIsAutoScroll")); + aAny = xSet->getPropertyValue("FrameIsAutoScroll"); aAny >>= bIsAutoScroll; if ( !bIsAutoScroll ) { - aAny = xSet->getPropertyValue( OUString("FrameIsScrollingMode") ); + aAny = xSet->getPropertyValue("FrameIsScrollingMode"); aAny >>= bIsScrollingMode; } sal_Bool bIsBorderSet, bIsAutoBorder = sal_False; - aAny = xSet->getPropertyValue( OUString("FrameIsAutoBorder") ); + aAny = xSet->getPropertyValue("FrameIsAutoBorder"); aAny >>= bIsAutoBorder; if ( !bIsAutoBorder ) { - aAny = xSet->getPropertyValue( OUString("FrameIsBorder") ); + aAny = xSet->getPropertyValue("FrameIsBorder"); aAny >>= bIsBorderSet; } sal_Int32 nWidth, nHeight; - aAny = xSet->getPropertyValue( OUString("FrameMarginWidth") ); + aAny = xSet->getPropertyValue("FrameMarginWidth"); aAny >>= nWidth; - aAny = xSet->getPropertyValue( OUString("FrameMarginHeight") ); + aAny = xSet->getPropertyValue("FrameMarginHeight"); aAny >>= nHeight; if( !bIsAutoScroll ) @@ -547,27 +547,27 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); OUString aStr; - Any aAny2 = xSet->getPropertyValue( OUString("AppletCodeBase") ); + Any aAny2 = xSet->getPropertyValue("AppletCodeBase"); aAny2 >>= aStr; if (!aStr.isEmpty() ) lcl_addURL(rXMLExport, aStr); - aAny2 = xSet->getPropertyValue( OUString("AppletName") ); + aAny2 = xSet->getPropertyValue("AppletName"); aAny2 >>= aStr; if (!aStr.isEmpty()) rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr ); - aAny2 = xSet->getPropertyValue( OUString("AppletCode") ); + aAny2 = xSet->getPropertyValue("AppletCode"); aAny2 >>= aStr; rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr ); sal_Bool bScript = sal_False; - aAny2 = xSet->getPropertyValue( OUString("AppletIsScript") ); + aAny2 = xSet->getPropertyValue("AppletIsScript"); aAny2 >>= bScript; rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MAY_SCRIPT, bScript ? XML_TRUE : XML_FALSE ); uno::Sequence < beans::PropertyValue > aProps; - aAny2 = xSet->getPropertyValue( OUString("AppletCommands") ); + aAny2 = xSet->getPropertyValue("AppletCommands"); aAny2 >>= aProps; sal_Int32 i = aProps.getLength(); @@ -594,11 +594,11 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); OUString aStr; - Any aAny2 = xSet->getPropertyValue( OUString("PluginURL") ); + Any aAny2 = xSet->getPropertyValue("PluginURL"); aAny2 >>= aStr; lcl_addURL( rXMLExport, aStr ); - aAny2 = xSet->getPropertyValue( OUString("PluginMimeType") ); + aAny2 = xSet->getPropertyValue("PluginMimeType"); aAny2 >>= aStr; if (!aStr.isEmpty()) rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr ); @@ -613,12 +613,12 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); OUString aStr; - Any aAny2 = xSet->getPropertyValue( OUString("FrameURL") ); + Any aAny2 = xSet->getPropertyValue("FrameURL"); aAny2 >>= aStr; lcl_addURL( rXMLExport, aStr ); - aAny2 = xSet->getPropertyValue( OUString("FrameName") ); + aAny2 = xSet->getPropertyValue("FrameName"); aAny2 >>= aStr; if (!aStr.isEmpty()) @@ -663,7 +663,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( OUString("AppletCommands") ); + aAny = xSet->getPropertyValue("AppletCommands"); aAny >>= aProps; sal_Int32 i = aProps.getLength(); @@ -689,7 +689,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( { uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY ); uno::Sequence < beans::PropertyValue > aProps; - aAny = xSet->getPropertyValue( OUString("PluginCommands") ); + aAny = xSet->getPropertyValue("PluginCommands"); aAny >>= aProps; sal_Int32 i = aProps.getLength(); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index a84f99c57a77..717c5949b604 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -716,10 +716,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( if ( xSet.is() ) { if( bValidURL ) - xSet->setPropertyValue( OUString("PluginURL"), + xSet->setPropertyValue("PluginURL", makeAny( OUString( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) ); if( bValidMimeType ) - xSet->setPropertyValue( OUString("PluginMimeType"), + xSet->setPropertyValue("PluginMimeType", makeAny( OUString( rMimeType ) ) ); } @@ -846,31 +846,31 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( OUString("FrameURL"), + xSet->setPropertyValue("FrameURL", makeAny( OUString( URIHelper::SmartRel2Abs( INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) ) ); - xSet->setPropertyValue( OUString("FrameName"), + xSet->setPropertyValue("FrameName", makeAny( OUString( rName ) ) ); if ( eScrollMode == ScrollingAuto ) - xSet->setPropertyValue( OUString("FrameIsAutoScroll"), + xSet->setPropertyValue("FrameIsAutoScroll", makeAny( sal_True ) ); else - xSet->setPropertyValue( OUString("FrameIsScrollingMode"), + xSet->setPropertyValue("FrameIsScrollingMode", makeAny( (sal_Bool) (eScrollMode == ScrollingYes) ) ); if ( bIsBorderSet ) - xSet->setPropertyValue( OUString("FrameIsBorder"), + xSet->setPropertyValue("FrameIsBorder", makeAny( bHasBorder ) ); else - xSet->setPropertyValue( OUString("FrameIsAutoBorder"), + xSet->setPropertyValue("FrameIsAutoBorder", makeAny( sal_True ) ); - xSet->setPropertyValue( OUString("FrameMarginWidth"), + xSet->setPropertyValue("FrameMarginWidth", makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( OUString("FrameMarginHeight"), + xSet->setPropertyValue("FrameMarginHeight", makeAny( sal_Int32( aMargin.Height() ) ) ); } diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index d8a5cbfbd654..e4045107a16c 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -638,7 +638,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) // TODO/MBA: testing uno::Reference < beans::XPropertySet > xSet( rMedium.GetStorage(), uno::UNO_QUERY ); if ( xSet.is() ) - xSet->setPropertyValue( OUString("MediaType"), uno::makeAny( OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) ); + xSet->setPropertyValue("MediaType", uno::makeAny( OUString( SotExchange::GetFormatMimeType( nSaveClipId ) ) ) ); } catch (const uno::Exception&) { diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index bdb823ae5874..92c06c40b36e 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -309,7 +309,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) uno::Reference< beans::XPropertySet > xInfo; xStyles->getByName( pNameItem->GetValue() ) >>= xInfo; OUString aUIName; - xInfo->getPropertyValue( OUString("DisplayName") ) >>= aUIName; + xInfo->getPropertyValue("DisplayName") >>= aUIName; if ( !aUIName.isEmpty() ) rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) ); } diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 8de8676fd7e2..c5f8ca32f0d9 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -278,7 +278,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, Any aCol = xCols->getByName(pColNames[n]); Reference <XPropertySet> xCol; aCol >>= xCol; - Any aType = xCol->getPropertyValue(OUString("Type")); + Any aType = xCol->getPropertyValue("Type"); sal_Int32 eDataType = 0; aType >>= eDataType; switch(eDataType) diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 1199d7a0bb10..7870d63c9730 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1551,7 +1551,7 @@ sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName, Any aCol = xCols->getByName(rColNm); uno::Reference<XPropertySet> xCol; aCol >>= xCol; - Any aType = xCol->getPropertyValue(OUString("Type")); + Any aType = xCol->getPropertyValue("Type"); aType >>= nRet; } if(bDispose) diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 49bcc64d0eba..f03fc874fbce 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -230,7 +230,7 @@ void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMa if( xTransferableProperties.is() ) { OUString sURL; - xTransferableProperties->getPropertyValue( OUString("URL") ) >>= sURL; + xTransferableProperties->getPropertyValue("URL") >>= sURL; if(!sURL.isEmpty()) SWUnoHelper::UCB_DeleteFile( sURL ); } diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx index 61624c9f3394..c6cf2c4b7f69 100644 --- a/sw/source/ui/fldui/xfldui.cxx +++ b/sw/source/ui/fldui/xfldui.cxx @@ -125,7 +125,7 @@ sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName Any aCol = xCols->getByName(rFldName); Reference <XPropertySet> xCol; aCol >>= xCol; - Any aType = xCol->getPropertyValue(OUString("Type")); + Any aType = xCol->getPropertyValue("Type"); sal_Int32 eDataType = 0; aType >>= eDataType; switch(eDataType) diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx index 7438965838ec..9fd57e491171 100644 --- a/sw/source/ui/shells/textdrw.cxx +++ b/sw/source/ui/shells/textdrw.cxx @@ -108,7 +108,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con { // #105638# OJ aTmp <<= sal_True; - xPropSet->setPropertyValue( OUString( "DispatchURLInternal" ), aTmp ); + xPropSet->setPropertyValue("DispatchURLInternal", aTmp ); } } diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 2b5c607ebac3..096209b1c529 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -237,7 +237,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( OUString("PluginURL"), + xSet->setPropertyValue("PluginURL", uno::makeAny( OUString( url.GetMainURL( INetURLObject::NO_DECODE ) ) ) ); } } @@ -288,7 +288,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) try { if ( sClassLocation.Len() ) - xSet->setPropertyValue( OUString("PluginURL"), + xSet->setPropertyValue("PluginURL", uno::makeAny( OUString( URIHelper::SmartRel2Abs( @@ -298,7 +298,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) if ( aCommandList.size() ) { aCommandList.FillSequence( aSeq ); - xSet->setPropertyValue( OUString("PluginCommands"), uno::makeAny( aSeq ) ); + xSet->setPropertyValue("PluginCommands", uno::makeAny( aSeq ) ); } } catch (const uno::Exception&) @@ -348,27 +348,27 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) aMargin = pMarginItem->GetSize(); if ( pURLItem ) - xSet->setPropertyValue( OUString("FrameURL"), uno::makeAny( OUString( pURLItem->GetValue() ) ) ); + xSet->setPropertyValue("FrameURL", uno::makeAny( OUString( pURLItem->GetValue() ) ) ); if ( pNameItem ) - xSet->setPropertyValue( OUString("FrameName"), uno::makeAny( OUString( pNameItem->GetValue() ) ) ); + xSet->setPropertyValue("FrameName", uno::makeAny( OUString( pNameItem->GetValue() ) ) ); if ( eScroll == ScrollingAuto ) - xSet->setPropertyValue( OUString("FrameIsAutoScroll"), + xSet->setPropertyValue("FrameIsAutoScroll", uno::makeAny( sal_True ) ); else - xSet->setPropertyValue( OUString("FrameIsScrollingMode"), + xSet->setPropertyValue("FrameIsScrollingMode", uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) ); if ( pBorderItem ) - xSet->setPropertyValue( OUString("FrameIsBorder"), + xSet->setPropertyValue("FrameIsBorder", uno::makeAny( (sal_Bool) pBorderItem->GetValue() ) ); if ( pMarginItem ) { - xSet->setPropertyValue( OUString("FrameMarginWidth"), + xSet->setPropertyValue("FrameMarginWidth", uno::makeAny( sal_Int32( aMargin.Width() ) ) ); - xSet->setPropertyValue( OUString("FrameMarginHeight"), + xSet->setPropertyValue("FrameMarginHeight", uno::makeAny( sal_Int32( aMargin.Height() ) ) ); } } diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index de5399bf180f..10deb9ff15e4 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -208,7 +208,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) { //get dialog size: awt::Size aDialogAWTSize; - if( xDialogProps->getPropertyValue( OUString("Size") ) + if( xDialogProps->getPropertyValue("Size") >>= aDialogAWTSize ) { Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height ); @@ -220,7 +220,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) aSwRect = pFlyFrmFmt->GetAnchoredObj()->GetObjRectWithSpaces(); Rectangle aRect( aSwRect.SVRect() ); Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect ); - xDialogProps->setPropertyValue( OUString("Position"), + xDialogProps->setPropertyValue("Position", uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 080f3b722cf8..88af1dd55388 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -308,7 +308,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException ) { if (rInfo.mnAttributes & PropertyAttribute::READONLY) - throw PropertyVetoException ( OUString( "Property is read-only: " ) + OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) ); + throw PropertyVetoException ("Property is read-only: " + OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) ); switch( rInfo.mnHandle ) { diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 566a1f692348..ec5142bc188b 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -460,7 +460,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( else if (rName.equalsAscii( GetPropName( UNO_NAME_CONNECTION ) )) bOK = rValue >>= xCurConnection; else if (rName.equalsAscii( GetPropName( UNO_NAME_MODEL ) )) - throw PropertyVetoException( OUString( "Property is read-only: " ) + rName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException("Property is read-only: " + rName, static_cast < cppu::OWeakObject * > ( this ) ); else if (rName.equalsAscii( GetPropName( UNO_NAME_DATA_SOURCE_NAME ) )) bOK = rValue >>= aCurDataSourceName; else if (rName.equalsAscii( GetPropName( UNO_NAME_DAD_COMMAND ) )) @@ -472,7 +472,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( bOK = rValue >>= aCurDocumentURL; if (!aCurDocumentURL.isEmpty() && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, false )) - throw RuntimeException( OUString( "Failed to create document from URL: " ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Failed to create document from URL: " + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) ); } else if (rName.equalsAscii( GetPropName( UNO_NAME_OUTPUT_URL ) )) { @@ -480,9 +480,9 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (!aCurOutputURL.isEmpty()) { if (!UCB_IsDirectory(aCurOutputURL)) - throw IllegalArgumentException( OUString( "URL does not point to a directory: " ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("URL does not point to a directory: " + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); if (UCB_IsReadOnlyFileName(aCurOutputURL)) - throw IllegalArgumentException( OUString( "URL is read-only: " ) + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("URL is read-only: " + aCurOutputURL, static_cast < cppu::OWeakObject * > ( this ), 0 ); } } else if (rName.equalsAscii( GetPropName( UNO_NAME_FILE_NAME_PREFIX ) )) @@ -533,7 +533,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( throw UnknownPropertyException( OUString( "Property is unknown: " ) + rName, static_cast < cppu::OWeakObject * > ( this ) ); if (!bOK) - throw IllegalArgumentException( OUString( "Property type mismatch or property not set: " ) + rName, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("Property type mismatch or property not set: " + rName, static_cast < cppu::OWeakObject * > ( this ), 0 ); } // need to translate the selection: the API here requires a sequence of bookmarks, but the MergeNew @@ -601,7 +601,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( if (aCurDataSourceName.isEmpty() || aCurDataCommand.isEmpty() ) { OSL_FAIL("PropertyValues missing or unset"); - throw IllegalArgumentException( OUString( "Either the ResultSet or DataSourceName and DataCommand must be set." ), static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("Either the ResultSet or DataSourceName and DataCommand must be set.", static_cast < cppu::OWeakObject * > ( this ), 0 ); } // @@ -699,7 +699,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( else // default empty document without URL { if (aCurOutputURL.isEmpty()) - throw RuntimeException( OUString( "OutputURL is not set and can not be obtained." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("OutputURL is not set and can not be obtained.", static_cast < cppu::OWeakObject * > ( this ) ); } aURLObj.SetSmartURL( aCurOutputURL ); @@ -728,7 +728,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( { pMgr->SetEMailColumn( sAddressFromColumn ); if(sAddressFromColumn.isEmpty()) - throw RuntimeException( OUString( "Mail address column not set." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Mail address column not set.", static_cast < cppu::OWeakObject * > ( this ) ); aMergeDesc.sSaveToFilter = sAttachmentFilter; aMergeDesc.sSubject = sSubject; aMergeDesc.sMailBody = sMailBody; @@ -746,7 +746,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( xInService, sInServerPassword, sOutServerPassword ); if( !aMergeDesc.xSmtpServer.is() || !aMergeDesc.xSmtpServer->isConnected()) - throw RuntimeException( OUString( "Failed to connect to mail server." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Failed to connect to mail server.", static_cast < cppu::OWeakObject * > ( this ) ); } } @@ -772,7 +772,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( } } if ( !bStoredAsTemporary ) - throw RuntimeException( OUString( "Failed to save temporary file." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Failed to save temporary file.", static_cast < cppu::OWeakObject * > ( this ) ); pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc. const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc(); @@ -793,7 +793,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( // (in case it wasn't a temporary model, it will be closed in the dtor, at the latest) if (!bSucc) - throw Exception( OUString( "Mail merge failed. Sorry, no further information available." ), static_cast < cppu::OWeakObject * > ( this ) ); + throw Exception("Mail merge failed. Sorry, no further information available.", static_cast < cppu::OWeakObject * > ( this ) ); //de-initialize services if(xInService.is() && xInService->isConnected()) @@ -917,7 +917,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( bOK = rValue >>= aText; if (!aText.isEmpty() && !LoadFromURL_impl( xModel, xDocSh, aText, true )) - throw RuntimeException( OUString( "Failed to create document from URL: " ) + aText, static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException("Failed to create document from URL: " + aText, static_cast < cppu::OWeakObject * > ( this ) ); aDocumentURL = aText; } else if (pData == &aOutputURL) @@ -927,9 +927,9 @@ void SAL_CALL SwXMailMerge::setPropertyValue( if (!aText.isEmpty()) { if (!UCB_IsDirectory(aText)) - throw IllegalArgumentException( OUString( "URL does not point to a directory: " ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("URL does not point to a directory: " + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); if (UCB_IsReadOnlyFileName(aText)) - throw IllegalArgumentException( OUString( "URL is read-only: " ) + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("URL is read-only: " + aText, static_cast < cppu::OWeakObject * > ( this ), 0 ); } aOutputURL = aText; } @@ -984,7 +984,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue( bChanged = true; } if (!bOK) - throw IllegalArgumentException( OUString( "Property type mismatch or property not set: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 ); + throw IllegalArgumentException("Property type mismatch or property not set: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ), 0 ); if (bChanged) { diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 5dd294390dd2..beefaf1e196d 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -3165,7 +3165,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( const bool bComplex = 0 != (nScriptTypes & nComplex); if (nScriptTypes < nLatin || nScriptTypes > (nLatin | nAsian | nComplex)) - throw IllegalArgumentException(OUString("nScriptTypes ranges from 1 to 7!"), Reference< XInterface >(), 1); + throw IllegalArgumentException("nScriptTypes ranges from 1 to 7!", Reference< XInterface >(), 1); if (!pDocShell) throw DisposedException(); SwDoc* pDoc = pDocShell->GetDoc(); diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index 98adb3a5f67f..f1f6dea9bdc1 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -945,7 +945,7 @@ void SwXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) @@ -968,7 +968,7 @@ void SwXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); if(rSh.HasSelection()) @@ -992,7 +992,7 @@ sal_Bool SwXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); const SwWrtShell& rSh = m_pView->GetWrtShell(); bRet = !rSh.HasSelection(); @@ -1010,7 +1010,7 @@ sal_Bool SwXTextViewCursor::goLeft(sal_Int16 nCount, sal_Bool bExpand) throw( un if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); for( sal_uInt16 i = 0; i < nCount; i++ ) bRet = m_pView->GetWrtShell().Left( CRSR_SKIP_CHARS, bExpand, 1, sal_True ); @@ -1027,7 +1027,7 @@ sal_Bool SwXTextViewCursor::goRight(sal_Int16 nCount, sal_Bool bExpand) throw( u if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); for( sal_uInt16 i = 0; i < nCount; i++ ) bRet = m_pView->GetWrtShell().Right( CRSR_SKIP_CHARS, bExpand, 1, sal_True ); @@ -1047,7 +1047,7 @@ void SwXTextViewCursor::gotoRange( if(m_pView && xRange.is()) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwUnoInternalPaM rDestPam(*m_pView->GetDocShell()->GetDoc()); if (!::sw::XTextRangeToSwPaM(rDestPam, xRange)) @@ -1186,7 +1186,7 @@ void SwXTextViewCursor::gotoStart(sal_Bool bExpand) throw( uno::RuntimeException if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().SttDoc( bExpand ); } @@ -1200,7 +1200,7 @@ void SwXTextViewCursor::gotoEnd(sal_Bool bExpand) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().EndDoc( bExpand ); } @@ -1358,7 +1358,7 @@ uno::Reference< text::XText > SwXTextViewCursor::getText(void) throw( uno::Runt if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); @@ -1377,7 +1377,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart(void) throw( uno if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); @@ -1396,7 +1396,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd(void) throw( uno:: if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCrsr = rSh.GetCrsr(); @@ -1415,7 +1415,7 @@ OUString SwXTextViewCursor::getString(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); ShellModes eSelMode = m_pView->GetShellMode(); switch(eSelMode) @@ -1445,7 +1445,7 @@ void SwXTextViewCursor::setString(const OUString& aString) throw( uno::RuntimeEx if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); ShellModes eSelMode = m_pView->GetShellMode(); switch(eSelMode) @@ -1603,7 +1603,7 @@ sal_Bool SwXTextViewCursor::goDown(sal_Int16 nCount, sal_Bool bExpand) throw( un if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); for( sal_uInt16 i = 0; i < nCount; i++ ) bRet = m_pView->GetWrtShell().Down( bExpand, 1, sal_True ); @@ -1620,7 +1620,7 @@ sal_Bool SwXTextViewCursor::goUp(sal_Int16 nCount, sal_Bool bExpand) throw( uno: if(m_pView) { if (!IsTextSelection()) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); for( sal_uInt16 i = 0; i < nCount; i++ ) bRet = m_pView->GetWrtShell().Up( bExpand, 1, sal_True ); @@ -1637,7 +1637,7 @@ sal_Bool SwXTextViewCursor::isAtStartOfLine(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); bRet = m_pView->GetWrtShell().IsAtLeftMargin(); } @@ -1653,7 +1653,7 @@ sal_Bool SwXTextViewCursor::isAtEndOfLine(void) throw( uno::RuntimeException ) if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); bRet = m_pView->GetWrtShell().IsAtRightMargin(sal_True); } @@ -1668,7 +1668,7 @@ void SwXTextViewCursor::gotoEndOfLine(sal_Bool bExpand) throw( uno::RuntimeExcep if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().RightMargin(bExpand, sal_True); } @@ -1682,7 +1682,7 @@ void SwXTextViewCursor::gotoStartOfLine(sal_Bool bExpand) throw( uno::RuntimeExc if(m_pView) { if (!IsTextSelection( sal_False )) - throw uno::RuntimeException( OUString( "no text selection" ), static_cast < cppu::OWeakObject * > ( this ) ); + throw uno::RuntimeException("no text selection", static_cast < cppu::OWeakObject * > ( this ) ); m_pView->GetWrtShell().LeftMargin(bExpand, sal_True); } diff --git a/sw/source/ui/vba/vbaaddin.cxx b/sw/source/ui/vba/vbaaddin.cxx index f8e03294d9e5..336b953bf953 100644 --- a/sw/source/ui/vba/vbaaddin.cxx +++ b/sw/source/ui/vba/vbaaddin.cxx @@ -45,7 +45,7 @@ OUString SAL_CALL SwVbaAddin::getName() throw (uno::RuntimeException) void SAL_CALL SwVbaAddin::setName( const OUString& ) throw ( css::uno::RuntimeException ) { - throw uno::RuntimeException( OUString(" Fail to set name"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(" Fail to set name", uno::Reference< uno::XInterface >() ); } OUString SAL_CALL SwVbaAddin::getPath() throw (uno::RuntimeException) diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index e46b0c8dd745..d55358bd333b 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -107,7 +107,7 @@ SwVbaAutoTextEntries::getElementType() throw (uno::RuntimeException) uno::Reference< container::XEnumeration > SwVbaAutoTextEntries::createEnumeration() throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Any diff --git a/sw/source/ui/vba/vbabookmark.cxx b/sw/source/ui/vba/vbabookmark.cxx index cafe3bef44c3..4aac8ef39484 100644 --- a/sw/source/ui/vba/vbabookmark.cxx +++ b/sw/source/ui/vba/vbabookmark.cxx @@ -46,7 +46,7 @@ SwVbaBookmark::~SwVbaBookmark() void SwVbaBookmark::checkVality() throw ( uno::RuntimeException ) { if( !mbValid ) - throw uno::RuntimeException( OUString("The bookmark is not valid" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("The bookmark is not valid", uno::Reference< uno::XInterface >() ); } void SAL_CALL SwVbaBookmark::Delete() throw ( uno::RuntimeException ) diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index 08515b1f9f8d..da372179f2e3 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -140,7 +140,7 @@ void SwVbaBookmarks::removeBookmarkByName( const OUString& rName ) throw (uno::R void SwVbaBookmarks::addBookmarkByName( const uno::Reference< frame::XModel >& xModel, const OUString& rName, const uno::Reference< text::XTextRange >& rTextRange ) throw (uno::RuntimeException) { uno::Reference< lang::XMultiServiceFactory > xDocMSF( xModel, uno::UNO_QUERY_THROW ); - uno::Reference< text::XTextContent > xBookmark( xDocMSF->createInstance( OUString("com.sun.star.text.Bookmark") ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextContent > xBookmark( xDocMSF->createInstance("com.sun.star.text.Bookmark"), uno::UNO_QUERY_THROW ); uno::Reference< container::XNamed > xNamed( xBookmark, uno::UNO_QUERY_THROW ); xNamed->setName( rName ); rTextRange->getText()->insertTextContent( rTextRange, xBookmark, sal_False ); diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index 38825f64f531..dff81949a751 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -226,12 +226,12 @@ public: break; } default: - throw uno::RuntimeException( OUString( "Bad param" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() ); } setBorderLine( aBorderLine ); } else - throw uno::RuntimeException( OUString( "Method failed" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() ); } }; diff --git a/sw/source/ui/vba/vbacolumns.cxx b/sw/source/ui/vba/vbacolumns.cxx index f41d6a4bcba0..f21c742ef449 100644 --- a/sw/source/ui/vba/vbacolumns.cxx +++ b/sw/source/ui/vba/vbacolumns.cxx @@ -104,11 +104,11 @@ uno::Any SAL_CALL SwVbaColumns::Item( const uno::Any& Index1, const uno::Any& /* { if( nIndex <= 0 || nIndex > getCount() ) { - throw lang::IndexOutOfBoundsException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw lang::IndexOutOfBoundsException("Index out of bounds", uno::Reference< uno::XInterface >() ); } return uno::makeAny( uno::Reference< word::XColumn >( new SwVbaColumn( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 829d44d51960..cb06a1e5e8e7 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -326,7 +326,7 @@ void SAL_CALL SwVbaDocument::setUpdateStylesOnOpen( ::sal_Bool /*_updatestyleson // check this property only in default paragraph style sal_Bool IsAutoHyphenation = sal_False; uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->getPropertyValue( OUString("ParaIsHyphenation") ) >>= IsAutoHyphenation; + xParaProps->getPropertyValue("ParaIsHyphenation") >>= IsAutoHyphenation; return IsAutoHyphenation; } @@ -334,7 +334,7 @@ void SAL_CALL SwVbaDocument::setAutoHyphenation( ::sal_Bool _autohyphenation ) t { //TODO uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->setPropertyValue( OUString("ParaIsHyphenation"), uno::makeAny( _autohyphenation ) ); + xParaProps->setPropertyValue("ParaIsHyphenation", uno::makeAny( _autohyphenation ) ); } ::sal_Int32 SAL_CALL SwVbaDocument::getHyphenationZone() throw (uno::RuntimeException) @@ -353,7 +353,7 @@ void SAL_CALL SwVbaDocument::setHyphenationZone( ::sal_Int32 /*_hyphenationzone* //TODO sal_Int16 nHyphensLimit = 0; uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->getPropertyValue( OUString("ParaHyphenationMaxHyphens") ) >>= nHyphensLimit; + xParaProps->getPropertyValue("ParaHyphenationMaxHyphens") >>= nHyphensLimit; return nHyphensLimit; } @@ -361,7 +361,7 @@ void SAL_CALL SwVbaDocument::setConsecutiveHyphensLimit( ::sal_Int32 _consecutiv { sal_Int16 nHyphensLimit = static_cast< sal_Int16 >( _consecutivehyphenslimit ); uno::Reference< beans::XPropertySet > xParaProps( word::getDefaultParagraphStyle( getModel() ), uno::UNO_QUERY_THROW ); - xParaProps->setPropertyValue( OUString("ParaHyphenationMaxHyphens"), uno::makeAny( nHyphensLimit ) ); + xParaProps->setPropertyValue("ParaHyphenationMaxHyphens", uno::makeAny( nHyphensLimit ) ); } void SAL_CALL SwVbaDocument::Protect( ::sal_Int32 /*Type*/, const uno::Any& /*NOReset*/, const uno::Any& /*Password*/, const uno::Any& /*UseIRM*/, const uno::Any& /*EnforceStyleLock*/ ) throw (uno::RuntimeException) @@ -459,7 +459,7 @@ SwVbaDocument::getValue( const OUString& aPropertyName ) throw (beans::UnknownPr uno::Reference< drawing::XControlShape > xControlShape( getControlShape( aPropertyName ), uno::UNO_QUERY_THROW ); uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext( OUString( "ooo.vba.ControlProvider" ), mxContext ), uno::UNO_QUERY_THROW ); + uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext("ooo.vba.ControlProvider", mxContext ), uno::UNO_QUERY_THROW ); uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape, getModel() ) ); return uno::makeAny( xControl ); } diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx index cab3aca7bfe0..b1ecddafeecc 100644 --- a/sw/source/ui/vba/vbafield.cxx +++ b/sw/source/ui/vba/vbafield.cxx @@ -338,7 +338,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, } else { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } SwVbaRange* pVbaRange = dynamic_cast< SwVbaRange* >( Range.get() ); @@ -350,7 +350,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const OUString _text ) throw (uno::RuntimeException) { - uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( OUString("com.sun.star.text.TextField.FileName") ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XTextField > xTextField( mxMSF->createInstance("com.sun.star.text.TextField.FileName"), uno::UNO_QUERY_THROW ); sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT; if( !_text.isEmpty() ) { @@ -375,7 +375,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const OUS } uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( OUString("FileFormat"), uno::makeAny( nFileFormat ) ); + xProps->setPropertyValue("FileFormat", uno::makeAny( nFileFormat ) ); return xTextField; } @@ -463,7 +463,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const } else if( sFieldService.isEmpty() ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( sFieldService ), uno::UNO_QUERY_THROW ); @@ -472,7 +472,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const { uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW ); OUString sDocPropertyName( aDocProperty ); - xProps->setPropertyValue( OUString("Name"), uno::makeAny( sDocPropertyName ) ); + xProps->setPropertyValue("Name", uno::makeAny( sDocPropertyName ) ); } return xTextField; diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx index bc6deacf8680..060ce939f0a1 100644 --- a/sw/source/ui/vba/vbafind.cxx +++ b/sw/source/ui/vba/vbafind.cxx @@ -192,20 +192,20 @@ uno::Any SAL_CALL SwVbaFind::getReplacement() throw (uno::RuntimeException) void SAL_CALL SwVbaFind::setReplacement( const uno::Any& /*_replacement */ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } ::sal_Bool SAL_CALL SwVbaFind::getForward() throw (uno::RuntimeException) { sal_Bool bBackward = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchBackwards") ) >>= bBackward; + mxPropertyReplace->getPropertyValue("SearchBackwards") >>= bBackward; return !bBackward; } void SAL_CALL SwVbaFind::setForward( ::sal_Bool _forward ) throw (uno::RuntimeException) { sal_Bool bBackward = !_forward; - mxPropertyReplace->setPropertyValue( OUString("SearchBackwards"), uno::makeAny( bBackward ) ); + mxPropertyReplace->setPropertyValue("SearchBackwards", uno::makeAny( bBackward ) ); } ::sal_Int32 SAL_CALL SwVbaFind::getWrap() throw (uno::RuntimeException) @@ -233,76 +233,76 @@ void SAL_CALL SwVbaFind::setFormat( ::sal_Bool _format ) throw (uno::RuntimeExce ::sal_Bool SAL_CALL SwVbaFind::getMatchCase() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchCaseSensitive") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchCaseSensitive") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchCase( ::sal_Bool _matchcase ) throw (uno::RuntimeException) { - mxPropertyReplace->setPropertyValue( OUString("SearchCaseSensitive"), uno::makeAny( _matchcase ) ); + mxPropertyReplace->setPropertyValue("SearchCaseSensitive", uno::makeAny( _matchcase ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchWholeWord() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchWords") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchWords") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchWholeWord( ::sal_Bool _matchwholeword ) throw (uno::RuntimeException) { - mxPropertyReplace->setPropertyValue( OUString("SearchWords"), uno::makeAny( _matchwholeword ) ); + mxPropertyReplace->setPropertyValue("SearchWords", uno::makeAny( _matchwholeword ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchWildcards() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchRegularExpression") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchRegularExpression") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchWildcards( ::sal_Bool _matchwildcards ) throw (uno::RuntimeException) { - mxPropertyReplace->setPropertyValue( OUString("SearchRegularExpression"), uno::makeAny( _matchwildcards ) ); + mxPropertyReplace->setPropertyValue("SearchRegularExpression", uno::makeAny( _matchwildcards ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchSoundsLike() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchSimilarity") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchSimilarity") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchSoundsLike( ::sal_Bool _matchsoundslike ) throw (uno::RuntimeException) { // seems not accurate - mxPropertyReplace->setPropertyValue( OUString("SearchSimilarity"), uno::makeAny( _matchsoundslike ) ); + mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::makeAny( _matchsoundslike ) ); } ::sal_Bool SAL_CALL SwVbaFind::getMatchAllWordForms() throw (uno::RuntimeException) { sal_Bool value = sal_False; - mxPropertyReplace->getPropertyValue( OUString("SearchSimilarity") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchSimilarity") >>= value; if( value ) - mxPropertyReplace->getPropertyValue( OUString("SearchSimilarityRelax") ) >>= value; + mxPropertyReplace->getPropertyValue("SearchSimilarityRelax") >>= value; return value; } void SAL_CALL SwVbaFind::setMatchAllWordForms( ::sal_Bool _matchallwordforms ) throw (uno::RuntimeException) { // seems not accurate - mxPropertyReplace->setPropertyValue( OUString("SearchSimilarity"), uno::makeAny( _matchallwordforms ) ); - mxPropertyReplace->setPropertyValue( OUString("SearchSimilarityRelax"), uno::makeAny( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue("SearchSimilarity", uno::makeAny( _matchallwordforms ) ); + mxPropertyReplace->setPropertyValue("SearchSimilarityRelax", uno::makeAny( _matchallwordforms ) ); } uno::Any SAL_CALL SwVbaFind::getStyle() throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } void SAL_CALL SwVbaFind::setStyle( const uno::Any& /*_style */ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } sal_Bool SAL_CALL diff --git a/sw/source/ui/vba/vbaformfield.cxx b/sw/source/ui/vba/vbaformfield.cxx index 7384dd6a120a..f8e86c210594 100644 --- a/sw/source/ui/vba/vbaformfield.cxx +++ b/sw/source/ui/vba/vbaformfield.cxx @@ -67,7 +67,7 @@ OUString SAL_CALL SwVbaFormField::getResult() throw ( uno::RuntimeException ) } else { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } return sResult; } @@ -87,7 +87,7 @@ void SAL_CALL SwVbaFormField::setResult( const OUString& result ) throw ( uno::R } else { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx index 23d9551d9a84..4072b16ba56e 100644 --- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx +++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx @@ -104,7 +104,7 @@ sal_Bool HeaderFooterHelper::isEvenPagesHeader( const uno::Reference< frame::XMo { uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); sal_Bool isShared = sal_False; - xStyleProps->getPropertyValue( OUString("HeaderIsShared")) >>= isShared; + xStyleProps->getPropertyValue("HeaderIsShared") >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); @@ -169,7 +169,7 @@ sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XMo { uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( xModel ), uno::UNO_QUERY_THROW ); sal_Bool isShared = sal_False; - xStyleProps->getPropertyValue( OUString("FooterIsShared")) >>= isShared; + xStyleProps->getPropertyValue("FooterIsShared") >>= isShared; if( !isShared ) { uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( xModel ), uno::UNO_QUERY_THROW ); diff --git a/sw/source/ui/vba/vbalistformat.cxx b/sw/source/ui/vba/vbalistformat.cxx index bfb58d413e5c..9cd8f49ea24d 100644 --- a/sw/source/ui/vba/vbalistformat.cxx +++ b/sw/source/ui/vba/vbalistformat.cxx @@ -68,17 +68,17 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor if( isFirstElement ) { sal_Bool isNumberingRestart = !bContinuePreviousList; - xProps->setPropertyValue( OUString("ParaIsNumberingRestart"), uno::makeAny( isNumberingRestart ) ); + xProps->setPropertyValue("ParaIsNumberingRestart", uno::makeAny( isNumberingRestart ) ); if( isNumberingRestart ) { sal_Int16 nStartValue = 1; - xProps->setPropertyValue( OUString("NumberingStartValue"), uno::makeAny( nStartValue ) ); + xProps->setPropertyValue("NumberingStartValue", uno::makeAny( nStartValue ) ); } isFirstElement = sal_False; } else { - xProps->setPropertyValue( OUString("ParaIsNumberingRestart"), uno::makeAny( sal_False ) ); + xProps->setPropertyValue("ParaIsNumberingRestart", uno::makeAny( sal_False ) ); } pListTemplate->applyListTemplate( xProps ); } @@ -86,7 +86,7 @@ void SAL_CALL SwVbaListFormat::ApplyListTemplate( const css::uno::Reference< wor void SAL_CALL SwVbaListFormat::ConvertNumbersToText( ) throw (css::uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } OUString diff --git a/sw/source/ui/vba/vbalistgalleries.cxx b/sw/source/ui/vba/vbalistgalleries.cxx index 37ce9015bef2..8d05b7f20028 100644 --- a/sw/source/ui/vba/vbalistgalleries.cxx +++ b/sw/source/ui/vba/vbalistgalleries.cxx @@ -62,7 +62,7 @@ uno::Any SAL_CALL SwVbaListGalleries::Item( const uno::Any& Index1, const uno::A || nIndex == word::WdListGalleryType::wdOutlineNumberGallery ) return uno::makeAny( uno::Reference< word::XListGallery >( new SwVbaListGallery( this, mxContext, mxTextDocument, nIndex ) ) ); } - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index 8cd6c854f62e..837397eb6aea 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -82,25 +82,25 @@ void SwVbaListHelper::Init() throw( css::uno::RuntimeException ) // get the numbering style uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxTextDocument, uno::UNO_QUERY_THROW ); - mxStyleFamily.set( xStyleSupplier->getStyleFamilies()->getByName(OUString( "NumberingStyles" ) ), uno::UNO_QUERY_THROW ); + mxStyleFamily.set( xStyleSupplier->getStyleFamilies()->getByName("NumberingStyles"), uno::UNO_QUERY_THROW ); OSL_TRACE("SwVbaListHelper::Init: numbering style name: %s", OUStringToOString( msStyleName, RTL_TEXTENCODING_UTF8 ).getStr() ); if( mxStyleFamily->hasByName( msStyleName ) ) { mxStyleProps.set( mxStyleFamily->getByName( msStyleName ), uno::UNO_QUERY_THROW ); - mxNumberingRules.set( mxStyleProps->getPropertyValue( OUString( "NumberingRules" ) ), uno::UNO_QUERY_THROW ); + mxNumberingRules.set( mxStyleProps->getPropertyValue("NumberingRules"), uno::UNO_QUERY_THROW ); } else { // create new numbering style uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxTextDocument, uno::UNO_QUERY_THROW ); - mxStyleProps.set( xDocMSF->createInstance( OUString( "com.sun.star.style.NumberingStyle" ) ), uno::UNO_QUERY_THROW ); + mxStyleProps.set( xDocMSF->createInstance("com.sun.star.style.NumberingStyle"), uno::UNO_QUERY_THROW ); // insert this style into style family, or the property NumberingRules doesn't exist. mxStyleFamily->insertByName( msStyleName, uno::makeAny( mxStyleProps ) ); - mxStyleProps->getPropertyValue( OUString( "NumberingRules" ) ) >>= mxNumberingRules; + mxStyleProps->getPropertyValue("NumberingRules") >>= mxNumberingRules; CreateListTemplate(); - mxStyleProps->setPropertyValue( OUString( "NumberingRules" ) , uno::makeAny( mxNumberingRules ) ); + mxStyleProps->setPropertyValue("NumberingRules", uno::makeAny( mxNumberingRules ) ); } } @@ -680,7 +680,7 @@ void SwVbaListHelper::setPropertyValueWithNameAndLevel( sal_Int32 nLevel, const mxNumberingRules->getByIndex( nLevel ) >>= aPropertyValues; setOrAppendPropertyValue( aPropertyValues, sName, aValue ); mxNumberingRules->replaceByIndex( nLevel, uno::makeAny( aPropertyValues ) ); - mxStyleProps->setPropertyValue( OUString( "NumberingRules" ) , uno::makeAny( mxNumberingRules ) ); + mxStyleProps->setPropertyValue("NumberingRules", uno::makeAny( mxNumberingRules ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/vba/vbalistlevel.cxx b/sw/source/ui/vba/vbalistlevel.cxx index 0166b254baa0..72ea2fb902d4 100644 --- a/sw/source/ui/vba/vbalistlevel.cxx +++ b/sw/source/ui/vba/vbalistlevel.cxx @@ -95,12 +95,12 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 _alignment ) throw (uno: uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont() throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } void SAL_CALL SwVbaListLevel::setFont( const uno::Reference< ::ooo::vba::word::XFont >& /*_font*/ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } ::sal_Int32 SAL_CALL SwVbaListLevel::getIndex() throw (uno::RuntimeException) @@ -212,7 +212,7 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float _numberposition ) throw ( } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } return nNumberingType; @@ -285,7 +285,7 @@ void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 _numberstyle ) throw ( } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } diff --git a/sw/source/ui/vba/vbalistlevels.cxx b/sw/source/ui/vba/vbalistlevels.cxx index 81ff8a67c387..a53b6db6a975 100644 --- a/sw/source/ui/vba/vbalistlevels.cxx +++ b/sw/source/ui/vba/vbalistlevels.cxx @@ -63,7 +63,7 @@ uno::Any SAL_CALL SwVbaListLevels::Item( const uno::Any& Index1, const uno::Any& if( ( Index1 >>= nIndex ) == sal_False ) throw uno::RuntimeException(); if( nIndex <=0 || nIndex > getCount() ) - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); return uno::makeAny( uno::Reference< word::XListLevel >( new SwVbaListLevel( this, mxContext, pListHelper, nIndex - 1 ) ) ); } diff --git a/sw/source/ui/vba/vbalisttemplate.cxx b/sw/source/ui/vba/vbalisttemplate.cxx index 122ba191a9b0..d62f5962e8f9 100644 --- a/sw/source/ui/vba/vbalisttemplate.cxx +++ b/sw/source/ui/vba/vbalisttemplate.cxx @@ -45,7 +45,7 @@ SwVbaListTemplate::ListLevels( const uno::Any& index ) throw (uno::RuntimeExcept void SwVbaListTemplate::applyListTemplate( uno::Reference< beans::XPropertySet >& xProps ) throw (uno::RuntimeException) { uno::Reference< container::XIndexReplace > xNumberingRules = pListHelper->getNumberingRules(); - xProps->setPropertyValue( OUString("NumberingRules") , uno::makeAny( xNumberingRules ) ); + xProps->setPropertyValue("NumberingRules", uno::makeAny( xNumberingRules ) ); } OUString diff --git a/sw/source/ui/vba/vbalisttemplates.cxx b/sw/source/ui/vba/vbalisttemplates.cxx index b7ba7fe1256b..d2db3e81cfa1 100644 --- a/sw/source/ui/vba/vbalisttemplates.cxx +++ b/sw/source/ui/vba/vbalisttemplates.cxx @@ -57,7 +57,7 @@ uno::Any SAL_CALL SwVbaListTemplates::Item( const uno::Any& Index1, const uno::A if( ( Index1 >>= nIndex ) == sal_False ) throw uno::RuntimeException(); if( nIndex <=0 || nIndex > getCount() ) - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); return uno::makeAny( uno::Reference< word::XListTemplate >( new SwVbaListTemplate( this, mxContext, mxTextDocument, mnGalleryType, nIndex ) ) ); } diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index b7d3d140c4b8..190d12298e9f 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -59,9 +59,9 @@ void SAL_CALL SwVbaPageSetup::setGutter( double _gutter ) throw (uno::RuntimeExc double SAL_CALL SwVbaPageSetup::getHeaderDistance() throw (uno::RuntimeException) { sal_Bool isHeaderOn = sal_False; - mxPageProps->getPropertyValue( OUString("HeaderIsOn")) >>= isHeaderOn; + mxPageProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue( OUString("HeaderIsOn"), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue("HeaderIsOn", uno::makeAny( sal_True ) ); return VbaPageSetupBase::getHeaderMargin(); } @@ -82,29 +82,29 @@ void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) throw sal_Int32 aktSpacing = 0; sal_Int32 aktHeaderHeight = 0; - mxPageProps->getPropertyValue( OUString("HeaderIsOn")) >>= isHeaderOn; + mxPageProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( !isHeaderOn ) - mxPageProps->setPropertyValue( OUString("HeaderIsOn"), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue("HeaderIsOn", uno::makeAny( sal_True ) ); - mxPageProps->getPropertyValue( OUString("TopMargin")) >>= aktTopMargin; - mxPageProps->getPropertyValue( OUString("HeaderBodyDistance")) >>= aktSpacing; - mxPageProps->getPropertyValue( OUString("HeaderHeight")) >>= aktHeaderHeight; + mxPageProps->getPropertyValue("TopMargin") >>= aktTopMargin; + mxPageProps->getPropertyValue("HeaderBodyDistance") >>= aktSpacing; + mxPageProps->getPropertyValue("HeaderHeight") >>= aktHeaderHeight; sal_Int32 newSpacing = aktSpacing - ( newHeaderDistance - aktTopMargin ); sal_Int32 height = aktHeaderHeight - aktSpacing; sal_Int32 newHeaderHeight = newSpacing + height; - mxPageProps->setPropertyValue( OUString("TopMargin"), uno::makeAny( newHeaderDistance ) ); - mxPageProps->setPropertyValue( OUString("HeaderBodyDistance"), uno::makeAny( newSpacing ) ); - mxPageProps->setPropertyValue( OUString("HeaderHeight"), uno::makeAny( newHeaderHeight ) ); + mxPageProps->setPropertyValue("TopMargin", uno::makeAny( newHeaderDistance ) ); + mxPageProps->setPropertyValue("HeaderBodyDistance", uno::makeAny( newSpacing ) ); + mxPageProps->setPropertyValue("HeaderHeight", uno::makeAny( newHeaderHeight ) ); } double SAL_CALL SwVbaPageSetup::getFooterDistance() throw (uno::RuntimeException) { sal_Bool isFooterOn = sal_False; - mxPageProps->getPropertyValue( OUString("FooterIsOn")) >>= isFooterOn; + mxPageProps->getPropertyValue("FooterIsOn") >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue( OUString("FooterIsOn"), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue("FooterIsOn", uno::makeAny( sal_True ) ); return VbaPageSetupBase::getFooterMargin(); } @@ -116,21 +116,21 @@ void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) throw sal_Int32 aktSpacing = 0; sal_Int32 aktFooterHeight = 0; - mxPageProps->getPropertyValue( OUString("FooterIsOn")) >>= isFooterOn; + mxPageProps->getPropertyValue("FooterIsOn") >>= isFooterOn; if( !isFooterOn ) - mxPageProps->setPropertyValue( OUString("FooterIsOn"), uno::makeAny( sal_True ) ); + mxPageProps->setPropertyValue("FooterIsOn", uno::makeAny( sal_True ) ); - mxPageProps->getPropertyValue( OUString("BottomMargin")) >>= aktBottomMargin; - mxPageProps->getPropertyValue( OUString("FooterBodyDistance")) >>= aktSpacing; - mxPageProps->getPropertyValue( OUString("FooterHeight")) >>= aktFooterHeight; + mxPageProps->getPropertyValue("BottomMargin") >>= aktBottomMargin; + mxPageProps->getPropertyValue("FooterBodyDistance") >>= aktSpacing; + mxPageProps->getPropertyValue("FooterHeight") >>= aktFooterHeight; sal_Int32 newSpacing = aktSpacing - ( newFooterDistance - aktBottomMargin ); sal_Int32 height = aktFooterHeight - aktSpacing; sal_Int32 newFooterHeight = newSpacing + height; - mxPageProps->setPropertyValue( OUString("BottomMargin"), uno::makeAny( newFooterDistance ) ); - mxPageProps->setPropertyValue( OUString("FooterBodyDistance"), uno::makeAny( newSpacing ) ); - mxPageProps->setPropertyValue( OUString("FooterHeight"), uno::makeAny( newFooterHeight ) ); + mxPageProps->setPropertyValue("BottomMargin", uno::makeAny( newFooterDistance ) ); + mxPageProps->setPropertyValue("FooterBodyDistance", uno::makeAny( newSpacing ) ); + mxPageProps->setPropertyValue("FooterHeight", uno::makeAny( newFooterHeight ) ); } sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() throw (uno::RuntimeException) @@ -155,26 +155,26 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); sal_Int32 nTopMargin = 0; - xStyleProps->getPropertyValue( OUString("TopMargin")) >>= nTopMargin; + xStyleProps->getPropertyValue("TopMargin") >>= nTopMargin; sal_Int32 nBottomMargin = 0; - xStyleProps->getPropertyValue( OUString("BottomMargin")) >>= nBottomMargin; + xStyleProps->getPropertyValue("BottomMargin") >>= nBottomMargin; sal_Int32 nLeftMargin = 0; - xStyleProps->getPropertyValue( OUString("LeftMargin")) >>= nLeftMargin; + xStyleProps->getPropertyValue("LeftMargin") >>= nLeftMargin; sal_Int32 nRightMargin = 0; - xStyleProps->getPropertyValue( OUString("RightMargin")) >>= nRightMargin; + xStyleProps->getPropertyValue("RightMargin") >>= nRightMargin; sal_Int32 nHeaderHeight = 0; - xStyleProps->getPropertyValue( OUString("HeaderHeight")) >>= nHeaderHeight; + xStyleProps->getPropertyValue("HeaderHeight") >>= nHeaderHeight; sal_Int32 nFooterHeight = 0; - xStyleProps->getPropertyValue( OUString("FooterHeight")) >>= nFooterHeight; + xStyleProps->getPropertyValue("FooterHeight") >>= nFooterHeight; sal_Bool isHeaderOn = sal_False; - xStyleProps->getPropertyValue( OUString("HeaderIsOn")) >>= isHeaderOn; + xStyleProps->getPropertyValue("HeaderIsOn") >>= isHeaderOn; if( isHeaderOn ) { nTopMargin += nHeaderHeight; nBottomMargin += nFooterHeight; - xStyleProps->setPropertyValue( OUString("HeaderIsOn"), uno::makeAny( sal_False ) ); - xStyleProps->setPropertyValue( OUString("FooterIsOn"), uno::makeAny( sal_False ) ); + xStyleProps->setPropertyValue("HeaderIsOn", uno::makeAny( sal_False ) ); + xStyleProps->setPropertyValue("FooterIsOn", uno::makeAny( sal_False ) ); } uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW ); if( xPageCursor->getPage() != 1 ) @@ -183,21 +183,21 @@ void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status } uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( OUString("TextTable") ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue("TextTable"), uno::UNO_QUERY ); if( xTableProps.is() ) { - xTableProps->setPropertyValue( OUString("PageDescName"), uno::makeAny( newStyle ) ); + xTableProps->setPropertyValue("PageDescName", uno::makeAny( newStyle ) ); } else { - xCursorProps->setPropertyValue( OUString("PageDescName"), uno::makeAny( newStyle ) ); + xCursorProps->setPropertyValue("PageDescName", uno::makeAny( newStyle ) ); } uno::Reference< beans::XPropertySet > xFirstPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); - xFirstPageProps->setPropertyValue( OUString("TopMargin"), uno::makeAny( nTopMargin ) ); - xFirstPageProps->setPropertyValue( OUString("BottomMargin"), uno::makeAny( nBottomMargin ) ); - xFirstPageProps->setPropertyValue( OUString("LeftMargin"), uno::makeAny( nLeftMargin ) ); - xFirstPageProps->setPropertyValue( OUString("RightMargin"), uno::makeAny( nRightMargin ) ); + xFirstPageProps->setPropertyValue("TopMargin", uno::makeAny( nTopMargin ) ); + xFirstPageProps->setPropertyValue("BottomMargin", uno::makeAny( nBottomMargin ) ); + xFirstPageProps->setPropertyValue("LeftMargin", uno::makeAny( nLeftMargin ) ); + xFirstPageProps->setPropertyValue("RightMargin", uno::makeAny( nRightMargin ) ); } OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException) @@ -210,14 +210,14 @@ OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException) } uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW ); - uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( OUString("TextTable") ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue("TextTable"), uno::UNO_QUERY ); if( xTableProps.is() ) { - xTableProps->getPropertyValue( OUString("PageDescName") ) >>= styleFirstPage; + xTableProps->getPropertyValue("PageDescName") >>= styleFirstPage; } else { - xCursorProps->getPropertyValue( OUString("PageDescName") ) >>= styleFirstPage; + xCursorProps->getPropertyValue("PageDescName") >>= styleFirstPage; } return styleFirstPage; } diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx index da478a8ac2f3..abcb5484caba 100644 --- a/sw/source/ui/vba/vbaparagraph.cxx +++ b/sw/source/ui/vba/vbaparagraph.cxx @@ -100,7 +100,7 @@ public: while( xParEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.text.Paragraph") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.Paragraph") ) { nCount++; } @@ -116,7 +116,7 @@ public: while( xParEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.text.Paragraph") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.Paragraph") ) { if( Index == nCount ) return uno::makeAny( xServiceInfo ); diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx index 5f42c697c41c..196240e49ab9 100644 --- a/sw/source/ui/vba/vbaparagraphformat.cxx +++ b/sw/source/ui/vba/vbaparagraphformat.cxx @@ -48,33 +48,33 @@ SwVbaParagraphFormat::~SwVbaParagraphFormat() sal_Int32 SAL_CALL SwVbaParagraphFormat::getAlignment() throw (uno::RuntimeException) { style::ParagraphAdjust aParaAdjust = style::ParagraphAdjust_LEFT; - mxParaProps->getPropertyValue( OUString("ParaAdjust") ) >>= aParaAdjust; + mxParaProps->getPropertyValue("ParaAdjust") >>= aParaAdjust; return getMSWordAlignment( aParaAdjust ); } void SAL_CALL SwVbaParagraphFormat::setAlignment( sal_Int32 _alignment ) throw (uno::RuntimeException) { style::ParagraphAdjust aParaAdjust = ( style::ParagraphAdjust ) getOOoAlignment( _alignment ); - mxParaProps->setPropertyValue( OUString("ParaAdjust"), uno::makeAny( aParaAdjust ) ); + mxParaProps->setPropertyValue("ParaAdjust", uno::makeAny( aParaAdjust ) ); } float SAL_CALL SwVbaParagraphFormat::getFirstLineIndent() throw (uno::RuntimeException) { sal_Int32 indent = 0; - mxParaProps->getPropertyValue( OUString("ParaFirstLineIndent") ) >>= indent; + mxParaProps->getPropertyValue("ParaFirstLineIndent") >>= indent; return (float)( Millimeter::getInPoints( indent ) ); } void SAL_CALL SwVbaParagraphFormat::setFirstLineIndent( float _firstlineindent ) throw (uno::RuntimeException) { sal_Int32 indent = Millimeter::getInHundredthsOfOneMillimeter( _firstlineindent ); - mxParaProps->setPropertyValue( OUString("ParaFirstLineIndent"), uno::makeAny( indent ) ); + mxParaProps->setPropertyValue("ParaFirstLineIndent", uno::makeAny( indent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getKeepTogether() throw (uno::RuntimeException) { sal_Bool bKeep = sal_False; - mxParaProps->getPropertyValue( OUString("ParaKeepTogether") ) >>= bKeep; + mxParaProps->getPropertyValue("ParaKeepTogether") >>= bKeep; return uno::makeAny ( bKeep ); } @@ -83,7 +83,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth sal_Bool bKeep = sal_False; if( _keeptogether >>= bKeep ) { - mxParaProps->setPropertyValue( OUString("ParaKeepTogether"), uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue("ParaKeepTogether", uno::makeAny( bKeep ) ); } else { @@ -94,7 +94,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepTogether( const uno::Any& _keeptogeth uno::Any SAL_CALL SwVbaParagraphFormat::getKeepWithNext() throw (uno::RuntimeException) { sal_Bool bKeep = sal_False; - mxParaProps->getPropertyValue( OUString("ParaSplit") ) >>= bKeep; + mxParaProps->getPropertyValue("ParaSplit") >>= bKeep; return uno::makeAny ( bKeep ); } @@ -103,7 +103,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne sal_Bool bKeep = sal_False; if( _keepwithnext >>= bKeep ) { - mxParaProps->setPropertyValue( OUString("ParaSplit"), uno::makeAny( bKeep ) ); + mxParaProps->setPropertyValue("ParaSplit", uno::makeAny( bKeep ) ); } else { @@ -114,7 +114,7 @@ void SAL_CALL SwVbaParagraphFormat::setKeepWithNext( const uno::Any& _keepwithne uno::Any SAL_CALL SwVbaParagraphFormat::getHyphenation() throw (uno::RuntimeException) { sal_Bool bHypn = sal_False; - mxParaProps->getPropertyValue( OUString("ParaIsHyphenation") ) >>= bHypn; + mxParaProps->getPropertyValue("ParaIsHyphenation") >>= bHypn; return uno::makeAny ( bHypn ); } @@ -123,7 +123,7 @@ void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation sal_Bool bHypn = sal_False; if( _hyphenation >>= bHypn ) { - mxParaProps->setPropertyValue( OUString("ParaIsHyphenation"), uno::makeAny( bHypn ) ); + mxParaProps->setPropertyValue("ParaIsHyphenation", uno::makeAny( bHypn ) ); } else { @@ -134,35 +134,35 @@ void SAL_CALL SwVbaParagraphFormat::setHyphenation( const uno::Any& _hyphenation float SAL_CALL SwVbaParagraphFormat::getLineSpacing() throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( OUString("ParaLineSpacing") ) >>= aLineSpacing; + mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; return getMSWordLineSpacing( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacing( float _linespacing ) throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( OUString("ParaLineSpacing") ) >>= aLineSpacing; + mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; aLineSpacing = getOOoLineSpacing( _linespacing, aLineSpacing.Mode ); - mxParaProps->setPropertyValue( OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue("ParaLineSpacing", uno::makeAny( aLineSpacing ) ); } sal_Int32 SAL_CALL SwVbaParagraphFormat::getLineSpacingRule() throw (uno::RuntimeException) { style::LineSpacing aLineSpacing; - mxParaProps->getPropertyValue( OUString("ParaLineSpacing") ) >>= aLineSpacing; + mxParaProps->getPropertyValue("ParaLineSpacing") >>= aLineSpacing; return getMSWordLineSpacingRule( aLineSpacing ); } void SAL_CALL SwVbaParagraphFormat::setLineSpacingRule( sal_Int32 _linespacingrule ) throw (uno::RuntimeException) { style::LineSpacing aLineSpacing = getOOoLineSpacingFromRule( _linespacingrule ); - mxParaProps->setPropertyValue( OUString("ParaLineSpacing"), uno::makeAny( aLineSpacing ) ); + mxParaProps->setPropertyValue("ParaLineSpacing", uno::makeAny( aLineSpacing ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getNoLineNumber() throw (uno::RuntimeException) { sal_Bool noLineNum = sal_False; - mxParaProps->getPropertyValue( OUString("ParaLineNumberCount") ) >>= noLineNum; + mxParaProps->getPropertyValue("ParaLineNumberCount") >>= noLineNum; return uno::makeAny ( noLineNum ); } @@ -171,7 +171,7 @@ void SAL_CALL SwVbaParagraphFormat::setNoLineNumber( const uno::Any& _nolinenumb sal_Bool noLineNum = sal_False; if( _nolinenumber >>= noLineNum ) { - mxParaProps->setPropertyValue( OUString("ParaLineNumberCount"), uno::makeAny( noLineNum ) ); + mxParaProps->setPropertyValue("ParaLineNumberCount", uno::makeAny( noLineNum ) ); } else { @@ -184,7 +184,7 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel() throw (uno::RuntimeEx sal_Int32 nLevel = word::WdOutlineLevel::wdOutlineLevelBodyText; OUString aHeading; const OUString HEADING = OUString("Heading"); - mxParaProps->getPropertyValue( OUString("ParaStyleName") ) >>= aHeading; + mxParaProps->getPropertyValue("ParaStyleName") >>= aHeading; if( aHeading.indexOf( HEADING ) == 0 ) { // get the sub string after "Heading" @@ -204,7 +204,7 @@ void SAL_CALL SwVbaParagraphFormat::setOutlineLevel( sal_Int32 _outlinelevel ) t uno::Any SAL_CALL SwVbaParagraphFormat::getPageBreakBefore() throw (uno::RuntimeException) { style::BreakType aBreakType; - mxParaProps->getPropertyValue( OUString("BreakType") ) >>= aBreakType; + mxParaProps->getPropertyValue("BreakType") >>= aBreakType; sal_Bool bBreakBefore = ( aBreakType == style::BreakType_PAGE_BEFORE || aBreakType == style::BreakType_PAGE_BOTH ); return uno::makeAny( bBreakBefore ); } @@ -215,7 +215,7 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe if( _breakbefore >>= bBreakBefore ) { style::BreakType aBreakType; - mxParaProps->getPropertyValue( OUString("BreakType") ) >>= aBreakType; + mxParaProps->getPropertyValue("BreakType") >>= aBreakType; if( bBreakBefore ) { if( aBreakType == style::BreakType_NONE ) @@ -230,7 +230,7 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe else if ( aBreakType == style::BreakType_PAGE_BEFORE ) aBreakType = style::BreakType_PAGE_AFTER; } - mxParaProps->setPropertyValue( OUString("BreakType"), uno::makeAny( aBreakType ) ); + mxParaProps->setPropertyValue("BreakType", uno::makeAny( aBreakType ) ); } else { @@ -241,53 +241,53 @@ void SAL_CALL SwVbaParagraphFormat::setPageBreakBefore( const uno::Any& _breakbe float SAL_CALL SwVbaParagraphFormat::getSpaceBefore() throw (uno::RuntimeException) { sal_Int32 nSpace = 0; - mxParaProps->getPropertyValue( OUString("ParaTopMargin") ) >>= nSpace; + mxParaProps->getPropertyValue("ParaTopMargin") >>= nSpace; return (float)( Millimeter::getInPoints( nSpace ) ); } void SAL_CALL SwVbaParagraphFormat::setSpaceBefore( float _space ) throw (uno::RuntimeException) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue( OUString("ParaTopMargin"), uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue("ParaTopMargin", uno::makeAny( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getSpaceAfter() throw (uno::RuntimeException) { sal_Int32 nSpace = 0; - mxParaProps->getPropertyValue( OUString("ParaBottomMargin") ) >>= nSpace; + mxParaProps->getPropertyValue("ParaBottomMargin") >>= nSpace; return (float)( Millimeter::getInPoints( nSpace ) ); } void SAL_CALL SwVbaParagraphFormat::setSpaceAfter( float _space ) throw (uno::RuntimeException) { sal_Int32 nSpace = Millimeter::getInHundredthsOfOneMillimeter( _space ); - mxParaProps->setPropertyValue( OUString("ParaBottomMargin"), uno::makeAny( nSpace ) ); + mxParaProps->setPropertyValue("ParaBottomMargin", uno::makeAny( nSpace ) ); } float SAL_CALL SwVbaParagraphFormat::getLeftIndent() throw (uno::RuntimeException) { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue( OUString("ParaLeftMargin") ) >>= nIndent; + mxParaProps->getPropertyValue("ParaLeftMargin") >>= nIndent; return (float)( Millimeter::getInPoints( nIndent ) ); } void SAL_CALL SwVbaParagraphFormat::setLeftIndent( float _leftindent ) throw (uno::RuntimeException) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _leftindent ); - mxParaProps->setPropertyValue( OUString("ParaLeftMargin"), uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue("ParaLeftMargin", uno::makeAny( nIndent ) ); } float SAL_CALL SwVbaParagraphFormat::getRightIndent() throw (uno::RuntimeException) { sal_Int32 nIndent = 0; - mxParaProps->getPropertyValue( OUString("ParaRightMargin") ) >>= nIndent; + mxParaProps->getPropertyValue("ParaRightMargin") >>= nIndent; return (float)( Millimeter::getInPoints( nIndent ) ); } void SAL_CALL SwVbaParagraphFormat::setRightIndent( float _rightindent ) throw (uno::RuntimeException) { sal_Int32 nIndent = Millimeter::getInHundredthsOfOneMillimeter( _rightindent ); - mxParaProps->setPropertyValue( OUString("ParaRightMargin"), uno::makeAny( nIndent ) ); + mxParaProps->setPropertyValue("ParaRightMargin", uno::makeAny( nIndent ) ); } uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeException) @@ -297,15 +297,15 @@ uno::Any SAL_CALL SwVbaParagraphFormat::getTabStops() throw (uno::RuntimeExcepti void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() throw (uno::RuntimeException) { sal_Int8 nWidow = 0; - mxParaProps->getPropertyValue( OUString("ParaWidows") ) >>= nWidow; + mxParaProps->getPropertyValue("ParaWidows") >>= nWidow; sal_Int8 nOrphan = 0; - mxParaProps->getPropertyValue( OUString("ParaOrphans") ) >>= nOrphan; + mxParaProps->getPropertyValue("ParaOrphans") >>= nOrphan; // if the amount of single lines on one page > 1 and the same of start and end of the paragraph, // true is retured. sal_Bool bWidow = ( nWidow > 1 && nOrphan == nWidow ); @@ -320,8 +320,8 @@ void SAL_CALL SwVbaParagraphFormat::setWidowControl( const uno::Any& _widowcontr if( _widowcontrol >>= bWidow ) { sal_Int8 nControl = bWidow? 2:1; - mxParaProps->setPropertyValue( OUString("ParaWidows"), uno::makeAny( nControl ) ); - mxParaProps->setPropertyValue( OUString("ParaOrphans"), uno::makeAny( nControl ) ); + mxParaProps->setPropertyValue("ParaWidows", uno::makeAny( nControl ) ); + mxParaProps->setPropertyValue("ParaOrphans", uno::makeAny( nControl ) ); } else { @@ -477,7 +477,7 @@ sal_Int32 SwVbaParagraphFormat::getMSWordLineSpacingRule( style::LineSpacing& rL sal_Int16 SwVbaParagraphFormat::getCharHeight() throw (uno::RuntimeException) { float fCharHeight = 0.0; - mxParaProps->getPropertyValue( OUString("CharHeight") ) >>= fCharHeight; + mxParaProps->getPropertyValue("CharHeight") >>= fCharHeight; return (sal_Int16)( Millimeter::getInHundredthsOfOneMillimeter( fCharHeight ) ); } diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 95f275006680..86bbf607bb1e 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -72,7 +72,7 @@ void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, c mxTextCursor = SwVbaRangeHelper::initCursor( rStart, mxText ); if( !mxTextCursor.is() ) - throw uno::RuntimeException( OUString("Fails to create text cursor"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Fails to create text cursor", uno::Reference< uno::XInterface >() ); mxTextCursor->collapseToStart(); if( rEnd.is() ) @@ -207,7 +207,7 @@ void SAL_CALL SwVbaRange::InsertBreak( const uno::Any& _breakType ) throw (uno:: } uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW ); - xProp->setPropertyValue( OUString("BreakType"), uno::makeAny( eBreakType ) ); + xProp->setPropertyValue("BreakType", uno::makeAny( eBreakType ) ); } } @@ -252,17 +252,17 @@ SwVbaRange::getParagraphFormat() throw ( uno::RuntimeException ) void SAL_CALL SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ ) throw ( uno::RuntimeException ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } void SwVbaRange::GetStyleInfo(OUString& aStyleName, OUString& aStyleType ) throw ( uno::RuntimeException ) { uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW ); - if( ( xProp->getPropertyValue( OUString("CharStyleName") ) >>= aStyleName ) && !aStyleName.isEmpty() ) + if( ( xProp->getPropertyValue("CharStyleName") >>= aStyleName ) && !aStyleName.isEmpty() ) { aStyleType = OUString("CharacterStyles"); } - else if( ( xProp->getPropertyValue( OUString("ParaStyleName") ) >>= aStyleName ) && !aStyleName.isEmpty() ) + else if( ( xProp->getPropertyValue("ParaStyleName") >>= aStyleName ) && !aStyleName.isEmpty() ) { aStyleType = OUString("ParagraphStyles"); } @@ -323,10 +323,10 @@ SwVbaRange::PageSetup( ) throw (uno::RuntimeException) uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW ); uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW ); OUString aPageStyleName; - xParaProps->getPropertyValue( OUString("PageStyleName")) >>= aPageStyleName; + xParaProps->getPropertyValue("PageStyleName") >>= aPageStyleName; uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName( OUString("PageStyles") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xPageProps( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW ); return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, xModel, xPageProps ) ) ); } diff --git a/sw/source/ui/vba/vbarow.cxx b/sw/source/ui/vba/vbarow.cxx index 5d3b0eec555b..19868dd7eeaa 100644 --- a/sw/source/ui/vba/vbarow.cxx +++ b/sw/source/ui/vba/vbarow.cxx @@ -47,7 +47,7 @@ uno::Any SAL_CALL SwVbaRow::getHeight() throw (css::uno::RuntimeException) return uno::makeAny( sal_Int32( word::WdConstants::wdUndefined ) ); sal_Int32 nHeight = 0; - mxRowProps->getPropertyValue( OUString("Height") ) >>= nHeight; + mxRowProps->getPropertyValue("Height") >>= nHeight; return uno::makeAny( (float)Millimeter::getInPoints( nHeight ) ); } @@ -57,20 +57,20 @@ void SAL_CALL SwVbaRow::setHeight( const uno::Any& _height ) throw (css::uno::Ru _height >>= height; sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( height ); - mxRowProps->setPropertyValue( OUString("Height"), uno::makeAny( nHeight ) ); + mxRowProps->setPropertyValue("Height", uno::makeAny( nHeight ) ); } ::sal_Int32 SAL_CALL SwVbaRow::getHeightRule() throw (css::uno::RuntimeException) { sal_Bool isAutoHeight = sal_False; - mxRowProps->getPropertyValue( OUString("IsAutoHeight") ) >>= isAutoHeight; + mxRowProps->getPropertyValue("IsAutoHeight") >>= isAutoHeight; return isAutoHeight ? word::WdRowHeightRule::wdRowHeightAuto : word::WdRowHeightRule::wdRowHeightExactly; } void SAL_CALL SwVbaRow::setHeightRule( ::sal_Int32 _heightrule ) throw (css::uno::RuntimeException) { sal_Bool isAutoHeight = ( _heightrule == word::WdRowHeightRule::wdRowHeightAuto ); - mxRowProps->setPropertyValue( OUString("IsAutoHeight"), uno::makeAny( isAutoHeight ) ); + mxRowProps->setPropertyValue("IsAutoHeight", uno::makeAny( isAutoHeight ) ); } void SAL_CALL diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx index 7933f7c2093a..4b51ffb1b72f 100644 --- a/sw/source/ui/vba/vbarows.cxx +++ b/sw/source/ui/vba/vbarows.cxx @@ -79,7 +79,7 @@ SwVbaRows::SwVbaRows( const uno::Reference< XHelperInterface >& xParent, const u { sal_Int16 nAlignment = text::HoriOrientation::LEFT; uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->getPropertyValue( OUString("HoriOrient") ) >>= nAlignment; + xTableProps->getPropertyValue("HoriOrient") >>= nAlignment; sal_Int32 nRet = 0; switch( nAlignment ) { @@ -122,7 +122,7 @@ void SAL_CALL SwVbaRows::setAlignment( ::sal_Int32 _alignment ) throw (uno::Runt } } uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->setPropertyValue( OUString("HoriOrient"), uno::makeAny( nAlignment ) ); + xTableProps->setPropertyValue("HoriOrient", uno::makeAny( nAlignment ) ); } uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() throw (uno::RuntimeException) @@ -133,7 +133,7 @@ uno::Any SAL_CALL SwVbaRows::getAllowBreakAcrossPages() throw (uno::RuntimeExcep { uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW ); sal_Bool bSplit = sal_False; - xRowProps->getPropertyValue( OUString("IsSplitAllowed") ) >>= bSplit; + xRowProps->getPropertyValue("IsSplitAllowed") >>= bSplit; if( index == 0 ) { bAllowBreak = bSplit; @@ -155,7 +155,7 @@ void SAL_CALL SwVbaRows::setAllowBreakAcrossPages( const uno::Any& _allowbreakac for( sal_Int32 index = mnStartRowIndex; index <= mnEndRowIndex; ++index ) { uno::Reference< beans::XPropertySet > xRowProps( xRowsAccess->getByIndex( index ), uno::UNO_QUERY_THROW ); - xRowProps->setPropertyValue( OUString("IsSplitAllowed"), uno::makeAny( bAllowBreak ) ); + xRowProps->setPropertyValue("IsSplitAllowed", uno::makeAny( bAllowBreak ) ); } } @@ -166,8 +166,8 @@ float SAL_CALL SwVbaRows::getSpaceBetweenColumns() throw (uno::RuntimeException) uno::Reference< beans::XPropertySet > xCellProps( xCellRange->getCellByPosition( 0, mnStartRowIndex ), uno::UNO_QUERY_THROW ); sal_Int32 nLeftBorderDistance = 0; sal_Int32 nRightBorderDistance = 0; - xCellProps->getPropertyValue( OUString("LeftBorderDistance") ) >>= nLeftBorderDistance; - xCellProps->getPropertyValue( OUString("RightBorderDistance") ) >>= nRightBorderDistance; + xCellProps->getPropertyValue("LeftBorderDistance") >>= nLeftBorderDistance; + xCellProps->getPropertyValue("RightBorderDistance") >>= nRightBorderDistance; return static_cast< float >( Millimeter::getInPoints( nLeftBorderDistance + nRightBorderDistance ) ); } @@ -183,8 +183,8 @@ void SAL_CALL SwVbaRows::setSpaceBetweenColumns( float _spacebetweencolumns ) th for( sal_Int32 column = 0; column < nColumns; ++column ) { uno::Reference< beans::XPropertySet > xCellProps( xCellRange->getCellByPosition( column, row ), uno::UNO_QUERY_THROW ); - xCellProps->setPropertyValue( OUString("LeftBorderDistance"), uno::makeAny( nSpace ) ); - xCellProps->setPropertyValue( OUString("RightBorderDistance"), uno::makeAny( nSpace ) ); + xCellProps->setPropertyValue("LeftBorderDistance", uno::makeAny( nSpace ) ); + xCellProps->setPropertyValue("RightBorderDistance", uno::makeAny( nSpace ) ); } } } @@ -231,9 +231,9 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE { uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nMargin = 0; - xTableProps->getPropertyValue( OUString("LeftMargin") ) >>= nMargin; + xTableProps->getPropertyValue("LeftMargin") >>= nMargin; nMargin += indent; - xTableProps->setPropertyValue( OUString("LeftMargin"), uno::makeAny( nMargin ) ); + xTableProps->setPropertyValue("LeftMargin", uno::makeAny( nMargin ) ); } void SwVbaRows::setIndentWithAdjustFirstColumn( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) throw (uno::RuntimeException) @@ -255,7 +255,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // calculate the new width and get the proportion between old and new uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nWidth = 0; - xTableProps->getPropertyValue( OUString("Width") ) >>= nWidth; + xTableProps->getPropertyValue("Width") >>= nWidth; sal_Int32 nNewWidth = nWidth - indent; if ((nNewWidth <= 0) || (nWidth <= 0)) { @@ -280,7 +280,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue( OUString("Width"), uno::makeAny( nNewWidth ) ); + xTableProps->setPropertyValue("Width", uno::makeAny( nNewWidth ) ); } void SwVbaRows::setIndentWithAdjustSameWidth( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) throw (uno::RuntimeException) @@ -288,7 +288,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // calculate the new width and get the width of all columns uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nWidth = 0; - xTableProps->getPropertyValue( OUString("Width") ) >>= nWidth; + xTableProps->getPropertyValue("Width") >>= nWidth; sal_Int32 nNewWidth = nWidth - indent; // get all columns, calculate and set the new width of the columns @@ -303,7 +303,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE // set the width and position of the table setIndentWithAdjustNone( indent ); - xTableProps->setPropertyValue( OUString("Width"), uno::makeAny( nNewWidth ) ); + xTableProps->setPropertyValue("Width", uno::makeAny( nNewWidth ) ); } void SAL_CALL SwVbaRows::Select( ) throw (uno::RuntimeException) @@ -323,11 +323,11 @@ uno::Any SAL_CALL SwVbaRows::Item( const uno::Any& Index1, const uno::Any& /*not { if( nIndex <= 0 || nIndex > getCount() ) { - throw lang::IndexOutOfBoundsException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw lang::IndexOutOfBoundsException("Index out of bounds", uno::Reference< uno::XInterface >() ); } return uno::makeAny( uno::Reference< word::XRow >( new SwVbaRow( this, mxContext, mxTextTable, nIndex - 1 ) ) ); } - throw uno::RuntimeException( OUString("Index out of bounds"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Index out of bounds", uno::Reference< uno::XInterface >() ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index 2c9823b980d9..18ef74a5812e 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -65,7 +65,7 @@ public: { uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( mxModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XIndexAccess > xPageStyles( xSytleFamNames->getByName( OUString("PageStyles") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XIndexAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); sal_Int32 nCount = xPageStyles->getCount(); for( sal_Int32 index = 0; index < nCount; ++index ) { @@ -148,7 +148,7 @@ SwVbaSections::PageSetup( ) throw (uno::RuntimeException) uno::Reference< word::XSection > xSection( m_xIndexAccess->getByIndex( 0 ), uno::UNO_QUERY_THROW ); return xSection->PageSetup(); } - throw uno::RuntimeException( OUString("There is no section"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("There is no section", uno::Reference< uno::XInterface >() ); } // XEnumerationAccess diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index d564c43a0343..0bcc9aee8fed 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -81,7 +81,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un { uno::Reference< text::XTextRange > xTextRange; uno::Reference< lang::XServiceInfo > xServiceInfo( mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.text.TextRanges") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.TextRanges") ) { uno::Reference< container::XIndexAccess > xTextRanges( xServiceInfo, uno::UNO_QUERY_THROW ); if( xTextRanges->getCount() > 0 ) @@ -92,7 +92,7 @@ uno::Reference< text::XTextRange > SwVbaSelection::GetSelectedRange() throw ( un } else { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } return xTextRange; } @@ -154,7 +154,7 @@ SwVbaSelection::HomeKey( const uno::Any& _unit, const uno::Any& _extend ) throw } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } @@ -189,7 +189,7 @@ SwVbaSelection::EndKey( const uno::Any& _unit, const uno::Any& _extend ) throw ( } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } @@ -215,7 +215,7 @@ SwVbaSelection::Delete( const uno::Any& _unit, const uno::Any& _count ) throw ( } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } @@ -258,7 +258,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Reference< view::XViewCursor > xViewCursor( mxTextViewCursor, uno::UNO_QUERY_THROW ); if( eDirection == word::MOVE_UP ) @@ -271,7 +271,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } if( word::gotoSelectedObjectAnchor( mxModel ) ) { @@ -287,7 +287,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; if( xTextTable.is() ) { uno::Reference< text::XTextRange > xRange( xTextTable->getCellByName( xTextTableCursor->getRangeName()), uno::UNO_QUERY_THROW ); @@ -311,7 +311,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Reference< text::XParagraphCursor > xParagraphCursor( xTextCursor, uno::UNO_QUERY_THROW ); for( sal_Int32 i=0; i<nCount; i++ ) @@ -326,7 +326,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: { if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN ) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } uno::Reference< text::XWordCursor > xWordCursor( xTextCursor, uno::UNO_QUERY_THROW ); for( sal_Int32 i=0; i<nCount; i++ ) @@ -343,7 +343,7 @@ SwVbaSelection::Move( const uno::Any& _unit, const uno::Any& _count, const uno:: } default: { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } @@ -353,8 +353,8 @@ void SwVbaSelection::NextCell( sal_Int32 nCount, word::E_DIRECTION eDirection ) uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; uno::Reference< table::XCell > xCell; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; - xCursorProps->getPropertyValue( OUString("Cell") ) >>= xCell; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; + xCursorProps->getPropertyValue("Cell") >>= xCell; if( !xTextTable.is() || !xCell.is() ) { DebugHelper::exception(SbERR_BAD_ARGUMENT, OUString()); @@ -362,7 +362,7 @@ void SwVbaSelection::NextCell( sal_Int32 nCount, word::E_DIRECTION eDirection ) } uno::Reference< beans::XPropertySet > xCellProps( xCell, uno::UNO_QUERY_THROW ); OUString aCellName; - xCellProps->getPropertyValue( OUString("CellName") ) >>= aCellName; + xCellProps->getPropertyValue("CellName") >>= aCellName; uno::Reference< text::XTextTableCursor > xTextTableCursor = xTextTable->createCursorByCellName( aCellName ); // move the table cursor switch( eDirection ) @@ -648,11 +648,11 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w if( nPage != 0 ) xPageCursor->jumpToPage( ( sal_Int16 )( nPage ) ); else - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); break; } default: - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } return getRange(); } @@ -691,7 +691,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; if( xTextTable.is() ) result = uno::makeAny( sal_True ); else @@ -735,7 +735,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); OUString aPageStyleName; - xCursorProps->getPropertyValue( OUString("PageStyleName")) >>= aPageStyleName; + xCursorProps->getPropertyValue("PageStyleName") >>= aPageStyleName; bool bFirstPage = false; if ( aPageStyleName == "First Page" ) bFirstPage = true; @@ -764,7 +764,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run break; } default: - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } return result; } @@ -792,7 +792,7 @@ SwVbaSelection::Tables( const uno::Any& aIndex ) throw (uno::RuntimeException) uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; if( xTextTable.is() ) { uno::Reference< css::text::XTextDocument > xTextDoc( mxModel, uno::UNO_QUERY_THROW ); @@ -955,7 +955,7 @@ uno::Reference< text::XTextTable > SwVbaSelection::GetXTextTable() throw( uno::R { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; return xTextTable; } @@ -981,7 +981,7 @@ void SwVbaSelection::GetSelectedCellRange( OUString& sTLName, OUString& sBRName { uno::Reference< beans::XPropertySet > xCursorProps( mxTextViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextTable > xTextTable; - xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextTable; + xCursorProps->getPropertyValue("TextTable") >>= xTextTable; if( !xTextTable.is() ) throw uno::RuntimeException( ); @@ -998,13 +998,13 @@ void SwVbaSelection::GetSelectedCellRange( OUString& sTLName, OUString& sBRName if( sTLName.isEmpty() ) { uno::Reference< table::XCell > xCell; - xCursorProps->getPropertyValue( OUString("Cell") ) >>= xCell; + xCursorProps->getPropertyValue("Cell") >>= xCell; if( !xCell.is() ) { throw uno::RuntimeException( ); } uno::Reference< beans::XPropertySet > xCellProps( xCell, uno::UNO_QUERY_THROW ); - xCellProps->getPropertyValue( OUString("CellName") ) >>= sTLName; + xCellProps->getPropertyValue("CellName") >>= sTLName; } } diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx index ce5cd906af0f..bcf6be337ed0 100644 --- a/sw/source/ui/vba/vbastyle.cxx +++ b/sw/source/ui/vba/vbastyle.cxx @@ -51,14 +51,14 @@ SwVbaStyle::getName() throw (uno::RuntimeException) sal_Int32 SwVbaStyle::getLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps ) throw (uno::RuntimeException) { lang::Locale aLocale; - xTCProps->getPropertyValue( OUString("CharLocale") ) >>= aLocale; + xTCProps->getPropertyValue("CharLocale") >>= aLocale; return LanguageTag( aLocale ).getLanguageType( false); } void SwVbaStyle::setLanguageID( const uno::Reference< beans::XPropertySet >& xTCProps, sal_Int32 _languageid ) throw (uno::RuntimeException) { lang::Locale aLocale = LanguageTag( static_cast<LanguageType>(_languageid) ).getLocale(); - xTCProps->setPropertyValue( OUString("CharLocale"), uno::makeAny( aLocale ) ) ; + xTCProps->setPropertyValue("CharLocale", uno::makeAny( aLocale ) ) ; } ::sal_Int32 SAL_CALL SwVbaStyle::getLanguageID() throw (uno::RuntimeException) @@ -75,9 +75,9 @@ void SAL_CALL SwVbaStyle::setLanguageID( ::sal_Int32 _languageid ) throw (uno::R { sal_Int32 nType = word::WdStyleType::wdStyleTypeParagraph; uno::Reference< lang::XServiceInfo > xServiceInfo( mxStyle, uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.style.ParagraphStyle") ) ) + if( xServiceInfo->supportsService("com.sun.star.style.ParagraphStyle") ) nType = word::WdStyleType::wdStyleTypeParagraph; - else if( xServiceInfo->supportsService( OUString("com.sun.star.style.CharacterStyle") ) ) + else if( xServiceInfo->supportsService("com.sun.star.style.CharacterStyle") ) nType = word::WdStyleType::wdStyleTypeCharacter; else nType = word::WdStyleType::wdStyleTypeList; @@ -106,7 +106,7 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro if( !sStyle.isEmpty() ) { - xParaProps->setPropertyValue( OUString("ParaStyleName"), uno::makeAny( sStyle ) ); + xParaProps->setPropertyValue("ParaStyleName", uno::makeAny( sStyle ) ); return; } @@ -116,13 +116,13 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro OUString SAL_CALL SwVbaStyle::getNameLocal() throw (uno::RuntimeException) { OUString sNameLocal; - mxStyleProps->getPropertyValue( OUString("DisplayName") ) >>= sNameLocal; + mxStyleProps->getPropertyValue("DisplayName") >>= sNameLocal; return sNameLocal; } void SAL_CALL SwVbaStyle::setNameLocal( const OUString& _namelocal ) throw (uno::RuntimeException) { - mxStyleProps->setPropertyValue( OUString("DisplayName"), uno::makeAny( _namelocal ) ); + mxStyleProps->setPropertyValue("DisplayName", uno::makeAny( _namelocal ) ); } uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat() throw (uno::RuntimeException) @@ -141,20 +141,20 @@ uno::Reference< word::XParagraphFormat > SAL_CALL SwVbaStyle::getParagraphFormat ::sal_Bool SAL_CALL SwVbaStyle::getAutomaticallyUpdate() throw (uno::RuntimeException) { sal_Bool isAutoUpdate = sal_False; - mxStyleProps->getPropertyValue( OUString("IsAutoUpdate") ) >>= isAutoUpdate; + mxStyleProps->getPropertyValue("IsAutoUpdate") >>= isAutoUpdate; return isAutoUpdate; } void SAL_CALL SwVbaStyle::setAutomaticallyUpdate( ::sal_Bool _automaticallyupdate ) throw (uno::RuntimeException) { - mxStyleProps->setPropertyValue( OUString("IsAutoUpdate"), uno::makeAny( _automaticallyupdate ) ); + mxStyleProps->setPropertyValue("IsAutoUpdate", uno::makeAny( _automaticallyupdate ) ); } uno::Any SAL_CALL SwVbaStyle::getBaseStyle() throw (uno::RuntimeException) { // ParentStyle OUString sBaseStyle; - mxStyleProps->getPropertyValue( OUString("ParentStyle") ) >>= sBaseStyle; + mxStyleProps->getPropertyValue("ParentStyle") >>= sBaseStyle; if( !sBaseStyle.isEmpty() ) { uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) ); @@ -173,7 +173,7 @@ void SAL_CALL SwVbaStyle::setBaseStyle( const uno::Any& _basestyle ) throw (uno: if( xStyle.is() ) { OUString sBaseStyle = xStyle->getName(); - mxStyleProps->setPropertyValue( OUString("ParentStyle"), uno::makeAny( sBaseStyle ) ); + mxStyleProps->setPropertyValue("ParentStyle", uno::makeAny( sBaseStyle ) ); } else { @@ -185,7 +185,7 @@ uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() throw (uno::RuntimeExcepti { //FollowStyle OUString sFollowStyle; - mxStyleProps->getPropertyValue( OUString("FollowStyle") ) >>= sFollowStyle; + mxStyleProps->getPropertyValue("FollowStyle") >>= sFollowStyle; if( !sFollowStyle.isEmpty() ) { uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) ); @@ -204,7 +204,7 @@ void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphs if( xStyle.is() ) { OUString sFollowStyle = xStyle->getName(); - mxStyleProps->setPropertyValue( OUString("FollowStyle"), uno::makeAny( sFollowStyle ) ); + mxStyleProps->setPropertyValue("FollowStyle", uno::makeAny( sFollowStyle ) ); } else { @@ -215,7 +215,7 @@ void SAL_CALL SwVbaStyle::setNextParagraphStyle( const uno::Any& _nextparagraphs ::sal_Int32 SAL_CALL SwVbaStyle::getListLevelNumber() throw (uno::RuntimeException) { sal_Int16 nNumberingLevel = 0; - mxStyleProps->getPropertyValue( OUString("NumberingLevel") ) >>= nNumberingLevel; + mxStyleProps->getPropertyValue("NumberingLevel") >>= nNumberingLevel; return nNumberingLevel; } diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx index 8c3d66ca1b3c..728dcea48965 100644 --- a/sw/source/ui/vba/vbastyles.cxx +++ b/sw/source/ui/vba/vbastyles.cxx @@ -171,7 +171,7 @@ public: // we only concern about the Paragraph styles uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( _xModel, uno::UNO_QUERY_THROW); uno::Reference< container::XNameAccess > xStyleFamilies = xStyleSupplier->getStyleFamilies(); - mxParaStyles.set( xStyleFamilies->getByName( OUString("ParagraphStyles") ), uno::UNO_QUERY_THROW ); + mxParaStyles.set( xStyleFamilies->getByName("ParagraphStyles"), uno::UNO_QUERY_THROW ); } // XElementAccess virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return style::XStyle::static_type(0); } @@ -243,7 +243,7 @@ public: // XEnumerationAccess virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException) { - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } }; @@ -333,14 +333,14 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno:: // set the property "NumberingStyleName" if it is a listbullet if( pTable->wdStyleType == word::WdStyleType::wdStyleTypeList ) { - xStyleProps->setPropertyValue( OUString("NumberingStyleName"), uno::makeAny( aStyleName ) ); + xStyleProps->setPropertyValue("NumberingStyleName", uno::makeAny( aStyleName ) ); } return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, mxModel, xStyleProps ) ) ); } else { OSL_TRACE("SwVbaStyles::Item: the builtin style type is not implemented"); - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); } } } diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 6953bfad1743..b6402bda3af9 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -118,7 +118,7 @@ uno::Any PrivateProfileStringListener::getValueEvent() return uno::makeAny( sValue ); #else - throw uno::RuntimeException( OUString("Only support on Windows"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Only support on Windows", uno::Reference< uno::XInterface >() ); #endif } @@ -161,7 +161,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value ) } return; #else - throw uno::RuntimeException( OUString("Not implemented"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() ); #endif } @@ -229,7 +229,7 @@ SwVbaSystem::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException) break; } default: - throw uno::RuntimeException( OUString("Unknown value for Cursor pointer"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Unknown value for Cursor pointer", uno::Reference< uno::XInterface >() ); // TODO: isn't this a flaw in the API? It should be allowed to throw an // IllegalArgumentException, or so } diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 04baf9f5c4df..81c640ea6842 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -125,14 +125,14 @@ sal_Int32 SwVbaTableHelper::getTableWidth( ) throw (uno::RuntimeException) sal_Int32 nWidth = 0; sal_Bool isWidthRelatvie = sal_False; uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); - xTableProps->getPropertyValue( OUString("IsWidthRelative") ) >>= isWidthRelatvie; + xTableProps->getPropertyValue("IsWidthRelative") >>= isWidthRelatvie; if( isWidthRelatvie ) { - xTableProps->getPropertyValue( OUString("RelativeWidth") ) >>= nWidth; + xTableProps->getPropertyValue("RelativeWidth") >>= nWidth; } else { - xTableProps->getPropertyValue( OUString("Width") ) >>= nWidth; + xTableProps->getPropertyValue("Width") >>= nWidth; } return nWidth; } diff --git a/sw/source/ui/vba/vbatableofcontents.cxx b/sw/source/ui/vba/vbatableofcontents.cxx index 9e34d29f3a0a..fda2e0e95acf 100644 --- a/sw/source/ui/vba/vbatableofcontents.cxx +++ b/sw/source/ui/vba/vbatableofcontents.cxx @@ -38,13 +38,13 @@ SwVbaTableOfContents::~SwVbaTableOfContents() ::sal_Int32 SAL_CALL SwVbaTableOfContents::getLowerHeadingLevel() throw (uno::RuntimeException) { sal_Int16 nLevel = 0; - mxTocProps->getPropertyValue(OUString("Level") ) >>= nLevel; + mxTocProps->getPropertyValue("Level") >>= nLevel; return nLevel; } void SAL_CALL SwVbaTableOfContents::setLowerHeadingLevel( ::sal_Int32 _lowerheadinglevel ) throw (uno::RuntimeException) { - mxTocProps->setPropertyValue( OUString("Level"), uno::makeAny( sal_Int8( _lowerheadinglevel ) ) ); + mxTocProps->setPropertyValue("Level", uno::makeAny( sal_Int8( _lowerheadinglevel ) ) ); } ::sal_Int32 SAL_CALL SwVbaTableOfContents::getTabLeader() throw (uno::RuntimeException) @@ -61,25 +61,25 @@ void SAL_CALL SwVbaTableOfContents::setTabLeader( ::sal_Int32 /*_tableader*/ ) t ::sal_Bool SAL_CALL SwVbaTableOfContents::getUseFields() throw (css::uno::RuntimeException) { sal_Bool bUseFields = sal_False; - mxTocProps->getPropertyValue(OUString("CreateFromMarks") ) >>= bUseFields; + mxTocProps->getPropertyValue("CreateFromMarks") >>= bUseFields; return bUseFields; } void SAL_CALL SwVbaTableOfContents::setUseFields( ::sal_Bool _useFields ) throw (css::uno::RuntimeException) { - mxTocProps->setPropertyValue( OUString("CreateFromMarks"), uno::makeAny( _useFields ) ); + mxTocProps->setPropertyValue("CreateFromMarks", uno::makeAny( _useFields ) ); } ::sal_Bool SAL_CALL SwVbaTableOfContents::getUseOutlineLevels() throw (css::uno::RuntimeException) { sal_Bool bUseOutlineLevels = sal_False; - mxTocProps->getPropertyValue(OUString("CreateFromOutline") ) >>= bUseOutlineLevels; + mxTocProps->getPropertyValue("CreateFromOutline") >>= bUseOutlineLevels; return bUseOutlineLevels; } void SAL_CALL SwVbaTableOfContents::setUseOutlineLevels( ::sal_Bool _useOutlineLevels ) throw (css::uno::RuntimeException) { - mxTocProps->setPropertyValue( OUString("CreateFromOutline"), uno::makeAny( _useOutlineLevels ) ); + mxTocProps->setPropertyValue("CreateFromOutline", uno::makeAny( _useOutlineLevels ) ); } void SAL_CALL SwVbaTableOfContents::Delete( ) throw (uno::RuntimeException) diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx index ac7215b5bac7..f08b965044bd 100644 --- a/sw/source/ui/vba/vbatables.cxx +++ b/sw/source/ui/vba/vbatables.cxx @@ -177,7 +177,7 @@ SwVbaTables::Add( const uno::Reference< word::XRange >& Range, const uno::Any& N uno::Reference< text::XTextRange > xTextRange = pVbaRange->getXTextRange(); uno::Reference< text::XTextTable > xTable; - xTable.set( xMsf->createInstance( OUString("com.sun.star.text.TextTable") ), uno::UNO_QUERY_THROW ); + xTable.set( xMsf->createInstance("com.sun.star.text.TextTable"), uno::UNO_QUERY_THROW ); xTable->initialize( nRows, nCols ); uno::Reference< text::XText > xText = xTextRange->getText(); diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx index 656259e6887a..cf6e36d4961f 100644 --- a/sw/source/ui/vba/vbatablesofcontents.cxx +++ b/sw/source/ui/vba/vbatablesofcontents.cxx @@ -112,11 +112,11 @@ uno::Reference< word::XTableOfContents > SAL_CALL SwVbaTablesOfContents::Add( const uno::Reference< word::XRange >& Range, const uno::Any& /*UseHeadingStyles*/, const uno::Any& /*UpperHeadingLevel*/, const uno::Any& LowerHeadingLevel, const uno::Any& UseFields, const uno::Any& /*TableID*/, const uno::Any& /*RightAlignPageNumbers*/, const uno::Any& /*IncludePageNumbers*/, const uno::Any& /*AddedStyles*/, const uno::Any& /*UseHyperlinks*/, const uno::Any& /*HidePageNumbersInWeb*/, const uno::Any& /*UseOutlineLevels*/ ) throw (uno::RuntimeException) { uno::Reference< lang::XMultiServiceFactory > xDocMSF( mxTextDocument, uno::UNO_QUERY_THROW ); - uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance( OUString("com.sun.star.text.ContentIndex") ), uno::UNO_QUERY_THROW ); + uno::Reference< text::XDocumentIndex > xDocumentIndex( xDocMSF->createInstance("com.sun.star.text.ContentIndex"), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xTocProps( xDocumentIndex, uno::UNO_QUERY_THROW ); sal_Bool isProtected = sal_False; - xTocProps->setPropertyValue( OUString("IsProtected"), uno::makeAny( isProtected ) ); + xTocProps->setPropertyValue("IsProtected", uno::makeAny( isProtected ) ); uno::Reference< word::XTableOfContents > xToc( new SwVbaTableOfContents( this, mxContext, mxTextDocument, xDocumentIndex ) ); diff --git a/sw/source/ui/vba/vbatabstops.cxx b/sw/source/ui/vba/vbatabstops.cxx index 0af68076fccc..bdacbe2908ff 100644 --- a/sw/source/ui/vba/vbatabstops.cxx +++ b/sw/source/ui/vba/vbatabstops.cxx @@ -28,13 +28,13 @@ using namespace ::com::sun::star; static uno::Sequence< style::TabStop > lcl_getTabStops( const uno::Reference< beans::XPropertySet >& xParaProps ) throw (uno::RuntimeException) { uno::Sequence< style::TabStop > aSeq; - xParaProps->getPropertyValue( OUString("ParaTabStops") ) >>= aSeq; + xParaProps->getPropertyValue("ParaTabStops") >>= aSeq; return aSeq; } static void lcl_setTabStops( const uno::Reference< beans::XPropertySet >& xParaProps, const uno::Sequence< style::TabStop >& aSeq ) throw (uno::RuntimeException) { - xParaProps->setPropertyValue( OUString("ParaTabStops"), uno::makeAny( aSeq ) ); + xParaProps->setPropertyValue("ParaTabStops", uno::makeAny( aSeq ) ); } typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > TabStopCollectionHelper_Base; diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index 9abe53aebcee..18f5be8e8d1f 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -105,7 +105,7 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeExcep } else { - throw uno::RuntimeException( OUString("Auto Text Entry doesn't exist"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Auto Text Entry doesn't exist", uno::Reference< uno::XInterface >() ); } uno::Reference< XCollection > xCol( new SwVbaAutoTextEntries( this, mxContext, xGroup ) ); diff --git a/sw/source/ui/vba/vbavariable.cxx b/sw/source/ui/vba/vbavariable.cxx index 780bb08fadfc..0f2ef343533a 100644 --- a/sw/source/ui/vba/vbavariable.cxx +++ b/sw/source/ui/vba/vbavariable.cxx @@ -44,7 +44,7 @@ SwVbaVariable::getName() throw ( css::uno::RuntimeException ) void SAL_CALL SwVbaVariable::setName( const OUString& ) throw ( css::uno::RuntimeException ) { - throw uno::RuntimeException( OUString(" Fail to set name"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(" Fail to set name", uno::Reference< uno::XInterface >() ); } uno::Any SAL_CALL diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx index 483254bd9f10..8a3fa43f7a13 100644 --- a/sw/source/ui/vba/vbaview.cxx +++ b/sw/source/ui/vba/vbaview.cxx @@ -71,7 +71,7 @@ SwVbaView::getSeekView() throw (css::uno::RuntimeException) uno::Reference< text::XText > xCurrentText = mxViewCursor->getText(); uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextContent > xTextContent; - while( xCursorProps->getPropertyValue( OUString("TextTable") ) >>= xTextContent ) + while( xCursorProps->getPropertyValue("TextTable") >>= xTextContent ) { xCurrentText = xTextContent->getAnchor()->getText(); xCursorProps.set( xCurrentText->createTextCursor(), uno::UNO_QUERY_THROW ); @@ -105,7 +105,7 @@ SwVbaView::getSeekView() throw (css::uno::RuntimeException) } else if ( aImplName == "SwXFootnote" ) { - if( xServiceInfo->supportsService( OUString("com.sun.star.text.Endnote") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.Endnote") ) return word::WdSeekView::wdSeekEndnotes; else return word::WdSeekView::wdSeekFootnotes; @@ -193,14 +193,14 @@ SwVbaView::setSplitSpecial( ::sal_Int32/* _splitspecial */) throw (css::uno::Run SwVbaView::getTableGridLines() throw (css::uno::RuntimeException) { sal_Bool bShowTableGridLine = sal_False; - mxViewSettings->getPropertyValue( OUString("ShowTableBoundaries")) >>= bShowTableGridLine; + mxViewSettings->getPropertyValue("ShowTableBoundaries") >>= bShowTableGridLine; return bShowTableGridLine; } void SAL_CALL SwVbaView::setTableGridLines( ::sal_Bool _tablegridlines ) throw (css::uno::RuntimeException) { - mxViewSettings->setPropertyValue( OUString("ShowTableBoundaries"), uno::makeAny( _tablegridlines ) ); + mxViewSettings->setPropertyValue("ShowTableBoundaries", uno::makeAny( _tablegridlines ) ); } ::sal_Int32 SAL_CALL @@ -208,7 +208,7 @@ SwVbaView::getType() throw (css::uno::RuntimeException) { // FIXME: handle wdPrintPreview type sal_Bool bOnlineLayout = sal_False; - mxViewSettings->getPropertyValue( OUString("ShowOnlineLayout")) >>= bOnlineLayout; + mxViewSettings->getPropertyValue("ShowOnlineLayout") >>= bOnlineLayout; return bOnlineLayout ? word::WdViewType::wdWebView : word::WdViewType::wdPrintView; } @@ -221,12 +221,12 @@ SwVbaView::setType( ::sal_Int32 _type ) throw (css::uno::RuntimeException) case word::WdViewType::wdPrintView: case word::WdViewType::wdNormalView: { - mxViewSettings->setPropertyValue( OUString("ShowOnlineLayout"), uno::makeAny( sal_False ) ); + mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::makeAny( sal_False ) ); break; } case word::WdViewType::wdWebView: { - mxViewSettings->setPropertyValue( OUString("ShowOnlineLayout"), uno::makeAny( sal_True ) ); + mxViewSettings->setPropertyValue("ShowOnlineLayout", uno::makeAny( sal_True ) ); break; } case word::WdViewType::wdPrintPreview: @@ -303,7 +303,7 @@ uno::Reference< text::XTextRange > SwVbaView::getHFTextRange( sal_Int32 nType ) // an even page number uno::Reference< beans::XPropertySet > xCursorProps( mxViewCursor, uno::UNO_QUERY_THROW ); OUString aPageStyleName; - xCursorProps->getPropertyValue( OUString("PageStyleName")) >>= aPageStyleName; + xCursorProps->getPropertyValue("PageStyleName") >>= aPageStyleName; if ( aPageStyleName == "First Page" ) { // go to the beginning of where the next style is used diff --git a/sw/source/ui/vba/vbawindow.cxx b/sw/source/ui/vba/vbawindow.cxx index 611299a19c05..9649402606f1 100644 --- a/sw/source/ui/vba/vbawindow.cxx +++ b/sw/source/ui/vba/vbawindow.cxx @@ -108,7 +108,7 @@ SwVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE else if (nwindowState == word::WdWindowState::wdWindowStateNormal) pWork -> Restore(); else - throw uno::RuntimeException( OUString( "Invalid Parameter" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("Invalid Parameter", uno::Reference< uno::XInterface >() ); } } diff --git a/sw/source/ui/vba/vbawrapformat.cxx b/sw/source/ui/vba/vbawrapformat.cxx index efd8c282e861..eabbd835ac00 100644 --- a/sw/source/ui/vba/vbawrapformat.cxx +++ b/sw/source/ui/vba/vbawrapformat.cxx @@ -62,13 +62,13 @@ void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException) case word::WdWrapType::wdWrapSquare: { eTextMode = text::WrapTextMode_PARALLEL; - m_xPropertySet->setPropertyValue( OUString("SurroundContour"), uno::makeAny( sal_False ) ); + m_xPropertySet->setPropertyValue("SurroundContour", uno::makeAny( sal_False ) ); break; } case word::WdWrapType::wdWrapTight: { eTextMode = text::WrapTextMode_PARALLEL; - m_xPropertySet->setPropertyValue( OUString("SurroundContour"), uno::makeAny( sal_True ) ); + m_xPropertySet->setPropertyValue("SurroundContour", uno::makeAny( sal_True ) ); break; } default: @@ -77,14 +77,14 @@ void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException) } } } - m_xPropertySet->setPropertyValue( OUString("TextWrap"), uno::makeAny( eTextMode ) ); + m_xPropertySet->setPropertyValue("TextWrap", uno::makeAny( eTextMode ) ); } ::sal_Int32 SAL_CALL SwVbaWrapFormat::getType() throw (uno::RuntimeException) { sal_Int32 nType = word::WdWrapType::wdWrapSquare; text::WrapTextMode eTextMode; - m_xPropertySet->getPropertyValue( OUString("TextWrap")) >>= eTextMode; + m_xPropertySet->getPropertyValue("TextWrap") >>= eTextMode; switch( eTextMode ) { case text::WrapTextMode_NONE: @@ -100,7 +100,7 @@ void SwVbaWrapFormat::makeWrap() throw (uno::RuntimeException) case text::WrapTextMode_PARALLEL: { sal_Bool bContour = sal_False; - m_xPropertySet->getPropertyValue( OUString("SurroundContour")) >>= bContour; + m_xPropertySet->getPropertyValue("SurroundContour") >>= bContour; if( bContour ) nType = word::WdWrapType::wdWrapTight; else @@ -132,7 +132,7 @@ void SAL_CALL SwVbaWrapFormat::setType( ::sal_Int32 _type ) throw (uno::RuntimeE { sal_Int32 nSide = word::WdWrapSideType::wdWrapBoth; text::WrapTextMode eTextMode; - m_xPropertySet->getPropertyValue( OUString("TextWrap")) >>= eTextMode; + m_xPropertySet->getPropertyValue("TextWrap") >>= eTextMode; switch( eTextMode ) { case text::WrapTextMode_LEFT: diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx index 28d714b3b079..910ac525adce 100644 --- a/sw/source/ui/vba/wordvbahelper.cxx +++ b/sw/source/ui/vba/wordvbahelper.cxx @@ -73,10 +73,10 @@ uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xProps ) throw (uno::RuntimeException) { OUString aPageStyleName; - xProps->getPropertyValue( OUString("PageStyleName")) >>= aPageStyleName; + xProps->getPropertyValue("PageStyleName") >>= aPageStyleName; uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName( OUString("PageStyles") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW ); uno::Reference< style::XStyle > xStyle( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW ); return xStyle; @@ -93,8 +93,8 @@ uno::Reference< style::XStyle > getDefaultParagraphStyle( const uno::Reference< { uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW ); uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xParaStyles( xSytleFamNames->getByName( OUString("ParagraphStyles") ), uno::UNO_QUERY_THROW ); - uno::Reference< style::XStyle > xStyle( xParaStyles->getByName( OUString("Standard") ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xParaStyles( xSytleFamNames->getByName("ParagraphStyles"), uno::UNO_QUERY_THROW ); + uno::Reference< style::XStyle > xStyle( xParaStyles->getByName("Standard"), uno::UNO_QUERY_THROW ); return xStyle; } @@ -108,7 +108,7 @@ uno::Reference< text::XTextRange > getFirstObjectPosition( const uno::Reference< if( xParaEnum->hasMoreElements() ) { uno::Reference< lang::XServiceInfo > xServiceInfo( xParaEnum->nextElement(), uno::UNO_QUERY_THROW ); - if( xServiceInfo->supportsService( OUString("com.sun.star.text.TextTable") ) ) + if( xServiceInfo->supportsService("com.sun.star.text.TextTable") ) { uno::Reference< table::XCellRange > xCellRange( xServiceInfo, uno::UNO_QUERY_THROW ); uno::Reference< text::XText> xFirstCellText( xCellRange->getCellByPosition(0, 0), uno::UNO_QUERY_THROW ); @@ -149,14 +149,14 @@ uno::Reference< text::XText > getCurrentXText( const uno::Reference< frame::XMod //catch exception "no text selection" } uno::Reference< beans::XPropertySet > xVCProps( xTextRange, uno::UNO_QUERY_THROW ); - while( xVCProps->getPropertyValue( OUString("TextTable") ) >>= xTextContent ) + while( xVCProps->getPropertyValue("TextTable") >>= xTextContent ) { xText = xTextContent->getAnchor()->getText(); xVCProps.set( xText->createTextCursor(), uno::UNO_QUERY_THROW ); } if( !xText.is() ) - throw uno::RuntimeException( OUString( "no text selection" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("no text selection", uno::Reference< uno::XInterface >() ); return xText; } diff --git a/sw/source/ui/wrtsh/navmgr.cxx b/sw/source/ui/wrtsh/navmgr.cxx index c140ade33f40..cb4fc1b6cd07 100644 --- a/sw/source/ui/wrtsh/navmgr.cxx +++ b/sw/source/ui/wrtsh/navmgr.cxx @@ -207,7 +207,7 @@ bool SwNavigationMgr::addEntry(const SwPosition& rPos) { if (xPropSet.is()) { css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; - css::uno::Any aValue = xPropSet->getPropertyValue( OUString( "LayoutManager" ) ); + css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager"); aValue >>= xLayoutManager; if (xLayoutManager.is()) diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 87e126b98a61..7ad48a33a788 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -481,7 +481,7 @@ sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyF { try { - xSet->setPropertyValue( OUString("Formula"), uno::makeAny( OUString( aMathData ) ) ); + xSet->setPropertyValue("Formula", uno::makeAny( OUString( aMathData ) ) ); bActivate = sal_False; } catch (const uno::Exception&) @@ -534,12 +534,12 @@ sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyF svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj ); uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY ); if ( xProps.is() && - ( xProps->getPropertyValue( OUString( "DisableDataTableDialog" ) ) >>= bDisableDataTableDialog ) && + ( xProps->getPropertyValue("DisableDataTableDialog") >>= bDisableDataTableDialog ) && bDisableDataTableDialog ) { - xProps->setPropertyValue( OUString( "DisableDataTableDialog" ), + xProps->setPropertyValue("DisableDataTableDialog", uno::makeAny( sal_False ) ); - xProps->setPropertyValue( OUString( "DisableComplexChartTypes" ), + xProps->setPropertyValue("DisableComplexChartTypes", uno::makeAny( sal_False ) ); uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY ); if ( xModifiable.is() ) diff --git a/test/source/sheet/tableautoformatfield.cxx b/test/source/sheet/tableautoformatfield.cxx index e0a3135b4f6c..ebcc50d26c89 100644 --- a/test/source/sheet/tableautoformatfield.cxx +++ b/test/source/sheet/tableautoformatfield.cxx @@ -18,7 +18,7 @@ namespace apitest { uno::Reference< beans::XPropertySet > TableAutoFormatField::initTest() { - uno::Reference< container::XIndexAccess > xAutoFormatFields( getServiceFactory()->createInstance(OUString("com.sun.star.sheet.TableAutoFormats")), UNO_QUERY_THROW ); + uno::Reference< container::XIndexAccess > xAutoFormatFields( getServiceFactory()->createInstance("com.sun.star.sheet.TableAutoFormats"), UNO_QUERY_THROW ); CPPUNIT_ASSERT(xAutoFormatFields.is()); uno::Reference< container::XIndexAccess > xIndex( xAutoFormatFields->getByIndex(0), UNO_QUERY_THROW ); CPPUNIT_ASSERT(xIndex.is()); diff --git a/test/source/sheet/xdatapilottable2.cxx b/test/source/sheet/xdatapilottable2.cxx index ce78ccc82b3e..a309e2479e76 100644 --- a/test/source/sheet/xdatapilottable2.cxx +++ b/test/source/sheet/xdatapilottable2.cxx @@ -224,7 +224,7 @@ void XDataPilotTable2::buildDataFields( uno::Reference< sheet::XDataPilotTable2 for( sal_Int32 i = 0; i < nFieldCount; ++i) { uno::Reference< beans::XPropertySet > xPropSet(xIndex->getByIndex(i), UNO_QUERY_THROW); - Any aAny = xPropSet->getPropertyValue(OUString("Orientation")); + Any aAny = xPropSet->getPropertyValue("Orientation"); sheet::DataPilotFieldOrientation aOrientation; CPPUNIT_ASSERT( aAny >>= aOrientation ); diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx index caa3552dd221..214ed174ec2e 100644 --- a/test/source/unoapi_test.cxx +++ b/test/source/unoapi_test.cxx @@ -28,7 +28,7 @@ void UnoApiTest::setUp() // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure, // which is a private symbol to us, gets called m_xCalcComponent = - getMultiServiceFactory()->createInstance(OUString("com.sun.star.comp.Calc.SpreadsheetDocument")); + getMultiServiceFactory()->createInstance("com.sun.star.comp.Calc.SpreadsheetDocument"); CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is()); mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) ); } diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx index 9c1413f5bdb9..1b48a730bab9 100644 --- a/testtools/source/performance/ubtest.cxx +++ b/testtools/source/performance/ubtest.cxx @@ -479,7 +479,7 @@ Reference< XInterface > TestImpl::getDirect() OUString("com.sun.star.comp.performance.PerformanceTestObject"), _xSMgr, Reference< XRegistryKey >() ) ); if (! xFac.is()) - throw RuntimeException( OUString("no test object available!"), Reference< XInterface >() ); + throw RuntimeException("no test object available!", Reference< XInterface >() ); _xDirect = xFac->createInstance(); } } @@ -566,7 +566,7 @@ static void benchmark( { Reference< XPerformanceTest > xBench( xInstance, UNO_QUERY ); if (! xBench.is()) - throw RuntimeException( OUString("illegal test object!"), Reference< XInterface >() ); + throw RuntimeException("illegal test object!", Reference< XInterface >() ); sal_Int64 i; sal_uInt32 tStart, tEnd; @@ -1060,14 +1060,14 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) // pseudo mapping uno<->uno: does nothing! Mapping aMapping( aCppEnv.get(), aAnoCppEnv.get(), OUString("pseudo") ); if (! aMapping.is()) - throw RuntimeException( OUString("no pseudo mapping available!"), Reference< XInterface >() ); + throw RuntimeException("no pseudo mapping available!", Reference< XInterface >() ); Reference< XInterface > xMapped; Reference< XInterface > xDirect( getDirect() ); aMapping.mapInterface( reinterpret_cast< void ** >( &xMapped ), xDirect.get(), ::getCppuType( &xDirect ) ); if (! xMapped.is()) - throw RuntimeException( OUString("mapping object failed!"), Reference< XInterface >() ); + throw RuntimeException("mapping object failed!", Reference< XInterface >() ); sal_uInt32 nStart = getSystemTicks(); benchmark( aSheets[ "mapped in process" ], xMapped, nLoop / 100 ); @@ -1082,7 +1082,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) // start server process oslSecurity hSecurity = osl_getCurrentSecurity(); if (! hSecurity) - throw RuntimeException( OUString("cannot get current security handle!"), Reference< XInterface >() ); + throw RuntimeException("cannot get current security handle!", Reference< XInterface >() ); OUString aArgs[] = { OUString("-c"), @@ -1129,7 +1129,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) osl_freeSecurityHandle( hSecurity ); if (! hProcess) - throw RuntimeException( OUString("cannot start server process!"), Reference< XInterface >() ); + throw RuntimeException("cannot start server process!", Reference< XInterface >() ); osl_freeProcessHandle( hProcess ); // wait three seconds @@ -1168,7 +1168,7 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) { // java benchmark( aSheets[ "java in process" ], - _xSMgr->createInstance(OUString("com.sun.star.comp.benchmark.JavaTestObject")), + _xSMgr->createInstance("com.sun.star.comp.benchmark.JavaTestObject"), nLoop / 1000 ); } diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx index 57614e993422..5ccee20789e6 100644 --- a/toolkit/source/awt/animatedimagespeer.cxx +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -156,7 +156,7 @@ namespace toolkit if ( i_graphic.is() ) { const Reference< XPropertySet > xGraphicProps( i_graphic, UNO_QUERY_THROW ); - OSL_VERIFY( xGraphicProps->getPropertyValue( OUString( "SizePixel" ) ) >>= aSizePixel ); + OSL_VERIFY( xGraphicProps->getPropertyValue("SizePixel") >>= aSizePixel ); } } catch( const Exception& ) diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index fc8286ceb628..001741c7430d 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2143,10 +2143,10 @@ void SAL_CALL VCLXListBox::itemListChanged( const EventObject& i_rEvent ) throw uno::Reference< beans::XPropertySet > xPropSet( i_rEvent.Source, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPSI( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW ); uno::Reference< resource::XStringResourceResolver > xStringResourceResolver; - if ( xPSI->hasPropertyByName( OUString( "ResourceResolver" ) ) ) + if ( xPSI->hasPropertyByName("ResourceResolver") ) { xStringResourceResolver.set( - xPropSet->getPropertyValue( OUString( "ResourceResolver" ) ), + xPropSet->getPropertyValue("ResourceResolver"), uno::UNO_QUERY ); } @@ -4614,12 +4614,12 @@ void SAL_CALL VCLXComboBox::itemListChanged( const EventObject& i_rEvent ) throw uno::Reference< beans::XPropertySet > xPropSet( i_rEvent.Source, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySetInfo > xPSI( xPropSet->getPropertySetInfo(), uno::UNO_QUERY_THROW ); - // bool localize = xPSI->hasPropertyByName( OUString( "ResourceResolver" ) ); + // bool localize = xPSI->hasPropertyByName("ResourceResolver"); uno::Reference< resource::XStringResourceResolver > xStringResourceResolver; - if ( xPSI->hasPropertyByName( OUString( "ResourceResolver" ) ) ) + if ( xPSI->hasPropertyByName("ResourceResolver") ) { xStringResourceResolver.set( - xPropSet->getPropertyValue( OUString( "ResourceResolver" ) ), + xPropSet->getPropertyValue("ResourceResolver"), uno::UNO_QUERY ); } diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index e2dbf17cc382..1b14d4c70665 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -395,7 +395,7 @@ Reference< XInterface > ControlModelContainerBase::createInstance( const OUStrin Reference< XAggregation > xAgg( xCloneAccess, UNO_QUERY ); if ( xAgg.is() ) { - if ( xSI->supportsService(OUString("com.sun.star.awt.UnoControlModel")) ) + if ( xSI->supportsService("com.sun.star.awt.UnoControlModel") ) { // release 3 of the 4 references we have to the object xAgg.clear(); @@ -991,8 +991,8 @@ void ControlModelContainerBase::implUpdateGroupStructure() #if OSL_DEBUG_LEVEL > 1 Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY ); OUString sLabel; - if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( OUString("Label") ) ) - xModelProps->getPropertyValue( OUString("Label") ) >>= sLabel; + if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName("Label") ) + xModelProps->getPropertyValue("Label") >>= sLabel; aCurrentGroupLabels.push_back( sLabel ); #endif } @@ -1024,8 +1024,8 @@ void ControlModelContainerBase::implUpdateGroupStructure() #if OSL_DEBUG_LEVEL > 1 Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY ); OUString sLabel; - if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( OUString("Label") ) ) - xModelProps->getPropertyValue( OUString("Label") ) >>= sLabel; + if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName("Label") ) + xModelProps->getPropertyValue("Label") >>= sLabel; aCurrentGroupLabels.push_back( sLabel ); #endif continue; @@ -1054,8 +1054,8 @@ void ControlModelContainerBase::implUpdateGroupStructure() #if OSL_DEBUG_LEVEL > 1 Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY ); OUString sLabel; - if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName( OUString("Label") ) ) - xModelProps->getPropertyValue( OUString("Label") ) >>= sLabel; + if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName("Label") ) + xModelProps->getPropertyValue("Label") >>= sLabel; aCurrentGroupLabels.push_back( sLabel ); #endif } @@ -1418,10 +1418,10 @@ void ControlContainerBase::ImplSetPosSize( Reference< XControl >& rxCtrl ) Reference< XPropertySet > xP( rxCtrl->getModel(), UNO_QUERY ); sal_Int32 nX = 0, nY = 0, nWidth = 0, nHeight = 0; - xP->getPropertyValue( OUString( "PositionX" ) ) >>= nX; - xP->getPropertyValue( OUString( "PositionY" ) ) >>= nY; - xP->getPropertyValue( OUString( "Width" ) ) >>= nWidth; - xP->getPropertyValue( OUString( "Height" ) ) >>= nHeight; + xP->getPropertyValue("PositionX") >>= nX; + xP->getPropertyValue("PositionY") >>= nY; + xP->getPropertyValue("Width") >>= nWidth; + xP->getPropertyValue("Height") >>= nHeight; MapMode aMode( MAP_APPFONT ); OutputDevice*pOutDev = Application::GetDefaultDevice(); if ( pOutDev ) diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 939e6f16b610..3535916dc4c9 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -318,7 +318,7 @@ namespace try { Reference< XContainer > const xColModel( - xModelProps->getPropertyValue( OUString( "ColumnModel" ) ), + xModelProps->getPropertyValue("ColumnModel"), UNO_QUERY_THROW ); if ( i_add ) xColModel->addContainerListener( i_listener.get() ); @@ -326,7 +326,7 @@ namespace xColModel->removeContainerListener( i_listener.get() ); Reference< XGridDataModel > const xDataModel( - xModelProps->getPropertyValue( OUString( "GridDataModel" ) ), + xModelProps->getPropertyValue("GridDataModel"), UNO_QUERY_THROW ); Reference< XMutableGridDataModel > const xMutableDataModel( xDataModel, UNO_QUERY ); diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx index d5ffa5b9a3be..8b2e8363309d 100644 --- a/toolkit/source/controls/roadmapcontrol.cxx +++ b/toolkit/source/controls/roadmapcontrol.cxx @@ -187,7 +187,7 @@ static void lcl_throwIndexOutOfBoundsException( ) if ( !xRoadmapItem.is() ) lcl_throwIllegalArgumentException(); Reference< XServiceInfo > xServiceInfo( xRoadmapItem, UNO_QUERY ); - sal_Bool bIsRoadmapItem = xServiceInfo->supportsService( OUString("com.sun.star.awt.RoadmapItem") ); + sal_Bool bIsRoadmapItem = xServiceInfo->supportsService("com.sun.star.awt.RoadmapItem"); if ( !bIsRoadmapItem ) lcl_throwIllegalArgumentException(); } @@ -201,12 +201,12 @@ static void lcl_throwIndexOutOfBoundsException( ) if ( xProps.is() ) { sal_Int32 LocID = 0; - Any aValue = xPropertySet->getPropertyValue( OUString("ID") ); + Any aValue = xPropertySet->getPropertyValue("ID"); aValue >>= LocID; if (LocID < 0) // index may not be smaller than zero { aAny <<= GetUniqueID(); - xPropertySet->setPropertyValue( OUString("ID"), aAny ); + xPropertySet->setPropertyValue("ID", aAny ); } } } @@ -229,7 +229,7 @@ static void lcl_throwIndexOutOfBoundsException( ) { CurRoadmapItem = *i; Reference< XPropertySet > xPropertySet( CurRoadmapItem, UNO_QUERY ); - aAny = xPropertySet->getPropertyValue( OUString("ID") ); + aAny = xPropertySet->getPropertyValue("ID"); aAny >>= n_CurItemID; if (n_CurItemID == CurID) { diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx index 26036c14a091..7d2e1dc6f3eb 100644 --- a/toolkit/source/controls/tabpagecontainer.cxx +++ b/toolkit/source/controls/tabpagecontainer.cxx @@ -102,7 +102,7 @@ namespace try { Reference< XPropertySetInfo > const xPSI( i_parentModel->getPropertySetInfo() ); - bool const isGeometryControlModel = xPSI.is() && xPSI->hasPropertyByName( OUString( "PositionX" ) ); + bool const isGeometryControlModel = xPSI.is() && xPSI->hasPropertyByName("PositionX"); Reference< XInterface > xInstance; if ( isGeometryControlModel ) diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 499d331f464d..49333fcf4483 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -236,7 +236,7 @@ bool UnoControl::ImplCheckLocalize( OUString& _rPossiblyLocalizable ) { Reference< XPropertySet > xPropSet( mxModel, UNO_QUERY_THROW ); Reference< resource::XStringResourceResolver > xStringResourceResolver( - xPropSet->getPropertyValue( OUString( "ResourceResolver" ) ), + xPropSet->getPropertyValue("ResourceResolver"), UNO_QUERY ); if ( xStringResourceResolver.is() ) @@ -1355,7 +1355,7 @@ sal_Bool UnoControl::setModel( const Reference< XControlModel >& rxModel ) throw Sequence< OUString> aNames = lcl_ImplGetPropertyNames( xPropSet ); xPropSet->addPropertiesChangeListener( aNames, xListener ); - mpData->bLocalizationSupport = xPSI->hasPropertyByName( OUString( "ResourceResolver" ) ); + mpData->bLocalizationSupport = xPSI->hasPropertyByName("ResourceResolver"); } catch( const Exception& ) { diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index 015dd1b37069..685c92394ca8 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -289,7 +289,7 @@ UnoControlHolderList::ControlIdentifier UnoControlHolderList::impl_getFreeIdenti if ( existent == maControls.end() ) return candidateId; } - throw uno::RuntimeException( OUString( "out of identifiers" ), NULL ); + throw uno::RuntimeException("out of identifiers", NULL ); } //------------------------------------------------------------------------ @@ -308,7 +308,7 @@ OUString UnoControlHolderList::impl_getFreeName_throw() if ( loop == maControls.end() ) return candidateName; } - throw uno::RuntimeException( OUString( "out of identifiers" ), NULL ); + throw uno::RuntimeException("out of identifiers", NULL ); } // ---------------------------------------------------- // Function to set the controls' visibility according diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx index 6d4824acf30e..516fbb788231 100644 --- a/toolkit/source/helper/formpdfexport.cxx +++ b/toolkit/source/helper/formpdfexport.cxx @@ -458,7 +458,7 @@ namespace toolkitform { ::vcl::PDFWriter::PushButtonWidget* pButtonWidget = static_cast< ::vcl::PDFWriter::PushButtonWidget* >( _rpDescriptor.get() ); FormButtonType eButtonType = FormButtonType_PUSH; - OSL_VERIFY( xModelProps->getPropertyValue( OUString( "ButtonType" ) ) >>= eButtonType ); + OSL_VERIFY( xModelProps->getPropertyValue("ButtonType") >>= eButtonType ); static const OUString FM_PROP_TARGET_URL("TargetURL"); if ( eButtonType == FormButtonType_SUBMIT ) { @@ -470,12 +470,12 @@ namespace toolkitform if ( xParentProps.is() ) { Reference< XServiceInfo > xParentSI( xParentProps, UNO_QUERY ); - if ( xParentSI.is() && xParentSI->supportsService( OUString( "com.sun.star.form.component.HTMLForm" ) ) ) + if ( xParentSI.is() && xParentSI->supportsService("com.sun.star.form.component.HTMLForm") ) { OSL_VERIFY( xParentProps->getPropertyValue( FM_PROP_TARGET_URL ) >>= pButtonWidget->URL ); pButtonWidget->Submit = true; FormSubmitMethod eMethod = FormSubmitMethod_POST; - OSL_VERIFY( xParentProps->getPropertyValue( OUString( "SubmitMethod" ) ) >>= eMethod ); + OSL_VERIFY( xParentProps->getPropertyValue("SubmitMethod") >>= eMethod ); pButtonWidget->SubmitGet = (eMethod == FormSubmitMethod_GET); } } @@ -558,7 +558,7 @@ namespace toolkitform OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_DROPDOWN ) >>= pListWidget->DropDown ); // ............................ // multi selection - OSL_VERIFY( xModelProps->getPropertyValue( OUString( "MultiSelection" ) ) >>= pListWidget->MultiSelect ); + OSL_VERIFY( xModelProps->getPropertyValue("MultiSelection") >>= pListWidget->MultiSelect ); // ............................ // entries getStringItemVector( xModelProps, pListWidget->Entries ); @@ -568,7 +568,7 @@ namespace toolkitform // get selected items Sequence< sal_Int16 > aSelectIndices; - OSL_VERIFY( xModelProps->getPropertyValue( OUString( "SelectedItems" ) ) >>= aSelectIndices ); + OSL_VERIFY( xModelProps->getPropertyValue("SelectedItems") >>= aSelectIndices ); if( aSelectIndices.getLength() > 0 ) { pListWidget->SelectedEntries.resize( 0 ); diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index bfffab374d4e..c7a2f538b6ef 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx @@ -324,7 +324,7 @@ SortedDynamicResultSet::impl_notify( const ListEvent& Changes ) Any aRet; try { - aRet = pCurSet->getPropertyValue( OUString("IsRowCountFinal") ); + aRet = pCurSet->getPropertyValue("IsRowCountFinal"); } catch (const UnknownPropertyException&) {} catch (const WrappedTargetException&) {} diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index 097b645dfd3c..accf3486d614 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -937,7 +937,7 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName ) if ( bOrgFinal ) { aOrgRet = Reference< XPropertySet >::query(mxOriginal)-> - getPropertyValue( OUString("RowCount") ); + getPropertyValue("RowCount"); sal_uInt32 nOrgCount = 0; aOrgRet >>= nOrgCount; if ( nOrgCount == maS2O.Count() ) diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 20a26ef50885..9ba865081617 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -537,7 +537,7 @@ namespace ucb { namespace ucp { namespace ext for ( sal_Int32 n = 0; n < nCount; ++n, ++pValues ) { // all our properties are read-only ... - aRet[ n ] <<= IllegalAccessException( OUString("property is read-only."), *this ); + aRet[ n ] <<= IllegalAccessException("property is read-only.", *this ); } return aRet; diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index a9dd6e815ed8..476fdcd88794 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -522,7 +522,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( static lang::IllegalAccessException getReadOnlyException( const uno::Reference< uno::XInterface >& rContext ) { - return lang::IllegalAccessException ( OUString("Property is read-only!"), rContext ); + return lang::IllegalAccessException ("Property is read-only!", rContext ); } void Content::queryChildren( ContentRefList& rChildren ) diff --git a/ucb/source/ucp/gio/gio_inputstream.cxx b/ucb/source/ucp/gio/gio_inputstream.cxx index b454a6840f3a..e9ce34ff9bba 100644 --- a/ucb/source/ucp/gio/gio_inputstream.cxx +++ b/ucb/source/ucp/gio/gio_inputstream.cxx @@ -61,7 +61,7 @@ void SAL_CALL InputStream::skipBytes( sal_Int32 nBytesToSkip ) throw io::NotConnectedException(); if (!g_seekable_can_seek(G_SEEKABLE(mpStream))) - throw io::IOException(OUString("Seek unsupported"), + throw io::IOException("Seek unsupported", static_cast< cppu::OWeakObject * >(this)); GError *pError=NULL; diff --git a/ucb/source/ucp/gio/gio_seekable.cxx b/ucb/source/ucp/gio/gio_seekable.cxx index 70cc2e1abe82..0561dbed8b89 100644 --- a/ucb/source/ucp/gio/gio_seekable.cxx +++ b/ucb/source/ucp/gio/gio_seekable.cxx @@ -46,7 +46,7 @@ void SAL_CALL Seekable::truncate( void ) throw io::NotConnectedException(); if (!g_seekable_can_truncate(mpStream)) - throw io::IOException(OUString("Truncate unsupported"), + throw io::IOException("Truncate unsupported", static_cast< cppu::OWeakObject * >(this)); GError *pError=NULL; @@ -61,7 +61,7 @@ void SAL_CALL Seekable::seek( sal_Int64 location ) throw io::NotConnectedException(); if (!g_seekable_can_seek(mpStream)) - throw io::IOException(OUString("Seek unsupported"), + throw io::IOException("Seek unsupported", static_cast< cppu::OWeakObject * >(this)); GError *pError=NULL; @@ -111,7 +111,7 @@ sal_Int64 SAL_CALL Seekable::getLength() throw( io::IOException, uno::RuntimeExc } if (!bOk) - throw io::IOException(OUString("Getting size unsupported"), + throw io::IOException("Getting size unsupported", static_cast< cppu::OWeakObject * >(this)); return nSize; diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx index e0818b9a48d3..709b62d3279d 100644 --- a/ucb/workben/ucb/ucbdemo.cxx +++ b/ucb/workben/ucb/ucbdemo.cxx @@ -1039,7 +1039,7 @@ void UcbContent::open( const OUString & rName, const OUString& rInput, try { xProperties-> - setPropertyValue(OUString( "FetchSize"), + setPropertyValue("FetchSize", uno::makeAny(nFetchSize)); bSet = true; } diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index 629f30c98797..2055e9cde1c4 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -1036,7 +1036,7 @@ sal_Bool Content::isFolder() throw( CommandAbortedException, RuntimeException, Exception ) { sal_Bool bFolder = sal_False; - if ( getPropertyValue( OUString("IsFolder") ) + if ( getPropertyValue("IsFolder") >>= bFolder ) return bFolder; @@ -1057,7 +1057,7 @@ sal_Bool Content::isDocument() throw( CommandAbortedException, RuntimeException, Exception ) { sal_Bool bDoc = sal_False; - if ( getPropertyValue( OUString("IsDocument") ) + if ( getPropertyValue("IsDocument") >>= bDoc ) return bDoc; diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index ac24a4bf445a..2f6550a66e2e 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -341,7 +341,7 @@ namespace utl Reference< XServiceInfo > xSI(m_xHierarchyAccess, UNO_QUERY); if (xSI.is()) { - try { bIsSet = xSI->supportsService(OUString("com.sun.star.configuration.SetAccess")); } + try { bIsSet = xSI->supportsService("com.sun.star.configuration.SetAccess"); } catch(Exception&) { } } return bIsSet; diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 484869e7de36..a48e018a2e81 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -894,7 +894,7 @@ sal_Bool SvtLinguConfig::GetElementNamesFor( try { uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); - xNA.set( xNA->getByName(OUString("ServiceManager")), uno::UNO_QUERY_THROW ); + xNA.set( xNA->getByName("ServiceManager"), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rNodeName ), uno::UNO_QUERY_THROW ); rElementNames = xNA->getElementNames(); bSuccess = true; @@ -916,7 +916,7 @@ sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor( try { uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); - xNA.set( xNA->getByName(OUString("ServiceManager")), uno::UNO_QUERY_THROW ); + xNA.set( xNA->getByName("ServiceManager"), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rSetName ), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rSetEntry ), uno::UNO_QUERY_THROW ); if (xNA->getByName( OUString(aG_SupportedDictionaryFormats) ) >>= rFormatList) @@ -980,7 +980,7 @@ sal_Bool SvtLinguConfig::GetDictionaryEntry( try { uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); - xNA.set( xNA->getByName(OUString("ServiceManager")), uno::UNO_QUERY_THROW ); + xNA.set( xNA->getByName("ServiceManager"), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName(OUString(aG_Dictionaries)), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rNodeName ), uno::UNO_QUERY_THROW ); @@ -1027,7 +1027,7 @@ uno::Sequence< OUString > SvtLinguConfig::GetDisabledDictionaries() const try { uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); - xNA.set( xNA->getByName(OUString("ServiceManager")), uno::UNO_QUERY_THROW ); + xNA.set( xNA->getByName("ServiceManager"), uno::UNO_QUERY_THROW ); xNA->getByName( OUString(aG_DisabledDictionaries) ) >>= aResult; } catch (uno::Exception &) @@ -1126,16 +1126,16 @@ OUString SvtLinguConfig::GetVendorImageUrl_Impl( try { uno::Reference< container::XNameAccess > xImagesNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); - xImagesNA.set( xImagesNA->getByName(OUString("Images")), uno::UNO_QUERY_THROW ); + xImagesNA.set( xImagesNA->getByName("Images"), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xNA( xImagesNA->getByName(OUString("ServiceNameEntries")), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xNA( xImagesNA->getByName("ServiceNameEntries"), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( rServiceImplName ), uno::UNO_QUERY_THROW ); - uno::Any aAny(xNA->getByName(OUString("VendorImagesNode"))); + uno::Any aAny(xNA->getByName("VendorImagesNode")); OUString aVendorImagesNode; if (aAny >>= aVendorImagesNode) { xNA = xImagesNA; - xNA.set( xNA->getByName(OUString("VendorImages")), uno::UNO_QUERY_THROW ); + xNA.set( xNA->getByName("VendorImages"), uno::UNO_QUERY_THROW ); xNA.set( xNA->getByName( aVendorImagesNode ), uno::UNO_QUERY_THROW ); aAny = xNA->getByName( rImageName ); OUString aTmp; @@ -1204,8 +1204,8 @@ bool SvtLinguConfig::HasGrammarChecker() const try { uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW ); - xNA.set( xNA->getByName( OUString("ServiceManager") ), uno::UNO_QUERY_THROW ); - xNA.set( xNA->getByName( OUString("GrammarCheckerList") ), uno::UNO_QUERY_THROW ); + xNA.set( xNA->getByName("ServiceManager"), uno::UNO_QUERY_THROW ); + xNA.set( xNA->getByName("GrammarCheckerList"), uno::UNO_QUERY_THROW ); uno::Sequence< OUString > aElementNames( xNA->getElementNames() ); bRes = aElementNames.getLength() > 0; diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 8e5cfc69e875..bda16c36e9f0 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -1277,13 +1277,13 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByURL(const OUString ::comphelper::SequenceAsHashMap stlDesc(lMediaDescriptor); // is there already a filter inside the descriptor? - OUString sFilterName = stlDesc.getUnpackedValueOrDefault(OUString("FilterName"), OUString()); + OUString sFilterName = stlDesc.getUnpackedValueOrDefault("FilterName", OUString()); if (!sFilterName.isEmpty()) { try { ::comphelper::SequenceAsHashMap stlFilterProps (xFilterCfg->getByName(sFilterName)); - OUString sDocumentService = stlFilterProps.getUnpackedValueOrDefault(OUString("DocumentService"), OUString()); + OUString sDocumentService = stlFilterProps.getUnpackedValueOrDefault("DocumentService", OUString()); SvtModuleOptions::EFactory eApp = SvtModuleOptions::ClassifyFactoryByServiceName(sDocumentService); if (eApp != E_UNKNOWN_FACTORY) @@ -1296,7 +1296,7 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByURL(const OUString } // is there already a type inside the descriptor? - OUString sTypeName = stlDesc.getUnpackedValueOrDefault(OUString("TypeName"), OUString()); + OUString sTypeName = stlDesc.getUnpackedValueOrDefault("TypeName", OUString()); if (sTypeName.isEmpty()) { // no :-( @@ -1313,9 +1313,9 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByURL(const OUString try { ::comphelper::SequenceAsHashMap stlTypeProps (xTypeCfg->getByName(sTypeName)); - OUString sPreferredFilter = stlTypeProps.getUnpackedValueOrDefault(OUString("PreferredFilter"), OUString()); + OUString sPreferredFilter = stlTypeProps.getUnpackedValueOrDefault("PreferredFilter", OUString()); ::comphelper::SequenceAsHashMap stlFilterProps (xFilterCfg->getByName(sPreferredFilter)); - OUString sDocumentService = stlFilterProps.getUnpackedValueOrDefault(OUString("DocumentService"), OUString()); + OUString sDocumentService = stlFilterProps.getUnpackedValueOrDefault("DocumentService", OUString()); SvtModuleOptions::EFactory eApp = SvtModuleOptions::ClassifyFactoryByServiceName(sDocumentService); if (eApp != E_UNKNOWN_FACTORY) diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index 82b869f1940b..efa9e4690603 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -190,7 +190,7 @@ bool utl::UCBContentHelper::GetTitle( { assert(title != 0); try { - return content(url).getPropertyValue(OUString("Title")) >>= *title; + return content(url).getPropertyValue("Title") >>= *title; } catch (css::uno::RuntimeException const &) { throw; } catch (css::ucb::CommandAbortedException const &) { @@ -296,7 +296,7 @@ bool utl::UCBContentHelper::MakeFolder( sal_Int64 utl::UCBContentHelper::GetSize(OUString const & url) { try { sal_Int64 n = 0; - bool ok = (content(url).getPropertyValue(OUString("Size")) >>= n); + bool ok = (content(url).getPropertyValue("Size") >>= n); SAL_INFO_IF( !ok, "unotools.ucbhelper", "UCBContentHelper::GetSize(" << url diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 50e4d078b111..ef1b260eb4af 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -125,7 +125,7 @@ executeLoginDialog( } catch (std::bad_alloc const &) { - throw uno::RuntimeException(OUString("out of memory"), + throw uno::RuntimeException("out of memory", uno::Reference< uno::XInterface >()); } } @@ -438,7 +438,7 @@ executeMasterPasswordDialog( } catch (std::bad_alloc const &) { - throw uno::RuntimeException(OUString("out of memory"), + throw uno::RuntimeException("out of memory", uno::Reference< uno::XInterface >()); } @@ -558,7 +558,7 @@ executePasswordDialog( } catch (std::bad_alloc const &) { - throw uno::RuntimeException(OUString("out of memory"), + throw uno::RuntimeException("out of memory", uno::Reference< uno::XInterface>()); } } diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index beedaab3ed22..3b3d0ad983cb 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -99,7 +99,7 @@ executeErrorDialog( } catch (std::bad_alloc const &) { - throw uno::RuntimeException(OUString("out of memory"), + throw uno::RuntimeException("out of memory", uno::Reference< uno::XInterface >()); } diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx index 291d3825fed1..c07227fcab35 100644 --- a/uui/source/iahndl-locking.cxx +++ b/uui/source/iahndl-locking.cxx @@ -140,7 +140,7 @@ handleLockedDocumentRequest_( } catch (std::bad_alloc const &) { - throw uno::RuntimeException(OUString("out of memory"), + throw uno::RuntimeException("out of memory", uno::Reference< uno::XInterface >()); } } @@ -177,7 +177,7 @@ handleChangedByOthersRequest_( } catch (std::bad_alloc const &) { - throw uno::RuntimeException(OUString("out of memory"), + throw uno::RuntimeException("out of memory", uno::Reference< uno::XInterface >()); } } @@ -214,7 +214,7 @@ handleLockFileIgnoreRequest_( } catch (std::bad_alloc const &) { - throw uno::RuntimeException(OUString("out of memory"), + throw uno::RuntimeException("out of memory", uno::Reference< uno::XInterface >()); } } diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index c14784b2d50a..4557c9fdef77 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -917,7 +917,7 @@ UUIInteractionHelper::handleRequest_impl( } catch (std::bad_alloc const &) { - throw uno::RuntimeException(OUString("out of memory"), + throw uno::RuntimeException("out of memory", uno::Reference< uno::XInterface >()); } catch( const uno::RuntimeException& ) @@ -956,7 +956,7 @@ UUIInteractionHelper::getInteractionHandlerList( "com.sun.star.configuration.ConfigurationAccess" , aArguments ) ); if ( !xInterface.is() ) - throw uno::RuntimeException(OUString("unable to instanciate config access"), + throw uno::RuntimeException("unable to instanciate config access", uno::Reference< uno::XInterface >()); uno::Reference< container::XNameAccess > xNameAccess( diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index a6bbb280f7a5..de0a13ca61dc 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -150,7 +150,7 @@ UUIInteractionHandler::createInstance( } catch (std::bad_alloc const &) { - throw uno::RuntimeException(OUString("out of memory"), 0); + throw uno::RuntimeException("out of memory", 0); } } diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx index 2c5022258a96..afa21bd75f0f 100644 --- a/uui/source/newerverwarn.cxx +++ b/uui/source/newerverwarn.cxx @@ -101,7 +101,7 @@ IMPL_LINK_NOARG(NewerVersionWarningDialog, UpdateHdl) setup::UpdateCheckConfig::create(xContext); sal_Bool bUpdateCheckEnabled = sal_False; - OSL_VERIFY( xUpdateConfig->getByName( OUString( "AutoCheckEnabled" ) ) >>= bUpdateCheckEnabled ); + OSL_VERIFY( xUpdateConfig->getByName("AutoCheckEnabled") >>= bUpdateCheckEnabled ); // TODO: do we need to respect the bUpdateCheckEnabled flag? Finally, its meaning is "are automatic // updates enabled", but this here is not an automatic update, but one triggered explicitly by the user. diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx index 77642f4bc957..918b1ff2cfbf 100644 --- a/uui/source/requeststringresolver.cxx +++ b/uui/source/requeststringresolver.cxx @@ -102,7 +102,7 @@ UUIInteractionRequestStringResolver::createInstance( } catch (std::bad_alloc const &) { - throw star::uno::RuntimeException(OUString("out of memory"), 0); + throw star::uno::RuntimeException("out of memory", 0); } } diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx index 90840918dcb5..e9710859d2d7 100644 --- a/vbahelper/source/msforms/vbacontrols.cxx +++ b/vbahelper/source/msforms/vbacontrols.cxx @@ -488,7 +488,7 @@ void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex ) } catch (const uno::Exception&) { - // throw lang::WrappedTargetException( OUString( "Can not create AXControl!" ), + // throw lang::WrappedTargetException("Can not create AXControl!", // uno::Reference< uno::XInterface >(), // uno::makeAny( e ) ); } diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx index b2dcc6695122..b3a8576fbc16 100644 --- a/vbahelper/source/vbahelper/vbacolorformat.cxx +++ b/vbahelper/source/vbahelper/vbacolorformat.cxx @@ -66,7 +66,7 @@ ScVbaColorFormat::getRGB() throw (uno::RuntimeException) break; case ColorFormatType::LINEFORMAT_BACKCOLOR: //TODO BackColor not supported - // m_xPropertySet->setPropertyValue( OUString("Color"), uno::makeAny( nRGB ) ); + // m_xPropertySet->setPropertyValue("Color", uno::makeAny( nRGB ) ); break; case ColorFormatType::FILLFORMAT_FORECOLOR: m_xPropertySet->getPropertyValue( "FillColor" ) >>= nRGB; diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx index f94d96d73a77..b25b4b810320 100644 --- a/vbahelper/source/vbahelper/vbashape.cxx +++ b/vbahelper/source/vbahelper/vbashape.cxx @@ -147,7 +147,7 @@ ScVbaShape::getType( const css::uno::Reference< drawing::XShape > xShape ) throw else if( sShapeType == "com.sun.star.drawing.TextShape" ) return office::MsoShapeType::msoTextBox; else - throw uno::RuntimeException( OUString("the shape type do not be supported: ") + sShapeType, uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("the shape type do not be supported: " + sShapeType, uno::Reference< uno::XInterface >() ); } // Attributes @@ -172,7 +172,7 @@ ScVbaShape::getAlternativeText() throw (uno::RuntimeException) { OUString sAltText; uno::Reference< beans::XPropertySet > xProps( m_xShape, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( OUString( "Title" ) ) >>= sAltText; + xProps->getPropertyValue("Title") >>= sAltText; return sAltText; } @@ -180,7 +180,7 @@ void SAL_CALL ScVbaShape::setAlternativeText( const OUString& sAltText ) throw (uno::RuntimeException) { uno::Reference< beans::XPropertySet > xProps( m_xShape, uno::UNO_QUERY_THROW ); - xProps->setPropertyValue( OUString( "Title" ), uno::Any( sAltText ) ); + xProps->setPropertyValue("Title", uno::Any( sAltText ) ); } double SAL_CALL diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index 57d16c081e62..9ecd72064bb2 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -415,7 +415,7 @@ ScVbaShapes::setDefaultShapeProperties( uno::Reference< drawing::XShape > xShape xPropertySet->setPropertyValue( "FillColor", uno::makeAny( sal_Int32(0xFFFFFF) ) ); xPropertySet->setPropertyValue( "TextWordWrap", uno::makeAny( text::WrapTextMode_THROUGHT ) ); //not find in OOo2.3 - //xPropertySet->setPropertyValue( OUString("Opaque"), uno::makeAny( sal_True ) ); + //xPropertySet->setPropertyValue("Opaque", uno::makeAny( sal_True ) ); } void diff --git a/vcl/aqua/source/dtrans/DragSource.cxx b/vcl/aqua/source/dtrans/DragSource.cxx index 71459fbbef5f..57862241ce21 100644 --- a/vcl/aqua/source/dtrans/DragSource.cxx +++ b/vcl/aqua/source/dtrans/DragSource.cxx @@ -177,7 +177,7 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments) { if (aArguments.getLength() < 2) { - throw Exception(OUString("DragSource::initialize: Not enough parameter."), + throw Exception("DragSource::initialize: Not enough parameter.", static_cast<OWeakObject*>(this)); } @@ -195,13 +195,13 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments) if (![mView respondsToSelector: @selector(registerMouseEventListener:)] || ![mView respondsToSelector: @selector(unregisterMouseEventListener:)]) { - throw Exception(OUString("DragSource::initialize: Provided view doesn't support mouse listener"), + throw Exception("DragSource::initialize: Provided view doesn't support mouse listener", static_cast<OWeakObject*>(this)); } NSWindow* pWin = [mView window]; if( ! pWin || ![pWin respondsToSelector: @selector(getSalFrame)] ) { - throw Exception(OUString("DragSource::initialize: Provided view is not attached to a vcl frame"), + throw Exception("DragSource::initialize: Provided view is not attached to a vcl frame", static_cast<OWeakObject*>(this)); } mpFrame = (AquaSalFrame*)[pWin performSelector: @selector(getSalFrame)]; @@ -210,7 +210,7 @@ void SAL_CALL DragSource::initialize(const Sequence< Any >& aArguments) if (mDragSourceHelper == nil) { - throw Exception(OUString("DragSource::initialize: Cannot initialize DragSource"), + throw Exception("DragSource::initialize: Cannot initialize DragSource", static_cast<OWeakObject*>(this)); } diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx index 27cda75f1605..fd762a9744c0 100644 --- a/vcl/aqua/source/dtrans/DropTarget.cxx +++ b/vcl/aqua/source/dtrans/DropTarget.cxx @@ -383,7 +383,7 @@ void DropTarget::concludeDragOperation(id /*sender*/) { if (aArguments.getLength() < 2) { - throw RuntimeException(OUString("DropTarget::initialize: Cannot install window event handler"), + throw RuntimeException("DropTarget::initialize: Cannot install window event handler", static_cast<OWeakObject*>(this)); } diff --git a/vcl/aqua/source/dtrans/OSXTransferable.cxx b/vcl/aqua/source/dtrans/OSXTransferable.cxx index 5655ada94ab0..7cfffcd4d7c5 100644 --- a/vcl/aqua/source/dtrans/OSXTransferable.cxx +++ b/vcl/aqua/source/dtrans/OSXTransferable.cxx @@ -69,7 +69,7 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor ) { if (!isValidFlavor(aFlavor) || !isDataFlavorSupported(aFlavor)) { - throw UnsupportedFlavorException(OUString("AquaClipboard: Unsupported data flavor"), + throw UnsupportedFlavorException("AquaClipboard: Unsupported data flavor", static_cast<XTransferable*>(this)); } @@ -93,7 +93,7 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor ) if (dp.get() == NULL) { - throw UnsupportedFlavorException(OUString("AquaClipboard: Unsupported data flavor"), + throw UnsupportedFlavorException("AquaClipboard: Unsupported data flavor", static_cast<XTransferable*>(this)); } @@ -131,7 +131,7 @@ void OSXTransferable::initClipboardItemList() if (pboardFormats == NULL) { - throw RuntimeException(OUString("AquaClipboard: Cannot get clipboard data"), + throw RuntimeException("AquaClipboard: Cannot get clipboard data", static_cast<XTransferable*>(this)); } diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.cxx b/vcl/aqua/source/dtrans/aqua_clipboard.cxx index 285f2447c25f..ac3bcaee1d60 100644 --- a/vcl/aqua/source/dtrans/aqua_clipboard.cxx +++ b/vcl/aqua/source/dtrans/aqua_clipboard.cxx @@ -102,7 +102,7 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard if (mPasteboard == nil) { - throw RuntimeException(OUString("AquaClipboard: Cannot create Cocoa pasteboard"), + throw RuntimeException("AquaClipboard: Cannot create Cocoa pasteboard", static_cast<XClipboardEx*>(this)); } } @@ -213,7 +213,7 @@ void SAL_CALL AquaClipboard::addClipboardListener(const Reference< XClipboardLis MutexGuard aGuard(m_aMutex); if (!listener.is()) - throw IllegalArgumentException(OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast<XClipboardEx*>(this), 1); mClipboardListeners.push_back(listener); @@ -226,7 +226,7 @@ void SAL_CALL AquaClipboard::removeClipboardListener(const Reference< XClipboard MutexGuard aGuard(m_aMutex); if (!listener.is()) - throw IllegalArgumentException(OUString("empty reference"), + throw IllegalArgumentException("empty reference", static_cast<XClipboardEx*>(this), 1); mClipboardListeners.remove(listener); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index c38186baab11..c814b0555b56 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -220,7 +220,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz if ( xPropSet.is() ) { sal_Int16 nBitsPerPixel = 24; - if ( xPropSet->getPropertyValue( OUString("BitsPerPixel") ) >>= nBitsPerPixel ) + if ( xPropSet->getPropertyValue("BitsPerPixel") >>= nBitsPerPixel ) { bTrueColorJPG = nBitsPerPixel != 8; } diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx index 1a54a3d31706..118f3066aa83 100644 --- a/vcl/source/helper/canvasbitmap.cxx +++ b/vcl/source/helper/canvasbitmap.cxx @@ -675,7 +675,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::getIndex( uno::Sequence< double >& o_entry, s (m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 ); OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range"); if( nIndex < 0 || nIndex >= nCount ) - throw lang::IndexOutOfBoundsException(OUString("Palette index out of range"), + throw lang::IndexOutOfBoundsException("Palette index out of range", static_cast<rendering::XBitmapPalette*>(this)); const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(sal::static_int_cast<sal_uInt16>(nIndex)); @@ -697,7 +697,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::setIndex( const uno::Sequence< double >&, sal OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range"); if( nIndex < 0 || nIndex >= nCount ) - throw lang::IndexOutOfBoundsException(OUString("Palette index out of range"), + throw lang::IndexOutOfBoundsException("Palette index out of range", static_cast<rendering::XBitmapPalette*>(this)); return sal_False; // read-only implementation diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx index 228413b105f2..b50fae1b1815 100644 --- a/vcl/unx/gtk/gdi/salprn-gtk.cxx +++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx @@ -923,7 +923,7 @@ void GtkPrintDialog::ExportAsPDF(const OUString &rFileURL, GtkPrintSettings *pSe xFrame = uno::Reference < XFrame >(xDesktop, UNO_QUERY); uno::Reference < XFilter > xFilter( - ::comphelper::getProcessServiceFactory()->createInstance(OUString("com.sun.star.document.PDFFilter")), + ::comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.PDFFilter"), UNO_QUERY); if (xFilter.is()) diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index ce8072413e52..951b01ec7ba9 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -939,9 +939,9 @@ void GraphicImport::lcl_attribute(Id nName, Value & val) text::GraphicCrop aGraphicCrop( 0, 0, 0, 0 ); uno::Reference< beans::XPropertySet > xSourceGraphProps( xShape, uno::UNO_QUERY ); - uno::Any aAny = xSourceGraphProps->getPropertyValue( OUString("GraphicCrop")); + uno::Any aAny = xSourceGraphProps->getPropertyValue("GraphicCrop"); if(aAny >>= aGraphicCrop) { - xGraphProps->setPropertyValue( OUString("GraphicCrop"), + xGraphProps->setPropertyValue("GraphicCrop", uno::makeAny( aGraphicCrop ) ); } diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 2fb81802c398..a26fc18a3600 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -998,7 +998,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) xDocProperties = uno::Reference< beans::XPropertySet >( rDM_Impl.GetTextDocument(), uno::UNO_QUERY_THROW ); sal_Bool bSquaredPageMode = sal_False; operator[]( PropertyDefinition( PROP_GRID_STANDARD_MODE, false )) = uno::makeAny( !bSquaredPageMode ); - xDocProperties->setPropertyValue( OUString("DefaultPageMode"), uno::makeAny( bSquaredPageMode )); + xDocProperties->setPropertyValue("DefaultPageMode", uno::makeAny( bSquaredPageMode )); } catch (const uno::Exception& rEx) { diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx index 057e30b2f72f..58d9cc83f620 100644 --- a/xmlhelp/source/cxxhelp/provider/provider.cxx +++ b/xmlhelp/source/cxxhelp/provider/provider.cxx @@ -276,7 +276,7 @@ void ContentProvider::init() if( xAccess.is() ) { uno::Any aAny = - xAccess->getByName( OUString( "Help" ) ); + xAccess->getByName("Help"); aAny >>= m_xContainer; if( m_xContainer.is() ) m_xContainer->addContainerListener( this ); @@ -309,7 +309,7 @@ void ContentProvider::init() lParams) ); uno::Reference< container::XNameAccess > xDirectAccess(xCFG, uno::UNO_QUERY); - uno::Any aRet = xDirectAccess->getByName(OUString("ooSetupExtension")); + uno::Any aRet = xDirectAccess->getByName("ooSetupExtension"); aRet >>= setupextension; } diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index 06699115a5c3..bc4b3da741c9 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -709,7 +709,7 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext ) lParams) ); uno::Reference< container::XNameAccess > xDirectAccess(xCFG, uno::UNO_QUERY); - uno::Any aRet = xDirectAccess->getByName(OUString("ooSetupExtension")); + uno::Any aRet = xDirectAccess->getByName("ooSetupExtension"); aRet >>= setupextension; } @@ -1017,7 +1017,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextUserHelpPack if( !m_bUserPackagesLoaded ) { Reference< XPackageManager > xUserManager = - thePackageManagerFactory::get( m_xContext )->getPackageManager( OUString("user") ); + thePackageManagerFactory::get( m_xContext )->getPackageManager("user"); m_aUserPackagesSeq = xUserManager->getDeployedPackages ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); @@ -1047,7 +1047,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextSharedHelpPa if( !m_bSharedPackagesLoaded ) { Reference< XPackageManager > xSharedManager = - thePackageManagerFactory::get( m_xContext )->getPackageManager( OUString("shared") ); + thePackageManagerFactory::get( m_xContext )->getPackageManager("shared"); m_aSharedPackagesSeq = xSharedManager->getDeployedPackages ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); @@ -1077,7 +1077,7 @@ Reference< deployment::XPackage > ExtensionIteratorBase::implGetNextBundledHelpP if( !m_bBundledPackagesLoaded ) { Reference< XPackageManager > xBundledManager = - thePackageManagerFactory::get( m_xContext )->getPackageManager( OUString("bundled") ); + thePackageManagerFactory::get( m_xContext )->getPackageManager("bundled"); m_aBundledPackagesSeq = xBundledManager->getDeployedPackages ( Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() ); diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 1a83c205df37..7844ae53bdf9 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -232,7 +232,7 @@ void SchXMLAxisContext::CreateGrid( OUString sAutoStyleName, bool bIsMajor ) if( xGridProp.is()) { // the line color is black as default, in the model it is a light gray - xGridProp->setPropertyValue( OUString( "LineColor" ), + xGridProp->setPropertyValue("LineColor", uno::makeAny( COL_BLACK )); if( !sAutoStyleName.isEmpty()) { @@ -456,7 +456,7 @@ void SchXMLAxisContext::CreateAxis() { try { - xDiaProp->setPropertyValue( OUString( "HasXAxis" ), uno::makeAny(sal_True) ); + xDiaProp->setPropertyValue("HasXAxis", uno::makeAny(sal_True) ); } catch( beans::UnknownPropertyException & ) { @@ -471,16 +471,16 @@ void SchXMLAxisContext::CreateAxis() uno::Any aFalseBool( uno::makeAny( sal_False )); // #i109879# the line color is black as default, in the model it is a light gray - m_xAxisProps->setPropertyValue( OUString( "LineColor" ), + m_xAxisProps->setPropertyValue("LineColor", uno::makeAny( COL_BLACK )); - m_xAxisProps->setPropertyValue( OUString( "DisplayLabels" ), aFalseBool ); + m_xAxisProps->setPropertyValue("DisplayLabels", aFalseBool ); // #88077# AutoOrigin 'on' is default - m_xAxisProps->setPropertyValue( OUString( "AutoOrigin" ), aTrueBool ); + m_xAxisProps->setPropertyValue("AutoOrigin", aTrueBool ); if( m_bAxisTypeImported ) - m_xAxisProps->setPropertyValue( OUString( "AxisType" ), uno::makeAny(m_nAxisType) ); + m_xAxisProps->setPropertyValue("AxisType", uno::makeAny(m_nAxisType) ); if( !m_aAutoStyleName.isEmpty()) { @@ -536,7 +536,7 @@ void SchXMLAxisContext::CreateAxis() Reference< beans::XPropertySet > xNewAxisProp( xAxis, uno::UNO_QUERY ); if( xNewAxisProp.is() ) { - xNewAxisProp->setPropertyValue( OUString("LineStyle") + xNewAxisProp->setPropertyValue("LineStyle" , uno::makeAny(drawing::LineStyle_NONE)); } } @@ -544,7 +544,7 @@ void SchXMLAxisContext::CreateAxis() if( m_bAdaptXAxisOrientationForOld2DBarCharts && m_aCurrentAxis.eDimension == SCH_XML_AXIS_X ) { bool bIs3DChart = false; - if( xDiaProp.is() && ( xDiaProp->getPropertyValue(OUString("Dim3D")) >>= bIs3DChart ) + if( xDiaProp.is() && ( xDiaProp->getPropertyValue("Dim3D") >>= bIs3DChart ) && !bIs3DChart ) { Reference< chart2::XChartDocument > xChart2Document( GetImport().GetModel(), uno::UNO_QUERY ); @@ -559,7 +559,7 @@ void SchXMLAxisContext::CreateAxis() bool bSwapXandYAxis = false; Reference< chart2::XCoordinateSystem > xCooSys( aCooSysSeq[0] ); Reference< beans::XPropertySet > xCooSysProp( xCooSys, uno::UNO_QUERY ); - if( xCooSysProp.is() && ( xCooSysProp->getPropertyValue( OUString("SwapXAndYAxis")) >>= bSwapXandYAxis ) + if( xCooSysProp.is() && ( xCooSysProp->getPropertyValue("SwapXAndYAxis") >>= bSwapXandYAxis ) && bSwapXandYAxis ) { Reference< chart2::XAxis > xAxis = xCooSys->getAxisByDimension( 0, m_aCurrentAxis.nAxisIndex ); @@ -598,7 +598,7 @@ void SchXMLAxisContext::SetAxisTitle() { try { - xTitleProp->setPropertyValue( OUString( "String" ), uno::makeAny(m_aCurrentAxis.aTitle) ); + xTitleProp->setPropertyValue("String", uno::makeAny(m_aCurrentAxis.aTitle) ); } catch( beans::UnknownPropertyException & ) { @@ -781,31 +781,31 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc chart2::ScaleData aMainXScale = xMainXAxis->getScaleData(); if( 0 == rChartTypeServiceName.reverseCompareTo( "com.sun.star.chart2.ScatterChartType" ) ) { - xMainYAxisProp->setPropertyValue( OUString("CrossoverPosition") + xMainYAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_VALUE) ); double fCrossoverValue = 0.0; aMainXScale.Origin >>= fCrossoverValue; - xMainYAxisProp->setPropertyValue( OUString("CrossoverValue") + xMainYAxisProp->setPropertyValue("CrossoverValue" , uno::makeAny( fCrossoverValue ) ); if( aMainXScale.Orientation == chart2::AxisOrientation_REVERSE ) { - xMainYAxisProp->setPropertyValue( OUString("LabelPosition") + xMainYAxisProp->setPropertyValue("LabelPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END) ); - xMainYAxisProp->setPropertyValue( OUString("MarkPosition") + xMainYAxisProp->setPropertyValue("MarkPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); } else { - xMainYAxisProp->setPropertyValue( OUString("LabelPosition") + xMainYAxisProp->setPropertyValue("LabelPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START) ); - xMainYAxisProp->setPropertyValue( OUString("MarkPosition") + xMainYAxisProp->setPropertyValue("MarkPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); } } @@ -813,48 +813,48 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc { if( aMainXScale.Orientation == chart2::AxisOrientation_REVERSE ) { - xMainYAxisProp->setPropertyValue( OUString("CrossoverPosition") + xMainYAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); } else { - xMainYAxisProp->setPropertyValue( OUString("CrossoverPosition") + xMainYAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); if( xSecondaryYAxisProp.is() ) - xSecondaryYAxisProp->setPropertyValue( OUString("CrossoverPosition") + xSecondaryYAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); } } chart2::ScaleData aMainYScale = xMainYAxis->getScaleData(); - xMainXAxisProp->setPropertyValue( OUString("CrossoverPosition") + xMainXAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_VALUE) ); double fCrossoverValue = 0.0; aMainYScale.Origin >>= fCrossoverValue; - xMainXAxisProp->setPropertyValue( OUString("CrossoverValue") + xMainXAxisProp->setPropertyValue("CrossoverValue" , uno::makeAny( fCrossoverValue ) ); if( aMainYScale.Orientation == chart2::AxisOrientation_REVERSE ) { - xMainXAxisProp->setPropertyValue( OUString("LabelPosition") + xMainXAxisProp->setPropertyValue("LabelPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END) ); - xMainXAxisProp->setPropertyValue( OUString("MarkPosition") + xMainXAxisProp->setPropertyValue("MarkPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryXAxisProp.is() ) - xSecondaryXAxisProp->setPropertyValue( OUString("CrossoverPosition") + xSecondaryXAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_START) ); } else { - xMainXAxisProp->setPropertyValue( OUString("LabelPosition") + xMainXAxisProp->setPropertyValue("LabelPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START) ); - xMainXAxisProp->setPropertyValue( OUString("MarkPosition") + xMainXAxisProp->setPropertyValue("MarkPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS) ); if( xSecondaryXAxisProp.is() ) - xSecondaryXAxisProp->setPropertyValue( OUString("CrossoverPosition") + xSecondaryXAxisProp->setPropertyValue("CrossoverPosition" , uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_END) ); } } @@ -973,7 +973,7 @@ void DateScaleContext::StartElement( const Reference< xml::sax::XAttributeList > bool bSetNewIncrement=false; chart::TimeIncrement aIncrement; - m_xAxisProps->getPropertyValue( OUString( "TimeIncrement" )) >>= aIncrement; + m_xAxisProps->getPropertyValue("TimeIncrement") >>= aIncrement; for( sal_Int16 i = 0; i < nAttrCount; i++ ) { @@ -1030,7 +1030,7 @@ void DateScaleContext::StartElement( const Reference< xml::sax::XAttributeList > } if( bSetNewIncrement ) - m_xAxisProps->setPropertyValue( OUString( "TimeIncrement" ), uno::makeAny( aIncrement ) ); + m_xAxisProps->setPropertyValue("TimeIncrement", uno::makeAny( aIncrement ) ); } // ======================================== diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 5aeb93bd78c2..8c6aff2c04b0 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -76,7 +76,7 @@ void lcl_setRoleAtLabeledSequence( { uno::Reference< beans::XPropertySet > xProp( xValues, uno::UNO_QUERY ); if( xProp.is()) - xProp->setPropertyValue(OUString( "Role" ), uno::makeAny( rRole )); + xProp->setPropertyValue("Role", uno::makeAny( rRole )); } } @@ -355,9 +355,9 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut { try { - xDocProp->getPropertyValue( OUString( "BaseDiagram" )) >>= aOldChartTypeName; + xDocProp->getPropertyValue("BaseDiagram") >>= aOldChartTypeName; maChartTypeServiceName = SchXMLTools::GetNewChartTypeName( aOldChartTypeName ); - xDocProp->setPropertyValue( OUString( "RefreshAddInAllowed" ) , uno::makeAny( sal_False) ); + xDocProp->setPropertyValue("RefreshAddInAllowed", uno::makeAny( sal_False) ); } catch(const uno::Exception&) { @@ -695,7 +695,7 @@ void SchXMLChartContext::EndElement() { uno::Any aAny; aAny <<= maMainTitle; - xTitleProp->setPropertyValue( OUString( "String" ), aAny ); + xTitleProp->setPropertyValue("String", aAny ); } catch(const beans::UnknownPropertyException&) { @@ -712,7 +712,7 @@ void SchXMLChartContext::EndElement() { uno::Any aAny; aAny <<= maSubTitle; - xTitleProp->setPropertyValue( OUString( "String" ), aAny ); + xTitleProp->setPropertyValue("String", aAny ); } catch(const beans::UnknownPropertyException&) { @@ -731,13 +731,13 @@ void SchXMLChartContext::EndElement() if( xDiaProp.is()) { if( maSeriesDefaultsAndStyles.maStackedDefault.hasValue()) - xDiaProp->setPropertyValue(OUString("Stacked"),maSeriesDefaultsAndStyles.maStackedDefault); + xDiaProp->setPropertyValue("Stacked",maSeriesDefaultsAndStyles.maStackedDefault); if( maSeriesDefaultsAndStyles.maPercentDefault.hasValue()) - xDiaProp->setPropertyValue(OUString("Percent"),maSeriesDefaultsAndStyles.maPercentDefault); + xDiaProp->setPropertyValue("Percent",maSeriesDefaultsAndStyles.maPercentDefault); if( maSeriesDefaultsAndStyles.maDeepDefault.hasValue()) - xDiaProp->setPropertyValue(OUString("Deep"),maSeriesDefaultsAndStyles.maDeepDefault); + xDiaProp->setPropertyValue("Deep",maSeriesDefaultsAndStyles.maDeepDefault); if( maSeriesDefaultsAndStyles.maStackedBarsConnectedDefault.hasValue()) - xDiaProp->setPropertyValue(OUString("StackedBarsConnected"),maSeriesDefaultsAndStyles.maStackedBarsConnectedDefault); + xDiaProp->setPropertyValue("StackedBarsConnected",maSeriesDefaultsAndStyles.maStackedBarsConnectedDefault); } //the OOo 2.0 implementation and older has a bug with donuts @@ -808,7 +808,7 @@ void SchXMLChartContext::EndElement() try { if( bOlderThan2_3 && xDiaProp.is() )//for older charts the hidden cells were removed by calc on the fly - xDiaProp->setPropertyValue(OUString("IncludeHiddenCells"),uno::makeAny(false)); + xDiaProp->setPropertyValue("IncludeHiddenCells",uno::makeAny(false)); // note: mbRowHasLabels means the first row contains labels, that means we have "column-descriptions", // (analogously mbColHasLabels means we have "row-descriptions") @@ -906,7 +906,7 @@ void SchXMLChartContext::EndElement() } if( xProp.is()) - xProp->setPropertyValue( OUString( "RefreshAddInAllowed" ) , uno::makeAny( sal_True) ); + xProp->setPropertyValue("RefreshAddInAllowed", uno::makeAny( sal_True) ); } void SchXMLChartContext::MergeSeriesForStockChart() @@ -934,7 +934,7 @@ void SchXMLChartContext::MergeSeriesForStockChart() { xDSContainer.set( aChartTypes[nCTIdx], uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xCTProp( aChartTypes[nCTIdx], uno::UNO_QUERY_THROW ); - xCTProp->getPropertyValue( OUString( "Japanese" )) >>= bHasJapaneseCandlestick; + xCTProp->getPropertyValue("Japanese") >>= bHasJapaneseCandlestick; break; } } @@ -1019,7 +1019,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext( { if( xProp.is()) { - xProp->setPropertyValue( OUString( "HasMainTitle" ), aTrueBool ); + xProp->setPropertyValue("HasMainTitle", aTrueBool ); } uno::Reference< drawing::XShape > xTitleShape( xDoc->getTitle(), uno::UNO_QUERY ); pContext = new SchXMLTitleContext( mrImportHelper, GetImport(), @@ -1032,7 +1032,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext( { if( xProp.is()) { - xProp->setPropertyValue( OUString( "HasSubTitle" ), aTrueBool ); + xProp->setPropertyValue("HasSubTitle", aTrueBool ); } uno::Reference< drawing::XShape > xTitleShape( xDoc->getSubTitle(), uno::UNO_QUERY ); pContext = new SchXMLTitleContext( mrImportHelper, GetImport(), diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 120070202c80..cc45d6a4300e 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -464,7 +464,7 @@ bool lcl_isSeriesAttachedToFirstAxis( sal_Int32 nAxisIndex = 0; Reference< beans::XPropertySet > xProp( xDataSeries, uno::UNO_QUERY_THROW ); if( xProp.is() ) - xProp->getPropertyValue( OUString( "AttachedAxisIndex" ) ) >>= nAxisIndex; + xProp->getPropertyValue("AttachedAxisIndex") >>= nAxisIndex; bResult = (0==nAxisIndex); } catch( const uno::Exception & ex ) @@ -630,7 +630,7 @@ uno::Sequence< OUString > lcl_DataSequenceToStringSequence( if( xProp.is() ) { OUString aRole; - xProp->getPropertyValue( OUString( "Role" ) ) >>= aRole; + xProp->getPropertyValue("Role") >>= aRole; if( aRole.match( OUString( "values-x" ) ) ) { //lcl_clearIfNoValuesButTextIsContained - replace by indices if the values are not appropriate @@ -683,7 +683,7 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque uno::Sequence< sal_Int32 > aHiddenValues; try { - xProp->getPropertyValue( OUString( "HiddenValues" ) ) >>= aHiddenValues; + xProp->getPropertyValue("HiddenValues") >>= aHiddenValues; if( !aHiddenValues.getLength() ) return true; } @@ -1411,7 +1411,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& // export legend anchor position try { - Any aAny( xProp->getPropertyValue( OUString( "Alignment" ))); + Any aAny( xProp->getPropertyValue("Alignment")); if( SchXMLEnumConverter::getLegendPositionConverter().exportXML( msString, aAny, mrExport.GetMM100UnitConverter() ) ) mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LEGEND_POSITION, msString ); } @@ -1432,7 +1432,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& { chart::ChartLegendExpansion nLegendExpansion = chart::ChartLegendExpansion_HIGH; OUString aExpansionString; - Any aAny( xProp->getPropertyValue( OUString( "Expansion" ))); + Any aAny( xProp->getPropertyValue("Expansion")); bool bHasExpansion = (aAny >>= nLegendExpansion); if( bHasExpansion && SchXMLEnumConverter::getLegendExpansionConverter().exportXML( aExpansionString, aAny, mrExport.GetMM100UnitConverter() ) ) { @@ -1508,7 +1508,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& // get a sequence of non-chart shapes (inserted via clipboard) try { - Any aShapesAny = xDocPropSet->getPropertyValue( OUString( "AdditionalShapes" )); + Any aShapesAny = xDocPropSet->getPropertyValue("AdditionalShapes"); aShapesAny >>= mxAdditionalShapes; } catch( const uno::Exception & rEx ) @@ -1594,7 +1594,7 @@ void SchXMLExportHelper_Impl::exportTable() { bool bProtected = false; Reference< beans::XPropertySet > xProps( mrExport.GetModel(), uno::UNO_QUERY_THROW ); - if ( ( xProps->getPropertyValue( OUString( "DisableDataTableDialog" ) ) >>= bProtected ) && + if ( ( xProps->getPropertyValue("DisableDataTableDialog") >>= bProtected ) && bProtected ) { mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_PROTECTED, XML_TRUE ); @@ -1985,7 +1985,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( // 3d attributes try { - aAny = xPropSet->getPropertyValue( OUString( "Dim3D" )); + aAny = xPropSet->getPropertyValue("Dim3D"); aAny >>= bIs3DChart; if( bIs3DChart ) @@ -2213,7 +2213,7 @@ void SchXMLExportHelper_Impl::exportDateScale( const Reference< beans::XProperty return; chart::TimeIncrement aIncrement; - if( (xAxisProps->getPropertyValue( OUString( "TimeIncrement" )) >>= aIncrement) ) + if( (xAxisProps->getPropertyValue("TimeIncrement") >>= aIncrement) ) { sal_Int32 nTimeResolution = ::com::sun::star::chart::TimeUnit::DAY; if( aIncrement.TimeResolution >>= nTimeResolution ) @@ -2647,7 +2647,7 @@ void SchXMLExportHelper_Impl::exportSeries( sal_Bool bJapaneseCandleSticks = sal_False; Reference< beans::XPropertySet > xCTProp( aCTSeq[nCTIdx], uno::UNO_QUERY ); if( xCTProp.is()) - xCTProp->getPropertyValue( OUString( "Japanese" )) >>= bJapaneseCandleSticks; + xCTProp->getPropertyValue("Japanese") >>= bJapaneseCandleSticks; exportCandleStickSeries( xDSCnt->getDataSeries(), xNewDiagram, bJapaneseCandleSticks, bExportContent ); continue; @@ -2685,7 +2685,7 @@ void SchXMLExportHelper_Impl::exportSeries( { Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY ); if( xSeqProp.is()) - xSeqProp->getPropertyValue(OUString( "Role" )) >>= aRole; + xSeqProp->getPropertyValue("Role") >>= aRole; // "main" sequence if( aRole.equals( aLabelRole )) { @@ -2948,9 +2948,9 @@ void SchXMLExportHelper_Impl::exportRegressionCurve( aPropertyStates = mxExpPropMapper->Filter( xStatProp ); if( xEquationProperties.is()) { - xEquationProperties->getPropertyValue( OUString( "ShowEquation" )) + xEquationProperties->getPropertyValue("ShowEquation") >>= bShowEquation; - xEquationProperties->getPropertyValue( OUString( "ShowCorrelationCoefficient" )) + xEquationProperties->getPropertyValue("ShowCorrelationCoefficient") >>= bShowRSquared; bExportEquation = ( bShowEquation || bShowRSquared ); const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() ); diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx index 73b651fb0ffd..0d0fe40a7986 100644 --- a/xmloff/source/chart/SchXMLLegendContext.cxx +++ b/xmloff/source/chart/SchXMLLegendContext.cxx @@ -101,7 +101,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu { try { - xDocProp->setPropertyValue( OUString( "HasLegend" ), uno::makeAny( sal_True ) ); + xDocProp->setPropertyValue("HasLegend", uno::makeAny( sal_True ) ); } catch(const beans::UnknownPropertyException&) { @@ -147,7 +147,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu try { if( SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() ) ) - xLegendProps->setPropertyValue( OUString( "Alignment" ), aAny ); + xLegendProps->setPropertyValue("Alignment", aAny ); } catch(const beans::UnknownPropertyException&) { @@ -196,12 +196,12 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu xLegendShape->setPosition( aLegendPos ); if( bHasExpansion && nLegendExpansion!= chart::ChartLegendExpansion_CUSTOM ) - xLegendProps->setPropertyValue( OUString( "Expansion" ), uno::makeAny(nLegendExpansion) ); + xLegendProps->setPropertyValue("Expansion", uno::makeAny(nLegendExpansion) ); else if( bHasHeight && bHasWidth ) xLegendShape->setSize( aLegendSize ); // the fill style has the default "none" in XML, but "solid" in the model. - xLegendProps->setPropertyValue( OUString( "FillStyle" ), uno::makeAny( drawing::FillStyle_NONE )); + xLegendProps->setPropertyValue("FillStyle", uno::makeAny( drawing::FillStyle_NONE )); // set auto-styles for Legend const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext(); diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index d8b56b2cb44b..516178d8b355 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -105,7 +105,7 @@ void SchXML3DSceneAttributesHelper::getCameraDefaultFromDiagram( const uno::Refe if( xProp.is() ) { drawing::CameraGeometry aCamGeo; - xProp->getPropertyValue( OUString( "D3DCameraGeometry" )) >>= aCamGeo; + xProp->getPropertyValue("D3DCameraGeometry") >>= aCamGeo; maVRP.setX( aCamGeo.vrp.PositionX ); maVRP.setY( aCamGeo.vrp.PositionY ); maVRP.setZ( aCamGeo.vrp.PositionZ ); @@ -221,7 +221,7 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext( uno::Any aAny; chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS; aAny <<= eSource; - xProp->setPropertyValue( OUString( "DataRowSource" ), aAny ); + xProp->setPropertyValue("DataRowSource", aAny ); } catch( const beans::UnknownPropertyException & ) { @@ -334,7 +334,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri pPropStyleContext->FillPropertySet( xProp ); // get the data row source that was set without having data - xProp->getPropertyValue( OUString( "DataRowSource" )) + xProp->getPropertyValue("DataRowSource") >>= mrDataRowSource; //lines on/off @@ -349,7 +349,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_0( GetImport().GetModel() ) ) { bool bIs3d = false; - if( xProp.is() && ( xProp->getPropertyValue(OUString("Dim3D")) >>= bIs3d ) && + if( xProp.is() && ( xProp->getPropertyValue("Dim3D") >>= bIs3d ) && bIs3d ) { if( maChartTypeServiceName == "com.sun.star.chart2.PieChartType" || maChartTypeServiceName == "com.sun.star.chart2.DonutChartType" ) @@ -371,28 +371,28 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri { try { - mrSeriesDefaultsAndStyles.maSymbolTypeDefault = xProp->getPropertyValue(OUString("SymbolType")); - mrSeriesDefaultsAndStyles.maDataCaptionDefault = xProp->getPropertyValue(OUString("DataCaption")); + mrSeriesDefaultsAndStyles.maSymbolTypeDefault = xProp->getPropertyValue("SymbolType"); + mrSeriesDefaultsAndStyles.maDataCaptionDefault = xProp->getPropertyValue("DataCaption"); - mrSeriesDefaultsAndStyles.maMeanValueDefault = xProp->getPropertyValue(OUString("MeanValue")); - mrSeriesDefaultsAndStyles.maRegressionCurvesDefault = xProp->getPropertyValue(OUString("RegressionCurves")); + mrSeriesDefaultsAndStyles.maMeanValueDefault = xProp->getPropertyValue("MeanValue"); + mrSeriesDefaultsAndStyles.maRegressionCurvesDefault = xProp->getPropertyValue("RegressionCurves"); bool bStacked = false; - mrSeriesDefaultsAndStyles.maStackedDefault = xProp->getPropertyValue(OUString("Stacked")); + mrSeriesDefaultsAndStyles.maStackedDefault = xProp->getPropertyValue("Stacked"); mrSeriesDefaultsAndStyles.maStackedDefault >>= bStacked; - mrSeriesDefaultsAndStyles.maPercentDefault = xProp->getPropertyValue(OUString("Percent")); + mrSeriesDefaultsAndStyles.maPercentDefault = xProp->getPropertyValue("Percent"); mrSeriesDefaultsAndStyles.maPercentDefault >>= mbPercentStacked; - mrSeriesDefaultsAndStyles.maStackedBarsConnectedDefault = xProp->getPropertyValue(OUString("StackedBarsConnected")); + mrSeriesDefaultsAndStyles.maStackedBarsConnectedDefault = xProp->getPropertyValue("StackedBarsConnected"); // deep - uno::Any aDeepProperty( xProp->getPropertyValue(OUString("Deep"))); + uno::Any aDeepProperty( xProp->getPropertyValue("Deep")); // #124488# old versions store a 3d area and 3D line deep chart with Deep==false => workaround for this if( ! (bStacked || mbPercentStacked )) { if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_3( GetImport().GetModel() ) ) { bool bIs3d = false; - if( ( xProp->getPropertyValue(OUString("Dim3D")) >>= bIs3d ) && + if( ( xProp->getPropertyValue("Dim3D") >>= bIs3d ) && bIs3d ) { if( maChartTypeServiceName == "com.sun.star.chart2.AreaChartType" || maChartTypeServiceName == "com.sun.star.chart2.LineChartType" ) @@ -404,8 +404,8 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri } mrSeriesDefaultsAndStyles.maDeepDefault = aDeepProperty; - xProp->getPropertyValue(OUString("NumberOfLines")) >>= mnNumOfLinesProp; - xProp->getPropertyValue(OUString("Volume")) >>= mbStockHasVolume; + xProp->getPropertyValue("NumberOfLines") >>= mnNumOfLinesProp; + xProp->getPropertyValue("Volume") >>= mbStockHasVolume; } catch( const uno::Exception & rEx ) { @@ -431,7 +431,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri // data yet. mxNewDoc->createInternalDataProvider( false /* bCloneExistingData */ ); if( xProp.is() && mrDataRowSource!=chart::ChartDataRowSource_COLUMNS ) - xProp->setPropertyValue( OUString( "DataRowSource" ), uno::makeAny(mrDataRowSource) ); + xProp->setPropertyValue("DataRowSource", uno::makeAny(mrDataRowSource) ); } } @@ -559,7 +559,7 @@ void SchXMLPlotAreaContext::EndElement() if( xDiaProp.is()) { sal_Bool bIsThreeDim = sal_False; - uno::Any aAny = xDiaProp->getPropertyValue( OUString( "Dim3D" )); + uno::Any aAny = xDiaProp->getPropertyValue("Dim3D"); aAny >>= bIsThreeDim; // set 3d scene attributes @@ -574,7 +574,7 @@ void SchXMLPlotAreaContext::EndElement() { try { - xDiaProp->setPropertyValue( OUString( "NumberOfLines" ), + xDiaProp->setPropertyValue("NumberOfLines", uno::makeAny( mnNumOfLinesProp )); } catch( const uno::Exception & rEx ) @@ -590,7 +590,7 @@ void SchXMLPlotAreaContext::EndElement() { try { - xDiaProp->setPropertyValue( OUString( "Volume" ), + xDiaProp->setPropertyValue("Volume", uno::makeAny( true )); } catch( const uno::Exception & rEx ) @@ -1331,15 +1331,15 @@ void SchXMLEquationContext::StartElement( const uno::Reference< xml::sax::XAttri pPropStyleContext->FillPropertySet( xEqProp ); } } - xEqProp->setPropertyValue( OUString( "ShowEquation"), uno::makeAny( bShowEquation )); - xEqProp->setPropertyValue( OUString( "ShowCorrelationCoefficient"), uno::makeAny( bShowRSquare )); + xEqProp->setPropertyValue("ShowEquation", uno::makeAny( bShowEquation )); + xEqProp->setPropertyValue("ShowCorrelationCoefficient", uno::makeAny( bShowRSquare )); if( bHasXPos && bHasYPos ) { chart2::RelativePosition aRelPos; aRelPos.Primary = static_cast< double >( aPosition.X ) / static_cast< double >( maChartSize.Width ); aRelPos.Secondary = static_cast< double >( aPosition.Y ) / static_cast< double >( maChartSize.Height ); - xEqProp->setPropertyValue( OUString( "RelativePosition" ), + xEqProp->setPropertyValue("RelativePosition", uno::makeAny( aRelPos )); } SAL_WARN_IF( mrRegressionStyle.meType != DataRowPointStyle::REGRESSION, "xmloff.chart", "mrRegressionStyle.meType != DataRowPointStyle::REGRESSION" ); diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 148b7352c68f..d45774176ca1 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -120,12 +120,12 @@ void lcl_setAutomaticSymbolSize( const uno::Reference< beans::XPropertySet >& xS double fScale = 1; uno::Reference< beans::XPropertySet > xLegendProp( xChartDoc->getLegend(), uno::UNO_QUERY ); chart::ChartLegendPosition aLegendPosition = chart::ChartLegendPosition_NONE; - if( xLegendProp.is() && (xLegendProp->getPropertyValue( OUString( "Alignment" )) >>= aLegendPosition) + if( xLegendProp.is() && (xLegendProp->getPropertyValue("Alignment") >>= aLegendPosition) && chart::ChartLegendPosition_NONE != aLegendPosition ) { double fFontHeight = 6.0; - if( xLegendProp->getPropertyValue( OUString( "CharHeight" )) >>= fFontHeight ) + if( xLegendProp->getPropertyValue("CharHeight") >>= fFontHeight ) fScale = 0.75*fFontHeight/6.0; } else @@ -143,7 +143,7 @@ void lcl_setAutomaticSymbolSize( const uno::Reference< beans::XPropertySet >& xS aSymbolSize.Width = aSymbolSize.Height; } } - xSeriesOrPointProp->setPropertyValue(OUString("SymbolSize"),uno::makeAny( aSymbolSize )); + xSeriesOrPointProp->setPropertyValue("SymbolSize",uno::makeAny( aSymbolSize )); } void lcl_setSymbolSizeIfNeeded( const uno::Reference< beans::XPropertySet >& xSeriesOrPointProp, const SvXMLImport& rImport ) @@ -152,14 +152,14 @@ void lcl_setSymbolSizeIfNeeded( const uno::Reference< beans::XPropertySet >& xSe return; sal_Int32 nSymbolType = chart::ChartSymbolType::NONE; - if( xSeriesOrPointProp.is() && ( xSeriesOrPointProp->getPropertyValue(OUString("SymbolType")) >>= nSymbolType) ) + if( xSeriesOrPointProp.is() && ( xSeriesOrPointProp->getPropertyValue("SymbolType") >>= nSymbolType) ) { if(chart::ChartSymbolType::NONE!=nSymbolType) { if( chart::ChartSymbolType::BITMAPURL==nSymbolType ) { //set special size for graphics to indicate to use the bitmap size itself - xSeriesOrPointProp->setPropertyValue(OUString("SymbolSize"),uno::makeAny( awt::Size(-1,-1) )); + xSeriesOrPointProp->setPropertyValue("SymbolSize",uno::makeAny( awt::Size(-1,-1) )); } else { @@ -222,7 +222,7 @@ Reference< chart2::data::XLabeledDataSequence2 > lcl_createAndAddSequenceToSerie Reference< chart2::data::XDataSequence > xSeq = SchXMLTools::CreateDataSequence( rRange, xChartDoc ); Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY ); if( xSeqProp.is()) - xSeqProp->setPropertyValue(OUString( "Role" ), uno::makeAny( rRole)); + xSeqProp->setPropertyValue("Role", uno::makeAny( rRole)); xLabeledSeq->setValues( xSeq ); // add new sequence to data series / push to front to have the correct sequence order if charttype is changed afterwards @@ -390,7 +390,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib // set default color for range-line to black (before applying styles) Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); if( xSeriesProp.is()) - xSeriesProp->setPropertyValue( OUString("Color"), + xSeriesProp->setPropertyValue("Color", uno::makeAny( sal_Int32( 0x000000 ))); // black } else if ( maSeriesChartTypeName == "com.sun.star.chart2.PieChartType" ) @@ -398,7 +398,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib //@todo: this property should be saved Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); if( xSeriesProp.is()) - xSeriesProp->setPropertyValue( OUString("VaryColorsByPoint"), + xSeriesProp->setPropertyValue("VaryColorsByPoint", uno::makeAny( true )); } @@ -413,7 +413,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib OUString aMainRole("values-y"); if ( maSeriesChartTypeName == "com.sun.star.chart2.BubbleChartType" ) aMainRole = OUString( "values-size" ); - xSeqProp->setPropertyValue(OUString( "Role" ), uno::makeAny( aMainRole )); + xSeqProp->setPropertyValue("Role", uno::makeAny( aMainRole )); } xLabeledSeq->setValues( xSeq ); @@ -721,27 +721,27 @@ void SchXMLSeries2Context::setDefaultsToSeries( SeriesDefaultsAndStyles& rSeries continue; if( rSeriesDefaultsAndStyles.maSymbolTypeDefault.hasValue() ) - xSeries->setPropertyValue(OUString("SymbolType"),rSeriesDefaultsAndStyles.maSymbolTypeDefault); + xSeries->setPropertyValue("SymbolType",rSeriesDefaultsAndStyles.maSymbolTypeDefault); if( rSeriesDefaultsAndStyles.maDataCaptionDefault.hasValue() ) - xSeries->setPropertyValue(OUString("DataCaption"),rSeriesDefaultsAndStyles.maDataCaptionDefault); + xSeries->setPropertyValue("DataCaption",rSeriesDefaultsAndStyles.maDataCaptionDefault); if( rSeriesDefaultsAndStyles.maErrorIndicatorDefault.hasValue() ) - xSeries->setPropertyValue(OUString("ErrorIndicator"),rSeriesDefaultsAndStyles.maErrorIndicatorDefault); + xSeries->setPropertyValue("ErrorIndicator",rSeriesDefaultsAndStyles.maErrorIndicatorDefault); if( rSeriesDefaultsAndStyles.maErrorCategoryDefault.hasValue() ) - xSeries->setPropertyValue(OUString("ErrorCategory"),rSeriesDefaultsAndStyles.maErrorCategoryDefault); + xSeries->setPropertyValue("ErrorCategory",rSeriesDefaultsAndStyles.maErrorCategoryDefault); if( rSeriesDefaultsAndStyles.maConstantErrorLowDefault.hasValue() ) - xSeries->setPropertyValue(OUString("ConstantErrorLow"),rSeriesDefaultsAndStyles.maConstantErrorLowDefault); + xSeries->setPropertyValue("ConstantErrorLow",rSeriesDefaultsAndStyles.maConstantErrorLowDefault); if( rSeriesDefaultsAndStyles.maConstantErrorHighDefault.hasValue() ) - xSeries->setPropertyValue(OUString("ConstantErrorHigh"),rSeriesDefaultsAndStyles.maConstantErrorHighDefault); + xSeries->setPropertyValue("ConstantErrorHigh",rSeriesDefaultsAndStyles.maConstantErrorHighDefault); if( rSeriesDefaultsAndStyles.maPercentageErrorDefault.hasValue() ) - xSeries->setPropertyValue(OUString("PercentageError"),rSeriesDefaultsAndStyles.maPercentageErrorDefault); + xSeries->setPropertyValue("PercentageError",rSeriesDefaultsAndStyles.maPercentageErrorDefault); if( rSeriesDefaultsAndStyles.maErrorMarginDefault.hasValue() ) - xSeries->setPropertyValue(OUString("ErrorMargin"),rSeriesDefaultsAndStyles.maErrorMarginDefault); + xSeries->setPropertyValue("ErrorMargin",rSeriesDefaultsAndStyles.maErrorMarginDefault); if( rSeriesDefaultsAndStyles.maMeanValueDefault.hasValue() ) - xSeries->setPropertyValue(OUString("MeanValue"),rSeriesDefaultsAndStyles.maMeanValueDefault); + xSeries->setPropertyValue("MeanValue",rSeriesDefaultsAndStyles.maMeanValueDefault); if( rSeriesDefaultsAndStyles.maRegressionCurvesDefault.hasValue() ) - xSeries->setPropertyValue(OUString("RegressionCurves"),rSeriesDefaultsAndStyles.maRegressionCurvesDefault); + xSeries->setPropertyValue("RegressionCurves",rSeriesDefaultsAndStyles.maRegressionCurvesDefault); } catch( uno::Exception & ) { @@ -775,7 +775,7 @@ void SchXMLSeries2Context::setStylesToSeries( SeriesDefaultsAndStyles& rSeriesDe if( iStyle->mnAttachedAxis != 1 ) { - xSeriesProp->setPropertyValue( OUString( "Axis" ) + xSeriesProp->setPropertyValue("Axis" , uno::makeAny(chart::ChartAxisAssign::SECONDARY_Y) ); } @@ -995,7 +995,7 @@ void SchXMLSeries2Context::setStylesToDataPoints( SeriesDefaultsAndStyles& rSeri { //need to set this explicitly here for old files as the new api does not support this property fully anymore if( bSwitchOffLinesForScatter ) - xPointProp->setPropertyValue(OUString("Lines"),uno::makeAny(sal_False)); + xPointProp->setPropertyValue("Lines",uno::makeAny(sal_False)); } catch( const uno::Exception & ) { @@ -1044,7 +1044,7 @@ void SchXMLSeries2Context::switchSeriesLinesOff( ::std::list< DataRowPointStyle if( !xSeries.is() ) continue; - xSeries->setPropertyValue(OUString("Lines"),uno::makeAny(sal_False)); + xSeries->setPropertyValue("Lines",uno::makeAny(sal_False)); } catch( uno::Exception & ) { diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 491b58f5002a..7892901e3d23 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -656,7 +656,7 @@ void SAL_CALL SvXMLExport::setSourceDocument( const uno::Reference< lang::XCompo try { Reference < XInterface > xIfc = - xFactory->createInstance(OUString( "com.sun.star.xml.NamespaceMap") ); + xFactory->createInstance("com.sun.star.xml.NamespaceMap"); if( xIfc.is() ) { Reference< XNameAccess > xNamespaceMap( xIfc, UNO_QUERY ); @@ -1489,7 +1489,7 @@ void SvXMLExport::_ExportScripts() { Reference< beans::XPropertySet > xPSet( mxModel, UNO_QUERY ); if ( xPSet.is() ) - xPSet->getPropertyValue( OUString( "BasicLibraries" ) ); + xPSet->getPropertyValue("BasicLibraries"); } Reference < XDocumentHandler > xHdl( new XMLBasicExportFilter( mxHandler ) ); @@ -1520,7 +1520,7 @@ void SvXMLExport::_ExportStyles( sal_Bool ) // export (fill-)gradient-styles try { - uno::Reference< container::XNameAccess > xGradient( xFact->createInstance( OUString("com.sun.star.drawing.GradientTable" ) ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xGradient( xFact->createInstance("com.sun.star.drawing.GradientTable"), uno::UNO_QUERY ); if( xGradient.is() ) { XMLGradientStyleExport aGradientStyle( *this ); @@ -1553,7 +1553,7 @@ void SvXMLExport::_ExportStyles( sal_Bool ) // export (fill-)hatch-styles try { - uno::Reference< container::XNameAccess > xHatch( xFact->createInstance( OUString("com.sun.star.drawing.HatchTable" ) ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xHatch( xFact->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY ); if( xHatch.is() ) { XMLHatchStyleExport aHatchStyle( *this ); @@ -1585,7 +1585,7 @@ void SvXMLExport::_ExportStyles( sal_Bool ) // export (fill-)bitmap-styles try { - uno::Reference< container::XNameAccess > xBitmap( xFact->createInstance( OUString("com.sun.star.drawing.BitmapTable" ) ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xBitmap( xFact->createInstance("com.sun.star.drawing.BitmapTable"), uno::UNO_QUERY ); if( xBitmap.is() ) { XMLImageStyle aImageStyle; @@ -1618,7 +1618,7 @@ void SvXMLExport::_ExportStyles( sal_Bool ) // export transparency-gradient -styles try { - uno::Reference< container::XNameAccess > xTransGradient( xFact->createInstance( OUString("com.sun.star.drawing.TransparencyGradientTable" ) ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xTransGradient( xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"), uno::UNO_QUERY ); if( xTransGradient.is() ) { XMLTransGradientStyleExport aTransGradientstyle( *this ); @@ -1651,7 +1651,7 @@ void SvXMLExport::_ExportStyles( sal_Bool ) // export marker-styles try { - uno::Reference< container::XNameAccess > xMarker( xFact->createInstance( OUString("com.sun.star.drawing.MarkerTable" ) ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xMarker( xFact->createInstance("com.sun.star.drawing.MarkerTable"), uno::UNO_QUERY ); if( xMarker.is() ) { XMLMarkerStyleExport aMarkerStyle( *this ); @@ -1684,7 +1684,7 @@ void SvXMLExport::_ExportStyles( sal_Bool ) // export dash-styles try { - uno::Reference< container::XNameAccess > xDashes( xFact->createInstance( OUString("com.sun.star.drawing.DashTable" ) ), uno::UNO_QUERY ); + uno::Reference< container::XNameAccess > xDashes( xFact->createInstance("com.sun.star.drawing.DashTable"), uno::UNO_QUERY ); if( xDashes.is() ) { XMLDashStyleExport aDashStyle( *this ); @@ -2103,7 +2103,7 @@ sal_Bool SvXMLExport::ExportEmbeddedOwnObject( Reference< XComponent >& rComp ) new ::comphelper::PropertySetInfo( aInfoMap ))); if( bIsChart ) - xInfoProp->setPropertyValue( OUString( "ExportTableNumberList"), makeAny( true )); + xInfoProp->setPropertyValue("ExportTableNumberList", makeAny( true )); aArgs.realloc( 2 ); aArgs[1] <<= xInfoProp; diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index fd31cca8db66..06ca5ac77757 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -571,9 +571,9 @@ void AnimationsExporterImpl::exportTransitionNode() if( mbHasTransition && mxPageProps.is() ) { sal_Int16 nTransition = 0; - mxPageProps->getPropertyValue( OUString( "TransitionType" ) ) >>= nTransition; + mxPageProps->getPropertyValue("TransitionType") >>= nTransition; - Any aSound( mxPageProps->getPropertyValue( OUString( "Sound" ) ) ); + Any aSound( mxPageProps->getPropertyValue("Sound") ); OUString sSoundURL; aSound >>= sSoundURL; sal_Bool bStopSound = sal_False; @@ -601,10 +601,10 @@ void AnimationsExporterImpl::exportTransitionNode() sal_Bool bDirection = sal_False; sal_Int32 nFadeColor = 0; double fDuration = 0.0; - mxPageProps->getPropertyValue( OUString( "TransitionSubtype" ) ) >>= nSubtype; - mxPageProps->getPropertyValue( OUString( "TransitionDirection" ) ) >>= bDirection; - mxPageProps->getPropertyValue( OUString( "TransitionFadeColor" ) ) >>= nFadeColor; - mxPageProps->getPropertyValue( OUString( "TransitionDuration" ) ) >>= fDuration; + mxPageProps->getPropertyValue("TransitionSubtype") >>= nSubtype; + mxPageProps->getPropertyValue("TransitionDirection") >>= bDirection; + mxPageProps->getPropertyValue("TransitionFadeColor") >>= nFadeColor; + mxPageProps->getPropertyValue("TransitionDuration") >>= fDuration; ::sax::Converter::convertDouble( sTmp, fDuration ); sTmp.append( sal_Unicode('s')); @@ -640,7 +640,7 @@ void AnimationsExporterImpl::exportTransitionNode() mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, mrExport.GetRelativeReference( sSoundURL ) ); sal_Bool bLoopSound = sal_False; - mxPageProps->getPropertyValue( OUString( "LoopSound" ) ) >>= bLoopSound; + mxPageProps->getPropertyValue("LoopSound") >>= bLoopSound; if( bLoopSound ) mrExport.AddAttribute( XML_NAMESPACE_SMIL, XML_REPEATCOUNT, XML_INDEFINITE ); @@ -655,14 +655,14 @@ void AnimationsExporterImpl::prepareTransitionNode() if( mxPageProps.is() ) try { sal_Int16 nTransition = 0; - mxPageProps->getPropertyValue( OUString( "TransitionType" ) ) >>= nTransition; + mxPageProps->getPropertyValue("TransitionType") >>= nTransition; sal_Bool bStopSound = sal_False; OUString sSoundURL; if( nTransition == 0 ) { - Any aSound( mxPageProps->getPropertyValue( OUString( "Sound" ) ) ); + Any aSound( mxPageProps->getPropertyValue("Sound") ); aSound >>= sSoundURL; if( !(aSound >>= bStopSound) ) diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 12f587e3feae..f3bb2ffd872f 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -1378,14 +1378,14 @@ void AnimationNodeContext::postProcessRootNode( SvXMLImport& /*rImport*/, const Reference< XTransitionFilter > xTransFilter( xChildNode, UNO_QUERY_THROW ); - xPageProps->setPropertyValue( OUString( "TransitionType" ), Any( xTransFilter->getTransition() ) ); - xPageProps->setPropertyValue( OUString( "TransitionSubtype" ), Any( xTransFilter->getSubtype() ) ); - xPageProps->setPropertyValue( OUString( "TransitionDirection" ), Any( xTransFilter->getDirection() ) ); - xPageProps->setPropertyValue( OUString( "TransitionFadeColor" ), Any( xTransFilter->getFadeColor() ) ); + xPageProps->setPropertyValue("TransitionType", Any( xTransFilter->getTransition() ) ); + xPageProps->setPropertyValue("TransitionSubtype", Any( xTransFilter->getSubtype() ) ); + xPageProps->setPropertyValue("TransitionDirection", Any( xTransFilter->getDirection() ) ); + xPageProps->setPropertyValue("TransitionFadeColor", Any( xTransFilter->getFadeColor() ) ); double fDuration; if( xTransFilter->getDuration() >>= fDuration ) - xPageProps->setPropertyValue( OUString( "TransitionDuration" ), Any( fDuration ) ); + xPageProps->setPropertyValue("TransitionDuration", Any( fDuration ) ); } break; @@ -1395,7 +1395,7 @@ void AnimationNodeContext::postProcessRootNode( SvXMLImport& /*rImport*/, const Reference< XCommand > xCommand( xChildNode, UNO_QUERY_THROW ); if( xCommand->getCommand() == EffectCommands::STOPAUDIO ) { - xPageProps->setPropertyValue( OUString( "Sound" ), Any(sal_True) ); + xPageProps->setPropertyValue("Sound", Any(sal_True) ); } } break; @@ -1406,11 +1406,11 @@ void AnimationNodeContext::postProcessRootNode( SvXMLImport& /*rImport*/, const OUString sSoundURL; if( (xAudio->getSource() >>= sSoundURL) && !sSoundURL.isEmpty() ) { - xPageProps->setPropertyValue( OUString( "Sound" ), Any(sSoundURL) ); + xPageProps->setPropertyValue("Sound", Any(sSoundURL) ); Timing eTiming; if( (xAudio->getRepeatCount() >>= eTiming) && (eTiming == Timing_INDEFINITE) ) - xPageProps->setPropertyValue( OUString( "LoopSound" ), Any( sal_True ) ); + xPageProps->setPropertyValue("LoopSound", Any( sal_True ) ); } } break; diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index 90cc84697499..2ea06e1b9695 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -275,7 +275,7 @@ void XMLAnimationsExporter::prepare( Reference< XShape > xShape, SvXMLExport& ) // check for presentation shape service { Reference< XServiceInfo > xServiceInfo( xShape, UNO_QUERY ); - if( !xServiceInfo.is() || !xServiceInfo->supportsService( OUString( "com.sun.star.presentation.Shape" ) ) ) + if( !xServiceInfo.is() || !xServiceInfo->supportsService("com.sun.star.presentation.Shape") ) return; } @@ -304,7 +304,7 @@ void XMLAnimationsExporter::collect( Reference< XShape > xShape, SvXMLExport& rE // check for presentation shape service { Reference< XServiceInfo > xServiceInfo( xShape, UNO_QUERY ); - if( !xServiceInfo.is() || !xServiceInfo->supportsService( OUString( "com.sun.star.presentation.Shape" ) ) ) + if( !xServiceInfo.is() || !xServiceInfo->supportsService("com.sun.star.presentation.Shape") ) return; } diff --git a/xmloff/source/draw/descriptionimp.cxx b/xmloff/source/draw/descriptionimp.cxx index 3d1417af3ca7..265918c6187d 100644 --- a/xmloff/source/draw/descriptionimp.cxx +++ b/xmloff/source/draw/descriptionimp.cxx @@ -59,11 +59,11 @@ void SdXMLDescriptionContext::EndElement() uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY_THROW); if(IsXMLToken(GetLocalName(),XML_TITLE)) { - xPropSet->setPropertyValue(OUString("Title"), Any(msText)); + xPropSet->setPropertyValue("Title", Any(msText)); } else { - xPropSet->setPropertyValue(OUString("Description"), Any(msText)); + xPropSet->setPropertyValue("Description", Any(msText)); } } catch( uno::Exception& ) diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index dd5731775231..f0eb1494944b 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.cxx @@ -125,13 +125,13 @@ void SdXMLLayerContext::EndElement() DBG_ASSERT( xLayer.is(), "xmloff::SdXMLLayerContext::EndElement(), failed to create new XLayer!" ); if( xLayer.is() ) - xLayer->setPropertyValue( OUString( "Name" ), Any( msName ) ); + xLayer->setPropertyValue("Name", Any( msName ) ); } if( xLayer.is() ) { - xLayer->setPropertyValue( OUString( "Title" ), Any( sTitleBuffer.makeStringAndClear() ) ); - xLayer->setPropertyValue( OUString( "Description" ), Any( sDescriptionBuffer.makeStringAndClear() ) ); + xLayer->setPropertyValue("Title", Any( sTitleBuffer.makeStringAndClear() ) ); + xLayer->setPropertyValue("Description", Any( sDescriptionBuffer.makeStringAndClear() ) ); } } catch( Exception& ) diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index c9149b9ae87a..328c7fd8453f 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -138,33 +138,33 @@ ImpXMLEXPPageMasterInfo::ImpXMLEXPPageMasterInfo( Any aAny; Reference< beans::XPropertySetInfo > xPropsInfo( xPropSet->getPropertySetInfo() ); - if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString("BorderBottom" ))) + if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("BorderBottom")) { - aAny = xPropSet->getPropertyValue(OUString("BorderBottom")); + aAny = xPropSet->getPropertyValue("BorderBottom"); aAny >>= mnBorderBottom; - aAny = xPropSet->getPropertyValue(OUString("BorderLeft")); + aAny = xPropSet->getPropertyValue("BorderLeft"); aAny >>= mnBorderLeft; - aAny = xPropSet->getPropertyValue(OUString("BorderRight")); + aAny = xPropSet->getPropertyValue("BorderRight"); aAny >>= mnBorderRight; - aAny = xPropSet->getPropertyValue(OUString("BorderTop")); + aAny = xPropSet->getPropertyValue("BorderTop"); aAny >>= mnBorderTop; } - if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString("Width"))) + if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("Width")) { - aAny = xPropSet->getPropertyValue(OUString("Width")); + aAny = xPropSet->getPropertyValue("Width"); aAny >>= mnWidth; - aAny = xPropSet->getPropertyValue(OUString("Height")); + aAny = xPropSet->getPropertyValue("Height"); aAny >>= mnHeight; } - if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString("Orientation"))) + if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("Orientation")) { - aAny = xPropSet->getPropertyValue(OUString("Orientation")); + aAny = xPropSet->getPropertyValue("Orientation"); aAny >>= meOrientation; } } @@ -776,7 +776,7 @@ sal_Bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, O sal_uInt16 nType = sal_uInt16(); Any aAny; - aAny = xPropSet->getPropertyValue(OUString("Layout")); + aAny = xPropSet->getPropertyValue("Layout"); if(aAny >>= nType) { if(ImpXMLAutoLayoutInfo::IsCreateNecessary(nType)) @@ -1554,8 +1554,8 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons sal_Bool bFixed = false; sal_Int32 nFormat = 0; xSet->getPropertyValue( aStrDateTimeTextProp ) >>= aStrText; - xSet->getPropertyValue( OUString( "IsDateTimeFixed" ) ) >>= bFixed; - xSet->getPropertyValue( OUString( "DateTimeFormat" ) ) >>= nFormat; + xSet->getPropertyValue("IsDateTimeFixed") >>= bFixed; + xSet->getPropertyValue("DateTimeFormat") >>= nFormat; if( !bFixed || !aStrText.isEmpty() ) { @@ -1864,7 +1864,7 @@ void SdXMLExport::_ExportContent() try { OUString aBookmarkURL; - xProps->getPropertyValue( OUString( "BookmarkURL" ) ) >>= aBookmarkURL; + xProps->getPropertyValue("BookmarkURL") >>= aBookmarkURL; if( !aBookmarkURL.isEmpty() ) { @@ -2016,11 +2016,11 @@ void SdXMLExport::exportPresentationSettings() sal_Bool bTemp = false; // export range - xPresProps->getPropertyValue( OUString( "IsShowAll" ) ) >>= bTemp; + xPresProps->getPropertyValue("IsShowAll") >>= bTemp; if( !bTemp ) { OUString aFirstPage; - xPresProps->getPropertyValue( OUString( "FirstPage" ) ) >>= aFirstPage; + xPresProps->getPropertyValue("FirstPage") >>= aFirstPage; if( !aFirstPage.isEmpty() ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_START_PAGE, aFirstPage ); @@ -2029,7 +2029,7 @@ void SdXMLExport::exportPresentationSettings() else { OUString aCustomShow; - xPresProps->getPropertyValue( OUString( "CustomShow" ) ) >>= aCustomShow; + xPresProps->getPropertyValue("CustomShow") >>= aCustomShow; if( !aCustomShow.isEmpty() ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_SHOW, aCustomShow ); @@ -2038,14 +2038,14 @@ void SdXMLExport::exportPresentationSettings() } } - xPresProps->getPropertyValue( OUString( "IsEndless" ) ) >>= bTemp; + xPresProps->getPropertyValue("IsEndless") >>= bTemp; if( bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_ENDLESS, XML_TRUE ); bHasAttr = sal_True; sal_Int32 nPause = 0; - xPresProps->getPropertyValue( OUString( "Pause" ) ) >>= nPause; + xPresProps->getPropertyValue("Pause") >>= nPause; util::Duration aDuration; aDuration.Seconds = static_cast<sal_uInt16>(nPause); @@ -2055,63 +2055,63 @@ void SdXMLExport::exportPresentationSettings() AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PAUSE, aOut.makeStringAndClear() ); } - xPresProps->getPropertyValue( OUString( "AllowAnimations" ) ) >>= bTemp; + xPresProps->getPropertyValue("AllowAnimations") >>= bTemp; if( !bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_ANIMATIONS, XML_DISABLED ); bHasAttr = sal_True; } - xPresProps->getPropertyValue( OUString( "IsAlwaysOnTop" ) ) >>= bTemp; + xPresProps->getPropertyValue("IsAlwaysOnTop") >>= bTemp; if( bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_STAY_ON_TOP, XML_TRUE ); bHasAttr = sal_True; } - xPresProps->getPropertyValue( OUString( "IsAutomatic" ) ) >>= bTemp; + xPresProps->getPropertyValue("IsAutomatic") >>= bTemp; if( bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_FORCE_MANUAL, XML_TRUE ); bHasAttr = sal_True; } - xPresProps->getPropertyValue( OUString( "IsFullScreen" ) ) >>= bTemp; + xPresProps->getPropertyValue("IsFullScreen") >>= bTemp; if( !bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_FULL_SCREEN, XML_FALSE ); bHasAttr = sal_True; } - xPresProps->getPropertyValue( OUString( "IsMouseVisible" ) ) >>= bTemp; + xPresProps->getPropertyValue("IsMouseVisible") >>= bTemp; if( !bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_MOUSE_VISIBLE, XML_FALSE ); bHasAttr = sal_True; } - xPresProps->getPropertyValue( OUString( "StartWithNavigator" ) ) >>= bTemp; + xPresProps->getPropertyValue("StartWithNavigator") >>= bTemp; if( bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_START_WITH_NAVIGATOR, XML_TRUE ); bHasAttr = sal_True; } - xPresProps->getPropertyValue( OUString( "UsePen" ) ) >>= bTemp; + xPresProps->getPropertyValue("UsePen") >>= bTemp; if( bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_MOUSE_AS_PEN, XML_TRUE ); bHasAttr = sal_True; } - xPresProps->getPropertyValue( OUString( "IsTransitionOnClick" ) ) >>= bTemp; + xPresProps->getPropertyValue("IsTransitionOnClick") >>= bTemp; if( !bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_TRANSITION_ON_CLICK, XML_DISABLED ); bHasAttr = sal_True; } - xPresProps->getPropertyValue( OUString( "IsShowLogo" ) ) >>= bTemp; + xPresProps->getPropertyValue("IsShowLogo") >>= bTemp; if( bTemp ) { AddAttribute(XML_NAMESPACE_PRESENTATION, XML_SHOW_LOGO, XML_TRUE ); @@ -2576,7 +2576,7 @@ void SdXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps) return; awt::Rectangle aVisArea; - xPropSet->getPropertyValue( OUString( "VisibleArea" ) ) >>= aVisArea; + xPropSet->getPropertyValue("VisibleArea") >>= aVisArea; sal_uInt16 i = 0; pProps[i].Name = OUString("VisibleAreaTop"); @@ -2595,7 +2595,7 @@ void SdXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>& Reference< lang::XMultiServiceFactory > xFac( GetModel(), UNO_QUERY ); if( xFac.is() ) { - Reference< beans::XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), UNO_QUERY ); + Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), UNO_QUERY ); if( xProps.is() ) SvXMLUnitConverter::convertPropertySet( rProps, xProps ); DocumentSettingsSerializer *pFilter; @@ -2671,7 +2671,7 @@ OUString SdXMLExport::getNavigationOrder( const Reference< XDrawPage >& xDrawPag try { Reference< XPropertySet > xSet( xDrawPage, UNO_QUERY_THROW ); - Reference< XIndexAccess > xNavOrder( xSet->getPropertyValue( OUString( "NavigationOrder" ) ), UNO_QUERY_THROW ); + Reference< XIndexAccess > xNavOrder( xSet->getPropertyValue("NavigationOrder"), UNO_QUERY_THROW ); Reference< XIndexAccess > xZOrderAccess( xDrawPage, UNO_QUERY ); @@ -2934,7 +2934,7 @@ XMLFontAutoStylePool* SdXMLExport::CreateFontAutoStylePool() Reference< beans::XPropertySet > xProps( GetModel(), UNO_QUERY ); if ( xProps.is() ) { Sequence<Any> aAnySeq; - if( xProps->getPropertyValue(OUString("Fonts")) >>= aAnySeq ) + if( xProps->getPropertyValue("Fonts") >>= aAnySeq ) { if( aAnySeq.getLength() % 5 == 0 ) { diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 3626c784c7ba..fe4d766f9b4b 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -366,7 +366,7 @@ void SAL_CALL SdXMLImport::setTargetDocument( const uno::Reference< lang::XCompo if( !xDocServices.is() ) throw lang::IllegalArgumentException(); - mbIsDraw = !xDocServices->supportsService( OUString( "com.sun.star.presentation.PresentationDocument" ) ); + mbIsDraw = !xDocServices->supportsService("com.sun.star.presentation.PresentationDocument"); // prepare access to styles uno::Reference< style::XStyleFamiliesSupplier > xFamSup( GetModel(), uno::UNO_QUERY ); @@ -876,7 +876,7 @@ void SdXMLImport::SetViewSettings(const com::sun::star::uno::Sequence<com::sun:: try { - xPropSet->setPropertyValue( OUString( "VisibleArea" ), uno::makeAny( aVisArea ) ); + xPropSet->setPropertyValue("VisibleArea", uno::makeAny( aVisArea ) ); } catch(const com::sun::star::uno::Exception&) { @@ -893,7 +893,7 @@ void SdXMLImport::SetConfigurationSettings(const com::sun::star::uno::Sequence<c if( !xFac.is() ) return; - uno::Reference< beans::XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY ); if( !xProps.is() ) return; @@ -1071,7 +1071,7 @@ void SdXMLImport::NotifyEmbeddedFontRead() uno::Reference< lang::XMultiServiceFactory > xFac( GetModel(), uno::UNO_QUERY ); if( xFac.is() ) { - uno::Reference< beans::XPropertySet > xProps( xFac->createInstance( OUString( "com.sun.star.document.Settings" ) ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY ); if( xProps.is() ) xProps->setPropertyValue("EmbedFonts", uno::makeAny( true ) ); } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 14ec5c8c205a..d9cf37534e7e 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -144,7 +144,7 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement if( xSet.is() ) { OUString aEngine; - xSet->getPropertyValue( OUString( "CustomShapeEngine" ) ) >>= aEngine; + xSet->getPropertyValue("CustomShapeEngine") >>= aEngine; if ( aEngine.isEmpty() ) { aEngine = "com.sun.star.drawing.EnhancedCustomShapeEngine"; @@ -269,8 +269,8 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap if( bObjSupportsStyle ) { - if( xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName( OUString("Style")) ) - xPropSet->getPropertyValue(OUString("Style")) >>= xStyle; + if( xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName("Style") ) + xPropSet->getPropertyValue("Style") >>= xStyle; if(xStyle.is()) { @@ -282,7 +282,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap if(xStylePropSet.is()) { OUString aFamilyName; - xStylePropSet->getPropertyValue(OUString("Family")) >>= aFamilyName; + xStylePropSet->getPropertyValue("Family") >>= aFamilyName; if( !aFamilyName.isEmpty() && aFamilyName != "graphics" ) aShapeInfo.mnFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID; } @@ -531,7 +531,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape if( xSet.is() && (GetExport().GetModelType() == SvtModuleOptions::E_DRAW) ) try { presentation::ClickAction eAction = presentation::ClickAction_NONE; - xSet->getPropertyValue(OUString("OnClick")) >>= eAction; + xSet->getPropertyValue("OnClick") >>= eAction; if( (eAction == presentation::ClickAction_DOCUMENT) || (eAction == presentation::ClickAction_BOOKMARK) ) @@ -667,7 +667,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape { uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); OUString aLayerName; - xProps->getPropertyValue( OUString( "LayerName" ) ) >>= aLayerName; + xProps->getPropertyValue("LayerName") >>= aLayerName; mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_LAYER, aLayerName ); } @@ -1079,7 +1079,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x if(xPropSet.is()) { OUString sCLSID; - if(xPropSet->getPropertyValue(OUString("CLSID")) >>= sCLSID) + if(xPropSet->getPropertyValue("CLSID") >>= sCLSID) { if (sCLSID.equals(mrExport.GetChartExport()->getChartCLSID()) || sCLSID.equals(OUString( SvGlobalName( SO3_RPTCH_CLASSID ).GetHexName()))) @@ -1130,7 +1130,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x if(xPropSet.is()) try { OUString sCLSID; - if(xPropSet->getPropertyValue(OUString("CLSID")) >>= sCLSID) + if(xPropSet->getPropertyValue("CLSID") >>= sCLSID) { if( sCLSID.equals(OUString( SvGlobalName( SO3_SC_CLASSID ).GetHexName())) ) { @@ -1235,7 +1235,7 @@ void XMLShapeExport::ExportGraphicDefaults() { try { - uno::Reference< beans::XPropertySet > xDefaults( xFact->createInstance( OUString("com.sun.star.drawing.Defaults" ) ), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xDefaults( xFact->createInstance("com.sun.star.drawing.Defaults"), uno::UNO_QUERY ); if( xDefaults.is() ) { aStEx.exportDefaultStyle( xDefaults, OUString(XML_STYLE_FAMILY_SD_GRAPHICS_NAME), xPropertySetMapper ); diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index 58cb26e03d1a..a55d70b57be2 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -97,11 +97,11 @@ void XMLShapeExport::ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& xPropSet->getPropertySetInfo()->hasPropertyByName( OUString("TransformationInHoriL2R")) ) { - aAny = xPropSet->getPropertyValue(OUString("TransformationInHoriL2R")); + aAny = xPropSet->getPropertyValue("TransformationInHoriL2R"); } else { - aAny = xPropSet->getPropertyValue(OUString("Transformation")); + aAny = xPropSet->getPropertyValue("Transformation"); } drawing::HomogenMatrix3 aMatrix; aAny >>= aMatrix; @@ -238,17 +238,17 @@ sal_Bool XMLShapeExport::ImpExportPresentationAttributes( const uno::Reference< sal_Bool bTemp = false; // is empty pes shape? - if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString("IsEmptyPresentationObject"))) + if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("IsEmptyPresentationObject")) { - xPropSet->getPropertyValue(OUString("IsEmptyPresentationObject")) >>= bIsEmpty; + xPropSet->getPropertyValue("IsEmptyPresentationObject") >>= bIsEmpty; if( bIsEmpty ) mrExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PLACEHOLDER, XML_TRUE); } // is user-transformed? - if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(OUString("IsPlaceholderDependent"))) + if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("IsPlaceholderDependent")) { - xPropSet->getPropertyValue(OUString("IsPlaceholderDependent")) >>= bTemp; + xPropSet->getPropertyValue("IsPlaceholderDependent") >>= bTemp; if(!bTemp) mrExport.AddAttribute(XML_NAMESPACE_PRESENTATION, XML_USER_TRANSFORMED, XML_TRUE); } @@ -558,8 +558,8 @@ void XMLShapeExport::ImpExportDescription( const uno::Reference< drawing::XShape OUString aDescription; uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( OUString( "Title" ) ) >>= aTitle; - xProps->getPropertyValue( OUString( "Description" ) ) >>= aDescription; + xProps->getPropertyValue("Title") >>= aTitle; + xProps->getPropertyValue("Description") >>= aDescription; if(!aTitle.isEmpty()) { @@ -694,7 +694,7 @@ void XMLShapeExport::ImpExportTextBoxShape( // evtl. corner radius? sal_Int32 nCornerRadius(0L); - xPropSet->getPropertyValue(OUString("CornerRadius")) >>= nCornerRadius; + xPropSet->getPropertyValue("CornerRadius") >>= nCornerRadius; if(nCornerRadius) { OUStringBuffer sStringBuffer; @@ -730,7 +730,7 @@ void XMLShapeExport::ImpExportRectangleShape( // evtl. corner radius? sal_Int32 nCornerRadius(0L); - xPropSet->getPropertyValue(OUString("CornerRadius")) >>= nCornerRadius; + xPropSet->getPropertyValue("CornerRadius") >>= nCornerRadius; if(nCornerRadius) { OUStringBuffer sStringBuffer; @@ -782,7 +782,7 @@ void XMLShapeExport::ImpExportLineShape( awt::Point aBasePosition(FRound(aTRTranslate.getX()), FRound(aTRTranslate.getY())); // get the two points - uno::Any aAny(xPropSet->getPropertyValue(OUString("Geometry"))); + uno::Any aAny(xPropSet->getPropertyValue("Geometry")); drawing::PointSequenceSequence* pSourcePolyPolygon = (drawing::PointSequenceSequence*)aAny.getValue(); if(pSourcePolyPolygon) @@ -883,14 +883,14 @@ void XMLShapeExport::ImpExportEllipseShape( ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); drawing::CircleKind eKind = drawing::CircleKind_FULL; - xPropSet->getPropertyValue( OUString("CircleKind") ) >>= eKind; + xPropSet->getPropertyValue("CircleKind") >>= eKind; if( eKind != drawing::CircleKind_FULL ) { OUStringBuffer sStringBuffer; sal_Int32 nStartAngle = 0; sal_Int32 nEndAngle = 0; - xPropSet->getPropertyValue( OUString("CircleStartAngle") ) >>= nStartAngle; - xPropSet->getPropertyValue( OUString("CircleEndAngle") ) >>= nEndAngle; + xPropSet->getPropertyValue("CircleStartAngle") >>= nStartAngle; + xPropSet->getPropertyValue("CircleEndAngle") >>= nEndAngle; const double dStartAngle = nStartAngle / 100.0; const double dEndAngle = nEndAngle / 100.0; @@ -972,7 +972,7 @@ void XMLShapeExport::ImpExportPolygonShape( if(bBezier) { // get PolygonBezier - uno::Any aAny( xPropSet->getPropertyValue(OUString("Geometry")) ); + uno::Any aAny( xPropSet->getPropertyValue("Geometry") ); drawing::PolyPolygonBezierCoords* pSourcePolyPolygon = (drawing::PolyPolygonBezierCoords*)aAny.getValue(); @@ -1015,7 +1015,7 @@ void XMLShapeExport::ImpExportPolygonShape( else { // get non-bezier polygon - uno::Any aAny( xPropSet->getPropertyValue(OUString("Geometry")) ); + uno::Any aAny( xPropSet->getPropertyValue("Geometry") ); drawing::PointSequenceSequence* pSourcePolyPolygon = (drawing::PointSequenceSequence*)aAny.getValue(); if(pSourcePolyPolygon && pSourcePolyPolygon->getLength()) @@ -1112,7 +1112,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( if( !bIsEmptyPresObj ) { OUString aReplacementUrl; - xPropSet->getPropertyValue( OUString("ReplacementGraphicURL")) >>= aReplacementUrl; + xPropSet->getPropertyValue("ReplacementGraphicURL") >>= aReplacementUrl; // If there is no url, then then graphic is empty if(!aReplacementUrl.isEmpty()) @@ -1137,8 +1137,8 @@ void XMLShapeExport::ImpExportGraphicObjectShape( OUString aStreamURL; OUString aStr; - xPropSet->getPropertyValue( OUString("GraphicStreamURL")) >>= aStreamURL; - xPropSet->getPropertyValue( OUString("GraphicURL")) >>= sImageURL; + xPropSet->getPropertyValue("GraphicStreamURL") >>= aStreamURL; + xPropSet->getPropertyValue("GraphicURL") >>= sImageURL; OUString aResolveURL( sImageURL ); const OUString sPackageURL( "vnd.sun.star.Package:" ); @@ -1174,7 +1174,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( // update stream URL for load on demand uno::Any aAny; aAny <<= aStreamURL; - xPropSet->setPropertyValue( OUString("GraphicStreamURL"), aAny ); + xPropSet->setPropertyValue("GraphicStreamURL", aAny ); mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); @@ -1266,7 +1266,7 @@ void XMLShapeExport::ImpExportConnectorShape( // export connection kind drawing::ConnectorType eType = drawing::ConnectorType_STANDARD; - uno::Any aAny = xProps->getPropertyValue(OUString("EdgeKind")); + uno::Any aAny = xProps->getPropertyValue("EdgeKind"); aAny >>= eType; if( eType != drawing::ConnectorType_STANDARD ) @@ -1279,11 +1279,11 @@ void XMLShapeExport::ImpExportConnectorShape( // export line skew sal_Int32 nDelta1 = 0, nDelta2 = 0, nDelta3 = 0; - aAny = xProps->getPropertyValue(OUString("EdgeLine1Delta")); + aAny = xProps->getPropertyValue("EdgeLine1Delta"); aAny >>= nDelta1; - aAny = xProps->getPropertyValue(OUString("EdgeLine2Delta")); + aAny = xProps->getPropertyValue("EdgeLine2Delta"); aAny >>= nDelta2; - aAny = xProps->getPropertyValue(OUString("EdgeLine3Delta")); + aAny = xProps->getPropertyValue("EdgeLine3Delta"); aAny >>= nDelta3; if( nDelta1 != 0 || nDelta2 != 0 || nDelta3 != 0 ) @@ -1330,13 +1330,13 @@ void XMLShapeExport::ImpExportConnectorShape( xProps->getPropertySetInfo()->hasPropertyByName( OUString("EndPositionInHoriL2R")) ) { - xProps->getPropertyValue(OUString("StartPositionInHoriL2R")) >>= aStart; - xProps->getPropertyValue(OUString("EndPositionInHoriL2R")) >>= aEnd; + xProps->getPropertyValue("StartPositionInHoriL2R") >>= aStart; + xProps->getPropertyValue("EndPositionInHoriL2R") >>= aEnd; } else { - xProps->getPropertyValue(OUString("StartPosition")) >>= aStart; - xProps->getPropertyValue(OUString("EndPosition")) >>= aEnd; + xProps->getPropertyValue("StartPosition") >>= aStart; + xProps->getPropertyValue("EndPosition") >>= aEnd; } if( pRefPoint ) @@ -1388,13 +1388,13 @@ void XMLShapeExport::ImpExportConnectorShape( uno::Reference< uno::XInterface > xRefE; // export start connection - xProps->getPropertyValue(OUString("StartShape" ) ) >>= xRefS; + xProps->getPropertyValue("StartShape") >>= xRefS; if( xRefS.is() ) { const OUString& rShapeId = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xRefS ); mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_START_SHAPE, rShapeId); - aAny = xProps->getPropertyValue(OUString("StartGluePointIndex") ); + aAny = xProps->getPropertyValue("StartGluePointIndex"); sal_Int32 nGluePointId = 0; if( aAny >>= nGluePointId ) { @@ -1406,13 +1406,13 @@ void XMLShapeExport::ImpExportConnectorShape( } // export end connection - xProps->getPropertyValue(OUString("EndShape") ) >>= xRefE; + xProps->getPropertyValue("EndShape") >>= xRefE; if( xRefE.is() ) { const OUString& rShapeId = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xRefE ); mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_END_SHAPE, rShapeId); - aAny = xProps->getPropertyValue(OUString("EndGluePointIndex") ); + aAny = xProps->getPropertyValue("EndGluePointIndex"); sal_Int32 nGluePointId = 0; if( aAny >>= nGluePointId ) { @@ -1423,7 +1423,7 @@ void XMLShapeExport::ImpExportConnectorShape( } } - if( xProps->getPropertyValue( OUString( "PolyPolygonBezier" ) ) >>= aAny ) + if( xProps->getPropertyValue("PolyPolygonBezier") >>= aAny ) { // get PolygonBezier drawing::PolyPolygonBezierCoords* pSourcePolyPolygon = @@ -1522,13 +1522,13 @@ void XMLShapeExport::ImpExportMeasureShape( xProps->getPropertySetInfo()->hasPropertyByName( OUString("EndPositionInHoriL2R")) ) { - xProps->getPropertyValue(OUString("StartPositionInHoriL2R")) >>= aStart; - xProps->getPropertyValue(OUString("EndPositionInHoriL2R")) >>= aEnd; + xProps->getPropertyValue("StartPositionInHoriL2R") >>= aStart; + xProps->getPropertyValue("EndPositionInHoriL2R") >>= aEnd; } else { - xProps->getPropertyValue(OUString("StartPosition")) >>= aStart; - xProps->getPropertyValue(OUString("EndPosition")) >>= aEnd; + xProps->getPropertyValue("StartPosition") >>= aStart; + xProps->getPropertyValue("EndPosition") >>= aEnd; } if( pRefPoint ) @@ -1632,7 +1632,7 @@ void XMLShapeExport::ImpExportOLE2Shape( OUString sClassId; OUString sURL; sal_Bool bInternal = false; - xPropSet->getPropertyValue(OUString("IsInternal")) >>= bInternal; + xPropSet->getPropertyValue("IsInternal") >>= bInternal; if( !bIsEmptyPresObj ) { @@ -1641,10 +1641,10 @@ void XMLShapeExport::ImpExportOLE2Shape( { // OOo internal links have no storage persistance, URL is stored in the XML file // the result LinkURL is empty in case the object is not a link - xPropSet->getPropertyValue( OUString( "LinkURL" ) ) >>= sURL; + xPropSet->getPropertyValue("LinkURL") >>= sURL; } - xPropSet->getPropertyValue( OUString( "PersistName" ) ) >>= sPersistName; + xPropSet->getPropertyValue("PersistName") >>= sPersistName; if ( sURL.isEmpty() ) { if( !sPersistName.isEmpty() ) @@ -1655,7 +1655,7 @@ void XMLShapeExport::ImpExportOLE2Shape( } if( !bInternal ) - xPropSet->getPropertyValue(OUString("CLSID")) >>= sClassId; + xPropSet->getPropertyValue("CLSID") >>= sClassId; if( !sClassId.isEmpty() ) mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_CLASS_ID, sClassId ); @@ -1705,7 +1705,7 @@ void XMLShapeExport::ImpExportOLE2Shape( { // embedded XML uno::Reference< lang::XComponent > xComp; - xPropSet->getPropertyValue( OUString("Model" ) ) >>= xComp; + xPropSet->getPropertyValue("Model") >>= xComp; DBG_ASSERT( xComp.is(), "no xModel for own OLE format" ); mrExport.ExportEmbeddedOwnObject( xComp ); } @@ -1800,7 +1800,7 @@ void XMLShapeExport::ImpExportCaptionShape( // evtl. corner radius? sal_Int32 nCornerRadius(0L); - xPropSet->getPropertyValue(OUString("CornerRadius")) >>= nCornerRadius; + xPropSet->getPropertyValue("CornerRadius") >>= nCornerRadius; if(nCornerRadius) { OUStringBuffer sStringBuffer; @@ -1810,7 +1810,7 @@ void XMLShapeExport::ImpExportCaptionShape( } awt::Point aCaptionPoint; - xPropSet->getPropertyValue( OUString( "CaptionPoint" ) ) >>= aCaptionPoint; + xPropSet->getPropertyValue("CaptionPoint") >>= aCaptionPoint; mrExport.GetMM100UnitConverter().convertMeasureToXML(msBuffer, aCaptionPoint.X); @@ -1856,14 +1856,14 @@ void XMLShapeExport::ImpExportFrameShape( // export frame url OUString aStr; - xPropSet->getPropertyValue( OUString( "FrameURL" ) ) >>= aStr; + xPropSet->getPropertyValue("FrameURL") >>= aStr; mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStr) ); mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); // export name - xPropSet->getPropertyValue( OUString( "FrameName" ) ) >>= aStr; + xPropSet->getPropertyValue("FrameName") >>= aStr; if( !aStr.isEmpty() ) mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_FRAME_NAME, aStr ); @@ -1892,24 +1892,24 @@ void XMLShapeExport::ImpExportAppletShape( // export frame url OUString aStr; - xPropSet->getPropertyValue( OUString( "AppletCodeBase" ) ) >>= aStr; + xPropSet->getPropertyValue("AppletCodeBase") >>= aStr; mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStr) ); mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD ); // export draw:applet-name - xPropSet->getPropertyValue( OUString( "AppletName" ) ) >>= aStr; + xPropSet->getPropertyValue("AppletName") >>= aStr; if( !aStr.isEmpty() ) mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr ); // export draw:code - xPropSet->getPropertyValue( OUString( "AppletCode" ) ) >>= aStr; + xPropSet->getPropertyValue("AppletCode") >>= aStr; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr ); // export draw:may-script sal_Bool bIsScript = false; - xPropSet->getPropertyValue( OUString( "AppletIsScript" ) ) >>= bIsScript; + xPropSet->getPropertyValue("AppletIsScript") >>= bIsScript; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MAY_SCRIPT, bIsScript ? XML_TRUE : XML_FALSE ); { @@ -1918,7 +1918,7 @@ void XMLShapeExport::ImpExportAppletShape( // export parameters uno::Sequence< beans::PropertyValue > aCommands; - xPropSet->getPropertyValue( OUString( "AppletCommands" ) ) >>= aCommands; + xPropSet->getPropertyValue("AppletCommands") >>= aCommands; const sal_Int32 nCount = aCommands.getLength(); for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) { @@ -1949,7 +1949,7 @@ void XMLShapeExport::ImpExportPluginShape( // export plugin url OUString aStr; - xPropSet->getPropertyValue( OUString( "PluginURL" ) ) >>= aStr; + xPropSet->getPropertyValue("PluginURL") >>= aStr; mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference(aStr) ); mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); @@ -1957,7 +1957,7 @@ void XMLShapeExport::ImpExportPluginShape( // export mime-type - xPropSet->getPropertyValue( OUString( "PluginMimeType" ) ) >>= aStr; + xPropSet->getPropertyValue("PluginMimeType") >>= aStr; if(!aStr.isEmpty()) mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr ); @@ -1967,7 +1967,7 @@ void XMLShapeExport::ImpExportPluginShape( // export parameters uno::Sequence< beans::PropertyValue > aCommands; - xPropSet->getPropertyValue( OUString( "PluginCommands" ) ) >>= aCommands; + xPropSet->getPropertyValue("PluginCommands") >>= aCommands; const sal_Int32 nCount = aCommands.getLength(); for( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) { @@ -2082,7 +2082,7 @@ void XMLShapeExport::ImpExportMediaShape( // export media url OUString aMediaURL; - xPropSet->getPropertyValue( OUString( "MediaURL" ) ) >>= aMediaURL; + xPropSet->getPropertyValue("MediaURL") >>= aMediaURL; OUString const persistentURL = lcl_StoreMediaAndGetURL(GetExport(), xPropSet, aMediaURL); mrExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, persistentURL ); @@ -2115,7 +2115,7 @@ void XMLShapeExport::ImpExportMediaShape( sal_Int16 nVolumeDB = 0; const OUString aVolumeDBStr( "VolumeDB" ); - xPropSet->getPropertyValue( OUString( "VolumeDB" ) ) >>= nVolumeDB; + xPropSet->getPropertyValue("VolumeDB") >>= nVolumeDB; mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aVolumeDBStr ); mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, OUString::number( nVolumeDB ) ); delete( new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, sal_False, sal_True ) ); @@ -2123,7 +2123,7 @@ void XMLShapeExport::ImpExportMediaShape( media::ZoomLevel eZoom; const OUString aZoomStr( "Zoom" ); OUString aZoomValue; - xPropSet->getPropertyValue( OUString( "Zoom" ) ) >>= eZoom; + xPropSet->getPropertyValue("Zoom") >>= eZoom; switch( eZoom ) { case( media::ZoomLevel_ZOOM_1_TO_4 ): aZoomValue = OUString( "25%" ); break; diff --git a/xmloff/source/draw/shapeexport3.cxx b/xmloff/source/draw/shapeexport3.cxx index 2cd8574b8754..8d020ef6e4e7 100644 --- a/xmloff/source/draw/shapeexport3.cxx +++ b/xmloff/source/draw/shapeexport3.cxx @@ -104,7 +104,7 @@ void XMLShapeExport::ImpExport3DShape( OUStringBuffer sStringBuffer; // transformation (UNO_NAME_3D_TRANSFORM_MATRIX == "D3DTransformMatrix") - uno::Any aAny = xPropSet->getPropertyValue(OUString("D3DTransformMatrix")); + uno::Any aAny = xPropSet->getPropertyValue("D3DTransformMatrix"); drawing::HomogenMatrix xHomMat; aAny >>= xHomMat; SdXMLImExTransform3D aTransform; @@ -120,13 +120,13 @@ void XMLShapeExport::ImpExport3DShape( SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DR3D, XML_CUBE, sal_True, sal_True); // minEdge - aAny = xPropSet->getPropertyValue(OUString("D3DPosition")); + aAny = xPropSet->getPropertyValue("D3DPosition"); drawing::Position3D aPosition3D; aAny >>= aPosition3D; ::basegfx::B3DVector aPos3D(aPosition3D.PositionX, aPosition3D.PositionY, aPosition3D.PositionZ); // maxEdge - aAny = xPropSet->getPropertyValue(OUString("D3DSize")); + aAny = xPropSet->getPropertyValue("D3DSize"); drawing::Direction3D aDirection3D; aAny >>= aDirection3D; ::basegfx::B3DVector aDir3D(aDirection3D.DirectionX, aDirection3D.DirectionY, aDirection3D.DirectionZ); @@ -158,13 +158,13 @@ void XMLShapeExport::ImpExport3DShape( SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DR3D, XML_SPHERE, sal_True, sal_True); // Center - aAny = xPropSet->getPropertyValue(OUString("D3DPosition")); + aAny = xPropSet->getPropertyValue("D3DPosition"); drawing::Position3D aPosition3D; aAny >>= aPosition3D; ::basegfx::B3DVector aPos3D(aPosition3D.PositionX, aPosition3D.PositionY, aPosition3D.PositionZ); // Size - aAny = xPropSet->getPropertyValue(OUString("D3DSize")); + aAny = xPropSet->getPropertyValue("D3DSize"); drawing::Direction3D aDirection3D; aAny >>= aDirection3D; ::basegfx::B3DVector aDir3D(aDirection3D.DirectionX, aDirection3D.DirectionY, aDirection3D.DirectionZ); @@ -191,7 +191,7 @@ void XMLShapeExport::ImpExport3DShape( case XmlShapeTypeDraw3DExtrudeObject: { // write special 3DLathe/3DExtrude attributes - aAny = xPropSet->getPropertyValue(OUString("D3DPolyPolygon3D")); + aAny = xPropSet->getPropertyValue("D3DPolyPolygon3D"); drawing::PolyPolygonShape3D xPolyPolygon3D; aAny >>= xPolyPolygon3D; @@ -316,7 +316,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen OUStringBuffer sStringBuffer; // world transformation (UNO_NAME_3D_TRANSFORM_MATRIX == "D3DTransformMatrix") - uno::Any aAny = xPropSet->getPropertyValue(OUString("D3DTransformMatrix")); + uno::Any aAny = xPropSet->getPropertyValue("D3DTransformMatrix"); drawing::HomogenMatrix xHomMat; aAny >>= xHomMat; SdXMLImExTransform3D aTransform; @@ -325,7 +325,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_TRANSFORM, aTransform.GetExportString(mrExport.GetMM100UnitConverter())); // VRP, VPN, VUP - aAny = xPropSet->getPropertyValue(OUString("D3DCameraGeometry")); + aAny = xPropSet->getPropertyValue("D3DCameraGeometry"); drawing::CameraGeometry aCamGeo; aAny >>= aCamGeo; @@ -354,7 +354,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen } // projection "D3DScenePerspective" drawing::ProjectionMode - aAny = xPropSet->getPropertyValue(OUString("D3DScenePerspective")); + aAny = xPropSet->getPropertyValue("D3DScenePerspective"); drawing::ProjectionMode xPrjMode; aAny >>= xPrjMode; if(xPrjMode == drawing::ProjectionMode_PARALLEL) @@ -364,7 +364,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_PROJECTION, aStr); // distance - aAny = xPropSet->getPropertyValue(OUString("D3DSceneDistance")); + aAny = xPropSet->getPropertyValue("D3DSceneDistance"); sal_Int32 nDistance = 0; aAny >>= nDistance; mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -373,7 +373,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_DISTANCE, aStr); // focalLength - aAny = xPropSet->getPropertyValue(OUString("D3DSceneFocalLength")); + aAny = xPropSet->getPropertyValue("D3DSceneFocalLength"); sal_Int32 nFocalLength = 0; aAny >>= nFocalLength; mrExport.GetMM100UnitConverter().convertMeasureToXML(sStringBuffer, @@ -382,7 +382,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_FOCAL_LENGTH, aStr); // shadowSlant - aAny = xPropSet->getPropertyValue(OUString("D3DSceneShadowSlant")); + aAny = xPropSet->getPropertyValue("D3DSceneShadowSlant"); sal_Int16 nShadowSlant = 0; aAny >>= nShadowSlant; ::sax::Converter::convertNumber(sStringBuffer, (sal_Int32)nShadowSlant); @@ -390,7 +390,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SHADOW_SLANT, aStr); // shadeMode - aAny = xPropSet->getPropertyValue(OUString("D3DSceneShadeMode")); + aAny = xPropSet->getPropertyValue("D3DSceneShadeMode"); drawing::ShadeMode xShadeMode; if(aAny >>= xShadeMode) { @@ -411,7 +411,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_SHADE_MODE, aStr); // ambientColor - aAny = xPropSet->getPropertyValue(OUString("D3DSceneAmbientColor")); + aAny = xPropSet->getPropertyValue("D3DSceneAmbientColor"); sal_Int32 nAmbientColor = 0; aAny >>= nAmbientColor; ::sax::Converter::convertColor(sStringBuffer, nAmbientColor); @@ -419,7 +419,7 @@ void XMLShapeExport::export3DSceneAttributes( const com::sun::star::uno::Referen mrExport.AddAttribute(XML_NAMESPACE_DR3D, XML_AMBIENT_COLOR, aStr); // lightingMode - aAny = xPropSet->getPropertyValue(OUString("D3DSceneTwoSidedLighting")); + aAny = xPropSet->getPropertyValue("D3DSceneTwoSidedLighting"); sal_Bool bTwoSidedLighting = false; aAny >>= bTwoSidedLighting; ::sax::Converter::convertBool(sStringBuffer, bTwoSidedLighting); diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index b83f73e810c4..6d8b74371108 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -1196,7 +1196,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape { if( !bIsEmptyPresObj ) { - uno::Reference< container::XNamed > xTemplate( xPropSet->getPropertyValue( OUString( "TableTemplate" ) ), uno::UNO_QUERY ); + uno::Reference< container::XNamed > xTemplate( xPropSet->getPropertyValue("TableTemplate"), uno::UNO_QUERY ); if( xTemplate.is() ) { const OUString sTemplate( xTemplate->getName() ); @@ -1231,7 +1231,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape if( !bIsEmptyPresObj ) { - uno::Reference< graphic::XGraphic > xGraphic( xPropSet->getPropertyValue( OUString( "ReplacementGraphic" ) ), uno::UNO_QUERY ); + uno::Reference< graphic::XGraphic > xGraphic( xPropSet->getPropertyValue("ReplacementGraphic"), uno::UNO_QUERY ); if( xGraphic.is() ) try { Reference< uno::XComponentContext > xContext = GetExport().getComponentContext(); diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx index da119f19dd6c..78f29da0603c 100644 --- a/xmloff/source/draw/ximp3dobject.cxx +++ b/xmloff/source/draw/ximp3dobject.cxx @@ -95,7 +95,7 @@ void SdXML3DObjectContext::StartElement(const uno::Reference< xml::sax::XAttribu { uno::Any aAny; aAny <<= mxHomMat; - xPropSet->setPropertyValue(OUString("D3DTransformMatrix"), aAny); + xPropSet->setPropertyValue("D3DTransformMatrix", aAny); } // call parent @@ -207,9 +207,9 @@ void SdXML3DCubeObjectShapeContext::StartElement(const uno::Reference< xml::sax: uno::Any aAny; aAny <<= aPosition3D; - xPropSet->setPropertyValue(OUString("D3DPosition"), aAny); + xPropSet->setPropertyValue("D3DPosition", aAny); aAny <<= aDirection3D; - xPropSet->setPropertyValue(OUString("D3DSize"), aAny); + xPropSet->setPropertyValue("D3DSize", aAny); } } } @@ -315,9 +315,9 @@ void SdXML3DSphereObjectShapeContext::StartElement(const uno::Reference< xml::sa uno::Any aAny; aAny <<= aPosition3D; - xPropSet->setPropertyValue(OUString("D3DPosition"), aAny); + xPropSet->setPropertyValue("D3DPosition", aAny); aAny <<= aDirection3D; - xPropSet->setPropertyValue(OUString("D3DSize"), aAny); + xPropSet->setPropertyValue("D3DSize", aAny); } } } @@ -433,7 +433,7 @@ void SdXML3DPolygonBasedShapeContext::StartElement(const uno::Reference< xml::sa // set poly uno::Any aAny; aAny <<= xPolyPolygon3D; - xPropSet->setPropertyValue(OUString("D3DPolyPolygon3D"), aAny); + xPropSet->setPropertyValue("D3DPolyPolygon3D", aAny); } // call parent diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx index 6eac43a8cc4e..563b21640cd9 100644 --- a/xmloff/source/draw/ximp3dscene.cxx +++ b/xmloff/source/draw/ximp3dscene.cxx @@ -362,32 +362,32 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno if(mbSetTransform) { aAny <<= mxHomMat; - xPropSet->setPropertyValue(OUString("D3DTransformMatrix"), aAny); + xPropSet->setPropertyValue("D3DTransformMatrix", aAny); } // distance aAny <<= mnDistance; - xPropSet->setPropertyValue(OUString("D3DSceneDistance"), aAny); + xPropSet->setPropertyValue("D3DSceneDistance", aAny); // focalLength aAny <<= mnFocalLength; - xPropSet->setPropertyValue(OUString("D3DSceneFocalLength"), aAny); + xPropSet->setPropertyValue("D3DSceneFocalLength", aAny); // shadowSlant aAny <<= (sal_Int16)mnShadowSlant; - xPropSet->setPropertyValue(OUString("D3DSceneShadowSlant"), aAny); + xPropSet->setPropertyValue("D3DSceneShadowSlant", aAny); // shadeMode aAny <<= mxShadeMode; - xPropSet->setPropertyValue(OUString("D3DSceneShadeMode"), aAny); + xPropSet->setPropertyValue("D3DSceneShadeMode", aAny); // ambientColor aAny <<= maAmbientColor; - xPropSet->setPropertyValue(OUString("D3DSceneAmbientColor"), aAny); + xPropSet->setPropertyValue("D3DSceneAmbientColor", aAny); // lightingMode aAny <<= mbLightingMode; - xPropSet->setPropertyValue(OUString("D3DSceneTwoSidedLighting"), aAny); + xPropSet->setPropertyValue("D3DSceneTwoSidedLighting", aAny); if( !maList.empty() ) { @@ -412,58 +412,58 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno { case 0: { - xPropSet->setPropertyValue(OUString("D3DSceneLightColor1"), aAny); - xPropSet->setPropertyValue(OUString("D3DSceneLightDirection1"), aAny2); - xPropSet->setPropertyValue(OUString("D3DSceneLightOn1"), aAny3); + xPropSet->setPropertyValue("D3DSceneLightColor1", aAny); + xPropSet->setPropertyValue("D3DSceneLightDirection1", aAny2); + xPropSet->setPropertyValue("D3DSceneLightOn1", aAny3); break; } case 1: { - xPropSet->setPropertyValue(OUString("D3DSceneLightColor2"), aAny); - xPropSet->setPropertyValue(OUString("D3DSceneLightDirection2"), aAny2); - xPropSet->setPropertyValue(OUString("D3DSceneLightOn2"), aAny3); + xPropSet->setPropertyValue("D3DSceneLightColor2", aAny); + xPropSet->setPropertyValue("D3DSceneLightDirection2", aAny2); + xPropSet->setPropertyValue("D3DSceneLightOn2", aAny3); break; } case 2: { - xPropSet->setPropertyValue(OUString("D3DSceneLightColor3"), aAny); - xPropSet->setPropertyValue(OUString("D3DSceneLightDirection3"), aAny2); - xPropSet->setPropertyValue(OUString("D3DSceneLightOn3"), aAny3); + xPropSet->setPropertyValue("D3DSceneLightColor3", aAny); + xPropSet->setPropertyValue("D3DSceneLightDirection3", aAny2); + xPropSet->setPropertyValue("D3DSceneLightOn3", aAny3); break; } case 3: { - xPropSet->setPropertyValue(OUString("D3DSceneLightColor4"), aAny); - xPropSet->setPropertyValue(OUString("D3DSceneLightDirection4"), aAny2); - xPropSet->setPropertyValue(OUString("D3DSceneLightOn4"), aAny3); + xPropSet->setPropertyValue("D3DSceneLightColor4", aAny); + xPropSet->setPropertyValue("D3DSceneLightDirection4", aAny2); + xPropSet->setPropertyValue("D3DSceneLightOn4", aAny3); break; } case 4: { - xPropSet->setPropertyValue(OUString("D3DSceneLightColor5"), aAny); - xPropSet->setPropertyValue(OUString("D3DSceneLightDirection5"), aAny2); - xPropSet->setPropertyValue(OUString("D3DSceneLightOn5"), aAny3); + xPropSet->setPropertyValue("D3DSceneLightColor5", aAny); + xPropSet->setPropertyValue("D3DSceneLightDirection5", aAny2); + xPropSet->setPropertyValue("D3DSceneLightOn5", aAny3); break; } case 5: { - xPropSet->setPropertyValue(OUString("D3DSceneLightColor6"), aAny); - xPropSet->setPropertyValue(OUString("D3DSceneLightDirection6"), aAny2); - xPropSet->setPropertyValue(OUString("D3DSceneLightOn6"), aAny3); + xPropSet->setPropertyValue("D3DSceneLightColor6", aAny); + xPropSet->setPropertyValue("D3DSceneLightDirection6", aAny2); + xPropSet->setPropertyValue("D3DSceneLightOn6", aAny3); break; } case 6: { - xPropSet->setPropertyValue(OUString("D3DSceneLightColor7"), aAny); - xPropSet->setPropertyValue(OUString("D3DSceneLightDirection7"), aAny2); - xPropSet->setPropertyValue(OUString("D3DSceneLightOn7"), aAny3); + xPropSet->setPropertyValue("D3DSceneLightColor7", aAny); + xPropSet->setPropertyValue("D3DSceneLightDirection7", aAny2); + xPropSet->setPropertyValue("D3DSceneLightOn7", aAny3); break; } case 7: { - xPropSet->setPropertyValue(OUString("D3DSceneLightColor8"), aAny); - xPropSet->setPropertyValue(OUString("D3DSceneLightDirection8"), aAny2); - xPropSet->setPropertyValue(OUString("D3DSceneLightOn8"), aAny3); + xPropSet->setPropertyValue("D3DSceneLightColor8", aAny); + xPropSet->setPropertyValue("D3DSceneLightDirection8", aAny2); + xPropSet->setPropertyValue("D3DSceneLightOn8", aAny3); break; } } @@ -482,12 +482,12 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno aCamGeo.vup.DirectionY = maVUP.getY(); aCamGeo.vup.DirectionZ = maVUP.getZ(); aAny <<= aCamGeo; - xPropSet->setPropertyValue(OUString("D3DCameraGeometry"), aAny); + xPropSet->setPropertyValue("D3DCameraGeometry", aAny); // #91047# set drawing::ProjectionMode AFTER camera geometry is set // projection "D3DScenePerspective" drawing::ProjectionMode aAny <<= mxPrjMode; - xPropSet->setPropertyValue(OUString("D3DScenePerspective"), aAny); + xPropSet->setPropertyValue("D3DScenePerspective", aAny); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 4f0ac3300fe9..434d0d5d0bfc 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -200,7 +200,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, maHREF += aBookmarkName; } - xProps->setPropertyValue( OUString( "BookmarkURL" ), uno::makeAny( maHREF ) ); + xProps->setPropertyValue("BookmarkURL", uno::makeAny( maHREF ) ); } } diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 3a9c5ab0db0d..3c42b2d0a48a 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -321,7 +321,7 @@ void SdXMLGenericPageContext::EndElement() OUString aDateTimeFormat; const OUString aText( GetSdImport().GetDateTimeDecl( maUseDateTimeDeclName, bFixed, aDateTimeFormat ) ); - xSet->setPropertyValue( OUString( "IsDateTimeFixed" ), + xSet->setPropertyValue("IsDateTimeFixed", makeAny( bFixed ) ); if( bFixed ) @@ -341,7 +341,7 @@ void SdXMLGenericPageContext::EndElement() if( pSdNumStyle ) { - xSet->setPropertyValue( OUString( "DateTimeFormat" ), + xSet->setPropertyValue("DateTimeFormat", makeAny( pSdNumStyle->GetDrawKey() ) ); } } @@ -518,25 +518,25 @@ void SdXMLGenericPageContext::SetPageMaster( OUString& rsPageMasterName ) uno::Any aAny; aAny <<= pPageMasterContext->GetBorderBottom(); - xPropSet->setPropertyValue(OUString("BorderBottom"), aAny); + xPropSet->setPropertyValue("BorderBottom", aAny); aAny <<= pPageMasterContext->GetBorderLeft(); - xPropSet->setPropertyValue(OUString("BorderLeft"), aAny); + xPropSet->setPropertyValue("BorderLeft", aAny); aAny <<= pPageMasterContext->GetBorderRight(); - xPropSet->setPropertyValue(OUString("BorderRight"), aAny); + xPropSet->setPropertyValue("BorderRight", aAny); aAny <<= pPageMasterContext->GetBorderTop(); - xPropSet->setPropertyValue(OUString("BorderTop"), aAny); + xPropSet->setPropertyValue("BorderTop", aAny); aAny <<= pPageMasterContext->GetWidth(); - xPropSet->setPropertyValue(OUString("Width"), aAny); + xPropSet->setPropertyValue("Width", aAny); aAny <<= pPageMasterContext->GetHeight(); - xPropSet->setPropertyValue(OUString("Height"), aAny); + xPropSet->setPropertyValue("Height", aAny); aAny <<= pPageMasterContext->GetOrientation(); - xPropSet->setPropertyValue(OUString("Orientation"), aAny); + xPropSet->setPropertyValue("Orientation", aAny); } } } @@ -622,7 +622,7 @@ void SdXMLGenericPageContext::SetNavigationOrder() } Reference< XPropertySet > xSet( mxShapes, UNO_QUERY_THROW ); - xSet->setPropertyValue( OUString( "NavigationOrder" ), Any( Reference< XIndexAccess >( new XoNavigationOrderAccess( aShapes ) ) ) ); + xSet->setPropertyValue("NavigationOrder", Any( Reference< XIndexAccess >( new XoNavigationOrderAccess( aShapes ) ) ) ); } catch(const uno::Exception&) { diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 54eb00bf55c6..4909075f490c 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -403,7 +403,7 @@ void SdXMLShapeContext::EndElement() // in draw use the Bookmark property Reference< beans::XPropertySet > xSet( mxShape, UNO_QUERY_THROW ); xSet->setPropertyValue( sBookmark, Any( msHyperlink ) ); - xSet->setPropertyValue( OUString( "OnClick" ), Any( ::com::sun::star::presentation::ClickAction_DOCUMENT ) ); + xSet->setPropertyValue("OnClick", Any( ::com::sun::star::presentation::ClickAction_DOCUMENT ) ); } } catch(const Exception&) @@ -445,10 +445,10 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape) { uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY_THROW ); if( !mbVisible ) - xSet->setPropertyValue( OUString( "Visible" ), uno::Any( sal_False ) ); + xSet->setPropertyValue("Visible", uno::Any( sal_False ) ); if( !mbPrintable ) - xSet->setPropertyValue( OUString( "Printable" ), uno::Any( sal_False ) ); + xSet->setPropertyValue("Printable", uno::Any( sal_False ) ); } catch(const Exception&) { @@ -502,7 +502,7 @@ void SdXMLShapeContext::AddShape(const char* pServiceName ) if ( OUString::createFromAscii(pServiceName).compareToAscii( "com.sun.star.drawing.OLE2Shape" ) == 0 && uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() ) { - xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString("com.sun.star.drawing.temporaryForXMLImportOLE2Shape")), uno::UNO_QUERY); + xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"), uno::UNO_QUERY); } else { @@ -667,7 +667,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) else { // get graphics familie - xFamilies->getByName( OUString( "graphics" ) ) >>= xFamily; + xFamilies->getByName("graphics") >>= xFamily; aStyleName = GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_SD_GRAPHICS_ID, aStyleName ); @@ -691,7 +691,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) // set style on object uno::Any aAny; aAny <<= xStyle; - xPropSet->setPropertyValue(OUString("Style"), aAny); + xPropSet->setPropertyValue("Style", aAny); } catch(const uno::Exception&) { @@ -745,7 +745,7 @@ void SdXMLShapeContext::SetLayer() uno::Any aAny; aAny <<= maLayerName; - xPropSet->setPropertyValue(OUString("LayerName"), aAny); + xPropSet->setPropertyValue("LayerName", aAny); return; } } @@ -983,7 +983,7 @@ void SdXMLRectShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib { try { - xPropSet->setPropertyValue(OUString("CornerRadius"), uno::makeAny( mnRadius ) ); + xPropSet->setPropertyValue("CornerRadius", uno::makeAny( mnRadius ) ); } catch(const uno::Exception&) { @@ -1251,13 +1251,13 @@ void SdXMLEllipseShapeContext::StartElement(const uno::Reference< xml::sax::XAtt { uno::Any aAny; aAny <<= (drawing::CircleKind)meKind; - xPropSet->setPropertyValue( OUString("CircleKind"), aAny ); + xPropSet->setPropertyValue("CircleKind", aAny ); aAny <<= mnStartAngle; - xPropSet->setPropertyValue( OUString("CircleStartAngle"), aAny ); + xPropSet->setPropertyValue("CircleStartAngle", aAny ); aAny <<= mnEndAngle; - xPropSet->setPropertyValue( OUString("CircleEndAngle"), aAny ); + xPropSet->setPropertyValue("CircleEndAngle", aAny ); } } @@ -1617,11 +1617,11 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); if( xPropsInfo.is() ) { - if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(OUString("IsEmptyPresentationObject" ))) - xProps->setPropertyValue( OUString("IsEmptyPresentationObject" ), ::cppu::bool2any( sal_False ) ); + if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); - if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(OUString("IsPlaceholderDependent" ))) - xProps->setPropertyValue( OUString("IsPlaceholderDependent" ), ::cppu::bool2any( sal_False ) ); + if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); } } } @@ -1653,7 +1653,7 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt { try { - xPropSet->setPropertyValue(OUString("CornerRadius"), uno::makeAny( mnRadius ) ); + xPropSet->setPropertyValue("CornerRadius", uno::makeAny( mnRadius ) ); } catch(const uno::Exception&) { @@ -1952,22 +1952,22 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA { uno::Any aAny; aAny <<= maStart; - xProps->setPropertyValue(OUString("StartPosition"), aAny); + xProps->setPropertyValue("StartPosition", aAny); aAny <<= maEnd; - xProps->setPropertyValue(OUString("EndPosition"), aAny ); + xProps->setPropertyValue("EndPosition", aAny ); aAny <<= (drawing::ConnectorType)mnType; - xProps->setPropertyValue(OUString("EdgeKind"), aAny ); + xProps->setPropertyValue("EdgeKind", aAny ); aAny <<= mnDelta1; - xProps->setPropertyValue(OUString("EdgeLine1Delta"), aAny ); + xProps->setPropertyValue("EdgeLine1Delta", aAny ); aAny <<= mnDelta2; - xProps->setPropertyValue(OUString("EdgeLine2Delta"), aAny ); + xProps->setPropertyValue("EdgeLine2Delta", aAny ); aAny <<= mnDelta3; - xProps->setPropertyValue(OUString("EdgeLine3Delta"), aAny ); + xProps->setPropertyValue("EdgeLine3Delta", aAny ); } SetStyle(); SetLayer(); @@ -1998,7 +1998,7 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA if ( bApplySVGD ) { - xProps->setPropertyValue( OUString("PolyPolygonBezier" ), maPath ); + xProps->setPropertyValue("PolyPolygonBezier", maPath ); } } @@ -2085,10 +2085,10 @@ void SdXMLMeasureShapeContext::StartElement(const uno::Reference< xml::sax::XAtt { uno::Any aAny; aAny <<= maStart; - xProps->setPropertyValue(OUString("StartPosition"), aAny); + xProps->setPropertyValue("StartPosition", aAny); aAny <<= maEnd; - xProps->setPropertyValue(OUString("EndPosition"), aAny ); + xProps->setPropertyValue("EndPosition", aAny ); } // delete pre created fields @@ -2179,7 +2179,7 @@ void SdXMLPageShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib GetImport().GetShapeImport()->IsPresentationShapesSupported(); uno::Reference< lang::XServiceInfo > xInfo( mxShapes, uno::UNO_QUERY ); - const sal_Bool bIsOnHandoutPage = xInfo.is() && xInfo->supportsService( OUString( "com.sun.star.presentation.HandoutMasterPage") ); + const sal_Bool bIsOnHandoutPage = xInfo.is() && xInfo->supportsService("com.sun.star.presentation.HandoutMasterPage"); if( bIsOnHandoutPage ) { @@ -2269,20 +2269,20 @@ void SdXMLCaptionShapeContext::StartElement(const uno::Reference< xml::sax::XAtt sal_Bool bIsAutoGrowWidth = sal_False; if ( xProps.is() ) { - uno::Any aAny( xProps->getPropertyValue( OUString("TextAutoGrowWidth" ) ) ); + uno::Any aAny( xProps->getPropertyValue("TextAutoGrowWidth") ); aAny >>= bIsAutoGrowWidth; if ( bIsAutoGrowWidth ) - xProps->setPropertyValue( OUString("TextAutoGrowWidth"), uno::makeAny( sal_False ) ); + xProps->setPropertyValue("TextAutoGrowWidth", uno::makeAny( sal_False ) ); } // set pos, size, shear and rotate SetTransformation(); if( xProps.is() ) - xProps->setPropertyValue(OUString("CaptionPoint"), uno::makeAny( maCaptionPoint ) ); + xProps->setPropertyValue("CaptionPoint", uno::makeAny( maCaptionPoint ) ); if ( bIsAutoGrowWidth ) - xProps->setPropertyValue( OUString("TextAutoGrowWidth"), uno::makeAny( sal_True ) ); + xProps->setPropertyValue("TextAutoGrowWidth", uno::makeAny( sal_True ) ); if(mnRadius) { @@ -2291,7 +2291,7 @@ void SdXMLCaptionShapeContext::StartElement(const uno::Reference< xml::sax::XAtt { try { - xPropSet->setPropertyValue(OUString("CornerRadius"), uno::makeAny( mnRadius ) ); + xPropSet->setPropertyValue("CornerRadius", uno::makeAny( mnRadius ) ); } catch(const uno::Exception&) { @@ -2396,16 +2396,16 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno:: sal_Int32 nUPD, nBuildId; if( GetImport().getBuildIds( nUPD, nBuildId ) && (nUPD == 645) ) try { - xPropset->setPropertyValue( OUString("FillStyle"), Any( FillStyle_NONE ) ); - xPropset->setPropertyValue( OUString("LineStyle"), Any( LineStyle_NONE ) ); + xPropset->setPropertyValue("FillStyle", Any( FillStyle_NONE ) ); + xPropset->setPropertyValue("LineStyle", Any( LineStyle_NONE ) ); } catch(const Exception&) { } uno::Reference< beans::XPropertySetInfo > xPropsInfo( xPropset->getPropertySetInfo() ); - if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString("IsEmptyPresentationObject" ))) - xPropset->setPropertyValue( OUString("IsEmptyPresentationObject" ), ::cppu::bool2any( mbIsPlaceholder ) ); + if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) + xPropset->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( mbIsPlaceholder ) ); if( !mbIsPlaceholder ) { @@ -2415,8 +2415,8 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno:: aAny <<= GetImport().ResolveGraphicObjectURL( maURL, GetImport().isGraphicLoadOnDemandSupported() ); try { - xPropset->setPropertyValue( OUString("GraphicURL" ), aAny ); - xPropset->setPropertyValue( OUString("GraphicStreamURL" ), aAny ); + xPropset->setPropertyValue("GraphicURL", aAny ); + xPropset->setPropertyValue("GraphicStreamURL", aAny ); } catch (const lang::IllegalArgumentException&) { @@ -2433,8 +2433,8 @@ void SdXMLGraphicObjectShapeContext::StartElement( const ::com::sun::star::uno:: uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); if( xPropsInfo.is() ) { - if( xPropsInfo->hasPropertyByName(OUString("IsPlaceholderDependent" ))) - xProps->setPropertyValue( OUString("IsPlaceholderDependent" ), ::cppu::bool2any( sal_False ) ); + if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); } } } @@ -2459,8 +2459,8 @@ void SdXMLGraphicObjectShapeContext::EndElement() if(xProps.is()) { const uno::Any aAny( uno::makeAny( sURL ) ); - xProps->setPropertyValue( OUString("GraphicURL" ), aAny ); - xProps->setPropertyValue( OUString("GraphicStreamURL" ), aAny ); + xProps->setPropertyValue("GraphicURL", aAny ); + xProps->setPropertyValue("GraphicStreamURL", aAny ); } } catch (const lang::IllegalArgumentException&) @@ -2553,17 +2553,17 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri if(xProps.is()) { uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); - if( xPropsInfo.is() && xPropsInfo->hasPropertyByName(OUString("IsEmptyPresentationObject" ))) - xProps->setPropertyValue( OUString("IsEmptyPresentationObject" ), ::cppu::bool2any( sal_False ) ); + if( xPropsInfo.is() && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); uno::Any aAny; const OUString aCLSID( "12DCAE26-281F-416F-a234-c3086127382e"); aAny <<= aCLSID; - xProps->setPropertyValue( OUString("CLSID" ), aAny ); + xProps->setPropertyValue("CLSID", aAny ); - aAny = xProps->getPropertyValue( OUString("Model" ) ); + aAny = xProps->getPropertyValue("Model"); uno::Reference< frame::XModel > xChartModel; if( aAny >>= xChartModel ) { @@ -2580,8 +2580,8 @@ void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttri uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); if( xPropsInfo.is() ) { - if( xPropsInfo->hasPropertyByName(OUString("IsPlaceholderDependent" ))) - xProps->setPropertyValue( OUString("IsPlaceholderDependent" ), ::cppu::bool2any( sal_False ) ); + if( xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); } } } @@ -2687,11 +2687,11 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); if( xPropsInfo.is() ) { - if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(OUString("IsEmptyPresentationObject" ))) - xProps->setPropertyValue( OUString("IsEmptyPresentationObject" ), ::cppu::bool2any( sal_False ) ); + if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); - if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(OUString("IsPlaceholderDependent" ))) - xProps->setPropertyValue( OUString("IsPlaceholderDependent" ), ::cppu::bool2any( sal_False ) ); + if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); } } } @@ -2711,13 +2711,13 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen if ( aPersistName.startsWith( sURL ) ) aPersistName = aPersistName.copy( sURL.getLength() ); - xProps->setPropertyValue( OUString( "PersistName" ), + xProps->setPropertyValue("PersistName", uno::makeAny( aPersistName ) ); } else { // this is OOo link object - xProps->setPropertyValue( OUString( "LinkURL" ), + xProps->setPropertyValue("LinkURL", uno::makeAny( aPersistName ) ); } } @@ -2747,8 +2747,8 @@ void SdXMLObjectShapeContext::EndElement() if( xProps.is() ) { - xProps->setPropertyValue(OUString("FillStyle"), uno::makeAny(drawing::FillStyle_NONE)); - xProps->setPropertyValue(OUString("LineStyle"), uno::makeAny(drawing::LineStyle_NONE)); + xProps->setPropertyValue("FillStyle", uno::makeAny(drawing::FillStyle_NONE)); + xProps->setPropertyValue("LineStyle", uno::makeAny(drawing::LineStyle_NONE)); } } @@ -2762,7 +2762,7 @@ void SdXMLObjectShapeContext::EndElement() uno::Reference< beans::XPropertySet > xProps(mxShape, uno::UNO_QUERY); if( xProps.is() ) - xProps->setPropertyValue( OUString( "PersistName" ), uno::makeAny( aPersistName ) ); + xProps->setPropertyValue("PersistName", uno::makeAny( aPersistName ) ); } SdXMLShapeContext::EndElement(); @@ -2819,10 +2819,10 @@ SvXMLImportContext* SdXMLObjectShapeContext::CreateChildContext( uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); if( xPropSet.is() ) { - xPropSet->setPropertyValue( OUString("CLSID" ), uno::makeAny( maCLSID ) ); + xPropSet->setPropertyValue("CLSID", uno::makeAny( maCLSID ) ); uno::Reference< lang::XComponent > xComp; - xPropSet->getPropertyValue( OUString("Model" ) ) >>= xComp; + xPropSet->getPropertyValue("Model") >>= xComp; DBG_ASSERT( xComp.is(), "no xModel for own OLE format" ); pEContext->SetComponent( xComp ); } @@ -2916,42 +2916,42 @@ void SdXMLAppletShapeContext::EndElement() // the visual area for applet must be set on loading awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height ); aAny <<= aRect; - xProps->setPropertyValue( OUString( "VisibleArea" ), aAny ); + xProps->setPropertyValue("VisibleArea", aAny ); } if( maParams.getLength() ) { aAny <<= maParams; - xProps->setPropertyValue( OUString( "AppletCommands" ), aAny ); + xProps->setPropertyValue("AppletCommands", aAny ); } if( !maHref.isEmpty() ) { aAny <<= maHref; - xProps->setPropertyValue( OUString( "AppletCodeBase" ), aAny ); + xProps->setPropertyValue("AppletCodeBase", aAny ); } if( !maAppletName.isEmpty() ) { aAny <<= maAppletName; - xProps->setPropertyValue( OUString( "AppletName" ), aAny ); + xProps->setPropertyValue("AppletName", aAny ); } if( mbIsScript ) { aAny <<= mbIsScript; - xProps->setPropertyValue( OUString( "AppletIsScript" ), aAny ); + xProps->setPropertyValue("AppletIsScript", aAny ); } if( !maAppletCode.isEmpty() ) { aAny <<= maAppletCode; - xProps->setPropertyValue( OUString( "AppletCode" ), aAny ); + xProps->setPropertyValue("AppletCode", aAny ); } aAny <<= OUString( GetImport().GetDocumentBase() ); - xProps->setPropertyValue( OUString( "AppletDocBase" ), aAny ); + xProps->setPropertyValue("AppletDocBase", aAny ); SetThumbnail(); } @@ -3072,11 +3072,11 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); if( xPropsInfo.is() ) { - if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(OUString("IsEmptyPresentationObject" ))) - xProps->setPropertyValue( OUString("IsEmptyPresentationObject" ), ::cppu::bool2any( sal_False ) ); + if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); - if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(OUString("IsPlaceholderDependent" ))) - xProps->setPropertyValue( OUString("IsPlaceholderDependent" ), ::cppu::bool2any( sal_False ) ); + if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); } } } @@ -3151,19 +3151,19 @@ void SdXMLPluginShapeContext::EndElement() if( maParams.getLength() ) { aAny <<= maParams; - xProps->setPropertyValue( OUString( "PluginCommands" ), aAny ); + xProps->setPropertyValue("PluginCommands", aAny ); } if( !maMimeType.isEmpty() ) { aAny <<= maMimeType; - xProps->setPropertyValue( OUString( "PluginMimeType" ), aAny ); + xProps->setPropertyValue("PluginMimeType", aAny ); } if( !maHref.isEmpty() ) { aAny <<= maHref; - xProps->setPropertyValue( OUString( "PluginURL" ), aAny ); + xProps->setPropertyValue("PluginURL", aAny ); } } else @@ -3181,21 +3181,21 @@ void SdXMLPluginShapeContext::EndElement() { OUString aValueStr; maParams[ nParam ].Value >>= aValueStr; - xProps->setPropertyValue( OUString( "Loop" ), + xProps->setPropertyValue("Loop", uno::makeAny( static_cast< sal_Bool >( 0 == aValueStr.compareToAscii( "true" ) ) ) ); } else if( 0 == rName.compareToAscii( "Mute" ) ) { OUString aValueStr; maParams[ nParam ].Value >>= aValueStr; - xProps->setPropertyValue( OUString( "Mute" ), + xProps->setPropertyValue("Mute", uno::makeAny( static_cast< sal_Bool >( 0 == aValueStr.compareToAscii( "true" ) ) ) ); } else if( 0 == rName.compareToAscii( "VolumeDB" ) ) { OUString aValueStr; maParams[ nParam ].Value >>= aValueStr; - xProps->setPropertyValue( OUString( "VolumeDB" ), + xProps->setPropertyValue("VolumeDB", uno::makeAny( static_cast< sal_Int16 >( aValueStr.toInt32() ) ) ); } else if( 0 == rName.compareToAscii( "Zoom" ) ) @@ -3224,7 +3224,7 @@ void SdXMLPluginShapeContext::EndElement() else eZoomLevel = media::ZoomLevel_NOT_AVAILABLE; - xProps->setPropertyValue( OUString( "Zoom" ), uno::makeAny( eZoomLevel ) ); + xProps->setPropertyValue("Zoom", uno::makeAny( eZoomLevel ) ); } } } @@ -3315,13 +3315,13 @@ void SdXMLFloatingFrameShapeContext::StartElement( const ::com::sun::star::uno:: if( !maFrameName.isEmpty() ) { aAny <<= maFrameName; - xProps->setPropertyValue( OUString( "FrameName" ), aAny ); + xProps->setPropertyValue("FrameName", aAny ); } if( !maHref.isEmpty() ) { aAny <<= maHref; - xProps->setPropertyValue( OUString( "FrameURL" ), aAny ); + xProps->setPropertyValue("FrameURL", aAny ); } } @@ -3367,7 +3367,7 @@ void SdXMLFloatingFrameShapeContext::EndElement() awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height ); uno::Any aAny; aAny <<= aRect; - xProps->setPropertyValue( OUString( "VisibleArea" ), aAny ); + xProps->setPropertyValue("VisibleArea", aAny ); } } @@ -3451,12 +3451,12 @@ OUString SdXMLFrameShapeContext::getGraphicURLFromImportContext(const SvXMLImpor if(xPropSet.is()) { - xPropSet->getPropertyValue(OUString("GraphicStreamURL")) >>= aRetval; + xPropSet->getPropertyValue("GraphicStreamURL") >>= aRetval; if(!aRetval.getLength()) { // it maybe a link, try GraphicURL - xPropSet->getPropertyValue(OUString("GraphicURL")) >>= aRetval; + xPropSet->getPropertyValue("GraphicURL") >>= aRetval; } } } @@ -3895,11 +3895,11 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); if( xPropsInfo.is() ) { - if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(OUString("IsEmptyPresentationObject" ))) - xProps->setPropertyValue( OUString("IsEmptyPresentationObject" ), ::cppu::bool2any( sal_False ) ); + if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName("IsEmptyPresentationObject")) + xProps->setPropertyValue("IsEmptyPresentationObject", ::cppu::bool2any( sal_False ) ); - if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(OUString("IsPlaceholderDependent" ))) - xProps->setPropertyValue( OUString("IsPlaceholderDependent" ), ::cppu::bool2any( sal_False ) ); + if( mbIsUserTransformed && xPropsInfo->hasPropertyByName("IsPlaceholderDependent")) + xProps->setPropertyValue("IsPlaceholderDependent", ::cppu::bool2any( sal_False ) ); } } } @@ -3915,7 +3915,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc const OUString sFamilyName( "table" ); Reference< XNameAccess > xTableFamily( xFamilies->getByName( sFamilyName ), UNO_QUERY_THROW ); Reference< XStyle > xTableStyle( xTableFamily->getByName( msTemplateStyleName ), UNO_QUERY_THROW ); - xProps->setPropertyValue( OUString( "TableTemplate" ), Any( xTableStyle ) ); + xProps->setPropertyValue("TableTemplate", Any( xTableStyle ) ); } catch(const Exception&) { @@ -3943,7 +3943,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc if( xTableImport.is() && xProps.is() ) { uno::Reference< table::XColumnRowRange > xColumnRowRange( - xProps->getPropertyValue( OUString("Model" ) ), uno::UNO_QUERY ); + xProps->getPropertyValue("Model"), uno::UNO_QUERY ); if( xColumnRowRange.is() ) mxTableImportContext = xTableImport->CreateTableContext( GetPrefix(), GetLocalName(), xColumnRowRange ); diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx index d80c71d43ecb..17b0edf23755 100644 --- a/xmloff/source/draw/ximpshow.cxx +++ b/xmloff/source/draw/ximpshow.cxx @@ -111,7 +111,7 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c if( IsXMLToken( aLocalName, XML_START_PAGE ) ) { aAny <<= sValue; - mpImpl->mxPresProps->setPropertyValue( OUString( "FirstPage" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("FirstPage", aAny ); bAll = sal_False; } else if( IsXMLToken( aLocalName, XML_SHOW ) ) @@ -128,62 +128,62 @@ SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, c const sal_Int32 nMS = (aDuration.Hours * 60 + aDuration.Minutes) * 60 + aDuration.Seconds; aAny <<= nMS; - mpImpl->mxPresProps->setPropertyValue( OUString( "Pause" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("Pause", aAny ); } else if( IsXMLToken( aLocalName, XML_ANIMATIONS ) ) { aAny = bool2any( IsXMLToken( sValue, XML_ENABLED ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "AllowAnimations" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("AllowAnimations", aAny ); } else if( IsXMLToken( aLocalName, XML_STAY_ON_TOP ) ) { aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "IsAlwaysOnTop" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("IsAlwaysOnTop", aAny ); } else if( IsXMLToken( aLocalName, XML_FORCE_MANUAL ) ) { aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "IsAutomatic" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("IsAutomatic", aAny ); } else if( IsXMLToken( aLocalName, XML_ENDLESS ) ) { aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "IsEndless" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("IsEndless", aAny ); } else if( IsXMLToken( aLocalName, XML_FULL_SCREEN ) ) { aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "IsFullScreen" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("IsFullScreen", aAny ); } else if( IsXMLToken( aLocalName, XML_MOUSE_VISIBLE ) ) { aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "IsMouseVisible" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("IsMouseVisible", aAny ); } else if( IsXMLToken( aLocalName, XML_START_WITH_NAVIGATOR ) ) { aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "StartWithNavigator" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("StartWithNavigator", aAny ); } else if( IsXMLToken( aLocalName, XML_MOUSE_AS_PEN ) ) { aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "UsePen" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("UsePen", aAny ); } else if( IsXMLToken( aLocalName, XML_TRANSITION_ON_CLICK ) ) { aAny = bool2any( IsXMLToken( sValue, XML_ENABLED ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "IsTransitionOnClick" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("IsTransitionOnClick", aAny ); } else if( IsXMLToken( aLocalName, XML_SHOW_LOGO ) ) { aAny = bool2any( IsXMLToken( sValue, XML_TRUE ) ); - mpImpl->mxPresProps->setPropertyValue( OUString( "IsShowLogo" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("IsShowLogo", aAny ); } } } aAny = bool2any( bAll ); - mpImpl->mxPresProps->setPropertyValue( OUString( "IsShowAll" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("IsShowAll", aAny ); } } @@ -193,7 +193,7 @@ SdXMLShowsContext::~SdXMLShowsContext() { uno::Any aAny; aAny <<= mpImpl->maCustomShowName; - mpImpl->mxPresProps->setPropertyValue( OUString( "CustomShow" ), aAny ); + mpImpl->mxPresProps->setPropertyValue("CustomShow", aAny ); } delete mpImpl; diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index db902df9a80a..7e3b0c84f4df 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -1243,8 +1243,8 @@ void SdXMLStylesContext::EndElement() { uno::Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() ); - if( xInfoSetInfo->hasPropertyByName( OUString( "PageLayouts" ) ) ) - xInfoSet->setPropertyValue( OUString( "PageLayouts" ), uno::makeAny( getPageLayouts() ) ); + if( xInfoSetInfo->hasPropertyByName("PageLayouts") ) + xInfoSet->setPropertyValue("PageLayouts", uno::makeAny( getPageLayouts() ) ); } } diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index abd5231a8d1d..e61ccd0838a4 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -402,7 +402,7 @@ uno::Sequence< util::RevisionTag > SAL_CALL XMLVersionListPersistence::load( con if ( xProps.is() ) { try { - xProps->getPropertyValue( OUString("URL") ) >>= aParserInput.sSystemId; + xProps->getPropertyValue("URL") >>= aParserInput.sSystemId; } catch( uno::Exception& ) {} diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx index 10bdf96fe3f6..e817285f75ce 100644 --- a/xmloff/source/style/PageMasterImportContext.cxx +++ b/xmloff/source/style/PageMasterImportContext.cxx @@ -162,7 +162,7 @@ void PageStyleContext::FillPropertySet( uno::Any aPageUsage; XMLPMPropHdl_PageStyleLayout aPageUsageHdl; if (aPageUsageHdl.importXML(sPageUsage, aPageUsage, GetImport().GetMM100UnitConverter())) - rPropSet->setPropertyValue(OUString("PageStyleLayout"), aPageUsage); + rPropSet->setPropertyValue("PageStyleLayout", aPageUsage); } } diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index af11d3571cce..28553ba5ca06 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -1195,7 +1195,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( sal_Bool bOverwrite ) if( !xFactory.is() ) return; - Reference < XInterface > xIfc = xFactory->createInstance(OUString("com.sun.star.style.NumberingStyle") ); + Reference < XInterface > xIfc = xFactory->createInstance("com.sun.star.style.NumberingStyle"); if( !xIfc.is() ) return; Reference < XStyle > xTmp( xIfc, UNO_QUERY ); @@ -1272,7 +1272,7 @@ Reference < XIndexReplace > SvxXMLListStyleContext::CreateNumRule( if( !xFactory.is() ) return xNumRule; - Reference < XInterface > xIfc = xFactory->createInstance(OUString("com.sun.star.text.NumberingRules") ); + Reference < XInterface > xIfc = xFactory->createInstance("com.sun.star.text.NumberingRules"); if( !xIfc.is() ) return xNumRule; diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index b710adefa8f7..1c5b7f0afed5 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -263,9 +263,9 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) // get style OUString sParentStyleName; Reference< XPropertySetInfo > xPropertySetInfo( xCellSet->getPropertySetInfo() ); - if( xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName( OUString("Style")) ) + if( xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName("Style") ) { - Reference< XStyle > xStyle( xCellSet->getPropertyValue(OUString("Style")), UNO_QUERY ); + Reference< XStyle > xStyle( xCellSet->getPropertyValue("Style"), UNO_QUERY ); if( xStyle.is() ) sParentStyleName = xStyle->getName(); } diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index f046245f557a..9f486d3582d5 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -391,7 +391,7 @@ void XMLTextColumnsContext::EndElement( ) if( !xFactory.is() ) return; - Reference<XInterface> xIfc = xFactory->createInstance(OUString("com.sun.star.text.TextColumns")); + Reference<XInterface> xIfc = xFactory->createInstance("com.sun.star.text.TextColumns"); if( !xIfc.is() ) return; diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx index 3f2fb301eb8c..8aedf9476f22 100644 --- a/xmloff/source/text/XMLTextMasterPageContext.cxx +++ b/xmloff/source/text/XMLTextMasterPageContext.cxx @@ -50,7 +50,7 @@ Reference < XStyle > XMLTextMasterPageContext::Create() if( xFactory.is() ) { Reference < XInterface > xIfc = - xFactory->createInstance(OUString("com.sun.star.style.PageStyle")); + xFactory->createInstance("com.sun.star.style.PageStyle"); if( xIfc.is() ) xNewStyle = Reference < XStyle >( xIfc, UNO_QUERY ); } diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index eb89488e1054..41c1397b24d9 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.cxx @@ -851,7 +851,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( pAnchorTypeState->maValue >>= eAnchor; else if( bNeedsAnchor ) { - Any aAny = rPropSet->getPropertyValue( OUString( "AnchorType" ) ); + Any aAny = rPropSet->getPropertyValue("AnchorType"); aAny >>= eAnchor; } diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index cf6bc1024837..c4af925d8143 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -3959,7 +3959,7 @@ void XMLMeasureFieldImportContext::PrepareField( { Any aAny; aAny <<= mnKind; - xPropertySet->setPropertyValue(OUString("Kind"), aAny); + xPropertySet->setPropertyValue("Kind", aAny); } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index d6b309b8edf3..6a529a8addd5 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -1515,7 +1515,7 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres { Reference < XPropertySet > xSet( xTextField, UNO_QUERY ); Reference < XText > xText; - Any a = xSet->getPropertyValue( OUString("TextRange") ); + Any a = xSet->getPropertyValue("TextRange"); a >>= xText; if ( xText.is() ) { @@ -3813,7 +3813,7 @@ void XMLTextParagraphExport::PreventExportOfControlsInMuteSections( { // Reference<XPropertySet> xPropSet( xControlShape, UNO_QUERY ); // Reference<XTextContent> xTextContent; - // xPropSet->getPropertyValue( OUString( "TextRange" ) ) >>= xTextContent; + // xPropSet->getPropertyValue("TextRange") >>= xTextContent; Reference<XTextContent> xTextContent( xControlShape, UNO_QUERY ); if( xTextContent.is() ) diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 5619a0d24da9..136f20575e5e 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -1452,9 +1452,9 @@ bool XMLTransformerBase::isWriter() const { Reference< XServiceInfo > xSI( mxModel, UNO_QUERY ); return xSI.is() && - ( xSI->supportsService( OUString( "com.sun.star.text.TextDocument" ) ) || - xSI->supportsService( OUString( "com.sun.star.text.WebDocument" ) ) || - xSI->supportsService( OUString( "com.sun.star.text.GlobalDocument" ) ) ); + ( xSI->supportsService("com.sun.star.text.TextDocument") || + xSI->supportsService("com.sun.star.text.WebDocument") || + xSI->supportsService("com.sun.star.text.GlobalDocument") ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx index da915497b8df..9088d343f966 100644 --- a/xmlsecurity/source/helper/xsecparser.cxx +++ b/xmlsecurity/source/helper/xsecparser.cxx @@ -38,11 +38,11 @@ XSecParser::XSecParser( OUString XSecParser::getIdAttr(const cssu::Reference< cssxs::XAttributeList >& xAttribs ) { - OUString ouIdAttr = xAttribs->getValueByName(OUString("id")); + OUString ouIdAttr = xAttribs->getValueByName("id"); if (ouIdAttr == NULL) { - ouIdAttr = xAttribs->getValueByName(OUString("Id")); + ouIdAttr = xAttribs->getValueByName("Id"); } return ouIdAttr; diff --git a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx index 018b9991b4b0..a1b1f08bf72f 100644 --- a/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx +++ b/xmlsecurity/source/xmlsec/nss/ciphercontext.cxx @@ -187,7 +187,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL OCipherContext::finalizeCipherContextAndDis // if it is decryption, the amount of data should be rounded to the block size even in case of padding if ( ( !m_bPadding || !m_bEncryption ) && nSizeForPadding ) - throw uno::RuntimeException( OUString( "The data should contain complete blocks only." ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException("The data should contain complete blocks only.", uno::Reference< uno::XInterface >() ); if ( m_bW3CPadding && m_bEncryption ) { diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 123978769d3a..37188d6db948 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -428,10 +428,10 @@ css::uno::Reference< css::xml::crypto::XDigestContext > SAL_CALL ONSSInitializer b1KData = ( nDigestID == css::xml::crypto::DigestID::SHA1_1K ); } else - throw css::lang::IllegalArgumentException( OUString( "Unexpected digest requested." ), css::uno::Reference< css::uno::XInterface >(), 1 ); + throw css::lang::IllegalArgumentException("Unexpected digest requested.", css::uno::Reference< css::uno::XInterface >(), 1 ); if ( aParams.getLength() ) - throw css::lang::IllegalArgumentException( OUString( "Unexpected arguments provided for digest creation." ), css::uno::Reference< css::uno::XInterface >(), 2 ); + throw css::lang::IllegalArgumentException("Unexpected arguments provided for digest creation.", css::uno::Reference< css::uno::XInterface >(), 2 ); css::uno::Reference< css::xml::crypto::XDigestContext > xResult; if( initNSS( m_xContext ) ) @@ -455,19 +455,19 @@ css::uno::Reference< css::xml::crypto::XCipherContext > SAL_CALL ONSSInitializer bW3CPadding = true; if ( aKey.getLength() != 16 && aKey.getLength() != 24 && aKey.getLength() != 32 ) - throw css::lang::IllegalArgumentException( OUString( "Unexpected key length." ), css::uno::Reference< css::uno::XInterface >(), 2 ); + throw css::lang::IllegalArgumentException("Unexpected key length.", css::uno::Reference< css::uno::XInterface >(), 2 ); if ( aParams.getLength() ) - throw css::lang::IllegalArgumentException( OUString( "Unexpected arguments provided for cipher creation." ), css::uno::Reference< css::uno::XInterface >(), 5 ); + throw css::lang::IllegalArgumentException("Unexpected arguments provided for cipher creation.", css::uno::Reference< css::uno::XInterface >(), 5 ); } else - throw css::lang::IllegalArgumentException( OUString( "Unexpected cipher requested." ), css::uno::Reference< css::uno::XInterface >(), 1 ); + throw css::lang::IllegalArgumentException("Unexpected cipher requested.", css::uno::Reference< css::uno::XInterface >(), 1 ); css::uno::Reference< css::xml::crypto::XCipherContext > xResult; if( initNSS( m_xContext ) ) { if ( aInitializationVector.getLength() != PK11_GetIVLength( nNSSCipherID ) ) - throw css::lang::IllegalArgumentException( OUString( "Unexpected length of initialization vector." ), css::uno::Reference< css::uno::XInterface >(), 3 ); + throw css::lang::IllegalArgumentException("Unexpected length of initialization vector.", css::uno::Reference< css::uno::XInterface >(), 3 ); xResult = OCipherContext::Create( nNSSCipherID, aKey, aInitializationVector, bEncryption, bW3CPadding ); } |