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:

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 

◆ AddQuotes()

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

Inserts the character cQuote at beginning and end of rString.

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 

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

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 

◆ Clear()

void ScGlobal::Clear ( )

◆ ClearAutoFormat()

void ScGlobal::ClearAutoFormat ( )

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 

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.

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 

◆ EraseQuotes()

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

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

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 

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.

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 

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

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

: 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 

◆ GetAddInCollection()

ScUnoAddInCollection * ScGlobal::GetAddInCollection ( )

◆ GetAutoFormat()

ScAutoFormat * ScGlobal::GetAutoFormat ( )

Definition at line 261 of file global.cxx.

References xAutoFormat.

Referenced by ScAutoFormatObj::~ScAutoFormatObj().

◆ GetButtonBrushItem()

SvxBrushItem * ScGlobal::GetButtonBrushItem ( )

◆ GetCalendar()

CalendarWrapper & ScGlobal::GetCalendar ( )

◆ GetCaseCollator()

CollatorWrapper & ScGlobal::GetCaseCollator ( )

◆ GetCaseTransliteration()

utl::TransliterationWrapper & ScGlobal::GetCaseTransliteration ( )

◆ getCharClass()

const CharClass & ScGlobal::getCharClass ( )

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)

◆ GetCharsetValue()

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

◆ GetClipDocName()

const OUString & ScGlobal::GetClipDocName ( )

Definition at line 494 of file global.cxx.

References aStrClipDocName.

Referenced by ScImportExport::ExportStream().

◆ GetCollator() [1/2]

CollatorWrapper & ScGlobal::GetCollator ( )

◆ GetCollator() [2/2]

CollatorWrapper & ScGlobal::GetCollator ( bool  bCaseSensitive)

Definition at line 1117 of file global.cxx.

References GetCaseCollator(), and GetCollator().

◆ GetDefaultScriptType()

SvtScriptType ScGlobal::GetDefaultScriptType ( )

◆ GetDocTabName()

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

◆ GetEditDefaultLanguage()

LanguageType ScGlobal::GetEditDefaultLanguage ( )

◆ GetEmptyBrushItem()

static SvxBrushItem * ScGlobal::GetEmptyBrushItem ( )

◆ GetEnglishFormatter()

SvNumberFormatter * ScGlobal::GetEnglishFormatter ( )

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)

◆ GetInputHandlerFunctionNames()

const InputHandlerFunctionNames & ScGlobal::GetInputHandlerFunctionNames ( )

◆ GetLegacyFuncCollection()

LegacyFuncCollection * ScGlobal::GetLegacyFuncCollection ( )

◆ GetLocale()

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

◆ getLocaleData()

const LocaleDataWrapper & ScGlobal::getLocaleData ( )

◆ GetLongErrorString()

OUString ScGlobal::GetLongErrorString ( FormulaError  nErrNumber)

Definition at line 347 of file global.cxx.

References ScResId().

Referenced by ScTabViewShell::GetFunction().

◆ GetOrCreateAutoFormat()

ScAutoFormat * ScGlobal::GetOrCreateAutoFormat ( )

◆ GetOrdinalSuffix()

OUString ScGlobal::GetOrdinalSuffix ( sal_Int32  nNumber)

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 

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.


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

◆ GetSearchItem()

const SvxSearchItem & ScGlobal::GetSearchItem ( )

◆ GetSharedStringPoolPurge()

sc::SharedStringPoolPurge & ScGlobal::GetSharedStringPoolPurge ( )

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 

◆ GetStandardRowHeight()

sal_uInt16 ScGlobal::GetStandardRowHeight ( )

Definition at line 169 of file global.cxx.

References nStdRowHeight.

◆ GetStarCalcFunctionList()

ScFunctionList * ScGlobal::GetStarCalcFunctionList ( )

◆ GetStarCalcFunctionMgr()

ScFunctionMgr * ScGlobal::GetStarCalcFunctionMgr ( )

◆ GetStaticFieldEditEngine()

ScFieldEditEngine & ScGlobal::GetStaticFieldEditEngine ( )

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 ( )

◆ GetTransliteration() [2/2]

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

Definition at line 1050 of file global.cxx.

References GetCaseTransliteration(), and GetTransliteration().

◆ GetUnitConverter()

ScUnitConverter * ScGlobal::GetUnitConverter ( )

Definition at line 685 of file global.cxx.

References comphelper::doubleCheckedInit(), and pUnitConverter.

Referenced by ScInterpreter::ScConvertOOo().

◆ GetUserList()

ScUserList * ScGlobal::GetUserList ( )

◆ HasAttrChanged()

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

◆ HasStarCalcFunctionList()

bool ScGlobal::HasStarCalcFunctionList ( )

Definition at line 621 of file global.cxx.

References xStarCalcFunctionList.

Referenced by ScUnoAddInCollection::UpdateFromAddIn().

◆ Init()

void ScGlobal::Init ( void  )

◆ InitAddIns()

void ScGlobal::InitAddIns ( )

◆ InitPPT()

void ScGlobal::InitPPT ( )

◆ InitTextHeight()

void ScGlobal::InitTextHeight ( const SfxItemPool pPool)

◆ IsQuoted()

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

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 ( )

◆ OpenURL()

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

◆ ReplaceOrAppend()

OUString ScGlobal::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.

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 ( )

◆ SetClipDocName()

void ScGlobal::SetClipDocName ( const OUString &  rNew)

◆ SetSearchItem()

void ScGlobal::SetSearchItem ( const SvxSearchItem rNew)

◆ SetUserList()

void ScGlobal::SetUserList ( const ScUserList pNewList)

Definition at line 299 of file global.cxx.

References bThreadedGroupCalcInProgress, and xUserList.

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

◆ ShouldOpenURL()

bool ScGlobal::ShouldOpenURL ( )

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)

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 

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

Definition at line 516 of file global.hxx.

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

◆ bThreadedGroupCalcInProgress

bool ScGlobal::bThreadedGroupCalcInProgress = false

◆ cListDelimiter

constexpr sal_Unicode ScGlobal::cListDelimiter = ','

Definition at line 561 of file global.hxx.

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

◆ eLnge

LanguageType ScGlobal::eLnge = LANGUAGE_SYSTEM

◆ maInputHandlerFunctionNames

InputHandlerFunctionNames ScGlobal::maInputHandlerFunctionNames

Definition at line 539 of file global.hxx.

Referenced by GetInputHandlerFunctionNames(), and ResetFunctionList().

◆ nDefFontHeight

sal_uInt16 ScGlobal::nDefFontHeight = 225

Definition at line 595 of file global.hxx.

Referenced by InitTextHeight().

◆ nLastColWidthExtra

tools::Long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH

Definition at line 599 of file global.hxx.

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

◆ nLastRowHeightExtra

tools::Long ScGlobal::nLastRowHeightExtra = 0

Definition at line 598 of file global.hxx.

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

◆ nScreenPPTX

double ScGlobal::nScreenPPTX = 96.0

◆ nScreenPPTY

double ScGlobal::nScreenPPTY = 96.0

◆ nStdRowHeight

sal_uInt16 ScGlobal::nStdRowHeight = 256

◆ oCalendar

std::optional< CalendarWrapper > ScGlobal::oCalendar

Definition at line 528 of file global.hxx.

Referenced by Clear(), and GetCalendar().

◆ oSysLocale

std::optional< SvtSysLocale > ScGlobal::oSysLocale

◆ pAddInCollection

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

Definition at line 514 of file global.hxx.

Referenced by Clear(), and GetAddInCollection().

◆ pCaseCollator

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

Definition at line 529 of file global.hxx.

Referenced by Clear(), and GetCaseCollator().

◆ pCaseTransliteration

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

Definition at line 532 of file global.hxx.

Referenced by Clear(), and GetCaseTransliteration().

◆ pCollator

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

Definition at line 530 of file global.hxx.

Referenced by Clear(), and GetCollator().

◆ pLegacyFuncCollection

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

Definition at line 513 of file global.hxx.

Referenced by Clear(), and GetLegacyFuncCollection().

◆ pLocale

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

Definition at line 533 of file global.hxx.

Referenced by Clear(), and GetLocale().

◆ pSharedStringPoolPurge

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

Definition at line 537 of file global.hxx.

Referenced by Clear(), and GetSharedStringPoolPurge().

◆ pTransliteration

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

Definition at line 531 of file global.hxx.

Referenced by Clear(), and GetTransliteration().

◆ pUnitConverter

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

Definition at line 523 of file global.hxx.

Referenced by Clear(), and GetUnitConverter().

◆ xAutoFormat

std::unique_ptr< ScAutoFormat > ScGlobal::xAutoFormat

Definition at line 512 of file global.hxx.

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

◆ xButtonBrushItem

std::unique_ptr< SvxBrushItem > ScGlobal::xButtonBrushItem

Definition at line 518 of file global.hxx.

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

◆ xDrawClipDocShellRef

tools::SvRef< ScDocShell > ScGlobal::xDrawClipDocShellRef

◆ xEmptyBrushItem

std::unique_ptr< SvxBrushItem > ScGlobal::xEmptyBrushItem

Definition at line 517 of file global.hxx.

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

◆ xEnglishFormatter

std::unique_ptr< SvNumberFormatter > ScGlobal::xEnglishFormatter

Definition at line 525 of file global.hxx.

Referenced by Clear(), and GetEnglishFormatter().

◆ xFieldEditEngine

std::unique_ptr< ScFieldEditEngine > ScGlobal::xFieldEditEngine

Definition at line 535 of file global.hxx.

Referenced by Clear(), and GetStaticFieldEditEngine().

◆ xOrdinalSuffix

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

Definition at line 527 of file global.hxx.

Referenced by GetOrdinalSuffix().

◆ xSearchItem

std::unique_ptr< SvxSearchItem > ScGlobal::xSearchItem

Definition at line 511 of file global.hxx.

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

◆ xStarCalcFunctionList

std::unique_ptr< ScFunctionList > ScGlobal::xStarCalcFunctionList

◆ xStarCalcFunctionMgr

std::unique_ptr< ScFunctionMgr > ScGlobal::xStarCalcFunctionMgr

Definition at line 521 of file global.hxx.

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

◆ xUserList

std::unique_ptr< ScUserList > ScGlobal::xUserList

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: