Kaydet (Commit) 59b072e2 authored tarafından Noel Grandin's avatar Noel Grandin

yyyyy

Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
üst baa411b5
......@@ -31,7 +31,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaogl_component_getFactory(
xFactory.set( ::cppu::createSingleFactory(
static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
OUString("com.sun.star.comp.avmedia.Manager_OpenGL" ),
"com.sun.star.comp.avmedia.Manager_OpenGL",
create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
}
......
......@@ -414,7 +414,7 @@ bool ModulWindow::LoadBasic()
xFP->setDisplayDirectory ( aCurPath );
xFP->appendFilter( "BASIC" , "*.bas" );
xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), FilterMask_All );
xFP->setCurrentFilter( "BASIC" );
if( xFP->execute() == RET_OK )
......@@ -465,7 +465,7 @@ bool ModulWindow::SaveBasicSource()
xFP->setDisplayDirectory ( aCurPath );
xFP->appendFilter( "BASIC", "*.bas" );
xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), FilterMask_All );
xFP->setCurrentFilter( "BASIC" );
if( xFP->execute() == RET_OK )
......
......@@ -685,11 +685,11 @@ bool DialogWindow::SaveDialog()
if ( !aCurPath.isEmpty() )
xFP->setDisplayDirectory ( aCurPath );
xFP->setDefaultName( OUString( GetName() ) );
xFP->setDefaultName( GetName() );
OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
xFP->appendFilter( aDialogStr, OUString( "*.xdl" ) );
xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
xFP->appendFilter( aDialogStr, "*.xdl" );
xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), FilterMask_All );
xFP->setCurrentFilter( aDialogStr );
if( xFP->execute() == RET_OK )
......@@ -933,8 +933,8 @@ bool implImportDialog( vcl::Window* pWin, const OUString& rCurPath, const Script
xFP->setDisplayDirectory ( aCurPath );
OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
xFP->appendFilter( aDialogStr, OUString( "*.xdl" ) );
xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
xFP->appendFilter( aDialogStr, "*.xdl" );
xFP->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), FilterMask_All );
xFP->setCurrentFilter( aDialogStr );
if( xFP->execute() == RET_OK )
......@@ -1283,7 +1283,7 @@ void DialogWindow::StoreData()
Reference< XComponentContext > xContext(
comphelper::getProcessComponentContext() );
Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() );
xLib->replaceByName( OUString( GetName() ), makeAny( xISP ) );
xLib->replaceByName( GetName(), makeAny( xISP ) );
}
}
}
......
......@@ -201,7 +201,7 @@ Reference< XHierarchicalNameAccess > getTypeProvider_Impl()
if( xContext.is() )
{
xContext->getValueByName(
OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) )
"/singletons/com.sun.star.reflection.theTypeDescriptionManager" )
>>= xAccess;
OSL_ENSURE( xAccess.is(), "### TypeDescriptionManager singleton not accessible!?" );
}
......@@ -1726,7 +1726,7 @@ bool checkUnoObjectType(SbUnoObject& rUnoObj, const OUString& rClass)
if ( xInv.is() )
{
OUString sTypeName;
xInv->getValue( OUString( "$GetTypeName" ) ) >>= sTypeName;
xInv->getValue( "$GetTypeName" ) >>= sTypeName;
if ( sTypeName.isEmpty() || sTypeName == "IDispatch" )
{
// can't check type, leave it pass
......
......@@ -31,7 +31,7 @@ sal_Bool SAL_CALL ComEnumerationWrapper::hasMoreElements()
if ( m_xInvocation.is() )
{
sal_Int32 nLength = 0;
bResult = ( ( m_xInvocation->getValue( OUString("length" ) ) >>= nLength ) && nLength > m_nCurInd );
bResult = ( ( m_xInvocation->getValue( "length" ) >>= nLength ) && nLength > m_nCurInd );
}
}
catch(const uno::Exception& )
......@@ -55,7 +55,7 @@ uno::Any SAL_CALL ComEnumerationWrapper::nextElement()
aArgs[0] <<= m_nCurInd++;
return m_xInvocation->invoke( OUString("item"),
return m_xInvocation->invoke( "item",
aArgs,
aNamedParamIndex,
aNamedParam );
......
......@@ -293,7 +293,7 @@ bool hasUno()
{
Reference< XUniversalContentBroker > xManager = UniversalContentBroker::create(xContext);
if ( !( xManager->queryContentProvider( OUString("file:///" ) ).is() ) )
if ( !( xManager->queryContentProvider( "file:///" ).is() ) )
{
// No UCB
bRetVal = false;
......
......@@ -3884,7 +3884,7 @@ OUString getObjectTypeName( SbxVariable* pVar )
{
try
{
xInv->getValue( OUString( "$GetTypeName" ) ) >>= sRet;
xInv->getValue( "$GetTypeName" ) >>= sRet;
}
catch(const Exception& )
{
......
......@@ -384,7 +384,7 @@ Reference< css::resource::XStringResourcePersistence >
return xRet;
}
xRet = resource::StringResourceWithStorage::create(mxContext, xLibraryStor, bReadOnly, aLocale, OUString(aResourceFileNameBase), aComment);
xRet = resource::StringResourceWithStorage::create(mxContext, xLibraryStor, bReadOnly, aLocale, aResourceFileNameBase, aComment);
}
else
{
......@@ -392,7 +392,7 @@ Reference< css::resource::XStringResourcePersistence >
// TODO: Real handler?
Reference< task::XInteractionHandler > xDummyHandler;
xRet = resource::StringResourceWithLocation::create(mxContext, aLocation, bReadOnly, aLocale, OUString(aResourceFileNameBase), aComment, xDummyHandler);
xRet = resource::StringResourceWithLocation::create(mxContext, aLocation, bReadOnly, aLocale, aResourceFileNameBase, aComment, xDummyHandler);
}
return xRet;
......@@ -539,7 +539,7 @@ void SfxDialogLibrary::storeResourcesToURL( const OUString& URL,
if( m_xStringResourcePersistence.is() )
{
m_xStringResourcePersistence->storeToURL
( URL, OUString(aResourceFileNameBase), aComment, xHandler );
( URL, aResourceFileNameBase, aComment, xHandler );
}
}
......@@ -551,7 +551,7 @@ void SfxDialogLibrary::storeResourcesToStorage( const css::uno::Reference< css::
if( m_xStringResourcePersistence.is() )
{
m_xStringResourcePersistence->storeToStorage
( xStorage, OUString(aResourceFileNameBase), aComment );
( xStorage, aResourceFileNameBase, aComment );
}
}
......
......@@ -3450,7 +3450,7 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetNextUserScript
try
{
Reference< XExtensionManager > xManager = ExtensionManager::get( m_xContext );
m_aUserPackagesSeq = xManager->getDeployedExtensions(OUString("user"),
m_aUserPackagesSeq = xManager->getDeployedExtensions("user",
Reference< task::XAbortChannel >(),
Reference< ucb::XCommandEnvironment >() );
}
......@@ -3505,7 +3505,7 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetNextSharedScri
try
{
Reference< XExtensionManager > xSharedManager = ExtensionManager::get( m_xContext );
m_aSharedPackagesSeq = xSharedManager->getDeployedExtensions(OUString("shared"),
m_aSharedPackagesSeq = xSharedManager->getDeployedExtensions("shared",
Reference< task::XAbortChannel >(),
Reference< ucb::XCommandEnvironment >() );
}
......@@ -3559,7 +3559,7 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetNextBundledScr
try
{
Reference< XExtensionManager > xManager = ExtensionManager::get( m_xContext );
m_aBundledPackagesSeq = xManager->getDeployedExtensions(OUString("bundled"),
m_aBundledPackagesSeq = xManager->getDeployedExtensions("bundled",
Reference< task::XAbortChannel >(),
Reference< ucb::XCommandEnvironment >() );
}
......
......@@ -590,7 +590,7 @@ void Chart2ExportTest::testEmbeddingsGrabBag()
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
bool bEmbeddings = false;
const char* testEmbeddedFileNames[3] = {"word/embeddings/Microsoft_Excel_Worksheet3.xlsx",
......@@ -1115,7 +1115,7 @@ void Chart2ExportTest::testEmbeddingsOleObjectGrabBag()
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xTextDocumentPropertySet(xTextDocument, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag(0);
xTextDocumentPropertySet->getPropertyValue(OUString("InteropGrabBag")) >>= aGrabBag;
xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty
bool bEmbeddings = false;
const char* testEmbeddedFileNames[1] = {"word/embeddings/oleObject1.bin"};
......
......@@ -71,7 +71,7 @@ uno::Reference< chart2::data::XDataProvider > ChartModelHelper::createInternalDa
{
::com::sun::star::chart::ChartDataRowSource aDataRowSource(::com::sun::star::chart::ChartDataRowSource_COLUMNS);
xProp->getPropertyValue( OUString("DataRowSource") ) >>= aDataRowSource;
xProp->getPropertyValue( "DataRowSource" ) >>= aDataRowSource;
bDefaultDataInColumns = (::com::sun::star::chart::ChartDataRowSource_COLUMNS == aDataRowSource);
}
......
......@@ -195,8 +195,7 @@ OUString getSourceRangeStrFromLabeledSequences( const uno::Sequence< uno::Refere
uno::Reference< chart2::data::XDataSequence > xSequence( aSequences[nI]->getValues());
uno::Reference< beans::XPropertySet > xSeqProp( xSequence, uno::UNO_QUERY_THROW );
OUString aRole;
if( ( xSeqProp->getPropertyValue(
OUString( "Role" )) >>= aRole ) &&
if( ( xSeqProp->getPropertyValue( "Role" ) >>= aRole ) &&
aRole.match( aRolePrefix ) && aRole.indexOf(aDirection) >= 0 )
{
return xSequence->getSourceRangeRepresentation();
......
......@@ -80,12 +80,12 @@ const uno::Reference < embed::XStorage >& EmbedImpl::GetReplacements()
try
{
mxImageStorage = mxStorage->openStorageElement(
OUString("ObjectReplacements"), embed::ElementModes::READWRITE );
"ObjectReplacements", embed::ElementModes::READWRITE );
}
catch (const uno::Exception&)
{
mxImageStorage = mxStorage->openStorageElement(
OUString("ObjectReplacements"), embed::ElementModes::READ );
"ObjectReplacements", embed::ElementModes::READ );
}
}
......@@ -1282,7 +1282,7 @@ namespace {
try
{
uno::Reference< embed::XStorage > xPictures = xDocStor->openStorageElement(
OUString( "Pictures" ),
"Pictures",
embed::ElementModes::READWRITE );
uno::Reference< io::XStream > xObjReplStr = xPictures->openStreamElement(
aStreamName,
......
......@@ -532,8 +532,7 @@ OUString MimeConfigurationHelper::GetFactoryNameByDocumentName( const OUString&
OUString aEntryDocName;
if ( ( xObjConfig->getByName( aClassIDs[nInd] ) >>= xObjectProps ) && xObjectProps.is()
&& ( xObjectProps->getByName(
OUString( "ObjectDocumentServiceName" ) ) >>= aEntryDocName )
&& ( xObjectProps->getByName( "ObjectDocumentServiceName" ) >>= aEntryDocName )
&& aEntryDocName == aDocName )
{
xObjectProps->getByName("ObjectFactory") >>= aResult;
......
......@@ -155,8 +155,7 @@ namespace comphelper
Reference< XResourceBundleLoader > xLoader;
try
{
Any aValue( m_xContext->getValueByName(
OUString( "/singletons/com.sun.star.resource.OfficeResourceLoader" ) ) );
Any aValue( m_xContext->getValueByName( "/singletons/com.sun.star.resource.OfficeResourceLoader" ) );
OSL_VERIFY( aValue >>= xLoader );
}
catch( const Exception& )
......
......@@ -281,9 +281,7 @@ void OfficeInstallationDirectories::initDirs()
uno::Reference< util::XMacroExpander > xExpander = util::theMacroExpander::get(m_xCtx);
*m_pOfficeBrandDir =
xExpander->expandMacros(
OUString( "$BRAND_BASE_DIR" ) );
*m_pOfficeBrandDir = xExpander->expandMacros( "$BRAND_BASE_DIR" );
OSL_ENSURE( !m_pOfficeBrandDir->isEmpty(),
"Unable to obtain office brand installation directory!" );
......@@ -292,7 +290,7 @@ void OfficeInstallationDirectories::initDirs()
*m_pUserDir =
xExpander->expandMacros(
OUString("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap" ) ":UserInstallation}" ) );
"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap" ) ":UserInstallation}" );
OSL_ENSURE( !m_pUserDir->isEmpty(),
"Unable to obtain office user data directory!" );
......
......@@ -11,6 +11,7 @@
#include <limits>
#include <stack>
#include <string>
#include <iostream>
#include "compat.hxx"
#include "plugin.hxx"
......@@ -104,6 +105,8 @@ private:
void handleOUStringCtor(
CallExpr const * expr, unsigned arg, std::string const & qname);
void handleOUStringCtor2(
CallExpr const * expr, unsigned arg, std::string const & qname);
std::stack<Expr const *> calls_;
};
......@@ -546,6 +549,12 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
TreatEmpty::Error);
return true;
}
// For places where we are calling a method with a 'const OUString&' param
for (unsigned i=0; i < fdecl->getNumParams(); ++i)
{
if (fdecl->getParamDecl(i)->getType().getAsString() == "const ::rtl::OUString &")
handleOUStringCtor2(expr, i, qname);
}
return true;
}
......@@ -1283,6 +1292,40 @@ void StringConstant::handleOUStringCtor(
<< qname << expr->getSourceRange();
}
// For places where we are calling a method with an 'const OUString&' param
//
void StringConstant::handleOUStringCtor2(
CallExpr const * expr, unsigned arg, std::string const & qname)
{
auto e0 = expr->getArg(arg)->IgnoreParenImpCasts();
auto e1 = dyn_cast<CXXFunctionalCastExpr>(e0);
if (e1 == nullptr) {
return;
}
e0 = e1->getSubExpr()->IgnoreParenImpCasts();
auto e2 = dyn_cast<CXXBindTemporaryExpr>(e0);
if (e2 == nullptr) {
return;
}
auto e3 = dyn_cast<CXXConstructExpr>(
e2->getSubExpr()->IgnoreParenImpCasts());
if (e3 == nullptr) {
return;
}
if (e3->getNumArgs() == 1)
{
std::string s = e3->getArg(0)->getType().getAsString();
if (s == "sal_Unicode" || s == "char")
return;
}
report(
DiagnosticsEngine::Warning,
("in call of %0, replace OUString constructed from a string literal"
" directly with the string literal"),
e3->getExprLoc())
<< qname << expr->getSourceRange();
}
loplugin::Plugin::Registration< StringConstant > X("stringconstant", true);
}
......
......@@ -156,8 +156,7 @@ void RecursiveTest::test()
OUString("/org.openoffice.Office.UI.GenericCommands/UserInterface/Commands/"
".uno:WebHtml")),
css::uno::UNO_QUERY_THROW);
properties_->addPropertyChangeListener(
OUString("Label"), this);
properties_->addPropertyChangeListener("Label", this);
step();
CPPUNIT_ASSERT(count_ == 0);
css::uno::Reference< css::lang::XComponent >(
......@@ -276,12 +275,9 @@ void Test::testSetSetMemberName()
"Commands")),
css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::container::XNamed > member;
access->getByName(
OUString(".uno:FontworkGalleryFloater")) >>=
member;
access->getByName(".uno:FontworkGalleryFloater") >>= member;
CPPUNIT_ASSERT(member.is());
member->setName(
OUString(".uno:FontworkShapeType"));
member->setName(".uno:FontworkShapeType");
css::uno::Reference< css::util::XChangesBatch >(
access, css::uno::UNO_QUERY_THROW)->commitChanges();
css::uno::Reference< css::lang::XComponent >(
......@@ -347,12 +343,9 @@ void Test::testReadCommands()
css::uno::Reference< css::container::XNameAccess > child;
if (access->getByName(names[j]) >>= child) {
CPPUNIT_ASSERT(child.is());
child->getByName(
OUString("Label"));
child->getByName(
OUString("ContextLabel"));
child->getByName(
OUString("Properties"));
child->getByName("Label");
child->getByName("ContextLabel");
child->getByName("Properties");
}
}
}
......
......@@ -755,7 +755,7 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
OUString aLocation;
Reference<XRegistryKey > xActivatorKey = xImplementationKey->openKey(
OUString("/UNO/ACTIVATOR") );
"/UNO/ACTIVATOR" );
if( xActivatorKey.is() && xActivatorKey->getValueType() == RegistryValueType_ASCII )
{
aActivatorUrl = xActivatorKey->getAsciiValue();
......@@ -765,7 +765,7 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
aActivatorName = tmpActivator.getToken(0, ':', nIndex );
Reference<XRegistryKey > xLocationKey = xImplementationKey->openKey(
OUString("/UNO/LOCATION") );
"/UNO/LOCATION" );
if( xLocationKey.is() && xLocationKey->getValueType() == RegistryValueType_ASCII )
aLocation = xLocationKey->getAsciiValue();
}
......@@ -774,7 +774,7 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
// old style"url"
// the location of the program code of the implementation
Reference<XRegistryKey > xLocationKey = xImplementationKey->openKey(
OUString("/UNO/URL") );
"/UNO/URL" );
// is the key of the right type ?
if( xLocationKey.is() && xLocationKey->getValueType() == RegistryValueType_ASCII )
{
......@@ -819,8 +819,7 @@ Sequence< OUString > ORegistryFactoryHelper::getSupportedServiceNames()
// not yet loaded
try
{
Reference<XRegistryKey > xKey = xImplementationKey->openKey(
OUString("UNO/SERVICES") );
Reference<XRegistryKey > xKey = xImplementationKey->openKey( "UNO/SERVICES" );
if (xKey.is())
{
......
......@@ -3478,8 +3478,7 @@ void ToolbarSaveInData::SetSystemStyle(
uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY );
if ( xPropSet.is() )
{
uno::Any a = xPropSet->getPropertyValue(
OUString( "LayoutManager" ) );
uno::Any a = xPropSet->getPropertyValue( "LayoutManager" );
a >>= xLayoutManager;
}
......@@ -3990,7 +3989,7 @@ void ToolbarSaveInData::ApplyToolbar( SvxConfigEntry* pToolbar )
if ( pToolbar->IsUserDefined() )
{
xProps->setPropertyValue(
OUString(ITEM_DESCRIPTOR_UINAME ),
ITEM_DESCRIPTOR_UINAME,
uno::makeAny( OUString( pToolbar->GetName() ) ) );
}
......@@ -4038,7 +4037,7 @@ void ToolbarSaveInData::CreateToolbar( SvxConfigEntry* pToolbar )
xPropertySet( xSettings, uno::UNO_QUERY );
xPropertySet->setPropertyValue(
OUString(ITEM_DESCRIPTOR_UINAME ),
ITEM_DESCRIPTOR_UINAME,
uno::makeAny( pToolbar->GetName() ) );
try
......@@ -5046,8 +5045,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem(
uno::Reference< beans::XPropertySet > props =
m_xGraphProvider->queryGraphicDescriptor( aMediaProps );
uno::Any a = props->getPropertyValue(
OUString("SizePixel") );
uno::Any a = props->getPropertyValue( "SizePixel" );
a >>= aSize;
if (0 == aSize.Width || 0 == aSize.Height)
return false;
......@@ -5223,8 +5221,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL )
uno::Reference< beans::XPropertySet > props =
m_xGraphProvider->queryGraphicDescriptor( aMediaProps );
uno::Any a = props->getPropertyValue(
OUString("SizePixel") );
uno::Any a = props->getPropertyValue("SizePixel");
xGraphic = m_xGraphProvider->queryGraphic( aMediaProps );
if ( xGraphic.is() )
......
......@@ -759,14 +759,12 @@ void SvxConfigGroupListBox::GroupSelected()
continue;
}
Any value = xPropSet->getPropertyValue(
OUString("URI"));
Any value = xPropSet->getPropertyValue("URI");
value >>= uri;
try
{
value = xPropSet->getPropertyValue(
OUString("Description"));
value = xPropSet->getPropertyValue("Description");
value >>= description;
}
catch (Exception &) {
......
......@@ -350,7 +350,7 @@ bool SvxHlinkDlgMarkWnd::RefreshFromDoc(const OUString& aURL)
uno::Sequence< beans::PropertyValue > aArg(1);
aArg.getArray()[0].Name = "Hidden";
aArg.getArray()[0].Value <<= true;
xComp = xLoader->loadComponentFromURL( aURL, OUString( "_blank" ), 0, aArg );
xComp = xLoader->loadComponentFromURL( aURL, "_blank", 0, aArg );
}
catch( const io::IOException& )
{
......
......@@ -117,7 +117,7 @@ IMPL_LINK_NOARG_TYPED(SvInsertOleDlg, BrowseHdl, Button*, void)
{
xFilePicker->appendFilter(
OUString(),
OUString( "*.*" )
"*.*"
);
}
catch( const IllegalArgumentException& )
......
......@@ -600,8 +600,7 @@ void CanvasSettings::EnabledHardwareAcceleration( bool _bEnabled ) const
if( !xNameReplace.is() )
return;
xNameReplace->replaceByName( OUString("ForceSafeServiceImpl"),
makeAny(!_bEnabled) );
xNameReplace->replaceByName( "ForceSafeServiceImpl", makeAny(!_bEnabled) );
Reference< XChangesBatch > xChangesBatch(
mxForceFlagNameAccess, UNO_QUERY );
......
......@@ -660,13 +660,13 @@ bool Desktop::QueryExit()
Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
Reference< XPropertySet > xPropertySet(xDesktop, UNO_QUERY_THROW);
xPropertySet->setPropertyValue( OUString(SUSPEND_QUICKSTARTVETO ), Any(true) );
xPropertySet->setPropertyValue( SUSPEND_QUICKSTARTVETO, Any(true) );
bool bExit = xDesktop->terminate();
if ( !bExit )
{
xPropertySet->setPropertyValue( OUString(SUSPEND_QUICKSTARTVETO ), Any(false) );
xPropertySet->setPropertyValue( SUSPEND_QUICKSTARTVETO, Any(false) );
}
else if (!Application::IsEventTestingModeEnabled())
{
......@@ -1941,8 +1941,8 @@ void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
{
try
{
Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( OUString("private:factory/swriter"),
OUString("_blank"), 0, args ), UNO_QUERY_THROW );
Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( "private:factory/swriter",
"_blank", 0, args ), UNO_QUERY_THROW );
xDoc->close( sal_False );
}
catch ( const css::uno::Exception& )
......@@ -1953,8 +1953,8 @@ void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
{
try
{
Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( OUString("private:factory/scalc"),
OUString("_blank"), 0, args ), UNO_QUERY_THROW );
Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( "private:factory/scalc",
"_blank", 0, args ), UNO_QUERY_THROW );
xDoc->close( sal_False );
}
catch ( const css::uno::Exception& )
......@@ -1965,8 +1965,8 @@ void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
{
try
{
Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( OUString("private:factory/sdraw"),
OUString("_blank"), 0, args ), UNO_QUERY_THROW );
Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( "private:factory/sdraw",
"_blank", 0, args ), UNO_QUERY_THROW );
xDoc->close( sal_False );
}
catch ( const css::uno::Exception& )
......@@ -1977,8 +1977,8 @@ void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
{
try
{
Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( OUString("private:factory/simpress"),
OUString("_blank"), 0, args ), UNO_QUERY_THROW );
Reference < css::util::XCloseable > xDoc( xDesktop->loadComponentFromURL( "private:factory/simpress",
"_blank", 0, args ), UNO_QUERY_THROW );
xDoc->close( sal_False );
}
catch ( const css::uno::Exception& )
......@@ -2099,9 +2099,7 @@ void Desktop::PreloadConfigurationData()
css::frame::thePopupMenuControllerFactory::get( xContext );
try
{
(void)xPopupMenuControllerFactory->hasController(
OUString( ".uno:CharFontName" ),
OUString() );
(void)xPopupMenuControllerFactory->hasController( ".uno:CharFontName", OUString() );
}
catch ( const css::uno::Exception& )
{
......@@ -2207,7 +2205,7 @@ void Desktop::OpenClients()
OUString aDefault( "0" );
OUString aPreloadData;
aPerfTuneIniFile.getFrom( OUString( "QuickstartPreloadConfiguration" ), aPreloadData, aDefault );
aPerfTuneIniFile.getFrom( "QuickstartPreloadConfiguration", aPreloadData, aDefault );
if ( aPreloadData == "1" )
{
if ( rArgs.IsWriter() ||
......@@ -2526,7 +2524,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
{
// no visible task that could be activated found
Reference< css::awt::XWindow > xContainerWindow;
Reference< XFrame > xBackingFrame = xDesktop->findFrame(OUString( "_blank" ), 0);
Reference< XFrame > xBackingFrame = xDesktop->findFrame( "_blank", 0);
if (xBackingFrame.is())
xContainerWindow = xBackingFrame->getContainerWindow();
if (xContainerWindow.is())
......@@ -2696,7 +2694,7 @@ void Desktop::OpenSplashScreen()
UNO_QUERY);
if(m_rSplashScreen.is())
m_rSplashScreen->start(OUString("SplashScreen"), 100);
m_rSplashScreen->start("SplashScreen", 100);
}
}
......@@ -2732,7 +2730,7 @@ void Desktop::DoFirstRunInitializations()
try
{
Reference< XJobExecutor > xExecutor = theJobExecutor::get( ::comphelper::getProcessComponentContext() );
xExecutor->trigger( OUString("onFirstRunInitialization") );
xExecutor->trigger( "onFirstRunInitialization" );
}
catch(const css::uno::Exception&)
{
......@@ -2752,7 +2750,7 @@ void Desktop::ShowBackingComponent(Desktop * progress)
{
progress->SetSplashScreenProgress(60);
}
Reference< XFrame > xBackingFrame = xDesktop->findFrame(OUString( "_blank" ), 0);
Reference< XFrame > xBackingFrame = xDesktop->findFrame( "_blank", 0);
Reference< css::awt::XWindow > xContainerWindow;
if (xBackingFrame.is())
......
......@@ -512,7 +512,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
OUString aDefault( "0" );