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

Miklos Vajna vmiklos at collabora.co.uk
Mon Nov 11 11:47:20 PST 2013


 writerfilter/Library_writerfilter.mk          |    1 
 writerfilter/source/dmapper/GraphicImport.cxx |    1 
 writerfilter/source/doctok/Dff.cxx            |  256 --------------------------
 writerfilter/source/doctok/Dff.hxx            |   97 ---------
 writerfilter/source/doctok/resources.xmi      |   35 ---
 writerfilter/source/doctok/resources.xsl      |    1 
 6 files changed, 391 deletions(-)

New commits:
commit 7f18186a9c2e381f383f14b55d8c15676d71cb1a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Nov 11 20:44:13 2013 +0100

    Remove unused writerfilter::doctok::DffRecord
    
    Change-Id: I40b4c0ff90055e4d388f97fbe19be30d3f66b1b4

diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 90811dd..b9b2932 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -121,7 +121,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
     writerfilter/source/dmapper/TblStylePrHandler \
     writerfilter/source/dmapper/ThemeTable \
     writerfilter/source/dmapper/WrapPolygonHandler \
-    writerfilter/source/doctok/Dff \
     writerfilter/source/doctok/DffImpl \
     writerfilter/source/doctok/WW8Annotation \
     writerfilter/source/doctok/WW8CpAndFc \
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index c4b9b43..f147d6c 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -405,7 +405,6 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
         case NS_rtf::LN_LCB: break;//byte count
         case NS_rtf::LN_CBHEADER: break;//ignored
         case NS_rtf::LN_MFP: //MetafilePict
-        case NS_rtf::LN_DffRecord: //dff record - expands to an sprm which expands to ...
         case NS_rtf::LN_shpopt: //shape options
         case NS_rtf::LN_shpfbse: //BLIP store entry
         case NS_rtf::LN_BRCTOP: //top border
diff --git a/writerfilter/source/doctok/Dff.cxx b/writerfilter/source/doctok/Dff.cxx
deleted file mode 100644
index 08e0a5f..0000000
--- a/writerfilter/source/doctok/Dff.cxx
+++ /dev/null
@@ -1,256 +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 <stdio.h>
-#include "Dff.hxx"
-#include <doctok/resourceids.hxx>
-#include <resourcemodel/WW8ResourceModel.hxx>
-#include "doctok/resources.hxx"
-
-namespace writerfilter {
-namespace doctok {
-
-typedef boost::shared_ptr<WW8Value> WW8ValueSharedPointer_t;
-
-DffRecord::DffRecord(WW8Stream & rStream, sal_uInt32 nOffset,
-                     sal_uInt32 nCount)
-: WW8StructBase(rStream, nOffset, nCount)
-{
-}
-
-DffRecord::DffRecord(WW8StructBase * pParent, sal_uInt32 nOffset,
-                     sal_uInt32 nCount)
-: WW8StructBase(pParent, nOffset, nCount)
-{
-}
-
-Records_t::iterator DffRecord::begin()
-{
-    return mRecords.begin();
-}
-
-Records_t::iterator DffRecord::end()
-{
-    return mRecords.end();
-}
-
-bool DffRecord::isContainer() const
-{
-    return getVersion() == 0xf;
-}
-
-sal_uInt32 DffRecord::calcSize() const
-{
-    sal_uInt32 nResult = 0;
-
-    switch (getRecordType())
-    {
-    case 0xf000:
-    case 0xf001:
-    case 0xf002:
-    case 0xf003:
-    case 0xf004:
-        nResult = getU32(0x4) + 8;
-
-        break;
-    case 0xf700:
-        nResult = 8;
-
-        break;
-    default:
-        nResult = getU32(0x4);
-
-        if (! isContainer())
-            nResult += 8;
-        break;
-    }
-
-    return nResult;
-}
-
-sal_uInt32 DffRecord::getVersion() const
-{
-    return getU8(0x0) & 0xf;
-}
-
-sal_uInt32 DffRecord::getInstance() const
-{
-    return (getU16(0x0) & 0xfff0) >> 4;
-}
-
-sal_uInt32 DffRecord::getRecordType() const
-{
-    return getU16(0x2);
-}
-
-Records_t DffRecord::findRecords(sal_uInt32 nType, bool bRecursive, bool bAny)
-{
-    Records_t aResult;
-
-    findRecords(nType, aResult, bRecursive, bAny);
-
-    return aResult;
-}
-
-void DffRecord::findRecords
-(sal_uInt32 nType, Records_t & rRecords, bool bRecursive, bool bAny)
-{
-    Records_t::iterator aIt = begin();
-
-    while (aIt != end())
-    {
-        Pointer_t pPointer = *aIt;
-        if (bAny || pPointer->getRecordType() == nType)
-            rRecords.push_back(pPointer);
-
-        if (bRecursive)
-            pPointer->findRecords(nType, rRecords, bRecursive,
-                                      bAny);
-
-        ++aIt;
-    }
-}
-
-void DffRecord::resolveChildren(Properties & rHandler)
-{
-    Records_t::iterator aIt;
-    for (aIt = begin(); aIt != end(); ++aIt)
-    {
-        rHandler.sprm(**aIt);
-    }
-}
-
-void DffRecord::resolveLocal(Properties &)
-{
-}
-
-void DffRecord::resolve(Properties & rHandler)
-{
-    WW8Value::Pointer_t pVal = createValue(getRecordType());
-    rHandler.attribute(NS_rtf::LN_dfftype, *pVal);
-
-    pVal = createValue(getInstance());
-    rHandler.attribute(NS_rtf::LN_dffinstance, *pVal);
-
-    pVal = createValue(getVersion());
-    rHandler.attribute(NS_rtf::LN_dffversion, *pVal);
-
-    pVal = createValue(getU32(0x0));
-    rHandler.attribute(NS_rtf::LN_dffheader, *pVal);
-
-    if (isContainer())
-    {
-        resolveChildren(rHandler);
-    }
-
-    resolveLocal(rHandler);
-
-    WW8BinaryObjReference::Pointer_t pBinObjRef
-        (new WW8BinaryObjReference(this, 0, getCount()));
-    WW8Sprm aSprm(pBinObjRef);
-
-    rHandler.sprm(aSprm);
-}
-
-sal_uInt32 DffRecord::getShapeType()
-{
-    sal_uInt32 nResult = 0;
-
-    findRecords(0xf00a);
-
-    return nResult;
-}
-
-sal_uInt32 DffRecord::getShapeId()
-{
-    sal_uInt32 nResult = 0;
-
-    findRecords(0xf00a);
-
-    return nResult;
-}
-
-sal_uInt32 DffRecord::getShapeBid()
-{
-    sal_uInt32 nResult = 0;
-
-    return nResult;
-}
-
-string DffRecord::getType() const
-{
-    return "DffRecord";
-}
-
-Value::Pointer_t DffRecord::getValue()
-{
-    return Value::Pointer_t();
-}
-
-writerfilter::Reference<BinaryObj>::Pointer_t DffRecord::getBinary()
-{
-    return writerfilter::Reference<BinaryObj>::Pointer_t();
-}
-
-writerfilter::Reference<Stream>::Pointer_t DffRecord::getStream()
-{
-    return writerfilter::Reference<Stream>::Pointer_t();
-}
-
-writerfilter::Reference<Properties>::Pointer_t DffRecord::getProps()
-{
-    return writerfilter::Reference<Properties>::Pointer_t(this->clone());
-}
-
-string DffRecord::toString() const
-{
-    char sBuffer[1024];
-
-    snprintf(sBuffer, sizeof(sBuffer),
-             "<dffrecord type=\"%" SAL_PRIuUINT32 "\" instance=\"%" SAL_PRIuUINT32 "\" version=\"%" SAL_PRIuUINT32 "\">\n",
-             getRecordType(), getInstance(), getVersion());
-    string aResult = sBuffer;
-
-
-    if (!isContainer())
-        aResult += mSequence.toString();
-    else
-    {
-        WW8StructBase::Sequence aSeq(mSequence, 0, 8);
-        aResult += aSeq.toString();
-    }
-
-    aResult += "</dffrecord>";
-
-    return aResult;
-}
-
-string DffRecord::getName() const
-{
-    return "";
-}
-
-Sprm::Kind DffRecord::getKind()
-{
-    return Sprm::UNKNOWN;
-}
-
-}}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/doctok/Dff.hxx b/writerfilter/source/doctok/Dff.hxx
deleted file mode 100644
index cf78ff7..0000000
--- a/writerfilter/source/doctok/Dff.hxx
+++ /dev/null
@@ -1,97 +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_DFF_HXX
-#define INCLUDED_DFF_HXX
-
-#include <vector>
-#include "WW8StructBase.hxx"
-#include "WW8ResourceModelImpl.hxx"
-
-namespace writerfilter {
-namespace doctok
-{
-using std::vector;
-
-class DffRecord : public WW8StructBase, public writerfilter::Reference<Properties>,
-                  public Sprm
-{
-public:
-    typedef boost::shared_ptr<DffRecord> Pointer_t;
-
-protected:
-    typedef vector<Pointer_t> Records_t;
-    Records_t mRecords;
-
-public:
-
-    DffRecord(WW8Stream & rStream, sal_uInt32 nOffset, sal_uInt32 nCount);
-    DffRecord(WW8StructBase * pParent, sal_uInt32 nOffset, sal_uInt32 nCount);
-    virtual ~DffRecord() {}
-
-    bool isContainer() const;
-    sal_uInt32 calcSize() const;
-
-    sal_uInt32 getVersion() const;
-    sal_uInt32 getInstance() const;
-    sal_uInt32 getRecordType() const;
-
-    virtual DffRecord * clone() const { return new DffRecord(*this); }
-
-    virtual void resolveLocal(Properties & rHandler);
-    virtual void resolveChildren(Properties & rHandler);
-
-    Records_t findRecords(sal_uInt32 nType, bool bRecursive = true,
-                          bool bAny = false);
-
-    void findRecords
-    (sal_uInt32 nType, Records_t & rRecords,
-     bool bRecursive = true, bool bAny = false);
-
-    Records_t::iterator begin();
-    Records_t::iterator end();
-
-    sal_uInt32 getShapeType();
-    sal_uInt32 getShapeId();
-    sal_uInt32 getShapeBid();
-
-    /* Properties methods */
-    virtual void resolve(Properties & rHandler);
-    virtual string getType() const;
-
-    /* Sprm methods */
-    virtual sal_uInt32 getId() const { return getRecordType(); }
-    virtual Value::Pointer_t getValue();
-    virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary();
-    virtual writerfilter::Reference<Stream>::Pointer_t getStream();
-    virtual writerfilter::Reference<Properties>::Pointer_t getProps();
-
-    virtual string toString() const;
-    virtual string getName() const;
-
-    virtual Kind getKind();
-};
-
-typedef vector<DffRecord::Pointer_t> Records_t;
-
-}}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi
index ed09b85..fb351f4 100644
--- a/writerfilter/source/doctok/resources.xmi
+++ b/writerfilter/source/doctok/resources.xmi
@@ -142,17 +142,6 @@
           </UML:Generalization.parent>
         </UML:Generalization>
         <!--Class SEPX-->
