[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Sep 26 11:34:01 PDT 2013


 writerfilter/source/doctok/Dff.cxx           |   39 ----------------
 writerfilter/source/doctok/Dff.hxx           |    7 ---
 writerfilter/source/doctok/resourcesimpl.xsl |   63 ---------------------------
 3 files changed, 109 deletions(-)

New commits:
commit 7367bd9fff37031d5ddcfe926dd3a7f6ecdb0500
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Sep 26 20:23:58 2013 +0200

    writerfilter: remove dead createDffRecord
    
    Change-Id: I27dc30c8aba7b77cdac771ca733fadb805a5c75b

diff --git a/writerfilter/source/doctok/Dff.cxx b/writerfilter/source/doctok/Dff.cxx
index f39505e..e66d716 100644
--- a/writerfilter/source/doctok/Dff.cxx
+++ b/writerfilter/source/doctok/Dff.cxx
@@ -107,27 +107,6 @@ sal_uInt32 DffRecord::getRecordType() const
 
 void DffRecord::initChildren()
 {
-    if (isContainer())
-    {
-        sal_uInt32 nOffset = 8;
-        sal_uInt32 nCount = calcSize();
-
-        while (nCount - nOffset >= 8)
-        {
-            sal_uInt32 nSize = 0;
-            boost::shared_ptr<DffRecord> pRec
-                (createDffRecord(this, nOffset, &nSize));
-
-            if (nSize == 0)
-                break;
-
-            mRecords.push_back(pRec);
-
-            nOffset += nSize;
-        }
-    }
-
-    bInitialized = true;
 }
 
 Records_t DffRecord::findRecords(sal_uInt32 nType, bool bRecursive, bool bAny)
@@ -376,24 +355,6 @@ DffBlock::DffBlock(const DffBlock & rSrc)
 
 void DffBlock::initChildren()
 {
-    sal_uInt32 nOffset = 0;
-    sal_uInt32 nCount = getCount();
-
-    while (nOffset < nCount)
-    {
-        sal_uInt32 nSize = 0;
-        DffRecord::Pointer_t pDffRecord
-            (createDffRecord(this, nOffset, &nSize));
-
-        if (nSize == 0)
-            break;
-
-        mRecords.push_back(pDffRecord);
-
-        nOffset +=  nSize + mnPadding;
-    }
-
-    bInitialized = true;
 }
 
 Records_t DffBlock::findRecords(sal_uInt32 nType, bool bRecursive, bool bAny)
diff --git a/writerfilter/source/doctok/Dff.hxx b/writerfilter/source/doctok/Dff.hxx
index ef43808..62b8ef6 100644
--- a/writerfilter/source/doctok/Dff.hxx
+++ b/writerfilter/source/doctok/Dff.hxx
@@ -133,13 +133,6 @@ public:
     virtual string getType() const;
 };
 
-DffRecord *
-createDffRecord(WW8StructBase * pParent, sal_uInt32 nOffset,
-                sal_uInt32 * nSize = NULL);
-DffRecord *
-createDffRecord(WW8Stream & rStream, sal_uInt32 nOffset,
-                sal_uInt32 * nSize = NULL);
-
 }}
 
 #endif
diff --git a/writerfilter/source/doctok/resourcesimpl.xsl b/writerfilter/source/doctok/resourcesimpl.xsl
index d0b714d..196b44e 100644
--- a/writerfilter/source/doctok/resourcesimpl.xsl
+++ b/writerfilter/source/doctok/resourcesimpl.xsl
@@ -679,69 +679,6 @@ WW8Value::Pointer_t WW8FOPTE::get_stringValue()
 
 <xsl:template match="UML:Model" mode="createdffrecord">
 <xsl:text>
-DffRecord * createDffRecord
-(WW8StructBase * pParent, sal_uInt32 nOffset, sal_uInt32 * pCount)
-{
-    DffRecord * pResult = NULL;
-    DffRecord aTmpRec(pParent, nOffset, 8);
-    sal_uInt32 nSize = aTmpRec.calcSize();
-
-    if (pCount != NULL)
-        *pCount = nSize;
-
-    switch (aTmpRec.getRecordType())
-    {&#xa;</xsl:text>
-    <xsl:for-each select='.//UML:Class[.//UML:Stereotype/@xmi.idref="dffrecord"]'>
-      <xsl:text>        case </xsl:text>
-      <xsl:value-of select=".//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref='dffid']//UML:TaggedValue.dataValue"/>
-      <xsl:text>:
-             pResult = new Dff</xsl:text>
-                 <xsl:value-of select="@name"/>
-                 <xsl:text>(pParent, nOffset, nSize);
-                 
-             break;&#xa;</xsl:text>
-    </xsl:for-each>
-    <xsl:text>
-         default:
-             pResult = new DffRecord(pParent, nOffset, nSize);
-
-             break;
-    }
-
-    return pResult;
-}
-
-DffRecord * createDffRecord
-(WW8Stream & rStream, sal_uInt32 nOffset, sal_uInt32 * pCount)
-{
-    DffRecord * pResult = NULL;
-    DffRecord aTmpRec(rStream, nOffset, 8);
-    sal_uInt32 nSize = aTmpRec.calcSize();
-
-    if (pCount != NULL)
-        *pCount = nSize;
-
-    switch (aTmpRec.getRecordType())
-    {&#xa;</xsl:text>
-    <xsl:for-each select='.//UML:Class[.//UML:Stereotype/@xmi.idref="dffrecord"]'>
-      <xsl:text>        case </xsl:text>
-      <xsl:value-of select=".//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref='dffid']//UML:TaggedValue.dataValue"/>
-      <xsl:text>:
-             pResult = new Dff</xsl:text>
-                 <xsl:value-of select="@name"/>
-                 <xsl:text>(rStream, nOffset, nSize);
-                 
-             break;&#xa;</xsl:text>
-    </xsl:for-each>
-    <xsl:text>
-         default:
-             pResult = new DffRecord(rStream, nOffset, nSize);
-
-             break;
-    }
-
-    return pResult;
-}
     </xsl:text>
 </xsl:template>
 


More information about the Libreoffice-commits mailing list