avmedia/source/quicktime/player.cxx | 31 ----- configure.in | 2 lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx | 31 ----- lotuswordpro/source/filter/explode.cxx | 2 lotuswordpro/source/filter/xfilter/xfutil.cxx | 2 sal/rtl/source/debugprint.cxx | 67 ----------- sal/rtl/source/makefile.mk | 33 ----- sc/source/core/tool/compiler.cxx | 27 ---- sw/source/core/frmedt/tblsel.cxx | 2 tools/Library_tl.mk | 3 tools/inc/tools/string.hxx | 5 tools/source/string/debugprint.cxx | 48 ------- tools/source/string/strimp.cxx | 53 -------- tools/source/string/tustring.cxx | 32 +++++ unusedcode.easy | 2 15 files changed, 36 insertions(+), 304 deletions(-)
New commits: commit 3af0c948254751eade9bff772b849720747c5494 Author: Daisuke Nishino <niboshi...@gmail.com> Date: Thu Nov 24 23:08:04 2011 +0900 Fix logic inversion diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 8ab53d5..b70503b 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2122,7 +2122,7 @@ sal_Bool _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara ) } else { - if( 0 != pFndPara->rBoxes.count( rpBox ) ) + if( 0 == pFndPara->rBoxes.count( rpBox ) ) { delete pFndBox; return sal_True; commit c8c53816593f30c54c7feef705ac6732eefc0833 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 24 15:06:57 2011 +0000 WaE: uninitialized value diff --git a/lotuswordpro/source/filter/xfilter/xfutil.cxx b/lotuswordpro/source/filter/xfilter/xfutil.cxx index 8471ff6..480482f 100644 --- a/lotuswordpro/source/filter/xfilter/xfutil.cxx +++ b/lotuswordpro/source/filter/xfilter/xfutil.cxx @@ -131,7 +131,7 @@ rtl::OUString DateTimeToOUString(XFDateTime& dt) rtl::OUString GetTableColName(sal_Int32 col) { - int remain; + int remain = 0; char ch; std::string strOut; commit 2affd5e0195d828800b0a7a4dbad8c71d528b374 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 24 15:01:15 2011 +0000 WaE: uninitialized value diff --git a/lotuswordpro/source/filter/explode.cxx b/lotuswordpro/source/filter/explode.cxx index 69c979d..241d43d 100644 --- a/lotuswordpro/source/filter/explode.cxx +++ b/lotuswordpro/source/filter/explode.cxx @@ -349,7 +349,7 @@ void Decompression::ToString(sal_uInt32 nBits, sal_Char *pChar, sal_uInt32 nLen) */ sal_uInt32 Decompression::Decode(HuffmanTreeNode * pRoot) { - sal_uInt32 nRet; + sal_uInt32 nRet(0); sal_uInt32 nRead, nReadAlready; if( 0 != ReadBits(1, nReadAlready)) commit 89f057a09d8684f697a822662907cfede7ef0a3f Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 24 09:51:32 2011 +0000 ditch dbg_dump diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx index f7efb51..e4550a0 100644 --- a/avmedia/source/quicktime/player.cxx +++ b/avmedia/source/quicktime/player.cxx @@ -32,37 +32,6 @@ #include "framegrabber.hxx" #include "window.hxx" -// dbg_dump for development -#if OSL_DEBUG_LEVEL > 1 -#include <rtl/strbuf.hxx> -#include <rtl/ustring.hxx> - -const sal_Char *dbg_dump(const rtl::OString &rStr) -{ - static rtl::OStringBuffer aStr; - - aStr = rtl::OStringBuffer(rStr); - aStr.append(static_cast<char>(0)); - return aStr.getStr(); -} - -const sal_Char *dbg_dump(const rtl::OUString &rStr) -{ - return dbg_dump(rtl::OUStringToOString(rStr, RTL_TEXTENCODING_UTF8)); -} - -const sal_Char *dbg_dump(rtl_String *pStr) -{ - return dbg_dump(rtl::OString(pStr)); -} - -const sal_Char *dbg_dump(rtl_uString *pStr) -{ - return dbg_dump(rtl::OUString(pStr)); -} - -#endif - using namespace ::com::sun::star; namespace avmedia { namespace quicktime { diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx index 336b373..3f7cc2d 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.cxx @@ -61,37 +61,6 @@ using ::rtl::OUStringBuffer; using ::rtl::OUStringToOString; /////////////////////////////////////////////////////////////////////////// -// dbg_dump for development -#if OSL_DEBUG_LEVEL > 1 -#include <rtl/strbuf.hxx> -#include <rtl/ustring.hxx> - -const sal_Char *dbg_dump(const rtl::OString &rStr) -{ - static rtl::OStringBuffer aStr; - - aStr = rtl::OStringBuffer(rStr); - aStr.append(static_cast<char>(0)); - return aStr.getStr(); -} - -const sal_Char *dbg_dump(const rtl::OUString &rStr) -{ - return dbg_dump(rtl::OUStringToOString(rStr, RTL_TEXTENCODING_UTF8)); -} - -const sal_Char *dbg_dump(rtl_String *pStr) -{ - return dbg_dump(rtl::OString(pStr)); -} - -const sal_Char *dbg_dump(rtl_uString *pStr) -{ - return dbg_dump(rtl::OUString(pStr)); -} - -#endif -/////////////////////////////////////////////////////////////////////////// MacSpellChecker::MacSpellChecker() : aEvtListeners ( GetLinguMutex() ) diff --git a/sal/rtl/source/debugprint.cxx b/sal/rtl/source/debugprint.cxx deleted file mode 100644 index 079643b..0000000 --- a/sal/rtl/source/debugprint.cxx +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sal.hxx" - -#include <rtl/string.hxx> -#include <rtl/strbuf.hxx> -#include <rtl/ustring.hxx> -#include <rtl/ustrbuf.hxx> - -const sal_Char *dbg_dump(const rtl::OString &rStr) -{ - return rStr.getStr(); -} - -const sal_Char *dbg_dump(const rtl::OStringBuffer &rStrBuf) -{ - return rStrBuf.getStr(); -} - -const sal_Char *dbg_dump(rtl_String *pStr) -{ - return rtl_string_getStr(pStr); -} - -const sal_Char *dbg_dump(const rtl::OUString &rStr) -{ - return dbg_dump(rtl::OUStringToOString(rStr, RTL_TEXTENCODING_UTF8)); -} - -const sal_Char *dbg_dump(const rtl::OUStringBuffer &rStrBuf) -{ - return dbg_dump(rtl::OUString(rStrBuf.getStr())); -} - -const sal_Char *dbg_dump(rtl_uString *pStr) -{ - return dbg_dump(rtl::OUString(pStr)); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/rtl/source/makefile.mk b/sal/rtl/source/makefile.mk index ff8ee91..60953f8 100644 --- a/sal/rtl/source/makefile.mk +++ b/sal/rtl/source/makefile.mk @@ -58,14 +58,6 @@ CXXFLAGS+= $(LFS_CFLAGS) .IF "$(header)" == "" -.IF "$(OS)" != "AIX" -ALWAYSDBGFILES=$(SLO)$/debugprint.obj -.ENDIF - -.IF "$(ALWAYSDBGFILES)" != "" -ALWAYSDBGTARGET=do_it_alwaysdebug -.ENDIF - SLOFILES= \ $(SLO)$/memory.obj \ $(SLO)$/cipher.obj \ @@ -87,7 +79,6 @@ SLOFILES= \ $(SLO)$/cmdargs.obj \ $(SLO)$/unload.obj \ $(SLO)$/logfile.obj \ - $(SLO)$/debugprint.obj \ $(SLO)$/math.obj \ $(SLO)$/alloc_global.obj\ $(SLO)$/alloc_cache.obj \ @@ -121,7 +112,6 @@ OBJFILES= \ $(OBJ)$/alloc_arena.obj \ $(OBJ)$/alloc_fini.obj - .ENDIF # --- Makefile snippet -------------------------------------------- @@ -131,31 +121,8 @@ BOOTSTRAPMK = $(OUT)$/inc$/rtlbootstrap.mk # --- Targets ------------------------------------------------------ -.IF "$(ALWAYSDBG_FLAG)"=="" -TARGETDEPS+=$(ALWAYSDBGTARGET) -.ENDIF - .INCLUDE : target.mk -.IF "$(ALWAYSDBGTARGET)" != "" -.IF "$(ALWAYSDBG_FLAG)" == "" -# -------------------------------------------------- -# - ALWAYSDBG - files always compiled with debugging -# -------------------------------------------------- -$(ALWAYSDBGTARGET): - @echo --- ALWAYSDBGFILES --- - @dmake $(MFLAGS) $(MAKEFILE) debug=true $(ALWAYSDBGFILES) ALWAYSDBG_FLAG=TRUE $(CALLMACROS) - @echo --- ALWAYSDBGFILES OVER --- - -$(ALWAYSDBGFILES): - @echo --- ALWAYSDBG --- - @dmake $(MFLAGS) $(MAKEFILE) debug=true ALWAYSDBG_FLAG=TRUE $(CALLMACROS) $@ - @echo --- ALWAYSDBG OVER --- - -.ENDIF -.ENDIF - - ALLTAR : $(BOOTSTRAPMK) $(BOOTSTRAPMK) : diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 1a484ef..e6aa49a 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -82,33 +82,6 @@ using namespace ::com::sun::star; using rtl::OUString; using ::std::vector; -#if OSL_DEBUG_LEVEL > 1 -// For some unknown reason the identical dbg_dump utilities in -// tools/source/string/debugprint.cxx tend to crash when called from within -// gdb. Having them here also comes handy as libtl*.so doesn't have to be -// replaced. -const char* dbg_sc_dump( const ByteString & rStr ) -{ - static ByteString aStr; - aStr = rStr; - aStr.Append(static_cast<char>(0)); - return aStr.GetBuffer(); -} -const char* dbg_sc_dump( const UniString & rStr ) -{ - return dbg_sc_dump(ByteString(rStr, RTL_TEXTENCODING_UTF8)); -} -const char* dbg_sc_dump( const sal_Unicode * pBuf ) -{ - return dbg_sc_dump( UniString( pBuf)); -} -const char* dbg_sc_dump( const sal_Unicode c ) -{ - return dbg_sc_dump( UniString( c)); -} -#endif - - CharClass* ScCompiler::pCharClassEnglish = NULL; const ScCompiler::Convention* ScCompiler::pConventions[ ] = { NULL, NULL, NULL, NULL, NULL, NULL }; diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk index 64657b5..57beb90 100644 --- a/tools/Library_tl.mk +++ b/tools/Library_tl.mk @@ -112,7 +112,6 @@ $(eval $(call gb_Library_add_exception_objects,tl,\ tools/source/stream/stream \ tools/source/stream/strmsys \ tools/source/stream/vcompat \ - tools/source/string/debugprint \ tools/source/string/tenccvt \ tools/source/string/tstring \ tools/source/string/tustring \ @@ -149,8 +148,6 @@ $(eval $(call gb_Library_add_linked_libs,tl,\ endif -# tools/source/string/debugprint -DDEBUG -DEXCEPTIONS_OFF -DOSL_DEBUG_LEVEL=2 -DSHAREDLIB -DTOOLS_DLLIMPLEMENTATION -D_DLL_ -O0 -fno-exceptions -fpic -fvisibility=hidden -g -# -DOPTIMIZE # no -DTOOLS_DLLIMPLEMENTATION on toolsdll # -DEXCEPTIONS_OFF -fno-exceptions on datetime tdate ttime bigint color config fract gen line link poly2 svborder toolsin inetmime inetmsg inetstrm contnr mempool multisel table unqidx cachestr stream strmsys vcompat tenccvt tstring tustring testtoolloader # vim: set noet sw=4 ts=4: diff --git a/tools/source/string/debugprint.cxx b/tools/source/string/debugprint.cxx deleted file mode 100644 index 8513331..0000000 --- a/tools/source/string/debugprint.cxx +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_tools.hxx" - -// ======================================================================= - -#include <tools/string.hxx> - -const sal_Char *dbg_dump(const ByteString &rStr) -{ - static ByteString aStr; - aStr = rStr; - return aStr.GetBuffer(); -} - -const sal_Char *dbg_dump(const UniString &rStr) -{ - return dbg_dump(ByteString(rStr, RTL_TEXTENCODING_UTF8)); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 56d168cc59a352ec432e09b8ba471b858387023c Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 24 09:16:26 2011 +0000 strip down old string class some more diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index c9258be..11716ff 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -234,10 +234,6 @@ public: ByteString& Erase( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN ); ByteString Copy( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN ) const; - ByteString& EraseLeadingChars( sal_Char c = ' ' ); - ByteString& EraseTrailingChars( sal_Char c = ' ' ); - ByteString& EraseLeadingAndTrailingChars( sal_Char c = ' ' ); - ByteString& ConvertLineEnd( LineEnd eLineEnd ); ByteString& ConvertLineEnd() { return ConvertLineEnd( GetSystemLineEnd() ); } @@ -489,7 +485,6 @@ public: UniString& EraseLeadingChars( sal_Unicode c = ' ' ); UniString& EraseTrailingChars( sal_Unicode c = ' ' ); - UniString& EraseLeadingAndTrailingChars( sal_Unicode c = ' ' ); UniString& Reverse(); UniString& ConvertLineEnd( LineEnd eLineEnd ); diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx index aad7df6..33c0572 100644 --- a/tools/source/string/strimp.cxx +++ b/tools/source/string/strimp.cxx @@ -757,59 +757,6 @@ STRING& STRING::Erase( xub_StrLen nIndex, xub_StrLen nCount ) // ----------------------------------------------------------------------- -STRING& STRING::EraseLeadingChars( STRCODE c ) -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - - if ( mpData->maStr[0] != c ) - return *this; - - xub_StrLen nStart = 0; - while ( mpData->maStr[nStart] == c ) - ++nStart; - - return Erase( 0, nStart ); -} - -// ----------------------------------------------------------------------- - -STRING& STRING::EraseTrailingChars( STRCODE c ) -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - - sal_Int32 nEnd = mpData->mnLen; - while ( nEnd && (mpData->maStr[nEnd-1] == c) ) - nEnd--; - - if ( nEnd != mpData->mnLen ) - Erase( static_cast< xub_StrLen >(nEnd) ); - - return *this; -} - -// ----------------------------------------------------------------------- - -STRING& STRING::EraseLeadingAndTrailingChars( STRCODE c ) -{ - DBG_CHKTHIS( STRING, DBGCHECKSTRING ); - - xub_StrLen nStart = 0; - while ( mpData->maStr[nStart] == c ) - ++nStart; - if ( nStart ) - Erase( 0, nStart ); - - sal_Int32 nEnd = mpData->mnLen; - while ( nEnd && (mpData->maStr[nEnd-1] == c) ) - nEnd--; - if ( nEnd != mpData->mnLen ) - Erase( static_cast< xub_StrLen >(nEnd) ); - - return *this; -} - -// ----------------------------------------------------------------------- - STRING& STRING::ToLowerAscii() { DBG_CHKTHIS( STRING, DBGCHECKSTRING ); diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx index 30a0fd5..79a7ebc 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -576,4 +576,36 @@ STRING::STRING( STRCODE c ) mpData->maStr[0] = c; } +// ----------------------------------------------------------------------- + +STRING& STRING::EraseLeadingChars( STRCODE c ) +{ + DBG_CHKTHIS( STRING, DBGCHECKSTRING ); + + if ( mpData->maStr[0] != c ) + return *this; + + xub_StrLen nStart = 0; + while ( mpData->maStr[nStart] == c ) + ++nStart; + + return Erase( 0, nStart ); +} + +// ----------------------------------------------------------------------- + +STRING& STRING::EraseTrailingChars( STRCODE c ) +{ + DBG_CHKTHIS( STRING, DBGCHECKSTRING ); + + sal_Int32 nEnd = mpData->mnLen; + while ( nEnd && (mpData->maStr[nEnd-1] == c) ) + nEnd--; + + if ( nEnd != mpData->mnLen ) + Erase( static_cast< xub_StrLen >(nEnd) ); + + return *this; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unusedcode.easy b/unusedcode.easy index 4eef24b..3283270 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -7,8 +7,6 @@ AtomPubSession::~AtomPubSession() BufferNode::childAt(int) const ByteString::Assign(char const*, unsigned short) ByteString::Assign(char) -ByteString::EraseLeadingChars(char) -ByteString::EraseTrailingChars(char) CIccCLUT::Interp3dTetra(float*, float const*) CIccCLUT::Iterate(IIccCLUTExec*) CIccFormulaCurveSegment::SetFunction(unsigned short, unsigned char, float*) commit 9a6c74171b401310d143cfe1b0d1a0be1a4108c3 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Nov 24 09:13:43 2011 +0000 document that the mozilla build tooling is for nss as well as mozilla diff --git a/configure.in b/configure.in index 58a20d1..2711e51 100644 --- a/configure.in +++ b/configure.in @@ -6041,7 +6041,7 @@ else BUILD_TYPE="$BUILD_TYPE NSS" AC_MSG_RESULT([internal]) if test "$build_os" = "cygwin"; then - AC_MSG_CHECKING([for Mozilla build tooling]) + AC_MSG_CHECKING([for Mozilla build tooling. Required for nss and/or mozilla]) if test -z "$MOZILLABUILD" ; then AC_MSG_ERROR([Mozilla build tooling not found. Use the --with-mozilla-build option after installing the tools obtained
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits