From 726abde143b9d11c4cb02cc744687e3d018fc2ca Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 28 Jul 2010 14:17:26 +0200 Subject: writerfilter08ooo330: applied patch for writerfilter08 --- writerfilter/inc/dmapper/DomainMapper.hxx | 2 - writerfilter/inc/resourcemodel/Protocol.hxx | 4 + .../inc/resourcemodel/ResourceModelHelper.hxx | 40 + writerfilter/inc/resourcemodel/TagLogger.hxx | 15 +- writerfilter/inc/resourcemodel/util.hxx | 2 + writerfilter/qa/complex/ooxml/LoadDocuments.java | 51 + writerfilter/qa/complex/ooxml/makefile.mk | 90 + writerfilter/source/dmapper/DomainMapper.cxx | 218 +- .../source/dmapper/DomainMapperTableManager.cxx | 38 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 1401 +-- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 41 +- writerfilter/source/dmapper/FFData.xml | 58 + writerfilter/source/dmapper/FFDataHandler.cxx | 483 + writerfilter/source/dmapper/FFDataHandler.hxx | 161 + writerfilter/source/dmapper/FieldTypes.hxx | 299 + writerfilter/source/dmapper/FormControlHelper.cxx | 309 + writerfilter/source/dmapper/FormControlHelper.hxx | 64 + writerfilter/source/dmapper/PropertyIds.cxx | 2 + writerfilter/source/dmapper/PropertyIds.hxx | 2 + writerfilter/source/dmapper/PropertyMap.cxx | 32 +- writerfilter/source/dmapper/PropertyMap.hxx | 2 + writerfilter/source/dmapper/PropertyMapHelper.cxx | 4 +- writerfilter/source/dmapper/PropertyMapHelper.hxx | 2 + writerfilter/source/dmapper/SettingsTable.cxx | 57 +- writerfilter/source/dmapper/StyleSheetTable.cxx | 69 +- writerfilter/source/dmapper/ThemeTable.cxx | 35 +- writerfilter/source/dmapper/dmapperLoggers.hxx | 2 + writerfilter/source/dmapper/genclass.xsl | 707 ++ writerfilter/source/dmapper/makefile.mk | 2 + writerfilter/source/doctok/WW8DocumentImpl.cxx | 51 +- writerfilter/source/doctok/WW8DocumentImpl.hxx | 15 + writerfilter/source/doctok/WW8FontTable.cxx | 5 - writerfilter/source/doctok/WW8LFOTable.cxx | 7 - writerfilter/source/doctok/WW8ListTable.cxx | 5 - .../source/doctok/WW8ResourceModelImpl.cxx | 1 - writerfilter/source/doctok/WW8StreamImpl.cxx | 6 +- writerfilter/source/doctok/WW8StructBase.cxx | 1 - writerfilter/source/doctok/WW8StyleSheet.cxx | 5 - writerfilter/source/doctok/doctokLoggers.hxx | 4 +- writerfilter/source/doctok/doctokutil.cxx | 53 - writerfilter/source/doctok/dopbase.xml | 91 + writerfilter/source/doctok/makefile.mk | 1 - writerfilter/source/doctok/resources.xmi | 10730 +++++++++++++------ writerfilter/source/doctok/resources.xsl | 21 +- writerfilter/source/doctok/util.hxx | 57 - writerfilter/source/doctok/xmigen.xsl | 72 +- writerfilter/source/filter/ImportFilter.cxx | 19 +- writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 4 + writerfilter/source/ooxml/OOXMLFactory.cxx | 10 +- .../source/ooxml/OOXMLFastContextHandler.cxx | 160 +- .../source/ooxml/OOXMLFastContextHandler.hxx | 45 +- .../source/ooxml/OOXMLFastDocumentHandler.cxx | 7 - .../source/ooxml/OOXMLFastDocumentHandler.hxx | 2 - writerfilter/source/ooxml/OOXMLFastHelper.hxx | 7 - writerfilter/source/ooxml/OOXMLParserState.cxx | 72 +- writerfilter/source/ooxml/OOXMLParserState.hxx | 18 +- writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx | 22 - writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx | 9 - writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 16 - writerfilter/source/ooxml/OOXMLStreamImpl.hxx | 4 - writerfilter/source/ooxml/attrsprm.xsl | 142 + writerfilter/source/ooxml/dummyannotate.xsl | 2 +- writerfilter/source/ooxml/factoryimpl_ns.xsl | 99 +- .../fastresourcesimpl_dml-shapeProperties.xsl | 93 - writerfilter/source/ooxml/model.xml | 71 +- writerfilter/source/ooxml/ooxmlLoggers.hxx | 3 + writerfilter/source/ooxml/status.sh | 6 +- writerfilter/source/resourcemodel/Protocol.cxx | 2 + .../source/resourcemodel/ResourceModelHelper.cxx | 48 + writerfilter/source/resourcemodel/TagLogger.cxx | 125 +- writerfilter/source/resourcemodel/makefile.mk | 1 + .../source/resourcemodel/resourcemodel.cxx | 6 - .../source/resourcemodel/resourcemodel.hxx | 2 - writerfilter/source/resourcemodel/util.cxx | 97 +- 74 files changed, 11879 insertions(+), 4530 deletions(-) create mode 100644 writerfilter/inc/resourcemodel/ResourceModelHelper.hxx create mode 100644 writerfilter/qa/complex/ooxml/LoadDocuments.java create mode 100644 writerfilter/qa/complex/ooxml/makefile.mk mode change 100644 => 100755 writerfilter/source/dmapper/DomainMapper.cxx mode change 100644 => 100755 writerfilter/source/dmapper/DomainMapper_Impl.hxx create mode 100644 writerfilter/source/dmapper/FFData.xml create mode 100644 writerfilter/source/dmapper/FFDataHandler.cxx create mode 100644 writerfilter/source/dmapper/FFDataHandler.hxx create mode 100644 writerfilter/source/dmapper/FieldTypes.hxx create mode 100644 writerfilter/source/dmapper/FormControlHelper.cxx create mode 100644 writerfilter/source/dmapper/FormControlHelper.hxx mode change 100644 => 100755 writerfilter/source/dmapper/SettingsTable.cxx create mode 100644 writerfilter/source/dmapper/genclass.xsl mode change 100644 => 100755 writerfilter/source/dmapper/makefile.mk delete mode 100644 writerfilter/source/doctok/doctokutil.cxx create mode 100644 writerfilter/source/doctok/dopbase.xml delete mode 100644 writerfilter/source/doctok/util.hxx create mode 100644 writerfilter/source/ooxml/attrsprm.xsl delete mode 100644 writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl create mode 100644 writerfilter/source/resourcemodel/ResourceModelHelper.cxx diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index 8a1c64eaa..19c14f020 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -145,8 +145,6 @@ private: rtl::OUString getBracketStringFromEnum(const sal_Int32 nIntValue, const bool bIsPrefix = true); com::sun::star::style::TabAlign getTabAlignFromValue(const sal_Int32 nIntValue); sal_Unicode getFillCharFromValue(const sal_Int32 nIntValue); - void resolveAttributeProperties(Value & val); - void resolveSprmProps(Sprm & sprm_); sal_Int32 mnBackgroundColor; bool mbIsHighlightSet; }; diff --git a/writerfilter/inc/resourcemodel/Protocol.hxx b/writerfilter/inc/resourcemodel/Protocol.hxx index 9418ea365..f53700ae0 100644 --- a/writerfilter/inc/resourcemodel/Protocol.hxx +++ b/writerfilter/inc/resourcemodel/Protocol.hxx @@ -30,6 +30,8 @@ #ifndef INCLUDE_WRITERFILTER_PROTOCOL_HXX #define INCLUDE_WRITERFILTER_PROTOCOL_HXX +#ifdef DEBUG + #include #include "WW8ResourceModel.hxx" #include "TagLogger.hxx" @@ -95,4 +97,6 @@ public: }; } + +#endif // DEBUG #endif // INCLUDE_WRITERFILTER_PROTOCOL_HXX diff --git a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx new file mode 100644 index 000000000..d8191ee95 --- /dev/null +++ b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_RESOURCE_MODEL_HELPER_HXX +#define INCLUDED_RESOURCE_MODEL_HELPER_HXX + +#include + +namespace writerfilter { +namespace resourcemodel { + +void WRITERFILTER_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm); +void WRITERFILTER_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue); + +}} + +#endif // INCLUDED_RESOURCE_MODEL_HELPER_HXX diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx index fa84bf6db..f6552743e 100644 --- a/writerfilter/inc/resourcemodel/TagLogger.hxx +++ b/writerfilter/inc/resourcemodel/TagLogger.hxx @@ -28,7 +28,10 @@ #ifndef INCLUDED_TAG_LOGGER_HXX #define INCLUDED_TAG_LOGGER_HXX +#ifdef DEBUG + #include +#include #include #include #include @@ -76,8 +79,10 @@ namespace writerfilter void addAttr(string name, string value); void addAttr(string name, const ::rtl::OUString & value); void addAttr(string name, sal_uInt32 nValue); + void addAttr(string name, uno::Any rAny); void addTag(Pointer_t pTag); void chars(const string & rChars); + void chars(const ::rtl::OUString & rChars); const string & getTag() const; string toString() const; @@ -93,6 +98,7 @@ namespace writerfilter stack mTags; XMLTag::Pointer_t currentTag() const; XMLTag::Pointer_t mpRoot; + string mFileName; TagLogger(); @@ -101,12 +107,15 @@ namespace writerfilter static Pointer_t getInstance(const char * name); + void setFileName(const string & rName); + void startDocument(); void element(const string & name); void startElement(const string & name); void attribute(const string & name, const string & value); void attribute(const string & name, const ::rtl::OUString & value); void attribute(const string & name, sal_uInt32 value); + void attribute(const string & name, const uno::Any aAny); void addTag(XMLTag::Pointer_t pTag); void chars(const string & chars); void chars(const ::rtl::OUString & chars); @@ -141,6 +150,10 @@ namespace writerfilter virtual void attribute(Id name, Value & val); virtual void sprm(Sprm & sprm); - }; + }; + +WRITERFILTER_DLLPUBLIC XMLTag::Pointer_t unoPropertySetToTag(uno::Reference rPropSet); } + +#endif // DEBUG #endif // INCLUDED_TAG_LOGGER_HXX diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx index f65684cd8..4b34bccde 100644 --- a/writerfilter/inc/resourcemodel/util.hxx +++ b/writerfilter/inc/resourcemodel/util.hxx @@ -39,10 +39,12 @@ namespace writerfilter string WRITERFILTER_DLLPUBLIC xmlify(const string & str); +#ifdef DEBUG string WRITERFILTER_DLLPUBLIC propertysetToString (uno::Reference const & rProps); string toString(uno::Reference< text::XTextRange > textRange); string toString(const string & rString); +#endif } #endif // INCLUDED_RESOURCEMODEL_UTIL_HXX diff --git a/writerfilter/qa/complex/ooxml/LoadDocuments.java b/writerfilter/qa/complex/ooxml/LoadDocuments.java new file mode 100644 index 000000000..6f05391b6 --- /dev/null +++ b/writerfilter/qa/complex/ooxml/LoadDocuments.java @@ -0,0 +1,51 @@ + +package complex.ooxml; +import com.sun.star.lang.XMultiServiceFactory; +import complexlib.ComplexTestCase; +import java.io.File; +import com.sun.star.text.XTextDocument; + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author hb137859 + */ +public class LoadDocuments extends ComplexTestCase { + private XMultiServiceFactory m_xMSF; + + @Override + public String[] getTestMethodNames() { + return new String [] { + "test1" + }; + } + + public void before() throws Exception { + m_xMSF = (XMultiServiceFactory) param.getMSF(); + } + + public void test1() { + String testDocumentsPath = util.utils.getFullTestDocName(""); + log.println("Test documents in:" + testDocumentsPath); + + File dir = new File(testDocumentsPath); + String [] files = dir.list(); + + if (files != null) { + for (int i = 0; i < files.length; ++i) { + log.println(files[i]); + String url = util.utils.getFullTestURL(files[i]); + log.println(url); + + XTextDocument xDoc = util.WriterTools.loadTextDoc(m_xMSF, url); + util.DesktopTools.closeDoc(xDoc); + } + } else { + failed(); + } + } +} diff --git a/writerfilter/qa/complex/ooxml/makefile.mk b/writerfilter/qa/complex/ooxml/makefile.mk new file mode 100644 index 000000000..b57a0f527 --- /dev/null +++ b/writerfilter/qa/complex/ooxml/makefile.mk @@ -0,0 +1,90 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.5.198.1 $ +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ = ..$/..$/.. +TARGET = PropertyValues +PRJNAME = $(TARGET) +PACKAGE = complex$/ooxml + +# --- Settings ----------------------------------------------------- +.INCLUDE: settings.mk + + +#----- compile .java files ----------------------------------------- + +JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +JAVAFILES = LoadDocuments.java +JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) + +#----- make a jar from compiled files ------------------------------ + +MAXLINELENGTH = 100000 + +JARCLASSDIRS = $(PACKAGE) +JARTARGET = $(TARGET).jar +JARCOMPRESS = TRUE + +# --- Parameters for the test -------------------------------------- + +# start an office if the parameter is set for the makefile +.IF "$(OFFICE)" == "" +CT_APPEXECCOMMAND = +.ELSE +CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" +.ENDIF + +# test base is java complex +CT_TESTBASE = -TestBase java_complex + +# build package name with "." instead of $/ +CT_PACKAGE = -o $(PACKAGE:s\$/\.\) + +# start the runner application +CT_APP = org.openoffice.Runner + +# --- Targets ------------------------------------------------------ + +.IF "$(depend)" == "" +ALL: ALLTAR +.ELSE +ALL: ALLDEP +.ENDIF + +.INCLUDE : target.mk + +run: \ + LoadDocuments + +RUN: run + +LoadDocuments: + +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).LoadDocuments + diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx old mode 100644 new mode 100755 index 80384f988..5a089bab6 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -27,6 +27,7 @@ #include "PageBordersHandler.hxx" #include +#include #include #include #include @@ -69,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -98,6 +100,10 @@ using namespace ::com::sun::star; using namespace ::rtl; namespace writerfilter { + +using resourcemodel::resolveSprmProps; +using resourcemodel::resolveAttributeProperties; + namespace dmapper{ #ifdef DEBUG_DOMAINMAPPER @@ -198,6 +204,9 @@ void DomainMapper::attribute(Id nName, Value & val) static ::rtl::OUString sLocalBookmarkName; sal_Int32 nIntValue = val.getInt(); rtl::OUString sStringValue = val.getString(); + + SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext(); + // printf ( "DomainMapper::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nName, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr()); if( nName >= NS_rtf::LN_WIDENT && nName <= NS_rtf::LN_LCBSTTBFUSSR ) m_pImpl->GetFIB().SetData( nName, nIntValue ); @@ -1459,7 +1468,7 @@ void DomainMapper::attribute(Id nName, Value & val) case NS_rtf::LN_sed: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //section properties - resolveAttributeProperties(val); + resolveAttributeProperties(*this, val); break; case NS_rtf::LN_tbdAdd: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ @@ -2133,6 +2142,36 @@ void DomainMapper::attribute(Id nName, Value & val) case NS_ooxml::LN_endtrackchange: m_pImpl->RemoveCurrentRedline( ); break; + case NS_ooxml::LN_CT_DocGrid_linePitch: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + { + //see SwWW8ImplReader::SetDocumentGrid + OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); + if(pSectionContext) + { + pSectionContext->SetGridLinePitch( ConversionHelper::convertTwipToMM100( nIntValue ) ); + } + } + break; + case NS_ooxml::LN_CT_DocGrid_charSpace: + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + { + OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); + if(pSectionContext) + { + pSectionContext->SetDxtCharSpace( nIntValue ); + } + } + break; + case NS_ooxml::LN_CT_DocGrid_type: + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + { + if (pSectionContext != NULL) + { + pSectionContext->SetGridType(nIntValue); + } + } + break; default: { #if OSL_DEBUG_LEVEL > 0 @@ -2167,7 +2206,7 @@ void DomainMapper::sprm(Sprm & rSprm) void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmType ) { #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("sprm"); + dmapper_logger->startElement("DomainMapper.sprm"); dmapper_logger->chars(rSprm.toString()); #endif OSL_ENSURE(rContext.get(), "PropertyMap has to be valid!"); @@ -2176,14 +2215,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp sal_uInt32 nSprmId = rSprm.getId(); //needed for page properties - SectionPropertyMap* pSectionContext = 0; - //the section context is not availabe before the first call of startSectionGroup() - if( !m_pImpl->IsAnyTableImport() ) - { - PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_SECTION); - OSL_ENSURE(pContext.get(), "Section context is not in the stack!"); - pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() ); - } + SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext(); //TODO: In rtl-paragraphs the meaning of left/right are to be exchanged bool bExchangeLeftRight = false; @@ -2221,8 +2253,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmPFSideBySide case NS_sprm::LN_PFKeep: // sprmPFKeep - /* WRITERFILTERSTATUS: done: 0, planned: 3, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ /* WRITERFILTERSTATUS: comment: */ + rContext->Insert(PROP_PARA_SPLIT, true, uno::makeAny(nIntValue ? false : true)); break; case NS_sprm::LN_PFKeepFollow: // sprmPFKeepFollow /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */ @@ -2297,7 +2330,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } //create a new tab stop property - this is done with the contained properties - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); //add this property rContext->Insert(PROP_PARA_TAB_STOPS, true, uno::makeAny( m_pImpl->GetCurrentTabStopAndClear())); } @@ -2430,7 +2463,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case NS_ooxml::LN_CT_PrBase_pBdr: //paragraph border /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); break; /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case NS_sprm::LN_PBrcTop: // sprmPBrcTop @@ -2584,7 +2617,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmPFLocked case NS_sprm::LN_PFWidowControl: case NS_ooxml::LN_CT_PPrBase_widowControl: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { uno::Any aVal( uno::makeAny( sal_Int8(nIntValue ? 2 : 0 ))); rContext->Insert( PROP_PARA_WIDOWS, true, aVal ); @@ -2641,8 +2674,16 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } break; // sprmPOutLvl case NS_sprm::LN_PFBiDi: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( text::WritingMode2::RL_TB )); + rContext->Insert(PROP_PARA_ADJUST, false, uno::makeAny( style::ParagraphAdjust_RIGHT )); + break; // sprmPFBiDi + case NS_ooxml::LN_EG_SectPrContents_bidi: + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + if (pSectionContext != NULL) + pSectionContext->Insert(PROP_WRITING_MODE,false, uno::makeAny( text::WritingMode2::RL_TB)); + break; case NS_sprm::LN_PFNumRMIns: /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmPFNumRMIns @@ -2692,7 +2733,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmCChs case NS_sprm::LN_CSymbol: // sprmCSymbol /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ - resolveSprmProps(rSprm); //resolves LN_FONT and LN_CHAR + resolveSprmProps(*this, rSprm); //resolves LN_FONT and LN_CHAR break; case NS_sprm::LN_CFOle2: /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ @@ -2701,7 +2742,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCIdCharType case NS_sprm::LN_CHighlight: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { sal_Int32 nColor = 0; if(true ==( mbIsHighlightSet = getColorFromIndex(nIntValue, nColor))) @@ -2729,7 +2770,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCPlain case NS_sprm::LN_CKcd: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ rContext->Insert(PROP_CHAR_EMPHASIS, true, uno::makeAny ( getEmphasisValue (nIntValue))); break; // sprmCKcd case NS_sprm::LN_CFEmboss:// sprmCFEmboss @@ -2843,6 +2884,13 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: */ { uno::Any aBold( uno::makeAny( nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("charWeight"); + dmapper_logger->attribute("weight", nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL); + dmapper_logger->endElement("charWeight"); +#endif + rContext->Insert(ePropertyId, true, aBold ); if( nSprmId != NS_sprm::LN_CFBoldBi ) // sprmCFBoldBi rContext->Insert(PROP_CHAR_WEIGHT_ASIAN, true, aBold ); @@ -3079,7 +3127,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCPropRMark case NS_sprm::LN_CSfxText: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ // The file-format has many character animations. We have only // one, so we use it always. Suboptimal solution though. if (nIntValue) @@ -3109,7 +3157,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCBrc case NS_sprm::LN_CShd: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; // sprmCShd case NS_sprm::LN_CIdslRMarkDel: /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ @@ -3515,7 +3563,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; case NS_sprm::LN_SDxtCharSpace: { - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) { @@ -3525,7 +3573,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmSDxtCharSpace case NS_sprm::LN_SDyaLinePitch: // sprmSDyaLinePitch { - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //see SwWW8ImplReader::SetDocumentGrid OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) @@ -3570,8 +3618,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } break; // sprmSClm case NS_sprm::LN_STextFlow: - { + case NS_ooxml::LN_EG_SectPrContents_textDirection: /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + { /* 0 HoriLR 1 Vert TR 2 Vert TR 3 Vert TT 4 HoriLT only 0 and 1 can be imported correctly */ @@ -3589,7 +3638,16 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; default:; } - rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( nDirection ) ); + + PropertyMap * pTargetContext = rContext.get(); + + if (pSectionContext != NULL && + nSprmId == NS_ooxml::LN_EG_SectPrContents_textDirection) + { + pTargetContext = pSectionContext; + } + + pTargetContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( nDirection ) ); } break; // sprmSTextFlow case NS_sprm::LN_TJc: // sprmTJc @@ -3718,11 +3776,11 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break;//undocumented section properties case NS_sprm::LN_CEastAsianLayout: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); break; case NS_ooxml::LN_CT_Tabs_tab: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); m_pImpl->IncorporateTabStop(m_pImpl->m_aCurrentTabStop); m_pImpl->m_aCurrentTabStop = DeletableTabStop(); break; @@ -3739,58 +3797,58 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp m_pImpl->InitTabStopFromStyle( aStyleTabStops ); } } - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); rContext->Insert(PROP_PARA_TAB_STOPS, true, uno::makeAny( m_pImpl->GetCurrentTabStopAndClear())); } break; case NS_ooxml::LN_CT_PPr_sectPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_color: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_rFonts: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_bdr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_eastAsianLayout: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_u: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_lang: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPrBase_spacing: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPrBase_ind: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_RPrDefault_rPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPrDefault_pPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_DocDefaults_pPrDefault: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_DocDefaults_rPrDefault: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_Style_pPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_Style_rPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPr_rPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPrBase_numPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ - resolveSprmProps(rSprm); + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + resolveSprmProps(*this, rSprm); break; case NS_ooxml::LN_EG_SectPrContents_footnotePr: - /* WRITERFILTERSTATUS: done: 1ß0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_SectPrContents_endnotePr: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->SetInFootnoteProperties( NS_ooxml::LN_EG_SectPrContents_footnotePr == nSprmId ); - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); break; case NS_ooxml::LN_EG_SectPrContents_lnNumType: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ { - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); LineNumberSettings aSettings = m_pImpl->GetLineNumberSettings(); aSettings.bIsOn = true; m_pImpl->SetLineNumberSettings( aSettings ); @@ -3827,7 +3885,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp { //TODO: What about style sheet import of frame properties } - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); } break; case NS_ooxml::LN_EG_SectPrContents_pgSz: @@ -3839,7 +3897,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp CT_PageSz.h = aLetter.getHeight(); } CT_PageSz.orient = false; - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) { @@ -3853,7 +3911,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case NS_ooxml::LN_EG_SectPrContents_pgMar: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->InitPageMargins(); - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) { @@ -3908,6 +3966,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } } break; + case NS_ooxml::LN_EG_SectPrContents_docGrid: + resolveSprmProps(*this, rSprm); + break; case NS_ooxml::LN_EG_SectPrContents_pgBorders: { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); @@ -3960,7 +4021,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case NS_ooxml::LN_CT_TblPrBase_tblCellMar: //cell margins /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { - resolveSprmProps(rSprm);//contains LN_CT_TblCellMar_top, LN_CT_TblCellMar_left, LN_CT_TblCellMar_bottom, LN_CT_TblCellMar_right + resolveSprmProps(*this, rSprm);//contains LN_CT_TblCellMar_top, LN_CT_TblCellMar_left, LN_CT_TblCellMar_bottom, LN_CT_TblCellMar_right } break; case NS_ooxml::LN_CT_TblCellMar_top: @@ -4003,7 +4064,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } break; case NS_sprm::LN_CFNoProof: //0x875 no grammar and spell checking, unsupported - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; case NS_ooxml::LN_anchor_anchor: // at_character drawing /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ @@ -4104,7 +4165,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 100, planned: 5, spent: 0 */ { m_pImpl->AddNewRedline( ); - resolveSprmProps( rSprm ); + resolveSprmProps(*this, rSprm ); // now the properties author, date and id should be available sal_Int32 nToken = m_pImpl->GetCurrentRedlineToken(); switch( nToken & 0xffff ) @@ -4160,7 +4221,21 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp //TODO: determines whether top/bottom paragraph spacing is added if equal styles are following - unsupported break; case NS_ooxml::LN_EG_SectPrContents_formProt: //section protection, only form editing is enabled - unsupported - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + case NS_ooxml::LN_EG_SectPrContents_vAlign: + case NS_ooxml::LN_EG_RPrBase_fitText: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_ooxml::LN_ffdata: + { + writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); + if (pProperties.get() != NULL) + { + FFDataHandler::Pointer_t pFFDataHandler(new FFDataHandler()); + + pProperties->resolve(*pFFDataHandler); + m_pImpl->SetFieldFFData(pFFDataHandler); + } + } break; default: { @@ -4173,7 +4248,8 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("sprm"); + dmapper_logger->addTag(rContext->toTag()); + dmapper_logger->endElement("DomainMapper.sprm"); #endif } /*-- 09.06.2006 09:52:13--------------------------------------------------- @@ -4183,13 +4259,13 @@ void DomainMapper::entry(int /*pos*/, writerfilter::Reference::Pointer_t ref) { #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("entry"); + dmapper_logger->startElement("DomainMapper.entry"); #endif ref->resolve(*this); #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("entry"); + dmapper_logger->endElement("DomainMapper.entry"); #endif } /*-- 09.06.2006 09:52:13--------------------------------------------------- @@ -4357,6 +4433,12 @@ void DomainMapper::text(const sal_uInt8 * data_, size_t len) { //TODO: Determine the right text encoding (FIB?) ::rtl::OUString sText( (const sal_Char*) data_, len, RTL_TEXTENCODING_MS_1252 ); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("text"); + dmapper_logger->chars(sText); + dmapper_logger->endElement("text"); +#endif + try { if(len == 1) @@ -4423,11 +4505,6 @@ void DomainMapper::text(const sal_uInt8 * data_, size_t len) pContext.reset(new PropertyMap()); m_pImpl->appendTextPortion( sText, pContext ); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("text"); - dmapper_logger->chars(sText); - dmapper_logger->endElement("text"); -#endif } } catch( const uno::RuntimeException& ) @@ -4819,21 +4896,6 @@ rtl::OUString DomainMapper::getBracketStringFromEnum(const sal_Int32 nIntValue, } } -void DomainMapper::resolveSprmProps(Sprm & rSprm) -{ - writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); - if( pProperties.get()) - pProperties->resolve(*this); -} - -void DomainMapper::resolveAttributeProperties(Value & val) -{ - writerfilter::Reference::Pointer_t pProperties = val.getProperties(); - if( pProperties.get()) - pProperties->resolve(*this); -} - - com::sun::star::style::TabAlign DomainMapper::getTabAlignFromValue(const sal_Int32 nIntValue) { switch (nIntValue) diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 2cca3f433..2591252ee 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -99,14 +99,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) sal_Int32 nIntValue = ((pValue.get() != NULL) ? pValue->getInt() : 0); switch ( nSprmId ) { - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case 0xf661: //sprmTTRLeft left table indent - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case 0xf614: // sprmTTPreferredWidth - preferred table width - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_tblW: //90722; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_tblInd: //90725 + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { //contains unit and value writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); @@ -132,9 +132,9 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) } } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case 0x3404:// sprmTTableHeader case NS_ooxml::LN_CT_TrPrBase_tblHeader: //90704 + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ // if nIntValue == 1 then the row is a repeated header line // to prevent later rows from increasing the repeating m_nHeaderRepeat is set to NULL when repeating stops if( nIntValue > 0 && m_nHeaderRepeat >= 0 ) @@ -147,8 +147,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) else m_nHeaderRepeat = -1; break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case 0xd608: // TDefTable + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) @@ -178,8 +178,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) } } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case 0xD605: // sprmTTableBorders + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) @@ -193,14 +193,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) } } break; - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case 0xd632 : //sprmTNewSpacing - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case 0xd634 : //sprmTNewSpacing + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ //TODO: sprms contain default (TNew) and actual border spacing of cells - not resolvable yet break; - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case 0xd613: //sprmTGridLineProps + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ // TODO: needs a handler /*contains: GridLineProps"> @@ -216,8 +216,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) */ break; - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case 0x740a : //sprmTTlp + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ //TODO: Table look specifier break; case 0x6816 : //unknown @@ -227,10 +227,11 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) case 0x7479 : //unknown case 0xf617 : //unknown case 0xf618 : //unknown + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ bRet = false; break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_tblStyle: //table style name + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { m_sTableStyleName = pValue->getString(); TablePropertyMapPtr pPropMap( new TablePropertyMap ); @@ -238,14 +239,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) insertTableProps(pPropMap); } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblGridBase_gridCol: + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { getCurrentGrid()->push_back( ConversionHelper::convertTwipToMM100( nIntValue ) ); } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TcPrBase_vMerge : //vertical merge + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { // values can be: LN_Value_ST_Merge_restart, LN_Value_ST_Merge_continue, in reality the second one is a 0 TablePropertyMapPtr pMergeProps( new TablePropertyMap ); @@ -253,8 +254,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) cellProps( pMergeProps); } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TcPrBase_gridSpan: //number of grid positions spanned by this cell + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { #if DEBUG_DOMAINMAPPER dmapper_logger->startElement("tablemanager.GridSpan"); @@ -264,13 +265,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) m_nGridSpan = nIntValue; } break; - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_tblLook: + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; //todo: table look specifier - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_TcPrBase_tcW: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ break; //fixed column width is not supported case NS_ooxml::LN_CT_TrPrBase_cnfStyle: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { TablePropertyMapPtr pProps( new TablePropertyMap ); pProps->Insert( PROP_CNF_STYLE, true, uno::makeAny( pValue->getString( ) ) ); @@ -278,9 +280,11 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) } break; case NS_ooxml::LN_CT_PPrBase_cnfStyle: + /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ // TODO cnfStyle on a paragraph break; case NS_ooxml::LN_CT_TcPrBase_cnfStyle: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { TablePropertyMapPtr pProps( new TablePropertyMap ); pProps->Insert( PROP_CNF_STYLE, true, uno::makeAny( pValue->getString( ) ) ); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 50d663788..cffe41109 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -69,6 +69,7 @@ #include #include #include +#include "FieldTypes.hxx" #include #ifdef DEBUG_DOMAINMAPPER @@ -89,269 +90,6 @@ using namespace ::com::sun::star; using namespace ::rtl; namespace writerfilter { namespace dmapper{ -/*-- 08.09.2006 09:39:50--------------------------------------------------- - - -----------------------------------------------------------------------*/ -//defaultswitch { Upper FirstCap Lower } -//Numberingswitch { Arabic, ALPHABETIC, ...} see lcl_ParseNumberingType -enum FieldId -{ - /* ADDRESSBLOCK \d \* MERGEFORMAT -> Addressblock completely unsupported*/ - FIELD_ADDRESSBLOCK - /* ADVANCE \d downvalue \l leftvalue \r rightvalue \u upvalue \x xvalue \y yvalue -> unsupported*/ - ,FIELD_ADVANCE - /* ASK bookmarkname "hint" \d defaultanswer \o \* MERGEFORMAT -> - the hint is not always quoted, inputfield with default answer, prompt before merge (\o) - */ - ,FIELD_ASK - /* AUTONUM \* Numberingswitch -> - mapped to sequence field "AutoNr" - */ - ,FIELD_AUTONUM - /* AUTONUMLGL \* Numberingswitch -> - mapped to sequence field "AutoNr" - */ - ,FIELD_AUTONUMLGL - /* AUTONUMOUT \* Numberingswitch -> - mapped to sequence field "AutoNr" - */ - ,FIELD_AUTONUMOUT - /* AUTHOR NewAuthor \* defaultswitch \* MERGEFORMAT -> - mapped to sequence field "AutoNr" - */ - ,FIELD_AUTHOR - /* COMMENTS "comment" \* MERGEFORMAT -> - Docinfo-Comments - */ - ,FIELD_COMMENTS - /* CREATEDATE \h \* MERGEFORMAT -> - docinfo-created-date - */ - ,FIELD_CREATEDATE - /* DATE \@ "number format" \s \* MERGEFORMAT -> - ww8filterimprovement: multiple languages now supported - */ - ,FIELD_DATE - /* DOCPROPERTY propertyname \* MERGEFORMAT -> - ww8filterimprovement: some fields imported as functionally equivalent fields if possible, - the others imported as UserField - */ - ,FIELD_DOCPROPERTY - /* DOCVARIABLE Name \* MERGEFORMAT -> - ww8filterimprovement: now imported as user fields - */ - ,FIELD_DOCVARIABLE - /* EDITTIME \# "displayformat" \* Numberingswitch \* MERGEFORMAT -> - DocInfo-Modified-Date - ww8filterimprovement: multiple languages now supported - */ - ,FIELD_EDITTIME - /* FILLIN "text to fill in" \d defaultanswer \o \* MERGEFORMAT -> - Function-InputField - */ - ,FIELD_FILLIN - /* FILENAME \p \* * MERGEFORMAT -> - file name (\p with path) - */ - ,FIELD_FILENAME - /* FILESIZE \* NumberingType \* MERGEFORMAT -> - not imported in old ww8 filter, see lcl_ParseNumberingType - todo find alternative field - */ - ,FIELD_FILESIZE - /* =formula \# "number format" - todo find alternative field - */ - ,FIELD_FORMULA - /* GOTOBUTTON text \* MERGEFORMAT -> - not imported in old ww8 filter - todo find alternative field - */ - ,FIELD_GOTOBUTTON - /* HYPERLINK "link" \* MERGEFORMAT -> - not imported in old ww8 filter - ww8filterimprovement: now imported as hyperlink - */ - ,FIELD_HYPERLINK - /* IF condition "then text" "else text" -> - not imported in old ww8 filter - ww8filterimprovement: now imported - todo: condition, if text, else text still missing - */ - ,FIELD_IF - /* INFO NameOfInfo \* MERGEFORMAT -> old - todo: filter imports wrong? - */ - ,FIELD_INFO - /* INCLUDEPICTURE path \* MERGEFORMAT-> - old filter imports an embedded picture - todo: not yet supported - */ - ,FIELD_INCLUDEPICTURE - /* KEYWORDS keyword \* defaultswitch \* Numberingswitch \* MERGEFORMAT -> - DocInfo Keywords - */ - ,FIELD_KEYWORDS - /* LASTSAVEDBY \* MERGEFORMAT -> - DocInfo-Modified-Author - */ - ,FIELD_LASTSAVEDBY - /* MACROBUTTON MacroName quick help text -> - Macro field - */ - ,FIELD_MACROBUTTON - /* MERGEFIELD ColumName \b prefix \f suffix \* MERGEFORMAT -> - ww8filterimprovement: column-only API now upporterd - */ - ,FIELD_MERGEFIELD - /* MERGEREC \* MERGEFORMAT -> - RecordNumber field, maybe without db name - todo: currently unchecked - */ - ,FIELD_MERGEREC - /* MERGESEQ \* MERGEFORMAT -> - not imported in old ww8 filter - ww8filterimprovement: now imported - todo: currently unchecked - */ - ,FIELD_MERGESEQ - /* NEXT text -> - Next record - todo: currently unchecked - */ - ,FIELD_NEXT - /* NEXTIF condition - todo: condition not imported - */ - ,FIELD_NEXTIF - /* PAGE \* Numberingswitch \* MERGEFORMAT -> - see lcl_ParseNumberingType - */ - ,FIELD_PAGE - /* REF targetbkm \f \* MERGEFORMAT -> - imports a ShowVariable (bookmarkname)? - \h hyerlink to paragraph - \p relative to para above/below - \f refenence number - \d separator number separator - \n paragraph number - \r paragraph number in relative context - \t suppres non delimiters - \w paragraph number in full context - \* Upper/Lower... - */ - ,FIELD_REF // - /* REVNUM \* Numberingswitch \* MERGEFORMAT -> - DocInfo-revision number - */ - ,FIELD_REVNUM - /* SAVEDATE \@ "NumberFormat"\* MERGEFORMAT -> - DocInfo-modified-date - */ - ,FIELD_SAVEDATE - /* SECTION \* NumberFormat \* MERGEFORMAT -> - not imported in old ww8 filter see lcl_ParseNumberingType - todo: find alternative - */ - ,FIELD_SECTION - /* SECTIONPAGES \* NumberFormat \* MERGEFORMAT -> - not imported in old ww8 filter see lcl_ParseNumberingType - todo: find alternative - */ - ,FIELD_SECTIONPAGES - /* SEQ sequencename \h \c \n \r \s \* MERGEFORMAT -> - number range name:sequencename value:sequencename+1 - todo: only partially implemented, switches unsupported - */ - ,FIELD_SEQ - /* SET bookmarkname newtext \* MERGEFORMAT -> - SetVariable bookmarkname = newtext - todo: not implemented yet - */ - ,FIELD_SET - /* SKIPIF condition \* MERGEFORMAT -> - ?? - todo: not implemented yet - */ - ,FIELD_SKIPIF - /* STYLEREF stylename \* MERGEFORMAT -> - not imported in old ww8 filter - todo: add an equivalent field type - */ - ,FIELD_STYLEREF - /* SUBJECT subject \* Defaultswitch \* MERGEFORMAT -> - DocInfo - subject - */ - ,FIELD_SUBJECT - /* SYMBOL symbolnumber \* MERGEFORMAT -> - inserts a special char (symbolnumber) - todo: find alternative - */ - ,FIELD_SYMBOL - /* TEMPLATE \* Defaultswitch \* MERGEFORMAT - TemplateName field - */ - ,FIELD_TEMPLATE - /* TIME \@ "number format" \* MERGEFORMAT - ww8filterimprovement: multiple languages now supported - */ - ,FIELD_TIME - /* TITLE \* Defaultswitch \* MERGEFORMAT -> - DocInfo-title - */ - ,FIELD_TITLE - /* USERINITIALS newinitials \* MERGEFORMAT -> - ExtendedUser field (SHORTCUT) - */ - ,FIELD_USERINITIALS - /* USERADDRESS \* MERGEFORMAT -> - not imported in old ww8 filter - todo: find alternative - */ - ,FIELD_USERADDRESS - /* USERNAME newusername \* MERGEFORMAT -> - not imported in old ww8 filter - todo: import as extended user field(s) - */ - ,FIELD_USERNAME - /* - TOC options: - \a Builds a table of figures but does not include the captions's label and number - \b Uses a bookmark to specify area of document from which to build table of contents - \c Builds a table of figures of the given label - \d Defines the separator between sequence and page numbers - \f Builds a table of contents using TC entries instead of outline levels - \h Hyperlinks the entries and page numbers within the table of contents - \l Defines the TC entries field level used to build a table of contents - \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers - \o Builds a table of contents by using outline levels instead of TC entries - \p Defines the separator between the table entry and its page number - \s Builds a table of contents by using a sequence type - \t Builds a table of contents by using style names other than the standard outline styles - \u Builds a table of contents by using the applied paragraph outline level - \w Preserve tab characters within table entries - \x Preserve newline characters within table entries - \z Hides page numbers within the table of contens when shown in Web Layout View - */ - ,FIELD_TOC - /* - TOC entry: “text” - \f TC entry in doc with multiple tables - \l Outline Level - \n Suppress page numbers - example: TOC "EntryText \f \l 2 \n - */ - ,FIELD_TC - /* document statistic - number of characters - */ - ,FIELD_NUMCHARS - /* document statistic - number of words - */ - ,FIELD_NUMWORDS - /* document statistic - number of pages - */ - ,FIELD_NUMPAGES -}; struct FieldConversion { ::rtl::OUString sWordCommand; @@ -2543,6 +2281,10 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::FindOrCreateFieldMaster -----------------------------------------------------------------------*/ void DomainMapper_Impl::PushFieldContext() { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("pushFieldContext"); +#endif + uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend; //insert a dummy char to make sure the start range doesn't move together with the to-be-appended text xTextAppend->appendTextPortion(::rtl::OUString( '-' ), uno::Sequence< beans::PropertyValue >() ); @@ -2585,11 +2327,74 @@ void FieldContext::AppendCommand(const ::rtl::OUString& rPart) { m_sCommand += rPart; } + +::std::vector FieldContext::GetCommandParts() const +{ + ::std::vector aResult; + sal_Int32 nIndex = 0; + bool bInString = false; + OUString sPart; + while (nIndex != -1) + { + OUString sToken = GetCommand().getToken(0, ' ', nIndex); + bool bInStringNext = bInString; + + if (sToken.getLength() == 0) + continue; + + if (sToken.getStr()[0] == '"') + { + bInStringNext = true; + sToken = sToken.copy(1); + } + if (sToken.getStr()[sToken.getLength() - 1] == '"') + { + bInStringNext = false; + sToken = sToken.copy(0, sToken.getLength() - 1); + } + + if (bInString) + { + if (bInStringNext) + { + sPart += OUString(' '); + sPart += sToken; + } + else + { + sPart += sToken; + aResult.push_back(sPart); + } + } + else + { + if (bInStringNext) + { + sPart = sToken; + } + else + { + aResult.push_back(sToken); + } + } + + bInString = bInStringNext; + } + + return aResult; +} + /*-- 29.01.2007 11:33:15--------------------------------------------------- //collect the pieces of the command -----------------------------------------------------------------------*/ void DomainMapper_Impl::AppendFieldCommand(::rtl::OUString& rPartOfCommand) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("appendFieldCommand"); + dmapper_logger->chars(rPartOfCommand); + dmapper_logger->endElement("appendFieldCommand"); +#endif + FieldContextPtr pContext = m_aFieldStack.top(); OSL_ENSURE( pContext.get(), "no field context available"); if( pContext.get() ) @@ -2600,90 +2405,500 @@ void DomainMapper_Impl::AppendFieldCommand(::rtl::OUString& rPartOfCommand) /*-- 13.12.2007 11:45:43--------------------------------------------------- -----------------------------------------------------------------------*/ -typedef std::multimap < sal_Int32, ::rtl::OUString > TOCStyleMap; +typedef std::multimap < sal_Int32, ::rtl::OUString > TOCStyleMap; + +const FieldConversionMap_t & lcl_GetFieldConversion() +{ +static FieldConversionMap_t aFieldConversionMap; +static bool bFilled = false; +if(!bFilled) +{ + static const FieldConversion aFields[] = + { +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADDRESSBLOCK")), "", "", FIELD_ADDRESSBLOCK }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADVANCE")), "", "", FIELD_ADVANCE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ASK")), "SetExpression", "SetExpression", FIELD_ASK }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUM")), "SetExpression", "SetExpression", FIELD_AUTONUM }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMLGL")), "SetExpression", "SetExpression", FIELD_AUTONUMLGL }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMOUT")), "SetExpression", "SetExpression", FIELD_AUTONUMOUT }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTHOR")), "Author", "", FIELD_AUTHOR }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")), "DateTime", "", FIELD_DATE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("COMMENTS")), "DocInfo.Description", "", FIELD_COMMENTS }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CREATEDATE")), "DocInfo.CreateDateTime", "", FIELD_CREATEDATE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCPROPERTY")), "", "", FIELD_DOCPROPERTY }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCVARIABLE")), "User", "", FIELD_DOCVARIABLE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EDITTIME")), "DocInfo.EditTime", "", FIELD_EDITTIME }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILLIN")), "Input", "", FIELD_FILLIN }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILENAME")), "FileName", "", FIELD_FILENAME }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILESIZE")), "", "", FIELD_FILESIZE }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMULA")), "", "", FIELD_FORMULA }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMCHECKBOX")), "", "", FIELD_FORMCHECKBOX}, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMDROPDOWN")), "", "", FIELD_FORMDROWDOWN}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMTEXT")), "Input", "", FIELD_FORMTEXT}, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GOTOBUTTON")), "", "", FIELD_GOTOBUTTON }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HYPERLINK")), "", "", FIELD_HYPERLINK }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IF")), "ConditionalText", "", FIELD_IF }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INFO")), "","", FIELD_INFO }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INCLUDEPICTURE")), "", "", FIELD_INCLUDEPICTURE}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEYWORDS")), "DocInfo.KeyWords", "", FIELD_KEYWORDS }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LASTSAVEDBY")), "DocInfo.ChangeAuthor", "", FIELD_LASTSAVEDBY }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MACROBUTTON")), "Macro", "", FIELD_MACROBUTTON }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEFIELD")), "Database", "Database", FIELD_MERGEFIELD}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEREC")), "DatabaseNumberOfSet", "", FIELD_MERGEREC }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGESEQ")), "", "", FIELD_MERGESEQ }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXT")), "DatabaseNextSet", "", FIELD_NEXT }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXTIF")), "DatabaseNextSet", "", FIELD_NEXTIF }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PAGE")), "PageNumber", "", FIELD_PAGE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REF")), "GetReference", "", FIELD_REF }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVNUM")), "DocInfo.Revision", "", FIELD_REVNUM }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SAVEDATE")), "DocInfo.Change", "", FIELD_SAVEDATE }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTION")), "", "", FIELD_SECTION }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTIONPAGES")), "", "", FIELD_SECTIONPAGES }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SEQ")), "SetExpression", "SetExpression", FIELD_SEQ }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET")), "","", FIELD_SET }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SKIPIF")),"", "", FIELD_SKIPIF }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("STYLEREF")),"", "", FIELD_STYLEREF }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SUBJECT")), "DocInfo.Subject", "", FIELD_SUBJECT }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYMBOL")),"", "", FIELD_SYMBOL }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEMPLATE")), "TemplateName", "", FIELD_TEMPLATE}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")), "DateTime", "", FIELD_TIME }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TITLE")), "DocInfo.Title", "", FIELD_TITLE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERINITIALS")), "ExtendedUser", "", FIELD_USERINITIALS}, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERADDRESS")), "", "", FIELD_USERADDRESS }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERNAME")), "ExtendedUser", "", FIELD_USERNAME } + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TOC")), "com.sun.star.text.ContentIndex", "", FIELD_TOC}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TC")), "com.sun.star.text.ContentIndexMark", "", FIELD_TC}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMCHARS")), "CharacterCount", "", FIELD_NUMCHARS}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMWORDS")), "WordCount", "", FIELD_NUMWORDS}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMPAGES")), "PageCount", "", FIELD_NUMPAGES}, + +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), "", "", FIELD_}, + + }; + size_t nConversions = sizeof(aFields)/sizeof(FieldConversion); + for( size_t nConversion = 0; nConversion < nConversions; ++nConversion) + { + aFieldConversionMap.insert( FieldConversionMap_t::value_type( + aFields[nConversion].sWordCommand, + aFields[nConversion] )); + } + + bFilled = true; + } + + return aFieldConversionMap; +} + +void DomainMapper_Impl::handleFieldAsk + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties) +{ + //doesn the command contain a variable name? + ::rtl::OUString sVariable, sHint; + + sVariable = lcl_ExctractAskVariableAndHint( pContext->GetCommand(), + sHint ); + if(sVariable.getLength()) + { + // determine field master name + uno::Reference< beans::XPropertySet > xMaster = + FindOrCreateFieldMaster + ("com.sun.star.text.FieldMaster.SetExpression", sVariable ); + + // attach the master to the field + uno::Reference< text::XDependentTextField > xDependentField + ( xFieldInterface, uno::UNO_QUERY_THROW ); + xDependentField->attachTextFieldMaster( xMaster ); + + // set input flag at the field + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_IS_INPUT), uno::makeAny( true )); + // set the prompt + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_HINT), + uno::makeAny( sHint )); + } + else + { + //don't insert the field + //todo: maybe import a 'normal' input field here? + xFieldInterface = 0; + } +} + +void DomainMapper_Impl::handleAutoNum + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties) +{ + //create a sequence field master "AutoNr" + uno::Reference< beans::XPropertySet > xMaster = + FindOrCreateFieldMaster + ("com.sun.star.text.FieldMaster.SetExpression", + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoNr") )); + + xMaster->setPropertyValue( rPropNameSupplier.GetName(PROP_SUB_TYPE), + uno::makeAny(text::SetVariableType::SEQUENCE)); + + //apply the numbering type + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_NUMBERING_TYPE), + uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) )); + // attach the master to the field + uno::Reference< text::XDependentTextField > xDependentField + ( xFieldInterface, uno::UNO_QUERY_THROW ); + xDependentField->attachTextFieldMaster( xMaster ); +} + +void DomainMapper_Impl::handleAuthor + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & /*xFieldInterface*/, + uno::Reference< beans::XPropertySet > xFieldProperties) +{ + xFieldProperties->setPropertyValue + ( rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true )); + ::rtl::OUString sParam = + lcl_ExtractParameter(pContext->GetCommand(), sizeof(" AUTHOR") ); + if(sParam.getLength()) + { + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName( PROP_IS_FIXED ), + uno::makeAny( true )); + //PROP_CURRENT_PRESENTATION is set later anyway + } +} + + void DomainMapper_Impl::handleDocProperty + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties) +{ + //some docproperties should be imported as document statistic fields, some as DocInfo fields + //others should be user fields + ::rtl::OUString sParam = + lcl_ExtractParameter(pContext->GetCommand(), sizeof(" DOCPROPERTY") ); + + if(sParam.getLength()) + { + #define SET_ARABIC 0x01 + #define SET_FULL_NAME 0x02 + struct DocPropertyMap + { + const sal_Char* pDocPropertyName; + const sal_Char* pServiceName; + sal_uInt8 nFlags; + }; + static const DocPropertyMap aDocProperties[] = + { + {"Author", "Author", SET_FULL_NAME}, + {"CreateTime", "DocInfo.CreateDateTime", 0}, + {"Characters", "CharacterCount", SET_ARABIC}, + {"Comments", "DocInfo.Description", 0}, + {"Keywords", "DocInfo.KeyWords", 0}, + {"LastPrinted", "DocInfo.PrintDateTime", 0}, + {"LastSavedBy", "DocInfo.ChangeAuthor", 0}, + {"LastSavedTime", "DocInfo.ChangeDateTime", 0}, + {"Paragraphs", "ParagraphCount", SET_ARABIC}, + {"RevisionNumber", "DocInfo.Revision", 0}, + {"Subject", "DocInfo.Subject", 0}, + {"Template", "TemplateName", 0}, + {"Title", "DocInfo.Title", 0}, + {"TotalEditingTime", "DocInfo.EditTime", 9}, + {"Words", "WordCount", SET_ARABIC} + + //other available DocProperties: + //Bytes, Category, CharactersWithSpaces, Company + //HyperlinkBase, + //Lines, Manager, NameofApplication, ODMADocId, Pages, + //Security, + }; + //search for a field mapping + ::rtl::OUString sFieldServiceName; + sal_uInt16 nMap = 0; + for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap); + ++nMap ) + { + if(sParam.equalsAscii(aDocProperties[nMap].pDocPropertyName)) + { + sFieldServiceName = + ::rtl::OUString::createFromAscii + (aDocProperties[nMap].pServiceName); + break; + } + } + ::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM + ("com.sun.star.text.TextField.")); + bool bIsCustomField = false; + if(!sFieldServiceName.getLength()) + { + //create a custom property field + sServiceName += + ::rtl::OUString::createFromAscii("DocInfo.Custom"); + bIsCustomField = true; + } + else + { + sServiceName += sFieldServiceName; + } + xFieldInterface = m_xTextFactory->createInstance(sServiceName); + xFieldProperties = + uno::Reference< beans::XPropertySet >( xFieldInterface, + uno::UNO_QUERY_THROW); + if( bIsCustomField ) + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_NAME), uno::makeAny( sParam )); + else + { + if(0 != (aDocProperties[nMap].nFlags & SET_ARABIC)) + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_NUMBERING_TYPE), + uno::makeAny( style::NumberingType::ARABIC )); + else if(0 != (aDocProperties[nMap].nFlags & SET_FULL_NAME)) + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_FULL_NAME), + uno::makeAny( true )); + } + } + +#undef SET_ARABIC +#undef SET_FULL_NAME +} + +void DomainMapper_Impl::handleToc + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & /*xFieldInterface*/, + uno::Reference< beans::XPropertySet > /*xFieldProperties*/, + const ::rtl::OUString & sTOCServiceName) +{ + ::rtl::OUString sValue; + bool bTableOfFigures = false; + bool bHyperlinks = false; + bool bFromOutline = false; + bool bFromEntries = false; + sal_Int16 nMaxLevel = 10; + ::rtl::OUString sTemplate; + ::rtl::OUString sChapterNoSeparator; +// \a Builds a table of figures but does not include the captions's label and number + if( lcl_FindInCommand( pContext->GetCommand(), 'a', sValue )) + { //make it a table of figures + bTableOfFigures = true; + } +// \b Uses a bookmark to specify area of document from which to build table of contents +// if( lcl_FindInCommand( pContext->GetCommand(), 'b', sValue )) +// { //todo: sValue contains the bookmark name - unsupported feature +// } + if( lcl_FindInCommand( pContext->GetCommand(), 'c', sValue )) +// \c Builds a table of figures of the given label + { + //todo: sValue contains the label's name + bTableOfFigures = true; + } +// \d Defines the separator between sequence and page numbers + if( lcl_FindInCommand( pContext->GetCommand(), 'd', sValue )) + { + //todo: insert the chapter number into each level and insert the separator additionally + sChapterNoSeparator = sValue; + } +// \f Builds a table of contents using TC entries instead of outline levels + if( lcl_FindInCommand( pContext->GetCommand(), 'f', sValue )) + { + //todo: sValue can contain a TOC entry identifier - use unclear + bFromEntries = true; + } +// \h Hyperlinks the entries and page numbers within the table of contents + if( lcl_FindInCommand( pContext->GetCommand(), 'h', sValue )) + { + //todo: make all entries to hyperlinks + bHyperlinks = true; + } +// \l Defines the TC entries field level used to build a table of contents +// if( lcl_FindInCommand( pContext->GetCommand(), 'l', sValue )) +// { + //todo: entries can only be included completely +// } +// \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers +// if( lcl_FindInCommand( pContext->GetCommand(), 'n', sValue )) +// { + //todo: what does the description mean? +// } +// \o Builds a table of contents by using outline levels instead of TC entries + if( lcl_FindInCommand( pContext->GetCommand(), 'o', sValue )) + { + bFromOutline = true; + UniString sParam( sValue ); + xub_StrLen nIndex = 0; + sParam.GetToken( 0, '-', nIndex ); + nMaxLevel = sal_Int16( sParam.Copy( nIndex ).ToInt32( ) ); + } +// \p Defines the separator between the table entry and its page number + if( lcl_FindInCommand( pContext->GetCommand(), 'p', sValue )) + { } +// \s Builds a table of contents by using a sequence type + if( lcl_FindInCommand( pContext->GetCommand(), 's', sValue )) + { } +// \t Builds a table of contents by using style names other than the standard outline styles + if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue )) + { + sal_Int32 nPos = 0; + ::rtl::OUString sToken = sValue.getToken( 1, '"', nPos); + sTemplate = sToken.getLength() ? sToken : sValue; + } +// \u Builds a table of contents by using the applied paragraph outline level + if( lcl_FindInCommand( pContext->GetCommand(), 'u', sValue )) + { + bFromOutline = true; + //todo: what doesn 'the applied paragraph outline level' refer to? + } +// \w Preserve tab characters within table entries +// if( lcl_FindInCommand( pContext->GetCommand(), 'w', sValue )) +// { + //todo: not supported +// } +// \x Preserve newline characters within table entries +// if( lcl_FindInCommand( pContext->GetCommand(), 'x', sValue )) +// { + //todo: unsupported +// } +// \z Hides page numbers within the table of contens when shown in Web Layout View +// if( lcl_FindInCommand( pContext->GetCommand(), 'z', sValue )) +// { //todo: unsupported feature } + + //if there's no option then it should be created from outline + if( !bFromOutline && !bFromEntries && !sTemplate.getLength() ) + bFromOutline = true; + + uno::Reference< beans::XPropertySet > xTOC( + m_xTextFactory->createInstance + ( bTableOfFigures ? + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM + ("com.sun.star.text.IllustrationsIndex")) + : sTOCServiceName), + uno::UNO_QUERY_THROW); + xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(::rtl::OUString())); + if( !bTableOfFigures ) + { + xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_LEVEL ), uno::makeAny( nMaxLevel ) ); + xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline )); + xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries )); + if( sTemplate.getLength() ) + { + //the string contains comma separated the names and related levels + //like: "Heading 1,1,Heading 2,2" + TOCStyleMap aMap; + sal_Int32 nLevel; + sal_Int32 nPosition = 0; + while( nPosition >= 0) + { + ::rtl::OUString sStyleName = sTemplate.getToken( 0, ',', nPosition ); + //empty tokens should be skipped + while( !sStyleName.getLength() && nPosition > 0 ) + sStyleName = sTemplate.getToken( 0, ',', nPosition ); + nLevel = sTemplate.getToken( 0, ',', nPosition ).toInt32(); + if( !nLevel ) + nLevel = 1; + if( sStyleName.getLength() ) + aMap.insert( TOCStyleMap::value_type(nLevel, sStyleName) ); + } + uno::Reference< container::XIndexReplace> xParaStyles; + xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles; + for( nLevel = 1; nLevel < 10; ++nLevel) + { + sal_Int32 nLevelCount = aMap.count( nLevel ); + if( nLevelCount ) + { + TOCStyleMap::iterator aTOCStyleIter = aMap.find( nLevel ); + + uno::Sequence< rtl::OUString> aStyles( nLevelCount ); + for ( sal_Int32 nStyle = 0; nStyle < nLevelCount; ++nStyle, ++aTOCStyleIter ) + { + aStyles[nStyle] = aTOCStyleIter->second; + } + xParaStyles->replaceByIndex(nLevel - 1, uno::makeAny(aStyles)); + } + } + xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), uno::makeAny( true )); + + } + if(bHyperlinks || sChapterNoSeparator.getLength()) + { + uno::Reference< container::XIndexReplace> xLevelFormats; + xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats; + sal_Int32 nLevelCount = xLevelFormats->getCount(); + //start with level 1, 0 is the header level + for( sal_Int32 nLevel = 1; nLevel < nLevelCount; ++nLevel) + { + uno::Sequence< beans::PropertyValues > aLevel; + xLevelFormats->getByIndex( nLevel ) >>= aLevel; + //create a copy of the level and add two new entries - hyperlink start and end + bool bChapterNoSeparator = sChapterNoSeparator.getLength() > 0; + sal_Int32 nAdd = (bHyperlinks && bChapterNoSeparator) ? 4 : 2; + uno::Sequence< beans::PropertyValues > aNewLevel( aLevel.getLength() + nAdd); + beans::PropertyValues* pNewLevel = aNewLevel.getArray(); + if( bHyperlinks ) + { + beans::PropertyValues aHyperlink(1); + aHyperlink[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); + aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_START ); + pNewLevel[0] = aHyperlink; + aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_END ); + pNewLevel[aNewLevel.getLength() -1] = aHyperlink; + } + if( bChapterNoSeparator ) + { + beans::PropertyValues aChapterNo(2); + aChapterNo[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); + aChapterNo[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_CHAPTER_INFO ); + aChapterNo[1].Name = rPropNameSupplier.GetName( PROP_CHAPTER_FORMAT ); + //todo: is ChapterFormat::Number correct? + aChapterNo[1].Value <<= (sal_Int16)text::ChapterFormat::NUMBER; + pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 4 : 2) ] = aChapterNo; + + beans::PropertyValues aChapterSeparator(2); + aChapterSeparator[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); + aChapterSeparator[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_TEXT ); + aChapterSeparator[1].Name = rPropNameSupplier.GetName( PROP_TEXT ); + aChapterSeparator[1].Value <<= sChapterNoSeparator; + pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 3 : 1)] = aChapterSeparator; + } + //copy the 'old' entries except the last (page no) + for( sal_Int32 nToken = 0; nToken < aLevel.getLength() - 1; ++nToken) + { + pNewLevel[nToken + 1] = aLevel[nToken]; + } + //copy page no entry (last or last but one depending on bHyperlinks + sal_Int32 nPageNo = aNewLevel.getLength() - (bHyperlinks ? 2 : 3); + pNewLevel[nPageNo] = aLevel[aLevel.getLength() - 1]; + + xLevelFormats->replaceByIndex( nLevel, uno::makeAny( aNewLevel ) ); + } + } + } + pContext->SetTOC( xTOC ); +} + + /*-- 29.01.2007 11:33:16--------------------------------------------------- //the field command has to be closed (0x14 appeared) -----------------------------------------------------------------------*/ void DomainMapper_Impl::CloseFieldCommand() { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("closeFieldCommand"); +#endif + FieldContextPtr pContext = m_aFieldStack.top(); OSL_ENSURE( pContext.get(), "no field context available"); if( pContext.get() ) { - static FieldConversionMap_t aFieldConversionMap; - static bool bFilled = false; m_bSetUserFieldContent = false; - if(!bFilled) - { - static const FieldConversion aFields[] = - { - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADDRESSBLOCK")), "", "", FIELD_ADDRESSBLOCK }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADVANCE")), "", "", FIELD_ADVANCE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ASK")), "SetExpression", "SetExpression", FIELD_ASK }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUM")), "SetExpression", "SetExpression", FIELD_AUTONUM }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMLGL")), "SetExpression", "SetExpression", FIELD_AUTONUMLGL }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMOUT")), "SetExpression", "SetExpression", FIELD_AUTONUMOUT }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTHOR")), "Author", "", FIELD_AUTHOR }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")), "DateTime", "", FIELD_DATE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("COMMENTS")), "DocInfo.Description", "", FIELD_COMMENTS }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CREATEDATE")), "DocInfo.CreateDateTime", "", FIELD_CREATEDATE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCPROPERTY")), "", "", FIELD_DOCPROPERTY }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCVARIABLE")), "User", "", FIELD_DOCVARIABLE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EDITTIME")), "DocInfo.EditTime", "", FIELD_EDITTIME }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILLIN")), "Input", "", FIELD_FILLIN }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILENAME")), "FileName", "", FIELD_FILENAME }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILESIZE")), "", "", FIELD_FILESIZE }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMULA")), "", "", FIELD_FORMULA - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GOTOBUTTON")), "", "", FIELD_GOTOBUTTON }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HYPERLINK")), "", "", FIELD_HYPERLINK }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IF")), "ConditionalText", "", FIELD_IF }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INFO")), "","", FIELD_INFO }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INCLUDEPICTURE")), "", "", FIELD_INCLUDEPICTURE}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEYWORDS")), "DocInfo.KeyWords", "", FIELD_KEYWORDS }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LASTSAVEDBY")), "DocInfo.ChangeAuthor", "", FIELD_LASTSAVEDBY }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MACROBUTTON")), "Macro", "", FIELD_MACROBUTTON }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEFIELD")), "Database", "Database", FIELD_MERGEFIELD}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEREC")), "DatabaseNumberOfSet", "", FIELD_MERGEREC }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGESEQ")), "", "", FIELD_MERGESEQ }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXT")), "DatabaseNextSet", "", FIELD_NEXT }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXTIF")), "DatabaseNextSet", "", FIELD_NEXTIF }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PAGE")), "PageNumber", "", FIELD_PAGE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REF")), "GetReference", "", FIELD_REF }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVNUM")), "DocInfo.Revision", "", FIELD_REVNUM }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SAVEDATE")), "DocInfo.Change", "", FIELD_SAVEDATE }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTION")), "", "", FIELD_SECTION }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTIONPAGES")), "", "", FIELD_SECTIONPAGES }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SEQ")), "SetExpression", "SetExpression", FIELD_SEQ }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET")), "","", FIELD_SET }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SKIPIF")),"", "", FIELD_SKIPIF }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("STYLEREF")),"", "", FIELD_STYLEREF }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SUBJECT")), "DocInfo.Subject", "", FIELD_SUBJECT }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYMBOL")),"", "", FIELD_SYMBOL }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEMPLATE")), "TemplateName", "", FIELD_TEMPLATE}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")), "DateTime", "", FIELD_TIME }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TITLE")), "DocInfo.Title", "", FIELD_TITLE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERINITIALS")), "ExtendedUser", "", FIELD_USERINITIALS}, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERADDRESS")), "", "", FIELD_USERADDRESS }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERNAME")), "ExtendedUser", "", FIELD_USERNAME } - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TOC")), "com.sun.star.text.ContentIndex", "", FIELD_TOC}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TC")), "com.sun.star.text.ContentIndexMark", "", FIELD_TC}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMCHARS")), "CharacterCount", "", FIELD_NUMCHARS}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMWORDS")), "WordCount", "", FIELD_NUMWORDS}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMPAGES")), "PageCount", "", FIELD_NUMPAGES}, - - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), "", "", FIELD_}, - - }; - size_t nConversions = sizeof(aFields)/sizeof(FieldConversion); - for( size_t nConversion = 0; nConversion < nConversions; ++nConversion) - { - aFieldConversionMap.insert( FieldConversionMap_t::value_type( - aFields[nConversion].sWordCommand, - aFields[nConversion] )); - } - - bFilled = true; - } + FieldConversionMap_t aFieldConversionMap = lcl_GetFieldConversion(); + try { uno::Reference< uno::XInterface > xFieldInterface; @@ -2697,14 +2912,31 @@ void DomainMapper_Impl::CloseFieldCommand() if(aIt != aFieldConversionMap.end()) { uno::Reference< beans::XPropertySet > xFieldProperties; - if( FIELD_HYPERLINK != aIt->second.eFieldId && - FIELD_DOCPROPERTY != aIt->second.eFieldId && - FIELD_TOC != aIt->second.eFieldId && - FIELD_TC != aIt->second.eFieldId) + bool bCreateField = true; + switch (aIt->second.eFieldId) + { + case FIELD_HYPERLINK: + case FIELD_DOCPROPERTY: + case FIELD_TOC: + case FIELD_TC: + case FIELD_FORMCHECKBOX: + bCreateField = false; + break; + default: + break; + } + if( bCreateField) { //add the service prefix OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.")); sServiceName += ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("fieldService"); + dmapper_logger->chars(sServiceName); + dmapper_logger->endElement("fieldService"); +#endif + xFieldInterface = m_xTextFactory->createInstance(sServiceName); xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW); } @@ -2714,69 +2946,15 @@ void DomainMapper_Impl::CloseFieldCommand() case FIELD_ADDRESSBLOCK: break; case FIELD_ADVANCE : break; case FIELD_ASK : - { - //doesn the command contain a variable name? - ::rtl::OUString sVariable, sHint; - - sVariable = lcl_ExctractAskVariableAndHint( pContext->GetCommand(), sHint ); - if(sVariable.getLength()) - { - // determine field master name - uno::Reference< beans::XPropertySet > xMaster = FindOrCreateFieldMaster( - "com.sun.star.text.FieldMaster.SetExpression", sVariable ); - - // attach the master to the field - uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW ); - xDependentField->attachTextFieldMaster( xMaster ); - - // set input flag at the field - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_IS_INPUT), uno::makeAny( true )); - // set the prompt - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_HINT), - uno::makeAny( sHint )); - } - else - { - //don't insert the field - //todo: maybe import a 'normal' input field here? - xFieldInterface = 0; - } - } + handleFieldAsk(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties); break; case FIELD_AUTONUM : case FIELD_AUTONUMLGL : case FIELD_AUTONUMOUT : - { - //create a sequence field master "AutoNr" - uno::Reference< beans::XPropertySet > xMaster = FindOrCreateFieldMaster( - "com.sun.star.text.FieldMaster.SetExpression", - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoNr") )); - - xMaster->setPropertyValue( rPropNameSupplier.GetName(PROP_SUB_TYPE), - uno::makeAny(text::SetVariableType::SEQUENCE)); - - //apply the numbering type - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_NUMBERING_TYPE), - uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) )); - // attach the master to the field - uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW ); - xDependentField->attachTextFieldMaster( xMaster ); - } + handleAutoNum(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties); break; case FIELD_AUTHOR : - { - xFieldProperties->setPropertyValue( rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true )); - ::rtl::OUString sParam = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" AUTHOR") ); - if(sParam.getLength()) - { - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true )); - //PROP_CURRENT_PRESENTATION is set later anyway - } - } + handleAuthor(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties); break; case FIELD_DATE: { @@ -2807,86 +2985,7 @@ void DomainMapper_Impl::CloseFieldCommand() } break; case FIELD_DOCPROPERTY : - { - //some docproperties should be imported as document statistic fields, some as DocInfo fields - //others should be user fields - ::rtl::OUString sParam = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" DOCPROPERTY") ); - if(sParam.getLength()) - { - #define SET_ARABIC 0x01 - #define SET_FULL_NAME 0x02 - struct DocPropertyMap - { - const sal_Char* pDocPropertyName; - const sal_Char* pServiceName; - sal_uInt8 nFlags; - }; - static const DocPropertyMap aDocProperties[] = - { - {"Author", "Author", SET_FULL_NAME}, - {"CreateTime", "DocInfo.CreateDateTime", 0}, - {"Characters", "CharacterCount", SET_ARABIC}, - {"Comments", "DocInfo.Description", 0}, - {"Keywords", "DocInfo.KeyWords", 0}, - {"LastPrinted", "DocInfo.PrintDateTime", 0}, - {"LastSavedBy", "DocInfo.ChangeAuthor", 0}, - {"LastSavedTime", "DocInfo.ChangeDateTime", 0}, - {"Paragraphs", "ParagraphCount", SET_ARABIC}, - {"RevisionNumber", "DocInfo.Revision", 0}, - {"Subject", "DocInfo.Subject", 0}, - {"Template", "TemplateName", 0}, - {"Title", "DocInfo.Title", 0}, - {"TotalEditingTime", "DocInfo.EditTime", 9}, - {"Words", "WordCount", SET_ARABIC} - - //other available DocProperties: - //Bytes, Category, CharactersWithSpaces, Company - //HyperlinkBase, - //Lines, Manager, NameofApplication, ODMADocId, Pages, - //Security, - }; - //search for a field mapping - ::rtl::OUString sFieldServiceName; - sal_uInt16 nMap = 0; - for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap); ++nMap ) - { - if(sParam.equalsAscii(aDocProperties[nMap].pDocPropertyName)) - { - sFieldServiceName = ::rtl::OUString::createFromAscii(aDocProperties[nMap].pServiceName); - break; - } - } - ::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.")); - bool bIsCustomField = false; - if(!sFieldServiceName.getLength()) - { - //create a custom property field - sServiceName += ::rtl::OUString::createFromAscii("DocInfo.Custom"); - bIsCustomField = true; - } - else - { - sServiceName += sFieldServiceName; - } - xFieldInterface = m_xTextFactory->createInstance(sServiceName); - xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW); - if( bIsCustomField ) - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_NAME), uno::makeAny( sParam )); - else - { - if(0 != (aDocProperties[nMap].nFlags & SET_ARABIC)) - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_NUMBERING_TYPE), - uno::makeAny( style::NumberingType::ARABIC )); - else if(0 != (aDocProperties[nMap].nFlags & SET_FULL_NAME)) - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true )); - } - } - } - #undef SET_ARABIC - #undef SET_FULL_NAME + handleDocProperty(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties); break; case FIELD_DOCVARIABLE : { @@ -2919,13 +3018,79 @@ void DomainMapper_Impl::CloseFieldCommand() break; case FIELD_FILESIZE : break; case FIELD_FORMULA : break; + case FIELD_FORMCHECKBOX : + { + FFDataHandler::Pointer_t + pFFDataHandler(pContext->getFFDataHandler()); + FormControlHelper::Pointer_t + pFormControlHelper(new FormControlHelper + (FIELD_FORMCHECKBOX, + m_xTextDocument, pFFDataHandler)); + pContext->setFormControlHelper(pFormControlHelper); + } + break; + case FIELD_FORMDROPDOWN : break; + case FIELD_FORMTEXT : + { + FFDataHandler::Pointer_t pFFDataHandler + (pContext->getFFDataHandler()); + + xFieldProperties->setPropertyValue + (rPropNameSupplier.GetName(PROP_HINT), + uno::makeAny(pFFDataHandler->getStatusText())); + xFieldProperties->setPropertyValue + (rPropNameSupplier.GetName(PROP_HELP), + uno::makeAny(pFFDataHandler->getHelpText())); + xFieldProperties->setPropertyValue + (rPropNameSupplier.GetName(PROP_CONTENT), + uno::makeAny(pFFDataHandler->getTextDefault())); + } + break; case FIELD_GOTOBUTTON : break; case FIELD_HYPERLINK: { - sal_Int32 nStartQuote = pContext->GetCommand().indexOf( '\"' ); - sal_Int32 nEndQuote = nStartQuote < pContext->GetCommand().getLength() + 1 ? pContext->GetCommand().indexOf( '\"', nStartQuote + 1) : -1; - if( nEndQuote > 0) - pContext->SetHyperlinkURL( pContext->GetCommand().copy(nStartQuote + 1, nEndQuote - nStartQuote - 1) ); + ::std::vector aParts = pContext->GetCommandParts(); + ::std::vector::const_iterator aItEnd = aParts.end(); + ::std::vector::const_iterator aPartIt = aParts.begin(); + + OUString sURL; + + while (aPartIt != aItEnd) + { + if (aPartIt->equalsAscii("\\l")) + { + aPartIt++; + + if (aPartIt == aItEnd) + break; + + sURL = OUString('#'); + sURL += *aPartIt; + } + else if (aPartIt->equalsAscii("\\m") || + aPartIt->equalsAscii("\\n")) + { + } + else if (aPartIt->equalsAscii("\\o") || + aPartIt->equalsAscii("\\t")) + { + aPartIt++; + + if (aPartIt == aItEnd) + break; + } + else + { + sURL = *aPartIt; + } + + aPartIt++; + } + + if (sURL.getLength() > 0) + { + pContext->SetHyperlinkURL(sURL); + } } break; case FIELD_IF : break; @@ -3065,211 +3230,8 @@ void DomainMapper_Impl::CloseFieldCommand() case FIELD_USERNAME : //todo: user name is firstname + lastname break; case FIELD_TOC: - { - ::rtl::OUString sValue; - bool bTableOfFigures = false; - bool bHyperlinks = false; - bool bFromOutline = false; - bool bFromEntries = false; - sal_Int16 nMaxLevel = 10; - ::rtl::OUString sTemplate; - ::rtl::OUString sChapterNoSeparator; - // \a Builds a table of figures but does not include the captions's label and number - if( lcl_FindInCommand( pContext->GetCommand(), 'a', sValue )) - { //make it a table of figures - bTableOfFigures = true; - } - // \b Uses a bookmark to specify area of document from which to build table of contents - // if( lcl_FindInCommand( pContext->GetCommand(), 'b', sValue )) - // { //todo: sValue contains the bookmark name - unsupported feature - // } - if( lcl_FindInCommand( pContext->GetCommand(), 'c', sValue )) - // \c Builds a table of figures of the given label - { - //todo: sValue contains the label's name - bTableOfFigures = true; - } - // \d Defines the separator between sequence and page numbers - if( lcl_FindInCommand( pContext->GetCommand(), 'd', sValue )) - { - //todo: insert the chapter number into each level and insert the separator additionally - sChapterNoSeparator = sValue; - } - // \f Builds a table of contents using TC entries instead of outline levels - if( lcl_FindInCommand( pContext->GetCommand(), 'f', sValue )) - { - //todo: sValue can contain a TOC entry identifier - use unclear - bFromEntries = true; - } - // \h Hyperlinks the entries and page numbers within the table of contents - if( lcl_FindInCommand( pContext->GetCommand(), 'h', sValue )) - { - //todo: make all entries to hyperlinks - bHyperlinks = true; - } - // \l Defines the TC entries field level used to build a table of contents - // if( lcl_FindInCommand( pContext->GetCommand(), 'l', sValue )) - // { - //todo: entries can only be included completely - // } - // \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers - // if( lcl_FindInCommand( pContext->GetCommand(), 'n', sValue )) - // { - //todo: what does the description mean? - // } - // \o Builds a table of contents by using outline levels instead of TC entries - if( lcl_FindInCommand( pContext->GetCommand(), 'o', sValue )) - { - bFromOutline = true; - UniString sParam( sValue ); - xub_StrLen nIndex = 0; - sParam.GetToken( 0, '-', nIndex ); - nMaxLevel = sal_Int16( sParam.Copy( nIndex ).ToInt32( ) ); - } - // \p Defines the separator between the table entry and its page number - if( lcl_FindInCommand( pContext->GetCommand(), 'p', sValue )) - { } - // \s Builds a table of contents by using a sequence type - if( lcl_FindInCommand( pContext->GetCommand(), 's', sValue )) - { } - // \t Builds a table of contents by using style names other than the standard outline styles - if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue )) - { - sal_Int32 nPos = 0; - ::rtl::OUString sToken = sValue.getToken( 1, '"', nPos); - sTemplate = sToken.getLength() ? sToken : sValue; - } - // \u Builds a table of contents by using the applied paragraph outline level - if( lcl_FindInCommand( pContext->GetCommand(), 'u', sValue )) - { - bFromOutline = true; - //todo: what doesn 'the applied paragraph outline level' refer to? - } - // \w Preserve tab characters within table entries - // if( lcl_FindInCommand( pContext->GetCommand(), 'w', sValue )) - // { - //todo: not supported - // } - // \x Preserve newline characters within table entries - // if( lcl_FindInCommand( pContext->GetCommand(), 'x', sValue )) - // { - //todo: unsupported - // } - // \z Hides page numbers within the table of contens when shown in Web Layout View - // if( lcl_FindInCommand( pContext->GetCommand(), 'z', sValue )) - // { //todo: unsupported feature } - - //if there's no option then it should be created from outline - if( !bFromOutline && !bFromEntries && !sTemplate.getLength() ) - bFromOutline = true; - - uno::Reference< beans::XPropertySet > xTOC( - m_xTextFactory->createInstance( - bTableOfFigures ? - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.IllustrationsIndex")) : - ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName)), - uno::UNO_QUERY_THROW); - xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(::rtl::OUString())); - if( !bTableOfFigures ) - { - xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_LEVEL ), uno::makeAny( nMaxLevel ) ); - xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline )); - xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries )); - if( sTemplate.getLength() ) - { - //the string contains comma separated the names and related levels - //like: "Heading 1,1,Heading 2,2" - TOCStyleMap aMap; - sal_Int32 nLevel; - sal_Int32 nPosition = 0; - while( nPosition >= 0) - { - ::rtl::OUString sStyleName = sTemplate.getToken( 0, ',', nPosition ); - //empty tokens should be skipped - while( !sStyleName.getLength() && nPosition > 0 ) - sStyleName = sTemplate.getToken( 0, ',', nPosition ); - nLevel = sTemplate.getToken( 0, ',', nPosition ).toInt32(); - if( !nLevel ) - nLevel = 1; - if( sStyleName.getLength() ) - aMap.insert( TOCStyleMap::value_type(nLevel, sStyleName) ); - } - uno::Reference< container::XIndexReplace> xParaStyles; - xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles; - for( nLevel = 1; nLevel < 10; ++nLevel) - { - sal_Int32 nLevelCount = aMap.count( nLevel ); - if( nLevelCount ) - { - TOCStyleMap::iterator aTOCStyleIter = aMap.find( nLevel ); - - uno::Sequence< rtl::OUString> aStyles( nLevelCount ); - for ( sal_Int32 nStyle = 0; nStyle < nLevelCount; ++nStyle, ++aTOCStyleIter ) - { - aStyles[nStyle] = aTOCStyleIter->second; - } - xParaStyles->replaceByIndex(nLevel - 1, uno::makeAny(aStyles)); - } - } - xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), uno::makeAny( true )); - - } - if(bHyperlinks || sChapterNoSeparator.getLength()) - { - uno::Reference< container::XIndexReplace> xLevelFormats; - xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats; - sal_Int32 nLevelCount = xLevelFormats->getCount(); - //start with level 1, 0 is the header level - for( sal_Int32 nLevel = 1; nLevel < nLevelCount; ++nLevel) - { - uno::Sequence< beans::PropertyValues > aLevel; - xLevelFormats->getByIndex( nLevel ) >>= aLevel; - //create a copy of the level and add two new entries - hyperlink start and end - bool bChapterNoSeparator = sChapterNoSeparator.getLength() > 0; - sal_Int32 nAdd = (bHyperlinks && bChapterNoSeparator) ? 4 : 2; - uno::Sequence< beans::PropertyValues > aNewLevel( aLevel.getLength() + nAdd); - beans::PropertyValues* pNewLevel = aNewLevel.getArray(); - if( bHyperlinks ) - { - beans::PropertyValues aHyperlink(1); - aHyperlink[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); - aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_START ); - pNewLevel[0] = aHyperlink; - aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_END ); - pNewLevel[aNewLevel.getLength() -1] = aHyperlink; - } - if( bChapterNoSeparator ) - { - beans::PropertyValues aChapterNo(2); - aChapterNo[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); - aChapterNo[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_CHAPTER_INFO ); - aChapterNo[1].Name = rPropNameSupplier.GetName( PROP_CHAPTER_FORMAT ); - //todo: is ChapterFormat::Number correct? - aChapterNo[1].Value <<= (sal_Int16)text::ChapterFormat::NUMBER; - pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 4 : 2) ] = aChapterNo; - - beans::PropertyValues aChapterSeparator(2); - aChapterSeparator[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); - aChapterSeparator[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_TEXT ); - aChapterSeparator[1].Name = rPropNameSupplier.GetName( PROP_TEXT ); - aChapterSeparator[1].Value <<= sChapterNoSeparator; - pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 3 : 1)] = aChapterSeparator; - } - //copy the 'old' entries except the last (page no) - for( sal_Int32 nToken = 0; nToken < aLevel.getLength() - 1; ++nToken) - { - pNewLevel[nToken + 1] = aLevel[nToken]; - } - //copy page no entry (last or last but one depending on bHyperlinks - sal_Int32 nPageNo = aNewLevel.getLength() - (bHyperlinks ? 2 : 3); - pNewLevel[nPageNo] = aLevel[aLevel.getLength() - 1]; - - xLevelFormats->replaceByIndex( nLevel, uno::makeAny( aNewLevel ) ); - } - } - } - pContext->SetTOC( xTOC ); - } + handleToc(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties, + ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName)); break; case FIELD_TC : { @@ -3343,6 +3305,11 @@ bool DomainMapper_Impl::IsFieldResultAsString() -----------------------------------------------------------------------*/ void DomainMapper_Impl::SetFieldResult( ::rtl::OUString& rResult ) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("setFieldResult"); + dmapper_logger->chars(rResult); +#endif + FieldContextPtr pContext = m_aFieldStack.top(); OSL_ENSURE( pContext.get(), "no field context available"); if( pContext.get() ) @@ -3388,11 +3355,32 @@ void DomainMapper_Impl::SetFieldResult( ::rtl::OUString& rResult ) } } +void DomainMapper_Impl::SetFieldFFData(FFDataHandler::Pointer_t pFFDataHandler) +{ +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("setFieldFFData"); +#endif + + FieldContextPtr pContext = m_aFieldStack.top(); + if (pContext.get()) + { + pContext->setFFDataHandler(pFFDataHandler); + } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("setFieldFFData"); +#endif +} + /*-- 29.01.2007 11:33:17--------------------------------------------------- //the end of field is reached (0x15 appeared) - the command might still be open -----------------------------------------------------------------------*/ void DomainMapper_Impl::PopFieldContext() { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("popFieldContext"); +#endif + FieldContextPtr pContext = m_aFieldStack.top(); OSL_ENSURE( pContext.get(), "no field context available"); if( pContext.get() ) @@ -3426,15 +3414,23 @@ void DomainMapper_Impl::PopFieldContext() uno::Reference< text::XTextAppendAndConvert > xTextAppendAndConvert( xTextAppend, uno::UNO_QUERY_THROW ); xTextAppendAndConvert->appendTextContent( xToInsert, uno::Sequence< beans::PropertyValue >() ); } - else if(pContext->GetHyperlinkURL().getLength()) + else { - PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier(); - xCrsr->gotoEnd( true ); - - uno::Reference< beans::XPropertySet > xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW ); - xCrsrProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_HYPER_LINK_U_R_L), uno:: - makeAny(pContext->GetHyperlinkURL())); + FormControlHelper::Pointer_t pFormControlHelper(pContext->getFormControlHelper()); + if (pFormControlHelper.get() != NULL) + { + uno::Reference xTxtRange(xCrsr, uno::UNO_QUERY); + pFormControlHelper->insertControl(xTxtRange); + } + else if(pContext->GetHyperlinkURL().getLength()) + { + PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier(); + xCrsr->gotoEnd( true ); + + uno::Reference< beans::XPropertySet > xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW ); + xCrsrProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_HYPER_LINK_U_R_L), uno:: + makeAny(pContext->GetHyperlinkURL())); + } } } } @@ -3757,4 +3753,19 @@ void DomainMapper_Impl::ApplySettingsTable() } } } + +SectionPropertyMap * DomainMapper_Impl::GetSectionContext() +{ + SectionPropertyMap* pSectionContext = 0; + //the section context is not availabe before the first call of startSectionGroup() + if( !IsAnyTableImport() ) + { + PropertyMapPtr pContext = GetTopContextOfType(CONTEXT_SECTION); + OSL_ENSURE(pContext.get(), "Section context is not in the stack!"); + pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() ); + } + + return pSectionContext; +} + }} diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx old mode 100644 new mode 100755 index 2b4e517a1..5ab9b1871 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -52,6 +52,8 @@ #include #include #include +#include +#include #include #include @@ -134,6 +136,8 @@ class FieldContext ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTOC;//TOX ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTC;//TOX entry ::rtl::OUString m_sHyperlinkURL; + FFDataHandler::Pointer_t m_pFFDataHandler; + FormControlHelper::Pointer_t m_pFormControlHelper; public: FieldContext(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xStart); @@ -158,7 +162,14 @@ public: void SetHyperlinkURL( const ::rtl::OUString& rURL ) { m_sHyperlinkURL = rURL; } const ::rtl::OUString& GetHyperlinkURL() { return m_sHyperlinkURL; } + + void setFFDataHandler(FFDataHandler::Pointer_t pFFDataHandler) { m_pFFDataHandler = pFFDataHandler; } + FFDataHandler::Pointer_t getFFDataHandler() const { return m_pFFDataHandler; } + + void setFormControlHelper(FormControlHelper::Pointer_t pFormControlHelper) { m_pFormControlHelper = pFormControlHelper; } + FormControlHelper::Pointer_t getFormControlHelper() const { return m_pFormControlHelper; } + ::std::vector GetCommandParts() const; }; struct TextAppendContext @@ -487,12 +498,40 @@ public: bool IsOpenField() const; //collect the pieces of the command void AppendFieldCommand(::rtl::OUString& rPartOfCommand); + void handleFieldAsk + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties); + void handleAutoNum + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties); + void handleAuthor + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties); + void handleDocProperty + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties); + void handleToc + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties, + const ::rtl::OUString & sTOCServiceName); //the field command has to be closed (0x14 appeared) void CloseFieldCommand(); //the _current_ fields require a string type result while TOCs accept richt results bool IsFieldResultAsString(); //apply the result text to the related field void SetFieldResult( ::rtl::OUString& rResult ); + // set FFData of top field context + void SetFieldFFData( FFDataHandler::Pointer_t pFFDataHandler ); //the end of field is reached (0x15 appeared) - the command might still be open void PopFieldContext(); @@ -557,7 +596,7 @@ public: void ResetParaRedline( ); void ApplySettingsTable(); - + SectionPropertyMap * GetSectionContext(); }; } //namespace dmapper } //namespace writerfilter diff --git a/writerfilter/source/dmapper/FFData.xml b/writerfilter/source/dmapper/FFData.xml new file mode 100644 index 000000000..d807a4d4f --- /dev/null +++ b/writerfilter/source/dmapper/FFData.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/dmapper/FFDataHandler.cxx b/writerfilter/source/dmapper/FFDataHandler.cxx new file mode 100644 index 000000000..a3dc55b8d --- /dev/null +++ b/writerfilter/source/dmapper/FFDataHandler.cxx @@ -0,0 +1,483 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: PropertyMap.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include "FFDataHandler.hxx" + +#include +#ifdef DEBUG_DOMAINMAPPER +#include +#include "dmapperLoggers.hxx" +#endif +namespace writerfilter { +namespace dmapper { + +/************************ + * class: FFDataHandler * + ************************/ + +FFDataHandler::FFDataHandler() +: m_bEnabled(false), + m_bCalcOnExit(false), + m_nHelpTextType(0), + m_nStatusTextType(0), + m_nCheckboxHeight(0), + m_bCheckboxAutoHeight(false), + m_bCheckboxDefault(false), + m_bCheckboxChecked(false), + m_nTextType(0), + m_nTextMaxLength(0) +{ +} + + +FFDataHandler::~FFDataHandler() +{ +} + +// member: FFDataHandler::name +void FFDataHandler::setName(const rtl::OUString & r_sName) +{ + m_sName = r_sName; +} + +const rtl::OUString & FFDataHandler::getName() const +{ + return m_sName; +} + +// member: FFDataHandler::enabled +void FFDataHandler::setEnabled(bool r_enabled) +{ + m_bEnabled = r_enabled; +} + +bool FFDataHandler::getEnabled() const +{ + return m_bEnabled; +} + +// member: FFDataHandler::calcOnExit +void FFDataHandler::setCalcOnExit(bool r_calcOnExit) +{ + m_bCalcOnExit = r_calcOnExit; +} + +bool FFDataHandler::getCalcOnExit() const +{ + return m_bCalcOnExit; +} + +// member: FFDataHandler::entryMacro +void FFDataHandler::setEntryMacro(const rtl::OUString & r_sEntryMacro) +{ + m_sEntryMacro = r_sEntryMacro; +} + +const rtl::OUString & FFDataHandler::getEntryMacro() const +{ + return m_sEntryMacro; +} + +// member: FFDataHandler::exitMacro +void FFDataHandler::setExitMacro(const rtl::OUString & r_sExitMacro) +{ + m_sExitMacro = r_sExitMacro; +} + +const rtl::OUString & FFDataHandler::getExitMacro() const +{ + return m_sExitMacro; +} + +// member: FFDataHandler::helpTextType +void FFDataHandler::setHelpTextType(sal_uInt32 r_helpTextType) +{ + m_nHelpTextType = r_helpTextType; +} + +sal_uInt32 FFDataHandler::getHelpTextType() const +{ + return m_nHelpTextType; +} + +// member: FFDataHandler::helpText +void FFDataHandler::setHelpText(const rtl::OUString & r_sHelpText) +{ + m_sHelpText = r_sHelpText; +} + +const rtl::OUString & FFDataHandler::getHelpText() const +{ + return m_sHelpText; +} + +// member: FFDataHandler::statusTextType +void FFDataHandler::setStatusTextType(sal_uInt32 r_statusTextType) +{ + m_nStatusTextType = r_statusTextType; +} + +sal_uInt32 FFDataHandler::getStatusTextType() const +{ + return m_nStatusTextType; +} + +// member: FFDataHandler::statusText +void FFDataHandler::setStatusText(const rtl::OUString & r_sStatusText) +{ + m_sStatusText = r_sStatusText; +} + +const rtl::OUString & FFDataHandler::getStatusText() const +{ + return m_sStatusText; +} + +// member: FFDataHandler::checkboxHeight +void FFDataHandler::setCheckboxHeight(sal_uInt32 r_checkboxHeight) +{ + m_nCheckboxHeight = r_checkboxHeight; +} + +sal_uInt32 FFDataHandler::getCheckboxHeight() const +{ + return m_nCheckboxHeight; +} + +// member: FFDataHandler::checkboxAutoHeight +void FFDataHandler::setCheckboxAutoHeight(bool r_checkboxAutoHeight) +{ + m_bCheckboxAutoHeight = r_checkboxAutoHeight; +} + +bool FFDataHandler::getCheckboxAutoHeight() const +{ + return m_bCheckboxAutoHeight; +} + +// member: FFDataHandler::checkboxDefault +void FFDataHandler::setCheckboxDefault(bool r_checkboxDefault) +{ + m_bCheckboxDefault = r_checkboxDefault; +} + +bool FFDataHandler::getCheckboxDefault() const +{ + return m_bCheckboxDefault; +} + +// member: FFDataHandler::checkboxChecked +void FFDataHandler::setCheckboxChecked(bool r_checkboxChecked) +{ + m_bCheckboxChecked = r_checkboxChecked; +} + +bool FFDataHandler::getCheckboxChecked() const +{ + return m_bCheckboxChecked; +} + +// member: FFDataHandler::dropDownResult +void FFDataHandler::setDropDownResult(const rtl::OUString & r_sDropDownResult) +{ + m_sDropDownResult = r_sDropDownResult; +} + +const rtl::OUString & FFDataHandler::getDropDownResult() const +{ + return m_sDropDownResult; +} + +// member: FFDataHandler::dropDownDefault +void FFDataHandler::setDropDownDefault(const rtl::OUString & r_sDropDownDefault) +{ + m_sDropDownDefault = r_sDropDownDefault; +} + +const rtl::OUString & FFDataHandler::getDropDownDefault() const +{ + return m_sDropDownDefault; +} + +// member: FFDataHandler::dropDownEntries +void FFDataHandler::setDropDownEntries(const FFDataHandler::DropDownEntries_t & r_dropDownEntries) +{ + m_DropDownEntries = r_dropDownEntries; +} + +const FFDataHandler::DropDownEntries_t & FFDataHandler::getDropDownEntries() const +{ + return m_DropDownEntries; +} + +void FFDataHandler::dropDownEntriesPushBack(const rtl::OUString & r_Element) +{ + m_DropDownEntries.push_back(r_Element); +} + +// member: FFDataHandler::textType +void FFDataHandler::setTextType(sal_uInt32 r_textType) +{ + m_nTextType = r_textType; +} + +sal_uInt32 FFDataHandler::getTextType() const +{ + return m_nTextType; +} + +// member: FFDataHandler::textMaxLength +void FFDataHandler::setTextMaxLength(sal_uInt32 r_textMaxLength) +{ + m_nTextMaxLength = r_textMaxLength; +} + +sal_uInt32 FFDataHandler::getTextMaxLength() const +{ + return m_nTextMaxLength; +} + +// member: FFDataHandler::textDefault +void FFDataHandler::setTextDefault(const rtl::OUString & r_sTextDefault) +{ + m_sTextDefault = r_sTextDefault; +} + +const rtl::OUString & FFDataHandler::getTextDefault() const +{ + return m_sTextDefault; +} + +// member: FFDataHandler::textFormat +void FFDataHandler::setTextFormat(const rtl::OUString & r_sTextFormat) +{ + m_sTextFormat = r_sTextFormat; +} + +const rtl::OUString & FFDataHandler::getTextFormat() const +{ + return m_sTextFormat; +} + + +void FFDataHandler::sprm(Sprm & r_Sprm) +{ +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("FFDataHandler.sprm"); + dmapper_logger->chars(r_Sprm.toString()); +#endif + switch(r_Sprm.getId()) + { + case NS_ooxml::LN_CT_FFData_name: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sName = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFData_enabled: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bEnabled = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFData_calcOnExit: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bCalcOnExit = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFData_entryMacro: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sEntryMacro = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFData_exitMacro: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sExitMacro = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFData_helpText: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + case NS_ooxml::LN_CT_FFData_statusText: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + case NS_ooxml::LN_CT_FFCheckBox_size: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nCheckboxHeight = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFCheckBox_sizeAuto: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bCheckboxAutoHeight = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFCheckBox_default: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bCheckboxDefault = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFCheckBox_checked: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bCheckboxChecked = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFData_checkBox: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + case NS_ooxml::LN_CT_FFDDList_result: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sDropDownResult = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFDDList_default: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sDropDownDefault = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFDDList_listEntry: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_DropDownEntries.push_back(r_Sprm.getValue()->getString());; + } + break; + case NS_ooxml::LN_CT_FFData_ddList: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + case NS_ooxml::LN_CT_FFTextInput_type: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nTextType = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFTextInput_default: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sTextDefault = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFTextInput_maxLength: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nTextMaxLength = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFTextInput_format: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sTextFormat = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFData_textInput: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + default: +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif + break; + } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("FFDataHandler.sprm"); +#endif +} + +void FFDataHandler::resolveSprm(Sprm & r_Sprm) +{ + writerfilter::Reference::Pointer_t pProperties = r_Sprm.getProps(); + if( pProperties.get()) + pProperties->resolve(*this); +} + +void FFDataHandler::attribute(Id name, Value & val) +{ +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("FFDataHandler.attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(name)); + dmapper_logger->attribute("value", val.toString()); + dmapper_logger->endElement("FFDataHandler.attribute"); +#endif + switch (name) + { + case NS_ooxml::LN_CT_FFHelpText_type: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nHelpTextType = val.getInt(); + } + break; + case NS_ooxml::LN_CT_FFHelpText_val: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sHelpText = val.getString(); + } + break; + case NS_ooxml::LN_CT_FFStatusText_type: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nStatusTextType = val.getInt(); + } + break; + case NS_ooxml::LN_CT_FFStatusText_val: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sStatusText = val.getString(); + } + break; + default: +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif + break; + } +} + +}} diff --git a/writerfilter/source/dmapper/FFDataHandler.hxx b/writerfilter/source/dmapper/FFDataHandler.hxx new file mode 100644 index 000000000..4276b2f6d --- /dev/null +++ b/writerfilter/source/dmapper/FFDataHandler.hxx @@ -0,0 +1,161 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: PropertyMap.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_FFDataHandler_HXX +#define INCLUDED_FFDataHandler_HXX +#include +#include +namespace writerfilter { +namespace dmapper { +class FFDataHandler : public Properties +{ +public: + // typedefs + typedef ::boost::shared_ptr Pointer_t; + typedef ::std::vector DropDownEntries_t; + + // constructor + FFDataHandler(); + // destructor + virtual ~FFDataHandler(); + + // member: name + void setName(const rtl::OUString & r_sName); + const rtl::OUString & getName() const; + + // member: enabled + void setEnabled(bool r_enabled); + bool getEnabled() const; + + // member: calcOnExit + void setCalcOnExit(bool r_calcOnExit); + bool getCalcOnExit() const; + + // member: entryMacro + void setEntryMacro(const rtl::OUString & r_sEntryMacro); + const rtl::OUString & getEntryMacro() const; + + // member: exitMacro + void setExitMacro(const rtl::OUString & r_sExitMacro); + const rtl::OUString & getExitMacro() const; + + // member: helpTextType + void setHelpTextType(sal_uInt32 r_helpTextType); + sal_uInt32 getHelpTextType() const; + + // member: helpText + void setHelpText(const rtl::OUString & r_sHelpText); + const rtl::OUString & getHelpText() const; + + // member: statusTextType + void setStatusTextType(sal_uInt32 r_statusTextType); + sal_uInt32 getStatusTextType() const; + + // member: statusText + void setStatusText(const rtl::OUString & r_sStatusText); + const rtl::OUString & getStatusText() const; + + // member: checkboxHeight + void setCheckboxHeight(sal_uInt32 r_checkboxHeight); + sal_uInt32 getCheckboxHeight() const; + + // member: checkboxAutoHeight + void setCheckboxAutoHeight(bool r_checkboxAutoHeight); + bool getCheckboxAutoHeight() const; + + // member: checkboxDefault + void setCheckboxDefault(bool r_checkboxDefault); + bool getCheckboxDefault() const; + + // member: checkboxChecked + void setCheckboxChecked(bool r_checkboxChecked); + bool getCheckboxChecked() const; + + // member: dropDownResult + void setDropDownResult(const rtl::OUString & r_sDropDownResult); + const rtl::OUString & getDropDownResult() const; + + // member: dropDownDefault + void setDropDownDefault(const rtl::OUString & r_sDropDownDefault); + const rtl::OUString & getDropDownDefault() const; + + // member: dropDownEntries + void setDropDownEntries(const DropDownEntries_t & r_dropDownEntries); + const DropDownEntries_t & getDropDownEntries() const; + void dropDownEntriesPushBack(const rtl::OUString & r_Element); + + // member: textType + void setTextType(sal_uInt32 r_textType); + sal_uInt32 getTextType() const; + + // member: textMaxLength + void setTextMaxLength(sal_uInt32 r_textMaxLength); + sal_uInt32 getTextMaxLength() const; + + // member: textDefault + void setTextDefault(const rtl::OUString & r_sTextDefault); + const rtl::OUString & getTextDefault() const; + + // member: textFormat + void setTextFormat(const rtl::OUString & r_sTextFormat); + const rtl::OUString & getTextFormat() const; + + // sprm + void sprm(Sprm & r_sprm); + void resolveSprm(Sprm & r_sprm); + + // attribute + void attribute(Id name, Value & val); + +private: + rtl::OUString m_sName; + bool m_bEnabled; + bool m_bCalcOnExit; + rtl::OUString m_sEntryMacro; + rtl::OUString m_sExitMacro; + sal_uInt32 m_nHelpTextType; + rtl::OUString m_sHelpText; + sal_uInt32 m_nStatusTextType; + rtl::OUString m_sStatusText; + sal_uInt32 m_nCheckboxHeight; + bool m_bCheckboxAutoHeight; + bool m_bCheckboxDefault; + bool m_bCheckboxChecked; + rtl::OUString m_sDropDownResult; + rtl::OUString m_sDropDownDefault; + DropDownEntries_t m_DropDownEntries; + sal_uInt32 m_nTextType; + sal_uInt32 m_nTextMaxLength; + rtl::OUString m_sTextDefault; + rtl::OUString m_sTextFormat; +}; + + +}} +#endif //INCLUDED_FFDataHandler_HXX diff --git a/writerfilter/source/dmapper/FieldTypes.hxx b/writerfilter/source/dmapper/FieldTypes.hxx new file mode 100644 index 000000000..9dddc1812 --- /dev/null +++ b/writerfilter/source/dmapper/FieldTypes.hxx @@ -0,0 +1,299 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_FIELD_TYPES_HXX +#define INCLUDED_FIELD_TYPES_HXX + +namespace writerfilter { +namespace dmapper { + +enum FieldId +{ + /* ADDRESSBLOCK \d \* MERGEFORMAT -> Addressblock completely unsupported*/ + FIELD_ADDRESSBLOCK + /* ADVANCE \d downvalue \l leftvalue \r rightvalue \u upvalue \x xvalue \y yvalue -> unsupported*/ + ,FIELD_ADVANCE + /* ASK bookmarkname "hint" \d defaultanswer \o \* MERGEFORMAT -> + the hint is not always quoted, inputfield with default answer, prompt before merge (\o) + */ + ,FIELD_ASK + /* AUTONUM \* Numberingswitch -> + mapped to sequence field "AutoNr" + */ + ,FIELD_AUTONUM + /* AUTONUMLGL \* Numberingswitch -> + mapped to sequence field "AutoNr" + */ + ,FIELD_AUTONUMLGL + /* AUTONUMOUT \* Numberingswitch -> + mapped to sequence field "AutoNr" + */ + ,FIELD_AUTONUMOUT + /* AUTHOR NewAuthor \* defaultswitch \* MERGEFORMAT -> + mapped to sequence field "AutoNr" + */ + ,FIELD_AUTHOR + /* COMMENTS "comment" \* MERGEFORMAT -> + Docinfo-Comments + */ + ,FIELD_COMMENTS + /* CREATEDATE \h \* MERGEFORMAT -> + docinfo-created-date + */ + ,FIELD_CREATEDATE + /* DATE \@ "number format" \s \* MERGEFORMAT -> + ww8filterimprovement: multiple languages now supported + */ + ,FIELD_DATE + /* DOCPROPERTY propertyname \* MERGEFORMAT -> + ww8filterimprovement: some fields imported as functionally equivalent fields if possible, + the others imported as UserField + */ + ,FIELD_DOCPROPERTY + /* DOCVARIABLE Name \* MERGEFORMAT -> + ww8filterimprovement: now imported as user fields + */ + ,FIELD_DOCVARIABLE + /* EDITTIME \# "displayformat" \* Numberingswitch \* MERGEFORMAT -> + DocInfo-Modified-Date + ww8filterimprovement: multiple languages now supported + */ + ,FIELD_EDITTIME + /* FILLIN "text to fill in" \d defaultanswer \o \* MERGEFORMAT -> + Function-InputField + */ + ,FIELD_FILLIN + /* FILENAME \p \* * MERGEFORMAT -> + file name (\p with path) + */ + ,FIELD_FILENAME + /* FILESIZE \* NumberingType \* MERGEFORMAT -> + not imported in old ww8 filter, see lcl_ParseNumberingType + todo find alternative field + */ + ,FIELD_FILESIZE + /* =formula \# "number format" + todo find alternative field + */ + ,FIELD_FORMULA + /* FORMCHECKBOX */ + ,FIELD_FORMCHECKBOX + /* FORMDROPDOWN */ + ,FIELD_FORMDROPDOWN + /* FORMTEXT */ + ,FIELD_FORMTEXT + /* GOTOBUTTON text \* MERGEFORMAT -> + not imported in old ww8 filter + todo find alternative field + */ + ,FIELD_GOTOBUTTON + /* HYPERLINK "link" \* MERGEFORMAT -> + not imported in old ww8 filter + ww8filterimprovement: now imported as hyperlink + */ + ,FIELD_HYPERLINK + /* IF condition "then text" "else text" -> + not imported in old ww8 filter + ww8filterimprovement: now imported + todo: condition, if text, else text still missing + */ + ,FIELD_IF + /* INFO NameOfInfo \* MERGEFORMAT -> old + todo: filter imports wrong? + */ + ,FIELD_INFO + /* INCLUDEPICTURE path \* MERGEFORMAT-> + old filter imports an embedded picture + todo: not yet supported + */ + ,FIELD_INCLUDEPICTURE + /* KEYWORDS keyword \* defaultswitch \* Numberingswitch \* MERGEFORMAT -> + DocInfo Keywords + */ + ,FIELD_KEYWORDS + /* LASTSAVEDBY \* MERGEFORMAT -> + DocInfo-Modified-Author + */ + ,FIELD_LASTSAVEDBY + /* MACROBUTTON MacroName quick help text -> + Macro field + */ + ,FIELD_MACROBUTTON + /* MERGEFIELD ColumName \b prefix \f suffix \* MERGEFORMAT -> + ww8filterimprovement: column-only API now upporterd + */ + ,FIELD_MERGEFIELD + /* MERGEREC \* MERGEFORMAT -> + RecordNumber field, maybe without db name + todo: currently unchecked + */ + ,FIELD_MERGEREC + /* MERGESEQ \* MERGEFORMAT -> + not imported in old ww8 filter + ww8filterimprovement: now imported + todo: currently unchecked + */ + ,FIELD_MERGESEQ + /* NEXT text -> + Next record + todo: currently unchecked + */ + ,FIELD_NEXT + /* NEXTIF condition + todo: condition not imported + */ + ,FIELD_NEXTIF + /* PAGE \* Numberingswitch \* MERGEFORMAT -> + see lcl_ParseNumberingType + */ + ,FIELD_PAGE + /* REF targetbkm \f \* MERGEFORMAT -> + imports a ShowVariable (bookmarkname)? + \h hyerlink to paragraph + \p relative to para above/below + \f refenence number + \d separator number separator + \n paragraph number + \r paragraph number in relative context + \t suppres non delimiters + \w paragraph number in full context + \* Upper/Lower... + */ + ,FIELD_REF // + /* REVNUM \* Numberingswitch \* MERGEFORMAT -> + DocInfo-revision number + */ + ,FIELD_REVNUM + /* SAVEDATE \@ "NumberFormat"\* MERGEFORMAT -> + DocInfo-modified-date + */ + ,FIELD_SAVEDATE + /* SECTION \* NumberFormat \* MERGEFORMAT -> + not imported in old ww8 filter see lcl_ParseNumberingType + todo: find alternative + */ + ,FIELD_SECTION + /* SECTIONPAGES \* NumberFormat \* MERGEFORMAT -> + not imported in old ww8 filter see lcl_ParseNumberingType + todo: find alternative + */ + ,FIELD_SECTIONPAGES + /* SEQ sequencename \h \c \n \r \s \* MERGEFORMAT -> + number range name:sequencename value:sequencename+1 + todo: only partially implemented, switches unsupported + */ + ,FIELD_SEQ + /* SET bookmarkname newtext \* MERGEFORMAT -> + SetVariable bookmarkname = newtext + todo: not implemented yet + */ + ,FIELD_SET + /* SKIPIF condition \* MERGEFORMAT -> + ?? + todo: not implemented yet + */ + ,FIELD_SKIPIF + /* STYLEREF stylename \* MERGEFORMAT -> + not imported in old ww8 filter + todo: add an equivalent field type + */ + ,FIELD_STYLEREF + /* SUBJECT subject \* Defaultswitch \* MERGEFORMAT -> + DocInfo - subject + */ + ,FIELD_SUBJECT + /* SYMBOL symbolnumber \* MERGEFORMAT -> + inserts a special char (symbolnumber) + todo: find alternative + */ + ,FIELD_SYMBOL + /* TEMPLATE \* Defaultswitch \* MERGEFORMAT + TemplateName field + */ + ,FIELD_TEMPLATE + /* TIME \@ "number format" \* MERGEFORMAT + ww8filterimprovement: multiple languages now supported + */ + ,FIELD_TIME + /* TITLE \* Defaultswitch \* MERGEFORMAT -> + DocInfo-title + */ + ,FIELD_TITLE + /* USERINITIALS newinitials \* MERGEFORMAT -> + ExtendedUser field (SHORTCUT) + */ + ,FIELD_USERINITIALS + /* USERADDRESS \* MERGEFORMAT -> + not imported in old ww8 filter + todo: find alternative + */ + ,FIELD_USERADDRESS + /* USERNAME newusername \* MERGEFORMAT -> + not imported in old ww8 filter + todo: import as extended user field(s) + */ + ,FIELD_USERNAME + /* + TOC options: + \a Builds a table of figures but does not include the captions's label and number + \b Uses a bookmark to specify area of document from which to build table of contents + \c Builds a table of figures of the given label + \d Defines the separator between sequence and page numbers + \f Builds a table of contents using TC entries instead of outline levels + \h Hyperlinks the entries and page numbers within the table of contents + \l Defines the TC entries field level used to build a table of contents + \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers + \o Builds a table of contents by using outline levels instead of TC entries + \p Defines the separator between the table entry and its page number + \s Builds a table of contents by using a sequence type + \t Builds a table of contents by using style names other than the standard outline styles + \u Builds a table of contents by using the applied paragraph outline level + \w Preserve tab characters within table entries + \x Preserve newline characters within table entries + \z Hides page numbers within the table of contens when shown in Web Layout View + */ + ,FIELD_TOC + /* + TOC entry: “text” + \f TC entry in doc with multiple tables + \l Outline Level + \n Suppress page numbers + example: TOC "EntryText \f \l 2 \n + */ + ,FIELD_TC + /* document statistic - number of characters + */ + ,FIELD_NUMCHARS + /* document statistic - number of words + */ + ,FIELD_NUMWORDS + /* document statistic - number of pages + */ + ,FIELD_NUMPAGES +}; + +}} +#endif // INCLUDED_FIELD_TYPES_HXX diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx new file mode 100644 index 000000000..d4785ec17 --- /dev/null +++ b/writerfilter/source/dmapper/FormControlHelper.cxx @@ -0,0 +1,309 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FormControlHelper.hxx" + +namespace writerfilter { +namespace dmapper { + +using namespace ::com::sun::star; + +struct FormControlHelper::FormControlHelper_Impl +{ + FieldId m_eFieldId; + awt::Size aSize; + uno::Reference rDrawPage; + uno::Reference rForm; + uno::Reference rFormComponent; + uno::Reference rServiceFactory; + uno::Reference rTextDocument; + + uno::Reference getDrawPage(); + uno::Reference getServiceFactory(); + uno::Reference getForm(); + uno::Reference getFormComps(); +}; + +uno::Reference FormControlHelper::FormControlHelper_Impl::getDrawPage() +{ + if (! rDrawPage.is()) + { + uno::Reference + xDrawPageSupplier(rTextDocument, uno::UNO_QUERY); + if (xDrawPageSupplier.is()) + rDrawPage = xDrawPageSupplier->getDrawPage(); + } + + return rDrawPage; +} + +uno::Reference FormControlHelper::FormControlHelper_Impl::getServiceFactory() +{ + if (! rServiceFactory.is()) + rServiceFactory = uno::Reference(rTextDocument, uno::UNO_QUERY); + + return rServiceFactory; +} + +uno::Reference FormControlHelper::FormControlHelper_Impl::getForm() +{ + if (! rForm.is()) + { + uno::Reference xFormsSupplier(getDrawPage(), uno::UNO_QUERY); + + if (xFormsSupplier.is()) + { + uno::Reference xFormsNamedContainer(xFormsSupplier->getForms()); + static ::rtl::OUString sDOCXForm(RTL_CONSTASCII_USTRINGPARAM("DOCX-Standard")); + + ::rtl::OUString sFormName(sDOCXForm); + sal_uInt16 nUnique = 0; + + while (xFormsNamedContainer->hasByName(sFormName)) + { + ++nUnique; + sFormName = sDOCXForm; + sFormName += ::rtl::OUString::valueOf(nUnique); + } + + uno::Reference + xForm(getServiceFactory()->createInstance + (::rtl::OUString + (RTL_CONSTASCII_USTRINGPARAM + ("com.sun.star.form.component.Form")))); + if (xForm.is()) + { + uno::Reference + xFormProperties(xForm, uno::UNO_QUERY); + uno::Any aAny(sFormName); + static ::rtl::OUString sName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"))); + xFormProperties->setPropertyValue(sName, aAny); + } + + rForm = uno::Reference(xForm, uno::UNO_QUERY); + + uno::Reference xForms(xFormsNamedContainer, uno::UNO_QUERY); + uno::Any aAny(xForm); + xForms->insertByIndex(xForms->getCount(), aAny); + } + } + + return rForm; +} + +uno::Reference FormControlHelper::FormControlHelper_Impl::getFormComps() +{ + uno::Reference xIndexContainer(getForm(), uno::UNO_QUERY); + + return xIndexContainer; +} + +FormControlHelper::FormControlHelper(FieldId eFieldId, + uno::Reference rTextDocument, + FFDataHandler::Pointer_t pFFData) + : m_pFFData(pFFData), m_pImpl(new FormControlHelper_Impl) +{ + m_pImpl->m_eFieldId = eFieldId; + m_pImpl->rTextDocument = rTextDocument; +} + +FormControlHelper::~FormControlHelper() +{ +} + +bool FormControlHelper::createCheckbox(uno::Reference xTextRange, + const ::rtl::OUString & rControlName) +{ + uno::Reference + xServiceFactory(m_pImpl->getServiceFactory()); + + if (! xServiceFactory.is()) + return false; + + uno::Reference xInterface = + xServiceFactory->createInstance + (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.CheckBox"))); + + if (!xInterface.is()) + return false; + + m_pImpl->rFormComponent = uno::Reference(xInterface, uno::UNO_QUERY); + if (!m_pImpl->rFormComponent.is()) + return false; + + uno::Reference xPropSet(xInterface, uno::UNO_QUERY); + + sal_uInt32 nCheckBoxHeight = 16 * m_pFFData->getCheckboxHeight(); + + if (m_pFFData->getCheckboxAutoHeight()) + { + uno::Reference xTextRangeProps(xTextRange, uno::UNO_QUERY); + + try + { + static ::rtl::OUString sCharHeight(RTL_CONSTASCII_USTRINGPARAM("CharHeight")); + float fCheckBoxHeight = 0.0; + xTextRangeProps->getPropertyValue(sCharHeight) >>= fCheckBoxHeight; + nCheckBoxHeight = floor(fCheckBoxHeight * 35.3); + } + catch (beans::UnknownPropertyException & rException) + { + } + } + + m_pImpl->aSize.Width = nCheckBoxHeight; + m_pImpl->aSize.Height = m_pImpl->aSize.Width; + + uno::Any aAny; + if (m_pFFData->getStatusText().getLength()) + { + aAny <<= m_pFFData->getStatusText(); + + xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpText")), aAny); + } + + aAny <<= m_pFFData->getCheckboxChecked(); + xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")), aAny); + + if (m_pFFData->getHelpText().getLength()) + { + aAny <<= m_pFFData->getHelpText(); + xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpF1Text")), aAny); + } + + aAny <<= rControlName; + xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aAny); + + return true; +} + +bool FormControlHelper::insertControl(uno::Reference xTextRange) +{ + bool bCreated = false; + + uno::Reference xFormCompsByName(m_pImpl->getForm(), uno::UNO_QUERY); + uno::Reference xFormComps(m_pImpl->getFormComps()); + if (! xFormComps.is()) + return false; + + static ::rtl::OUString sControl(RTL_CONSTASCII_USTRINGPARAM("Control")); + + sal_Int32 nControl = 0; + bool bDone = false; + ::rtl::OUString sControlName; + + do + { + ::rtl::OUString sTmp(sControl); + sTmp += ::rtl::OUString::valueOf(nControl); + + nControl++; + if (! xFormCompsByName->hasByName(sTmp)) + { + sControlName = sTmp; + bDone = true; + } + } + while (! bDone); + + switch (m_pImpl->m_eFieldId) + { + case FIELD_FORMCHECKBOX: + bCreated = createCheckbox(xTextRange, sControlName); + break; + default: + break; + } + + if (!bCreated) + return false; + + uno::Any aAny(m_pImpl->rFormComponent); + xFormComps->insertByIndex(xFormComps->getCount(), aAny); + + if (! m_pImpl->getServiceFactory().is()) + return false; + + uno::Reference xInterface = + m_pImpl->getServiceFactory()->createInstance + (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"))); + + if (! xInterface.is()) + return false; + + uno::Reference xShape(xInterface, uno::UNO_QUERY); + + if (! xShape.is()) + return false; + + xShape->setSize(m_pImpl->aSize); + + uno::Reference xShapeProps(xShape, uno::UNO_QUERY); + + sal_uInt16 nTmp = text::TextContentAnchorType_AS_CHARACTER; + aAny <<= nTmp; + + static const ::rtl::OUString sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType")); + xShapeProps->setPropertyValue(sAnchorType, aAny); + + static const ::rtl::OUString sVertOrient(RTL_CONSTASCII_USTRINGPARAM("VertOrient")); + nTmp = text::VertOrientation::CENTER; + aAny <<= nTmp; + xShapeProps->setPropertyValue(sVertOrient, aAny); + + aAny <<= xTextRange; + + static const ::rtl::OUString sTextRange(RTL_CONSTASCII_USTRINGPARAM("TextRange")); + xShapeProps->setPropertyValue(sTextRange, aAny); + + uno::Reference xControlShape(xShape, uno::UNO_QUERY); + uno::Reference xControlModel(m_pImpl->rFormComponent, uno::UNO_QUERY); + xControlShape->setControl(xControlModel); + + m_pImpl->getDrawPage()->add(xShape); + + return true; +} + +}} diff --git a/writerfilter/source/dmapper/FormControlHelper.hxx b/writerfilter/source/dmapper/FormControlHelper.hxx new file mode 100644 index 000000000..c86f659d2 --- /dev/null +++ b/writerfilter/source/dmapper/FormControlHelper.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_FORM_CONTROL_HELPER_HXX +#define INCLUDED_FORM_CONTROL_HELPER_HXX + +#include +#include +#include +#include "FieldTypes.hxx" + +namespace writerfilter { +namespace dmapper { + +using namespace ::com::sun::star; + +class FormControlHelper +{ +public: + typedef boost::shared_ptr Pointer_t; + FormControlHelper(FieldId eFieldId, + uno::Reference rTextDocument, + FFDataHandler::Pointer_t pFFData); + ~FormControlHelper(); + + bool insertControl(uno::Reference xTextRange); + +private: + FFDataHandler::Pointer_t m_pFFData; + struct FormControlHelper_Impl; + typedef boost::shared_ptr ImplPointer_t; + ImplPointer_t m_pImpl; + + bool createCheckbox(uno::Reference xTextRange, + const ::rtl::OUString & rControlName); +}; + +} +} + +#endif // INCLUDED_FORM_CONTROL_HELPER_HXX diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 9f884b37e..fe08542d6 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -320,6 +320,8 @@ const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const case PROP_OUTLINE_LEVEL : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OutlineLevel")); break; case PROP_LISTTAB_STOP_POSITION : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ListtabStopPosition")); break; case PROP_POSITION_AND_SPACE_MODE : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionAndSpaceMode")); break; + case PROP_PARA_SPLIT: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaSplit")); break; + case PROP_HELP: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Help")); break; case PROP_HEADING_STYLE_NAME: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); break; // case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break; // case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break; diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index 68fbd24a9..a1bb160f6 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -284,6 +284,8 @@ enum PropertyIds /*248*/ ,PROP_LISTTAB_STOP_POSITION /*249*/ ,PROP_POSITION_AND_SPACE_MODE /*250*/ ,PROP_HEADING_STYLE_NAME +/*251*/ ,PROP_PARA_SPLIT +/*252*/ ,PROP_HELP }; struct PropertyNameSupplier_Impl; class PropertyNameSupplier diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 53275e387..d5c0962f9 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include "dmapperLoggers.hxx" #include "PropertyMapHelper.hxx" @@ -155,6 +156,18 @@ XMLTag::Pointer_t PropertyMap::toTag() const sal_Int32 aInt; aMapIter->second >>= aInt; pTag->addAttr("value", aInt); + + sal_uInt32 auInt; + aMapIter->second >>= auInt; + pTag->addAttr("unsignedValue", auInt); + + float aFloat; + aMapIter->second >>= aFloat; + pTag->addAttr("floatValue", aFloat); + + ::rtl::OUString aStr; + aMapIter->second >>= auInt; + pTag->addAttr("stringValue", aStr); } catch (...) { } @@ -244,6 +257,7 @@ SectionPropertyMap::SectionPropertyMap(bool bIsFirstSection) : ,m_nDzaGutter( 0 ) ,m_bGutterRTL( false ) ,m_bSFBiDi( false ) + ,m_nGridType(0) ,m_nGridLinePitch( 1 ) ,m_nDxtCharSpace( 0 ) ,m_nLnnMod( 0 ) @@ -274,7 +288,7 @@ SectionPropertyMap::SectionPropertyMap(bool bIsFirstSection) : uno::Any aFalse( ::uno::makeAny( false ) ); Insert( PROP_GRID_DISPLAY, false, aFalse); Insert( PROP_GRID_PRINT, false, aFalse); - + Insert( PROP_GRID_MODE, false, uno::makeAny(text::TextGridMode::NONE)); if( m_bIsFirstSection ) @@ -908,6 +922,22 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) nRubyHeight = 0; operator[]( PropertyDefinition( PROP_GRID_RUBY_HEIGHT, false )) = uno::makeAny( nRubyHeight ); + sal_Int16 nGridMode = text::TextGridMode::NONE; + + switch (m_nGridType) + { + case NS_ooxml::LN_Value_wordprocessingml_ST_DocGrid_lines: + nGridMode = text::TextGridMode::LINES; + break; + case NS_ooxml::LN_Value_wordprocessingml_ST_DocGrid_linesAndChars: + nGridMode = text::TextGridMode::LINES_AND_CHARS; + break; + default: + break; + } + + operator[](PropertyDefinition(PROP_GRID_MODE, false)) = uno::makeAny(nGridMode); + _ApplyProperties( xFollowPageStyle ); //todo: creating a "First Page" style depends on HasTitlePage und _fFacingPage_ diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 68a182582..f06cced6f 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -193,6 +193,7 @@ class SectionPropertyMap : public PropertyMap bool m_bGutterRTL; bool m_bSFBiDi; + sal_Int32 m_nGridType; sal_Int32 m_nGridLinePitch; sal_Int32 m_nDxtCharSpace; @@ -266,6 +267,7 @@ public: void SetDzaGutter( sal_Int32 nSet ) {m_nDzaGutter = nSet; } void SetSFBiDi( bool bSet ) { m_bSFBiDi = bSet;} + void SetGridType(sal_Int32 nSet) { m_nGridType = nSet; } void SetGridLinePitch( sal_Int32 nSet ) { m_nGridLinePitch = nSet; } void SetDxtCharSpace( sal_Int32 nSet ) { m_nDxtCharSpace = nSet; } diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx index 4b9677b38..d0d763827 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.cxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx @@ -32,6 +32,7 @@ #include #include "PropertyMapHelper.hxx" +#ifdef DEBUG namespace writerfilter { namespace dmapper @@ -39,7 +40,7 @@ namespace dmapper using namespace ::com::sun::star; - XMLTag::Pointer_t lcl_TableColumnSeparatorsToTag(const uno::Any & rTableColumnSeparators) +XMLTag::Pointer_t lcl_TableColumnSeparatorsToTag(const uno::Any & rTableColumnSeparators) { uno::Sequence aSeq; rTableColumnSeparators >>= aSeq; @@ -127,3 +128,4 @@ XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t rPropValSeq } } +#endif // DEBUG diff --git a/writerfilter/source/dmapper/PropertyMapHelper.hxx b/writerfilter/source/dmapper/PropertyMapHelper.hxx index a2f41be66..e57aaba26 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.hxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.hxx @@ -28,6 +28,7 @@ * ************************************************************************/ +#ifdef DEBUG #include "PropertyMap.hxx" #include @@ -46,3 +47,4 @@ typedef uno::Sequence PropertyValueSeqSeq_t; XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t & rPropValSeqSeq); } } +#endif // DEBUG diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx old mode 100644 new mode 100755 index 07abc8bd2..d26159c02 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -28,6 +28,7 @@ * ************************************************************************/ +#include #include #include @@ -37,7 +38,15 @@ #include #include +#ifdef DEBUG_DOMAINMAPPER +#include +#include "dmapperLoggers.hxx" +#endif + namespace writerfilter { + +using resourcemodel::resolveSprmProps; + namespace dmapper { @@ -56,6 +65,21 @@ struct SettingsTable_Impl bool m_bNoPunctuationKerning; bool m_doNotIncludeSubdocsInStats; // Do Not Include Content in Text Boxes, Footnotes, and Endnotes in Document Statistics) bool m_bRecordChanges; + int m_nEdit; + bool m_bFormatting; + bool m_bEnforcement; + int m_nCryptProviderType; + int m_nCryptAlgorithmClass; + int m_nCryptAlgorithmType; + ::rtl::OUString m_sCryptAlgorithmSid; + int m_nCryptSpinCount; + ::rtl::OUString m_sCryptProvider; + ::rtl::OUString m_sAlgIdExt; + ::rtl::OUString m_sAlgIdExtSource; + ::rtl::OUString m_sCryptProviderTypeExt; + ::rtl::OUString m_sCryptProviderTypeExtSource; + ::rtl::OUString m_sHash; + ::rtl::OUString m_sSalt; SettingsTable_Impl( DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory ) : m_rDMapper( rDMapper ) @@ -65,6 +89,13 @@ struct SettingsTable_Impl , m_bNoPunctuationKerning(false) , m_doNotIncludeSubdocsInStats(false) , m_bRecordChanges(false) + , m_nEdit(NS_ooxml::LN_Value_wordprocessingml_ST_DocProtect_none) + , m_bFormatting(false) + , m_bEnforcement(false) + , m_nCryptProviderType(NS_ooxml::LN_Value_wordprocessingml_ST_CryptProv_rsaAES) + , m_nCryptAlgorithmClass(NS_ooxml::LN_Value_wordprocessingml_ST_AlgClass_hash) + , m_nCryptAlgorithmType(NS_ooxml::LN_Value_wordprocessingml_ST_AlgType_typeAny) + , m_nCryptSpinCount(0) {} }; @@ -79,8 +110,15 @@ SettingsTable::~SettingsTable() delete m_pImpl; } -void SettingsTable::attribute(Id /*Name*/, Value & val) +void SettingsTable::attribute(Id nName, Value & val) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("SettingsTable.attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(nName)); + dmapper_logger->attribute("value", val.toString()); +#endif + + (void) nName; int nIntValue = val.getInt(); (void)nIntValue; ::rtl::OUString sValue = val.getString(); @@ -99,10 +137,18 @@ void SettingsTable::attribute(Id /*Name*/, Value & val) } } #endif +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("SettingsTable.attribute"); +#endif } void SettingsTable::sprm(Sprm& rSprm) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("SettingsTable.sprm"); + dmapper_logger->chars(rSprm.toString()); +#endif + sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); @@ -184,11 +230,20 @@ void SettingsTable::sprm(Sprm& rSprm) m_pImpl->m_bRecordChanges = bool(rSprm.getValue( )->getInt( ) ); } break; + case NS_ooxml::LN_CT_Settings_documentProtection: + { + resolveSprmProps(*this, rSprm); + } + break; default: { OSL_ENSURE( false, "unknown sprmid in SettingsTable::sprm()"); } } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("SettingsTable.sprm"); +#endif } void SettingsTable::entry(int /*pos*/, writerfilter::Reference::Pointer_t ref) diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 549dd156c..297cd552e 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -417,6 +417,7 @@ void StyleSheetTable::attribute(Id Name, Value & val) #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("StyleSheetTable.attribute"); dmapper_logger->attribute("name", (*QNameToString::Instance())(Name)); + dmapper_logger->attribute("value", val.toString()); #endif OSL_ENSURE( m_pImpl->m_pCurrentEntry, "current entry has to be set here"); @@ -534,10 +535,9 @@ void StyleSheetTable::attribute(Id Name, Value & val) break; default: { - //----> debug - int nVal = val.getInt(); - ++nVal; - //<---- debug +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif } break; } @@ -599,7 +599,6 @@ void StyleSheetTable::sprm(Sprm & rSprm) break; case NS_ooxml::LN_CT_Style_tblPr: //contains table properties case NS_ooxml::LN_CT_Style_tblStylePr: //contains to table properties - case NS_ooxml::LN_CT_DocDefaults_pPrDefault: case NS_ooxml::LN_CT_DocDefaults_rPrDefault: case NS_ooxml::LN_CT_TblPrBase_tblInd: //table properties - at least width value and type case NS_ooxml::LN_EG_RPrBase_rFonts: //table fonts @@ -682,19 +681,30 @@ void StyleSheetTable::sprm(Sprm & rSprm) break; case NS_ooxml::LN_CT_Style_pPr: /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + // no break case NS_ooxml::LN_CT_Style_rPr: /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + // no break default: - if (!m_pImpl->m_pCurrentEntry) - break; - TablePropertiesHandlerPtr pTblHandler( new TablePropertiesHandler( true ) ); - pTblHandler->SetProperties( m_pImpl->m_pCurrentEntry->pProperties ); - if ( !pTblHandler->sprm( rSprm ) ) { - m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties ); - m_pImpl->m_rDMapper.sprm( rSprm ); - m_pImpl->m_rDMapper.PopStyleSheetProperties( ); + if (!m_pImpl->m_pCurrentEntry) + break; + + TablePropertiesHandlerPtr pTblHandler( new TablePropertiesHandler( true ) ); + pTblHandler->SetProperties( m_pImpl->m_pCurrentEntry->pProperties ); + if ( !pTblHandler->sprm( rSprm ) ) + { + m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties ); + + PropertyMapPtr pProps(new PropertyMap()); + m_pImpl->m_rDMapper.sprm( rSprm, pProps ); + + m_pImpl->m_pCurrentEntry->pProperties->insert(pProps); + + m_pImpl->m_rDMapper.PopStyleSheetProperties( ); + } } + break; } #ifdef DEBUG_DOMAINMAPPER @@ -798,6 +808,10 @@ uno::Sequence< ::rtl::OUString > PropValVector::getNames() -----------------------------------------------------------------------*/ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("applyStyleSheets"); +#endif + try { uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( m_pImpl->m_xTextDocument, uno::UNO_QUERY_THROW ); @@ -956,11 +970,24 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) PropValVector aSortedPropVals; for( sal_Int32 nProp = 0; nProp < aPropValues.getLength(); ++nProp) { - // Don't add the style name properties +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("propvalue"); + dmapper_logger->attribute("name", aPropValues[nProp].Name); + dmapper_logger->attribute("value", aPropValues[nProp].Value); +#endif + // Don't add the style name properties bool bIsParaStyleName = aPropValues[nProp].Name.equalsAscii( "ParaStyleName" ); bool bIsCharStyleName = aPropValues[nProp].Name.equalsAscii( "CharStyleName" ); - if ( !bInsert && !bIsParaStyleName && !bIsCharStyleName ) + if ( !bIsParaStyleName && !bIsCharStyleName ) + { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("insert"); +#endif aSortedPropVals.Insert( aPropValues[nProp] ); + } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("propvalue"); +#endif } if(bAddFollowStyle) { @@ -1009,7 +1036,15 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) } } if(bInsert) + { xStyles->insertByName( sConvertedStyleName, uno::makeAny( xStyle) ); +#ifdef DEBUG_DOMAINMAPPER + uno::Reference xProps(xStyle, uno::UNO_QUERY); + dmapper_logger->startElement("insertStyle"); + dmapper_logger->addTag(unoPropertySetToTag(xProps)); + dmapper_logger->endElement("insertStyle"); +#endif + } } ++aIt; } @@ -1020,6 +1055,10 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) (void)rEx; OSL_ENSURE( false, "Styles could not be imported completely"); } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("applyStyleSheets"); +#endif } /*-- 22.06.2006 15:56:56--------------------------------------------------- diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx index 09b4fe8e2..0338732db 100755 --- a/writerfilter/source/dmapper/ThemeTable.cxx +++ b/writerfilter/source/dmapper/ThemeTable.cxx @@ -31,6 +31,10 @@ #include #endif #include +#ifdef DEBUG_DOMAINMAPPER +#include "dmapperLoggers.hxx" +#include +#endif namespace writerfilter { namespace dmapper @@ -59,6 +63,11 @@ ThemeTable::~ThemeTable() void ThemeTable::attribute(Id Name, Value & val) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("ThemeTable.attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(Name)); + dmapper_logger->attribute("value", val.toString()); +#endif // int nIntValue = val.getInt(); ::rtl::OUString sValue = val.getString(); // printf ( "ThemeTable::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)Name, (unsigned int)nIntValue, ::rtl::OUStringToOString(sValue, RTL_TEXTENCODING_DONTKNOW).getStr()); @@ -72,12 +81,23 @@ void ThemeTable::attribute(Id Name, Value & val) break; default: { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif } } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("ThemeTable.attribute"); +#endif } void ThemeTable::sprm(Sprm& rSprm) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("ThemeTable.sprm"); + dmapper_logger->chars(rSprm.toString()); +#endif + sal_uInt32 nSprmId = rSprm.getId(); (void)nSprmId; @@ -126,14 +146,27 @@ void ThemeTable::sprm(Sprm& rSprm) break; default: { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif } } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("ThemeTable.sprm"); +#endif } void ThemeTable::entry(int /*pos*/, writerfilter::Reference::Pointer_t ref) { - // printf ( "ThemeTable::entry\n"); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("ThemeTable.entry"); +#endif + ref->resolve(*this); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("ThemeTable.entry"); +#endif } const ::rtl::OUString ThemeTable::getFontNameForTheme(const Id id) const diff --git a/writerfilter/source/dmapper/dmapperLoggers.hxx b/writerfilter/source/dmapper/dmapperLoggers.hxx index 3f6a9746c..b9ed007e9 100644 --- a/writerfilter/source/dmapper/dmapperLoggers.hxx +++ b/writerfilter/source/dmapper/dmapperLoggers.hxx @@ -31,6 +31,7 @@ #ifndef INCLUDED_DMAPPER_LOGGERS_HXX #define INCLUDED_DMAPPER_LOGGERS_HXX +#ifdef DEBUG #include namespace writerfilter { @@ -38,4 +39,5 @@ namespace writerfilter { extern TagLogger::Pointer_t dmapper_logger; } } +#endif // DEBUG #endif // INCLUDED_DMAPPER_LOGGERS_HXX diff --git a/writerfilter/source/dmapper/genclass.xsl b/writerfilter/source/dmapper/genclass.xsl new file mode 100644 index 000000000..eaddab52e --- /dev/null +++ b/writerfilter/source/dmapper/genclass.xsl @@ -0,0 +1,707 @@ + + + + + + + + + + + + + + + + + + + /************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: PropertyMap.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + + + + + + + + + + + + + + + + m_b + + + m_s + + + m_n + + + m_ + + + + + + + + + + + + + INCLUDED_ + + _HXX + + #ifndef + + #define + + #include <resourcemodel/WW8ResourceModel.hxx> + #include <rtl/ustring.hxx> + namespace writerfilter { + namespace dmapper { + + }} + #endif // + + + + + + + + + #include " + + .hxx" + #include <ooxml/resourceids.hxx> + #ifdef DEBUG_DOMAINMAPPER + #include <resourcemodel/QNameToString.hxx> + #include "dmapperLoggers.hxx" + #endif + namespace writerfilter { + namespace dmapper { + + }} + + + + + class + + + : public + + + + , + + + + { + public: + + // constructor + + + (); + // destructor + virtual ~ + + (); + + + // sprm + void sprm(Sprm & r_sprm); + void resolveSprm(Sprm & r_sprm); + + + // attribute + void attribute(Id name, Value & val); + + private: + + }; + + + + + + + ::rtl::OUString + + + + + + + + + // typedefs + + typedef + + + ::boost::shared_ptr< + + > + + + + + + ::std::vector< + + > + + + + ; + + + + + + set + + + + + + + get + + + + + + + + PushBack + + + + + + + true + + + void + + + :: + + + ( + + + + + + ) + + + + + + + true + + + + + + + + + + :: + + + () const + + + + + + + + + + + void + + + :: + + + ( + + true + + r_Element + ) + + + + + + + // member: + + + + ; + + + ; + + + + + + ; + + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + + rtl::OUString + + + + + + + + :: + + + + + + + + + + + + + + + + const + + + + + + + + + + + + + + + + + + & + + + + + + + + + + + + + + r_s + + + + + + r_ + + + + + + + + + + { + + + = + + ; + } + + + + + + + { + return + + ; + } + + + + + + + + + + + { + + + .push_back(r_Element); + } + + + + + + + + + getString() + + + + getInt() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + + + = + + + + ; } + + + + + { + + + .push_back( + + + + ); + ; } + + + + { + resolveSprm(r_Sprm); + } + + + + + + + + + + + + + + + + + + + + + + + + + void + + + ::sprm(Sprm & r_Sprm) + { + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement(" + + .sprm"); + dmapper_logger->chars(r_Sprm.toString()); + #endif + switch(r_Sprm.getId()) + { + + case + + : + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + + r_Sprm.getValue()-> + + break; + + default: + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); + #endif DEBUG_DOMAINMAPPER + break; + } + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement(" + + .sprm"); + #endif + } + void + + ::resolveSprm(Sprm & r_Sprm) + { + writerfilter::Reference<Properties>::Pointer_t pProperties = r_Sprm.getProps(); + if( pProperties.get()) + pProperties->resolve(*this); + } + + + + + + void + + + :: + attribute(Id name, Value & val) + { + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement(" + + .attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(name)); + dmapper_logger->attribute("value", val.toString()); + dmapper_logger->endElement(" + + .attribute"); + #endif + switch (name) + { + + case + + : + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + + val. + + break; + + default: + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); + #endif DEBUG_DOMAINMAPPER + break; + } + } + + + + + + + :: + + () + + + + , + + + + + + (0) + + + (false) + + + + + + : + + + { + } + + + + + + ::~ + + () + { + } + + + + + + class: + + + + + + /*** + + * + * + + * + ** + + **/ + + + + // member: + + :: + + + + + + + + + + diff --git a/writerfilter/source/dmapper/makefile.mk b/writerfilter/source/dmapper/makefile.mk old mode 100644 new mode 100755 index 4b9636855..300dfb31d --- a/writerfilter/source/dmapper/makefile.mk +++ b/writerfilter/source/dmapper/makefile.mk @@ -47,6 +47,8 @@ SLOFILES= \ $(SLO)$/DomainMapperTableHandler.obj \ $(SLO)$/DomainMapperTableManager.obj \ $(SLO)$/DomainMapper_Impl.obj \ + $(SLO)$/FFDataHandler.obj \ + $(SLO)$/FormControlHelper.obj \ $(SLO)$/FontTable.obj \ $(SLO)$/GraphicHelpers.obj \ $(SLO)$/GraphicImport.obj \ diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx index 5dbf986a5..d4f5b3564 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.cxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx @@ -157,6 +157,7 @@ WW8Document::~WW8Document() { } +#ifdef DEBUG class WW8IdToString : public IdToString { public: @@ -173,6 +174,7 @@ public: return s; } }; +#endif WW8DocumentImpl::~WW8DocumentImpl() { @@ -185,6 +187,9 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false) mpDocStream = getSubStream(::rtl::OUString::createFromAscii ("WordDocument")); + mpSummaryInformationStream = getSubStream(::rtl::OUString::createFromAscii + ("\5SummaryInformation")); + try { mpDataStream = getSubStream(::rtl::OUString::createFromAscii @@ -1077,6 +1082,24 @@ writerfilter::Reference::Pointer_t WW8DocumentImpl::getStyleSheet() const return pResult; } +writerfilter::Reference
::Pointer_t WW8DocumentImpl::getAssocTable() const +{ + writerfilter::Reference
::Pointer_t pResult; + + if (mpFib->get_lcbSttbfAssoc() > 0) + { + WW8Sttbf::Pointer_t pSttbfAssoc + (new WW8Sttbf(*mpTableStream, + mpFib->get_fcSttbfAssoc(), + mpFib->get_lcbSttbfAssoc())); + + pResult = writerfilter::Reference
::Pointer_t + (new WW8SttbTableResource(pSttbfAssoc)); + } + + return pResult; +} + sal_uInt32 WW8DocumentImpl::getHeaderCount() const { sal_uInt32 nResult = 0; @@ -1281,6 +1304,19 @@ WW8DocumentImpl::getField(const CpAndFc & rCpAndFc) const return mpFieldHelper->getField(rCpAndFc); } +writerfilter::Reference::Pointer_t +WW8DocumentImpl::getDocumentProperties() const +{ + writerfilter::Reference::Pointer_t pResult; + + if (mpFib->get_lcbDop() > 0) + { + pResult.reset(new WW8DopBase(*mpTableStream, mpFib->get_fcDop(), mpFib->get_lcbDop())); + } + + return pResult; +} + WW8FLD::Pointer_t WW8DocumentImpl::getCurrentFLD() const { return mpFLD; @@ -1632,7 +1668,7 @@ void WW8DocumentImpl::resolve(Stream & rStream) //output.addItem(mTextboxHeaderEndCpAndFc.toString()); -#if 0 +#if 1 output.addItem(""); output.addItem(mpStream->getSubStreamNames()); output.addItem(""); @@ -1641,6 +1677,11 @@ void WW8DocumentImpl::resolve(Stream & rStream) { mpDocStream->dump(output); } + + if (mpSummaryInformationStream.get() != NULL) + { + mpSummaryInformationStream->dump(output); + } #endif writerfilter::Reference::Pointer_t pFib @@ -1742,6 +1783,11 @@ void WW8DocumentImpl::resolve(Stream & rStream) { clog << e.getText() << endl; } + + writerfilter::Reference
::Pointer_t pAssocTable = getAssocTable(); + + if (pAssocTable.get() != NULL) + rStream.table(NS_rtf::LN_SttbAssoc, pAssocTable); writerfilter::Reference
::Pointer_t pListTable = getListTable(); @@ -1845,6 +1891,9 @@ void WW8DocumentImpl::resolve(Stream & rStream) startSectionGroup(rStream); rStream.info(pIt->toString()); + if (nSectionIndex == 0) + rStream.props(getDocumentProperties()); + sal_uInt32 nHeaderStartIndex = 6 + nSectionIndex * 6; sal_uInt32 nHeaderEndIndex = nHeaderStartIndex + 6; diff --git a/writerfilter/source/doctok/WW8DocumentImpl.hxx b/writerfilter/source/doctok/WW8DocumentImpl.hxx index c6d63dc92..5038dfb61 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.hxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.hxx @@ -284,6 +284,9 @@ class WW8DocumentImpl : public WW8Document /// pointer to the compound object stream of the document WW8Stream::Pointer_t mpCompObjStream; + /// pointer to the summayry information stream of the document + WW8Stream::Pointer_t mpSummaryInformationStream; + /// pointer to the piece table WW8PieceTable::Pointer_t mpPieceTable; @@ -553,6 +556,11 @@ public: */ writerfilter::Reference
::Pointer_t getStyleSheet() const; + /** + Return reference to associated data. + */ + writerfilter::Reference
::Pointer_t getAssocTable() const; + /** Return count of headers/footers. */ @@ -676,6 +684,13 @@ public: writerfilter::Reference::Pointer_t getField(const CpAndFc & rCpAndFc) const; + /** + Return document properties. + + */ + writerfilter::Reference::Pointer_t + getDocumentProperties() const; + /** Return current field descriptor. */ diff --git a/writerfilter/source/doctok/WW8FontTable.cxx b/writerfilter/source/doctok/WW8FontTable.cxx index 5ccc8f04d..42b0c08cb 100644 --- a/writerfilter/source/doctok/WW8FontTable.cxx +++ b/writerfilter/source/doctok/WW8FontTable.cxx @@ -52,11 +52,6 @@ void WW8FontTable::initPayload() mnPlcfPayloadOffset = nOffset; } -sal_uInt32 WW8FontTable::calcPayloadOffset() -{ - return 0; -} - sal_uInt32 WW8FontTable::getEntryCount() { return entryOffsets.size() - 1; diff --git a/writerfilter/source/doctok/WW8LFOTable.cxx b/writerfilter/source/doctok/WW8LFOTable.cxx index 9f65da213..17a109f1c 100644 --- a/writerfilter/source/doctok/WW8LFOTable.cxx +++ b/writerfilter/source/doctok/WW8LFOTable.cxx @@ -62,13 +62,6 @@ void WW8LFOTable::initPayload() payloadOffsets.push_back(nOffsetLFOData); } -sal_uInt32 WW8LFOTable::calcPayloadOffset() -{ - sal_uInt32 nResult = 4 + getEntryCount() * WW8LFO::getSize(); - - return nResult; -} - sal_uInt32 WW8LFOTable::getEntryCount() { return getU32(0); diff --git a/writerfilter/source/doctok/WW8ListTable.cxx b/writerfilter/source/doctok/WW8ListTable.cxx index e520600cd..9b470dd68 100644 --- a/writerfilter/source/doctok/WW8ListTable.cxx +++ b/writerfilter/source/doctok/WW8ListTable.cxx @@ -68,11 +68,6 @@ void WW8ListTable::initPayload() entryOffsets.push_back(nOffset); } -sal_uInt32 WW8ListTable::calcPayloadOffset() -{ - return 0; -} - sal_uInt32 WW8ListTable::getEntryCount() { return getU16(0); diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx index fa826375b..8540614db 100644 --- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx +++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/writerfilter/source/doctok/WW8StreamImpl.cxx b/writerfilter/source/doctok/WW8StreamImpl.cxx index 84be4539f..ee7c49801 100644 --- a/writerfilter/source/doctok/WW8StreamImpl.cxx +++ b/writerfilter/source/doctok/WW8StreamImpl.cxx @@ -38,8 +38,10 @@ namespace writerfilter { namespace doctok { using namespace ::com::sun::star; - - TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG")); + +#ifdef DEBUG +TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG")); +#endif WW8Stream::~WW8Stream() { diff --git a/writerfilter/source/doctok/WW8StructBase.cxx b/writerfilter/source/doctok/WW8StructBase.cxx index e537613e1..0672c8961 100644 --- a/writerfilter/source/doctok/WW8StructBase.cxx +++ b/writerfilter/source/doctok/WW8StructBase.cxx @@ -26,7 +26,6 @@ ************************************************************************/ #include -#include namespace writerfilter { namespace doctok { diff --git a/writerfilter/source/doctok/WW8StyleSheet.cxx b/writerfilter/source/doctok/WW8StyleSheet.cxx index df2fdfeac..f0a1678a3 100644 --- a/writerfilter/source/doctok/WW8StyleSheet.cxx +++ b/writerfilter/source/doctok/WW8StyleSheet.cxx @@ -46,11 +46,6 @@ void WW8StyleSheet::initPayload() entryOffsets.push_back(nOffset); } -sal_uInt32 WW8StyleSheet::calcPayloadOffset() -{ - return 0; -} - sal_uInt32 WW8StyleSheet::calcSize() { return getCount(); diff --git a/writerfilter/source/doctok/doctokLoggers.hxx b/writerfilter/source/doctok/doctokLoggers.hxx index c0b7380db..98cb077d2 100644 --- a/writerfilter/source/doctok/doctokLoggers.hxx +++ b/writerfilter/source/doctok/doctokLoggers.hxx @@ -28,6 +28,8 @@ #ifndef INCLUDED_DOCTOK_LOGGERS_HXX #define INCLUDED_DOCTOK_LOGGERS_HXX +#ifdef DEBUG + #include namespace writerfilter { @@ -36,5 +38,5 @@ namespace writerfilter { } } - +#endif // DEBUG #endif // INCLUDED_DOCTOK_LOGGERS_HXX diff --git a/writerfilter/source/doctok/doctokutil.cxx b/writerfilter/source/doctok/doctokutil.cxx deleted file mode 100644 index ed01497ad..000000000 --- a/writerfilter/source/doctok/doctokutil.cxx +++ /dev/null @@ -1,53 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include - -using namespace ::std; - -namespace writerfilter { -namespace doctok { -void util_assert(bool bTest) -{ - if (! bTest) - clog << "ASSERT!\n" << endl; -} - -void printBytes(ostream & o, const string & str) -{ - unsigned int nCount = str.size(); - for (unsigned int n = 0; n < nCount; ++n) - { - unsigned char c = static_cast(str[n]); - if (c < 128 && isprint(c)) - o << str[n]; - else - o << "."; - } -} - -}} diff --git a/writerfilter/source/doctok/dopbase.xml b/writerfilter/source/doctok/dopbase.xml new file mode 100644 index 000000000..8beb21d8c --- /dev/null +++ b/writerfilter/source/doctok/dopbase.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/doctok/makefile.mk b/writerfilter/source/doctok/makefile.mk index 6a407a0b9..ff03079f2 100644 --- a/writerfilter/source/doctok/makefile.mk +++ b/writerfilter/source/doctok/makefile.mk @@ -58,7 +58,6 @@ SLOFILES= \ $(SLO)$/WW8LFOTable.obj \ $(SLO)$/WW8ListTable.obj \ $(SLO)$/resources.obj \ - $(SLO)$/doctokutil.obj \ $(SLO)$/WW8CpAndFc.obj \ $(SLO)$/WW8StructBase.obj \ $(SLO)$/WW8Clx.obj \ diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi index cfcd2ac7e..926e046d3 100644 --- a/writerfilter/source/doctok/resources.xmi +++ b/writerfilter/source/doctok/resources.xmi @@ -552,6 +552,21 @@ + + + + + rtf:SttbAssoc + + + + + + + + + + @@ -578,24 +593,21 @@ - - + + - - - - 28 + 84 - + @@ -614,7 +626,7 @@ - + 31 @@ -622,7 +634,7 @@ - + 0x80000000 @@ -630,7 +642,7 @@ - + 1 @@ -638,7 +650,7 @@ - rtf:ISTARTAT + rtf:fFacingPages @@ -653,7 +665,7 @@ - + @@ -664,7 +676,7 @@ - 4 + 0 @@ -672,7 +684,7 @@ - + 30 @@ -680,15 +692,73 @@ - + 0x40000000 + + + 1 + + + + + + + + rtf:unused1 + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + 29 + + + + + + + + 0x20000000 + + + + + + + + 1 @@ -696,14 +766,14 @@ - rtf:NFC + rtf:fPMHMainDoc - + @@ -711,7 +781,7 @@ - + @@ -722,7 +792,7 @@ - 5 + 0 @@ -730,7 +800,7 @@ - 6 + 27 @@ -738,7 +808,7 @@ - 0xc0 + 0x18000000 @@ -754,14 +824,14 @@ - rtf:JC + rtf:unused2 - + @@ -769,7 +839,7 @@ - + @@ -780,7 +850,7 @@ - 5 + 0 @@ -788,7 +858,7 @@ - 5 + 25 @@ -796,7 +866,7 @@ - 0x20 + 0x6000000 @@ -804,7 +874,7 @@ - 1 + 2 @@ -812,14 +882,14 @@ - rtf:FLEGAL + rtf:fpc - + @@ -827,7 +897,7 @@ - + @@ -838,7 +908,7 @@ - 5 + 0 @@ -846,7 +916,7 @@ - 4 + 24 @@ -854,7 +924,7 @@ - 0x0 + 0x000000 @@ -870,14 +940,14 @@ - rtf:FNORESTART + rtf:unused3 - + @@ -885,7 +955,7 @@ - + @@ -896,7 +966,7 @@ - 5 + 0 @@ -904,7 +974,7 @@ - 3 + 16 @@ -912,7 +982,7 @@ - 0x8 + 0xff0000 @@ -920,7 +990,7 @@ - 1 + 8 @@ -928,14 +998,14 @@ - rtf:FIDENTSAV + rtf:unused4 - + @@ -943,7 +1013,7 @@ - + @@ -954,7 +1024,7 @@ - 5 + 0 @@ -962,7 +1032,7 @@ - 2 + 14 @@ -970,7 +1040,7 @@ - 0x4 + 0xc000 @@ -978,7 +1048,7 @@ - 1 + 2 @@ -986,14 +1056,14 @@ - rtf:FCONVERTED + rtf:rncFtn - + @@ -1001,7 +1071,7 @@ - + @@ -1012,7 +1082,7 @@ - 5 + 0 @@ -1028,7 +1098,7 @@ - 0x1 + 0x3fff @@ -1036,7 +1106,7 @@ - 1 + 14 @@ -1044,14 +1114,14 @@ - rtf:FTENTATIVE + rtf:nFtn - + @@ -1059,7 +1129,7 @@ - + @@ -1070,7 +1140,7 @@ - 6 + 4 @@ -1078,7 +1148,7 @@ - + 31 @@ -1086,7 +1156,7 @@ - + 0x80000000 @@ -1094,7 +1164,7 @@ - + 1 @@ -1102,30 +1172,80 @@ - rtf:RGBXCHNUMS + rtf:unused5 + + + + + + + + + + - 9 + - + + + + + + + 4 + + + + + + + + 30 + + + + + + + + 0x40000000 + + + + + + + + 1 + + + + + + + + rtf:unused6 + + - + - + - + @@ -1136,7 +1256,7 @@ - 15 + 4 @@ -1144,7 +1264,7 @@ - + 29 @@ -1152,7 +1272,7 @@ - + 0x20000000 @@ -1160,7 +1280,7 @@ - + 1 @@ -1168,14 +1288,14 @@ - rtf:IXCHFOLLOW + rtf:unused7 - + @@ -1183,7 +1303,7 @@ - + @@ -1194,7 +1314,7 @@ - 16 + 4 @@ -1202,7 +1322,7 @@ - + 28 @@ -1210,7 +1330,7 @@ - + 0x0000000 @@ -1218,7 +1338,7 @@ - + 1 @@ -1226,14 +1346,14 @@ - rtf:DXASPACE + rtf:unused8 - + @@ -1241,7 +1361,7 @@ - + @@ -1252,7 +1372,7 @@ - 20 + 4 @@ -1260,7 +1380,7 @@ - + 27 @@ -1268,7 +1388,7 @@ - + 0x8000000 @@ -1276,7 +1396,7 @@ - + 1 @@ -1284,14 +1404,14 @@ - rtf:DXAINDENT + rtf:unused9 - + @@ -1299,7 +1419,7 @@ - + @@ -1310,7 +1430,7 @@ - 24 + 4 @@ -1318,7 +1438,7 @@ - + 26 @@ -1326,7 +1446,7 @@ - + 0x4000000 @@ -1334,7 +1454,7 @@ - + 1 @@ -1342,14 +1462,14 @@ - rtf:CBGRPPRLCHPX + rtf:unused10 - + @@ -1357,7 +1477,7 @@ - + @@ -1368,7 +1488,7 @@ - 25 + 4 @@ -1376,7 +1496,7 @@ - + 25 @@ -1384,7 +1504,7 @@ - + 0x2000000 @@ -1392,7 +1512,7 @@ - + 1 @@ -1400,14 +1520,14 @@ - rtf:CBGRPPRLPAPX + rtf:fSplAllDone - + @@ -1415,7 +1535,7 @@ - + @@ -1426,7 +1546,7 @@ - 26 + 4 @@ -1434,7 +1554,7 @@ - + 24 @@ -1442,7 +1562,7 @@ - + 0x000000 @@ -1450,7 +1570,7 @@ - + 1 @@ -1458,14 +1578,14 @@ - rtf:ilvlRestartLim + rtf:fSplAllClean - + @@ -1473,7 +1593,7 @@ - + @@ -1484,7 +1604,7 @@ - 27 + 4 @@ -1492,7 +1612,7 @@ - + 23 @@ -1500,7 +1620,7 @@ - + 0x800000 @@ -1508,7 +1628,7 @@ - + 1 @@ -1516,14 +1636,14 @@ - rtf:grfhic + rtf:fSplHideErrors - + @@ -1531,77 +1651,123 @@ - + - rtf:xst + - + - - - - - - - + + + 4 + + + + + + + + 22 + + + + + + + + 0x400000 + + + + + + + + 1 + + + + + + + + rtf:fGramHideErrors + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - 28 - - - - - - + - rtf:LISTLEVEL + - + - - - - - - - + + + 4 + + + + + + + + 21 + + + + + + + + 0x200000 + + + + + + + + 1 + + + + + + + + rtf:fLabelDoc + + + + + + + + - + - + - + @@ -1612,7 +1778,7 @@ - 0 + 4 @@ -1620,7 +1786,7 @@ - + 20 @@ -1628,7 +1794,7 @@ - + 0x00000 @@ -1636,7 +1802,7 @@ - + 1 @@ -1644,14 +1810,14 @@ - rtf:LSID + rtf:fHyphCapitals - + @@ -1659,7 +1825,7 @@ - + @@ -1678,7 +1844,7 @@ - + 19 @@ -1686,15 +1852,73 @@ - + 0x80000 + + + 1 + + + + + + + + rtf:fAutoHyphen + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + 18 + + + + + + + + 0x40000 + + + + + + + + 1 @@ -1702,14 +1926,14 @@ - rtf:TPLC + rtf:fFormNoFields - + @@ -1717,7 +1941,7 @@ - + @@ -1736,7 +1960,7 @@ - 31 + 17 @@ -1744,7 +1968,7 @@ - 0x80000000 + 0x20000 @@ -1760,7 +1984,7 @@ - rtf:fBuildIn + rtf:fLinkStyles @@ -1775,7 +1999,7 @@ - + @@ -1802,7 +2026,7 @@ - 0x7fff0000 + 0x0000 @@ -1810,7 +2034,7 @@ - 15 + 1 @@ -1818,7 +2042,7 @@ - rtf:ilgpdM1 + rtf:fRevMarking @@ -1833,7 +2057,7 @@ - + @@ -1852,7 +2076,7 @@ - 0 + 15 @@ -1860,7 +2084,7 @@ - 0xffff + 0x8000 @@ -1868,7 +2092,7 @@ - 16 + 1 @@ -1876,7 +2100,7 @@ - rtf:lid + rtf:unused11 @@ -1891,7 +2115,7 @@ - + @@ -1910,7 +2134,7 @@ - 0 + 14 @@ -1918,7 +2142,7 @@ - 0x7fffffff + 0x4000 @@ -1926,7 +2150,7 @@ - 31 + 1 @@ -1934,7 +2158,7 @@ - rtf:random + rtf:fExactCWords @@ -1949,7 +2173,7 @@ - + @@ -1960,7 +2184,7 @@ - 8 + 4 @@ -1968,7 +2192,7 @@ - + 13 @@ -1976,7 +2200,7 @@ - + 0x2000 @@ -1984,7 +2208,7 @@ - + 1 @@ -1992,30 +2216,22 @@ - rtf:RGISTD + rtf:fPagHidden - - - 9 - - - - - - + - + - + @@ -2026,7 +2242,7 @@ - 14 + 4 @@ -2034,7 +2250,7 @@ - 7 + 12 @@ -2042,7 +2258,7 @@ - 0x80 + 0x000 @@ -2058,14 +2274,14 @@ - rtf:FSIMPLELIST + rtf:fPagResults - + @@ -2073,7 +2289,7 @@ - + @@ -2084,7 +2300,7 @@ - 14 + 4 @@ -2092,7 +2308,7 @@ - 5 + 11 @@ -2100,7 +2316,7 @@ - 0x20 + 0x800 @@ -2116,14 +2332,14 @@ - rtf:fAutoNum + rtf:fLockAtn - + @@ -2131,7 +2347,7 @@ - + @@ -2142,7 +2358,7 @@ - 14 + 4 @@ -2150,7 +2366,7 @@ - 3 + 10 @@ -2158,7 +2374,7 @@ - 0x8 + 0x400 @@ -2174,14 +2390,14 @@ - rtf:fHybrid + rtf:fMirrorMargins - + @@ -2189,7 +2405,7 @@ - + @@ -2200,7 +2416,7 @@ - 14 + 4 @@ -2208,7 +2424,7 @@ - 0 + 9 @@ -2216,7 +2432,7 @@ - 0x7 + 0x200 @@ -2224,7 +2440,7 @@ - 3 + 1 @@ -2232,14 +2448,14 @@ - rtf:reserved1 + rtf:fWord97Compat - + @@ -2247,7 +2463,7 @@ - + @@ -2258,7 +2474,7 @@ - 27 + 4 @@ -2266,7 +2482,7 @@ - + 8 @@ -2274,7 +2490,7 @@ - + 0x00 @@ -2282,7 +2498,7 @@ - + 1 @@ -2290,78 +2506,25 @@ - rtf:grfhic + rtf:unused12 - + - - - - - - - - - - - - - - - - - - - - - rtf:LISTTABLE - - - - - - - - - - - - - - - - - - - - - - - - - - 8 - - - - - - + - start-at value if fFormatting == false and fStartAt == true. - (if fFormatting == true, the start-at is stored in the LVL) + @@ -2369,7 +2532,7 @@ - 0x0 + 4 @@ -2377,7 +2540,7 @@ - 0 + 7 @@ -2385,7 +2548,7 @@ - + 0x80 @@ -2393,7 +2556,7 @@ - 4 + 1 @@ -2401,14 +2564,14 @@ - rtf:ISTARTAT + rtf:unused13 - + @@ -2416,10 +2579,10 @@ - + - the level to be overridden + @@ -2427,7 +2590,7 @@ - 0x4 + 4 @@ -2435,7 +2598,7 @@ - 0 + 6 @@ -2443,7 +2606,7 @@ - 0x0F + 0x40 @@ -2451,7 +2614,7 @@ - :4 + 1 @@ -2459,14 +2622,14 @@ - rtf:ILVL + rtf:fProtEnabled - + @@ -2474,10 +2637,10 @@ - + - true if the start-at value is overridden + @@ -2485,7 +2648,7 @@ - 0x4 + 4 @@ -2493,7 +2656,7 @@ - 4 + 5 @@ -2501,7 +2664,7 @@ - 0x10 + 0x20 @@ -2509,7 +2672,7 @@ - :1 + 1 @@ -2517,14 +2680,14 @@ - rtf:FSTARTAT + rtf:fDispFormFldSel - + @@ -2532,11 +2695,10 @@ - + - true if the formatting is overriden (in which case the LFOLVL - should contain a pointer to a LVL) + @@ -2544,7 +2706,7 @@ - 0x4 + 4 @@ -2552,7 +2714,7 @@ - 5 + 4 @@ -2560,7 +2722,7 @@ - 0x20 + 0x0 @@ -2568,7 +2730,7 @@ - :1 + 1 @@ -2576,14 +2738,14 @@ - rtf:FFORMATTING + rtf:fRMView - + @@ -2591,10 +2753,10 @@ - + - reserved + @@ -2602,7 +2764,7 @@ - 0x4 + 4 @@ -2610,7 +2772,7 @@ - 6 + 3 @@ -2618,7 +2780,7 @@ - 0xC0 + 0x8 @@ -2626,7 +2788,7 @@ - :2 + 1 @@ -2634,14 +2796,14 @@ - rtf:UNSIGNED4_6 + rtf:fRMPrint - + @@ -2649,10 +2811,10 @@ - + - reserved + @@ -2660,7 +2822,7 @@ - 0x5 + 4 @@ -2668,7 +2830,7 @@ - 0 + 2 @@ -2676,7 +2838,7 @@ - + 0x4 @@ -2684,7 +2846,7 @@ - 3 + 1 @@ -2692,56 +2854,22 @@ - rtf:RESERVED + rtf:fLockVbaProj - - - 3 - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - 15 - - - - - - + @@ -2752,7 +2880,7 @@ - 0 + 4 @@ -2760,7 +2888,7 @@ - + 1 @@ -2768,7 +2896,7 @@ - + 0x2 @@ -2776,7 +2904,7 @@ - + 1 @@ -2784,14 +2912,14 @@ - rtf:lsid + rtf:fLockRev - + @@ -2799,7 +2927,7 @@ - + @@ -2810,7 +2938,7 @@ - 12 + 4 @@ -2818,7 +2946,7 @@ - + 0 @@ -2826,7 +2954,7 @@ - + 0x1 @@ -2834,7 +2962,7 @@ - + 1 @@ -2842,14 +2970,14 @@ - rtf:clfolvl + rtf:fEmbedFonts - + @@ -2857,7 +2985,7 @@ - + @@ -2868,7 +2996,7 @@ - 13 + 8 @@ -2900,14 +3028,14 @@ - rtf:ibstFltAutoNum + rtf:copts60 - + @@ -2915,7 +3043,7 @@ - + @@ -2926,7 +3054,7 @@ - 14 + 10 @@ -2958,14 +3086,14 @@ - rtf:grfhic + rtf:dxaTab - + @@ -2973,75 +3101,7 @@ - - - - rtf:LFOData - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rtf:SttbRgtplc - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - + @@ -3052,7 +3112,7 @@ - 0 + 12 @@ -3084,177 +3144,83 @@ - rtf:cp + rtf:cpgWebOpt - + - - - - - - - - - - - - - - - - - - - - - rtf:LFOTABLE - - - - - - - - - - - - - - - - - - - - - - - - - - rtf:FONTTABLE - - - - - - - - - - - - - - - - - - - - - - - - - - 40 - - - - - - + - rtf:F + - + - - - - - - - - - - - - - rtf:ALTFONTNAME + 14 - + - - - - - - - - - - - - - rtf:XSZFFN + - + - - - - - - - - - - - zero terminated string that records name of font. Possibly - followed by a second xsz which records the name of an alternate - font to use if the first named font does not exist on this system. - Maximal size of xszFfn is 65 characters. + - + + + + + + + + + + + + rtf:dxaHotZ + + + + + + + + - - + + + + - total length of FFN - 1. + @@ -3262,7 +3228,7 @@ - 0x0 + 16 @@ -3270,7 +3236,7 @@ - 0 + @@ -3294,14 +3260,14 @@ - rtf:CBFFNM1 + rtf:cConsecHypLim - + @@ -3309,10 +3275,10 @@ - + - pitch request + @@ -3320,7 +3286,7 @@ - 0x1 + 18 @@ -3328,7 +3294,7 @@ - 0 + @@ -3336,7 +3302,7 @@ - 03 + @@ -3344,7 +3310,7 @@ - :2 + @@ -3352,14 +3318,14 @@ - rtf:PRQ + rtf:wSpare2 - + @@ -3367,10 +3333,10 @@ - + - when 1, font is a TrueType font + @@ -3378,7 +3344,7 @@ - 0x1 + 20 @@ -3386,7 +3352,7 @@ - 2 + @@ -3394,7 +3360,7 @@ - 04 + @@ -3402,7 +3368,7 @@ - :1 + @@ -3410,14 +3376,14 @@ - rtf:FTRUETYPE + rtf:dttmCreated - + @@ -3425,10 +3391,10 @@ - + - reserved + @@ -3436,7 +3402,7 @@ - 0x1 + 24 @@ -3444,7 +3410,7 @@ - 3 + @@ -3452,7 +3418,7 @@ - 08 + @@ -3460,7 +3426,7 @@ - :1 + @@ -3468,14 +3434,14 @@ - rtf:UNUSED1_3 + rtf:dttmRevised - + @@ -3483,10 +3449,10 @@ - + - font family id + @@ -3494,7 +3460,7 @@ - 0x1 + 28 @@ -3502,7 +3468,7 @@ - 4 + @@ -3510,7 +3476,7 @@ - 70 + @@ -3518,7 +3484,7 @@ - :3 + @@ -3526,14 +3492,14 @@ - rtf:FF + rtf:dttmLastPrint - + @@ -3541,10 +3507,10 @@ - + - reserved + @@ -3552,7 +3518,7 @@ - 0x1 + 32 @@ -3560,7 +3526,7 @@ - 7 + @@ -3568,7 +3534,7 @@ - 80 + @@ -3576,7 +3542,7 @@ - :1 + @@ -3584,14 +3550,14 @@ - rtf:UNUSED1_7 + rtf:nRevision - + @@ -3599,10 +3565,10 @@ - + - base weight of font + @@ -3610,7 +3576,7 @@ - 0x2 + 34 @@ -3618,7 +3584,7 @@ - 0 + @@ -3642,14 +3608,14 @@ - rtf:WWEIGHT + rtf:tmEdited - + @@ -3657,10 +3623,10 @@ - + - character set identifier + @@ -3668,7 +3634,7 @@ - 0x4 + 38 @@ -3676,7 +3642,7 @@ - 0 + @@ -3700,14 +3666,14 @@ - rtf:CHS + rtf:cWords - + @@ -3715,10 +3681,10 @@ - + - index into ffn.szFfn to the name of the alternate font + @@ -3726,7 +3692,7 @@ - 0x5 + 42 @@ -3734,7 +3700,7 @@ - 0 + @@ -3758,14 +3724,14 @@ - rtf:IXCHSZALT + rtf:cCh - + @@ -3773,10 +3739,10 @@ - + - ? This is supposed to be of type PANOSE. + @@ -3784,7 +3750,7 @@ - 0x6 + 46 @@ -3792,7 +3758,7 @@ - 0 + @@ -3816,33 +3782,83 @@ - rtf:PANOSE + rtf:cPg + + + + + + + + + + - 10 + - + + + + + + + 48 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:cParas + + - + - + - + - ? This is supposed to be of type FONTSIGNATURE. + @@ -3850,7 +3866,7 @@ - 0x10 + 52 @@ -3858,7 +3874,7 @@ - 0 + 30 @@ -3866,7 +3882,7 @@ - + 0xc0000000 @@ -3874,7 +3890,7 @@ - + 2 @@ -3882,54 +3898,83 @@ - rtf:FS + rtf:rncEdn + + + + + + + + + + - 24 + - + + + + + + + 52 + + + + + + + + 16 + + + + + + + + 0x3fff0000 + + + + + + + + 14 + + + + + + + + rtf: + + - + - + - - - - - - - - - - - - - - - - - - - - - - + - invariant style identifier + @@ -3937,7 +3982,7 @@ - 0x2 + 52 @@ -3945,7 +3990,7 @@ - 0 + 14 @@ -3953,7 +3998,7 @@ - 0FFF + 0xc000 @@ -3961,7 +4006,7 @@ - :12 + 2 @@ -3969,14 +4014,14 @@ - rtf:STI + rtf: - + @@ -3984,11 +4029,10 @@ - + - spare field for any temporary use, always reset back to - zero! + @@ -3996,7 +4040,7 @@ - 0x2 + 52 @@ -4004,7 +4048,7 @@ - 12 + 10 @@ -4012,7 +4056,7 @@ - 1000 + 0x3c00 @@ -4020,7 +4064,7 @@ - :1 + 4 @@ -4028,14 +4072,14 @@ - rtf:FSCRATCH + rtf:unused14 - + @@ -4043,10 +4087,10 @@ - + - PHEs of all text with this style are wrong + @@ -4054,7 +4098,7 @@ - 0x2 + 52 @@ -4062,7 +4106,7 @@ - 13 + 6 @@ -4070,7 +4114,7 @@ - 2000 + 0x3c0 @@ -4078,7 +4122,7 @@ - :1 + 4 @@ -4086,14 +4130,14 @@ - rtf:FINVALHEIGHT + rtf:unused15 - + @@ -4101,10 +4145,10 @@ - + - UPEs have been generated + @@ -4112,7 +4156,7 @@ - 0x2 + 52 @@ -4120,7 +4164,7 @@ - 14 + 5 @@ -4128,7 +4172,7 @@ - 4000 + 0x20 @@ -4136,7 +4180,7 @@ - :1 + 1 @@ -4144,14 +4188,14 @@ - rtf:FHASUPE + rtf:fPrintFormData - + @@ -4159,11 +4203,10 @@ - + - std has been mass-copied; if unused at save time, style should - be deleted + @@ -4171,7 +4214,7 @@ - 0x2 + 52 @@ -4179,7 +4222,7 @@ - 15 + 4 @@ -4187,7 +4230,7 @@ - 8000 + 0x0 @@ -4195,7 +4238,7 @@ - :1 + 1 @@ -4203,14 +4246,14 @@ - rtf:FMASSCOPY + rtf:fSaveFormData - + @@ -4218,10 +4261,10 @@ - + - style type code + @@ -4229,7 +4272,7 @@ - 0x4 + 52 @@ -4237,7 +4280,7 @@ - 0 + 3 @@ -4245,7 +4288,7 @@ - 000F + 0x8 @@ -4253,7 +4296,7 @@ - :4 + 1 @@ -4261,14 +4304,14 @@ - rtf:SGC + rtf:fShadeFormData - + @@ -4276,10 +4319,10 @@ - + - base style + @@ -4287,7 +4330,7 @@ - 0x4 + 52 @@ -4295,7 +4338,7 @@ - 4 + 2 @@ -4303,7 +4346,7 @@ - FFF0 + 0x4 @@ -4311,7 +4354,7 @@ - :12 + 1 @@ -4319,14 +4362,14 @@ - rtf:ISTDBASE + rtf:fShadeMergeFields - + @@ -4334,10 +4377,10 @@ - + - # of UPXs (and UPEs) + @@ -4345,7 +4388,7 @@ - 0x6 + 52 @@ -4353,7 +4396,7 @@ - 0 + 1 @@ -4361,7 +4404,7 @@ - 000F + 0x2 @@ -4369,7 +4412,7 @@ - :4 + 1 @@ -4377,14 +4420,14 @@ - rtf:CUPX + rtf:reserved2 - + @@ -4392,10 +4435,10 @@ - + - next style + @@ -4403,7 +4446,7 @@ - 0x6 + 52 @@ -4411,7 +4454,7 @@ - 4 + 0 @@ -4419,7 +4462,7 @@ - FFF0 + 0x1 @@ -4427,7 +4470,7 @@ - :12 + 1 @@ -4435,14 +4478,14 @@ - rtf:ISTDNEXT + rtf:fIncludeSubdocsInStats - + @@ -4450,10 +4493,10 @@ - + - offset to end of upx's, start of upe's + @@ -4461,7 +4504,7 @@ - 0x8 + 56 @@ -4469,7 +4512,7 @@ - 0 + @@ -4493,14 +4536,14 @@ - rtf:BCHUPE + rtf:cLines - + @@ -4508,10 +4551,10 @@ - + - auto redefine style when appropriate + @@ -4519,7 +4562,7 @@ - 0xa + 60 @@ -4527,7 +4570,7 @@ - 0 + @@ -4535,7 +4578,7 @@ - 0001 + @@ -4543,7 +4586,7 @@ - :1 + @@ -4551,14 +4594,14 @@ - rtf:FAUTOREDEF + rtf:cWordsWithSubdocs - + @@ -4566,10 +4609,10 @@ - + - hidden from UI? + @@ -4577,7 +4620,7 @@ - 0xa + 64 @@ -4585,7 +4628,7 @@ - 1 + @@ -4593,7 +4636,7 @@ - 0002 + @@ -4601,7 +4644,7 @@ - :1 + @@ -4609,14 +4652,14 @@ - rtf:FHIDDEN + rtf:cChWithSubdocs - + @@ -4624,10 +4667,10 @@ - + - unused bits + @@ -4635,7 +4678,7 @@ - 0xa + 68 @@ -4643,7 +4686,7 @@ - 2 + @@ -4651,7 +4694,7 @@ - FFFC + @@ -4659,7 +4702,7 @@ - :14 + @@ -4667,7 +4710,7 @@ - rtf:UNUSED8_3 + rtf:cPgWithSubdocs @@ -4682,113 +4725,68 @@ - + - rtf:XSTZNAME + - + - - - - - - - - - - - - - rtf:XSTZNAME1 + 70 - + - - - - - - - - - - - - - rtf:UPXSTART + - + - - - - - - - - - - - - - - - - rtf:UPX + - + - - - - - - - + + + + + + + + + + + rtf:cParasWithSubdocs + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - + - Size of style sheet info + @@ -4796,7 +4794,7 @@ - 0x0 + 74 @@ -4804,7 +4802,7 @@ - 0 + @@ -4828,23 +4826,25 @@ - rtf:CSTD + rtf:cLinesWithSubdocs - + - + + + - Count of styles in stylesheet + @@ -4852,7 +4852,7 @@ - 0x2 + 78 @@ -4860,7 +4860,7 @@ - 0 + @@ -4884,14 +4884,14 @@ - rtf:CSTD + rtf:lKeyProtDoc - + @@ -4899,10 +4899,10 @@ - + - Length of STD Base as stored in a file + @@ -4910,7 +4910,7 @@ - 0x4 + 82 @@ -4918,7 +4918,7 @@ - 0 + 13 @@ -4926,7 +4926,7 @@ - + 0xe000 @@ -4934,7 +4934,7 @@ - + 3 @@ -4942,7 +4942,7 @@ - rtf:CBSTDBASEINFILE + rtf:wvkoSaved @@ -4957,10 +4957,10 @@ - + - Are built-in stylenames stored? + @@ -4968,7 +4968,7 @@ - 0x6 + 82 @@ -4976,7 +4976,7 @@ - 0 + 4 @@ -4984,7 +4984,7 @@ - 0001 + 0x1ff0 @@ -4992,7 +4992,7 @@ - :1 + 9 @@ -5000,7 +5000,7 @@ - rtf:FSTDSTYLENAMESWRITTEN + rtf:pctWwdSaved @@ -5015,10 +5015,10 @@ - + - Spare flags + @@ -5026,7 +5026,7 @@ - 0x6 + 82 @@ -5034,7 +5034,7 @@ - 1 + 2 @@ -5042,7 +5042,7 @@ - FFFE + 0xc @@ -5050,7 +5050,7 @@ - :15 + 2 @@ -5058,7 +5058,7 @@ - rtf:UNUSED4_2 + rtf:zkSaved @@ -5073,10 +5073,10 @@ - + - Max sti known when this file was written + @@ -5084,7 +5084,7 @@ - 0x8 + 82 @@ -5092,7 +5092,7 @@ - 0 + 1 @@ -5100,7 +5100,7 @@ - + 0x2 @@ -5108,7 +5108,7 @@ - + 1 @@ -5116,7 +5116,7 @@ - rtf:STIMAXWHENSAVED + rtf:unused16 @@ -5131,10 +5131,10 @@ - + - How many fixed-index istds are there? + @@ -5142,7 +5142,7 @@ - 0xA + 82 @@ -5158,7 +5158,7 @@ - + 0x1 @@ -5166,7 +5166,7 @@ - + 1 @@ -5174,7 +5174,7 @@ - rtf:ISTDMAXFIXEDWHENSAVED + rtf:iGutterPos @@ -5188,11 +5188,37 @@ + + + + + + + + + + + + + + + + + + + + + 28 + + + + + - + - Current version of built-in stylenames + @@ -5200,7 +5226,7 @@ - 0xC + 0 @@ -5208,7 +5234,7 @@ - 0 + @@ -5232,14 +5258,14 @@ - rtf:NVERBUILTINNAMESWHENSAVED + rtf:ISTARTAT - + @@ -5247,10 +5273,10 @@ - + - ftc used by StandardChpStsh for this document + @@ -5258,7 +5284,7 @@ - 0xE + 4 @@ -5266,7 +5292,7 @@ - 0 + @@ -5290,67 +5316,25 @@ - rtf:RGFTCSTANDARDCHPSTSH + rtf:NFC - - - 3 - - - - - - + - + - - - rtf:STYLESHEET - - - - - - - - - - - - - - - - - - - - - - - - - - 898 - - - - - - + - (fibh) FIBH Beginning of the FIB header magic number + @@ -5358,7 +5342,7 @@ - 0x0000 + 5 @@ -5366,7 +5350,7 @@ - 0 + 6 @@ -5374,7 +5358,7 @@ - + 0xc0 @@ -5382,7 +5366,7 @@ - + 2 @@ -5390,14 +5374,14 @@ - rtf:WIDENT + rtf:JC - + @@ -5405,11 +5389,10 @@ - + - FIB version written. This will be >= 101 for all Word 6.0 - for Windows and after documents. + @@ -5417,7 +5400,7 @@ - 0x0002 + 5 @@ -5425,7 +5408,7 @@ - 0 + 5 @@ -5433,7 +5416,7 @@ - + 0x20 @@ -5441,7 +5424,7 @@ - + 1 @@ -5449,14 +5432,14 @@ - rtf:NFIB + rtf:FLEGAL - + @@ -5464,10 +5447,10 @@ - + - product version written by + @@ -5475,7 +5458,7 @@ - 0x0004 + 5 @@ -5483,7 +5466,7 @@ - 0 + 4 @@ -5491,7 +5474,7 @@ - + 0x0 @@ -5499,7 +5482,7 @@ - + 1 @@ -5507,14 +5490,14 @@ - rtf:NPRODUCT + rtf:FNORESTART - + @@ -5522,12 +5505,10 @@ - + - language stamp -- localized version - In pre-WinWord 2.0 files this value was the nLocale. If value is - < 999, then it is the nLocale, otherwise it is the lid. + @@ -5535,7 +5516,7 @@ - 0x0006 + 5 @@ -5543,7 +5524,7 @@ - 0 + 3 @@ -5551,7 +5532,7 @@ - + 0x8 @@ -5559,7 +5540,7 @@ - + 1 @@ -5567,14 +5548,14 @@ - rtf:LID + rtf:FIDENTSAV - + @@ -5582,7 +5563,7 @@ - + @@ -5593,7 +5574,7 @@ - 0x0008 + 5 @@ -5601,7 +5582,7 @@ - 0 + 2 @@ -5609,7 +5590,7 @@ - + 0x4 @@ -5617,7 +5598,7 @@ - + 1 @@ -5625,14 +5606,14 @@ - rtf:PNNEXT + rtf:FCONVERTED - + @@ -5640,10 +5621,10 @@ - + - Set if this document is a template + @@ -5651,7 +5632,7 @@ - 0x000A + 5 @@ -5667,7 +5648,7 @@ - 0001 + 0x1 @@ -5675,7 +5656,7 @@ - :1 + 1 @@ -5683,14 +5664,14 @@ - rtf:FDOT + rtf:FTENTATIVE - + @@ -5698,10 +5679,10 @@ - + - Set if this document is a glossary + @@ -5709,7 +5690,7 @@ - 0x000A + 6 @@ -5717,7 +5698,7 @@ - 1 + @@ -5725,7 +5706,7 @@ - 0002 + @@ -5733,7 +5714,7 @@ - :1 + @@ -5741,25 +5722,33 @@ - rtf:FGLSY + rtf:RGBXCHNUMS + + + 9 + + + + + - + - + - + - when 1, file is in complex, fast-saved format. + @@ -5767,7 +5756,7 @@ - 0x000A + 15 @@ -5775,7 +5764,7 @@ - 2 + @@ -5783,7 +5772,7 @@ - 0004 + @@ -5791,7 +5780,7 @@ - :1 + @@ -5799,14 +5788,14 @@ - rtf:FCOMPLEX + rtf:IXCHFOLLOW - + @@ -5814,10 +5803,10 @@ - + - set if file contains 1 or more pictures + @@ -5825,7 +5814,7 @@ - 0x000A + 16 @@ -5833,7 +5822,7 @@ - 3 + @@ -5841,7 +5830,7 @@ - 0008 + @@ -5849,7 +5838,7 @@ - :1 + @@ -5857,14 +5846,14 @@ - rtf:FHASPIC + rtf:DXASPACE - + @@ -5872,10 +5861,10 @@ - + - count of times file was quicksaved + @@ -5883,7 +5872,7 @@ - 0x000A + 20 @@ -5891,7 +5880,7 @@ - 4 + @@ -5899,7 +5888,7 @@ - 00F0 + @@ -5907,7 +5896,7 @@ - :4 + @@ -5915,14 +5904,14 @@ - rtf:CQUICKSAVES + rtf:DXAINDENT - + @@ -5930,10 +5919,10 @@ - + - Set if file is encrypted + @@ -5941,7 +5930,7 @@ - 0x000A + 24 @@ -5949,7 +5938,7 @@ - 8 + @@ -5957,7 +5946,7 @@ - 0100 + @@ -5965,7 +5954,7 @@ - :1 + @@ -5973,14 +5962,14 @@ - rtf:FENCRYPTED + rtf:CBGRPPRLCHPX - + @@ -5988,15 +5977,10 @@ - + - When 0, this fib refers to the table stream named "0Table", - when 1, this fib refers to the table stream named "1Table". - Normally, a file will have only one table stream, but under unusual - circumstances a file may have table streams with both names. In - that case, this flag must be used to decide which table stream is - valid. + @@ -6004,7 +5988,7 @@ - 0x000A + 25 @@ -6012,7 +5996,7 @@ - 9 + @@ -6020,7 +6004,7 @@ - 0200 + @@ -6028,7 +6012,7 @@ - :1 + @@ -6036,14 +6020,14 @@ - rtf:FWHICHTBLSTM + rtf:CBGRPPRLPAPX - + @@ -6051,10 +6035,10 @@ - + - Set when user has recommended that file be read read-only + @@ -6062,7 +6046,7 @@ - 0x000A + 26 @@ -6070,7 +6054,7 @@ - 10 + @@ -6078,7 +6062,7 @@ - 0400 + @@ -6086,7 +6070,7 @@ - :1 + @@ -6094,14 +6078,14 @@ - rtf:FREADONLYRECOMMENDED + rtf:ilvlRestartLim - + @@ -6109,10 +6093,10 @@ - + - Set when file owner has made the file write reserved + @@ -6120,7 +6104,7 @@ - 0x000A + 27 @@ -6128,7 +6112,7 @@ - 11 + @@ -6136,7 +6120,7 @@ - 0800 + @@ -6144,7 +6128,7 @@ - :1 + @@ -6152,14 +6136,14 @@ - rtf:FWRITERESERVATION + rtf:grfhic - + @@ -6167,10 +6151,80 @@ - + - Set when using extended character set in file + rtf:xst + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 28 + + + + + + + + + + rtf:LISTLEVEL + + + + + + + + + + + + + + + + + + + + + + @@ -6178,7 +6232,7 @@ - 0x000A + 0 @@ -6186,7 +6240,7 @@ - 12 + @@ -6194,7 +6248,7 @@ - 1000 + @@ -6202,7 +6256,7 @@ - :1 + @@ -6210,14 +6264,14 @@ - rtf:FEXTCHAR + rtf:LSID - + @@ -6225,10 +6279,10 @@ - + - REVIEW + @@ -6236,7 +6290,7 @@ - 0x000A + 4 @@ -6244,7 +6298,7 @@ - 13 + @@ -6252,7 +6306,7 @@ - 2000 + @@ -6260,7 +6314,7 @@ - :1 + @@ -6268,14 +6322,14 @@ - rtf:FLOADOVERRIDE + rtf:TPLC - + @@ -6283,10 +6337,10 @@ - + - REVIEW + @@ -6294,7 +6348,7 @@ - 0x000A + 4 @@ -6302,7 +6356,7 @@ - 14 + 31 @@ -6310,7 +6364,7 @@ - 4000 + 0x80000000 @@ -6318,7 +6372,7 @@ - :1 + 1 @@ -6326,14 +6380,14 @@ - rtf:FFAREAST + rtf:fBuildIn - + @@ -6341,10 +6395,10 @@ - + - REVIEW + @@ -6352,7 +6406,7 @@ - 0x000A + 4 @@ -6360,7 +6414,7 @@ - 15 + 16 @@ -6368,7 +6422,7 @@ - 8000 + 0x7fff0000 @@ -6376,7 +6430,7 @@ - :1 + 15 @@ -6384,14 +6438,14 @@ - rtf:FCRYPTO + rtf:ilgpdM1 - + @@ -6399,11 +6453,10 @@ - + - This file format it compatible with readers that understand - nFib at or above this value. + @@ -6411,7 +6464,7 @@ - 0x000C + 4 @@ -6427,7 +6480,7 @@ - + 0xffff @@ -6435,7 +6488,7 @@ - + 16 @@ -6443,14 +6496,14 @@ - rtf:NFIBBACK + rtf:lid - + @@ -6458,10 +6511,10 @@ - + - File encrypted key, only valid if fEncrypted. + @@ -6469,7 +6522,7 @@ - 0x000E + 4 @@ -6485,7 +6538,7 @@ - + 0x7fffffff @@ -6493,7 +6546,7 @@ - + 31 @@ -6501,7 +6554,7 @@ - rtf:LKEY + rtf:random @@ -6516,12 +6569,10 @@ - + - environment in which file was created - 0 created by Win Word - 1 created by Mac Word + @@ -6529,7 +6580,7 @@ - 0x0012 + 8 @@ -6537,7 +6588,7 @@ - 0 + @@ -6561,25 +6612,33 @@ - rtf:ENVR + rtf:RGISTD + + + 9 + + + + + - + - + - + - when 1, this file was last saved in the Mac environment + @@ -6587,7 +6646,7 @@ - 0x0013 + 14 @@ -6595,7 +6654,7 @@ - 0 + 7 @@ -6603,7 +6662,7 @@ - 01 + 0x80 @@ -6611,7 +6670,7 @@ - :1 + 1 @@ -6619,7 +6678,7 @@ - rtf:FMAC + rtf:FSIMPLELIST @@ -6634,7 +6693,7 @@ - + @@ -6645,7 +6704,7 @@ - 0x0013 + 14 @@ -6653,7 +6712,7 @@ - 1 + 5 @@ -6661,7 +6720,7 @@ - 02 + 0x20 @@ -6669,7 +6728,7 @@ - :1 + 1 @@ -6677,7 +6736,7 @@ - rtf:FEMPTYSPECIAL + rtf:fAutoNum @@ -6692,7 +6751,7 @@ - + @@ -6703,7 +6762,7 @@ - 0x0013 + 14 @@ -6711,7 +6770,7 @@ - 2 + 3 @@ -6719,7 +6778,7 @@ - 04 + 0x8 @@ -6727,7 +6786,7 @@ - :1 + 1 @@ -6735,7 +6794,7 @@ - rtf:FLOADOVERRIDEPAGE + rtf:fHybrid @@ -6750,7 +6809,7 @@ - + @@ -6761,7 +6820,7 @@ - 0x0013 + 14 @@ -6769,7 +6828,7 @@ - 3 + 0 @@ -6777,7 +6836,7 @@ - 08 + 0x7 @@ -6785,7 +6844,7 @@ - :1 + 3 @@ -6793,7 +6852,7 @@ - rtf:FFUTURESAVEDUNDO + rtf:reserved1 @@ -6808,7 +6867,7 @@ - + @@ -6819,7 +6878,7 @@ - 0x0013 + 27 @@ -6827,7 +6886,7 @@ - 4 + @@ -6835,7 +6894,7 @@ - 10 + @@ -6843,7 +6902,7 @@ - :1 + @@ -6851,7 +6910,7 @@ - rtf:FWORD97SAVED + rtf:grfhic @@ -6865,11 +6924,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + rtf:LISTTABLE + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + + + + + - + + + + start-at value if fFormatting == false and fStartAt == true. + (if fFormatting == true, the start-at is stored in the LVL) + + + + + + + + 0x0 + + + + + + + + 0 + + + + + + + + + + + + + 4 + + + + + + + + rtf:ISTARTAT + + + + + + + + + + + + + + + + + + the level to be overridden @@ -6877,7 +7050,7 @@ - 0x0013 + 0x4 @@ -6885,7 +7058,7 @@ - 5 + 0 @@ -6893,7 +7066,7 @@ - FE + 0x0F @@ -6901,7 +7074,7 @@ - :3 + :4 @@ -6909,7 +7082,7 @@ - rtf:FSPARE0 + rtf:ILVL @@ -6924,15 +7097,10 @@ - + - Default extended character set id for text in document stream. - (overridden by chp.chse) - 0 by default characters in doc stream should be interpreted using - the ANSI character set used by Windows - 256 characters in doc stream should be interpreted using the - Macintosh character set. + true if the start-at value is overridden @@ -6940,7 +7108,7 @@ - 0x0014 + 0x4 @@ -6948,7 +7116,7 @@ - 0 + 4 @@ -6956,7 +7124,7 @@ - + 0x10 @@ -6964,7 +7132,7 @@ - + :1 @@ -6972,14 +7140,14 @@ - rtf:CHS + rtf:FSTARTAT - + @@ -6987,15 +7155,11 @@ - + - Default extended character set id for text in internal data - structures - 0 by default characters stored in internal data structures should - be interpreted using the ANSI character set used by Windows - 256 characters stored in internal data structures should be - interpreted using the Macintosh character set. + true if the formatting is overriden (in which case the LFOLVL + should contain a pointer to a LVL) @@ -7003,7 +7167,7 @@ - 0x0016 + 0x4 @@ -7011,7 +7175,7 @@ - 0 + 5 @@ -7019,7 +7183,7 @@ - + 0x20 @@ -7027,7 +7191,7 @@ - + :1 @@ -7035,14 +7199,14 @@ - rtf:CHSTABLES + rtf:FFORMATTING - + @@ -7050,13 +7214,10 @@ - + - file offset of first character of text. In non-complex - files a CP can be transformed into an FC by the - following transformation: - fc = cp + fib.fcMin. + reserved @@ -7064,7 +7225,7 @@ - 0x0018 + 0x4 @@ -7072,7 +7233,7 @@ - 0 + 6 @@ -7080,7 +7241,7 @@ - + 0xC0 @@ -7088,7 +7249,7 @@ - + :2 @@ -7096,14 +7257,14 @@ - rtf:FCMIN + rtf:UNSIGNED4_6 - + @@ -7111,11 +7272,10 @@ - + - file offset of last character of text in document text stream + - 1 + reserved @@ -7123,7 +7283,7 @@ - 0x001C + 0x5 @@ -7147,7 +7307,7 @@ - + 3 @@ -7155,25 +7315,59 @@ - rtf:FCMAC + rtf:RESERVED + + + 3 + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + 15 + + + + + - + - Count of fields in the array of "shorts" + @@ -7181,7 +7375,7 @@ - 0x0020 + 0 @@ -7189,7 +7383,7 @@ - 0 + @@ -7213,14 +7407,14 @@ - rtf:CSW + rtf:lsid - + @@ -7228,13 +7422,10 @@ - + - [Beginning of the array of shorts, rgls] - Unique number Identifying the File's creator 6A62 is the creator ID - for Word and is reserved. Other creators should choose a different - value. + @@ -7242,7 +7433,7 @@ - 0x0022 + 12 @@ -7250,7 +7441,7 @@ - 0 + @@ -7274,14 +7465,14 @@ - rtf:WMAGICCREATED + rtf:clfolvl - + @@ -7289,10 +7480,10 @@ - + - identifies the File's last modifier + @@ -7300,7 +7491,7 @@ - 0x0024 + 13 @@ -7308,7 +7499,7 @@ - 0 + @@ -7332,14 +7523,14 @@ - rtf:WMAGICREVISED + rtf:ibstFltAutoNum - + @@ -7347,10 +7538,10 @@ - + - private data + @@ -7358,7 +7549,7 @@ - 0x0026 + 14 @@ -7366,7 +7557,7 @@ - 0 + @@ -7390,14 +7581,14 @@ - rtf:WMAGICCREATEDPRIVATE + rtf:grfhic - + @@ -7405,10 +7596,78 @@ - + - private data + rtf:LFOData + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:SttbRgtplc + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + + + @@ -7416,7 +7675,7 @@ - 0x0028 + 0 @@ -7424,7 +7683,7 @@ - 0 + @@ -7448,83 +7707,183 @@ - rtf:WMAGICREVISEDPRIVATE + rtf:cp - + + + + + + + + + + + + + + + + + + + + + + + + + rtf:LFOTABLE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:FONTTABLE + + + + + + + + + + + + + + + + + + + + + + + + + + 40 + + + + + - - - - not used - - - - - - - - 0x002A - - - - - + - 0 + rtf:F - + + + + + + + + + + + + + - + rtf:ALTFONTNAME - + + + + + + + + + + + + + - + rtf:XSZFFN - + + + + + + + + + + + - rtf:PNFBPCHPFIRST_W6 + zero terminated string that records name of font. Possibly + followed by a second xsz which records the name of an alternate + font to use if the first named font does not exist on this system. + Maximal size of xszFfn is 65 characters. - + - - - - - - - + + - not used + total length of FFN - 1. @@ -7532,7 +7891,7 @@ - 0x002C + 0x0 @@ -7564,14 +7923,14 @@ - rtf:PNCHPFIRST_W6 + rtf:CBFFNM1 - + @@ -7579,10 +7938,10 @@ - + - not used + pitch request @@ -7590,7 +7949,7 @@ - 0x002E + 0x1 @@ -7606,7 +7965,7 @@ - + 03 @@ -7614,7 +7973,7 @@ - + :2 @@ -7622,14 +7981,14 @@ - rtf:CPNBTECHP_W6 + rtf:PRQ - + @@ -7637,10 +7996,10 @@ - + - not used + when 1, font is a TrueType font @@ -7648,7 +8007,7 @@ - 0x0030 + 0x1 @@ -7656,7 +8015,7 @@ - 0 + 2 @@ -7664,7 +8023,7 @@ - + 04 @@ -7672,7 +8031,7 @@ - + :1 @@ -7680,14 +8039,14 @@ - rtf:PNFBPPAPFIRST_W6 + rtf:FTRUETYPE - + @@ -7695,10 +8054,10 @@ - + - not used + reserved @@ -7706,7 +8065,7 @@ - 0x0032 + 0x1 @@ -7714,7 +8073,7 @@ - 0 + 3 @@ -7722,7 +8081,7 @@ - + 08 @@ -7730,7 +8089,7 @@ - + :1 @@ -7738,14 +8097,14 @@ - rtf:PNPAPFIRST_W6 + rtf:UNUSED1_3 - + @@ -7753,10 +8112,10 @@ - + - not used + font family id @@ -7764,7 +8123,7 @@ - 0x0034 + 0x1 @@ -7772,7 +8131,7 @@ - 0 + 4 @@ -7780,7 +8139,7 @@ - + 70 @@ -7788,7 +8147,7 @@ - + :3 @@ -7796,14 +8155,14 @@ - rtf:CPNBTEPAP_W6 + rtf:FF - + @@ -7811,10 +8170,10 @@ - + - not used + reserved @@ -7822,7 +8181,7 @@ - 0x0036 + 0x1 @@ -7830,7 +8189,7 @@ - 0 + 7 @@ -7838,7 +8197,7 @@ - + 80 @@ -7846,7 +8205,7 @@ - + :1 @@ -7854,14 +8213,14 @@ - rtf:PNFBPLVCFIRST_W6 + rtf:UNUSED1_7 - + @@ -7869,10 +8228,10 @@ - + - not used + base weight of font @@ -7880,7 +8239,7 @@ - 0x0038 + 0x2 @@ -7912,14 +8271,14 @@ - rtf:PNLVCFIRST_W6 + rtf:WWEIGHT - + @@ -7927,10 +8286,10 @@ - + - not used + character set identifier @@ -7938,7 +8297,7 @@ - 0x003A + 0x4 @@ -7970,14 +8329,14 @@ - rtf:CPNBTELVC_W6 + rtf:CHS - + @@ -7985,11 +8344,10 @@ - + - Language id if document was written by Far East version of Word - (i.e. FIB.fFarEast is on) + index into ffn.szFfn to the name of the alternate font @@ -7997,7 +8355,7 @@ - 0x003C + 0x5 @@ -8029,14 +8387,14 @@ - rtf:LIDFE + rtf:IXCHSZALT - + @@ -8044,10 +8402,10 @@ - + - Number of fields in the array of longs + ? This is supposed to be of type PANOSE. @@ -8055,7 +8413,7 @@ - 0x003E + 0x6 @@ -8087,85 +8445,33 @@ - rtf:CLW + rtf:PANOSE - - - - - - - - - - - - - [Beginning of the array of longs, rglw] - file offset of last byte written to file + 1. - - - - - - - - 0x0040 - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - rtf:CBMAC + 10 - + - + - + - + - contains the build date of the creator. 10695 indicates the - creator program was compiled on Jan 6, 1995 + ? This is supposed to be of type FONTSIGNATURE. @@ -8173,7 +8479,7 @@ - 0x0044 + 0x10 @@ -8205,83 +8511,54 @@ - rtf:LPRODUCTCREATED + rtf:FS - - - - - - - - - - - - - contains the build date of the File's last modifier - - - - - - - - 0x0048 - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - rtf:LPRODUCTREVISED + 24 - + - + - + + + + + + + + + + + + + + + + + + + + + + - + - length of main document text stream + invariant style identifier @@ -8289,7 +8566,7 @@ - 0x004C + 0x2 @@ -8305,7 +8582,7 @@ - + 0FFF @@ -8313,7 +8590,7 @@ - + :12 @@ -8321,14 +8598,14 @@ - rtf:CCPTEXT + rtf:STI - + @@ -8336,10 +8613,11 @@ - + - length of footnote subdocument text stream + spare field for any temporary use, always reset back to + zero! @@ -8347,7 +8625,7 @@ - 0x0050 + 0x2 @@ -8355,7 +8633,7 @@ - 0 + 12 @@ -8363,7 +8641,7 @@ - + 1000 @@ -8371,7 +8649,7 @@ - + :1 @@ -8379,14 +8657,14 @@ - rtf:CCPFTN + rtf:FSCRATCH - + @@ -8394,10 +8672,10 @@ - + - length of header subdocument text stream + PHEs of all text with this style are wrong @@ -8405,7 +8683,7 @@ - 0x0054 + 0x2 @@ -8413,7 +8691,7 @@ - 0 + 13 @@ -8421,7 +8699,7 @@ - + 2000 @@ -8429,7 +8707,7 @@ - + :1 @@ -8437,14 +8715,14 @@ - rtf:CCPHDD + rtf:FINVALHEIGHT - + @@ -8452,11 +8730,10 @@ - + - length of macro subdocument text stream, which should now - always be 0. + UPEs have been generated @@ -8464,7 +8741,7 @@ - 0x0058 + 0x2 @@ -8472,7 +8749,7 @@ - 0 + 14 @@ -8480,7 +8757,7 @@ - + 4000 @@ -8488,7 +8765,7 @@ - + :1 @@ -8496,14 +8773,14 @@ - rtf:CCPMCR + rtf:FHASUPE - + @@ -8511,10 +8788,11 @@ - + - length of annotation subdocument text stream + std has been mass-copied; if unused at save time, style should + be deleted @@ -8522,7 +8800,7 @@ - 0x005C + 0x2 @@ -8530,7 +8808,7 @@ - 0 + 15 @@ -8538,7 +8816,7 @@ - + 8000 @@ -8546,7 +8824,7 @@ - + :1 @@ -8554,14 +8832,14 @@ - rtf:CCPATN + rtf:FMASSCOPY - + @@ -8569,10 +8847,10 @@ - + - length of endnote subdocument text stream + style type code @@ -8580,7 +8858,7 @@ - 0x0060 + 0x4 @@ -8596,7 +8874,7 @@ - + 000F @@ -8604,7 +8882,7 @@ - + :4 @@ -8612,14 +8890,14 @@ - rtf:CCPEDN + rtf:SGC - + @@ -8627,10 +8905,10 @@ - + - length of textbox subdocument text stream + base style @@ -8638,7 +8916,7 @@ - 0x0064 + 0x4 @@ -8646,7 +8924,7 @@ - 0 + 4 @@ -8654,7 +8932,7 @@ - + FFF0 @@ -8662,7 +8940,7 @@ - + :12 @@ -8670,14 +8948,14 @@ - rtf:CCPTXBX + rtf:ISTDBASE - + @@ -8685,10 +8963,10 @@ - + - length of header textbox subdocument text stream. + # of UPXs (and UPEs) @@ -8696,7 +8974,7 @@ - 0x0068 + 0x6 @@ -8712,7 +8990,7 @@ - + 000F @@ -8720,7 +8998,7 @@ - + :4 @@ -8728,14 +9006,14 @@ - rtf:CCPHDRTXBX + rtf:CUPX - + @@ -8743,12 +9021,10 @@ - + - when there was insufficient memory for Word to expand the - plcfbte at save time, the plcfbte is written to the file in a - linked list of 512-byte pieces starting with this pn + next style @@ -8756,7 +9032,7 @@ - 0x006C + 0x6 @@ -8764,7 +9040,7 @@ - 0 + 4 @@ -8772,7 +9048,7 @@ - + FFF0 @@ -8780,7 +9056,7 @@ - + :12 @@ -8788,14 +9064,14 @@ - rtf:PNFBPCHPFIRST + rtf:ISTDNEXT - + @@ -8803,11 +9079,10 @@ - + - the page number of the lowest numbered page in the document - that records CHPX FKP information + offset to end of upx's, start of upe's @@ -8815,7 +9090,7 @@ - 0x0070 + 0x8 @@ -8847,14 +9122,14 @@ - rtf:PNCHPFIRST + rtf:BCHUPE - + @@ -8862,12 +9137,10 @@ - + - count of CHPX FKPs recorded in file. In non-complex files if - the number of entries in the plcfbteChpx is less than this, the - plcfbteChpx is incomplete. + auto redefine style when appropriate @@ -8875,7 +9148,7 @@ - 0x0074 + 0xa @@ -8891,7 +9164,7 @@ - + 0001 @@ -8899,7 +9172,7 @@ - + :1 @@ -8907,14 +9180,14 @@ - rtf:CPNBTECHP + rtf:FAUTOREDEF - + @@ -8922,12 +9195,10 @@ - + - when there was insufficient memory for Word to expand the - plcfbte at save time, the plcfbte is written to the file in a - linked list of 512-byte pieces starting with this pn + hidden from UI? @@ -8935,7 +9206,7 @@ - 0x0078 + 0xa @@ -8943,7 +9214,7 @@ - 0 + 1 @@ -8951,7 +9222,7 @@ - + 0002 @@ -8959,7 +9230,7 @@ - + :1 @@ -8967,14 +9238,14 @@ - rtf:PNFBPPAPFIRST + rtf:FHIDDEN - + @@ -8982,11 +9253,10 @@ - + - the page number of the lowest numbered page in the document - that records PAPX FKP information + unused bits @@ -8994,7 +9264,7 @@ - 0x007C + 0xa @@ -9002,7 +9272,7 @@ - 0 + 2 @@ -9010,7 +9280,7 @@ - + FFFC @@ -9018,7 +9288,7 @@ - + :14 @@ -9026,14 +9296,14 @@ - rtf:PNPAPFIRST + rtf:UNUSED8_3 - + @@ -9041,72 +9311,119 @@ - - - - count of PAPX FKPs recorded in file. In non-complex files if - the number of entries in the plcfbtePapx is less than this, the - plcfbtePapx is incomplete. - - - - - - - - 0x0080 - - - - - + - 0 + rtf:XSTZNAME - + + + + + + + + + + + + + - + rtf:XSTZNAME1 - + + + + + + + + + + + + + - + rtf:UPXSTART - + + + + + + + + + + + + + + + + - rtf:CPNBTEPAP + rtf:UPX - + - - - + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + - + + + + - when there was insufficient memory for Word to expand the - plcfbte at save time, the plcfbte is written to the file in a - linked list of 512-byte pieces starting with this pn + Size of style sheet info @@ -9114,7 +9431,7 @@ - 0x0084 + 0x0 @@ -9146,26 +9463,23 @@ - rtf:PNFBPLVCFIRST + rtf:CSTD - + - - - + - the page number of the lowest numbered page in the document - that records LVC FKP information + Count of styles in stylesheet @@ -9173,7 +9487,7 @@ - 0x0088 + 0x2 @@ -9205,14 +9519,14 @@ - rtf:PNLVCFIRST + rtf:CSTD - + @@ -9220,12 +9534,10 @@ - + - count of LVC FKPs recorded in file. In non-complex files if the - number of entries in the plcfbtePapx is less than this, the - plcfbtePapx is incomplete. + Length of STD Base as stored in a file @@ -9233,7 +9545,7 @@ - 0x008C + 0x4 @@ -9265,14 +9577,14 @@ - rtf:CPNBTELVC + rtf:CBSTDBASEINFILE - + @@ -9280,10 +9592,10 @@ - + - + Are built-in stylenames stored? @@ -9291,7 +9603,7 @@ - 0x0090 + 0x6 @@ -9307,7 +9619,7 @@ - + 0001 @@ -9315,7 +9627,7 @@ - + :1 @@ -9323,14 +9635,14 @@ - rtf:FCISLANDFIRST + rtf:FSTDSTYLENAMESWRITTEN - + @@ -9338,10 +9650,10 @@ - + - + Spare flags @@ -9349,7 +9661,7 @@ - 0x0094 + 0x6 @@ -9357,7 +9669,7 @@ - 0 + 1 @@ -9365,7 +9677,7 @@ - + FFFE @@ -9373,7 +9685,7 @@ - + :15 @@ -9381,14 +9693,14 @@ - rtf:FCISLANDLIM + rtf:UNUSED4_2 - + @@ -9396,10 +9708,10 @@ - + - Number of fields in the array of FC/LCB pairs. + Max sti known when this file was written @@ -9407,7 +9719,7 @@ - 0x0098 + 0x8 @@ -9439,7 +9751,7 @@ - rtf:CFCLCB + rtf:STIMAXWHENSAVED @@ -9454,13 +9766,10 @@ - + - [Beginning of array of FC/LCB pairs, rgfclcb] - file offset of original allocation for STSH in table stream. During - fast save Word will attempt to reuse this allocation if STSH is - small enough to fit. + How many fixed-index istds are there? @@ -9468,7 +9777,7 @@ - 0x009A + 0xA @@ -9500,14 +9809,14 @@ - rtf:FCSTSHFORIG + rtf:ISTDMAXFIXEDWHENSAVED - + @@ -9515,10 +9824,10 @@ - + - count of bytes of original STSH allocation + Current version of built-in stylenames @@ -9526,7 +9835,7 @@ - 0x009E + 0xC @@ -9558,14 +9867,14 @@ - rtf:LCBSTSHFORIG + rtf:NVERBUILTINNAMESWHENSAVED - + @@ -9573,10 +9882,10 @@ - + - offset of STSH in table stream. + ftc used by StandardChpStsh for this document @@ -9584,7 +9893,7 @@ - 0x00A2 + 0xE @@ -9616,25 +9925,67 @@ - rtf:FCSTSHF + rtf:RGFTCSTANDARDCHPSTSH + + + 3 + + + + + - + - + + + + rtf:STYLESHEET + + + + + + + + + + + + + + + + + + + + + + + + + + 898 + + + + + - + - count of bytes of current STSH allocation + (fibh) FIBH Beginning of the FIB header magic number @@ -9642,7 +9993,7 @@ - 0x00A6 + 0x0000 @@ -9674,14 +10025,14 @@ - rtf:LCBSTSHF + rtf:WIDENT - + @@ -9689,12 +10040,11 @@ - + - offset in table stream of footnote reference PLCF of FRD - structures. CPs in PLC are relative to main document text stream - and give location of footnote references. + FIB version written. This will be >= 101 for all Word 6.0 + for Windows and after documents. @@ -9702,7 +10052,7 @@ - 0x00AA + 0x0002 @@ -9734,14 +10084,14 @@ - rtf:FCPLCFFNDREF + rtf:NFIB - + @@ -9749,11 +10099,10 @@ - + - count of bytes of footnote reference PLC== 0 if no footnotes - defined in document. + product version written by @@ -9761,7 +10110,7 @@ - 0x00AE + 0x0004 @@ -9793,14 +10142,14 @@ - rtf:LCBPLCFFNDREF + rtf:NPRODUCT - + @@ -9808,15 +10157,12 @@ - + - offset in table stream of footnote text PLC. CPs in PLC are - relative to footnote subdocument text stream and give location of - beginnings of footnote text for corresponding references recorded - in plcffndRef. No structure is stored in this plc. There will just - be n+1 FC entries in this PLC when there are n - footnotes + language stamp -- localized version + In pre-WinWord 2.0 files this value was the nLocale. If value is + < 999, then it is the nLocale, otherwise it is the lid. @@ -9824,7 +10170,7 @@ - 0x00B2 + 0x0006 @@ -9856,14 +10202,14 @@ - rtf:FCPLCFFNDTXT + rtf:LID - + @@ -9871,11 +10217,10 @@ - + - count of bytes of footnote text PLC. == 0 if no footnotes - defined in document + @@ -9883,7 +10228,7 @@ - 0x00B6 + 0x0008 @@ -9915,14 +10260,14 @@ - rtf:LCBPLCFFNDTXT + rtf:PNNEXT - + @@ -9930,12 +10275,10 @@ - + - offset in table stream of annotation reference ATRD PLC. The - CPs recorded in this PLC give the offset of annotation references - in the main document. + Set if this document is a template @@ -9943,7 +10286,7 @@ - 0x00BA + 0x000A @@ -9959,7 +10302,7 @@ - + 0001 @@ -9967,7 +10310,7 @@ - + :1 @@ -9975,14 +10318,14 @@ - rtf:FCPLCFANDREF + rtf:FDOT - + @@ -9990,10 +10333,10 @@ - + - count of bytes of annotation reference PLC. + Set if this document is a glossary @@ -10001,7 +10344,7 @@ - 0x00BE + 0x000A @@ -10009,7 +10352,7 @@ - 0 + 1 @@ -10017,7 +10360,7 @@ - + 0002 @@ -10025,7 +10368,7 @@ - + :1 @@ -10033,14 +10376,14 @@ - rtf:LCBPLCFANDREF + rtf:FGLSY - + @@ -10048,15 +10391,10 @@ - + - offset in table stream of annotation text PLC. The Cps recorded - in this PLC give the offset of the annotation text in the - annotation sub document corresponding to the references stored in - the plcfandRef. There is a 1 to 1 correspondence between entries - recorded in the plcfandTxt and the plcfandRef. No structure is - stored in this PLC. + when 1, file is in complex, fast-saved format. @@ -10064,7 +10402,7 @@ - 0x00C2 + 0x000A @@ -10072,7 +10410,7 @@ - 0 + 2 @@ -10080,7 +10418,7 @@ - + 0004 @@ -10088,7 +10426,7 @@ - + :1 @@ -10096,14 +10434,14 @@ - rtf:FCPLCFANDTXT + rtf:FCOMPLEX - + @@ -10111,10 +10449,10 @@ - + - count of bytes of the annotation text PLC + set if file contains 1 or more pictures @@ -10122,7 +10460,7 @@ - 0x00C6 + 0x000A @@ -10130,7 +10468,7 @@ - 0 + 3 @@ -10138,7 +10476,7 @@ - + 0008 @@ -10146,7 +10484,7 @@ - + :1 @@ -10154,14 +10492,14 @@ - rtf:LCBPLCFANDTXT + rtf:FHASPIC - + @@ -10169,11 +10507,10 @@ - + - offset in table stream of section descriptor SED PLC. CPs in - PLC are relative to main document. + count of times file was quicksaved @@ -10181,7 +10518,7 @@ - 0x00CA + 0x000A @@ -10189,7 +10526,7 @@ - 0 + 4 @@ -10197,7 +10534,7 @@ - + 00F0 @@ -10205,7 +10542,7 @@ - + :4 @@ -10213,14 +10550,14 @@ - rtf:FCPLCFSED + rtf:CQUICKSAVES - + @@ -10228,10 +10565,10 @@ - + - count of bytes of section descriptor PLC. + Set if file is encrypted @@ -10239,7 +10576,7 @@ - 0x00CE + 0x000A @@ -10247,7 +10584,7 @@ - 0 + 8 @@ -10255,7 +10592,7 @@ - + 0100 @@ -10263,7 +10600,7 @@ - + :1 @@ -10271,14 +10608,14 @@ - rtf:LCBPLCFSED + rtf:FENCRYPTED - + @@ -10286,10 +10623,15 @@ - + - no longer used + When 0, this fib refers to the table stream named "0Table", + when 1, this fib refers to the table stream named "1Table". + Normally, a file will have only one table stream, but under unusual + circumstances a file may have table streams with both names. In + that case, this flag must be used to decide which table stream is + valid. @@ -10297,7 +10639,7 @@ - 0x00D2 + 0x000A @@ -10305,7 +10647,7 @@ - 0 + 9 @@ -10313,7 +10655,7 @@ - + 0200 @@ -10321,7 +10663,7 @@ - + :1 @@ -10329,14 +10671,14 @@ - rtf:FCPLCFPAD + rtf:FWHICHTBLSTM - + @@ -10344,10 +10686,10 @@ - + - no longer used + Set when user has recommended that file be read read-only @@ -10355,7 +10697,7 @@ - 0x00D6 + 0x000A @@ -10363,7 +10705,7 @@ - 0 + 10 @@ -10371,7 +10713,7 @@ - + 0400 @@ -10379,7 +10721,7 @@ - + :1 @@ -10387,14 +10729,14 @@ - rtf:LCBPLCFPAD + rtf:FREADONLYRECOMMENDED - + @@ -10402,13 +10744,10 @@ - + - offset in table stream of PHE PLC of paragraph heights. CPs in - PLC are relative to main document text stream. Only written for - files in complex format. Should not be written by third - party creators of Word files. + Set when file owner has made the file write reserved @@ -10416,7 +10755,7 @@ - 0x00DA + 0x000A @@ -10424,7 +10763,7 @@ - 0 + 11 @@ -10432,7 +10771,7 @@ - + 0800 @@ -10440,7 +10779,7 @@ - + :1 @@ -10448,14 +10787,14 @@ - rtf:FCPLCFPHE + rtf:FWRITERESERVATION - + @@ -10463,11 +10802,10 @@ - + - count of bytes of paragraph height PLC. ==0 when file is - non-complex. + Set when using extended character set in file @@ -10475,7 +10813,7 @@ - 0x00DE + 0x000A @@ -10483,7 +10821,7 @@ - 0 + 12 @@ -10491,7 +10829,7 @@ - + 1000 @@ -10499,7 +10837,7 @@ - + :1 @@ -10507,14 +10845,14 @@ - rtf:LCBPLCFPHE + rtf:FEXTCHAR - + @@ -10522,12 +10860,10 @@ - + - offset in table stream of glossary string table. This table - consists of Pascal style strings (strings stored prefixed with a - length byte) concatenated one after another. + REVIEW @@ -10535,7 +10871,7 @@ - 0x00E2 + 0x000A @@ -10543,7 +10879,7 @@ - 0 + 13 @@ -10551,7 +10887,7 @@ - + 2000 @@ -10559,7 +10895,7 @@ - + :1 @@ -10567,14 +10903,14 @@ - rtf:FCSTTBFGLSY + rtf:FLOADOVERRIDE - + @@ -10582,11 +10918,10 @@ - + - count of bytes of glossary string table. == 0 for non-glossary - documents.!=0 for glossary documents. + REVIEW @@ -10594,7 +10929,7 @@ - 0x00E6 + 0x000A @@ -10602,7 +10937,7 @@ - 0 + 14 @@ -10610,7 +10945,7 @@ - + 4000 @@ -10618,7 +10953,7 @@ - + :1 @@ -10626,14 +10961,14 @@ - rtf:LCBSTTBFGLSY + rtf:FFAREAST - + @@ -10641,14 +10976,10 @@ - + - offset in table stream of glossary PLC. CPs in PLC are relative - to main document and mark the beginnings of glossary entries and - are in 1-1 correspondence with entries of sttbfglsy. No structure - is stored in this PLC. There will be n+1 FC entries - in this PLC when there are n glossary entries. + REVIEW @@ -10656,7 +10987,7 @@ - 0x00EA + 0x000A @@ -10664,7 +10995,7 @@ - 0 + 15 @@ -10672,7 +11003,7 @@ - + 8000 @@ -10680,7 +11011,7 @@ - + :1 @@ -10688,14 +11019,14 @@ - rtf:FCPLCFGLSY + rtf:FCRYPTO - + @@ -10703,11 +11034,11 @@ - + - count of bytes of glossary PLC.== 0 for non-glossary - documents.!=0 for glossary documents. + This file format it compatible with readers that understand + nFib at or above this value. @@ -10715,7 +11046,7 @@ - 0x00EE + 0x000C @@ -10747,14 +11078,14 @@ - rtf:LCBPLCFGLSY + rtf:NFIBBACK - + @@ -10762,14 +11093,10 @@ - + - byte offset in table stream of header HDD PLC. CPs are relative - to header subdocument and mark the beginnings of individual headers - in the header subdocument. No structure is stored in this PLC. - There will be n+1FC entries in this PLC when there are - n headers stored for the document. + File encrypted key, only valid if fEncrypted. @@ -10777,7 +11104,7 @@ - 0x00F2 + 0x000E @@ -10809,7 +11136,7 @@ - rtf:FCPLCFHDD + rtf:LKEY @@ -10824,11 +11151,12 @@ - + - count of bytes of header PLC. - == 0 if document contains no headers + environment in which file was created + 0 created by Win Word + 1 created by Mac Word @@ -10836,7 +11164,7 @@ - 0x00F6 + 0x0012 @@ -10868,14 +11196,14 @@ - rtf:LCBPLCFHDD + rtf:ENVR - + @@ -10883,12 +11211,10 @@ - + - offset in table stream of character property bin table.PLC. FCs - in PLC are file offsets in the main stream. Describes text of main - document and all subdocuments. + when 1, this file was last saved in the Mac environment @@ -10896,7 +11222,7 @@ - 0x00FA + 0x0013 @@ -10912,7 +11238,7 @@ - + 01 @@ -10920,7 +11246,7 @@ - + :1 @@ -10928,14 +11254,14 @@ - rtf:FCPLCFBTECHPX + rtf:FMAC - + @@ -10943,10 +11269,10 @@ - + - count of bytes of character property bin table PLC. + @@ -10954,7 +11280,7 @@ - 0x00FE + 0x0013 @@ -10962,7 +11288,7 @@ - 0 + 1 @@ -10970,7 +11296,7 @@ - + 02 @@ -10978,7 +11304,7 @@ - + :1 @@ -10986,14 +11312,14 @@ - rtf:LCBPLCFBTECHPX + rtf:FEMPTYSPECIAL - + @@ -11001,12 +11327,10 @@ - + - offset in table stream of paragraph property bin table.PLC. FCs - in PLC are file offsets in the main stream. Describes text of main - document and all subdocuments. + @@ -11014,7 +11338,7 @@ - 0x0102 + 0x0013 @@ -11022,7 +11346,7 @@ - 0 + 2 @@ -11030,7 +11354,7 @@ - + 04 @@ -11038,7 +11362,7 @@ - + :1 @@ -11046,14 +11370,14 @@ - rtf:FCPLCFBTEPAPX + rtf:FLOADOVERRIDEPAGE - + @@ -11061,10 +11385,10 @@ - + - count of bytes of paragraph property bin table PLC + @@ -11072,7 +11396,7 @@ - 0x0106 + 0x0013 @@ -11080,7 +11404,7 @@ - 0 + 3 @@ -11088,7 +11412,7 @@ - + 08 @@ -11096,7 +11420,7 @@ - + :1 @@ -11104,14 +11428,14 @@ - rtf:LCBPLCFBTEPAPX + rtf:FFUTURESAVEDUNDO - + @@ -11119,11 +11443,10 @@ - + - offset in table stream of PLC reserved for private use. The - SEA is 6 bytes long. + @@ -11131,7 +11454,7 @@ - 0x010A + 0x0013 @@ -11139,7 +11462,7 @@ - 0 + 4 @@ -11147,7 +11470,7 @@ - + 10 @@ -11155,7 +11478,7 @@ - + :1 @@ -11163,14 +11486,14 @@ - rtf:FCPLCFSEA + rtf:FWORD97SAVED - + @@ -11178,10 +11501,10 @@ - + - count of bytes of private use PLC. + @@ -11189,7 +11512,7 @@ - 0x010E + 0x0013 @@ -11197,7 +11520,7 @@ - 0 + 5 @@ -11205,7 +11528,7 @@ - + FE @@ -11213,7 +11536,7 @@ - + :3 @@ -11221,14 +11544,14 @@ - rtf:LCBPLCFSEA + rtf:FSPARE0 - + @@ -11236,14 +11559,15 @@ - + - offset in table stream of font information STTBF. The sttbfffn - is a STTBF where is string is actually an FFN structure. The - nth entry in the STTBF describes the font that will be - displayed when the chp.ftc for text is equal to n. See the - FFN file structure definition. + Default extended character set id for text in document stream. + (overridden by chp.chse) + 0 by default characters in doc stream should be interpreted using + the ANSI character set used by Windows + 256 characters in doc stream should be interpreted using the + Macintosh character set. @@ -11251,7 +11575,7 @@ - 0x0112 + 0x0014 @@ -11283,14 +11607,14 @@ - rtf:FCSTTBFFFN + rtf:CHS - + @@ -11298,10 +11622,15 @@ - + - count of bytes in sttbfffn. + Default extended character set id for text in internal data + structures + 0 by default characters stored in internal data structures should + be interpreted using the ANSI character set used by Windows + 256 characters stored in internal data structures should be + interpreted using the Macintosh character set. @@ -11309,7 +11638,7 @@ - 0x0116 + 0x0016 @@ -11341,14 +11670,14 @@ - rtf:LCBSTTBFFFN + rtf:CHSTABLES - + @@ -11356,14 +11685,13 @@ - + - offset in table stream to the FLD PLC of field positions in the - main document. The CPs point to the beginning CP of a field, the CP - of field separator character inside a field and the ending CP of - the field. A field may be nested within another field. 20 levels of - field nesting are allowed. + file offset of first character of text. In non-complex + files a CP can be transformed into an FC by the + following transformation: + fc = cp + fib.fcMin. @@ -11371,7 +11699,7 @@ - 0x011A + 0x0018 @@ -11403,7 +11731,7 @@ - rtf:FCPLCFFLDMOM + rtf:FCMIN @@ -11418,10 +11746,11 @@ - + - count of bytes in plcffldMom + file offset of last character of text in document text stream + + 1 @@ -11429,7 +11758,7 @@ - 0x011E + 0x001C @@ -11461,7 +11790,7 @@ - rtf:LCBPLCFFLDMOM + rtf:FCMAC @@ -11476,11 +11805,10 @@ - + - offset in table stream to the FLD PLC of field positions in the - header subdocument. + Count of fields in the array of "shorts" @@ -11488,7 +11816,7 @@ - 0x0122 + 0x0020 @@ -11520,14 +11848,14 @@ - rtf:FCPLCFFLDHDR + rtf:CSW - + @@ -11535,10 +11863,13 @@ - + - count of bytes in plcffldHdr + [Beginning of the array of shorts, rgls] + Unique number Identifying the File's creator 6A62 is the creator ID + for Word and is reserved. Other creators should choose a different + value. @@ -11546,7 +11877,7 @@ - 0x0126 + 0x0022 @@ -11578,14 +11909,14 @@ - rtf:LCBPLCFFLDHDR + rtf:WMAGICCREATED - + @@ -11593,11 +11924,10 @@ - + - offset in table stream to the FLD PLC of field positions in the - footnote subdocument. + identifies the File's last modifier @@ -11605,7 +11935,7 @@ - 0x012A + 0x0024 @@ -11637,14 +11967,14 @@ - rtf:FCPLCFFLDFTN + rtf:WMAGICREVISED - + @@ -11652,10 +11982,10 @@ - + - count of bytes in plcffldFtn + private data @@ -11663,7 +11993,7 @@ - 0x012E + 0x0026 @@ -11695,14 +12025,14 @@ - rtf:LCBPLCFFLDFTN + rtf:WMAGICCREATEDPRIVATE - + @@ -11710,11 +12040,10 @@ - + - offset in table stream to the FLD PLC of field positions in the - annotation subdocument. + private data @@ -11722,7 +12051,7 @@ - 0x0132 + 0x0028 @@ -11754,14 +12083,14 @@ - rtf:FCPLCFFLDATN + rtf:WMAGICREVISEDPRIVATE - + @@ -11769,10 +12098,10 @@ - + - count of bytes in plcffldAtn + not used @@ -11780,7 +12109,7 @@ - 0x0136 + 0x002A @@ -11812,14 +12141,14 @@ - rtf:LCBPLCFFLDATN + rtf:PNFBPCHPFIRST_W6 - + @@ -11827,10 +12156,10 @@ - + - no longer used + not used @@ -11838,7 +12167,7 @@ - 0x013A + 0x002C @@ -11870,14 +12199,14 @@ - rtf:FCPLCFFLDMCR + rtf:PNCHPFIRST_W6 - + @@ -11885,10 +12214,10 @@ - + - no longer used + not used @@ -11896,7 +12225,7 @@ - 0x013E + 0x002E @@ -11928,14 +12257,14 @@ - rtf:LCBPLCFFLDMCR + rtf:CPNBTECHP_W6 - + @@ -11943,11 +12272,10 @@ - + - offset in table stream of the STTBF that records bookmark names - in the main document + not used @@ -11955,7 +12283,7 @@ - 0x0142 + 0x0030 @@ -11987,14 +12315,14 @@ - rtf:FCSTTBFBKMK + rtf:PNFBPPAPFIRST_W6 - + @@ -12002,10 +12330,10 @@ - + - + not used @@ -12013,7 +12341,7 @@ - 0x0146 + 0x0032 @@ -12045,14 +12373,14 @@ - rtf:LCBSTTBFBKMK + rtf:PNPAPFIRST_W6 - + @@ -12060,12 +12388,10 @@ - + - offset in table stream of the PLCF that records the beginning - CP offsets of bookmarks in the main document. See BKF structure - definition + not used @@ -12073,7 +12399,7 @@ - 0x014A + 0x0034 @@ -12105,14 +12431,14 @@ - rtf:FCPLCFBKF + rtf:CPNBTEPAP_W6 - + @@ -12120,10 +12446,68 @@ - + + + + not used + + + + + + + + 0x0036 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:PNFBPLVCFIRST_W6 + + + + + + + + + + + + + + + + + + not used @@ -12131,7 +12515,7 @@ - 0x014E + 0x0038 @@ -12163,14 +12547,14 @@ - rtf:LCBPLCFBKF + rtf:PNLVCFIRST_W6 - + @@ -12178,12 +12562,10 @@ - + - offset in table stream of the PLCF that records the ending CP - offsets of bookmarks recorded in the main document. No structure is - stored in this PLCF. + not used @@ -12191,7 +12573,7 @@ - 0x0152 + 0x003A @@ -12223,14 +12605,14 @@ - rtf:FCPLCFBKL + rtf:CPNBTELVC_W6 - + @@ -12238,10 +12620,69 @@ - + + + + Language id if document was written by Far East version of Word + (i.e. FIB.fFarEast is on) + + + + + + + + 0x003C + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:LIDFE + + + + + + + + + + + + + + + + + + Number of fields in the array of longs @@ -12249,7 +12690,7 @@ - 0x0156 + 0x003E @@ -12281,14 +12722,14 @@ - rtf:LCBPLCFBKL + rtf:CLW - + @@ -12296,11 +12737,11 @@ - + - offset in table stream of the macro commands. These commands - are private and undocumented. + [Beginning of the array of longs, rglw] + file offset of last byte written to file + 1. @@ -12308,7 +12749,7 @@ - 0x015A + 0x0040 @@ -12340,7 +12781,7 @@ - rtf:FCCMDS + rtf:CBMAC @@ -12355,11 +12796,11 @@ - + - undocument size of undocument structure not documented - above + contains the build date of the creator. 10695 indicates the + creator program was compiled on Jan 6, 1995 @@ -12367,7 +12808,7 @@ - 0x015E + 0x0044 @@ -12399,7 +12840,7 @@ - rtf:LCBCMDS + rtf:LPRODUCTCREATED @@ -12414,10 +12855,10 @@ - + - no longer used + contains the build date of the File's last modifier @@ -12425,7 +12866,7 @@ - 0x0162 + 0x0048 @@ -12457,7 +12898,7 @@ - rtf:FCPLCMCR + rtf:LPRODUCTREVISED @@ -12472,10 +12913,10 @@ - + - + length of main document text stream @@ -12483,7 +12924,7 @@ - 0x0166 + 0x004C @@ -12515,7 +12956,7 @@ - rtf:LCBPLCMCR + rtf:CCPTEXT @@ -12530,10 +12971,10 @@ - + - no longer used + length of footnote subdocument text stream @@ -12541,7 +12982,7 @@ - 0x016A + 0x0050 @@ -12573,7 +13014,7 @@ - rtf:FCSTTBFMCR + rtf:CCPFTN @@ -12588,10 +13029,10 @@ - + - + length of header subdocument text stream @@ -12599,7 +13040,7 @@ - 0x016E + 0x0054 @@ -12631,7 +13072,7 @@ - rtf:LCBSTTBFMCR + rtf:CCPHDD @@ -12646,11 +13087,11 @@ - + - offset in table stream of the printer driver information (names - of drivers, port, etc.) + length of macro subdocument text stream, which should now + always be 0. @@ -12658,7 +13099,7 @@ - 0x0172 + 0x0058 @@ -12690,7 +13131,7 @@ - rtf:FCPRDRVR + rtf:CCPMCR @@ -12705,11 +13146,10 @@ - + - count of bytes of the printer driver information (names of - drivers, port, etc.) + length of annotation subdocument text stream @@ -12717,7 +13157,7 @@ - 0x0176 + 0x005C @@ -12749,7 +13189,7 @@ - rtf:LCBPRDRVR + rtf:CCPATN @@ -12764,11 +13204,10 @@ - + - offset in table stream of the print environment in portrait - mode. + length of endnote subdocument text stream @@ -12776,7 +13215,7 @@ - 0x017A + 0x0060 @@ -12808,7 +13247,7 @@ - rtf:FCPRENVPORT + rtf:CCPEDN @@ -12823,10 +13262,10 @@ - + - count of bytes of the print environment in portrait mode. + length of textbox subdocument text stream @@ -12834,7 +13273,7 @@ - 0x017E + 0x0064 @@ -12866,7 +13305,7 @@ - rtf:LCBPRENVPORT + rtf:CCPTXBX @@ -12881,11 +13320,10 @@ - + - offset in table stream of the print environment in landscape - mode. + length of header textbox subdocument text stream. @@ -12893,7 +13331,7 @@ - 0x0182 + 0x0068 @@ -12925,7 +13363,7 @@ - rtf:FCPRENVLAND + rtf:CCPHDRTXBX @@ -12940,10 +13378,12 @@ - + - count of bytes of the print environment in landscape mode. + when there was insufficient memory for Word to expand the + plcfbte at save time, the plcfbte is written to the file in a + linked list of 512-byte pieces starting with this pn @@ -12951,7 +13391,7 @@ - 0x0186 + 0x006C @@ -12983,7 +13423,7 @@ - rtf:LCBPRENVLAND + rtf:PNFBPCHPFIRST @@ -12998,13 +13438,11 @@ - + - offset in table stream of Window Save - State data structure. WSS contains dimensions of - document's main text window and the last selection made by Word - user. + the page number of the lowest numbered page in the document + that records CHPX FKP information @@ -13012,7 +13450,7 @@ - 0x018A + 0x0070 @@ -13044,7 +13482,7 @@ - rtf:FCWSS + rtf:PNCHPFIRST @@ -13059,11 +13497,12 @@ - + - count of bytes of WSS. ==0 if unable to store the window state. - Should not be written by third party creators of Word files. + count of CHPX FKPs recorded in file. In non-complex files if + the number of entries in the plcfbteChpx is less than this, the + plcfbteChpx is incomplete. @@ -13071,7 +13510,7 @@ - 0x018E + 0x0074 @@ -13103,7 +13542,7 @@ - rtf:LCBWSS + rtf:CPNBTECHP @@ -13118,11 +13557,12 @@ - + - offset in table stream of document property data - structure. + when there was insufficient memory for Word to expand the + plcfbte at save time, the plcfbte is written to the file in a + linked list of 512-byte pieces starting with this pn @@ -13130,7 +13570,7 @@ - 0x0192 + 0x0078 @@ -13162,7 +13602,7 @@ - rtf:FCDOP + rtf:PNFBPPAPFIRST @@ -13177,10 +13617,11 @@ - + - count of bytes of document properties. + the page number of the lowest numbered page in the document + that records PAPX FKP information @@ -13188,7 +13629,7 @@ - 0x0196 + 0x007C @@ -13220,7 +13661,7 @@ - rtf:LCBDOP + rtf:PNPAPFIRST @@ -13235,13 +13676,12 @@ - + - offset in table stream of STTBF of associated strings. The - strings in this table specify document summary info and the paths - to special documents related to this document. See documentation of - the STTBFASSOC. + count of PAPX FKPs recorded in file. In non-complex files if + the number of entries in the plcfbtePapx is less than this, the + plcfbtePapx is incomplete. @@ -13249,7 +13689,7 @@ - 0x019A + 0x0080 @@ -13281,7 +13721,7 @@ - rtf:FCSTTBFASSOC + rtf:CPNBTEPAP @@ -13296,10 +13736,12 @@ - + - + when there was insufficient memory for Word to expand the + plcfbte at save time, the plcfbte is written to the file in a + linked list of 512-byte pieces starting with this pn @@ -13307,7 +13749,7 @@ - 0x019E + 0x0084 @@ -13339,7 +13781,7 @@ - rtf:LCBSTTBFASSOC + rtf:PNFBPLVCFIRST @@ -13354,13 +13796,11 @@ - + - offset in table stream of beginning of information for - complex files. Consists of an encoding of all of the - prms quoted by the document followed by the plcpcd - (piece table) for the document. + the page number of the lowest numbered page in the document + that records LVC FKP information @@ -13368,7 +13808,7 @@ - 0x01A2 + 0x0088 @@ -13400,7 +13840,7 @@ - rtf:FCCLX + rtf:PNLVCFIRST @@ -13415,11 +13855,12 @@ - + - count of bytes of complex file information == 0 if file is - non-complex. + count of LVC FKPs recorded in file. In non-complex files if the + number of entries in the plcfbtePapx is less than this, the + plcfbtePapx is incomplete. @@ -13427,7 +13868,7 @@ - 0x01A6 + 0x008C @@ -13459,7 +13900,7 @@ - rtf:LCBCLX + rtf:CPNBTELVC @@ -13474,10 +13915,10 @@ - + - not used + @@ -13485,7 +13926,7 @@ - 0x01AA + 0x0090 @@ -13517,7 +13958,7 @@ - rtf:FCPLCFPGDFTN + rtf:FCISLANDFIRST @@ -13532,7 +13973,7 @@ - + @@ -13543,7 +13984,7 @@ - 0x01AE + 0x0094 @@ -13575,7 +14016,7 @@ - rtf:LCBPLCFPGDFTN + rtf:FCISLANDLIM @@ -13590,12 +14031,10 @@ - + - offset in table stream of the name of the original file. - fcAutosaveSource and cbAutosaveSource should both be 0 if autosave - is off. + Number of fields in the array of FC/LCB pairs. @@ -13603,7 +14042,7 @@ - 0x01B2 + 0x0098 @@ -13635,14 +14074,14 @@ - rtf:FCAUTOSAVESOURCE + rtf:CFCLCB - + @@ -13650,10 +14089,13 @@ - + - count of bytes of the name of the original file. + [Beginning of array of FC/LCB pairs, rgfclcb] + file offset of original allocation for STSH in table stream. During + fast save Word will attempt to reuse this allocation if STSH is + small enough to fit. @@ -13661,7 +14103,7 @@ - 0x01B6 + 0x009A @@ -13693,7 +14135,7 @@ - rtf:LCBAUTOSAVESOURCE + rtf:FCSTSHFORIG @@ -13708,11 +14150,10 @@ - + - offset in table stream of group of strings recording the names - of the owners of annotations stored in the document + count of bytes of original STSH allocation @@ -13720,7 +14161,7 @@ - 0x01BA + 0x009E @@ -13752,7 +14193,7 @@ - rtf:FCGRPXSTATNOWNERS + rtf:LCBSTSHFORIG @@ -13767,10 +14208,10 @@ - + - count of bytes of the group of strings + offset of STSH in table stream. @@ -13778,7 +14219,7 @@ - 0x01BE + 0x00A2 @@ -13810,7 +14251,7 @@ - rtf:LCBGRPXSTATNOWNERS + rtf:FCSTSHF @@ -13825,11 +14266,10 @@ - + - offset in table stream of the sttbf that records names of - bookmarks for the annotation subdocument + count of bytes of current STSH allocation @@ -13837,7 +14277,7 @@ - 0x01C2 + 0x00A6 @@ -13869,7 +14309,7 @@ - rtf:FCSTTBFATNBKMK + rtf:LCBSTSHF @@ -13884,11 +14324,12 @@ - + - length in bytes of the sttbf that records names of bookmarks - for the annotation subdocument + offset in table stream of footnote reference PLCF of FRD + structures. CPs in PLC are relative to main document text stream + and give location of footnote references. @@ -13896,7 +14337,7 @@ - 0x01C6 + 0x00AA @@ -13928,7 +14369,7 @@ - rtf:LCBSTTBFATNBKMK + rtf:FCPLCFFNDREF @@ -13943,10 +14384,11 @@ - + - no longer used + count of bytes of footnote reference PLC== 0 if no footnotes + defined in document. @@ -13954,7 +14396,7 @@ - 0x01CA + 0x00AE @@ -13986,7 +14428,7 @@ - rtf:FCPLCDOAMOM + rtf:LCBPLCFFNDREF @@ -14001,10 +14443,15 @@ - + - + offset in table stream of footnote text PLC. CPs in PLC are + relative to footnote subdocument text stream and give location of + beginnings of footnote text for corresponding references recorded + in plcffndRef. No structure is stored in this plc. There will just + be n+1 FC entries in this PLC when there are n + footnotes @@ -14012,7 +14459,7 @@ - 0x01CE + 0x00B2 @@ -14044,7 +14491,7 @@ - rtf:LCBPLCDOAMOM + rtf:FCPLCFFNDTXT @@ -14059,10 +14506,11 @@ - + - no longer used + count of bytes of footnote text PLC. == 0 if no footnotes + defined in document @@ -14070,7 +14518,7 @@ - 0x01D2 + 0x00B6 @@ -14102,7 +14550,7 @@ - rtf:FCPLCDOAHDR + rtf:LCBPLCFFNDTXT @@ -14117,10 +14565,12 @@ - + - + offset in table stream of annotation reference ATRD PLC. The + CPs recorded in this PLC give the offset of annotation references + in the main document. @@ -14128,7 +14578,7 @@ - 0x01D6 + 0x00BA @@ -14160,7 +14610,7 @@ - rtf:LCBPLCDOAHDR + rtf:FCPLCFANDREF @@ -14175,11 +14625,10 @@ - + - offset in table stream of the FSPA PLC for main - document. == 0 if document has no office art objects. + count of bytes of annotation reference PLC. @@ -14187,7 +14636,7 @@ - 0x01DA + 0x00BE @@ -14219,7 +14668,7 @@ - rtf:FCPLCSPAMOM + rtf:LCBPLCFANDREF @@ -14234,11 +14683,15 @@ - + - length in bytes of the FSPA PLC of the main - document. + offset in table stream of annotation text PLC. The Cps recorded + in this PLC give the offset of the annotation text in the + annotation sub document corresponding to the references stored in + the plcfandRef. There is a 1 to 1 correspondence between entries + recorded in the plcfandTxt and the plcfandRef. No structure is + stored in this PLC. @@ -14246,7 +14699,7 @@ - 0x01DE + 0x00C2 @@ -14278,7 +14731,7 @@ - rtf:LCBPLCSPAMOM + rtf:FCPLCFANDTXT @@ -14293,11 +14746,10 @@ - + - offset in table stream of the FSPA PLC for header - document. == 0 if document has no office art objects. + count of bytes of the annotation text PLC @@ -14305,7 +14757,7 @@ - 0x01E2 + 0x00C6 @@ -14337,7 +14789,7 @@ - rtf:FCPLCSPAHDR + rtf:LCBPLCFANDTXT @@ -14352,11 +14804,11 @@ - + - length in bytes of the FSPA PLC of the header - document. + offset in table stream of section descriptor SED PLC. CPs in + PLC are relative to main document. @@ -14364,7 +14816,7 @@ - 0x01E6 + 0x00CA @@ -14396,7 +14848,7 @@ - rtf:LCBPLCSPAHDR + rtf:FCPLCFSED @@ -14411,11 +14863,10 @@ - + - offset in table stream of BKF (bookmark first) PLC of the - annotation subdocument + count of bytes of section descriptor PLC. @@ -14423,7 +14874,7 @@ - 0x01EA + 0x00CE @@ -14455,7 +14906,7 @@ - rtf:FCPLCFATNBKF + rtf:LCBPLCFSED @@ -14470,11 +14921,10 @@ - + - length in bytes of BKF (bookmark first) PLC of the annotation - subdocument + no longer used @@ -14482,7 +14932,7 @@ - 0x01EE + 0x00D2 @@ -14514,7 +14964,7 @@ - rtf:LCBPLCFATNBKF + rtf:FCPLCFPAD @@ -14529,11 +14979,10 @@ - + - offset in table stream of BKL (bookmark last) PLC of the - annotation subdocument + no longer used @@ -14541,7 +14990,7 @@ - 0x01F2 + 0x00D6 @@ -14573,7 +15022,7 @@ - rtf:FCPLCFATNBKL + rtf:LCBPLCFPAD @@ -14588,11 +15037,13 @@ - + - length in bytes of PLC marking the CP limits of the annotation - bookmarks. No structure is stored in this PLC. + offset in table stream of PHE PLC of paragraph heights. CPs in + PLC are relative to main document text stream. Only written for + files in complex format. Should not be written by third + party creators of Word files. @@ -14600,7 +15051,7 @@ - 0x01F6 + 0x00DA @@ -14632,7 +15083,7 @@ - rtf:LCBPLCFATNBKL + rtf:FCPLCFPHE @@ -14647,12 +15098,11 @@ - + - offset in table stream of PMS (Print Merge State) information - block. This contains the current state of a print merge - operation + count of bytes of paragraph height PLC. ==0 when file is + non-complex. @@ -14660,7 +15110,7 @@ - 0x01FA + 0x00DE @@ -14692,7 +15142,7 @@ - rtf:FCPMS + rtf:LCBPLCFPHE @@ -14707,11 +15157,12 @@ - + - length in bytes of PMS. ==0 if no current print merge state. - Should not be written by third party creators of Word files. + offset in table stream of glossary string table. This table + consists of Pascal style strings (strings stored prefixed with a + length byte) concatenated one after another. @@ -14719,7 +15170,7 @@ - 0x01FE + 0x00E2 @@ -14751,7 +15202,7 @@ - rtf:LCBPMS + rtf:FCSTTBFGLSY @@ -14766,11 +15217,11 @@ - + - offset in table stream of form field Sttbf which contains - strings used in form field dropdown controls + count of bytes of glossary string table. == 0 for non-glossary + documents.!=0 for glossary documents. @@ -14778,7 +15229,7 @@ - 0x0202 + 0x00E6 @@ -14810,7 +15261,7 @@ - rtf:FCFORMFLDSTTBF + rtf:LCBSTTBFGLSY @@ -14825,10 +15276,14 @@ - + - length in bytes of form field Sttbf + offset in table stream of glossary PLC. CPs in PLC are relative + to main document and mark the beginnings of glossary entries and + are in 1-1 correspondence with entries of sttbfglsy. No structure + is stored in this PLC. There will be n+1 FC entries + in this PLC when there are n glossary entries. @@ -14836,7 +15291,7 @@ - 0x0206 + 0x00EA @@ -14868,7 +15323,7 @@ - rtf:LCBFORMFLDSTTBF + rtf:FCPLCFGLSY @@ -14883,12 +15338,11 @@ - + - offset in table stream of endnote reference PLCF of FRD - structures. CPs in PLCF are relative to main document text stream - and give location of endnote references. + count of bytes of glossary PLC.== 0 for non-glossary + documents.!=0 for glossary documents. @@ -14896,7 +15350,7 @@ - 0x020A + 0x00EE @@ -14928,7 +15382,7 @@ - rtf:FCPLCFENDREF + rtf:LCBPLCFGLSY @@ -14943,10 +15397,14 @@ - + - + byte offset in table stream of header HDD PLC. CPs are relative + to header subdocument and mark the beginnings of individual headers + in the header subdocument. No structure is stored in this PLC. + There will be n+1FC entries in this PLC when there are + n headers stored for the document. @@ -14954,7 +15412,7 @@ - 0x020E + 0x00F2 @@ -14986,7 +15444,7 @@ - rtf:LCBPLCFENDREF + rtf:FCPLCFHDD @@ -15001,12 +15459,11 @@ - + - offset in table stream of PlcfendRef which points to endnote - text in the endnote document stream which corresponds with the - plcfendRef. No structure is stored in this PLC. + count of bytes of header PLC. + == 0 if document contains no headers @@ -15014,7 +15471,7 @@ - 0x0212 + 0x00F6 @@ -15046,7 +15503,7 @@ - rtf:FCPLCFENDTXT + rtf:LCBPLCFHDD @@ -15061,10 +15518,12 @@ - + - + offset in table stream of character property bin table.PLC. FCs + in PLC are file offsets in the main stream. Describes text of main + document and all subdocuments. @@ -15072,7 +15531,7 @@ - 0x0216 + 0x00FA @@ -15104,7 +15563,7 @@ - rtf:LCBPLCFENDTXT + rtf:FCPLCFBTECHPX @@ -15119,11 +15578,10 @@ - + - offset in table stream to FLD PLCF of field positions in the - endnote subdoc + count of bytes of character property bin table PLC. @@ -15131,7 +15589,7 @@ - 0x021A + 0x00FE @@ -15163,7 +15621,7 @@ - rtf:FCPLCFFLDEDN + rtf:LCBPLCFBTECHPX @@ -15178,10 +15636,12 @@ - + - + offset in table stream of paragraph property bin table.PLC. FCs + in PLC are file offsets in the main stream. Describes text of main + document and all subdocuments. @@ -15189,7 +15649,7 @@ - 0x021E + 0x0102 @@ -15221,7 +15681,7 @@ - rtf:LCBPLCFFLDEDN + rtf:FCPLCFBTEPAPX @@ -15236,10 +15696,10 @@ - + - not used + count of bytes of paragraph property bin table PLC @@ -15247,7 +15707,7 @@ - 0x0222 + 0x0106 @@ -15279,7 +15739,7 @@ - rtf:FCPLCFPGDEDN + rtf:LCBPLCFBTEPAPX @@ -15294,10 +15754,69 @@ - + + + + offset in table stream of PLC reserved for private use. The + SEA is 6 bytes long. + + + + + + + + 0x010A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFSEA + + + + + + + + + + + + + + + + + + count of bytes of private use PLC. @@ -15305,7 +15824,7 @@ - 0x0226 + 0x010E @@ -15337,7 +15856,7 @@ - rtf:LCBPLCFPGDEDN + rtf:LCBPLCFSEA @@ -15352,12 +15871,14 @@ - + - offset in table stream of the office art object table data. The - format of office art object table data is found in a separate - document. + offset in table stream of font information STTBF. The sttbfffn + is a STTBF where is string is actually an FFN structure. The + nth entry in the STTBF describes the font that will be + displayed when the chp.ftc for text is equal to n. See the + FFN file structure definition. @@ -15365,7 +15886,7 @@ - 0x022A + 0x0112 @@ -15397,7 +15918,7 @@ - rtf:FCDGGINFO + rtf:FCSTTBFFFN @@ -15412,10 +15933,10 @@ - + - length in bytes of the office art object table data + count of bytes in sttbfffn. @@ -15423,7 +15944,7 @@ - 0x022E + 0x0116 @@ -15455,7 +15976,7 @@ - rtf:LCBDGGINFO + rtf:LCBSTTBFFFN @@ -15470,12 +15991,14 @@ - + - offset in table stream to STTBF that records the author - abbreviations for authors who have made revisions in the - document. + offset in table stream to the FLD PLC of field positions in the + main document. The CPs point to the beginning CP of a field, the CP + of field separator character inside a field and the ending CP of + the field. A field may be nested within another field. 20 levels of + field nesting are allowed. @@ -15483,7 +16006,7 @@ - 0x0232 + 0x011A @@ -15515,7 +16038,7 @@ - rtf:FCSTTBFRMARK + rtf:FCPLCFFLDMOM @@ -15530,10 +16053,10 @@ - + - + count of bytes in plcffldMom @@ -15541,7 +16064,7 @@ - 0x0236 + 0x011E @@ -15573,7 +16096,7 @@ - rtf:LCBSTTBFRMARK + rtf:LCBPLCFFLDMOM @@ -15588,11 +16111,11 @@ - + - offset in table stream to STTBF that records caption titles - used in the document. + offset in table stream to the FLD PLC of field positions in the + header subdocument. @@ -15600,7 +16123,7 @@ - 0x023A + 0x0122 @@ -15632,7 +16155,7 @@ - rtf:FCSTTBFCAPTION + rtf:FCPLCFFLDHDR @@ -15647,10 +16170,10 @@ - + - + count of bytes in plcffldHdr @@ -15658,7 +16181,7 @@ - 0x023E + 0x0126 @@ -15690,7 +16213,7 @@ - rtf:LCBSTTBFCAPTION + rtf:LCBPLCFFLDHDR @@ -15705,12 +16228,11 @@ - + - offset in table stream to the STTBF that records the object - names and indices into the caption STTBF for objects which get auto - captions. + offset in table stream to the FLD PLC of field positions in the + footnote subdocument. @@ -15718,7 +16240,7 @@ - 0x0242 + 0x012A @@ -15750,7 +16272,7 @@ - rtf:FCSTTBFAUTOCAPTION + rtf:FCPLCFFLDFTN @@ -15765,10 +16287,10 @@ - + - + count of bytes in plcffldFtn @@ -15776,7 +16298,7 @@ - 0x0246 + 0x012E @@ -15808,7 +16330,7 @@ - rtf:LCBSTTBFAUTOCAPTION + rtf:LCBPLCFFLDFTN @@ -15823,11 +16345,11 @@ - + - offset in table stream to WKB PLCF that describes the - boundaries of contributing documents in a master document + offset in table stream to the FLD PLC of field positions in the + annotation subdocument. @@ -15835,7 +16357,7 @@ - 0x024A + 0x0132 @@ -15867,7 +16389,7 @@ - rtf:FCPLCFWKB + rtf:FCPLCFFLDATN @@ -15882,10 +16404,10 @@ - + - + count of bytes in plcffldAtn @@ -15893,7 +16415,7 @@ - 0x024E + 0x0136 @@ -15925,7 +16447,7 @@ - rtf:LCBPLCFWKB + rtf:LCBPLCFFLDATN @@ -15940,11 +16462,10 @@ - + - offset in table stream of PLCF (of SPLS structures) that - records spell check state + no longer used @@ -15952,7 +16473,7 @@ - 0x0252 + 0x013A @@ -15984,7 +16505,7 @@ - rtf:FCPLCFSPL + rtf:FCPLCFFLDMCR @@ -15999,10 +16520,10 @@ - + - + no longer used @@ -16010,7 +16531,7 @@ - 0x0256 + 0x013E @@ -16042,7 +16563,7 @@ - rtf:LCBPLCFSPL + rtf:LCBPLCFFLDMCR @@ -16057,12 +16578,11 @@ - + - offset in table stream of PLCF that records the beginning CP in - the text box subdoc of the text of individual text box entries. No - structure is stored in this PLCF + offset in table stream of the STTBF that records bookmark names + in the main document @@ -16070,7 +16590,7 @@ - 0x025A + 0x0142 @@ -16102,7 +16622,7 @@ - rtf:FCPLCFTXBXTXT + rtf:FCSTTBFBKMK @@ -16117,7 +16637,7 @@ - + @@ -16128,7 +16648,7 @@ - 0x025E + 0x0146 @@ -16160,7 +16680,7 @@ - rtf:LCBPLCFTXBXTXT + rtf:LCBSTTBFBKMK @@ -16175,11 +16695,12 @@ - + - offset in table stream of the FLD PLCF that records field - boundaries recorded in the textbox subdoc. + offset in table stream of the PLCF that records the beginning + CP offsets of bookmarks in the main document. See BKF structure + definition @@ -16187,7 +16708,7 @@ - 0x0262 + 0x014A @@ -16219,7 +16740,7 @@ - rtf:FCPLCFFLDTXBX + rtf:FCPLCFBKF @@ -16234,7 +16755,7 @@ - + @@ -16245,7 +16766,7 @@ - 0x0266 + 0x014E @@ -16277,7 +16798,7 @@ - rtf:LCBPLCFFLDTXBX + rtf:LCBPLCFBKF @@ -16292,12 +16813,12 @@ - + - offset in table stream of PLCF that records the beginning CP in - the header text box subdoc of the text of individual header text - box entries. No structure is stored in this PLC. + offset in table stream of the PLCF that records the ending CP + offsets of bookmarks recorded in the main document. No structure is + stored in this PLCF. @@ -16305,7 +16826,7 @@ - 0x026A + 0x0152 @@ -16337,7 +16858,7 @@ - rtf:FCPLCFHDRTXBXTXT + rtf:FCPLCFBKL @@ -16352,7 +16873,7 @@ - + @@ -16363,7 +16884,7 @@ - 0x026E + 0x0156 @@ -16395,7 +16916,7 @@ - rtf:LCBPLCFHDRTXBXTXT + rtf:LCBPLCFBKL @@ -16410,11 +16931,11 @@ - + - offset in table stream of the FLD PLCF that records field - boundaries recorded in the header textbox subdoc. + offset in table stream of the macro commands. These commands + are private and undocumented. @@ -16422,7 +16943,7 @@ - 0x0272 + 0x015A @@ -16454,7 +16975,7 @@ - rtf:FCPLCFFLDHDRTXBX + rtf:FCCMDS @@ -16469,10 +16990,11 @@ - + - + undocument size of undocument structure not documented + above @@ -16480,7 +17002,7 @@ - 0x0276 + 0x015E @@ -16512,7 +17034,7 @@ - rtf:LCBPLCFFLDHDRTXBX + rtf:LCBCMDS @@ -16527,10 +17049,10 @@ - + - Macro User storage + no longer used @@ -16538,7 +17060,7 @@ - 0x027A + 0x0162 @@ -16570,7 +17092,7 @@ - rtf:FCSTWUSER + rtf:FCPLCMCR @@ -16585,7 +17107,7 @@ - + @@ -16596,7 +17118,7 @@ - 0x027E + 0x0166 @@ -16628,7 +17150,7 @@ - rtf:LCBSTWUSER + rtf:LCBPLCMCR @@ -16643,10 +17165,10 @@ - + - offset in table stream of embedded true type font data. + no longer used @@ -16654,7 +17176,7 @@ - 0x0282 + 0x016A @@ -16686,7 +17208,7 @@ - rtf:FCSTTBTTMBD + rtf:FCSTTBFMCR @@ -16701,7 +17223,7 @@ - + @@ -16712,7 +17234,7 @@ - 0x0286 + 0x016E @@ -16744,7 +17266,7 @@ - rtf:LCBSTTBTTMBD + rtf:LCBSTTBFMCR @@ -16759,10 +17281,70 @@ - + + + + offset in table stream of the printer driver information (names + of drivers, port, etc.) + + + + + + + + 0x0172 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:FCPRDRVR + + + + + + + + + + + + + + + + + + count of bytes of the printer driver information (names of + drivers, port, etc.) @@ -16770,7 +17352,7 @@ - 0x028A + 0x0176 @@ -16802,65 +17384,7 @@ - rtf:FCUNUSED - - - - - - - - - - - - - - - - - - - - - - - - - - 0x028E - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - rtf:LCBUNUSED + rtf:LCBPRDRVR @@ -16875,13 +17399,11 @@ - + - (FCPGD, beginning of array of fcPgd / fcBkd pairs - rgpgdbkd). - offset in table stream of the PLF that records the page descriptors - for the main text of the doc. + offset in table stream of the print environment in portrait + mode. @@ -16889,7 +17411,7 @@ - 0x0292 + 0x017A @@ -16921,7 +17443,7 @@ - rtf:FCPGDMOTHER + rtf:FCPRENVPORT @@ -16936,10 +17458,10 @@ - + - + count of bytes of the print environment in portrait mode. @@ -16947,7 +17469,7 @@ - 0x0296 + 0x017E @@ -16979,7 +17501,7 @@ - rtf:LCBPGDMOTHER + rtf:LCBPRENVPORT @@ -16994,11 +17516,11 @@ - + - offset in table stream of the PLCF that records the break - descriptors for the main text of the doc. + offset in table stream of the print environment in landscape + mode. @@ -17006,7 +17528,7 @@ - 0x029A + 0x0182 @@ -17038,7 +17560,7 @@ - rtf:FCBKDMOTHER + rtf:FCPRENVLAND @@ -17053,10 +17575,10 @@ - + - + count of bytes of the print environment in landscape mode. @@ -17064,7 +17586,7 @@ - 0x029E + 0x0186 @@ -17096,7 +17618,7 @@ - rtf:LCBBKDMOTHER + rtf:LCBPRENVLAND @@ -17111,11 +17633,13 @@ - + - offset in table stream of the PLF that records the page - descriptors for the footnote text of the doc. + offset in table stream of Window Save + State data structure. WSS contains dimensions of + document's main text window and the last selection made by Word + user. @@ -17123,7 +17647,7 @@ - 0x02A2 + 0x018A @@ -17155,7 +17679,7 @@ - rtf:FCPGDFTN + rtf:FCWSS @@ -17170,10 +17694,11 @@ - + - + count of bytes of WSS. ==0 if unable to store the window state. + Should not be written by third party creators of Word files. @@ -17181,7 +17706,7 @@ - 0x02A6 + 0x018E @@ -17213,7 +17738,7 @@ - rtf:LCBPGDFTN + rtf:LCBWSS @@ -17228,11 +17753,11 @@ - + - offset in table stream of the PLCF that records the break - descriptors for the footnote text of the doc. + offset in table stream of document property data + structure. @@ -17240,7 +17765,7 @@ - 0x02AA + 0x0192 @@ -17272,7 +17797,7 @@ - rtf:FCBKDFTN + rtf:FCDOP @@ -17287,10 +17812,10 @@ - + - + count of bytes of document properties. @@ -17298,7 +17823,7 @@ - 0x02AE + 0x0196 @@ -17330,7 +17855,7 @@ - rtf:LCBBKDFTN + rtf:LCBDOP @@ -17345,11 +17870,13 @@ - + - offset in table stream of the PLF that records the page - descriptors for the endnote text of the doc. + offset in table stream of STTBF of associated strings. The + strings in this table specify document summary info and the paths + to special documents related to this document. See documentation of + the STTBFASSOC. @@ -17357,7 +17884,7 @@ - 0x02B2 + 0x019A @@ -17389,7 +17916,7 @@ - rtf:FCPGDEDN + rtf:FCSTTBFASSOC @@ -17404,7 +17931,7 @@ - + @@ -17415,7 +17942,7 @@ - 0x02B6 + 0x019E @@ -17447,7 +17974,7 @@ - rtf:LCBPGDEDN + rtf:LCBSTTBFASSOC @@ -17462,11 +17989,13 @@ - + - offset in table stream of the PLCF that records the break - descriptors for the endnote text of the doc. + offset in table stream of beginning of information for + complex files. Consists of an encoding of all of the + prms quoted by the document followed by the plcpcd + (piece table) for the document. @@ -17474,7 +18003,7 @@ - 0x02BA + 0x01A2 @@ -17506,7 +18035,7 @@ - rtf:FCBKDEDN + rtf:FCCLX @@ -17521,10 +18050,11 @@ - + - + count of bytes of complex file information == 0 if file is + non-complex. @@ -17532,7 +18062,7 @@ - 0x02BE + 0x01A6 @@ -17564,7 +18094,7 @@ - rtf:LCBBKDEDN + rtf:LCBCLX @@ -17579,13 +18109,10 @@ - + - offset in table stream of the STTBF containing field keywords. - This is only used in a small number of the international versions - of word. This field is no longer written to the file for nFib >= - 167. + not used @@ -17593,7 +18120,7 @@ - 0x02C2 + 0x01AA @@ -17625,7 +18152,7 @@ - rtf:FCSTTBFINTLFLD + rtf:FCPLCFPGDFTN @@ -17640,10 +18167,10 @@ - + - Always 0 for nFib >= 167. + @@ -17651,7 +18178,7 @@ - 0x02C6 + 0x01AE @@ -17683,7 +18210,7 @@ - rtf:LCBSTTBFINTLFLD + rtf:LCBPLCFPGDFTN @@ -17698,10 +18225,12 @@ - + - offset in table stream of a mailer routing slip. + offset in table stream of the name of the original file. + fcAutosaveSource and cbAutosaveSource should both be 0 if autosave + is off. @@ -17709,7 +18238,7 @@ - 0x02CA + 0x01B2 @@ -17741,7 +18270,7 @@ - rtf:FCROUTESLIP + rtf:FCAUTOSAVESOURCE @@ -17756,10 +18285,10 @@ - + - + count of bytes of the name of the original file. @@ -17767,7 +18296,7 @@ - 0x02CE + 0x01B6 @@ -17799,7 +18328,7 @@ - rtf:LCBROUTESLIP + rtf:LCBAUTOSAVESOURCE @@ -17814,12 +18343,11 @@ - + - offset in table stream of STTBF recording the names of the - users who have saved this document alternating with the save - locations. + offset in table stream of group of strings recording the names + of the owners of annotations stored in the document @@ -17827,7 +18355,7 @@ - 0x02D2 + 0x01BA @@ -17859,7 +18387,7 @@ - rtf:FCSTTBSAVEDBY + rtf:FCGRPXSTATNOWNERS @@ -17874,10 +18402,10 @@ - + - + count of bytes of the group of strings @@ -17885,7 +18413,7 @@ - 0x02D6 + 0x01BE @@ -17917,7 +18445,7 @@ - rtf:LCBSTTBSAVEDBY + rtf:LCBGRPXSTATNOWNERS @@ -17932,11 +18460,11 @@ - + - offset in table stream of STTBF recording filenames of - documents which are referenced by this document. + offset in table stream of the sttbf that records names of + bookmarks for the annotation subdocument @@ -17944,7 +18472,7 @@ - 0x02DA + 0x01C2 @@ -17976,7 +18504,7 @@ - rtf:FCSTTBFNM + rtf:FCSTTBFATNBKMK @@ -17991,10 +18519,11 @@ - + - + length in bytes of the sttbf that records names of bookmarks + for the annotation subdocument @@ -18002,7 +18531,7 @@ - 0x02DE + 0x01C6 @@ -18034,7 +18563,7 @@ - rtf:LCBSTTBFNM + rtf:LCBSTTBFATNBKMK @@ -18049,10 +18578,10 @@ - + - offset in the table stream of list format information. + no longer used @@ -18060,7 +18589,7 @@ - 0x02E2 + 0x01CA @@ -18092,7 +18621,7 @@ - rtf:FCPLCFLST + rtf:FCPLCDOAMOM @@ -18107,7 +18636,7 @@ - + @@ -18118,7 +18647,7 @@ - 0x02E6 + 0x01CE @@ -18150,7 +18679,7 @@ - rtf:LCBPLCFLST + rtf:LCBPLCDOAMOM @@ -18165,11 +18694,10 @@ - + - offset in the table stream of list format override - information. + no longer used @@ -18177,7 +18705,7 @@ - 0x02EA + 0x01D2 @@ -18209,7 +18737,7 @@ - rtf:FCPLFLFO + rtf:FCPLCDOAHDR @@ -18224,7 +18752,7 @@ - + @@ -18235,7 +18763,7 @@ - 0x02EE + 0x01D6 @@ -18267,7 +18795,7 @@ - rtf:LCBPLFLFO + rtf:LCBPLCDOAHDR @@ -18282,11 +18810,11 @@ - + - offset in the table stream of the textbox break table (a PLCF - of BKDs) for the main document + offset in table stream of the FSPA PLC for main + document. == 0 if document has no office art objects. @@ -18294,7 +18822,7 @@ - 0x02F2 + 0x01DA @@ -18326,7 +18854,7 @@ - rtf:FCPLCFTXBXBKD + rtf:FCPLCSPAMOM @@ -18341,10 +18869,11 @@ - + - + length in bytes of the FSPA PLC of the main + document. @@ -18352,7 +18881,7 @@ - 0x02F6 + 0x01DE @@ -18384,7 +18913,7 @@ - rtf:LCBPLCFTXBXBKD + rtf:LCBPLCSPAMOM @@ -18399,11 +18928,11 @@ - + - offset in the table stream of the textbox break table (a PLCF - of BKDs) for the header subdocument + offset in table stream of the FSPA PLC for header + document. == 0 if document has no office art objects. @@ -18411,7 +18940,7 @@ - 0x02FA + 0x01E2 @@ -18443,7 +18972,7 @@ - rtf:FCPLCFTXBXHDRBKD + rtf:FCPLCSPAHDR @@ -18458,10 +18987,11 @@ - + - + length in bytes of the FSPA PLC of the header + document. @@ -18469,7 +18999,7 @@ - 0x02FE + 0x01E6 @@ -18501,7 +19031,7 @@ - rtf:LCBPLCFTXBXHDRBKD + rtf:LCBPLCSPAHDR @@ -18516,11 +19046,11 @@ - + - offset in main stream of undocumented undo / versioning - data + offset in table stream of BKF (bookmark first) PLC of the + annotation subdocument @@ -18528,7 +19058,7 @@ - 0x0302 + 0x01EA @@ -18560,7 +19090,7 @@ - rtf:FCDOCUNDO + rtf:FCPLCFATNBKF @@ -18575,10 +19105,11 @@ - + - + length in bytes of BKF (bookmark first) PLC of the annotation + subdocument @@ -18586,7 +19117,7 @@ - 0x0306 + 0x01EE @@ -18618,7 +19149,7 @@ - rtf:LCBDOCUNDO + rtf:LCBPLCFATNBKF @@ -18633,11 +19164,11 @@ - + - offset in main stream of undocumented undo / versioning - data + offset in table stream of BKL (bookmark last) PLC of the + annotation subdocument @@ -18645,7 +19176,7 @@ - 0x030A + 0x01F2 @@ -18677,7 +19208,7 @@ - rtf:FCRGBUSE + rtf:FCPLCFATNBKL @@ -18692,10 +19223,71 @@ - + + + + length in bytes of PLC marking the CP limits of the annotation + bookmarks. No structure is stored in this PLC. + + + + + + + + 0x01F6 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFATNBKL + + + + + + + + + + + + + + + + + + offset in table stream of PMS (Print Merge State) information + block. This contains the current state of a print merge + operation @@ -18703,7 +19295,7 @@ - 0x030E + 0x01FA @@ -18735,7 +19327,7 @@ - rtf:LCBRGBUSE + rtf:FCPMS @@ -18750,11 +19342,11 @@ - + - offset in main stream of undocumented undo / versioning - data + length in bytes of PMS. ==0 if no current print merge state. + Should not be written by third party creators of Word files. @@ -18762,7 +19354,7 @@ - 0x0312 + 0x01FE @@ -18794,7 +19386,7 @@ - rtf:FCUSP + rtf:LCBPMS @@ -18809,10 +19401,69 @@ - + + + + offset in table stream of form field Sttbf which contains + strings used in form field dropdown controls + + + + + + + + 0x0202 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:FCFORMFLDSTTBF + + + + + + + + + + + + + + + + + + length in bytes of form field Sttbf @@ -18820,7 +19471,7 @@ - 0x0316 + 0x0206 @@ -18852,7 +19503,7 @@ - rtf:LCBUSP + rtf:LCBFORMFLDSTTBF @@ -18867,11 +19518,12 @@ - + - offset in table stream of undocumented undo / versioning - data + offset in table stream of endnote reference PLCF of FRD + structures. CPs in PLCF are relative to main document text stream + and give location of endnote references. @@ -18879,7 +19531,7 @@ - 0x031A + 0x020A @@ -18911,7 +19563,7 @@ - rtf:FCUSKF + rtf:FCPLCFENDREF @@ -18926,7 +19578,7 @@ - + @@ -18937,7 +19589,7 @@ - 0x031E + 0x020E @@ -18969,7 +19621,7 @@ - rtf:LCBUSKF + rtf:LCBPLCFENDREF @@ -18984,11 +19636,12 @@ - + - offset in table stream of undocumented undo / versioning - data + offset in table stream of PlcfendRef which points to endnote + text in the endnote document stream which corresponds with the + plcfendRef. No structure is stored in this PLC. @@ -18996,7 +19649,7 @@ - 0x0322 + 0x0212 @@ -19028,7 +19681,7 @@ - rtf:FCPLCUPCRGBUSE + rtf:FCPLCFENDTXT @@ -19043,7 +19696,7 @@ - + @@ -19054,7 +19707,7 @@ - 0x0326 + 0x0216 @@ -19086,7 +19739,7 @@ - rtf:LCBPLCUPCRGBUSE + rtf:LCBPLCFENDTXT @@ -19101,11 +19754,11 @@ - + - offset in table stream of undocumented undo / versioning - data + offset in table stream to FLD PLCF of field positions in the + endnote subdoc @@ -19113,7 +19766,7 @@ - 0x032A + 0x021A @@ -19145,7 +19798,7 @@ - rtf:FCPLCUPCUSP + rtf:FCPLCFFLDEDN @@ -19160,7 +19813,7 @@ - + @@ -19171,7 +19824,7 @@ - 0x032E + 0x021E @@ -19203,7 +19856,7 @@ - rtf:LCBPLCUPCUSP + rtf:LCBPLCFFLDEDN @@ -19218,11 +19871,10 @@ - + - offset in table stream of string table of style names for - glossary entries + not used @@ -19230,7 +19882,7 @@ - 0x0332 + 0x0222 @@ -19262,7 +19914,7 @@ - rtf:FCSTTBGLSYSTYLE + rtf:FCPLCFPGDEDN @@ -19277,7 +19929,7 @@ - + @@ -19288,7 +19940,7 @@ - 0x0336 + 0x0226 @@ -19320,7 +19972,7 @@ - rtf:LCBSTTBGLSYSTYLE + rtf:LCBPLCFPGDEDN @@ -19335,10 +19987,12 @@ - + - offset in table stream of undocumented grammar options PL + offset in table stream of the office art object table data. The + format of office art object table data is found in a separate + document. @@ -19346,7 +20000,7 @@ - 0x033A + 0x022A @@ -19378,7 +20032,7 @@ - rtf:FCPLGOSL + rtf:FCDGGINFO @@ -19393,10 +20047,10 @@ - + - + length in bytes of the office art object table data @@ -19404,7 +20058,7 @@ - 0x033E + 0x022E @@ -19436,7 +20090,7 @@ - rtf:LCBPLGOSL + rtf:LCBDGGINFO @@ -19451,10 +20105,12 @@ - + - offset in table stream of undocumented ocx data + offset in table stream to STTBF that records the author + abbreviations for authors who have made revisions in the + document. @@ -19462,7 +20118,7 @@ - 0x0342 + 0x0232 @@ -19494,7 +20150,7 @@ - rtf:FCPLCOCX + rtf:FCSTTBFRMARK @@ -19509,7 +20165,7 @@ - + @@ -19520,7 +20176,7 @@ - 0x0346 + 0x0236 @@ -19552,7 +20208,7 @@ - rtf:LCBPLCOCX + rtf:LCBSTTBFRMARK @@ -19567,12 +20223,11 @@ - + - offset in table stream of character property bin table.PLC. FCs - in PLC are file offsets. Describes text of main document and all - subdocuments. + offset in table stream to STTBF that records caption titles + used in the document. @@ -19580,7 +20235,7 @@ - 0x034A + 0x023A @@ -19612,7 +20267,7 @@ - rtf:FCPLCFBTELVC + rtf:FCSTTBFCAPTION @@ -19627,7 +20282,7 @@ - + @@ -19638,65 +20293,7 @@ - 0x034E - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - rtf:LCBPLCFBTELVC - - - - - - - - - - - - - - - - - - (a.k.a FILETIME ftModified) - - - - - - - - 0x0352 + 0x023E @@ -19728,7 +20325,7 @@ - rtf:DWLOWDATETIME + rtf:LCBSTTBFCAPTION @@ -19743,10 +20340,12 @@ - + - + offset in table stream to the STTBF that records the object + names and indices into the caption STTBF for objects which get auto + captions. @@ -19754,7 +20353,7 @@ - 0x0356 + 0x0242 @@ -19786,7 +20385,7 @@ - rtf:DWHIGHDATETIME + rtf:FCSTTBFAUTOCAPTION @@ -19801,68 +20400,10 @@ - - - - offset in table stream of LVC PLCF - - - - - - - - 0x035A - - - - - - - - 0 - - - - - - - - - - - - - + - - - - - - - - rtf:FCPLCFLVC - - - - - - - - - - - - - - - - - - size of LVC PLCF, ==0 for non-complex files @@ -19870,7 +20411,7 @@ - 0x035E + 0x0246 @@ -19902,7 +20443,7 @@ - rtf:LCBPLCFLVC + rtf:LCBSTTBFAUTOCAPTION @@ -19917,10 +20458,11 @@ - + - offset in table stream of autosummary ASUMY PLCF. + offset in table stream to WKB PLCF that describes the + boundaries of contributing documents in a master document @@ -19928,7 +20470,7 @@ - 0x0362 + 0x024A @@ -19960,7 +20502,7 @@ - rtf:FCPLCASUMY + rtf:FCPLCFWKB @@ -19975,7 +20517,7 @@ - + @@ -19986,7 +20528,7 @@ - 0x0366 + 0x024E @@ -20018,7 +20560,7 @@ - rtf:LCBPLCASUMY + rtf:LCBPLCFWKB @@ -20033,11 +20575,11 @@ - + - offset in table stream of PLCF (of SPLS structures) which - records grammar check state + offset in table stream of PLCF (of SPLS structures) that + records spell check state @@ -20045,7 +20587,7 @@ - 0x036A + 0x0252 @@ -20077,7 +20619,7 @@ - rtf:FCPLCFGRAM + rtf:FCPLCFSPL @@ -20092,7 +20634,7 @@ - + @@ -20103,7 +20645,7 @@ - 0x036E + 0x0256 @@ -20135,7 +20677,7 @@ - rtf:LCBPLCFGRAM + rtf:LCBPLCFSPL @@ -20150,10 +20692,12 @@ - + - offset in table stream of list names string table + offset in table stream of PLCF that records the beginning CP in + the text box subdoc of the text of individual text box entries. No + structure is stored in this PLCF @@ -20161,7 +20705,7 @@ - 0x0372 + 0x025A @@ -20193,7 +20737,7 @@ - rtf:FCSTTBLISTNAMES + rtf:FCPLCFTXBXTXT @@ -20208,7 +20752,7 @@ - + @@ -20219,7 +20763,7 @@ - 0x0376 + 0x025E @@ -20251,7 +20795,7 @@ - rtf:LCBSTTBLISTNAMES + rtf:LCBPLCFTXBXTXT @@ -20266,11 +20810,11 @@ - + - offset in table stream of undocumented undo / versioning - data + offset in table stream of the FLD PLCF that records field + boundaries recorded in the textbox subdoc. @@ -20278,7 +20822,7 @@ - 0x037A + 0x0262 @@ -20310,7 +20854,7 @@ - rtf:FCSTTBFUSSR + rtf:FCPLCFFLDTXBX @@ -20325,7 +20869,7 @@ - + @@ -20336,7 +20880,7 @@ - 0x037E + 0x0266 @@ -20368,7 +20912,7 @@ - rtf:LCBSTTBFUSSR + rtf:LCBPLCFFLDTXBX @@ -20382,34 +20926,13 @@ - - - - - - - - - - - - - - - - - - 856 - - - - - - + - + offset in table stream of PLCF that records the beginning CP in + the header text box subdoc of the text of individual header text + box entries. No structure is stored in this PLC. @@ -20417,7 +20940,7 @@ - 744 + 0x026A @@ -20425,7 +20948,7 @@ - + 0 @@ -20449,7 +20972,7 @@ - rtf:fcPlcfTch + rtf:FCPLCFHDRTXBXTXT @@ -20464,7 +20987,7 @@ - + @@ -20475,7 +20998,7 @@ - 748 + 0x026E @@ -20483,7 +21006,7 @@ - + 0 @@ -20507,7 +21030,7 @@ - rtf:lcbPlcfTch + rtf:LCBPLCFHDRTXBXTXT @@ -20522,10 +21045,11 @@ - + - + offset in table stream of the FLD PLCF that records field + boundaries recorded in the header textbox subdoc. @@ -20533,7 +21057,7 @@ - 752 + 0x0272 @@ -20541,7 +21065,7 @@ - + 0 @@ -20565,7 +21089,7 @@ - rtf:fcRmdThreading + rtf:FCPLCFFLDHDRTXBX @@ -20580,7 +21104,7 @@ - + @@ -20591,7 +21115,7 @@ - 756 + 0x0276 @@ -20599,7 +21123,7 @@ - + 0 @@ -20623,7 +21147,7 @@ - rtf:lcbRmdThreading + rtf:LCBPLCFFLDHDRTXBX @@ -20638,10 +21162,10 @@ - + - + Macro User storage @@ -20649,7 +21173,7 @@ - 760 + 0x027A @@ -20657,7 +21181,7 @@ - + 0 @@ -20681,7 +21205,7 @@ - rtf:fcMid + rtf:FCSTWUSER @@ -20696,7 +21220,7 @@ - + @@ -20707,7 +21231,7 @@ - 764 + 0x027E @@ -20715,7 +21239,7 @@ - + 0 @@ -20739,7 +21263,7 @@ - rtf:lcbMid + rtf:LCBSTWUSER @@ -20754,10 +21278,10 @@ - + - + offset in table stream of embedded true type font data. @@ -20765,7 +21289,7 @@ - 768 + 0x0282 @@ -20773,7 +21297,7 @@ - + 0 @@ -20797,7 +21321,7 @@ - rtf:fcSttbRgtplc + rtf:FCSTTBTTMBD @@ -20812,7 +21336,7 @@ - + @@ -20823,7 +21347,7 @@ - 772 + 0x0286 @@ -20831,7 +21355,7 @@ - + 0 @@ -20855,7 +21379,7 @@ - rtf:lcbSttbRgtplc + rtf:LCBSTTBTTMBD @@ -20870,7 +21394,7 @@ - + @@ -20881,7 +21405,7 @@ - 776 + 0x028A @@ -20889,7 +21413,7 @@ - + 0 @@ -20913,7 +21437,7 @@ - rtf:fcMsoEnvelope + rtf:FCUNUSED @@ -20928,7 +21452,7 @@ - + @@ -20939,7 +21463,7 @@ - 780 + 0x028E @@ -20947,7 +21471,7 @@ - + 0 @@ -20971,7 +21495,7 @@ - rtf:flcbMsoEnvelope + rtf:LCBUNUSED @@ -20986,10 +21510,13 @@ - + - + (FCPGD, beginning of array of fcPgd / fcBkd pairs + rgpgdbkd). + offset in table stream of the PLF that records the page descriptors + for the main text of the doc. @@ -20997,7 +21524,7 @@ - 784 + 0x0292 @@ -21005,7 +21532,7 @@ - + 0 @@ -21029,7 +21556,7 @@ - rtf:fcPlcfLad + rtf:FCPGDMOTHER @@ -21044,7 +21571,7 @@ - + @@ -21055,7 +21582,7 @@ - 788 + 0x0296 @@ -21063,7 +21590,7 @@ - + 0 @@ -21087,7 +21614,7 @@ - rtf:lcbPlcfLad + rtf:LCBPGDMOTHER @@ -21102,10 +21629,11 @@ - + - + offset in table stream of the PLCF that records the break + descriptors for the main text of the doc. @@ -21113,7 +21641,7 @@ - 792 + 0x029A @@ -21121,7 +21649,7 @@ - + 0 @@ -21145,7 +21673,7 @@ - rtf:fcRgDofr + rtf:FCBKDMOTHER @@ -21160,7 +21688,7 @@ - + @@ -21171,7 +21699,7 @@ - 796 + 0x029E @@ -21179,7 +21707,7 @@ - + 0 @@ -21203,7 +21731,7 @@ - rtf:lcbRgDofr + rtf:LCBBKDMOTHER @@ -21218,10 +21746,11 @@ - + - + offset in table stream of the PLF that records the page + descriptors for the footnote text of the doc. @@ -21229,7 +21758,7 @@ - 800 + 0x02A2 @@ -21237,7 +21766,7 @@ - + 0 @@ -21261,7 +21790,7 @@ - rtf:fcPlcosl + rtf:FCPGDFTN @@ -21276,7 +21805,7 @@ - + @@ -21287,15 +21816,74 @@ - 804 + 0x02A6 + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:LCBPGDFTN + + + + + + + + + + + + + + + + + + offset in table stream of the PLCF that records the break + descriptors for the footnote text of the doc. + + + + + + + + 0x02AA + + + + + + + + 0 @@ -21319,7 +21907,7 @@ - rtf:lcbPlcosl + rtf:FCBKDFTN @@ -21334,7 +21922,7 @@ - + @@ -21345,7 +21933,7 @@ - 808 + 0x02AE @@ -21353,7 +21941,7 @@ - + 0 @@ -21377,7 +21965,7 @@ - rtf:fcPlcfCookieOld + rtf:LCBBKDFTN @@ -21392,10 +21980,11 @@ - + - + offset in table stream of the PLF that records the page + descriptors for the endnote text of the doc. @@ -21403,7 +21992,7 @@ - 812 + 0x02B2 @@ -21411,7 +22000,7 @@ - + 0 @@ -21435,7 +22024,7 @@ - rtf:lcbPlcfCookieOld + rtf:FCPGDEDN @@ -21450,7 +22039,7 @@ - + @@ -21461,7 +22050,7 @@ - 816 + 0x02B6 @@ -21469,7 +22058,7 @@ - + 0 @@ -21493,7 +22082,7 @@ - rtf:fcPgdMotherOld + rtf:LCBPGDEDN @@ -21508,10 +22097,11 @@ - + - + offset in table stream of the PLCF that records the break + descriptors for the endnote text of the doc. @@ -21519,7 +22109,7 @@ - 820 + 0x02BA @@ -21527,7 +22117,7 @@ - + 0 @@ -21551,7 +22141,7 @@ - rtf:flcbPgdMotherOld + rtf:FCBKDEDN @@ -21566,7 +22156,7 @@ - + @@ -21577,7 +22167,7 @@ - 824 + 0x02BE @@ -21585,7 +22175,7 @@ - + 0 @@ -21609,7 +22199,7 @@ - rtf:fcPgdFtnOld + rtf:LCBBKDEDN @@ -21624,10 +22214,13 @@ - + - + offset in table stream of the STTBF containing field keywords. + This is only used in a small number of the international versions + of word. This field is no longer written to the file for nFib >= + 167. @@ -21635,7 +22228,7 @@ - 828 + 0x02C2 @@ -21643,7 +22236,7 @@ - + 0 @@ -21667,7 +22260,7 @@ - rtf:lcbPgdFtnOld + rtf:FCSTTBFINTLFLD @@ -21682,10 +22275,10 @@ - + - + Always 0 for nFib >= 167. @@ -21693,7 +22286,7 @@ - 832 + 0x02C6 @@ -21701,7 +22294,7 @@ - + 0 @@ -21725,7 +22318,7 @@ - rtf:fcBkdFtnOld + rtf:LCBSTTBFINTLFLD @@ -21740,10 +22333,10 @@ - + - + offset in table stream of a mailer routing slip. @@ -21751,7 +22344,7 @@ - 836 + 0x02CA @@ -21759,7 +22352,7 @@ - + 0 @@ -21783,7 +22376,7 @@ - rtf:lcbBkdFtnOld + rtf:FCROUTESLIP @@ -21798,7 +22391,7 @@ - + @@ -21809,7 +22402,7 @@ - 840 + 0x02CE @@ -21817,7 +22410,7 @@ - + 0 @@ -21841,7 +22434,7 @@ - rtf:fcPgdEdnOld + rtf:LCBROUTESLIP @@ -21856,10 +22449,12 @@ - + - + offset in table stream of STTBF recording the names of the + users who have saved this document alternating with the save + locations. @@ -21867,7 +22462,7 @@ - 844 + 0x02D2 @@ -21875,7 +22470,7 @@ - + 0 @@ -21899,7 +22494,7 @@ - rtf:lcbPgdEdnOld + rtf:FCSTTBSAVEDBY @@ -21914,7 +22509,7 @@ - + @@ -21925,7 +22520,7 @@ - 848 + 0x02D6 @@ -21933,7 +22528,7 @@ - + 0 @@ -21957,7 +22552,7 @@ - rtf:fcBkdEdnOld + rtf:LCBSTTBSAVEDBY @@ -21972,10 +22567,11 @@ - + - + offset in table stream of STTBF recording filenames of + documents which are referenced by this document. @@ -21983,7 +22579,7 @@ - 852 + 0x02DA @@ -21991,7 +22587,7 @@ - + 0 @@ -22015,7 +22611,7 @@ - rtf:lcbBkdEdnOld + rtf:FCSTTBFNM @@ -22029,35 +22625,11 @@ - - - - - - - - - - - - - - - - - - 6 - - - - - - + - index to BKL entry in plcfbkl that describes the - ending position of this bookmark in the CP stream. + @@ -22065,7 +22637,7 @@ - 0x0 + 0x02DE @@ -22097,14 +22669,14 @@ - rtf:IBKL + rtf:LCBSTTBFNM - + @@ -22112,11 +22684,10 @@ - + - when bkf.fCol is 1, this is the index to the first column of a - table column bookmark. + offset in the table stream of list format information. @@ -22124,7 +22695,7 @@ - 0x2 + 0x02E2 @@ -22140,7 +22711,7 @@ - 007F + @@ -22148,7 +22719,7 @@ - :7 + @@ -22156,14 +22727,14 @@ - rtf:ITCFIRST + rtf:FCPLCFLST - + @@ -22171,11 +22742,10 @@ - + - when 1, this indicates that this bookmark is marking the range - of a Macintosh Publisher section. + @@ -22183,7 +22753,7 @@ - 0x2 + 0x02E6 @@ -22191,7 +22761,7 @@ - 7 + 0 @@ -22199,7 +22769,7 @@ - 0080 + @@ -22207,7 +22777,7 @@ - :1 + @@ -22215,14 +22785,14 @@ - rtf:FPUB + rtf:LCBPLCFLST - + @@ -22230,11 +22800,11 @@ - + - when bkf.fCol is 1, this is the index to limit column of a - table column bookmark. + offset in the table stream of list format override + information. @@ -22242,7 +22812,7 @@ - 0x2 + 0x02EA @@ -22250,7 +22820,7 @@ - 8 + 0 @@ -22258,7 +22828,7 @@ - 7F00 + @@ -22266,7 +22836,7 @@ - :7 + @@ -22274,14 +22844,14 @@ - rtf:ITCLIM + rtf:FCPLFLFO - + @@ -22289,11 +22859,10 @@ - + - when 1, this bookmark marks a range of columns in a table - specified by [bkf.itcFirst, bkf.itcLim). + @@ -22301,7 +22870,7 @@ - 0x2 + 0x02EE @@ -22309,7 +22878,7 @@ - 15 + 0 @@ -22317,7 +22886,7 @@ - 8000 + @@ -22325,7 +22894,7 @@ - :1 + @@ -22333,51 +22902,26 @@ - rtf:FCOL + rtf:LCBPLFLFO - + - - - - - - - - - - - - - - - - - - - - - 12 - - - - - - + - used internally by Word + offset in the table stream of the textbox break table (a PLCF + of BKDs) for the main document @@ -22385,7 +22929,7 @@ - 0x0 + 0x02F2 @@ -22417,14 +22961,14 @@ - rtf:FN + rtf:FCPLCFTXBXBKD - + @@ -22432,13 +22976,10 @@ - + - file offset in main stream to beginning of SEPX stored for - section. If sed.fcSepx == 0xFFFFFFFF, the section properties for - the section are equal to the standard SEP (see SEP - definition). + @@ -22446,7 +22987,4101 @@ - 0x2 + 0x02F6 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFTXBXBKD + + + + + + + + + + + + + + + + + + offset in the table stream of the textbox break table (a PLCF + of BKDs) for the header subdocument + + + + + + + + 0x02FA + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFTXBXHDRBKD + + + + + + + + + + + + + + + + + + + + + + + + + + 0x02FE + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFTXBXHDRBKD + + + + + + + + + + + + + + + + + + offset in main stream of undocumented undo / versioning + data + + + + + + + + 0x0302 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCDOCUNDO + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0306 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBDOCUNDO + + + + + + + + + + + + + + + + + + offset in main stream of undocumented undo / versioning + data + + + + + + + + 0x030A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCRGBUSE + + + + + + + + + + + + + + + + + + + + + + + + + + 0x030E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBRGBUSE + + + + + + + + + + + + + + + + + + offset in main stream of undocumented undo / versioning + data + + + + + + + + 0x0312 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCUSP + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0316 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBUSP + + + + + + + + + + + + + + + + + + offset in table stream of undocumented undo / versioning + data + + + + + + + + 0x031A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCUSKF + + + + + + + + + + + + + + + + + + + + + + + + + + 0x031E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBUSKF + + + + + + + + + + + + + + + + + + offset in table stream of undocumented undo / versioning + data + + + + + + + + 0x0322 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCUPCRGBUSE + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0326 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCUPCRGBUSE + + + + + + + + + + + + + + + + + + offset in table stream of undocumented undo / versioning + data + + + + + + + + 0x032A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCUPCUSP + + + + + + + + + + + + + + + + + + + + + + + + + + 0x032E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCUPCUSP + + + + + + + + + + + + + + + + + + offset in table stream of string table of style names for + glossary entries + + + + + + + + 0x0332 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCSTTBGLSYSTYLE + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0336 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBSTTBGLSYSTYLE + + + + + + + + + + + + + + + + + + offset in table stream of undocumented grammar options PL + + + + + + + + 0x033A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLGOSL + + + + + + + + + + + + + + + + + + + + + + + + + + 0x033E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLGOSL + + + + + + + + + + + + + + + + + + offset in table stream of undocumented ocx data + + + + + + + + 0x0342 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCOCX + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0346 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCOCX + + + + + + + + + + + + + + + + + + offset in table stream of character property bin table.PLC. FCs + in PLC are file offsets. Describes text of main document and all + subdocuments. + + + + + + + + 0x034A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFBTELVC + + + + + + + + + + + + + + + + + + + + + + + + + + 0x034E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFBTELVC + + + + + + + + + + + + + + + + + + (a.k.a FILETIME ftModified) + + + + + + + + 0x0352 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:DWLOWDATETIME + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0356 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:DWHIGHDATETIME + + + + + + + + + + + + + + + + + + offset in table stream of LVC PLCF + + + + + + + + 0x035A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFLVC + + + + + + + + + + + + + + + + + + size of LVC PLCF, ==0 for non-complex files + + + + + + + + 0x035E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFLVC + + + + + + + + + + + + + + + + + + offset in table stream of autosummary ASUMY PLCF. + + + + + + + + 0x0362 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCASUMY + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0366 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCASUMY + + + + + + + + + + + + + + + + + + offset in table stream of PLCF (of SPLS structures) which + records grammar check state + + + + + + + + 0x036A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFGRAM + + + + + + + + + + + + + + + + + + + + + + + + + + 0x036E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFGRAM + + + + + + + + + + + + + + + + + + offset in table stream of list names string table + + + + + + + + 0x0372 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCSTTBLISTNAMES + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0376 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBSTTBLISTNAMES + + + + + + + + + + + + + + + + + + offset in table stream of undocumented undo / versioning + data + + + + + + + + 0x037A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCSTTBFUSSR + + + + + + + + + + + + + + + + + + + + + + + + + + 0x037E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBSTTBFUSSR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 856 + + + + + + + + + + + + + + + + + + 744 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcfTch + + + + + + + + + + + + + + + + + + + + + + + + + + 748 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcfTch + + + + + + + + + + + + + + + + + + + + + + + + + + 752 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcRmdThreading + + + + + + + + + + + + + + + + + + + + + + + + + + 756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbRmdThreading + + + + + + + + + + + + + + + + + + + + + + + + + + 760 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcMid + + + + + + + + + + + + + + + + + + + + + + + + + + 764 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbMid + + + + + + + + + + + + + + + + + + + + + + + + + + 768 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcSttbRgtplc + + + + + + + + + + + + + + + + + + + + + + + + + + 772 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbSttbRgtplc + + + + + + + + + + + + + + + + + + + + + + + + + + 776 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcMsoEnvelope + + + + + + + + + + + + + + + + + + + + + + + + + + 780 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:flcbMsoEnvelope + + + + + + + + + + + + + + + + + + + + + + + + + + 784 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcfLad + + + + + + + + + + + + + + + + + + + + + + + + + + 788 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcfLad + + + + + + + + + + + + + + + + + + + + + + + + + + 792 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcRgDofr + + + + + + + + + + + + + + + + + + + + + + + + + + 796 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbRgDofr + + + + + + + + + + + + + + + + + + + + + + + + + + 800 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcosl + + + + + + + + + + + + + + + + + + + + + + + + + + 804 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcosl + + + + + + + + + + + + + + + + + + + + + + + + + + 808 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcfCookieOld + + + + + + + + + + + + + + + + + + + + + + + + + + 812 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcfCookieOld + + + + + + + + + + + + + + + + + + + + + + + + + + 816 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPgdMotherOld + + + + + + + + + + + + + + + + + + + + + + + + + + 820 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:flcbPgdMotherOld + + + + + + + + + + + + + + + + + + + + + + + + + + 824 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPgdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 828 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPgdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 832 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcBkdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 836 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbBkdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 840 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPgdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 844 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPgdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 848 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcBkdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 852 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbBkdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + + + + + + + + index to BKL entry in plcfbkl that describes the + ending position of this bookmark in the CP stream. + + + + + + + + 0x0 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:IBKL + + + + + + + + + + + + + + + + + + when bkf.fCol is 1, this is the index to the first column of a + table column bookmark. + + + + + + + + 0x2 + + + + + + + + 0 + + + + + + + + 007F + + + + + + + + :7 + + + + + + + + rtf:ITCFIRST + + + + + + + + + + + + + + + + + + when 1, this indicates that this bookmark is marking the range + of a Macintosh Publisher section. + + + + + + + + 0x2 + + + + + + + + 7 + + + + + + + + 0080 + + + + + + + + :1 + + + + + + + + rtf:FPUB + + + + + + + + + + + + + + + + + + when bkf.fCol is 1, this is the index to limit column of a + table column bookmark. + + + + + + + + 0x2 + + + + + + + + 8 + + + + + + + + 7F00 + + + + + + + + :7 + + + + + + + + rtf:ITCLIM + + + + + + + + + + + + + + + + + + when 1, this bookmark marks a range of columns in a table + specified by [bkf.itcFirst, bkf.itcLim). + + + + + + + + 0x2 + + + + + + + + 15 + + + + + + + + 8000 + + + + + + + + :1 + + + + + + + + rtf:FCOL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12 + + + + + + + + + + used internally by Word + + + + + + + + 0x0 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FN + + + + + + + + + + + + + + + + + + file offset in main stream to beginning of SEPX stored for + section. If sed.fcSepx == 0xFFFFFFFF, the section properties for + the section are equal to the standard SEP (see SEP + definition). + + + + + + + + 0x2 @@ -22897,6 +27532,9 @@ + + + 10 @@ -32214,6 +36852,9 @@ + + + 0xC60D @@ -38863,6 +43504,9 @@ + + + 0xD609 @@ -40194,6 +44838,9 @@ + + + 0xD61A @@ -40258,6 +44905,9 @@ + + + 0xD61B @@ -40322,6 +44972,9 @@ + + + 0xD61C @@ -40386,6 +45039,9 @@ + + + 0xD61D @@ -40450,6 +45106,9 @@ + + + 0xD613 @@ -40963,6 +45622,9 @@ + + + 0xd670 @@ -43371,7 +48033,7 @@ - 0 + 2 @@ -43429,7 +48091,7 @@ - 0 + 2 @@ -43487,7 +48149,7 @@ - 0 + 2 diff --git a/writerfilter/source/doctok/resources.xsl b/writerfilter/source/doctok/resources.xsl index e1fc68ba5..5ff0efe0e 100644 --- a/writerfilter/source/doctok/resources.xsl +++ b/writerfilter/source/doctok/resources.xsl @@ -301,14 +301,15 @@ class */ static sal_uInt32 getSize() { return - ; } - + ; } + + /** Calculate actual size. */ - sal_uInt32 calcSize(); - - + sal_uInt32 calcSize(); + + /** @@ -319,13 +320,15 @@ class sal_uInt32 getEntryOffset(sal_uInt32 nIndex) { return entryOffsets[nIndex]; - } - + } + + /** Calculate offset for payload. */ - sal_uInt32 calcPayloadOffset(); - + sal_uInt32 calcPayloadOffset(); + + /** Set offset for payloads. diff --git a/writerfilter/source/doctok/util.hxx b/writerfilter/source/doctok/util.hxx deleted file mode 100644 index 39d9d1835..000000000 --- a/writerfilter/source/doctok/util.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_UTIL_HXX -#define INCLUDED_UTIL_HXX - -#include -#include - -namespace writerfilter { -namespace doctok { -using namespace ::std; - -/** - Assertion - - @bTest if false the assertion is raised -*/ -void util_assert(bool bTest); - -/** - Print string to ostream. - - Printable characters are passed without change. Non-printable - characters are replaced by '.'. - - @param o ostream for output - @param str string to print - */ -void printBytes(ostream & o, const string & str); -}} - -#endif // INCLUDED_UTIL_HXX diff --git a/writerfilter/source/doctok/xmigen.xsl b/writerfilter/source/doctok/xmigen.xsl index d6eab5846..f184dcfed 100644 --- a/writerfilter/source/doctok/xmigen.xsl +++ b/writerfilter/source/doctok/xmigen.xsl @@ -184,6 +184,76 @@ + + + + YES + NO + + + + + + + + + + + + + + + + + + + sprmcode + + + + sprmid + + + + kind + + + + + + + Properties + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + @@ -278,7 +348,7 @@ - + diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index 28fbfe10c..deac8c27d 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -87,13 +87,18 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes } #ifdef DEBUG_ELEMENT - writerfilter::TagLogger::Pointer_t debugLogger - (writerfilter::TagLogger::getInstance("DEBUG")); - debugLogger->startDocument(); - - writerfilter::TagLogger::Pointer_t dmapperLogger - (writerfilter::TagLogger::getInstance("DOMAINMAPPER")); - dmapperLogger->startDocument(); + OUString sURL = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL(), OUString() ); + ::std::string sURLc = OUStringToOString(sURL, RTL_TEXTENCODING_ASCII_US).getStr(); + + writerfilter::TagLogger::Pointer_t debugLogger + (writerfilter::TagLogger::getInstance("DEBUG")); + debugLogger->setFileName(sURLc); + debugLogger->startDocument(); + + writerfilter::TagLogger::Pointer_t dmapperLogger + (writerfilter::TagLogger::getInstance("DOMAINMAPPER")); + dmapperLogger->setFileName(sURLc); + dmapperLogger->startDocument(); #endif writerfilter::dmapper::SourceDocumentType eType = diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index e7369a859..7d292db06 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -42,7 +42,11 @@ using ::com::sun::star::xml::sax::SAXException; namespace writerfilter { namespace ooxml { + +#ifdef DEBUG TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG")); +#endif + using namespace ::std; OOXMLDocumentImpl::OOXMLDocumentImpl diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx index 80f0ebfb2..9607478d0 100755 --- a/writerfilter/source/ooxml/OOXMLFactory.cxx +++ b/writerfilter/source/ooxml/OOXMLFactory.cxx @@ -262,8 +262,14 @@ OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler, Id nDefine = pHandler->getDefine(); OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); - - return createFastChildContextFromFactory(pHandler, pFactory, Element); + + uno::Reference< xml::sax::XFastContextHandler> ret; + + //Avoid handling unknown tokens and recursing to death + if ((Element & 0xffff) < OOXML_FAST_TOKENS_END) + ret = createFastChildContextFromFactory(pHandler, pFactory, Element); + + return ret; } void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler, diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 37f5d11be..8c8ffaf92 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -100,7 +100,7 @@ static string resourceToString set aSetContexts; - +#ifdef DEBUG class OOXMLIdToString : public IdToString { public: @@ -119,6 +119,7 @@ public: return s; } }; +#endif /* class OOXMLFastContextHandler @@ -136,8 +137,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler mnTableDepth(0), mnInstanceNumber(mnInstanceCount), mnRefCount(0), - m_xContext(context), - mbFallback(false) + m_xContext(context) { mnInstanceCount++; aSetContexts.insert(this); @@ -159,7 +159,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler mnTableDepth(0), mnInstanceNumber(mnInstanceCount), mnRefCount(0), - mbFallback(false) + m_xContext(pContext->m_xContext) { if (pContext != NULL) { @@ -182,29 +182,6 @@ OOXMLFastContextHandler::~OOXMLFastContextHandler() aSetContexts.erase(this); } -void OOXMLFastContextHandler::dumpOpenContexts() -{ - debug_logger->startElement("open-contexts"); - XMLTag aTag("open-contexts"); - - set::iterator aIt(aSetContexts.begin()); - while (aIt != aSetContexts.end()) - { - debug_logger->startElement("open-context"); - debug_logger->addTag((*aIt)->toTag()); - debug_logger->endElement("open-context"); - - aIt++; - } - - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%" SAL_PRI_SIZET "u", - aSetContexts.size()); - - debug_logger->attribute("count", buffer); - debug_logger->endElement("open-contexts"); -} - #ifdef DEBUG_MEMORY void SAL_CALL OOXMLFastContextHandler::acquire() throw () @@ -232,11 +209,6 @@ void SAL_CALL OOXMLFastContextHandler::release() } #endif -sal_uInt32 OOXMLFastContextHandler::getInstanceNumber() const -{ - return mnInstanceNumber; -} - // ::com::sun::star::xml::sax::XFastContextHandler: void SAL_CALL OOXMLFastContextHandler::startFastElement (Token_t Element, @@ -462,6 +434,7 @@ void OOXMLFastContextHandler::lcl_endAction(Token_t Element) OOXMLFactory::getInstance()->endAction(this, Element); } +#ifdef DEBUG XMLTag::Pointer_t OOXMLFastContextHandler::toPropertiesTag (OOXMLPropertySet::Pointer_t pProps) { @@ -511,6 +484,7 @@ string OOXMLFastContextHandler::toString() const { return toTag()->toString(); } +#endif string OOXMLFastContextHandler::getResourceString() const { @@ -548,16 +522,6 @@ Id OOXMLFastContextHandler::getDefine() const return mnDefine; } -void OOXMLFastContextHandler::setFallback(bool bFallback) -{ - mbFallback = bFallback; -} - -bool OOXMLFastContextHandler::isFallback() const -{ - return mbFallback; -} - OOXMLParserState::Pointer_t OOXMLFastContextHandler::getParserState() const { return mpParserState; @@ -1030,26 +994,6 @@ void OOXMLFastContextHandler::sendTableProperties() #endif } -void OOXMLFastContextHandler::clearCellProps() -{ -#ifdef DEBUG_ELEMENT - debug_logger->element("clearCellProps"); -#endif - - mpParserState->setCellProperties(OOXMLPropertySet::Pointer_t - (new OOXMLPropertySetImpl())); -} - -void OOXMLFastContextHandler::clearRowProps() -{ -#ifdef DEBUG_ELEMENT - debug_logger->element("clearRowProps"); -#endif - - mpParserState->setRowProperties(OOXMLPropertySet::Pointer_t - (new OOXMLPropertySetImpl())); -} - void OOXMLFastContextHandler::clearTableProps() { #ifdef DEBUG_ELEMENT @@ -1107,11 +1051,6 @@ void OOXMLFastContextHandler::setDefaultStringValue() { } -const ::rtl::OUString & OOXMLFastContextHandler::getText() const -{ - return aEmptyStr; -} - void OOXMLFastContextHandler::setDocument(OOXMLDocument * pDocument) { mpParserState->setDocument(pDocument); @@ -1295,19 +1234,6 @@ OOXMLFastContextHandler::getComponentContext() return m_xContext; } -/* - class OOXMLFastContextHandlerNoResource - */ -OOXMLFastContextHandlerNoResource::OOXMLFastContextHandlerNoResource -(OOXMLFastContextHandler * pContext) -: OOXMLFastContextHandler(pContext) -{ -} - -OOXMLFastContextHandlerNoResource::~OOXMLFastContextHandlerNoResource() -{ -} - /* class OOXMLFastContextHandlerStream */ @@ -1352,12 +1278,6 @@ void OOXMLFastContextHandlerStream::sendProperty(Id nId) sText.getLength()); } -void OOXMLFastContextHandlerStream::setPropertySetAttrs -(OOXMLPropertySet::Pointer_t pPropertySetAttrs) -{ - mpPropertySetAttrs = pPropertySetAttrs; -} - OOXMLPropertySet::Pointer_t OOXMLFastContextHandlerStream::getPropertySetAttrs() const { @@ -1439,6 +1359,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerProperties::getValue() const return OOXMLValue::Pointer_t(new OOXMLPropertySetValue(mpPropertySet)); } +#ifdef DEBUG XMLTag::Pointer_t OOXMLFastContextHandlerProperties::toTag() const { XMLTag::Pointer_t pTag(OOXMLFastContextHandler::toTag()); @@ -1446,6 +1367,7 @@ XMLTag::Pointer_t OOXMLFastContextHandlerProperties::toTag() const return pTag; } +#endif void OOXMLFastContextHandlerProperties::newProperty (const Id & rId, OOXMLValue::Pointer_t pVal) @@ -1980,72 +1902,6 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement class OOXMLFastContextHandlerShape */ -class ShapesNoAdd: - public ::cppu::WeakImplHelper1< - drawing::XShapes> -{ -public: - explicit ShapesNoAdd(uno::Reference< uno::XComponentContext > const & context, uno::Reference< drawing::XShapes> const & xShapes); - -private: - // container::XElementAccess: - virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException); - - // container::XIndexAccess: - virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException); - virtual uno::Any SAL_CALL getByIndex(::sal_Int32 Index) throw (uno::RuntimeException, lang::IndexOutOfBoundsException, lang::WrappedTargetException); - - // drawing::XShapes: - virtual void SAL_CALL add(const uno::Reference< drawing::XShape > & xShape) throw (uno::RuntimeException); - virtual void SAL_CALL remove(const uno::Reference< drawing::XShape > & xShape) throw (uno::RuntimeException); - - ShapesNoAdd(ShapesNoAdd &); // not defined - void operator =(ShapesNoAdd &); // not defined - - virtual ~ShapesNoAdd() {} - - uno::Reference< uno::XComponentContext > m_xContext; - uno::Reference< drawing::XShapes > m_xShapes; -}; - -ShapesNoAdd::ShapesNoAdd(uno::Reference< uno::XComponentContext > const & context, uno::Reference< drawing::XShapes> const & xShapes) : -m_xContext(context), m_xShapes(xShapes) -{} - -// container::XElementAccess: -uno::Type SAL_CALL ShapesNoAdd::getElementType() throw (uno::RuntimeException) -{ - return m_xShapes->getElementType(); -} - -::sal_Bool SAL_CALL ShapesNoAdd::hasElements() throw (uno::RuntimeException) -{ - return m_xShapes->hasElements(); -} - -// container::XIndexAccess: -::sal_Int32 SAL_CALL ShapesNoAdd::getCount() throw (uno::RuntimeException) -{ - return m_xShapes->getCount(); -} - -uno::Any SAL_CALL ShapesNoAdd::getByIndex(::sal_Int32 Index) throw (uno::RuntimeException, lang::IndexOutOfBoundsException, lang::WrappedTargetException) -{ - return m_xShapes->getByIndex(Index); -} - -// drawing::XShapes: -void SAL_CALL ShapesNoAdd::add(const uno::Reference< drawing::XShape > & - ) throw (uno::RuntimeException) -{ -} - -void SAL_CALL ShapesNoAdd::remove(const uno::Reference< drawing::XShape > & xShape) throw (uno::RuntimeException) -{ - m_xShapes->remove(xShape); -} - OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape (OOXMLFastContextHandler * pContext) : OOXMLFastContextHandlerProperties(pContext), m_bShapeSent( false ), diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index a0bd21ee6..90348979a 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -132,10 +132,6 @@ public: virtual ResourceEnum_t getResource() const { return STREAM; } - static XMLTag::Pointer_t toPropertiesTag(OOXMLPropertySet::Pointer_t); - virtual XMLTag::Pointer_t toTag() const; - virtual string toString() const; - virtual void attributes (const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); @@ -179,18 +175,9 @@ public: void setDefine(Id nDefine); Id getDefine() const; - void setFallback(bool bFallbac); - bool isFallback() const; OOXMLParserState::Pointer_t getParserState() const; -#ifdef DEBUG_MEMORY - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); -#endif - - sal_uInt32 getInstanceNumber() const; - void sendTableDepth() const; void setHandle(); @@ -227,8 +214,6 @@ public: void sendCellProperties(); void sendRowProperties(); void sendTableProperties(); - void clearCellProps(); - void clearRowProps(); void clearTableProps(); void clearProps(); @@ -237,10 +222,18 @@ public: virtual void setDefaultHexValue(); virtual void setDefaultStringValue(); - const ::rtl::OUString & getText() const; - void sendPropertyToParent(); - static void dumpOpenContexts(); + +#ifdef DEBUG + static XMLTag::Pointer_t toPropertiesTag(OOXMLPropertySet::Pointer_t); + virtual XMLTag::Pointer_t toTag() const; + virtual string toString() const; +#endif + +#ifdef DEBUG_MEMORY + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); +#endif protected: OOXMLFastContextHandler * mpParent; @@ -302,14 +295,6 @@ private: static sal_uInt32 mnInstanceCount; - bool mbFallback; -}; - -class OOXMLFastContextHandlerNoResource : public OOXMLFastContextHandler -{ -public: - OOXMLFastContextHandlerNoResource(OOXMLFastContextHandler * pContext); - virtual ~OOXMLFastContextHandlerNoResource(); }; class OOXMLFastContextHandlerStream : public OOXMLFastContextHandler @@ -329,10 +314,10 @@ public: void handleHyperlink(); protected: - void setPropertySetAttrs(OOXMLPropertySet::Pointer_t pPropertySetAttrs); virtual void resolvePropertySetAttrs(); virtual void lcl_characters(const ::rtl::OUString & aChars) throw (uno::RuntimeException, xml::sax::SAXException); + private: mutable OOXMLPropertySet::Pointer_t mpPropertySetAttrs; }; @@ -346,8 +331,6 @@ public: virtual OOXMLValue::Pointer_t getValue() const; virtual ResourceEnum_t getResource() const { return PROPERTIES; } - virtual XMLTag::Pointer_t toTag() const; - virtual void newProperty(const Id & nId, OOXMLValue::Pointer_t pVal); void handleXNotes(); @@ -360,6 +343,10 @@ public: virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet); virtual OOXMLPropertySet::Pointer_t getPropertySet() const; +#ifdef DEBUG + virtual XMLTag::Pointer_t toTag() const; +#endif + protected: /// the properties OOXMLPropertySet::Pointer_t mpPropertySet; diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx index 0cf7373f0..2f0ac8d25 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx @@ -152,13 +152,6 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL return OOXMLFactory::getInstance()->createFastChildContextFromStart(getContextHandler().get(), Element); } -OOXMLParserState::Pointer_t OOXMLFastDocumentHandler::getParserState() const -{ - OOXMLParserState::Pointer_t pParserState; - - return getContextHandler()->getParserState(); -} - uno::Reference< xml::sax::XFastContextHandler > SAL_CALL OOXMLFastDocumentHandler::createUnknownChildContext (const ::rtl::OUString & diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx index cd50a70f9..ee6b762aa 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx @@ -95,8 +95,6 @@ public: void setDocument(OOXMLDocument * pDocument); void setXNoteId(const ::rtl::OUString & rXNoteId); - OOXMLParserState::Pointer_t getParserState() const; - void setIsSubstream( bool bSubstream ); private: diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx index c7b32ad49..242615e37 100644 --- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx +++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx @@ -84,8 +84,6 @@ OOXMLFastHelper::createAndSetParent debug_logger->attribute("context", pHandler->getType()); debug_logger->attribute("token", fastTokenToId(pTmp->getToken())); debug_logger->attribute("id", (*QNameToString::Instance())(nId)); - if (pTmp->isFallback()) - debug_logger->attribute("fallback", "yes"); debug_logger->startElement("created"); debug_logger->addTag(pTmp->toTag()); @@ -119,8 +117,6 @@ OOXMLFastHelper::createAndSetParentAndDefine snprintf(buffer, sizeof(buffer), "0x%08" SAL_PRIxUINT32, nId); debug_logger->attribute("idnum", buffer); - if (pTmp->isFallback()) - debug_logger->attribute("fallback", "yes"); debug_logger->startElement("created"); debug_logger->addTag(pTmp->toTag()); @@ -158,9 +154,6 @@ OOXMLFastHelper::createAndSetParentRef debug_logger->attribute("context", pHandler->getType()); debug_logger->attribute("type", fastTokenToId(nToken)); - if (pTmp->isFallback()) - debug_logger->attribute("fallback", "yes"); - debug_logger->startElement("created"); debug_logger->chars(pTmp->getType()); debug_logger->endElement("created"); diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx index 9624f9461..bafcb149c 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.cxx +++ b/writerfilter/source/ooxml/OOXMLParserState.cxx @@ -103,11 +103,6 @@ bool OOXMLParserState::isForwardEvents() const return mbForwardEvents; } -void OOXMLParserState::incContextCount() -{ - mnContexts++; -} - const string OOXMLParserState::getHandle() const { char sBuffer[256]; @@ -122,11 +117,6 @@ void OOXMLParserState::setHandle() mnHandle = mnContexts; } -unsigned int OOXMLParserState::getContextCount() const -{ - return mnContexts; -} - void OOXMLParserState::setDocument(OOXMLDocument * pDocument) { mpDocument = pDocument; @@ -147,44 +137,11 @@ const rtl::OUString & OOXMLParserState::getXNoteId() const return mpDocument->getXNoteId(); } -void OOXMLParserState::setXNoteType(const Id & rId) -{ - mpDocument->setXNoteType(rId); -} - -const Id & OOXMLParserState::getXNoteType() const -{ - return mpDocument->getXNoteType(); -} - const ::rtl::OUString & OOXMLParserState::getTarget() const { return mpDocument->getTarget(); } -void OOXMLParserState::newCharacterProperty(const Id & rId, - OOXMLValue::Pointer_t pVal) -{ - if (rId != 0x0) - { - if (mpCharacterProps.get() == NULL) - mpCharacterProps = - OOXMLPropertySet::Pointer_t(new OOXMLPropertySetImpl()); - - OOXMLPropertyImpl::Pointer_t pProperty - (new OOXMLPropertyImpl(rId, pVal, OOXMLPropertyImpl::ATTRIBUTE)); - -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("chars(pProperty->toString()); - debug_logger->endElement("newCharacterProperty"); -#endif - - mpCharacterProps->add(pProperty); - } - -} - void OOXMLParserState::resolveCharacterProperties(Stream & rStream) { if (mpCharacterProps.get() != NULL) @@ -202,11 +159,6 @@ void OOXMLParserState::resolveCharacterProperties(Stream & rStream) } } -OOXMLPropertySet::Pointer_t OOXMLParserState::getCharacterProperties() const -{ - return mpCharacterProps; -} - void OOXMLParserState::setCharacterProperties (OOXMLPropertySet::Pointer_t pProps) { @@ -316,7 +268,23 @@ void OOXMLParserState::endTable() mRowProps.pop(); mTableProps.pop(); } - + +void OOXMLParserState::incContextCount() +{ + mnContexts++; +} + +#ifdef DEBUG +unsigned int OOXMLParserState::getContextCount() const +{ + return mnContexts; +} + +string OOXMLParserState::toString() const +{ + return toTag()->toString(); +} + XMLTag::Pointer_t OOXMLParserState::toTag() const { XMLTag::Pointer_t pTag(new XMLTag("parserstate")); @@ -352,10 +320,6 @@ XMLTag::Pointer_t OOXMLParserState::toTag() const return pTag; } - -string OOXMLParserState::toString() const -{ - return toTag()->toString(); -} +#endif }} diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx index 8a893dbcd..2182cbc4f 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.hxx +++ b/writerfilter/source/ooxml/OOXMLParserState.hxx @@ -29,9 +29,12 @@ #include #include -#include #include "OOXMLPropertySetImpl.hxx" +#ifdef DEBUG +#include +#endif + namespace writerfilter { namespace ooxml { @@ -76,24 +79,18 @@ public: void setForwardEvents(bool bForwardEvents); bool isForwardEvents() const; - void incContextCount(); const string getHandle() const; void setHandle(); - unsigned int getContextCount() const; void setDocument(OOXMLDocument * pDocument); OOXMLDocument * getDocument() const; void setXNoteId(const rtl::OUString & rId); const rtl::OUString & getXNoteId() const; - void setXNoteType(const Id & rId); - const Id & getXNoteType() const; const rtl::OUString & getTarget() const; - void newCharacterProperty(const Id & rId, OOXMLValue::Pointer_t pVal); void resolveCharacterProperties(Stream & rStream); - OOXMLPropertySet::Pointer_t getCharacterProperties() const; void setCharacterProperties(OOXMLPropertySet::Pointer_t pProps); void resolveCellProperties(Stream & rStream); void setCellProperties(OOXMLPropertySet::Pointer_t pProps); @@ -105,8 +102,15 @@ public: void startTable(); void endTable(); + void incContextCount(); + +#ifdef DEBUG +public: + unsigned int getContextCount() const; string toString() const; XMLTag::Pointer_t toTag() const; +#endif + }; }} diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index f1d314df1..fbbe9334b 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -198,10 +198,6 @@ OOXMLValue::OOXMLValue() { } -OOXMLValue::OOXMLValue(const rtl::OUString & /*rValue*/) -{ -} - OOXMLValue::~OOXMLValue() { } @@ -658,24 +654,6 @@ string OOXMLHexValue::toString() const return buffer; } -/* - class OOXMLListValue -*/ -OOXMLListValue::OOXMLListValue() -: OOXMLIntegerValue(0) -{ -} - -OOXMLListValue::OOXMLListValue(sal_Int32 nValue) -: OOXMLIntegerValue(nValue) -{ -} - - -OOXMLListValue::~OOXMLListValue() -{ -} - /* class OOXMLShapeValue */ diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx index 254f39ed9..a558f8a25 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx @@ -48,7 +48,6 @@ class OOXMLValue : public Value { public: typedef boost::shared_ptr Pointer_t; - OOXMLValue(const rtl::OUString & rValue); OOXMLValue(); virtual ~OOXMLValue(); @@ -222,14 +221,6 @@ public: virtual OOXMLValue * clone() const; }; -class OOXMLListValue : public OOXMLIntegerValue -{ -public: - OOXMLListValue(); - OOXMLListValue(sal_Int32 nValue); - virtual ~OOXMLListValue(); -}; - class OOXMLShapeValue : public OOXMLValue { protected: diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx index d4dbb3d41..386442c79 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx @@ -68,22 +68,6 @@ OOXMLStreamImpl::OOXMLStreamImpl init(); } -OOXMLStreamImpl::OOXMLStreamImpl -(uno::Reference xContext, - uno::Reference xStorageStream, const rtl::OUString & rId) -: mxContext(xContext), - mxStorageStream(xStorageStream), - mnStreamType(UNKNOWN), - msId(rId) -{ - mxStorage.set - (comphelper::OStorageHelper::GetStorageOfFormatFromInputStream - (OFOPXML_STORAGE_FORMAT_STRING, mxStorageStream)); - mxRelationshipAccess.set(mxStorage, uno::UNO_QUERY_THROW); - - init(); -} - OOXMLStreamImpl::OOXMLStreamImpl (OOXMLStreamImpl & rOOXMLStream, const rtl::OUString & rId) : mxContext(rOOXMLStream.mxContext), diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx index c0b8e15a7..3d1cef5a0 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx @@ -71,10 +71,6 @@ public: uno::Reference xStorageStream, StreamType_t nType); OOXMLStreamImpl(OOXMLStreamImpl & rStream, const rtl::OUString & rId); - OOXMLStreamImpl - (uno::Reference xContext, - uno::Reference xStorageStream, - const rtl::OUString & rId); virtual ~OOXMLStreamImpl(); diff --git a/writerfilter/source/ooxml/attrsprm.xsl b/writerfilter/source/ooxml/attrsprm.xsl new file mode 100644 index 000000000..9351b1b87 --- /dev/null +++ b/writerfilter/source/ooxml/attrsprm.xsl @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + resolve + + + set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/dummyannotate.xsl b/writerfilter/source/ooxml/dummyannotate.xsl index 029fd6aef..0fcc1e0dc 100644 --- a/writerfilter/source/ooxml/dummyannotate.xsl +++ b/writerfilter/source/ooxml/dummyannotate.xsl @@ -838,7 +838,7 @@ sed "s/wml/ - diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl index 55d986932..533c3d16a 100644 --- a/writerfilter/source/ooxml/factoryimpl_ns.xsl +++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl @@ -150,7 +150,20 @@ for a rng:define --> + + + + + + + + + + + // + + @@ -161,6 +174,9 @@ for a rng:define String + + String + @@ -201,13 +217,6 @@ for a rng:define - - - - - - - @@ -283,25 +292,6 @@ ListValueMapPointer - - - - - - - - - (*pMap)[ - - ] = CreateElement(RT_ - - , - - - - ); - - @@ -329,6 +319,25 @@ ListValueMapPointer + + + + + + + + + (*pMap)[ + + ] = CreateElement(RT_ + + , + + + + ); + + @@ -610,6 +619,25 @@ string + + + + + + + + + + + + + + + + + + @@ -630,25 +658,6 @@ string - - - - - - - - - - - - - - - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl deleted file mode 100644 index 990490731..000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-shapeProperties - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 15bb57e18..b7046a495 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -19,6 +19,7 @@ + @@ -14105,7 +14106,7 @@ Cryptographic Hashing Algorithm - + Iterations to Run Hashing Algorithm @@ -15079,7 +15080,7 @@ - + Text Box Form Field Type Values @@ -15206,7 +15207,7 @@ - + Help Text Type @@ -15216,7 +15217,7 @@ - + Status Text Type @@ -15750,15 +15751,15 @@ - + Document Grid Type - + Document Grid Line Pitch - + Document Grid Character Pitch @@ -21754,11 +21755,11 @@ - lrTb - tbRl - btLr - lrTbV - tbRlV + lrTb + tbRl + btLr + lrTbV + tbRlV tbLrV @@ -21855,6 +21856,24 @@ + + + + + + + + + + + + + + + + + + @@ -22037,6 +22056,8 @@ + + @@ -22046,6 +22067,23 @@ + + + + + + + + + + + + + + + + + continuous nextColumn @@ -22209,6 +22247,11 @@ linesAndChars snapToChars + + + + + even default @@ -22429,10 +22472,10 @@ - + - + diff --git a/writerfilter/source/ooxml/ooxmlLoggers.hxx b/writerfilter/source/ooxml/ooxmlLoggers.hxx index 4c0f75c3f..badaf0fca 100644 --- a/writerfilter/source/ooxml/ooxmlLoggers.hxx +++ b/writerfilter/source/ooxml/ooxmlLoggers.hxx @@ -28,6 +28,8 @@ #ifndef INCLUDED_OOXML_LOGGERS_HXX #define INCLUDED_OOXML_LOGGERS_HXX +#ifdef DEBUG + #include namespace writerfilter { @@ -35,4 +37,5 @@ namespace writerfilter { extern TagLogger::Pointer_t debug_logger; } } +#endif #endif // INCLUDED_OOXML_LOGGERS_HXX diff --git a/writerfilter/source/ooxml/status.sh b/writerfilter/source/ooxml/status.sh index 76984a7a9..61b02bd3a 100755 --- a/writerfilter/source/ooxml/status.sh +++ b/writerfilter/source/ooxml/status.sh @@ -8,15 +8,13 @@ echo "" xsltproc analyzemodel.xsl model.xml | tail -n +2 -mdfind -onlyin $SEARCHIN "case NS_" | -xargs -J % grep -A 1 -n "case NS_" % | -grep "cxx" | +find $SEARCHIN -name "*.cxx" -exec grep -nH -A 1 "case NS_" {} \; | grep -v "//.*case NS_" | sed 's#'$SEARCHIN'##' | sed 's#\(^[^:]*\):\([0-9]*\):##' | sed 's#.*WRITERFILTERSTATUS: done: \([0-9]*\), planned: \([0-9.]*\), spent: \([0-9.]*\).*##' | -grep -v "WRITERFILTERSTATUS:" | +sed 's#.*WRITERFILTERSTATUS:.*##' | sed 's#^.*-[0-9][0-9]*-.*$##' | grep -v "^--" diff --git a/writerfilter/source/resourcemodel/Protocol.cxx b/writerfilter/source/resourcemodel/Protocol.cxx index a8e3dd07a..b57d95d61 100644 --- a/writerfilter/source/resourcemodel/Protocol.cxx +++ b/writerfilter/source/resourcemodel/Protocol.cxx @@ -28,6 +28,7 @@ * ************************************************************************/ +#ifdef DEBUG #include #include #include @@ -214,3 +215,4 @@ void TableProtocol::entry(int pos, } } +#endif // DEBUG diff --git a/writerfilter/source/resourcemodel/ResourceModelHelper.cxx b/writerfilter/source/resourcemodel/ResourceModelHelper.cxx new file mode 100644 index 000000000..3ebc5422d --- /dev/null +++ b/writerfilter/source/resourcemodel/ResourceModelHelper.cxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "resourcemodel/ResourceModelHelper.hxx" + +namespace writerfilter { +namespace resourcemodel { + +void resolveSprmProps(Properties & rHandler, Sprm & rSprm) +{ + writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); + if( pProperties.get()) + pProperties->resolve(rHandler); +} + +void resolveAttributeProperties(Properties & rHandler, Value & val) +{ + writerfilter::Reference::Pointer_t pProperties = val.getProperties(); + if( pProperties.get()) + pProperties->resolve(rHandler); +} + + +}} diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx index 0cc451762..5c5ff1bba 100644 --- a/writerfilter/source/resourcemodel/TagLogger.cxx +++ b/writerfilter/source/resourcemodel/TagLogger.cxx @@ -25,6 +25,7 @@ * ************************************************************************/ +#ifdef DEBUG #include #include #include @@ -51,11 +52,65 @@ namespace writerfilter void XMLTag::addAttr(string sName, sal_uInt32 nValue) { - char buffer[256]; + static char buffer[256]; snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, nValue); addAttr(sName, buffer); } +void XMLTag::addAttr(string sName, uno::Any aAny) +{ + string aTmpStrInt; + string aTmpStrFloat; + string aTmpStrString; + + static char buffer[256]; + + try + { + sal_Int32 nInt = 0; + aAny >>= nInt; + + snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, + nInt); + + aTmpStrInt = buffer; + } + catch (uno::Exception aExcept) + { + aTmpStrInt = "exception"; + } + + try + { + float nFloat = 0.0; + aAny >>= nFloat; + + snprintf(buffer, sizeof(buffer), "%f", + nFloat); + + aTmpStrFloat = buffer; + } + catch (uno::Exception aExcept) + { + aTmpStrFloat = "exception"; + } + + try + { + ::rtl::OUString aStr; + aAny >>= aStr; + + aTmpStrString = OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US).getStr(); + } + catch (uno::Exception aExcept) + { + aTmpStrString = "exception"; + } + + addAttr(sName, "i:" + aTmpStrInt + " f:" + aTmpStrFloat + " s:" + + aTmpStrString); +} + void XMLTag::addTag(XMLTag::Pointer_t pTag) { if (pTag != XMLTag::Pointer_t()) @@ -64,9 +119,14 @@ namespace writerfilter void XMLTag::chars(const string & rChars) { - mChars = rChars; + mChars += rChars; } +void XMLTag::chars(const ::rtl::OUString & rChars) +{ + chars(OUStringToOString(rChars, RTL_TEXTENCODING_ASCII_US).getStr()); +} + const string & XMLTag::getTag() const { return mTag; @@ -162,6 +222,7 @@ namespace writerfilter static TagLoggerHashMap_t * tagLoggers = NULL; TagLogger::TagLogger() + : mFileName("writerfilter") { } @@ -169,6 +230,11 @@ namespace writerfilter { } + void TagLogger::setFileName(const string & rName) + { + mFileName = rName; + } + TagLogger::Pointer_t TagLogger::getInstance(const char * name) { if (tagLoggers == NULL) @@ -232,6 +298,11 @@ namespace writerfilter { currentTag()->addAttr(name, value); } + +void TagLogger::attribute(const string & name, const uno::Any aAny) +{ + currentTag()->addAttr(name, aAny); +} void TagLogger::addTag(XMLTag::Pointer_t pTag) { @@ -287,7 +358,18 @@ namespace writerfilter else fileName += "/tmp"; - fileName += "/writerfilter."; + string sPrefix = aIt->second->mFileName; + size_t nLastSlash = sPrefix.find_last_of('/'); + size_t nLastBackslash = sPrefix.find_last_of('\\'); + size_t nCutPos = nLastSlash; + if (nLastBackslash < nCutPos) + nCutPos = nLastBackslash; + if (nCutPos < sPrefix.size()) + sPrefix = sPrefix.substr(nCutPos + 1); + + fileName += "/"; + fileName += sPrefix; + fileName +="."; fileName += name; fileName += ".xml"; @@ -336,7 +418,7 @@ namespace writerfilter static char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), - "0x%" SAL_PRIxUINT32 "x, %" SAL_PRIxUINT32 "d", rSprm.getId(), + "0x%" SAL_PRIxUINT32 ", %" SAL_PRIuUINT32, rSprm.getId(), rSprm.getId()); pTag->addAttr("id", sBuffer); pTag->addAttr("value", rSprm.getValue()->toString()); @@ -347,4 +429,39 @@ namespace writerfilter } +XMLTag::Pointer_t unoPropertySetToTag(uno::Reference rPropSet) +{ + uno::Reference xPropSetInfo(rPropSet->getPropertySetInfo()); + uno::Sequence aProps(xPropSetInfo->getProperties()); + + XMLTag::Pointer_t pResult(new XMLTag("unoPropertySet")); + + for (int i = 0; i < aProps.getLength(); ++i) + { + XMLTag::Pointer_t pPropTag(new XMLTag("property")); + + ::rtl::OUString sName(aProps[i].Name); + + pPropTag->addAttr("name", sName); + try + { + pPropTag->addAttr("value", rPropSet->getPropertyValue(sName)); + } + catch (uno::Exception aException) + { + XMLTag::Pointer_t pException(new XMLTag("exception")); + + pException->chars("getPropertyValue(\""); + pException->chars(sName); + pException->chars("\")"); + pPropTag->addTag(pException); + } + + pResult->addTag(pPropTag); + } + + return pResult; +} + } +#endif // DEBUG diff --git a/writerfilter/source/resourcemodel/makefile.mk b/writerfilter/source/resourcemodel/makefile.mk index f3869f306..bb5bc05ac 100644 --- a/writerfilter/source/resourcemodel/makefile.mk +++ b/writerfilter/source/resourcemodel/makefile.mk @@ -54,6 +54,7 @@ SLOFILES= \ $(SLO)$/resourcemodel.obj \ $(SLO)$/util.obj \ $(SLO)$/TagLogger.obj \ + $(SLO)$/ResourceModelHelper.obj \ $(SLO)$/WW8Analyzer.obj \ $(SLO)$/Protocol.obj diff --git a/writerfilter/source/resourcemodel/resourcemodel.cxx b/writerfilter/source/resourcemodel/resourcemodel.cxx index 5e6430e40..0d693705a 100644 --- a/writerfilter/source/resourcemodel/resourcemodel.cxx +++ b/writerfilter/source/resourcemodel/resourcemodel.cxx @@ -481,12 +481,6 @@ void WW8PropertiesHandler::attribute(Id name, Value & val) output.addItem(""); } -bool WW8PropertiesHandler::compare(SprmSharedPointer_t sprm1, - SprmSharedPointer_t sprm2) -{ - return sprm1->getId() < sprm2->getId(); -} - void WW8PropertiesHandler::sprm(Sprm & sprm_) { string tmpStr = "') + result += ">"; + else if (c == '&') + result += "&"; + else + result += c; + } + else + { + snprintf(sBuffer, sizeof(sBuffer), "\\%03d", c); + result += sBuffer; + } + } + + return result; + } + +#ifdef DEBUG string propertysetToString(uno::Reference const & xPropSet) { string sResult; @@ -368,57 +399,29 @@ string propertysetToString(uno::Reference const & xPropSet) return sResult; } - string xmlify(const string & str) - { - string result = ""; - char sBuffer[16]; - - for (string::const_iterator aIt = str.begin(); aIt != str.end(); ++aIt) - { - char c = *aIt; - - if (isprint(c) && c != '\"') - { - if (c == '<') - result += "<"; - else if (c == '>') - result += ">"; - else if (c == '&') - result += "&"; - else - result += c; - } - else - { - snprintf(sBuffer, sizeof(sBuffer), "\\%03d", c); - result += sBuffer; - } - } - - return result; - } + +string toString(uno::Reference< text::XTextRange > textRange) +{ + string result; - string toString(uno::Reference< text::XTextRange > textRange) + if (textRange.get()) { - string result; - - if (textRange.get()) - { - rtl::OUString aOUStr = textRange->getString(); - rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US ); - - result = aOStr.getStr(); - } - else - { - result="(nil)"; - } + rtl::OUString aOUStr = textRange->getString(); + rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US ); - return result; + result = aOStr.getStr(); } - - string toString(const string & rString) + else { - return rString; + result="(nil)"; } + + return result; +} + +string toString(const string & rString) +{ + return rString; +} +#endif } -- cgit v1.2.3