LibreOffice Module sc (master)  1
worksheetsettings.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 "richstring.hxx"
23 #include "worksheethelper.hxx"
24 #include <tabprotection.hxx>
25 
26 namespace oox::xls {
27 
30 {
31  OUString maCodeName;
33  bool mbFilterMode;
37 
38  explicit SheetSettingsModel();
39 };
40 
43 {
44  OUString maAlgorithmName;
45  OUString maHashValue;
46  OUString maSaltValue;
47  sal_uInt32 mnSpinCount;
48  sal_uInt16 mnPasswordHash;
49  bool mbSheet;
50  bool mbObjects;
51  bool mbScenarios;
54  bool mbFormatRows;
56  bool mbInsertRows;
59  bool mbDeleteRows;
61  bool mbSort;
62  bool mbAutoFilter;
65 
66  ::std::vector< ScEnhancedProtection > maEnhancedProtections;
67 
68  explicit SheetProtectionModel();
69 };
70 
72 {
73 public:
74  explicit WorksheetSettings( const WorksheetHelper& rHelper );
75 
77  void importSheetPr( const AttributeList& rAttribs );
79  void importChartSheetPr( const AttributeList& rAttribs );
81  void importTabColor( const AttributeList& rAttribs );
83  void importOutlinePr( const AttributeList& rAttribs );
85  void importSheetProtection( const AttributeList& rAttribs );
87  void importProtectedRange( const AttributeList& rAttribs );
89  void importChartProtection( const AttributeList& rAttribs );
91  void importPhoneticPr( const AttributeList& rAttribs );
92 
102  void importPhoneticPr( SequenceInputStream& rStrm );
103 
105  void finalizeImport();
106 
107 private:
111 };
112 
113 } // namespace oox::xls
114 
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool mbInsertHyperlinks
True = insert rows locked.
sal_uInt32 mnSpinCount
Salt value to be prepended to the password, base-64 encoded.
bool mbSheet
Hash value from sheet protection password. (unrelated to the above)
SheetSettingsModel maSheetSettings
Sheet and outline settings.
bool mbSummaryRight
True = row outline symbols below group.
void importOutlinePr(const AttributeList &rAttribs)
Imports outline settings from the outlinePr element.
bool mbSelectUnlocked
True = pivot tables locked.
Sheet protection settings.
bool mbDeleteColumns
True = insert hyperlinks locked.
bool mbAutoFilter
True = sorting locked.
void importProtectedRange(const AttributeList &rAttribs)
Imports enhanced protection settings from the protectedRange element.
OUString maSaltValue
Hash value computed by the algorithm, base-64 encoded.
bool mbDeleteRows
True = delete columns locked.
bool mbFormatColumns
True = format cells locked.
::std::vector< ScEnhancedProtection > maEnhancedProtections
True = select unlocked cells locked.
bool mbObjects
True = sheet protection enabled, locked cells are protected.
bool mbInsertColumns
True = format rows locked.
bool mbSummaryBelow
True = automatic styles when creating outlines.
void importSheetPr(const AttributeList &rAttribs)
Imports sheet settings from the sheetPr element.
bool mbFormatRows
True = format columns locked.
OUString maHashValue
Algorithm name, "SHA-512", "SHA-1", ...
bool mbSort
True = select locked cells locked.
bool mbPivotTables
True = autofilters locked.
SheetSettingsModel()
True = column outline symbols right of group.
sal_uInt16 mnPasswordHash
Spin count, iterations to run algorithm.
void importChartSheetPr(const AttributeList &rAttribs)
Imports chart sheet settings from the sheetPr element.
bool mbFormatCells
True = scenarios locked.
bool mbApplyStyles
True = sheet contains active filter.
void importPhoneticPr(const AttributeList &rAttribs)
Imports phonetic settings from the phoneticPr element.
bool mbFilterMode
Sheet tab color.
bool mbInsertRows
True = insert columns locked.
Color maTabColor
VBA module codename.
void importChartProtection(const AttributeList &rAttribs)
Imports protection settings from the sheetProtection element of a chart sheet.
void finalizeImport()
Converts the imported worksheet settings.
WorksheetSettings(const WorksheetHelper &rHelper)
bool mbScenarios
True = objects locked.
bool mbSelectLocked
True = delete rows locked.
void importTabColor(const AttributeList &rAttribs)
Imports the sheet tab color from the tabColor element.
SheetProtectionModel maSheetProt
void SvStream & rStrm
void importSheetProtection(const AttributeList &rAttribs)
Imports protection settings from the sheetProtection element.