[Libreoffice-commits] .: 3 commits - dbaccess/source fpicker/Library_fps_kde4.mk fpicker/Module_fpicker.mk fpicker/Package_kde4_moc.mk fpicker/source vcl/unx
dbaccess/source/ui/misc/charsets.cxx |2 - fpicker/Library_fps_kde4.mk |8 --- fpicker/Module_fpicker.mk|1 fpicker/Package_kde4_moc.mk | 36 --- fpicker/source/unx/kde4/Makefile | 35 -- vcl/unx/kde4/KDESalGraphics.cxx |2 - 6 files changed, 2 insertions(+), 82 deletions(-) New commits: commit 43a56ce0cbed9187658340d0d4fbfa76c2c83d1b Author: LuboÅ¡ LuÅák Date: Fri Mar 16 20:57:07 2012 +0100 remove extraneous parentheses diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index 0be12fb..80c38ec 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -306,7 +306,7 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, draw( QStyle::CE_PushButton, &option, m_image, vclStateValue2StateFlag(nControlState, value) ); } -else if ( (type == CTRL_MENUBAR)) +else if (type == CTRL_MENUBAR) { if (part == PART_MENU_ITEM) { commit cd131c6366a2ee70d15fc4d4794ddf62b8db646e Author: LuboÅ¡ LuÅák Date: Fri Mar 16 20:36:14 2012 +0100 kde4 fpicker doesn't use Q_OBJECT, no need for moc diff --git a/fpicker/Library_fps_kde4.mk b/fpicker/Library_fps_kde4.mk index d806737..7c3e95f 100644 --- a/fpicker/Library_fps_kde4.mk +++ b/fpicker/Library_fps_kde4.mk @@ -27,10 +27,6 @@ $(eval $(call gb_Library_Library,fps_kde4)) -$(eval $(call gb_Library_add_package_headers,fps_kde4,\ - fpicker_kde4_moc \ -)) - $(eval $(call gb_Library_set_componentfile,fps_kde4,fpicker/source/unx/kde4/fps_kde4)) $(eval $(call gb_Library_add_api,fps_kde4,\ @@ -61,10 +57,6 @@ $(eval $(call gb_Library_add_exception_objects,fps_kde4,\ fpicker/source/unx/kde4/KDE4FPEntry \ )) -$(eval $(call gb_Library_add_generated_cxxobjects,fps_kde4,\ - CustomTarget/fpicker/source/unx/kde4/KDE4FilePicker.moc \ -)) - # KDE/Qt consider -Wshadow more trouble than benefit $(eval $(call gb_Library_add_cxxflags,fps_kde4,\ -Wno-shadow \ diff --git a/fpicker/Module_fpicker.mk b/fpicker/Module_fpicker.mk index 0491e54..2faa777 100644 --- a/fpicker/Module_fpicker.mk +++ b/fpicker/Module_fpicker.mk @@ -62,7 +62,6 @@ endif ifeq ($(ENABLE_KDE4),TRUE) $(eval $(call gb_Module_add_targets,fpicker,\ Library_fps_kde4 \ - Package_kde4_moc \ )) endif endif diff --git a/fpicker/Package_kde4_moc.mk b/fpicker/Package_kde4_moc.mk deleted file mode 100644 index 27ab13a..000 --- a/fpicker/Package_kde4_moc.mk +++ /dev/null @@ -1,36 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# Major Contributor(s): -# Copyright (C) 2010 Red Hat, Inc., David Tardon -# (initial developer) -# -# All Rights Reserved. -# -# For minor contributions see the git repository. -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 3 or later (the "GPLv3+"), or -# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), -# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable -# instead of those above. - -$(eval $(call gb_Package_Package,fpicker_kde4_moc,$(WORKDIR)/CustomTarget/fpicker/source/unx/kde4)) - -$(eval $(call gb_Package_add_customtarget,fpicker_kde4_moc,fpicker/source/unx/kde4)) - -$(eval $(call gb_CustomTarget_add_dependencies,fpicker/source/unx/kde4,\ -fpicker/source/unx/kde4/KDE4FilePicker.hxx \ -)) - -# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/fpicker/source/unx/kde4/Makefile b/fpicker/source/unx/kde4/Makefile deleted file mode 100644 index cd0ad6e..000 --- a/fpicker/source/unx/kde4/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -#
[Libreoffice-commits] .: 3 commits - dbaccess/source
dbaccess/source/core/api/RowSetCache.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 9c6ca789ef80eefff1875b7c804c343ff1668ce0 Author: Lionel Elie Mamane Date: Thu Feb 9 13:06:27 2012 +0100 reorganise code for better readability No behaviour change intended. However, if behaviour changed, probably the *old* behaviour is buggy, not new one. diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 08e1a8b..6a853e6 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -1074,17 +1074,17 @@ sal_Bool ORowSetCache::moveWindow() { aIter = m_pMatrix->begin(); -nPos= m_nStartPos; -bCheck = m_pCacheSet->absolute_checked(m_nStartPos,sal_False); -for(; !aIter->is() && bCheck;++aIter) +nPos= m_nStartPos + 1; +bCheck = m_pCacheSet->absolute_checked(nPos, sal_False); +for(; !aIter->is() && bCheck;++aIter, ++nPos) { OSL_ENSURE(aIter != m_pMatrix->end(),"Invalid iterator"); -bCheck = m_pCacheSet->next(); if ( bCheck ) // resultset stands on right position { *aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); -m_pCacheSet->fillValueRow(*aIter,++nPos); +m_pCacheSet->fillValueRow(*aIter, nPos); } +bCheck = m_pCacheSet->next(); } } } commit 4ea68987e96714aec1be339c4ddd5b6110bfd008 Author: Lionel Elie Mamane Date: Thu Feb 9 13:04:34 2012 +0100 typo in comment diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index be51b2a..08e1a8b 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -917,7 +917,7 @@ sal_Bool ORowSetCache::moveWindow() const sal_Int32 nStartPosOffset = m_nStartPos - nNewStartPos; // by how much m_nStartPos moves m_nStartPos = nNewStartPos; OSL_ENSURE( static_cast(nOverlapSize) <= m_pMatrix->size(), "new window end is after end of cache matrix!" ); -// the first position in m_pMatrix whos data we don't keep; +// the first position in m_pMatrix whose data we don't keep; // content will be moved to m_pMatrix.begin() ORowSetMatrix::iterator aEnd (m_pMatrix->begin() + nOverlapSize); // the first unused position after we are done; it == m_pMatrix.end() if and only if the window is full commit 843c8309536fec12d63dd45b6074ea5b461df322 Author: Lionel Elie Mamane Date: Thu Feb 9 13:03:24 2012 +0100 ORowSetCache::moveWindow: yet another off-by-one error diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index f2301f0..be51b2a 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -909,7 +909,7 @@ sal_Bool ORowSetCache::moveWindow() // then we fill in the rows between new and old start pos. sal_Bool bCheck; -bCheck = m_pCacheSet->absolute(nNewStartPos); +bCheck = m_pCacheSet->absolute(nNewStartPos + 1); // m_nEndPos < nNewEndPos when window not filled (e.g. there are less rows in total than window size) m_nEndPos = std::min(nNewEndPos, m_nEndPos); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 3 commits - dbaccess/source svx/source
dbaccess/source/core/api/RowSetBase.cxx |2 dbaccess/source/core/api/RowSetCache.cxx | 313 --- dbaccess/source/core/api/RowSetCache.hxx | 10 svx/source/fmcomp/gridctrl.cxx |4 4 files changed, 178 insertions(+), 151 deletions(-) New commits: commit 1234d599d4ee67bd725f0513431b2d4c56c9e09d Author: Lionel Elie Mamane Date: Thu Jan 19 20:20:06 2012 +0100 ORowSetCache: overhaul internals diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 8fc264a..bcc8652 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -443,17 +443,29 @@ void ORowSetCache::setFetchSize(sal_Int32 _nSize) } if(!m_nPosition) { -sal_Int32 nNewSt = 1; -fillMatrix(nNewSt,_nSize+1); +sal_Int32 nNewSt = 0; +fillMatrix(nNewSt,_nSize); +OSL_ENSURE(nNewSt == 0, "fillMatrix set new start to unexpected value"); m_nStartPos = 0; m_nEndPos = _nSize; } -else if (m_nStartPos < m_nPosition && m_nPosition < m_nEndPos) +else if (m_nStartPos < m_nPosition && m_nPosition <= m_nEndPos) { sal_Int32 nNewSt = -1; -fillMatrix(nNewSt,_nSize+1); -m_nStartPos = 0; -m_nEndPos = _nSize; +fillMatrix(nNewSt,_nSize); +if (nNewSt >= 0) +{ +m_nStartPos = nNewSt; +m_nEndPos = nNewSt + _nSize; +m_aMatrixIter = calcPosition(); +} +} +else +{ +OSL_FAIL("m_nPosition not between m_nStartPos and m_nEndpos"); +// try to repair +moveWindow(); +m_aMatrixIter = calcPosition(); } } @@ -737,32 +749,34 @@ sal_Bool ORowSetCache::afterLast( ) sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos) { OSL_ENSURE(_nNewStartPos != _nNewEndPos,"ORowSetCache::fillMatrix: StartPos and EndPos can not be equal!"); -// fill the whole window with new data +// If _nNewStartPos >= 0, then fill the whole window with new data +// Else if _nNewStartPos == -1, then fill only segment [m_nEndPos, _nNewEndPos) +// Else, undefined (invalid argument) +OSL_ENSURE( _nNewStartPos >= -1, "ORowSetCache::fillMatrix: invalid _nNewStartPos" ); + ORowSetMatrix::iterator aIter; sal_Int32 i; sal_Bool bCheck; if ( _nNewStartPos == -1 ) { -aIter = m_pMatrix->begin() + m_nEndPos; -i = m_nEndPos+1; +aIter = m_pMatrix->begin() + (m_nEndPos - m_nStartPos); +i = m_nEndPos; } else { aIter = m_pMatrix->begin(); -i = _nNewStartPos; +i = _nNewStartPos + 1; } -bCheck = m_pCacheSet->absolute(i); // -1 no need to +bCheck = m_pCacheSet->absolute(i); -for(;i<_nNewEndPos;++i,++aIter) +for(; i <= _nNewEndPos; ++i,++aIter) { if(bCheck) { if(!aIter->is()) *aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); m_pCacheSet->fillValueRow(*aIter,i); -if(!m_bRowCountFinal) -++m_nRowCount; } else { // there are no more rows found so we can fetch some before start @@ -775,35 +789,28 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos m_nRowCount = i-1; // it can be that getRow return zero m_bRowCountFinal = sal_True; } -if(m_nRowCount > m_nFetchSize) +const ORowSetMatrix::iterator aEnd = aIter; +ORowSetMatrix::iterator aRealEnd = m_pMatrix->end(); +sal_Int32 nPos = (m_nRowCount > m_nFetchSize) ? (m_nRowCount - m_nFetchSize) : 0; +_nNewStartPos = nPos; +++nPos; +bCheck = m_pCacheSet->absolute(nPos); + +for(;bCheck && aIter != aRealEnd;++aIter) { -ORowSetMatrix::iterator aEnd = aIter; -ORowSetMatrix::iterator aRealEnd = m_pMatrix->end(); -sal_Int32 nPos = m_nRowCount - m_nFetchSize + 1; -_nNewStartPos = nPos; -bCheck = m_pCacheSet->absolute(_nNewStartPos); - -for(;bCheck && aIter != aRealEnd;++aIter) -{ -if(bCheck) -{ -if(!aIter->is()) -*aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); -m_pCacheSet->fillValueRow(*aIter,nPos++); -} -bCheck = m_pCacheSet->next(); -} -if(aIter != aEnd) -::std::rotate(m_pMatrix->begin(),aEnd,aRealEnd); +if(!aIter->is()) +*aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); +m_pCacheSet->fillValueRow(*aIter,nPos++); +
[Libreoffice-commits] .: 3 commits - dbaccess/source solenv/gbuild solenv/inc
dbaccess/source/core/dataaccess/databasecontext.cxx |5 - solenv/gbuild/CppunitTest.mk|1 - solenv/gbuild/platform/macosx.mk|3 +++ solenv/inc/settings.mk |1 - 4 files changed, 7 insertions(+), 3 deletions(-) New commits: commit 79fdb70baf70aeb492437ef85de7f02ad4234f21 Author: Stephan Bergmann Date: Mon Sep 19 21:39:46 2011 +0200 Call macosx-change-install-names on executables in gbuild, too. diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index f71c5af..e30201b 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -337,6 +337,9 @@ $(call gb_Helper_abbreviate_dirs,\ $(LIBS) \ -o $(1) \ `cat $${DYLIB_FILE}` && \ +$(if $(filter Executable,$(TARGETTYPE)), \ +$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl Executable \ +$(LAYER) $(1) &&) \ $(if $(filter Library CppunitTest,$(TARGETTYPE)),\ $(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl Library $(LAYER) $(1) && \ ln -sf $(1) $(patsubst %.dylib,%.jnilib,$(1)) &&) \ commit 966f3c0f6df43185c572c451269604095428e917 Author: Stephan Bergmann Date: Mon Sep 19 15:53:25 2011 +0200 Removed --leak-check=yes from CppUnit valgrind/memcheck calls. Can be enabled via VALGRIND_OPTS=--leak-check=yes. diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index cdfe4f0..e2010d5 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -43,7 +43,6 @@ endif ifneq ($(strip $(VALGRIND)),) gb_CppunitTest_VALGRINDTOOL := valgrind --tool=$(VALGRIND) --num-callers=50 ifeq ($(strip $(VALGRIND)),memcheck) -gb_CppunitTest_VALGRINDTOOL += --leak-check=yes G_SLICE := always-malloc export G_SLICE GLIBCXX_FORCE_NEW := 1 diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk index f395fa1..b5b7e60 100644 --- a/solenv/inc/settings.mk +++ b/solenv/inc/settings.mk @@ -1049,7 +1049,6 @@ GDBTRACE=gdb -nx --command=$(SOLARENV)/bin/gdbtrycatchtrace --args .IF "$(VALGRIND)" != "" VALGRINDTOOL=valgrind --tool=$(VALGRIND) --num-callers=50 .IF "$(VALGRIND)" == "memcheck" -VALGRINDTOOL+=--leak-check=yes G_SLICE*:=always-malloc .EXPORT : G_SLICE GLIBCXX_FORCE_NEW*:=1 commit c9b1cb5ae36b1057fb185945b52d3e45c5436bb6 Author: Stephan Bergmann Date: Mon Sep 19 15:49:25 2011 +0200 Avoid premature deletion of objects in ODatabaseContext::m_aDatabaseObjects. Access of deleted objects found with valgrind/memcheck of dbaccess/qa/unoapi. diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 22f77a7..f542d2b 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -291,7 +291,10 @@ void ODatabaseContext::disposing() ++aIter ) { -aIter->second->dispose(); +rtl::Reference< ODatabaseModelImpl > obj(aIter->second); +// make sure obj is acquired and does not delete itself from within +// dispose() +obj->dispose(); } m_aDatabaseObjects.clear(); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits