summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-30 12:16:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-31 08:25:07 +0200
commitc9253818ec8252169c20450b41878be459568d95 (patch)
tree1f271151725042f33c3c8aa3988343bcd7f89e12 /basic
parent242a796a71e29a1d8cdc4dd71d2465b898db32ab (diff)
loplugin:oncevar
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/uno/namecont.cxx21
1 files changed, 7 insertions, 14 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 5c8f0c29dda2..64de45125e2b 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1098,11 +1098,6 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
mxSFI->move( aFolderUserBasic, aPrevFolder );
mxSFI->move( aFolderTmp, aFolderUserBasic );
- OUString aUserSearchStr("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE");
- OUString aSharedSearchStr("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE");
- OUString const aBundledSearchStr("vnd.sun.star.expand:$BUNDLED_EXTENSIONS");
- OUString const aInstSearchStr("$(INST)");
-
Sequence< OUString > aNames = pPrevCont->getElementNames();
const OUString* pNames = aNames.getConstArray();
sal_Int32 nNameCount = aNames.getLength();
@@ -1129,10 +1124,10 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
{
OUString aStorageURL = pImplLib->maUnexpandedStorageURL;
bool bCreateLink = true;
- if( aStorageURL.indexOf( aUserSearchStr ) != -1 ||
- aStorageURL.indexOf( aSharedSearchStr ) != -1 ||
- aStorageURL.indexOf( aBundledSearchStr ) != -1 ||
- aStorageURL.indexOf( aInstSearchStr ) != -1 )
+ if( aStorageURL.indexOf( "vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE" ) != -1 ||
+ aStorageURL.indexOf( "vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE" ) != -1 ||
+ aStorageURL.indexOf( "vnd.sun.star.expand:$BUNDLED_EXTENSIONS" ) != -1 ||
+ aStorageURL.indexOf( "$(INST)" ) != -1 )
{
bCreateLink = false;
}
@@ -2207,14 +2202,12 @@ Reference< XNameAccess > SAL_CALL SfxLibraryContainer::createLibraryLink
maNameContainer->insertByName( Name, aElement );
maModifiable.setModified( true );
- OUString aUserSearchStr("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE");
- OUString aSharedSearchStr("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE");
- OUString const aBundledSearchStr("vnd.sun.star.expand:$BUNDLED_EXTENSIONS");
- if( StorageURL.indexOf( aUserSearchStr ) != -1 )
+ if( StorageURL.indexOf( "vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE" ) != -1 )
{
pNewLib->mbExtension = true;
}
- else if( StorageURL.indexOf( aSharedSearchStr ) != -1 || StorageURL.indexOf( aBundledSearchStr ) != -1 )
+ else if( StorageURL.indexOf( "vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE" ) != -1
+ || StorageURL.indexOf( "vnd.sun.star.expand:$BUNDLED_EXTENSIONS" ) != -1 )
{
pNewLib->mbExtension = true;
pNewLib->mbReadOnly = true;