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::TransliterationWrapper & GetTransliteration ()
::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 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 (const OUString &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_... 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

Detailed Description

Definition at line 496 of file global.hxx.

Member Function Documentation

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

Definition at line 963 of file global.cxx.

References ATTR_LANGUAGE_FORMAT(), ATTR_VALUE_FORMAT(), SfxItemSet::Get(), SvNumberFormatter::GetEntry(), SfxItemSet::GetItemIfSet(), SfxItemSet::GetItemState(), SvNumberformat::GetLanguage(), SfxItemSet::GetParent(), and SfxItemSet::Put().

Referenced by XclImpNumFmtBuffer::FillScFmtToItemSet(), and oox::xls::NumberFormat::fillToItemSet().

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 680 of file global.cxx.

Referenced by ScfTools::GetHTMLNameFromName().

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

bool ScGlobal::CheckWidthInvalidate ( bool &  bNumFormatChanged,
const SfxItemSet rNewAttrs,
const SfxItemSet rOldAttrs 
void ScGlobal::Clear ( )
void ScGlobal::ClearAutoFormat ( )

Definition at line 244 of file global.cxx.

References bThreadedGroupCalcInProgress, and xAutoFormat.

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

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 358 of file global2.cxx.

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

Referenced by ScInterpreter::ConvertStringToValue().

bool ScGlobal::EETextObjEqual ( const EditTextObject pObj1,
const EditTextObject pObj2 
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 693 of file global.cxx.

References IsQuoted().

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

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 709 of file global.cxx.

References p.

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

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 735 of file global.cxx.

References p.

OUString ScGlobal::GetAbsDocName ( const OUString &  rFileName,
const SfxObjectShell pShell 
ScUnoAddInCollection * ScGlobal::GetAddInCollection ( )
ScAutoFormat * ScGlobal::GetAutoFormat ( )

Definition at line 257 of file global.cxx.

References xAutoFormat.

Referenced by ScAutoFormatObj::~ScAutoFormatObj().

SvxBrushItem * ScGlobal::GetButtonBrushItem ( )
CalendarWrapper & ScGlobal::GetCalendar ( )
CollatorWrapper & ScGlobal::GetCaseCollator ( )
utl::TransliterationWrapper & ScGlobal::GetCaseTransliteration ( )
const CharClass & ScGlobal::getCharClass ( )

Definition at line 1024 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(), ScCompiler::EnQuote(), ScDocShell::Execute(), ScAreaLink::FindExtRange(), ScRangeManagerTable::findRangeData(), ScExternalRefCache::DocItem::findTableNameIndex(), ScExternalRefCache::getCacheTable(), ScUnoAddInCollection::GetCalcName(), sc::ScDBDataManager::getDBData(), ScDocShell::GetDBData(), ScDatabaseRangeObj::GetDBData_Impl(), ScExternalRefManager::getDoubleRefTokensFromSrcDoc(), ScParameterClassification::GetExternalParameterType(), 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(), ScNamedRangesObj::hasByName(), ScDatabaseRangesObj::hasByName(), IMPL_LINK_NOARG(), ScExternalRefCache::initializeDoc(), ScUserListData::InitTokens(), ScViewFunc::InsertName(), ScCompiler::IsCharFlagAllConventions(), ScNameDefDlg::IsNameValid(), ScNameDlg::IsNameValid(), ScExternalRefCache::isValidRangeName(), lcl_AddFunctionToken(), lcl_FillRangeFromName(), lcl_GetDBAreaRange(), lcl_GetRange(), lcl_PutString(), ScRangeUtil::MakeRangeFromName(), ScNamedRangeObj::Modify_Impl(), ScNameDlg::NameModified(), ScCompiler::NextNewToken(), ScCompiler::NextSymbol(), ScCompiler::ParseSingleReference(), ScNamedRangesObj::removeByName(), ScNameDlg::RemovePushed(), ScDBDocFunc::RenameDBRange(), ScDBDocFunc::RepeatDB(), ScDBData::ScDBData(), ScInterpreter::ScExternal(), ScInterpreter::ScIndirect(), 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(), ScHTMLImport::WriteToDocument(), and ScEEImport::WriteToDocument().

OUString ScGlobal::GetCharsetString ( rtl_TextEncoding  eVal)
rtl_TextEncoding ScGlobal::GetCharsetValue ( std::u16string_view  rCharSet)
const OUString & ScGlobal::GetClipDocName ( )

Definition at line 488 of file global.cxx.

References aStrClipDocName.

Referenced by ScImportExport::ExportStream().

CollatorWrapper & ScGlobal::GetCollator ( )
CollatorWrapper & ScGlobal::GetCollator ( bool  bCaseSensitive)

Definition at line 1077 of file global.cxx.

References GetCaseCollator(), and GetCollator().

SvtScriptType ScGlobal::GetDefaultScriptType ( )
OUString ScGlobal::GetDocTabName ( std::u16string_view  rFileName,
std::u16string_view  rTabName 
LanguageType ScGlobal::GetEditDefaultLanguage ( )
static SvxBrushItem* ScGlobal::GetEmptyBrushItem ( )
SvNumberFormatter * ScGlobal::GetEnglishFormatter ( )

a "ReadOnly" formatter for UNO/XML export

Definition at line 170 of file global.cxx.

References bThreadedGroupCalcInProgress, comphelper::getProcessComponentContext(), LANGUAGE_ENGLISH_US, NF_EVALDATEFORMAT_INTL_FORMAT, and xEnglishFormatter.

Referenced by lcl_GetInputString().

OUString ScGlobal::GetErrorString ( FormulaError  nErrNumber)
LegacyFuncCollection * ScGlobal::GetLegacyFuncCollection ( )
css::lang::Locale & ScGlobal::GetLocale ( )
const LocaleDataWrapper & ScGlobal::getLocaleData ( )
OUString ScGlobal::GetLongErrorString ( FormulaError  nErrNumber)

Definition at line 343 of file global.cxx.

References ScResId().

Referenced by ScTabViewShell::GetFunction().

ScAutoFormat * ScGlobal::GetOrCreateAutoFormat ( )
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(), comphelper::getProcessComponentContext(), TOOLS_WARN_EXCEPTION, and xOrdinalSuffix.

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

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 875 of file global.cxx.


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

const SvxSearchItem & ScGlobal::GetSearchItem ( )
sc::SharedStringPoolPurge & ScGlobal::GetSharedStringPoolPurge ( )

Definition at line 1101 of file global.cxx.

References comphelper::doubleCheckedInit(), and pSharedStringPoolPurge.

Referenced by ScDocument::~ScDocument().

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

Definition at line 165 of file global.cxx.

References nStdRowHeight.

ScFunctionList * ScGlobal::GetStarCalcFunctionList ( )
ScFunctionMgr * ScGlobal::GetStarCalcFunctionMgr ( )
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 1087 of file global.cxx.

References bThreadedGroupCalcInProgress, and xFieldEditEngine.

Referenced by ScEditUtil::GetString().

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

Definition at line 1010 of file global.cxx.

References GetCaseTransliteration(), and GetTransliteration().

ScUnitConverter * ScGlobal::GetUnitConverter ( )

Definition at line 645 of file global.cxx.

References comphelper::doubleCheckedInit(), and pUnitConverter.

Referenced by ScInterpreter::ScConvertOOo().

ScUserList * ScGlobal::GetUserList ( )
bool ScGlobal::HasAttrChanged ( const SfxItemSet rNewAttrs,
const SfxItemSet rOldAttrs,
const sal_uInt16  nWhich 
bool ScGlobal::HasStarCalcFunctionList ( )

Definition at line 615 of file global.cxx.

References xStarCalcFunctionList.

Referenced by ScUnoAddInCollection::UpdateFromAddIn().

void ScGlobal::Init ( void  )
void ScGlobal::InitAddIns ( )
void ScGlobal::InitPPT ( )
void ScGlobal::InitTextHeight ( const SfxItemPool pPool)
bool ScGlobal::IsQuoted ( const OUString &  rString,
sal_Unicode  cQuote 

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

Definition at line 675 of file global.cxx.

Referenced by EraseQuotes().

bool ScGlobal::IsSystemRTL ( )
void ScGlobal::OpenURL ( const OUString &  rURL,
const OUString &  rTarget,
bool  bIgnoreSettings = false 
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 1107 of file global.cxx.

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

void ScGlobal::ResetFunctionList ( )

Definition at line 638 of file global.cxx.

References xStarCalcFunctionList, and xStarCalcFunctionMgr.

Referenced by ScAddInCfg::Notify(), and ScDocShell::SetFormulaOptions().

void ScGlobal::SetClipDocName ( const OUString &  rNew)
void ScGlobal::SetSearchItem ( const SvxSearchItem rNew)
void ScGlobal::SetUserList ( const ScUserList pNewList)

Definition at line 295 of file global.cxx.

References bThreadedGroupCalcInProgress, and xUserList.

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

bool ScGlobal::ShouldOpenURL ( )

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

Definition at line 836 of file global.cxx.

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

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

static sal_Unicode ScGlobal::ToUpperAlpha ( sal_Unicode  c)

Definition at line 615 of file global.hxx.

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

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 651 of file global.cxx.

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

Member Data Documentation

OUString ScGlobal::aStrClipDocName

Definition at line 503 of file global.hxx.

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

bool ScGlobal::bThreadedGroupCalcInProgress = false
constexpr sal_Unicode ScGlobal::cListDelimiter = ','

Definition at line 546 of file global.hxx.

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

LanguageType ScGlobal::eLnge = LANGUAGE_SYSTEM
sal_uInt16 ScGlobal::nDefFontHeight = 225

Definition at line 580 of file global.hxx.

Referenced by InitTextHeight().

tools::Long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH

Definition at line 584 of file global.hxx.

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

tools::Long ScGlobal::nLastRowHeightExtra = 0

Definition at line 583 of file global.hxx.

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

double ScGlobal::nScreenPPTX = 96.0
double ScGlobal::nScreenPPTY = 96.0
sal_uInt16 ScGlobal::nStdRowHeight = 256
std::optional< CalendarWrapper > ScGlobal::oCalendar

Definition at line 515 of file global.hxx.

Referenced by Clear(), and GetCalendar().

std::optional< SvtSysLocale > ScGlobal::oSysLocale
std::atomic< ScUnoAddInCollection * > ScGlobal::pAddInCollection

Definition at line 501 of file global.hxx.

Referenced by Clear(), and GetAddInCollection().

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

Definition at line 516 of file global.hxx.

Referenced by Clear(), and GetCaseCollator().

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

Definition at line 519 of file global.hxx.

Referenced by Clear(), and GetCaseTransliteration().

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

Definition at line 517 of file global.hxx.

Referenced by Clear(), and GetCollator().

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

Definition at line 500 of file global.hxx.

Referenced by Clear(), and GetLegacyFuncCollection().

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

Definition at line 520 of file global.hxx.

Referenced by Clear(), and GetLocale().

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

Definition at line 524 of file global.hxx.

Referenced by Clear(), and GetSharedStringPoolPurge().

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

Definition at line 518 of file global.hxx.

Referenced by Clear(), and GetTransliteration().

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

Definition at line 510 of file global.hxx.

Referenced by Clear(), and GetUnitConverter().

std::unique_ptr< ScAutoFormat > ScGlobal::xAutoFormat

Definition at line 499 of file global.hxx.

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

std::unique_ptr< SvxBrushItem > ScGlobal::xButtonBrushItem

Definition at line 505 of file global.hxx.

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

tools::SvRef< ScDocShell > ScGlobal::xDrawClipDocShellRef
std::unique_ptr< SvxBrushItem > ScGlobal::xEmptyBrushItem

Definition at line 504 of file global.hxx.

Referenced by Clear(), and Init().

std::unique_ptr< SvNumberFormatter > ScGlobal::xEnglishFormatter

Definition at line 512 of file global.hxx.

Referenced by Clear(), and GetEnglishFormatter().

std::unique_ptr< ScFieldEditEngine > ScGlobal::xFieldEditEngine

Definition at line 522 of file global.hxx.

Referenced by Clear(), and GetStaticFieldEditEngine().

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

Definition at line 514 of file global.hxx.

Referenced by GetOrdinalSuffix().

std::unique_ptr< SvxSearchItem > ScGlobal::xSearchItem

Definition at line 498 of file global.hxx.

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

std::unique_ptr< ScFunctionList > ScGlobal::xStarCalcFunctionList
std::unique_ptr< ScFunctionMgr > ScGlobal::xStarCalcFunctionMgr

Definition at line 508 of file global.hxx.

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

std::unique_ptr< ScUserList > ScGlobal::xUserList

Definition at line 502 of file global.hxx.

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

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