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
26namespace oox::xls {
27
30{
31 OUString maCodeName;
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;
61 bool mbSort;
65
66 ::std::vector< ScEnhancedProtection > maEnhancedProtections;
67
68 explicit SheetProtectionModel();
69};
70
72{
73public:
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
103
105 void finalizeImport();
106
107private:
111};
112
113} // namespace oox::xls
114
115/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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
void SvStream & rStrm
Sheet protection settings.
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)
Sheet and outline settings.
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.