summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-12-13 22:05:57 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-13 22:15:19 +0100
commit641dac98cddc63304e374a43c299d62b9dff52c9 (patch)
tree142b69438168c084328df90c3bf19b54128754f3 /writerfilter
parent3e570f948f7321ff5a1b5780936d91c3c760859e (diff)
writerfilter: remove unused WW8CpAndFc
Change-Id: I3e56a41c6fe5fab3e16d8e09a5404d83f5477738
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/Library_writerfilter.mk1
-rw-r--r--writerfilter/source/doctok/WW8CpAndFc.cxx84
-rw-r--r--writerfilter/source/doctok/WW8CpAndFc.hxx245
3 files changed, 0 insertions, 330 deletions
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 0a56e9cc5ea8..796c37a4e26e 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -122,7 +122,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
writerfilter/source/dmapper/TblStylePrHandler \
writerfilter/source/dmapper/ThemeTable \
writerfilter/source/dmapper/WrapPolygonHandler \
- writerfilter/source/doctok/WW8CpAndFc \
writerfilter/source/filter/ImportFilter \
writerfilter/source/filter/RtfFilter \
writerfilter/source/filter/WriterFilter \
diff --git a/writerfilter/source/doctok/WW8CpAndFc.cxx b/writerfilter/source/doctok/WW8CpAndFc.cxx
deleted file mode 100644
index 7b1bfdeef12c..000000000000
--- a/writerfilter/source/doctok/WW8CpAndFc.cxx
+++ /dev/null
@@ -1,84 +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 <WW8CpAndFc.hxx>
-
-#include <iterator>
-#include <algorithm>
-#include <string>
-#include <map>
-
-namespace writerfilter {
-namespace doctok
-{
-using namespace ::std;
-
-bool operator < (const Cp & rA, const Cp & rB)
-{
- return rA.nCp < rB.nCp;
-}
-
-bool operator == (const Cp & rA, const Cp & rB)
-{
- return rA.nCp == rB.nCp;
-}
-
-string Cp::toString() const
-{
- char sBuffer[256];
-
- snprintf(sBuffer, 255, "%" SAL_PRIxUINT32 "", get());
-
- return string(sBuffer);
-}
-
-ostream & operator << (ostream & o, const Cp & rCp)
-{
- return o << rCp.toString();
-}
-
-bool operator < (const Fc & rA, const Fc & rB)
-{
- return rA.mnFc < rB.mnFc;
-}
-
-bool operator == (const Fc & rA, const Fc & rB)
-{
- return rA.mnFc == rB.mnFc;
-}
-
-string Fc::toString() const
-{
- char sBuffer[256];
-
- snprintf(sBuffer, 255, "(%" SAL_PRIxUINT32 ", %s)", static_cast<sal_uInt32>(get()),
- isComplex() ? "true" : "false");
-
- return string(sBuffer);
-}
-
-ostream & operator << (ostream & o, const Fc & rFc)
-{
-
- return o << rFc.toString();
-}
-
-}}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/doctok/WW8CpAndFc.hxx b/writerfilter/source/doctok/WW8CpAndFc.hxx
deleted file mode 100644
index 1eed11ed07ec..000000000000
--- a/writerfilter/source/doctok/WW8CpAndFc.hxx
+++ /dev/null
@@ -1,245 +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_WW8_CP_AND_FC_HXX
-#define INCLUDED_WW8_CP_AND_FC_HXX
-
-#include <sal/types.h>
-#include <doctok/WW8Document.hxx>
-#include <set>
-#include <boost/unordered_map.hpp>
-#include <iostream>
-
-namespace writerfilter {
-namespace doctok
-{
-using namespace ::std;
-
-template <class T>
-bool operator <= (const T & rA, const T & rB)
-{
- return ! ( rB < rA );
-}
-
-/**
- A character position.
-
- This is a wrapper to make the type for WW8 character position (CP)
- distinct from WW8 file character positions (FC).
-*/
-struct Cp
-{
- sal_uInt32 nCp; // the WW8 character position
-
- Cp() : nCp(0) {}
-
- Cp(sal_uInt32 nCp_) : nCp(nCp_) {}
-
- /**
- Returns the WW8 character position.
-
- @return the WW8 character position
- */
- sal_uInt32 get() const { return nCp; }
-
- /**
- Sets the WW8 character position.
-
- @param nCp_ the WW8 character position to set
- */
- void set(sal_uInt32 nCp_) { nCp = nCp_; }
-
- /**
- Calculate CP moved backward.
-
- None of the involved CPs is changed.
-
- @param n amount of movement
-
- @return CP moved @n steps backward
- */
- sal_uInt32 operator - (const Cp & rCp) const
- { return nCp - rCp.nCp; }
-
- /**
- Calculate CP moved forward.
-
- None of the involved CPs is changed.
-
- @param n amount of movement
-
- @return CP moved @n steps forward
- */
- Cp operator + (sal_uInt32 n) const
- { return Cp(nCp + n); }
-
- /**
- Advance CP forward.
-
- @attention The CP is altered.
-
- @param n amount of movement
-
- @return CP moved @n steps forward
- */
- Cp & operator += (sal_uInt32 n)
- {
- nCp += n;
-
- return *this;
- }
-
- /**
- Return string representation of CP.
- */
- string toString() const;
-
- friend bool operator < (const Cp & rA, const Cp & rB);
- friend bool operator == (const Cp & rA, const Cp & rB);
- friend ostream & operator << (ostream & o, const Cp & rCp);
-};
-
-/**
- A file character position.
-
- This is a wrapper to make the type for WW8 character position (CP)
- distinct from WW8 file character positions (FC).
-
- \see{Cp}
-*/
-struct Fc
-{
- sal_uInt32 mnFc; // the WW8 character position
- bool mbComplex;
-
- Fc() : mnFc(0), mbComplex(false) {}
-
- Fc(sal_uInt32 nFc, bool bComplex = true)
- : mnFc(nFc), mbComplex(bComplex)
- {}
-
- sal_uInt32 complexFactor() const { return mbComplex ? 1 : 2; }
-
- /**
- Returns the WW8 character position.
-
- @return the WW8 character position
- */
- sal_uInt32 get() const { return mnFc; }
-
- /**
- Sets the WW8 file character position.
-
- @param nFc the WW8 file character position to set
- */
- void set(sal_uInt32 nFc) { mnFc = nFc; }
-
- /**
- Set if the FC is complex.
-
- @param bComplex true if FC is set to be complex
- */
- void setComplex(bool bComplex) { mbComplex = bComplex; }
-
- /**
- Return if FC is complex.
-
- @retval true FC is complex
- @retval false else
- */
- bool isComplex() const { return mbComplex; }
-
- /**
- Distance of FCs.
-
- None of the involved FCs is changed.
-
- @param rFc FC to calculate distance to
-
- @return Distance from @a rFc to this FC
- */
- sal_uInt32 operator - (const Fc & rFc) const
- { return (mnFc - rFc.mnFc) / complexFactor(); }
-
- /**
- Calculate FC moved backward.
-
- None of the involved FCs is changed.
-
- @param n amount of movement
-
- @return FC moved @n steps backward
- */
- Fc operator - (sal_uInt32 n) const
- { return Fc(mnFc - n * complexFactor(), mbComplex); }
-
- /**
- Calculate FC moved forward.
-
- None of the involved FCs is changed.
-
- @param n amount of movement
-
- @return FC moved @n steps Forward
- */
- Fc operator + (sal_uInt32 n) const
- { return Fc(mnFc + n * complexFactor(), mbComplex); }
-
- /**
- Return string representation of FC.
- */
- string toString() const;
-
- friend bool operator < (const Fc & rA, const Fc & rB);
- friend bool operator == (const Fc & rA, const Fc & rB);
- friend ostream & operator << (ostream & o, const Fc & rFc);
-};
-
-struct CpHash
-{
- size_t operator()(const Cp & rCp) const
- {
- return rCp.get();
- }
-};
-
-struct FcHash
-{
- size_t operator()(const Fc & rFc) const
- {
- return rFc.get();
- }
-};
-
-struct CpEq
-{
- bool operator() (const Cp & rA, const Cp &rB) const
- {
- return rA == rB;
- }
-};
-
-typedef boost::unordered_map<Cp, Fc, CpHash, CpEq> Cp2FcHashMap_t;
-
-} // namespace doctok
-} // namespace writerfilter
-
-#endif // INCLUDED_WW8_CP_AND_FC_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */