summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-04 12:28:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-04 13:15:29 +0000
commit2dfc4c0845c72b3a1cf19546a1606907f36eea42 (patch)
tree8df986c777d2b6847782a4395af50fbca5eea96f /desktop
parent859204a52351c4d5d146e8b22d14bd4a44f294e9 (diff)
loplugin:oncevar in desktop..filter
Change-Id: I21c47cacbcd68f06eea7ccbbfa6d04fc65e2b7ee Reviewed-on: https://gerrit.libreoffice.org/30564 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx3
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx4
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx10
3 files changed, 4 insertions, 13 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 44598da773ac..7f278e14e546 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1142,14 +1142,13 @@ void impl_checkRecoveryState(bool& bCrashed ,
bool impl_callRecoveryUI(bool bEmergencySave ,
bool bExistsRecoveryData)
{
- static const char SERVICENAME_RECOVERYUI[] = "com.sun.star.comp.svx.RecoveryUI";
static const char COMMAND_EMERGENCYSAVE[] = "vnd.sun.star.autorecovery:/doEmergencySave";
static const char COMMAND_RECOVERY[] = "vnd.sun.star.autorecovery:/doAutoRecovery";
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
Reference< css::frame::XSynchronousDispatch > xRecoveryUI(
- xContext->getServiceManager()->createInstanceWithContext(SERVICENAME_RECOVERYUI, xContext),
+ xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.svx.RecoveryUI", xContext),
css::uno::UNO_QUERY_THROW);
Reference< css::util::XURLTransformer > xURLParser =
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index a7ca243e3d89..4b81c5e51197 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -268,8 +268,6 @@ void PackageRegistryBackend::deleteUnusedFolders(
// get all temp directories:
::std::vector<OUString> tempEntries;
- const char tmp[] = ".tmp";
-
while (xResultSet->next())
{
OUString title(
@@ -277,7 +275,7 @@ void PackageRegistryBackend::deleteUnusedFolders(
xResultSet, UNO_QUERY_THROW )->getString(
1 /* Title */ ) );
- if (title.endsWith(tmp))
+ if (title.endsWith(".tmp"))
tempEntries.push_back(
makeURLAppendSysPathSegment(sDataFolder, title));
}
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index f74b719a4ad4..bf6816d0295b 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -29,12 +29,6 @@ using namespace ::com::sun::star::uno;
namespace migration
{
-
-
- static const char sSourceSubDir[] = "/user/wordbook";
- static const char sTargetSubDir[] = "/user/wordbook";
-
-
// component operations
@@ -156,7 +150,7 @@ bool IsUserWordbook( const OUString& rFile )
::utl::Bootstrap::PathStatus aStatus = ::utl::Bootstrap::locateUserInstallation( sTargetDir );
if ( aStatus == ::utl::Bootstrap::PATH_EXISTS )
{
- sTargetDir += sTargetSubDir;
+ sTargetDir += "/user/wordbook";
TStringVectorPtr aFileList = getFiles( m_sSourceDir );
TStringVector::const_iterator aI = aFileList->begin();
while ( aI != aFileList->end() )
@@ -229,7 +223,7 @@ bool IsUserWordbook( const OUString& rFile )
{
OSL_FAIL( "WordbookMigration::initialize: argument UserData has wrong type!" );
}
- m_sSourceDir += sSourceSubDir;
+ m_sSourceDir += "/user/wordbook";
break;
}
}