[Libreoffice-commits] core.git: basctl/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 3 07:18:46 UTC 2020


 basctl/source/basicide/moduldl2.cxx |   15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 1c5d8e0e772972f07e135a1c242eda70052bce27
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jun 2 18:44:07 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jun 3 09:18:09 2020 +0200

    Upcoming loplugin:elidestringvar: basctl
    
    Change-Id: Ia0411cad22c23f16d5d85b7cb65822d19f923b4f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95373
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index c4402089979a..3c9d64a01854 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -554,7 +554,7 @@ void LibPage::InsertLib()
 
     // filter
     OUString aTitle(IDEResId(RID_STR_BASIC));
-    OUString aFilter = "*.sbl;*.xlc;*.xlb"        // library files
+    xFP->appendFilter( aTitle, "*.sbl;*.xlc;*.xlb"        // library files
               ";*.sdw;*.sxw;*.odt"       // text
               ";*.vor;*.stw;*.ott"       // text template
               ";*.sgl;*.sxg;*.odm"       // master document
@@ -565,8 +565,7 @@ void LibPage::InsertLib()
               ";*.std;*.otg"             // drawing template
               ";*.sdd;*.sxi;*.odp"       // presentation
               ";*.sti;*.otp"             // presentation template
-              ";*.sxm;*.odf";            // formula
-    xFP->appendFilter( aTitle, aFilter );
+              ";*.sxm;*.odf" );          // formula
 
     // set display directory and filter
     OUString aPath(GetExtraData()->GetAddLibPath());
@@ -1015,8 +1014,7 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
 
     // filter
     OUString aTitle(IDEResId(RID_STR_PACKAGE_BUNDLE));
-    OUString aFilter = "*.oxt" ;       // library files
-    xFP->appendFilter( aTitle, aFilter );
+    xFP->appendFilter( aTitle, "*.oxt" ); // library files
 
     // set display directory and filter
     OUString aPath = GetExtraData()->GetAddLibPath();
@@ -1080,15 +1078,12 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
     xSFA->createFolder( aMetaInfFolder );
 
     std::vector< Sequence<beans::PropertyValue> > manifest;
-    const OUString strMediaType = "MediaType" ;
-    const OUString strFullPath = "FullPath" ;
-    const OUString strBasicMediaType = "application/vnd.sun.star.basic-library" ;
 
     OUString fullPath = aLibName
                       + "/" ;
     auto attribs(::comphelper::InitPropertySequence({
-        { strFullPath, Any(fullPath) },
-        { strMediaType, Any(strBasicMediaType) }
+        { "FullPath", Any(fullPath) },
+        { "MediaType", Any(OUString("application/vnd.sun.star.basic-library")) }
     }));
     manifest.push_back( attribs );
 


More information about the Libreoffice-commits mailing list