diff options
author | Sascha Ballach <sab@openoffice.org> | 2001-04-06 13:27:59 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2001-04-06 13:27:59 +0000 |
commit | a1f0cbc48543532c5e4f2f966acc217f75588cf3 (patch) | |
tree | 24609644755e6e9f294284d4c39efd84652607bd /sc | |
parent | 71fa06472e4c2f1ed162849c31a55d4b4f0e52b2 (diff) |
#80363#; don't try to export tables without view data and create on import a new ViewData object
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 8cfc23a83aef..52a304eea997 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewdata.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: sab $ $Date: 2001-03-29 08:36:12 $ + * last change: $Author: sab $ $Date: 2001-04-06 14:27:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2120,14 +2120,17 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe { for (USHORT nTab=0; nTab<nTabCount; nTab++) { - uno::Sequence <beans::PropertyValue> aTableViewSettings; - pTabData[nTab]->WriteUserDataSequence(aTableViewSettings); - String sName; - GetDocument()->GetName( nTab, sName ); - rtl::OUString sOUName(sName); - uno::Any aAny; - aAny <<= aTableViewSettings; - xNameContainer->insertByName(sName, aAny); + if (pTabData[nTab]) + { + uno::Sequence <beans::PropertyValue> aTableViewSettings; + pTabData[nTab]->WriteUserDataSequence(aTableViewSettings); + String sName; + GetDocument()->GetName( nTab, sName ); + rtl::OUString sOUName(sName); + uno::Any aAny; + aAny <<= aTableViewSettings; + xNameContainer->insertByName(sName, aAny); + } } pSettings[SC_TABLE_VIEWSETTINGS].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_TABLES)); pSettings[SC_TABLE_VIEWSETTINGS].Value <<= xNameContainer; @@ -2181,7 +2184,10 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue> uno::Any aAny = xNameContainer->getByName(aNames[i]); uno::Sequence<beans::PropertyValue> aTabSettings; if (aAny >>= aTabSettings) + { + pTabData[nTab] = new ScViewDataTable; pTabData[nTab]->ReadUserDataSequence(aTabSettings); + } } } } |