[Libreoffice-commits] core.git: 3 commits - writerfilter/inc writerfilter/Library_writerfilter.mk writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Dec 10 11:59:51 PST 2013
writerfilter/Library_writerfilter.mk | 1
writerfilter/inc/doctok/WW8Document.hxx | 131 ------------
writerfilter/source/doctok/WW8FKP.hxx | 1
writerfilter/source/doctok/WW8StructBase.cxx | 170 ----------------
writerfilter/source/doctok/WW8StructBase.hxx | 277 ---------------------------
writerfilter/source/doctok/WW8inc.xsl | 96 ---------
writerfilter/source/doctok/WW8sprms.xsl | 57 -----
writerfilter/source/doctok/resources.xsl | 1
8 files changed, 734 deletions(-)
New commits:
commit a5ad6e750b58d07d9edbcc3ee31735bdcb05e4b5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Dec 10 20:55:05 2013 +0100
writerfilter: remove unused WW8inc.xsl
Change-Id: Iba539b5546b5bf0dca9c9f19f2537cbcdd48becd
diff --git a/writerfilter/source/doctok/WW8inc.xsl b/writerfilter/source/doctok/WW8inc.xsl
deleted file mode 100644
index 94f1bdb..0000000
--- a/writerfilter/source/doctok/WW8inc.xsl
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml">
-<xsl:output method="text" encoding="iso-8859-1"/>
-
-<xsl:template match="/">
-<xsl:apply-templates select="//xhtml:body/xhtml:table"/>
-</xsl:template>
-
-<xsl:template match="xhtml:table">
-<xsl:apply-templates select="xhtml:tbody/xhtml:tr[2]"/>
-</xsl:template>
-
-<xsl:template name="handleTR">
-<xsl:param name="offset"/>
-<xsl:param name="shift"/>
-<xsl:variable name="name"><xsl:value-of select="xhtml:td[3]"/></xsl:variable>
-<xsl:variable name="type"><xsl:value-of select="xhtml:td[4]"/></xsl:variable>
-<xsl:variable name="saltype">
-<xsl:choose>
- <xsl:when test="$type='U8'">sal_uInt8</xsl:when>
- <xsl:when test="$type='S8'">sal_Int8</xsl:when>
- <xsl:when test="$type='U16'">sal_uInt16</xsl:when>
- <xsl:when test="$type='S16'">sal_Int16</xsl:when>
- <xsl:when test="$type='U32'">sal_uInt32</xsl:when>
- <xsl:when test="$type='S32'">sal_Int32</xsl:when>
- <xsl:otherwise>void *</xsl:otherwise>
-</xsl:choose>
-</xsl:variable>
-<xsl:variable name="bits"><xsl:value-of select="xhtml:td[5]"/></xsl:variable>
-<xsl:variable name="mask"><xsl:value-of select="xhtml:td[6]"/></xsl:variable>
-<xsl:variable name="comment"><xsl:value-of select="xhtml:td[7]"/></xsl:variable>
-/**
-<xsl:value-of select="$comment"/>
-
-offset : <xsl:value-of select="$offset"/>
-name : <xsl:value-of select="$name"/>
-type : <xsl:value-of select="$type"/>
-shift : <xsl:value-of select="concat($shift, '
')"/>
-*/
-
-<xsl:value-of select="$saltype"/> get_<xsl:value-of select="$name"/>() const<xsl:choose>
-<xsl:when test="$saltype='void *'">;
-</xsl:when>
-<xsl:otherwise> { return (get<xsl:value-of select="$type"/>(0x<xsl:value-of select="$offset"/>)<xsl:if test="string-length($mask)>0"> & 0x<xsl:value-of select="translate($mask, 'ABCDEF', 'abcdef')"/></xsl:if>)<xsl:if test="$shift>0"> >> <xsl:value-of select="$shift"/></xsl:if>; }
-</xsl:otherwise>
-</xsl:choose>
-</xsl:template>
-
-<xsl:template match="xhtml:tr[./xhtml:td[position()=1]/text()]">
-<xsl:variable name="offset"><xsl:value-of select="xhtml:td[2]"/></xsl:variable>
-<xsl:call-template name="handleTR">
-<xsl:with-param name="offset" select="$offset"/>
-<xsl:with-param name="shift">0</xsl:with-param>
-</xsl:call-template>
-<xsl:variable name="shift1"><xsl:value-of select="substring-after(xhtml:td[5], ':')"/></xsl:variable>
-<xsl:apply-templates select="following-sibling::xhtml:tr[position()=1]">
-<xsl:with-param name="offset" select="$offset"/>
-<xsl:with-param name="shift" select="$shift1"/>
-</xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="xhtml:tr[not(./xhtml:td[position()=1]/text())]">
-<xsl:param name="offset"/>
-<xsl:param name="shift"/>
-<xsl:call-template name="handleTR">
-<xsl:with-param name="offset" select="$offset"/>
-<xsl:with-param name="shift" select="$shift"/>
-</xsl:call-template>
-<xsl:variable name="shift1"><xsl:value-of select="$shift+substring-after(xhtml:td[5], ':')"/></xsl:variable>
-<xsl:apply-templates select="following-sibling::xhtml:tr[position()=1]">
-<xsl:with-param name="offset" select="$offset"/>
-<xsl:with-param name="shift" select="$shift1"/>
-</xsl:apply-templates>
-</xsl:template>
-
-<xsl:template match="*">
-<xsl:copy-of select="."/>
-</xsl:template>
-
-</xsl:stylesheet>
commit 3c8eb32dcab9333c7620ca97edc5d525f71946fb
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Dec 10 20:54:19 2013 +0100
writerfilter: remove unused WW8sprms.xsl
Change-Id: I82bd41c42ade8da50741af4fa66992d4ea95c463
diff --git a/writerfilter/source/doctok/WW8sprms.xsl b/writerfilter/source/doctok/WW8sprms.xsl
deleted file mode 100644
index 1f1d182..0000000
--- a/writerfilter/source/doctok/WW8sprms.xsl
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-<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="u
rn: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:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default" xmlns:xhtml="http://www.w3.org/1999/xhtml">
-<xsl:output method="xml" indent="yes"/>
-
-<xsl:template match="/">
-<out>
-<xsl:apply-templates select=".//xhtml:tr[position() > 2]"/>
-</out>
-</xsl:template>
-
-<xsl:template match='xhtml:tr'>
-<xsl:variable name='sprmname'><xsl:value-of select='xhtml:td[1]'/></xsl:variable>
-<xsl:variable name='sprmid'><xsl:value-of select='xhtml:td[2]'/></xsl:variable>
-<UML:Class>
-<xsl:attribute name='xmi.id'><xsl:value-of select='$sprmname'/></xsl:attribute>
-<xsl:attribute name='name'><xsl:value-of select='$sprmname'/></xsl:attribute>
-<UML:ModelElement.stereotype>
-<UML:Stereotype xmi.idref="ww8sprm"/>
-</UML:ModelElement.stereotype>
-<UML:ModelElement.taggedValue>
-<UML:TaggedValue>
-<UML:TaggedValue.dataValue><xsl:value-of select='$sprmid'/></UML:TaggedValue.dataValue>
-<UML:TaggedValue.type>
-<UML:TagDefinition xmi.idref="sprmcode"/>
-</UML:TaggedValue.type>
-</UML:TaggedValue>
-</UML:ModelElement.taggedValue>
-<UML:ModelElement.taggedValue>
-<UML:TaggedValue>
-<UML:TaggedValue.dataValue>rtf:<xsl:value-of select='$sprmname'/></UML:TaggedValue.dataValue>
-<UML:TaggedValue.type>
-<UML:TagDefinition xmi.idref="sprmid"/>
-</UML:TaggedValue.type>
-</UML:TaggedValue>
-</UML:ModelElement.taggedValue>
-</UML:Class>
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
commit 3a8705e53b56c1564b6436f816a6e5eaad6270d8
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Dec 10 20:46:05 2013 +0100
writerfilter: remove unused WW8StructBase
Change-Id: I23c20ebf77666a64e3b65ce69ada1c1e1cfa5c21
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index a1c0a85..22a382f 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -123,7 +123,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
writerfilter/source/dmapper/ThemeTable \
writerfilter/source/dmapper/WrapPolygonHandler \
writerfilter/source/doctok/WW8CpAndFc \
- writerfilter/source/doctok/WW8StructBase \
writerfilter/source/filter/ImportFilter \
writerfilter/source/filter/RtfFilter \
writerfilter/source/filter/WriterFilter \
diff --git a/writerfilter/inc/doctok/WW8Document.hxx b/writerfilter/inc/doctok/WW8Document.hxx
index b0f9109..0f017ac 100644
--- a/writerfilter/inc/doctok/WW8Document.hxx
+++ b/writerfilter/inc/doctok/WW8Document.hxx
@@ -94,137 +94,6 @@ public:
//virtual bool put(sal_uInt32 nOffset, const Sequence & rSeq) = 0;
};
-/**
- A property.
-
-*/
-class WW8Property
-{
-public:
- /**
- Ponter to a property.
- */
- typedef boost::shared_ptr<WW8Property> Pointer_t;
-
- virtual ~WW8Property();
-
- virtual sal_uInt32 getId() const = 0;
- virtual sal_uInt32 getParam() const = 0;
- virtual WW8Stream::Sequence getParams() const = 0;
-
- virtual string toString() const = 0;
-
- /**
- Dumps this object to an output.
-
- */
- virtual void dump(OutputWithDepth<string> & o) const = 0;
-};
-
-/**
- An iterator for traversal of a set of properties.
-
- Sample code for use of iterator:
-
- \code
- Return_t function(WW8PropertySet::tPointer pSet)
- {
- do_something;
-
- WW8PropertySetIterator::tPointer pIt = pSet->begin();
- WW8PropertySetIterator::tPointer pItEnd = pSet->end();
-
- while ((*pIt) != (*pItEnd))
- {
- do_something();
-
- ++(*pIt);
- }
-
- do_something;
- }
- \endcode
-*/
-class WW8PropertySetIterator
-{
-public:
- typedef boost::shared_ptr<WW8PropertySetIterator> Pointer_t;
-
- virtual ~WW8PropertySetIterator();
-
- /**
- Advance iterator to the next property.
- */
- virtual WW8PropertySetIterator & operator++() = 0;
-
- /**
- Returns a pointer to the property the iterator references.
- */
- virtual WW8Property::Pointer_t get() const = 0;
-
- /**
- Checks if the iterator is equal to another one.
- */
- virtual bool equal(const WW8PropertySetIterator & rIt) const = 0;
-
- /**
- Returns string representation of iterator.
- */
- virtual string toString() const = 0;
-};
-
-/**
- Checks if two property set iterators are not equal.
-*/
-bool operator != (const WW8PropertySetIterator & rA,
- const WW8PropertySetIterator & rB);
-
-/**
- A set of properties.
-*/
-class WW8PropertySet
-{
-public:
- typedef boost::shared_ptr<WW8PropertySet> Pointer_t;
-
- virtual ~WW8PropertySet();
-
- /**
- Returns iterator to the start of the set.
- */
- virtual WW8PropertySetIterator::Pointer_t begin() = 0;
-
- /**
- Returns iterator to the end of the set.
- */
- virtual WW8PropertySetIterator::Pointer_t end() = 0;
-
- /**
- Dumps property set to output stream.
-
- @param o output stream to dump property set to
- */
- virtual void dump(OutputWithDepth<string> & o) const = 0;
-
- /**
- Iterate through property set and for each element dump a dot
- output stream.
-
- @param o output stream to dump dots to
- */
- virtual void dots(ostream & o) = 0;
-
- virtual bool isPap() const = 0;
- virtual sal_uInt32 get_istd() const = 0;
-
- /**
- Insert another property set into this property set.
-
- @param pSet the set to insert
- */
- virtual void insert(const WW8PropertySet::Pointer_t pSet) = 0;
-};
-
}}
#endif // INCLUDED_WW8_DOCUMENT_HXX
diff --git a/writerfilter/source/doctok/WW8FKP.hxx b/writerfilter/source/doctok/WW8FKP.hxx
index 71af289..43c13fe 100644
--- a/writerfilter/source/doctok/WW8FKP.hxx
+++ b/writerfilter/source/doctok/WW8FKP.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_WW8_FKP_HXX
#include <WW8CpAndFc.hxx>
-#include "WW8StructBase.hxx"
namespace writerfilter {
namespace doctok
diff --git a/writerfilter/source/doctok/WW8StructBase.cxx b/writerfilter/source/doctok/WW8StructBase.cxx
deleted file mode 100644
index 0ebfced..0000000
--- a/writerfilter/source/doctok/WW8StructBase.cxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "WW8StructBase.hxx"
-
-namespace writerfilter {
-namespace doctok {
-using namespace ::com::sun::star;
-
-WW8StructBase::WW8StructBase(const WW8StructBase & rParent,
- sal_uInt32 nOffset, sal_uInt32 nCount)
-: mSequence(rParent.mSequence, nOffset, nCount), mpParent(0)
-{
- if (nOffset + nCount > rParent.getCount())
- {
- throw ExceptionOutOfBounds("WW8StructBase");
- }
-}
-
-WW8StructBase & WW8StructBase::Assign(const WW8StructBase & rSrc)
-{
- mSequence = rSrc.mSequence;
-
- return *this;
-}
-
-sal_uInt8 WW8StructBase::getU8(sal_uInt32 nOffset) const
-{
- return doctok::getU8(mSequence, nOffset);
-}
-
-sal_uInt16 WW8StructBase::getU16(sal_uInt32 nOffset) const
-{
- return doctok::getU16(mSequence, nOffset);
-}
-
-sal_uInt32 WW8StructBase::getU32(sal_uInt32 nOffset) const
-{
- return doctok::getU32(mSequence, nOffset);
-}
-
-sal_uInt8 getU8(const WW8StructBase::Sequence & rSeq,
- sal_uInt32 nOffset)
-{
- return rSeq[nOffset];
-}
-
-sal_uInt16 getU16(const WW8StructBase::Sequence & rSeq,
- sal_uInt32 nOffset)
-{
- return getU8(rSeq, nOffset) | (getU8(rSeq, nOffset + 1) << 8);
-}
-
-sal_uInt32 getU32(const WW8StructBase::Sequence & rSeq,
- sal_uInt32 nOffset)
-{
- sal_uInt32 nResult = getU8(rSeq, nOffset);
- nResult |= (getU8(rSeq, nOffset + 1) << 8);
- nResult |= (getU8(rSeq, nOffset + 2) << 16);
- nResult |= (getU8(rSeq, nOffset + 3) << 24);
-
- return nResult;
-}
-
-OUString WW8StructBase::getString(sal_uInt32 nOffset, sal_uInt32 nCount)
- const
-{
- OUString aResult;
-
- if (nOffset < getCount())
- {
- sal_uInt32 nCount1 = nCount;
- if (nOffset + nCount * 2 > getCount())
- {
- nCount1 = (getCount() - nOffset) / 2;
- }
-
- if (nCount1 > 0)
- {
- Sequence aSeq(mSequence, nOffset, nCount1 * 2);
-
- rtl_uString * pNew = 0;
- rtl_uString_newFromStr_WithLength
- (&pNew, reinterpret_cast<const sal_Unicode *>(&aSeq[0]),
- nCount1);
-
- aResult = OUString(pNew);
- }
- }
-
- return aResult;
-}
-
-WW8StructBase *
-WW8StructBase::getRemainder(sal_uInt32 nOffset) const
-{
- WW8StructBase * pResult = NULL;
-
- sal_uInt32 nCount = getCount();
- if (nCount > nOffset)
- {
- pResult = new WW8StructBase(*this, nOffset, nCount - nOffset);
- }
-
- return pResult;
-}
-
-
-OUString WW8StructBase::getString(sal_uInt32 nOffset) const
-{
- sal_uInt32 nCount = getU16(nOffset);
-
- return getString(nOffset + 2, nCount);
-}
-
-WW8StructBaseTmpOffset::WW8StructBaseTmpOffset
-(WW8StructBase * pStructBase)
-: mnOffset(0), mpStructBase(pStructBase)
-{
-}
-
-sal_uInt32 WW8StructBaseTmpOffset::set(sal_uInt32 nOffset)
-{
- if (nOffset >= mpStructBase->getCount())
- throw ExceptionOutOfBounds("WW8StructBaseTmpOffset::set");
-
- mnOffset = nOffset;
-
- return mnOffset;
-}
-
-sal_uInt32 WW8StructBaseTmpOffset::get() const
-{
- return mnOffset;
-}
-
-sal_uInt32 WW8StructBaseTmpOffset::inc(sal_uInt32 nOffset)
-{
- if (mpStructBase->getCount() - mnOffset < nOffset)
- throw ExceptionOutOfBounds("WW8StructBaseTmpOffset::inc");
-
- mnOffset += nOffset;
-
- return mnOffset;
-}
-
-WW8StructBaseTmpOffset::operator sal_uInt32() const
-{
- return mnOffset;
-}
-
-}}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/doctok/WW8StructBase.hxx b/writerfilter/source/doctok/WW8StructBase.hxx
deleted file mode 100644
index b5e15cb..0000000
--- a/writerfilter/source/doctok/WW8StructBase.hxx
+++ /dev/null
@@ -1,277 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_WW8_STRUCT_BASE_HXX
-#define INCLUDED_WW8_STRUCT_BASE_HXX
-
-#include <boost/shared_ptr.hpp>
-#include <doctok/WW8Document.hxx>
-#include <resourcemodel/OutputWithDepth.hxx>
-
-namespace writerfilter {
-namespace doctok {
-
-/**
- Part of a stream.
-
- A part can have a parent, meaning its sequence of data is a
- subsequence of its parent's sequence of data.
- */
-class WW8StructBase
-{
-public:
- typedef SubSequence<sal_uInt8> Sequence;
- typedef boost::shared_ptr<WW8StructBase> Pointer_t;
-
-protected:
- /**
- Stream this part was created from.
- */
- ::com::sun::star::uno::Reference<com::sun::star::io::
- XInputStream> mrStream;
-
- /**
- The data.
- */
- mutable Sequence mSequence;
-
- /**
- This part's parent.
- */
- WW8StructBase * mpParent;
-
- /**
- This part's offset in parent.
- */
- sal_uInt32 mnOffsetInParent;
-
-public:
- WW8StructBase(sal_Int32 nLength)
- : mSequence(nLength), mpParent(NULL)
- {
- }
-
- /**
- Creates a part from a steam.
-
- @param rStream the stream
- @param nOffset offset in @a rStream to start at
- @param nCount count of bytes in the new part
- */
- WW8StructBase(WW8Stream & rStream,
- sal_Int32 nOffset, sal_Int32 nCount)
- : mSequence(rStream.get(nOffset, nCount)), mpParent(0)
- {
- }
-
- /**
- Creates a part from a sequence.
-
- @param rSequence the sequence
- @param nOffset offset in @a rSequence to start at
- @param nCount count of bytes in the new part
- */
- WW8StructBase(const Sequence & rSequence, sal_uInt32 nOffset = 0,
- sal_uInt32 nCount = 0)
- : mSequence(rSequence, nOffset, nCount), mpParent(0)
- {
- }
-
- /**
- Creates a part from a parent part.
-
- @param pParent the parent
- @param nOffset offset in @a pParent to start at
- @param nCount count of bytes in the new part
- */
- WW8StructBase(const WW8StructBase & rParent,
- sal_uInt32 nOffset, sal_uInt32 nCount);
-
- /**
- Creates a part from a parent part.
-
- @param pParent the parent
- @param nOffset offset in @a pParent to start at
- @param nCount count of bytes in the new part
- */
- WW8StructBase(WW8StructBase * pParent,
- sal_uInt32 nOffset, sal_uInt32 nCount)
- : mSequence(pParent->mSequence, nOffset, nCount), mpParent(pParent),
- mnOffsetInParent(nOffset)
- {
- if (nOffset + nCount > pParent->mSequence.getCount())
- throw ExceptionOutOfBounds("WW8StructBase");
- }
-
-
- virtual ~WW8StructBase()
- {
- }
-
- /**
- Assign a part to this part.
-
- After assignment this part has the same content as the assigned
- part.
-
- @param rSrc part to assign
-
- @return this part after assignment
- */
- virtual WW8StructBase & Assign(const WW8StructBase & rSrc);
-
- /**
- Return count of bytes in this part.
- */
- sal_uInt32 getCount() const { return mSequence.getCount(); }
-
- /**
- Return unsigned byte value at an offset.
-
- @param offset offset to get value from
- */
- sal_uInt8 getU8(sal_uInt32 nOffset) const;
-
- /**
- Return unsigned 16-bit value at an offset.
-
- @param offset offset to get value from
- */
- sal_uInt16 getU16(sal_uInt32 nOffset) const;
-
- /**
- Return unsigned 32-bit value at an offset.
-
- @param offset offset to get value from
- */
- sal_uInt32 getU32(sal_uInt32 nOffset) const;
-
- /**
- Return signed 8-bit value at an offset.
-
- @param offset offset to get value from
- */
- sal_Int8 getS8(sal_uInt32 nOffset) const
- { return (sal_Int8) getU8(nOffset); }
-
- /**
- Return signed 16-bit value at an offset.
-
- @param offset offset to get value from
- */
- sal_Int16 getS16(sal_uInt32 nOffset) const
- {return (sal_Int16) getU16(nOffset); }
-
- /**
- Return signed 32-bit value at an offset.
-
- @param offset offset to get value from
- */
- sal_Int32 getS32(sal_uInt32 nOffset) const
- { return (sal_Int32) getU32(nOffset); }
-
- /**
- Returns byte at an index.
-
- @param nIndex index in this part of the byte to return
- */
- const sal_uInt8 * get(sal_uInt32 nIndex) const
- { return &((mSequence.getSequence())[nIndex + mSequence.getOffset()]); }
-
- /**
- Returns two byte character string starting at an offset.
-
- The string has to be Pascal like, e.g. the first word contains
- the lengthof the string in characters and is followed by the
- string's characters.
-
- @param nOffset offset the string starts at
-
- @return the string
- */
- OUString getString(sal_uInt32 nOffset) const;
-
- /**
- Returns binary object for remainder of this WW8StructBase
-
- @param nOffset offset where remainder starts
- */
- WW8StructBase * getRemainder(sal_uInt32 nOffset) const;
-
- /**
- Returns two byte character string starting at an offset with a
- given length.
-
- @param nOffset offset the string starts at
- @param nLength number of characters in the string
- */
- OUString getString(sal_uInt32 nOffset, sal_uInt32) const;
-
- /**
- Dump the part.
-
- @param o stream to dump to
- */
- virtual void dump(OutputWithDepth<string> & o) const { mSequence.dump(o); }
-};
-
-class WW8StructBaseTmpOffset
-{
- sal_uInt32 mnOffset;
- WW8StructBase * mpStructBase;
-
-public:
- WW8StructBaseTmpOffset(WW8StructBase * pStructBase);
-
- sal_uInt32 set(sal_uInt32 nOffset);
- sal_uInt32 get() const;
- sal_uInt32 inc(sal_uInt32 nOffset);
-
- operator sal_uInt32 () const;
-};
-
-/**
- Return unsigned byte from a sequence.
-
- @param rSeq sequence to get value from
- @param nOffset offset in sequence to get value from
- */
-sal_uInt8 getU8(const WW8StructBase::Sequence & rSeq, sal_uInt32 nOffset);
-
-/**
- Return unsigned 16-bit value from a sequence.
-
- @param rSeq sequence to get value from
- @param nOffset offset in sequence to get value from
- */
-sal_uInt16 getU16(const WW8StructBase::Sequence & rSeq, sal_uInt32 nOffset);
-
-/**
- Return unsigned 32-bit value from a sequence.
-
- @param rSeq sequence to get value from
- @param nOffset offset in sequence to get value from
- */
-sal_uInt32 getU32(const WW8StructBase::Sequence & rSeq, sal_uInt32 nOffset);
-
-}}
-
-#endif // INCLUDED_WW8_STRUCT_BASE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/doctok/resources.xsl b/writerfilter/source/doctok/resources.xsl
index ebfe57c..a5cdadc 100644
--- a/writerfilter/source/doctok/resources.xsl
+++ b/writerfilter/source/doctok/resources.xsl
@@ -51,7 +51,6 @@
#include <resourcemodel/OutputWithDepth.hxx>
#include <doctok/resourceids.hxx>
-#include <doctok/WW8StructBase.hxx>
namespace writerfilter {
namespace doctok {
More information about the Libreoffice-commits
mailing list