UNO: no need to use OUString constructor when calling createInstance

Change-Id: I37da28539b94706574116d0fff5f008aabfb5526
Reviewed-on: https://gerrit.libreoffice.org/19682
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin
2015-10-30 08:59:59 +00:00
committed by Noel Grandin
parent 2e528df76b
commit 3bc5df7f32
121 changed files with 189 additions and 227 deletions
+4 -6
View File
@@ -253,9 +253,8 @@ SbUnoObject* createOLEObject_Impl( const OUString& aType )
{
Reference<XMultiComponentFactory> xSMgr = xContext->getServiceManager();
xOLEFactory.set(
xSMgr->createInstanceWithContext(
OUString( "com.sun.star.bridge.OleObjectFactory"),
xContext ), UNO_QUERY );
xSMgr->createInstanceWithContext( "com.sun.star.bridge.OleObjectFactory", xContext ),
UNO_QUERY );
}
}
@@ -4548,7 +4547,7 @@ Reference< XInterface > createComListener( const Any& aControlAny, const OUStrin
try
{
xRet = xServiceMgr->createInstanceWithArgumentsAndContext(
OUString( "com.sun.star.custom.UnoComListener"),
"com.sun.star.custom.UnoComListener",
args, xContext );
}
catch( const Exception& )
@@ -4661,8 +4660,7 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP
Reference< XMultiComponentFactory > xServiceMgr( xContext->getServiceManager() );
Reference< XSingleServiceFactory > xComImplementsFactory
(
xServiceMgr->createInstanceWithContext(
OUString( "com.sun.star.custom.ComImplementsFactory"), xContext ),
xServiceMgr->createInstanceWithContext( "com.sun.star.custom.ComImplementsFactory", xContext ),
UNO_QUERY
);
if( !xComImplementsFactory.is() )
+1 -1
View File
@@ -131,7 +131,7 @@ bool writeOasis2OOoLibraryElement(
Reference< xml::sax::XDocumentHandler > xHandler(
xSMgr->createInstanceWithArgumentsAndContext(
OUString("com.sun.star.comp.Oasis2OOoTransformer" ) ,
"com.sun.star.comp.Oasis2OOoTransformer",
aArgs, xContext ),
UNO_QUERY );
+1 -1
View File
@@ -105,7 +105,7 @@ void Service::connect(OUString const & rConnection,
css::connection::Connector::create(m_xContext)->connect(rConnection));
css::uno::Reference< css::bridge::XBridgeFactory > xBridgeFactory(
m_xContext->getServiceManager()->createInstanceWithContext(
OUString( "com.sun.star.bridge.BridgeFactory" ),
"com.sun.star.bridge.BridgeFactory",
m_xContext),
css::uno::UNO_QUERY);
m_xBridge = xBridgeFactory->createBridge(OUString(), rProtocol,
@@ -81,7 +81,7 @@ sal_Int32 Client::run(css::uno::Sequence< OUString > const &)
try {
relay.set(
factory->createInstanceWithContext(
OUString( "test.javauno.nativethreadpool.Relay" ),
"test.javauno.nativethreadpool.Relay",
context),
css::uno::UNO_QUERY_THROW);
} catch (css::uno::RuntimeException &) {
+2 -4
View File
@@ -91,8 +91,7 @@ Any OInstanceProvider::queryInterface( const Type & aType ) throw ( RuntimeExce
// Tries to get the PerformanceTestObject
if( sObjectName == "TestRemoteObject" )
{
return m_rSMgr->createInstance(
OUString("com.sun.star.test.performance.PerformanceTestObject") );
return m_rSMgr->createInstance("com.sun.star.test.performance.PerformanceTestObject");
}
return Reference < XInterface > ( (::cppu::OWeakObject * ) new OTestFactory() );
}
@@ -713,8 +712,7 @@ Reference <XInterface > createComponent( const OUString &sService ,
{
// erst registrieren
Reference < XImplementationRegistration > rReg (
rSMgr->createInstance(
OUString( "com.sun.star.registry.ImplementationRegistration" )),
rSMgr->createInstance("com.sun.star.registry.ImplementationRegistration"),
UNO_QUERY );
OSL_ASSERT( rReg.is() );
+2 -2
View File
@@ -139,7 +139,7 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
m_xCanvasConfigNameAccess.set(
xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
Sequence<Any>( &propValue, 1 ) ),
UNO_QUERY_THROW );
@@ -151,7 +151,7 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
Reference<container::XNameAccess> xNameAccess(
xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW );
Reference<container::XHierarchicalNameAccess> xHierarchicalNameAccess(
xNameAccess, UNO_QUERY_THROW);
+4 -4
View File
@@ -3514,10 +3514,10 @@ void ServiceType::dumpHxxFile(
<< indent() << "the_instance = ::css::uno::Reference< "
<< scopedBaseName
<< (" >(the_context->getServiceManager()->"
"createInstanceWithContext(::rtl::OUString("
"createInstanceWithContext("
" \"")
<< name_
<< "\" ), the_context), ::css::uno::UNO_QUERY);\n#endif\n";
<< "\", the_context), ::css::uno::UNO_QUERY);\n#endif\n";
dec();
o << indent()
<< "} catch (const ::css::uno::RuntimeException &) {\n";
@@ -3663,9 +3663,9 @@ void ServiceType::dumpHxxFile(
<< indent() << "the_instance = ::css::uno::Reference< "
<< scopedBaseName
<< (" >(the_context->getServiceManager()->"
"createInstanceWithArgumentsAndContext(::rtl::OUString("
"createInstanceWithArgumentsAndContext("
" \"")
<< name_ << "\" ), ";
<< name_ << "\", ";
if (rest) {
o << codemaker::cpp::translateUnoToCppIdentifier(
u2b(i->parameters.back().name), "param",
@@ -366,7 +366,7 @@ ImplEventAttacherManager::ImplEventAttacherManager( const Reference< XIntrospect
if ( rContext.is() )
{
Reference< XInterface > xIFace( rContext->getServiceManager()->createInstanceWithContext(
OUString( "com.sun.star.script.EventAttacher" ), rContext) );
"com.sun.star.script.EventAttacher", rContext) );
if ( xIFace.is() )
{
xAttacher = Reference< XEventAttacher2 >::query( xIFace );
@@ -65,11 +65,11 @@ css::uno::Reference< css::uno::XInterface > ConfigurationHelper::openConfig(cons
bool bReadOnly = ((eMode & ConfigurationHelper::E_READONLY)==ConfigurationHelper::E_READONLY);
if (bReadOnly)
xCFG = xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
comphelper::containerToSequence(lParams));
else
xCFG = xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationUpdateAccess"),
"com.sun.star.configuration.ConfigurationUpdateAccess",
comphelper::containerToSequence(lParams));
return xCFG;
+1 -1
View File
@@ -134,7 +134,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetConfigurati
xConfig = uno::Reference< container::XNameAccess >(
m_xConfigProvider->createInstanceWithArguments(
OUString( "com.sun.star.configuration.ConfigurationAccess" ),
"com.sun.star.configuration.ConfigurationAccess",
aArgs ),
uno::UNO_QUERY );
}
@@ -95,7 +95,7 @@ void SAL_CALL OOfficeRestartManager::requestRestart( const uno::Reference< task:
uno::Reference< awt::XRequestCallback > xRequestCallback(
xFactory->createInstanceWithContext(
OUString( "com.sun.star.awt.AsyncCallback" ),
"com.sun.star.awt.AsyncCallback",
m_xContext ),
uno::UNO_QUERY_THROW );
@@ -335,7 +335,7 @@ Reference< XInterface > OPoolCollection::createWithProvider(const Reference< XMu
makeAny(_rPath)));
Reference< XInterface > xInterface(
_rxConfProvider->createInstanceWithArguments(
OUString( "com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
args));
OSL_ENSURE(
xInterface.is(),
@@ -848,7 +848,7 @@ namespace connectivity
// create the access
Reference< XPropertySet > xNode(
xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
aArguments ),
UNO_QUERY );
OSL_ENSURE( xNode.is(), "lcl_getSystemLocale: invalid access returned (should throw an exception instead)!" );
+1 -1
View File
@@ -280,7 +280,7 @@ bool KabImplModule::impl_doAllowNewKDEVersion()
makeAny( KabDriver::impl_getConfigurationSettingsPath() ),
PropertyState_DIRECT_VALUE );
Reference< XPropertySet > xSettings( xConfigProvider->createInstanceWithArguments(
OUString( "com.sun.star.configuration.ConfigurationAccess" ),
"com.sun.star.configuration.ConfigurationAccess",
aCreationArgs ),
UNO_QUERY_THROW );
@@ -99,7 +99,7 @@ Reference< XConnection > Driver::connect(
seq[1] <<= info;
return Reference< XConnection> (
m_smgr->createInstanceWithArgumentsAndContext(
OUString("org.openoffice.comp.connectivity.pq.Connection.noext" ),
"org.openoffice.comp.connectivity.pq.Connection.noext",
seq, m_ctx ),
UNO_QUERY );
}
+2 -2
View File
@@ -480,7 +480,7 @@ CanvasSettings::CanvasSettings() :
mxForceFlagNameAccess.set(
xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationUpdateAccess"),
"com.sun.star.configuration.ConfigurationUpdateAccess",
Sequence<Any>( &propValue, 1 ) ),
UNO_QUERY_THROW );
@@ -491,7 +491,7 @@ CanvasSettings::CanvasSettings() :
Reference<XNameAccess> xNameAccess(
xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
Sequence<Any>( &propValue, 1 ) ), UNO_QUERY_THROW );
Reference<XHierarchicalNameAccess> xHierarchicalNameAccess(
xNameAccess, UNO_QUERY_THROW);
+1 -1
View File
@@ -204,7 +204,7 @@ SvxProxyTabPage::SvxProxyTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
aArgumentList[0] = makeAny( aProperty );
m_xConfigurationUpdateAccess = xConfigurationProvider->createInstanceWithArguments(
OUString( "com.sun.star.configuration.ConfigurationUpdateAccess" ),
"com.sun.star.configuration.ConfigurationUpdateAccess",
aArgumentList );
}
@@ -198,7 +198,7 @@ namespace dbaui
Sequence< Sequence< PropertyValue> > aHistory = SvtHistoryOptions().GetList( ePICKLIST );
Reference< XNameAccess > xFilterFactory;
xFilterFactory.set(::comphelper::getProcessServiceFactory()->createInstance(
OUString( "com.sun.star.document.FilterFactory" ) ), css::uno::UNO_QUERY);
"com.sun.star.document.FilterFactory" ), css::uno::UNO_QUERY);
sal_uInt32 nCount = aHistory.getLength();
for ( sal_uInt32 nItem = 0; nItem < nCount; ++nItem )
+1 -1
View File
@@ -332,7 +332,7 @@ static void impl_setNeedsCompatCheck()
makeAny( OUString("org.openoffice.Setup/Office") ) );
theArgs[0] <<= v;
Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >(
theConfigProvider->createInstanceWithArguments( OUString(aAccessSrvc), theArgs ), UNO_QUERY_THROW );
theConfigProvider->createInstanceWithArguments( aAccessSrvc, theArgs ), UNO_QUERY_THROW );
Any value = makeAny( OUString("never") );
@@ -67,7 +67,7 @@ TheExtensionManager::TheExtensionManager( const uno::Reference< awt::XWindow > &
beans::PropertyState_DIRECT_VALUE );
args[0] <<= aValue;
m_xNameAccessNodes = uno::Reference< container::XNameAccess >(
xConfig->createInstanceWithArguments( OUString("com.sun.star.configuration.ConfigurationAccess"),
xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
uno::Sequence< uno::Any >( args, 1 )), uno::UNO_QUERY_THROW);
// get the 'get more extensions here' url
@@ -76,7 +76,7 @@ TheExtensionManager::TheExtensionManager( const uno::Reference< awt::XWindow > &
beans::PropertyState_DIRECT_VALUE );
args[0] <<= aValue2;
xNameAccessRepositories = uno::Reference< container::XNameAccess > (
xConfig->createInstanceWithArguments( OUString("com.sun.star.configuration.ConfigurationAccess"),
xConfig->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess",
uno::Sequence< uno::Any >( args, 1 )), uno::UNO_QUERY_THROW);
try
{ //throws css::container::NoSuchElementException, css::lang::WrappedTargetException
+2 -2
View File
@@ -290,7 +290,7 @@ int SAL_CALL main( int argc, const char* argv[] )
arguments[0] = makeAny( OUString("generic") );
Reference< XClipboard > xClipboard( xServiceManager->createInstanceWithArguments(
OUString("com.sun.star.datatransfer.clipboard.GenericClipboard"),
"com.sun.star.datatransfer.clipboard.GenericClipboard",
arguments ), UNO_QUERY );
ENSURE( xClipboard.is(), "*** ERROR *** generic clipboard service could not be created." );
@@ -365,7 +365,7 @@ int SAL_CALL main( int argc, const char* argv[] )
// create an instance of ClipboardManager service
Reference< XClipboardManager > xClipboardManager( xServiceManager->createInstance(
OUString("com.sun.star.datatransfer.clipboard.ClipboardManager") ), UNO_QUERY );
"com.sun.star.datatransfer.clipboard.ClipboardManager" ), UNO_QUERY );
ENSURE( xClipboardManager.is(), "*** ERROR *** clipboard manager service could not be created." );
+2 -2
View File
@@ -96,7 +96,7 @@ LRESULT AWindow::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
::SendMessageA(m_hwndEdit, WM_SETTEXT, 0, (LPARAM) szSTAWin);
// create the DragSource
Reference< XInterface> xint= MultiServiceFactory->createInstance(OUString(L"com.sun.star.datatransfer.dnd.OleDragSource"));
Reference< XInterface> xint= MultiServiceFactory->createInstance("com.sun.star.datatransfer.dnd.OleDragSource");
m_xDragSource= Reference<XDragSource>( xint, UNO_QUERY);
Reference<XInitialization> xInit( xint, UNO_QUERY);
@@ -105,7 +105,7 @@ LRESULT AWindow::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
xInit->initialize( Sequence<Any>( ar, 2) );
//create the DropTarget
Reference< XInterface> xintTarget= MultiServiceFactory->createInstance(OUString(L"com.sun.star.datatransfer.dnd.OleDropTarget"));
Reference< XInterface> xintTarget= MultiServiceFactory->createInstance("com.sun.star.datatransfer.dnd.OleDropTarget");
m_xDropTarget= Reference<XDropTarget>( xintTarget, UNO_QUERY);
Reference<XInitialization> xInitTarget( xintTarget, UNO_QUERY);
+2 -4
View File
@@ -1396,8 +1396,7 @@ void OleComponent::OnViewChange_Impl( sal_uInt32 dwAspect )
if ( xLockObject.is() )
{
uno::Reference < awt::XRequestCallback > xRequestCallback(
m_xFactory->createInstance(
OUString("com.sun.star.awt.AsyncCallback")),
m_xFactory->createInstance("com.sun.star.awt.AsyncCallback"),
uno::UNO_QUERY );
xRequestCallback->addCallback( new MainThreadNotificationRequest( xLockObject, OLECOMP_ONVIEWCHANGE, dwAspect ), uno::Any() );
}
@@ -1417,8 +1416,7 @@ void OleComponent::OnClose_Impl()
if ( xLockObject.is() )
{
uno::Reference < awt::XRequestCallback > xRequestCallback(
m_xFactory->createInstance(
OUString("com.sun.star.awt.AsyncCallback")),
m_xFactory->createInstance("com.sun.star.awt.AsyncCallback"),
uno::UNO_QUERY );
xRequestCallback->addCallback( new MainThreadNotificationRequest( xLockObject, OLECOMP_ONCLOSE ), uno::Any() );
}
+1 -1
View File
@@ -709,7 +709,7 @@ namespace
aArgs[1] <<= true; // do not create copy
uno::Reference< container::XNameContainer > xNameContainer(
xFactory->createInstanceWithArguments(
OUString("com.sun.star.embed.OLESimpleStorage"),
"com.sun.star.embed.OLESimpleStorage",
aArgs ), uno::UNO_QUERY_THROW );
uno::Reference< io::XStream > xCONTENTS;
+4 -4
View File
@@ -382,7 +382,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea
uno::Reference< container::XNameContainer > xNameContainer(
m_xFactory->createInstanceWithArguments(
OUString( "com.sun.star.embed.OLESimpleStorage" ),
"com.sun.star.embed.OLESimpleStorage",
aArgs ),
uno::UNO_QUERY );
@@ -531,7 +531,7 @@ void OleEmbeddedObject::RemoveVisualCache_Impl( const uno::Reference< io::XStrea
aArgs[1] <<= true; // do not create copy
uno::Reference< container::XNameContainer > xNameContainer(
m_xFactory->createInstanceWithArguments(
OUString( "com.sun.star.embed.OLESimpleStorage" ),
"com.sun.star.embed.OLESimpleStorage",
aArgs ),
uno::UNO_QUERY );
@@ -599,7 +599,7 @@ bool OleEmbeddedObject::HasVisReplInStream()
aArgs[1] <<= true; // do not create copy
uno::Reference< container::XNameContainer > xNameContainer(
m_xFactory->createInstanceWithArguments(
OUString( "com.sun.star.embed.OLESimpleStorage" ),
"com.sun.star.embed.OLESimpleStorage",
aArgs ),
uno::UNO_QUERY );
@@ -645,7 +645,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres
{
xNameContainer = uno::Reference< container::XNameContainer >(
m_xFactory->createInstanceWithArguments(
OUString( "com.sun.star.embed.OLESimpleStorage" ),
"com.sun.star.embed.OLESimpleStorage",
aArgs ),
uno::UNO_QUERY );
}
+1 -1
View File
@@ -412,7 +412,7 @@ void OwnView_Impl::CreateNative()
aArgs[0] <<= xInStream;
uno::Reference< container::XNameAccess > xNameAccess(
m_xFactory->createInstanceWithArguments(
OUString( "com.sun.star.embed.OLESimpleStorage" ),
"com.sun.star.embed.OLESimpleStorage",
aArgs ),
uno::UNO_QUERY_THROW );
+1 -1
View File
@@ -252,7 +252,7 @@ namespace logging
makeAny( OUString( "/org.openoffice.Office.Logging/Settings" ) )
);
Reference< XNameContainer > xAllSettings( xConfigProvider->createInstanceWithArguments(
OUString( "com.sun.star.configuration.ConfigurationUpdateAccess" ),
"com.sun.star.configuration.ConfigurationUpdateAccess",
aArguments
), UNO_QUERY_THROW );
+2 -2
View File
@@ -69,7 +69,7 @@ Reference<XInvocation> getComObject( OUString progId)
if( ! objectFactory.is())
{ Reference<XMultiServiceFactory> mgr= getMultiServiceFactory();
Reference<XInterface> xInt= mgr->createInstance(
OUString(L"com.sun.star.bridge.oleautomation.Factory"));
"com.sun.star.bridge.oleautomation.Factory");
objectFactory= Reference<XMultiServiceFactory>::query( xInt);
}
@@ -88,7 +88,7 @@ Reference<XInvocation> getComObject( OUString progId)
Reference<XInvocation> convertComObject( IUnknown* pUnk)
{
Reference< XMultiServiceFactory > mgr= getMultiServiceFactory();
Reference< XInterface > xIntSupplier= mgr->createInstance(OUString(L"com.sun.star.bridge.OleBridgeSupplier2"));
Reference< XInterface > xIntSupplier= mgr->createInstance("com.sun.star.bridge.OleBridgeSupplier2");
Reference< XBridgeSupplier2 > xSuppl( xIntSupplier, UNO_QUERY);
Any any;
@@ -121,10 +121,10 @@ HRESULT doTest()
Reference< XMultiComponentFactory > mgr = xContext->getServiceManager();//createRegistryServiceFactory( OUString(L"services.rdb"));
Reference< XInterface > xIntSupplier= mgr->createInstanceWithContext(
OUString(L"com.sun.star.bridge.OleBridgeSupplierVar1"), xContext);
"com.sun.star.bridge.OleBridgeSupplierVar1", xContext);
Reference< XBridgeSupplier2 > xSuppl( xIntSupplier, UNO_QUERY);
Reference <XInterface> xOletest= mgr->createInstanceWithContext(
OUString(L"oletest.OleTest"), xContext);
"oletest.OleTest", xContext);
Any any;
any <<= xOletest;
sal_uInt8 arId[16];
+1 -1
View File
@@ -100,7 +100,7 @@ sal_Bool test2()
Reference< XComponentContext > context= bootstrap_InitialComponentContext(xreg);
Reference<XMultiComponentFactory> fac= context->getServiceManager();
OUString sService2("com.sun.star.bridge.OleBridgeSupplierVar1");
OUString sService2("com.sun.star.bridge.OleBridgeSupplierVar1");
Reference<XInterface> xint= fac->createInstanceWithContext( sService2, context);
OUString sModule("oleautobridge.uno" SAL_DLLEXTENSION);
@@ -244,7 +244,7 @@ Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* p
if ( xMultiServiceFactory.is() )
{
xPropSet = Reference< XPropertySet >( xMultiServiceFactory->createInstance(
OUString( "com.sun.star.ui.ActionTrigger" ) ),
"com.sun.star.ui.ActionTrigger" ),
UNO_QUERY );
Any a;
@@ -289,7 +289,7 @@ Reference< XPropertySet > CreateActionTriggerSeparator( const Reference< XIndexC
if ( xMultiServiceFactory.is() )
{
return Reference< XPropertySet >( xMultiServiceFactory->createInstance(
OUString( "com.sun.star.ui.ActionTriggerSeparator" ) ),
"com.sun.star.ui.ActionTriggerSeparator" ),
UNO_QUERY );
}
@@ -302,7 +302,7 @@ Reference< XIndexContainer > CreateActionTriggerContainer( const Reference< XInd
if ( xMultiServiceFactory.is() )
{
return Reference< XIndexContainer >( xMultiServiceFactory->createInstance(
OUString( "com.sun.star.ui.ActionTriggerContainer" ) ),
"com.sun.star.ui.ActionTriggerContainer" ),
UNO_QUERY );
}
@@ -983,7 +983,7 @@ DefaultNumberingProvider::isScriptFlagEnabled(const OUString& aName) throw(Runti
aArgs[0] <<= aPath;
Reference<XInterface> xInterface = xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"), aArgs);
"com.sun.star.configuration.ConfigurationAccess", aArgs);
xHierarchicalNameAccess.set(xInterface, UNO_QUERY);
@@ -46,7 +46,7 @@ TextConversion_ko::TextConversion_ko( const Reference < XComponentContext >& xCo
Reference < XInterface > xI;
xI = xContext->getServiceManager()->createInstanceWithContext(
OUString("com.sun.star.i18n.ConversionDictionary_ko"), xContext);
"com.sun.star.i18n.ConversionDictionary_ko", xContext);
if ( xI.is() )
xCD.set( xI, UNO_QUERY );
+8 -8
View File
@@ -164,21 +164,21 @@ sal_Int32 ODataStreamTest::test(
Reference < XInterface > x = m_rFactory->createInstance(
OUString( "com.sun.star.io.Pipe" ));
"com.sun.star.io.Pipe" );
Reference < XInputStream > rPipeInput( x , UNO_QUERY );
Reference < XOutputStream > rPipeOutput( x , UNO_QUERY );
if( ! rSink.is() ) {
x = m_rFactory->createInstance(
OUString( "com.sun.star.io.DataInputStream") );
"com.sun.star.io.DataInputStream" );
rInput = Reference < XDataInputStream > ( x , UNO_QUERY);
rSink = Reference< XActiveDataSink > ( x , UNO_QUERY );
}
else if ( !rSource.is() )
{
x = m_rFactory->createInstance(
OUString( "com.sun.star.io.DataOutputStream" ) );
"com.sun.star.io.DataOutputStream" );
rOutput = Reference< XDataOutputStream > ( x , UNO_QUERY );
rSource = Reference< XActiveDataSource > ( x, UNO_QUERY );
}
@@ -724,13 +724,13 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
Reference < XInterface > x = m_rFactory->createInstance(
OUString( "com.sun.star.io.Pipe" ) );
"com.sun.star.io.Pipe" );
Reference <XInputStream > rPipeInput( x , UNO_QUERY );
Reference <XOutputStream > rPipeOutput( x , UNO_QUERY );
x = m_rFactory->createInstance(
OUString( "com.sun.star.io.MarkableInputStream" ) );
"com.sun.star.io.MarkableInputStream" );
Reference <XInputStream > markableInput( x , UNO_QUERY );
Reference <XActiveDataSink> markableSink( x , UNO_QUERY );
@@ -750,13 +750,13 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
if( ! rSink.is() ) {
x = m_rFactory->createInstance(
OUString( "com.sun.star.io.ObjectInputStream" ));
"com.sun.star.io.ObjectInputStream" );
rInput = Reference < XObjectInputStream > ( x , UNO_QUERY );
rSink = Reference < XActiveDataSink > ( x , UNO_QUERY );
}
else if ( !rSource.is() ) {
x = m_rFactory->createInstance(
OUString( "com.sun.star.io.ObjectOutputStream" ));
"com.sun.star.io.ObjectOutputStream" );
rOutput = Reference <XObjectOutputStream > ( x , UNO_QUERY );
rSource = Reference <XActiveDataSource>( x, UNO_QUERY );
}
@@ -924,7 +924,7 @@ void OObjectStreamTest::testObject( const Reference< XObjectOutputStream >
{
Reference < XInterface > x = m_rFactory->createInstance(
OUString( "test.com.sun.star.io.PersistTest"));
"test.com.sun.star.io.PersistTest");
Reference< XPersistObject > persistRef( x , UNO_QUERY );
ERROR_ASSERT( persistRef.is() , "couldn't instantiate PersistTest object" );
+3 -3
View File
@@ -311,7 +311,7 @@ private:
Reference< XOutputStream > createPipe()
{
Reference< XOutputStream > rOut( m_rSmgr->createInstance(
OUString("com.sun.star.io.Pipe")),UNO_QUERY);
"com.sun.star.io.Pipe"),UNO_QUERY);
return rOut;
}
};
@@ -403,9 +403,9 @@ void OPumpTest::testWrongUsage( const Reference< XInterface > &r )
Reference< XActiveDataControl > rControl( r, UNO_QUERY );
Reference< XInputStream > rIn( m_rSmgr->createInstance(
OUString("com.sun.star.io.DataInputStream")),UNO_QUERY);
"com.sun.star.io.DataInputStream"),UNO_QUERY);
Reference< XOutputStream > rOut( m_rSmgr->createInstance(
OUString("com.sun.star.io.DataOutputStream")),UNO_QUERY);
"com.sun.star.io.DataOutputStream"),UNO_QUERY);
rSink->setInputStream( rIn );
rSource->setOutputStream( rOut );
+1 -1
View File
@@ -60,7 +60,7 @@ int main (int argc, char **argv)
{
// Create registration service
Reference < XInterface > x = xSMgr->createInstance(
OUString("com.sun.star.registry.ImplementationRegistration") );
"com.sun.star.registry.ImplementationRegistration" );
xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
}
catch( Exception & ) {
+2 -4
View File
@@ -185,12 +185,10 @@ int SAL_CALL main( int argc, char * argv[] )
OUString("com.sun.star.loader.SharedLibrary"), aLibName, Reference< XSimpleRegistry >() );
Reference < XAcceptor > rAcceptor(
xMgr->createInstance(
OUString("com.sun.star.connection.Acceptor") ) , UNO_QUERY );
xMgr->createInstance( "com.sun.star.connection.Acceptor" ) , UNO_QUERY );
Reference < XAcceptor > rAcceptorPipe(
xMgr->createInstance(
OUString("com.sun.star.connection.Acceptor") ) , UNO_QUERY );
xMgr->createInstance( "com.sun.star.connection.Acceptor" ) , UNO_QUERY );
Reference < XConnector > rConnector(
xMgr->createInstance("com.sun.star.connection.Connector") , UNO_QUERY );
+2 -2
View File
@@ -77,7 +77,7 @@ css::uno::Reference< css::uno::XInterface > SingletonFactory::createInstanceWith
OUString( "UnoVirtualMachine" ),
css::uno::makeAny( handle ) ) ) );
return xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
OUString("com.sun.star.java.JavaVirtualMachine"),
"com.sun.star.java.JavaVirtualMachine",
css::uno::Sequence< css::uno::Any >( &arg, 1 ), xContext );
}
@@ -86,7 +86,7 @@ css::uno::Reference< css::uno::XInterface > SingletonFactory::createInstanceWith
throw (css::uno::Exception, std::exception)
{
return xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
OUString("com.sun.star.java.JavaVirtualMachine"),
"com.sun.star.java.JavaVirtualMachine",
args, xContext );
}
+1 -1
View File
@@ -644,7 +644,7 @@ rtl::OUString OConnection::transFormPreparedStatement(const rtl::OUString& _sSQL
Reference< XConnection> xCon = this;
aArgs[0] <<= NamedValue(rtl::OUString("ActiveConnection"), makeAny(xCon));
m_xParameterSubstitution.set(m_rDriver.getFactory()->createInstanceWithArguments(rtl::OUString("org.openoffice.comp.helper.ParameterSubstitution"),aArgs),UNO_QUERY);
m_xParameterSubstitution.set(m_rDriver.getFactory()->createInstanceWithArguments("org.openoffice.comp.helper.ParameterSubstitution",aArgs),UNO_QUERY);
} catch(const Exception&) {}
}
if ( m_xParameterSubstitution.is() ) {
+1 -1
View File
@@ -1295,7 +1295,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
Reference< XResultSet > xResultSet(getOwnConnection().
getDriver().getFactory()->createInstance(
rtl::OUString("org.openoffice.comp.helper.DatabaseMetaDataResultSet")),UNO_QUERY);
"org.openoffice.comp.helper.DatabaseMetaDataResultSet"),UNO_QUERY);
std::vector< std::vector< Any > > rRows;
std::string cat(catalog.hasValue()? rtl::OUStringToOString(getStringFromAny(catalog), m_rConnection.getConnectionEncoding()).getStr():""),
@@ -162,7 +162,7 @@ sal_Bool XFlatXml::importer(
// create SAX parser that will read the document file
// and provide events to xHandler passed to this call
Reference < XParser > xSaxParser( m_rServiceFactory->createInstance(
OUString("com.sun.star.xml.sax.Parser")), UNO_QUERY );
"com.sun.star.xml.sax.Parser"), UNO_QUERY );
OSL_ASSERT(xSaxParser.is());
if(!xSaxParser.is())return sal_False;
@@ -212,9 +212,8 @@ sal_Bool XFlatXml::exporter(
if (!m_rDocumentHandler.is()) {
// get the document writer
m_rDocumentHandler = Reference<XExtendedDocumentHandler>(
m_rServiceFactory->createInstance(
OUString("com.sun.star.xml.sax.Writer")),
UNO_QUERY);
m_rServiceFactory->createInstance("com.sun.star.xml.sax.Writer"),
UNO_QUERY);
OSL_ASSERT(m_rDocumentHandler.is());
if (!m_rDocumentHandler.is()) return sal_False;
}
@@ -64,7 +64,7 @@ SAL_IMPLEMENT_MAIN()
// instantiate a sample service with the servicemanager.
Reference< XInterface > rInstance =
rServiceManager->createInstanceWithContext(
OUString("com.sun.star.bridge.UnoUrlResolver"),
"com.sun.star.bridge.UnoUrlResolver",
rComponentContext );
// Query for the XUnoUrlResolver interface
@@ -95,7 +95,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
*/
Reference< XInterface > xInterface =
xMultiComponentFactoryClient->createInstanceWithContext(
OUString("com.sun.star.bridge.UnoUrlResolver"),
"com.sun.star.bridge.UnoUrlResolver",
xComponentContext );
Reference< XUnoUrlResolver > resolver( xInterface, UNO_QUERY );
+1 -2
View File
@@ -71,8 +71,7 @@ SAL_IMPLEMENT_MAIN()
Reference< XMultiComponentFactory > xMgr = xContext->getServiceManager();
OSL_ENSURE( xMgr.is(), "### cannot get initial service manager!" );
Reference< XInterface > xx = xMgr->createInstanceWithContext(
OUString("foo.Counter"), xContext);
Reference< XInterface > xx = xMgr->createInstanceWithContext( "foo.Counter", xContext);
OSL_ENSURE( xx.is(), "### cannot get service instance of \"foo.Counter\"!" );
+1 -1
View File
@@ -1201,7 +1201,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase )
Reference < graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() );
Reference < lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
xShape = Reference < XShape > ( xServiceFact->createInstance( OUString( "com.sun.star.drawing.GraphicObjectShape" ) ), UNO_QUERY_THROW );
xShape = Reference < XShape > ( xServiceFact->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), UNO_QUERY_THROW );
Reference < XPropertySet > xPropSet( xShape, UNO_QUERY_THROW );
xPropSet->setPropertyValue( OUString( "Graphic" ), Any( xGraphic ) );
xPropSet->setPropertyValue( OUString( "MoveProtect" ), Any( sal_True ) );
+1 -1
View File
@@ -266,7 +266,7 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx )
c->xContext = ctx;
c->xInvocation = Reference< XSingleServiceFactory > (
ctx->getServiceManager()->createInstanceWithContext(
OUString( "com.sun.star.script.Invocation" ),
"com.sun.star.script.Invocation",
ctx ),
UNO_QUERY );
if( ! c->xInvocation.is() )
@@ -124,9 +124,7 @@ Reference< XInterface > ResolverImpl::resolve( const OUString & rUnoUrl )
}
Reference< XConnector > xConnector(
_xSMgr->createInstanceWithContext(
OUString("com.sun.star.connection.Connector"),
_xCtx ),
_xSMgr->createInstanceWithContext( "com.sun.star.connection.Connector", _xCtx ),
UNO_QUERY );
if (! xConnector.is())
@@ -1272,7 +1272,7 @@ void OReportDefinition::impl_loadFromStorage_nolck_throw( const uno::Reference<
rptui::OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
{
uno::Reference< document::XFilter > xFilter(
m_aProps->m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(OUString("com.sun.star.comp.report.OReportFilter"),aDelegatorArguments,m_aProps->m_xContext),
m_aProps->m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.comp.report.OReportFilter",aDelegatorArguments,m_aProps->m_xContext),
uno::UNO_QUERY_THROW );
uno::Reference< document::XImporter> xImporter(xFilter,uno::UNO_QUERY_THROW);
+1 -1
View File
@@ -504,7 +504,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
uno::Reference< lang::XMultiServiceFactory > xReportServiceFactory( m_xReportDefinition, uno::UNO_QUERY);
aArgs[0] <<= beans::NamedValue(OUString("Storage"),uno::makeAny(xStorage));
xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments(OUString("com.sun.star.document.ImportEmbeddedObjectResolver"),aArgs) , uno::UNO_QUERY);
xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments("com.sun.star.document.ImportEmbeddedObjectResolver",aArgs) , uno::UNO_QUERY);
static const char s_sOld[] = "OldFormat";
static comphelper::PropertyMapEntry const pMap[] =
@@ -511,8 +511,8 @@ bool DataProviderHandler::impl_dialogLinkedFields_nothrow( ::osl::ClearableMutex
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
OUString("org.openoffice.comp.form.ui.MasterDetailLinkDialog"),aSeq
, m_xContext), uno::UNO_QUERY);
"org.openoffice.comp.form.ui.MasterDetailLinkDialog", aSeq, m_xContext),
uno::UNO_QUERY);
_rClearBeforeDialog.clear();
return ( xDialog->execute() != 0 );
@@ -531,8 +531,8 @@ bool DataProviderHandler::impl_dialogChartType_nothrow( ::osl::ClearableMutexGua
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
OUString("com.sun.star.comp.chart2.ChartTypeDialog"),aSeq
, m_xContext), uno::UNO_QUERY);
"com.sun.star.comp.chart2.ChartTypeDialog", aSeq, m_xContext),
uno::UNO_QUERY);
_rClearBeforeDialog.clear();
return ( xDialog->execute() != 0 );
+2 -4
View File
@@ -499,8 +499,7 @@ int main (int argc, char **argv)
try
{
// Create registration service
Reference < XInterface > x = xSMgr->createInstance(
OUString("com.sun.star.registry.ImplementationRegistration") );
Reference < XInterface > x = xSMgr->createInstance( "com.sun.star.registry.ImplementationRegistration" );
xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
}
catch( Exception & ) {
@@ -530,8 +529,7 @@ int main (int argc, char **argv)
// parser demo
// read xml from a file and count elements
Reference< XInterface > x = xSMgr->createInstance(
OUString("com.sun.star.xml.sax.Parser") );
Reference< XInterface > x = xSMgr->createInstance( "com.sun.star.xml.sax.Parser" );
if( x.is() )
{
Reference< XParser > rParser( x , UNO_QUERY );
+1 -2
View File
@@ -68,8 +68,7 @@ int main (int argc, char **argv)
try
{
// Create registration service
Reference < XInterface > x = xSMgr->createInstance(
OUString("com.sun.star.registry.ImplementationRegistration") );
Reference < XInterface > x = xSMgr->createInstance( "com.sun.star.registry.ImplementationRegistration" );
xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
}
catch (const Exception&)
+1 -2
View File
@@ -2873,8 +2873,7 @@ void ScXMLImport::SetStyleToRanges()
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")),
xMultiServiceFactory->createInstance("com.sun.star.sheet.SheetCellRanges"),
uno::UNO_QUERY));
}
OSL_ENSURE(xSheetCellRanges.is(), "didn't get SheetCellRanges");
+1 -1
View File
@@ -658,7 +658,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
{
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
OUString("com.sun.star.comp.chart2.WizardDialog")
"com.sun.star.comp.chart2.WizardDialog"
, xContext), uno::UNO_QUERY);
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xChartModel.is() && xInit.is() )
+1 -1
View File
@@ -613,7 +613,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
{
uno::Sequence< uno::Any > aArgs(1);
aArgs[ 0 ] <<= pDocShell->GetModel();
xRet = ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( OUString( "ooo.vba.excel.Globals" ), aArgs );
xRet = ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( "ooo.vba.excel.Globals", aArgs );
pDocShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", uno::Any( xRet ) );
BasicManager* pAppMgr = SfxApplication::GetBasicManager();
if ( pAppMgr )
+1 -1
View File
@@ -217,7 +217,7 @@ ScVbaGlobals::getDebug() throw (uno::RuntimeException, std::exception)
{
uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW );
uno::Reference< uno::XInterface > xVBADebug = xServiceManager->createInstanceWithContext(
OUString( "ooo.vba.Debug" ), mxContext );
"ooo.vba.Debug", mxContext );
return uno::Any( xVBADebug );
}
catch( uno::Exception& )
+1 -1
View File
@@ -179,7 +179,7 @@ ScVbaWSFunction::invoke(const OUString& FunctionName, const uno::Sequence< uno::
{
uno::Reference< lang::XMultiComponentFactory > xSMgr( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
uno::Reference< sheet::XFunctionAccess > xFunctionAccess( xSMgr->createInstanceWithContext(
OUString( "com.sun.star.sheet.FunctionAccess" ), mxContext ),
"com.sun.star.sheet.FunctionAccess", mxContext ),
uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xPropSet( xFunctionAccess, uno::UNO_QUERY_THROW );
xPropSet->setPropertyValue("IsArrayFunction", uno::Any( bAsArray ) );
+3 -2
View File
@@ -1730,8 +1730,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
OUString("com.sun.star.linguistic2.ChineseTranslationDialog")
, xContext), UNO_QUERY);
"com.sun.star.linguistic2.ChineseTranslationDialog"
, xContext),
UNO_QUERY);
Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY );
if( xInit.is() )
{
+2 -2
View File
@@ -111,7 +111,7 @@ namespace dlgprov
if ( xSMgr.is() )
{
args[0] <<= xModel;
mxListener = Reference< XScriptListener >( xSMgr->createInstanceWithArgumentsAndContext( OUString( "ooo.vba.EventListener" ), args, m_xContext ), UNO_QUERY );
mxListener = Reference< XScriptListener >( xSMgr->createInstanceWithArgumentsAndContext( "ooo.vba.EventListener", args, m_xContext ), UNO_QUERY );
}
if ( rxControl.is() )
{
@@ -342,7 +342,7 @@ namespace dlgprov
if ( xSMgr.is() )
{
m_xEventAttacher = Reference< XEventAttacher >( xSMgr->createInstanceWithContext(
OUString( "com.sun.star.script.EventAttacher" ), m_xContext ), UNO_QUERY );
"com.sun.star.script.EventAttacher", m_xContext ), UNO_QUERY );
if ( !m_xEventAttacher.is() )
throw ServiceNotRegisteredException();
+2 -2
View File
@@ -71,7 +71,7 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext
// collecting a list of impress filters
Reference< XNameAccess > xFilters( rxContext->getServiceManager()->createInstanceWithContext(
OUString( "com.sun.star.document.FilterFactory" ), rxContext ), UNO_QUERY_THROW );
"com.sun.star.document.FilterFactory", rxContext ), UNO_QUERY_THROW );
Sequence< OUString > aFilterList( xFilters->getElementNames() );
for ( int i = 0; i < aFilterList.getLength(); i++ )
{
@@ -116,7 +116,7 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxContext
}
Reference< XNameAccess > xTypes( rxContext->getServiceManager()->createInstanceWithContext(
OUString( "com.sun.star.document.TypeDetection" ), rxContext ), UNO_QUERY_THROW );
"com.sun.star.document.TypeDetection", rxContext ), UNO_QUERY_THROW );
for( std::vector< FilterEntry >::const_iterator aIter(aFilterEntryList.begin()), aEnd(aFilterEntryList.end()); aIter != aEnd; ++aIter )
{
+1 -1
View File
@@ -148,7 +148,7 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert
try {
xSubFilter = uno::Reference<document::XFilter>(
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
OUString( "com.sun.star.document.OwnSubFilter" ),
"com.sun.star.document.OwnSubFilter",
aArgs,
m_xContext ),
uno::UNO_QUERY );
+4 -6
View File
@@ -623,9 +623,7 @@ void Parser::readFont()
{
uno::Reference< beans::XMaterialHolder > xMat(
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
OUString( "com.sun.star.awt.FontIdentificator" ),
aArgs,
m_xContext ),
"com.sun.star.awt.FontIdentificator", aArgs, m_xContext ),
uno::UNO_QUERY );
if( xMat.is() )
{
@@ -708,9 +706,9 @@ uno::Sequence<beans::PropertyValue> Parser::readImageImpl()
uno::Reference< uno::XComponentContext > xContext( m_xContext, uno::UNO_SET_THROW );
uno::Reference< lang::XMultiComponentFactory > xFactory( xContext->getServiceManager(), uno::UNO_SET_THROW );
uno::Reference< io::XInputStream > xDataStream( xFactory->createInstanceWithArgumentsAndContext(
OUString( "com.sun.star.io.SequenceInputStream" ),
aStreamCreationArgs, m_xContext ), uno::UNO_QUERY_THROW );
uno::Reference< io::XInputStream > xDataStream(
xFactory->createInstanceWithArgumentsAndContext( "com.sun.star.io.SequenceInputStream", aStreamCreationArgs, m_xContext ),
uno::UNO_QUERY_THROW );
uno::Sequence<beans::PropertyValue> aSequence(3);
aSequence[0] = beans::PropertyValue( OUString("URL"),
+1 -1
View File
@@ -115,7 +115,7 @@ PresenterButton::PresenterButton (
mxPresenterHelper = Reference<drawing::XPresenterHelper>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.comp.Draw.PresenterHelper"),
"com.sun.star.comp.Draw.PresenterHelper",
rxComponentContext),
UNO_QUERY_THROW);
+1 -1
View File
@@ -44,7 +44,7 @@ PresenterPane::PresenterPane (
mxComponentContext->getServiceManager(), UNO_QUERY_THROW);
mxPresenterHelper = Reference<drawing::XPresenterHelper>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.comp.Draw.PresenterHelper"),
"com.sun.star.comp.Draw.PresenterHelper",
mxComponentContext),
UNO_QUERY_THROW);
}
@@ -84,7 +84,7 @@ PresenterPaneBorderManager::PresenterPaneBorderManager (
mxPresenterHelper = Reference<drawing::XPresenterHelper>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.comp.Draw.PresenterHelper"),
"com.sun.star.comp.Draw.PresenterHelper",
rxContext),
UNO_QUERY_THROW);
}
@@ -409,7 +409,7 @@ PresenterPaneBorderPainter::Renderer::Renderer (
{
mxPresenterHelper = Reference<drawing::XPresenterHelper>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.comp.Draw.PresenterHelper"),
"com.sun.star.comp.Draw.PresenterHelper",
rxContext),
UNO_QUERY_THROW);
}
@@ -41,7 +41,7 @@ PresenterPaneContainer::PresenterPaneContainer (
{
mxPresenterHelper = Reference<drawing::XPresenterHelper>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.comp.Draw.PresenterHelper"),
"com.sun.star.comp.Draw.PresenterHelper",
rxContext),
UNO_QUERY_THROW);
}
@@ -109,7 +109,7 @@ PresenterScrollBar::PresenterScrollBar (
mxPresenterHelper = Reference<drawing::XPresenterHelper>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.comp.Draw.PresenterHelper"),
"com.sun.star.comp.Draw.PresenterHelper",
rxComponentContext),
UNO_QUERY_THROW);
@@ -94,7 +94,7 @@ PresenterSlidePreview::PresenterSlidePreview (
if (xFactory.is())
mxPreviewRenderer = Reference<drawing::XSlideRenderer>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.drawing.SlideRenderer"),
"com.sun.star.drawing.SlideRenderer",
rxContext),
UNO_QUERY);
mpBitmaps.reset(new PresenterBitmapContainer(
@@ -102,7 +102,7 @@ void PresenterSlideShowView::LateInit()
Reference<lang::XMultiComponentFactory> xFactory (
mxComponentContext->getServiceManager(), UNO_QUERY_THROW);
mxPresenterHelper.set (xFactory->createInstanceWithContext(
OUString("com.sun.star.comp.Draw.PresenterHelper"),
"com.sun.star.comp.Draw.PresenterHelper",
mxComponentContext),
UNO_QUERY_THROW);
@@ -330,7 +330,7 @@ PresenterSlideSorter::PresenterSlideSorter (
// Create the preview cache.
mxPreviewCache = Reference<drawing::XSlidePreviewCache>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.drawing.PresenterPreviewCache"),
"com.sun.star.drawing.PresenterPreviewCache",
mxComponentContext),
UNO_QUERY_THROW);
Reference<container::XIndexAccess> xSlides (mxSlideShowController, UNO_QUERY);
@@ -42,7 +42,7 @@ PresenterSpritePane::PresenterSpritePane (const Reference<XComponentContext>& rx
mxComponentContext->getServiceManager(), UNO_QUERY_THROW);
mxPresenterHelper = Reference<drawing::XPresenterHelper>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.comp.Draw.PresenterHelper"),
"com.sun.star.comp.Draw.PresenterHelper",
mxComponentContext),
UNO_QUERY_THROW);
}
+1 -1
View File
@@ -707,7 +707,7 @@ ReadContext::ReadContext (
{
mxPresenterHelper = Reference<drawing::XPresenterHelper>(
xFactory->createInstanceWithContext(
OUString("com.sun.star.comp.Draw.PresenterHelper"),
"com.sun.star.comp.Draw.PresenterHelper",
rxContext),
UNO_QUERY_THROW);
}
+1 -1
View File
@@ -809,7 +809,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( bHyperlinkUsed && !aFileName.isEmpty() && aFileName[0] != '#' )
{
Reference< css::document::XTypeDetection > xTypeDetection( ::comphelper::getProcessServiceFactory()->createInstance(
OUString("com.sun.star.document.TypeDetection")),
"com.sun.star.document.TypeDetection"),
UNO_QUERY );
if ( xTypeDetection.is() )
{
+2 -3
View File
@@ -346,9 +346,8 @@ OUString impl_getFilter( const OUString& _rURL )
try
{
css::uno::Reference< css::document::XTypeDetection > xTypeDetection(
::comphelper::getProcessServiceFactory()->createInstance(
OUString("com.sun.star.document.TypeDetection") ),
css::uno::UNO_QUERY );
::comphelper::getProcessServiceFactory()->createInstance( "com.sun.star.document.TypeDetection" ),
css::uno::UNO_QUERY );
if ( xTypeDetection.is() )
{
utl::MediaDescriptor aDescr;
+1 -2
View File
@@ -143,8 +143,7 @@ SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
{
uno::Sequence < beans::PropertyValue > aProps;
css::uno::Reference< css::container::XNameAccess > xFilterCFG(
xSMGR->createInstance(
OUString("com.sun.star.document.FilterFactory") ), uno::UNO_QUERY );
xSMGR->createInstance( "com.sun.star.document.FilterFactory" ), uno::UNO_QUERY );
css::uno::Reference< css::util::XModifiable > xModifiable( xModel, css::uno::UNO_QUERY );
if ( !xFilterCFG.is() )
+1 -1
View File
@@ -1809,7 +1809,7 @@ bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
uno::Reference< container::XNameAccess > xSOFConfig(
xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
aArgs ),
uno::UNO_QUERY_THROW );
+1 -2
View File
@@ -207,8 +207,7 @@ public:
{
uno::Reference< lang::XMultiServiceFactory > xDocSettingsSupplier( xModel, uno::UNO_QUERY_THROW );
m_xDocumentSettings.set(
xDocSettingsSupplier->createInstance(
OUString( "com.sun.star.document.Settings" ) ),
xDocSettingsSupplier->createInstance( "com.sun.star.document.Settings" ),
uno::UNO_QUERY_THROW );
OUString aLoadReadonlyString( "LoadReadonly" );
+1 -2
View File
@@ -277,8 +277,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
const Reference<frame::
XTransientDocumentsDocumentContentFactory> xTDDCF(
xMsf->createInstanceWithContext(
OUString("com.sun.star.frame."
"TransientDocumentsDocumentContentFactory"),
"com.sun.star.frame.TransientDocumentsDocumentContentFactory",
xContext),
UNO_QUERY_THROW);
const Reference<ucb::XContent> xContent(
+1 -1
View File
@@ -190,7 +190,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
Reference< XNameAccess > xNameAccess =
Reference< XNameAccess > (
m_xConfigurationProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
aArgumentList ),
UNO_QUERY );
+2 -2
View File
@@ -615,7 +615,7 @@ SlideShowImpl::SlideShowImpl(
// #i82460# try to retrieve special transition factory
mxOptionalTransitionFactory.set(
xFactory->createInstanceWithContext(
OUString("com.sun.star.presentation.TransitionFactory" ),
"com.sun.star.presentation.TransitionFactory",
mxComponentContext ),
uno::UNO_QUERY );
}
@@ -1461,7 +1461,7 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult
{
//create the PolyLineShape
uno::Reference< uno::XInterface > polyshape(xDocFactory->createInstance(
OUString("com.sun.star.drawing.PolyLineShape") ) );
"com.sun.star.drawing.PolyLineShape" ) );
uno::Reference< drawing::XShape > rPolyShape(polyshape, uno::UNO_QUERY);
//Add the shape to the slide
@@ -481,7 +481,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
uno::Reference< container::XNameContainer > xResultNameContainer(
m_xFactory->createInstanceWithArguments(
OUString("com.sun.star.embed.OLESimpleStorage"),
"com.sun.star.embed.OLESimpleStorage",
aArgs ),
uno::UNO_QUERY_THROW );
+1 -3
View File
@@ -1115,9 +1115,7 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx
, xCoreReflection( css::reflection::theCoreReflection::get(mxCtx) )
{
xTypeConverter = Reference<XTypeConverter>(
mxSMgr->createInstanceWithContext(
OUString("com.sun.star.script.Converter"),
xCtx ),
mxSMgr->createInstanceWithContext( "com.sun.star.script.Converter", xCtx ),
UNO_QUERY );
xIntrospection = theIntrospection::get(xCtx);
}
@@ -700,7 +700,7 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext )
// type converter
Reference< script::XTypeConverter > xConverter(
xContext->getServiceManager()->createInstanceWithContext(
OUString("com.sun.star.script.Converter"),
"com.sun.star.script.Converter",
xContext ),
UNO_QUERY_THROW );
m_pConverter = static_cast<uno_Interface *>(m_aCpp2Uno.mapInterface(
+5 -6
View File
@@ -272,7 +272,7 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
const css::uno::Reference<css::uno::XComponentContext> &xCtx ) throw (css::uno::Exception)
{
css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext(
OUString("com.sun.star.configuration.ConfigurationRegistry"),
"com.sun.star.configuration.ConfigurationRegistry",
xCtx );
if(!xConfRegistry.is()) throw css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", 0);
@@ -362,8 +362,7 @@ void getDefaultLocaleFromConfig(
const css::uno::Reference<css::uno::XComponentContext> &xCtx ) throw(css::uno::Exception)
{
css::uno::Reference<css::uno::XInterface> xConfRegistry =
xSMgr->createInstanceWithContext(
OUString("com.sun.star.configuration.ConfigurationRegistry"), xCtx );
xSMgr->createInstanceWithContext( "com.sun.star.configuration.ConfigurationRegistry", xCtx );
if(!xConfRegistry.is())
throw css::uno::RuntimeException(
OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0);
@@ -417,7 +416,7 @@ void getJavaPropsFromSafetySettings(
{
css::uno::Reference<css::uno::XInterface> xConfRegistry =
xSMgr->createInstanceWithContext(
OUString("com.sun.star.configuration.ConfigurationRegistry"),
"com.sun.star.configuration.ConfigurationRegistry",
xCtx);
if(!xConfRegistry.is())
throw css::uno::RuntimeException(
@@ -1353,7 +1352,7 @@ void JavaVirtualMachine::registerConfigChangesListener()
m_xInetConfiguration
= css::uno::Reference< css::container::XContainer >(
xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
aArguments),
css::uno::UNO_QUERY);
@@ -1377,7 +1376,7 @@ void JavaVirtualMachine::registerConfigChangesListener()
m_xJavaConfiguration
= css::uno::Reference< css::container::XContainer >(
xConfigProvider->createInstanceWithArguments(
OUString("com.sun.star.configuration.ConfigurationAccess"),
"com.sun.star.configuration.ConfigurationAccess",
aArguments2),
css::uno::UNO_QUERY);
@@ -1410,7 +1410,7 @@ Reference<XRegistryKey > ORegistryServiceManager::getRootKey()
m_xRegistry.set(
createInstanceWithContext(
OUString("com.sun.star.registry.DefaultRegistry"),
"com.sun.star.registry.DefaultRegistry",
m_xContext ),
UNO_QUERY );
}
@@ -127,7 +127,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &)
OUString("Registry"));
css::uno::Reference< css::container::XHierarchicalNameAccess > provider(
factory->createInstanceWithArgumentsAndContext(
OUString( "com.sun.star.comp.stoc.RegistryTypeDescriptionProvider"),
"com.sun.star.comp.stoc.RegistryTypeDescriptionProvider",
args, m_context),
css::uno::UNO_QUERY_THROW);
+2 -3
View File
@@ -141,15 +141,14 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const & arguments)
css::uno::Reference<css::registry::XSimpleRegistry> xReg(
m_context->getServiceManager()->createInstanceWithContext(
OUString( "com.sun.star.registry.SimpleRegistry" ),
"com.sun.star.registry.SimpleRegistry",
m_context ), css::uno::UNO_QUERY_THROW );
xReg->open( url, true /* read-only */, false /* ! create */ );
css::uno::Any arg( css::uno::makeAny(xReg) );
css::uno::Reference<css::container::XHierarchicalNameAccess> xTDprov(
m_context->getServiceManager()->
createInstanceWithArgumentsAndContext(
OUString( "com.sun.star.comp.stoc."
"RegistryTypeDescriptionProvider" ),
"com.sun.star.comp.stoc.RegistryTypeDescriptionProvider",
css::uno::Sequence<css::uno::Any>( &arg, 1 ), m_context ),
css::uno::UNO_QUERY_THROW );
try {
+1 -2
View File
@@ -606,8 +606,7 @@ static void test_Conversion( const Reference< XMultiServiceFactory > & xMgr )
{
printf( "test_Conversion(): start...\n" );
Reference< XTypeConverter > xConverter( xMgr->createInstance(
OUString("com.sun.star.script.Converter") ), UNO_QUERY );
Reference< XTypeConverter > xConverter( xMgr->createInstance( "com.sun.star.script.Converter" ), UNO_QUERY );
ConvBlock * pTestBlocks = new ConvBlock[256];
sal_Int32 nPos = initBlocks( pTestBlocks );
+1 -2
View File
@@ -1004,8 +1004,7 @@ SAL_IMPLEMENT_MAIN()
try
{
Reference< XImplementationRegistration > xImplReg(
xMgr->createInstance(
OUString( "com.sun.star.registry.ImplementationRegistration" ) ),
xMgr->createInstance( "com.sun.star.registry.ImplementationRegistration" ),
UNO_QUERY );
OSL_ENSURE( xImplReg.is(), "### no impl reg!" );
+1 -1
View File
@@ -71,7 +71,7 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS
if( !xRefl.is() )
{
xRefl = Reference< XIdlReflection >( xMgr->createInstance(
OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY );
"com.sun.star.reflection.CoreReflection" ), UNO_QUERY );
OSL_ENSURE( xRefl.is(), "### no corereflection!" );
}
xRetClass = xRefl->forName( sOWName );
+1 -3
View File
@@ -252,9 +252,7 @@ SAL_IMPLEMENT_MAIN()
try
{
Reference< registry::XImplementationRegistration > xImplReg(
xMgr->createInstance(
OUString( "com.sun.star.registry.ImplementationRegistration"
) ),
xMgr->createInstance( "com.sun.star.registry.ImplementationRegistration" ),
UNO_QUERY );
OSL_ENSURE( xImplReg.is(), "### no impl reg!" );
+2 -2
View File
@@ -88,7 +88,7 @@ Reference< css::uno::XInterface > FilePicker_CreateInstance (
{
// Always fall back to OfficeFilePicker.
xResult = xFactory->createInstanceWithContext (
OUString( "com.sun.star.ui.dialogs.OfficeFilePicker"),
"com.sun.star.ui.dialogs.OfficeFilePicker",
context);
}
if (xResult.is())
@@ -158,7 +158,7 @@ Reference< css::uno::XInterface > FolderPicker_CreateInstance (
{
// Always fall back to OfficeFolderPicker.
xResult = xFactory->createInstanceWithContext (
OUString( "com.sun.star.ui.dialogs.OfficeFolderPicker"),
"com.sun.star.ui.dialogs.OfficeFolderPicker",
context);
}
if (xResult.is())
+1 -1
View File
@@ -512,7 +512,7 @@ void SvxSearchDialog::Construct_Impl()
aArgs[0] <<= sPath;
uno::Reference< uno::XInterface > xIFace = xConfigurationProvider->createInstanceWithArguments(
OUString( "com.sun.star.configuration.ConfigurationUpdateAccess"),
"com.sun.star.configuration.ConfigurationUpdateAccess",
aArgs);
uno::Reference< container::XNameAccess> xDirectAccess(xIFace, uno::UNO_QUERY);
if(xDirectAccess.is())
+2 -2
View File
@@ -430,8 +430,8 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
m_xTransformer.set(
m_xContext->getServiceManager()->createInstanceWithContext(
OUString( "com.sun.star.util.URLTransformer" ), m_xContext ),
css::uno::UNO_QUERY );
"com.sun.star.util.URLTransformer", m_xContext ),
css::uno::UNO_QUERY );
Image aDummyImage;
vcl::Font aInfoFont( maInfoBar->GetControlFont() );
+1 -2
View File
@@ -360,8 +360,7 @@ GalleryProgress::GalleryProgress( GraphicFilter* pFilter ) :
uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
uno::Reference< awt::XProgressMonitor > xMonitor( xMgr->createInstance(
OUString("com.sun.star.awt.XProgressMonitor") ),
uno::Reference< awt::XProgressMonitor > xMonitor( xMgr->createInstance( "com.sun.star.awt.XProgressMonitor" ),
uno::UNO_QUERY );
if ( xMonitor.is() )
+1 -1
View File
@@ -179,7 +179,7 @@ void TiledRenderingApp::Init()
// plain createInstance w/o args directly to obtain an instance):
::ucb::UniversalContentBroker::create(comphelper::getProcessComponentContext() );
xDesktop.set(xFactory->createInstanceWithContext(OUString("com.sun.star.frame.Desktop"), xContext));
xDesktop.set(xFactory->createInstanceWithContext("com.sun.star.frame.Desktop", xContext));
xLoader.set(frame::Desktop::create(xContext));
}
+4 -6
View File
@@ -891,9 +891,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
if( !rServiceFactory.is() )
return xShape;
uno::Reference< XInterface > xCreate =
rServiceFactory ->createInstance(
OUString("com.sun.star.drawing.ControlShape"));
uno::Reference< XInterface > xCreate = rServiceFactory->createInstance( "com.sun.star.drawing.ControlShape" );
if( !xCreate.is() )
return xShape;
@@ -1326,7 +1324,7 @@ void SwHTMLParser::NewForm( bool bAppend )
return;
uno::Reference< XInterface > xInt = rSrvcMgr->createInstance(
OUString("com.sun.star.form.component.Form") );
"com.sun.star.form.component.Form" );
if( !xInt.is() )
return;
@@ -2014,7 +2012,7 @@ void SwHTMLParser::NewTextArea()
return;
}
uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
OUString("com.sun.star.form.component.TextField") );
"com.sun.star.form.component.TextField" );
if( !xInt.is() )
{
FinishTextArea();
@@ -2282,7 +2280,7 @@ void SwHTMLParser::NewSelect()
return;
}
uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
OUString("com.sun.star.form.component.ListBox") );
"com.sun.star.form.component.ListBox" );
if( !xInt.is() )
{
FinishTextArea();
+2 -2
View File
@@ -1253,8 +1253,8 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
{
Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
OUString("com.sun.star.linguistic2.ChineseTranslationDialog")
, xContext), UNO_QUERY);
"com.sun.star.linguistic2.ChineseTranslationDialog", xContext),
UNO_QUERY);
Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY );
if( xInit.is() )
{
+2 -2
View File
@@ -176,8 +176,8 @@ void SwInsertChart(vcl::Window* pParent, SfxBindings* pBindings )
{
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
OUString("com.sun.star.comp.chart2.WizardDialog")
, xContext), uno::UNO_QUERY);
"com.sun.star.comp.chart2.WizardDialog", xContext),
uno::UNO_QUERY);
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xInit.is() )
{

Some files were not shown because too many files have changed in this diff Show More