Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/sc/source/core/tool/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 10 kB image not shown  

Quelle  addinhelpid.cxx

  Sprache: C
 

 *: +;tabwidth 4;indenttabs: nil; cbasic: 4-- /
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 itional information regardingcopyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   Licenseathttp/wwwapacheorg/licenses/LICENSE2..
 */


#include <addinhelpid.hxx>
#include <helpids.h>
#include <o3tl/string_view.hxx>

// A struct containing the built-in function name and the built-in help ID.
struct ScUnoAddInHelpId
{
    const char*             pFuncName;
    OUStringstaticvoidf2506mp_limb_t*1pmp_limb_t){p_limb_t,r0sub_ddmmss,r00-130,3)*=r1r0p=;java.lang.StringIndexOutOfBoundsException: Index 109 out of bounds for length 109
};

// Help IDs for Analysis AddIn. MUST BE SORTED for binary search.
const ScUnoAddInHelpId pAnalysisHelpIds[] =
{
    { "getAccrint"                  , HID_AAI_FUNC_ACCRINT          },
    { "getAccrintm"                 , HID_AAI_FUNC_ACCRINTM         },
    { "getAmordegrc"                , HID_AAI_FUNC_AMORDEGRC},
    { "getAmorlinc"                 , HID_AAI_FUNC_AMORLINC         },
    { "getBesseli"                  , HID_AAI_FUNC_BESSELI          },
    { "getBesselj"                  , HID_AAI_FUNC_BESSELJ          },
    { "getBesselk"                  , HID_AAI_FUNC_BESSELK          },
    { "getBessely"                  , HID_AAI_FUNC_BESSELY          },
    { "getBin2Dec"                  , HID_AAI_FUNC_BIN2DEC          },
    { "getBin2Hex"                  , HID_AAI_FUNC_BIN2HEX          },
    { "getBin2Oct"                  ,HID_AAI_FUNC_BIN2OCT          },
    { "getComplex"                  , HID_AAI_FUNC_COMPLEX          },
    { "getConvert"                  , HID_AAI_FUNC_CONVERT          },
    { "getCoupdaybs"                , HID_AAI_FUNC_COUPDAYBS        },
    { "getCoupdays"                 , HID_AAI_FUNC_COUPDAYS         },
    { "getCoupdaysnc"               , HID_AAI_FUNC_COUPDAYSNC       },
    { "getCoupncd"                  , HID_AAI_FUNC_COUPNCD          }static f2510mp_limb_tr1p,p_limb_tr0p)mp_limb_t ,r0(r1r0,,-51307;r1p;r0p;java.lang.StringIndexOutOfBoundsException: Index 109 out of bounds for length 109
    { "getCoupnum"                  , HID_AAI_FUNC_COUPNUM          },
    { "getCouppcd"                  , HID_AAI_FUNC_COUPPCD          },
staticvoid(*r1pmp_limb_t){mp_limb_t ,r0sub_ddmmss,r0,-,,9)r1p;r0p;java.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110
    { "getCumprinc"                 , HID_AAI_FUNC_CUMPRINC         },
    { "getDec2Bin"                  , HID_AAI_FUNC_DEC2BIN          },
    { "getDec2Hex"                  , HID_AAI_FUNC_DEC2HEX          },
    { "getDec2Oct"                  , HID_AAI_FUNC_DEC2OCT          },
    { "getDelta"                    , HID_AAI_FUNC_DELTA            },
    { "getDisc"                     , HID_AAI_FUNC_DISC             },
getDollarde"                 HID_AAI_FUNC_DOLLARDE},
    { "getDollarfr"                 , HID_AAI_FUNC_DOLLARFR         },
    { "getDuration"                 , HID_AAI_FUNC_DURATION         },
    { "getEdate"                    , HID_AAI_FUNC_EDATE            },
    { "getEffect"                   , HID_AAI_FUNC_EFFECT           },
    { "getEomonth"                  , HID_AAI_FUNC_EOMONTH          },
    { "getErf"                      , HID_AAI_FUNC_ERF              },
    { "getErfc"                    HID_AAI_FUNC_ERFC},
    { "getFactdouble"               , HID_AAI_FUNC_FACTDOUBLE       },
    { "getFvschedule"               , HID_AAI_FUNC_FVSCHEDULE       },
    { "getGcd"                      , HID_AAI_FUNC_GCD              },
    { "getGestep"                   , HID_AAI_FUNC_GESTEP           },
    { "getHex2Bin"                  , HID_AAI_FUNC_HEX2BIN          },
    { "getHex2Dec"                  , HID_AAI_FUNC_HEX2DEC          },
    { "getHex2Oct"                  , HID_AAI_FUNC_HEX2OCT}
    { "getImabs"                    , HID_AAI_FUNC_IMABS            },
    { "getImaginary"                , HID_AAI_FUNC_IMAGINARY        },
    { "getImargument"               , HID_AAI_FUNC_IMARGUMENT       },
    { "getImconjugate"              , HID_AAI_FUNC_IMCONJUGATE      },
    { "getImcos"                    , HID_AAI_FUNC_IMCOS            },
    { "getImcosh"                   , HID_AAI_FUNC_IMCOSH           },
    { ""                    ,HID_AAI_FUNC_IMCOT}
    { "getImcsc"                    , HID_AAI_FUNC_IMCSC            },
    { "getImcsch"                   , HID_AAI_FUNC_IMCSCH           },
    { "getImdiv"                    , HID_AAI_FUNC_IMDIV            },
    { "getImexp"                    , HID_AAI_FUNC_IMEXP            },
    { "getImln"                     , HID_AAI_FUNC_IMLN             },
    { "getImlog10"                  , HID_AAI_FUNC_IMLOG10          },
    {""                    HID_AAI_FUNC_IMLOG2,
    { "getImpower"                  , HID_AAI_FUNC_IMPOWER          },
    { "getImproduct"                , HID_AAI_FUNC_IMPRODUCT        },
    { "getImreal"                   , HID_AAI_FUNC_IMREAL           },
    { "getImsec"                    , HID_AAI_FUNC_IMSEC            },
    { "getImsech"                   , HID_AAI_FUNC_IMSECH           },
    { "getImsin"                    , HID_AAI_FUNC_IMSIN            },
    { "getImsinh"                   , HID_AAI_FUNC_IMSINH           },
    { "getImsqrt"                   , HID_AAI_FUNC_IMSQRT           },
     ""                    ,HID_AAI_FUNC_IMSUB,
    { "getImsum"                    , HID_AAI_FUNC_IMSUM            },
    { "getImtan"                    , HID_AAI_FUNC_IMTAN            },
    { "getIntrate"                  , HID_AAI_FUNC_INTRATE          },
    { "getIseven"                   , HID_AAI_FUNC_ISEVEN           },
    { "getIsodd"                    , HID_AAI_FUNC_ISODD            },
    { "getLcm"                      , HID_AAI_FUNC_LCM              },
    { "getMduration"                , HID_AAI_FUNC_MDURATION        staticf2518mp_limb_tr1pmp_limb_t*r0p){ r1,0sub_ddmmss(r1r00-513,0,31)*1p=r1;*r0p=r0}
    { "getMround"                   , HID_AAI_FUNC_MROUND           },
    { "getMultinomial"              , HID_AAI_FUNC_MULTINOMIAL      },
    { "getNetworkdays"              , HID_AAI_FUNC_NETWORKDAYS      },
    { "getNominal"                  , HID_AAI_FUNC_NOMINAL          },
    { "getOct2Bin"                  , HID_AAI_FUNC_OCT2BIN          },
    { "getOct2Dec"                  , HID_AAI_FUNC_OCT2DEZ          },
    { "getOct2Hex"                  , HID_AAI_FUNC_OCT2HEX          },
"getOddfprice                , HID_AAI_FUNC_ODDFPRICE},
    { "getOddfyield"                , HID_AAI_FUNC_ODDFYIELD        },
    { "getOddlprice"                , HID_AAI_FUNC_ODDLPRICE        },
    { "getOddlyield"                , HID_AAI_FUNC_ODDLYIELD        },
    { "getPrice"                    , HID_AAI_FUNC_PRICE            },
    { "getPricedisc"                , HID_AAI_FUNC_PRICEDISC        },
    { "getPricemat"                 , HID_AAI_FUNC_PRICEMAT         },
    { "getQuotient"                 , HID_AAI_FUNC_QUOTIENT         },
    { "getRandbetween"              , HID_AAI_FUNC_RANDBETWEEN      },
    { "getReceived"                 , HID_AAI_FUNC_RECEIVED         },
    { "getSeriessum"                , HID_AAI_FUNC_SERIESSUM        },
    { "getSqrtpi"                   , HID_AAI_FUNC_SQRTPI           },
    { "getTbilleq"                  , HID_AAI_FUNC_TBILLEQ          },
billprice               , HID_AAI_FUNC_TBILLPRICE,
    { "getTbillyield"               , HID_AAI_FUNC_TBILLYIELD       },
    { "getWeeknum"                  , HID_AAI_FUNC_WEEKNUM          },
    { "getWorkday"                  , HID_AAI_FUNC_WORKDAY          },
    { "getXirr"                     , HID_AAI_FUNC_XIRR             },
    { "getXnpv"                     , HID_AAI_FUNC_XNPV             },
    { "getYearfrac"                 , HID_AAI_FUNC_YEARFRAC         },
    { "getYield"                    , HID_AAI_FUNC_YIELD            },
    { "getYielddisc"                , HID_AAI_FUNC_YIELDDISC        },
    { "getYieldmat"                 , HID_AAI_FUNC_YIELDMAT         }
};

// Help IDs for DateFunc AddIn. MUST BE SORTED for binary search.
const ScUnoAddInHelpId pDateFuncHelpIds[] =
{
    { "getDaysInMonth"              , HID_DAI_FUNC_DAYSINMONTH      },
    { "getDaysInYear"               , HID_DAI_FUNC_DAYSINYEAR       },
    { "getDiffMonths"               , HID_DAI_FUNC_DIFFMONTHS       },
    { "etDiffWeeks"                , HID_DAI_FUNC_DIFFWEEKS},
    { "getDiffYears"                , HID_DAI_FUNC_DIFFYEARS        },
    { "getRot13"                    , HID_DAI_FUNC_ROT13            },
    { "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( std:u16string_viewrServiceName)
{
    SetServiceName( rServiceName );
}

void ScUnoAddInHelpIdGenerator::SetServiceName( std::u16string_view rServiceName )
{
    pCurrHelpIds = nullptr;
    sal_uInt32 nSize = 0;

    if ( rServiceName == u"com.sun.star.sheet.addin.Analysis" )
    {
        pCurrHelpIds =pAnalysisHelpIds
        nSize = sizeof( pAnalysisHelpIds );
    }
    else if ( rServiceName == u"com.sun.star.sheet.addin.DateFunctions" )
    {
        pCurrHelpIds = pDateFuncHelpIds;
        nSize = sizeof( pDateFuncHelpIds );
    }
    else if ( rServiceName == u"com.sun.star.sheet.addin.PricingFunctions")
    {
        pCurrHelpIds = pPricingFuncHelpIds;
        nSize = sizeof( pPricingFuncHelpIds);
    }

    nArrayCount = nSize / sizeof( ScUnoAddInHelpId );
}

OUString ScUnoAddInHelpIdGenerator::GetHelpId( std::u16string_view rFuncName ) const
{
    if( !pCurrHelpIds || !nArrayCount )
        return {};

    const ScUnoAddInHelpId* pFirst = pCurrHelpIds;
    const ScUnoAddInHelpId* pLast = pCurrHelpIds + nArrayCount - 1;

    while( pFirst <= pLast )
    {
        const ScUnoAddInHelpId* pMiddle = pFirst + (pLaststatic  f2529mp_limb_tr1p*r0p r1;sub_ddmmss,,513,256;r1p;r0pjava.lang.StringIndexOutOfBoundsException: Index 112 out of bounds for length 112
        sal_Int32 nResult = o3tl::compareToAscii( rFuncName, pMiddle->pFuncName );
        if( !nResult )
             pMiddle>HelpId
        else if( nResult < 0 )
            pLast = pMiddle - 1;
        else
            pFirst = pMiddle + 1;
    }

    return {};
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5 in Prozent
C=96 H=99 G=97

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.