summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2001-06-19 12:18:33 +0000
committerArmin Weiss <aw@openoffice.org>2001-06-19 12:18:33 +0000
commit2d8853bed02e687f3b40e905f9b81c5a6e3a04ee (patch)
treee6cbea70563ef7578409a32e00b3f25974579611 /svx
parent9371192818cc6e4371686706662c770a6cbdf2a6 (diff)
#88340# Add MasterPageDescriptor when imported SdrPage does have NONE
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdpage.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 8ef8c5d05034..1d34c9cf08dd 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdpage.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: dl $ $Date: 2001-05-29 14:42:31 $
+ * last change: $Author: aw $ $Date: 2001-06-19 13:18:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1793,6 +1793,24 @@ void SdrPage::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
aHead.SkipRecord(); // skip end mark
}
}
+
+ // #88340#
+ if(!aMasters.GetCount() && !IsMasterPage())
+ {
+ DBG_ERROR("Page without MasterPageDescriptor loaded (!)");
+ if(pModel && pModel->GetMasterPageCount() > 2)
+ {
+ // This is not allowed. Create a dummy entry
+ // to compensate this error.
+ SdrMasterPageDescriptor aDscr(1/*PageMaster*/);
+ aMasters.Insert(aDscr);
+ }
+ else
+ {
+ SdrMasterPageDescriptor aDscr(0);
+ aMasters.Insert(aDscr);
+ }
+ }
}
void SdrPage::WriteData(SvStream& rOut) const