sc/inc/helpids.h                    |    7 +++++++
 sc/source/core/tool/addinhelpid.cxx |   14 ++++++++++++++
 2 files changed, 21 insertions(+)

New commits:
commit 4ab7735fb4c88e54b42a94678b346ab501307db7
Author:     Olivier Hallot <olivier.hal...@libreoffice.org>
AuthorDate: Mon Jan 3 11:52:29 2022 -0300
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Mon Jan 3 21:28:44 2022 +0100

    tdf#129115 Calc functions OPT_* have no Help id's
    
    Change-Id: If275d804fc81b535c422a29ba594eb88ce5e70c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127896
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 01bafecc6457..927569e767c7 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -175,6 +175,13 @@ inline constexpr OStringLiteral HID_SELECTTABLES = 
"SC_HID_SELECTTABLES";
 #define HID_DAI_FUNC_DIFFYEARS                                  
"SC_HID_DAI_FUNC_DIFFYEARS"
 #define HID_DAI_FUNC_ROT13                                      
"SC_HID_DAI_FUNC_ROT13"
 
+// PricingFunc Addin Functions  -----------------------------------------
+
+#define HID_PAI_FUNC_OPT_BARRIER                                
"SC_HID_PAI_FUNC_OPT_BARRIER"
+#define HID_PAI_FUNC_OPT_TOUCH                                  
"SC_HID_PAI_FUNC_OPT_TOUCH"
+#define HID_PAI_FUNC_OPT_PROB_HIT                               
"SC_HID_PAI_FUNC_OPT_PROB_HIT"
+#define HID_PAI_FUNC_OPT_PROB_INMONEY                           
"SC_HID_PAI_FUNC_OPT_PROB_INMONEY"
+
 // End help IDs ------------------------------------------------------------
 
 #define HID_FUNC_DBANZAHL                                       
"SC_HID_FUNC_DBANZAHL"
diff --git a/sc/source/core/tool/addinhelpid.cxx 
b/sc/source/core/tool/addinhelpid.cxx
index 595d52fe060f..92c5fb4f7950 100644
--- a/sc/source/core/tool/addinhelpid.cxx
+++ b/sc/source/core/tool/addinhelpid.cxx
@@ -145,6 +145,15 @@ const ScUnoAddInHelpId pDateFuncHelpIds[] =
     { "getWeeksInYear"              , HID_DAI_FUNC_WEEKSINYEAR      }
 };
 
+// Help IDs for Pricing AddIn. MUST BE SORTED for binary search.
+const ScUnoAddInHelpId pPricingFuncHelpIds[] =
+{
+    { "getOptBarrier"               , HID_PAI_FUNC_OPT_BARRIER      },
+    { "getOptProbHit"               , HID_PAI_FUNC_OPT_PROB_HIT     },
+    { "getOptProbInMoney"           , HID_PAI_FUNC_OPT_PROB_INMONEY },
+    { "getOptTouch"                 , HID_PAI_FUNC_OPT_TOUCH        }
+};
+
 ScUnoAddInHelpIdGenerator::ScUnoAddInHelpIdGenerator( std::u16string_view 
rServiceName )
 {
     SetServiceName( rServiceName );
@@ -165,6 +174,11 @@ void ScUnoAddInHelpIdGenerator::SetServiceName( 
std::u16string_view rServiceName
         pCurrHelpIds = pDateFuncHelpIds;
         nSize = sizeof( pDateFuncHelpIds );
     }
+    else if ( rServiceName == u"com.sun.star.sheet.addin.PricingFunctions")
+    {
+        pCurrHelpIds = pPricingFuncHelpIds;
+        nSize = sizeof( pPricingFuncHelpIds);
+    }
 
     nArrayCount = nSize / sizeof( ScUnoAddInHelpId );
 }

Reply via email to