LibreOffice Module sc (master) 1
Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Static Private Attributes | List of all members
ScGlobal Class Reference

#include <global.hxx>

Collaboration diagram for ScGlobal:
[legend]

Static Public Member Functions

static SC_DLLPUBLIC const LocaleDataWrappergetLocaleData ()
 
static SC_DLLPUBLIC const CharClassgetCharClass ()
 
static CalendarWrapperGetCalendar ()
 
static SC_DLLPUBLIC CollatorWrapperGetCollator ()
 case-insensitive collator More...
 
static CollatorWrapperGetCaseCollator ()
 case-sensitive collator More...
 
static CollatorWrapperGetCollator (bool bCaseSensitive)
 
static css::lang::Locale & GetLocale ()
 
static SC_DLLPUBLIC ::utl::TransliterationWrapperGetTransliteration ()
 
::utl::TransliterationWrapperGetCaseTransliteration ()
 
::utl::TransliterationWrapperGetTransliteration (bool bCaseSensitive)
 
static const OUString & GetClipDocName ()
 
static void SetClipDocName (const OUString &rNew)
 
static SC_DLLPUBLIC const SvxSearchItemGetSearchItem ()
 
static SC_DLLPUBLIC void SetSearchItem (const SvxSearchItem &rNew)
 
static SC_DLLPUBLIC ScAutoFormatGetAutoFormat ()
 
static SC_DLLPUBLIC ScAutoFormatGetOrCreateAutoFormat ()
 
static void ClearAutoFormat ()
 
static LegacyFuncCollectionGetLegacyFuncCollection ()
 
static SC_DLLPUBLIC ScUnoAddInCollectionGetAddInCollection ()
 
static SC_DLLPUBLIC ScUserListGetUserList ()
 
static void SetUserList (const ScUserList *pNewList)
 
static void OpenURL (const OUString &rURL, const OUString &rTarget, bool bIgnoreSettings=false)
 Open the specified URL. More...
 
static bool ShouldOpenURL ()
 Whether the URL can be opened according to current security options (Click/Ctrl-Click) More...
 
static SC_DLLPUBLIC OUString GetAbsDocName (const OUString &rFileName, const SfxObjectShell *pShell)
 
static SC_DLLPUBLIC OUString GetDocTabName (std::u16string_view rFileName, std::u16string_view rTabName)
 
static SC_DLLPUBLIC sal_uInt32 GetStandardFormat (SvNumberFormatter &, sal_uInt32 nFormat, SvNumFormatType nType)
 
static SC_DLLPUBLIC sal_uInt16 GetStandardRowHeight ()
 
static SC_DLLPUBLIC void Init ()
 
static void InitAddIns ()
 
static SC_DLLPUBLIC void Clear ()
 
static void InitTextHeight (const SfxItemPool *pPool)
 
static SvxBrushItemGetEmptyBrushItem ()
 
static SvxBrushItemGetButtonBrushItem ()
 
static bool HasStarCalcFunctionList ()
 
static ScFunctionListGetStarCalcFunctionList ()
 
static ScFunctionMgrGetStarCalcFunctionMgr ()
 
static void ResetFunctionList ()
 
static const InputHandlerFunctionNamesGetInputHandlerFunctionNames ()
 
static OUString GetErrorString (FormulaError nErrNumber)
 
static OUString GetLongErrorString (FormulaError nErrNumber)
 
static bool EETextObjEqual (const EditTextObject *pObj1, const EditTextObject *pObj2)
 
static bool CheckWidthInvalidate (bool &bNumFormatChanged, const SfxItemSet &rNewAttrs, const SfxItemSet &rOldAttrs)
 
static bool HasAttrChanged (const SfxItemSet &rNewAttrs, const SfxItemSet &rOldAttrs, const sal_uInt16 nWhich)
 
static ScUnitConverterGetUnitConverter ()
 
static const sal_UnicodeUnicodeStrChr (const sal_Unicode *pStr, sal_Unicode c)
 strchr() functionality on unicode, as long as we need it for FormulaToken etc. More...
 
static sal_Unicode ToUpperAlpha (sal_Unicode c)
 
static SC_DLLPUBLIC OUString addToken (std::u16string_view rTokenList, std::u16string_view rToken, sal_Unicode cSep, sal_Int32 nSepCount=1, bool bForceSep=false)
 Adds the string rToken to rTokenList, using a list separator character. More...
 
static SC_DLLPUBLIC bool IsQuoted (std::u16string_view rString, sal_Unicode cQuote)
 Returns true, if the first and last character of the string is cQuote. More...
 
static SC_DLLPUBLIC void AddQuotes (OUString &rString, sal_Unicode cQuote, bool bEscapeEmbedded=true)
 Inserts the character cQuote at beginning and end of rString. More...
 
static SC_DLLPUBLIC void EraseQuotes (OUString &rString, sal_Unicode cQuote, bool bUnescapeEmbedded=true)
 Erases the character cQuote from rString, if it exists at beginning AND end. More...
 
static SC_DLLPUBLIC sal_Int32 FindUnquoted (const OUString &rString, sal_Unicode cChar, sal_Int32 nStart=0)
 Finds an unquoted instance of cChar in rString, starting at offset nStart. More...
 
static SC_DLLPUBLIC const sal_UnicodeFindUnquoted (const sal_Unicode *pString, sal_Unicode cChar)
 Finds an unquoted instance of cChar in null-terminated pString. More...
 
static rtl_TextEncoding GetCharsetValue (std::u16string_view rCharSet)
 
static OUString GetCharsetString (rtl_TextEncoding eVal)
 
static SvNumberFormatterGetEnglishFormatter ()
 a "ReadOnly" formatter for UNO/XML export More...
 
static bool IsSystemRTL ()
 
static LanguageType GetEditDefaultLanguage ()
 
static SC_DLLPUBLIC SvtScriptType GetDefaultScriptType ()
 
static SC_DLLPUBLIC sal_uInt16 GetScriptedWhichID (SvtScriptType nScriptType, sal_uInt16 nWhich)
 Map ATTR_((CJK|CTL)_)?FONT_... to proper WhichIDs. More...
 
static SC_DLLPUBLIC void AddLanguage (SfxItemSet &rSet, const SvNumberFormatter &rFormatter)
 Adds a language item to the item set, if the number format item contains a language that differs from its parent's language. More...
 
static OUString GetOrdinalSuffix (sal_Int32 nNumber)
 Obtain the ordinal suffix for a number according to the system locale. More...
 
static ScFieldEditEngineGetStaticFieldEditEngine ()
 A static instance of ScFieldEditEngine not capable of resolving document specific fields, to be used only by ScEditUtil::GetString(). More...
 
static sc::SharedStringPoolPurgeGetSharedStringPoolPurge ()
 
static SC_DLLPUBLIC OUString ReplaceOrAppend (const OUString &rString, std::u16string_view rPlaceholder, const OUString &rReplacement)
 Replaces the first occurrence of rPlaceholder in rString with rReplacement, or if rPlaceholder is not found appends one space if rString does not end in a space and appends rReplacement. More...
 
static double ConvertStringToValue (const OUString &rStr, const ScCalcConfig &rConfig, FormulaError &rError, FormulaError nStringNoValueError, SvNumberFormatter *pFormatter, SvNumFormatType &rCurFmtType)
 Convert string content to numeric value. More...
 

Static Public Attributes

static std::optional< SvtSysLocaleoSysLocale
 
static SC_DLLPUBLIC LanguageType eLnge = LANGUAGE_SYSTEM
 
static constexpr sal_Unicode cListDelimiter = ','
 
static SC_DLLPUBLIC double nScreenPPTX = 96.0
 Horizontal pixel per twips factor. More...
 
static SC_DLLPUBLIC double nScreenPPTY = 96.0
 Vertical pixel per twips factor. More...
 
static tools::SvRef< ScDocShellxDrawClipDocShellRef
 
static sal_uInt16 nDefFontHeight = 225
 
static SC_DLLPUBLIC sal_uInt16 nStdRowHeight = 256
 
static SC_DLLPUBLIC ::tools::Long nLastRowHeightExtra = 0
 
::tools::Long nLastColWidthExtra = STD_EXTRA_WIDTH
 
static SC_DLLPUBLIC bool bThreadedGroupCalcInProgress = false
 Calc's threaded group calculation is in progress. More...
 

Static Private Member Functions

static void InitPPT ()
 

Static Private Attributes

static std::unique_ptr< SvxSearchItemxSearchItem
 
static std::unique_ptr< ScAutoFormatxAutoFormat
 
static std::atomic< LegacyFuncCollection * > pLegacyFuncCollection
 
static std::atomic< ScUnoAddInCollection * > pAddInCollection
 
static std::unique_ptr< ScUserListxUserList
 
static OUString aStrClipDocName
 
static std::unique_ptr< SvxBrushItemxEmptyBrushItem
 
static std::unique_ptr< SvxBrushItemxButtonBrushItem
 
static std::unique_ptr< ScFunctionListxStarCalcFunctionList
 
static std::unique_ptr< ScFunctionMgrxStarCalcFunctionMgr
 
static std::atomic< ScUnitConverter * > pUnitConverter
 
static std::unique_ptr< SvNumberFormatterxEnglishFormatter
 
static css::uno::Reference< css::i18n::XOrdinalSuffix > xOrdinalSuffix
 
static std::optional< CalendarWrapperoCalendar
 
static std::atomic< CollatorWrapper * > pCaseCollator
 
static std::atomic< CollatorWrapper * > pCollator
 
static std::atomic<::utl::TransliterationWrapper * > pTransliteration
 
static std::atomic<::utl::TransliterationWrapper * > pCaseTransliteration
 
static std::atomic< css::lang::Locale * > pLocale
 
static std::unique_ptr< ScFieldEditEnginexFieldEditEngine
 
static std::atomic< sc::SharedStringPoolPurge * > pSharedStringPoolPurge
 
static InputHandlerFunctionNames maInputHandlerFunctionNames
 

Detailed Description

Definition at line 509 of file global.hxx.

Member Function Documentation

◆ AddLanguage()

void ScGlobal::AddLanguage ( SfxItemSet rSet,
const SvNumberFormatter rFormatter 
)
static

◆ AddQuotes()

void ScGlobal::AddQuotes ( OUString &  rString,
sal_Unicode  cQuote,
bool  bEscapeEmbedded = true 
)
static

Inserts the character cQuote at beginning and end of rString.

Parameters
bEscapeEmbeddedIf <TRUE>, embedded quote characters are escaped by doubling them.

Definition at line 720 of file global.cxx.

Referenced by ScfTools::GetHTMLNameFromName(), and sc::SolverSettings::WriteParamValue().

◆ addToken()

OUString ScGlobal::addToken ( std::u16string_view  rTokenList,
std::u16string_view  rToken,
sal_Unicode  cSep,
sal_Int32  nSepCount = 1,
bool  bForceSep = false 
)
static

Adds the string rToken to rTokenList, using a list separator character.

Parameters
rTokenListThe string list where the token will be appended to.
rTokenThe token string to append to the token list.
cSepThe character to separate the tokens.
nSepCountSpecifies how often cSep is inserted between two tokens.
bForceSeptrue = Always insert separator; false = Only, if not at begin or end.

Definition at line 705 of file global.cxx.

References aBuf, and comphelper::string::padToLength().

Referenced by XclExpHFConverter::AppendPortion(), ScHTMLQueryParser::FontOn(), ScHTMLImport::GetHTMLRangeNameList(), XclExpHyperlinkHelper::ProcessUrlField(), XclImpWebQuery::ReadWqtables(), XclExpCellTable::XclExpCellTable(), XclExpNote::XclExpNote(), and XclExpWebQuery::XclExpWebQuery().

◆ CheckWidthInvalidate()

bool ScGlobal::CheckWidthInvalidate ( bool &  bNumFormatChanged,
const SfxItemSet rNewAttrs,
const SfxItemSet rOldAttrs 
)
static

◆ Clear()

void ScGlobal::Clear ( )
static

◆ ClearAutoFormat()

void ScGlobal::ClearAutoFormat ( )
static

Definition at line 248 of file global.cxx.

References bThreadedGroupCalcInProgress, and xAutoFormat.

Referenced by Clear(), and ScCellShell::Execute().

◆ ConvertStringToValue()

double ScGlobal::ConvertStringToValue ( const OUString &  rStr,
const ScCalcConfig rConfig,
FormulaError rError,
FormulaError  nStringNoValueError,
SvNumberFormatter pFormatter,
SvNumFormatType rCurFmtType 
)
static

Convert string content to numeric value.

In any case, if rError is set 0.0 is returned.

If nStringNoValueError is FormulaError::CellNoValue, that is unconditionally assigned to rError and 0.0 is returned. The caller is expected to handle this situation. Used by the interpreter.

Usually FormulaError::NoValue is passed as nStringNoValueError.

Otherwise, depending on the string conversion configuration different approaches are taken:

For ScCalcConfig::StringConversion::ILLEGAL The error value passed in nStringNoValueError is assigned to rError (and 0.0 returned).

For ScCalcConfig::StringConversion::ZERO A zero value is returned and no error assigned.

For ScCalcConfig::StringConversion::LOCALE

If the string is empty or consists only of spaces, if "treat empty string as zero" is set 0.0 is returned, else nStringNoValueError assigned to rError (and 0.0 returned).

Else a non-empty string is passed to the number formatter's scanner to be parsed locale dependent. If that does not detect a numeric value nStringNoValueError is assigned to rError (and 0.0 returned).

If no number formatter was passed, the conversion falls back to UNAMBIGUOUS.

For ScCalcConfig::StringConversion::UNAMBIGUOUS

If the string is empty or consists only of spaces, if "treat empty string as zero" is set 0.0 is returned, else nStringNoValueError assigned to rError (and 0.0 returned).

If the string is not empty the following conversion rules are applied:

Converted are only integer numbers including exponent, and ISO 8601 dates and times in their extended formats with separators. Anything else, especially fractional numeric values with decimal separators or dates other than ISO 8601 would be locale dependent and is a no-no. Leading and trailing blanks are ignored.

The following ISO 8601 formats are converted:

CCYY-MM-DD CCYY-MM-DDThh:mm CCYY-MM-DDThh:mm:ss CCYY-MM-DDThh:mm:ss,s CCYY-MM-DDThh:mm:ss.s hh:mm hh:mm:ss hh:mm:ss,s hh:mm:ss.s

The century CC may not be omitted and the two-digit year setting is not taken into account. Instead of the T date and time separator exactly one blank may be used.

If a date is given, it must be a valid Gregorian calendar date. In this case the optional time must be in the range 00:00 to 23:59:59.99999... If only time is given, it may have any value for hours, taking elapsed time into account; minutes and seconds are limited to the value 59 as well.

If the string can not be converted to a numeric value, the error value passed in nStringNoValueError is assigned to rError.

Parameters
rStrThe string to be converted.
rConfigThe calculation configuration.
rErrorContains the error on return, if any. If an error was set before and the conversion did not result in an error, still 0.0 is returned.
nStringNoValueErrorThe error value to be assigned to rError if string could not be converted to number.
pFormatterThe number formatter to use in case of ScCalcConfig::StringConversion::LOCALE. Can but should not be nullptr in which case conversion falls back to ScCalcConfig::StringConversion::UNAMBIGUOUS and if a date is detected the null date is assumed to be the standard 1899-12-30 instead of the configured null date.
rCurFmtTypeCan be assigned a format type in case a date or time or date+time string was converted, e.g. SvNumFormatType::DATE or SvNumFormatType::TIME or a combination thereof.

Definition at line 352 of file global2.cxx.

References day, SvNumberFormatter::GetNullDate(), ScCalcConfig::ILLEGAL, SvNumberFormatter::IsNumberFormat(), Date::IsValidDate(), ScCalcConfig::LOCALE, ScCalcConfig::mbEmptyStringAsZero, ScCalcConfig::meStringConversion, month, p, SAL_WARN, stop(), o3tl::toInt32(), ScCalcConfig::UNAMBIGUOUS, year, and ScCalcConfig::ZERO.

Referenced by ScInterpreter::ConvertStringToValue().

◆ EETextObjEqual()

bool ScGlobal::EETextObjEqual ( const EditTextObject pObj1,
const EditTextObject pObj2 
)
static

◆ EraseQuotes()

void ScGlobal::EraseQuotes ( OUString &  rString,
sal_Unicode  cQuote,
bool  bUnescapeEmbedded = true 
)
static

Erases the character cQuote from rString, if it exists at beginning AND end.

Parameters
bUnescapeEmbeddedIf <TRUE>, embedded doubled quote characters are unescaped by replacing them with a single instance.

Definition at line 733 of file global.cxx.

References IsQuoted().

Referenced by ScRangeStringConverter::GetRangeDataFromString(), sc::SolverSettings::ReadParamValue(), and XclImpWebQuery::ReadWqtables().

◆ FindUnquoted() [1/2]

sal_Int32 ScGlobal::FindUnquoted ( const OUString &  rString,
sal_Unicode  cChar,
sal_Int32  nStart = 0 
)
static

Finds an unquoted instance of cChar in rString, starting at offset nStart.

Unquoted instances may occur when concatenating two quoted strings with a separator, for example, 's1':'s2'. Embedded quotes have to be escaped by being doubled. Caller must ensure that nStart points into an unquoted range or the opening quote. Specialty: if cChar=='\'' the first quote character from nStart on is found.

Returns
offset if found, else -1

Definition at line 749 of file global.cxx.

References p.

Referenced by ConvertDoubleRef(), ConvertSingleRef(), ScCompiler::GetDocTabPos(), ScRangeStringConverter::GetRangeDataFromString(), lcl_IsTableStructuredRef(), lcl_ScAddress_Parse_OOo(), lcl_ScRange_Parse_OOo(), ScCompiler::ParseReference(), and ScInterpreter::ScIndirect().

◆ FindUnquoted() [2/2]

const sal_Unicode * ScGlobal::FindUnquoted ( const sal_Unicode pString,
sal_Unicode  cChar 
)
static

Finds an unquoted instance of cChar in null-terminated pString.

Same semantics as FindUnquoted( const String&, ...)

Returns
: pointer to cChar if found, else NULL

Definition at line 775 of file global.cxx.

References p.

◆ GetAbsDocName()

OUString ScGlobal::GetAbsDocName ( const OUString &  rFileName,
const SfxObjectShell pShell 
)
static

◆ GetAddInCollection()

ScUnoAddInCollection * ScGlobal::GetAddInCollection ( )
static

◆ GetAutoFormat()

ScAutoFormat * ScGlobal::GetAutoFormat ( )
static

Definition at line 261 of file global.cxx.

References xAutoFormat.

Referenced by ScAutoFormatObj::~ScAutoFormatObj().

◆ GetButtonBrushItem()

SvxBrushItem * ScGlobal::GetButtonBrushItem ( )
static

◆ GetCalendar()

CalendarWrapper & ScGlobal::GetCalendar ( )
static

◆ GetCaseCollator()

CollatorWrapper & ScGlobal::GetCaseCollator ( )
static

◆ GetCaseTransliteration()

utl::TransliterationWrapper & ScGlobal::GetCaseTransliteration ( )
static

◆ getCharClass()

const CharClass & ScGlobal::getCharClass ( )
static

Definition at line 1064 of file global.cxx.

References oSysLocale.

Referenced by ScDPResultTree::add(), ScNamedRangesObj::addNewByName(), ScCompiler::CheckTabQuotes(), ScDocFunc::CreateOneName(), ScDocShell::DdeCreateLinkSource(), ScDBDocFunc::DeleteDBRange(), ScUndoAutoFilter::DoChange(), ScPosWnd::DoEnter(), ScTable::DoSubTotals(), ScDocShell::Execute(), ScAreaLink::FindExtRange(), ScRangeManagerTable::findRangeData(), ScExternalRefCache::DocItem::findTableNameIndex(), ScExternalRefCache::getCacheTable(), ScUnoAddInCollection::GetCalcName(), sc::ScDBDataManager::getDBData(), ScDocShell::GetDBData(), ScDatabaseRangeObj::GetDBData_Impl(), ScExternalRefManager::getDoubleRefTokensFromSrcDoc(), ScInputHandler::GetFormulaData(), ScInputHandler::GetFuncName(), ScHTMLImport::GetHTMLRangeNameList(), ScDPResultTree::getLeafResult(), ScDPObject::GetPivotData(), ScNamedRangeObj::GetRangeData_Impl(), ScRangeStringConverter::GetRangeDataFromString(), ScExternalRefCache::getRangeNameTokens(), ScExternalRefManager::getRangeNameTokensFromSrcDoc(), ScExternalRefCache::getRealRangeName(), ScDPResultTree::getResults(), ScQueryEntry::GetSearchTextPtr(), ScSheetSourceDesc::GetSourceRange(), ScUserListData::GetSubIndex(), ScDocument::GetTable(), ScTable::GetUpperCellString(), ScTable::GetUpperName(), ScDBFunc::GotoDBArea(), ScDatabaseRangesObj::hasByName(), ScNamedRangesObj::hasByName(), IMPL_LINK_NOARG(), ScExternalRefCache::initializeDoc(), ScViewFunc::InsertName(), ScCompiler::IsCharFlagAllConventions(), ScNameDefDlg::IsNameValid(), ScNameDlg::IsNameValid(), ScExternalRefCache::isValidRangeName(), ScConditionEntry::IsValidStr(), lcl_AddFunctionToken(), lcl_FillRangeFromName(), lcl_GetDBAreaRange(), lcl_GetRange(), lcl_PutString(), ScRangeUtil::MakeRangeFromName(), ScNamedRangeObj::Modify_Impl(), ScNameDlg::NameModified(), ScCompiler::NextNewToken(), ScCompiler::NextSymbol(), ScCompiler::ParseSingleReference(), sc::SolverSettings::ReadConstraintPart(), sc::SolverSettings::ReadParamValue(), ScNamedRangesObj::removeByName(), ScNameDlg::RemovePushed(), ScDBDocFunc::RenameDBRange(), ScDBDocFunc::RepeatDB(), ScDBData::ScDBData(), ScInterpreter::ScLower(), ScInterpreter::ScProper(), ScInterpreter::ScSearch(), ScInterpreter::ScSearchB(), ScUnoAddInFuncData::ScUnoAddInFuncData(), ScInterpreter::ScUpper(), ScCompiler::SetFormulaLanguage(), ScExternalRefCache::setRangeName(), ScExternalRefCache::setRangeNameTokens(), ScChangeViewSettings::SetTheComment(), ScNameDlg::ShowOptions(), naturalsort::SplitString(), sc::TextTransformation::Transform(), ScDbNameDlg::UpdateDBData(), ScDBDocFunc::UpdateImport(), ScInputHandler::UseFormulaData(), ScDocument::ValidNewTabName(), ScEEImport::WriteToDocument(), and ScHTMLImport::WriteToDocument().

◆ GetCharsetString()

OUString ScGlobal::GetCharsetString ( rtl_TextEncoding  eVal)
static

◆ GetCharsetValue()

rtl_TextEncoding ScGlobal::GetCharsetValue ( std::u16string_view  rCharSet)
static

◆ GetClipDocName()

const OUString & ScGlobal::GetClipDocName ( )
static

Definition at line 494 of file global.cxx.

References aStrClipDocName.

Referenced by ScImportExport::ExportStream().

◆ GetCollator() [1/2]

CollatorWrapper & ScGlobal::GetCollator ( )
static

◆ GetCollator() [2/2]

CollatorWrapper & ScGlobal::GetCollator ( bool  bCaseSensitive)
static

Definition at line 1117 of file global.cxx.

References GetCaseCollator(), and GetCollator().

◆ GetDefaultScriptType()

SvtScriptType ScGlobal::GetDefaultScriptType ( )
static

◆ GetDocTabName()

OUString ScGlobal::GetDocTabName ( std::u16string_view  rFileName,
std::u16string_view  rTabName 
)
static

◆ GetEditDefaultLanguage()

LanguageType ScGlobal::GetEditDefaultLanguage ( )
static

◆ GetEmptyBrushItem()

static SvxBrushItem * ScGlobal::GetEmptyBrushItem ( )
inlinestatic

◆ GetEnglishFormatter()

SvNumberFormatter * ScGlobal::GetEnglishFormatter ( )
static

a "ReadOnly" formatter for UNO/XML export

Definition at line 174 of file global.cxx.

References bThreadedGroupCalcInProgress, LANGUAGE_ENGLISH_US, NF_EVALDATEFORMAT_INTL_FORMAT, and xEnglishFormatter.

Referenced by lcl_GetInputString().

◆ GetErrorString()

OUString ScGlobal::GetErrorString ( FormulaError  nErrNumber)
static

◆ GetInputHandlerFunctionNames()

const InputHandlerFunctionNames & ScGlobal::GetInputHandlerFunctionNames ( )
static

◆ GetLegacyFuncCollection()

LegacyFuncCollection * ScGlobal::GetLegacyFuncCollection ( )
static

◆ GetLocale()

css::lang::Locale & ScGlobal::GetLocale ( )
static

◆ getLocaleData()

const LocaleDataWrapper & ScGlobal::getLocaleData ( )
static

◆ GetLongErrorString()

OUString ScGlobal::GetLongErrorString ( FormulaError  nErrNumber)
static

Definition at line 347 of file global.cxx.

References ScResId().

Referenced by ScTabViewShell::GetFunction().

◆ GetOrCreateAutoFormat()

ScAutoFormat * ScGlobal::GetOrCreateAutoFormat ( )
static

◆ GetOrdinalSuffix()

OUString ScGlobal::GetOrdinalSuffix ( sal_Int32  nNumber)
static

Obtain the ordinal suffix for a number according to the system locale.

Definition at line 120 of file globalx.cxx.

References Exception, getLanguageTag(), getLocale(), getLocaleData(), TOOLS_WARN_EXCEPTION, and xOrdinalSuffix.

Referenced by ScTable::FillAutoSimple(), ScTable::FillSeries(), and ScTable::GetAutoFillPreview().

◆ GetScriptedWhichID()

sal_uInt16 ScGlobal::GetScriptedWhichID ( SvtScriptType  nScriptType,
sal_uInt16  nWhich 
)
static

Map ATTR_((CJK|CTL)_)?FONT_... to proper WhichIDs.

If more than one SvtScriptType::... values are or'ed together, prefers first COMPLEX, then ASIAN

Definition at line 915 of file global.cxx.

References ATTR_CJK_FONT(), ATTR_CJK_FONT_HEIGHT(), ATTR_CJK_FONT_POSTURE(), ATTR_CJK_FONT_WEIGHT(), ATTR_CTL_FONT(), ATTR_CTL_FONT_HEIGHT(), ATTR_CTL_FONT_POSTURE(), ATTR_CTL_FONT_WEIGHT(), ATTR_FONT(), ATTR_FONT_HEIGHT(), ATTR_FONT_POSTURE(), and ATTR_FONT_WEIGHT().

Referenced by ScHTMLExport::PageDefaults(), ScHTMLExport::WriteCell(), and ScEEImport::WriteToDocument().

◆ GetSearchItem()

const SvxSearchItem & ScGlobal::GetSearchItem ( )
static

◆ GetSharedStringPoolPurge()

sc::SharedStringPoolPurge & ScGlobal::GetSharedStringPoolPurge ( )
static

Definition at line 1141 of file global.cxx.

References comphelper::doubleCheckedInit(), and pSharedStringPoolPurge.

Referenced by ScDocument::~ScDocument().

◆ GetStandardFormat()

sal_uInt32 ScGlobal::GetStandardFormat ( SvNumberFormatter rFormatter,
sal_uInt32  nFormat,
SvNumFormatType  nType 
)
static

◆ GetStandardRowHeight()

sal_uInt16 ScGlobal::GetStandardRowHeight ( )
static

Definition at line 169 of file global.cxx.

References nStdRowHeight.

◆ GetStarCalcFunctionList()

ScFunctionList * ScGlobal::GetStarCalcFunctionList ( )
static

◆ GetStarCalcFunctionMgr()

ScFunctionMgr * ScGlobal::GetStarCalcFunctionMgr ( )
static

◆ GetStaticFieldEditEngine()

ScFieldEditEngine & ScGlobal::GetStaticFieldEditEngine ( )
static

A static instance of ScFieldEditEngine not capable of resolving document specific fields, to be used only by ScEditUtil::GetString().

Definition at line 1127 of file global.cxx.

References bThreadedGroupCalcInProgress, and xFieldEditEngine.

Referenced by ScEditUtil::GetString().

◆ GetTransliteration() [1/2]

utl::TransliterationWrapper & ScGlobal::GetTransliteration ( )
static

◆ GetTransliteration() [2/2]

utl::TransliterationWrapper & ScGlobal::GetTransliteration ( bool  bCaseSensitive)
static

Definition at line 1050 of file global.cxx.

References GetCaseTransliteration(), and GetTransliteration().

◆ GetUnitConverter()

ScUnitConverter * ScGlobal::GetUnitConverter ( )
static

Definition at line 685 of file global.cxx.

References comphelper::doubleCheckedInit(), and pUnitConverter.

Referenced by ScInterpreter::ScConvertOOo().

◆ GetUserList()

ScUserList * ScGlobal::GetUserList ( )
static

◆ HasAttrChanged()

bool ScGlobal::HasAttrChanged ( const SfxItemSet rNewAttrs,
const SfxItemSet rOldAttrs,
const sal_uInt16  nWhich 
)
static

◆ HasStarCalcFunctionList()

bool ScGlobal::HasStarCalcFunctionList ( )
static

Definition at line 621 of file global.cxx.

References xStarCalcFunctionList.

Referenced by ScUnoAddInCollection::UpdateFromAddIn().

◆ Init()

void ScGlobal::Init ( void  )
static

◆ InitAddIns()

void ScGlobal::InitAddIns ( )
static

