From b14224fe97b8a44232c9c1401d3a49771f46582e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 2 Feb 2016 16:15:51 +0200 Subject: loplugin:unusedmethods using an idea from 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... dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- 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 - .../source/drivers/firebird/ResultSetMetaData.hxx | 4 - .../source/drivers/jdbc/DriverPropertyInfo.cxx | 13 - connectivity/source/drivers/mork/MResultSet.hxx | 6 - .../source/drivers/mork/MResultSetMetaData.hxx | 4 - .../inc/FDatabaseMetaDataResultSetMetaData.hxx | 3 - connectivity/source/inc/dbase/dindexnode.hxx | 5 - .../source/inc/file/FResultSetMetaData.hxx | 4 - .../source/inc/java/sql/DriverPropertyInfo.hxx | 2 - connectivity/source/inc/java/tools.hxx | 18 -- .../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 - .../source/primitive2d/baseprimitive2d.cxx | 32 --- .../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 - .../drawinglayer/geometry/viewinformation2d.hxx | 1 - .../drawinglayer/primitive2d/baseprimitive2d.hxx | 4 - .../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(-) delete mode 100644 comphelper/source/misc/compareversionstrings.cxx diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx index ba1320b196b4..509a793f175a 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 bb1be6e142b1..89543950e4c3 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 2faeb2b8a0ea..3b1b5a8b555e 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 e939bbc23c54..d17337ea30c6 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 6d8952de810f..66375178be71 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(rA.eTypeClass); - return h; -} - } } } } namespace rtl { diff --git a/binaryurp/source/lessoperators.hxx b/binaryurp/source/lessoperators.hxx index 317e76ab18d5..f3202b5fb5af 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 155d293b600e..7047d8a37e36 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 af030351607c..97814da5fe4c 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 a5ca92847634..000000000000 --- 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 -#include - -#include -#include - -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 da440efd1a13..83b02d6cf56f 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(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 5f6d5914e2ee..7047abc03f29 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 1c8d6f98749c..6ad2734a085a 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 142c375c52de..4c370c42ae5c 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(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 e3bd88e4ca32..f3f9da432a7f 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 bf11724a9c8c..cde5ecdddb84 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 18b143ac8dd0..2a324b4c03eb 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 5c03723b10cc..d5071612f681 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& _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 db86f2af73fe..1db9dae973e2 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 bd600501cfc3..aa6e805628b6 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 ::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;iGetObjectArrayElement(_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 70ec0382b884..de591e3035f1 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 fe94d2e8a568..9f8550e631e0 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 8de9a93a18b6..0ed4b22744a2 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 763e6618b8f7..87a957c0ec0e 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 d53e417c4f45..fd5801a5cad7 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 44008a227eea..5357688d092e 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 460883a13955..d9fc8ed6d27a 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 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 1a6dbd16401a..234a8f5e344f 100644 --- a/editeng/source/lookuptree/Trie.cxx +++ b/editeng/source/lookuptree/Trie.cxx @@ -196,12 +196,13 @@ void Trie::findSuggestions(const OUString& sWordPart, vector& rSuggest } } -void Trie::getAllEntries(std::vector& entries) +size_t Trie::size() const { - if (mRoot) - { - mRoot->collectSuggestions(OUString(), entries); - } + if (!mRoot) + return 0; + std::vector 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 21e63bc37262..a5ce4e451192 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 2f9834e80409..4674e8bf0e97 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 2f56372d9f3f..6dfd7e21a094 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 5bc46a888d99..bad79df7f692 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& seqProps, const OUString& _rPropName); diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx index f154937bd507..f38a9cf061a5 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 90b1e3e4384e..eb72beda89eb 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 66044f76d0ff..e93a59dd2acf 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 6e7cb972e16b..a67aa9d871f9 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 fa9fa3190f3f..6aff71c61e5a 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 72e857c407a3..53fd5f47eb81 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 6362793e78ac..79c2b13d6ecf 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 d3eaf47f17b3..0f21afd91617 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 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 3f1d6d07adc0..ce9e34b23ab5 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 302c6a622739..4cdcdc9d8f9d 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& rSuggestionList) const; - void getAllEntries(std::vector& entries); + size_t size() const; }; } diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index 8ba5791443b8..92b277a9323d 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 c596e1315e14..951a9bb7bdc2 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 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 1c73eb7ec98d..626214674a27 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 a1607b9bcfa6..5f51b064690e 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 b9430baedfb3..945cf09cc1f1 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 080a81836013..dc29753aed92 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 def27ace1258..d80c3377681d 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 ca5139cb91d1..5aeee2f592f0 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 cd543f61fea6..2db77761b3ed 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 48df21bf49fe..78b98e77983b 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 2bcd84ece843..fc9702899b12 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 976165b09da1..510087c1914a 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 f450c7b7bf23..1dfb13098028 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 1bc2404025c1..3b737c889622 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 633f50714d1a..1731b4925f6a 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 a956b200651a..e4a842107b08 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 16b46fb72f90..aba3304ea83f 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 e30853d702c1..c919d8cd76ca 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 cd5bf231d134..3985942857ea 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 9b7e6b44a6a3..1bc67b2c415a 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( 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 9b3856aec6e8..74d57088bcc4 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 038e18f5b2c7..927f60cf5fc1 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 c9e98c4c03b8..4c1daa3aab1b 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 6875a5074ca4..88bc38df2d83 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 935ea9ac6e06..9a81006085ae 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 e5c045feeccf..f63634f0086a 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 d1f3f9ff3f5b..c2e0f172265e 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 774fd40fdf45..e28fbd9f9060 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& 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 ded112ccc475..376fad492278 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 46de94d538f9..c911c5d93d17 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 8b98e1a37c99..b5dcf561f132 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 43a6adc9a65d..3dcb28fd4a4a 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 59432a6cc520..5487745d36ab 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 fcd687c2ff68..21e18ff6d4ef 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 4affff6c923e..ac536306610e 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 9853a40157d4..78498537e4fd 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 c677df19aa4a..9dfbe2e073df 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 75e2e14bcadc..7bf2e556cfc9 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 656bce67b436..ba4d8dd63f80 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 +{ + 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 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 5fc786a089c4..6e9c640105be 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 745fc0261a25..0f606d741173 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 - { - 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 c1f1c9859d9d..81b1d960ba47 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 6d9b9189d0f2..f4392b056bdc 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 - operator*() 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 fe09a745845f..af9b3372080f 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 61f8ddd802bc..8a2188b46673 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 ef2d375eb4e2..5883cb2c6114 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 9baf30b07777..082eaf2c2fc3 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 db807004d800..56a22075f27e 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 3c40e3e21df5..d065e0f34f1c 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 7bd5c8895153..da3e21768358 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'. */ @@ -380,255 +351,6 @@ copy_rest: return *this; } -/** - * 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 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 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 e7eef7c7cb6e..6c2862baff44 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("xxxx")); + CPPUNIT_ASSERT_EQUAL(aString, OString("")); } 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("xxxx")); + CPPUNIT_ASSERT_EQUAL(aString, OString("")); } 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("xxx"), aString); + CPPUNIT_ASSERT_EQUAL(OString(""), aString); } void Test::testAttributeValues() @@ -183,110 +178,6 @@ void Test::testAttributeValues() CPPUNIT_ASSERT_EQUAL(OString(""), 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(""), 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(""), 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(""), 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(""), 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(""), 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(""), 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(""), aString); - } -} - CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/svtools/source/svhtml/HtmlWriter.cxx b/svtools/source/svhtml/HtmlWriter.cxx index 3435b60546f7..961ab38457b5 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 a72981b23a06..64b6085ad12a 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 7a7ae7790d79..f74cbb92bc03 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 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 b923c71ab17b..cf52569a6215 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 xRowSet = GetRowSet(xConnection, rTableOrQuery, eTableOrQuery); - - return css::uno::Reference( 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 37c5201905e4..305bcb383574 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 a1400553c73e..fecfa983b6b9 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 4f9f317881a4..c2f245df71fa 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 42953d6ae5cc..9669946007e7 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1300,7 +1300,7 @@ void SwUiWriterTest::testDeleteTableRedlines() IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess(); SwExtraRedlineTable& rExtras = rIDRA.GetExtraRedlineTable(); rExtras.DeleteAllTableRedlines(pDoc, rTable, false, sal_uInt16(USHRT_MAX)); - CPPUNIT_ASSERT(rExtras.IsEmpty()); + CPPUNIT_ASSERT(rExtras.GetSize() == 0); } void SwUiWriterTest::testXFlatParagraph() diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx index dac9ba9c2769..cd8dd4afc0a9 100644 --- a/sw/source/core/bastyp/index.cxx +++ b/sw/source/core/bastyp/index.cxx @@ -296,16 +296,6 @@ void SwIndexReg::MoveTo( SwIndexReg& rArr ) // SwIndex -sal_Int32 SwIndex::operator++(int) -{ - SAL_WARN_IF( !(m_nIndex < SAL_MAX_INT32), "sw.core", - "SwIndex::operator++(int) wraps around" ); - - const sal_Int32 nOldIndex = m_nIndex; - ChgValue( *this, m_nIndex+1 ); - return nOldIndex; -} - sal_Int32 SwIndex::operator++() { SAL_WARN_IF( !(m_nIndex < SAL_MAX_INT32), "sw.core", @@ -346,20 +336,6 @@ sal_Int32 SwIndex::operator-=( sal_Int32 const nVal ) return ChgValue( *this, m_nIndex - nVal ).m_nIndex; } -sal_Int32 SwIndex::operator+=( const SwIndex & rIndex ) -{ - SAL_WARN_IF( !(m_nIndex <= SAL_MAX_INT32 - rIndex.m_nIndex), "sw.core", - "SwIndex::operator+=(SwIndex) wraps around" ); - return ChgValue( *this, m_nIndex + rIndex.m_nIndex ).m_nIndex; -} - -sal_Int32 SwIndex::operator-=( const SwIndex & rIndex ) -{ - SAL_WARN_IF( !(m_nIndex >= rIndex.m_nIndex), "sw.core", - "SwIndex::operator-=(SwIndex) wraps around" ); - return ChgValue( *this, m_nIndex - rIndex.m_nIndex ).m_nIndex; -} - bool SwIndex::operator< ( const SwIndex & rIndex ) const { // Attempt to compare indices into different arrays diff --git a/tools/qa/cppunit/test_stream.cxx b/tools/qa/cppunit/test_stream.cxx index 6704548a92d2..71981ae70df4 100644 --- a/tools/qa/cppunit/test_stream.cxx +++ b/tools/qa/cppunit/test_stream.cxx @@ -196,18 +196,6 @@ namespace CPPUNIT_ASSERT(aMemStream.good()); CPPUNIT_ASSERT(!aMemStream.bad()); CPPUNIT_ASSERT(!aMemStream.eof()); - - aMemStream.SetEndian(SvStreamEndian::LITTLE); - aMemStream.Seek(0); - foo[0] = 3; - foo[1] = 0; - foo[2] = 0; - foo[3] = 0; - aFoo = read_uInt32_lenPrefixed_uInt8s_ToOString(aMemStream); - CPPUNIT_ASSERT(aFoo == "bar"); - CPPUNIT_ASSERT(aMemStream.good()); - CPPUNIT_ASSERT(!aMemStream.bad()); - CPPUNIT_ASSERT(!aMemStream.eof()); } void Test::test_readline() diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx index 54985ec553c7..e8798b798e45 100644 --- a/tools/source/datetime/tdate.cxx +++ b/tools/source/datetime/tdate.cxx @@ -437,20 +437,6 @@ Date& Date::operator --() return *this; } -Date Date::operator ++( int ) -{ - Date aOldDate = *this; - Date::operator++(); - return aOldDate; -} - -Date Date::operator --( int ) -{ - Date aOldDate = *this; - Date::operator--(); - return aOldDate; -} - Date operator +( const Date& rDate, long nDays ) { Date aDate( rDate ); diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 361e88d74a77..6ebb517540ae 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -3695,51 +3695,6 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const } } -bool INetURLObject::operator <(INetURLObject const & rObject) const -{ - sal_Int32 nCompare = m_aScheme.compare( - rObject.m_aScheme, m_aAbsURIRef, rObject.m_aAbsURIRef); - if (nCompare < 0) { - return true; - } else if (nCompare > 0) { - return false; - } - sal_uInt32 nPort1 = GetPort(); - sal_uInt32 nPort2 = rObject.GetPort(); - if (nPort1 < nPort2) - return true; - else if (nPort1 > nPort2) - return false; - nCompare = GetUser(NO_DECODE).compareTo(rObject.GetUser(NO_DECODE)); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - nCompare = GetPass(NO_DECODE).compareTo(rObject.GetPass(NO_DECODE)); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - nCompare = GetHost(NO_DECODE).compareTo(rObject.GetHost(NO_DECODE)); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - const OUString &rPath1(GetURLPath(NO_DECODE)); - const OUString &rPath2(rObject.GetURLPath(NO_DECODE)); - nCompare = rPath1.compareTo(rPath2); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - nCompare = GetParam(NO_DECODE).compareTo(rObject.GetParam(NO_DECODE)); - if (nCompare < 0) - return true; - else if (nCompare > 0) - return false; - return GetMsgId(NO_DECODE).compareTo(INetURLObject::GetMsgId(NO_DECODE)) < 0; -} - bool INetURLObject::ConcatData(INetProtocol eTheScheme, OUString const & rTheUser, OUString const & rThePassword, diff --git a/tools/source/generic/svborder.cxx b/tools/source/generic/svborder.cxx index a905b2c34ba9..8f2bec386c5e 100644 --- a/tools/source/generic/svborder.cxx +++ b/tools/source/generic/svborder.cxx @@ -32,17 +32,4 @@ Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder ) return rRect; } -Rectangle & operator -= ( Rectangle & rRect, const SvBorder & rBorder ) -{ - // call GetSize first due to Empty-Rect - Size aS( rRect.GetSize() ); - aS.Width() -= rBorder.Left() + rBorder.Right(); - aS.Height() -= rBorder.Top() + rBorder.Bottom(); - - rRect.Left() += rBorder.Left(); - rRect.Top() += rBorder.Top(); - rRect.SetSize( aS ); - return rRect; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index 3fdf5d520934..61a44b1bfce3 100644 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -133,19 +133,6 @@ MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig ) return *this; } -bool MultiSelection::operator== ( MultiSelection& rWith ) -{ - if ( aTotRange != rWith.aTotRange || nSelCount != rWith.nSelCount || - aSels.size() != rWith.aSels.size() ) - return false; - - // compare the sub selections - for ( size_t n = 0; n < aSels.size(); ++n ) - if ( *aSels[ n ] != *rWith.aSels[ n ] ) - return false; - return true; -} - void MultiSelection::SelectAll( bool bSelect ) { ImplClear(); diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx index 389b8fe1fcbc..279c677743e8 100644 --- a/ucb/source/inc/regexpmap.hxx +++ b/ucb/source/inc/regexpmap.hxx @@ -266,8 +266,6 @@ public: RegexpMapConstIter & operator ++(); - RegexpMapConstIter operator ++(int); - RegexpMapEntry< Val > const * operator ->() const; bool equals(RegexpMapConstIter const & rOther) const; @@ -317,14 +315,6 @@ RegexpMapConstIter< Val > & RegexpMapConstIter< Val >::operator ++() return *this; } -template< typename Val > -RegexpMapConstIter< Val > RegexpMapConstIter< Val >::operator ++(int) -{ - RegexpMapConstIter aTemp(*this); - m_pImpl->next(); - return aTemp; -} - template< typename Val > RegexpMapEntry< Val > const * RegexpMapConstIter< Val >::operator ->() const { @@ -347,10 +337,6 @@ class RegexpMapIter: public RegexpMapConstIter< Val > public: RegexpMapIter() {} - RegexpMapIter & operator ++(); - - RegexpMapIter operator ++(int); - RegexpMapEntry< Val > * operator ->(); RegexpMapEntry< Val > const * operator ->() const; @@ -364,21 +350,6 @@ RegexpMapIter< Val >::RegexpMapIter(RegexpMapIterImpl< Val > * pTheImpl): RegexpMapConstIter< Val >(pTheImpl) {} -template< typename Val > -RegexpMapIter< Val > & RegexpMapIter< Val >::operator ++() -{ - this->m_pImpl->next(); - return *this; -} - -template< typename Val > -RegexpMapIter< Val > RegexpMapIter< Val >::operator ++(int) -{ - RegexpMapIter aTemp(*this); - this->m_pImpl->next(); - return aTemp; -} - template< typename Val > RegexpMapEntry< Val > * RegexpMapIter< Val >::operator ->() { diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 296684b3dfd9..d952dd7f801e 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -2678,12 +2678,6 @@ HelpSettings::GetBalloonDelay() const return mxData->mnBalloonDelay; } -bool -HelpSettings::operator !=( const HelpSettings& rSet ) const -{ - return !(*this == rSet); -} - ImplAllSettingsData::ImplAllSettingsData() : maLocale( LANGUAGE_SYSTEM ), @@ -3133,12 +3127,6 @@ AllSettings::GetWindowUpdate() const return mxData->mnWindowUpdate; } -bool -AllSettings::operator !=( const AllSettings& rSet ) const -{ - return !(*this == rSet); -} - SvtSysLocale& AllSettings::GetSysLocale() { diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index a1b05157fadb..84904bdb0f38 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -1765,11 +1765,6 @@ bool WriteDIBBitmapEx( return false; } -sal_uInt32 getDIBInfoHeaderSize() -{ - return DIBINFOHEADERSIZE; -} - sal_uInt32 getDIBV5HeaderSize() { return DIBV5HEADERSIZE; diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 0dca9afda244..2d3cfe06271a 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -362,17 +362,6 @@ QueueInfo::~QueueInfo() { } -bool QueueInfo::operator==( const QueueInfo& rInfo ) const -{ - return - maPrinterName == rInfo.maPrinterName && - maDriver == rInfo.maDriver && - maLocation == rInfo.maLocation && - maComment == rInfo.maComment && - mnStatus == rInfo.mnStatus && - mnJobs == rInfo.mnJobs; -} - SalPrinterQueueInfo::SalPrinterQueueInfo() { mnStatus = PrintQueueFlags::NONE; diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index d14d1a3584ef..2e7499ed2188 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2511,21 +2511,6 @@ void MenuBar::ClosePopup(Menu *pMenu) pMenuWin->PopupClosed(pMenu); } -void MenuBar::DeactivateMenuBar(VclPtr& xFocusId) -{ - MenuBarWindow* pMenuWin = getMenuBarWindow(); - if (!pMenuWin) - { - xFocusId = nullptr; - return; - } - xFocusId = pMenuWin->GetFocusId(); - if (xFocusId == nullptr) - return; - pMenuWin->SetFocusId(nullptr); - ImplGetSVData()->maWinData.mbNoDeactivate = false; -} - void MenuBar::MenuBarKeyInput(const KeyEvent& rEvent) { pWindow->KeyInput(rEvent); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 1d04005eb0ef..599514d66354 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1212,52 +1212,6 @@ void Window::ImplInitWindowData( WindowType nType ) mbEnableRTL = AllSettings::GetLayoutRTL(); // true: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active } -void Window::getFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize, OutputDevice& rDev ) -{ - bool bOldMap = mbMap; - mbMap = false; - rDev.DrawOutDev( rDevPt, rDevSize, rPt, rDevSize, *this ); - mbMap = bOldMap; -} - -void Window::drawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rDevSize, - const OutputDevice& rOutDev, const vcl::Region& rRegion ) -{ - - GDIMetaFile* pOldMetaFile = mpMetaFile; - bool bOldMap = mbMap; - RasterOp eOldROP = GetRasterOp(); - mpMetaFile = nullptr; - mbMap = false; - SetRasterOp( ROP_OVERPAINT ); - - if ( !IsDeviceOutputNecessary() ) - return; - - if ( !mpGraphics ) - { - if ( !AcquireGraphics() ) - return; - } - - if ( rRegion.IsNull() ) - mpGraphics->ResetClipRegion(); - else - SelectClipRegion( rRegion ); - - SalTwoRect aPosAry(rDevPt.X(), rDevPt.Y(), rDevSize.Width(), rDevSize.Height(), - rPt.X(), rPt.Y(), rDevSize.Width(), rDevSize.Height()); - drawOutDevDirect( &rOutDev, aPosAry ); - - // Ensure that ClipRegion is recalculated and set - mbInitClipRegion = true; - - SetRasterOp( eOldROP ); - mbMap = bOldMap; - mpMetaFile = pOldMetaFile; -} - - ImplWinData* Window::ImplGetWinData() const { if ( !mpWindowImpl->mpWinData ) diff --git a/writerperfect/inc/DirectoryStream.hxx b/writerperfect/inc/DirectoryStream.hxx index 99933c99d4e4..e02aab6f44bb 100644 --- a/writerperfect/inc/DirectoryStream.hxx +++ b/writerperfect/inc/DirectoryStream.hxx @@ -40,7 +40,6 @@ public: explicit DirectoryStream(const css::uno::Reference &xContent); virtual ~DirectoryStream(); - static DirectoryStream *createForParent(const css::uno::Reference &xContent); static bool isDirectory(const css::uno::Reference &xContent); virtual bool isStructured() override; diff --git a/writerperfect/qa/unit/DirectoryStreamTest.cxx b/writerperfect/qa/unit/DirectoryStreamTest.cxx index effedf8c5e4e..a3c399b7678c 100644 --- a/writerperfect/qa/unit/DirectoryStreamTest.cxx +++ b/writerperfect/qa/unit/DirectoryStreamTest.cxx @@ -18,6 +18,8 @@ #include #include +#include +#include namespace ucb = com::sun::star::ucb; namespace uno = com::sun::star::uno; @@ -60,6 +62,38 @@ static const char g_aDirPath[] = "/writerperfect/qa/unit/data/stream/test.dir"; static const char g_aNondirPath[] = "/writerperfect/qa/unit/data/stream/test.dir/mimetype"; static const char g_aNonexistentPath[] = "/writerperfect/qa/unit/data/stream/foo/bar"; +static DirectoryStream* createForParent(const css::uno::Reference &xContent) +{ + try + { + if (!xContent.is()) + return nullptr; + + DirectoryStream *pDir(nullptr); + + const uno::Reference xChild(xContent, uno::UNO_QUERY); + if (xChild.is()) + { + const uno::Reference xDirContent(xChild->getParent(), uno::UNO_QUERY); + if (xDirContent.is()) + { + pDir = new writerperfect::DirectoryStream(xDirContent); + if (!pDir->isStructured()) + { + delete pDir; + pDir = nullptr; + } + } + } + + return pDir; + } + catch (...) + { + return nullptr; + } +} + DirectoryStreamTest::DirectoryStreamTest() { const uno::Reference xCmdEnv; @@ -74,17 +108,17 @@ DirectoryStreamTest::DirectoryStreamTest() void DirectoryStreamTest::testConstruction() { - const unique_ptr pDir(DirectoryStream::createForParent(m_xFile)); + const unique_ptr pDir(createForParent(m_xFile)); CPPUNIT_ASSERT(bool(pDir)); CPPUNIT_ASSERT(pDir->isStructured()); // this should work for dirs too - const unique_ptr pDir2(DirectoryStream::createForParent(m_xDir)); + const unique_ptr pDir2(createForParent(m_xDir)); CPPUNIT_ASSERT(bool(pDir2)); CPPUNIT_ASSERT(pDir2->isStructured()); // for nonexistent dirs nothing is created - const unique_ptr pNondir(DirectoryStream::createForParent(m_xNonexistent)); + const unique_ptr pNondir(createForParent(m_xNonexistent)); CPPUNIT_ASSERT(!pNondir); // even if we try harder, just an empty shell is created @@ -136,7 +170,7 @@ void DirectoryStreamTest::testStructuredOperations() DirectoryStream aDir(m_xDir); lcl_testStructuredOperations(aDir); - unique_ptr pDir(DirectoryStream::createForParent(m_xFile)); + unique_ptr pDir(createForParent(m_xFile)); CPPUNIT_ASSERT(bool(pDir)); lcl_testStructuredOperations(*pDir.get()); } diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx index 08cf93e0d5a9..9426a3e0827e 100644 --- a/writerperfect/source/common/DirectoryStream.cxx +++ b/writerperfect/source/common/DirectoryStream.cxx @@ -113,38 +113,6 @@ DirectoryStream::~DirectoryStream() { } -DirectoryStream *DirectoryStream::createForParent(const css::uno::Reference &xContent) -{ - try - { - if (!xContent.is()) - return nullptr; - - DirectoryStream *pDir(nullptr); - - const uno::Reference xChild(xContent, uno::UNO_QUERY); - if (xChild.is()) - { - const uno::Reference xDirContent(xChild->getParent(), uno::UNO_QUERY); - if (xDirContent.is()) - { - pDir = new writerperfect::DirectoryStream(xDirContent); - if (!pDir->isStructured()) - { - delete pDir; - pDir = nullptr; - } - } - } - - return pDir; - } - catch (...) - { - return nullptr; - } -} - bool DirectoryStream::isDirectory(const css::uno::Reference &xContent) { try -- cgit v1.2.3