1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #ifndef _XMLOFF_XMLSECTIONEXPORT_HXX_ 29*cdf0e10cSrcweir #define _XMLOFF_XMLSECTIONEXPORT_HXX_ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <rtl/ustring.hxx> 32*cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h> 33*cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.h> 34*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp> 35*cdf0e10cSrcweir #include <xmloff/xmltoken.hxx> 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir class SvXMLExport; 38*cdf0e10cSrcweir class XMLTextParagraphExport; 39*cdf0e10cSrcweir namespace com { namespace sun { namespace star { 40*cdf0e10cSrcweir namespace text 41*cdf0e10cSrcweir { 42*cdf0e10cSrcweir class XTextSection; 43*cdf0e10cSrcweir class XDocumentIndex; 44*cdf0e10cSrcweir class XTextContent; 45*cdf0e10cSrcweir } 46*cdf0e10cSrcweir namespace beans 47*cdf0e10cSrcweir { 48*cdf0e10cSrcweir class XPropertySet; 49*cdf0e10cSrcweir } 50*cdf0e10cSrcweir namespace container 51*cdf0e10cSrcweir { 52*cdf0e10cSrcweir class XIndexReplace; 53*cdf0e10cSrcweir } 54*cdf0e10cSrcweir } } } 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir enum SectionTypeEnum 58*cdf0e10cSrcweir { 59*cdf0e10cSrcweir TEXT_SECTION_TYPE_SECTION, 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir // indices: keep index valued together and do not change order, 62*cdf0e10cSrcweir // because they are used to index into array 63*cdf0e10cSrcweir TEXT_SECTION_TYPE_TOC, 64*cdf0e10cSrcweir TEXT_SECTION_TYPE_TABLE, 65*cdf0e10cSrcweir TEXT_SECTION_TYPE_ILLUSTRATION, 66*cdf0e10cSrcweir TEXT_SECTION_TYPE_OBJECT, 67*cdf0e10cSrcweir TEXT_SECTION_TYPE_USER, 68*cdf0e10cSrcweir TEXT_SECTION_TYPE_ALPHABETICAL, 69*cdf0e10cSrcweir TEXT_SECTION_TYPE_BIBLIOGRAPHY, 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir // index header sections: 72*cdf0e10cSrcweir TEXT_SECTION_TYPE_HEADER, 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir TEXT_SECTION_TYPE_UNKNOWN 75*cdf0e10cSrcweir }; 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir /** 79*cdf0e10cSrcweir * This class handles the export of sections and indices (which are, 80*cdf0e10cSrcweir * internally, just sections). It is intended to be used only from 81*cdf0e10cSrcweir * within the XMLTextParagraphExport class. 82*cdf0e10cSrcweir */ 83*cdf0e10cSrcweir class XMLSectionExport 84*cdf0e10cSrcweir { 85*cdf0e10cSrcweir const ::rtl::OUString sCondition; 86*cdf0e10cSrcweir const ::rtl::OUString sCreateFromChapter; 87*cdf0e10cSrcweir const ::rtl::OUString sCreateFromEmbeddedObjects; 88*cdf0e10cSrcweir const ::rtl::OUString sCreateFromGraphicObjects; 89*cdf0e10cSrcweir const ::rtl::OUString sCreateFromLabels; 90*cdf0e10cSrcweir const ::rtl::OUString sCreateFromMarks; 91*cdf0e10cSrcweir const ::rtl::OUString sCreateFromOtherEmbeddedObjects; 92*cdf0e10cSrcweir const ::rtl::OUString sCreateFromOutline; 93*cdf0e10cSrcweir const ::rtl::OUString sCreateFromStarCalc; 94*cdf0e10cSrcweir const ::rtl::OUString sCreateFromStarChart; 95*cdf0e10cSrcweir const ::rtl::OUString sCreateFromStarDraw; 96*cdf0e10cSrcweir const ::rtl::OUString sCreateFromStarImage; 97*cdf0e10cSrcweir const ::rtl::OUString sCreateFromStarMath; 98*cdf0e10cSrcweir const ::rtl::OUString sCreateFromTables; 99*cdf0e10cSrcweir const ::rtl::OUString sCreateFromTextFrames; 100*cdf0e10cSrcweir const ::rtl::OUString sDdeCommandElement; 101*cdf0e10cSrcweir const ::rtl::OUString sDdeCommandFile; 102*cdf0e10cSrcweir const ::rtl::OUString sDdeCommandType; 103*cdf0e10cSrcweir const ::rtl::OUString sFileLink; 104*cdf0e10cSrcweir const ::rtl::OUString sIsCaseSensitive; 105*cdf0e10cSrcweir const ::rtl::OUString sIsProtected; 106*cdf0e10cSrcweir const ::rtl::OUString sIsVisible; 107*cdf0e10cSrcweir const ::rtl::OUString sLabelCategory; 108*cdf0e10cSrcweir const ::rtl::OUString sLabelDisplayType; 109*cdf0e10cSrcweir const ::rtl::OUString sLevel; 110*cdf0e10cSrcweir const ::rtl::OUString sLevelFormat; 111*cdf0e10cSrcweir const ::rtl::OUString sLevelParagraphStyles; 112*cdf0e10cSrcweir const ::rtl::OUString sLinkRegion; 113*cdf0e10cSrcweir const ::rtl::OUString sMainEntryCharacterStyleName; 114*cdf0e10cSrcweir const ::rtl::OUString sParaStyleHeading; 115*cdf0e10cSrcweir const ::rtl::OUString sParaStyleLevel; 116*cdf0e10cSrcweir const ::rtl::OUString sTitle; 117*cdf0e10cSrcweir const ::rtl::OUString sName; 118*cdf0e10cSrcweir const ::rtl::OUString sUseAlphabeticalSeparators; 119*cdf0e10cSrcweir const ::rtl::OUString sUseCombinedEntries; 120*cdf0e10cSrcweir const ::rtl::OUString sUseDash; 121*cdf0e10cSrcweir const ::rtl::OUString sUseKeyAsEntry; 122*cdf0e10cSrcweir const ::rtl::OUString sUseLevelFromSource; 123*cdf0e10cSrcweir const ::rtl::OUString sUsePP; 124*cdf0e10cSrcweir const ::rtl::OUString sUseUpperCase; 125*cdf0e10cSrcweir const ::rtl::OUString sIsCommaSeparated; 126*cdf0e10cSrcweir const ::rtl::OUString sIsAutomaticUpdate; 127*cdf0e10cSrcweir const ::rtl::OUString sIsRelativeTabstops; 128*cdf0e10cSrcweir const ::rtl::OUString sCreateFromLevelParagraphStyles; 129*cdf0e10cSrcweir const ::rtl::OUString sDocumentIndex; 130*cdf0e10cSrcweir const ::rtl::OUString sContentSection; 131*cdf0e10cSrcweir const ::rtl::OUString sHeaderSection; 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir const ::rtl::OUString sTextSection; 134*cdf0e10cSrcweir const ::rtl::OUString sIsGlobalDocumentSection; 135*cdf0e10cSrcweir const ::rtl::OUString sProtectionKey; 136*cdf0e10cSrcweir const ::rtl::OUString sSortAlgorithm; 137*cdf0e10cSrcweir const ::rtl::OUString sLocale; 138*cdf0e10cSrcweir const ::rtl::OUString sUserIndexName; 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir const ::rtl::OUString sIsCurrentlyVisible; 141*cdf0e10cSrcweir const ::rtl::OUString sHeadingStyleName; 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir const ::rtl::OUString sEmpty; 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir SvXMLExport& rExport; 146*cdf0e10cSrcweir XMLTextParagraphExport& rParaExport; 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir sal_Bool bHeadingDummiesExported; 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir public: 151*cdf0e10cSrcweir XMLSectionExport(SvXMLExport& rExp, 152*cdf0e10cSrcweir XMLTextParagraphExport& rParaExp); 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir /** 155*cdf0e10cSrcweir * export section or index start and source elements. This 156*cdf0e10cSrcweir * method handles the section styles, and delegates to the 157*cdf0e10cSrcweir * appropriate section or index method. 158*cdf0e10cSrcweir */ 159*cdf0e10cSrcweir void ExportSectionStart( 160*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 161*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > & rSection, 162*cdf0e10cSrcweir sal_Bool bAutoStyles); 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir /** 165*cdf0e10cSrcweir * export section or index end elements 166*cdf0e10cSrcweir */ 167*cdf0e10cSrcweir void ExportSectionEnd( 168*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 169*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > & rSection, 170*cdf0e10cSrcweir sal_Bool bAutoStyles); 171*cdf0e10cSrcweir 172*cdf0e10cSrcweir /** 173*cdf0e10cSrcweir * Should the content of this section be exported? 174*cdf0e10cSrcweir * (E.g. linked sections in global documents are not always exported) 175*cdf0e10cSrcweir */ 176*cdf0e10cSrcweir sal_Bool IsMuteSection( 177*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 178*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > & rSection) const; 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir /** 181*cdf0e10cSrcweir * XTextContent-version of IsMuteSection(Reference<XTextSection>&) 182*cdf0e10cSrcweir * returns *true* for all non-section elements 183*cdf0e10cSrcweir */ 184*cdf0e10cSrcweir sal_Bool IsMuteSection( 185*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 186*cdf0e10cSrcweir ::com::sun::star::text::XTextContent > & rSection, 187*cdf0e10cSrcweir /// return value if this content doesn't support the section property 188*cdf0e10cSrcweir sal_Bool bDefault) const; 189*cdf0e10cSrcweir 190*cdf0e10cSrcweir /** 191*cdf0e10cSrcweir * Determine whether rContent is contained in rEnclosingSection. If the 192*cdf0e10cSrcweir * current section of rContent can not be determined, return bDefault. 193*cdf0e10cSrcweir */ 194*cdf0e10cSrcweir sal_Bool IsInSection( 195*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 196*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > & rEnclosingSection, 197*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 198*cdf0e10cSrcweir ::com::sun::star::text::XTextContent > & rContent, 199*cdf0e10cSrcweir /// return value if this content doesn't support the section property 200*cdf0e10cSrcweir sal_Bool bDefault); 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir /** 203*cdf0e10cSrcweir * Export the configuration element for bibliography indices. 204*cdf0e10cSrcweir * 205*cdf0e10cSrcweir * (This is part of XMLSectionExport because all section- and 206*cdf0e10cSrcweir * index-related items are handled here.) 207*cdf0e10cSrcweir */ 208*cdf0e10cSrcweir static void ExportBibliographyConfiguration(SvXMLExport& rExport); 209*cdf0e10cSrcweir 210*cdf0e10cSrcweir /** export a heading for every level. This is used by master documents 211*cdf0e10cSrcweir * to not loose the heading information if master documents are exported 212*cdf0e10cSrcweir * without section contents 213*cdf0e10cSrcweir */ 214*cdf0e10cSrcweir void ExportMasterDocHeadingDummies(); 215*cdf0e10cSrcweir 216*cdf0e10cSrcweir 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir protected: 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir inline SvXMLExport& GetExport() { return rExport; } 221*cdf0e10cSrcweir inline XMLTextParagraphExport& GetParaExport() { return rParaExport; } 222*cdf0e10cSrcweir 223*cdf0e10cSrcweir // export methods for section and index start: 224*cdf0e10cSrcweir 225*cdf0e10cSrcweir /// export an index start element. 226*cdf0e10cSrcweir void ExportIndexStart( 227*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 228*cdf0e10cSrcweir ::com::sun::star::text::XDocumentIndex > & rSection); 229*cdf0e10cSrcweir 230*cdf0e10cSrcweir /// export an index header start element. 231*cdf0e10cSrcweir void ExportIndexHeaderStart( 232*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 233*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > & rSection); 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir /// export a proper section (and source elements) 236*cdf0e10cSrcweir void ExportRegularSectionStart( 237*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 238*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > & rSection); 239*cdf0e10cSrcweir 240*cdf0e10cSrcweir /// export a table of content (and source element) 241*cdf0e10cSrcweir void ExportTableOfContentStart( 242*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 243*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 244*cdf0e10cSrcweir 245*cdf0e10cSrcweir /// export a table index (and source element) 246*cdf0e10cSrcweir void ExportTableIndexStart( 247*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 248*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir /// export an object index (and source element) 251*cdf0e10cSrcweir void ExportObjectIndexStart( 252*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 253*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir /// export an illustration index (and source element) 256*cdf0e10cSrcweir void ExportIllustrationIndexStart( 257*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 258*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 259*cdf0e10cSrcweir 260*cdf0e10cSrcweir /// export an alphabetical/keyword index (and source element) 261*cdf0e10cSrcweir void ExportAlphabeticalIndexStart( 262*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 263*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 264*cdf0e10cSrcweir 265*cdf0e10cSrcweir /// export a user index (and source element) 266*cdf0e10cSrcweir void ExportUserIndexStart( 267*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 268*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 269*cdf0e10cSrcweir 270*cdf0e10cSrcweir /// export the bibliography (and source element) 271*cdf0e10cSrcweir void ExportBibliographyStart( 272*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 273*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rIndex); 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir // helper methods: 276*cdf0e10cSrcweir 277*cdf0e10cSrcweir /** 278*cdf0e10cSrcweir * If this section is an index, the index is written in the 279*cdf0e10cSrcweir * rIndex parameter. The return value is sal_True for all "special" 280*cdf0e10cSrcweir * sections. 281*cdf0e10cSrcweir * 282*cdf0e10cSrcweir * Thus we have: 283*cdf0e10cSrcweir * return sal_False: regular section 284*cdf0e10cSrcweir * return sal_True, xIndex is empty: index header section 285*cdf0e10cSrcweir * return sal_True, xIndex is set: index section */ 286*cdf0e10cSrcweir sal_Bool GetIndex( 287*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 288*cdf0e10cSrcweir ::com::sun::star::text::XTextSection > & rSection, 289*cdf0e10cSrcweir ::com::sun::star::uno::Reference < 290*cdf0e10cSrcweir ::com::sun::star::text::XDocumentIndex > & rIndex) const; 291*cdf0e10cSrcweir 292*cdf0e10cSrcweir /// map service name to section type 293*cdf0e10cSrcweir enum SectionTypeEnum MapSectionType(const ::rtl::OUString& rSectionName); 294*cdf0e10cSrcweir 295*cdf0e10cSrcweir /** 296*cdf0e10cSrcweir * Export the index element start (for all index types). 297*cdf0e10cSrcweir * 298*cdf0e10cSrcweir * All additional attributes (usually none) for the index element 299*cdf0e10cSrcweir * should have been set at GetExport() before calling this method. 300*cdf0e10cSrcweir */ 301*cdf0e10cSrcweir void ExportBaseIndexStart( 302*cdf0e10cSrcweir ::xmloff::token::XMLTokenEnum eElement, 303*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 304*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 305*cdf0e10cSrcweir 306*cdf0e10cSrcweir /** 307*cdf0e10cSrcweir * Export the index source element (common for all index types). 308*cdf0e10cSrcweir * 309*cdf0e10cSrcweir * All additional attributes for the source element should have 310*cdf0e10cSrcweir * been set at the GetExport() before calling this method. 311*cdf0e10cSrcweir */ 312*cdf0e10cSrcweir void ExportBaseIndexSource( 313*cdf0e10cSrcweir SectionTypeEnum eType, /// index type 314*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 315*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 316*cdf0e10cSrcweir 317*cdf0e10cSrcweir /** 318*cdf0e10cSrcweir * Export the index body (common for all index types). 319*cdf0e10cSrcweir */ 320*cdf0e10cSrcweir void ExportBaseIndexBody( 321*cdf0e10cSrcweir SectionTypeEnum eType, /// index type 322*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 323*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 324*cdf0e10cSrcweir 325*cdf0e10cSrcweir 326*cdf0e10cSrcweir /** 327*cdf0e10cSrcweir * Helper method to export common attributes for table and 328*cdf0e10cSrcweir * illustration indices 329*cdf0e10cSrcweir */ 330*cdf0e10cSrcweir void ExportTableAndIllustrationIndexSourceAttributes( 331*cdf0e10cSrcweir const ::com::sun::star::uno::Reference < 332*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet > & rSection); 333*cdf0e10cSrcweir 334*cdf0e10cSrcweir /// export one template for the specific index type 335*cdf0e10cSrcweir sal_Bool ExportIndexTemplate( 336*cdf0e10cSrcweir SectionTypeEnum eType, /// index type 337*cdf0e10cSrcweir sal_Int32 nLevel, /// outline level (if applicable) 338*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 339*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet> & rPropSet, 340*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< 341*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< 342*cdf0e10cSrcweir ::com::sun::star::beans::PropertyValue> > & rValues); 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir /// export a single template element (e.g. span or tab-stop) 345*cdf0e10cSrcweir void ExportIndexTemplateElement( 346*cdf0e10cSrcweir SectionTypeEnum eType, //i90246, needed for ODF 1.0, 1.0 and 1.2 management 347*cdf0e10cSrcweir ::com::sun::star::uno::Sequence< 348*cdf0e10cSrcweir ::com::sun::star::beans::PropertyValue> & rValues); 349*cdf0e10cSrcweir 350*cdf0e10cSrcweir /// export level paragraph styles 351*cdf0e10cSrcweir void ExportLevelParagraphStyles( 352*cdf0e10cSrcweir ::com::sun::star::uno::Reference< 353*cdf0e10cSrcweir ::com::sun::star::container::XIndexReplace> & xStyles); 354*cdf0e10cSrcweir 355*cdf0e10cSrcweir 356*cdf0e10cSrcweir /// helper to export boolean properties 357*cdf0e10cSrcweir void ExportBoolean( 358*cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 359*cdf0e10cSrcweir ::com::sun::star::beans::XPropertySet> & rPropSet, 360*cdf0e10cSrcweir const ::rtl::OUString& sPropertyName, 361*cdf0e10cSrcweir enum ::xmloff::token::XMLTokenEnum eAttributeName, 362*cdf0e10cSrcweir sal_Bool bDefault, 363*cdf0e10cSrcweir sal_Bool bInvert = sal_False); 364*cdf0e10cSrcweir }; 365*cdf0e10cSrcweir 366*cdf0e10cSrcweir #endif 367