LibreOffice Module sc (master) 1
global.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include "address.hxx"
23#include "typedstrdata.hxx"
24#include <i18nlangtag/lang.h>
25#include <svx/svdtypes.hxx>
26#include <tools/ref.hxx>
27#include <sal/types.h>
28#include <com/sun/star/i18n/CollatorOptions.hpp>
29#include "scdllapi.h"
30#include <rtl/ustring.hxx>
31#include <tools/long.hxx>
33
34#include <atomic>
35// HACK: <atomic> includes <stdbool.h>, which in some Clang versions does '#define bool bool',
36// which confuses clang plugins.
37#undef bool
38
39#include <memory>
40#include <optional>
41#include <string_view>
42
43namespace com::sun::star::uno { template <typename > class Reference; }
44
45class SfxItemSet;
46class SfxViewShell;
47struct ScCalcConfig;
48enum class SvtScriptType : sal_uInt8;
49enum class FormulaError : sal_uInt16;
50enum class SvNumFormatType : sal_Int16;
51
52#define SC_COLLATOR_IGNORES css::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE
53
54// Calc has lots of names...
55// Clipboard names are in so3/soapp.hxx now
56// STRING_SCAPP was "scalc3", "scalc4", now just "scalc"
57
58inline constexpr OUStringLiteral STRING_SCAPP = u"scalc";
59
60inline constexpr OUStringLiteral STRING_STANDARD = u"Standard";
61
62// Have the dreaded programmatic filter name defined in one place.
63inline constexpr OUStringLiteral SC_TEXT_CSV_FILTER_NAME = u"Text - txt - csv (StarCalc)";
64
65// characters
66
67const sal_Unicode CHAR_NBSP = 0x00A0;
68const sal_Unicode CHAR_SHY = 0x00AD;
69const sal_Unicode CHAR_ZWSP = 0x200B;
70const sal_Unicode CHAR_LRM = 0x200E;
71const sal_Unicode CHAR_RLM = 0x200F;
72const sal_Unicode CHAR_NBHY = 0x2011;
73const sal_Unicode CHAR_WJ = 0x2060;
74const sal_Unicode CHAR_NNBSP = 0x202F; //NARROW NO-BREAK SPACE
75
76#define MINDOUBLE 1.7e-307
77#define MAXDOUBLE 1.7e307
78
79const sal_uInt16 MINZOOM = 20;
80const sal_uInt16 MAXZOOM = 400;
81
83
84// ~105.88 twip, i.e. about 2 times narrower than o3tl::Length::ch, which is 210 twip
85constexpr auto TWIPS_PER_CHAR = o3tl::toTwips(1 / 13.6, o3tl::Length::in);
86
89
94
95 /* standard row height: text + margin - STD_ROWHEIGHT_DIFF */
96#define STD_ROWHEIGHT_DIFF 23
97
98namespace sc
99{
100 constexpr ::tools::Long TwipsToEvenHMM( ::tools::Long nTwips ) { return o3tl::convert(nTwips, 127, 144) * 2; }
101}
102
103 // standard size as OLE server (cells)
104#define OLE_STD_CELLS_X 4
105#define OLE_STD_CELLS_Y 5
106
107
108 // repaint flags (for messages)
109enum class PaintPartFlags {
110 NONE = 0x00,
111 Grid = 0x01,
112 Top = 0x02,
113 Left = 0x04,
114 Extras = 0x08,
115 Marks = 0x10,
116 Objects = 0x20,
117 Size = 0x40,
118 All = Grid | Top | Left | Extras | Objects | Size,
119};
120namespace o3tl {
121 template<> struct typed_flags<PaintPartFlags> : is_typed_flags<PaintPartFlags, 0x07f> {};
122}
123
124 // flags for columns / rows
125enum class CRFlags : sal_uInt8 {
126 // Filtered always together with Hidden
127 // Filtered and ManualSize only valid for rows
128 NONE = 0x00,
129 Hidden = 0x01,
130 ManualBreak = 0x02,
131 Filtered = 0x04,
132 ManualSize = 0x08,
134};
135namespace o3tl {
136 template<> struct typed_flags<CRFlags> : is_typed_flags<CRFlags, 0x0f> {};
137}
138
139enum class ScBreakType {
140 NONE = 0x00,
141 Page = 0x01,
142 Manual = 0x02
143};
144namespace o3tl {
145 template<> struct typed_flags<ScBreakType> : is_typed_flags<ScBreakType, 0x03> {};
146}
147
148enum class InsertDeleteFlags : sal_uInt16
149{
150 NONE = 0x0000,
151 VALUE = 0x0001,
152 DATETIME = 0x0002,
153 STRING = 0x0004,
154 NOTE = 0x0008,
155 FORMULA = 0x0010,
156 HARDATTR = 0x0020,
157 STYLES = 0x0040,
158 OBJECTS = 0x0080,
159 EDITATTR = 0x0100,
160 OUTLINE = 0x0800,
161 SPARKLINES = 0x4000,
162 NOCAPTIONS = 0x0200,
163 ADDNOTES = 0x0400,
164 SPECIAL_BOOLEAN = 0x1000,
165 FORGETCAPTIONS = 0x2000,
167 CONTENTS = VALUE | DATETIME | STRING | NOTE | FORMULA | OUTLINE | SPARKLINES,
168 // tdf#116127 - add EDITATTR to ALL flags in order to check for valid function inputs
171 AUTOFILL = ALL & ~(NOTE | OBJECTS)
172};
173namespace o3tl
174{
175 template<> struct typed_flags<InsertDeleteFlags> : is_typed_flags<InsertDeleteFlags, 0x7fff> {};
176}
177// This doesn't work at the moment, perhaps when we have constexpr we can modify InsertDeleteFlags to make it work.
178//static_assert((InsertDeleteFlags::ATTRIB & InsertDeleteFlags::CONTENTS) == InsertDeleteFlags::NONE, "these must match");
179
180
181enum class ScPasteFunc {
182 NONE, ADD, SUB, MUL, DIV
183};
184 // bits for HasAttr
185enum class HasAttrFlags {
186 NONE = 0x0000,
187 Lines = 0x0001,
188 Merged = 0x0002,
189 Overlapped = 0x0004,
190 Protected = 0x0008,
191 Shadow = 0x0010,
192 NeedHeight = 0x0020,
193 ShadowRight = 0x0040,
194 ShadowDown = 0x0080,
195 AutoFilter = 0x0100,
196 Conditional = 0x0200,
197 Rotate = 0x0400,
198 NotOverlapped = 0x0800,
199 RightOrCenter = 0x1000, // right or centered logical alignment
200};
201namespace o3tl {
202 template<> struct typed_flags<HasAttrFlags> : is_typed_flags<HasAttrFlags, 0x1fff> {};
203}
204
205
206// Layer id's for drawing.
207// These are both id's and positions.
213
214// link tables
215enum class ScLinkMode {
217};
218 // input
219enum class ScEnterMode {
221};
222
223 // step = 10pt, max. indention = 100 steps
224#define SC_INDENT_STEP 200
225
226enum class ScScenarioFlags{ // scenario flags
227 NONE = 0,
228 CopyAll = 1,
229 ShowFrame = 2,
230 PrintFrame = 4,
231 TwoWay = 8,
232 Attrib = 16,
233 Value = 32,
234 Protected = 64
235};
236namespace o3tl {
237 template<> struct typed_flags<ScScenarioFlags> : is_typed_flags<ScScenarioFlags, 127> {};
238}
239
240enum class SubtotalFlags {
241 NONE = 0x00,
242 IgnoreNestedStAg = 0x08,
243 IgnoreErrVal = 0x04,
244 IgnoreHidden = 0x02,
245 IgnoreFiltered = 0x01
246};
247namespace o3tl {
248 template<> struct typed_flags<SubtotalFlags> : is_typed_flags<SubtotalFlags, 0x0f> {};
249}
250
251enum class ScCloneFlags{
254 Default = 0x0000,
255
257 StartListening = 0x0001,
258
260 NoMakeAbsExternal = 0x0002,
261
264 NamesToLocal = 0x0004
265};
266namespace o3tl
267{
268 template<> struct typed_flags<ScCloneFlags> : is_typed_flags<ScCloneFlags, 0x0007> {};
269}
270
272 {
278 };
279
280enum class DelCellCmd
281 {
282 CellsUp,
283 CellsLeft,
284 Rows,
285 Cols,
286 NONE
287 };
288
290 {
298 };
299
301 {
306 };
307
309 {
314 };
315
317 {
323 };
324
326{
332
334 {
340 };
341
343 {
348 };
349
351 {
352 SC_SIZE_DIRECT, // set size or hide if value is 0
353 SC_SIZE_OPTIMAL, // set optimal size for everything
354 SC_SIZE_SHOW, // show with original size
355 SC_SIZE_VISOPT, // set optimal size only if visible
356 SC_SIZE_ORIGINAL // only set size, don't change visible flag
357 };
358
360 {
362 SC_INPUT_TYPE, // input, while not in inplace mode
363 SC_INPUT_TABLE, // text cursor in the table
364 SC_INPUT_TOP // text cursor in the input line
365 };
366
367enum ScVObjMode // output modes of objects on a page
368{
372
373enum ScAnchorType // anchor of a character object
374{
375 SCA_CELL, // anchor to cell, move with cell
376 SCA_CELL_RESIZE, // anchor to cell, move and resize with cell
377 SCA_PAGE, // anchor to page, independent of any cells
378 SCA_DONTKNOW // for multi selection
380
382{
386 SC_DB_OLD
388
391{
393 Keep,
394
397
402 RowDown,
403
407};
408
409enum ScLkUpdMode // modes for updating links
410{
416
417// enum with values equal to old DBObject enum from sdb
419{
423
424namespace sc {
425
427{
428 Unknown,
435};
436
437}
438
440{
446 OUString aDBName; // alias of data base
447 OUString aStatement;
449 bool bSql; // statement or name?
450 sal_uInt8 nType; // enum DBObject
451
453 ScImportParam( const ScImportParam& r );
455
457 bool operator== ( const ScImportParam& r ) const;
458};
459
460// Formula data replacement character for a pair of parentheses at end of
461// function name, to force sorting parentheses before all other characters.
462// Collation may treat parentheses differently.
465{
468 std::set<sal_Unicode> maFunctionChar;
469};
470
471class ScDocShell;
472class SvxSearchItem;
473class ScAutoFormat;
476class ScUserList;
477class SvxBrushItem;
478class ScFunctionList;
479class ScFunctionMgr;
480class SfxItemPool;
481class EditTextObject;
482class SfxObjectShell;
484class ScUnitConverter;
485class CharClass;
487class SvtSysLocale;
488class CalendarWrapper;
489class CollatorWrapper;
490class IntlWrapper;
492
493namespace com::sun::star {
494 namespace lang {
495 struct Locale;
496 }
497 namespace i18n {
498 class XOrdinalSuffix;
499 }
500}
501namespace utl {
502 class TransliterationWrapper;
503}
504
505namespace sc {
506 class SharedStringPoolPurge;
507}
508
510{
511 static std::unique_ptr<SvxSearchItem> xSearchItem;
512 static std::unique_ptr<ScAutoFormat> xAutoFormat;
513 static std::atomic<LegacyFuncCollection*> pLegacyFuncCollection;
514 static std::atomic<ScUnoAddInCollection*> pAddInCollection;
515 static std::unique_ptr<ScUserList> xUserList;
516 static OUString aStrClipDocName;
517 static std::unique_ptr<SvxBrushItem> xEmptyBrushItem;
518 static std::unique_ptr<SvxBrushItem> xButtonBrushItem;
519
520 static std::unique_ptr<ScFunctionList> xStarCalcFunctionList;
521 static std::unique_ptr<ScFunctionMgr> xStarCalcFunctionMgr;
522
523 static std::atomic<ScUnitConverter*> pUnitConverter;
524
525 static std::unique_ptr<SvNumberFormatter> xEnglishFormatter; // for UNO / XML export
526
527 static css::uno::Reference< css::i18n::XOrdinalSuffix> xOrdinalSuffix;
528 static std::optional<CalendarWrapper> oCalendar;
529 static std::atomic<CollatorWrapper*> pCaseCollator;
530 static std::atomic<CollatorWrapper*> pCollator;
531 static std::atomic<::utl::TransliterationWrapper*> pTransliteration;
532 static std::atomic<::utl::TransliterationWrapper*> pCaseTransliteration;
533 static std::atomic<css::lang::Locale*> pLocale;
534
535 static std::unique_ptr<ScFieldEditEngine> xFieldEditEngine;
536
537 static std::atomic<sc::SharedStringPoolPurge*> pSharedStringPoolPurge;
538
540
541 static void InitPPT();
542
543public:
544 static std::optional<SvtSysLocale> oSysLocale;
546 SC_DLLPUBLIC static const CharClass& getCharClass();
547
553 static CollatorWrapper& GetCollator(bool bCaseSensitive);
554 static css::lang::Locale& GetLocale();
555
556 SC_DLLPUBLIC static ::utl::TransliterationWrapper& GetTransliteration();
557 static ::utl::TransliterationWrapper& GetCaseTransliteration();
558 static ::utl::TransliterationWrapper& GetTransliteration(bool bCaseSensitive);
559
561 static constexpr sal_Unicode cListDelimiter = ',';
562
563 static const OUString& GetClipDocName();
564 static void SetClipDocName( const OUString& rNew );
566 SC_DLLPUBLIC static void SetSearchItem( const SvxSearchItem& rNew );
569 static void ClearAutoFormat(); //BugId 54209
573 static void SetUserList( const ScUserList* pNewList );
578 static void OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgnoreSettings = false);
580 static bool ShouldOpenURL();
581 SC_DLLPUBLIC static OUString GetAbsDocName( const OUString& rFileName,
582 const SfxObjectShell* pShell );
583 SC_DLLPUBLIC static OUString GetDocTabName( std::u16string_view rFileName,
584 std::u16string_view rTabName );
585 SC_DLLPUBLIC static sal_uInt32 GetStandardFormat( SvNumberFormatter&, sal_uInt32 nFormat, SvNumFormatType nType );
586
587 SC_DLLPUBLIC static sal_uInt16 GetStandardRowHeight();
592
594
595 static sal_uInt16 nDefFontHeight;
596 SC_DLLPUBLIC static sal_uInt16 nStdRowHeight;
597
598 SC_DLLPUBLIC static ::tools::Long nLastRowHeightExtra;
599 static ::tools::Long nLastColWidthExtra;
600
601 SC_DLLPUBLIC static void Init(); // during start up
602 static void InitAddIns();
603 SC_DLLPUBLIC static void Clear(); // at the end of the program
604
605 static void InitTextHeight(const SfxItemPool* pPool);
608
609 static bool HasStarCalcFunctionList();
612 static void ResetFunctionList();
614
615 static OUString GetErrorString(FormulaError nErrNumber);
616 static OUString GetLongErrorString(FormulaError nErrNumber);
617 static bool EETextObjEqual( const EditTextObject* pObj1,
618 const EditTextObject* pObj2 );
619 static bool CheckWidthInvalidate( bool& bNumFormatChanged,
620 const SfxItemSet& rNewAttrs,
621 const SfxItemSet& rOldAttrs );
622 static bool HasAttrChanged( const SfxItemSet& rNewAttrs,
623 const SfxItemSet& rOldAttrs,
624 const sal_uInt16 nWhich );
625
627
629 static const sal_Unicode* UnicodeStrChr( const sal_Unicode* pStr, sal_Unicode c );
630
632 { return ( c >= 'a' && c <= 'z' ) ? ( c-'a'+'A' ) : c; }
633
640 SC_DLLPUBLIC static OUString addToken(
641 std::u16string_view rTokenList, std::u16string_view rToken,
642 sal_Unicode cSep, sal_Int32 nSepCount = 1,
643 bool bForceSep = false );
644
646 SC_DLLPUBLIC static bool IsQuoted( std::u16string_view rString, sal_Unicode cQuote );
647
652 SC_DLLPUBLIC static void AddQuotes( OUString& rString, sal_Unicode cQuote, bool bEscapeEmbedded = true );
653
659 SC_DLLPUBLIC static void EraseQuotes( OUString& rString, sal_Unicode cQuote, bool bUnescapeEmbedded = true );
660
669 SC_DLLPUBLIC static sal_Int32 FindUnquoted( const OUString& rString, sal_Unicode cChar, sal_Int32 nStart = 0 );
670
675 SC_DLLPUBLIC static const sal_Unicode* FindUnquoted( const sal_Unicode* pString, sal_Unicode cChar );
676
677 static rtl_TextEncoding GetCharsetValue( std::u16string_view rCharSet );
678 static OUString GetCharsetString( rtl_TextEncoding eVal );
679
682
683 static bool IsSystemRTL(); // depending on system language
684 static LanguageType GetEditDefaultLanguage(); // for EditEngine::SetDefaultLanguage
685 SC_DLLPUBLIC static SvtScriptType GetDefaultScriptType(); // for all WEAK characters
689 SC_DLLPUBLIC static sal_uInt16 GetScriptedWhichID( SvtScriptType nScriptType, sal_uInt16 nWhich );
690
693 SC_DLLPUBLIC static void AddLanguage( SfxItemSet& rSet, const SvNumberFormatter& rFormatter );
694
696 static OUString GetOrdinalSuffix( sal_Int32 nNumber);
697
701
703
713 SC_DLLPUBLIC static OUString ReplaceOrAppend( const OUString& rString,
714 std::u16string_view rPlaceholder,
715 const OUString& rReplacement );
716
717
823 static double ConvertStringToValue( const OUString& rStr, const ScCalcConfig& rConfig,
824 FormulaError & rError, FormulaError nStringNoValueError,
825 SvNumberFormatter* pFormatter, SvNumFormatType & rCurFmtType );
826
829};
830
831// maybe move to dbdata.hxx (?):
832
834 {
851 };
852
854 {
856 SC_OR
857 };
858
860 {
875 };
876
878 {
898 };
899
900class ScArea;
901
903{
904 SCCOL nCol; // cursor position /
905 SCROW nRow; // or start of destination area respectively
908 sal_uInt16 nDataAreaCount; // number of data areas
909 std::unique_ptr<ScArea[]> pDataAreas; // array of pointers into data areas
910 bool bByCol;
911 bool bByRow;
912 bool bReferenceData; // reference source data
913
917
919 bool operator== ( const ScConsolidateParam& r ) const;
920 void Clear (); // = ClearDataAreas()+Members
921 void ClearDataAreas ();
922 void SetAreas ( std::unique_ptr<ScArea[]> pAreas, sal_uInt16 nCount );
923};
924
926extern sal_uInt16 nScClickMouseModifier;
927extern sal_uInt16 nScFillModeMouseModifier;
928
929/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
BLOCK
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
Definition: address.hxx:44
List of spreadsheet functions.
Definition: funcdesc.hxx:242
Stores spreadsheet functions in categories, including a cumulative ('All') category and makes them ac...
Definition: funcdesc.hxx:309
static constexpr sal_Unicode cListDelimiter
Definition: global.hxx:561
static SC_DLLPUBLIC double nScreenPPTX
Horizontal pixel per twips factor.
Definition: global.hxx:589
static rtl_TextEncoding GetCharsetValue(std::u16string_view rCharSet)
Definition: global.cxx:570
static SC_DLLPUBLIC bool bThreadedGroupCalcInProgress
Calc's threaded group calculation is in progress.
Definition: global.hxx:828
static SC_DLLPUBLIC sal_uInt16 GetStandardRowHeight()
Definition: global.cxx:169
static std::unique_ptr< ScFunctionList > xStarCalcFunctionList
Definition: global.hxx:520
static void InitTextHeight(const SfxItemPool *pPool)
Definition: global.cxx:505
static SC_DLLPUBLIC OUString GetDocTabName(std::u16string_view rFileName, std::u16string_view rTabName)
Definition: global2.cxx:324
static std::atomic<::utl::TransliterationWrapper * > pTransliteration
Definition: global.hxx:531
static const sal_Unicode * UnicodeStrChr(const sal_Unicode *pStr, sal_Unicode c)
strchr() functionality on unicode, as long as we need it for FormulaToken etc.
Definition: global.cxx:691
static SC_DLLPUBLIC sal_uInt16 nStdRowHeight
Definition: global.hxx:596
static LanguageType GetEditDefaultLanguage()
Definition: global.cxx:909
static css::lang::Locale & GetLocale()
Definition: global.cxx:1121
static SvxBrushItem * GetEmptyBrushItem()
Definition: global.hxx:606
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.
Definition: global.cxx:715
static SC_DLLPUBLIC CollatorWrapper & GetCollator()
case-insensitive collator
Definition: global.cxx:1095
static LegacyFuncCollection * GetLegacyFuncCollection()
Definition: global.cxx:278
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...
Definition: global.cxx:1147
static std::atomic<::utl::TransliterationWrapper * > pCaseTransliteration
Definition: global.hxx:532
static SvxBrushItem * GetButtonBrushItem()
Definition: global.cxx:441
static OUString aStrClipDocName
Definition: global.hxx:516
static SC_DLLPUBLIC sal_uInt32 GetStandardFormat(SvNumberFormatter &, sal_uInt32 nFormat, SvNumFormatType nType)
Definition: global.cxx:160
::tools::Long nLastColWidthExtra
Definition: global.hxx:599
static std::unique_ptr< ScAutoFormat > xAutoFormat
Definition: global.hxx:512
::utl::TransliterationWrapper & GetCaseTransliteration()
Definition: global.cxx:1038
static SC_DLLPUBLIC double nScreenPPTY
Vertical pixel per twips factor.
Definition: global.hxx:591
static SvNumberFormatter * GetEnglishFormatter()
a "ReadOnly" formatter for UNO/XML export
Definition: global.cxx:174
static std::optional< CalendarWrapper > oCalendar
Definition: global.hxx:528
static std::atomic< CollatorWrapper * > pCaseCollator
Definition: global.hxx:529
static void ResetFunctionList()
Definition: global.cxx:644
static SC_DLLPUBLIC void SetSearchItem(const SvxSearchItem &rNew)
Definition: global.cxx:238
static void OpenURL(const OUString &rURL, const OUString &rTarget, bool bIgnoreSettings=false)
Open the specified URL.
Definition: global.cxx:810
static std::atomic< LegacyFuncCollection * > pLegacyFuncCollection
Definition: global.hxx:513
static OUString GetOrdinalSuffix(sal_Int32 nNumber)
Obtain the ordinal suffix for a number according to the system locale.
Definition: globalx.cxx:120
static bool IsSystemRTL()
Definition: global.cxx:895
static SC_DLLPUBLIC ::utl::TransliterationWrapper & GetTransliteration()
Definition: global.cxx:1026
static std::unique_ptr< ScUserList > xUserList
Definition: global.hxx:515
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.
Definition: global.cxx:733
static const InputHandlerFunctionNames & GetInputHandlerFunctionNames()
Definition: global.cxx:653
static double ConvertStringToValue(const OUString &rStr, const ScCalcConfig &rConfig, FormulaError &rError, FormulaError nStringNoValueError, SvNumberFormatter *pFormatter, SvNumFormatType &rCurFmtType)
Convert string content to numeric value.
Definition: global2.cxx:352
static void SetUserList(const ScUserList *pNewList)
Definition: global.cxx:299
static InputHandlerFunctionNames maInputHandlerFunctionNames
Definition: global.hxx:539
static SC_DLLPUBLIC LanguageType eLnge
Definition: global.hxx:560
static std::unique_ptr< ScFieldEditEngine > xFieldEditEngine
Definition: global.hxx:535
static OUString GetLongErrorString(FormulaError nErrNumber)
Definition: global.cxx:347
static SC_DLLPUBLIC ScAutoFormat * GetOrCreateAutoFormat()
Definition: global.cxx:266
static bool EETextObjEqual(const EditTextObject *pObj1, const EditTextObject *pObj2)
Definition: global.cxx:798
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.
Definition: global.cxx:705
static SC_DLLPUBLIC sal_uInt16 GetScriptedWhichID(SvtScriptType nScriptType, sal_uInt16 nWhich)
Map ATTR_((CJK|CTL)_)?FONT_... to proper WhichIDs.
Definition: global.cxx:915
static SC_DLLPUBLIC ScUnoAddInCollection * GetAddInCollection()
Definition: global.cxx:283
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.
Definition: global.cxx:749
static ScFunctionList * GetStarCalcFunctionList()
Definition: global.cxx:626
static std::unique_ptr< SvxBrushItem > xButtonBrushItem
Definition: global.hxx:518
static std::unique_ptr< SvNumberFormatter > xEnglishFormatter
Definition: global.hxx:525
static OUString GetCharsetString(rtl_TextEncoding eVal)
Definition: global.cxx:598
static SC_DLLPUBLIC OUString GetAbsDocName(const OUString &rFileName, const SfxObjectShell *pShell)
Definition: global2.cxx:287
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
Definition: global.cxx:1055
static std::optional< SvtSysLocale > oSysLocale
Definition: global.hxx:544
static std::atomic< ScUnoAddInCollection * > pAddInCollection
Definition: global.hxx:514
static CollatorWrapper & GetCaseCollator()
case-sensitive collator
Definition: global.cxx:1106
static bool HasStarCalcFunctionList()
Definition: global.cxx:621
static OUString GetErrorString(FormulaError nErrNumber)
Definition: global.cxx:315
static ScFunctionMgr * GetStarCalcFunctionMgr()
Definition: global.cxx:635
static bool HasAttrChanged(const SfxItemSet &rNewAttrs, const SfxItemSet &rOldAttrs, const sal_uInt16 nWhich)
Definition: global.cxx:127
static std::atomic< css::lang::Locale * > pLocale
Definition: global.hxx:533
static SC_DLLPUBLIC void AddQuotes(OUString &rString, sal_Unicode cQuote, bool bEscapeEmbedded=true)
Inserts the character cQuote at beginning and end of rString.
Definition: global.cxx:720
static ScFieldEditEngine & GetStaticFieldEditEngine()
A static instance of ScFieldEditEngine not capable of resolving document specific fields,...
Definition: global.cxx:1127
static sc::SharedStringPoolPurge & GetSharedStringPoolPurge()
Definition: global.cxx:1141
static tools::SvRef< ScDocShell > xDrawClipDocShellRef
Definition: global.hxx:593
static std::unique_ptr< SvxSearchItem > xSearchItem
Definition: global.hxx:511
static sal_uInt16 nDefFontHeight
Definition: global.hxx:595
static ScUnitConverter * GetUnitConverter()
Definition: global.cxx:685
static std::atomic< CollatorWrapper * > pCollator
Definition: global.hxx:530
static sal_Unicode ToUpperAlpha(sal_Unicode c)
Definition: global.hxx:631
static SC_DLLPUBLIC ScUserList * GetUserList()
Definition: global.cxx:288
static void InitPPT()
Definition: global.cxx:474
static std::unique_ptr< ScFunctionMgr > xStarCalcFunctionMgr
Definition: global.hxx:521
static css::uno::Reference< css::i18n::XOrdinalSuffix > xOrdinalSuffix
Definition: global.hxx:527
static std::atomic< ScUnitConverter * > pUnitConverter
Definition: global.hxx:523
static SC_DLLPUBLIC SvtScriptType GetDefaultScriptType()
Definition: global.cxx:900
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...
Definition: global.cxx:1003
static void SetClipDocName(const OUString &rNew)
Definition: global.cxx:499
static SC_DLLPUBLIC const CharClass & getCharClass()
Definition: global.cxx:1064
static const OUString & GetClipDocName()
Definition: global.cxx:494
static SC_DLLPUBLIC ::tools::Long nLastRowHeightExtra
Definition: global.hxx:598
static CalendarWrapper & GetCalendar()
Definition: global.cxx:1073
static SC_DLLPUBLIC void Clear()
Definition: global.cxx:536
static SC_DLLPUBLIC ScAutoFormat * GetAutoFormat()
Definition: global.cxx:261
static std::atomic< sc::SharedStringPoolPurge * > pSharedStringPoolPurge
Definition: global.hxx:537
static SC_DLLPUBLIC const SvxSearchItem & GetSearchItem()
Definition: global.cxx:227
static bool ShouldOpenURL()
Whether the URL can be opened according to current security options (Click/Ctrl-Click)
Definition: global.cxx:876
static void ClearAutoFormat()
Definition: global.cxx:248
static SC_DLLPUBLIC void Init()
Definition: global.cxx:448
static bool CheckWidthInvalidate(bool &bNumFormatChanged, const SfxItemSet &rNewAttrs, const SfxItemSet &rOldAttrs)
Definition: global.cxx:186
static std::unique_ptr< SvxBrushItem > xEmptyBrushItem
Definition: global.hxx:517
static void InitAddIns()
Definition: globalx.cxx:44
Collection of user-defined sort lists.
Definition: userlist.hxx:62
float u
NORMAL
FormulaError
SfxViewShell * pScActiveViewShell
Definition: global.cxx:116
const SCSIZE MAXSUBTOTAL
Definition: global.hxx:82
ScBreakType
Definition: global.hxx:139
ScMoveDirection
Definition: global.hxx:326
@ SC_MOVE_UP
Definition: global.hxx:329
@ SC_MOVE_RIGHT
Definition: global.hxx:327
@ SC_MOVE_LEFT
Definition: global.hxx:328
@ SC_MOVE_DOWN
Definition: global.hxx:330
const sal_Unicode CHAR_RLM
Definition: global.hxx:71
constexpr sal_Unicode cParenthesesReplacement
Definition: global.hxx:463
ScQueryConnect
Definition: global.hxx:854
@ SC_OR
Definition: global.hxx:856
@ SC_AND
Definition: global.hxx:855
ScAnchorType
Definition: global.hxx:374
@ SCA_DONTKNOW
Definition: global.hxx:378
@ SCA_CELL_RESIZE
Definition: global.hxx:376
@ SCA_CELL
Definition: global.hxx:375
@ SCA_PAGE
Definition: global.hxx:377
constexpr sal_Int32 MAX_COL_WIDTH
Definition: global.hxx:92
CellType
Definition: global.hxx:272
@ CELLTYPE_EDIT
Definition: global.hxx:277
@ CELLTYPE_STRING
Definition: global.hxx:275
@ CELLTYPE_FORMULA
Definition: global.hxx:276
@ CELLTYPE_NONE
Definition: global.hxx:273
@ CELLTYPE_VALUE
Definition: global.hxx:274
constexpr SdrLayerID SC_LAYER_HIDDEN(4)
const sal_uInt16 MINZOOM
Definition: global.hxx:79
constexpr OUStringLiteral STRING_SCAPP
Definition: global.hxx:58
UpdateRefMode
Definition: global.hxx:301
@ URM_COPY
Definition: global.hxx:303
@ URM_MOVE
Definition: global.hxx:304
@ URM_REORDER
Definition: global.hxx:305
@ URM_INSDEL
Definition: global.hxx:302
constexpr SdrLayerID SC_LAYER_FRONT(0)
ScVObjMode
Definition: global.hxx:368
@ VOBJ_MODE_SHOW
Definition: global.hxx:369
@ VOBJ_MODE_HIDE
Definition: global.hxx:370
ScLkUpdMode
Definition: global.hxx:410
@ LM_NEVER
Definition: global.hxx:412
@ LM_ON_DEMAND
Definition: global.hxx:413
@ LM_UNKNOWN
Definition: global.hxx:414
@ LM_ALWAYS
Definition: global.hxx:411
const sal_Unicode CHAR_NBHY
Definition: global.hxx:72
DelCellCmd
Definition: global.hxx:281
constexpr auto TWIPS_PER_CHAR
Definition: global.hxx:85
ScPasteFunc
Definition: global.hxx:181
constexpr SdrLayerID SC_LAYER_INTERN(2)
InsCellCmd
Definition: global.hxx:290
@ INS_INSROWS_AFTER
Definition: global.hxx:296
@ INS_NONE
Definition: global.hxx:295
@ INS_INSCOLS_AFTER
Definition: global.hxx:297
@ INS_CELLSDOWN
Definition: global.hxx:291
@ INS_INSCOLS_BEFORE
Definition: global.hxx:294
@ INS_CELLSRIGHT
Definition: global.hxx:292
@ INS_INSROWS_BEFORE
Definition: global.hxx:293
const sal_Unicode CHAR_SHY
Definition: global.hxx:68
constexpr OUStringLiteral SC_TEXT_CSV_FILTER_NAME
Definition: global.hxx:63
constexpr OUStringLiteral STRING_STANDARD
Definition: global.hxx:60
sal_uInt16 nScClickMouseModifier
Definition: global.cxx:117
SubtotalFlags
Definition: global.hxx:240
InsertDeleteFlags
Definition: global.hxx:149
@ SPARKLINES
Sheet / outlining (grouping) information.
@ NOCAPTIONS
Sparklines in a cell.
@ SPECIAL_BOOLEAN
Internal use only (copy from clip): do not delete existing cell contents when pasting notes.
@ EDITATTR
Drawing objects.
@ AUTOFILL
Copy flags for auto/series fill functions: do not touch notes and drawing objects.
@ OBJECTS
Cell styles.
@ ADDNOTES
Internal use only (undo etc.): do not copy/delete caption objects of cell notes.
@ ATTRIB
Internal use only (d&d undo): do not delete caption objects of cell notes.
@ HARDATTR
Formula cells.
constexpr sal_Int32 MAX_EXTRA_WIDTH
Definition: global.hxx:90
HasAttrFlags
Definition: global.hxx:185
const sal_Unicode CHAR_NBSP
Definition: global.hxx:67
const sal_Unicode CHAR_LRM
Definition: global.hxx:70
ScSizeMode
Definition: global.hxx:351
@ SC_SIZE_DIRECT
Definition: global.hxx:352
@ SC_SIZE_OPTIMAL
Definition: global.hxx:353
@ SC_SIZE_VISOPT
Definition: global.hxx:355
@ SC_SIZE_ORIGINAL
Definition: global.hxx:356
@ SC_SIZE_SHOW
Definition: global.hxx:354
FillDateCmd
Definition: global.hxx:334
@ FILL_MONTH
Definition: global.hxx:337
@ FILL_YEAR
Definition: global.hxx:339
@ FILL_WEEKDAY
Definition: global.hxx:336
@ FILL_END_OF_MONTH
Definition: global.hxx:338
@ FILL_DAY
Definition: global.hxx:335
ScGetDBSelection
For ScDBFunc::GetDBData()
Definition: global.hxx:391
@ Keep
Keep selection as is, expand to used data area if no selection.
@ RowDown
If only one row or portion thereof is selected, shrink row to used data columns and select further ro...
@ ShrinkToUsedData
Shrink selection to actually used data area within the selection.
@ ForceMark
Behave as if the range corresponding to a ScDBData area was selected, for API use.
PaintPartFlags
Definition: global.hxx:109
ScCloneFlags
Definition: global.hxx:251
@ StartListening
If set, cloned formula cells will start to listen to the document.
@ NoMakeAbsExternal
If set, absolute refs will not transformed to external references.
@ NamesToLocal
If set, global named expressions will be converted to sheet-local named expressions.
ScAggregateFunc
Definition: global.hxx:878
@ AGGREGATE_FUNC_MODSNGL
Definition: global.hxx:891
@ AGGREGATE_FUNC_VAR
Definition: global.hxx:888
@ AGGREGATE_FUNC_CNT2
Definition: global.hxx:881
@ AGGREGATE_FUNC_QRTEXC
Definition: global.hxx:897
@ AGGREGATE_FUNC_PERCINC
Definition: global.hxx:894
@ AGGREGATE_FUNC_PERCEXC
Definition: global.hxx:896
@ AGGREGATE_FUNC_MEDIAN
Definition: global.hxx:890
@ AGGREGATE_FUNC_SMALL
Definition: global.hxx:893
@ AGGREGATE_FUNC_PROD
Definition: global.hxx:884
@ AGGREGATE_FUNC_LARGE
Definition: global.hxx:892
@ AGGREGATE_FUNC_MIN
Definition: global.hxx:883
@ AGGREGATE_FUNC_VARP
Definition: global.hxx:889
@ AGGREGATE_FUNC_SUM
Definition: global.hxx:887
@ AGGREGATE_FUNC_QRTINC
Definition: global.hxx:895
@ AGGREGATE_FUNC_CNT
Definition: global.hxx:880
@ AGGREGATE_FUNC_AVE
Definition: global.hxx:879
@ AGGREGATE_FUNC_STDP
Definition: global.hxx:886
@ AGGREGATE_FUNC_STD
Definition: global.hxx:885
@ AGGREGATE_FUNC_MAX
Definition: global.hxx:882
const sal_Unicode CHAR_ZWSP
Definition: global.hxx:69
ScLinkMode
Definition: global.hxx:215
constexpr SdrLayerID SC_LAYER_BACK(1)
const sal_Unicode CHAR_NNBSP
Definition: global.hxx:74
ScInputMode
Definition: global.hxx:360
@ SC_INPUT_TYPE
Definition: global.hxx:362
@ SC_INPUT_NONE
Definition: global.hxx:361
@ SC_INPUT_TABLE
Definition: global.hxx:363
@ SC_INPUT_TOP
Definition: global.hxx:364
ScSubTotalFunc
Definition: global.hxx:860
@ SUBTOTAL_FUNC_STDP
Definition: global.hxx:869
@ SUBTOTAL_FUNC_MAX
Definition: global.hxx:865
@ SUBTOTAL_FUNC_CNT2
Definition: global.hxx:864
@ SUBTOTAL_FUNC_AVE
Definition: global.hxx:862
@ SUBTOTAL_FUNC_VARP
Definition: global.hxx:872
@ SUBTOTAL_FUNC_VAR
Definition: global.hxx:871
@ SUBTOTAL_FUNC_NONE
Definition: global.hxx:861
@ SUBTOTAL_FUNC_SELECTION_COUNT
Definition: global.hxx:874
@ SUBTOTAL_FUNC_SUM
Definition: global.hxx:870
@ SUBTOTAL_FUNC_MED
Definition: global.hxx:873
@ SUBTOTAL_FUNC_STD
Definition: global.hxx:868
@ SUBTOTAL_FUNC_MIN
Definition: global.hxx:866
@ SUBTOTAL_FUNC_CNT
Definition: global.hxx:863
@ SUBTOTAL_FUNC_PROD
Definition: global.hxx:867
ScScenarioFlags
Definition: global.hxx:226
ScDirection
Definition: global.hxx:343
@ DIR_LEFT
Definition: global.hxx:347
@ DIR_TOP
Definition: global.hxx:346
@ DIR_RIGHT
Definition: global.hxx:345
@ DIR_BOTTOM
Definition: global.hxx:344
ScDBObject
Definition: global.hxx:419
@ ScDbQuery
Definition: global.hxx:421
@ ScDbTable
Definition: global.hxx:420
constexpr SdrLayerID SC_LAYER_CONTROLS(3)
sal_uInt16 nScFillModeMouseModifier
Definition: global.cxx:118
constexpr sal_Int32 STD_EXTRA_WIDTH
Definition: global.hxx:88
CRFlags
Definition: global.hxx:125
const sal_Unicode CHAR_WJ
Definition: global.hxx:73
ScGetDBMode
Definition: global.hxx:382
@ SC_DB_AUTOFILTER
force use of sheet-local instead of document global anonymous range
Definition: global.hxx:384
@ SC_DB_IMPORT
create "Importx" (if necessary)
Definition: global.hxx:385
@ SC_DB_MAKE
create "untitled" (if necessary)
Definition: global.hxx:383
@ SC_DB_OLD
don't create
Definition: global.hxx:386
ScEnterMode
Definition: global.hxx:219
FillCmd
Definition: global.hxx:317
@ FILL_GROWTH
Definition: global.hxx:320
@ FILL_LINEAR
Definition: global.hxx:319
@ FILL_AUTO
Definition: global.hxx:322
@ FILL_SIMPLE
Definition: global.hxx:318
@ FILL_DATE
Definition: global.hxx:321
ScQueryOp
Definition: global.hxx:834
@ SC_DOES_NOT_CONTAIN
Definition: global.hxx:846
@ SC_LESS_EQUAL
Definition: global.hxx:838
@ SC_LESS
Definition: global.hxx:836
@ SC_GREATER_EQUAL
Definition: global.hxx:839
@ SC_CONTAINS
Definition: global.hxx:845
@ SC_TOPPERC
Definition: global.hxx:843
@ SC_ENDS_WITH
Definition: global.hxx:849
@ SC_DOES_NOT_END_WITH
Definition: global.hxx:850
@ SC_BEGINS_WITH
Definition: global.hxx:847
@ SC_TOPVAL
Definition: global.hxx:841
@ SC_GREATER
Definition: global.hxx:837
@ SC_EQUAL
Definition: global.hxx:835
@ SC_BOTPERC
Definition: global.hxx:844
@ SC_NOT_EQUAL
Definition: global.hxx:840
@ SC_DOES_NOT_BEGIN_WITH
Definition: global.hxx:848
@ SC_BOTVAL
Definition: global.hxx:842
constexpr sal_Int32 MAX_ROW_HEIGHT
Definition: global.hxx:93
const sal_uInt16 MAXZOOM
Definition: global.hxx:80
constexpr sal_Int32 STD_COL_WIDTH
Definition: global.hxx:87
FillDir
Definition: global.hxx:309
@ FILL_TO_TOP
Definition: global.hxx:312
@ FILL_TO_RIGHT
Definition: global.hxx:311
@ FILL_TO_LEFT
Definition: global.hxx:313
@ FILL_TO_BOTTOM
Definition: global.hxx:310
constexpr sal_Int32 MAX_EXTRA_HEIGHT
Definition: global.hxx:91
STRING
SvtScriptType
NONE
Value
Unknown
Reference
constexpr auto toTwips(N number, Length from)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
CAUTION! The following defines must be in the same namespace as the respective type.
Definition: broadcast.cxx:15
ColRowEditAction
Definition: global.hxx:427
constexpr ::tools::Long TwipsToEvenHMM(::tools::Long nTwips)
Definition: global.hxx:100
long Long
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
ScTypedCaseStrSet maFunctionDataPara
Definition: global.hxx:467
std::set< sal_Unicode > maFunctionChar
Definition: global.hxx:468
ScTypedCaseStrSet maFunctionData
Definition: global.hxx:466
Configuration options for formula interpreter.
Definition: calcconfig.hxx:44
ScConsolidateParam & operator=(const ScConsolidateParam &r)
Definition: global2.cxx:136
sal_uInt16 nDataAreaCount
Definition: global.hxx:908
bool operator==(const ScConsolidateParam &r) const
Definition: global2.cxx:161
void ClearDataAreas()
Definition: global2.cxx:119
std::unique_ptr< ScArea[]> pDataAreas
Definition: global.hxx:909
ScSubTotalFunc eFunction
Definition: global.hxx:907
void SetAreas(std::unique_ptr< ScArea[]> pAreas, sal_uInt16 nCount)
Definition: global2.cxx:184
bool operator==(const ScImportParam &r) const
Definition: global2.cxx:87
SCROW nRow1
Definition: global.hxx:442
OUString aStatement
Definition: global.hxx:447
SCCOL nCol1
Definition: global.hxx:441
SCCOL nCol2
Definition: global.hxx:443
ScImportParam & operator=(const ScImportParam &r)
Definition: global2.cxx:71
SCROW nRow2
Definition: global.hxx:444
sal_uInt8 nType
Definition: global.hxx:450
OUString aDBName
Definition: global.hxx:446
bool bNative
Definition: global.hxx:448
bool bImport
Definition: global.hxx:445
MUL
SUB
DIV
@ Left
Definition: tphfedit.hxx:40
std::set< ScTypedStrData, ScTypedStrData::LessCaseSensitive > ScTypedCaseStrSet
unsigned char sal_uInt8
sal_uInt16 sal_Unicode
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
Page
SvNumFormatType