--- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -478,6 +478,9 @@ SvXMLImportContext* SdXMLImport::CreateMasterStylesContext() { + // office:styles is optional. Master pages still need a named-style + // context when the document supplies only automatic page layouts. + CreateStylesContext(); if (!mxMasterStylesContext.is()) mxMasterStylesContext.set(new SdXMLMasterStylesContext(*this)); return mxMasterStylesContext.get();