summaryrefslogtreecommitdiffstats
path: root/desktop/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-22 16:05:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 08:59:30 +0200
commit58ae5fb5ff69a5581cffa583a57ad9381140fa9a (patch)
treee4776c71b6038e983579facd2ef0c1f8f926d54b /desktop/source
parentloplugin:unusedfields in jvmfwk..mysqlc (diff)
downloadcore-58ae5fb5ff69a5581cffa583a57ad9381140fa9a.tar.gz
core-58ae5fb5ff69a5581cffa583a57ad9381140fa9a.zip
loplugin:oncevar in cppcanvas..drawinglayer
Change-Id: I5456aad61fb0dfe6830eae62b91d1a6399d6343f Reviewed-on: https://gerrit.libreoffice.org/39128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/app/app.cxx12
-rw-r--r--desktop/source/app/check_ext_deps.cxx5
-rw-r--r--desktop/source/app/dispatchwatcher.cxx9
-rw-r--r--desktop/source/deployment/dp_persmap.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_commandenvironments.cxx9
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx6
-rw-r--r--desktop/source/migration/migration.cxx5
7 files changed, 18 insertions, 30 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 0e7f37fe0c48..bbf8ccdd0e86 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1537,9 +1537,8 @@ int Desktop::Main()
#ifdef DBG_UTIL
//include buildid in non product builds
- OUString aDefault("development");
aTitle += " [";
- aTitle += utl::Bootstrap::getBuildIdData(aDefault);
+ aTitle += utl::Bootstrap::getBuildIdData("development");
aTitle += "]";
#endif
@@ -1672,7 +1671,6 @@ int Desktop::Main()
if ( !pExecGlobals->bRestartRequested )
{
Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) );
- bool bTerminateRequested = false;
// Preload function depends on an initialized sfx application!
SetSplashScreenProgress(75);
@@ -1682,7 +1680,7 @@ int Desktop::Main()
SetSplashScreenProgress(80);
- if ( !bTerminateRequested && !rCmdLineArgs.IsInvisible() &&
+ if ( !rCmdLineArgs.IsInvisible() &&
!rCmdLineArgs.IsNoQuickstart() )
InitializeQuickstartMode( xContext );
@@ -2072,8 +2070,7 @@ IMPL_LINK_NOARG(Desktop, OpenClients_Impl, void*, void)
if (pExitPostStartup && *pExitPostStartup)
new ExitTimer();
} catch (const css::uno::Exception &e) {
- OUString a( "UNO exception during client open:\n" );
- Application::Abort( a + e.Message );
+ Application::Abort( "UNO exception during client open: " + e.Message );
}
}
@@ -2598,9 +2595,8 @@ void Desktop::OpenSplashScreen()
if ( rCmdLine.HasSplashPipe() )
aSplashService = "com.sun.star.office.PipeSplashScreen";
- bool bVisible = true;
Sequence< Any > aSeq( 2 );
- aSeq[0] <<= bVisible;
+ aSeq[0] <<= true; // bVisible
aSeq[1] <<= aAppName;
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
m_rSplashScreen.set(
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 9c7a300f01eb..6440786317e1 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -258,9 +258,10 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
throw uno::RuntimeException( e.Message, e.Context );
}
- sal_Int32 nMax = 2;
#ifdef DEBUG
- nMax = 3;
+ sal_Int32 const nMax = 3;
+#else
+ sal_Int32 const nMax = 2;
#endif
for ( sal_Int32 i = 0; i < xAllPackages.getLength(); ++i )
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 242e73a625fc..7d7f8fac8401 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -288,7 +288,6 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
std::vector< DispatchHolder > aDispatches;
- OUString aAsTemplateArg( "AsTemplate" );
bool bSetInputFilter = false;
OUString aForcedInputFilter;
@@ -343,13 +342,11 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
aArgs[1].Name = "InteractionHandler";
aArgs[1].Value <<= xInteraction;
- sal_Int16 nMacroExecMode = css::document::MacroExecMode::USE_CONFIG;
aArgs[2].Name = "MacroExecutionMode";
- aArgs[2].Value <<= nMacroExecMode;
+ aArgs[2].Value <<= css::document::MacroExecMode::USE_CONFIG;
- sal_Int16 nUpdateDoc = css::document::UpdateDocMode::ACCORDING_TO_CONFIG;
aArgs[3].Name = "UpdateDocMode";
- aArgs[3].Value <<= nUpdateDoc;
+ aArgs[3].Value <<= css::document::UpdateDocMode::ACCORDING_TO_CONFIG;
}
if ( !aDispatchRequest.aPreselectedFactory.isEmpty() )
@@ -475,7 +472,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
{
sal_Int32 nIndex = aArgs.getLength();
aArgs.realloc( nIndex+1 );
- aArgs[nIndex].Name = aAsTemplateArg;
+ aArgs[nIndex].Name = "AsTemplate";
if ( aDispatchRequest.aRequestType == REQUEST_FORCENEW )
aArgs[nIndex].Value <<= true;
else
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx
index 78f5b42d0824..d52aa38d89b8 100644
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -139,7 +139,7 @@ static OString decodeString( const sal_Char* pEncChars, int nLen)
void PersistentMap::open()
{
// open the existing file
- sal_uInt32 nOpenFlags = osl_File_OpenFlag_Read | osl_File_OpenFlag_Write;
+ sal_uInt32 const nOpenFlags = osl_File_OpenFlag_Read | osl_File_OpenFlag_Write;
const osl::File::RC rcOpen = m_MapFile.open( nOpenFlags);
m_bIsOpen = (rcOpen == osl::File::E_None);
diff --git a/desktop/source/deployment/manager/dp_commandenvironments.cxx b/desktop/source/deployment/manager/dp_commandenvironments.cxx
index cd93931e6de0..732c479d9036 100644
--- a/desktop/source/deployment/manager/dp_commandenvironments.cxx
+++ b/desktop/source/deployment/manager/dp_commandenvironments.cxx
@@ -150,7 +150,6 @@ void TmpRepositoryCommandEnv::handle(
deployment::InstallException instExc;
bool approve = false;
- bool abort = false;
if ((request >>= verExc)
|| (request >>= licExc)
@@ -159,7 +158,7 @@ void TmpRepositoryCommandEnv::handle(
approve = true;
}
- handle_(approve, abort, xRequest);
+ handle_(approve, false/*abort*/, xRequest);
}
@@ -181,7 +180,6 @@ void LicenseCommandEnv::handle(
deployment::LicenseException licExc;
bool approve = false;
- bool abort = false;
if (request >>= licExc)
{
@@ -197,7 +195,7 @@ void LicenseCommandEnv::handle(
}
}
- handle_(approve, abort, xRequest);
+ handle_(approve, false/*abort*/, xRequest);
}
@@ -216,13 +214,12 @@ void NoLicenseCommandEnv::handle(
deployment::LicenseException licExc;
bool approve = false;
- bool abort = false;
if (request >>= licExc)
{
approve = true;
}
- handle_(approve, abort, xRequest);
+ handle_(approve, false/*abort*/, xRequest);
}
SilentCheckPrerequisitesCommandEnv::SilentCheckPrerequisitesCommandEnv()
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 0a1b81dc4ed6..6ccdd07b07c3 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -473,9 +473,7 @@ void BackendImpl::implProcessHelp(
else
aLang = "en";
- OUString aMod("help");
-
- HelpIndexer aIndexer(aLang, aMod, langFolderDestExpanded, langFolderDestExpanded);
+ HelpIndexer aIndexer(aLang, "help", langFolderDestExpanded, langFolderDestExpanded);
aIndexer.indexDocuments();
}
@@ -496,7 +494,7 @@ void BackendImpl::implProcessHelp(
// Remove CR/LF
OUString aErrMsg( aErrorInfo.m_aErrorMsg );
- sal_Unicode nCR = 13, nLF = 10;
+ sal_Unicode const nCR = 13, nLF = 10;
sal_Int32 nSearchCR = aErrMsg.indexOf( nCR );
sal_Int32 nSearchLF = aErrMsg.indexOf( nLF );
sal_Int32 nCopy;
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index d0291d73290b..56fcbd58d481 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -164,7 +164,7 @@ OUString mapModuleShortNameToIdentifier(const OUString& sShortName)
bool MigrationImpl::alreadyMigrated()
{
- OUString MIGRATION_STAMP_NAME("/MIGRATED4");
+ OUString const MIGRATION_STAMP_NAME("/MIGRATED4");
OUString aStr = m_aInfo.userdata + MIGRATION_STAMP_NAME;
File aFile(aStr);
// create migration stamp, and/or check its existence
@@ -391,8 +391,7 @@ migrations_vr MigrationImpl::readMigrationSteps(const OUString& rMigrationName)
// get migration description from org.openoffice.Setup/Migration
// and build vector of migration steps
- OUString aMigrationSteps( "MigrationSteps" );
- uno::Reference< XNameAccess > theNameAccess(xMigrationData->getByName(aMigrationSteps), uno::UNO_QUERY_THROW);
+ uno::Reference< XNameAccess > theNameAccess(xMigrationData->getByName("MigrationSteps"), uno::UNO_QUERY_THROW);
uno::Sequence< OUString > seqMigrations = theNameAccess->getElementNames();
uno::Reference< XNameAccess > tmpAccess;
uno::Sequence< OUString > tmpSeq;