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,
170 AUTOFILL = ALL & ~(NOTE | OBJECTS)
171};
172namespace o3tl
173{
174 template<> struct typed_flags<InsertDeleteFlags> : is_typed_flags<InsertDeleteFlags, 0x7fff> {};
175}
176// This doesn't work at the moment, perhaps when we have constexpr we can modify InsertDeleteFlags to make it work.
177//static_assert((InsertDeleteFlags::ATTRIB & InsertDeleteFlags::CONTENTS) == InsertDeleteFlags::NONE, "these must match");
178
179
180enum class ScPasteFunc {
181 NONE, ADD, SUB, MUL, DIV
182};
183 // bits for HasAttr
184enum class HasAttrFlags {
185 NONE = 0x0000,
186 Lines = 0x0001,
187 Merged = 0x0002,
188 Overlapped = 0x0004,
189 Protected = 0x0008,
190 Shadow = 0x0010,
191 NeedHeight = 0x0020,
192 ShadowRight = 0x0040,
193 ShadowDown = 0x0080,
194 AutoFilter = 0x0100,
195 Conditional = 0x0200,
196 Rotate = 0x0400,
197 NotOverlapped = 0x0800,
198 RightOrCenter = 0x1000, // right or centered logical alignment
199};
200namespace o3tl {
201 template<> struct typed_flags<HasAttrFlags> : is_typed_flags<HasAttrFlags, 0x1fff> {};
202}
203
204
205// Layer id's for drawing.
206// These are both id's and positions.
212
213// link tables
214enum class ScLinkMode {
216};
217 // input
218enum class ScEnterMode {
220};
221
222 // step = 10pt, max. indention = 100 steps
223#define SC_INDENT_STEP 200
224
225enum class ScScenarioFlags{ // scenario flags
226 NONE = 0,
227 CopyAll = 1,
228 ShowFrame = 2,
229 PrintFrame = 4,
230 TwoWay = 8,
231 Attrib = 16,
232 Value = 32,
233 Protected = 64
234};
235namespace o3tl {
236 template<> struct typed_flags<ScScenarioFlags> : is_typed_flags<ScScenarioFlags, 127> {};
237}
238
239enum class SubtotalFlags {
240 NONE = 0x00,
241 IgnoreNestedStAg = 0x08,
242 IgnoreErrVal = 0x04,
243 IgnoreHidden = 0x02,
244 IgnoreFiltered = 0x01
245};
246namespace o3tl {
247 template<> struct typed_flags<SubtotalFlags> : is_typed_flags<SubtotalFlags, 0x0f> {};
248}
249
250enum class ScCloneFlags{
253 Default = 0x0000,
254
256 StartListening = 0x0001,
257
259 NoMakeAbsExternal = 0x0002,
260
263 NamesToLocal = 0x0004
264};
265namespace o3tl
266{
267 template<> struct typed_flags<ScCloneFlags> : is_typed_flags<ScCloneFlags, 0x0007> {};
268}
269
271 {
277 };
278
279enum class DelCellCmd
280 {
281 CellsUp,
282 CellsLeft,
283 Rows,
284 Cols,
285 NONE
286 };
287
289 {
297 };
298
300 {
305 };
306
308 {
313 };
314
316 {
322 };
323
325{
331
333 {
339 };
340
342 {
347 };
348
350 {
351 SC_SIZE_DIRECT, // set size or hide if value is 0
352 SC_SIZE_OPTIMAL, // set optimal size for everything
353 SC_SIZE_SHOW, // show with original size
354 SC_SIZE_VISOPT, // set optimal size only if visible
355 SC_SIZE_ORIGINAL // only set size, don't change visible flag
356 };
357
359 {
361 SC_INPUT_TYPE, // input, while not in inplace mode
362 SC_INPUT_TABLE, // text cursor in the table
363 SC_INPUT_TOP // text cursor in the input line
364 };
365
366enum ScVObjMode // output modes of objects on a page
367{
371
372enum ScAnchorType // anchor of a character object
373{
374 SCA_CELL, // anchor to cell, move with cell
375 SCA_CELL_RESIZE, // anchor to cell, move and resize with cell
376 SCA_PAGE, // anchor to page, independent of any cells
377 SCA_DONTKNOW // for multi selection
379
381{
385 SC_DB_OLD
387
390{
392 Keep,
393
396
401 RowDown,
402
406};
407
408enum ScLkUpdMode // modes for updating links
409{
415
416// enum with values equal to old DBObject enum from sdb
418{
422
423namespace sc {
424
426{
427 Unknown,
434};
435
436}
437
439{
445 OUString aDBName; // alias of data base
446 OUString aStatement;
448 bool bSql; // statement or name?
449 sal_uInt8 nType; // enum DBObject
450
452 ScImportParam( const ScImportParam& r );
454
456 bool operator== ( const ScImportParam& r ) const;
457};
458
459// Formula data replacement character for a pair of parentheses at end of
460// function name, to force sorting parentheses before all other characters.
461// Collation may treat parentheses differently.
464{
467 std::set<sal_Unicode> maFunctionChar;
468};
469
470class ScDocShell;
471class SvxSearchItem;
472class ScAutoFormat;
475class ScUserList;
476class SvxBrushItem;
477class ScFunctionList;
478class ScFunctionMgr;
479class SfxItemPool;
480class EditTextObject;
481class SfxObjectShell;
483class ScUnitConverter;
484class CharClass;
486class SvtSysLocale;
487class CalendarWrapper;
488class CollatorWrapper;
489class IntlWrapper;
491
492namespace com::sun::star {
493 namespace lang {
494 struct Locale;
495 }
496 namespace i18n {
497 class XOrdinalSuffix;
498 }
499}
500namespace utl {
501 class TransliterationWrapper;
502}
503
504namespace sc {
505 class SharedStringPoolPurge;
506}
507
509{
510 static std::unique_ptr<SvxSearchItem> xSearchItem;
511 static std::unique_ptr<ScAutoFormat> xAutoFormat;
512 static std::atomic<LegacyFuncCollection*> pLegacyFuncCollection;
513 static std::atomic<ScUnoAddInCollection*> pAddInCollection;
514 static std::unique_ptr<ScUserList> xUserList;
515 static OUString aStrClipDocName;
516 static std::unique_ptr<SvxBrushItem> xEmptyBrushItem;
517 static std::unique_ptr<SvxBrushItem> xButtonBrushItem;
518
519 static std::unique_ptr<ScFunctionList> xStarCalcFunctionList;
520 static std::unique_ptr<ScFunctionMgr> xStarCalcFunctionMgr;
521
522 static std::atomic<ScUnitConverter*> pUnitConverter;
523
524 static std::unique_ptr<SvNumberFormatter> xEnglishFormatter; // for UNO / XML export
525
526 static css::uno::Reference< css::i18n::XOrdinalSuffix> xOrdinalSuffix;
527 static std::optional<CalendarWrapper> oCalendar;
528 static std::atomic<CollatorWrapper*> pCaseCollator;
529 static std::atomic<CollatorWrapper*> pCollator;
530 static std::atomic<::utl::TransliterationWrapper*> pTransliteration;
531 static std::atomic<::utl::TransliterationWrapper*> pCaseTransliteration;
532 static std::atomic<css::lang::Locale*> pLocale;
533
534 static std::unique_ptr<ScFieldEditEngine> xFieldEditEngine;
535
536 static std::atomic<sc::SharedStringPoolPurge*> pSharedStringPoolPurge;
537
539
540 static void InitPPT();
541
542public:
543 static std::optional<SvtSysLocale> oSysLocale;
545 SC_DLLPUBLIC static const CharClass& getCharClass();
546
552 static CollatorWrapper& GetCollator(bool bCaseSensitive);
553 static css::lang::Locale& GetLocale();
554
555 SC_DLLPUBLIC static ::utl::TransliterationWrapper& GetTransliteration();
556 static ::utl::TransliterationWrapper& GetCaseTransliteration();
557 static ::utl::TransliterationWrapper& GetTransliteration(bool bCaseSensitive);
558
560 static constexpr sal_Unicode cListDelimiter = ',';
561
562 static const OUString& GetClipDocName();
563 static void SetClipDocName( const OUString& rNew );
565 SC_DLLPUBLIC static void SetSearchItem( const SvxSearchItem& rNew );
568 static void ClearAutoFormat(); //BugId 54209
572 static void SetUserList( const ScUserList* pNewList );
577 static void OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgnoreSettings = false);
579 static bool ShouldOpenURL();
580 SC_DLLPUBLIC static OUString GetAbsDocName( const OUString& rFileName,
581 const SfxObjectShell* pShell );
582 SC_DLLPUBLIC static OUString GetDocTabName( std::u16string_view rFileName,
583 std::u16string_view rTabName );
584 SC_DLLPUBLIC static sal_uInt32 GetStandardFormat( SvNumberFormatter&, sal_uInt32 nFormat, SvNumFormatType nType );
585
586 SC_DLLPUBLIC static sal_uInt16 GetStandardRowHeight();
591
593
594 static sal_uInt16 nDefFontHeight;
595 SC_DLLPUBLIC static sal_uInt16 nStdRowHeight;
596
597 SC_DLLPUBLIC static ::tools::Long nLastRowHeightExtra;
598 static ::tools::Long nLastColWidthExtra;
599
600 SC_DLLPUBLIC static void Init(); // during start up
601 static void InitAddIns();
602 SC_DLLPUBLIC static void Clear(); // at the end of the program
603
604 static void InitTextHeight(const SfxItemPool* pPool);
607
608 static bool HasStarCalcFunctionList();
611 static void ResetFunctionList();
613
614 static OUString GetErrorString(FormulaError nErrNumber);
615 static OUString GetLongErrorString(FormulaError nErrNumber);
616 static bool EETextObjEqual( const EditTextObject* pObj1,
617 const EditTextObject* pObj2 );
618 static bool CheckWidthInvalidate( bool& bNumFormatChanged,
619 const SfxItemSet& rNewAttrs,
620 const SfxItemSet& rOldAttrs );
621 static bool HasAttrChanged( const SfxItemSet& rNewAttrs,
622 const SfxItemSet& rOldAttrs,
623 const sal_uInt16 nWhich );
624
626
628 static const sal_Unicode* UnicodeStrChr( const sal_Unicode* pStr, sal_Unicode c );
629
631 { return ( c >= 'a' && c <= 'z' ) ? ( c-'a'+'A' ) : c; }
632
639 SC_DLLPUBLIC static OUString addToken(
640 std::u16string_view rTokenList, std::u16string_view rToken,
641 sal_Unicode cSep, sal_Int32 nSepCount = 1,
642 bool bForceSep = false );
643
645 SC_DLLPUBLIC static bool IsQuoted( const OUString& rString, sal_Unicode cQuote );
646
651 SC_DLLPUBLIC static void AddQuotes( OUString& rString, sal_Unicode cQuote, bool bEscapeEmbedded = true );
652
658 SC_DLLPUBLIC static void EraseQuotes( OUString& rString, sal_Unicode cQuote, bool bUnescapeEmbedded = true );
659
668 SC_DLLPUBLIC static sal_Int32 FindUnquoted( const OUString& rString, sal_Unicode cChar, sal_Int32 nStart = 0 );
669
674 SC_DLLPUBLIC static const sal_Unicode* FindUnquoted( const sal_Unicode* pString, sal_Unicode cChar );
675
676 static rtl_TextEncoding GetCharsetValue( std::u16string_view rCharSet );
677 static OUString GetCharsetString( rtl_TextEncoding eVal );
678
681
682 static bool IsSystemRTL(); // depending on system language
683 static LanguageType GetEditDefaultLanguage(); // for EditEngine::SetDefaultLanguage
684 SC_DLLPUBLIC static SvtScriptType GetDefaultScriptType(); // for all WEAK characters
688 SC_DLLPUBLIC static sal_uInt16 GetScriptedWhichID( SvtScriptType nScriptType, sal_uInt16 nWhich );
689
692 SC_DLLPUBLIC static void AddLanguage( SfxItemSet& rSet, const SvNumberFormatter& rFormatter );
693
695 static OUString GetOrdinalSuffix( sal_Int32 nNumber);
696
700
702
712 SC_DLLPUBLIC static OUString ReplaceOrAppend( const OUString& rString,
713 std::u16string_view rPlaceholder,
714 const OUString& rReplacement );
715
716
822 static double ConvertStringToValue( const OUString& rStr, const ScCalcConfig& rConfig,
823 FormulaError & rError, FormulaError nStringNoValueError,
824 SvNumberFormatter* pFormatter, SvNumFormatType & rCurFmtType );
825
828};
829
830// maybe move to dbdata.hxx (?):
831
833 {
850 };
851
853 {
855 SC_OR
856 };
857
859 {
874 };
875
877 {
897 };
898
899class ScArea;
900
902{
903 SCCOL nCol; // cursor position /
904 SCROW nRow; // or start of destination area respectively
907 sal_uInt16 nDataAreaCount; // number of data areas
908 std::unique_ptr<ScArea[]> pDataAreas; // array of pointers into data areas
909 bool bByCol;
910 bool bByRow;
911 bool bReferenceData; // reference source data
912
916
918 bool operator== ( const ScConsolidateParam& r ) const;
919 void Clear (); // = ClearDataAreas()+Members
920 void ClearDataAreas ();
921 void SetAreas ( std::unique_ptr<ScArea[]> pAreas, sal_uInt16 nCount );
922};
923
925extern sal_uInt16 nScClickMouseModifier;
926extern sal_uInt16 nScFillModeMouseModifier;
927
928/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Page
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:560
static SC_DLLPUBLIC double nScreenPPTX
Horizontal pixel per twips factor.
Definition: global.hxx:588
static rtl_TextEncoding GetCharsetValue(std::u16string_view rCharSet)
Definition: global.cxx:568
static SC_DLLPUBLIC bool bThreadedGroupCalcInProgress
Calc's threaded group calculation is in progress.
Definition: global.hxx:827
static SC_DLLPUBLIC sal_uInt16 GetStandardRowHeight()
Definition: global.cxx:169
static std::unique_ptr< ScFunctionList > xStarCalcFunctionList
Definition: global.hxx:519
static void InitTextHeight(const SfxItemPool *pPool)
Definition: global.cxx:503
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:530
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:689
static SC_DLLPUBLIC sal_uInt16 nStdRowHeight
Definition: global.hxx:595
static LanguageType GetEditDefaultLanguage()
Definition: global.cxx:907
static css::lang::Locale & GetLocale()
Definition: global.cxx:1119
static SvxBrushItem * GetEmptyBrushItem()
Definition: global.hxx:605
static SC_DLLPUBLIC CollatorWrapper & GetCollator()
case-insensitive collator
Definition: global.cxx:1093
static LegacyFuncCollection * GetLegacyFuncCollection()
Definition: global.cxx:278
static SC_DLLPUBLIC bool IsQuoted(const OUString &rString, sal_Unicode cQuote)
Returns true, if the first and last character of the string is cQuote.
Definition: global.cxx:713
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:1145
static std::atomic<::utl::TransliterationWrapper * > pCaseTransliteration
Definition: global.hxx:531
static SvxBrushItem * GetButtonBrushItem()
Definition: global.cxx:439
static OUString aStrClipDocName
Definition: global.hxx:515
static SC_DLLPUBLIC sal_uInt32 GetStandardFormat(SvNumberFormatter &, sal_uInt32 nFormat, SvNumFormatType nType)
Definition: global.cxx:160
::tools::Long nLastColWidthExtra
Definition: global.hxx:598
static std::unique_ptr< ScAutoFormat > xAutoFormat
Definition: global.hxx:511
::utl::TransliterationWrapper & GetCaseTransliteration()
Definition: global.cxx:1036
static SC_DLLPUBLIC double nScreenPPTY
Vertical pixel per twips factor.
Definition: global.hxx:590
static SvNumberFormatter * GetEnglishFormatter()
a "ReadOnly" formatter for UNO/XML export
Definition: global.cxx:174
static std::optional< CalendarWrapper > oCalendar
Definition: global.hxx:527
static std::atomic< CollatorWrapper * > pCaseCollator
Definition: global.hxx:528
static void ResetFunctionList()
Definition: global.cxx:642
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:808
static std::atomic< LegacyFuncCollection * > pLegacyFuncCollection
Definition: global.hxx:512
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:893
static SC_DLLPUBLIC ::utl::TransliterationWrapper & GetTransliteration()
Definition: global.cxx:1024
static std::unique_ptr< ScUserList > xUserList
Definition: global.hxx:514
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:731
static const InputHandlerFunctionNames & GetInputHandlerFunctionNames()
Definition: global.cxx:651
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:538
static SC_DLLPUBLIC LanguageType eLnge
Definition: global.hxx:559
static std::unique_ptr< ScFieldEditEngine > xFieldEditEngine
Definition: global.hxx:534
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:796
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:703
static SC_DLLPUBLIC sal_uInt16 GetScriptedWhichID(SvtScriptType nScriptType, sal_uInt16 nWhich)
Map ATTR_((CJK|CTL)_)?FONT_... to proper WhichIDs.
Definition: global.cxx:913
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:747
static ScFunctionList * GetStarCalcFunctionList()
Definition: global.cxx:624
static std::unique_ptr< SvxBrushItem > xButtonBrushItem
Definition: global.hxx:517
static std::unique_ptr< SvNumberFormatter > xEnglishFormatter
Definition: global.hxx:524
static OUString GetCharsetString(rtl_TextEncoding eVal)
Definition: global.cxx:596
static SC_DLLPUBLIC OUString GetAbsDocName(const OUString &rFileName, const SfxObjectShell *pShell)
Definition: global2.cxx:287
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
Definition: global.cxx:1053
static std::optional< SvtSysLocale > oSysLocale
Definition: global.hxx:543
static std::atomic< ScUnoAddInCollection * > pAddInCollection
Definition: global.hxx:513
static CollatorWrapper & GetCaseCollator()
case-sensitive collator
Definition: global.cxx:1104
static bool HasStarCalcFunctionList()
Definition: global.cxx:619
static OUString GetErrorString(FormulaError nErrNumber)
Definition: global.cxx:315
static ScFunctionMgr * GetStarCalcFunctionMgr()
Definition: global.cxx:633
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:532
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:718
static ScFieldEditEngine & GetStaticFieldEditEngine()
A static instance of ScFieldEditEngine not capable of resolving document specific fields,...
Definition: global.cxx:1125
static sc::SharedStringPoolPurge & GetSharedStringPoolPurge()
Definition: global.cxx:1139
static tools::SvRef< ScDocShell > xDrawClipDocShellRef
Definition: global.hxx:592
static std::unique_ptr< SvxSearchItem > xSearchItem
Definition: global.hxx:510
static sal_uInt16 nDefFontHeight
Definition: global.hxx:594
static ScUnitConverter * GetUnitConverter()
Definition: global.cxx:683
static std::atomic< CollatorWrapper * > pCollator
Definition: global.hxx:529
static sal_Unicode ToUpperAlpha(sal_Unicode c)
Definition: global.hxx:630
static SC_DLLPUBLIC ScUserList * GetUserList()
Definition: global.cxx:288
static void InitPPT()
Definition: global.cxx:472
static std::unique_ptr< ScFunctionMgr > xStarCalcFunctionMgr
Definition: global.hxx:520
static css::uno::Reference< css::i18n::XOrdinalSuffix > xOrdinalSuffix
Definition: global.hxx:526
static std::atomic< ScUnitConverter * > pUnitConverter
Definition: global.hxx:522
static SC_DLLPUBLIC SvtScriptType GetDefaultScriptType()
Definition: global.cxx:898
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:1001
static void SetClipDocName(const OUString &rNew)
Definition: global.cxx:497
static SC_DLLPUBLIC const CharClass & getCharClass()
Definition: global.cxx:1062
static const OUString & GetClipDocName()
Definition: global.cxx:492
static SC_DLLPUBLIC ::tools::Long nLastRowHeightExtra
Definition: global.hxx:597
static CalendarWrapper & GetCalendar()
Definition: global.cxx:1071
static SC_DLLPUBLIC void Clear()
Definition: global.cxx:534
static SC_DLLPUBLIC ScAutoFormat * GetAutoFormat()
Definition: global.cxx:261
static std::atomic< sc::SharedStringPoolPurge * > pSharedStringPoolPurge
Definition: global.hxx:536
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:874
static void ClearAutoFormat()
Definition: global.cxx:248
static SC_DLLPUBLIC void Init()
Definition: global.cxx:446
static bool CheckWidthInvalidate(bool &bNumFormatChanged, const SfxItemSet &rNewAttrs, const SfxItemSet &rOldAttrs)
Definition: global.cxx:186
static std::unique_ptr< SvxBrushItem > xEmptyBrushItem
Definition: global.hxx:516
static void InitAddIns()
Definition: globalx.cxx:44
Collection of user-defined sort lists.
Definition: userlist.hxx:67
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:325
@ SC_MOVE_UP
Definition: global.hxx:328
@ SC_MOVE_RIGHT
Definition: global.hxx:326
@ SC_MOVE_LEFT
Definition: global.hxx:327
@ SC_MOVE_DOWN
Definition: global.hxx:329
const sal_Unicode CHAR_RLM
Definition: global.hxx:71
constexpr sal_Unicode cParenthesesReplacement
Definition: global.hxx:462
ScQueryConnect
Definition: global.hxx:853
@ SC_OR
Definition: global.hxx:855
@ SC_AND
Definition: global.hxx:854
ScAnchorType
Definition: global.hxx:373
@ SCA_DONTKNOW
Definition: global.hxx:377
@ SCA_CELL_RESIZE
Definition: global.hxx:375
@ SCA_CELL
Definition: global.hxx:374
@ SCA_PAGE
Definition: global.hxx:376
constexpr sal_Int32 MAX_COL_WIDTH
Definition: global.hxx:92
CellType
Definition: global.hxx:271
@ CELLTYPE_EDIT
Definition: global.hxx:276
@ CELLTYPE_STRING
Definition: global.hxx:274
@ CELLTYPE_FORMULA
Definition: global.hxx:275
@ CELLTYPE_NONE
Definition: global.hxx:272
@ CELLTYPE_VALUE
Definition: global.hxx:273
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:300
@ URM_COPY
Definition: global.hxx:302
@ URM_MOVE
Definition: global.hxx:303
@ URM_REORDER
Definition: global.hxx:304
@ URM_INSDEL
Definition: global.hxx:301
constexpr SdrLayerID SC_LAYER_FRONT(0)
ScVObjMode
Definition: global.hxx:367
@ VOBJ_MODE_SHOW
Definition: global.hxx:368
@ VOBJ_MODE_HIDE
Definition: global.hxx:369
ScLkUpdMode
Definition: global.hxx:409
@ LM_NEVER
Definition: global.hxx:411
@ LM_ON_DEMAND
Definition: global.hxx:412
@ LM_UNKNOWN
Definition: global.hxx:413
@ LM_ALWAYS
Definition: global.hxx:410
const sal_Unicode CHAR_NBHY
Definition: global.hxx:72
DelCellCmd
Definition: global.hxx:280
constexpr auto TWIPS_PER_CHAR
Definition: global.hxx:85
ScPasteFunc
Definition: global.hxx:180
constexpr SdrLayerID SC_LAYER_INTERN(2)
InsCellCmd
Definition: global.hxx:289
@ INS_INSROWS_AFTER
Definition: global.hxx:295
@ INS_NONE
Definition: global.hxx:294
@ INS_INSCOLS_AFTER
Definition: global.hxx:296
@ INS_CELLSDOWN
Definition: global.hxx:290
@ INS_INSCOLS_BEFORE
Definition: global.hxx:293
@ INS_CELLSRIGHT
Definition: global.hxx:291
@ INS_INSROWS_BEFORE
Definition: global.hxx:292
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:239
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.
@ 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:184
const sal_Unicode CHAR_NBSP
Definition: global.hxx:67
const sal_Unicode CHAR_LRM
Definition: global.hxx:70
ScSizeMode
Definition: global.hxx:350
@ SC_SIZE_DIRECT
Definition: global.hxx:351
@ SC_SIZE_OPTIMAL
Definition: global.hxx:352
@ SC_SIZE_VISOPT
Definition: global.hxx:354
@ SC_SIZE_ORIGINAL
Definition: global.hxx:355
@ SC_SIZE_SHOW
Definition: global.hxx:353
FillDateCmd
Definition: global.hxx:333
@ FILL_MONTH
Definition: global.hxx:336
@ FILL_YEAR
Definition: global.hxx:338
@ FILL_WEEKDAY
Definition: global.hxx:335
@ FILL_END_OF_MONTH
Definition: global.hxx:337
@ FILL_DAY
Definition: global.hxx:334
ScGetDBSelection
For ScDBFunc::GetDBData()
Definition: global.hxx:390
@ 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:250
@ 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:877
@ AGGREGATE_FUNC_MODSNGL
Definition: global.hxx:890
@ AGGREGATE_FUNC_VAR
Definition: global.hxx:887
@ AGGREGATE_FUNC_CNT2
Definition: global.hxx:880
@ AGGREGATE_FUNC_QRTEXC
Definition: global.hxx:896
@ AGGREGATE_FUNC_PERCINC
Definition: global.hxx:893
@ AGGREGATE_FUNC_PERCEXC
Definition: global.hxx:895
@ AGGREGATE_FUNC_MEDIAN
Definition: global.hxx:889
@ AGGREGATE_FUNC_SMALL
Definition: global.hxx:892
@ AGGREGATE_FUNC_PROD
Definition: global.hxx:883
@ AGGREGATE_FUNC_LARGE
Definition: global.hxx:891
@ AGGREGATE_FUNC_MIN
Definition: global.hxx:882
@ AGGREGATE_FUNC_VARP
Definition: global.hxx:888
@ AGGREGATE_FUNC_SUM
Definition: global.hxx:886
@ AGGREGATE_FUNC_QRTINC
Definition: global.hxx:894
@ AGGREGATE_FUNC_CNT
Definition: global.hxx:879
@ AGGREGATE_FUNC_AVE
Definition: global.hxx:878
@ AGGREGATE_FUNC_STDP
Definition: global.hxx:885
@ AGGREGATE_FUNC_STD
Definition: global.hxx:884
@ AGGREGATE_FUNC_MAX
Definition: global.hxx:881
const sal_Unicode CHAR_ZWSP
Definition: global.hxx:69
ScLinkMode
Definition: global.hxx:214
constexpr SdrLayerID SC_LAYER_BACK(1)
const sal_Unicode CHAR_NNBSP
Definition: global.hxx:74
ScInputMode
Definition: global.hxx:359
@ SC_INPUT_TYPE
Definition: global.hxx:361
@ SC_INPUT_NONE
Definition: global.hxx:360
@ SC_INPUT_TABLE
Definition: global.hxx:362
@ SC_INPUT_TOP
Definition: global.hxx:363
ScSubTotalFunc
Definition: global.hxx:859
@ SUBTOTAL_FUNC_STDP
Definition: global.hxx:868
@ SUBTOTAL_FUNC_MAX
Definition: global.hxx:864
@ SUBTOTAL_FUNC_CNT2
Definition: global.hxx:863
@ SUBTOTAL_FUNC_AVE
Definition: global.hxx:861
@ SUBTOTAL_FUNC_VARP
Definition: global.hxx:871
@ SUBTOTAL_FUNC_VAR
Definition: global.hxx:870
@ SUBTOTAL_FUNC_NONE
Definition: global.hxx:860
@ SUBTOTAL_FUNC_SELECTION_COUNT
Definition: global.hxx:873
@ SUBTOTAL_FUNC_SUM
Definition: global.hxx:869
@ SUBTOTAL_FUNC_MED
Definition: global.hxx:872
@ SUBTOTAL_FUNC_STD
Definition: global.hxx:867
@ SUBTOTAL_FUNC_MIN
Definition: global.hxx:865
@ SUBTOTAL_FUNC_CNT
Definition: global.hxx:862
@ SUBTOTAL_FUNC_PROD
Definition: global.hxx:866
ScScenarioFlags
Definition: global.hxx:225
ScDirection
Definition: global.hxx:342
@ DIR_LEFT
Definition: global.hxx:346
@ DIR_TOP
Definition: global.hxx:345
@ DIR_RIGHT
Definition: global.hxx:344
@ DIR_BOTTOM
Definition: global.hxx:343
ScDBObject
Definition: global.hxx:418
@ ScDbQuery
Definition: global.hxx:420
@ ScDbTable
Definition: global.hxx:419
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:381
@ SC_DB_AUTOFILTER
force use of sheet-local instead of document global anonymous range
Definition: global.hxx:383
@ SC_DB_IMPORT
create "Importx" (if necessary)
Definition: global.hxx:384
@ SC_DB_MAKE
create "untitled" (if necessary)
Definition: global.hxx:382
@ SC_DB_OLD
don't create
Definition: global.hxx:385
ScEnterMode
Definition: global.hxx:218
FillCmd
Definition: global.hxx:316
@ FILL_GROWTH
Definition: global.hxx:319
@ FILL_LINEAR
Definition: global.hxx:318
@ FILL_AUTO
Definition: global.hxx:321
@ FILL_SIMPLE
Definition: global.hxx:317
@ FILL_DATE
Definition: global.hxx:320
ScQueryOp
Definition: global.hxx:833
@ SC_DOES_NOT_CONTAIN
Definition: global.hxx:845
@ SC_LESS_EQUAL
Definition: global.hxx:837
@ SC_LESS
Definition: global.hxx:835
@ SC_GREATER_EQUAL
Definition: global.hxx:838
@ SC_CONTAINS
Definition: global.hxx:844
@ SC_TOPPERC
Definition: global.hxx:842
@ SC_ENDS_WITH
Definition: global.hxx:848
@ SC_DOES_NOT_END_WITH
Definition: global.hxx:849
@ SC_BEGINS_WITH
Definition: global.hxx:846
@ SC_TOPVAL
Definition: global.hxx:840
@ SC_GREATER
Definition: global.hxx:836
@ SC_EQUAL
Definition: global.hxx:834
@ SC_BOTPERC
Definition: global.hxx:843
@ SC_NOT_EQUAL
Definition: global.hxx:839
@ SC_DOES_NOT_BEGIN_WITH
Definition: global.hxx:847
@ SC_BOTVAL
Definition: global.hxx:841
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:308
@ FILL_TO_TOP
Definition: global.hxx:311
@ FILL_TO_RIGHT
Definition: global.hxx:310
@ FILL_TO_LEFT
Definition: global.hxx:312
@ FILL_TO_BOTTOM
Definition: global.hxx:309
constexpr sal_Int32 MAX_EXTRA_HEIGHT
Definition: global.hxx:91
Point Rotate(const Point &rPoint, Degree10 nOrientation, const Point &rOrigin)
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.
ColRowEditAction
Definition: global.hxx:426
constexpr ::tools::Long TwipsToEvenHMM(::tools::Long nTwips)
Definition: global.hxx:100
long Long
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
STRING
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
ScTypedCaseStrSet maFunctionDataPara
Definition: global.hxx:466
std::set< sal_Unicode > maFunctionChar
Definition: global.hxx:467
ScTypedCaseStrSet maFunctionData
Definition: global.hxx:465
Configuration options for formula interpreter.
Definition: calcconfig.hxx:44
ScConsolidateParam & operator=(const ScConsolidateParam &r)
Definition: global2.cxx:136
sal_uInt16 nDataAreaCount
Definition: global.hxx:907
bool operator==(const ScConsolidateParam &r) const
Definition: global2.cxx:161
void ClearDataAreas()
Definition: global2.cxx:119
std::unique_ptr< ScArea[]> pDataAreas
Definition: global.hxx:908
ScSubTotalFunc eFunction
Definition: global.hxx:906
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:441
OUString aStatement
Definition: global.hxx:446
SCCOL nCol1
Definition: global.hxx:440
SCCOL nCol2
Definition: global.hxx:442
ScImportParam & operator=(const ScImportParam &r)
Definition: global2.cxx:71
SCROW nRow2
Definition: global.hxx:443
sal_uInt8 nType
Definition: global.hxx:449
OUString aDBName
Definition: global.hxx:445
bool bNative
Definition: global.hxx:447
bool bImport
Definition: global.hxx:444
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
SvNumFormatType