tdf#125181 maxY is 50000 in prstGeom for star24 and star32
[LibreOffice.git] / sc / inc / sheetdata.hxx
blob1f3ce07930586c888c3edb6efc5a7cd401e65e2f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_INC_SHEETDATA_HXX
21 #define INCLUDED_SC_INC_SHEETDATA_HXX
23 #include <editeng/editdata.hxx>
24 #include <unordered_set>
25 #include <vector>
27 #include "address.hxx"
29 class SvXMLNamespaceMap;
31 struct ScStreamEntry
33 sal_Int32 mnStartOffset;
34 sal_Int32 mnEndOffset;
36 ScStreamEntry() :
37 mnStartOffset(-1),
38 mnEndOffset(-1)
42 ScStreamEntry( sal_Int32 nStart, sal_Int32 nEnd ) :
43 mnStartOffset(nStart),
44 mnEndOffset(nEnd)
49 struct ScCellStyleEntry
51 OUString maName;
52 ScAddress const maCellPos;
54 ScCellStyleEntry( const OUString& rName, const ScAddress& rPos ) :
55 maName(rName),
56 maCellPos(rPos)
61 struct ScNoteStyleEntry
63 OUString maStyleName;
64 OUString maTextStyle;
65 ScAddress maCellPos;
67 ScNoteStyleEntry( const OUString& rStyle, const OUString& rText, const ScAddress& rPos ) :
68 maStyleName(rStyle),
69 maTextStyle(rText),
70 maCellPos(rPos)
75 struct ScTextStyleEntry
77 OUString const maName;
78 ScAddress const maCellPos;
79 ESelection const maSelection;
81 ScTextStyleEntry( const OUString& rName, const ScAddress& rPos, const ESelection& rSel ) :
82 maName(rName),
83 maCellPos(rPos),
84 maSelection(rSel)
89 struct ScLoadedNamespaceEntry
91 OUString const maPrefix;
92 OUString const maName;
93 sal_uInt16 const mnKey;
95 ScLoadedNamespaceEntry( const OUString& rPrefix, const OUString& rName, sal_uInt16 nKey ) :
96 maPrefix(rPrefix),
97 maName(rName),
98 mnKey(nKey)
103 class ScSheetSaveData
105 std::unordered_set<OUString> maInitialPrefixes;
106 std::vector<ScLoadedNamespaceEntry> maLoadedNamespaces;
108 std::vector<ScCellStyleEntry> maCellStyles;
109 std::vector<ScCellStyleEntry> maColumnStyles;
110 std::vector<ScCellStyleEntry> maRowStyles;
111 std::vector<ScCellStyleEntry> maTableStyles;
112 std::vector<ScNoteStyleEntry> maNoteStyles;
113 std::vector<ScTextStyleEntry> maNoteParaStyles;
114 std::vector<ScTextStyleEntry> maNoteTextStyles;
115 std::vector<ScTextStyleEntry> maTextStyles;
116 std::vector<bool> maBlocked;
117 std::vector<ScStreamEntry> maStreamEntries;
118 std::vector<ScStreamEntry> maSaveEntries;
119 SCTAB mnStartTab;
120 sal_Int32 mnStartOffset;
122 ScNoteStyleEntry maPreviousNote;
124 bool mbInSupportedSave;
126 public:
127 ScSheetSaveData();
128 ~ScSheetSaveData();
130 void AddCellStyle( const OUString& rName, const ScAddress& rCellPos );
131 void AddColumnStyle( const OUString& rName, const ScAddress& rCellPos );
132 void AddRowStyle( const OUString& rName, const ScAddress& rCellPos );
133 void AddTableStyle( const OUString& rName, const ScAddress& rCellPos );
135 void HandleNoteStyles( const OUString& rStyleName, const OUString& rTextName, const ScAddress& rCellPos );
136 void AddNoteContentStyle( sal_uInt16 nFamily, const OUString& rName, const ScAddress& rCellPos, const ESelection& rSelection );
138 void AddTextStyle( const OUString& rName, const ScAddress& rCellPos, const ESelection& rSelection );
140 void BlockSheet( SCTAB nTab );
141 bool IsSheetBlocked( SCTAB nTab ) const;
143 void AddStreamPos( SCTAB nTab, sal_Int32 nStartOffset, sal_Int32 nEndOffset );
144 void GetStreamPos( SCTAB nTab, sal_Int32& rStartOffset, sal_Int32& rEndOffset ) const;
145 bool HasStreamPos( SCTAB nTab ) const;
147 void StartStreamPos( SCTAB nTab, sal_Int32 nStartOffset );
148 void EndStreamPos( sal_Int32 nEndOffset );
150 bool HasStartPos() const { return mnStartTab >= 0; }
152 void ResetSaveEntries();
153 void AddSavePos( SCTAB nTab, sal_Int32 nStartOffset, sal_Int32 nEndOffset );
154 void UseSaveEntries();
156 void StoreInitialNamespaces( const SvXMLNamespaceMap& rNamespaces );
157 void StoreLoadedNamespaces( const SvXMLNamespaceMap& rNamespaces );
158 bool AddLoadedNamespaces( SvXMLNamespaceMap& rNamespaces ) const;
160 const std::vector<ScCellStyleEntry>& GetCellStyles() const { return maCellStyles; }
161 const std::vector<ScCellStyleEntry>& GetColumnStyles() const { return maColumnStyles; }
162 const std::vector<ScCellStyleEntry>& GetRowStyles() const { return maRowStyles; }
163 const std::vector<ScCellStyleEntry>& GetTableStyles() const { return maTableStyles; }
164 const std::vector<ScNoteStyleEntry>& GetNoteStyles() const { return maNoteStyles; }
165 const std::vector<ScTextStyleEntry>& GetNoteParaStyles() const { return maNoteParaStyles; }
166 const std::vector<ScTextStyleEntry>& GetNoteTextStyles() const { return maNoteTextStyles; }
167 const std::vector<ScTextStyleEntry>& GetTextStyles() const { return maTextStyles; }
169 bool IsInSupportedSave() const { return mbInSupportedSave;}
170 void SetInSupportedSave( bool bSet );
173 struct ScFormatSaveData
175 std::map<sal_uInt64, OUString> maIDToName;
178 #endif
180 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */