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 LocaleDataWrappergetLocaleDataPtr ()
static SC_DLLPUBLIC const CharClassgetCharClassPtr ()
static CalendarWrapperGetCalendar ()
static SC_DLLPUBLIC CollatorWrapperGetCollator ()
static CollatorWrapperGetCaseCollator ()
static css::lang::Locale * GetLocale ()
static SC_DLLPUBLIC::utl::TransliterationWrapper * GetpTransliteration ()
::utl::TransliterationWrapperGetCaseTransliteration ()
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 (const OUString &rFileName, const OUString &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 const OUString & GetEmptyOUString ()
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 (const OUString &rTokenList, const OUString &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 (const OUString &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_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::unique_ptr< SvtSysLocalexSysLocale
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 SC_DLLPUBLIC const OUString aEmptyOUString
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::unique_ptr< CalendarWrapperxCalendar
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

Detailed Description

Definition at line 504 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 954 of file global.cxx.

References ATTR_LANGUAGE_FORMAT(), ATTR_VALUE_FORMAT(), SfxItemSet::Get(), SvNumberFormatter::GetEntry(), SfxItemSet::GetItemState(), SvNumberformat::GetLanguage(), SfxItemSet::GetParent(), GetValue, 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 671 of file global.cxx.

Referenced by ScfTools::GetHTMLNameFromName().

OUString ScGlobal::addToken ( const OUString &  rTokenList,
const OUString &  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 656 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 234 of file global.cxx.

References assert(), 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 355 of file global2.cxx.

References day, SvNumberFormatter::GetNullDate(), ScCalcConfig::ILLEGAL, SvNumberFormatter::IsNumberFormat(), Date::IsValidDate(), ScCalcConfig::LOCALE, ScCalcConfig::mbEmptyStringAsZero, ScCalcConfig::meStringConversion, month, SAL_WARN, stop(), 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 684 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 700 of file global.cxx.

References assert(), and p.

Referenced by ConvertDoubleRef(), ConvertSingleRef(), ScCompiler::GetDocTabPos(), ScRangeStringConverter::GetRangeDataFromString(), ScCompiler::IsReference(), lcl_ScAddress_Parse_OOo(), lcl_ScRange_Parse_OOo(), 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 726 of file global.cxx.

References p.

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

Definition at line 247 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::getCharClassPtr ( )

Definition at line 1011 of file global.cxx.

References xSysLocale.

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(), lcl_AddFunctionToken(), lcl_FillRangeFromName(), lcl_GetDBAreaRange(), lcl_GetRange(), lcl_PutString(), ScRangeUtil::MakeRangeFromName(), ScNamedRangeObj::Modify_Impl(), ScNameDlg::NameModified(), ScCompiler::NextNewToken(), ScNamedRangesObj::removeByName(), ScNameDlg::RemovePushed(), ScDBDocFunc::RenameDBRange(), ScDBDocFunc::RepeatDB(), ScDBData::ScDBData(), 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 ( const OUString &  rCharSet)
const OUString & ScGlobal::GetClipDocName ( )

Definition at line 480 of file global.cxx.

References aStrClipDocName.

Referenced by ScImportExport::ExportStream().

CollatorWrapper * ScGlobal::GetCollator ( )
SvtScriptType ScGlobal::GetDefaultScriptType ( )
OUString ScGlobal::GetDocTabName ( const OUString &  rFileName,
const OUString &  rTabName 
LanguageType ScGlobal::GetEditDefaultLanguage ( )
static SvxBrushItem* ScGlobal::GetEmptyBrushItem ( )
static const OUString& ScGlobal::GetEmptyOUString ( )

Definition at line 596 of file global.hxx.

Referenced by ScInterpreter::ScCellExternal().

SvNumberFormatter * ScGlobal::GetEnglishFormatter ( )

a "ReadOnly" formatter for UNO/XML export

Definition at line 166 of file global.cxx.

References assert(), 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::getLocaleDataPtr ( )
OUString ScGlobal::GetLongErrorString ( FormulaError  nErrNumber)

Definition at line 333 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 119 of file globalx.cxx.

References Exception, getLanguageTag(), getLocale(), getLocaleDataPtr(), comphelper::getProcessComponentContext(), and xOrdinalSuffix.

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

utl::TransliterationWrapper * ScGlobal::GetpTransliteration ( )
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 866 of file global.cxx.


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

const SvxSearchItem & ScGlobal::GetSearchItem ( )
sal_uInt32 ScGlobal::GetStandardFormat ( SvNumberFormatter rFormatter,
sal_uInt32  nFormat,
SvNumFormatType  nType 
sal_uInt16 ScGlobal::GetStandardRowHeight ( )

Definition at line 161 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 1056 of file global.cxx.

References assert(), bThreadedGroupCalcInProgress, and xFieldEditEngine.

Referenced by ScEditUtil::GetString().

ScUnitConverter * ScGlobal::GetUnitConverter ( )

Definition at line 636 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 606 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 666 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 1070 of file global.cxx.

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

void ScGlobal::ResetFunctionList ( )

Definition at line 629 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 285 of file global.cxx.

References assert(), bThreadedGroupCalcInProgress, and xUserList.

Referenced by lcl_SetSortList(), and ScModule::ModifyOptions().

bool ScGlobal::ShouldOpenURL ( )

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

Definition at line 826 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 619 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 642 of file global.cxx.

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

Member Data Documentation

const OUString ScGlobal::aEmptyOUString

Definition at line 511 of file global.hxx.

OUString ScGlobal::aStrClipDocName

Definition at line 512 of file global.hxx.

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

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

Definition at line 549 of file global.hxx.

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

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

Definition at line 583 of file global.hxx.

Referenced by InitTextHeight().

tools::Long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH

Definition at line 587 of file global.hxx.

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

tools::Long ScGlobal::nLastRowHeightExtra = 0

Definition at line 586 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::atomic< ScUnoAddInCollection * > ScGlobal::pAddInCollection

Definition at line 509 of file global.hxx.

Referenced by Clear(), and GetAddInCollection().

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

Definition at line 525 of file global.hxx.

Referenced by Clear(), and GetCaseCollator().

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

Definition at line 528 of file global.hxx.

Referenced by Clear(), and GetCaseTransliteration().

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

Definition at line 526 of file global.hxx.

Referenced by Clear(), and GetCollator().

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

Definition at line 508 of file global.hxx.

Referenced by Clear(), and GetLegacyFuncCollection().

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

Definition at line 529 of file global.hxx.

Referenced by Clear(), and GetLocale().

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

Definition at line 527 of file global.hxx.

Referenced by Clear(), and GetpTransliteration().

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

Definition at line 519 of file global.hxx.

Referenced by Clear(), and GetUnitConverter().

std::unique_ptr< ScAutoFormat > ScGlobal::xAutoFormat

Definition at line 507 of file global.hxx.

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

std::unique_ptr< SvxBrushItem > ScGlobal::xButtonBrushItem

Definition at line 514 of file global.hxx.

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

std::unique_ptr< CalendarWrapper > ScGlobal::xCalendar

Definition at line 524 of file global.hxx.

Referenced by Clear(), and GetCalendar().

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

Definition at line 513 of file global.hxx.

Referenced by Clear(), and Init().

std::unique_ptr< SvNumberFormatter > ScGlobal::xEnglishFormatter

Definition at line 521 of file global.hxx.

Referenced by Clear(), and GetEnglishFormatter().

std::unique_ptr< ScFieldEditEngine > ScGlobal::xFieldEditEngine

Definition at line 531 of file global.hxx.

Referenced by Clear(), and GetStaticFieldEditEngine().

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

Definition at line 523 of file global.hxx.

Referenced by GetOrdinalSuffix().

std::unique_ptr< SvxSearchItem > ScGlobal::xSearchItem

Definition at line 506 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 517 of file global.hxx.

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

std::unique_ptr< SvtSysLocale > ScGlobal::xSysLocale
std::unique_ptr< ScUserList > ScGlobal::xUserList

Definition at line 510 of file global.hxx.

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

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