[Libreoffice-commits] core.git: sc/inc sc/source

Jens Carl j.carl43 at gmx.de
Tue Dec 5 05:43:15 UTC 2017


 sc/inc/servuno.hxx              |    2 +-
 sc/source/ui/unoobj/servuno.cxx |    5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 1c893292849bf699f3c9411461248f67fa35d027
Author: Jens Carl <j.carl43 at gmx.de>
Date:   Fri Dec 1 05:57:04 2017 +0000

    Add ServiceProvider "com.sun.star.sheet.RecentFunctions"
    
    Add the type and functionality to make instance of ServiceProvider
    "com.sun.star.sheet.RecentFunctions". The ServiceProvider is needed
    to test XRecentFunctions UNOAPI and a fix for #i84761.
    
    Change-Id: Icbaf0c57f8bbada5adb11381ea50b34b8b263c2f
    Reviewed-on: https://gerrit.libreoffice.org/45636
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Jens Carl <j.carl43 at gmx.de>

diff --git a/sc/inc/servuno.hxx b/sc/inc/servuno.hxx
index e81463273c49..ec15219a8ca0 100644
--- a/sc/inc/servuno.hxx
+++ b/sc/inc/servuno.hxx
@@ -31,7 +31,7 @@ public:
     enum class Type
     {
         SHEET , URLFIELD , PAGEFIELD , PAGESFIELD , DATEFIELD , TIMEFIELD , TITLEFIELD , FILEFIELD ,
-        SHEETFIELD , CELLSTYLE , PAGESTYLE , AUTOFORMAT , CELLRANGES ,
+        SHEETFIELD , CELLSTYLE , PAGESTYLE , AUTOFORMAT , CELLRANGES , RECENTFUNCTIONS ,
         //  drawing layer tables
         GRADTAB , HATCHTAB , BITMAPTAB , TRGRADTAB , MARKERTAB , DASHTAB , NUMRULES ,
 
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 0d18e1894f86..69cd7273576a 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -30,6 +30,7 @@
 
 #include <servuno.hxx>
 #include <unonames.hxx>
+#include <appluno.hxx>
 #include <cellsuno.hxx>
 #include <fielduno.hxx>
 #include <styleuno.hxx>
@@ -263,6 +264,7 @@ const ProvNamesId_Type aProvNamesId[] =
     { "com.sun.star.style.PageStyle",                   Type::PAGESTYLE },
     { "com.sun.star.sheet.TableAutoFormat",             Type::AUTOFORMAT },
     { "com.sun.star.sheet.SheetCellRanges",             Type::CELLRANGES },
+    { "com.sun.star.sheet.RecentFunctions",             Type::RECENTFUNCTIONS },
     { "com.sun.star.drawing.GradientTable",             Type::GRADTAB },
     { "com.sun.star.drawing.HatchTable",                Type::HATCHTAB },
     { "com.sun.star.drawing.BitmapTable",               Type::BITMAPTAB },
@@ -420,6 +422,9 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
         case Type::AUTOFORMAT:
             xRet.set(static_cast<container::XIndexAccess*>(new ScAutoFormatObj( SC_AFMTOBJ_INVALID )));
             break;
+        case Type::RECENTFUNCTIONS:
+            xRet.set(static_cast<sheet::XRecentFunctions*>(new ScRecentFunctionsObj()));
+            break;
         case Type::CELLRANGES:
             //  isn't inserted, rather filled
             //  -> DocShell must be set, but empty ranges


More information about the Libreoffice-commits mailing list