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

Julien Nabet serval2412 at yahoo.fr
Fri Apr 3 02:34:12 PDT 2015


 unotools/source/config/moduleoptions.cxx |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit f9ac035b81ca21695e94e5ced831dca83cd5a1ec
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Apr 1 23:08:31 2015 +0200

    Fix "unknown factory" log, declare and use FACTORYNAME_BASIC
    
    Also use FACTORYNAME_STARTMODULE in SvtModuleOptions::ClassifyFactoryByServiceName
    
    Change-Id: I1ab87f13a9a1d071bf6abaae137fc6470101d711
    Reviewed-on: https://gerrit.libreoffice.org/15113
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 679e01a..24df404 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -80,8 +80,9 @@
 #define FACTORYNAME_CHART                   "com.sun.star.chart2.ChartDocument"
 #define FACTORYNAME_DATABASE                "com.sun.star.sdb.OfficeDatabaseDocument"
 #define FACTORYNAME_STARTMODULE             "com.sun.star.frame.StartModule"
+#define FACTORYNAME_BASIC                   "com.sun.star.script.BasicIDE"
 
-#define FACTORYCOUNT                        10
+#define FACTORYCOUNT                        11
 
 /*-************************************************************************************************************
     @descr  This struct hold information about one factory. We declare a complete array which can hold infos
@@ -788,6 +789,12 @@ bool SvtModuleOptions_Impl::ClassifyFactoryByName( const OUString& sName, SvtMod
         eFactory = SvtModuleOptions::E_STARTMODULE;
         bState   = ( sName == FACTORYNAME_STARTMODULE);
     }
+    // no else!
+    if( !bState )
+    {
+        eFactory = SvtModuleOptions::E_BASIC;
+        bState   = ( sName == FACTORYNAME_BASIC);
+    }
 
     return bState;
 }
@@ -1135,6 +1142,10 @@ SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByServiceName(const
         return E_CHART;
     if (sName == FACTORYNAME_DATABASE)
         return E_DATABASE;
+    if (sName == FACTORYNAME_STARTMODULE)
+        return E_STARTMODULE;
+    if (sName == FACTORYNAME_BASIC)
+        return E_BASIC;
 
     return E_UNKNOWN_FACTORY;
 }


More information about the Libreoffice-commits mailing list