basic/qa/cppunit/test_scanner.cxx | 2 basic/source/comp/buffer.cxx | 12 basic/source/inc/buffer.hxx | 1 basic/source/inc/scanner.hxx | 1 binaryurp/source/lessoperators.cxx | 22 binaryurp/source/lessoperators.hxx | 4 comphelper/Library_comphelper.mk | 1 comphelper/qa/string/test_string.cxx | 57 -- comphelper/source/misc/compareversionstrings.cxx | 69 -- connectivity/source/commontools/dbexception.cxx | 7 connectivity/source/drivers/firebird/ResultSetMetaData.hxx | 4 connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx | 13 connectivity/source/drivers/mork/MResultSet.hxx | 6 connectivity/source/drivers/mork/MResultSetMetaData.hxx | 4 connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx | 3 connectivity/source/inc/dbase/dindexnode.hxx | 5 connectivity/source/inc/file/FResultSetMetaData.hxx | 4 connectivity/source/inc/java/sql/DriverPropertyInfo.hxx | 2 connectivity/source/inc/java/tools.hxx | 18 connectivity/source/inc/odbc/OResultSetMetaData.hxx | 3 dbaccess/source/core/misc/dsntypes.cxx | 8 dbaccess/source/inc/dsntypes.hxx | 3 dbaccess/source/ui/inc/charsets.hxx | 3 dbaccess/source/ui/misc/charsets.cxx | 8 drawinglayer/source/primitive2d/baseprimitive2d.cxx | 32 - drawinglayer/source/primitive3d/baseprimitive3d.cxx | 10 editeng/qa/lookuptree/lookuptree_test.cxx | 17 editeng/source/lookuptree/Trie.cxx | 11 filter/source/graphicfilter/idxf/dxfvec.hxx | 8 framework/inc/classes/checkediterator.hxx | 35 - include/basic/sbxvar.hxx | 32 - include/comphelper/property.hxx | 22 include/comphelper/stl_types.hxx | 1 include/comphelper/string.hxx | 19 include/connectivity/dbcharset.hxx | 4 include/connectivity/dbexception.hxx | 1 include/connectivity/sdbcx/VDescriptor.hxx | 6 include/drawinglayer/geometry/viewinformation2d.hxx | 1 include/drawinglayer/primitive2d/baseprimitive2d.hxx | 4 include/drawinglayer/primitive3d/baseprimitive3d.hxx | 2 include/drawinglayer/texture/texture.hxx | 1 include/editeng/Trie.hxx | 2 include/filter/msfilter/msdffimp.hxx | 2 include/o3tl/lazy_update.hxx | 5 include/oox/helper/containerhelper.hxx | 1 include/sfx2/mnumgr.hxx | 1 include/sfx2/sidebar/Context.hxx | 1 include/sfx2/sidebar/EnumContext.hxx | 1 include/svl/nranges.hxx | 4 include/svtools/HtmlWriter.hxx | 3 include/svx/svdglue.hxx | 1 include/svx/svdlayer.hxx | 1 include/svx/svdmark.hxx | 1 include/svx/svdsob.hxx | 6 include/tools/date.hxx | 2 include/tools/inetmime.hxx | 22 include/tools/multisel.hxx | 1 include/tools/poly.hxx | 4 include/tools/stream.hxx | 7 include/tools/svborder.hxx | 9 include/tools/urlobj.hxx | 2 include/vcl/alpha.hxx | 2 include/vcl/animate.hxx | 2 include/vcl/cursor.hxx | 2 include/vcl/dibtools.hxx | 1 include/vcl/gdimtf.hxx | 1 include/vcl/hatch.hxx | 1 include/vcl/image.hxx | 1 include/vcl/inputctx.hxx | 2 include/vcl/menu.hxx | 3 include/vcl/print.hxx | 2 include/vcl/settings.hxx | 2 include/vcl/textrectinfo.hxx | 2 include/vcl/txtattr.hxx | 2 include/vcl/window.hxx | 7 jvmfwk/source/framework.hxx | 1 jvmfwk/source/libxmlutil.hxx | 2 sc/inc/address.hxx | 31 - sc/inc/bigrange.hxx | 2 sc/inc/chartpos.hxx | 2 sc/qa/unit/ucalc_sharedformula.cxx | 27 sc/source/core/data/bcaslot.cxx | 24 sc/source/core/inc/bcaslot.hxx | 5 sc/source/core/tool/chartpos.cxx | 7 sd/inc/OutlinerIterator.hxx | 11 sd/source/ui/inc/unomodel.hxx | 1 sd/source/ui/view/OutlinerIterator.cxx | 8 sfx2/source/menu/mnumgr.cxx | 5 sfx2/source/sidebar/Context.cxx | 6 sfx2/source/sidebar/EnumContext.cxx | 6 svgio/qa/cppunit/SvgImportTest.cxx | 17 svl/source/items/nranges.cxx | 278 ---------- svtools/qa/unit/testHtmlWriter.cxx | 115 ---- svtools/source/svhtml/HtmlWriter.cxx | 21 svx/inc/xpolyimp.hxx | 2 svx/source/svdraw/svdlayer.cxx | 23 svx/source/svdraw/svdmark.cxx | 26 svx/source/xoutdev/_xpoly.cxx | 14 sw/inc/dbmgr.hxx | 9 sw/inc/docary.hxx | 1 sw/inc/index.hxx | 20 sw/inc/swrect.hxx | 16 sw/qa/extras/uiwriter/uiwriter.cxx | 2 sw/source/core/bastyp/index.cxx | 24 tools/qa/cppunit/test_stream.cxx | 12 tools/source/datetime/tdate.cxx | 14 tools/source/fsys/urlobj.cxx | 45 - tools/source/generic/svborder.cxx | 13 tools/source/memtools/multisel.cxx | 13 ucb/source/inc/regexpmap.hxx | 29 - vcl/source/app/settings.cxx | 12 vcl/source/gdi/dibtools.cxx | 5 vcl/source/gdi/print.cxx | 11 vcl/source/window/menu.cxx | 15 vcl/source/window/window.cxx | 46 - writerperfect/inc/DirectoryStream.hxx | 1 writerperfect/qa/unit/DirectoryStreamTest.cxx | 42 + writerperfect/source/common/DirectoryStream.cxx | 32 - 118 files changed, 94 insertions(+), 1474 deletions(-)
New commits: commit b14224fe97b8a44232c9c1401d3a49771f46582e Author: Noel Grandin <n...@peralex.com> Date: Tue Feb 2 16:15:51 2016 +0200 loplugin:unusedmethods using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgran...@gmail.com> Tested-by: Noel Grandin <noelgran...@gmail.com> diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx index ba1320b..509a793 100644 --- a/basic/qa/cppunit/test_scanner.cxx +++ b/basic/qa/cppunit/test_scanner.cxx @@ -25,7 +25,6 @@ namespace { sal_uInt16 line; sal_uInt16 col1; - sal_uInt16 col2; OUString text; double number; SbxDataType type; @@ -85,7 +84,6 @@ namespace Symbol symbol; symbol.line = scanner.GetLine(); symbol.col1 = scanner.GetCol1(); - symbol.col2 = scanner.GetCol2(); symbol.text = scanner.GetSym(); symbol.number = scanner.GetDbl(); symbol.type = scanner.GetType(); diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx index bb1be6e..8954395 100644 --- a/basic/source/comp/buffer.cxx +++ b/basic/source/comp/buffer.cxx @@ -220,16 +220,4 @@ void SbiBuffer::operator +=( sal_Int32 n ) } -void SbiBuffer::operator +=( const OUString& n ) -{ - sal_uInt32 len = n.getLength() + 1; - if( Check( len ) ) - { - OString aByteStr(OUStringToOString(n, osl_getThreadTextEncoding())); - memcpy( pCur, aByteStr.getStr(), len ); - pCur += len; - nOff += len; - } -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/inc/buffer.hxx b/basic/source/inc/buffer.hxx index 2faeb2b..3b1b5a8 100644 --- a/basic/source/inc/buffer.hxx +++ b/basic/source/inc/buffer.hxx @@ -37,7 +37,6 @@ public: ~SbiBuffer(); void Patch( sal_uInt32, sal_uInt32 ); void Chain( sal_uInt32 ); - void operator += (const OUString&); // save basic-string void operator += (sal_Int8); // save character void operator += (sal_Int16); // save integer bool operator += (sal_uInt8); // save character diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx index e939bbc..d17337e 100644 --- a/basic/source/inc/scanner.hxx +++ b/basic/source/inc/scanner.hxx @@ -78,7 +78,6 @@ public: sal_Int32 GetErrors() { return nErrors; } sal_Int32 GetLine() { return nLine; } sal_Int32 GetCol1() { return nCol1; } - sal_Int32 GetCol2() { return nCol2; } void SetCol1( sal_Int32 n ) { nCol1 = n; } StarBASIC* GetBasic() { return pBasic; } void SaveLine() { pSaveLine = pLine; } diff --git a/binaryurp/source/lessoperators.cxx b/binaryurp/source/lessoperators.cxx index 6d8952d..6637517 100644 --- a/binaryurp/source/lessoperators.cxx +++ b/binaryurp/source/lessoperators.cxx @@ -42,28 +42,6 @@ bool operator <(TypeDescription const & left, TypeDescription const & right) { OUString::unacquired(&right.get()->pTypeName))); } -bool TypeDescEqual::operator()( const TypeDescription& rLeft, const TypeDescription& rRight) const -{ - assert( rLeft.is() && rRight.is()); - const typelib_TypeDescription& rA = *rLeft.get(); - const typelib_TypeDescription& rB = *rRight.get(); - if( rA.eTypeClass != rB.eTypeClass) - return false; - const sal_Int32 nCmp = rtl_ustr_compare_WithLength( - rA.pTypeName->buffer, rA.pTypeName->length, - rB.pTypeName->buffer, rB.pTypeName->length); - return (nCmp == 0); -} - -sal_Int32 TypeDescHash::operator()( const TypeDescription& rTD) const -{ - assert( rTD.is()); - const typelib_TypeDescription& rA = *rTD.get(); - sal_Int32 h = rtl_ustr_hashCode_WithLength( rA.pTypeName->buffer, rA.pTypeName->length); - h ^= static_cast<sal_Int32>(rA.eTypeClass); - return h; -} - } } } } namespace rtl { diff --git a/binaryurp/source/lessoperators.hxx b/binaryurp/source/lessoperators.hxx index 317e76a..f3202b5 100644 --- a/binaryurp/source/lessoperators.hxx +++ b/binaryurp/source/lessoperators.hxx @@ -31,10 +31,6 @@ namespace com { namespace sun { namespace star { namespace uno { bool operator <(TypeDescription const & left, TypeDescription const & right); -struct TypeDescHash { sal_Int32 operator()( const TypeDescription&) const; }; - -struct TypeDescEqual { bool operator()( const TypeDescription&, const TypeDescription&) const; }; - } } } } namespace rtl { diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk index 155d293..7047d8a 100644 --- a/comphelper/Library_comphelper.mk +++ b/comphelper/Library_comphelper.mk @@ -76,7 +76,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\ comphelper/source/misc/accimplaccess \ comphelper/source/misc/anytostring \ comphelper/source/misc/asyncnotification \ - comphelper/source/misc/compareversionstrings \ comphelper/source/misc/comphelper_module \ comphelper/source/misc/comphelper_services \ comphelper/source/misc/componentbase \ diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx index af03035..97814da 100644 --- a/comphelper/qa/string/test_string.cxx +++ b/comphelper/qa/string/test_string.cxx @@ -43,8 +43,6 @@ public: void testDecimalStringToNumber(); void testIsdigitAsciiString(); void testReverseString(); - void testEqualsString(); - void testCompareVersionStrings(); CPPUNIT_TEST_SUITE(TestString); CPPUNIT_TEST(testNatural); @@ -57,8 +55,6 @@ public: CPPUNIT_TEST(testDecimalStringToNumber); CPPUNIT_TEST(testIsdigitAsciiString); CPPUNIT_TEST(testReverseString); - CPPUNIT_TEST(testEqualsString); - CPPUNIT_TEST(testCompareVersionStrings); CPPUNIT_TEST_SUITE_END(); }; @@ -398,59 +394,6 @@ void TestString::testReverseString() CPPUNIT_ASSERT(aOut == "CBA"); } -void TestString::testEqualsString() -{ - OString aIn("A"); - CPPUNIT_ASSERT(::comphelper::string::equals(aIn, 'A')); - CPPUNIT_ASSERT(!::comphelper::string::equals(aIn, 'B')); - aIn = OString("AA"); - CPPUNIT_ASSERT(!::comphelper::string::equals(aIn, 'A')); - aIn.clear(); - CPPUNIT_ASSERT(!::comphelper::string::equals(aIn, 'A')); -} - -int sign(int n) -{ - if (n == 0) - return 0; - if (n < 0) - return -1; - else - return 1; -} - -void TestString::testCompareVersionStrings() -{ -#ifdef TEST -#error TEST already defined -#endif -#define TEST(a,b,result) \ - CPPUNIT_ASSERT(sign(::comphelper::string::compareVersionStrings(a, b)) == result); \ - if ( result != 0 ) \ - CPPUNIT_ASSERT(sign(::comphelper::string::compareVersionStrings(b, a)) == -(result)) - - TEST("", "", 0); - TEST("", "0", -1); - TEST("", "a", -1); - TEST("0", "1", -1); - TEST("1", "2", -1); - TEST("2", "10", -1); - TEST("01", "1", -1); - TEST("01", "001", 1); - TEST("1.00", "1", 1); - TEST("1.2", "1", 1); - TEST("1.01", "1.1", -1); - TEST("1.001", "1.1", -1); - TEST("1.001", "1.010", -1); - TEST("1.2.a", "1.2.b", -1); - TEST("1.2.3 (foo,bar)", "1.2.9", -1); - TEST("1.2.3 (foo,bar)", "1.2.4 (foo,bar)", -1); - TEST("1.2.3 (foo,bar)", "1.2.3 (foo)", 1); // Neither ordering makes any more sense than the other here, as long as they compare unequal - TEST("1.2.3 (foo,bar)", "1.2.2 (foo,bar)", 1); - -#undef TEST -} - CPPUNIT_TEST_SUITE_REGISTRATION(TestString); } diff --git a/comphelper/source/misc/compareversionstrings.cxx b/comphelper/source/misc/compareversionstrings.cxx deleted file mode 100644 index a5ca928..0000000 --- a/comphelper/source/misc/compareversionstrings.cxx +++ /dev/null @@ -1,69 +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/. - */ - -#include <ctype.h> -#include <string.h> - -#include <comphelper/string.hxx> -#include <rtl/ustring.hxx> - -namespace comphelper { namespace string { - -namespace { - -// BSD licensed, from http://git.musl-libc.org/cgit/musl/plain/src/string/strverscmp.c - -int strverscmp(const char *l, const char *r) -{ - int haszero=1; - while (*l==*r) { - if (!*l) return 0; - - if (*l=='0') { - if (haszero==1) { - haszero=0; - } - } else if (isdigit(*l)) { - if (haszero==1) { - haszero=2; - } - } else { - haszero=1; - } - l++; r++; - } - if (haszero==1 && (*l=='0' || *r=='0')) { - haszero=0; - } - if ((isdigit(*l) && isdigit(*r) ) && haszero) { - size_t lenl=0, lenr=0; - while (isdigit(l[lenl]) ) lenl++; - while (isdigit(r[lenr]) ) lenr++; - if (lenl==lenr) { - return (*l - *r); - } else if (lenl>lenr) { - return 1; - } else { - return -1; - } - } else { - return (*l - *r); - } -} - -} // anonymous namespace - -int compareVersionStrings(const OUString& a, const OUString& b) -{ - return strverscmp(OUStringToOString(a, RTL_TEXTENCODING_UTF8).getStr(), OUStringToOString(b, RTL_TEXTENCODING_UTF8).getStr()); -} - -} } - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index da440ef..83b02d6 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -178,13 +178,6 @@ SQLExceptionInfo::operator const ::com::sun::star::sdbc::SQLException*() const } -SQLExceptionInfo::operator const ::com::sun::star::sdbc::SQLWarning*() const -{ - OSL_ENSURE(isKindOf(SQL_WARNING), "SQLExceptionInfo::operator SQLException* : invalid call !"); - return static_cast<const ::com::sun::star::sdbc::SQLWarning*>(m_aContent.getValue()); -} - - SQLExceptionInfo::operator const ::com::sun::star::sdb::SQLContext*() const { OSL_ENSURE(isKindOf(SQL_CONTEXT), "SQLExceptionInfo::operator SQLException* : invalid call !"); diff --git a/connectivity/source/drivers/firebird/ResultSetMetaData.hxx b/connectivity/source/drivers/firebird/ResultSetMetaData.hxx index 5f6d591..7047abc 100644 --- a/connectivity/source/drivers/firebird/ResultSetMetaData.hxx +++ b/connectivity/source/drivers/firebird/ResultSetMetaData.hxx @@ -52,10 +52,6 @@ namespace connectivity , m_pSqlda(pSqlda) {} - /// Avoid ambigous cast error from the compiler. - inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw() - { return this; } - virtual sal_Int32 SAL_CALL getColumnCount() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; virtual sal_Bool SAL_CALL isAutoIncrement(sal_Int32 column) diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx index 1c8d6f9..6ad2734 100644 --- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx +++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx @@ -48,17 +48,4 @@ jclass java_sql_DriverPropertyInfo::getMyClass() const } -bool java_sql_DriverPropertyInfo::required() -{ - jboolean out(0); - SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); - - { - jfieldID id = t.pEnv->GetFieldID(getMyClass(),"required","Z"); - if(id) - out = t.pEnv->GetBooleanField( object, id); - } //t.pEnv - return out; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mork/MResultSet.hxx b/connectivity/source/drivers/mork/MResultSet.hxx index 142c375..4c370c4 100644 --- a/connectivity/source/drivers/mork/MResultSet.hxx +++ b/connectivity/source/drivers/mork/MResultSet.hxx @@ -118,12 +118,6 @@ namespace connectivity OResultSet(OCommonStatement* pStmt, const std::shared_ptr< ::connectivity::OSQLParseTreeIterator >& _pSQLIterator ); - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *() - { - return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<OResultSet_BASE*>(this)); - } - // ::cppu::OComponentHelper virtual void SAL_CALL disposing() override; // XInterface diff --git a/connectivity/source/drivers/mork/MResultSetMetaData.hxx b/connectivity/source/drivers/mork/MResultSetMetaData.hxx index e3bd88e..f3f9da4 100644 --- a/connectivity/source/drivers/mork/MResultSetMetaData.hxx +++ b/connectivity/source/drivers/mork/MResultSetMetaData.hxx @@ -58,10 +58,6 @@ namespace connectivity {} - /// Avoid ambigous cast error from the compiler. - inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw() - { return this; } - void checkColumnIndex(sal_Int32 column) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; diff --git a/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx b/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx index bf11724..cde5ecd 100644 --- a/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx +++ b/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx @@ -48,9 +48,6 @@ namespace connectivity ODatabaseMetaDataResultSetMetaData( ) { } - /// Avoid ambigous cast error from the compiler. - inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw() - { return this; } virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 18b143a..2a324b4 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -69,7 +69,6 @@ namespace connectivity bool operator < (const ONDXKey& rKey) const; bool operator <= (const ONDXKey& rKey) const; bool operator > (const ONDXKey& rKey) const; - bool operator >= (const ONDXKey& rKey) const; static bool IsText(sal_Int32 eType); @@ -310,10 +309,6 @@ namespace connectivity { return !operator > (rKey); } - inline bool ONDXKey::operator >= (const ONDXKey& rKey) const - { - return !operator< (rKey); - } inline void ONDXNode::SetChild(ONDXPagePtr aCh, ONDXPage* pParent) { diff --git a/connectivity/source/inc/file/FResultSetMetaData.hxx b/connectivity/source/inc/file/FResultSetMetaData.hxx index 5c03723..d507161 100644 --- a/connectivity/source/inc/file/FResultSetMetaData.hxx +++ b/connectivity/source/inc/file/FResultSetMetaData.hxx @@ -50,10 +50,6 @@ namespace connectivity // a Constructor, that is needed for when Returning the Object is needed: OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const OUString& _aTableName,OFileTable* _pTable); - /// Avoid ambigous cast error from the compiler. - inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw() - { return this; } - virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; virtual sal_Bool SAL_CALL isCaseSensitive( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; diff --git a/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx b/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx index db86f2a..1db9dae 100644 --- a/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx +++ b/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx @@ -39,8 +39,6 @@ namespace connectivity virtual ~java_sql_DriverPropertyInfo(); // A ctor that is needed for returning the object java_sql_DriverPropertyInfo( JNIEnv * pEnv, jobject myObj ) : java_lang_Object( pEnv, myObj ){} - - bool required(); }; } diff --git a/connectivity/source/inc/java/tools.hxx b/connectivity/source/inc/java/tools.hxx index bd60050..aa6e805 100644 --- a/connectivity/source/inc/java/tools.hxx +++ b/connectivity/source/inc/java/tools.hxx @@ -43,24 +43,6 @@ namespace connectivity java_util_Properties* createStringPropertyArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - template<class T,class JT> ::com::sun::star::uno::Sequence< T > copyArrayAndDelete(JNIEnv *pEnv,jobjectArray _Array, const T*, const JT* ) - { - ::com::sun::star::uno::Sequence< T > xOut; - if(_Array) - { - jsize nLen = pEnv->GetArrayLength(_Array); - xOut.realloc(nLen); - for(jsize i=0;i<nLen;++i) - { - JT xInfo(pEnv,pEnv->GetObjectArrayElement(_Array,i)); - java_lang_Object::ThrowSQLException(pEnv,nullptr); - xOut.getArray()[i] = xInfo; - } - pEnv->DeleteLocalRef(_Array); - } - return xOut; - } - jobject convertTypeMapToJavaMap(JNIEnv *pEnv,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & _rMap); /** return if a exception occurred diff --git a/connectivity/source/inc/odbc/OResultSetMetaData.hxx b/connectivity/source/inc/odbc/OResultSetMetaData.hxx index 70ec038..de591e3 100644 --- a/connectivity/source/inc/odbc/OResultSetMetaData.hxx +++ b/connectivity/source/inc/odbc/OResultSetMetaData.hxx @@ -84,9 +84,6 @@ namespace connectivity { return m_pConnection->getOdbcFunction(_nIndex); } - // Avoid ambigous cast error from the compiler. - inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw() - { return this; } virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override; diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index fe94d2e..9f8550e 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -577,14 +577,6 @@ const ODsnTypeCollection::TypeIterator& ODsnTypeCollection::TypeIterator::operat return *this; } -const ODsnTypeCollection::TypeIterator& ODsnTypeCollection::TypeIterator::operator--() -{ - OSL_ENSURE(m_nPosition >= 0, "ODsnTypeCollection::TypeIterator::operator-- : invalid position!"); - if (m_nPosition >= 0) - --m_nPosition; - return *this; -} - bool operator==(const ODsnTypeCollection::TypeIterator& lhs, const ODsnTypeCollection::TypeIterator& rhs) { return (lhs.m_pContainer == rhs.m_pContainer) && (lhs.m_nPosition == rhs.m_nPosition); diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx index 8de9a93..0ed4b22 100644 --- a/dbaccess/source/inc/dsntypes.hxx +++ b/dbaccess/source/inc/dsntypes.hxx @@ -207,9 +207,6 @@ public: /// prefix increment const TypeIterator& operator++(); - /// prefix decrement - const TypeIterator& operator--(); - protected: TypeIterator(const ODsnTypeCollection* _pContainer, sal_Int32 _nInitialPos = 0); }; diff --git a/dbaccess/source/ui/inc/charsets.hxx b/dbaccess/source/ui/inc/charsets.hxx index 763e661..87a957c 100644 --- a/dbaccess/source/ui/inc/charsets.hxx +++ b/dbaccess/source/ui/inc/charsets.hxx @@ -103,9 +103,6 @@ namespace dbaui /// prefix increment const ExtendedCharsetIterator& operator++(); - /// prefix decrement - const ExtendedCharsetIterator& operator--(); - protected: ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, const base_iterator& _rPosition ); }; diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx index d53e417..fd5801a 100644 --- a/dbaccess/source/ui/misc/charsets.cxx +++ b/dbaccess/source/ui/misc/charsets.cxx @@ -128,14 +128,6 @@ namespace dbaui return *this; } - const OCharsetDisplay::ExtendedCharsetIterator& OCharsetDisplay::ExtendedCharsetIterator::operator--() - { - OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin(), "OCharsetDisplay::ExtendedCharsetIterator::operator-- : invalid position!"); - if ( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin() ) - --m_aPosition; - return *this; - } - bool operator==(const OCharsetDisplay::ExtendedCharsetIterator& lhs, const OCharsetDisplay::ExtendedCharsetIterator& rhs) { return (lhs.m_pContainer == rhs.m_pContainer) && (lhs.m_aPosition == rhs.m_aPosition); diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index 44008a2..5357688 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -209,38 +209,6 @@ namespace drawinglayer return (pA->operator==(*pB)); } - bool arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive2DSequence& rB) - { - const bool bAHasElements(rA.hasElements()); - - if(bAHasElements != rB.hasElements()) - { - return false; - } - - if(!bAHasElements) - { - return true; - } - - const sal_Int32 nCount(rA.getLength()); - - if(nCount != rB.getLength()) - { - return false; - } - - for(sal_Int32 a(0L); a < nCount; a++) - { - if(!arePrimitive2DReferencesEqual(rA[a], rB[a])) - { - return false; - } - } - - return true; - } - bool Primitive2DContainer::operator==(const Primitive2DContainer& rB) const { const bool bAHasElements(!empty()); diff --git a/drawinglayer/source/primitive3d/baseprimitive3d.cxx b/drawinglayer/source/primitive3d/baseprimitive3d.cxx index 460883a..d9fc8ed 100644 --- a/drawinglayer/source/primitive3d/baseprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/baseprimitive3d.cxx @@ -221,16 +221,6 @@ namespace drawinglayer insert(end(), rSource.begin(), rSource.end()); } - void Primitive3DContainer::append(Primitive3DContainer&& rSource) - { - size_t n = size(); - resize(n + rSource.size()); - for (size_t i = 0; i<rSource.size(); ++i) - { - (*this)[n + i] = std::move( rSource[i] ); - } - } - } // end of namespace primitive3d } // end of namespace drawinglayer diff --git a/editeng/qa/lookuptree/lookuptree_test.cxx b/editeng/qa/lookuptree/lookuptree_test.cxx index 91228fd..fcdf93a 100644 --- a/editeng/qa/lookuptree/lookuptree_test.cxx +++ b/editeng/qa/lookuptree/lookuptree_test.cxx @@ -125,27 +125,18 @@ void LookupTreeTest::testTrieGetAllEntries() { editeng::Trie trie; - std::vector<OUString> entries; - - trie.getAllEntries(entries); - CPPUNIT_ASSERT_EQUAL( (size_t) 0, entries.size() ); + CPPUNIT_ASSERT_EQUAL( (size_t) 0, trie.size() ); trie.insert("A"); - trie.getAllEntries(entries); - CPPUNIT_ASSERT_EQUAL( (size_t) 1, entries.size() ); - entries.clear(); + CPPUNIT_ASSERT_EQUAL( (size_t) 1, trie.size() ); trie.insert("B"); trie.insert("C"); - trie.getAllEntries(entries); - CPPUNIT_ASSERT_EQUAL( (size_t) 3, entries.size() ); - entries.clear(); + CPPUNIT_ASSERT_EQUAL( (size_t) 3, trie.size() ); trie.insert("AA"); trie.insert("AAA"); - trie.getAllEntries(entries); - CPPUNIT_ASSERT_EQUAL( (size_t) 5, entries.size() ); - entries.clear(); + CPPUNIT_ASSERT_EQUAL( (size_t) 5, trie.size() ); } } // namespace end diff --git a/editeng/source/lookuptree/Trie.cxx b/editeng/source/lookuptree/Trie.cxx index 1a6dbd1..234a8f5e 100644 --- a/editeng/source/lookuptree/Trie.cxx +++ b/editeng/source/lookuptree/Trie.cxx @@ -196,12 +196,13 @@ void Trie::findSuggestions(const OUString& sWordPart, vector<OUString>& rSuggest } } -void Trie::getAllEntries(std::vector<OUString>& entries) +size_t Trie::size() const { - if (mRoot) - { - mRoot->collectSuggestions(OUString(), entries); - } + if (!mRoot) + return 0; + std::vector<OUString> entries; + mRoot->collectSuggestions(OUString(), entries); + return entries.size(); } } diff --git a/filter/source/graphicfilter/idxf/dxfvec.hxx b/filter/source/graphicfilter/idxf/dxfvec.hxx index 21e63bc..a5ce4e4 100644 --- a/filter/source/graphicfilter/idxf/dxfvec.hxx +++ b/filter/source/graphicfilter/idxf/dxfvec.hxx @@ -73,7 +73,6 @@ public: // summation/subtraktion: DXFVector & operator += (const DXFVector & rV); DXFVector operator + (const DXFVector & rV) const; - DXFVector & operator -= (const DXFVector & rV); DXFVector operator - (const DXFVector & rV) const; // vector product @@ -196,13 +195,6 @@ inline DXFVector DXFVector::operator + (const DXFVector & rV) const } -inline DXFVector & DXFVector::operator -= (const DXFVector & rV) -{ - fx-=rV.fx; fy-=rV.fy; fz-=rV.fz; - return *this; -} - - inline DXFVector DXFVector::operator - (const DXFVector & rV) const { return DXFVector(fx-rV.fx, fy-rV.fy, fz-rV.fz); diff --git a/framework/inc/classes/checkediterator.hxx b/framework/inc/classes/checkediterator.hxx index 2f9834e..4674e8b 100644 --- a/framework/inc/classes/checkediterator.hxx +++ b/framework/inc/classes/checkediterator.hxx @@ -68,41 +68,6 @@ class CheckedIterator // interface methods - /*-**************************************************************************************************** - @short step to next element in container. - @descr If end of container is reached we change our internal "m_eEndState". - If end reached for first time; we set it to E_END; - If you step to next element again; we set it to E_AFTEREND. - So you have a chance to differ between "exact end" and "after end"! - - @return A reference to our changed object himself. - *//*-*****************************************************************************************************/ - - inline CheckedIterator& operator++() - { - // Warn programmer if he forget to initialize object! - SAL_WARN_IF( m_pContainer==nullptr, "fwk", "CheckedIterator::operator++(): Object not initialized!" ); - // Step to next element if any exist or set our end states. - switch( m_eEndState ) - { - case E_BEFOREEND: { - ++m_pPosition; - // If iterator reaching end ... set right state! - if( m_pPosition == m_pContainer->end() ) - { - m_eEndState = E_END; - } - } - break; - case E_END : { - // Set state only ... iterator already points to end of container! - m_eEndState = E_AFTEREND; - } - break; - } - return *this; - } - // private member private: diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx index 2f56372..6dfd7e2 100644 --- a/include/basic/sbxvar.hxx +++ b/include/basic/sbxvar.hxx @@ -192,35 +192,15 @@ public: // TODO: Ensure error conditions (overflow, conversions) // are taken into consideration in Compute and Compare - inline bool operator ==( const SbxValue& ) const; - inline bool operator !=( const SbxValue& ) const; - inline bool operator <( const SbxValue& ) const; - inline bool operator >( const SbxValue& ) const; inline bool operator <=( const SbxValue& ) const; inline bool operator >=( const SbxValue& ) const; inline SbxValue& operator *=( const SbxValue& ); inline SbxValue& operator /=( const SbxValue& ); - inline SbxValue& operator %=( const SbxValue& ); inline SbxValue& operator +=( const SbxValue& ); inline SbxValue& operator -=( const SbxValue& ); - inline SbxValue& operator &=( const SbxValue& ); - inline SbxValue& operator |=( const SbxValue& ); - inline SbxValue& operator ^=( const SbxValue& ); }; -inline bool SbxValue::operator==( const SbxValue& r ) const -{ return Compare( SbxEQ, r ); } - -inline bool SbxValue::operator!=( const SbxValue& r ) const -{ return Compare( SbxNE, r ); } - -inline bool SbxValue::operator<( const SbxValue& r ) const -{ return Compare( SbxLT, r ); } - -inline bool SbxValue::operator>( const SbxValue& r ) const -{ return Compare( SbxGT, r ); } - inline bool SbxValue::operator<=( const SbxValue& r ) const { return Compare( SbxLE, r ); } @@ -233,24 +213,12 @@ inline SbxValue& SbxValue::operator*=( const SbxValue& r ) inline SbxValue& SbxValue::operator/=( const SbxValue& r ) { Compute( SbxDIV, r ); return *this; } -inline SbxValue& SbxValue::operator%=( const SbxValue& r ) -{ Compute( SbxMOD, r ); return *this; } - inline SbxValue& SbxValue::operator+=( const SbxValue& r ) { Compute( SbxPLUS, r ); return *this; } inline SbxValue& SbxValue::operator-=( const SbxValue& r ) { Compute( SbxMINUS, r ); return *this; } -inline SbxValue& SbxValue::operator&=( const SbxValue& r ) -{ Compute( SbxAND, r ); return *this; } - -inline SbxValue& SbxValue::operator|=( const SbxValue& r ) -{ Compute( SbxOR, r ); return *this; } - -inline SbxValue& SbxValue::operator^=( const SbxValue& r ) -{ Compute( SbxXOR, r ); return *this; } - class SbxArray; class SbxInfo; diff --git a/include/comphelper/property.hxx b/include/comphelper/property.hxx index 5bc46a8..bad79df 100644 --- a/include/comphelper/property.hxx +++ b/include/comphelper/property.hxx @@ -40,28 +40,6 @@ namespace comphelper } }; - struct PropertyStringEqualFunctor : ::std::binary_function< css::beans::Property, OUString, bool > - { - - inline bool operator()( const css::beans::Property& lhs, const OUString& rhs ) const - { - return lhs.Name == rhs ; - } - - inline bool operator()( const OUString& lhs, const css::beans::Property& rhs ) const - { - return lhs == rhs.Name ; - } - }; - - struct PropertyEqualByName : public ::std::binary_function< css::beans::Property, css::beans::Property, bool > - { - bool operator() (const css::beans::Property& x, const css::beans::Property& y) const - { - return x.Name == y.Name ; - } - }; - /// remove the property with the given name from the given sequence COMPHELPER_DLLPUBLIC void RemoveProperty(css::uno::Sequence<css::beans::Property>& seqProps, const OUString& _rPropName); diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx index f154937..f38a9cf 100644 --- a/include/comphelper/stl_types.hxx +++ b/include/comphelper/stl_types.hxx @@ -181,7 +181,6 @@ public: } Self & operator*() { return *this; } // so operator= works Self & operator++() { return *this; } - Self & operator++(int) { return *this; } private: OUStringBuffer & m_rBuffer; diff --git a/include/comphelper/string.hxx b/include/comphelper/string.hxx index 90b1e3e..eb72bed 100644 --- a/include/comphelper/string.hxx +++ b/include/comphelper/string.hxx @@ -38,16 +38,6 @@ // go into the stable URE API: namespace comphelper { namespace string { -/** Compare an OString to a single char - - @param rIn The input OString - @param c The character to compare againsg - - @return true if rIn has one char and its equal to c - */ -inline bool equals(const OString& rIn, sal_Char c) -{ return rIn.getLength() == 1 && rIn[0] == c; } - /** Compare an OUString to a single char @param rIn The input OUString @@ -399,15 +389,6 @@ COMPHELPER_DLLPUBLIC bool isdigitAsciiString(const OString &rString); */ COMPHELPER_DLLPUBLIC bool isdigitAsciiString(const OUString &rString); -/** Compare two strings containing software version numbers - - Inspired by the GNU strverscmp(), but there is no guarantee that the exact - same semantics are used, or that the semantics are stable between LibreOffice versions. - - @return -1, 0 or 1 -*/ -COMPHELPER_DLLPUBLIC int compareVersionStrings(const OUString& a, const OUString& b); - } } #endif diff --git a/include/connectivity/dbcharset.hxx b/include/connectivity/dbcharset.hxx index 66044f7..e93a59d 100644 --- a/include/connectivity/dbcharset.hxx +++ b/include/connectivity/dbcharset.hxx @@ -141,13 +141,9 @@ namespace dbtools /// prefix increment const CharsetIterator& operator++(); - /// postfix increment - const CharsetIterator operator++(int) { CharsetIterator hold(*this); ++*this; return hold; } /// prefix decrement const CharsetIterator& operator--(); - /// postfix decrement - const CharsetIterator operator--(int) { CharsetIterator hold(*this); --*this; return hold; } protected: CharsetIterator(const OCharsetMap* _pContainer, OCharsetMap::TextEncBag::const_iterator _aPos ); diff --git a/include/connectivity/dbexception.hxx b/include/connectivity/dbexception.hxx index 6e7cb97..a67aa9d 100644 --- a/include/connectivity/dbexception.hxx +++ b/include/connectivity/dbexception.hxx @@ -133,7 +133,6 @@ public: TYPE getType() const { return m_eType; } operator const css::sdbc::SQLException* () const; - operator const css::sdbc::SQLWarning* () const; operator const css::sdb::SQLContext* () const; const css::uno::Any& get() const { return m_aContent; } diff --git a/include/connectivity/sdbcx/VDescriptor.hxx b/include/connectivity/sdbcx/VDescriptor.hxx index fa9fa31..6aff71c 100644 --- a/include/connectivity/sdbcx/VDescriptor.hxx +++ b/include/connectivity/sdbcx/VDescriptor.hxx @@ -72,12 +72,6 @@ namespace connectivity virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override; virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw(css::uno::RuntimeException, std::exception); - // compare - inline bool operator == ( const OUString & _rRH ) - { - return m_aCase(m_Name,_rRH); - } - // css::lang::XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override; static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId(); diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx b/include/drawinglayer/geometry/viewinformation2d.hxx index 72e857c..53fd5f4 100644 --- a/include/drawinglayer/geometry/viewinformation2d.hxx +++ b/include/drawinglayer/geometry/viewinformation2d.hxx @@ -123,7 +123,6 @@ namespace drawinglayer /// compare operators bool operator==(const ViewInformation2D& rCandidate) const; - bool operator!=(const ViewInformation2D& rCandidate) const { return !operator==(rCandidate); } /// data access const basegfx::B2DHomMatrix& getObjectTransformation() const; diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx index 6362793..79c2b13 100644 --- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -173,7 +173,6 @@ namespace drawinglayer Overridden implementations are then based on this implementation */ virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; - bool operator!=( const BasePrimitive2D& rPrimitive ) const { return !operator==(rPrimitive); } /// The default implementation will use getDecomposition results to create the range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; @@ -290,9 +289,6 @@ namespace drawinglayer */ bool DRAWINGLAYER_DLLPUBLIC arePrimitive2DReferencesEqual(const Primitive2DReference& rA, const Primitive2DReference& rB); - /// compare two Primitive2DReferences for equality, uses arePrimitive2DReferencesEqual internally - bool DRAWINGLAYER_DLLPUBLIC arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive2DSequence& rB); - OUString DRAWINGLAYER_DLLPUBLIC idToString(sal_uInt32 nId); } // end of namespace primitive2d diff --git a/include/drawinglayer/primitive3d/baseprimitive3d.hxx b/include/drawinglayer/primitive3d/baseprimitive3d.hxx index d3eaf47..0f21afd 100644 --- a/include/drawinglayer/primitive3d/baseprimitive3d.hxx +++ b/include/drawinglayer/primitive3d/baseprimitive3d.hxx @@ -64,7 +64,6 @@ namespace drawinglayer { namespace primitive3d { Primitive3DContainer( std::initializer_list<Primitive3DReference> init ) : vector(init) {} void append(const Primitive3DContainer& rSource); - void append(Primitive3DContainer&& rSource); Primitive3DContainer& operator=(const Primitive3DContainer& r) { vector::operator=(r); return *this; } Primitive3DContainer& operator=(const Primitive3DContainer&& r) { vector::operator=(r); return *this; } bool operator==(const Primitive3DContainer& rB) const; @@ -111,7 +110,6 @@ namespace drawinglayer Overridden implementation are then based on this implementation. */ virtual bool operator==( const BasePrimitive3D& rPrimitive ) const; - bool operator!=( const BasePrimitive3D& rPrimitive ) const { return !operator==(rPrimitive); } /** This method is for places where using the C++ implementation directly is possible. The subprocessing and range merging is more efficient when working directly on basegfx::B3DRange. The default implementation diff --git a/include/drawinglayer/texture/texture.hxx b/include/drawinglayer/texture/texture.hxx index 3f1d6d0..ce9e34b 100644 --- a/include/drawinglayer/texture/texture.hxx +++ b/include/drawinglayer/texture/texture.hxx @@ -41,7 +41,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const; - bool operator!=(const GeoTexSvx& rGeoTexSvx) const { return !operator==(rGeoTexSvx); } // virtual base methods virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const; diff --git a/include/editeng/Trie.hxx b/include/editeng/Trie.hxx index 302c6a6..4cdcdc9 100644 --- a/include/editeng/Trie.hxx +++ b/include/editeng/Trie.hxx @@ -32,7 +32,7 @@ public: void insert(const OUString& sInputString) const; void findSuggestions(const OUString& sWordPart, std::vector<OUString>& rSuggestionList) const; - void getAllEntries(std::vector<OUString>& entries); + size_t size() const; }; } diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index 8ba5791..92b277a 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -753,8 +753,6 @@ struct SvxMSDffShapeOrder explicit SvxMSDffShapeOrder( sal_uLong nId ): nShapeId( nId ), nTxBxComp( 0 ), pFly( nullptr ), nHdFtSection( 0 ), pObj( nullptr ){} - bool operator==( const SvxMSDffShapeOrder& rEntry ) const - { return (nTxBxComp == rEntry.nTxBxComp); } bool operator<( const SvxMSDffShapeOrder& rEntry ) const { return (nTxBxComp < rEntry.nTxBxComp); } }; diff --git a/include/o3tl/lazy_update.hxx b/include/o3tl/lazy_update.hxx index c596e13..951a9bb 100644 --- a/include/o3tl/lazy_update.hxx +++ b/include/o3tl/lazy_update.hxx @@ -50,11 +50,6 @@ output( myValue.getOutValue() ); public: LazyUpdate(Func const & func): func_(func), input_(), dirty_(true) {} - template<typename T> void setInValue(T && in) { - dirty_ = true; - input_ = std::forward(in); - } - In const & getInValue() const { return input_; } Out const & getOutValue() const { return update(); } diff --git a/include/oox/helper/containerhelper.hxx b/include/oox/helper/containerhelper.hxx index 1c73eb7..6262146 100644 --- a/include/oox/helper/containerhelper.hxx +++ b/include/oox/helper/containerhelper.hxx @@ -49,7 +49,6 @@ struct ValueRange explicit ValueRange( sal_Int32 nFirst, sal_Int32 nLast ) : mnFirst( nFirst ), mnLast( nLast ) {} bool operator==( const ValueRange& rRange ) const { return (mnFirst == rRange.mnFirst) && (mnLast == rRange.mnLast); } - bool operator!=( const ValueRange& rRange ) const { return !(*this == rRange); } bool contains( const ValueRange& rRange ) const { return (mnFirst <= rRange.mnFirst) && (rRange.mnLast <= mnLast); } bool intersects( const ValueRange& rRange ) const { return (mnFirst <= rRange.mnLast) && (rRange.mnFirst <= mnLast); } }; diff --git a/include/sfx2/mnumgr.hxx b/include/sfx2/mnumgr.hxx index a1607b9..5f51b06 100644 --- a/include/sfx2/mnumgr.hxx +++ b/include/sfx2/mnumgr.hxx @@ -78,7 +78,6 @@ public: void Execute( const Point& rPos, vcl::Window *pWindow ); void RemoveDisabledEntries(); - Menu* GetSVMenu(); }; #endif // INCLUDED_SFX2_MNUMGR_HXX diff --git a/include/sfx2/sidebar/Context.hxx b/include/sfx2/sidebar/Context.hxx index b9430bae..945cf09 100644 --- a/include/sfx2/sidebar/Context.hxx +++ b/include/sfx2/sidebar/Context.hxx @@ -52,7 +52,6 @@ public: */ sal_Int32 EvaluateMatch (const Context& rOther) const; - bool operator== (const Context& rOther) const; bool operator!= (const Context& rOther) const; }; diff --git a/include/sfx2/sidebar/EnumContext.hxx b/include/sfx2/sidebar/EnumContext.hxx index 080a818..dc29753 100644 --- a/include/sfx2/sidebar/EnumContext.hxx +++ b/include/sfx2/sidebar/EnumContext.hxx @@ -130,7 +130,6 @@ public: Application GetApplication_DI() const; bool operator == (const EnumContext& rOther); - bool operator != (const EnumContext& rOther); /** When two contexts are matched against each other then application or context name may have the wildcard value 'any'. diff --git a/include/svl/nranges.hxx b/include/svl/nranges.hxx index def27ac..d80c337 100644 --- a/include/svl/nranges.hxx +++ b/include/svl/nranges.hxx @@ -38,13 +38,9 @@ public: ~SfxUShortRanges() { delete [] _pRanges; } - bool operator == ( const SfxUShortRanges & ) const; - SfxUShortRanges& operator = ( const SfxUShortRanges & ); SfxUShortRanges& operator += ( const SfxUShortRanges & ); - SfxUShortRanges& operator -= ( const SfxUShortRanges & ); - SfxUShortRanges& operator /= ( const SfxUShortRanges & ); sal_uInt16 Count() const; bool IsEmpty() const diff --git a/include/svtools/HtmlWriter.hxx b/include/svtools/HtmlWriter.hxx index ca5139c..5aeee2f 100644 --- a/include/svtools/HtmlWriter.hxx +++ b/include/svtools/HtmlWriter.hxx @@ -41,9 +41,6 @@ public: void end(); void flushStack(); - void flushStack(const OString& aElement); - - void write(const OString& aContent); void attribute(const OString& aAttribute, const char* aValue); void attribute(const OString& aAttribute, sal_Int32 aValue); diff --git a/include/svx/svdglue.hxx b/include/svx/svdglue.hxx index cd543f6..2db7776 100644 --- a/include/svx/svdglue.hxx +++ b/include/svx/svdglue.hxx @@ -78,7 +78,6 @@ class SVX_DLLPUBLIC SdrGluePoint { public: SdrGluePoint(): nEscDir(SdrEscapeDirection::SMART),nId(0),nAlign(SdrAlign::NONE),bNoPercent(false),bReallyAbsolute(false),bUserDefined(true) {} SdrGluePoint(const Point& rNewPos, bool bNewPercent=true, SdrAlign nNewAlign = SdrAlign::HORZ_CENTER): aPos(rNewPos),nEscDir(SdrEscapeDirection::SMART),nId(0),nAlign(nNewAlign),bNoPercent(!bNewPercent),bReallyAbsolute(false),bUserDefined(true) {} - bool operator==(const SdrGluePoint& rCmpGP) const { return aPos==rCmpGP.aPos && nEscDir==rCmpGP.nEscDir && nId==rCmpGP.nId && nAlign==rCmpGP.nAlign && bNoPercent==rCmpGP.bNoPercent && bReallyAbsolute==rCmpGP.bReallyAbsolute && bUserDefined==rCmpGP.bUserDefined; } const Point& GetPos() const { return aPos; } void SetPos(const Point& rNewPos) { aPos=rNewPos; } SdrEscapeDirection GetEscDir() const { return nEscDir; } diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx index 48df21b..78b98e7 100644 --- a/include/svx/svdlayer.hxx +++ b/include/svx/svdlayer.hxx @@ -112,7 +112,6 @@ public: SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin); ~SdrLayerAdmin(); const SdrLayerAdmin& operator=(const SdrLayerAdmin& rSrcLayerAdmin); - bool operator==(const SdrLayerAdmin& rCmpLayerAdmin) const; void SetParent(SdrLayerAdmin* pNewParent) { pParent=pNewParent; } void SetModel(SdrModel* pNewModel); void InsertLayer(SdrLayer* pLayer, sal_uInt16 nPos) diff --git a/include/svx/svdmark.hxx b/include/svx/svdmark.hxx index 2bcd84e..fc970289 100644 --- a/include/svx/svdmark.hxx +++ b/include/svx/svdmark.hxx @@ -64,7 +64,6 @@ public: virtual void ObjectInDestruction(const SdrObject& rObject) override; SdrMark& operator=(const SdrMark& rMark); - bool operator==(const SdrMark& rMark) const; void SetMarkedSdrObj(SdrObject* pNewObj); SdrObject* GetMarkedSdrObj() const { return mpSelectedSdrObject;} diff --git a/include/svx/svdsob.hxx b/include/svx/svdsob.hxx index 976165b0..510087c 100644 --- a/include/svx/svdsob.hxx +++ b/include/svx/svdsob.hxx @@ -41,11 +41,6 @@ public: memset(aData, bInitVal ? 0xFF : 0x00, sizeof(aData)); } - bool operator==(const SetOfByte& rCmpSet) const - { - return (memcmp(aData, rCmpSet.aData, sizeof(aData)) == 0); - } - bool operator!=(const SetOfByte& rCmpSet) const { return (memcmp(aData, rCmpSet.aData, sizeof(aData))!=0); @@ -87,7 +82,6 @@ public: bool IsEmpty() const; void operator&=(const SetOfByte& r2ndSet); - void operator|=(const SetOfByte& r2ndSet); // initialize this set with a uno sequence of sal_Int8 void PutValue(const css::uno::Any & rAny); diff --git a/include/tools/date.hxx b/include/tools/date.hxx index f450c7b..1dfb130 100644 --- a/include/tools/date.hxx +++ b/include/tools/date.hxx @@ -168,8 +168,6 @@ public: Date& operator -=( long nDays ); Date& operator ++(); Date& operator --(); - Date operator ++( int ); - Date operator --( int ); TOOLS_DLLPUBLIC friend Date operator +( const Date& rDate, long nDays ); TOOLS_DLLPUBLIC friend Date operator -( const Date& rDate, long nDays ); diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx index 1bc2404..3b737c8 100644 --- a/include/tools/inetmime.hxx +++ b/include/tools/inetmime.hxx @@ -302,28 +302,6 @@ public: */ inline INetMIMEOutputSink & operator <<(const sal_Char * pOctets); - /** Write a sequence of octets. - - @param rOctets A OString, interpreted as a sequence of octets. - - @return This instance. - */ - INetMIMEOutputSink & operator <<(const OString& rOctets) - { - writeSequence(rOctets.getStr(), rOctets.getStr() + rOctets.getLength()); - return *this; - } - - /** Call a manipulator function. - - @param pManipulator A manipulator function. - - @return Whatever the manipulator function returns. - */ - INetMIMEOutputSink & - operator <<(INetMIMEOutputSink & (* pManipulator)(INetMIMEOutputSink &)) - { return pManipulator(*this); } - OString takeBuffer() { return m_aBuffer.makeStringAndClear(); diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx index 633f507..1731b49 100644 --- a/include/tools/multisel.hxx +++ b/include/tools/multisel.hxx @@ -54,7 +54,6 @@ public: ~MultiSelection(); MultiSelection& operator= ( const MultiSelection& rOrig ); - bool operator== ( MultiSelection& rOrig ); void SelectAll( bool bSelect = true ); bool Select( long nIndex, bool bSelect = true ); diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index a956b20..e4a8421 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -161,8 +161,6 @@ public: tools::Polygon& operator=( const tools::Polygon& rPoly ); bool operator==( const tools::Polygon& rPoly ) const; - bool operator!=( const tools::Polygon& rPoly ) const - { return !(Polygon::operator==( rPoly )); } bool IsEqual( const tools::Polygon& rPoly ) const; // streaming a Polygon does ignore PolyFlags, so use the Write Or Read @@ -253,8 +251,6 @@ public: tools::PolyPolygon& operator=( const tools::PolyPolygon& rPolyPoly ); bool operator==( const tools::PolyPolygon& rPolyPoly ) const; - bool operator!=( const tools::PolyPolygon& rPolyPoly ) const - { return !(PolyPolygon::operator==( rPolyPoly )); } TOOLS_DLLPUBLIC friend SvStream& ReadPolyPolygon( SvStream& rIStream, tools::PolyPolygon& rPolyPoly ); TOOLS_DLLPUBLIC friend SvStream& WritePolyPolygon( SvStream& rOStream, const tools::PolyPolygon& rPolyPoly ); diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 16b46fb..aba3304 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -555,13 +555,6 @@ inline OString read_uInt8_lenPrefixed_uInt8s_ToOString(SvStream& rStrm) return read_uInt8s_ToOString(rStrm, nUnits); } -inline OString read_uInt32_lenPrefixed_uInt8s_ToOString(SvStream& rStrm) -{ - sal_uInt32 nUnits = 0; - rStrm.ReadUInt32( nUnits ); - return read_uInt8s_ToOString(rStrm, nUnits); -} - /// Attempt to read a pascal-style length (of type prefix) prefixed sequence of /// 8bit units to an OUString inline OUString read_uInt16_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm, diff --git a/include/tools/svborder.hxx b/include/tools/svborder.hxx index e30853d..c919d8c 100644 --- a/include/tools/svborder.hxx +++ b/include/tools/svborder.hxx @@ -67,14 +67,6 @@ public: Bottom() += rBorder.Bottom(); return *this; } - SvBorder & operator -= ( const SvBorder & rBorder ) - { - Left() -= rBorder.Left(); - Top() -= rBorder.Top(); - Right() -= rBorder.Right(); - Bottom() -= rBorder.Bottom(); - return *this; - } long & Top() { return nTop; } long & Right() { return nRight; } long & Bottom() { return nBottom; } @@ -86,7 +78,6 @@ public: }; TOOLS_DLLPUBLIC Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder ); -TOOLS_DLLPUBLIC Rectangle & operator -= ( Rectangle & rRect, const SvBorder & rBorder ); #endif diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index cd5bf23..3985942 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -189,8 +189,6 @@ public: inline bool operator !=(INetURLObject const & rObject) const { return !(*this == rObject); } - bool operator <(INetURLObject const & rObject) const; - // Strict Parsing: inline explicit INetURLObject( diff --git a/include/vcl/alpha.hxx b/include/vcl/alpha.hxx index 9b7e6b4..1bc67b2 100644 --- a/include/vcl/alpha.hxx +++ b/include/vcl/alpha.hxx @@ -40,8 +40,6 @@ public: AlphaMask& operator=( const Bitmap& rBitmap ); AlphaMask& operator=( const AlphaMask& rAlphaMask ) { return static_cast<AlphaMask&>( Bitmap::operator=( rAlphaMask ) ); } bool operator!() const { return Bitmap::operator!(); } - bool operator==( const AlphaMask& rAlphaMask ) const { return Bitmap::operator==( rAlphaMask ); } - bool operator!=( const AlphaMask& rAlphaMask ) const { return Bitmap::operator!=( rAlphaMask ); } void SetPrefMapMode( const MapMode& rMapMode ) { Bitmap::SetPrefMapMode( rMapMode ); } diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx index 9b3856a..74d5708 100644 --- a/include/vcl/animate.hxx +++ b/include/vcl/animate.hxx @@ -102,8 +102,6 @@ public: Animation& operator=( const Animation& rAnimation ); bool operator==( const Animation& rAnimation ) const; - bool operator!=( const Animation& rAnimation ) const - { return !(*this==rAnimation); } void Clear(); diff --git a/include/vcl/cursor.hxx b/include/vcl/cursor.hxx index 038e18f..927f60c 100644 --- a/include/vcl/cursor.hxx +++ b/include/vcl/cursor.hxx @@ -91,8 +91,6 @@ public: Cursor& operator=( const Cursor& rCursor ); bool operator==( const Cursor& rCursor ) const; - bool operator!=( const Cursor& rCursor ) const - { return !(Cursor::operator==( rCursor )); } private: void ImplRestore(); diff --git a/include/vcl/dibtools.hxx b/include/vcl/dibtools.hxx index c9e98c4..4c1daa3 100644 --- a/include/vcl/dibtools.hxx +++ b/include/vcl/dibtools.hxx @@ -67,7 +67,6 @@ bool VCL_DLLPUBLIC WriteDIBBitmapEx( const BitmapEx& rSource, SvStream& rOStm); -sal_uInt32 getDIBInfoHeaderSize(); sal_uInt32 getDIBV5HeaderSize(); #endif // INCLUDED_VCL_DIBTOOLS_HXX diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index 6875a50..88bc38d 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -117,7 +117,6 @@ public: GDIMetaFile& operator=( const GDIMetaFile& rMtf ); bool operator==( const GDIMetaFile& rMtf ) const; - bool operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); } void Clear(); bool Mirror( BmpMirrorFlags nMirrorFlags ); diff --git a/include/vcl/hatch.hxx b/include/vcl/hatch.hxx index 935ea9a..9a81006 100644 --- a/include/vcl/hatch.hxx +++ b/include/vcl/hatch.hxx @@ -66,7 +66,6 @@ public: Hatch& operator=( const Hatch& rHatch ); bool operator==( const Hatch& rHatch ) const; - bool operator!=( const Hatch& rHatch ) const { return !(Hatch::operator==( rHatch ) ); } HatchStyle GetStyle() const { return mpImplHatch->meStyle; } diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx index e5c045f..f63634f 100644 --- a/include/vcl/image.hxx +++ b/include/vcl/image.hxx @@ -124,7 +124,6 @@ public: ImageList& operator=( const ImageList& rImageList ); bool operator==( const ImageList& rImageList ) const; - bool operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); } private: diff --git a/include/vcl/inputctx.hxx b/include/vcl/inputctx.hxx index d1f3f9f..c2e0f17 100644 --- a/include/vcl/inputctx.hxx +++ b/include/vcl/inputctx.hxx @@ -68,8 +68,6 @@ public: InputContext& operator=( const InputContext& rInputContext ); bool operator==( const InputContext& rInputContext ) const; - bool operator!=( const InputContext& rInputContext ) const - { return !(InputContext::operator==( rInputContext )); } }; inline InputContext& InputContext::operator=( const InputContext& rInputContext ) diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 774fd40..e28fbd9 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -447,9 +447,6 @@ public: /// Close the 'pStartedFrom' menu window. virtual void ClosePopup(Menu* pMenu) override; - /// Deactivate the MenuBarWindow. - void DeactivateMenuBar(VclPtr<vcl::Window>& xFocusId); - /// Forward the KeyInput call to the MenuBar. virtual void MenuBarKeyInput(const KeyEvent& rEvent) override; diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index ded112c..376fad4 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -96,8 +96,6 @@ public: const OUString& GetComment() const { return maComment; } PrintQueueFlags GetStatus() const { return mnStatus; } sal_uInt32 GetJobs() const { return mnJobs; } - - bool operator==( const QueueInfo& rInfo ) const; }; diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index 46de94d..c911c5d 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -671,7 +671,6 @@ public: sal_uLong GetBalloonDelay() const; bool operator ==( const HelpSettings& rSet ) const; - bool operator !=( const HelpSettings& rSet ) const; }; @@ -729,7 +728,6 @@ public: AllSettingsFlags GetChangeFlags( const AllSettings& rSettings ) const; bool operator ==( const AllSettings& rSet ) const; - bool operator !=( const AllSettings& rSet ) const; static void LocaleSettingsChanged( sal_uInt32 nHint ); SvtSysLocale& GetSysLocale(); }; diff --git a/include/vcl/textrectinfo.hxx b/include/vcl/textrectinfo.hxx index 8b98e1a..b5dcf56 100644 --- a/include/vcl/textrectinfo.hxx +++ b/include/vcl/textrectinfo.hxx @@ -41,8 +41,6 @@ public: { return ((mnMaxWidth == rInfo.mnMaxWidth) && (mnLineCount == rInfo.mnLineCount) && (mbEllipsis == rInfo.mbEllipsis)); } - bool operator !=( const TextRectInfo& rInfo ) const - { return !(TextRectInfo::operator==( rInfo )); } }; inline TextRectInfo::TextRectInfo() diff --git a/include/vcl/txtattr.hxx b/include/vcl/txtattr.hxx index 43a6adc..3dcb28f 100644 --- a/include/vcl/txtattr.hxx +++ b/include/vcl/txtattr.hxx @@ -54,8 +54,6 @@ public: virtual TextAttrib* Clone() const = 0; virtual bool operator==( const TextAttrib& rAttr ) const = 0; - bool operator!=( const TextAttrib& rAttr ) const - { return !(*this == rAttr ); } }; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 59432a6..5487745 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -637,13 +637,6 @@ private: SAL_DLLPRIVATE void ImplInitWindowData( WindowType nType ); - SAL_DLLPRIVATE void getFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize, - OutputDevice& rOutDev ); - - - SAL_DLLPRIVATE void drawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize, - const OutputDevice& rOutDev, const vcl::Region& rRegion ); - SAL_DLLPRIVATE void ImplSetFrameParent( const vcl::Window* pParent ); SAL_DLLPRIVATE void ImplInsertWindow( vcl::Window* pParent ); diff --git a/jvmfwk/source/framework.hxx b/jvmfwk/source/framework.hxx index fcd687c..21e18ff 100644 --- a/jvmfwk/source/framework.hxx +++ b/jvmfwk/source/framework.hxx @@ -97,7 +97,6 @@ public: ::JavaInfo * detach(); const ::JavaInfo* operator ->() const { return pInfo;} operator ::JavaInfo* () { return pInfo;} - operator ::JavaInfo const * () const { return pInfo;} ::JavaInfo* cloneJavaInfo() const; OUString getLocation() const; diff --git a/jvmfwk/source/libxmlutil.hxx b/jvmfwk/source/libxmlutil.hxx index 4affff6..ac53630 100644 --- a/jvmfwk/source/libxmlutil.hxx +++ b/jvmfwk/source/libxmlutil.hxx @@ -52,7 +52,6 @@ public: explicit CXPathContextPtr(xmlXPathContextPtr aContext); CXPathContextPtr & operator = (xmlXPathContextPtr pObj); ~CXPathContextPtr(); - xmlXPathContext* operator -> () { return _object;} operator xmlXPathContext* () const { return _object;} }; @@ -71,7 +70,6 @@ public: */ CXmlDocPtr & operator = (xmlDoc* pObj); ~CXmlDocPtr(); - xmlDoc* operator -> () { return _object;} operator xmlDoc* () const { return _object;} }; diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index 9853a40..7849853 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -319,8 +319,6 @@ public: inline bool operator!=( const ScAddress& rAddress ) const; inline bool operator<( const ScAddress& rAddress ) const; inline bool operator<=( const ScAddress& rAddress ) const; - inline bool operator>( const ScAddress& rAddress ) const; - inline bool operator>=( const ScAddress& rAddress ) const; inline size_t hash() const; @@ -396,16 +394,6 @@ inline bool ScAddress::operator<=( const ScAddress& rAddress ) const return operator<( rAddress ) || operator==( rAddress ); } -inline bool ScAddress::operator>( const ScAddress& rAddress ) const -{ - return !operator<=( rAddress ); -} - -inline bool ScAddress::operator>=( const ScAddress& rAddress ) const -{ - return !operator<( rAddress ); -} - inline size_t ScAddress::hash() const { // Assume that there are not that many addresses with row > 2^16 AND column @@ -572,8 +560,6 @@ public: inline bool operator!=( const ScRange& rRange ) const; inline bool operator<( const ScRange& rRange ) const; inline bool operator<=( const ScRange& rRange ) const; - inline bool operator>( const ScRange& rRange ) const; - inline bool operator>=( const ScRange& rRange ) const; /// Hash 2D area ignoring table number. inline size_t hashArea() const; @@ -621,16 +607,6 @@ inline bool ScRange::operator<=( const ScRange& rRange ) const return operator<( rRange ) || operator==( rRange ); } -inline bool ScRange::operator>( const ScRange& rRange ) const -{ - return !operator<=( rRange ); -} - -inline bool ScRange::operator>=( const ScRange& rRange ) const -{ - return !operator<( rRange ); -} - inline bool ScRange::In( const ScAddress& rAddress ) const { return @@ -708,7 +684,6 @@ public: { return aRange[n]; } - inline bool operator==( const ScRangePair& ) const; }; inline ScRangePair& ScRangePair::operator= ( const ScRangePair& rRange ) @@ -718,12 +693,6 @@ inline ScRangePair& ScRangePair::operator= ( const ScRangePair& rRange ) return *this; } -inline bool ScRangePair::operator==( const ScRangePair& rRange ) const -{ - return (aRange[0] == rRange.aRange[0]) && - (aRange[1] == rRange.aRange[1]); -} - // ScRefAddress class ScRefAddress { diff --git a/sc/inc/bigrange.hxx b/sc/inc/bigrange.hxx index c677df1..9dfbe2e 100644 --- a/sc/inc/bigrange.hxx +++ b/sc/inc/bigrange.hxx @@ -69,8 +69,6 @@ public: { nCol = r.Col(); nRow = r.Row(); nTab = r.Tab(); return *this; } bool operator==( const ScBigAddress& r ) const { return nCol == r.nCol && nRow == r.nRow && nTab == r.nTab; } - bool operator!=( const ScBigAddress& r ) const - { return !operator==( r ); } }; inline void ScBigAddress::PutInOrder( ScBigAddress& r ) diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx index 75e2e14..7bf2e55 100644 --- a/sc/inc/chartpos.hxx +++ b/sc/inc/chartpos.hxx @@ -133,8 +133,6 @@ public: bool HasColHeaders() const { return bColHeaders; } bool HasRowHeaders() const { return bRowHeaders; } - bool operator==(const ScChartPositioner& rCmp) const; - void InvalidateGlue() { eGlue = SC_CHARTGLUE_NA; diff --git a/sc/qa/unit/ucalc_sharedformula.cxx b/sc/qa/unit/ucalc_sharedformula.cxx index 656bce6..ba4d8dd 100644 --- a/sc/qa/unit/ucalc_sharedformula.cxx +++ b/sc/qa/unit/ucalc_sharedformula.cxx @@ -603,6 +603,29 @@ void Test::testSharedFormulasRefUpdateRange() m_pDoc->DeleteTab(0); } +struct SortByArea : std::binary_function<sc::AreaListener, sc::AreaListener, bool> +{ + bool operator ()( const sc::AreaListener& rLeft, const sc::AreaListener& rRight ) const + { + if (rLeft.maArea.aStart.Tab() != rRight.maArea.aStart.Tab()) + return rLeft.maArea.aStart.Tab() < rRight.maArea.aStart.Tab(); + + if (rLeft.maArea.aStart.Col() != rRight.maArea.aStart.Col()) + return rLeft.maArea.aStart.Col() < rRight.maArea.aStart.Col(); + + if (rLeft.maArea.aStart.Row() != rRight.maArea.aStart.Row()) + return rLeft.maArea.aStart.Row() < rRight.maArea.aStart.Row(); + + if (rLeft.maArea.aEnd.Tab() != rRight.maArea.aEnd.Tab()) + return rLeft.maArea.aEnd.Tab() < rRight.maArea.aEnd.Tab(); + + if (rLeft.maArea.aEnd.Col() != rRight.maArea.aEnd.Col()) + return rLeft.maArea.aEnd.Col() < rRight.maArea.aEnd.Col(); + + return rLeft.maArea.aEnd.Row() < rRight.maArea.aEnd.Row(); + } +}; + void Test::testSharedFormulasRefUpdateRangeDeleteRow() { sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn on auto calc. @@ -630,7 +653,7 @@ void Test::testSharedFormulasRefUpdateRangeDeleteRow() ScBroadcastAreaSlotMachine* pBASM = m_pDoc->GetBASM(); CPPUNIT_ASSERT(pBASM); std::vector<sc::AreaListener> aListeners = pBASM->GetAllListeners(aWholeArea, sc::AreaInside); - std::sort(aListeners.begin(), aListeners.end(), sc::AreaListener::SortByArea()); + std::sort(aListeners.begin(), aListeners.end(), SortByArea()); // This check makes only sense if group listeners are activated. #if !defined(USE_FORMULA_GROUP_LISTENER) || USE_FORMULA_GROUP_LISTENER @@ -696,7 +719,7 @@ void Test::testSharedFormulasRefUpdateRangeDeleteRow() CPPUNIT_ASSERT_EQUAL(15.0, m_pDoc->GetValue(ScAddress(2,4,0))); aListeners = pBASM->GetAllListeners(aWholeArea, sc::AreaInside); - std::sort(aListeners.begin(), aListeners.end(), sc::AreaListener::SortByArea()); + std::sort(aListeners.begin(), aListeners.end(), SortByArea()); // This check makes only sense if group listeners are activated. #if !defined(USE_FORMULA_GROUP_LISTENER) || USE_FORMULA_GROUP_LISTENER diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index 5fc786a..6e9c640 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -64,30 +64,6 @@ #error BCA_SLOTS_DEFINE DOOMed! #endif -namespace sc { - -bool AreaListener::SortByArea::operator ()( const AreaListener& rLeft, const AreaListener& rRight ) const -{ - if (rLeft.maArea.aStart.Tab() != rRight.maArea.aStart.Tab()) - return rLeft.maArea.aStart.Tab() < rRight.maArea.aStart.Tab(); - - if (rLeft.maArea.aStart.Col() != rRight.maArea.aStart.Col()) - return rLeft.maArea.aStart.Col() < rRight.maArea.aStart.Col(); - - if (rLeft.maArea.aStart.Row() != rRight.maArea.aStart.Row()) - return rLeft.maArea.aStart.Row() < rRight.maArea.aStart.Row(); - - if (rLeft.maArea.aEnd.Tab() != rRight.maArea.aEnd.Tab()) - return rLeft.maArea.aEnd.Tab() < rRight.maArea.aEnd.Tab(); - - if (rLeft.maArea.aEnd.Col() != rRight.maArea.aEnd.Col()) - return rLeft.maArea.aEnd.Col() < rRight.maArea.aEnd.Col(); - - return rLeft.maArea.aEnd.Row() < rRight.maArea.aEnd.Row(); -} - -} - struct ScSlotData { SCROW nStartRow; // first row of this segment diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx index 745fc02..0f606d7 100644 --- a/sc/source/core/inc/bcaslot.hxx +++ b/sc/source/core/inc/bcaslot.hxx @@ -43,11 +43,6 @@ struct AreaListener ScRange maArea; bool mbGroupListening; SvtListener* mpListener; - - struct SortByArea : std::binary_function<AreaListener, AreaListener, bool> - { - bool operator() ( const AreaListener& rLeft, const AreaListener& rRight ) const; - }; }; } diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx index c1f1c98..81b1d96 100644 --- a/sc/source/core/tool/chartpos.cxx +++ b/sc/source/core/tool/chartpos.cxx @@ -89,13 +89,6 @@ ScChartPositioner::~ScChartPositioner() delete pPositionMap; } -bool ScChartPositioner::operator==(const ScChartPositioner& rCmp) const -{ - return bColHeaders == rCmp.bColHeaders - && bRowHeaders == rCmp.bRowHeaders - && *aRangeListRef == *rCmp.aRangeListRef; -} - void ScChartPositioner::SetRangeList( const ScRange& rRange ) { aRangeListRef = new ScRangeList; diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx index 6d9b918..f4392b0 100644 --- a/sd/inc/OutlinerIterator.hxx +++ b/sd/inc/OutlinerIterator.hxx @@ -121,17 +121,6 @@ public: Returns a reference to this iterator pointing to the next object. */ Iterator& operator++ (); - /** The postfix increment operator returns the iterator still pointing - to the current object. Only the next call to - <member>operator*()</member> will return the next object. When in - doubt rather use the prefix increment operator. - @param dummy - A dummy operator used by the compiler. - @return - Returns a copy of the iterator as it where before the operator - was called. - */ - Iterator operator++ (int); /** Test equality of two iterators. Two iterators are taken to be equal when they point are of the same type (their implementation objects are instances of the same class) and point to the same object. diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index fe09a74..af9b337 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -138,7 +138,6 @@ public: static rtl::Reference< SdXImpressDocument > GetModel( SdDrawDocument* pDoc ); // intern - bool operator==( const SdXImpressDocument& rModel ) const { return mpDoc == rModel.mpDoc; } bool operator!=( const SdXImpressDocument& rModel ) const { return mpDoc != rModel.mpDoc; } ::sd::DrawDocShell* GetDocShell() const { return mpDocShell; } diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx index 61f8ddd..8a2188b 100644 --- a/sd/source/ui/view/OutlinerIterator.cxx +++ b/sd/source/ui/view/OutlinerIterator.cxx @@ -124,14 +124,6 @@ Iterator& Iterator::operator++ () return *this; } -Iterator Iterator::operator++ (int) -{ - Iterator aTmp (*this); - if (mpIterator!=nullptr) - mpIterator->GotoNextText(); - return aTmp; -} - bool Iterator::operator== (const Iterator& rIterator) { if (mpIterator == nullptr || rIterator.mpIterator==nullptr) diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index ef2d375..5883cb2 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -325,9 +325,4 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram delete pThesSubMenu; } -Menu* SfxPopupMenuManager::GetSVMenu() -{ - return GetMenu()->GetSVMenu(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/sidebar/Context.cxx b/sfx2/source/sidebar/Context.cxx index 9baf30b..082eaf2 100644 --- a/sfx2/source/sidebar/Context.cxx +++ b/sfx2/source/sidebar/Context.cxx @@ -68,12 +68,6 @@ sal_Int32 Context::EvaluateMatch ( return NoMatch; } -bool Context::operator== (const Context& rOther) const -{ - return msApplication.equals(rOther.msApplication) - && msContext.equals(rOther.msContext); -} - bool Context::operator!= (const Context& rOther) const { return ( ! msApplication.equals(rOther.msApplication)) diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx index db80700..56a2207 100644 --- a/sfx2/source/sidebar/EnumContext.cxx +++ b/sfx2/source/sidebar/EnumContext.cxx @@ -95,12 +95,6 @@ bool EnumContext::operator== (const EnumContext& rOther) && meContext==rOther.meContext; } -bool EnumContext::operator!= (const EnumContext& rOther) -{ - return meApplication!=rOther.meApplication - || meContext!=rOther.meContext; -} - void EnumContext::AddEntry (const ::rtl::OUString& rsName, const Application eApplication) { maApplicationMap[rsName] = eApplication; diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 3c40e3e..d065e0f 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -31,7 +31,6 @@ namespace using namespace css::uno; using namespace css::io; using namespace css::graphic; -using drawinglayer::primitive2d::arePrimitive2DSequencesEqual; using drawinglayer::primitive2d::Primitive2DSequence; using drawinglayer::primitive2d::Primitive2DContainer; @@ -96,6 +95,22 @@ void Test::checkRectPrimitive(Primitive2DSequence& rPrimitive) } + +static bool arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive2DSequence& rB) +{ + const sal_Int32 nCount(rA.getLength()); + + if(nCount != rB.getLength()) + return false; + + for(sal_Int32 a(0L); a < nCount; a++) { + if(!drawinglayer::primitive2d::arePrimitive2DReferencesEqual(rA[a], rB[a])) + return false; + } + + return true; +} + // Attributes for an object (like rect as in this case) can be defined // in different ways (directly with xml attributes, or with CSS styles), // however the end result should be the same. diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx index 7bd5c88..da3e217 100644 --- a/svl/source/items/nranges.cxx +++ b/svl/source/items/nranges.cxx @@ -170,35 +170,6 @@ SfxUShortRanges::SfxUShortRanges( const sal_uInt16* pArr ) } -bool SfxUShortRanges::operator==( const SfxUShortRanges &rOther ) const -{ - // Object pointers equal? - if ( this == &rOther ) - return true; - - // Ranges pointers equal? - if ( _pRanges == rOther._pRanges ) - return true; - - // Counts equal? - sal_uInt16 nCount = Count(); - if ( nCount != rOther.Count() ) - return false; - - // Check arrays. - sal_uInt16 n = 0; - while( _pRanges[ n ] != 0 ) - { - // Elements at current position equal? - if ( _pRanges[ n ] != rOther._pRanges[ n ] ) - return false; - - ++n; - } - - return true; -} - /** * Assigns ranges from 'rRanges' to '*this'. */ @@ -381,255 +352,6 @@ copy_rest: } /** - * Removes 'rRanges' from '*this'. - * for each sal_uInt16 n: - * this->Contains( n ) && rRanges.Contains( n ) => !this'->Contains( n ) - * this->Contains( n ) && !rRanges.Contains( n ) => this'->Contains( n ) - * !this->Contains( n ) => !this'->Contains( n ) - */ -SfxUShortRanges& SfxUShortRanges::operator -= -( - const SfxUShortRanges &rRanges -) -{ - // special cases: one is empty - if ( rRanges.IsEmpty() || IsEmpty() ) - return *this; - - // differentiate 'rRanges' in a temporary copy of '*this' - // (size is computed for maximal possibly split-count plus terminating 0) - sal_uInt16 nThisSize = Count_Impl(_pRanges); - sal_uInt16 nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) ); - std::unique_ptr<sal_uInt16[]> pTarget(new sal_uInt16[ nTargetSize ]); - memset( pTarget.get(), 0, sizeof(sal_uInt16)*nTargetSize ); - memcpy( pTarget.get(), _pRanges, sizeof(sal_uInt16)*nThisSize ); - - sal_uInt16 nPos1 = 0, nPos2 = 0, nTargetPos = 0; - while( _pRanges[ nPos1 ] ) - { - sal_uInt16 l1 = _pRanges[ nPos1 ]; // lower bound of interval 1 - sal_uInt16 u1 = _pRanges[ nPos1+1 ]; // upper bound of interval 1 - sal_uInt16 l2 = rRanges._pRanges[ nPos2 ]; // lower bound of interval 2 - sal_uInt16 u2 = rRanges._pRanges[ nPos2+1 ]; // upper bound of interval 2 - - // boundary cases - // * subtrahend is empty -> copy the minuend - if( !l2 ) - { - pTarget[ nTargetPos ] = l1; - pTarget[ nTargetPos+1 ] = u1; - nTargetPos += 2; - nPos1 += 2; - continue; - } - // * next subtrahend interval is completely higher -> copy the minuend - if( u1 < l2 ) - { - pTarget[ nTargetPos ] = l1; - pTarget[ nTargetPos+1 ] = u1; - nTargetPos += 2; - nPos1 += 2; - continue; - } - - // * next subtrahend interval is completely lower -> try next - if( u2 < l1 ) - { - nPos2 += 2; - continue; - } - - // intersecting cases - // * subtrahend cuts out from the beginning of the minuend - if( l2 <= l1 && u2 <= u1 ) - { - // reduce minuend interval, try again (minuend might be affected by other subtrahend intervals) - _pRanges[ nPos1 ] = u2 + 1; - nPos2 += 2; // this cannot hurt any longer - continue; - } - - // * subtrahend cuts out from the end of the minuend - if( l1 <= l2 && u1 <= u2 ) - { - // copy remaining part of minuend (cannot be affected by other intervals) - if( l1 < l2 ) // anything left at all? - { - pTarget[ nTargetPos ] = l1; - pTarget[ nTargetPos+1 ] = l2 - 1; - nTargetPos += 2; - // do not increment nPos2, might affect next minuend interval, too - } - nPos1 += 2; // nothing left at all - continue; - } - - // * subtrahend completely deletes minuend (larger or same at both ends) - if( l1 >= l2 && u1 <= u2 ) - { - nPos1 += 2; // minuend deleted - // do not increment nPos2, might affect next minuend interval, too - continue; - } - - // * subtrahend divides minuend into two pieces - if( l1 <= l2 && u1 >= u2 ) // >= and <= since they may be something left only at one side - { - // left side - if( l1 < l2 ) // anything left at all - { - pTarget[ nTargetPos ] = l1; - pTarget[ nTargetPos+1 ] = l2 - 1; - nTargetPos += 2; - } - - // right side - if( u1 > u2 ) // anything left at all - { - // reduce minuend interval, try again (minuend might be affected by other subtrahend intervals ) - _pRanges[ nPos1 ] = u2 + 1; - } - - // subtrahend is completely used - nPos2 += 2; - continue; - } - - // we should never be here - OSL_FAIL( "SfxUShortRanges::operator-=: internal error" ); - } // while - - pTarget[ nTargetPos ] = 0; - - // assign the differentiated ranges - delete[] _pRanges; - - sal_uInt16 nUShorts = Count_Impl(pTarget.get()) + 1; - if ( 1 != nUShorts ) - { - _pRanges = new sal_uInt16[ nUShorts ]; - memcpy( _pRanges, pTarget.get(), nUShorts * sizeof(sal_uInt16) ); - } - else - _pRanges = nullptr; - - return *this; -} - -/** - * Determines intersection of '*this' with 'rRanges'. - * for each sal_uInt16 n: - * this->Contains( n ) && rRanges.Contains( n ) => this'->Contains( n ) - * !this->Contains( n ) => !this'->Contains( n ) - * !rRanges.Contains( n ) => !this'->Contains( n ) - */ -SfxUShortRanges& SfxUShortRanges::operator /= -( - const SfxUShortRanges &rRanges -) -{ - // boundary cases - // * first set is empty -> nothing to be done - // * second set is empty -> delete first set - if( rRanges.IsEmpty() ) - { - delete[] _pRanges; - - _pRanges = new sal_uInt16[1]; - _pRanges[0] = 0; - - return *this; - } - - // intersect 'rRanges' in a temporary copy of '*this' - // (size is computed for maximal possibly split-count plus terminating 0) - sal_uInt16 nThisSize = Count_Impl(_pRanges); - sal_uInt16 nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) ); - std::unique_ptr<sal_uInt16[]> pTarget(new sal_uInt16[ nTargetSize ]); - memset( pTarget.get(), 0, sizeof(sal_uInt16)*nTargetSize ); - memcpy( pTarget.get(), _pRanges, sizeof(sal_uInt16)*nThisSize ); - - sal_uInt16 nPos1 = 0, nPos2 = 0, nTargetPos = 0; - while( _pRanges[ nPos1 ] != 0 && rRanges._pRanges[ nPos2 ] != 0 ) - { - sal_uInt16 l1 = _pRanges[ nPos1 ]; // lower bound of interval 1 - sal_uInt16 u1 = _pRanges[ nPos1+1 ]; // upper bound of interval 1 - sal_uInt16 l2 = rRanges._pRanges[ nPos2 ]; // lower bound of interval 2 - sal_uInt16 u2 = rRanges._pRanges[ nPos2+1 ]; // upper bound of interval 2 - - if( u1 < l2 ) - { - // current interval in s1 is completely before ci in s2 - nPos1 += 2; - continue; - } - if( u2 < l1 ) - { - // ci in s2 is completely before ci in s1 - nPos2 += 2; - continue; - } - - // assert: there exists an intersection between ci1 and ci2 - - if( l1 <= l2 ) - { - // c1 "is more to the left" than c2 - - if( u1 <= u2 ) - { - pTarget[ nTargetPos ] = l2; - pTarget[ nTargetPos+1 ] = u1; - nTargetPos += 2; - nPos1 += 2; - continue; - } - else - { - pTarget[ nTargetPos ] = l2; - pTarget[ nTargetPos+1 ] = u2; - nTargetPos += 2; - nPos2 += 2; - } - } - else - { - // c2 "is more to the left" than c1" - - if( u1 > u2 ) - { - pTarget[ nTargetPos ] = l1; - pTarget[ nTargetPos+1 ] = u2; - nTargetPos += 2; - nPos2 += 2; - } - else - { - pTarget[ nTargetPos ] = l1; - pTarget[ nTargetPos+1 ] = u1; - nTargetPos += 2; - nPos1 += 2; - } - } - }; // while - pTarget[ nTargetPos ] = 0; - - // assign the intersected ranges - delete[] _pRanges; - - sal_uInt16 nUShorts = Count_Impl(pTarget.get()) + 1; - if ( 1 != nUShorts ) - { - _pRanges = new sal_uInt16[ nUShorts ]; - memcpy( _pRanges, pTarget.get(), nUShorts * sizeof(sal_uInt16) ); - } - else - _pRanges = nullptr; - - return *this; -} - -/** * Determines the number of USHORTs in the set described by the ranges * of USHORTs in '*this'. */ diff --git a/svtools/qa/unit/testHtmlWriter.cxx b/svtools/qa/unit/testHtmlWriter.cxx index e7eef7c..6c2862b 100644 --- a/svtools/qa/unit/testHtmlWriter.cxx +++ b/svtools/qa/unit/testHtmlWriter.cxx @@ -41,7 +41,6 @@ public: void testSingleElementWithContentAndAttributes(); void testNested(); void testAttributeValues(); - void testFlushStack(); CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST(testSingleElement); @@ -50,7 +49,6 @@ public: CPPUNIT_TEST(testSingleElementWithContentAndAttributes); CPPUNIT_TEST(testNested); CPPUNIT_TEST(testAttributeValues); - CPPUNIT_TEST(testFlushStack); CPPUNIT_TEST_SUITE_END(); }; @@ -124,12 +122,11 @@ void Test::testSingleElementWithContent() HtmlWriter aHtml(aStream); aHtml.prettyPrint(false); aHtml.start("abc"); - aHtml.write("xxxx"); aHtml.end(); OString aString = extractFromStream(aStream); - CPPUNIT_ASSERT_EQUAL(aString, OString("<abc>xxxx</abc>")); + CPPUNIT_ASSERT_EQUAL(aString, OString("<abc/>")); } void Test::testSingleElementWithContentAndAttributes() @@ -141,12 +138,11 @@ void Test::testSingleElementWithContentAndAttributes() aHtml.start("abc"); aHtml.attribute("x", "y"); aHtml.attribute("q", "w"); - aHtml.write("xxxx"); aHtml.end(); OString aString = extractFromStream(aStream); - CPPUNIT_ASSERT_EQUAL(aString, OString("<abc x=\"y\" q=\"w\">xxxx</abc>")); + CPPUNIT_ASSERT_EQUAL(aString, OString("<abc x=\"y\" q=\"w\"/>")); } void Test::testNested() @@ -157,13 +153,12 @@ void Test::testNested() aHtml.prettyPrint(false); aHtml.start("abc"); aHtml.start("xyz"); - aHtml.write("xxx"); aHtml.end(); aHtml.end(); OString aString = extractFromStream(aStream); - CPPUNIT_ASSERT_EQUAL(OString("<abc><xyz>xxx</xyz></abc>"), aString); + CPPUNIT_ASSERT_EQUAL(OString("<abc><xyz/></abc>"), aString); } void Test::testAttributeValues() @@ -183,110 +178,6 @@ void Test::testAttributeValues() CPPUNIT_ASSERT_EQUAL(OString("<abc one=\"one\" two=\"two\" three=\"12\"/>"), aString); } -void Test::testFlushStack() -{ - { - SvMemoryStream aStream; - - HtmlWriter aHtml(aStream); - aHtml.prettyPrint(false); - aHtml.start("a"); - aHtml.flushStack("a"); // simple ,end element "a" = like end() - - OString aString = extractFromStream(aStream); - - CPPUNIT_ASSERT_EQUAL(OString("<a/>"), aString); - } - - { - SvMemoryStream aStream; - - HtmlWriter aHtml(aStream); - aHtml.prettyPrint(false); - aHtml.start("a"); - aHtml.start("b"); - aHtml.flushStack("b"); // end at first element "b", don't output "a" yet - - OString aString = extractFromStream(aStream); - - CPPUNIT_ASSERT_EQUAL(OString("<a><b/>"), aString); - } - - { - SvMemoryStream aStream; - - HtmlWriter aHtml(aStream); - aHtml.prettyPrint(false); - aHtml.start("a"); - aHtml.start("b"); - aHtml.flushStack("a"); // end at first element "a" - - OString aString = extractFromStream(aStream); - - CPPUNIT_ASSERT_EQUAL(OString("<a><b/></a>"), aString); - } - - { - SvMemoryStream aStream; - - HtmlWriter aHtml(aStream); - aHtml.prettyPrint(false); - aHtml.start("a"); - aHtml.start("b"); - aHtml.start("c"); - aHtml.flushStack("a"); // end at first element "a" - - OString aString = extractFromStream(aStream); - - CPPUNIT_ASSERT_EQUAL(OString("<a><b><c/></b></a>"), aString); - } - - { - SvMemoryStream aStream; - - HtmlWriter aHtml(aStream); - aHtml.prettyPrint(false); - aHtml.start("a"); - aHtml.start("b"); - aHtml.start("c"); - aHtml.flushStack("b"); // end at first element "b" - - OString aString = extractFromStream(aStream); - - CPPUNIT_ASSERT_EQUAL(OString("<a><b><c/></b>"), aString); - } - - { - SvMemoryStream aStream; - - HtmlWriter aHtml(aStream); - aHtml.prettyPrint(false); - aHtml.start("a"); - aHtml.start("b"); - aHtml.start("c"); - aHtml.flushStack("x"); // no known element - ends when stack is empty - - OString aString = extractFromStream(aStream); - - CPPUNIT_ASSERT_EQUAL(OString("<a><b><c/></b></a>"), aString); - } - - { - SvMemoryStream aStream; - - HtmlWriter aHtml(aStream); - aHtml.prettyPrint(false); - aHtml.start("a"); - aHtml.start("b"); - aHtml.start("c"); - aHtml.flushStack(); // flush the whole stack - - OString aString = extractFromStream(aStream); - - CPPUNIT_ASSERT_EQUAL(OString("<a><b><c/></b></a>"), aString); - } -} - CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/svtools/source/svhtml/HtmlWriter.cxx b/svtools/source/svhtml/HtmlWriter.cxx index 3435b60..961ab38 100644 --- a/svtools/source/svhtml/HtmlWriter.cxx +++ b/svtools/source/svhtml/HtmlWriter.cxx @@ -76,16 +76,6 @@ void HtmlWriter::flushStack() } } -void HtmlWriter::flushStack(const OString& aElement) -{ - OString sCurrentElement; - do - { - sCurrentElement = maElementStack.back(); - end(); - } while (!maElementStack.empty() && aElement != sCurrentElement); -} - void HtmlWriter::end() { if (mbElementOpen) @@ -114,17 +104,6 @@ void HtmlWriter::end() mbContentWritten = false; } -void HtmlWriter::write(const OString &aContent) -{ - if (mbElementOpen) - { - mrStream.WriteChar('>'); - mbElementOpen = false; - } - mbContentWritten = true; - mrStream.WriteOString(aContent); -} - void HtmlWriter::attribute(const OString &aAttribute, const OString& aValue) { if (mbElementOpen && !aAttribute.isEmpty() && !aValue.isEmpty()) diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx index a72981b..64b6085 100644 --- a/svx/inc/xpolyimp.hxx +++ b/svx/inc/xpolyimp.hxx @@ -68,8 +68,6 @@ public: ImpXPolyPolygon() { nRefCount = 1; } ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ); ~ImpXPolyPolygon(); - - bool operator==(const ImpXPolyPolygon& rImpXPolyPoly) const; }; diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index 7a7ae77..f74cbb9 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -43,14 +43,6 @@ void SetOfByte::operator&=(const SetOfByte& r2ndSet) } } -void SetOfByte::operator|=(const SetOfByte& r2ndSet) -{ - for(sal_uInt16 i(0); i < 32; i++) - { - aData[i] |= r2ndSet.aData[i]; - } -} - /** initialize this set with a uno sequence of sal_Int8 */ void SetOfByte::PutValue( const css::uno::Any & rAny ) @@ -182,21 +174,6 @@ const SdrLayerAdmin& SdrLayerAdmin::operator=(const SdrLayerAdmin& rSrcLayerAdmi return *this; } -bool SdrLayerAdmin::operator==(const SdrLayerAdmin& rCmpLayerAdmin) const -{ - if (pParent!=rCmpLayerAdmin.pParent || - aLayer.size()!=rCmpLayerAdmin.aLayer.size()) - return false; - bool bOk = true; - sal_uInt16 nCount=GetLayerCount(); - sal_uInt16 i=0; - while (bOk && i<nCount) { - bOk=*GetLayer(i)==*rCmpLayerAdmin.GetLayer(i); - i++; - } - return bOk; -} - void SdrLayerAdmin::SetModel(SdrModel* pNewModel) { if (pNewModel!=pModel) { diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index a17bc05..fc2ad88 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -195,32 +195,6 @@ SdrMark& SdrMark::operator=(const SdrMark& rMark) return *this; } -bool SdrMark::operator==(const SdrMark& rMark) const -{ - bool bRet(mpSelectedSdrObject == rMark.mpSelectedSdrObject && mpPageView == rMark.mpPageView && mbCon1 == rMark.mbCon1 && mbCon2 == rMark.mbCon2 && mnUser == rMark.mnUser); - - if((mpPoints != nullptr) != (rMark.mpPoints != nullptr)) - bRet = false; - - if((mpLines != nullptr) != (rMark.mpLines != nullptr)) - bRet = false; - - if((mpGluePoints != nullptr) != (rMark.mpGluePoints != nullptr)) - bRet = false; - - if(bRet && mpPoints && *mpPoints != *rMark.mpPoints) - bRet = false; - - if(bRet && mpLines && *mpLines != *rMark.mpLines) - bRet = false; - - if(bRet && mpGluePoints && *mpGluePoints != *rMark.mpGluePoints) - bRet = false; - - return bRet; -} - - static bool ImpSdrMarkListSorter(SdrMark* const& lhs, SdrMark* const& rhs) { diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index 3bdea7e..881b6af 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -897,20 +897,6 @@ ImpXPolyPolygon::~ImpXPolyPolygon() aXPolyList.clear(); } -bool ImpXPolyPolygon::operator==(const ImpXPolyPolygon& rImpXPolyPoly) const -{ - size_t nCount = aXPolyList.size(); - const XPolygonList& rCmpList = rImpXPolyPoly.aXPolyList; - if ( nCount != rCmpList.size() ) return false; - bool bEq=true; - for ( size_t i = nCount; i > 0 && bEq; ) - { - i--; - bEq = ( *aXPolyList[ i ] == *rCmpList[ i ] ); - } - return bEq; -} - XPolyPolygon::XPolyPolygon( sal_uInt16 /*nInitSize*/, sal_uInt16 /*nResize*/ ) { pImpXPolyPolygon = new ImpXPolyPolygon(); diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index b923c71..cf52569 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -236,15 +236,6 @@ friend class SwConnectionDisposedListener_Impl; GetRowSet(css::uno::Reference< css::sdbc::XConnection>, const OUString& rTableOrQuery, SwDBSelect eTableOrQuery); - SAL_DLLPRIVATE static css::uno::Reference< css::beans::XPropertySet> - GetRowSupplier(css::uno::Reference< css::sdbc::XConnection> xConnection, - const OUString& rTableOrQuery, SwDBSelect eTableOrQuery) - { - css::uno::Reference<css::sdbc::XRowSet> xRowSet = GetRowSet(xConnection, rTableOrQuery, eTableOrQuery); - - return css::uno::Reference<css::beans::XPropertySet>( xRowSet, css::uno::UNO_QUERY ); - } - SAL_DLLPRIVATE void CreateDumpDocs(sal_Int32 &nMaxDumpDocs); SAL_DLLPRIVATE void SetSourceProp(SwDocShell* pSourceDocSh); diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 37c5201..305bcb3 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -253,7 +253,6 @@ public: sal_uInt16 GetSize() const { return m_aExtraRedlines.size(); } SwExtraRedline* GetRedline( sal_uInt16 uIndex ) const { return m_aExtraRedlines.operator[]( uIndex ); } - bool IsEmpty() const { return m_aExtraRedlines.empty(); } SW_DLLPUBLIC bool DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete ); bool DeleteTableRowRedline ( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete ); diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index a140055..fecfa98 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -63,13 +63,10 @@ public: sal_Int32 operator++(); sal_Int32 operator--(); - sal_Int32 operator++(int); sal_Int32 operator--(int); sal_Int32 operator+=( sal_Int32 const ); sal_Int32 operator-=( sal_Int32 const ); - sal_Int32 operator+=( const SwIndex& ); - sal_Int32 operator-=( const SwIndex& ); bool operator< ( const SwIndex& ) const; bool operator<=( const SwIndex& ) const; @@ -144,13 +141,6 @@ inline sal_Int32 SwIndex::operator--() return ChgValue( *this, m_nIndex-1 ).m_nIndex; } -inline sal_Int32 SwIndex::operator++(int) -{ - sal_Int32 const nOldIndex = m_nIndex; - ChgValue( *this, m_nIndex+1 ); - return nOldIndex; -} - inline sal_Int32 SwIndex::operator--(int) { sal_Int32 const nOldIndex = m_nIndex; @@ -168,16 +158,6 @@ inline sal_Int32 SwIndex::operator-=( sal_Int32 const nVal ) return ChgValue( *this, m_nIndex - nVal ).m_nIndex; } -inline sal_Int32 SwIndex::operator+=( const SwIndex& rIndex ) -{ - return ChgValue( *this, m_nIndex + rIndex.m_nIndex ).m_nIndex; -} - -inline sal_Int32 SwIndex::operator-=( const SwIndex& rIndex ) -{ - return ChgValue( *this, m_nIndex - rIndex.m_nIndex ).m_nIndex; -} - inline bool SwIndex::operator< ( const SwIndex& rIndex ) const { return m_nIndex < rIndex.m_nIndex; diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index 4f9f317..c2f245d 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -94,9 +94,6 @@ public: inline SwRect &operator+=( const Point &rPt ); inline SwRect &operator-=( const Point &rPt ); - inline SwRect &operator+=( const Size &rSz ); - inline SwRect &operator-=( const Size &rSz ); - //SV-SS e.g. pWin->DrawRect( aSwRect.SVRect() ); inline Rectangle SVRect() const; @@ -274,19 +271,6 @@ inline SwRect &SwRect::operator-=( const Point &rPt ) return *this; } -inline SwRect &SwRect::operator+=( const Size &rSz ) -{ - m_Size.Width() += rSz.Width(); - m_Size.Height() += rSz.Height(); - return *this; -} -inline SwRect &SwRect::operator-=( const Size &rSz ) -{ - m_Size.Width() -= rSz.Width(); - m_Size.Height() -= rSz.Height(); - return *this; -} - // other inline Rectangle SwRect::SVRect() const { diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 42953d6a..9669946 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits