22#include <osl/diagnose.h>
29 mfTabBarWidth( -1.0 ),
36 maUsedArea(
ScAddress::INITIALIZE_INVALID ),
37 maCursor(
ScAddress::INITIALIZE_INVALID ),
38 maFirstVis(
ScAddress::INITIALIZE_INVALID ),
39 maSecondVis(
ScAddress::INITIALIZE_INVALID ),
40 maFreezePos( 0, 0, 0 ),
47 mbFrozenPanes( false ),
59class ScExtTabSettingsCont
62 explicit ScExtTabSettingsCont();
63 ScExtTabSettingsCont(
const ScExtTabSettingsCont& rSrc );
64 ScExtTabSettingsCont& operator=(
const ScExtTabSettingsCont& rSrc );
69 SCTAB GetLastTab()
const;
72 typedef std::shared_ptr< ScExtTabSettings > ScExtTabSettingsRef;
73 typedef ::std::map< SCTAB, ScExtTabSettingsRef > ScExtTabSettingsMap;
76 void CopyFromMap(
const ScExtTabSettingsMap& rMap );
78 ScExtTabSettingsMap maMap;
83ScExtTabSettingsCont::ScExtTabSettingsCont()
87ScExtTabSettingsCont::ScExtTabSettingsCont(
const ScExtTabSettingsCont& rSrc )
89 CopyFromMap( rSrc.maMap );
92ScExtTabSettingsCont& ScExtTabSettingsCont::operator=(
const ScExtTabSettingsCont& rSrc )
94 CopyFromMap( rSrc.maMap );
100 ScExtTabSettingsMap::const_iterator aIt = maMap.find( nTab );
101 return (aIt == maMap.end()) ? nullptr : aIt->second.get();
106 ScExtTabSettingsRef& rxTabSett = maMap[ nTab ];
108 rxTabSett = std::make_shared<ScExtTabSettings>();
112SCTAB ScExtTabSettingsCont::GetLastTab()
const
114 return maMap.empty() ? -1 : maMap.rbegin()->first;
117void ScExtTabSettingsCont::CopyFromMap(
const ScExtTabSettingsMap& rMap )
120 for(
const auto& [rTab, rxSettings] : rMap )
121 maMap[ rTab ] = std::make_shared<ScExtTabSettings>( *rxSettings );
167 mxImpl->mbChanged = bChanged;
182 return mxImpl->maTabSett.GetTabSettings( nTab );
187 return mxImpl->maTabSett.GetLastTab();
192 return mxImpl->maTabSett.GetOrCreateTabSettings( nTab );
197 return static_cast< SCTAB >(
mxImpl->maCodeNames.size() );
202 OSL_ENSURE( (0 <= nTab) && (nTab <
GetCodeNameCount()),
"ScExtDocOptions::GetCodeName - invalid sheet index" );
203 return ((0 <= nTab) && (nTab <
GetCodeNameCount())) ?
mxImpl->maCodeNames[
static_cast< size_t >( nTab ) ] : OUString();
208 OSL_ENSURE( nTab >= 0,
"ScExtDocOptions::SetCodeName - invalid sheet index" );
211 size_t nIndex =
static_cast< size_t >( nTab );
Extended options held by an ScDocument containing additional settings for filters.
const ScExtDocSettings & GetDocSettings() const
SCTAB GetCodeNameCount() const
ScExtTabSettings & GetOrCreateTabSettings(SCTAB nTab)
void SetChanged(bool bChanged)
If set to true, the data will be copied to the view data after import.
::std::unique_ptr< ScExtDocOptionsImpl > mxImpl
OUString GetCodeName(SCTAB nTab) const
void SetCodeName(SCTAB nTab, const OUString &rCodeName)
Appends a codename for a sheet.
const ScExtTabSettings * GetTabSettings(SCTAB nTab) const
ScExtDocOptions & operator=(const ScExtDocOptions &rSrc)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
@ SCEXT_PANE_TOPLEFT
Single, top, left, or top-left pane.
Implementation struct for ScExtDocOptions containing all members.
ScExtDocSettings maDocSett
bool mbChanged
Codenames for all sheets (VBA module names).
ScExtDocOptionsImpl()
Use only if something has been changed.
ScExtTabSettingsCont maTabSett
Global document settings.
std::vector< OUString > maCodeNames
Settings for all sheets.
Extended settings for the document, used in import/export filters.
Extended settings for a sheet, used in import/export filters.