diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-22 18:13:38 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-22 18:20:30 +0200 |
commit | a4d39c8a2938b7d2b4d4a07e3718c3c1a5fc8df7 (patch) | |
tree | 5830a9c0c7595139c76e2b58a0bf4f03168f4984 | |
parent | 520a67ccd3f974c66e222b3f5dbc6d343ec90666 (diff) |
writerfilter: remove unused DffBlock class in doctok
Change-Id: I4b8cd7d7166f100bd718d2bf00ae44d347000f6d
-rw-r--r-- | writerfilter/source/doctok/Dff.cxx | 121 | ||||
-rw-r--r-- | writerfilter/source/doctok/Dff.hxx | 34 |
2 files changed, 0 insertions, 155 deletions
diff --git a/writerfilter/source/doctok/Dff.cxx b/writerfilter/source/doctok/Dff.cxx index 202bbd1642d0..a2dd0777c2f5 100644 --- a/writerfilter/source/doctok/Dff.cxx +++ b/writerfilter/source/doctok/Dff.cxx @@ -323,127 +323,6 @@ Sprm::Kind DffRecord::getKind() return Sprm::UNKNOWN; } -DffBlock::DffBlock(WW8Stream & rStream, sal_uInt32 nOffset, - sal_uInt32 nCount, sal_uInt32 nPadding) -: WW8StructBase(rStream, nOffset, nCount), mnPadding(nPadding) -{ -} - -DffBlock::DffBlock(WW8StructBase * pParent, sal_uInt32 nOffset, - sal_uInt32 nCount, sal_uInt32 nPadding) -: WW8StructBase(pParent, nOffset, nCount), mnPadding(nPadding) -{ -} - -DffBlock::DffBlock(const DffBlock & rSrc) -: WW8StructBase(rSrc), writerfilter::Reference<Properties>(rSrc), - mnPadding(rSrc.mnPadding) -{ -} - -Records_t DffBlock::findRecords(sal_uInt32 nType, bool bRecursive, bool bAny) -{ - Records_t aResult; - - findRecords(nType, aResult, bRecursive, bAny); - - return aResult; -} - -void DffBlock::findRecords -(sal_uInt32 nType, Records_t & rRecords, bool bRecursive, bool bAny) -{ - Records_t::iterator aIt = begin(); - - while (aIt != end()) - { - DffRecord::Pointer_t pPointer(*aIt); - - if (bAny || pPointer->getRecordType() == nType) - rRecords.push_back(pPointer); - - if (bRecursive) - pPointer->findRecords(nType, rRecords, bRecursive, - bAny); - - ++aIt; - } -} - -void DffBlock::resolve(Properties & rHandler) -{ - Records_t::iterator aIt; - - for (aIt = begin(); aIt != end(); ++aIt) - { - DffRecord * pDff = aIt->get(); - rHandler.sprm(*pDff); - } -} - -DffRecord::Pointer_t DffBlock::getShape(sal_uInt32 nSpid) -{ - DffRecord::Pointer_t pResult; - - Records_t aRecords = findRecords(0xf004); - Records_t::iterator aIt; - for (aIt = aRecords.begin(); aIt != aRecords.end(); ++aIt) - { - DffRecord::Pointer_t pPointer = *aIt; - - Records_t aFSPs = pPointer->findRecords(0xf00a); - Records_t::iterator aItFSP = aFSPs.begin(); - - if (aItFSP != aFSPs.end()) - { - DffFSP * pFSP = dynamic_cast<DffFSP *>((*aItFSP).get()); - - if (pFSP->get_shpid() == nSpid) - { - pResult = pPointer; - - break; - } - } - } - - return pResult; -} - -DffRecord::Pointer_t DffBlock::getBlip(sal_uInt32 nBlip) -{ - DffRecord::Pointer_t pResult; - - if (nBlip > 0) - { - nBlip--; - - Records_t aRecords = findRecords(0xf007); - - if (nBlip < aRecords.size()) - { - pResult = aRecords[nBlip]; - } - } - - return pResult; -} - -Records_t::iterator DffBlock::begin() -{ - return mRecords.begin(); -} - -Records_t::iterator DffBlock::end() -{ - return mRecords.end(); -} - -string DffBlock::getType() const -{ - return "DffBlock"; -} - }} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/doctok/Dff.hxx b/writerfilter/source/doctok/Dff.hxx index 3cb66e9b2157..cf78ff7bf537 100644 --- a/writerfilter/source/doctok/Dff.hxx +++ b/writerfilter/source/doctok/Dff.hxx @@ -29,8 +29,6 @@ namespace doctok { using std::vector; -class DffBlock; - class DffRecord : public WW8StructBase, public writerfilter::Reference<Properties>, public Sprm { @@ -92,38 +90,6 @@ public: typedef vector<DffRecord::Pointer_t> Records_t; -class DffBlock : public WW8StructBase, - public writerfilter::Reference<Properties> -{ - sal_uInt32 mnPadding; - - Records_t mRecords; - -public: - typedef boost::shared_ptr<DffBlock> Pointer_t; - - DffBlock(WW8Stream & rStream, sal_uInt32 nOffset, sal_uInt32 nCount, sal_uInt32 nPadding); - DffBlock(WW8StructBase * pParent, sal_uInt32 nOffset, sal_uInt32 nCount, sal_uInt32 nPadding); - DffBlock(const DffBlock & rSrc); - virtual ~DffBlock() {} - - 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); - - DffRecord::Pointer_t getShape(sal_uInt32 nSpid); - DffRecord::Pointer_t getBlip(sal_uInt32 nBlip); - - Records_t::iterator begin(); - Records_t::iterator end(); - - /* Properties methods */ - virtual void resolve(Properties & rHandler); - virtual string getType() const; -}; - }} #endif |