[Libreoffice-commits] core.git: 3 commits - dbaccess/source desktop/source extensions/source

2023-03-07 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/control/sqledit.cxx   |6 ++---
 dbaccess/source/ui/inc/sqledit.hxx   |3 +-
 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   18 
 desktop/source/deployment/gui/dp_gui_dialog2.hxx |4 +--
 extensions/source/bibliography/datman.cxx|   25 +--
 extensions/source/bibliography/datman.hxx|   13 ---
 extensions/source/bibliography/general.cxx   |1 
 7 files changed, 37 insertions(+), 33 deletions(-)

New commits:
commit 838036c304d474fc4c19e2fc59cadc6ba457c9ee
Author: Noel Grandin 
AuthorDate: Tue Mar 7 13:46:29 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 8 06:43:46 2023 +

osl::Mutex->std::mutex in UpdateRequiredDialog

Change-Id: Ic4161d946190f74d016dd81aca44a7623a4e2dcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148436
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 14fe03882ede..528d92fd5328 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1080,7 +1080,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleCancelBtn, 
weld::Button&, void)
 
 IMPL_LINK( UpdateRequiredDialog, startProgress, void*, _bLockInterface, void )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 bool bLockInterface = static_cast(_bLockInterface);
 
 if ( m_bStartProgress && !m_bHasProgress )
@@ -1106,7 +1106,7 @@ IMPL_LINK( UpdateRequiredDialog, startProgress, void*, 
_bLockInterface, void )
 
 void UpdateRequiredDialog::showProgress( bool _bStart )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 bool bStart = _bStart;
 
@@ -1132,7 +1132,7 @@ void UpdateRequiredDialog::updateProgress( const 
tools::Long nProgress )
 {
 if ( m_nProgress != nProgress )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 m_nProgress = nProgress;
 m_aIdle.Start();
 }
@@ -1142,7 +1142,7 @@ void UpdateRequiredDialog::updateProgress( const 
tools::Long nProgress )
 void UpdateRequiredDialog::updateProgress( const OUString ,
const uno::Reference< 
task::XAbortChannel > )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 m_xAbortChannel = xAbortChannel;
 m_sProgressText = rText;
@@ -1172,7 +1172,7 @@ void UpdateRequiredDialog::updatePackageInfo( const 
uno::Reference< deployment::
 
 IMPL_LINK_NOARG(UpdateRequiredDialog, HandleUpdateBtn, weld::Button&, void)
 {
-::osl::ClearableMutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 std::vector< uno::Reference< deployment::XPackage > > vUpdateEntries;
 sal_Int32 nCount = m_xExtensionBox->GetEntryCount();
@@ -1183,7 +1183,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleUpdateBtn, 
weld::Button&, void)
 vUpdateEntries.push_back( pEntry->m_xPackage );
 }
 
-aGuard.clear();
+aGuard.unlock();
 
 m_pManager->getCmdQueue()->checkForUpdates( std::move(vUpdateEntries) );
 }
@@ -1191,7 +1191,7 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, HandleUpdateBtn, 
weld::Button&, void)
 
 IMPL_LINK_NOARG(UpdateRequiredDialog, HandleCloseBtn, weld::Button&, void)
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( !isBusy() )
 {
@@ -1302,7 +1302,7 @@ bool UpdateRequiredDialog::checkDependencies( const 
uno::Reference< deployment::
 
 bool UpdateRequiredDialog::hasActiveEntries()
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 bool bRet = false;
 tools::Long nCount = m_xExtensionBox->GetEntryCount();
@@ -1323,7 +1323,7 @@ bool UpdateRequiredDialog::hasActiveEntries()
 
 void UpdateRequiredDialog::disableAllEntries()
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 incBusy();
 
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx 
b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 9be38f1d7571..8802997e2f20 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -25,7 +25,7 @@
 #include 
 #include 
 
-#include 
+#include 
 
 #include 
 
@@ -184,7 +184,7 @@ class UpdateRequiredDialog : public 
weld::GenericDialogController
 {
 const OUString   m_sCloseText;
 OUString m_sProgressText;
-::osl::Mutex m_aMutex;
+std::mutex   m_aMutex;
 bool m_bHasProgress;
 bool m_bProgressChanged;
 bool m_bStartProgress;
commit 474f68e38b88ca6495cb7c5cc4038100c2786063
Author: Noel Grandin 
AuthorDate: Tue Mar 7 13:48:17 2023 +0200
Commit: Noel Grandin 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source formula/source sc/source sd/inc sfx2/source svx/source sw/inc

2019-10-03 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/ConnectionPageSetup.hxx|2 
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |1 
 dbaccess/source/ui/dlg/TextConnectionHelper.hxx   |1 
 dbaccess/source/ui/dlg/adminpages.hxx |2 
 dbaccess/source/ui/dlg/advancedsettings.hxx   |3 
 dbaccess/source/ui/inc/WCPage.hxx |2 
 dbaccess/source/ui/inc/WNameMatch.hxx |2 
 formula/source/ui/dlg/ControlHelper.hxx   |2 
 sc/source/ui/dbgui/consdlg.cxx|1 
 sc/source/ui/inc/tpusrlst.hxx |3 
 sc/source/ui/optdlg/tpusrlst.cxx  |1 
 sd/inc/pch/precompiled_sd.hxx |   89 +++---
 sfx2/source/dialog/mgetempl.cxx   |1 
 svx/source/dialog/dialcontrol.cxx |1 
 sw/inc/pch/precompiled_msword.hxx |   50 +++-
 15 files changed, 32 insertions(+), 129 deletions(-)

New commits:
commit b0f2e3880cde52f06913fea55187075fb2c54bba
Author: Caolán McNamara 
AuthorDate: Wed Oct 2 19:42:35 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Oct 3 09:55:21 2019 +0200

drop some unnecessary includes

Change-Id: Ia388aef3063c99f3b0d9282f53e78edfda5ce4bb
Reviewed-on: https://gerrit.libreoffice.org/80085
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx 
b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index 5ad6b7022bed..b1333aff70f8 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -25,8 +25,6 @@
 #include 
 #include 
 
-#include 
-
 namespace dbaui
 {
 
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index b0f51a854a0f..422500e19938 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -29,7 +29,6 @@
 
 #include 
 #include 
-#include 
 
 namespace dbaui
 
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx 
b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
index 6c69b24874c8..b284f7edbc05 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
@@ -26,7 +26,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 namespace dbaui
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx 
b/dbaccess/source/ui/dlg/adminpages.hxx
index 0caab50c9636..9db03a7b1296 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -24,8 +24,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 
 class NumericField;
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx 
b/dbaccess/source/ui/dlg/advancedsettings.hxx
index 85848c716c97..8efc8642863d 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.hxx
@@ -22,9 +22,6 @@
 
 #include "adminpages.hxx"
 #include 
-
-#include 
-
 #include 
 
 namespace dbaui
diff --git a/dbaccess/source/ui/inc/WCPage.hxx 
b/dbaccess/source/ui/inc/WCPage.hxx
index e3fc5af1bc57..f89c89821800 100644
--- a/dbaccess/source/ui/inc/WCPage.hxx
+++ b/dbaccess/source/ui/inc/WCPage.hxx
@@ -23,8 +23,6 @@
 
 #include "QEnumTypes.hxx"
 #include 
-#include 
-#include 
 
 namespace dbaui
 {
diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx 
b/dbaccess/source/ui/inc/WNameMatch.hxx
index 8aa2b6befaa8..eb843569e404 100644
--- a/dbaccess/source/ui/inc/WNameMatch.hxx
+++ b/dbaccess/source/ui/inc/WNameMatch.hxx
@@ -22,8 +22,6 @@
 #include "WTabPage.hxx"
 #include "marktree.hxx"
 #include "DExport.hxx"
-#include 
-#include 
 #include "WCopyTable.hxx"
 
 namespace dbaui
diff --git a/formula/source/ui/dlg/ControlHelper.hxx 
b/formula/source/ui/dlg/ControlHelper.hxx
index fbc7e49cfda6..3fb82de8bac1 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -20,7 +20,7 @@
 #define INCLUDED_FORMULA_SOURCE_UI_DLG_CONTROLHELPER_HXX
 
 #include 
-#include 
+
 namespace formula
 {
 
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index d5a1de99c164..3cb87621353e 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -32,7 +32,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
index dd3d4cf133a4..c237da9a9fb2 100644
--- a/sc/source/ui/inc/tpusrlst.hxx
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -21,9 +21,6 @@
 #define INCLUDED_SC_SOURCE_UI_INC_TPUSRLST_HXX
 
 #include 
-#include 
-#include 
-#include 
 
 class ScUserList;
 class ScDocument;
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 8aec1aa7e1dc..652c4b2d0919 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -20,6 +20,7 @@
 #undef 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source framework/source include/com xmloff/source

2019-08-25 Thread Caolán McNamara (via logerrit)
 dbaccess/source/core/dataaccess/definitioncontainer.cxx   |1 +
 framework/source/uielement/genericstatusbarcontroller.cxx |1 +
 include/com/sun/star/uno/Sequence.hxx |   10 ++
 xmloff/source/draw/ximplink.cxx   |1 +
 4 files changed, 13 insertions(+)

New commits:
commit 3975c4e85ff34e48d953b110f947c1768b59e750
Author: Caolán McNamara 
AuthorDate: Sat Aug 24 21:31:41 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sun Aug 25 11:32:38 2019 +0200

cid#1448241 silence Explicit null deferenced false positive

Change-Id: Iaf20e2c7c6f8502d902b41f2c109589aaa490a10
Reviewed-on: https://gerrit.libreoffice.org/78075
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/framework/source/uielement/genericstatusbarcontroller.cxx 
b/framework/source/uielement/genericstatusbarcontroller.cxx
index 431069c9d2b8..ee3b28d4af75 100644
--- a/framework/source/uielement/genericstatusbarcontroller.cxx
+++ b/framework/source/uielement/genericstatusbarcontroller.cxx
@@ -55,6 +55,7 @@ GenericStatusbarController::GenericStatusbarController(
 m_xStatusbarItem = rxItem;
 if ( m_xStatusbarItem.is() )
 {
+assert(m_aCommandURL.pData);
 m_aCommandURL = m_xStatusbarItem->getCommand();
 m_nID = m_xStatusbarItem->getItemId();
 m_bOwnerDraw = ( m_xStatusbarItem->getStyle() & 
ui::ItemStyle::OWNER_DRAW ) == ui::ItemStyle::OWNER_DRAW;
diff --git a/xmloff/source/draw/ximplink.cxx b/xmloff/source/draw/ximplink.cxx
index ec43cf9d38a0..1e891ff1f167 100644
--- a/xmloff/source/draw/ximplink.cxx
+++ b/xmloff/source/draw/ximplink.cxx
@@ -38,6 +38,7 @@ SdXMLShapeLinkContext::SdXMLShapeLinkContext( SvXMLImport& 
rImport, sal_uInt16 n
 sal_uInt16 nPrefix = rImport.GetNamespaceMap().GetKeyByAttrName( 
sAttrName,  );
 if( (nPrefix == XML_NAMESPACE_XLINK) && IsXMLToken( aLocalName, 
XML_HREF ) )
 {
+assert(msHyperlink.pData);
 msHyperlink = xAttrList->getValueByIndex( i );
 break;
 }
commit be9c16ea495d0e4e5b8d90e64bb481087a7c6b13
Author: Caolán McNamara 
AuthorDate: Sat Aug 24 21:10:27 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sun Aug 25 11:32:18 2019 +0200

cid#1448427 silence bogus Explicit null dereferenced

Change-Id: I053fac8eb693ec6ed499eff33bbb77d00d05279b
Reviewed-on: https://gerrit.libreoffice.org/78073
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx 
b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 738aba7b86f7..c64b17581dc9 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -94,6 +94,7 @@ ODefinitionContainer::ODefinitionContainer(   const 
Reference< XComponentContext
 ,m_bInPropertyChange(false)
 ,m_bCheckSlash(_bCheckSlash)
 {
+assert(m_pImpl);
 m_pImpl->m_aProps.bIsDocument = false;
 m_pImpl->m_aProps.bIsFolder = true;
 
commit 51d1724c3543381a61e505e671db6a0bb5ec92de
Author: Caolán McNamara 
AuthorDate: Sat Aug 24 21:07:36 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sun Aug 25 11:31:54 2019 +0200

cid#1448292 coverity has difficulty with css::uno::Sequence

Change-Id: I227a88c566f981ace5e45d0e217a50abbc7f3023
Reviewed-on: https://gerrit.libreoffice.org/78072
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/com/sun/star/uno/Sequence.hxx 
b/include/com/sun/star/uno/Sequence.hxx
index 83ddfb9d8101..c31e43141ca3 100644
--- a/include/com/sun/star/uno/Sequence.hxx
+++ b/include/com/sun/star/uno/Sequence.hxx
@@ -73,10 +73,20 @@ inline Sequence< E >::Sequence(
 {
 }
 
+#if defined(__COVERITY__)
+extern "C" void __coverity_tainted_data_sanitize__(void *);
+#endif
+
 template< class E >
 inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len )
 {
 const Type & rType = ::cppu::getTypeFavourUnsigned( this );
+
+#if defined(__COVERITY__)
+// cid#1448292 coverity has difficulty with css::uno::Sequence
+__coverity_tainted_data_sanitize__(pElements);
+#endif
+
 bool success =
 ::uno_type_sequence_construct(
 &_pSequence, rType.getTypeLibType(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 3 commits - dbaccess/source include/svtools include/tools lingucomponent/source reportdesign/source solenv/clang-format svtools/Library_svt.mk svtools/source toolkit/so

2019-02-10 Thread Libreoffice Gerrit user
 dbaccess/source/ui/dlg/admincontrols.cxx |  132 +--
 dbaccess/source/ui/dlg/admincontrols.hxx |6 
 dbaccess/source/ui/dlg/advancedsettings.hxx  |2 
 dbaccess/source/ui/dlg/detailpages.hxx   |1 
 dbaccess/source/ui/dlg/generalpage.cxx   |   30 +
 dbaccess/source/ui/dlg/generalpage.hxx   |4 
 include/svtools/dialogcontrolling.hxx|  265 ---
 include/tools/solar.h|   41 +-
 lingucomponent/source/languageguessing/simpleguesser.cxx |2 
 lingucomponent/source/spellcheck/spell/sspellimp.cxx |4 
 lingucomponent/source/thesaurus/libnth/nthesdta.cxx  |2 
 reportdesign/source/ui/inc/DateTime.hxx  |2 
 solenv/clang-format/blacklist|2 
 svtools/Library_svt.mk   |1 
 svtools/source/misc/dialogcontrolling.cxx|  192 --
 toolkit/source/awt/vclxgraphics.cxx  |2 
 toolkit/source/awt/vclxmenu.cxx  |2 
 toolkit/source/awt/vclxtoolkit.cxx   |2 
 toolkit/source/awt/vclxwindows.cxx   |   14 
 toolkit/source/controls/controlmodelcontainerbase.cxx|2 
 toolkit/source/controls/dialogcontrol.cxx|6 
 toolkit/source/controls/geometrycontrolmodel.cxx |2 
 toolkit/source/controls/roadmapcontrol.cxx   |   16 
 toolkit/source/controls/stdtabcontroller.cxx |2 
 toolkit/source/controls/tabpagemodel.cxx |2 
 toolkit/source/controls/unocontrolmodel.cxx  |4 
 toolkit/source/controls/unocontrols.cxx  |   10 
 tools/source/datetime/ttime.cxx  |4 
 tools/source/fsys/urlobj.cxx |2 
 ucb/source/cacher/cachedcontentresultset.cxx |2 
 ucb/source/cacher/dynamicresultsetwrapper.cxx|2 
 ucb/source/core/ucb.cxx  |2 
 ucb/source/core/ucbcmds.cxx  |   10 
 ucb/source/sorter/sortresult.cxx |   20 -
 ucb/source/ucp/ext/ucpext_content.cxx|2 
 ucb/source/ucp/file/filglob.cxx  |2 
 ucb/source/ucp/ftp/ftpcontent.cxx|2 
 ucb/source/ucp/gio/gio_content.cxx   |   38 +-
 ucb/source/ucp/webdav-neon/ContentProperties.cxx |   13 
 ucb/source/ucp/webdav-neon/NeonSession.cxx   |   26 -
 ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx  |2 
 ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx|2 
 ucbhelper/source/client/content.cxx  |4 
 43 files changed, 177 insertions(+), 706 deletions(-)

New commits:
commit 30e99b793fc26d2c86363bf8c023cdd2c05940b1
Author: Noel Grandin 
AuthorDate: Sun Feb 10 12:28:24 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 11 07:00:53 2019 +0100

loplugin:indentation in ucb..ucbhelper

Change-Id: Ifa4b34065dacf9e144f076631c57f1d01aedaeeb
Reviewed-on: https://gerrit.libreoffice.org/67608
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/ucb/source/cacher/cachedcontentresultset.cxx 
b/ucb/source/cacher/cachedcontentresultset.cxx
index 93db8c575688..c9592879397f 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -1492,7 +1492,7 @@ sal_Bool SAL_CALL CachedContentResultSet
 return true;
 
 sal_Int32 nNewRow = m_nRow + rows;
-if( nNewRow < 0 )
+if( nNewRow < 0 )
 nNewRow = 0;
 
 if( impl_isKnownValidPosition( nNewRow ) )
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx 
b/ucb/source/cacher/dynamicresultsetwrapper.cxx
index c7aa27949429..fc6d0dbf90de 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.cxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx
@@ -240,7 +240,7 @@ void DynamicResultSetWrapper::impl_notify( const ListEvent& 
Changes )
 aWelcome.Old = m_xMyResultOne;
 aWelcome.New = m_xMyResultTwo;
 
- rAction.ActionInfo <<= aWelcome;
+rAction.ActionInfo <<= aWelcome;
 }
 else
 {
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 6b3cf12a8f3b..24687458cf64 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -303,7 +303,7 @@ void SAL_CALL UniversalContentBroker::dispose()
 m_pDisposeEventListeners->disposeAndClear( aEvt );
 }
 
- if ( m_xNotifier.is() )
+if ( m_xNotifier.is() )
 m_xNotifier->removeChangesListener( this );
 }
 
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source sc/source sw/source

2018-01-17 Thread Caolán McNamara
 dbaccess/source/ui/tabledesign/TableUndo.cxx |5 ++---
 sc/source/ui/view/tabvwsha.cxx   |2 ++
 sw/source/filter/xml/xmlmeta.cxx |   14 ++
 3 files changed, 14 insertions(+), 7 deletions(-)

New commits:
commit c1d54f0455fed02c4874a00c8ad23d8ac5bbed09
Author: Caolán McNamara 
Date:   Wed Jan 17 13:59:53 2018 +

coverity#1427632 try silencing Using invalid iterator

Change-Id: I74387fd761f170d61e490418f856bfffd5dd8401

diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx 
b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index d11d53f48ad1..c39f0f264a42 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -203,13 +203,12 @@ void OTableEditorDelUndoAct::Undo()
 void OTableEditorDelUndoAct::Redo()
 {
 // delete line again
-sal_uLong nPos;
 std::vector< std::shared_ptr >* pOriginalRows = 
pTabEdCtrl->GetRowList();
 
 for (auto const& deletedRow : m_aDeletedRows)
 {
-nPos = deletedRow->GetPos();
-pOriginalRows->erase( pOriginalRows->begin()+nPos );
+auto it = pOriginalRows->begin() + deletedRow->GetPos();
+pOriginalRows->erase(it);
 }
 
 pTabEdCtrl->DisplayData(pTabEdCtrl->GetCurRow());
commit 61a7c6c405d8578fc2508196d9b7e85de44bd6ed
Author: Caolán McNamara 
Date:   Wed Jan 17 13:48:49 2018 +

coverity#1427628 Dereference before null check

Change-Id: Ic68d765cc21733ba864b78c135eaae4ec673e7c1

diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index d14e7cade7d4..e391c28ffeda 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -551,6 +551,8 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, 
const OString 
 {
 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
 
+assert(pOutSet);
+
 const SfxPoolItem* pItem=nullptr;
 
if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,true,)==SfxItemState::SET)
 {
commit 49f05934edd3723666b7c52eccbf4d0c9a688eb7
Author: Caolán McNamara 
Date:   Wed Jan 17 13:37:44 2018 +

coverity#1427629 Unchecked return value

Change-Id: If12d57826817d5ca866ecc14d81b21f494ff4487

diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index 0cc6a161197b..c85fff068057 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -145,11 +145,17 @@ void SwXMLImport::SetStatistics(
 // use #pages*10, or guesstimate 250 paragraphs. Additionally
 // guesstimate PROGRESS_BAR_STEPS each for meta+settings, styles,
 // and autostyles.
-sal_Int32 nProgressReference = 250;
-if( nTokens & XML_TOK_META_STAT_PARA )
+bool bSetFallback = true;
+sal_Int32 nProgressReference;
+if (nTokens & XML_TOK_META_STAT_PARA)
+{
 nProgressReference = static_cast(aDocStat.nPara);
-else if ( nTokens & XML_TOK_META_STAT_PAGE )
-o3tl::checked_multiply(aDocStat.nPage, 10, 
nProgressReference);
+bSetFallback = false;
+}
+else if (nTokens & XML_TOK_META_STAT_PAGE)
+bSetFallback = o3tl::checked_multiply(aDocStat.nPage, 10, 
nProgressReference);
+if (bSetFallback)
+nProgressReference = 250;
 ProgressBarHelper* pProgress = GetProgressBarHelper();
 pProgress->SetReference( nProgressReference + 3*PROGRESS_BAR_STEP );
 pProgress->SetValue( 0 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - dbaccess/source distro-configs/LibreOfficeOssFuzz.conf fpicker/source

2016-12-05 Thread Caolán McNamara
 dbaccess/source/ui/inc/dbu_resource.hrc |2 -
 dbaccess/source/ui/misc/WTypeSelect.cxx |6 -
 dbaccess/source/ui/querydesign/QTableWindow.cxx |1 
 dbaccess/source/ui/querydesign/Query.hrc|   27 
 dbaccess/source/ui/querydesign/TableWindow.cxx  |6 +
 dbaccess/source/ui/querydesign/query.src|9 +---
 distro-configs/LibreOfficeOssFuzz.conf  |2 +
 fpicker/source/office/iodlg.hrc |1 
 fpicker/source/office/iodlg.src |3 --
 9 files changed, 9 insertions(+), 48 deletions(-)

New commits:
commit b0e7282bdd918d35fad6e5677ebe8f01ca4a78af
Author: Caolán McNamara 
Date:   Mon Dec 5 21:22:18 2016 +

IMG_FILEDLG_BTN_STD is unused

Change-Id: Id41d43ec74575ba0edc59f87ffa8b6c9b1485010

diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc
index d6c605d..9653e08 100644
--- a/fpicker/source/office/iodlg.hrc
+++ b/fpicker/source/office/iodlg.hrc
@@ -24,7 +24,6 @@
 #include 
 
 #define IMG_FILEDLG_BTN_UP  10
-#define IMG_FILEDLG_BTN_STD 11
 #define IMG_FILEDLG_CREATEFOLDER14
 #define IMG_FILEDLG_PLACE_LOCAL 15
 #define IMG_FILEDLG_PLACE_REMOTE16
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
index fa1aa84..f017c4b 100644
--- a/fpicker/source/office/iodlg.src
+++ b/fpicker/source/office/iodlg.src
@@ -30,14 +30,13 @@ ImageList RID_FILEPICKER_IMAGES
 IdList =
 {
 IMG_FILEDLG_BTN_UP;
-IMG_FILEDLG_BTN_STD;
 IMG_FILEDLG_CREATEFOLDER;
 IMG_FILEDLG_PLACE_LOCAL;
 IMG_FILEDLG_PLACE_REMOTE;
 };
 IdCount =
 {
-5;
+4;
 };
 };
 
commit 9ab9a15c06cb5246471dea41d5c9f24e819bdf50
Author: Caolán McNamara 
Date:   Mon Dec 5 21:14:33 2016 +

only IMG_PRIMARY_KEY is actually used

Change-Id: Ie888ed93f0d511e0c040af32f41e8350113b586c

diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc 
b/dbaccess/source/ui/inc/dbu_resource.hrc
index 4c6cd08..386a401 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -105,6 +105,7 @@
 #define QUERYFOLDER_TREE_ICON   RID_IMAGE_START +  6
 #define QUERY_TREE_ICON RID_IMAGE_START +  7
 #define DATABASE_TREE_ICON  RID_IMAGE_START +  8
+#define BMP_PRIMARY_KEY RID_IMAGE_START +  9
 // free
 #define IMG_PKEYICONRID_IMAGE_START + 12
 // free
@@ -121,7 +122,6 @@
 #define FORMFOLDER_TREE_ICONRID_IMAGE_START + 55
 
 // image lists
-#define IMG_JOINS   RID_IMAGELIST_START +  0
 #define IMG_INDEX_DLG_SCRID_IMAGELIST_START +  1
 #define IMG_INDEX_DLG_LCRID_IMAGELIST_START +  3
 
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx 
b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 49ae18c..e7a6e3f 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -216,7 +216,6 @@ OUString OWizTypeSelectControl::getAutoIncrementValue() 
const
 return 
static_cast(m_pParentTabPage.get())->m_sAutoIncrementValue;
 }
 
-#define IMG_PRIMARY_KEY 1
 OWizTypeSelect::OWizTypeSelect( vcl::Window* pParent, SvStream* _pStream )
:OWizardPage( pParent, "TypeSelect", 
"dbaccess/ui/typeselectpage.ui")

,m_pTypeControl(VclPtr::Create(get("control_container"),
 this) )
@@ -235,10 +234,7 @@ OWizTypeSelect::OWizTypeSelect( vcl::Window* pParent, 
SvStream* _pStream )
 
 m_pColumnNames->SetSelectHdl(LINK(this,OWizTypeSelect,ColumnSelectHdl));
 
-ModuleRes aModuleRes(IMG_JOINS);
-ImageList aImageList(aModuleRes);
-m_imgPKey = aImageList.GetImage(IMG_PRIMARY_KEY);
-
+m_imgPKey = Image(BitmapEx(ModuleRes(BMP_PRIMARY_KEY)));
 
 m_pTypeControl->Show();
 m_pTypeControl->Init();
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx 
b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index 6f5ae57..c56735f 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx
@@ -28,7 +28,6 @@
 #include 
 #include "TableWindowListBox.hxx"
 #include "dbu_qry.hrc"
-#include "Query.hrc"
 #include 
 #include 
 #include 
diff --git a/dbaccess/source/ui/querydesign/Query.hrc 
b/dbaccess/source/ui/querydesign/Query.hrc
deleted file mode 100644
index 75e2c02..000
--- a/dbaccess/source/ui/querydesign/Query.hrc
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbapp.mk officecfg/registry

2016-10-30 Thread Maxim Monastirsky
 dbaccess/UIConfig_dbapp.mk   |1 
 dbaccess/source/ui/app/AppController.cxx |7 
 dbaccess/source/ui/app/AppController.hxx |1 
 dbaccess/source/ui/app/app.src   |  130 
--
 dbaccess/source/ui/browser/unodatbr.cxx  |5 
 dbaccess/source/ui/control/dbtreelistbox.cxx |   69 
-
 dbaccess/source/ui/inc/callbacks.hxx |8 
 dbaccess/source/ui/inc/dbtreelistbox.hxx |6 
 dbaccess/source/ui/inc/dbu_resource.hrc  |1 
 dbaccess/source/ui/inc/unodatbr.hxx  |1 
 dbaccess/uiconfig/dbapp/popupmenu/edit.xml   |   34 ++
 officecfg/registry/data/org/openoffice/Office/UI/BaseWindowState.xcu |5 
 officecfg/registry/data/org/openoffice/Office/UI/DbuCommands.xcu |8 
 13 files changed, 129 insertions(+), 147 deletions(-)

New commits:
commit 17b1ebbf86ceabe2e9cabf9626ca94fae3fb9216
Author: Maxim Monastirsky 
Date:   Sun Oct 30 19:28:52 2016 +0200

Allow using xml menus in DBTreeListBox

Change-Id: I8dfab0ae5d64b416123ab5690b43cf2db77d92dc

diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx 
b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 6c0562a..2f6e2c7 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -30,10 +30,13 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include "svtools/treelistentry.hxx"
@@ -83,6 +86,7 @@ void DBTreeListBox::init()
 
 DBTreeListBox::~DBTreeListBox()
 {
+assert(!m_xMenuController.is());
 disposeOnce();
 }
 
@@ -555,12 +559,41 @@ VclPtr DBTreeListBox::CreateContextMenu()
 if ( !m_pContextMenuProvider )
 return pContextMenu;
 
-// the basic context menu
-pContextMenu.reset( m_pContextMenuProvider->getContextMenu( *this ) );
-// disable what is not available currently
-lcl_enableEntries( pContextMenu.get(), 
m_pContextMenuProvider->getCommandController() );
-// set images
-lcl_insertMenuItemImages( *pContextMenu, 
m_pContextMenuProvider->getCommandController() );
+OUString aResourceName( 
m_pContextMenuProvider->getContextMenuResourceName( *this ) );
+OUString aMenuIdentifier;
+
+if ( aResourceName.isEmpty() )
+{
+// the basic context menu
+pContextMenu.reset( m_pContextMenuProvider->getContextMenu( *this ) );
+// disable what is not available currently
+lcl_enableEntries( pContextMenu.get(), 
m_pContextMenuProvider->getCommandController() );
+// set images
+lcl_insertMenuItemImages( *pContextMenu, 
m_pContextMenuProvider->getCommandController() );
+}
+else
+{
+css::uno::Sequence< css::uno::Any > aArgs( 3 );
+aArgs[0] <<= comphelper::makePropertyValue( "Value", aResourceName );
+aArgs[1] <<= comphelper::makePropertyValue( "Frame", 
m_pContextMenuProvider->getCommandController().getXController()->getFrame() );
+aArgs[2] <<= comphelper::makePropertyValue( "IsContextMenu", true );
+
+css::uno::Reference< css::uno::XComponentContext > xContext = 
comphelper::getProcessComponentContext();
+m_xMenuController.set( 
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+"com.sun.star.comp.framework.ResourceMenuController", aArgs, 
xContext ), css::uno::UNO_QUERY );
+
+css::uno::Reference< css::awt::XPopupMenu > xPopupMenu( 
xContext->getServiceManager()->createInstanceWithContext(
+"com.sun.star.awt.PopupMenu", xContext ), css::uno::UNO_QUERY );
+
+if ( !m_xMenuController.is() || !xPopupMenu.is() )
+return pContextMenu;
+
+m_xMenuController->setPopupMenu( xPopupMenu );
+pContextMenu.reset( static_cast< PopupMenu* >( 
VCLXMenu::GetImplementation( xPopupMenu )->GetMenu() ) );
+pContextMenu->AddEventListener( LINK( this, DBTreeListBox, 
MenuEventListener ) );
+aMenuIdentifier = "private:resource/popupmenu/" + aResourceName;
+}
+
 // allow context menu interception
 ::comphelper::OInterfaceContainerHelper2* pInterceptors = 
m_pContextMenuProvider->getContextMenuInterceptors();
 if ( !pInterceptors || !pInterceptors->getLength() )
@@ -571,7 +604,7 @@ VclPtr DBTreeListBox::CreateContextMenu()
 aEvent.ExecutePosition.X = -1;
 aEvent.ExecutePosition.Y = -1;
 aEvent.ActionTriggerContainer = 
::framework::ActionTriggerHelper::CreateActionTriggerContainerFromMenu(
-pContextMenu.get(), nullptr );
+pContextMenu.get(),  );
 aEvent.Selection = new SelectionSupplier( 
m_pContextMenuProvider->getCurrentSelection( *this ) );
 
 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source filter/source include/svtools include/tools include/vcl offapi/com slideshow/source toolkit/source vcl/android vcl/ios vcl/osx vcl/source vc

2016-10-05 Thread Caolán McNamara
 dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx |2 -
 filter/source/msfilter/msdffimp.cxx  |2 -
 include/svtools/ivctrl.hxx   |2 -
 include/tools/wintypes.hxx   |1 
 include/vcl/settings.hxx |6 ---
 offapi/com/sun/star/awt/XStyleSettings.idl   |6 ---
 slideshow/source/engine/rehearsetimingsactivity.cxx  |2 -
 toolkit/source/awt/stylesettings.cxx |   28 ---
 toolkit/source/awt/stylesettings.hxx |4 --
 vcl/android/androidinst.cxx  |1 
 vcl/ios/iosinst.cxx  |1 
 vcl/osx/salframe.cxx |1 
 vcl/source/app/settings.cxx  |   34 ---
 vcl/source/control/fixed.cxx |6 +--
 vcl/source/window/dialog.cxx |2 -
 vcl/source/window/settings.cxx   |3 -
 vcl/unx/gtk/salnativewidgets-gtk.cxx |2 -
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx|2 -
 vcl/unx/kde/salnativewidgets-kde.cxx |2 -
 vcl/unx/kde4/KDESalFrame.cxx |2 -
 vcl/win/window/salframe.cxx  |2 -
 21 files changed, 8 insertions(+), 103 deletions(-)

New commits:
commit 2e595954230b3a9ef555b2671699902c68532bdf
Author: Caolán McNamara 
Date:   Wed Oct 5 16:27:56 2016 +0100

[API CHANGE] Remove css::awt::XStyleSettings InfoTextColor and InfoFont

Change-Id: I2bee3f52a751ac1ed2b61a1488d6d58c1b36dcba

diff --git a/offapi/com/sun/star/awt/XStyleSettings.idl 
b/offapi/com/sun/star/awt/XStyleSettings.idl
index f9f6d93..47a55d6 100644
--- a/offapi/com/sun/star/awt/XStyleSettings.idl
+++ b/offapi/com/sun/star/awt/XStyleSettings.idl
@@ -121,9 +121,6 @@ interface XStyleSettings
 /// specifies the color of inactive tabs of a tab control
 [attribute] ::com::sun::star::util::Color InactiveTabColor;
 
-/// specifies the text color of dialog elements displaying some info text
-[attribute] ::com::sun::star::util::Color InfoTextColor;
-
 /// specifies the text color of label elements in dialogs
 [attribute] ::com::sun::star::util::Color LabelTextColor;
 
@@ -200,9 +197,6 @@ interface XStyleSettings
 /// specifies the font for label controls
 [attribute] FontDescriptor  LabelFont;
 
-/// specifies the font of dialog elements displaying some info text
-[attribute] FontDescriptor  InfoFont;
-
 /// specifies the font of radio buttons and check boxes
 [attribute] FontDescriptor  RadioCheckFont;
 
diff --git a/toolkit/source/awt/stylesettings.cxx 
b/toolkit/source/awt/stylesettings.cxx
index 833dd69..8eb7fbc 100644
--- a/toolkit/source/awt/stylesettings.cxx
+++ b/toolkit/source/awt/stylesettings.cxx
@@ -518,17 +518,6 @@ namespace toolkit
 }
 
 
-::sal_Int32 SAL_CALL WindowStyleSettings::getInfoTextColor() throw 
(RuntimeException, std::exception)
-{
-return getLabelTextColor();
-}
-
-
-void SAL_CALL WindowStyleSettings::setInfoTextColor( ::sal_Int32 
/*_infotextcolor*/ ) throw (RuntimeException, std::exception)
-{
-}
-
-
 ::sal_Int32 SAL_CALL WindowStyleSettings::getLabelTextColor() throw 
(RuntimeException, std::exception)
 {
 StyleMethodGuard aGuard( *m_pData );
@@ -883,17 +872,6 @@ namespace toolkit
 }
 
 
-FontDescriptor SAL_CALL WindowStyleSettings::getInfoFont() throw 
(RuntimeException, std::exception)
-{
-return getLabelFont();
-}
-
-
-void SAL_CALL WindowStyleSettings::setInfoFont( const FontDescriptor& 
/*_infofont*/ ) throw (RuntimeException, std::exception)
-{
-}
-
-
 FontDescriptor SAL_CALL WindowStyleSettings::getRadioCheckFont() throw 
(RuntimeException, std::exception)
 {
 StyleMethodGuard aGuard( *m_pData );
diff --git a/toolkit/source/awt/stylesettings.hxx 
b/toolkit/source/awt/stylesettings.hxx
index e0ada10..7809dc2 100644
--- a/toolkit/source/awt/stylesettings.hxx
+++ b/toolkit/source/awt/stylesettings.hxx
@@ -101,8 +101,6 @@ namespace toolkit
 virtual void SAL_CALL setHighlightTextColor( ::sal_Int32 
_highlighttextcolor ) throw (css::uno::RuntimeException, std::exception) 
override;
 virtual ::sal_Int32 SAL_CALL getInactiveTabColor() throw 
(css::uno::RuntimeException, std::exception) override;
 virtual void SAL_CALL setInactiveTabColor( ::sal_Int32 
_inactivetabcolor ) throw (css::uno::RuntimeException, std::exception) override;
-virtual ::sal_Int32 SAL_CALL getInfoTextColor() throw 
(css::uno::RuntimeException, std::exception) override;
-virtual void SAL_CALL setInfoTextColor( ::sal_Int32 _infotextcolor ) 
throw (css::uno::RuntimeException, std::exception) override;
 virtual ::sal_Int32 SAL_CALL getLabelTextColor() throw 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source starmath/source sw/source

2016-06-02 Thread Caolán McNamara
 dbaccess/source/ui/dlg/dbwiz.cxx |4 +-
 starmath/source/cursor.cxx   |   75 ---
 sw/source/core/doc/tblafmt.cxx   |2 -
 3 files changed, 42 insertions(+), 39 deletions(-)

New commits:
commit 31038459b576b5ef53c3ccadb1e2aee0e61d20ff
Author: Caolán McNamara 
Date:   Thu Jun 2 15:22:05 2016 +0100

coverity#1362478 Explicit null dereferenced

and

coverity#1362479, coverity#1362480, coverity#1362481,
coverity#1362482, coverity#1362483, coverity#1362485

Change-Id: Ia3a32b69bcbe5ac3e7cc50dacfa02e8bf1aab787

diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 617e100..3baf5e1 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -16,53 +16,56 @@
 
 void SmCursor::Move(OutputDevice* pDev, SmMovementDirection direction, bool 
bMoveAnchor){
 SmCaretPosGraphEntry* NewPos = nullptr;
-switch(direction){
+switch(direction)
+{
 case MoveLeft:
-{
-NewPos = mpPosition->Left;
+if (mpPosition)
+NewPos = mpPosition->Left;
 OSL_ENSURE(NewPos, "NewPos shouldn't be NULL here!");
-}break;
+break;
 case MoveRight:
-{
-NewPos = mpPosition->Right;
+if (mpPosition)
+NewPos = mpPosition->Right;
 OSL_ENSURE(NewPos, "NewPos shouldn't be NULL here!");
-}break;
+break;
 case MoveUp:
 //Implementation is practically identical to MoveDown, except for 
a single if statement
 //so I've implemented them together and added a direction == 
MoveDown to the if statements.
 case MoveDown:
-{
-SmCaretLine from_line = SmCaretPos2LineVisitor(pDev, 
mpPosition->CaretPos).GetResult(),
-best_line,  //Best approximated line found so far
-curr_line;  //Current line
-long dbp_sq = 0;//Distance squared to best line
-for(auto  : *mpGraph)
+if (mpPosition)
 {
-//Reject it if it's the current position
-if(pEntry->CaretPos == mpPosition->CaretPos) continue;
-//Compute caret line
-curr_line = SmCaretPos2LineVisitor(pDev, 
pEntry->CaretPos).GetResult();
-//Reject anything above if we're moving down
-if(curr_line.GetTop() <= from_line.GetTop() && direction == 
MoveDown) continue;
-//Reject anything below if we're moving up
-if(curr_line.GetTop() + curr_line.GetHeight() >= 
from_line.GetTop() + from_line.GetHeight()
-&& direction == MoveUp) continue;
-//Compare if it to what we have, if we have anything yet
-if(NewPos){
-//Compute distance to current line squared, multiplied 
with a horizontal factor
-long dp_sq = curr_line.SquaredDistanceX(from_line) * 
HORIZONTICAL_DISTANCE_FACTOR +
- curr_line.SquaredDistanceY(from_line);
-//Discard current line if best line is closer
-if(dbp_sq <= dp_sq) continue;
+SmCaretLine from_line = SmCaretPos2LineVisitor(pDev, 
mpPosition->CaretPos).GetResult(),
+best_line,  //Best approximated line found so far
+curr_line;  //Current line
+long dbp_sq = 0;//Distance squared to best line
+for(auto  : *mpGraph)
+{
+//Reject it if it's the current position
+if(pEntry->CaretPos == mpPosition->CaretPos) continue;
+//Compute caret line
+curr_line = SmCaretPos2LineVisitor(pDev, 
pEntry->CaretPos).GetResult();
+//Reject anything above if we're moving down
+if(curr_line.GetTop() <= from_line.GetTop() && direction 
== MoveDown) continue;
+//Reject anything below if we're moving up
+if(curr_line.GetTop() + curr_line.GetHeight() >= 
from_line.GetTop() + from_line.GetHeight()
+&& direction == MoveUp) continue;
+//Compare if it to what we have, if we have anything yet
+if(NewPos){
+//Compute distance to current line squared, multiplied 
with a horizontal factor
+long dp_sq = curr_line.SquaredDistanceX(from_line) * 
HORIZONTICAL_DISTANCE_FACTOR +
+ curr_line.SquaredDistanceY(from_line);
+//Discard current line if best line is closer
+if(dbp_sq <= dp_sq) continue;
+}
+//Take current line as the best
+best_line = curr_line;
+  

[Libreoffice-commits] core.git: 3 commits - dbaccess/source editeng/source include/editeng include/sfx2 include/sot include/store include/svl include/svx sc/source sfx2/source sot/source svl/source sv

2016-01-12 Thread Noel Grandin
 dbaccess/source/core/dataaccess/ModelImpl.cxx |3 -
 dbaccess/source/core/dataaccess/ModelImpl.hxx |2 -
 editeng/source/items/frmitems.cxx |   21 +++---
 editeng/source/items/textitem.cxx |9 +---
 include/editeng/boxitem.hxx   |4 +-
 include/editeng/fhgtitem.hxx  |2 -
 include/editeng/fwdtitem.hxx  |2 -
 include/editeng/kernitem.hxx  |2 -
 include/editeng/lineitem.hxx  |2 -
 include/editeng/lrspitem.hxx  |2 -
 include/editeng/shaditem.hxx  |2 -
 include/editeng/sizeitem.hxx  |2 -
 include/editeng/ulspitem.hxx  |2 -
 include/sfx2/app.hxx  |6 +--
 include/sfx2/docfile.hxx  |   10 ++---
 include/sfx2/docmacromode.hxx |2 -
 include/sfx2/ipclient.hxx |2 -
 include/sfx2/linkmgr.hxx  |4 +-
 include/sfx2/lnkbase.hxx  |2 -
 include/sfx2/mnumgr.hxx   |4 +-
 include/sfx2/objsh.hxx|4 +-
 include/sfx2/printer.hxx  |2 -
 include/sfx2/shell.hxx|2 -
 include/sfx2/sidebar/FocusManager.hxx |4 +-
 include/sfx2/styfitem.hxx |5 --
 include/sfx2/tbxctrl.hxx  |2 -
 include/sfx2/templateabstractview.hxx |   15 ---
 include/sfx2/viewfrm.hxx  |4 +-
 include/sfx2/viewsh.hxx   |2 -
 include/sot/stg.hxx   |   12 +++---
 include/sot/storage.hxx   |2 -
 include/store/store.hxx   |   14 ---
 include/svl/filerec.hxx   |   25 -
 include/svl/itemset.hxx   |4 +-
 include/svl/macitem.hxx   |4 +-
 include/svl/metitem.hxx   |2 -
 include/svl/nranges.hxx   |2 -
 include/svl/ondemand.hxx  |5 --
 include/svl/ownlist.hxx   |6 +--
 include/svl/poolitem.hxx  |2 -
 include/svl/style.hxx |2 -
 include/svl/zforlist.hxx  |3 -
 include/svl/zformat.hxx   |2 -
 include/svx/sdmetitm.hxx  |2 -
 include/svx/sdtaaitm.hxx  |2 -
 include/svx/xflhtit.hxx   |2 -
 include/svx/xlndsit.hxx   |2 -
 sc/source/ui/docshell/docsh.cxx   |6 ---
 sc/source/ui/inc/docsh.hxx|2 -
 sfx2/source/appl/appbas.cxx   |3 -
 sfx2/source/appl/appcfg.cxx   |4 --
 sfx2/source/appl/appinit.cxx  |6 +--
 sfx2/source/appl/linkmgr2.cxx |   12 +++---
 sfx2/source/appl/lnkbase2.cxx |4 --
 sfx2/source/control/shell.cxx |5 +-
 sfx2/source/control/templateabstractview.cxx  |7 ---
 sfx2/source/dialog/styfitem.cxx   |   50 ++
 sfx2/source/doc/docfile.cxx   |   28 --
 sfx2/source/doc/objmisc.cxx   |5 --
 sfx2/source/doc/objstor.cxx   |3 -
 sfx2/source/doc/objxtor.cxx   |3 -
 sfx2/source/doc/sfxbasemodel.cxx  |2 -
 sfx2/source/inc/objshimp.hxx  |2 -
 sfx2/source/menu/mnumgr.cxx   |5 +-
 sfx2/source/sidebar/FocusManager.cxx  |   18 -
 sfx2/source/toolbox/tbxitem.cxx   |4 --
 sfx2/source/view/ipclient.cxx |5 --
 sfx2/source/view/printer.cxx  |4 +-
 sfx2/source/view/viewfrm.cxx  |   10 +
 sfx2/source/view/viewprn.cxx  |3 -
 sfx2/source/view/viewsh.cxx   |2 -
 sot/source/sdstor/stg.cxx |   11 ++---
 sot/source/sdstor/storage.cxx |3 -
 sot/source/sdstor/ucbstorage.cxx  |   14 ++-
 svl/source/items/intitem.cxx  |3 -
 svl/source/items/itemset.cxx  |8 +---
 svl/source/items/macitem.cxx  |9 +---
 svl/source/items/poolitem.cxx |3 -
 svl/source/items/style.cxx|3 -
 svl/source/misc/ownlist.cxx   |   19 ++---
 svl/source/numbers/zforlist.cxx   |5 +-
 svl/source/numbers/zformat.cxx|5 +-
 svx/source/svdraw/svdattr.cxx |8 +---
 svx/source/xoutdev/xattr.cxx  |6 +--
 sw/inc/docsh.hxx  |2 -
 sw/source/uibase/app/docsh.cxx|   10 +
 86 files changed, 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source sw/uiconfig vcl/inc vcl/unx

2015-06-22 Thread Caolán McNamara
 dbaccess/source/core/api/BookmarkSet.hxx|2 
 dbaccess/source/core/api/CacheSet.hxx   |2 
 dbaccess/source/core/api/FilteredContainer.cxx  |4 
 dbaccess/source/core/api/OptimisticSet.cxx  |4 
 dbaccess/source/core/api/PrivateRow.hxx |2 
 dbaccess/source/core/api/RowSet.hxx |2 
 dbaccess/source/core/api/RowSetBase.hxx |2 
 dbaccess/source/core/api/RowSetRow.hxx  |4 
 dbaccess/source/core/api/StaticSet.hxx  |2 
 dbaccess/source/core/api/WrappedResultSet.hxx   |2 
 dbaccess/source/core/api/query.hxx  |2 
 dbaccess/source/core/api/querydescriptor.hxx|2 
 dbaccess/source/core/dataaccess/ComponentDefinition.cxx |2 
 dbaccess/source/core/dataaccess/ModelImpl.cxx   |2 
 dbaccess/source/core/dataaccess/ModelImpl.hxx   |8 
 sw/uiconfig/swriter/ui/inserttable.ui   |7 
 vcl/inc/unx/gtk/gtkgdi.hxx  |4 
 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx   |  150 +++-
 18 files changed, 100 insertions(+), 103 deletions(-)

New commits:
commit 3cb7db75ace1f69d0e03685a8959714424366f13
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jun 22 12:44:04 2015 +0100

gtk3: native render the comically oversized gtk3 spinbuttons

Change-Id: I3e97200d59a97271617a6e9a88c807a07a33edfe

diff --git a/dbaccess/source/core/api/StaticSet.hxx 
b/dbaccess/source/core/api/StaticSet.hxx
index c8b9d4b..1a07d79 100644
--- a/dbaccess/source/core/api/StaticSet.hxx
+++ b/dbaccess/source/core/api/StaticSet.hxx
@@ -34,7 +34,7 @@ namespace dbaccess
 bool fetchRow();
 void fillAllRows();
 public:
-OStaticSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
+explicit OStaticSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
 , m_aSetIter(m_aSet.end())
 , m_bEnd(false)
 {
diff --git a/dbaccess/source/core/api/WrappedResultSet.hxx 
b/dbaccess/source/core/api/WrappedResultSet.hxx
index 1c77944..870cfe6 100644
--- a/dbaccess/source/core/api/WrappedResultSet.hxx
+++ b/dbaccess/source/core/api/WrappedResultSet.hxx
@@ -35,7 +35,7 @@ namespace dbaccess
 
 void updateColumn(sal_Int32 nPos,::com::sun::star::uno::Reference 
::com::sun::star::sdbc::XRowUpdate  _xParameter,const 
connectivity::ORowSetValue _rValue);
 public:
-WrappedResultSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
+explicit WrappedResultSet(sal_Int32 i_nMaxRows) : OCacheSet(i_nMaxRows)
 {}
 virtual ~WrappedResultSet()
 {
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index 9b130ab..0d02188 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -101,13 +101,13 @@ private:
 ControlType nType,
 ControlPart nPart,
 const ImplControlValue aValue );
-static void PaintOneSpinButton( GtkStyleContext *context,
+   void PaintOneSpinButton( GtkStyleContext *context,
  cairo_t *cr,
  ControlType nType,
  ControlPart nPart,
  Rectangle aAreaRect,
  ControlState nState );
-static void PaintSpinButton(GtkStyleContext *context,
+   void PaintSpinButton(GtkStyleContext *context,
  cairo_t *cr,
  const Rectangle rControlRectangle,
  ControlType nType,
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index cacf348..a0afcd6 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -57,7 +57,9 @@ static void NWConvertVCLStateToGTKState( ControlState 
nVCLState,
 *nGTKState = GTK_STATE_FLAG_NORMAL;
 
 if (!( nVCLState  ControlState::ENABLED ))
+{
 *nGTKState = GTK_STATE_FLAG_INSENSITIVE;
+}
 
 if ( nVCLState  ControlState::PRESSED )
 {
@@ -66,7 +68,9 @@ static void NWConvertVCLStateToGTKState( ControlState 
nVCLState,
 }
 
 if ( nVCLState  ControlState::ROLLOVER )
+{
 *nGTKState = (GtkStateFlags) (*nGTKState | GTK_STATE_FLAG_PRELIGHT);
+}
 
 if ( nVCLState  ControlState::SELECTED )
 *nGTKState = (GtkStateFlags) (*nGTKState | GTK_STATE_FLAG_SELECTED);
@@ -105,40 +109,40 @@ static void NWCalcArrowRect( const Rectangle rButton, 
Rectangle rArrow )
 ) );
 }
 
-#define MIN_SPIN_ARROW_WIDTH 6
-
 Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle 
aAreaRect)
 {
-gintbuttonSize;
-RectanglebuttonRect;
-const PangoFontDescription *fontDesc;
-GtkBorder padding;
-
 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source include/svtools svtools/source

2015-05-10 Thread Tomaž Vajngerl
 dbaccess/source/ui/misc/WNameMatch.cxx |4 
 include/svtools/headbar.hxx|   14 
 svtools/source/control/headbar.cxx |  484 -
 3 files changed, 185 insertions(+), 317 deletions(-)

New commits:
commit 020a52d855233164a4a1346eeacd3f07592ef36e
Author: Tomaž Vajngerl tomaz.vajng...@collabora.co.uk
Date:   Mon May 11 11:21:26 2015 +0900

unused parameter

Change-Id: Ied856c05594a0ee5bd43ec61e65d12dd18e746d8

diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx 
b/dbaccess/source/ui/misc/WNameMatch.cxx
index cf2c49f..0b35a87 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -349,11 +349,11 @@ public:
 {
 }
 
-virtual void Paint(const Point rPos, SvTreeListBox /*rDev*/, 
vcl::RenderContext rRenderContext,
+virtual void Paint(const Point rPos, SvTreeListBox rDev, 
vcl::RenderContext rRenderContext,
const SvViewDataEntry* pView, const SvTreeListEntry* 
pEntry) SAL_OVERRIDE;
 };
 
-void OColumnString::Paint(const Point rPos, SvTreeListBox rDev, 
vcl::RenderContext rRenderContext,
+void OColumnString::Paint(const Point rPos, SvTreeListBox /*rDev*/, 
vcl::RenderContext rRenderContext,
   const SvViewDataEntry* /*pView*/, const 
SvTreeListEntry* /*pEntry*/)
 {
 rRenderContext.Push(PushFlags::TEXTCOLOR | PushFlags::TEXTFILLCOLOR);
commit ec55cab06c67cff558a6245cd993c7d6187f58ef
Author: Tomaž Vajngerl tomaz.vajng...@collabora.co.uk
Date:   Mon May 11 11:18:54 2015 +0900

remove whitespace

Change-Id: I34995118b06319a8ff5b5c51b22cbe1898cb2756

diff --git a/svtools/source/control/headbar.cxx 
b/svtools/source/control/headbar.cxx
index bc05547..90f0781 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -42,8 +42,6 @@ public:
 OUStringmaHelpText;
 };
 
-
-
 #define HEAD_ARROWSIZE1 4
 #define HEAD_ARROWSIZE2 7
 
@@ -56,8 +54,6 @@ public:
 #define HEAD_HITTEST_ITEM   ((sal_uInt16)0x0001)
 #define HEAD_HITTEST_DIVIDER((sal_uInt16)0x0002)
 
-
-
 void HeaderBar::ImplInit( WinBits nWinStyle )
 {
 mpItemList  = new ImplHeadItemList;
@@ -101,8 +97,6 @@ void HeaderBar::ImplInit( WinBits nWinStyle )
 ImplInitSettings( true, true, true );
 }
 
-
-
 HeaderBar::HeaderBar( vcl::Window* pParent, WinBits nWinStyle ) :
 Window( pParent, nWinStyle  WB_3DLOOK )
 {
@@ -110,8 +104,6 @@ HeaderBar::HeaderBar( vcl::Window* pParent, WinBits 
nWinStyle ) :
 SetSizePixel( CalcWindowSizePixel() );
 }
 
-
-
 HeaderBar::~HeaderBar()
 {
 disposeOnce();
@@ -165,8 +157,6 @@ void HeaderBar::ImplInitSettings( bool bFont,
 }
 }
 
-
-
 long HeaderBar::ImplGetItemPos( sal_uInt16 nPos ) const
 {
 long nX = -mnOffset;
@@ -175,8 +165,6 @@ long HeaderBar::ImplGetItemPos( sal_uInt16 nPos ) const
 return nX;
 }
 
-
-
 Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const
 {
 Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 );
@@ -187,8 +175,6 @@ Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) 
const
 return aRect;
 }
 
-
-
 sal_uInt16 HeaderBar::ImplHitTest( const Point rPos,
long nMouseOff, sal_uInt16 nPos ) const
 {
@@ -252,8 +238,6 @@ sal_uInt16 HeaderBar::ImplHitTest( const Point rPos,
 return 0;
 }
 
-
-
 void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos )
 {
 Rectangle aRect1 = ImplGetItemRect( nStartPos );
@@ -300,8 +284,6 @@ void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, 
sal_uInt16 nEndPos )
 SetRasterOp( ROP_OVERPAINT );
 }
 
-
-
 void HeaderBar::ImplDrawItem(vcl::RenderContext rRenderContext, sal_uInt16 
nPos, bool bHigh, bool bDrag,
  const Rectangle rItemRect, const Rectangle* 
pRect, sal_uLong )
 {
@@ -640,8 +622,6 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext 
rRenderContext, sal_uInt16 nPos
 }
 }
 
-
-
 void HeaderBar::ImplDrawItem(vcl::RenderContext rRenderContext, sal_uInt16 
nPos,
  bool bHigh, bool bDrag, const Rectangle* pRect )
 {
@@ -649,8 +629,6 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext 
rRenderContext, sal_uInt16 nPos
 ImplDrawItem(rRenderContext, nPos, bHigh, bDrag, aRect, pRect, 0 );
 }
 
-
-
 void HeaderBar::ImplUpdate(sal_uInt16 nPos, bool bEnd, bool /*bDirect*/)
 {
 if (IsVisible()  IsUpdateMode())
@@ -673,8 +651,6 @@ void HeaderBar::ImplUpdate(sal_uInt16 nPos, bool bEnd, bool 
/*bDirect*/)
 }
 }
 
-
-
 void HeaderBar::ImplStartDrag( const Point rMousePos, bool bCommand )
 {
 sal_uInt16  nPos;
@@ -736,8 +712,6 @@ void HeaderBar::ImplStartDrag( const Point rMousePos, bool 
bCommand )
 }
 }
 
-
-
 void HeaderBar::ImplDrag( const Point rMousePos )
 {
 sal_uInt16  nPos = GetItemPos( mnCurItemId );
@@ -844,8 +818,6 @@ void HeaderBar::ImplDrag( const Point rMousePos )
 Drag();
 }
 
-
-
 void HeaderBar::ImplEndDrag( bool 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source sd/source vcl/source

2015-03-09 Thread Caolán McNamara
 dbaccess/source/ui/misc/HtmlReader.cxx   |5 +++--
 dbaccess/source/ui/misc/RtfReader.cxx|5 +++--
 sd/source/filter/eppt/pptx-epptooxml.cxx |2 +-
 vcl/source/opengl/OpenGLHelper.cxx   |3 +--
 4 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit e96a5d4064a6002eb95b2c05f4e68c79bb766b07
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Mar 9 21:06:48 2015 +

coverity#1287398 Logically dead code

and

coverity#1287399 Logically dead code

regression from

commit 5806a7ed44f675f8c2d6aaf16a4347f3e11c9783
Date:   Mon Mar 2 09:36:39 2015 +0200
cppcheck: Variable is assigned a value that is never used

Change-Id: Iaee21f8c120a09aaeed2f55da16a7ef83bea2b07

diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx 
b/dbaccess/source/ui/misc/HtmlReader.cxx
index 56470b3..436995b 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -422,7 +422,7 @@ bool OHTMLReader::CreateTable(int nToken)
 sal_Int32 nTextColor = 0;
 do
 {
-switch(nToken)
+switch (nToken)
 {
 case HTML_TEXTTOKEN:
 case HTML_SINGLECHAR:
@@ -490,8 +490,9 @@ bool OHTMLReader::CreateTable(int nToken)
 aFont.Strikeout = ::com::sun::star::awt::FontStrikeout::SINGLE;
 break;
 }
+nToken = GetNextToken();
 }
-while( GetNextToken() != HTML_TABLEROW_OFF );
+while (nToken != HTML_TABLEROW_OFF);
 
 if ( !m_sCurrent.isEmpty() )
 aColumnName = m_sCurrent;
diff --git a/dbaccess/source/ui/misc/RtfReader.cxx 
b/dbaccess/source/ui/misc/RtfReader.cxx
index 4e89f2a..a4ece11 100644
--- a/dbaccess/source/ui/misc/RtfReader.cxx
+++ b/dbaccess/source/ui/misc/RtfReader.cxx
@@ -258,7 +258,7 @@ bool ORTFReader::CreateTable(int nToken)
 FontDescriptor aFont = 
VCLUnoHelper::CreateFontDescriptor(Application::GetSettings().GetStyleSettings().GetAppFont());
 do
 {
-switch(nToken)
+switch (nToken)
 {
 case RTF_UNKNOWNCONTROL:
 case RTF_UNKNOWNDATA:
@@ -301,8 +301,9 @@ bool ORTFReader::CreateTable(int nToken)
 aFont.Strikeout = ::com::sun::star::awt::FontStrikeout::SINGLE;
 break;
 }
+nToken = GetNextToken();
 }
-while( GetNextToken() != RTF_TROWD  eState != SVPAR_ERROR  eState != 
SVPAR_ACCEPTED );
+while(nToken != RTF_TROWD  eState != SVPAR_ERROR  eState != 
SVPAR_ACCEPTED);
 
 bool bOk = !m_vDestVector.empty();
 if(bOk)
commit 124a3e680fecf0659dfaf283a648a405c070c71c
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Mar 9 20:59:47 2015 +

coverity#1268023 Logically dead code

Change-Id: I8fcda18101071db7dddc304c29e4130b04a70f89

diff --git a/vcl/source/opengl/OpenGLHelper.cxx 
b/vcl/source/opengl/OpenGLHelper.cxx
index 23b5fcc..499c1ed 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -113,8 +113,7 @@ static void addPreamble(OString rShaderSource, const 
OString rPreamble)
 {
 int nVersionStrEndPos = rShaderSource.indexOf('\n', 
nVersionStrStartPos);
 
-// no way this should happen - if this is the case, then it's a syntax 
error
-assert(nVersionStrEndPos != -1);
+SAL_WARN_IF(nVersionStrEndPos == -1, vcl.opengl, syntax error in 
shader);
 
 if (nVersionStrEndPos == -1)
 nVersionStrEndPos = nVersionStrStartPos + 8;
commit ace38b3be1e1de01b8e484a768d5ce961e5eb689
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Mar 9 20:58:19 2015 +

dead_error_begin-dead_error_line

Change-Id: I960392401e1555954ac525059789873165ee42c2

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index e0acfbb..98f80e3 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -634,7 +634,7 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
 nTransition = XML_zoom;
 pDirection = ( nDirection == 1) ? in : out;
 break;
-// coverity[dead_error_begin] - following conditions exist to avoid 
compiler warning
+// coverity[dead_error_line] - following conditions exist to avoid 
compiler warning
 case PPT_TRANSITION_TYPE_NONE:
 default:
 nTransition = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - dbaccess/source sw/source

2014-12-01 Thread Stephan Bergmann
 dbaccess/source/ui/misc/WTypeSelect.cxx |2 ++
 dbaccess/source/ui/querydesign/JoinTableView.cxx|2 ++
 dbaccess/source/ui/querydesign/limitboxcontroller.cxx   |2 ++
 dbaccess/source/ui/querydesign/querycontainerwindow.cxx |   14 +-
 sw/source/core/inc/UndoBookmark.hxx |2 --
 sw/source/core/undo/unbkmk.cxx  |2 --
 6 files changed, 11 insertions(+), 13 deletions(-)

New commits:
commit c17f5bb6fb15239809e6b8439e9e443280bc2bde
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Dec 1 14:03:10 2014 +0100

-Werror,-Wunused-private-field

Change-Id: Ic090eee9e7705baf2c44fa2990a986e06cd0cf68

diff --git a/sw/source/core/inc/UndoBookmark.hxx 
b/sw/source/core/inc/UndoBookmark.hxx
index eaa0fcb..8338b01 100644
--- a/sw/source/core/inc/UndoBookmark.hxx
+++ b/sw/source/core/inc/UndoBookmark.hxx
@@ -71,8 +71,6 @@ class SwUndoRenameBookmark : public SwUndo
 {
 const OUString m_sOldName;
 const OUString m_sNewName;
-const sal_uLong m_nNode;
-const sal_Int32 m_nCntnt;
 
 public:
 SwUndoRenameBookmark( const ::sw::mark::IMark, const OUString rNewName );
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 3501ed5..9620b75 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -90,8 +90,6 @@ SwUndoRenameBookmark::SwUndoRenameBookmark( const 
::sw::mark::IMark rBkmk, cons
 : SwUndo( UNDO_BOOKMARK_RENAME )
 , m_sOldName( rOldName )
 , m_sNewName( rBkmk.GetName() )
-, m_nNode( rBkmk.GetMarkPos().nNode.GetIndex() )
-, m_nCntnt( rBkmk.GetMarkPos().nContent.GetIndex() )
 {
 }
 
commit 1f13a4f40618b798fc84a058097b0ad26e77f111
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Dec 1 11:50:03 2014 +0100

-Werror,-Wswitch

Change-Id: I807b63361af2e40c4adf66412615b91b5d610dab

diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx 
b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
index 7afd1c9..26e8323 100644
--- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
+++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx
@@ -158,16 +158,12 @@ namespace dbaui
 bool OQueryContainerWindow::PreNotify( NotifyEvent rNEvt )
 {
 bool bHandled = false;
-switch (rNEvt.GetType())
+if (rNEvt.GetType() == MouseNotifyEvent::GETFOCUS  m_pViewSwitch)
 {
-case  MouseNotifyEvent::GETFOCUS:
-if ( m_pViewSwitch )
-{
-OJoinController rController = 
m_pViewSwitch-getDesignView()-getController();
-rController.InvalidateFeature(SID_CUT);
-rController.InvalidateFeature(SID_COPY);
-rController.InvalidateFeature(SID_PASTE);
-}
+OJoinController rController = 
m_pViewSwitch-getDesignView()-getController();
+rController.InvalidateFeature(SID_CUT);
+rController.InvalidateFeature(SID_COPY);
+rController.InvalidateFeature(SID_PASTE);
 }
 return bHandled || ODataView::PreNotify(rNEvt);
 }
commit 4c03d837eb19e3a7d38e26ebac9740cb58f5d03c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Dec 1 11:48:22 2014 +0100

-Werror,-Wswitch

Change-Id: Iad8c17f8d69d51d55c6cdf2ed355cda140399337

diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx 
b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 1adeadf..40e2227 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -430,6 +430,8 @@ bool OWizTypeSelectList::PreNotify( NotifyEvent rEvt )
 nDone = true;
 }
 break;
+default:
+break;
 }
 return nDone || MultiListBox::PreNotify(rEvt);
 }
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx 
b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index c2dd15d..8f6dc07 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1418,6 +1418,8 @@ bool OJoinTableView::PreNotify(NotifyEvent rNEvt)
 }
 }
 break;
+default:
+break;
 }
 
 if (!bHandled)
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx 
b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
index 5b76764..ad460ff 100644
--- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
+++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
@@ -84,6 +84,8 @@ bool LimitBoxImpl::Notify( NotifyEvent rNEvt )
 }
 break;
 }
+default:
+break;
 }
 return nHandled || LimitBox::Notify( rNEvt );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - dbaccess/source sc/source sw/CppunitTest_sw_tox.mk sw/CppunitTest_sw_uwriter.mk sw/inc sw/Module_sw.mk sw/qa sw/source unusedcode.easy

2014-11-03 Thread Caolán McNamara
 dbaccess/source/core/api/RowSetCacheIterator.cxx |5 
 dbaccess/source/core/api/RowSetCacheIterator.hxx |1 
 sc/source/ui/unoobj/celllistsource.cxx   |   16 -
 sc/source/ui/unoobj/celllistsource.hxx   |6 
 sc/source/ui/unoobj/cellvaluebinding.cxx |   19 --
 sc/source/ui/unoobj/cellvaluebinding.hxx |6 
 sw/CppunitTest_sw_tox.mk |   84 -
 sw/CppunitTest_sw_uwriter.mk |3 
 sw/Module_sw.mk  |4 
 sw/inc/ToxLinkProcessor.hxx  |2 
 sw/inc/ToxTabStopTokenHandler.hxx|4 
 sw/inc/ToxTextGenerator.hxx  |2 
 sw/inc/ToxWhitespaceStripper.hxx |2 
 sw/inc/modeltoviewhelper.hxx |   25 ++
 sw/qa/core/test_ToxLinkProcessor.cxx |  140 
 sw/qa/core/test_ToxTextGenerator.cxx |  195 +++
 sw/qa/core/test_ToxWhitespaceStripper.cxx|  147 +
 sw/qa/core/uwriter.cxx   |   34 +++-
 sw/qa/extras/tox/test_ToxLinkProcessor.cxx   |  140 
 sw/qa/extras/tox/test_ToxTextGenerator.cxx   |  195 ---
 sw/qa/extras/tox/test_ToxWhitespaceStripper.cxx  |  150 -
 sw/source/core/inc/txmsrt.hxx|2 
 sw/source/core/text/porlay.cxx   |5 
 sw/source/core/txtnode/modeltoviewhelper.cxx |   70 +---
 sw/source/core/txtnode/txtedt.cxx|2 
 unusedcode.easy  |3 
 26 files changed, 585 insertions(+), 677 deletions(-)

New commits:
commit 6c52a8b916e52c9ab33461e931a4e75b3dae04f7
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Nov 3 13:58:52 2014 +

drop SW_DLLPUBLICs for unit-test only exposure

seeing as have a uwriter target for the non-exposed symbols case.

As a motivating side-effect stops crashing on exit on an optimized build 
with
my x86_64 fedora 20 gcc 4.8.3 build

Change-Id: If0240ee02d4899e488b12d2d8d5f9b6bf7cca37d

diff --git a/sw/CppunitTest_sw_tox.mk b/sw/CppunitTest_sw_tox.mk
deleted file mode 100644
index cca386f..000
--- a/sw/CppunitTest_sw_tox.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-# This file contains the unit test definition for class in the 
sources/core/tox subfolder
-# The macro which defines the main method is contained in 
test_ToxWhitespaceStripper.cxx
-
-$(eval $(call gb_CppunitTest_CppunitTest,sw_tox))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sw_tox, \
-   sw/qa/extras/tox/test_ToxWhitespaceStripper \
-   sw/qa/extras/tox/test_ToxLinkProcessor \
-   sw/qa/extras/tox/test_ToxTextGenerator \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sw_tox, \
-   $(call gb_Helper_optional,AVMEDIA,avmedia) \
-   basegfx \
-   comphelper \
-   cppu \
-   cppuhelper \
-   drawinglayer \
-   editeng \
-   i18nlangtag \
-   i18nutil \
-   lng \
-   sal \
-   salhelper \
-   sax \
-   sb \
-   sfx \
-   sot \
-   svl \
-   svt \
-   svx \
-   svxcore \
-   sw \
-   test \
-   unotest \
-   vcl \
-   tk \
-   tl \
-   ucbhelper \
-   utl \
-   xmlreader \
-   xo \
-   $(gb_UWINAPI) \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,sw_tox, \
-   boost_headers \
-   icuuc \
-   libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_api,sw_tox,\
-   offapi \
-   udkapi \
-))
-
-$(eval $(call gb_CppunitTest_use_components,sw_tox, \
-   configmgr/source/configmgr \
-   framework/util/fwk \
-   i18npool/util/i18npool \
-   ucb/source/core/ucb1 \
-   ucb/source/ucp/file/ucpfile1 \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,sw_tox))
-$(eval $(call gb_CppunitTest_use_ure,sw_tox))
-$(eval $(call gb_CppunitTest_use_vcl,sw_tox))
-
-$(eval $(call gb_CppunitTest_set_include,sw_tox,\
--I$(SRCDIR)/sw/inc \
--I$(SRCDIR)/sw/source/core/inc \
-$$(INCLUDE) \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk
index 495d088..9f4e9f9 100644
--- a/sw/CppunitTest_sw_uwriter.mk
+++ b/sw/CppunitTest_sw_uwriter.mk
@@ -14,6 +14,9 @@ $(eval $(call gb_CppunitTest_CppunitTest,sw_uwriter))
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_uwriter, \
 sw/qa/core/uwriter \
 sw/qa/core/Test-BigPtrArray \
+sw/qa/core/test_ToxWhitespaceStripper \
+sw/qa/core/test_ToxLinkProcessor \
+sw/qa/core/test_ToxTextGenerator \
 ))
 
 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source

2014-08-21 Thread Caolán McNamara
 dbaccess/source/ui/browser/sbabrw.src|5 ++---
 dbaccess/source/ui/dlg/UserAdmin.cxx |3 +--
 dbaccess/source/ui/dlg/UserAdmin.src |5 ++---
 dbaccess/source/ui/inc/dbu_resource.hrc  |8 
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx |6 +++---
 dbaccess/source/ui/tabledesign/TableController.cxx   |4 ++--
 dbaccess/source/ui/tabledesign/table.src |6 ++
 7 files changed, 16 insertions(+), 21 deletions(-)

New commits:
commit 7e61e4f32aed3822b1f1e08db460085536a0ca28
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 21 14:25:22 2014 +0100

QueryBox QUERY_SAVE_TABLE_EDIT_INDEXES - MessageDialog + string

Change-Id: I36e6d376936caa847e68a43f64c8fe892afba1ca

diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc 
b/dbaccess/source/ui/inc/dbu_resource.hrc
index 62fc267..dae43c4 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -62,7 +62,7 @@
 #define RID_STR_UNO_END RID_STR_UNO_START   + 20// 414 
- 433
 
 #define RID_STR_GEN_START   RID_STR_UNO_END
-#define RID_STR_GEN_END RID_STR_GEN_START   + 64// 434 
- 493
+#define RID_STR_GEN_END RID_STR_GEN_START   + 65// 434 
- 493
 
 #define RID_STR_APP_START   RID_STR_GEN_END
 #define RID_STR_APP_END RID_STR_APP_START   + 40//   
494 - 533
@@ -103,7 +103,6 @@
 #define QUERY_BRW_SAVEMODIFIED  RID_QUERYBOX_START +  1
 #define TABLE_DESIGN_SAVEMODIFIED   RID_QUERYBOX_START +  5
 #define QUERY_SAVE_CURRENT_INDEXRID_QUERYBOX_START +  7
-#define QUERY_SAVE_TABLE_EDIT_INDEXES   RID_QUERYBOX_START +  8
 #define RELATION_DESIGN_SAVEMODIFIEDRID_QUERYBOX_START +  9
 #define TABLE_DESIGN_ALL_ROWS_DELETED   RID_QUERYBOX_START + 13
 
@@ -223,6 +222,7 @@
 #define STR_QUERY_BRW_DELETE_ROWS   RID_STR_GEN_START + 61
 #define STR_QUERY_CONNECTION_LOST   RID_STR_GEN_START + 62
 #define STR_QUERY_USERADMIN_DELETE_USER RID_STR_GEN_START + 63
+#define STR_QUERY_SAVE_TABLE_EDIT_INDEXES   RID_STR_GEN_START + 64
 
 // untyped resources
 
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx 
b/dbaccess/source/ui/tabledesign/TableController.cxx
index f95f098..b2565c9 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -65,7 +65,7 @@
 #include cppuhelper/exc_hlp.hxx
 #include sfx2/sfxsids.hrc
 #include tools/diagnose_ex.h
-#include vcl/msgbox.hxx
+#include vcl/layout.hxx
 
 #include boost/mem_fn.hpp
 #include boost/bind.hpp
@@ -447,7 +447,7 @@ void OTableController::doEditIndexes()
 // table needs to be saved before editing indexes
 if (m_bNew || isModified())
 {
-QueryBox aAsk(getView(), ModuleRes(QUERY_SAVE_TABLE_EDIT_INDEXES));
+MessageDialog aAsk(getView(), 
ModuleRes(STR_QUERY_SAVE_TABLE_EDIT_INDEXES), VCL_MESSAGE_QUESTION, 
VCL_BUTTONS_YES_NO);
 if (RET_YES != aAsk.Execute())
 return;
 
diff --git a/dbaccess/source/ui/tabledesign/table.src 
b/dbaccess/source/ui/tabledesign/table.src
index ffe5403..dcc6d51 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -343,11 +343,9 @@ String STR_TABLEDESIGN_DATASOURCE_DELETED
 Text [ en-US ] = The table filter could not be adjusted because the data 
source has been deleted.;
 };
 
-QueryBox QUERY_SAVE_TABLE_EDIT_INDEXES
+String STR_QUERY_SAVE_TABLE_EDIT_INDEXES
 {
-Message [ en-US ] = Before you can edit the indexes of a table, you have 
to save it.\nDo you want to save the changes now?;
-
-Buttons = WB_YES_NO ;
+Text [ en-US ] = Before you can edit the indexes of a table, you have to 
save it.\nDo you want to save the changes now?;
 };
 
 String STR_TABLEDESIGN_NO_PRIM_KEY_HEAD
commit 650bdfb2df1c0cb908b48d7f8419cafbc06447aa
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 21 14:20:31 2014 +0100

QueryBox QUERY_USERADMIN_DELETE_USER - MessageDialog + string

Change-Id: Iedccb1ace9f74d92f09cc6ca23f9aaf004fa05f2

diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx 
b/dbaccess/source/ui/dlg/UserAdmin.cxx
index 83be777..d6dc4f2 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -37,7 +37,6 @@
 #include dbadmin.hxx
 #include moduledbu.hxx
 #include vcl/layout.hxx
-#include vcl/msgbox.hxx
 #include sfx2/passwd.hxx
 
 using namespace ::com::sun::star::container;
@@ -239,7 +238,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton )
 ReferenceXDrop xDrop(m_xUsers,UNO_QUERY);
 if(xDrop.is())
 {
-QueryBox aQry(this, 
ModuleRes(QUERY_USERADMIN_DELETE_USER));
+MessageDialog aQry(this, 
ModuleRes(STR_QUERY_USERADMIN_DELETE_USER), VCL_MESSAGE_QUESTION, 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source

2014-06-16 Thread Lionel Elie Mamane
 dbaccess/source/core/api/RowSet.cxx |   49 
 1 file changed, 28 insertions(+), 21 deletions(-)

New commits:
commit db7042cdbaf94250cd76b6aafd75c10c4a5a6900
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Jun 16 13:20:36 2014 +0200

janitorial: update function name in SAL_INFO output

Change-Id: Ie01599c8f3ae465998113dd8bfd2a33b27d0a39d

diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index 4b5b5db..629ebf5 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1700,7 +1700,7 @@ Reference XResultSet  
ORowSet::impl_prepareAndExecute_throw()
 if ( !m_aUpdateTableName.isEmpty() )
 aComposedUpdateTableName = composeTableName( 
m_xActiveConnection-getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, 
m_aUpdateTableName, false, ::dbtools::eInDataManipulation );
 
-SAL_INFO(dbaccess, ORowSet::execute_NoApprove_NoNewConn: creating 
cache );
+SAL_INFO(dbaccess, ORowSet::impl_prepareAndExecute_throw: creating 
cache );
 m_pCache = new ORowSetCache( xResultSet, m_xComposer.get(), m_aContext, 
aComposedUpdateTableName, m_bModified, 
m_bNew,m_aParameterValueForCache,m_aFilter,m_nMaxRows );
 if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
 {
commit 21f2efbe5f2e8d86a027f04370f8100c4194ee16
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Jun 16 12:22:39 2014 +0200

dbaccess::ORowSet: separate impl_rebuild_throw

Used by two different callers that wanted different things.
Also, freeResources now always positions on BeforeFirst.
It is only called with _bComplete==false by execute()-related code.

Change-Id: I3e34f77ce37c239d8d3d6a8cd7514b125b049de6

diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index 9820287..4b5b5db 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -560,6 +560,15 @@ void ORowSet::freeResources( bool _bComplete )
 }
 m_aClones.clear();
 
+m_aBookmark = Any();
+m_bBeforeFirst  = true;
+m_bAfterLast= false;
+m_bNew  = false;
+m_bModified = false;
+m_bIsInsertRow  = false;
+m_bLastKnownRowCountFinal = false;
+m_nLastKnownRowCount  = 0;
+
 if ( _bComplete )
 {
 // the columns must be disposed before the querycomposer is disposed 
because
@@ -588,14 +597,6 @@ void ORowSet::freeResources( bool _bComplete )
 m_xStatement= NULL;
 m_xTypeMap  = NULL;
 
-m_aBookmark = Any();
-m_bBeforeFirst  = true;
-m_bAfterLast= false;
-m_bNew  = false;
-m_bModified = false;
-m_bIsInsertRow  = false;
-m_bLastKnownRowCountFinal = false;
-m_nLastKnownRowCount  = 0;
 if ( m_aOldRow.is() )
 m_aOldRow-clearRow();
 
@@ -2006,8 +2007,22 @@ void 
ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard _rClearForNotifi
 }
 else // !m_bCommandFacetsDirty
 {
-impl_rebuild_throw(_rClearForNotification);
-beforeFirst();
+Reference XResultSet  xResultSet;
+if(m_bParametersDirty)
+{
+xResultSet = impl_prepareAndExecute_throw();
+}
+else
+{
+xResultSet = m_xStatement-executeQuery();
+m_pCache-reset(xResultSet);
+}
+// let our warnings container forget the reference to the (possibly 
disposed) old result set
+m_aWarnings.setExternalWarnings( NULL );
+// clear all current warnings
+m_aWarnings.clearWarnings();
+// let the warnings container know about the new external warnings
+m_aWarnings.setExternalWarnings( Reference XWarningsSupplier ( 
xResultSet, UNO_QUERY ) );
 }
 checkCache();
 // notify the rowset listeners
@@ -2732,16 +2747,8 @@ void SAL_CALL ORowSet::refreshRow(  ) 
throw(SQLException, RuntimeException, std:
 
 void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard _rGuard)
 {
-Reference XResultSet  xResultSet;
-if(m_bParametersDirty)
-{
-xResultSet = impl_prepareAndExecute_throw();
-}
-else
-{
-xResultSet = m_xStatement-executeQuery();
-m_pCache-reset(xResultSet);
-}
+Reference XResultSet  xResultSet(m_xStatement-executeQuery());
+m_pCache-reset(xResultSet);
 m_aWarnings.setExternalWarnings( Reference XWarningsSupplier ( 
xResultSet, UNO_QUERY ) );
 notifyAllListeners(_rGuard);
 }
commit 767e15343fdedffce513fd26ce17ee6003936117
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Jun 16 10:46:41 2014 +0200

clean up fdo#79427 fix: force BeforeFirst only at execute(), not updateRow()

Change-Id: Iaa881d055923702acbb96862d187af41a6ded730

diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index d5e6411..9820287 100644

[Libreoffice-commits] core.git: 3 commits - dbaccess/source tools/source vcl/inc

2014-03-27 Thread Stephan Bergmann
 dbaccess/source/core/inc/tablecontainer.hxx |4 
 dbaccess/source/core/inc/viewcontainer.hxx  |4 
 tools/source/generic/poly.cxx   |   30 ++
 vcl/inc/osx/saltimer.h  |4 
 vcl/inc/quartz/salbmp.h |   22 ++--
 vcl/inc/quartz/salgdi.h |  128 ++--
 vcl/inc/quartz/salvd.h  |8 -
 7 files changed, 98 insertions(+), 102 deletions(-)

New commits:
commit a7458fba26db19f04b72ba6bb2da2215e523c20e
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Mar 27 19:12:24 2014 +0100

Work around MSC 'override' cannot be used with 'inline' bug

Change-Id: I4aeccc3957048a40e705654bf6b9972cc03648b6

diff --git a/dbaccess/source/core/inc/tablecontainer.hxx 
b/dbaccess/source/core/inc/tablecontainer.hxx
index f2d5198..ed41344 100644
--- a/dbaccess/source/core/inc/tablecontainer.hxx
+++ b/dbaccess/source/core/inc/tablecontainer.hxx
@@ -63,8 +63,8 @@ namespace dbaccess
 
 virtual void SAL_CALL disposing() SAL_OVERRIDE;
 
-inline virtual void SAL_CALL acquire() throw() SAL_OVERRIDE { 
OFilteredContainer::acquire();}
-inline virtual void SAL_CALL release() throw() SAL_OVERRIDE { 
OFilteredContainer::release();}
+virtual void SAL_CALL acquire() throw() SAL_OVERRIDE { 
OFilteredContainer::acquire();}
+virtual void SAL_CALL release() throw() SAL_OVERRIDE { 
OFilteredContainer::release();}
 // ::com::sun::star::lang::XServiceInfo
 DECLARE_SERVICE_INFO();
 
diff --git a/dbaccess/source/core/inc/viewcontainer.hxx 
b/dbaccess/source/core/inc/viewcontainer.hxx
index f17ef92..bde6ad2 100644
--- a/dbaccess/source/core/inc/viewcontainer.hxx
+++ b/dbaccess/source/core/inc/viewcontainer.hxx
@@ -74,8 +74,8 @@ namespace dbaccess
 virtual OUString getTableTypeRestriction() const SAL_OVERRIDE;
 
 private:
-inline virtual void SAL_CALL acquire() throw() SAL_OVERRIDE { 
OFilteredContainer::acquire();}
-inline virtual void SAL_CALL release() throw() SAL_OVERRIDE { 
OFilteredContainer::release();}
+virtual void SAL_CALL acquire() throw() SAL_OVERRIDE { 
OFilteredContainer::acquire();}
+virtual void SAL_CALL release() throw() SAL_OVERRIDE { 
OFilteredContainer::release();}
 // ::com::sun::star::lang::XServiceInfo
 DECLARE_SERVICE_INFO();
 
commit 8e4560e709fb565c69f1950387a812e543d98e22
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Mar 27 19:11:21 2014 +0100

SAL_OVERRIDE, Mac OS X vcl redux

Change-Id: I25f2a79efff7b77651f7cd6c658269e9411c3bdd

diff --git a/vcl/inc/osx/saltimer.h b/vcl/inc/osx/saltimer.h
index 993a2ef..4e5a91a 100644
--- a/vcl/inc/osx/saltimer.h
+++ b/vcl/inc/osx/saltimer.h
@@ -33,8 +33,8 @@ class AquaSalTimer : public SalTimer
 AquaSalTimer();
 virtual ~AquaSalTimer();
 
-void Start( sal_uLong nMS );
-void Stop();
+void Start( sal_uLong nMS ) SAL_OVERRIDE;
+void Stop() SAL_OVERRIDE;
 
 static void handleStartTimerEvent( NSEvent* pEvent );
 
diff --git a/vcl/inc/quartz/salbmp.h b/vcl/inc/quartz/salbmp.h
index 1e946d2..c96257d 100644
--- a/vcl/inc/quartz/salbmp.h
+++ b/vcl/inc/quartz/salbmp.h
@@ -63,23 +63,23 @@ public:
 public:
 
 // SalBitmap methods
-boolCreate( const Size rSize, sal_uInt16 nBitCount, const 
BitmapPalette rPal );
-boolCreate( const SalBitmap rSalBmp );
-boolCreate( const SalBitmap rSalBmp, SalGraphics* pGraphics );
-boolCreate( const SalBitmap rSalBmp, sal_uInt16 nNewBitCount 
);
+boolCreate( const Size rSize, sal_uInt16 nBitCount, const 
BitmapPalette rPal ) SAL_OVERRIDE;
+boolCreate( const SalBitmap rSalBmp ) SAL_OVERRIDE;
+boolCreate( const SalBitmap rSalBmp, SalGraphics* pGraphics ) 
SAL_OVERRIDE;
+boolCreate( const SalBitmap rSalBmp, sal_uInt16 nNewBitCount 
) SAL_OVERRIDE;
 virtual boolCreate( const ::com::sun::star::uno::Reference 
::com::sun::star::rendering::XBitmapCanvas  xBitmapCanvas,
 Size rSize,
-bool bMask = false );
+bool bMask = false ) SAL_OVERRIDE;
 
-voidDestroy();
+voidDestroy() SAL_OVERRIDE;
 
-SizeGetSize() const;
-sal_uInt16  GetBitCount() const;
+SizeGetSize() const SAL_OVERRIDE;
+sal_uInt16  GetBitCount() const SAL_OVERRIDE;
 
-BitmapBuffer   *AcquireBuffer( bool bReadOnly );
-voidReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
+BitmapBuffer   *AcquireBuffer( bool bReadOnly ) SAL_OVERRIDE;
+voidReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) 
SAL_OVERRIDE;
 
-boolGetSystemData( BitmapSystemData rData );
+boolGetSystemData( BitmapSystemData rData ) SAL_OVERRIDE;
 
 private:
 // quartz helper

[Libreoffice-commits] core.git: 3 commits - dbaccess/source vcl/quartz

2014-01-28 Thread Herbert Dürr
 dbaccess/source/core/api/TableDeco.cxx |1 +
 dbaccess/source/ui/dlg/sqlmessage.cxx  |2 +-
 vcl/quartz/ctfonts.cxx |6 --
 3 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 3e99ab21d389e12b5fca3ef6828a8cded49489ec
Author: Herbert Dürr h...@apache.org
Date:   Tue Jan 28 13:31:31 2014 +

Resolves: #i124121# prevent italic emulation with ITALIC_DONTKNOW fonts

(cherry picked from commit a8cd1fab9a17df6179c31e1a73816f1bcd627a9b)

Conflicts:
vcl/aqua/source/gdi/ctfonts.cxx

Change-Id: Ib2893a0ce119ac56ac7091fd18a652fe990e82ec

diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index ea4cdad..fffd680 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -74,7 +74,9 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern rFSD )
 CFDictionarySetValue( mpStyleDict, kCTVerticalFormsAttributeName, 
pCFVertBool );
 
 // fake bold
-if ((pReqFont-GetWeight() = WEIGHT_BOLD)  (mpFontData-GetWeight()  
WEIGHT_SEMIBOLD))
+if ( (pReqFont-GetWeight() = WEIGHT_BOLD) 
+ ((mpFontData-GetWeight()  WEIGHT_SEMIBOLD) 
+  (mpFontData-GetWeight() != WEIGHT_DONTKNOW)) )
 {
 int nStroke = -10.0;
 CFNumberRef rStroke = CFNumberCreate(NULL, kCFNumberSInt32Type, 
nStroke);
@@ -83,7 +85,7 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern rFSD )
 
 // fake italic
 if (((pReqFont-GetSlant() == ITALIC_NORMAL) || (pReqFont-GetSlant() == 
ITALIC_OBLIQUE))
- !((mpFontData-GetSlant() == ITALIC_NORMAL) || (mpFontData-GetSlant() 
== ITALIC_OBLIQUE)))
+ (mpFontData-GetSlant() == ITALIC_NONE))
 {
 aMatrix = CGAffineTransformConcat(aMatrix, CGAffineTransformMake(1, 0, 
toRadian(120), 1, 0, 0));
 }
commit f244845c89ac72bfd4b878a88a3b5c131df71d3f
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Jan 28 15:14:21 2014 +

coverity#705144 Missing break in switch

Change-Id: Ie3c28d7172ec17ed7de6033c6eada6fb66d1cdf2

diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx 
b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 7bdd172..d8ce769 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -555,7 +555,7 @@ void OSQLMessageBox::impl_initImage( MessageType _eImage )
 {
 default:
 OSL_FAIL( OSQLMessageBox::impl_initImage: unsupported image 
type! );
-
+/* Fall through */
 case Info:
 m_aInfoImage.SetImage(InfoBox::GetStandardImage());
 break;
commit d786af6820175e10323a4662b8b68e9510c80b80
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Jan 28 15:12:43 2014 +

coverity#705141 Missing break in switch

Change-Id: I9b94f1056fa62b2c0c609f6d448e1750bb0e9ce5

diff --git a/dbaccess/source/core/api/TableDeco.cxx 
b/dbaccess/source/core/api/TableDeco.cxx
index 9d94317..8f9ae64 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -171,6 +171,7 @@ void 
ODBTableDecorator::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, con
 {
 case PROPERTY_ID_PRIVILEGES:
 SAL_WARN(dbaccess, Property is readonly!);
+/* Fall through */
 case PROPERTY_ID_FILTER:
 case PROPERTY_ID_ORDER:
 case PROPERTY_ID_APPLYFILTER:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - dbaccess/source forms/source svx/source

2014-01-15 Thread Caolán McNamara
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx |6 +--
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx   |   12 ++
 forms/source/richtext/specialdispatchers.cxx|2 -
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |5 +-
 svx/source/dialog/fntctrl.cxx   |   18 +-
 svx/source/dialog/srchdlg.cxx   |4 +-
 svx/source/svdraw/svdotextpathdecomposition.cxx |   28 
 7 files changed, 36 insertions(+), 39 deletions(-)

New commits:
commit 854188e3b14c8eb67a1871f2c9d666f4bd22f08b
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Jan 15 15:32:45 2014 +

remove last xub_StrLen in forms

Change-Id: If6c711cf9c317411c72260b4029521782f8a282c

diff --git a/forms/source/richtext/specialdispatchers.cxx 
b/forms/source/richtext/specialdispatchers.cxx
index 15c2c42..f39ecc8 100644
--- a/forms/source/richtext/specialdispatchers.cxx
+++ b/forms/source/richtext/specialdispatchers.cxx
@@ -71,7 +71,7 @@ namespace frm
 if ( nParagraphs )
 {
 sal_Int32 nLastParaNumber = nParagraphs - 1;
-xub_StrLen nParaLen = pEngine-GetTextLen( nLastParaNumber );
+sal_Int32 nParaLen = pEngine-GetTextLen( nLastParaNumber );
 getEditView()-SetSelection( ESelection( 0, 0, nLastParaNumber, 
nParaLen ) );
 }
 }
commit 48ed1d39a00c2ad617fab9191f192ef7509e8747
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Jan 15 15:26:41 2014 +

make dbaccess xub_StrLen free

Change-Id: I2c91c23f3dabacdb4ee65c18dc73f096041b74a9

diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx 
b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index 83f1feb..ad34c24 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -87,7 +87,7 @@ DBG_NAME(OTextConnectionHelper)
 DBG_CTOR(OTextConnectionHelper,NULL);
 
 sal_Int32 nCnt = 
comphelper::string::getTokenCount(m_aFieldSeparatorList, '\t');
-xub_StrLen i;
+sal_Int32 i;
 
 for( i = 0 ; i  nCnt ; i += 2 )
 m_aFieldSeparator.InsertEntry( m_aFieldSeparatorList.getToken( i, 
'\t' ) );
@@ -454,7 +454,7 @@ DBG_NAME(OTextConnectionHelper)
 OUString OTextConnectionHelper::GetSeparator( const ComboBox rBox, const 
OUString rList )
 {
 sal_Unicode nTok = '\t';
-xub_StrLen  nPos(rBox.GetEntryPos( rBox.GetText() ));
+sal_uInt16 nPos(rBox.GetEntryPos( rBox.GetText() ));
 
 if( nPos == COMBOBOX_ENTRY_NOTFOUND )
 return rBox.GetText().copy(0);
@@ -470,7 +470,7 @@ DBG_NAME(OTextConnectionHelper)
 {
 charnTok = '\t';
 sal_Int32   nCnt = comphelper::string::getTokenCount(rList, nTok);
-xub_StrLen  i;
+sal_Int32 i;
 
 for( i=0 ; inCnt ; i+=2 )
 {
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 423882b..c3b0184 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1259,9 +1259,8 @@ void OSelectionBrowseBox::PaintStatusCell(OutputDevice 
rDev, const Rectangle r
 OUString  aLabel(ModuleRes(STR_QUERY_HANDLETEXT));
 
// from BROW_CRIT2_ROW onwards all rows are shown or
-xub_StrLen nToken = (xub_StrLen) (m_nSeekRow = 
GetBrowseRow(BROW_CRIT2_ROW))
-?
-xub_StrLen(BROW_CRIT2_ROW) : xub_StrLen(GetRealRow(m_nSeekRow));
+sal_Int32 nToken = (m_nSeekRow = GetBrowseRow(BROW_CRIT2_ROW))
+?  BROW_CRIT2_ROW : GetRealRow(m_nSeekRow);
 rDev.DrawText(aRect, aLabel.getToken(nToken, ';'),TEXT_DRAW_VCENTER);
 }
 
@@ -2648,9 +2647,8 @@ OUString OSelectionBrowseBox::GetRowDescription( 
sal_Int32 _nRow ) const
 OUString  aLabel(ModuleRes(STR_QUERY_HANDLETEXT));
 
 // from BROW_CRIT2_ROW onwards all rows are shown as or
-xub_StrLen nToken = (xub_StrLen) (_nRow = GetBrowseRow(BROW_CRIT2_ROW))
-?
-xub_StrLen(BROW_CRIT2_ROW) : xub_StrLen(GetRealRow(_nRow));
+sal_Int32 nToken = (_nRow = GetBrowseRow(BROW_CRIT2_ROW))
+?  BROW_CRIT2_ROW : GetRealRow(_nRow);
 return aLabel.getToken(nToken, ';');
 }
 
@@ -2704,7 +2702,7 @@ void 
OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef _pEntry)
 m_pFunctionCell-InsertEntry(m_aFunctionStrings.getToken(2, 
';')); // 2 - COUNT
 else
 {
-xub_StrLen nCount = 
comphelper::string::getTokenCount(m_aFunctionStrings, ';');
+sal_Int32 nCount = 
comphelper::string::getTokenCount(m_aFunctionStrings, ';');
 if ( _pEntry-isNumeric() )
 --nCount;
 for( sal_Int32 nIdx = 1; nIdx  nCount; nIdx++ )
commit 878dcbee6488f2a3dfbc1f86abc8857cf6608d20
Author: Caolán 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source external/libebook include/svtools svtools/source

2013-11-28 Thread Caolán McNamara
 dbaccess/source/ui/app/AppControllerDnD.cxx |7 +-
 external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch |   30 
++
 external/libebook/ExternalProject_libebook.mk   |2 
 external/libebook/UnpackedTarball_libebook.mk   |6 ++
 include/svtools/fileview.hxx|   16 +
 svtools/source/contnr/fileview.cxx  |   29 
-
 6 files changed, 43 insertions(+), 47 deletions(-)

New commits:
commit 3b65cd24408bb78676dfa42cf01669970125068a
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Nov 28 09:53:47 2013 +

Fix crash on abi2010-1.doc example

Change-Id: Ib3e43e14f9223bc53f20f1241d9b8c0eaa5470ad

diff --git a/external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch 
b/external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch
new file mode 100644
index 000..21ab72b
--- /dev/null
+++ b/external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch
@@ -0,0 +1,30 @@
+From 30021c75542a008ccf8814fa70d519f00bc69776 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= caol...@redhat.com
+Date: Thu, 28 Nov 2013 09:50:00 +
+Subject: [PATCH] Fix crash on abi2010-1.doc example
+
+---
+ src/lib/FB2Parser.cpp | 7 +--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/FB2Parser.cpp b/src/lib/FB2Parser.cpp
+index d258c09..3cd3e3c 100644
+--- a/src/lib/FB2Parser.cpp
 b/src/lib/FB2Parser.cpp
+@@ -357,8 +357,11 @@ FB2XMLParserContext *processNode(FB2XMLParserContext 
*const context, const xmlTe
+   {
+   case XML_READER_TYPE_ELEMENT :
+   {
+-const EBOOKToken *name = getFB2Token(xmlTextReaderConstLocalName(reader));
+-const EBOOKToken *ns = 
getFB2Token(xmlTextReaderConstNamespaceUri(reader));
++const xmlChar *name_str = xmlTextReaderConstLocalName(reader);
++const xmlChar *ns_str = xmlTextReaderConstNamespaceUri(reader);
++
++const EBOOKToken *name = name_str ? getFB2Token(name_str) : 0;
++const EBOOKToken *ns = ns_str ? getFB2Token(ns_str) : 0;
+ 
+ if (!name || !ns)
+   // TODO: unknown elements should not be skipped entirely, but
+-- 
+1.8.3.1
+
diff --git a/external/libebook/UnpackedTarball_libebook.mk 
b/external/libebook/UnpackedTarball_libebook.mk
index 555837b..3cf21e6 100644
--- a/external/libebook/UnpackedTarball_libebook.mk
+++ b/external/libebook/UnpackedTarball_libebook.mk
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libebook))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,libebook,$(EBOOK_TARBALL)))
 
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,1))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libebook,\
+external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch \
+))
+
 # vim: set noet sw=4 ts=4:
commit 8fe3c0bd644b963284d535175f61e457a25f2c61
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Nov 28 09:43:10 2013 +

enable-debug in libebook if the ENABLE_DEBUG is active

Change-Id: If26bdd6ed0be59a4fff137ac3166b9d644e1aea7

diff --git a/external/libebook/ExternalProject_libebook.mk 
b/external/libebook/ExternalProject_libebook.mk
index 0983177..05f8566 100644
--- a/external/libebook/ExternalProject_libebook.mk
+++ b/external/libebook/ExternalProject_libebook.mk
@@ -31,7 +31,7 @@ $(call gb_ExternalProject_get_state_target,libebook,build) :
--enable-static \
--disable-shared \
--without-docs \
-   --disable-debug \
+   $(if $(filter 
TRUE,$(ENABLE_DEBUG)),--enable-debug,--disable-debug) \
--disable-werror \
--disable-weffc \
CXXFLAGS=$(if $(filter NO,$(SYSTEM_BOOST)),-I$(call 
gb_UnpackedTarball_get_dir,boost) 
-I$(BUILDDIR)/config_$(gb_Side),$(BOOST_CPPFLAGS)) \
commit 282a6fb530e3b78c1e83a9276aea0a528b9e5752
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Nov 28 08:58:21 2013 +

Finish rework of QueryDeleteDlg_Impl

This reverts commit a74b3e89c9b853338506249b0fac8d5f54909de7.

Change-Id: Id670a2b66e61d3a4dceb9640d6ae34e9116691c0

diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx 
b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 906e341..f4d65fc 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -188,7 +188,7 @@ void OApplicationController::deleteObjects( ElementType 
_eType, const ::std::vec
 if ( xNames.is() )
 {
 OString sDialogPosition;
-svtools::QueryDeleteResult_Impl eResult = _bConfirm ? 
svtools::QUERYDELETE_YES : svtools::QUERYDELETE_ALL;
+short eResult = _bConfirm ? svtools::QUERYDELETE_YES : 
svtools::QUERYDELETE_ALL;
 
 // The list of elements to delete is allowed to contain related 
elements: A given element may
 // be the ancestor or 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source oox/source svtools/source

2013-10-11 Thread Caolán McNamara
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |3 +--
 oox/source/shape/ShapeContextHandler.cxx  |8 
 svtools/source/filter/exportdialog.cxx|2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 77ba51a2dd1c37cce2ffb596f4544d9c8cfefeda
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Oct 11 08:53:27 2013 +0100

CID#1103695 avoid use of -1 here

Change-Id: I7097d26f301fffa79d04fe4f26aeddb32223d62c

diff --git a/svtools/source/filter/exportdialog.cxx 
b/svtools/source/filter/exportdialog.cxx
index 706715b..b935acf 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -951,7 +951,7 @@ void ExportDialog::updateControls()
 if (nInd != -1)
 aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRawFileSize ) );
 
-if ( nRealFileSize )
+if ( nRealFileSize  nInd != -1 )
 {
 nInd = aEst.indexOf( %, nInd );
 if (nInd != -1)
commit 44fa08ed89f61add6ba6fb0eb1b5c243b53c350f
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Oct 11 08:51:26 2013 +0100

CID#1103679 calm coverity re invalid iterators

Change-Id: Iad07aa59c6016752ec9467945d737380d214c3c0

diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index ca189a1..0ae0859 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1826,8 +1826,7 @@ void OSelectionBrowseBox::AddCondition( const 
OTableFieldDescRef rInfo, const O
 }
 m_bVisibleRow[BROW_CRIT1_ROW + nLevel] = sal_True;
 }
-
-else if (aIter == getFields().end())
+else if (aIter == rFields.end())
 {
 OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, 
sal_False, sal_False );
 if ( pTmp-isNumericOrAggreateFunction()  rInfo-IsGroupBy() ) // 
the GroupBy was inherited from rInfo
commit 88af59fa755505422958746fb321e15f50c99378
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Oct 11 08:47:04 2013 +0100

CID#1103719 leak on default: path

Change-Id: I74a17da384499fb18f13d5caa04c356dfee71eff

diff --git a/oox/source/shape/ShapeContextHandler.cxx 
b/oox/source/shape/ShapeContextHandler.cxx
index 3e7efb0..96d4849 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -97,16 +97,16 @@ uno::Referencexml::sax::XFastContextHandler 
ShapeContextHandler::getChartShape
 {
 if (!mxChartShapeContext.is())
 {
-ContextHandler2Helper *rFragmentHandler
-(new ShapeFragmentHandler(*mxFilterBase, 
msRelationFragmentPath));
-ShapePtr pMasterShape;
-
 switch (nElement  0x)
 {
 case XML_chart:
+{
+ContextHandler2Helper *rFragmentHandler
+(new ShapeFragmentHandler(*mxFilterBase, 
msRelationFragmentPath));
 mpShape.reset(new Shape(com.sun.star.drawing.OLE2Shape ));
 mxChartShapeContext.set(new 
ChartGraphicDataContext(*rFragmentHandler, mpShape, true));
 break;
+}
 default:
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - dbaccess/source tools/inc vcl/source

2013-03-21 Thread Chris
 dbaccess/source/ui/dlg/dbwizsetup.cxx   |   10 +-
 tools/inc/tools/debug.hxx   |5 ++---
 vcl/source/glyphs/graphite_features.cxx |5 +++--
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 3c61c08757208fb9735814dd62ac80f23cf51b86
Author: Chris chris.sherloc...@gmail.com
Date:   Thu Mar 21 23:55:36 2013 +1100

Move setupwizard modify handler code.

Move setupwizard code into the conditional below it. You can only work
on pPage if it isn't a null pointer anyway, to my mind this looks a
lot cleaner.

Change-Id: If8d910c15c5a1c1da5eb204b5922d074c454978b
Reviewed-on: https://gerrit.libreoffice.org/2890
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx 
b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 338e7c0..cb53dfd 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -587,13 +587,13 @@ TabPage* ODbTypeWizDialogSetup::createPage(WizardState 
_nState)
 break;
 }
 
-if (pPage  (_nState != PAGE_DBSETUPWIZARD_INTRO)  (_nState != 
PAGE_DBSETUPWIZARD_AUTHENTIFICATION))
-{
-pPage-SetModifiedHandler(LINK( this, ODbTypeWizDialogSetup, 
ImplModifiedHdl ) );
-}
-
 if ( pPage )
 {
+if ((_nState != PAGE_DBSETUPWIZARD_INTRO)  (_nState != 
PAGE_DBSETUPWIZARD_AUTHENTIFICATION))
+{
+pPage-SetModifiedHandler(LINK( this, ODbTypeWizDialogSetup, 
ImplModifiedHdl ) );
+}
+
 pPage-SetServiceFactory( m_pImpl-getORB() );
 pPage-SetAdminDialog(this, this);
 
commit f9af9abe628dc8886e320fa27421a125886f37a6
Author: Thomas Arnhold tho...@arnhold.org
Date:   Thu Mar 21 19:10:52 2013 +0100

debug: remove binfilter debug macro

Change-Id: I419c37860a21ae5ab416a2c8ec3c742fbaf6a980

diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index e956d65..5416050 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -32,8 +32,8 @@
 steps taken while executing some protocol) should use the facilities
 provided by sal/log.hxx.
 
-Because the assertion macros (DBG_ASSERT, DBG_BF_ASSERT) have been used for
-true assertions as well as to log warnings, they map to SAL_WARN instead of
+Because the assertion macro (DBG_ASSERT) has been used for
+true assertions as well as to log warnings, it maps to SAL_WARN instead of
 standard assert.  The warning and error macros (DBG_ASSERTWARNING,
 DBG_WARNING, DBG_WARNING1, ..., DBG_WARNING3, DBG_ERRORFILE) all map to
 SAL_INFO.
@@ -477,7 +477,6 @@ typedef const sal_Char* (*DbgUsr)(const void* pThis );
 
 #define DBG_ASSERTWARNING( sCon, aWarning ) ((void)0)
 #define DBG_ASSERT( sCon, aError ) ((void)0)
-#define DBG_BF_ASSERT( sCon, aError ) ((void)0)
 #define DBG_WARNING( aWarning ) ((void)0)
 #define DBG_WARNING1( aWarning, x1 ) ((void)0)
 #define DBG_WARNING2( aWarning, x1, x2 ) ((void)0)
commit 51890613b7cdeddff9ad3360a91908ded28bc5f0
Author: Thomas Arnhold tho...@arnhold.org
Date:   Thu Mar 21 19:10:02 2013 +0100

vcl: use OSL_BIGENDIAN

Change-Id: Ifdf54d30cca94d0d65d78f94d5fac31edf8c6df2

diff --git a/vcl/source/glyphs/graphite_features.cxx 
b/vcl/source/glyphs/graphite_features.cxx
index ca10807..1bff1e4 100644
--- a/vcl/source/glyphs/graphite_features.cxx
+++ b/vcl/source/glyphs/graphite_features.cxx
@@ -24,6 +24,7 @@
 
 
 #include sal/types.h
+#include osl/endian.h
 
 #ifdef WNT
 #include windows.h
@@ -88,7 +89,7 @@ GrFeatureParser::GrFeatureParser(const gr_face * pFace, const 
::rtl::OString fea
 gr_uint32 nFaceLang = gr_face_lang_by_index(pFace, i);
 FeatId aSupportedLang;
 aSupportedLang.num = nFaceLang;
-#ifdef __BIG_ENDIAN__
+#ifdef OSL_BIGENDIAN
 // here we only expect full 3 letter codes
 if (aLang.label[0] == aSupportedLang.label[0] 
 aLang.label[1] == aSupportedLang.label[1] 
@@ -163,7 +164,7 @@ void GrFeatureParser::setLang(const gr_face * pFace, const 
rtl::OString  lang)
 FeatId aSupportedLang;
 aSupportedLang.num = nFaceLang;
 // here we only expect full 2  3 letter codes
-#ifdef __BIG_ENDIAN__
+#ifdef OSL_BIGENDIAN
 if (aLang.label[0] == aSupportedLang.label[0] 
 aLang.label[1] == aSupportedLang.label[1] 
 aLang.label[2] == aSupportedLang.label[2] 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - dbaccess/source reportbuilder/java reportdesign/source sal/inc xmloff/inc xmloff/source

2013-03-12 Thread Lionel Elie Mamane
 dbaccess/source/core/dataaccess/ModelImpl.cxx  
 |4 -
 reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java   
 |9 +-
 reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
 |   40 +-
 reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroup.java   
 |   11 ++
 
reportbuilder/java/org/libreoffice/report/pentaho/model/OfficeGroupInstanceSection.java
 |   13 +++
 
reportbuilder/java/org/libreoffice/report/pentaho/parser/rpt/GroupReadHandler.java
  |5 +
 reportdesign/source/filter/xml/xmlEnums.hxx
 |1 
 reportdesign/source/filter/xml/xmlExport.cxx   
 |   15 +++
 reportdesign/source/filter/xml/xmlfilter.cxx   
 |1 
 sal/inc/rtl/ustring.h  
 |2 
 xmloff/inc/xmloff/xmltoken.hxx 
 |1 
 xmloff/source/core/xmltoken.cxx
 |1 
 12 files changed, 88 insertions(+), 15 deletions(-)

New commits:
commit 404e5097a86325d36b17731fad568ca37839a67a
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Mar 12 18:06:31 2013 +0100

janitorial: typo in comment

Change-Id: Idd62c2768a03f7aab8ff11165425f8c383653f38

diff --git a/sal/inc/rtl/ustring.h b/sal/inc/rtl/ustring.h
index 23ea47a..ba19b83 100644
--- a/sal/inc/rtl/ustring.h
+++ b/sal/inc/rtl/ustring.h
@@ -1754,7 +1754,7 @@ SAL_DLLPUBLIC void SAL_CALL rtl_uString_newTrim(
 the number of the token to return, starting at index.
 
 @param cTok
-the character that seperates the tokens.
+the character that separates the tokens.
 
 @param idx
 the position at which searching for the token starts.  Must not be greater
commit 4178806bb010129f3b13b6282547fe48ddcd
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Mar 12 17:57:57 2013 +0100

reportbuilder: make Group on not-Each Value actually work

Change-Id: Id5d73f9aac48ebfb6987e5bf0df37e62f1817bdc

diff --git 
a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java 
b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
index a22be04..24e1fe1 100644
--- a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
@@ -139,6 +139,7 @@ public class SDBCReportDataFactory implements 
DataSourceFactory
 private static final Log LOGGER = 
LogFactory.getLog(SDBCReportDataFactory.class);
 public static final String COMMAND_TYPE = command-type;
 public static final String ESCAPE_PROCESSING = escape-processing;
+public static final String SORT_EXPRESSIONS = sort-expressions;
 public static final String GROUP_EXPRESSIONS = group-expressions;
 public static final String MASTER_VALUES = master-values;
 public static final String MASTER_COLUMNS = master-columns;
@@ -229,10 +230,10 @@ public class SDBCReportDataFactory implements 
DataSourceFactory
 }
 }
 
-private String getOrderStatement(final int commandType, final String 
command, final List groupExpressions)
+private String getOrderStatement(final int commandType, final String 
command, final List sortExpressions)
 {
 final StringBuffer order = new StringBuffer();
-final int count = groupExpressions.size();
+final int count = sortExpressions.size();
 if (count != 0)
 {
 try
@@ -244,7 +245,7 @@ public class SDBCReportDataFactory implements 
DataSourceFactory
 {
 for (int i = 0; i  count; i++)
 {
-final Object[] pair = (Object[]) 
groupExpressions.get(i);
+final Object[] pair = (Object[]) 
sortExpressions.get(i);
 String expression = (String) pair[0];
 
 if (!expression.startsWith(quote)  
columns.hasByName(expression))
@@ -533,7 +534,7 @@ public class SDBCReportDataFactory implements 
DataSourceFactory
 WrappedTargetException,
 NoSuchElementException
 {
-final StringBuffer order = new 
StringBuffer(getOrderStatement(commandType, command, (ArrayList?) 
parameters.get(GROUP_EXPRESSIONS)));
+final StringBuffer order = new 
StringBuffer(getOrderStatement(commandType, command, (ArrayList?) 
parameters.get(SORT_EXPRESSIONS)));
 if (order.length()  0  commandType != CommandType.TABLE)
 {
 String statement = command;
diff --git 
a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java 
b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
index e1cf4f3..fc8b4ff 100644
--- 

[Libreoffice-commits] core.git: 3 commits - dbaccess/source

2013-03-04 Thread Luc Castermans
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |   95 --
 dbaccess/source/ui/tabledesign/TableUndo.cxx  |   38 +++
 2 files changed, 66 insertions(+), 67 deletions(-)

New commits:
commit 21bbd59a70ae66bcc83397a794d5e8c0aeb687ff
Author: Luc Castermans luc.casterm...@gmail.com
Date:   Sat Mar 2 19:16:26 2013 +0100

ersetzen = replace in stead of translate

Change-Id: I8d355d58c3720201554c68be0c82245383eec1ed

diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 128fa76..ff4e780 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -492,7 +492,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef 
/*rController*/, lon
 
 getDesignView()-fillValidFields(aTable, m_pFieldCell);
 
-// translate with alias.*
+// replace with alias.*
 if ((aField.GetChar(0) == '*')  aTable.Len())
 {
 aField = aTable;
commit c633c4fd2e13adb866b2dcdc87dece4189e82ddc
Author: Luc Castermans luc.casterm...@gmail.com
Date:   Sat Mar 2 15:53:52 2013 +0100

translated German comments

Change-Id: If89452824776c2bd653ca0728cc7e6adf4050e4b

diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx 
b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 75a8879..68d97e3 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -63,7 +63,7 @@ void OTableDesignUndoAct::Undo()
 m_pTabDgnCtrl-m_nCurUndoActId--;
 
 //
-// Wenn erstes Undo zurueckgenommen wurde, ist Doc nicht modifiziert worden
+// doc has not been modified if first undo was reverted
 if( m_pTabDgnCtrl-m_nCurUndoActId == 0 )
 {
 m_pTabDgnCtrl-GetView()-getController().setModified(sal_False);
@@ -77,7 +77,7 @@ void OTableDesignUndoAct::Redo()
 m_pTabDgnCtrl-m_nCurUndoActId++;
 
 //
-// Wenn Redo fuer erste Undo-Action, muss Modified-Flag wieder gesetzt 
werden
+// restore Modifed-flag after Redo of first Undo-action
 if( m_pTabDgnCtrl-m_nCurUndoActId  0 )
 {
 m_pTabDgnCtrl-GetView()-getController().setModified(sal_True);
@@ -95,7 +95,7 @@ OTableDesignCellUndoAct::OTableDesignCellUndoAct( 
OTableRowView* pOwner, long nR
 {
 DBG_CTOR(OTableDesignCellUndoAct,NULL);
 //
-// Text an der Position (m_nRow, m_nCol) auslesen
+// read text at position (m_nRow, m_nCol)
 m_sOldText = m_pTabDgnCtrl-GetCellData( m_nRow, m_nCol );
 }
 
@@ -109,12 +109,12 @@ OTableDesignCellUndoAct::~OTableDesignCellUndoAct()
 void OTableDesignCellUndoAct::Undo()
 {
 //
-// Neuen Text der alten Zelle speichern und alten wieder einsetzen
+// store text at old line and restore the old one
 m_pTabDgnCtrl-ActivateCell( m_nRow, m_nCol );
 m_sNewText = m_pTabDgnCtrl-GetCellData( m_nRow, m_nCol );
 m_pTabDgnCtrl-SetCellData( m_nRow, m_nCol, m_sOldText );
 //
-// Wenn erstes Undo zurueckgenommen wurde, ist Zelle nicht mehr modifiziert
+// line has not been modified if the first Undo was reverted
 if (m_pTabDgnCtrl-GetCurUndoActId() == 1)
 {
 CellControllerRef xController = m_pTabDgnCtrl-Controller();
@@ -131,7 +131,7 @@ void OTableDesignCellUndoAct::Undo()
 void OTableDesignCellUndoAct::Redo()
 {
 //
-// Neuen Text wieder einseten
+// restore new text
 m_pTabDgnCtrl-ActivateCell( m_nRow, m_nCol );
 m_pTabDgnCtrl-SetCellData( m_nRow, m_nCol, m_sNewText );
 
@@ -178,7 +178,7 @@ OTableEditorTypeSelUndoAct::~OTableEditorTypeSelUndoAct()
 void OTableEditorTypeSelUndoAct::Undo()
 {
 //
-// Typ zuruecksetzen
+// restore type
 OFieldDescription* pFieldDesc = pTabEdCtrl-GetFieldDescr(m_nRow);
 if(pFieldDesc)
 m_pNewType = pFieldDesc-getTypeInfo();
@@ -194,7 +194,7 @@ void OTableEditorTypeSelUndoAct::Undo()
 void OTableEditorTypeSelUndoAct::Redo()
 {
 //
-// Neuen Typ
+// new type
 pTabEdCtrl-GoToRowColumnId( m_nRow ,m_nCol);
 pTabEdCtrl-SetCellData(m_nRow,m_nCol,m_pNewType);
 
@@ -210,7 +210,7 @@ OTableEditorDelUndoAct::OTableEditorDelUndoAct( 
OTableEditorCtrl* pOwner) :
 {
 DBG_CTOR(OTableEditorDelUndoAct,NULL);
 //
-// DeletedRowList fuellen
+// fill DeletedRowList