diff options
author | Henning Brinkmann <hbrinkm@openoffice.org> | 2010-07-28 14:17:26 +0200 |
---|---|---|
committer | Henning Brinkmann <hbrinkm@openoffice.org> | 2010-07-28 14:17:26 +0200 |
commit | 726abde143b9d11c4cb02cc744687e3d018fc2ca (patch) | |
tree | 4ffdff73701fa42a3e8dae798e9cb82329d3b646 /writerfilter/source/ooxml | |
parent | ef6ea72805ac6b8044e76d466f34e459210e691d (diff) |
writerfilter08ooo330: applied patch for writerfilter08
Diffstat (limited to 'writerfilter/source/ooxml')
20 files changed, 324 insertions, 468 deletions
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<OOXMLFastContextHandler *> 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<OOXMLFastContextHandler *>::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); @@ -1296,19 +1235,6 @@ OOXMLFastContextHandler::getComponentContext() } /* - 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<T>::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<T>::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<T>::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("<newCharacterProperty"); - debug_logger->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 <stack> #include <ooxml/OOXMLDocument.hxx> -#include <resourcemodel/TagLogger.hxx> #include "OOXMLPropertySetImpl.hxx" +#ifdef DEBUG +#include <resourcemodel/TagLogger.hxx> +#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() { } @@ -659,24 +655,6 @@ string OOXMLHexValue::toString() const } /* - 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<OOXMLValue> 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 @@ -69,22 +69,6 @@ OOXMLStreamImpl::OOXMLStreamImpl } OOXMLStreamImpl::OOXMLStreamImpl -(uno::Reference<uno::XComponentContext> xContext, - uno::Reference<io::XInputStream> 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), mxStorageStream(rOOXMLStream.mxStorageStream), 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<io::XInputStream> xStorageStream, StreamType_t nType); OOXMLStreamImpl(OOXMLStreamImpl & rStream, const rtl::OUString & rId); - OOXMLStreamImpl - (uno::Reference<uno::XComponentContext> xContext, - uno::Reference<io::XInputStream> 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet + version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:rng="http://relaxng.org/ns/structure/1.0" + xmlns:xalan="http://xml.apache.org/xalan" + exclude-result-prefixes = "xalan" + xml:indent="true"> + <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/> + + <xsl:include href="factorytools.xsl"/> + + <xsl:template match="/"> + <class> + <xsl:for-each select="//rng:define[@name='CT_FFData']"> + <xsl:call-template name="sprm"/> + <xsl:call-template name="attribute"/> + </xsl:for-each> + </class> + </xsl:template> + + <xsl:template name="sprminner"> + <xsl:variable name="defname" select="@name"/> + <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]"> + <xsl:call-template name="sprminner"/> + </xsl:for-each> + <xsl:for-each select=".//rng:element"> + <xsl:for-each select="rng:ref"> + <xsl:variable name="refname" select="@name"/> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$refname]"> + <xsl:call-template name="sprminner"/> + </xsl:for-each> + </xsl:for-each> + <element> + <xsl:variable name="elementname" select="@name"/> + <xsl:attribute name="name"> + <xsl:value-of select="@name"/> + </xsl:attribute> + <xsl:for-each select="rng:ref"> + <xsl:variable name="refname" select="@name"/> + <xsl:for-each select="ancestor::namespace/resource[@name=$refname]"> + <xsl:attribute name="action"> + <xsl:choose> + <xsl:when test="@resource='Properties'"> + <xsl:text>resolve</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>set</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + </xsl:for-each> + <xsl:for-each select="ancestor::namespace/resource[@name=$defname]"> + <xsl:for-each select="element[@name=$elementname]"> + <xsl:attribute name="id"> + <xsl:call-template name="idtoqname"> + <xsl:with-param name="id"> + <xsl:value-of select="@tokenid"/> + </xsl:with-param> + </xsl:call-template> + </xsl:attribute> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + </element> + </xsl:for-each> + </xsl:template> + + <xsl:template name="sprm"> + <sprm> + <xsl:call-template name="sprminner"/> + </sprm> + </xsl:template> + + <xsl:template name="attributeinner"> + <xsl:param name="parent"/> + <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]"> + <xsl:variable name="refname" select="@name"/> + <xsl:comment><xsl:value-of select="$newparent"/></xsl:comment> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$refname]"> + <xsl:call-template name="attributeinner"> + <xsl:with-param name="parent" select="$parent"/> + </xsl:call-template> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select=".//rng:element"> + <xsl:variable name="newparent"> + <xsl:if test="string-length($parent)"> + <xsl:value-of select="$parent"/> + <xsl:text>:</xsl:text> + </xsl:if> + <xsl:value-of select="@name"/> + </xsl:variable> + <xsl:for-each select="rng:ref"> + <xsl:variable name="refname" select="@name"/> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$refname]"> + <xsl:call-template name="attributeinner"> + <xsl:with-param name="parent" select="$newparent"/> + </xsl:call-template> + </xsl:for-each> + </xsl:for-each> + </xsl:for-each> + <xsl:variable name="defname" select="@name"/> + <xsl:variable name="resource"> + <xsl:for-each select="ancestor::namespace/resource[@name=$defname]"> + <xsl:value-of select="@resource"/> + </xsl:for-each> + </xsl:variable> + <xsl:if test="$resource='Properties'"> + <xsl:for-each select=".//rng:attribute"> + <xsl:variable name="attrname" select="@name"/> + <attribute> + <xsl:attribute name="name"> + <xsl:if test="string-length($parent) > 0"> + <xsl:value-of select="$parent"/> + <xsl:text>:</xsl:text> + </xsl:if> + <xsl:value-of select="$attrname"/> + </xsl:attribute> + <xsl:for-each select="ancestor::namespace/resource[@name=$defname]"> + <xsl:for-each select="attribute[@name=$attrname]"> + <xsl:attribute name="id"> + <xsl:call-template name="idtoqname"> + <xsl:with-param name="id"> + <xsl:value-of select="@tokenid"/> + </xsl:with-param> + </xsl:call-template> + </xsl:attribute> + </xsl:for-each> + </xsl:for-each> + </attribute> + </xsl:for-each> + </xsl:if> + </xsl:template> + + <xsl:template name="attribute"> + <attribute> + <xsl:call-template name="attributeinner"/> + </attribute> + </xsl:template> + +</xsl:stylesheet>
\ 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/</xsl:text> <xsl:template match="/"> <out> - <xsl:apply-templates select="//rng:define[@name='OLEObject']" + <xsl:apply-templates select="//rng:define[@name='CT_DocGrid']" mode='resourcesPropertySetValue'/> </out> </xsl:template> 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 --> <xsl:template name="factoryattributetoresourcemapinner"> + <xsl:variable name="defname" select="@name"/> + <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]"> + <xsl:variable name="name" select="@name"/> + <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]"> + <xsl:call-template name="factoryattributetoresourcemapinner"/> + </xsl:for-each> + </xsl:for-each> + <xsl:for-each select=".//rng:attribute"> + <xsl:if test="position()=1"> + <xsl:text> + // </xsl:text> + <xsl:value-of select="$defname"/> + </xsl:if> <xsl:variable name="mynsid" select="generate-id(ancestor::namespace)"/> <xsl:variable name="resource"> <xsl:for-each select="rng:ref"> @@ -161,6 +174,9 @@ for a rng:define <xsl:for-each select=".//rng:text"> <xsl:text>String</xsl:text> </xsl:for-each> + <xsl:for-each select=".//rng:data[@type='base64Binary']"> + <xsl:text>String</xsl:text> + </xsl:for-each> </xsl:variable> <xsl:variable name="refdefine1"> @@ -201,13 +217,6 @@ for a rng:define </xsl:choose> </xsl:for-each> - - <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]"> - <xsl:variable name="name" select="@name"/> - <xsl:for-each select="ancestor::namespace/rng:grammar/rng:define[@name=$name]"> - <xsl:call-template name="factoryattributetoresourcemapinner"/> - </xsl:for-each> - </xsl:for-each> </xsl:template> <!-- factoryattributetoresourcemap --> @@ -283,25 +292,6 @@ ListValueMapPointer </xsl:text> <!-- factoryelementtoresorucemapinner --> <xsl:template name="factorycreateelementmapinner"> - <xsl:for-each select=".//rng:element"> - <xsl:variable name="resource"> - <xsl:for-each select="rng:ref"> - <xsl:call-template name="contextresource"/> - </xsl:for-each> - </xsl:variable> - <xsl:if test="string-length($resource) > 0"> - <xsl:text> - (*pMap)[</xsl:text> - <xsl:call-template name="fasttoken"/> - <xsl:text>] = CreateElement(RT_</xsl:text> - <xsl:value-of select="$resource"/> - <xsl:text>, </xsl:text> - <xsl:for-each select="rng:ref"> - <xsl:call-template name="idforref"/> - </xsl:for-each> - <xsl:text>);</xsl:text> - </xsl:if> - </xsl:for-each> <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]"> <xsl:variable name="name" select="@name"/> <xsl:variable name="block"> @@ -329,6 +319,25 @@ ListValueMapPointer </xsl:text> <xsl:value-of select="$block1"/> </xsl:if> </xsl:for-each> + <xsl:for-each select=".//rng:element"> + <xsl:variable name="resource"> + <xsl:for-each select="rng:ref"> + <xsl:call-template name="contextresource"/> + </xsl:for-each> + </xsl:variable> + <xsl:if test="string-length($resource) > 0"> + <xsl:text> + (*pMap)[</xsl:text> + <xsl:call-template name="fasttoken"/> + <xsl:text>] = CreateElement(RT_</xsl:text> + <xsl:value-of select="$resource"/> + <xsl:text>, </xsl:text> + <xsl:for-each select="rng:ref"> + <xsl:call-template name="idforref"/> + </xsl:for-each> + <xsl:text>);</xsl:text> + </xsl:if> + </xsl:for-each> </xsl:template> <xsl:template name="factorycreateelementmapfromstart"> @@ -610,6 +619,25 @@ string </xsl:text> <xsl:template name="factorytokentoidmapinner"> <xsl:variable name="name" select="@name"/> + <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]"> + <xsl:variable name="refname" select="@name"/> + <xsl:variable name="refblock1"> + <xsl:for-each + select="ancestor::rng:grammar/rng:define[@name=$refname]"> + <xsl:call-template name="factorytokentoidmapinner"/> + </xsl:for-each> + </xsl:variable> + <xsl:choose> + <xsl:when test="string-length($refblock1) = 0"> + <xsl:for-each select="ancestor::model/namespace/rng:grammar/rng:define[@name=$refname]"> + <xsl:call-template name="factorytokentoidmapinner"/> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$refblock1"/> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> <xsl:variable name="body"> <xsl:for-each select="ancestor::namespace/resource[@name=$name]"> <xsl:for-each select="element[@tokenid]|attribute[@tokenid]"> @@ -630,25 +658,6 @@ string </xsl:text> <xsl:value-of select="$name"/> <xsl:value-of select="$body"/> </xsl:if> - <xsl:for-each select=".//rng:ref[not(ancestor::rng:element or ancestor::rng:attribute)]"> - <xsl:variable name="refname" select="@name"/> - <xsl:variable name="refblock1"> - <xsl:for-each - select="ancestor::rng:grammar/rng:define[@name=$refname]"> - <xsl:call-template name="factorytokentoidmapinner"/> - </xsl:for-each> - </xsl:variable> - <xsl:choose> - <xsl:when test="string-length($refblock1) = 0"> - <xsl:for-each select="ancestor::model/namespace/rng:grammar/rng:define[@name=$refname]"> - <xsl:call-template name="factorytokentoidmapinner"/> - </xsl:for-each> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$refblock1"/> - </xsl:otherwise> - </xsl:choose> - </xsl:for-each> </xsl:template> <xsl:template name="factorytokentoidmap"> 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 @@ -<!-- -/************************************************************************* - * - 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 - <http://www.openoffice.org/license.html> - for a copy of the LGPLv3 License. - - ************************************************************************/ - ---> -<xsl:stylesheet - version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" - xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" - xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" - xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" - xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" - xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" - xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" - xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" - xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" - xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" - xmlns:math="http://www.w3.org/1998/Math/MathML" - xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" - xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" - xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" - xmlns:ooo="http://openoffice.org/2004/office" - xmlns:ooow="http://openoffice.org/2004/writer" - xmlns:oooc="http://openoffice.org/2004/calc" - xmlns:dom="http://www.w3.org/2001/xml-events" - xmlns:xforms="http://www.w3.org/2002/xforms" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:rng="http://relaxng.org/ns/structure/1.0" - xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" - xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default"> - <xsl:output method="text" /> - <xsl:param name="prefix"/> - - <xsl:include href="resourcestools.xsl"/> - - <xsl:template match="/"> - <out xml:space="preserve"> - <xsl:call-template name="licenseheader"/> - <xsl:text> -#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; - - </xsl:text> - <xsl:call-template name="fastcontextimpls"><xsl:with-param name="ns">dml-shapeProperties</xsl:with-param></xsl:call-template> - <xsl:text> -}} -/// @endcond GENERATED -
</xsl:text></out></xsl:template> - - <xsl:template match="*"/> -</xsl:stylesheet> 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 @@ <token tokenid="ooxml:trackchange"/> <token tokenid="ooxml:object"/> <token tokenid="ooxml:tblStart"/> + <token tokenid="ooxml:ffdata"/> <namespace name="dml-stylesheet" url="http://schemas.openxmlformats.org/drawingml/2006/main" file="dml-stylesheet.rng"> <start name="theme"/> <start name="themeOverride"/> @@ -14105,7 +14106,7 @@ <xs:documentation>Cryptographic Hashing Algorithm</xs:documentation> </attribute> <attribute name="cryptSpinCount"> - <text/> + <ref name="ST_DecimalNumber"/> <xs:documentation>Iterations to Run Hashing Algorithm</xs:documentation> </attribute> <attribute name="cryptProvider"> @@ -15079,7 +15080,7 @@ </define> <define name="CT_FFTextType"> <attribute name="val"> - <text/> + <ref name="ST_FFName"/> <xs:documentation>Text Box Form Field Type Values</xs:documentation> </attribute> </define> @@ -15206,7 +15207,7 @@ </define> <define name="CT_FFHelpText"> <attribute name="type"> - <text/> + <ref name="ST_InfoTextType"/> <xs:documentation>Help Text Type</xs:documentation> </attribute> <attribute name="val"> @@ -15216,7 +15217,7 @@ </define> <define name="CT_FFStatusText"> <attribute name="type"> - <text/> + <ref name="ST_InfoTextType"/> <xs:documentation>Status Text Type</xs:documentation> </attribute> <attribute name="val"> @@ -15750,15 +15751,15 @@ </define> <define name="CT_DocGrid"> <attribute name="type"> - <text/> + <ref name="ST_DocGrid"/> <xs:documentation>Document Grid Type</xs:documentation> </attribute> <attribute name="linePitch"> - <text/> + <ref name="ST_DecimalNumber"/> <xs:documentation>Document Grid Line Pitch</xs:documentation> </attribute> <attribute name="charSpace"> - <text/> + <ref name="ST_DecimalNumber"/> <xs:documentation>Document Grid Character Pitch</xs:documentation> </attribute> </define> @@ -21754,11 +21755,11 @@ <attribute name="val" tokenid="ooxml:CT_Kinsoku_val"/> </resource> <resource name="ST_TextDirection" resource="List"> - <value tokenid="ooxml:Value_ST_TextDirection_lrTb">lrTb</value> - <value tokenid="ooxml:Value_ST_TextDirection_tbRl">tbRl</value> - <value tokenid="ooxml:Value_ST_TextDirection_btLr">btLr</value> - <value tokenid="ooxml:Value_ST_TextDirection_lrTbV">lrTbV</value> - <value tokenid="ooxml:Value_ST_TextDirection_tbRlV">tbRlV</value> + <value tokenid="0">lrTb</value> + <value tokenid="1">tbRl</value> + <value tokenid="3">btLr</value> + <value tokenid="4">lrTbV</value> + <value tokenid="5">tbRlV</value> <value tokenid="ooxml:Value_ST_TextDirection_tbLrV">tbLrV</value> </resource> <resource name="CT_TextDirection" resource="Value"> @@ -21855,6 +21856,24 @@ <action name="start" action="clearProps"/> <action name="end" action="mark" sendtokenid="ooxml:endtrackchange"/> </resource> + <resource name="EG_RangeMarkupElements" resource="Properties"> + <element name="bookmarkStart" tokenid="ooxml:EG_RangeMarkupElements_bookmarkStart"/> + <element name="bookmarkEnd" tokenid="ooxml:EG_RangeMarkupElements_bookmarkEnd"/> + <element name="moveFromRangeStart" tokenid="ooxml:EG_RangeMarkupElements_moveFromRangeStart"/> + <element name="moveFromRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_moveFromRangeEnd"/> + <element name="moveToRangeStart" tokenid="ooxml:EG_RangeMarkupElements_moveToRangeStart"/> + <element name="moveToRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_moveToRangeEnd"/> + <element name="commentRangeStart" tokenid="ooxml:EG_RangeMarkupElements_commentRangeStart"/> + <element name="commentRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_commentRangeEnd"/> + <element name="customXmlInsRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeStart"/> + <element name="customXmlInsRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlInsRangeEnd"/> + <element name="customXmlDelRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeStart"/> + <element name="customXmlDelRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlDelRangeEnd"/> + <element name="customXmlMoveFromRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeStart"/> + <element name="customXmlMoveFromRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveFromRangeEnd"/> + <element name="customXmlMoveToRangeStart" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeStart"/> + <element name="customXmlMoveToRangeEnd" tokenid="ooxml:EG_RangeMarkupElements_customXmlMoveToRangeEnd"/> + </resource> <resource name="CT_NumPr" resource="Properties"> <kind name="paragraph"/> <element name="ilvl" tokenid="sprm:PIlvl"/> @@ -22037,6 +22056,8 @@ <element name="checkBox" tokenid="ooxml:CT_FFData_checkBox"/> <element name="ddList" tokenid="ooxml:CT_FFData_ddList"/> <element name="textInput" tokenid="ooxml:CT_FFData_textInput"/> + <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:ffdata"/> + <action name="end" action="clearProps"/> </resource> <resource name="CT_FFHelpText" resource="Properties"> <attribute name="type" tokenid="ooxml:CT_FFHelpText_type"/> @@ -22046,6 +22067,23 @@ <attribute name="type" tokenid="ooxml:CT_FFStatusText_type"/> <attribute name="val" tokenid="ooxml:CT_FFStatusText_val"/> </resource> + <resource name="CT_FFCheckBox" resource="Properties"> + <element name="size" tokenid="ooxml:CT_FFCheckBox_size"/> + <element name="sizeAuto" tokenid="ooxml:CT_FFCheckBox_sizeAuto"/> + <element name="default" tokenid="ooxml:CT_FFCheckBox_default"/> + <element name="checked" tokenid="ooxml:CT_FFCheckBox_checked"/> + </resource> + <resource name="CT_FFDDList" resource="Properties"> + <element name="result" tokenid="ooxml:CT_FFDDList_result"/> + <element name="default" tokenid="ooxml:CT_FFDDList_default"/> + <element name="listEntry" tokenid="ooxml:CT_FFDDList_listEntry"/> + </resource> + <resource name="CT_FFTextInput" resource="Properties"> + <element name="type" tokenid="ooxml:CT_FFTextInput_type"/> + <element name="default" tokenid="ooxml:CT_FFTextInput_default"/> + <element name="maxLength" tokenid="ooxml:CT_FFTextInput_maxLength"/> + <element name="format" tokenid="ooxml:CT_FFTextInput_format"/> + </resource> <resource name="ST_SectionMark" resource="List"> <value tokenid="0">continuous</value> <value tokenid="1">nextColumn</value> @@ -22209,6 +22247,11 @@ <value name="linesAndChars" tokenid="ooxml:Value_wordprocessingml_ST_DocGrid_linesAndChars">linesAndChars</value> <value name="snapToChars" tokenid="ooxml:Value_wordprocessingml_ST_DocGrid_snapToChars">snapToChars</value> </resource> + <resource name="CT_DocGrid" resource="Properties"> + <attribute name="type" tokenid="ooxml:CT_DocGrid_type"/> + <attribute name="linePitch" tokenid="ooxml:CT_DocGrid_linePitch"/> + <attribute name="charSpace" tokenid="ooxml:CT_DocGrid_charSpace"/> + </resource> <resource name="ST_HdrFtr" resource="List"> <value tokenid="ooxml:Value_ST_HrdFtr_even">even</value> <value tokenid="ooxml:Value_ST_HrdFtr_default">default</value> @@ -22429,10 +22472,10 @@ <element name="u" tokenid="ooxml:EG_RPrBase_u"/> <element name="effect" tokenid="sprm:CSfxText"/> <element name="bdr" tokenid="ooxml:EG_RPrBase_bdr"/> - <element name="shd" tokenid="ooxml:EG_RPrBase_shd"/> + <element name="shd" tokenid="sprm:CShd"/> <element name="fitText" tokenid="ooxml:EG_RPrBase_fitText"/> <element name="vertAlign" tokenid="ooxml:EG_RPrBase_vertAlign"/> - <element name="rtl" tokenid="ooxml:EG_RPrBase_rtl"/> + <element name="rtl" tokenid="sprm:CFBiDi"/> <element name="cs" tokenid="sprm:CComplexScript"/> <element name="em" tokenid="sprm:CKcd"/> <element name="lang" tokenid="ooxml:EG_RPrBase_lang"/> 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 <resourcemodel/TagLogger.hxx> 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 "<stage1>" 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]*\):#<qname file="\1" line="\2"#' | sed 's#[/* ]*case \(NS_.*\):.*# qname="\1"/>#' | sed 's#.*WRITERFILTERSTATUS: done: \([0-9]*\), planned: \([0-9.]*\), spent: \([0-9.]*\).*#<status done="\1" planned="\2" spent="\3"/>#' | -grep -v "WRITERFILTERSTATUS:" | +sed 's#.*WRITERFILTERSTATUS:.*#<status done="100"/>#' | sed 's#^.*-[0-9][0-9]*-.*$#<nostatus/>#' | grep -v "^--" |