writerfilter/source/doctok/WW8CpAndFc.cxx | 40 ----------- writerfilter/source/doctok/WW8CpAndFc.hxx | 107 ------------------------------ 2 files changed, 147 deletions(-)
New commits: commit 91fa22fe533588c0e16c705f3810f1ce1a5661a5 Author: Miklos Vajna <[email protected]> Date: Thu Nov 7 21:27:37 2013 +0100 writerfilter: remove unused CpAndFc class in doctok Change-Id: Id24eb2ab53e62961e6cbe2ea72221c6bfe7262d7 diff --git a/writerfilter/source/doctok/WW8CpAndFc.cxx b/writerfilter/source/doctok/WW8CpAndFc.cxx index 91abb76..7b1bfde 100644 --- a/writerfilter/source/doctok/WW8CpAndFc.cxx +++ b/writerfilter/source/doctok/WW8CpAndFc.cxx @@ -79,46 +79,6 @@ ostream & operator << (ostream & o, const Fc & rFc) return o << rFc.toString(); } -bool operator < (const CpAndFc & rA, const CpAndFc & rB) -{ - bool bResult = false; - - if (rA.mCp < rB.mCp) - bResult = true; - else if (rA.mCp == rB.mCp && rA.mType < rB.mType) - bResult = true; - - return bResult; -} - -bool operator == (const CpAndFc & rA, const CpAndFc & rB) -{ - return rA.mCp == rB.mCp; -} - -ostream & operator << (ostream & o, const CpAndFc & /*rCpAndFc*/) -{ - return o; -} - -ostream & operator << (ostream & o, const CpAndFcs & rCpAndFcs) -{ - copy(rCpAndFcs.begin(), rCpAndFcs.end(), - ostream_iterator<CpAndFc>(o, ", ")); - - char sBuffer[256]; - - snprintf(sBuffer, 255, "%" SAL_PRI_SIZET "u", rCpAndFcs.size()); - o << sBuffer; - - return o; -} - -CpAndFc::CpAndFc(const Cp & rCp, const Fc & rFc, PropertyType eType_) -: mCp(rCp), mFc(rFc), mType(eType_) -{ -} - }} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/doctok/WW8CpAndFc.hxx b/writerfilter/source/doctok/WW8CpAndFc.hxx index ca83673..1eed11e 100644 --- a/writerfilter/source/doctok/WW8CpAndFc.hxx +++ b/writerfilter/source/doctok/WW8CpAndFc.hxx @@ -211,103 +211,6 @@ struct Fc friend ostream & operator << (ostream & o, const Fc & rFc); }; -/** - A character position and a corresponding file character position - paired. - */ -class CpAndFc -{ -private: - /** - character position - */ - Cp mCp; - - /** - file character position - */ - Fc mFc; - - /** - property type - */ - PropertyType mType; - -public: - CpAndFc() {} - CpAndFc(const Cp & rCp, const Fc & rFc, PropertyType eType_); - - /** - Return character position. - */ - const Cp & getCp() const { return mCp; } - - /** - Return file character position. - */ - const Fc & getFc() const { return mFc; } - - /** - Return property type. - */ - PropertyType getType() const { return mType; } - - /** - Return if FC is complex. - - @retval true FC is complex - @retval false else - */ - bool isComplex() const { return mFc.isComplex(); } - - /** - Return the distance to other CpAndFc. - - @param rCpAndFc the other CpAndFc - - @return the distance from the CP in @a rCpAndFc to the CP in - CpAndFc. - */ - sal_uInt32 operator-(const CpAndFc & rCpAndFc) const - { return mCp - rCpAndFc.mCp; } - - /** - Return string representation of the CpAndFc. - */ - string toString() const; - - friend bool operator < (const CpAndFc & rA, const CpAndFc & rB); - friend bool operator == (const CpAndFc & rA, const CpAndFc & rB); - friend ostream & operator << (ostream & o, const CpAndFc & rCpAndFc); -}; - -struct CpAndFcLess -{ - CpAndFcLess() - { - } - - bool operator()(const CpAndFc & rA, const CpAndFc & rB) const - { - return rA < rB; - } - - bool operator()(const CpAndFc & rA, const Cp & rB) const - { - return rA.getCp() < rB; - } - - bool operator()(const Cp & rA, const CpAndFc & rB) const - { - return rA < rB.getCp(); - } -}; - - -typedef set<CpAndFc, CpAndFcLess> CpAndFcs; - -ostream & operator << (ostream & o, const CpAndFcs & rCpAndFcs); - struct CpHash { size_t operator()(const Cp & rCp) const @@ -332,16 +235,6 @@ struct CpEq } }; -struct CpAndFcHash -{ - size_t operator()(const CpAndFc & rCpAndFc) const - { - CpHash aHash; - - return aHash(rCpAndFc.getCp()); - } -}; - typedef boost::unordered_map<Cp, Fc, CpHash, CpEq> Cp2FcHashMap_t; } // namespace doctok _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
