[Libreoffice-commits] core.git: 3 commits - writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Oct 14 12:49:56 PDT 2013
writerfilter/source/doctok/Dff.cxx | 20 --------------
writerfilter/source/doctok/Dff.hxx | 5 ---
writerfilter/source/doctok/WW8FontTable.cxx | 22 ----------------
writerfilter/source/doctok/WW8LFOTable.cxx | 32 -----------------------
writerfilter/source/doctok/WW8ListTable.cxx | 37 ---------------------------
writerfilter/source/doctok/WW8StyleSheet.cxx | 16 -----------
writerfilter/source/doctok/resources.xsl | 14 ----------
writerfilter/source/doctok/resourcesimpl.xsl | 34 ------------------------
8 files changed, 180 deletions(-)
New commits:
commit 7bb5ae7ca6e8900286202475a1e5c9fed3995242
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Oct 14 21:42:15 2013 +0200
writerfilter: unused initChildren/Payload methods in doctok
Change-Id: I6b8d728011c2b70061dbdcdc3daba37422f99306
diff --git a/writerfilter/source/doctok/Dff.cxx b/writerfilter/source/doctok/Dff.cxx
index e66d716..026e92f 100644
--- a/writerfilter/source/doctok/Dff.cxx
+++ b/writerfilter/source/doctok/Dff.cxx
@@ -42,17 +42,11 @@ DffRecord::DffRecord(WW8StructBase * pParent, sal_uInt32 nOffset,
Records_t::iterator DffRecord::begin()
{
- if (! bInitialized)
- initChildren();
-
return mRecords.begin();
}
Records_t::iterator DffRecord::end()
{
- if (! bInitialized)
- initChildren();
-
return mRecords.end();
}
@@ -105,10 +99,6 @@ sal_uInt32 DffRecord::getRecordType() const
return getU16(0x2);
}
-void DffRecord::initChildren()
-{
-}
-
Records_t DffRecord::findRecords(sal_uInt32 nType, bool bRecursive, bool bAny)
{
Records_t aResult;
@@ -353,10 +343,6 @@ DffBlock::DffBlock(const DffBlock & rSrc)
{
}
-void DffBlock::initChildren()
-{
-}
-
Records_t DffBlock::findRecords(sal_uInt32 nType, bool bRecursive, bool bAny)
{
Records_t aResult;
@@ -447,17 +433,11 @@ DffRecord::Pointer_t DffBlock::getBlip(sal_uInt32 nBlip)
Records_t::iterator DffBlock::begin()
{
- if (! bInitialized)
- initChildren();
-
return mRecords.begin();
}
Records_t::iterator DffBlock::end()
{
- if (! bInitialized)
- initChildren();
-
return mRecords.end();
}
diff --git a/writerfilter/source/doctok/Dff.hxx b/writerfilter/source/doctok/Dff.hxx
index 62b8ef6..7225367 100644
--- a/writerfilter/source/doctok/Dff.hxx
+++ b/writerfilter/source/doctok/Dff.hxx
@@ -42,8 +42,6 @@ protected:
typedef vector<Pointer_t> Records_t;
Records_t mRecords;
- void initChildren();
-
public:
DffRecord(WW8Stream & rStream, sal_uInt32 nOffset, sal_uInt32 nCount);
@@ -105,9 +103,6 @@ class DffBlock : public WW8StructBase,
Records_t mRecords;
-protected:
- void initChildren();
-
public:
typedef boost::shared_ptr<DffBlock> Pointer_t;
diff --git a/writerfilter/source/doctok/WW8FontTable.cxx b/writerfilter/source/doctok/WW8FontTable.cxx
index 2ecfe15..95fc233 100644
--- a/writerfilter/source/doctok/WW8FontTable.cxx
+++ b/writerfilter/source/doctok/WW8FontTable.cxx
@@ -22,28 +22,6 @@
namespace writerfilter {
namespace doctok {
-void WW8FontTable::initPayload()
-{
- sal_uInt32 nCount = getU8(0);
-
- sal_uInt32 nOffset = 1;
-
- while (nCount > 0)
- {
- entryOffsets.push_back(nOffset);
-
- sal_uInt32 nFFNSize = getU8(nOffset) + 1;
-
- if (nFFNSize > 1)
- nCount--;
-
- nOffset += nFFNSize;
- }
-
- entryOffsets.push_back(nOffset);
- mnPlcfPayloadOffset = nOffset;
-}
-
sal_uInt32 WW8FontTable::getEntryCount()
{
return entryOffsets.size() - 1;
diff --git a/writerfilter/source/doctok/WW8LFOTable.cxx b/writerfilter/source/doctok/WW8LFOTable.cxx
index 9f896bb..5c41219 100644
--- a/writerfilter/source/doctok/WW8LFOTable.cxx
+++ b/writerfilter/source/doctok/WW8LFOTable.cxx
@@ -22,38 +22,6 @@
namespace writerfilter {
namespace doctok {
-void WW8LFOTable::initPayload()
-{
- sal_uInt32 nCount = getEntryCount();
-
- sal_uInt32 nOffset = 4;
- sal_uInt32 nOffsetLFOData = mnPlcfPayloadOffset;
-
- for (sal_uInt32 n = 0; n < nCount; ++n)
- {
- WW8LFO aLFO(this, nOffset);
-
- entryOffsets.push_back(nOffset);
- nOffset += WW8LFO::getSize();
-
- payloadOffsets.push_back(nOffsetLFOData);
- payloadIndices.push_back(n);
-
- nOffsetLFOData += 4;
-
- sal_uInt32 nLvls = aLFO.get_clfolvl();
-
- for (sal_uInt32 k = 0; k < nLvls; ++k)
- {
- WW8LFOLevel aLevel(this, nOffsetLFOData);
- nOffsetLFOData += aLevel.calcSize();
- }
- }
-
- entryOffsets.push_back(nOffset);
- payloadOffsets.push_back(nOffsetLFOData);
-}
-
sal_uInt32 WW8LFOTable::getEntryCount()
{
return getU32(0);
diff --git a/writerfilter/source/doctok/WW8ListTable.cxx b/writerfilter/source/doctok/WW8ListTable.cxx
index 3d6eb21..380c19d 100644
--- a/writerfilter/source/doctok/WW8ListTable.cxx
+++ b/writerfilter/source/doctok/WW8ListTable.cxx
@@ -23,43 +23,6 @@
namespace writerfilter {
namespace doctok {
-void WW8ListTable::initPayload()
-{
- sal_uInt32 nCount = getEntryCount();
-
- sal_uInt32 nOffset = 2;
- sal_uInt32 nOffsetLevel = mnPlcfPayloadOffset;
- for (sal_uInt32 n = 0; n < nCount; ++n)
- {
- WW8List aList(this, nOffset);
-
- entryOffsets.push_back(nOffset);
- payloadIndices.push_back(payloadOffsets.size());
- nOffset += WW8List::getSize();
-
- sal_uInt32 nLvlCount = aList.get_fSimpleList() ? 1 : 9;
-
- for (sal_uInt32 i = 0; i < nLvlCount; ++i)
- {
- WW8ListLevel aLevel(this, nOffsetLevel);
-
- payloadOffsets.push_back(nOffsetLevel);
-
- nOffsetLevel += aLevel.calcSize();
- }
-
- if (nOffsetLevel > getCount())
- {
- nOffsetLevel = getCount();
-
- break;
- }
- }
-
- payloadOffsets.push_back(nOffsetLevel);
- entryOffsets.push_back(nOffset);
-}
-
sal_uInt32 WW8ListTable::getEntryCount()
{
return getU16(0);
diff --git a/writerfilter/source/doctok/WW8StyleSheet.cxx b/writerfilter/source/doctok/WW8StyleSheet.cxx
index 3b7c298..2231d0b 100644
--- a/writerfilter/source/doctok/WW8StyleSheet.cxx
+++ b/writerfilter/source/doctok/WW8StyleSheet.cxx
@@ -22,22 +22,6 @@
namespace writerfilter {
namespace doctok {
-void WW8StyleSheet::initPayload()
-{
- sal_uInt32 nCount = getEntryCount();
-
- sal_uInt32 nOffset = get_size() + 2;
- for (sal_uInt32 n = 0; n < nCount; ++n)
- {
- entryOffsets.push_back(nOffset);
-
- sal_uInt32 cbStd = getU16(nOffset);
- nOffset += cbStd + 2;
- }
-
- entryOffsets.push_back(nOffset);
-}
-
sal_uInt32 WW8StyleSheet::getEntryCount()
{
return get_cstd();
diff --git a/writerfilter/source/doctok/resources.xsl b/writerfilter/source/doctok/resources.xsl
index 7c38d1a..11eaeb8 100644
--- a/writerfilter/source/doctok/resources.xsl
+++ b/writerfilter/source/doctok/resources.xsl
@@ -229,12 +229,6 @@ class </xsl:text>
virtual ~</xsl:text>
<xsl:value-of select="$classname"/>
<xsl:text>();
</xsl:text>
- <xsl:if test='.//UML:Stereotype[@xmi.idref ="initimpl"]'>
- <xsl:text> void initImpl();
</xsl:text>
- </xsl:if>
- <xsl:if test='.//UML:Stereotype[@xmi.idref ="plcf"]'>
- <xsl:text> void initPayload();</xsl:text>
- </xsl:if>
<xsl:text>
/**
commit 0e45212822e4ed99251691c8d0ed6a89d8418678
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Oct 14 21:38:04 2013 +0200
writerfilter: unused init methods in doctok
Change-Id: I721fbbd7bcf33b6ab3535170afbf68e520134850
diff --git a/writerfilter/source/doctok/resources.xsl b/writerfilter/source/doctok/resources.xsl
index 2ccad4d..7c38d1a 100644
--- a/writerfilter/source/doctok/resources.xsl
+++ b/writerfilter/source/doctok/resources.xsl
@@ -174,7 +174,6 @@ class </xsl:text>
</xsl:if>
<xsl:text>
{
- init();
}
</xsl:text>
<xsl:value-of select="$classname"/>
@@ -192,7 +191,6 @@ class </xsl:text>
</xsl:if>
<xsl:text>
{
- init();
}
 </xsl:text>
<xsl:value-of select="$classname"/>
<xsl:text>( const </xsl:text>
@@ -209,7 +207,6 @@ class </xsl:text>
</xsl:if>
<xsl:text>
{
- init();
}

</xsl:text>
<xsl:value-of select="$classname"/>
@@ -227,7 +224,6 @@ class </xsl:text>
</xsl:if>
<xsl:text>
{
- init();
}
virtual ~</xsl:text>
@@ -240,7 +236,6 @@ class </xsl:text>
<xsl:text> void initPayload();</xsl:text>
</xsl:if>
<xsl:text>
- void init();
/**
Return type of resource.
diff --git a/writerfilter/source/doctok/resourcesimpl.xsl b/writerfilter/source/doctok/resourcesimpl.xsl
index 1062ba4..f541f69 100644
--- a/writerfilter/source/doctok/resourcesimpl.xsl
+++ b/writerfilter/source/doctok/resourcesimpl.xsl
@@ -120,24 +120,6 @@ using namespace ::std;
{
}
</xsl:text>
- <xsl:if test="$needsinit='true'">
- <xsl:text>
- void </xsl:text>
- <xsl:value-of select="$classname"/>
- <xsl:text>::init()
- {
- </xsl:text>
- <xsl:if test='.//UML:Stereotype[@xmi.idref ="withmembers"]'>
- <xsl:for-each select='.//UML:Attribute[@name!="reserved"]'>
- <xsl:apply-templates select='.' mode='initmembers'/>
- </xsl:for-each>
- </xsl:if>
- <xsl:if test='.//UML:Stereotype[@xmi.idref ="initimpl"]'>
- <xsl:text> initImpl();
</xsl:text>
- </xsl:if>
- <xsl:text>
- }
</xsl:text>
- </xsl:if>
<xsl:choose>
<xsl:when test='$parentresource="Properties"'>
commit 912ed34cf6f6d89156d075b1d2e5a49aa1183606
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Oct 14 21:35:27 2013 +0200
writerfilter: these dump methods are unused in doctok
Change-Id: Ic84ac4d58e14c3bc59d902ce535566cc7e59a5d8
diff --git a/writerfilter/source/doctok/resources.xsl b/writerfilter/source/doctok/resources.xsl
index ecd1409..2ccad4d 100644
--- a/writerfilter/source/doctok/resources.xsl
+++ b/writerfilter/source/doctok/resources.xsl
@@ -414,8 +414,6 @@ class </xsl:text>
void resolveNoAuto(Properties & rHandler);
</xsl:if>
- void dump(OutputWithDepth < string > & o) const;
-
void resolve(Properties & rHandler);
</xsl:template>
@@ -786,7 +784,6 @@ public:
void resolveNoAuto(Properties & rHandler);
</xsl:if>
<xsl:text>
- virtual void dump(OutputWithDepth < string > & o) const;
virtual DffRecord * clone() const { return new </xsl:text>
<xsl:value-of select="$classname"/>
diff --git a/writerfilter/source/doctok/resourcesimpl.xsl b/writerfilter/source/doctok/resourcesimpl.xsl
index ddc2bd8..1062ba4 100644
--- a/writerfilter/source/doctok/resourcesimpl.xsl
+++ b/writerfilter/source/doctok/resourcesimpl.xsl
@@ -225,23 +225,7 @@ using namespace ::std;
}
}
- void
</xsl:text>
- <xsl:value-of select="$classname"/>
- <xsl:text>::dump(OutputWithDepth < string > & o) const
- {
- o.addItem("<dump type='</xsl:text>
- <xsl:value-of select='@name'/>
- <xsl:text>'>");
-
- WW8StructBase::dump(o);</xsl:text>
- <xsl:for-each select='.//UML:Attribute[@name!="reserved"]'>
- <xsl:apply-templates select='.' mode='dumpAttribute'/>
- </xsl:for-each>
-
- <xsl:text>
- o.addItem("</dump>");
- }
</xsl:text>
</xsl:template>
<xsl:template match='UML:Attribute' mode='resolveAttribute'>
More information about the Libreoffice-commits
mailing list