◆ InitPPT()

void ScGlobal::InitPPT ( )
staticprivate

◆ InitTextHeight()

void ScGlobal::InitTextHeight ( const SfxItemPool pPool)
static

◆ IsQuoted()

bool ScGlobal::IsQuoted ( std::u16string_view  rString,
sal_Unicode  cQuote 
)
static

Returns true, if the first and last character of the string is cQuote.

Definition at line 715 of file global.cxx.

Referenced by EraseQuotes().

◆ IsSystemRTL()

bool ScGlobal::IsSystemRTL ( )
static

◆ OpenURL()

void ScGlobal::OpenURL ( const OUString &  rURL,
const OUString &  rTarget,
bool  bIgnoreSettings = false 
)
static

◆ ReplaceOrAppend()

OUString ScGlobal::ReplaceOrAppend ( const OUString &  rString,
std::u16string_view  rPlaceholder,
const OUString &  rReplacement 
)
static

Replaces the first occurrence of rPlaceholder in rString with rReplacement, or if rPlaceholder is not found appends one space if rString does not end in a space and appends rReplacement.

Meant to be used with resource strings ala "Column %1" where a translation may have omitted the %1 placeholder and a simple replacement would end up with nothing replaced so no column indicator in the result string.

Definition at line 1147 of file global.cxx.

Referenced by ScFilterDlg::FillFieldLists(), ScPivotFilterDlg::FillFieldLists(), ScTpSubTotalGroup::FillListBoxes(), and sc::SearchResultsDlg::FillResults().

◆ ResetFunctionList()

void ScGlobal::ResetFunctionList ( )
static

◆ SetClipDocName()

void ScGlobal::SetClipDocName ( const OUString &  rNew)
static

◆ SetSearchItem()

void ScGlobal::SetSearchItem ( const SvxSearchItem rNew)
static

◆ SetUserList()

void ScGlobal::SetUserList ( const ScUserList pNewList)
static

Definition at line 299 of file global.cxx.

References bThreadedGroupCalcInProgress, and xUserList.

Referenced by ScModule::ModifyOptions(), and ScAppCfg::ReadSortListCfg().

◆ ShouldOpenURL()

bool ScGlobal::ShouldOpenURL ( )
static

Whether the URL can be opened according to current security options (Click/Ctrl-Click)

Definition at line 876 of file global.cxx.

References SvtSecurityOptions::CtrlClickHyperlink, SvtSecurityOptions::IsOptionSet(), KEY_MOD1, and nScClickMouseModifier.

Referenced by ScGridWindow::HandleMouseButtonDown(), FuSelection::MouseButtonDown(), ScGridWindow::MouseMove(), and OpenURL().

◆ ToUpperAlpha()

static sal_Unicode ScGlobal::ToUpperAlpha ( sal_Unicode  c)
inlinestatic

Definition at line 631 of file global.hxx.

Referenced by AlphaToCol(), and ScImportExport::Sylk2Doc().

◆ UnicodeStrChr()

const sal_Unicode * ScGlobal::UnicodeStrChr ( const sal_Unicode pStr,
sal_Unicode  c 
)
static

strchr() functionality on unicode, as long as we need it for FormulaToken etc.

Definition at line 691 of file global.cxx.

Referenced by ScDocShell::AfterXMLLoading(), ScInputHandler::InitRangeFinder(), lcl_isFieldEnd(), lcl_isFieldEndQuote(), ScRange::Parse_XL_Header(), and ScImportExport::ScanNextFieldFromString().

Member Data Documentation

◆ aStrClipDocName

OUString ScGlobal::aStrClipDocName
staticprivate

Definition at line 516 of file global.hxx.

Referenced by GetClipDocName(), Init(), and SetClipDocName().

◆ bThreadedGroupCalcInProgress

bool ScGlobal::bThreadedGroupCalcInProgress = false
static

◆ cListDelimiter

constexpr sal_Unicode ScGlobal::cListDelimiter = ','
staticconstexpr

Definition at line 561 of file global.hxx.

Referenced by ScUserList::AddDefaults(), and ScUserListData::InitTokens().

◆ eLnge

LanguageType ScGlobal::eLnge = LANGUAGE_SYSTEM
static

◆ maInputHandlerFunctionNames

InputHandlerFunctionNames ScGlobal::maInputHandlerFunctionNames
staticprivate

Definition at line 539 of file global.hxx.

Referenced by GetInputHandlerFunctionNames(), and ResetFunctionList().

◆ nDefFontHeight

sal_uInt16 ScGlobal::nDefFontHeight = 225
static

Definition at line 595 of file global.hxx.

Referenced by InitTextHeight().

◆ nLastColWidthExtra

tools::Long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH
static

Definition at line 599 of file global.hxx.

Referenced by ScDocShell::ConvertFrom(), and ScCellShell::Execute().

◆ nLastRowHeightExtra

tools::Long ScGlobal::nLastRowHeightExtra = 0
static

Definition at line 598 of file global.hxx.

Referenced by ScCellShell::Execute(), and ScEEImport::WriteToDocument().

◆ nScreenPPTX

double ScGlobal::nScreenPPTX = 96.0
static

◆ nScreenPPTY

double ScGlobal::nScreenPPTY = 96.0
static

◆ nStdRowHeight

sal_uInt16 ScGlobal::nStdRowHeight = 256
static

◆ oCalendar

std::optional< CalendarWrapper > ScGlobal::oCalendar
staticprivate

Definition at line 528 of file global.hxx.

Referenced by Clear(), and GetCalendar().

◆ oSysLocale

std::optional< SvtSysLocale > ScGlobal::oSysLocale
static

◆ pAddInCollection

std::atomic< ScUnoAddInCollection * > ScGlobal::pAddInCollection
staticprivate

Definition at line 514 of file global.hxx.

Referenced by Clear(), and GetAddInCollection().

◆ pCaseCollator

std::atomic< CollatorWrapper * > ScGlobal::pCaseCollator
staticprivate

Definition at line 529 of file global.hxx.

Referenced by Clear(), and GetCaseCollator().

◆ pCaseTransliteration

std::atomic<::utl::TransliterationWrapper * > ScGlobal::pCaseTransliteration
staticprivate

Definition at line 532 of file global.hxx.

Referenced by Clear(), and GetCaseTransliteration().

◆ pCollator

std::atomic< CollatorWrapper * > ScGlobal::pCollator
staticprivate

Definition at line 530 of file global.hxx.

Referenced by Clear(), and GetCollator().

◆ pLegacyFuncCollection

std::atomic< LegacyFuncCollection * > ScGlobal::pLegacyFuncCollection
staticprivate

Definition at line 513 of file global.hxx.

Referenced by Clear(), and GetLegacyFuncCollection().

◆ pLocale

std::atomic< css::lang::Locale * > ScGlobal::pLocale
staticprivate

Definition at line 533 of file global.hxx.

Referenced by Clear(), and GetLocale().

◆ pSharedStringPoolPurge

std::atomic< sc::SharedStringPoolPurge * > ScGlobal::pSharedStringPoolPurge
staticprivate

Definition at line 537 of file global.hxx.

Referenced by Clear(), and GetSharedStringPoolPurge().

◆ pTransliteration

std::atomic<::utl::TransliterationWrapper * > ScGlobal::pTransliteration
staticprivate

Definition at line 531 of file global.hxx.

Referenced by Clear(), and GetTransliteration().

◆ pUnitConverter

std::atomic< ScUnitConverter * > ScGlobal::pUnitConverter
staticprivate

Definition at line 523 of file global.hxx.

Referenced by Clear(), and GetUnitConverter().

◆ xAutoFormat

std::unique_ptr< ScAutoFormat > ScGlobal::xAutoFormat
staticprivate

Definition at line 512 of file global.hxx.

Referenced by ClearAutoFormat(), GetAutoFormat(), and GetOrCreateAutoFormat().

◆ xButtonBrushItem

std::unique_ptr< SvxBrushItem > ScGlobal::xButtonBrushItem
staticprivate

Definition at line 518 of file global.hxx.

Referenced by Clear(), GetButtonBrushItem(), and Init().

◆ xDrawClipDocShellRef

tools::SvRef< ScDocShell > ScGlobal::xDrawClipDocShellRef
static

◆ xEmptyBrushItem

std::unique_ptr< SvxBrushItem > ScGlobal::xEmptyBrushItem
staticprivate

Definition at line 517 of file global.hxx.

Referenced by Clear(), GetEmptyBrushItem(), and Init().

◆ xEnglishFormatter

std::unique_ptr< SvNumberFormatter > ScGlobal::xEnglishFormatter
staticprivate

Definition at line 525 of file global.hxx.

Referenced by Clear(), and GetEnglishFormatter().

◆ xFieldEditEngine

std::unique_ptr< ScFieldEditEngine > ScGlobal::xFieldEditEngine
staticprivate

Definition at line 535 of file global.hxx.

Referenced by Clear(), and GetStaticFieldEditEngine().

◆ xOrdinalSuffix

css::uno::Reference< css::i18n::XOrdinalSuffix > ScGlobal::xOrdinalSuffix
staticprivate

Definition at line 527 of file global.hxx.

Referenced by GetOrdinalSuffix().

◆ xSearchItem

std::unique_ptr< SvxSearchItem > ScGlobal::xSearchItem
staticprivate

Definition at line 511 of file global.hxx.

Referenced by Clear(), GetSearchItem(), and SetSearchItem().

◆ xStarCalcFunctionList

std::unique_ptr< ScFunctionList > ScGlobal::xStarCalcFunctionList
staticprivate

◆ xStarCalcFunctionMgr

std::unique_ptr< ScFunctionMgr > ScGlobal::xStarCalcFunctionMgr
staticprivate

Definition at line 521 of file global.hxx.

Referenced by Clear(), GetStarCalcFunctionMgr(), and ResetFunctionList().

◆ xUserList

std::unique_ptr< ScUserList > ScGlobal::xUserList
staticprivate

Definition at line 515 of file global.hxx.

Referenced by Clear(), GetUserList(), and SetUserList().


The documentation for this class was generated from the following files: