#include <atomic> // HACK: <atomic> includes <stdbool.h>, which in some Clang versions does '#define bool bool', // which confuses clang plugins. #undefbool
// Have the dreaded programmatic filter name defined in one place. inline constexpr OUString SC_TEXT_CSV_FILTER_NAME = u"Text - txt - csv (StarCalc)"_ustr;
// ~105.88 twip, i.e. about 2 times narrower than o3tl::Length::ch, which is 210 twip inline constexpr auto TWIPS_PER_CHAR = o3tl::toTwips(1 / 13.6, o3tl::Length::in);
enumclass ScCloneFlags{ /** Default cell clone flags: do not start listening, do not adjust 3D refs to
old position, clone note captions of cell notes. */ Default = 0x0000,
/** If set, cloned formula cells will start to listen to the document. */
StartListening = 0x0001,
/** If set, absolute refs will not transformed to external references */
NoMakeAbsExternal = 0x0002,
/** If set, global named expressions will be converted to sheet-local named
expressions. */
NamesToLocal = 0x0004
}; namespace o3tl
{ template<> struct typed_flags<ScCloneFlags> : is_typed_flags<ScCloneFlags, 0x0007> {};
}
enum ScSizeMode
{
SC_SIZE_DIRECT, // set size or hide if value is 0
SC_SIZE_OPTIMAL, // set optimal size for everything
SC_SIZE_SHOW, // show with original size
SC_SIZE_VISOPT, // set optimal size only if visible
SC_SIZE_ORIGINAL // only set size, don't change visible flag
};
enum ScInputMode
{
SC_INPUT_NONE,
SC_INPUT_TYPE, // input, while not in inplace mode
SC_INPUT_TABLE, // text cursor in the table
SC_INPUT_TOP // text cursor in the input line
};
enum ScVObjMode // output modes of objects on a page
{
VOBJ_MODE_SHOW,
VOBJ_MODE_HIDE
};
enum ScAnchorType // anchor of a character object
{
SCA_CELL, // anchor to cell, move with cell
SCA_CELL_RESIZE, // anchor to cell, move and resize with cell
SCA_PAGE, // anchor to page, independent of any cells
SCA_DONTKNOW // for multi selection
};
enum ScGetDBMode
{
SC_DB_MAKE, ///< create "untitled" (if necessary)
SC_DB_AUTOFILTER, ///< force use of sheet-local instead of document global anonymous range
SC_DB_IMPORT, ///< create "Importx" (if necessary)
SC_DB_OLD ///< don't create
};
/// For ScDBFunc::GetDBData() enumclass ScGetDBSelection
{ /** Keep selection as is, expand to used data area if no selection. */
Keep,
/** Shrink selection to actually used data area within the selection. */
ShrinkToUsedData,
/** If only one row or portion thereof is selected, shrink row to used data columnsandselectfurtherrowsdownuntilendofdata.Ifanareais selected,shrinkrowstoactuallyusedcolumns.Else,noselection,
expand to used data area. */
RowDown,
/** Behave as if the range corresponding to a ScDBData area was selected,
for API use. */
ForceMark
};
struct ScImportParam
{
SCCOL nCol1;
SCROW nRow1;
SCCOL nCol2;
SCROW nRow2; bool bImport;
OUString aDBName; // alias of data base
OUString aStatement; bool bNative; bool bSql; // statement or name?
sal_uInt8 nType; // enum DBObject
ScImportParam();
ScImportParam( const ScImportParam& r );
~ScImportParam();
ScImportParam& operator= ( const ScImportParam& r ); booloperator== ( const ScImportParam& r ) const;
};
// Formula data replacement character for a pair of parentheses at end of // function name, to force sorting parentheses before all other characters. // Collation may treat parentheses differently. inline constexpr sal_Unicode cParenthesesReplacement = 0x0001; struct InputHandlerFunctionNames
{
ScTypedCaseStrSet maFunctionData;
ScTypedCaseStrSet maFunctionDataPara;
std::set<sal_Unicode> maFunctionChar;
};
class ScDocShell; class SvxSearchItem; class ScAutoFormat; class LegacyFuncCollection; class ScUnoAddInCollection; class ScUserList; class SvxBrushItem; class ScFunctionList; class ScFunctionMgr; class SfxItemPool; class EditTextObject; class SfxObjectShell; class SvNumberFormatter; struct ScInterpreterContext; class ScUnitConverter; class CharClass; class LocaleDataWrapper; class SvtSysLocale; class CalendarWrapper; class CollatorWrapper; class ScFieldEditEngine;
namespace com::sun::star { namespace lang { struct Locale;
} namespace i18n { class XOrdinalSuffix;
}
} namespace utl { class TransliterationWrapper;
}
/// strchr() functionality on unicode, as long as we need it for FormulaToken etc. staticconst sal_Unicode* UnicodeStrChr( const sal_Unicode* pStr, sal_Unicode c );
static sal_Unicode ToUpperAlpha( sal_Unicode c )
{ return ( c >= 'a' && c <= 'z' ) ? ( c-'a'+'A' ) : c; }
/** Adds the string rToken to rTokenList, using a list separator character. @paramrTokenListThestringlistwherethetokenwillbeappendedto. @paramrTokenThetokenstringtoappendtothetokenlist. @paramcSepThecharactertoseparatethetokens. @paramnSepCountSpecifieshowoftencSepisinsertedbetweentwotokens.
@param bForceSep true = Always insert separator; false = Only, if not at begin or end. */
SC_DLLPUBLIC static OUString addToken(
std::u16string_view rTokenList, std::u16string_view rToken,
sal_Unicode cSep, sal_Int32 nSepCount = 1, bool bForceSep = false );
/** Returns true, if the first and last character of the string is cQuote. */
SC_DLLPUBLIC staticbool IsQuoted( std::u16string_view rString, sal_Unicode cQuote );
/** Inserts the character cQuote at beginning and end of rString. @parambEscapeEmbeddedIf<TRUE/>,embeddedquotecharactersare escapedbydoublingthem.
*/
SC_DLLPUBLIC staticvoid AddQuotes( OUString& rString, sal_Unicode cQuote, bool bEscapeEmbedded = true );
/** Erases the character cQuote from rString, if it exists at beginning AND end. @parambUnescapeEmbeddedIf<TRUE/>,embeddeddoubledquotecharacters areunescapedbyreplacingthemwitha singleinstance.
*/
SC_DLLPUBLIC staticvoid EraseQuotes( OUString& rString, sal_Unicode cQuote, bool bUnescapeEmbedded = true );
/** Finds an unquoted instance of cChar in rString, starting at offsetnStart.Unquotedinstancesmayoccurwhenconcatenatingtwo quotedstringswithaseparator,forexample,'s1':'s2'.Embedded quoteshavetobeescapedbybeingdoubled.Callermustensurethat nStartpointsintoanunquotedrangeortheopeningquote.Specialty: ifcChar=='\''thefirstquotecharacterfromnStartonisfound. @returnsoffsetiffound,else-1
*/
SC_DLLPUBLIC static sal_Int32 FindUnquoted( const OUString& rString, sal_Unicode cChar, sal_Int32 nStart = 0 );
/** Finds an unquoted instance of cChar in null-terminated pString. Same semanticsasFindUnquoted(constString&,...) @returns:pointertocChariffound,elseNULL
*/
SC_DLLPUBLIC staticconst sal_Unicode* FindUnquoted( const sal_Unicode* pString, sal_Unicode cChar );
/// a "ReadOnly" formatter for UNO/XML export static SvNumberFormatter* GetEnglishFormatter();
staticbool IsSystemRTL(); // depending on system language static LanguageType GetEditDefaultLanguage(); // for EditEngine::SetDefaultLanguage
SC_DLLPUBLIC static SvtScriptType GetDefaultScriptType(); // for all WEAK characters /** Map ATTR_((CJK|CTL)_)?FONT_... to proper WhichIDs. IfmorethanoneSvtScriptType::...valuesareor'edtogether,prefers
first COMPLEX, then ASIAN */
SC_DLLPUBLIC static sal_uInt16 GetScriptedWhichID( SvtScriptType nScriptType, sal_uInt16 nWhich );
/** Adds a language item to the item set, if the number format item contains
a language that differs from its parent's language. */
SC_DLLPUBLIC staticvoid AddLanguage( SfxItemSet& rSet, const SvNumberFormatter& rFormatter );
/** Obtain the ordinal suffix for a number according to the system locale */ static OUString GetOrdinalSuffix( sal_Int32 nNumber);
/** Replaces the first occurrence of rPlaceholder in rString with rReplacement,orifrPlaceholderisnotfoundappendsonespaceif rStringdoesnotendinaspaceandappendsrReplacement.
struct ScConsolidateParam
{
SCCOL nCol; // cursor position /
SCROW nRow; // or start of destination area respectively
SCTAB nTab;
ScSubTotalFunc eFunction;
sal_uInt16 nDataAreaCount; // number of data areas
std::unique_ptr<ScArea[]> pDataAreas; // array of pointers into data areas bool bByCol; bool bByRow; bool bReferenceData; // reference source data
ScConsolidateParam();
ScConsolidateParam( const ScConsolidateParam& r );
~ScConsolidateParam();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.