-        <!--Class DffRecord-->
-        <UML:Class xmi.id="DffRecord" name="DffRecord"/>
-        <UML:Generalization isSpecification="false" xmi.id="DffRecord-Properties">
-          <UML:Generalization.child>
-            <UML:Class xmi.idref="DffRecord"/>
-          </UML:Generalization.child>
-          <UML:Generalization.parent>
-            <UML:Class xmi.idref="Properties"/>
-          </UML:Generalization.parent>
-        </UML:Generalization>
-        <!--Class DffRecord-->
         <!--Class Papx-->
         <UML:Class xmi.id="Papx" name="Papx">
           <UML:Classifier.feature>
@@ -448,21 +437,6 @@
             </UML:Attribute>
           </UML:Classifier.feature>
           <UML:Classifier.feature>
-            <UML:Attribute name="dffrecord">
-              <UML:ModelElement.taggedValue>
-                <UML:TaggedValue>
-                  <UML:TaggedValue.dataValue>rtf:DffRecord</UML:TaggedValue.dataValue>
-                  <UML:TaggedValue.type>
-                    <UML:TagDefinition xmi.idref="attrid"/>
-                  </UML:TaggedValue.type>
-                </UML:TaggedValue>
-              </UML:ModelElement.taggedValue>
-              <UML:ModelElement.stereotype>
-                <UML:Stereotype xmi.idref="attribute"/>
-              </UML:ModelElement.stereotype>
-            </UML:Attribute>
-          </UML:Classifier.feature>
-          <UML:Classifier.feature>
             <UML:Attribute name="dffattribute">
               <UML:ModelElement.taggedValue>
                 <UML:TaggedValue>
@@ -26223,13 +26197,6 @@
                   </UML:TaggedValue.type>
                 </UML:TaggedValue>
               </UML:ModelElement.taggedValue>
-              <UML:BehavioralFeature.parameter>
-                <UML:Parameter kind="return" name="return">
-                  <UML:Parameter.type>
-                    <UML:Class xmi.idref="DffRecord"/>
-                  </UML:Parameter.type>
-                </UML:Parameter>
-              </UML:BehavioralFeature.parameter>
               <UML:ModelElement.stereotype>
                 <UML:Stereotype xmi.idref="attribute"/>
               </UML:ModelElement.stereotype>
@@ -42660,8 +42627,6 @@
               </UML:ModelElement.stereotype>
             </UML:Operation>
           </UML:Classifier.feature>
-          <UML:Classifier.feature><UML:Operation name="blip"><UML:ModelElement.taggedValue><UML:TaggedValue><UML:TaggedValue.dataValue>rtf:blip</UML:TaggedValue.dataValue><UML:TaggedValue.type><UML:TagDefinition xmi.idref="opid"/></UML:TaggedValue.type></UML:TaggedValue></UML:ModelElement.taggedValue><UML:BehavioralFeature.parameter><UML:Parameter kind="return" name="return"><UML:Parameter.type><UML:Class xmi.idref="DffRecord"/></UML:Parameter.type></UML:Parameter></UML:BehavioralFeature.parameter><UML:ModelElement.stereotype><UML:Stereotype xmi.idref="attribute"/></UML:ModelElement.stereotype></UML:Operation>
-          g          </UML:Classifier.feature>
           <!--
               <UML:Classifier.feature>
               <UML:Operation name="binary">
diff --git a/writerfilter/source/doctok/resources.xsl b/writerfilter/source/doctok/resources.xsl
index 139fb18..204b2c7 100644
--- a/writerfilter/source/doctok/resources.xsl
+++ b/writerfilter/source/doctok/resources.xsl
@@ -54,7 +54,6 @@
 #include <doctok/WW8StructBase.hxx>
 #include <doctok/WW8ResourceModelImpl.hxx>
 #include <doctok/WW8PropertySetImpl.hxx>
-#include <doctok/Dff.hxx>
 
 namespace writerfilter {
 namespace doctok {


More information about the Libreoffice-commits mailing list