23#include <com/sun/star/sheet/XSpreadsheet.hpp>
28#include <oox/token/properties.hxx>
29#include <oox/token/tokens.hxx>
32#include <document.hxx>
42const sal_uInt8 BIFF12_SHEETPR_FILTERMODE = 0x01;
44const sal_uInt16 BIFF_SHEETPR_APPLYSTYLES = 0x0020;
45const sal_uInt16 BIFF_SHEETPR_SYMBOLSBELOW = 0x0040;
46const sal_uInt16 BIFF_SHEETPR_SYMBOLSRIGHT = 0x0080;
47const sal_uInt16 BIFF_SHEETPR_FITTOPAGES = 0x0100;
52 mbFilterMode( false ),
53 mbApplyStyles( false ),
54 mbSummaryBelow( true ),
55 mbSummaryRight( true )
65 mbFormatCells( true ),
66 mbFormatColumns( true ),
68 mbInsertColumns( true ),
70 mbInsertHyperlinks( true ),
71 mbDeleteColumns( true ),
73 mbSelectLocked( false ),
76 mbPivotTables( true ),
77 mbSelectUnlocked( false )
83 maPhoneticSett( rHelper )
153 OUString aRefs( rAttribs.
getString( XML_sqref, OUString()));
154 if (!aRefs.isEmpty())
156 std::unique_ptr<ScRangeList> xRangeList(
new ScRangeList());
158 if (!xRangeList->empty())
182 nFlags1 =
rStrm.readuInt16();
183 nFlags2 =
rStrm.readuChar();
254 Sequence<sal_Int8> aPass{
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
sheet protection state container
void setOption(Option eOption, bool bEnabled)
void setEnhancedProtection(::std::vector< ScEnhancedProtection > &&rProt)
virtual void setPasswordHash(const css::uno::Sequence< sal_Int8 > &aPassword, ScPasswordHash eHash, ScPasswordHash eHash2=PASSHASH_UNSPECIFIED) override
virtual void setProtected(bool bProtected) override
std::optional< sal_uInt32 > getUnsigned(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getIntegerHex(sal_Int32 nAttrToken) const
std::optional< OUString > getString(sal_Int32 nAttrToken) const
std::optional< bool > getBool(sal_Int32 nAttrToken) const
bool setProperty(sal_Int32 nPropId, const Type &rValue)
::Color getColor(const GraphicHelper &rGraphicHelper, ::Color nPhClr=API_RGB_TRANSPARENT) const
void convertToCellRangeList(ScRangeList &orRanges, std::u16string_view aString, sal_Int16 nSheet, bool bTrackOverflow)
Tries to convert the passed string to a cell range list.
bool isAuto() const
Returns true, if the color is set to automatic.
void importColor(const AttributeList &rAttribs)
Imports the color from the passed attribute list.
void setFitToPagesMode(bool bFitToPages)
Sets whether percentual scaling or fit to width/height scaling is used.
void importPhoneticPr(const AttributeList &rAttribs)
Imports phonetic settings from the phoneticPr element.
AddressConverter & getAddressConverter() const
Returns the converter for string to cell address/range conversion.
::oox::core::FilterBase & getBaseFilter() const
Returns the base filter object (base class of all filters).
PageSettings & getPageSettings() const
Returns the page/print settings for this sheet.
ScDocument & getScDocument()
SCTAB getSheetIndex() const
Returns the index of the current sheet.
const css::uno::Reference< css::sheet::XSpreadsheet > & getSheet() const
Returns the XSpreadsheet interface of the current sheet.
void importSheetProtection(const AttributeList &rAttribs)
Imports protection settings from the sheetProtection element.
void importProtectedRange(const AttributeList &rAttribs)
Imports enhanced protection settings from the protectedRange element.
void importOutlinePr(const AttributeList &rAttribs)
Imports outline settings from the outlinePr element.
void importPhoneticPr(const AttributeList &rAttribs)
Imports phonetic settings from the phoneticPr element.
void importChartSheetPr(const AttributeList &rAttribs)
Imports chart sheet settings from the sheetPr element.
SheetSettingsModel maSheetSettings
WorksheetSettings(const WorksheetHelper &rHelper)
void finalizeImport()
Converts the imported worksheet settings.
void importSheetPr(const AttributeList &rAttribs)
Imports sheet settings from the sheetPr element.
void importTabColor(const AttributeList &rAttribs)
Imports the sheet tab color from the tabColor element.
void importChartProtection(const AttributeList &rAttribs)
Imports protection settings from the sheetProtection element of a chart sheet.
SheetProtectionModel maSheetProt
PhoneticSettings maPhoneticSett
OOX_DLLPUBLIC sal_uInt16 getPasswordHash(const AttributeList &rAttribs, sal_Int32 nElement)
bool getFlag(Type nBitField, Type nMask)
Container for the Excel EnhancedProtection feature.
ScOoxPasswordHash maPasswordHash
OUString maSecurityDescriptorXML
sal_uInt32 mnPasswordVerifier
ScRangeListRef maRangeList
OUString maSaltValue
base64 encoded hash value
OUString maHashValue
"SHA-512", ...
sal_uInt32 mnSpinCount
base64 encoded salt value
bool mbDeleteColumns
True = insert hyperlinks locked.
bool mbInsertRows
True = insert columns locked.
bool mbSort
True = select locked cells locked.
bool mbFormatCells
True = scenarios locked.
OUString maSaltValue
Hash value computed by the algorithm, base-64 encoded.
bool mbSelectUnlocked
True = pivot tables locked.
sal_uInt32 mnSpinCount
Salt value to be prepended to the password, base-64 encoded.
bool mbSelectLocked
True = delete rows locked.
bool mbObjects
True = sheet protection enabled, locked cells are protected.
bool mbFormatRows
True = format columns locked.
sal_uInt16 mnPasswordHash
Spin count, iterations to run algorithm.
bool mbInsertColumns
True = format rows locked.
bool mbFormatColumns
True = format cells locked.
bool mbScenarios
True = objects locked.
OUString maHashValue
Algorithm name, "SHA-512", "SHA-1", ...
bool mbInsertHyperlinks
True = insert rows locked.
bool mbDeleteRows
True = delete columns locked.
bool mbPivotTables
True = autofilters locked.
bool mbAutoFilter
True = sorting locked.
::std::vector< ScEnhancedProtection > maEnhancedProtections
True = select unlocked cells locked.
bool mbSheet
Hash value from sheet protection password. (unrelated to the above)
SheetSettingsModel()
True = column outline symbols right of group.
bool mbApplyStyles
True = sheet contains active filter.
bool mbFilterMode
Sheet tab color.
Color maTabColor
VBA module codename.
bool mbSummaryBelow
True = automatic styles when creating outlines.
bool mbSummaryRight
True = row outline symbols below group.