diff options
author | Jens Carl <j.carl43@gmx.de> | 2017-12-01 05:57:04 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2017-12-05 06:42:03 +0100 |
commit | 1c893292849bf699f3c9411461248f67fa35d027 (patch) | |
tree | f966e09d52c2f774fa65c1800a4e61358aee4076 | |
parent | 5daa364922ba75442e2aa834095e9bef16d141d9 (diff) |
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@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r-- | sc/inc/servuno.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/servuno.cxx | 5 |
2 files changed, 6 insertions, 1 deletions
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 |