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

2023-11-29 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/app/AppDetailPageHelper.cxx |2 +-
 ucb/source/ucp/cmis/cmis_content.cxx   |6 ++
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 66452607f5cbd81570442e646f76eff343cf0986
Author: Caolán McNamara 
AuthorDate: Tue Nov 28 09:54:56 2023 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 29 09:37:46 2023 +0100

cid#1554867 silence Out-of-bounds access

Change-Id: I11acf38f1243e1eea180b478055f12839c58f551
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160015
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx 
b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index a649420a8c00..c4adb2f45935 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -761,7 +761,7 @@ void OAppDetailPageHelper::elementReplaced(ElementType 
eType,
 std::unique_ptr OAppDetailPageHelper::elementAdded(ElementType 
_eType,const OUString& _rName, const Any& _rObject )
 {
 std::unique_ptr xRet;
-DBTreeViewBase* pTreeView = m_aLists[_eType].get();
+DBTreeViewBase* pTreeView = _eType != E_NONE ? m_aLists[_eType].get() : 
nullptr;
 if (!pTreeView)
 return xRet;
 weld::TreeView& rTreeView = pTreeView->GetWidget();
commit 509c3e3d2afa12392c521c382fb70c43d0a5
Author: Caolán McNamara 
AuthorDate: Tue Nov 28 09:28:59 2023 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 29 09:37:36 2023 +0100

cid#1557589 Use of auto that causes a copy

Change-Id: Ie2c790420ce5fe2e2804f33ff552c2252dc0cc0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160014
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 1a499e1bdb3c..d07e389d2b05 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1087,15 +1087,13 @@ namespace cmis
 std::vector< std::string > aPaths = pDoc->getPaths( );
 if ( !aPaths.empty() )
 {
-auto sPath = aPaths.front( );
-aCmisUrl.setObjectPath( STD_TO_OUSTR( sPath ) );
+aCmisUrl.setObjectPath(STD_TO_OUSTR(aPaths.front()));
 }
 else
 {
 // We may have unfiled document depending on the server, those
 // won't have any path, use their ID instead
-auto sId = pDoc->getId( );
-aCmisUrl.setObjectId( STD_TO_OUSTR( sId ) );
+aCmisUrl.setObjectId(STD_TO_OUSTR(pDoc->getId()));
 }
 return aCmisUrl.asString( );
 }


[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source editeng/source filter/source fpicker/source framework/source

2023-11-18 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/browser/genericcontroller.cxx  |   10 +
 dbaccess/source/ui/dlg/adtabdlg.cxx   |5 +-
 dbaccess/source/ui/querydesign/JoinController.cxx |2 -
 dbaccess/source/ui/querydesign/QueryTableView.cxx |6 +--
 dbaccess/source/ui/relationdesign/RelationTableView.cxx   |4 +-
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx   |5 +-
 desktop/source/deployment/registry/component/dp_component.cxx |2 -
 desktop/source/lib/init.cxx   |   19 --
 desktop/source/lib/lokclipboard.cxx   |3 -
 editeng/source/editeng/editdoc.cxx|2 -
 filter/source/config/cache/filterfactory.cxx  |6 +--
 fpicker/source/office/fileview.cxx|5 +-
 framework/source/services/desktop.cxx |4 --
 framework/source/services/pathsettings.cxx|5 +-
 14 files changed, 30 insertions(+), 48 deletions(-)

New commits:
commit 4bbd9853afde9456c1c5bc16eca3b775e53a01fe
Author: Julien Nabet 
AuthorDate: Sat Nov 18 13:15:01 2023 +0100
Commit: Julien Nabet 
CommitDate: Sat Nov 18 18:38:36 2023 +0100

c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 4)

Change-Id: I6af5501e3fde07024dcc74f00c8fd69bd369d8d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159613
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 9841d7854c32..7a5d70b34567 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -3009,7 +3009,7 @@ public:
 void CharAttribList::DeleteEmptyAttribs( SfxItemPool& rItemPool )
 {
 std::for_each(aAttribs.begin(), aAttribs.end(), 
RemoveEmptyAttrItem(rItemPool));
-aAttribs.erase( std::remove_if(aAttribs.begin(), aAttribs.end(), [](const 
std::unique_ptr& aAttrib) { return aAttrib->IsEmpty(); } ), 
aAttribs.end() );
+std::erase_if(aAttribs, [](const std::unique_ptr& aAttrib) 
{ return aAttrib->IsEmpty(); } );
 bHasEmptyAttribs = false;
 }
 
diff --git a/filter/source/config/cache/filterfactory.cxx 
b/filter/source/config/cache/filterfactory.cxx
index 481dac67a7c3..1c6fadca6c86 100644
--- a/filter/source/config/cache/filterfactory.cxx
+++ b/filter/source/config/cache/filterfactory.cxx
@@ -443,13 +443,11 @@ std::vector 
FilterFactory::impl_getSortedFilterListForModule(const OUS
 // remove all filters from this merged list, which does not fit the flag 
specification
 if (nIFlags != -1)
 {
-auto pItToErase = ::std::remove_if(lMergedFilters.begin(), 
lMergedFilters.end(), stlcomp_removeIfMatchFlags(pCache, nIFlags, true));
-lMergedFilters.erase(pItToErase, lMergedFilters.end());
+std::erase_if(lMergedFilters, stlcomp_removeIfMatchFlags(pCache, 
nIFlags, true));
 }
 if (nEFlags != -1)
 {
-auto pItToErase = ::std::remove_if(lMergedFilters.begin(), 
lMergedFilters.end(), stlcomp_removeIfMatchFlags(pCache, nEFlags, false));
-lMergedFilters.erase(pItToErase, lMergedFilters.end());
+std::erase_if(lMergedFilters, stlcomp_removeIfMatchFlags(pCache, 
nEFlags, false));
 }
 
 // sort the default filter to the front of this list
diff --git a/fpicker/source/office/fileview.cxx 
b/fpicker/source/office/fileview.cxx
index ebc3ee3b8b18..1fa1c4dafcd3 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -1304,7 +1304,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( 
std::u16string_view rFilter )
 
 
 // do the filtering
-maContent.erase(std::remove_if(maContent.begin(), maContent.end(),
+std::erase_if(maContent,
 [](const std::unique_ptr& rxContent) {
 if (rxContent->mbIsFolder)
 return false;
@@ -1312,8 +1312,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( 
std::u16string_view rFilter )
 // 91872 - 11.09.2001 - frank.schoenh...@sun.com
 OUString sCompareString = rxContent->GetFileName(); // filter 
works on file name, not on title!
 return std::none_of(aFilters.begin(), aFilters.end(), 
FilterMatch(sCompareString));
-}),
-maContent.end());
+});
 }
 
 IMPL_LINK_NOARG(SvtFileView_Impl, ChangedHdl, weld::TreeView&, void)
diff --git a/framework/source/services/desktop.cxx 
b/framework/source/services/desktop.cxx
index 35dfcd2e21eb..237d35afc6a5 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -443,9 +443,7 @@ void SAL_CALL Desktop::removeTerminateListener( const 
css::uno::Reference< css::
 }
 else if (sImplementationName == 
"com.sun.star.comp.ComponentDLLListener")
 {
-m_xComponentDllListeners.erase(
-

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

2023-03-05 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/dataaccess/documentdefinition.cxx |   13 
 vcl/inc/dndlistenercontainer.hxx   |   10 
 vcl/source/window/dndlistenercontainer.cxx |  419 +++--
 3 files changed, 204 insertions(+), 238 deletions(-)

New commits:
commit db02d2e1a74973cfb467c2f5bb12845bfdf37302
Author: Noel Grandin 
AuthorDate: Sun Mar 5 15:58:01 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 6 06:43:02 2023 +

BaseMutex->std::mutex in DNDListenerContainer

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

diff --git a/vcl/inc/dndlistenercontainer.hxx b/vcl/inc/dndlistenercontainer.hxx
index 870cc05dfacb..5a2f0571ca7a 100644
--- a/vcl/inc/dndlistenercontainer.hxx
+++ b/vcl/inc/dndlistenercontainer.hxx
@@ -26,7 +26,8 @@
 #include 
 #include 
 #include 
-#include 
+#include 
+#include 
 
 #include 
 
@@ -53,8 +54,8 @@ public:
 virtual void SAL_CALL rejectDrag() override;
 };
 
-class DNDListenerContainer final : public cppu::BaseMutex,
-public ::cppu::WeakComponentImplHelper<
+class DNDListenerContainer final :
+public ::comphelper::WeakComponentImplHelper<
 css::datatransfer::dnd::XDragGestureRecognizer,
 css::datatransfer::dnd::XDropTargetDragContext,
 css::datatransfer::dnd::XDropTargetDropContext,
@@ -62,7 +63,8 @@ class DNDListenerContainer final : public cppu::BaseMutex,
 {
 bool m_bActive;
 sal_Int8 m_nDefaultActions;
-
+
comphelper::OInterfaceContainerHelper4
 maDragGestureListeners;
+
comphelper::OInterfaceContainerHelper4
 maDropTargetListeners;
 css::uno::Reference< css::datatransfer::dnd::XDropTargetDragContext > 
m_xDropTargetDragContext;
 css::uno::Reference< css::datatransfer::dnd::XDropTargetDropContext > 
m_xDropTargetDropContext;
 
diff --git a/vcl/source/window/dndlistenercontainer.cxx 
b/vcl/source/window/dndlistenercontainer.cxx
index d3147aac5288..fdc7c40c810e 100644
--- a/vcl/source/window/dndlistenercontainer.cxx
+++ b/vcl/source/window/dndlistenercontainer.cxx
@@ -25,7 +25,6 @@ using namespace ::com::sun::star::datatransfer;
 using namespace ::com::sun::star::datatransfer::dnd;
 
 DNDListenerContainer::DNDListenerContainer( sal_Int8 nDefaultActions )
-: WeakComponentImplHelper< XDragGestureRecognizer, XDropTargetDragContext, 
XDropTargetDropContext, XDropTarget >(m_aMutex)
 {
 m_bActive = true;
 m_nDefaultActions = nDefaultActions;
@@ -37,12 +36,14 @@ DNDListenerContainer::~DNDListenerContainer()
 
 void SAL_CALL DNDListenerContainer::addDragGestureListener( const Reference< 
XDragGestureListener >& dgl )
 {
-rBHelper.addListener( cppu::UnoType::get(), dgl );
+std::unique_lock g(m_aMutex);
+maDragGestureListeners.addInterface( g, dgl );
 }
 
 void SAL_CALL DNDListenerContainer::removeDragGestureListener( const 
Reference< XDragGestureListener >& dgl )
 {
-rBHelper.removeListener( cppu::UnoType::get(), dgl );
+std::unique_lock g(m_aMutex);
+maDragGestureListeners.removeInterface( g, dgl );
 }
 
 void SAL_CALL DNDListenerContainer::resetRecognizer(  )
@@ -51,12 +52,14 @@ void SAL_CALL DNDListenerContainer::resetRecognizer(  )
 
 void SAL_CALL DNDListenerContainer::addDropTargetListener( const Reference< 
XDropTargetListener >& dtl )
 {
-rBHelper.addListener( cppu::UnoType::get(), dtl );
+std::unique_lock g(m_aMutex);
+maDropTargetListeners.addInterface( g, dtl );
 }
 
 void SAL_CALL DNDListenerContainer::removeDropTargetListener( const Reference< 
XDropTargetListener >& dtl )
 {
-rBHelper.removeListener( cppu::UnoType::get(), dtl );
+std::unique_lock g(m_aMutex);
+maDropTargetListeners.removeInterface( g, dtl );
 }
 
 sal_Bool SAL_CALL DNDListenerContainer::isActive(  )
@@ -83,65 +86,57 @@ sal_uInt32 DNDListenerContainer::fireDropEvent( const 
Reference< XDropTargetDrop
 sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 
sourceActions,
 const Reference< XTransferable >& transferable )
 {
-sal_uInt32 nRet = 0;
+std::unique_lock g(m_aMutex);
+if (!m_bActive || maDropTargetListeners.getLength(g) == 0)
+return 0;
 
-// fire DropTargetDropEvent on all XDropTargetListeners
-OInterfaceContainerHelper *pContainer = rBHelper.getContainer( 
cppu::UnoType::get());
+sal_uInt32 nRet = 0;
 
-if( pContainer && m_bActive )
-{
-OInterfaceIteratorHelper aIterator( *pContainer );
+comphelper::OInterfaceIteratorHelper4 aIterator( g, maDropTargetListeners 
);
 
-// remember context to use in own context methods
-m_xDropTargetDropContext = context;
+// remember context to use in own context methods
+m_xDropTargetDropContext = context;
 
-// do not construct the event before you are sure at least one 
listener is registered
-DropTargetDropEvent 

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

2023-03-05 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/inc/PropertyForward.hxx  |6 +++---
 dbaccess/source/core/misc/PropertyForward.cxx |6 +++---
 sdext/source/pdfimport/filterdet.cxx  |3 +--
 sdext/source/pdfimport/filterdet.hxx  |7 +++
 4 files changed, 10 insertions(+), 12 deletions(-)

New commits:
commit b0244ef9e44c5c1dc9faf9705f2ae1dba499d62c
Author: Noel Grandin 
AuthorDate: Sun Mar 5 15:27:13 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 6 06:42:38 2023 +

BaseMutex->std::mutex in OPropertyForward

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

diff --git a/dbaccess/source/core/inc/PropertyForward.hxx 
b/dbaccess/source/core/inc/PropertyForward.hxx
index daf31758d000..ec51c672544a 100644
--- a/dbaccess/source/core/inc/PropertyForward.hxx
+++ b/dbaccess/source/core/inc/PropertyForward.hxx
@@ -23,8 +23,8 @@
 #include 
 #include 
 #include 
-#include 
 
+#include 
 #include 
 
 namespace dbaccess
@@ -33,9 +33,9 @@ namespace dbaccess
 // OPropertyForward
 typedef ::cppu::WeakImplHelper<   css::beans::XPropertyChangeListener
   >   OPropertyForward_Base;
-class OPropertyForward  :public ::cppu::BaseMutex
-,public OPropertyForward_Base
+class OPropertyForward : public OPropertyForward_Base
 {
+std::mutex m_aMutex;
 css::uno::Reference< css::beans::XPropertySet >   m_xSource;
 css::uno::Reference< css::beans::XPropertySet >   m_xDest;
 css::uno::Reference< css::beans::XPropertySetInfo >   m_xDestInfo;
diff --git a/dbaccess/source/core/misc/PropertyForward.cxx 
b/dbaccess/source/core/misc/PropertyForward.cxx
index 07e1068f695f..b02ce82cea53 100644
--- a/dbaccess/source/core/misc/PropertyForward.cxx
+++ b/dbaccess/source/core/misc/PropertyForward.cxx
@@ -69,7 +69,7 @@ namespace dbaccess
 
 void SAL_CALL OPropertyForward::propertyChange( const PropertyChangeEvent& 
evt )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( !m_xDestContainer.is() )
 throw DisposedException( OUString(), *this );
@@ -111,7 +111,7 @@ namespace dbaccess
 
 void SAL_CALL OPropertyForward::disposing( const css::lang::EventObject& 
/*_rSource*/ )
 {
-::osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 
 if ( !m_xSource.is() )
 throw DisposedException( OUString(), *this );
@@ -125,7 +125,7 @@ namespace dbaccess
 
 void OPropertyForward::setDefinition( const css::uno::Reference< 
css::beans::XPropertySet>& _xDest )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 if ( m_bInInsert )
 return;
 
commit 43860c10b7d776a7767ef81b1cc833c35feea3c2
Author: Noel Grandin 
AuthorDate: Sun Mar 5 16:00:03 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 6 06:42:25 2023 +

BaseMutex->std::mutex in PDFDetector

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

diff --git a/sdext/source/pdfimport/filterdet.cxx 
b/sdext/source/pdfimport/filterdet.cxx
index 69aa90a26b9b..f6356d8676e8 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -184,7 +184,6 @@ unsigned int FileEmitContext::readOrigBytes( unsigned int 
nOrigOffset, unsigned
 
 
 PDFDetector::PDFDetector( uno::Reference< uno::XComponentContext > xContext) :
-PDFDetectorBase( m_aMutex ),
 m_xContext(std::move( xContext ))
 {}
 
@@ -287,7 +286,7 @@ bool copyToTemp(uno::Reference const& 
xInput, oslFileHandle& r
 // XExtendedFilterDetection
 OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue >& 
rFilterData )
 {
-osl::MutexGuard const guard( m_aMutex );
+std::unique_lock guard( m_aMutex );
 bool bSuccess = false;
 
 // get the InputStream carrying the PDF content
diff --git a/sdext/source/pdfimport/filterdet.hxx 
b/sdext/source/pdfimport/filterdet.hxx
index c5f8b0d58772..48bc8ca4e12a 100644
--- a/sdext/source/pdfimport/filterdet.hxx
+++ b/sdext/source/pdfimport/filterdet.hxx
@@ -24,18 +24,17 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 
 
 namespace pdfi
 {
 
-typedef ::cppu::WeakComponentImplHelper<
+typedef ::comphelper::WeakComponentImplHelper<
 css::document::XExtendedFilterDetection, css::lang::XServiceInfo> 
PDFDetectorBase;
 
-class PDFDetector : private cppu::BaseMutex,
-public PDFDetectorBase
+class PDFDetector : public PDFDetectorBase
 {
 private:
 css::uno::Reference<


[Libreoffice-commits] core.git: 2 commits - dbaccess/source framework/source include/dbaccess include/framework

2023-03-03 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/browser/genericcontroller.cxx  |   58 ++-
 framework/source/fwe/helper/documentundoguard.cxx |   67 ++
 include/dbaccess/genericcontroller.hxx|7 +-
 include/framework/documentundoguard.hxx   |   11 +--
 4 files changed, 39 insertions(+), 104 deletions(-)

New commits:
commit df182c7e4235513916204a4dc4aec6ec6e4c746b
Author: Noel Grandin 
AuthorDate: Fri Mar 3 14:02:29 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 3 13:44:22 2023 +

flatten OGenericUnoController

rather than having a confusing mix of pimpl pattern and inline fields

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

diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx 
b/dbaccess/source/ui/browser/genericcontroller.cxx
index a5c8afbb306b..654ad2ff1525 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -37,7 +37,6 @@
 #include 
 
 #include 
-#include 
 
 #include 
 #include 
@@ -73,32 +72,11 @@ typedef std::unordered_map< sal_Int16, sal_Int16 > 
CommandHashMap;
 namespace dbaui
 {
 
-namespace {
-
-// UserDefinedFeatures
-class UserDefinedFeatures
-{
-public:
-explicit UserDefinedFeatures( const Reference< XController >& 
_rxController );
-
-voidexecute( const URL& _rFeatureURL, const Sequence< 
PropertyValue>& _rArgs );
-
-private:
-css::uno::WeakReference< XController > m_aController;
-};
-
-}
-
-UserDefinedFeatures::UserDefinedFeatures( const Reference< XController >& 
_rxController )
-:m_aController( _rxController )
-{
-}
-
-void UserDefinedFeatures::execute( const URL& _rFeatureURL, const Sequence< 
PropertyValue>& _rArgs )
+void OGenericUnoController::executeUserDefinedFeatures( const URL& 
_rFeatureURL, const Sequence< PropertyValue>& _rArgs )
 {
 try
 {
-Reference< XController > xController( Reference< XController 
>(m_aController), UNO_SET_THROW );
+Reference< XController > xController( getXController(), UNO_SET_THROW 
);
 Reference< XDispatchProvider > xDispatchProvider( 
xController->getFrame(), UNO_QUERY_THROW );
 Reference< XDispatch > xDispatch( xDispatchProvider->queryDispatch(
 _rFeatureURL,
@@ -121,22 +99,10 @@ void UserDefinedFeatures::execute( const URL& 
_rFeatureURL, const Sequence< Prop
 }
 }
 
-// OGenericUnoController_Data
-struct OGenericUnoController_Data
-{
-::sfx2::UserInputInterception   m_aUserInputInterception;
-UserDefinedFeatures m_aUserDefinedFeatures;
-
-OGenericUnoController_Data( OGenericUnoController& _rController, 
::osl::Mutex& _rMutex )
-:m_aUserInputInterception( _rController, _rMutex )
-,m_aUserDefinedFeatures( _rController.getXController() )
-{
-}
-};
-
 // OGenericUnoController
 OGenericUnoController::OGenericUnoController(const Reference< 
XComponentContext >& _rM)
 :OGenericUnoController_Base( getMutex() )
+,m_aUserInputInterception(*this, getMutex())
 ,m_pView(nullptr)
 #ifdef DBG_UTIL
 ,m_bDescribingSupportedFeatures( false )
@@ -150,12 +116,6 @@ OGenericUnoController::OGenericUnoController(const 
Reference< XComponentContext
 ,m_bCurrentlyModified(false)
 ,m_bExternalTitle(false)
 {
-osl_atomic_increment( _refCount );
-{
-m_pData.reset( new OGenericUnoController_Data( *this, getMutex() ) );
-}
-osl_atomic_decrement( _refCount );
-
 
 try
 {
@@ -815,7 +775,7 @@ void OGenericUnoController::Execute( sal_uInt16 _nId, const 
Sequence< PropertyVa
 
 // user defined features can be handled by dispatch interceptors resp. 
protocol handlers only.
 // So, we need to do a queryDispatch, and dispatch the URL
-m_pData->m_aUserDefinedFeatures.execute( getURLForId( _nId ), _rArgs );
+executeUserDefinedFeatures( getURLForId( _nId ), _rArgs );
 }
 
 URL OGenericUnoController::getURLForId(sal_Int32 _nId) const
@@ -1102,23 +1062,23 @@ void SAL_CALL 
OGenericUnoController::removeTitleChangeListener(const Reference<
 void SAL_CALL OGenericUnoController::addKeyHandler( const Reference< 
XKeyHandler >& _rxHandler )
 {
 if ( _rxHandler.is() )
-m_pData->m_aUserInputInterception.addKeyHandler( _rxHandler );
+m_aUserInputInterception.addKeyHandler( _rxHandler );
 }
 
 void SAL_CALL OGenericUnoController::removeKeyHandler( const Reference< 
XKeyHandler >& _rxHandler )
 {
-m_pData->m_aUserInputInterception.removeKeyHandler( _rxHandler );
+m_aUserInputInterception.removeKeyHandler( _rxHandler );
 }
 
 void SAL_CALL OGenericUnoController::addMouseClickHandler( const Reference< 
XMouseClickHandler >& _rxHandler )
 {
 if ( _rxHandler.is() )
-m_pData->m_aUserInputInterception.addMouseClickHandler( _rxHandler );
+m_aUserInputInterception.addMouseClickHandler( 

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

2023-02-28 Thread Noel Grandin (via logerrit)
 dbaccess/source/sdbtools/connection/tablename.cxx |   33 --
 dbaccess/source/sdbtools/connection/tablename.hxx |8 ++---
 sfx2/source/appl/appdde.cxx   |   22 ++
 sfx2/source/inc/appdata.hxx   |4 --
 4 files changed, 27 insertions(+), 40 deletions(-)

New commits:
commit c026b936404bd052fc74283d3cc2e0727ec4edb9
Author: Noel Grandin 
AuthorDate: Tue Feb 28 13:52:19 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Feb 28 16:57:52 2023 +

no need to allocate SfxDdeDocTopics_Impl separately

it is just a vector, only 2 words big

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

diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 39b72e6eb0b3..6fe5888009dc 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -414,8 +414,6 @@ bool SfxApplication::InitializeDde()
 nError = pImpl->pDdeService->GetError();
 if( !nError )
 {
-pImpl->pDocTopics.reset(new SfxDdeDocTopics_Impl);
-
 // we certainly want to support RTF!
 pImpl->pDdeService->AddFormat( SotClipboardFormatId::RTF );
 pImpl->pDdeService->AddFormat( SotClipboardFormatId::RICHTEXT );
@@ -438,7 +436,7 @@ void SfxAppData_Impl::DeInitDDE()
 {
 pTriggerTopic.reset();
 pDdeService2.reset();
-pDocTopics.reset();
+maDocTopics.clear();
 pDdeService.reset();
 }
 
@@ -446,15 +444,15 @@ void SfxAppData_Impl::DeInitDDE()
 void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
 {
 //OV: DDE is disconnected in server mode!
-if( !pImpl->pDocTopics )
+if( pImpl->maDocTopics.empty() )
 return;
 
 // prevent double submit
 OUString sShellNm;
 bool bFnd = false;
-for (size_t n = pImpl->pDocTopics->size(); n;)
+for (size_t n = pImpl->maDocTopics.size(); n;)
 {
-if( (*pImpl->pDocTopics)[ --n ]->pSh == pSh )
+if( pImpl->maDocTopics[ --n ]->pSh == pSh )
 {
 // If the document is untitled, is still a new Topic is created!
 if( !bFnd )
@@ -462,14 +460,14 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
 bFnd = true;
 sShellNm = 
pSh->GetTitle(SFX_TITLE_FULLNAME).toAsciiLowerCase();
 }
-OUString sNm( (*pImpl->pDocTopics)[ n ]->GetName() );
+OUString sNm( pImpl->maDocTopics[ n ]->GetName() );
 if( sShellNm == sNm.toAsciiLowerCase() )
 return ;
 }
 }
 
 SfxDdeDocTopic_Impl *const pTopic = new SfxDdeDocTopic_Impl(pSh);
-pImpl->pDocTopics->push_back(pTopic);
+pImpl->maDocTopics.push_back(pTopic);
 pImpl->pDdeService->AddTopic( *pTopic );
 }
 #endif
@@ -478,17 +476,17 @@ void SfxApplication::RemoveDdeTopic( SfxObjectShell const 
* pSh )
 {
 #if defined(_WIN32)
 //OV: DDE is disconnected in server mode!
-if( !pImpl->pDocTopics )
+if( pImpl->maDocTopics.empty() )
 return;
 
-for (size_t n = pImpl->pDocTopics->size(); n; )
+for (size_t n = pImpl->maDocTopics.size(); n; )
 {
-SfxDdeDocTopic_Impl *const pTopic = (*pImpl->pDocTopics)[ --n ];
+SfxDdeDocTopic_Impl *const pTopic = pImpl->maDocTopics[ --n ];
 if (pTopic->pSh == pSh)
 {
 pImpl->pDdeService->RemoveTopic( *pTopic );
 delete pTopic;
-pImpl->pDocTopics->erase( pImpl->pDocTopics->begin() + n );
+pImpl->maDocTopics.erase( pImpl->maDocTopics.begin() + n );
 }
 }
 #else
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
index 121ba43f5581..7f2c99d6332a 100644
--- a/sfx2/source/inc/appdata.hxx
+++ b/sfx2/source/inc/appdata.hxx
@@ -56,8 +56,6 @@ namespace sfx2::sidebar { class Theme; }
 
 
 
-typedef std::vector SfxDdeDocTopics_Impl;
-
 class SfxAppData_Impl
 {
 public:
@@ -66,7 +64,7 @@ public:
 
 // DDE stuff
 std::unique_ptr  pDdeService;
-std::unique_ptrpDocTopics;
+std::vectormaDocTopics;
 std::unique_ptr pTriggerTopic;
 std::unique_ptr  pDdeService2;
 
commit d7182c36be4b606a02cddeacb44c1b63387bd368
Author: Noel Grandin 
AuthorDate: Tue Feb 28 14:10:25 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Feb 28 16:57:39 2023 +

no need for pimpl in TableName

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

diff --git a/dbaccess/source/sdbtools/connection/tablename.cxx 
b/dbaccess/source/sdbtools/connection/tablename.cxx
index 2b275c0f31eb..f6a77dd3e91b 100644
--- a/dbaccess/source/sdbtools/connection/tablename.cxx
+++ b/dbaccess/source/sdbtools/connection/tablename.cxx
@@ -50,18 +50,9 @@ namespace sdbtools
 
 using namespace 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/dbaccess sd/source

2023-02-18 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/browser/genericcontroller.cxx |   12 ++--
 include/dbaccess/genericcontroller.hxx   |3 ++-
 sd/source/ui/tools/SdGlobalResourceContainer.cxx |   11 ++-
 3 files changed, 14 insertions(+), 12 deletions(-)

New commits:
commit a979535eeb1630334b60eea98be2c2fabec56c23
Author: Noel Grandin 
AuthorDate: Fri Feb 17 13:25:39 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Feb 18 20:40:17 2023 +

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

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

diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx 
b/dbaccess/source/ui/browser/genericcontroller.cxx
index 5c4423227784..a5c8afbb306b 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -459,7 +459,7 @@ void OGenericUnoController::InvalidateFeature_Impl()
 bool bEmpty = true;
 FeatureListener aNextFeature;
 {
-::osl::MutexGuard aGuard( m_aFeatureMutex);
+std::unique_lock aGuard( m_aFeatureMutex);
 bEmpty = m_aFeaturesToInvalidate.empty();
 if (!bEmpty)
 aNextFeature = m_aFeaturesToInvalidate.front();
@@ -492,7 +492,7 @@ void OGenericUnoController::InvalidateFeature_Impl()
 ImplBroadcastFeatureState( aFeaturePos->first, 
aNextFeature.xListener, aNextFeature.bForceBroadcast );
 }
 
-::osl::MutexGuard aGuard( m_aFeatureMutex);
+std::unique_lock aGuard( m_aFeatureMutex);
 m_aFeaturesToInvalidate.pop_front();
 bEmpty = m_aFeaturesToInvalidate.empty();
 if (!bEmpty)
@@ -521,7 +521,7 @@ void OGenericUnoController::ImplInvalidateFeature( 
sal_Int32 _nId, const Referen
 
 bool bWasEmpty;
 {
-::osl::MutexGuard aGuard( m_aFeatureMutex );
+std::unique_lock aGuard( m_aFeatureMutex );
 bWasEmpty = m_aFeaturesToInvalidate.empty();
 m_aFeaturesToInvalidate.push_back( aListener );
 }
@@ -547,7 +547,7 @@ void OGenericUnoController::InvalidateAll_Impl()
 ImplBroadcastFeatureState( supportedFeature.first, nullptr, true );
 
 {
-::osl::MutexGuard aGuard( m_aFeatureMutex);
+std::unique_lock aGuard( m_aFeatureMutex);
 OSL_ENSURE(m_aFeaturesToInvalidate.size(), 
"OGenericUnoController::InvalidateAll_Impl: to be called from within 
InvalidateFeature_Impl only!");
 m_aFeaturesToInvalidate.pop_front();
 if(!m_aFeaturesToInvalidate.empty())
@@ -680,7 +680,7 @@ void OGenericUnoController::removeStatusListener(const 
Reference< XStatusListene
 }
 
 // now remove the listener from the deque
-::osl::MutexGuard aGuard( m_aFeatureMutex );
+std::unique_lock aGuard( m_aFeatureMutex );
 m_aFeaturesToInvalidate.erase(
 std::remove_if(   m_aFeaturesToInvalidate.begin(),
 m_aFeaturesToInvalidate.end(),
@@ -717,7 +717,7 @@ void OGenericUnoController::disposing()
 
 m_xDatabaseContext = nullptr;
 {
-::osl::MutexGuard aGuard( m_aFeatureMutex);
+std::unique_lock aGuard( m_aFeatureMutex);
 m_aAsyncInvalidateAll.CancelCall();
 m_aFeaturesToInvalidate.clear();
 }
diff --git a/include/dbaccess/genericcontroller.hxx 
b/include/dbaccess/genericcontroller.hxx
index 0eb6a94ad703..6ef9393c2f9a 100644
--- a/include/dbaccess/genericcontroller.hxx
+++ b/include/dbaccess/genericcontroller.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -233,7 +234,7 @@ namespace dbaui
 ::std::deque< FeatureListener >
 m_aFeaturesToInvalidate;
 
-::osl::Mutexm_aFeatureMutex;// locked when 
features are append to or remove from deque
+std::mutex  m_aFeatureMutex;// locked when 
features are append to or remove from deque
 StateCache  m_aStateCache;  // save the current 
status of feature state
 Dispatchm_arrStatusListener;// all our listeners 
where we dispatch status changes
 OAsynchronousLink   m_aAsyncInvalidateAll;
commit 4a4223f924d4ec49b023a85ce37f3788bc699723
Author: Noel Grandin 
AuthorDate: Fri Feb 17 15:05:54 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Feb 18 20:40:05 2023 +

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

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

diff --git a/sd/source/ui/tools/SdGlobalResourceContainer.cxx 
b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
index a7dbc5f25920..7f692caa157c 100644
--- a/sd/source/ui/tools/SdGlobalResourceContainer.cxx
+++ b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
@@ -31,6 +31,7 @@
 

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

2023-01-28 Thread Stephan Bergmann (via logerrit)
 dbaccess/source/ui/inc/ConnectionLineAccess.hxx |   25 +++-
 dbaccess/source/ui/inc/JAccess.hxx  |   10 +-
 dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx |   12 ---
 dbaccess/source/ui/querydesign/JAccess.cxx  |6 ---
 4 files changed, 9 insertions(+), 44 deletions(-)

New commits:
commit 8bf1ba09408d42dbc0798aedb96ab387353f9eed
Author: Stephan Bergmann 
AuthorDate: Fri Jan 27 13:42:45 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Jan 28 17:42:50 2023 +

Use ImplInheritanceHelper in OJoinDesignViewAccess

Change-Id: Ib67e03aeea4df67fc7a7b5db5d8cfdd9e57f87f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146271
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/dbaccess/source/ui/inc/JAccess.hxx 
b/dbaccess/source/ui/inc/JAccess.hxx
index 4416f42d6292..6d0d52ec0233 100644
--- a/dbaccess/source/ui/inc/JAccess.hxx
+++ b/dbaccess/source/ui/inc/JAccess.hxx
@@ -20,18 +20,16 @@
 
 #include "JoinTableView.hxx"
 #include 
-#include 
+#include 
 #include 
 
 namespace dbaui
 {
 class OJoinTableView;
-typedef ::cppu::ImplHelper1< css::accessibility::XAccessible
-> OJoinDesignViewAccess_BASE;
 /** the class OJoinDesignViewAccess represents the accessible object for 
join views
 like the QueryDesign and the RelationDesign
 */
-class OJoinDesignViewAccess :   public VCLXAccessibleComponent, public 
OJoinDesignViewAccess_BASE
+class OJoinDesignViewAccess :   public 
cppu::ImplInheritanceHelper
 {
 VclPtr m_pTableView; // the window which I should give 
accessibility to
 
@@ -40,10 +38,6 @@ namespace dbaui
 */
 OJoinDesignViewAccess(  OJoinTableView* _pTableView);
 
-// XInterface
-DECLARE_XINTERFACE( )
-DECLARE_XTYPEPROVIDER( )
-
 virtual OUString SAL_CALL getImplementationName() override;
 
 // XAccessible
diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx 
b/dbaccess/source/ui/querydesign/JAccess.cxx
index 277a6f9c3426..b67d31c30982 100644
--- a/dbaccess/source/ui/querydesign/JAccess.cxx
+++ b/dbaccess/source/ui/querydesign/JAccess.cxx
@@ -33,7 +33,7 @@ namespace dbaui
 using namespace ::com::sun::star::lang;
 
 OJoinDesignViewAccess::OJoinDesignViewAccess(OJoinTableView* _pTableView)
-:VCLXAccessibleComponent(_pTableView->GetComponentInterface().is() ? 
_pTableView->GetWindowPeer() : nullptr)
+:ImplInheritanceHelper(_pTableView->GetComponentInterface().is() ? 
_pTableView->GetWindowPeer() : nullptr)
 ,m_pTableView(_pTableView)
 {
 }
@@ -82,10 +82,6 @@ namespace dbaui
 {
 return this;
 }
-// XInterface
-IMPLEMENT_FORWARD_XINTERFACE2( OJoinDesignViewAccess, 
VCLXAccessibleComponent, OJoinDesignViewAccess_BASE )
-// XTypeProvider
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( OJoinDesignViewAccess, 
VCLXAccessibleComponent, OJoinDesignViewAccess_BASE )
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 03ac752ca513305cb7504f5bfda701d93e2179f0
Author: Stephan Bergmann 
AuthorDate: Fri Jan 27 13:40:38 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Jan 28 17:42:40 2023 +

Use ImplInheritanceHelper in OConnectionLineAccess

Change-Id: Ib9b1f2c4dc9a8b6190ccfcffbf25e270d5322050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146270
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx 
b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
index ebbfee97d435..5e14186b0765 100644
--- a/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
+++ b/dbaccess/source/ui/inc/ConnectionLineAccess.hxx
@@ -20,21 +20,20 @@
 
 #include "TableConnection.hxx"
 #include 
-#include 
+#include 
 #include 
 #include 
 
 namespace dbaui
 {
-typedef ::cppu::ImplHelper2< css::accessibility::XAccessibleRelationSet,
- css::accessibility::XAccessible
-> OConnectionLineAccess_BASE;
 class OTableConnection;
 /** the class OConnectionLineAccess represents the accessible object for 
the connection between two table windows
 like they are used in the QueryDesign and the RelationDesign
 */
-class OConnectionLineAccess :   public VCLXAccessibleComponent
-,   public OConnectionLineAccess_BASE
+class OConnectionLineAccess :   public cppu::ImplInheritanceHelper<
+VCLXAccessibleComponent,
+
css::accessibility::XAccessibleRelationSet,
+css::accessibility::XAccessible>
 {
 VclPtr m_pLine; // the window 
which I should give accessibility to
 protected:
@@ -45,20 +44,6 @@ namespace dbaui
 public:

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

2023-01-16 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/api/RowSet.cxx  |   28 +--
 dbaccess/source/core/api/RowSet.hxx  |8 ---
 dbaccess/source/core/api/RowSetBase.hxx  |8 ++-
 dbaccess/source/core/api/querydescriptor.cxx |   16 ---
 dbaccess/source/core/api/querydescriptor.hxx |   12 +--
 5 files changed, 7 insertions(+), 65 deletions(-)

New commits:
commit 0045c49cf4389efe6cb369759fa2b9e6de938bd8
Author: Noel Grandin 
AuthorDate: Sat Jan 14 09:19:58 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Jan 16 18:41:37 2023 +

XUnoTunnel->dynamic_cast in ORowSetBase

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

diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index ed47c1657eba..b6d73a0d4869 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -419,18 +419,6 @@ void SAL_CALL ORowSet::release() noexcept
 ORowSet_BASE1::release();
 }
 
-// css::XUnoTunnel
-sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId )
-{
-return comphelper::getSomethingImpl(rId, this);
-}
-
-const Sequence< sal_Int8 > & ORowSet::getUnoTunnelId()
-{
-static const comphelper::UnoIdInit s_Id;
-return s_Id.getSeq();
-}
-
 // css::XAggregation
 Any SAL_CALL ORowSet::queryAggregation( const Type& rType )
 {
@@ -2145,7 +2133,7 @@ void ORowSet::notifyRowSetAndClonesRowDelete( const Any& 
_rBookmark )
 // notify the clones
 for (auto const& elem : m_aClones)
 {
-auto pClone = comphelper::getFromUnoTunnel(elem.get());
+rtl::Reference pClone = 
dynamic_cast(elem.get().get());
 if(pClone)
 pClone->onDeleteRow( _rBookmark );
 }
@@ -2158,7 +2146,7 @@ void ORowSet::notifyRowSetAndClonesRowDeleted( const Any& 
_rBookmark, sal_Int32
 // notify the clones
 for (auto const& clone : m_aClones)
 {
-auto pClone = comphelper::getFromUnoTunnel(clone.get());
+rtl::Reference pClone = 
dynamic_cast(clone.get().get());
 if(pClone)
 pClone->onDeletedRow( _rBookmark, _nPos );
 }
@@ -2903,18 +2891,6 @@ void ORowSetClone::close()
 return 
*::comphelper::OPropertyArrayUsageHelper::getArrayHelper();
 }
 
-const Sequence< sal_Int8 > & ORowSetClone::getUnoTunnelId()
-{
-static const comphelper::UnoIdInit implId;
-return implId.getSeq();
-}
-
-// css::XUnoTunnel
-sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId 
)
-{
-return comphelper::getSomethingImpl(rId, this);
-}
-
 void SAL_CALL ORowSetClone::setFastPropertyValue_NoBroadcast(sal_Int32 
nHandle,const Any& rValue)
 {
 if ( nHandle == PROPERTY_ID_FETCHSIZE )
diff --git a/dbaccess/source/core/api/RowSet.hxx 
b/dbaccess/source/core/api/RowSet.hxx
index afe49a923c26..3cf6fe690193 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -255,10 +255,6 @@ namespace dbaccess
 virtual void SAL_CALL acquire() noexcept override;
 virtual void SAL_CALL release() noexcept override;
 
-// css::lang::XUnoTunnel
-virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< 
sal_Int8 >& aIdentifier ) override;
-static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
-
 // css::uno::XAggregation
 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type& 
aType ) override;
 
@@ -487,10 +483,6 @@ namespace dbaccess
 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName 
) override;
 virtual css::uno::Sequence< OUString > SAL_CALL 
getSupportedServiceNames(  ) override;
 
-// css::lang::XUnoTunnel
-virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< 
sal_Int8 >& aIdentifier ) override;
-static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
-
 // OComponentHelper
 virtual void SAL_CALL disposing() override;
 
diff --git a/dbaccess/source/core/api/RowSetBase.hxx 
b/dbaccess/source/core/api/RowSetBase.hxx
index a721a1a4229d..13d6464cddbf 100644
--- a/dbaccess/source/core/api/RowSetBase.hxx
+++ b/dbaccess/source/core/api/RowSetBase.hxx
@@ -19,7 +19,7 @@
 #pragma once
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -28,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -51,7 +50,7 @@ namespace dbaccess
 {
 class OEmptyCollection;
 
-typedef ::cppu::ImplHelper10<   css::sdbcx::XRowLocate,
+typedef ::cppu::ImplHelper9

[Libreoffice-commits] core.git: 2 commits - dbaccess/source framework/inc framework/source

2022-12-14 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/querydesign/limitboxcontroller.cxx |   23 --
 dbaccess/source/ui/querydesign/limitboxcontroller.hxx |9 --
 framework/inc/uielement/menubarwrapper.hxx|   11 ---
 framework/source/uielement/menubarwrapper.cxx |   64 --
 4 files changed, 6 insertions(+), 101 deletions(-)

New commits:
commit 6fd64a87add9958b603b6851e0d477c4f596c22f
Author: Noel Grandin 
AuthorDate: Wed Dec 14 16:13:09 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 14 16:25:04 2022 +

loplugin:implinheritancehelper in framework

use more ImplInheritanceHelper to reduce boilerplate

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

diff --git a/framework/inc/uielement/menubarwrapper.hxx 
b/framework/inc/uielement/menubarwrapper.hxx
index d696ec6c3f38..c764ecdf14b8 100644
--- a/framework/inc/uielement/menubarwrapper.hxx
+++ b/framework/inc/uielement/menubarwrapper.hxx
@@ -28,21 +28,14 @@
 namespace framework
 {
 
-class MenuBarWrapper final : public UIConfigElementWrapperBase,
-   public css::container::XNameAccess
+typedef cppu::ImplInheritanceHelper< UIConfigElementWrapperBase, 
css::container::XNameAccess> MenuBarWrapper_Base;
+class MenuBarWrapper final : public MenuBarWrapper_Base
 
 {
 public:
 MenuBarWrapper( css::uno::Reference< css::uno::XComponentContext > 
xContext );
 virtual ~MenuBarWrapper() override;
 
-//  XInterface, XTypeProvider
-virtual css::uno::Any  SAL_CALL queryInterface( const css::uno::Type& 
aType ) override;
-virtual void SAL_CALL acquire() noexcept override;
-virtual void SAL_CALL release() noexcept override;
-virtual css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() 
override;
-virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() 
override;
-
 MenuBarManager* GetMenuBarManager() const { return static_cast< 
MenuBarManager* >( m_xMenuBarManager.get() ); }
 
 // XComponent
diff --git a/framework/source/uielement/menubarwrapper.cxx 
b/framework/source/uielement/menubarwrapper.cxx
index 3bbd71ed785e..c1ac0025d55e 100644
--- a/framework/source/uielement/menubarwrapper.cxx
+++ b/framework/source/uielement/menubarwrapper.cxx
@@ -45,72 +45,10 @@ using namespace ::com::sun::star::ui;
 namespace framework
 {
 
-void SAL_CALL MenuBarWrapper::acquire() noexcept   
   \
-{  
 \
-/* Don't use mutex in methods of XInterface! */
 \
-UIConfigElementWrapperBase::acquire(); 

  \
-}  
 \
-   
 \
-void SAL_CALL MenuBarWrapper::release() noexcept   
   \
-{  
 \
-/* Don't use mutex in methods of XInterface! */
 \
-UIConfigElementWrapperBase::release(); 

  \
-}
-
-css::uno::Any SAL_CALL MenuBarWrapper::queryInterface( const css::uno::Type& 
aType )
-{
-/* Attention: Don't use mutex or guard in this method!!! Is a method of 
XInterface. */
-/* Ask for my own supported interfaces ... 
 */
-css::uno::Any aReturn  = ::cppu::queryInterface( aType,
-static_cast< css::lang::XTypeProvider* >( this ),
-static_cast< css::ui::XUIElement* >( this ),
-static_cast< css::ui::XUIElementSettings* >( this ),
-static_cast< css::beans::XMultiPropertySet* >( this ),
-static_cast< css::beans::XFastPropertySet* >( this ),
-static_cast< css::beans::XPropertySet* >( this ),
-static_cast< css::lang::XInitialization* >( this ),
-static_cast< css::lang::XComponent* >( this ),
-

[Libreoffice-commits] core.git: 2 commits - dbaccess/source extensions/source filter/source i18npool/inc include/sfx2 include/svtools include/svx package/source reportdesign/source sfx2/source svtools

2022-11-22 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/dlg/advancedsettings.cxx  |2 --
 dbaccess/source/ui/dlg/advancedsettings.hxx  |2 --
 dbaccess/source/ui/dlg/detailpages.hxx   |6 --
 dbaccess/source/ui/dlg/dsselect.cxx  |3 ---
 dbaccess/source/ui/dlg/dsselect.hxx  |3 ---
 dbaccess/source/ui/dlg/generalpage.cxx   |1 -
 dbaccess/source/ui/dlg/generalpage.hxx   |1 -
 dbaccess/source/ui/inc/WTypeSelect.hxx   |1 -
 dbaccess/source/ui/misc/WTypeSelect.cxx  |1 -
 extensions/source/dbpilots/commonpagesdbp.cxx|1 -
 extensions/source/dbpilots/commonpagesdbp.hxx|1 -
 extensions/source/scanner/grid.cxx   |1 -
 extensions/source/scanner/grid.hxx   |1 -
 filter/source/pdf/impdialog.cxx  |1 -
 filter/source/pdf/impdialog.hxx  |1 -
 i18npool/inc/textconversion.hxx  |5 -
 include/sfx2/listview.hxx|1 -
 include/sfx2/templatedlg.hxx |3 ---
 include/svtools/PlaceEditDialog.hxx  |1 -
 include/svx/rubydialog.hxx   |2 --
 package/source/xstor/switchpersistencestream.cxx |4 
 package/source/xstor/switchpersistencestream.hxx |4 
 package/source/xstor/xstorage.cxx|6 +++---
 reportdesign/source/ui/dlg/AddField.cxx  |1 -
 reportdesign/source/ui/dlg/PageNumber.cxx|2 --
 reportdesign/source/ui/inc/AddField.hxx  |1 -
 reportdesign/source/ui/inc/PageNumber.hxx|2 --
 sfx2/source/doc/templatedlg.cxx  |2 --
 svtools/source/dialogs/PlaceEditDialog.cxx   |2 --
 svx/source/dialog/rubydialog.cxx |2 --
 30 files changed, 3 insertions(+), 61 deletions(-)

New commits:
commit 57fcfc5a5071ffdb955ce341538263d92ee1eaa5
Author: Noel Grandin 
AuthorDate: Mon Nov 21 11:17:46 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Nov 22 11:04:22 2022 +0100

loplugin:unusedfields

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

diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx 
b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 40964305a9f3..1cf713ce3d23 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -287,9 +287,7 @@ namespace dbaui
 : OGenericAdministrationPage(pPage, pController, 
"dbaccess/ui/generatedvaluespage.ui", "GeneratedValuesPage", _rCoreAttrs)
 , 
m_xAutoRetrievingEnabled(m_xBuilder->weld_check_button("autoretrieve"))
 , m_xGrid(m_xBuilder->weld_widget("grid"))
-, m_xAutoIncrementLabel(m_xBuilder->weld_label("statementft"))
 , m_xAutoIncrement(m_xBuilder->weld_entry("statement"))
-, m_xAutoRetrievingLabel(m_xBuilder->weld_label("queryft"))
 , m_xAutoRetrieving(m_xBuilder->weld_entry("query"))
 {
 m_xAutoRetrievingEnabled->connect_toggled(LINK(this, 
GeneratedValuesPage, OnAutoToggleHdl));
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx 
b/dbaccess/source/ui/dlg/advancedsettings.hxx
index 38f100612b43..9eaca4a41b48 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.hxx
@@ -88,9 +88,7 @@ namespace dbaui
 {
 std::unique_ptr m_xAutoRetrievingEnabled;
 std::unique_ptr m_xGrid;
-std::unique_ptr m_xAutoIncrementLabel;
 std::unique_ptr m_xAutoIncrement;
-std::unique_ptr m_xAutoRetrievingLabel;
 std::unique_ptr m_xAutoRetrieving;
 
 public:
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx 
b/dbaccess/source/ui/dlg/detailpages.hxx
index 2952f42e6155..cd570594afdb 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -54,12 +54,6 @@ namespace dbaui
 std::unique_ptr m_xCharsetLabel;
 std::unique_ptr m_xCharset;
 
-std::unique_ptr m_xAutoRetrievingEnabled;
-std::unique_ptr m_xAutoIncrementLabel;
-std::unique_ptr m_xAutoIncrement;
-std::unique_ptr m_xAutoRetrievingLabel;
-std::unique_ptr m_xAutoRetrieving;
-
 public:
 virtual boolFillItemSet (SfxItemSet* _rCoreAttrs) override;
 
diff --git a/dbaccess/source/ui/dlg/dsselect.cxx 
b/dbaccess/source/ui/dlg/dsselect.cxx
index 4c0b9a836382..1eb158daa81b 100644
--- a/dbaccess/source/ui/dlg/dsselect.cxx
+++ b/dbaccess/source/ui/dlg/dsselect.cxx
@@ -32,9 +32,6 @@ using namespace ::com::sun::star::ui::dialogs;
 ODatasourceSelectDialog::ODatasourceSelectDialog(weld::Window* _pParent, const 
std::set& _rDatasources)
 : GenericDialogController(_pParent, 
"dbaccess/ui/choosedatasourcedialog.ui", "ChooseDataSourceDialog")
 , m_xDatasource(m_xBuilder->weld_tree_view("treeview"))
-, 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/unotools

2022-11-04 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/uno/copytablewizard.cxx |2 +-
 include/unotools/weakref.hxx   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5fdf20eac1e071e68d4eea7d9f15bd8b3e7046d1
Author: Noel Grandin 
AuthorDate: Fri Nov 4 10:51:23 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 4 13:15:02 2022 +0100

address review comments in unotools::WeakReference

from commit 4e0856fa11674e386c9b84dd40a702c83450166f

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

diff --git a/include/unotools/weakref.hxx b/include/unotools/weakref.hxx
index 9cf326d99625..554bd433b687 100644
--- a/include/unotools/weakref.hxx
+++ b/include/unotools/weakref.hxx
@@ -117,7 +117,7 @@ public:
 css::uno::Reference xInterface = 
WeakReferenceHelper::get();
 // If XInterface is an ambiguous base of interface_type, we have to 
use dynamic_cast,
 // otherwise we can use the faster static_cast.
-if constexpr (std::is_convertible_v)
+if constexpr (std::is_convertible_v)
 return static_cast(xInterface.get());
 else
 return dynamic_cast(xInterface.get());
commit 493c88ab4e597c55e920dbec2262058ecc6b6922
Author: Noel Grandin 
AuthorDate: Fri Nov 4 09:47:05 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 4 13:14:47 2022 +0100

calling getCaughtException twice in one catch block is not allowed

It seems to work, but it's not guaranteed to do so, and violates the
documented contract.

Regression from
commit 85a5233275ab83fe0d6b943b298695387d97accd
Author: Noel Grandin 
Date:   Mon Oct 31 12:08:50 2022 +0200
error when copying table and the copy table wizard creates the
primary key

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

diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 5fd10ee37e75..fab5e3966cbd 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1416,8 +1416,8 @@ void CopyTableWizard::impl_doCopy_nothrow()
 }
 catch( const Exception& )
 {
-TOOLS_WARN_EXCEPTION("dbaccess", "");
 aError = ::cppu::getCaughtException();
+SAL_WARN("dbaccess", exceptionToString(aError));
 
 // silence the error of the user cancelling the parameter's dialog
 SQLException aSQLError;


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

2022-10-21 Thread Olivier Hallot (via logerrit)
 dbaccess/source/ui/inc/JoinTableView.hxx |2 +-
 dbaccess/source/ui/querydesign/JAccess.cxx   |2 +-
 dbaccess/source/ui/querydesign/JoinTableView.cxx |2 +-
 helpcontent2 |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 48e489871681ffea6c43e88cc25b5b05e26d78b1
Author: Olivier Hallot 
AuthorDate: Fri Oct 21 14:16:16 2022 -0300
Commit: Gerrit Code Review 
CommitDate: Fri Oct 21 19:16:16 2022 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 6deeb4a1ad63f4657abfd06cf235f43291c19d78
  - Reduce screenshot/svt to valid Help locales

Change-Id: I3b8ae51dacc263ee6224b6cb1a74cbac10ed2b53
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/141639
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index b8c0ef544e9e..6deeb4a1ad63 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b8c0ef544e9eddd68d1677e54f65715778029d59
+Subproject commit 6deeb4a1ad63f4657abfd06cf235f43291c19d78
commit 1f687c07878b56cd07bedf4a04790375ac881658
Author: Ilmari Lauhakangas 
AuthorDate: Fri Oct 21 12:35:27 2022 +0300
Commit: Ilmari Lauhakangas 
CommitDate: Fri Oct 21 19:16:01 2022 +0200

Related: tdf#114441 use better types in place of recently changed ones

Best to harmonise these to sal_Int64, along the lines of
commit 206543c7bef58fc559852553a3b2faba0b604259
Author: Michael Weghorn 
Date:   Fri Sep 2 13:06:08 2022 +0200

[API CHANGE] tdf#150683 a11y: Switch a11y child index to 64 bit

Change-Id: I3cddb192990ba87dc637cdd765d1427bc4611d2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141621
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx 
b/dbaccess/source/ui/inc/JoinTableView.hxx
index b0b6ece88454..9e2e2bf57e25 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -163,7 +163,7 @@ namespace dbaui
 void addConnection(OTableConnection* _pConnection,bool _bAddData = 
true);
 
 bool ScrollPane( tools::Long nDelta, bool bHoriz, bool 
bPaintScrollBars );
-sal_uInt32 GetTabWinCount() const;
+sal_Int64 GetTabWinCount() const;
 const Point& GetScrollOffset() const { return m_aScrollOffset; }
 
 OJoinDesignView* getDesignView() const { return m_pView; }
diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx 
b/dbaccess/source/ui/querydesign/JAccess.cxx
index e39bf4a563dd..277a6f9c3426 100644
--- a/dbaccess/source/ui/querydesign/JAccess.cxx
+++ b/dbaccess/source/ui/querydesign/JAccess.cxx
@@ -64,7 +64,7 @@ namespace dbaui
 if(i < 0 || i >= getAccessibleChildCount() || !m_pTableView)
 throw IndexOutOfBoundsException();
 // check if we should return a table window or a connection
-sal_Int32 nTableWindowCount = m_pTableView->GetTabWinCount();
+sal_Int64 nTableWindowCount = m_pTableView->GetTabWinCount();
 if( i < nTableWindowCount )
 {
 OJoinTableView::OTableWindowMap::const_iterator aIter = 
std::next(m_pTableView->GetTabWinMap().begin(), i);
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx 
b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 21259b590fca..2068e2a48ff2 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -236,7 +236,7 @@ void OJoinTableView::Resize()
 }
 }
 
-sal_uInt32 OJoinTableView::GetTabWinCount() const
+sal_Int64 OJoinTableView::GetTabWinCount() const
 {
 return m_aTableMap.size();
 }


[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/vcl vcl/source

2022-09-10 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/dataaccess/ModelImpl.cxx  |8 
 dbaccess/source/core/dataaccess/databasedocument.cxx   |2 +-
 dbaccess/source/core/dataaccess/documentdefinition.cxx |4 ++--
 dbaccess/source/core/inc/ModelImpl.hxx |8 
 include/vcl/outdev.hxx |7 ---
 vcl/source/outdev/outdev.cxx   |4 ++--
 vcl/source/window/settings.cxx |   10 +-
 vcl/source/window/window.cxx   |6 +++---
 8 files changed, 25 insertions(+), 24 deletions(-)

New commits:
commit 62cea174f4c73ed39e5ac29e2a44fd27b92054bd
Author: Noel Grandin 
AuthorDate: Wed Sep 7 08:41:45 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 10 08:39:22 2022 +0200

convert EmbeddedMacros to scoped enum

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

diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 14d05bb53b35..3db610503313 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1323,17 +1323,17 @@ ODatabaseModelImpl::EmbeddedMacros 
ODatabaseModelImpl::determineEmbeddedMacros()
 {
 if ( ::sfx2::DocumentMacroMode::storageHasMacros( 
getOrCreateRootStorage() ) )
 {
-m_aEmbeddedMacros = eDocumentWideMacros;
+m_aEmbeddedMacros = EmbeddedMacros::DocumentWide;
 }
 else if (   lcl_hasObjectsWithMacros_nothrow( *this, ObjectType::Form )
 ||  lcl_hasObjectsWithMacros_nothrow( *this, 
ObjectType::Report )
 )
 {
-m_aEmbeddedMacros = eSubDocumentMacros;
+m_aEmbeddedMacros = EmbeddedMacros::SubDocument;
 }
 else
 {
-m_aEmbeddedMacros = eNoMacros;
+m_aEmbeddedMacros = EmbeddedMacros::NONE;
 }
 }
 return *m_aEmbeddedMacros;
@@ -1342,7 +1342,7 @@ ODatabaseModelImpl::EmbeddedMacros 
ODatabaseModelImpl::determineEmbeddedMacros()
 bool ODatabaseModelImpl::documentStorageHasMacros() const
 {
 const_cast< ODatabaseModelImpl* >( this )->determineEmbeddedMacros();
-return ( *m_aEmbeddedMacros != eNoMacros );
+return ( *m_aEmbeddedMacros != EmbeddedMacros::NONE );
 }
 
 bool ODatabaseModelImpl::macroCallsSeenWhileLoading() const
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 681966020696..fb4ed754380b 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -775,7 +775,7 @@ bool ODatabaseDocument::impl_attachResource( const 
OUString& i_rLogicalDocumentU
 // determine whether the document as a whole, or sub documents, have 
macros. Especially the latter
 // controls the availability of our XEmbeddedScripts and 
XScriptInvocationContext interfaces, and we
 // should know this before anybody actually uses the object.
-m_bAllowDocumentScripting = ( m_pImpl->determineEmbeddedMacros() != 
ODatabaseModelImpl::eSubDocumentMacros );
+m_bAllowDocumentScripting = ( m_pImpl->determineEmbeddedMacros() != 
ODatabaseModelImpl::EmbeddedMacros::SubDocument );
 
 _rDocGuard.clear();
 // <- SYNCHRONIZED
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx 
b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 2c7bc4b871a7..dbbb7eb94ecc 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -852,7 +852,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& 
_rOpenArgument, cons
 // So, in such a case, and with 2. above, we would silently execute 
those macros,
 // regardless of the global security settings - which would be a 
security issue, of
 // course.
-if ( m_pImpl->m_pDataSource->determineEmbeddedMacros() == 
ODatabaseModelImpl::eNoMacros )
+if ( m_pImpl->m_pDataSource->determineEmbeddedMacros() == 
ODatabaseModelImpl::EmbeddedMacros::NONE )
 {
 // this is case 2. from above
 // So, pass a USE_CONFIG to the to-be-loaded document. This means 
that
@@ -1431,7 +1431,7 @@ namespace
 bool ODocumentDefinition::objectSupportsEmbeddedScripts() const
 {
 bool bAllowDocumentMacros = !m_pImpl->m_pDataSource
-||  ( 
m_pImpl->m_pDataSource->determineEmbeddedMacros() == 
ODatabaseModelImpl::eSubDocumentMacros );
+||  ( 
m_pImpl->m_pDataSource->determineEmbeddedMacros() == 
ODatabaseModelImpl::EmbeddedMacros::SubDocument );
 
 // if *any* of the objects of the database document already has macros, we
 // continue to 

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

2022-09-07 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/app/AppController.cxx   |   16 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx |   14 +++---
 dbaccess/source/ui/inc/AppElementType.hxx  |8 
 sw/source/filter/xml/xmlitemm.cxx  |   24 ++--
 sw/source/filter/xml/xmlitmap.hxx  |   16 
 sw/source/filter/xml/xmlitmpr.cxx  |   23 +--
 6 files changed, 42 insertions(+), 59 deletions(-)

New commits:
commit b4a82907eb13de4feabc9f09f8fa7d45d6c9eaec
Author: Noel Grandin 
AuthorDate: Tue Sep 6 21:07:16 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 7 13:04:15 2022 +0200

use o3tl::span in SvXMLItemMapEntries

which means we don't need to calculate the size of the map
at construction

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

diff --git a/sw/source/filter/xml/xmlitemm.cxx 
b/sw/source/filter/xml/xmlitemm.cxx
index 6464149d766e..cd1b219ad894 100644
--- a/sw/source/filter/xml/xmlitemm.cxx
+++ b/sw/source/filter/xml/xmlitemm.cxx
@@ -38,9 +38,7 @@ using namespace ::xmloff::token;
 #define M_E_SIE( p, l, w, m ) \
 { XML_NAMESPACE_##p, XML_##l, o3tl::narrowing(w), 
MID_SW_FLAG_SPECIAL_ITEM_EXPORT|MID_SW_FLAG_SPECIAL_ITEM_IMPORT|m }
 
-#define M_END { 0, XML_TOKEN_INVALID, 0, 0 }
-
-SvXMLItemMapEntry const aXMLTableItemMap[] =
+const SvXMLItemMapEntry aTableItemMap[] =
 {
 // RES_FILL_ORDER
 // not required
@@ -115,19 +113,18 @@ SvXMLItemMapEntry const aXMLTableItemMap[] =
 MAP_ENTRY( STYLE, WRITING_MODE, RES_FRAMEDIR, 0 ),
 
 // RES_COLLAPSING_BORDERS
-MAP_ENTRY( TABLE, BORDER_MODEL, RES_COLLAPSING_BORDERS, 0 ),
-
-M_END
+MAP_ENTRY( TABLE, BORDER_MODEL, RES_COLLAPSING_BORDERS, 0 )
 };
+const o3tl::span aXMLTableItemMap(aTableItemMap);
 
-SvXMLItemMapEntry const aXMLTableColItemMap[] =
+const SvXMLItemMapEntry aTableColItemMap[] =
 {
 M_E_SI( STYLE,  COLUMN_WIDTH, RES_FRM_SIZE, MID_FRMSIZE_COL_WIDTH ),
 MAP_ENTRY( STYLE,REL_COLUMN_WIDTH, RES_FRM_SIZE, 
MID_FRMSIZE_REL_COL_WIDTH ),
-M_END
 };
+const o3tl::span 
aXMLTableColItemMap(aTableColItemMap);
 
-SvXMLItemMapEntry const aXMLTableRowItemMap[] =
+const SvXMLItemMapEntry aTableRowItemMap[] =
 {
 // RES_FILL_ORDER
 // not required
@@ -196,11 +193,11 @@ SvXMLItemMapEntry const aXMLTableRowItemMap[] =
 // RES_END_AT_TXTEND
 // not required
 // RES_UNKNOWNATR_CONTAINER
-M_E_SE( TEXT, XMLNS, RES_UNKNOWNATR_CONTAINER, 0 ),
-M_END
+M_E_SE( TEXT, XMLNS, RES_UNKNOWNATR_CONTAINER, 0 )
 };
+const o3tl::span 
aXMLTableRowItemMap(aTableRowItemMap);
 
-SvXMLItemMapEntry const aXMLTableCellItemMap[] =
+const SvXMLItemMapEntry aTableCellItemMap[] =
 {
 // RES_FILL_ORDER
 // not required
@@ -283,8 +280,7 @@ SvXMLItemMapEntry const aXMLTableCellItemMap[] =
 // RES_FRAMEDIR
 MAP_ENTRY( STYLE, WRITING_MODE, RES_FRAMEDIR, 0 ),
 MAP_ENTRY( LO_EXT, WRITING_MODE, RES_FRAMEDIR, 0 ),
-
-M_END
 };
+const o3tl::span 
aXMLTableCellItemMap(aTableCellItemMap);
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlitmap.hxx 
b/sw/source/filter/xml/xmlitmap.hxx
index da42805c8206..eacd530ef62b 100644
--- a/sw/source/filter/xml/xmlitmap.hxx
+++ b/sw/source/filter/xml/xmlitmap.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #define MID_SW_FLAG_MASK0x
@@ -62,25 +63,24 @@ struct SvXMLItemMapEntry
 or export */
 class SvXMLItemMapEntries final : public SvRefBase
 {
-SvXMLItemMapEntry const * mpEntries;
-sal_uInt16 mnCount;
+o3tl::span mpEntries;
 
 public:
-explicit SvXMLItemMapEntries(SvXMLItemMapEntry const * pEntrys);
+explicit SvXMLItemMapEntries(o3tl::span pEntries) 
: mpEntries(pEntries) {}
 virtual ~SvXMLItemMapEntries() override;
 
 SvXMLItemMapEntry const * getByName( sal_Int32 nElement ) const;
 SvXMLItemMapEntry const & getByIndex( sal_uInt16 nIndex ) const { return 
mpEntries[nIndex]; }
 
-sal_uInt16 getCount() const { return mnCount; }
+sal_uInt16 getCount() const { return mpEntries.size(); }
 };
 
 typedef tools::SvRef SvXMLItemMapEntriesRef;
 
-extern SvXMLItemMapEntry const aXMLTableItemMap[];
-extern SvXMLItemMapEntry const aXMLTableColItemMap[];
-extern SvXMLItemMapEntry const aXMLTableRowItemMap[];
-extern SvXMLItemMapEntry const aXMLTableCellItemMap[];
+extern const o3tl::span aXMLTableItemMap;
+extern const o3tl::span aXMLTableColItemMap;
+extern const o3tl::span aXMLTableRowItemMap;
+extern const o3tl::span aXMLTableCellItemMap;
 
 #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLITMAP_HXX
 
diff --git a/sw/source/filter/xml/xmlitmpr.cxx 
b/sw/source/filter/xml/xmlitmpr.cxx
index 6731f086bbe3..cb7700fd91fe 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ 

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

2022-09-07 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/app/AppController.cxx   |   24 +-
 dbaccess/source/ui/app/AppControllerGen.cxx|8 +++---
 dbaccess/source/ui/app/subcomponentmanager.cxx |2 -
 dbaccess/source/ui/inc/AppElementType.hxx  |8 +++---
 dbaccess/source/ui/misc/linkeddocuments.cxx|6 ++--
 reportdesign/source/ui/dlg/Navigator.cxx   |   33 -
 reportdesign/source/ui/inc/Navigator.hxx   |8 --
 7 files changed, 36 insertions(+), 53 deletions(-)

New commits:
commit 87d03edf08cda2f9f6a9d4ef9e5b7fe71964c71f
Author: Noel Grandin 
AuthorDate: Tue Sep 6 22:04:22 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 7 11:42:04 2022 +0200

convert ElementOpenMode to scoped enum

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

diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index 52106a2fd099..2e30cf1fce38 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1211,7 +1211,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 
 const Reference< XDataSource > xDataSource( 
m_xDataSource, UNO_QUERY );
 const Reference< XComponent > xComponent = 
aDesigner.createNew( xDataSource, aCreationArgs );
-onDocumentOpened( OUString(), E_QUERY, E_OPEN_DESIGN, 
xComponent, nullptr );
+onDocumentOpened( OUString(), E_QUERY, 
ElementOpenMode::Design, xComponent, nullptr );
 }
 }
 break;
@@ -1235,17 +1235,17 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 case SID_DB_APP_QUERY_EDIT:
 case SID_DB_APP_FORM_EDIT:
 case SID_DB_APP_REPORT_EDIT:
-doAction( _nId, E_OPEN_DESIGN );
+doAction( _nId, ElementOpenMode::Design );
 break;
 case SID_DB_APP_OPEN:
 case SID_DB_APP_TABLE_OPEN:
 case SID_DB_APP_QUERY_OPEN:
 case SID_DB_APP_FORM_OPEN:
 case SID_DB_APP_REPORT_OPEN:
-doAction( _nId, E_OPEN_NORMAL );
+doAction( _nId, ElementOpenMode::Normal );
 break;
 case SID_DB_APP_CONVERTTOVIEW:
-doAction( _nId, E_OPEN_NORMAL );
+doAction( _nId, ElementOpenMode::Normal );
 break;
 case SID_SELECTALL:
 getContainer()->selectAll();
@@ -1254,7 +1254,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 case SID_DB_APP_DSRELDESIGN:
 {
 Reference< XComponent > xRelationDesigner;
-if ( !m_pSubComponentManager->activateSubFrame( OUString(), 
SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xRelationDesigner ) )
+if ( !m_pSubComponentManager->activateSubFrame( OUString(), 
SID_DB_APP_DSRELDESIGN, ElementOpenMode::Design, xRelationDesigner ) )
 {
 SharedConnection xConnection( ensureConnection() );
 if ( xConnection.is() )
@@ -1263,7 +1263,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 
 const Reference< XDataSource > xDataSource( 
m_xDataSource, UNO_QUERY );
 const Reference< XComponent > xComponent = 
aDesigner.createNew( xDataSource );
-onDocumentOpened( OUString(), SID_DB_APP_DSRELDESIGN, 
E_OPEN_DESIGN, xComponent, nullptr );
+onDocumentOpened( OUString(), SID_DB_APP_DSRELDESIGN, 
ElementOpenMode::Design, xComponent, nullptr );
 }
 }
 }
@@ -1336,7 +1336,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 }
 break;
 case SID_DB_APP_SENDREPORTASMAIL:
-doAction( _nId, E_OPEN_FOR_MAIL );
+doAction( _nId, ElementOpenMode::Mail );
 break;
 }
 }
@@ -1701,7 +1701,7 @@ bool OApplicationController::onEntryDoubleClick(const 
weld::TreeView& rTreeView)
 openElementWithArguments(
 getContainer()->getQualifiedName(xHdlEntry.get()),
 getContainer()->getElementType(),
-E_OPEN_NORMAL,
+ElementOpenMode::Normal,
 0,
 ::comphelper::NamedValueCollection() );
 return true;// handled
@@ -1747,7 +1747,7 @@ Reference< XComponent > 
OApplicationController::openElementWithArguments( const
 return nullptr;
 
 Reference< XComponent > xRet;
-if ( _eOpenMode == E_OPEN_DESIGN )
+if ( _eOpenMode == 

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

2022-09-05 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/inc/defaultobjectnamecheck.hxx  |4 ++--
 dbaccess/source/ui/inc/dsmeta.hxx  |3 +--
 dbaccess/source/ui/misc/defaultobjectnamecheck.cxx |   20 ++--
 dbaccess/source/ui/misc/dsmeta.cxx |   21 ++---
 4 files changed, 11 insertions(+), 37 deletions(-)

New commits:
commit 08b923efcb22bae08c799ccc654797076468fa83
Author: Noel Grandin 
AuthorDate: Sun Sep 4 21:11:36 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon Sep 5 08:57:18 2022 +0200

DataSourceMetaData doesn't need a pimpl

it is module private

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

diff --git a/dbaccess/source/ui/inc/dsmeta.hxx 
b/dbaccess/source/ui/inc/dsmeta.hxx
index 69b13ebb7965..0c8646a53cbd 100644
--- a/dbaccess/source/ui/inc/dsmeta.hxx
+++ b/dbaccess/source/ui/inc/dsmeta.hxx
@@ -42,7 +42,6 @@ namespace dbaui
 
 // DataSourceMetaData
 class FeatureSet;
-class DataSourceMetaData_Impl;
 /** encapsulates meta data for a data source
 
 On the long run, this class should a) encapsulate *all* meta data which
@@ -65,7 +64,7 @@ namespace dbaui
 static  AuthenticationMode  getAuthentication( const OUString& _sURL );
 
 private:
-std::shared_ptr< DataSourceMetaData_Impl >  m_pImpl;
+OUString m_sURL;
 };
 
 // FeatureSet
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx 
b/dbaccess/source/ui/misc/dsmeta.cxx
index 402bdd7bfa34..526a39ecbcff 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -140,26 +140,9 @@ namespace dbaui
 return s_aSupport[ _sURL ].eAuthentication;
 }
 
-// DataSourceMetaData_Impl
-class DataSourceMetaData_Impl
-{
-public:
-explicit DataSourceMetaData_Impl(OUString sURL);
-
-const OUString& getType() const { return m_sURL; }
-
-private:
-const OUString m_sURL;
-};
-
-DataSourceMetaData_Impl::DataSourceMetaData_Impl( OUString _sURL )
-:m_sURL(std::move( _sURL ))
-{
-}
-
 // DataSourceMetaData
 DataSourceMetaData::DataSourceMetaData( const OUString& _sURL )
-:m_pImpl( std::make_shared( _sURL ) )
+:m_sURL(  _sURL )
 {
 }
 
@@ -169,7 +152,7 @@ namespace dbaui
 
 const FeatureSet& DataSourceMetaData::getFeatureSet() const
 {
-return lcl_getFeatureSet( m_pImpl->getType() );
+return lcl_getFeatureSet( m_sURL );
 }
 
 AuthenticationMode  DataSourceMetaData::getAuthentication( const OUString& 
_sURL )
commit 90f3182141d37407715254d5118aae907d559b41
Author: Noel Grandin 
AuthorDate: Sun Sep 4 15:08:04 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon Sep 5 08:56:58 2022 +0200

HierarchicalNameCheck doesn't need a pimpl

already module private≈

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

diff --git a/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx 
b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
index 157f201ddc6a..c75528940e15 100644
--- a/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
+++ b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx
@@ -31,14 +31,14 @@ namespace dbaui
 {
 
 // HierarchicalNameCheck
-struct HierarchicalNameCheck_Impl;
 /** class implementing the IObjectNameCheck interface, and checking given 
object names
 against a hierarchical name container
 */
 class HierarchicalNameCheck :public IObjectNameCheck
 {
 private:
-std::unique_ptr< HierarchicalNameCheck_Impl > m_pImpl;
+css::uno::Reference< css::container::XHierarchicalNameAccess >  
mxHierarchicalNames;
+OUString msRelativeRoot;
 
 public:
 /** constructs a HierarchicalNameCheck instance
diff --git a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx 
b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
index 809e90a777cc..d2a158d2b76e 100644
--- a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
+++ b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx
@@ -67,21 +67,13 @@ namespace dbaui
 
 }
 
-// HierarchicalNameCheck_Impl
-struct HierarchicalNameCheck_Impl
-{
-Reference< XHierarchicalNameAccess >xHierarchicalNames;
-OUString sRelativeRoot;
-};
-
 // HierarchicalNameCheck
 HierarchicalNameCheck::HierarchicalNameCheck( const Reference< 
XHierarchicalNameAccess >& _rxNames, const OUString& _rRelativeRoot )
-:m_pImpl( new HierarchicalNameCheck_Impl )
 {
-m_pImpl->xHierarchicalNames = _rxNames;
-m_pImpl->sRelativeRoot = _rRelativeRoot;
+mxHierarchicalNames = _rxNames;
+msRelativeRoot = _rRelativeRoot;
 
-if ( 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source forms/source reportdesign/source

2022-08-08 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/inc/JoinTableView.hxx |2 --
 dbaccess/source/ui/querydesign/JoinTableView.cxx |   12 +++-
 forms/source/richtext/richtextimplcontrol.cxx|   19 ---
 forms/source/richtext/richtextimplcontrol.hxx|2 --
 forms/source/richtext/richtextvclcontrol.cxx |2 --
 reportdesign/source/ui/inc/ScrollHelper.hxx  |2 --
 reportdesign/source/ui/report/ScrollHelper.cxx   |   11 ---
 reportdesign/source/ui/report/dlgedfunc.cxx  |1 -
 8 files changed, 3 insertions(+), 48 deletions(-)

New commits:
commit 479cf04cee6f360c9bca618369b6b545b94e55ef
Author: Caolán McNamara 
AuthorDate: Mon Aug 8 12:34:05 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Aug 8 20:26:28 2022 +0200

drop unwanted scroll corner

Change-Id: I82143de336df91c5ca69693f6255b0d729e8381b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137978
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/forms/source/richtext/richtextimplcontrol.cxx 
b/forms/source/richtext/richtextimplcontrol.cxx
index fc9251074e64..790a3f88b22a 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -46,7 +46,6 @@ namespace frm
 ,m_pViewport( nullptr)
 ,m_pHScroll ( nullptr)
 ,m_pVScroll ( nullptr)
-,m_pScrollCorner( nullptr)
 ,m_pEngine  ( _pEngine)
 ,m_pTextAttrListener( _pTextAttrListener  )
 ,m_pSelectionListener   ( _pSelectionListener )
@@ -84,7 +83,6 @@ namespace frm
 m_pAntiImpl->SetBackground( Wallpaper( 
m_pAntiImpl->GetSettings().GetStyleSettings().GetFieldColor() ) );
 }
 
-
 RichTextControlImpl::~RichTextControlImpl( )
 {
 m_pEngine->RemoveView( m_pView.get() );
@@ -93,10 +91,8 @@ namespace frm
 m_pViewport.disposeAndClear();
 m_pHScroll.disposeAndClear();
 m_pVScroll.disposeAndClear();
-m_pScrollCorner.disposeAndClear();
 }
 
-
 void RichTextControlImpl::implUpdateAttribute( const 
AttributeHandlerPool::const_iterator& _pHandler )
 {
 if  (  ( _pHandler->first == sal_uInt16(SID_ATTR_CHAR_WEIGHT) )
@@ -355,21 +351,9 @@ namespace frm
 m_pHScroll->Show();
 }
 
-if ( m_pHScroll && m_pVScroll )
-{
-m_pScrollCorner.disposeAndClear();
-m_pScrollCorner = VclPtr::Create( m_pAntiImpl );
-m_pScrollCorner->Show();
-}
-else
-{
-m_pScrollCorner.disposeAndClear();
-}
-
 layoutWindow();
 }
 
-
 void RichTextControlImpl::ensureLineBreakSetting()
 {
 if ( !windowHasAutomaticLineBreak() )
@@ -378,7 +362,6 @@ namespace frm
 layoutWindow();
 }
 
-
 void RichTextControlImpl::layoutWindow()
 {
 if ( !m_bHasEverBeenShown )
@@ -424,8 +407,6 @@ namespace frm
 m_pHScroll->SetThickness(nScrollBarHeight);
 m_pHScroll->SetPosSizePixel( Point( 0, 
aViewportPlaygroundPixel.Height() ), Size( aViewportPlaygroundPixel.Width(), 
nScrollBarHeight ) );
 }
-if ( m_pScrollCorner )
-m_pScrollCorner->SetPosSizePixel( Point( 
aViewportPlaygroundPixel.Width(), aViewportPlaygroundPixel.Height() ), Size( 
nScrollBarWidth, nScrollBarHeight ) );
 
 // paper size
 if ( windowHasAutomaticLineBreak() )
diff --git a/forms/source/richtext/richtextimplcontrol.hxx 
b/forms/source/richtext/richtextimplcontrol.hxx
index f1cbb81ffe22..86b1a1831684 100644
--- a/forms/source/richtext/richtextimplcontrol.hxx
+++ b/forms/source/richtext/richtextimplcontrol.hxx
@@ -22,7 +22,6 @@
 #include "richtextviewport.hxx"
 #include "richtextengine.hxx"
 #include 
-#include 
 #include 
 
 #include 
@@ -56,7 +55,6 @@ namespace frm
 VclPtr   m_pViewport;
 VclPtr  m_pHScroll;
 VclPtr  m_pVScroll;
-VclPtr   m_pScrollCorner;
 RichTextEngine* m_pEngine;
 std::unique_ptr m_pView;
 ITextAttributeListener* m_pTextAttrListener;
diff --git a/forms/source/richtext/richtextvclcontrol.cxx 
b/forms/source/richtext/richtextvclcontrol.cxx
index cb4d613e36b2..da547afce6c6 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -43,14 +43,12 @@ namespace frm
 implInit( _pEngine, _pTextAttribListener, _pSelectionListener );
 }
 
-
 void RichTextControl::implInit( RichTextEngine* _pEngine, 
ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* 
_pSelectionListener )
 {
 m_pImpl.reset( new RichTextControlImpl( this, _pEngine, 
_pTextAttribListener, _pSelectionListener ) );
 SetCompoundControl( true );
 }
 
-
 RichTextControl::~RichTextControl( )
 {
  

[Libreoffice-commits] core.git: 2 commits - dbaccess/source vcl/jsdialog

2022-06-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/dbwizsetup.cxx |8 +++-
 vcl/jsdialog/jsdialogbuilder.cxx  |1 +
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 826b0fc9aacbe58c998aec8ebba3401c0a68a015
Author: Caolán McNamara 
AuthorDate: Thu Jun 2 08:57:21 2022 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 2 11:42:32 2022 +0200

cid#1504597 Dereference null return value

Change-Id: I6b1b34375a70c3081d7f6d90766cb0df053de355
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135294
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx 
b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 63be5dd12875..2c3e8fb7bb36 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -114,15 +114,13 @@ 
ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(weld::Window* _pParent
 , m_pGeneralPage( nullptr )
 , m_pMySQLIntroPage( nullptr )
 , m_pFinalPage( nullptr )
-, m_pCollection( nullptr )
 {
 // no local resources needed anymore
 // extract the datasource type collection from the item set
-const DbuTypeCollectionItem* pCollectionItem = dynamic_cast( _pItems->GetItem(DSID_TYPECOLLECTION) );
-if (pCollectionItem)
-m_pCollection = pCollectionItem->getCollection();
+const DbuTypeCollectionItem& rCollectionItem = dynamic_cast(*_pItems->GetItem(DSID_TYPECOLLECTION));
+m_pCollection = rCollectionItem.getCollection();
 
-OSL_ENSURE(m_pCollection, "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : 
really need a DSN type collection !");
+assert(m_pCollection && "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : 
really need a DSN type collection !");
 
 m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB, 
m_xAssistant.get(), _pParent, this));
 m_pImpl->setDataSourceOrName(_aDataSourceName);
commit 6eb1f2c45c16639aa0c7f70f700765348f7c0efe
Author: Caolán McNamara 
AuthorDate: Thu Jun 2 08:49:17 2022 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 2 11:42:19 2022 +0200

cid#1504591 Uninitialized scalar field

Change-Id: I647888f13fc18010efc5ff6023790e91fa11611a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135293
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index ab1fdf7636c0..c4e3d23660c6 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1792,6 +1792,7 @@ void JSMenuButton::set_active(bool bActive)
 JSPopover::JSPopover(JSDialogSender* pSender, DockingWindow* pDockingWindow,
  SalInstanceBuilder* pBuilder, bool bTakeOwnership)
 : JSWidget(pSender, pDockingWindow, 
pBuilder, bTakeOwnership)
+, mnWindowId(0)
 {
 }
 


[Libreoffice-commits] core.git: 2 commits - dbaccess/source framework/source include/unotools officecfg/registry sfx2/inc sfx2/source unotools/source

2022-04-26 Thread Michael Stahl (via logerrit)
 dbaccess/source/ui/app/AppController.cxx  |2 -
 dbaccess/source/ui/control/opendoccontrols.cxx|2 -
 framework/source/uielement/recentfilesmenucontroller.cxx  |   10 --
 include/unotools/historyoptions.hxx   |3 +-
 officecfg/registry/schema/org/openoffice/Office/Histories.xcs |6 
 sfx2/inc/recentdocsview.hxx   |2 -
 sfx2/source/appl/newhelp.cxx  |4 ++
 sfx2/source/appl/sfxpicklist.cxx  |4 ++
 sfx2/source/control/recentdocsview.cxx|6 ++--
 sfx2/source/control/recentdocsviewitem.cxx|6 +++-
 sfx2/source/control/recentdocsviewitem.hxx|4 ++
 unotools/source/config/historyoptions.cxx |   15 --
 12 files changed, 47 insertions(+), 17 deletions(-)

New commits:
commit 404c51f3664ffd4f7e2c1c8bb8a12ac70954fec2
Author: Michael Stahl 
AuthorDate: Mon Apr 25 14:53:33 2022 +0200
Commit: Michael Stahl 
CommitDate: Tue Apr 26 10:39:31 2022 +0200

officecfg,unotools,framework,sfx2: store ReadOnly for recent docs

Add Office::Histories::HistoryItem::ReadOnly flag to configuration so
that a document that was opened read-only isn't opened as editable from
recent documents.

Change-Id: I6985da287d3337a53a7e41e8e500421038eedb91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133385
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index 96e23f041d6d..f04d7322aa64 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -362,7 +362,7 @@ void SAL_CALL OApplicationController::disposing()
 aURL.GetURLNoPass( 
INetURLObject::DecodeMechanism::NONE ),
 aFilter,
 getStrippedDatabaseName(),
-std::nullopt);
+std::nullopt, std::nullopt);
 
 // add to recent document list
 if ( aURL.GetProtocol() == INetProtocol::File )
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx 
b/dbaccess/source/ui/control/opendoccontrols.cxx
index bf958d4a30b7..2fb86bdca691 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -145,7 +145,7 @@ namespace dbaui
 OUString sTitle = rHistoryItem.sTitle;
 OUString sPassword = rHistoryItem.sPassword;
 
-//  If the entry is an impress file then insert it into the
+//  If the entry is a Base file then insert it into the
 //  history list and the list box.
 Sequence< PropertyValue > aProps;
 xFilterFactory->getByName( sFilter ) >>= aProps;
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx 
b/framework/source/uielement/recentfilesmenucontroller.cxx
index f96621ece94b..74c66e90b9d3 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -92,7 +92,7 @@ private:
 void fillPopupMenu( css::uno::Reference< css::awt::XPopupMenu > const & 
rPopupMenu );
 void executeEntry( sal_Int32 nIndex );
 
-std::vector< OUString >   m_aRecentFilesItems;
+std::vector>   m_aRecentFilesItems;
 bool  m_bDisabled : 1;
 bool  m_bShowToolbarEntries;
 };
@@ -157,7 +157,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< 
css::awt::XPopupMenu >
 for ( int i = 0; i < nPickListMenuItems; i++ )
 {
 const SvtHistoryOptions::HistoryItem& rPickListEntry = 
aHistoryList[i];
-m_aRecentFilesItems.push_back( rPickListEntry.sURL );
+m_aRecentFilesItems.emplace_back(rPickListEntry.sURL, 
rPickListEntry.isReadOnly);
 }
 }
 
@@ -191,7 +191,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< 
css::awt::XPopupMenu >
 
 // Abbreviate URL
 OUString   aMenuTitle;
-INetURLObject   aURL( m_aRecentFilesItems[i] );
+INetURLObject const aURL(m_aRecentFilesItems[i].first);
 OUString aTipHelpText( aURL.getFSysPath( FSysStyle::Detect ) );
 
 if ( aURL.GetProtocol() == INetProtocol::File )
@@ -263,13 +263,15 @@ void RecentFilesMenuController::executeEntry( sal_Int32 
nIndex )
 Sequence< PropertyValue > aArgsList{
 comphelper::makePropertyValue("Referer", OUString( "private:user" )),
 
+comphelper::makePropertyValue("ReadOnly", 
m_aRecentFilesItems[nIndex].second),
+
 // documents in the picklist will never be opened as templates
 comphelper::makePropertyValue("AsTemplate", false),
 
  

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

2021-12-02 Thread Noel Grandin (via logerrit)
 dbaccess/source/ui/browser/formadapter.cxx  |4 ++--
 dbaccess/source/ui/browser/sbamultiplex.cxx |   28 ++--
 dbaccess/source/ui/inc/sbamultiplex.hxx |   21 +++--
 3 files changed, 27 insertions(+), 26 deletions(-)

New commits:
commit cd888e4c04d209a8d436906369c13d6206c176f4
Author: Noel Grandin 
AuthorDate: Wed Dec 1 19:07:50 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Dec 3 08:39:51 2021 +0100

use OMultiTypeInterfaceContainerHelperVar3 in SbaXVetoableChangeMultiplexer

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

diff --git a/dbaccess/source/ui/browser/sbamultiplex.cxx 
b/dbaccess/source/ui/browser/sbamultiplex.cxx
index 76a625d47069..48e907221b39 100644
--- a/dbaccess/source/ui/browser/sbamultiplex.cxx
+++ b/dbaccess/source/ui/browser/sbamultiplex.cxx
@@ -464,7 +464,7 @@ void SAL_CALL 
SbaXVetoableChangeMultiplexer::disposing(const css::lang::EventObj
 }
 void SAL_CALL SbaXVetoableChangeMultiplexer::vetoableChange(const 
css::beans::PropertyChangeEvent& e)
 {
-::comphelper::OInterfaceContainerHelper2* pListeners = 
m_aListeners.getContainer(e.PropertyName);
+
::comphelper::OInterfaceContainerHelper3* 
pListeners = m_aListeners.getContainer(e.PropertyName);
 if (pListeners)
 Notify(*pListeners, e);
 
@@ -475,13 +475,13 @@ void SAL_CALL 
SbaXVetoableChangeMultiplexer::vetoableChange(const css::beans::Pr
 }
 
 void SbaXVetoableChangeMultiplexer::addInterface(const OUString& rName,
-const css::uno::Reference< css::uno::XInterface > & rListener)
+const css::uno::Reference< css::beans::XVetoableChangeListener > & 
rListener)
 {
 m_aListeners.addInterface(rName, rListener);
 }
 
 void SbaXVetoableChangeMultiplexer::removeInterface(const OUString& rName,
-const css::uno::Reference< css::uno::XInterface > & rListener)
+const css::uno::Reference< css::beans::XVetoableChangeListener > & 
rListener)
 {
 m_aListeners.removeInterface(rName, rListener);
 }
@@ -498,7 +498,7 @@ sal_Int32 SbaXVetoableChangeMultiplexer::getOverallLen() 
const
 const std::vector< OUString > aContained = 
m_aListeners.getContainedTypes();
 for ( OUString const & s : aContained)
 {
-::comphelper::OInterfaceContainerHelper2* pListeners = 
m_aListeners.getContainer(s);
+::comphelper::OInterfaceContainerHelper3* 
pListeners = m_aListeners.getContainer(s);
 if (!pListeners)
 continue;
 nLen += pListeners->getLength();
@@ -506,13 +506,13 @@ sal_Int32 SbaXVetoableChangeMultiplexer::getOverallLen() 
const
 return nLen;
 }
 
-void 
SbaXVetoableChangeMultiplexer::Notify(::comphelper::OInterfaceContainerHelper2& 
rListeners, const css::beans::PropertyChangeEvent& e)
+void 
SbaXVetoableChangeMultiplexer::Notify(::comphelper::OInterfaceContainerHelper3&
 rListeners, const css::beans::PropertyChangeEvent& e)
 {
 css::beans::PropertyChangeEvent aMulti(e);
 aMulti.Source = _rParent;
-::comphelper::OInterfaceIteratorHelper2 aIt(rListeners);
+::comphelper::OInterfaceIteratorHelper3 aIt(rListeners);
 while (aIt.hasMoreElements())
-static_cast< 
css::beans::XVetoableChangeListener*>(aIt.next())->vetoableChange(aMulti);
+aIt.next()->vetoableChange(aMulti);
 }
 
 // css::beans::XPropertiesChangeListener
diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx 
b/dbaccess/source/ui/inc/sbamultiplex.hxx
index a3af5d5e0af3..88d1ad3bf1a3 100644
--- a/dbaccess/source/ui/inc/sbamultiplex.hxx
+++ b/dbaccess/source/ui/inc/sbamultiplex.hxx
@@ -259,7 +259,7 @@ namespace dbaui
 :public OSbaWeakSubObject
 ,public css::beans::XVetoableChangeListener
 {
-typedef ::comphelper::OMultiTypeInterfaceContainerHelperVar2  ListenerContainerMap;
+typedef 
::comphelper::OMultiTypeInterfaceContainerHelperVar3  ListenerContainerMap;
 ListenerContainerMapm_aListeners;
 
 public:
@@ -272,18 +272,18 @@ namespace dbaui
 
 virtual void SAL_CALL vetoableChange(const 
css::beans::PropertyChangeEvent& e) override;
 
-void addInterface(const OUString& rName, const css::uno::Reference< 
css::uno::XInterface >& rListener);
-void removeInterface(const OUString& rName, const css::uno::Reference< 
css::uno::XInterface >& rListener);
+void addInterface(const OUString& rName, const css::uno::Reference< 
css::beans::XVetoableChangeListener >& rListener);
+void removeInterface(const OUString& rName, const css::uno::Reference< 
css::beans::XVetoableChangeListener >& rListener);
 
 void disposeAndClear();
 
 sal_Int32 getOverallLen() const;
 
-::comphelper::OInterfaceContainerHelper2* getContainer(const OUString& 
rName)
+
::comphelper::OInterfaceContainerHelper3* 
getContainer(const OUString& rName)
 { return 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source vcl/qt5

2021-09-24 Thread Michael Weghorn (via logerrit)
 dbaccess/source/core/api/RowSet.cxx |   18 ++-
 dbaccess/source/core/api/RowSet.hxx |1 
 vcl/qt5/Qt5Frame.cxx|   42 +++-
 3 files changed, 32 insertions(+), 29 deletions(-)

New commits:
commit 84c25d55fe03f693a86816ad11f614bc7d07ed1a
Author: Michael Weghorn 
AuthorDate: Fri Sep 24 06:39:09 2021 +0200
Commit: Michael Weghorn 
CommitDate: Fri Sep 24 13:57:39 2021 +0200

qt5: Port Qt5Frame away from deprecated QDesktopWidget

Most of QDesktopWidget's methods were deprecated in
Qt 5.11 and QDesktopWidget was removed in Qt 6.

Since 'QScreen *QGuiApplication::screenAt(const QPoint )'
was only introduced in 5.10, keep using
'QDesktopWidget::screenNumber' for older Qt versions.

Change-Id: I915fda0ea00b018945974ad82c1927a5fac99145
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122548
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 2c2b439be225..43ca9cdbf802 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -45,7 +45,9 @@
 #include 
 #include 
 #include 
+#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
 #include 
+#endif
 #include 
 #include 
 
@@ -482,26 +484,26 @@ Size Qt5Frame::CalcDefaultSize()
 if (!m_bFullScreen)
 {
 const QScreen* pScreen = screen();
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-aSize = bestmaxFrameSizeForScreenSize(
-toSize(pScreen ? pScreen->size() : 
QApplication::desktop()->screenGeometry(0).size()));
-SAL_WNODEPRECATED_DECLARATIONS_POP
+if (!pScreen)
+pScreen = QGuiApplication::screens().at(0);
+aSize = bestmaxFrameSizeForScreenSize(toSize(pScreen->size()));
 }
 else
 {
 if (!m_bFullScreenSpanAll)
 {
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-aSize = toSize(
-
QApplication::desktop()->screenGeometry(maGeometry.nDisplayScreenNumber).size());
-SAL_WNODEPRECATED_DECLARATIONS_POP
+aSize = 
toSize(QGuiApplication::screens().at(maGeometry.nDisplayScreenNumber)->size());
 }
 else
 {
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+QScreen* pScreen = QGuiApplication::screenAt(QPoint(0, 0));
+#else
+// QGuiApplication::screenAt was added in Qt 5.10, use deprecated 
QDesktopWidget
 int nLeftScreen = QApplication::desktop()->screenNumber(QPoint(0, 
0));
-SAL_WNODEPRECATED_DECLARATIONS_POP
-aSize = 
toSize(QApplication::screens()[nLeftScreen]->availableVirtualGeometry().size());
+QScreen* pScreen = QGuiApplication::screens()[nLeftScreen];
+#endif
+aSize = toSize(pScreen->availableVirtualGeometry().size());
 }
 }
 
@@ -1216,23 +1218,25 @@ void Qt5Frame::SetScreenNumber(unsigned int nScreen)
 
 if (!m_bFullScreenSpanAll)
 {
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-screenGeo = QApplication::desktop()->screenGeometry(nScreen);
-SAL_WNODEPRECATED_DECLARATIONS_POP
+screenGeo = QGuiApplication::screens().at(nScreen)->geometry();
 pWindow->setScreen(QApplication::screens()[nScreen]);
 }
 else // special case: fullscreen over all available screens
 {
 assert(m_bFullScreen);
 // left-most screen
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+QScreen* pScreen = QGuiApplication::screenAt(QPoint(0, 0));
+#else
+// QGuiApplication::screenAt was added in Qt 5.10, use deprecated 
QDesktopWidget
 int nLeftScreen = QApplication::desktop()->screenNumber(QPoint(0, 
0));
-SAL_WNODEPRECATED_DECLARATIONS_POP
+QScreen* pScreen = QGuiApplication::screens()[nLeftScreen];
+#endif
 // entire virtual desktop
-screenGeo = 
QApplication::screens()[nLeftScreen]->availableVirtualGeometry();
-pWindow->setScreen(QApplication::screens()[nLeftScreen]);
+screenGeo = pScreen->availableVirtualGeometry();
+pWindow->setScreen(pScreen);
 pWindow->setGeometry(screenGeo);
-nScreen = nLeftScreen;
+nScreen = screenNumber(pScreen);
 }
 
 // setScreen by itself has no effect, explicitly move the widget to
commit fe040e71343cb894f97a0781f77805fd046178ca
Author: Caolán McNamara 
AuthorDate: Fri Sep 24 11:03:34 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 24 13:57:29 2021 +0200

we just want to append to the caught exception and rethrow it

try and avoid using cppu::throwException due to asan

AddressSanitizer:DEADLYSIGNAL
=
==571495==ERROR: AddressSanitizer: SEGV on unknown 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source vcl/CppunitTest_vcl_svm_test.mk

2021-06-11 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/browser/unodatbr.cxx  |2 +-
 dbaccess/source/ui/control/dbtreelistbox.cxx |4 ++--
 dbaccess/source/ui/inc/dbtreelistbox.hxx |2 +-
 vcl/CppunitTest_vcl_svm_test.mk  |1 +
 4 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 3c325bd525d7726395db733e684b84b1659bd41a
Author: Caolán McNamara 
AuthorDate: Thu Jun 10 21:02:33 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 11 10:16:54 2021 +0200

tdf#139447 crash on dragging query/table from explorer to calc sheet

Change-Id: Ic827cb967a9a9cb78f28a23707813aeec8381cd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117018
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/browser/unodatbr.cxx 
b/dbaccess/source/ui/browser/unodatbr.cxx
index e8c1c1f5920b..685db87d432e 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -296,7 +296,7 @@ bool SbaTableQueryBrowser::Construct(vcl::Window* pParent)
 m_pSplitter->SetPosSizePixel( ::Point(0,0), ::Size(nFrameWidth,0) );
 m_pSplitter->SetBackground( Wallpaper( 
Application::GetSettings().GetStyleSettings().GetDialogColor() ) );
 
-m_pTreeView = VclPtr::Create(getBrowserView(), 
E_TABLE);
+m_pTreeView = VclPtr::Create(getBrowserView());
 
 weld::TreeView& rTreeView = m_pTreeView->GetWidget();
 rTreeView.connect_expanding(LINK(this, SbaTableQueryBrowser, 
OnExpandEntry));
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx 
b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 4c415007709c..0935caf8ff5d 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -53,9 +53,9 @@ using namespace ::com::sun::star::datatransfer;
 using namespace ::com::sun::star::ui;
 using namespace ::com::sun::star::view;
 
-InterimDBTreeListBox::InterimDBTreeListBox(vcl::Window* pParent, bool bSQLType)
+InterimDBTreeListBox::InterimDBTreeListBox(vcl::Window* pParent)
 : InterimItemWindow(pParent, "dbaccess/ui/dbtreelist.ui", "DBTreeList")
-, TreeListBox(m_xBuilder->weld_tree_view("treeview"), bSQLType)
+, TreeListBox(m_xBuilder->weld_tree_view("treeview"), true)
 , m_xStatusBar(m_xBuilder->weld_label("statusbar"))
 {
 InitControlBase(());
diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx 
b/dbaccess/source/ui/inc/dbtreelistbox.hxx
index 7beb90a6d69d..7682841a23ac 100644
--- a/dbaccess/source/ui/inc/dbtreelistbox.hxx
+++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx
@@ -119,7 +119,7 @@ namespace dbaui
 private:
 std::unique_ptr m_xStatusBar;
 public:
-InterimDBTreeListBox(vcl::Window* pParent, bool bSQLType);
+InterimDBTreeListBox(vcl::Window* pParent);
 virtual void dispose() override;
 weld::Label& GetStatusBar() { return *m_xStatusBar; }
 virtual ~InterimDBTreeListBox() override;
commit 3514b18f173c1ed7ab32e9d8820a588ba0d880d7
Author: Miklos Vajna 
AuthorDate: Fri Jun 11 09:21:15 2021 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 11 10:16:44 2021 +0200

CppunitTest_vcl_svm_test: add missing basegfx link

Missing probably because
https://gerrit.libreoffice.org/c/core/+/116967/1 was merged before its
https://gerrit.libreoffice.org/c/core/+/116959/4 parent.

Change-Id: I0c6304c98f27e1f24ee615e4580c8ad7458bf79b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117027
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/vcl/CppunitTest_vcl_svm_test.mk b/vcl/CppunitTest_vcl_svm_test.mk
index 92b4dbaafd14..5d8071c42ff3 100644
--- a/vcl/CppunitTest_vcl_svm_test.mk
+++ b/vcl/CppunitTest_vcl_svm_test.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_set_include,vcl_svm_test,\
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,vcl_svm_test, \
+   basegfx \
comphelper \
cppu \
cppuhelper \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-21 Thread Noel (via logerrit)
 dbaccess/source/core/api/RowSet.cxx|   19 
+++
 dbaccess/source/core/api/RowSetCache.cxx   |4 -
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |2 
 dbaccess/source/core/api/TableDeco.cxx |8 +--
 dbaccess/source/core/api/preparedstatement.cxx |4 -
 dbaccess/source/core/api/query.cxx |9 +--
 dbaccess/source/core/api/query.hxx |2 
 dbaccess/source/core/api/querycontainer.cxx|2 
 dbaccess/source/core/api/querydescriptor.cxx   |2 
 dbaccess/source/core/api/querydescriptor.hxx   |2 
 dbaccess/source/core/api/resultset.cxx |4 -
 dbaccess/source/core/api/table.cxx |8 ---
 dbaccess/source/core/api/tablecontainer.cxx|8 +--
 dbaccess/source/core/dataaccess/ComponentDefinition.cxx|2 
 dbaccess/source/core/dataaccess/ComponentDefinition.hxx|2 
 dbaccess/source/core/dataaccess/databasedocument.cxx   |8 +--
 dbaccess/source/core/dataaccess/datasource.cxx |   15 
+++---
 dbaccess/source/core/dataaccess/documentdefinition.cxx |   24 
--
 dbaccess/source/core/inc/TableDeco.hxx |2 
 dbaccess/source/core/inc/column.hxx|2 
 dbaccess/source/core/inc/table.hxx |2 
 dbaccess/source/filter/xml/xmlExport.cxx   |   10 +---
 dbaccess/source/ui/browser/brwctrlr.cxx|   21 
+++-
 dbaccess/source/ui/browser/exsrcbrw.cxx|1 
 dbaccess/source/ui/browser/genericcontroller.cxx   |4 -
 dbaccess/source/ui/browser/sbagrid.cxx |2 
 dbaccess/source/ui/dlg/CollectionView.cxx  |7 +-
 dbaccess/source/ui/dlg/ConnectionHelper.cxx|2 
 dbaccess/source/ui/dlg/DbAdminImpl.cxx |5 --
 dbaccess/source/ui/dlg/dbwizsetup.cxx  |   10 +---
 dbaccess/source/ui/inc/JoinTableView.hxx   |2 
 dbaccess/source/ui/inc/brwctrlr.hxx|3 -
 dbaccess/source/ui/inc/exsrcbrw.hxx|2 
 dbaccess/source/ui/misc/TableCopyHelper.cxx|4 -
 dbaccess/source/ui/querydesign/JoinTableView.cxx   |1 
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |2 
 dbaccess/source/ui/uno/ColumnControl.cxx   |2 
 drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D.cxx |6 +-
 drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D.cxx|6 +-
 drawinglayer/source/primitive2d/helplineprimitive2d.cxx|9 +--
 drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx |   15 
++
 drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx|3 -
 drawinglayer/source/processor3d/shadow3dextractor.cxx  |6 +-
 drawinglayer/source/tools/emfphelperdata.cxx   |4 -
 drawinglayer/source/tools/wmfemfhelper.cxx |4 -
 45 files changed, 118 insertions(+), 144 deletions(-)

New commits:
commit eac1daddf376f44b55b5d592cdada2b7775f2910
Author: Noel 
AuthorDate: Sun Feb 21 20:03:52 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 22 08:08:40 2021 +0100

loplugin:refcounting in dbaccess

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

diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index 80e5206b4dd6..613a69fdecb2 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1853,7 +1853,7 @@ void 
ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
 }
 sName = sAlias;
 }
-ORowSetDataColumn* pColumn = new ORowSetDataColumn( 
getMetaData(),
+rtl::Reference pColumn = new 
ORowSetDataColumn( getMetaData(),
 
this,
 
this,
 
i+1,
@@ -1867,7 +1867,7 @@ void 
ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
 aColumns->emplace_back(pColumn);

[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/qa desktop/source sw/qa

2020-10-22 Thread Xisco Fauli (via logerrit)
 dbaccess/source/ui/app/AppDetailPageHelper.cxx |4 
 dbaccess/source/ui/app/AppIconControl.cxx  |2 
 dbaccess/source/ui/app/AppIconControl.hxx  |4 
 dbaccess/source/ui/app/DocumentInfoPreview.cxx |4 
 dbaccess/source/ui/app/DocumentInfoPreview.hxx |4 
 dbaccess/source/ui/browser/brwview.cxx |2 
 dbaccess/source/ui/browser/sbagrid.cxx |   18 +--
 dbaccess/source/ui/browser/unodatbr.cxx|4 
 dbaccess/source/ui/control/ColumnControlWindow.cxx |2 
 dbaccess/source/ui/control/RelationControl.cxx |   24 ++--
 dbaccess/source/ui/control/TableGrantCtrl.cxx  |   10 -
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx  |   12 +-
 dbaccess/source/ui/inc/ColumnControlWindow.hxx |2 
 dbaccess/source/ui/inc/FieldDescControl.hxx|2 
 dbaccess/source/ui/inc/JoinController.hxx  |4 
 dbaccess/source/ui/inc/JoinTableView.hxx   |2 
 dbaccess/source/ui/inc/TableDesignControl.hxx  |   22 ++--
 dbaccess/source/ui/inc/TableGrantCtrl.hxx  |   10 -
 dbaccess/source/ui/inc/TableRow.hxx|3 
 dbaccess/source/ui/inc/WTypeSelect.hxx |2 
 dbaccess/source/ui/inc/indexfieldscontrol.hxx  |   12 +-
 dbaccess/source/ui/inc/sbagrid.hxx |4 
 dbaccess/source/ui/misc/WTypeSelect.cxx|2 
 dbaccess/source/ui/querydesign/ConnectionLine.cxx  |   18 +--
 dbaccess/source/ui/querydesign/JoinController.cxx  |4 
 dbaccess/source/ui/querydesign/JoinTableView.cxx   |   28 ++---
 dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx |4 
 dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx  |2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx  |   64 +--
 dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx  |   20 +--
 dbaccess/source/ui/querydesign/TableWindow.cxx |   10 -
 dbaccess/source/ui/querydesign/querycontainerwindow.cxx|2 
 dbaccess/source/ui/relationdesign/RTableConnection.cxx |4 
 dbaccess/source/ui/tabledesign/TEditControl.cxx|   70 ++---
 dbaccess/source/ui/tabledesign/TEditControl.hxx|   40 +++
 dbaccess/source/ui/tabledesign/TableDesignControl.cxx  |8 -
 dbaccess/source/ui/tabledesign/TableFieldControl.cxx   |2 
 dbaccess/source/ui/tabledesign/TableFieldControl.hxx   |2 
 dbaccess/source/ui/tabledesign/TableRow.cxx|2 
 dbaccess/source/ui/tabledesign/TableUndo.cxx   |   28 ++---
 dbaccess/source/ui/tabledesign/TableUndo.hxx   |   18 +--
 desktop/qa/desktop_lib/test_desktop_lib.cxx|   18 +--
 desktop/source/app/cmdlineargs.cxx |2 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx   |   22 ++--
 desktop/source/deployment/gui/dp_gui_dialog2.hxx   |   10 -
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx |2 
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx|   70 ++---
 desktop/source/deployment/gui/dp_gui_extlistbox.hxx|   24 ++--
 desktop/source/lib/init.cxx|   46 
 desktop/source/splash/splash.cxx   |   12 +-
 sw/qa/extras/ooxmlexport/data/tdf133771.odt|binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx |   22 
 52 files changed, 366 insertions(+), 343 deletions(-)

New commits:
commit f308520f1e3624c88e2a0e99be2eb26e2f2d0fc4
Author: Xisco Fauli 
AuthorDate: Wed Oct 21 17:29:01 2020 +0200
Commit: Xisco Fauli 
CommitDate: Thu Oct 22 08:07:35 2020 +0200

tdf#133771: sw_ooxmlexport14: Add unittest

Change-Id: Ie2b6ad6dd0b537d59ccd5edb5d699a2b3bbd82ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104636
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf133771.odt 
b/sw/qa/extras/ooxmlexport/data/tdf133771.odt
new file mode 100644
index ..fd54160af9d1
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf133771.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 224a79eb3c32..3ac228db6cca 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -736,6 +736,28 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, 
testTableStyleConfNested)
 assertXPath(pXmlDoc, 
"//w:body/w:tbl/w:tr/w:tc[2]/w:tcPr/w:tcBorders/w:top", "val", "nil");
 }
 
+CPPUNIT_TEST_FIXTURE(SwModelTestBase, testTdf133771)
+{
+// Create the doc model.
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf133771.odt";
+loadURL(aURL, nullptr, 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/vcl vcl/inc vcl/source vcl/unx

2020-09-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/inc/TableDesignView.hxx |2 -
 dbaccess/source/ui/tabledesign/TableDesignView.cxx |4 +--
 include/vcl/InterimItemWindow.hxx  |4 +--
 include/vcl/weld.hxx   |3 ++
 vcl/inc/salvtables.hxx |4 +--
 vcl/source/control/InterimItemWindow.cxx   |8 +++---
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   26 -
 7 files changed, 29 insertions(+), 22 deletions(-)

New commits:
commit 6c8e9d47f9a8e09349dc1dbd3155461cc96034ff
Author: Caolán McNamara 
AuthorDate: Wed Sep 2 12:01:26 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Sep 2 20:23:26 2020 +0200

support attempting to set a background color for widgets

but try to discourage use of random colors

Change-Id: Iedd4dad7c039fbc4c5793f21e8ef3414ff0d4c96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101944
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 34234f05ed4e..9d68d839f641 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -264,6 +264,9 @@ public:
 virtual void set_title_background() = 0;
 //make this widget suitable for use in a toolbar
 virtual void set_toolbar_background() = 0;
+//trying to use a custom color for a background is generally a bad idea. 
If your need
+//fits one of the above categories then that's a somewhat better choice
+virtual void set_background(const Color& rBackColor) = 0;
 
 virtual css::uno::Reference 
get_drop_target() = 0;
 
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 5c2761448af4..d82e1e5087f6 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -218,8 +218,6 @@ protected:
 virtual bool HandleKeyEventListener(VclWindowEvent& rEvent);
 virtual void HandleMouseEventListener(VclSimpleEvent& rEvent);
 
-void set_background(const Color& rColor);
-
 public:
 SalInstanceWidget(vcl::Window* pWidget, SalInstanceBuilder* pBuilder, bool 
bTakeOwnership);
 
@@ -382,6 +380,8 @@ public:
 
 virtual void set_highlight_background() override;
 
+virtual void set_background(const Color& rColor) override;
+
 virtual void draw(OutputDevice& rOutput, const tools::Rectangle& rRect) 
override;
 
 SystemWindow* getSystemWindow();
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 2ac4130e4392..18c3baa0341c 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2357,9 +2357,10 @@ private:
 gtk_drag_source_set(m_pWidget, GDK_BUTTON1_MASK, rGtkTargets.data(), 
rGtkTargets.size(), eDragAction);
 }
 
-void set_background(const OUString* pColor)
+void do_set_background(const Color& rColor)
 {
-if (!pColor && !m_pBgCssProvider)
+const bool bRemoveColor = rColor == COL_AUTO;
+if (bRemoveColor && !m_pBgCssProvider)
 return;
 GtkStyleContext *pWidgetContext = 
gtk_widget_get_style_context(GTK_WIDGET(m_pWidget));
 if (m_pBgCssProvider)
@@ -2367,10 +2368,11 @@ private:
 gtk_style_context_remove_provider(pWidgetContext, 
GTK_STYLE_PROVIDER(m_pBgCssProvider));
 m_pBgCssProvider = nullptr;
 }
-if (!pColor)
+if (bRemoveColor)
 return;
+OUString sColor = rColor.AsRGBHexString();
 m_pBgCssProvider = gtk_css_provider_new();
-OUString aBuffer = "* { background-color: #" + *pColor + "; }";
+OUString aBuffer = "* { background-color: #" + sColor + "; }";
 OString aResult = OUStringToOString(aBuffer, RTL_TEXTENCODING_UTF8);
 gtk_css_provider_load_from_data(m_pBgCssProvider, aResult.getStr(), 
aResult.getLength(), nullptr);
 gtk_style_context_add_provider(pWidgetContext, 
GTK_STYLE_PROVIDER(m_pBgCssProvider),
@@ -2917,20 +2919,22 @@ public:
 
 virtual void set_stack_background() override
 {
-OUString sColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor().AsRGBHexString();
-set_background();
+
do_set_background(Application::GetSettings().GetStyleSettings().GetWindowColor());
 }
 
 virtual void set_title_background() override
 {
-OUString sColor = 
Application::GetSettings().GetStyleSettings().GetShadowColor().AsRGBHexString();
-set_background();
+
do_set_background(Application::GetSettings().GetStyleSettings().GetShadowColor());
 }
 
 virtual void set_highlight_background() override
 {
-OUString sColor = 
Application::GetSettings().GetStyleSettings().GetHighlightColor().AsRGBHexString();
-set_background();
+
do_set_background(Application::GetSettings().GetStyleSettings().GetHighlightColor());
+}
+
+virtual void set_background(const Color& rColor) override
+{
+do_set_background(rColor);
 }
 
 virtual void 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/svx svx/Library_svxcore.mk svx/source

2020-09-01 Thread Aditya (via logerrit)
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |   12 -
 include/svx/gallerybinaryengine.hxx|3 +-
 include/svx/galleryfilestorage.hxx |   28 +
 svx/Library_svxcore.mk |1 
 svx/source/gallery2/galleryfilestorage.cxx |   24 ++
 5 files changed, 61 insertions(+), 7 deletions(-)

New commits:
commit 5694dc279e5f0f78b1bb669b22070881ab012f1a
Author: Aditya 
AuthorDate: Mon Aug 3 22:50:53 2020 +0530
Commit: Tomaž Vajngerl 
CommitDate: Tue Sep 1 09:22:56 2020 +0200

svx: Introduce GalleryFileStorage

Abstract class for GalleryBinaryEngine and upcoming GalleryXMLEngine. This
 interface will be used by GalleryTheme.

Change-Id: I2193e3ea9860c41a1580d5ca59da68bf41b70a3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100025
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/svx/gallerybinaryengine.hxx 
b/include/svx/gallerybinaryengine.hxx
index eb9e0b291de1..e8353d11af5a 100644
--- a/include/svx/gallerybinaryengine.hxx
+++ b/include/svx/gallerybinaryengine.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -40,7 +41,7 @@ class FmFormModel;
 class GalleryTheme;
 class GalleryThemeEntry;
 
-class SVXCORE_DLLPUBLIC GalleryBinaryEngine
+class SVXCORE_DLLPUBLIC GalleryBinaryEngine : public GalleryFileStorage
 {
 private:
 tools::SvRef m_aSvDrawStorageRef;
diff --git a/include/svx/galleryfilestorage.hxx 
b/include/svx/galleryfilestorage.hxx
new file mode 100644
index ..fee632e9b397
--- /dev/null
+++ b/include/svx/galleryfilestorage.hxx
@@ -0,0 +1,28 @@
+/* -*- 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 work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+class GalleryFileStorage
+{
+public:
+virtual ~GalleryFileStorage() = 0;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 4898c073764d..208effe3bef2 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -156,6 +156,7 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
 svx/source/gallery2/gallerybinaryengineentry \
 svx/source/gallery2/gallerystoragelocations \
 svx/source/gallery2/galleryobjectcollection \
+svx/source/gallery2/galleryfilestorage \
 svx/source/items/chrtitem \
 svx/source/items/clipfmtitem \
 svx/source/items/customshapeitem \
diff --git a/svx/source/gallery2/galleryfilestorage.cxx 
b/svx/source/gallery2/galleryfilestorage.cxx
new file mode 100644
index ..dd8e74cd3af4
--- /dev/null
+++ b/svx/source/gallery2/galleryfilestorage.cxx
@@ -0,0 +1,24 @@
+/* -*- 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 work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+
+GalleryFileStorage::~GalleryFileStorage(){};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 13c1d05570854219bc94149bff646cba831d4cbd
Author: Andrea Gelmini 
AuthorDate: Mon Aug 31 14:39:43 2020 +0200
Commit: Julien Nabet 
CommitDate: Tue Sep 1 09:22:45 2020 +0200

FIx typo in code

It passed "make check" on Linux

Change-Id: I055db4ca15e2e8c4c66d5970404c292255c15628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101778
Tested-by: Jenkins

[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/vcl vcl/inc vcl/source vcl/unx

2020-08-19 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/inc/JoinTableView.hxx  |2 ++
 dbaccess/source/ui/inc/TableWindowListBox.hxx |3 +++
 dbaccess/source/ui/inc/callbacks.hxx  |   11 +++
 dbaccess/source/ui/querydesign/JoinTableView.cxx  |4 
 dbaccess/source/ui/querydesign/TableWindowListBox.cxx |   14 +-
 include/vcl/weld.hxx  |2 ++
 vcl/inc/salvtables.hxx|2 ++
 vcl/source/app/salvtables.cxx |5 +
 vcl/unx/gtk3/gtk3gtkinst.cxx  |6 ++
 9 files changed, 48 insertions(+), 1 deletion(-)

New commits:
commit 62ae240e9e9405b04488ade5ef113b42a3d583fa
Author: Caolán McNamara 
AuthorDate: Wed Aug 19 11:44:38 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 19 16:28:31 2020 +0200

support the background color used by base's title windows

Change-Id: Id5e9b34f35bdcd38c7d22797573ce2549f842a66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100991
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index b2080c671874..cd56690f0575 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -249,6 +249,8 @@ public:
 virtual void set_stack_background() = 0;
 //make this widget look like it has a highlighted background
 virtual void set_highlight_background() = 0;
+//make this widget suitable as parent for a title
+virtual void set_title_background() = 0;
 //make this widget suitable for use in a toolbar
 virtual void set_toolbar_background() = 0;
 
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 0b5f52179bdc..f7addeea389e 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -379,6 +379,8 @@ public:
 
 virtual void set_stack_background() override;
 
+virtual void set_title_background() override;
+
 virtual void set_toolbar_background() override;
 
 virtual void set_highlight_background() override;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index aa44a1ac0275..906cd00cffe3 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -519,6 +519,11 @@ void SalInstanceWidget::set_stack_background()
 
set_background(m_xWidget->GetSettings().GetStyleSettings().GetWindowColor());
 }
 
+void SalInstanceWidget::set_title_background()
+{
+
set_background(m_xWidget->GetSettings().GetStyleSettings().GetShadowColor());
+}
+
 void SalInstanceWidget::set_toolbar_background()
 {
 m_xWidget->SetBackground();
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 3c2032970376..bfd3c32eca6c 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2921,6 +2921,12 @@ public:
 set_background();
 }
 
+virtual void set_title_background() override
+{
+OUString sColor = 
Application::GetSettings().GetStyleSettings().GetShadowColor().AsRGBHexString();
+set_background();
+}
+
 virtual void set_highlight_background() override
 {
 OUString sColor = 
Application::GetSettings().GetStyleSettings().GetHighlightColor().AsRGBHexString();
commit db56c1ccdb03a8b22e6021e2bd394745a1f997cf
Author: Caolán McNamara 
AuthorDate: Wed Aug 19 13:01:51 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 19 16:28:12 2020 +0200

restore call to dragFinished on successful drop

Change-Id: Ib8a1e7f38d4e5f658ff55b645d39b0c521e21f87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100990
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx 
b/dbaccess/source/ui/inc/JoinTableView.hxx
index 53201878ad56..413cccf32e7d 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -75,6 +75,7 @@ namespace dbaui
 
 
 class OJoinTableView : public vcl::Window,
+   public IDragTransferableListener,
public DropTargetHelper
 {
 friend class OJoinMoveTabWinUndoAct;
@@ -274,6 +275,7 @@ namespace dbaui
 
 virtual void Resize() override;
 
+virtual void dragFinished( ) override;
 /// @note here the physical position (that can be changed while
 /// resizing) is used, as no scrolling can take place while 
resizing
 virtual void Command(const CommandEvent& rEvt) override;
diff --git a/dbaccess/source/ui/inc/TableWindowListBox.hxx 
b/dbaccess/source/ui/inc/TableWindowListBox.hxx
index 968ef93ab506..5ca01098266b 100644
--- a/dbaccess/source/ui/inc/TableWindowListBox.hxx
+++ b/dbaccess/source/ui/inc/TableWindowListBox.hxx
@@ -50,6 +50,7 @@ namespace dbaui
 
 class OTableWindowListBox
 : public InterimItemWindow
+, public IDragTransferableListener
 {
 std::unique_ptr m_xTreeView;
 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk include/svx sw/qa sw/source

2020-08-19 Thread Caolán McNamara (via logerrit)
 dbaccess/UIConfig_dbaccess.mk  |1 
 dbaccess/source/ui/control/sqledit.cxx |  360 +
 dbaccess/source/ui/control/undosqledit.cxx |6 
 dbaccess/source/ui/dlg/directsql.cxx   |  135 ---
 dbaccess/source/ui/inc/QueryTextView.hxx   |   34 +
 dbaccess/source/ui/inc/directsql.hxx   |   21 -
 dbaccess/source/ui/inc/sqledit.hxx |   75 +---
 dbaccess/source/ui/inc/undosqledit.hxx |   11 
 dbaccess/source/ui/querydesign/QueryTextView.cxx   |  151 ++--
 dbaccess/source/ui/querydesign/QueryViewSwitch.cxx |8 
 dbaccess/uiconfig/ui/queryview.ui  |   39 ++
 include/svx/weldeditview.hxx   |6 
 sw/qa/extras/layout/data/tdf112290.docx|binary
 sw/qa/extras/layout/layout.cxx |8 
 sw/source/core/text/portxt.cxx |3 
 15 files changed, 416 insertions(+), 442 deletions(-)

New commits:
commit 44f7674ffda49257dcc1709256dfc4676d12165c
Author: Caolán McNamara 
AuthorDate: Tue Aug 18 12:02:45 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 19 10:11:30 2020 +0200

weld OQueryTextView

its plausible with the EditEngine replacement for the SQL
editor that the undo could be integrated better than the
current check-if-the-text-has-changed timeout method. But
that's left unchanged with this commit.

Change-Id: I9b9e373044a80ee94dab4ceaad0ef2801b0b1166
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100950
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index 22e3c884b593..eb693505740b 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -61,6 +61,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
 dbaccess/uiconfig/ui/queryfilterdialog \
 dbaccess/uiconfig/ui/queryfuncmenu \
 dbaccess/uiconfig/ui/querypropertiesdialog  \
+dbaccess/uiconfig/ui/queryview \
 dbaccess/uiconfig/ui/relationdialog \
 dbaccess/uiconfig/ui/rowheightdialog \
 dbaccess/uiconfig/ui/saveindexdialog \
diff --git a/dbaccess/source/ui/control/sqledit.cxx 
b/dbaccess/source/ui/control/sqledit.cxx
index aa1745369edd..5abf5e228f7c 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -25,6 +25,11 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -34,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -43,11 +49,11 @@
 
 using namespace dbaui;
 
-class OSqlEdit::ChangesListener:
+class SQLEditView::ChangesListener:
 public cppu::WeakImplHelper< css::beans::XPropertiesChangeListener >
 {
 public:
-explicit ChangesListener(OSqlEdit & editor): editor_(editor) {}
+explicit ChangesListener(SQLEditView& editor): editor_(editor) {}
 
 private:
 virtual ~ChangesListener() override {}
@@ -65,29 +71,76 @@ private:
 editor_.ImplSetFont();
 }
 
-OSqlEdit & editor_;
+SQLEditView& editor_;
 };
 
-OSqlEdit::OSqlEdit(OQueryTextView* pParent)
-: VclMultiLineEdit(pParent, WB_LEFT | WB_VSCROLL | WB_BORDER)
-, aHighlighter(HighlighterLanguage::SQL)
-, m_pView(pParent)
-, m_bAccelAction( false )
-, m_bStopTimer(false )
+SQLEditView::SQLEditView()
+: m_aHighlighter(HighlighterLanguage::SQL)
+, m_pItemPool(nullptr)
+, m_bInUpdate(false)
+, m_bDisableInternalUndo(false)
 {
-EnableUpdateData(300);
+}
+
+void SQLEditView::DisableInternalUndo()
+{
+GetEditEngine().EnableUndo(false);
+m_bDisableInternalUndo = true;
+}
+
+void SQLEditView::SetItemPoolFont(SfxItemPool* pItemPool)
+{
+StyleSettings aStyleSettings = 
Application::GetSettings().GetStyleSettings();
+OUString 
sFontName(officecfg::Office::Common::Font::SourceViewFont::FontName::get().value_or(OUString()));
+if (sFontName.isEmpty())
+{
+vcl::Font 
aTmpFont(OutputDevice::GetDefaultFont(DefaultFontType::FIXED, 
Application::GetSettings().GetUILanguageTag().getLanguageType(), 
GetDefaultFontFlags::NONE));
+sFontName = aTmpFont.GetFamilyName();
+}
+
+Size aFontSize(0, 
officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
+vcl::Font aAppFont(sFontName, aFontSize);
+
+pItemPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), 
aAppFont.GetFamilyName(),
+  "", PITCH_DONTKNOW, 
RTL_TEXTENCODING_DONTKNOW,
+  EE_CHAR_FONTINFO));
+pItemPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(), 
aAppFont.GetFamilyName(),
+  "", PITCH_DONTKNOW, 
RTL_TEXTENCODING_DONTKNOW,
+  EE_CHAR_FONTINFO_CJK));
+

[Libreoffice-commits] core.git: 2 commits - dbaccess/source oox/source reportdesign/source sc/source svx/qa svx/source sw/source

2019-10-09 Thread Regina Henschel (via logerrit)
 dbaccess/source/core/dataaccess/ComponentDefinition.hxx   |4 -
 dbaccess/source/core/dataaccess/ModelImpl.cxx |2 
 dbaccess/source/core/dataaccess/commanddefinition.cxx |2 
 dbaccess/source/core/inc/definitioncontainer.hxx  |4 -
 oox/source/drawingml/shape.cxx|8 +--
 reportdesign/source/core/api/ReportDefinition.cxx |2 
 reportdesign/source/ui/report/ReportSection.cxx   |2 
 sc/source/filter/excel/xiescher.cxx   |2 
 svx/qa/unit/customshapes.cxx  |   34 ++
 svx/qa/unit/data/tdf127785_TextRotateAngle.odp|binary
 svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |   23 -
 sw/source/ui/dbui/mmresultdialogs.cxx |2 
 sw/source/uibase/inc/mailmergewizard.hxx  |2 
 13 files changed, 59 insertions(+), 28 deletions(-)

New commits:
commit 5e68f0e2a13cc21f95a875cf694e926e01642050
Author: Regina Henschel 
AuthorDate: Sat Oct 5 22:52:42 2019 +0200
Commit: Regina Henschel 
CommitDate: Wed Oct 9 20:43:38 2019 +0200

tdf#127785 Apply 180deg compensation for flipV to text range

If a shape is vertically flipped, then the text is rotated by
180deg around the shape center. The rotation is done by SdrTextObj,
where text rectangle and shape rectangle are the same, so the
rotated text rectangle has the correct position despite flipping.
But the text rectangle for SdrObjCustomShape is set by the shape
author in the TextFrames attribute and might have an asymmetric
position. The patch compensates the flip-rotation by pre-rotate the
text rectangle.
This replaces commit caaa8fe7c4bb88185b5b11591ee8a619cff0eced.
The error in the old patch was, that it has uses a translation
instead of a rotation, and has used a wrong place. The result was,
that a text box, which has an own TextRotateAngle, had got a wrong
position.

Change-Id: Id38e8c1839afa5091cd251fc5237315ba7944263
Reviewed-on: https://gerrit.libreoffice.org/80310
Reviewed-by: Regina Henschel 
Tested-by: Regina Henschel 
Reviewed-by: Thorsten Behrens 

diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index c1090f87109d..4a1f3cb39c46 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -539,6 +539,40 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, 
testTdf127785_Asymmetric)
 
 CPPUNIT_ASSERT_EQUAL(OUString(), sErrors);
 }
+
+CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf127785_TextRotateAngle)
+{
+// The document contains a shapes with vertical flip and a text frame with 
own
+// rotate angle. The shape has not stroke and no fill, so that the 
bounding box
+// surrounds the text and therefore equals approximately the text frame.
+// Error was, that the compensation for the 180° rotation added for 
vertical
+// flip were not made to the text box position but to the text matrix.
+const OUString sFileName("tdf127785_TextRotateAngle.odp");
+OUString sURL = m_directories.getURLFromSrc(sDataDirectory) + sFileName;
+mxComponent = loadFromDesktop(sURL, 
"com.sun.star.comp.drawing.DrawingDocument");
+CPPUNIT_ASSERT_MESSAGE("Could not load document", mxComponent.is());
+OUString sErrors; // sErrors collects the errors and should be empty in 
case all is OK.
+
+uno::Reference xShape(getShape(0));
+uno::Reference xShapeProps(xShape, uno::UNO_QUERY);
+CPPUNIT_ASSERT_MESSAGE("Could not get the shape properties", 
xShapeProps.is());
+awt::Rectangle aBoundRect;
+xShapeProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRect;
+const sal_Int32 nLeft = aBoundRect.X;
+const sal_Int32 nTop = aBoundRect.Y;
+const sal_Int32 nRight = aBoundRect.X + aBoundRect.Width - 1;
+const sal_Int32 nBottom = aBoundRect.Y + aBoundRect.Height - 1;
+if (abs(nLeft - 5054) > 5)
+sErrors += "wrong left";
+if (abs(nRight - 6374) > 5)
+sErrors += " wrong right";
+if (abs(nTop - 4516) > 5)
+sErrors += " wrong top";
+if (abs(nBottom - 8930) > 5)
+sErrors += " wrong bottom";
+
+CPPUNIT_ASSERT_EQUAL(OUString(), sErrors);
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/qa/unit/data/tdf127785_TextRotateAngle.odp 
b/svx/qa/unit/data/tdf127785_TextRotateAngle.odp
new file mode 100644
index ..742f12d4d941
Binary files /dev/null and b/svx/qa/unit/data/tdf127785_TextRotateAngle.odp 
differ
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx 
b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 08771194e109..ada854fd5503 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -94,6 +94,16 @@ namespace sdr
 aTextRange.getMinX() + aTranslation.getX(), 

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

2019-08-31 Thread Tamas Bunth (via logerrit)
 dbaccess/source/ui/inc/DExport.hxx |3 +++
 dbaccess/source/ui/uno/copytablewizard.cxx |9 +++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 376cc3ea0fc2e0f209763a2a27c5852136332c86
Author: Tamas Bunth 
AuthorDate: Sat Aug 31 18:27:44 2019 +0200
Commit: Tamás Bunth 
CommitDate: Sat Aug 31 19:43:36 2019 +0200

dbaccess: delete old paste autoincrement logic

Change-Id: I6a4392c9e93842838022370fe6c54908adcc627b
Reviewed-on: https://gerrit.libreoffice.org/78358
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 

diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 5f25b06ef784..6abaa55f9d54 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1096,7 +1096,6 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 
 const OCopyTableWizard& rWizard = impl_getDialog_throw();
 ODatabaseExport::TPositions aColumnPositions = 
rWizard.GetColumnPositions();
-bool bAutoIncrement = 
rWizard.shouldCreatePrimaryKey();
 
 Reference< XRow > xRow  ( _rxSourceResultSet, UNO_QUERY_THROW 
);
 Reference< XRowLocate > xRowLocate  ( _rxSourceResultSet, UNO_QUERY_THROW 
);
@@ -1168,7 +1167,6 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 aCopyEvent.Error.clear();
 try
 {
-bool bInsertAutoIncrement = true;
 // notify listeners
 m_aCopyTableListeners.notifyEach( ::copyingRow, 
aCopyEvent );
 
@@ -1188,19 +1186,10 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 else if( xMeta->isAutoIncrement( rColumnPos.second ) )
 {
 // it is auto incremented. Let the DBMS deal with it.
-// TODO initial value could be set when defining the
-// table
 ++nSourceColumn;
 continue;
 }
 
-if ( bAutoIncrement && bInsertAutoIncrement )
-{
-xStatementParams->setInt( 1, nRowCount );
-bInsertAutoIncrement = false;
-continue;
-}
-
 if ( ( nSourceColumn < 1 ) || ( nSourceColumn >= 
static_cast(aSourceColTypes.size()) ) )
 {   // ( we have to check here against 1 because the 
parameters are 1 based)
 ::dbtools::throwSQLException("Internal error: invalid 
column type index.",
commit fa177231cd20bf3c3f4bb9b50f6646da139c6766
Author: Tamas Bunth 
AuthorDate: Fri Aug 30 14:57:31 2019 +0200
Commit: Tamás Bunth 
CommitDate: Sat Aug 31 19:43:25 2019 +0200

tdf#127093, tdf#127092 Fix pasting autoincremented

Fix copy/paste functionality when trying to paste a table with auto
incremental column in it. In that case we should let the DBMS handle the
values in that column.

Change-Id: Ia40a0056402ec540f469b94694629dd6db7d4e71
Reviewed-on: https://gerrit.libreoffice.org/78298
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 

diff --git a/dbaccess/source/ui/inc/DExport.hxx 
b/dbaccess/source/ui/inc/DExport.hxx
index 397b527d6d7d..7dbcbf31fc6a 100644
--- a/dbaccess/source/ui/inc/DExport.hxx
+++ b/dbaccess/source/ui/inc/DExport.hxx
@@ -61,6 +61,9 @@ namespace dbaui
 public:
 typedef std::map TColumns;
 typedef std::vector 
TColumnVector;
+
+// first value is the position in the destination table. The second
+// value is the position of the column in the source table.
 typedef std::vector< std::pair >   TPositions;
 
 protected:
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index 3c2a25af6a14..5f25b06ef784 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1185,6 +1185,14 @@ void CopyTableWizard::impl_copyRows_throw( const 
Reference< XResultSet >& _rxSou
 // otherwise we don't get the correct value when only the 
2nd source column was selected
 continue;
 }
+else if( xMeta->isAutoIncrement( rColumnPos.second ) )
+{
+// it is auto incremented. Let the DBMS deal with it.
+// TODO initial value could be set when defining the
+// table
+++nSourceColumn;
+continue;
+}
 
 if ( bAutoIncrement && bInsertAutoIncrement )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/svtools include/vcl solenv/clang-format svtools/inc svtools/Library_svt.mk svtools/source vcl/Library_vcl.mk vcl/source

2019-08-07 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/inc/WCopyTable.hxx|2 -
 include/svtools/wizardmachine.hxx|2 -
 include/vcl/roadmap.hxx  |   14 ++---
 include/vcl/wizdlg.hxx   |   23 ++
 solenv/clang-format/blacklist|8 +++
 svtools/Library_svt.mk   |2 -
 svtools/source/dialogs/roadmapwizard.cxx |   26 -
 svtools/source/inc/unoiface.hxx  |2 -
 svtools/source/uno/unoiface.cxx  |   32 +++
 vcl/Library_vcl.mk   |2 +
 vcl/source/control/roadmap.cxx   |   17 +++-
 vcl/source/control/wizdlg.cxx|2 -
 12 files changed, 65 insertions(+), 67 deletions(-)

New commits:
commit 8c8813db5f747af2553cb5ed7a1df5090413d524
Author: Caolán McNamara 
AuthorDate: Sat Aug 3 19:53:08 2019 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 7 11:22:42 2019 +0200

move WizardDialog to vcl

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

diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx 
b/dbaccess/source/ui/inc/WCopyTable.hxx
index 8098abebe847..cbf6cf8dc161 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -30,7 +30,7 @@
 #include 
 #include "TypeInfo.hxx"
 #include 
-#include 
+#include 
 #include "DExport.hxx"
 #include "WTabPage.hxx"
 #include "FieldDescriptions.hxx"
diff --git a/include/svtools/wizardmachine.hxx 
b/include/svtools/wizardmachine.hxx
index ee2d32a39107..ed8aa86412cc 100644
--- a/include/svtools/wizardmachine.hxx
+++ b/include/svtools/wizardmachine.hxx
@@ -21,7 +21,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/include/svtools/wizdlg.hxx b/include/vcl/wizdlg.hxx
similarity index 94%
rename from include/svtools/wizdlg.hxx
rename to include/vcl/wizdlg.hxx
index d31869acb047..fbb10e61eacc 100644
--- a/include/svtools/wizdlg.hxx
+++ b/include/vcl/wizdlg.hxx
@@ -17,11 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SVTOOLS_WIZDLG_HXX
-#define INCLUDED_SVTOOLS_WIZDLG_HXX
-
-#include 
+#ifndef INCLUDED_VCL_WIZDLG_HXX
+#define INCLUDED_VCL_WIZDLG_HXX
 
+#include 
 #include 
 #include 
 #include 
@@ -175,7 +174,7 @@ IMPL_LINK( MyWizardDlg, ImplNextHdl, PushButton*, pBtn, 
void )
 #define WIZARDDIALOG_BUTTON_SMALLSTDOFFSET_X3
 
 
-class SVT_DLLPUBLIC WizardDialog : public ModalDialog
+class VCL_DLLPUBLIC WizardDialog : public ModalDialog
 {
 private:
 IdlemaWizardLayoutIdle;
@@ -209,12 +208,12 @@ protected:
 voidSetEmptyViewMargin();
 
 private:
-SVT_DLLPRIVATE void ImplInitData();
-SVT_DLLPRIVATE void ImplCalcSize( Size& rSize );
-SVT_DLLPRIVATE void ImplPosCtrls();
-SVT_DLLPRIVATE void ImplPosTabPage();
-SVT_DLLPRIVATE void ImplShowTabPage( TabPage* pPage );
-SVT_DLLPRIVATE TabPage* ImplGetPage( sal_uInt16 nLevel ) const;
+VCL_DLLPRIVATE void ImplInitData();
+VCL_DLLPRIVATE void ImplCalcSize( Size& rSize );
+VCL_DLLPRIVATE void ImplPosCtrls();
+VCL_DLLPRIVATE void ImplPosTabPage();
+VCL_DLLPRIVATE void ImplShowTabPage( TabPage* pPage );
+VCL_DLLPRIVATE TabPage* ImplGetPage( sal_uInt16 nLevel ) const;
 
 public:
 WizardDialog( vcl::Window* pParent, const OUString& rID, const OUString& 
rUIXMLDescription );
@@ -256,6 +255,6 @@ public:
 voidSetActivatePageHdl( const Link& 
rLink ) { maActivateHdl = rLink; }
 };
 
-#endif // INCLUDED_SVTOOLS_WIZDLG_HXX
+#endif // INCLUDED_VCL_WIZDLG_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index f77aa382d9c3..87e8df93f646 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -7021,7 +7021,6 @@ include/svtools/unoimap.hxx
 include/svtools/urlcontrol.hxx
 include/svtools/valueset.hxx
 include/svtools/wizardmachine.hxx
-include/svtools/wizdlg.hxx
 include/svx/AccessibleControlShape.hxx
 include/svx/AccessibleGraphicShape.hxx
 include/svx/AccessibleOLEShape.hxx
@@ -7974,6 +7973,7 @@ include/vcl/virdev.hxx
 include/vcl/waitobj.hxx
 include/vcl/wall.hxx
 include/vcl/window.hxx
+include/vcl/wizdlg.hxx
 include/vcl/wmf.hxx
 include/vcl/wmfexternal.hxx
 include/vcl/wrkwin.hxx
@@ -13756,7 +13756,6 @@ svtools/source/dialogs/prnsetup.cxx
 svtools/source/dialogs/restartdialog.cxx
 svtools/source/dialogs/roadmapwizard.cxx
 svtools/source/dialogs/wizardmachine.cxx
-svtools/source/dialogs/wizdlg.cxx
 svtools/source/edit/editsyntaxhighlighter.cxx
 svtools/source/edit/svmedit.cxx
 

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

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/adminpages.cxx |   47 --
 dbaccess/source/ui/dlg/adminpages.hxx |4 --
 2 files changed, 51 deletions(-)

New commits:
commit 4cb2fb91d4f70940c1656716e59cdee5e6b6b592
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:24:32 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:05:15 2019 +0200

remove newly unused OGenericAdministrationPage ctor

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

diff --git a/dbaccess/source/ui/dlg/adminpages.cxx 
b/dbaccess/source/ui/dlg/adminpages.cxx
index 22486900faf3..f85635e8cbbb 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -58,16 +58,6 @@ namespace dbaui
 {
 }
 
-OGenericAdministrationPage::OGenericAdministrationPage(vcl::Window* 
_pParent, const OString& _rId, const OUString& _rUIXMLDescription, const 
SfxItemSet& _rAttrSet)
-:SfxTabPage(_pParent, _rId, _rUIXMLDescription, &_rAttrSet)
-,m_abEnableRoadmap(false)
-,m_pAdminDialog(nullptr)
-,m_pItemSetHelper(nullptr)
-{
-
-SetExchangeSupport();
-}
-
 OGenericAdministrationPage::OGenericAdministrationPage(TabPageParent 
pParent, const OUString& rUIXMLDescription, const OString& rId, const 
SfxItemSet& rAttrSet)
 : SfxTabPage(pParent, rUIXMLDescription, rId, )
 , m_abEnableRoadmap(false)
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx 
b/dbaccess/source/ui/dlg/adminpages.hxx
index 6900f1f7cc2f..63641145cbdf 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -123,7 +123,6 @@ namespace dbaui
 css::uno::Reference< css::uno::XComponentContext >
m_xORB;
 public:
-OGenericAdministrationPage(vcl::Window* _pParent, const OString& _rId, 
const OUString& _rUIXMLDescription, const SfxItemSet& _rAttrSet);
 OGenericAdministrationPage(TabPageParent pParent, const OUString& 
rUIXMLDescription, const OString& rId, const SfxItemSet& rAttrSet);
 /// set a handler which gets called every time something on the page 
has been modified
 void SetModifiedHandler(const Link& _rHandler) { m_aModifiedHandler = _rHandler; }
commit a6ed90b37cabd339aa1b364762e5e49fd9067848
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:22:10 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:04:55 2019 +0200

drop some newly unused functions

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

diff --git a/dbaccess/source/ui/dlg/adminpages.cxx 
b/dbaccess/source/ui/dlg/adminpages.cxx
index 58464f36643c..22486900faf3 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -203,27 +203,6 @@ namespace dbaui
 {
 return true;
 }
-void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox 
const * _pCheckBox, sal_uInt16 _nID, bool& _bChangedSomething, bool 
_bRevertValue )
-{
-if ( _pCheckBox && _pCheckBox->IsValueChangedFromSaved() )
-{
-bool bValue = _pCheckBox->IsChecked();
-if ( _bRevertValue )
-bValue = !bValue;
-
-if ( _pCheckBox->IsTriStateEnabled() )
-{
-OptionalBoolItem aValue( _nID );
-if ( _pCheckBox->GetState() != TRISTATE_INDET )
-aValue.SetValue( bValue );
-_rSet.Put( aValue );
-}
-else
-_rSet.Put( SfxBoolItem( _nID, bValue ) );
-
-_bChangedSomething = true;
-}
-}
 void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, const 
weld::CheckButton* pCheckBox, sal_uInt16 _nID, bool bOptionalBool, bool& 
_bChangedSomething, bool _bRevertValue )
 {
 if (pCheckBox && pCheckBox->get_state_changed_from_saved())
@@ -245,14 +224,6 @@ namespace dbaui
 _bChangedSomething = true;
 }
 }
-void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet, NumericField 
const * _pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
-{
-if( _pEdit && _pEdit->IsValueChangedFromSaved() )
-{
-_rSet.Put(SfxInt32Item(_nID, 
static_cast(_pEdit->GetValue(;
-_bChangedSomething = true;
-}
-}
 void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet, const 
weld::SpinButton* pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
 {
 if (pEdit && pEdit->get_value_changed_from_saved())
@@ -261,14 +232,6 @@ namespace dbaui
 _bChangedSomething = true;
 }
 }
-void 

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

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |8 ++---
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |8 ++---
 dbaccess/source/ui/dlg/admincontrols.cxx  |   34 +++---
 dbaccess/source/ui/dlg/admincontrols.hxx  |6 +--
 dbaccess/source/ui/dlg/adminpages.cxx |2 -
 dbaccess/source/ui/dlg/adminpages.hxx |4 +-
 dbaccess/source/ui/dlg/detailpages.cxx|2 -
 dbaccess/source/ui/dlg/detailpages.hxx|4 +-
 8 files changed, 34 insertions(+), 34 deletions(-)

New commits:
commit d5220a535400440c657dc3000a7e078f17112861
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:19:16 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:04:28 2019 +0200

void* -> weld::Widget*

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

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index dab449091e36..5bf0805206a0 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -218,7 +218,7 @@ using namespace ::com::sun::star;
 callModifiedHdl();
 }
 
-void OLDAPConnectionPageSetup::callModifiedHdl(void *)
+void OLDAPConnectionPageSetup::callModifiedHdl(weld::Widget*)
 {
 bool bRoadmapState = ((!m_xETHostServer->get_text().isEmpty() ) && ( 
!m_xETBaseDN->get_text().isEmpty() ) && 
(!m_xFTPortNumber->get_label().isEmpty() ));
 SetRoadmapStateValue(bRoadmapState);
@@ -344,7 +344,7 @@ using namespace ::com::sun::star;
 callModifiedHdl();
 }
 
-void MySQLNativeSetupPage::callModifiedHdl(void*)
+void MySQLNativeSetupPage::callModifiedHdl(weld::Widget*)
 {
 SetRoadmapStateValue( m_xMySQLSettings->canAdvance() );
 
@@ -512,7 +512,7 @@ using namespace ::com::sun::star;
 aMsg.run();
 }
 
-void OGeneralSpecialJDBCConnectionPageSetup::callModifiedHdl(void* 
pControl)
+void OGeneralSpecialJDBCConnectionPageSetup::callModifiedHdl(weld::Widget* 
pControl)
 {
 if (pControl == m_xETDriverClass.get())
 m_xPBTestJavaDriver->set_sensitive( 
!m_xETDriverClass->get_text().trim().isEmpty() );
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 8cbe44c1297f..f5ae1a6fbaf8 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -80,7 +80,7 @@ namespace dbaui
 static VclPtr CreateLDAPTabPage( 
TabPageParent pParent, const SfxItemSet& _rAttrSet );
 OLDAPConnectionPageSetup( TabPageParent pParent, const SfxItemSet& 
_rCoreAttrs );
 virtual ~OLDAPConnectionPageSetup() override;
-virtual void callModifiedHdl(void* pControl = nullptr) override;
+virtual void callModifiedHdl(weld::Widget* pControl = nullptr) 
override;
 
 protected:
 virtual void implInitControls(const SfxItemSet& _rSet, bool 
_bSaveValue) override;
@@ -121,7 +121,7 @@ namespace dbaui
 virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) override;
 virtual void implInitControls(const SfxItemSet& _rSet, bool 
_bSaveValue) override;
 
-virtual void callModifiedHdl(void* pControl = nullptr) override;
+virtual void callModifiedHdl(weld::Widget* pControl = nullptr) 
override;
 };
 
 // OGeneralSpecialJDBCConnectionPageSetup
@@ -144,7 +144,7 @@ namespace dbaui
 virtual void implInitControls(const SfxItemSet& _rSet, bool 
_bSaveValue) override;
 virtual void fillControls(std::vector< 
std::unique_ptr >& _rControlList) override;
 virtual void fillWindows(std::vector< 
std::unique_ptr >& _rControlList) override;
-virtual void callModifiedHdl(void* pControl = nullptr) override;
+virtual void callModifiedHdl(weld::Widget* pControl = nullptr) 
override;
 
 DECL_LINK(OnTestJavaClickHdl, weld::Button&, void);
 
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx 
b/dbaccess/source/ui/dlg/admincontrols.cxx
index 6f16870a3158..3af6b2a6eb2c 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -30,7 +30,7 @@ namespace dbaui
 {
 
 // MySQLNativeSettings
-MySQLNativeSettings::MySQLNativeSettings(weld::Widget* pParent, const 
Link& rControlModificationLink)
+MySQLNativeSettings::MySQLNativeSettings(weld::Widget* pParent, const 
Link& rControlModificationLink)
 : m_xBuilder(Application::CreateBuilder(pParent, 
"dbaccess/ui/mysqlnativesettings.ui"))
 , m_xContainer(m_xBuilder->weld_widget("MysqlNativeSettings"))
 , m_xDatabaseNameLabel(m_xBuilder->weld_label("dbnamelabel"))
diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx 

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

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |   34 +--
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |   11 -
 dbaccess/source/ui/dlg/admincontrols.cxx  |  224 ++
 dbaccess/source/ui/dlg/admincontrols.hxx  |   40 ---
 4 files changed, 51 insertions(+), 258 deletions(-)

New commits:
commit ebca63dc3f1e8a314599d3a9e2739bd6ced9efab
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:12:33 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:03:54 2019 +0200

drop newly unused MySQLNativeSettings

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

diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx 
b/dbaccess/source/ui/dlg/admincontrols.cxx
index 5ba2a5b313f3..33bd77cb27c4 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -30,204 +30,6 @@ namespace dbaui
 {
 
 // MySQLNativeSettings
-MySQLNativeSettings::MySQLNativeSettings( vcl::Window& _rParent, const 
Link& _rControlModificationLink )
-:TabPage( &_rParent, "MysqlNativeSettings", 
"dbaccess/ui/mysqlnativesettings.ui" ),
-m_aControlModificationLink(_rControlModificationLink)
-{
-get(m_pDatabaseNameLabel, "dbnamelabel");
-get(m_pDatabaseName, "dbname");
-get(m_pHostPortRadio, "hostport");
-get(m_pSocketRadio, "socketlabel");
-get(m_pNamedPipeRadio, "namedpipelabel");
-get(m_pHostNameLabel, "serverlabel");
-get(m_pHostName, "server");
-get(m_pPortLabel, "portlabel");
-get(m_pPort, "port");
-m_pPort->SetUseThousandSep(false);
-get(m_pDefaultPort, "defaultport");
-get(m_pSocket, "socket");
-get(m_pNamedPipe, "namedpipe");
-
-m_pHostName->SetText("localhost");
-
-m_pDatabaseName->SetModifyHdl( LINK(this, MySQLNativeSettings, 
EditModifyHdl) );
-m_pHostName->SetModifyHdl( LINK(this, MySQLNativeSettings, 
EditModifyHdl) );
-m_pPort->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) 
);
-m_pSocket->SetModifyHdl( LINK(this, MySQLNativeSettings, 
EditModifyHdl) );
-m_pNamedPipe->SetModifyHdl( LINK(this, MySQLNativeSettings, 
EditModifyHdl) );
-m_pSocketRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, 
RadioToggleHdl) );
-m_pNamedPipeRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, 
RadioToggleHdl) );
-m_pHostPortRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, 
RadioToggleHdl) );
-
-// sockets are available on Unix systems only, named pipes only on 
Windows
-#ifdef UNX
-m_pNamedPipeRadio->Hide();
-m_pNamedPipe->Hide();
-#else
-m_pSocketRadio->Hide();
-m_pSocket->Hide();
-#endif
-}
-
-IMPL_LINK(MySQLNativeSettings, RadioToggleHdl, RadioButton&, rRadioButton, 
void)
-{
-if ( == &*m_pSocketRadio ||  == 
&*m_pNamedPipeRadio)
-m_aControlModificationLink.Call();
-m_pHostNameLabel->Enable(m_pHostPortRadio->IsChecked());
-m_pHostName->Enable(m_pHostPortRadio->IsChecked());
-m_pPortLabel->Enable(m_pHostPortRadio->IsChecked());
-m_pPort->Enable(m_pHostPortRadio->IsChecked());
-m_pDefaultPort->Enable(m_pHostPortRadio->IsChecked());
-m_pSocket->Enable(m_pSocketRadio->IsChecked());
-m_pNamedPipe->Enable(m_pNamedPipeRadio->IsChecked());
-if ( == &*m_pHostPortRadio)
-{
-if (rRadioButton.IsChecked())
-m_pHostName->SetText(m_sHostNameUserText);
-else
-m_pHostName->SetText("localhost");
-}
-}
-
-IMPL_LINK(MySQLNativeSettings, EditModifyHdl, Edit&, rEdit, void)
-{
-m_aControlModificationLink.Call();
-
-if ( == m_pHostName.get())
-{
-if (m_pHostName->IsEnabled())
-m_sHostNameUserText = m_pHostName->GetText();
-}
-}
-
-MySQLNativeSettings::~MySQLNativeSettings()
-{
-disposeOnce();
-}
-
-void MySQLNativeSettings::dispose()
-{
-m_pDatabaseNameLabel.clear();
-m_pDatabaseName.clear();
-m_pHostPortRadio.clear();
-m_pSocketRadio.clear();
-m_pNamedPipeRadio.clear();
-m_pHostNameLabel.clear();
-m_pHostName.clear();
-m_pPortLabel.clear();
-m_pPort.clear();
-m_pDefaultPort.clear();
-m_pSocket.clear();
-m_pNamedPipe.clear();
-TabPage::dispose();
-}
-
-void MySQLNativeSettings::fillControls( std::vector< 
std::unique_ptr >& _rControlList )
-{
-_rControlList.emplace_back( new OSaveValueWrapper< Edit >( 
m_pDatabaseName ) );
-_rControlList.emplace_back( new OSaveValueWrapper< Edit >( m_pHostName 
) );
-_rControlList.emplace_back( new OSaveValueWrapper< Edit >( 

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

2019-08-01 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |   80 --
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |   25 +++---
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx   |2 
 dbaccess/source/ui/dlg/adminpages.hxx |6 -
 dbaccess/source/ui/dlg/advancedsettings.cxx   |4 -
 dbaccess/source/ui/dlg/detailpages.cxx|4 -
 dbaccess/uiconfig/ui/finalpagewizard.ui   |   14 +--
 7 files changed, 58 insertions(+), 77 deletions(-)

New commits:
commit ded2045789001479609249cf8afe2fc6828046f8
Author: Caolán McNamara 
AuthorDate: Thu Aug 1 17:56:20 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 1 22:18:17 2019 +0200

some missed vcl::Window->TabPageParent opportunities

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

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 5761ef44e6a4..24cae55f638b 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -684,12 +684,11 @@ using namespace ::com::sun::star;
 callModifiedHdl();
 }
 
-VclPtr 
OSpreadSheetConnectionPageSetup::CreateDocumentOrSpreadSheetTabPage( 
vcl::Window* pParent, const SfxItemSet& _rAttrSet )
+VclPtr 
OSpreadSheetConnectionPageSetup::CreateDocumentOrSpreadSheetTabPage(TabPageParent
 pParent, const SfxItemSet& _rAttrSet)
 {
 return VclPtr::Create( pParent, 
_rAttrSet );
 }
 
-
 
OSpreadSheetConnectionPageSetup::OSpreadSheetConnectionPageSetup(TabPageParent 
pParent, const SfxItemSet& rCoreAttrs)
 : OConnectionTabPageSetup(pParent, 
"dbaccess/ui/dbwizspreadsheetpage.ui", "DBWizSpreadsheetPage",
  rCoreAttrs, STR_SPREADSHEET_HELPTEXT, 
STR_SPREADSHEET_HEADERTEXT, STR_SPREADSHEETPATH)
@@ -798,7 +797,7 @@ using namespace ::com::sun::star;
 return bChangedSomething;
 }
 
-VclPtr 
OFinalDBPageSetup::CreateFinalDBTabPageSetup(vcl::Window* pParent, const 
SfxItemSet& _rAttrSet)
+VclPtr 
OFinalDBPageSetup::CreateFinalDBTabPageSetup(TabPageParent pParent, const 
SfxItemSet& _rAttrSet)
 {
 return VclPtr::Create( pParent, _rAttrSet);
 }
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 93a44e9db391..099af83ba54a 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -40,7 +40,7 @@ namespace dbaui
 {
 public:
 virtual boolFillItemSet ( SfxItemSet* _rCoreAttrs ) override;
-static VclPtr 
CreateDocumentOrSpreadSheetTabPage( vcl::Window* pParent, const SfxItemSet& 
_rAttrSet );
+static VclPtr 
CreateDocumentOrSpreadSheetTabPage(TabPageParent pParent, const SfxItemSet& 
_rAttrSet);
 OSpreadSheetConnectionPageSetup(TabPageParent pParent, const 
SfxItemSet& _rCoreAttrs);
 virtual ~OSpreadSheetConnectionPageSetup() override;
 
@@ -251,7 +251,7 @@ namespace dbaui
 {
 public:
 virtual boolFillItemSet ( SfxItemSet* _rCoreAttrs ) override;
-static VclPtr CreateFinalDBTabPageSetup( 
vcl::Window* pParent, const SfxItemSet& _rAttrSet);
+static VclPtr 
CreateFinalDBTabPageSetup(TabPageParent pParent, const SfxItemSet& _rAttrSet);
 
 OFinalDBPageSetup(TabPageParent pParent, const SfxItemSet& 
_rCoreAttrs);
 virtual ~OFinalDBPageSetup() override;
commit 1edbdcda1d04def963a5d92ef0c731214ff9574d
Author: Caolán McNamara 
AuthorDate: Thu Aug 1 17:34:14 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 1 22:18:01 2019 +0200

weld OFinalDBPageSetup

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

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 750f37cf4b42..5761ef44e6a4 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -710,7 +710,7 @@ using namespace ::com::sun::star;
 void OSpreadSheetConnectionPageSetup::fillControls(std::vector< 
std::unique_ptr >& _rControlList)
 {
 OConnectionTabPageSetup::fillControls(_rControlList);
-_rControlList.emplace_back(new 
OSaveValueWidgetWrapper(m_xPasswordrequired.get()));
+_rControlList.emplace_back(new 
OSaveValueWidgetWrapper(m_xPasswordrequired.get()));
 
 }
 
@@ -798,87 +798,70 @@ using namespace ::com::sun::star;
 return bChangedSomething;
 }
 
-VclPtr 
OFinalDBPageSetup::CreateFinalDBTabPageSetup( vcl::Window* pParent, const 
SfxItemSet& 

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

2019-05-12 Thread Andrea Gelmini (via logerrit)
 dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx |2 +-
 dbaccess/source/ui/querydesign/TableWindowListBox.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 62d6d8cb1c58d8859c9ac2f65744b65558837f2a
Author: Andrea Gelmini 
AuthorDate: Wed May 8 10:13:31 2019 +
Commit: Julien Nabet 
CommitDate: Sun May 12 09:04:24 2019 +0200

Fix typo

Change-Id: I66429d273adf969fb54d6e378021b1db6da28969
Reviewed-on: https://gerrit.libreoffice.org/72171
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 42c418e7ff29..9398a8294ad0 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -302,7 +302,7 @@ namespace dbaui
 @param  _pEntry
 The entry to be cleared
 @param  _bListAction
-When  an list action will be created.
+When  a list action will be created.
 */
 voidclearEntryFunctionField(const OUString& 
_sFieldName,OTableFieldDescRef const & _pEntry, bool& _bListAction,sal_uInt16 
_nColumnId);
 
commit 3822976f6616b4789fee5ab12207fd94e1149e63
Author: Andrea Gelmini 
AuthorDate: Wed May 8 10:13:30 2019 +
Commit: Julien Nabet 
CommitDate: Sun May 12 09:03:47 2019 +0200

Fix typo

Change-Id: I6f6042e57821e4deeeb41ab4ce14ac355ddf432c
Reviewed-on: https://gerrit.libreoffice.org/72175
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx 
b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index 54c06c8f0a3b..d7bac39dfd0e 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -207,7 +207,7 @@ void OTableWindowListBox::StartDrag( sal_Int8 /*nAction*/, 
const Point& /*rPosPi
 EndSelection();
 // create a description of the source
 OJoinExchangeData jxdSource(this);
-// put it into a exchange object
+// put it into an exchange object
 rtl::Reference pJoin = new 
OJoinExchObj(jxdSource,bFirstNotAllowed);
 pJoin->StartDrag(this, DND_ACTION_LINK, this);
 }
@@ -217,7 +217,7 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const 
AcceptDropEvent& _rEvt )
 {
 sal_Int8 nDND_Action = DND_ACTION_NONE;
 // check the format
-if ( 
!OJoinExchObj::isFormatAvailable(GetDataFlavorExVector(),SotClipboardFormatId::SBA_TABID)
 // this means that the first entry is to be draged
+if ( 
!OJoinExchObj::isFormatAvailable(GetDataFlavorExVector(),SotClipboardFormatId::SBA_TABID)
 // this means that the first entry is to be dragged
 && OJoinExchObj::isFormatAvailable(GetDataFlavorExVector()) )
 {   // don't drop into the window if it's the drag source itself
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-11 Thread Andrea Gelmini (via logerrit)
 dbaccess/source/ui/inc/TableWindow.hxx |4 ++--
 dbaccess/source/ui/inc/WCopyTable.hxx  |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3451b39dd00c4303e4839b43bbad0119eb7f42c1
Author: Andrea Gelmini 
AuthorDate: Wed May 8 10:13:43 2019 +
Commit: Julien Nabet 
CommitDate: Sat May 11 21:27:47 2019 +0200

Fix typo

Change-Id: I49398e07d8d62d21bb9327fddbf589fc23a16720
Reviewed-on: https://gerrit.libreoffice.org/72161
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx 
b/dbaccess/source/ui/inc/WCopyTable.hxx
index 2bd96a013a20..8098abebe847 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -400,7 +400,7 @@ namespace dbaui
 
 OUString createUniqueName(const OUString& _sName);
 
-// displays a error message that a column type is not supported
+// displays an error message that a column type is not supported
 void showColumnTypeNotSupported(const OUString& _rColumnName);
 
 void removeColumnNameFromNameMap(const OUString& _sName);
commit b96397450777c0a83b7bfac76cf8f35b25f65544
Author: Andrea Gelmini 
AuthorDate: Wed May 8 10:13:48 2019 +
Commit: Julien Nabet 
CommitDate: Sat May 11 21:27:18 2019 +0200

Fix typo

Change-Id: I80d1f60646803bc3a519c310671bb7062d503726
Reviewed-on: https://gerrit.libreoffice.org/72157
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/source/ui/inc/TableWindow.hxx 
b/dbaccess/source/ui/inc/TableWindow.hxx
index 306f9cbcd5ea..879ab4beae8e 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -95,9 +95,9 @@ namespace dbaui
 
 /** HandleKeyInput tries to handle the KeyEvent. Movement or deletion
 @param  rEvt
-The KEyEvent
+The KeyEvent
 @return
- when the table could handle the keyevent.
+ when the table could handle the KeyEvent.
 */
 boolHandleKeyInput( const KeyEvent& rEvt );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-02 Thread Andrea Gelmini (via logerrit)
 dbaccess/source/core/dataaccess/connection.cxx   |2 +-
 dbaccess/source/core/dataaccess/databasedocument.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4729385ae828a178fbe0ab4fb8ec52134723b5e6
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:25 2019 +
Commit: Julien Nabet 
CommitDate: Thu May 2 19:51:14 2019 +0200

Fix typo

Change-Id: I3e48cd90a636bd8d5eab9112a2c1827a31896bcb
Reviewed-on: https://gerrit.libreoffice.org/71690
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/core/dataaccess/connection.cxx 
b/dbaccess/source/core/dataaccess/connection.cxx
index 5bed9986d13a..0b075af8e5fb 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -806,7 +806,7 @@ Reference< XInterface > SAL_CALL 
OConnection::getTableEditor( const Reference< X
 // ask ourself
 // well, we don't have own functionality here ...
 // In the future, we might decide to delegate the complete handling to 
this interface.
-// In this case, we would need to instantiate an css.sdb.TableDesign here.
+// In this case, we would need to instantiate a css.sdb.TableDesign here.
 
 return xReturn;
 }
commit 84229c5e3398a03b7e1b7b0753a36a0d30cea358
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:23 2019 +
Commit: Julien Nabet 
CommitDate: Thu May 2 19:50:45 2019 +0200

Fix typo

Change-Id: I20dcf6bc9520c3abfd021c9968916515429a7498
Reviewed-on: https://gerrit.libreoffice.org/71691
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 5d4c975e2186..d0f4e3d04ea4 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -534,7 +534,7 @@ void SAL_CALL ODatabaseDocument::load( const Sequence< 
PropertyValue >& Argument
 // similar ... just in case there is legacy code which expects a 
FileName only
 aResource.put( "FileName", aResource.get( "URL" ) );
 
-// now that somebody (perhaps) told us an macro execution mode, remember 
it as
+// now that somebody (perhaps) told us a macro execution mode, remember it 
as
 // ImposedMacroExecMode
 m_pImpl->setImposedMacroExecMode(
 aResource.getOrDefault( "MacroExecutionMode", 
m_pImpl->getImposedMacroExecMode() ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-02 Thread Andrea Gelmini (via logerrit)
 dbaccess/source/core/dataaccess/datasource.cxx |2 +-
 dbaccess/source/core/inc/ModelImpl.hxx |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit c2c7a802e58527a5e572e903a206fe0be6c34172
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:21 2019 +
Commit: Julien Nabet 
CommitDate: Thu May 2 19:49:50 2019 +0200

Fix typo

Change-Id: Ic1cf0caad8f29efc24b6d78fd784d19ed7f113db
Reviewed-on: https://gerrit.libreoffice.org/71693
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/core/dataaccess/datasource.cxx 
b/dbaccess/source/core/dataaccess/datasource.cxx
index 0935fcf77bb5..dc8a786f75cd 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -1177,7 +1177,7 @@ Reference< XConnection > 
ODatabaseSource::connectWithCompletion( const Reference
 {
 m_pImpl->m_sFailedPassword = m_pImpl->m_aPassword;
 // assume that we had an authentication problem. Without this we 
may, after an unsuccessful connect, while
-// the user gave us a password an the order to remember it, never 
allow an password input again (at least
+// the user gave us a password and the order to remember it, never 
allow a password input again (at least
 // not without restarting the session)
 m_pImpl->m_aPassword.clear();
 }
commit fc66bc369c195de7f12f3f657120de72b145c32d
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:20 2019 +
Commit: Julien Nabet 
CommitDate: Thu May 2 19:49:11 2019 +0200

Fix typo

Change-Id: Ia2f869a5a71c080d6284bc3a705ee4551195d9f5
Reviewed-on: https://gerrit.libreoffice.org/71694
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/core/inc/ModelImpl.hxx 
b/dbaccess/source/core/inc/ModelImpl.hxx
index 0771f07b6194..15cda7443bbd 100644
--- a/dbaccess/source/core/inc/ModelImpl.hxx
+++ b/dbaccess/source/core/inc/ModelImpl.hxx
@@ -344,7 +344,7 @@ public:
 
 void release();
 
-/// returns a all known data source settings, including their default 
values
+/// returns all known data source settings, including their default values
 static const AsciiPropertyValue* getDefaultDataSourceSettings();
 
 /** retrieves the requested container of objects 
(forms/reports/tables/queries)
@@ -461,7 +461,7 @@ private:
 
 };
 
-/** a small base class for UNO components whose functionality depends on a 
ODatabaseModelImpl
+/** a small base class for UNO components whose functionality depends on an 
ODatabaseModelImpl
 */
 class ModelDependentComponent
 {
@@ -519,7 +519,7 @@ private:
 ModelDependentComponent&m_rComponent;
 };
 
-/** a guard for public methods of objects dependent on a ODatabaseModelImpl 
instance
+/** a guard for public methods of objects dependent on an ODatabaseModelImpl 
instance
 
 Just put this guard onto the stack at the beginning of your method. Don't 
bother yourself
 with a MutexGuard, checks for being disposed, and the like.
@@ -534,7 +534,7 @@ public:
 /** constructs the guard
 
 @param _component
-the component whose functionality depends on a ODatabaseModelImpl 
instance
+the component whose functionality depends on an ODatabaseModelImpl 
instance
 
 @throws css::lang::DisposedException
 If the given component is already disposed
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-05-01 Thread Andrea Gelmini (via logerrit)
 dbaccess/source/core/api/query.cxx   |2 +-
 dbaccess/source/core/api/querydescriptor.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit daebba1c296b9baa194b9052127810497a1c9f20
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:28 2019 +
Commit: Julien Nabet 
CommitDate: Wed May 1 22:38:24 2019 +0200

Fix typo

Change-Id: I0def9e55b25aec0920e1a6aafb9f4c75ad6a06f7
Reviewed-on: https://gerrit.libreoffice.org/71635
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/core/api/query.cxx 
b/dbaccess/source/core/api/query.cxx
index cac86edf8e2b..c690ca756a3b 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -330,7 +330,7 @@ void SAL_CALL OQuery::rename( const OUString& newName )
 void OQuery::registerProperties()
 {
 // the properties which OCommandBase supplies (it has no own registration, 
as it's not derived from
-// a OPropertyStateContainer)
+// an OPropertyStateContainer)
 registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, 
PropertyAttribute::BOUND|PropertyAttribute::CONSTRAINED,
 _sElementName, 
cppu::UnoType::get());
 
commit 57b7873e3ed62e3acb8334a98864c4ebfca302c8
Author: Andrea Gelmini 
AuthorDate: Sun Apr 28 21:11:27 2019 +
Commit: Julien Nabet 
CommitDate: Wed May 1 22:38:10 2019 +0200

Fix typo

Change-Id: I7dee823ce762e14fb1b96a7aa3ced2d64a66c82c
Reviewed-on: https://gerrit.libreoffice.org/71636
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/source/core/api/querydescriptor.cxx 
b/dbaccess/source/core/api/querydescriptor.cxx
index 0dc0a609d0ff..b506da57b13c 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -72,7 +72,7 @@ IMPLEMENT_FORWARD_XINTERFACE3( 
OQueryDescriptor,OWeakObject,OQueryDescriptor_Bas
 void OQueryDescriptor::registerProperties()
 {
 // the properties which OCommandBase supplies (it has no own registration, 
as it's not derived from
-// a OPropertyStateContainer)
+// an OPropertyStateContainer)
 registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, 
PropertyAttribute::BOUND|PropertyAttribute::CONSTRAINED,
 _sElementName, 
cppu::UnoType::get());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - dbaccess/source qadevOOo/tests

2019-04-22 Thread Andrea Gelmini (via logerrit)
 dbaccess/source/core/api/RowSetBase.hxx   |4 ++--
 dbaccess/source/ui/uno/copytablewizard.cxx|2 +-
 qadevOOo/tests/java/mod/_sc/ScTableColumnObj.java |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 444e8363caf226769dddb540ff432ab42883fcd2
Author: Andrea Gelmini 
AuthorDate: Wed Apr 10 16:04:37 2019 +
Commit: Julien Nabet 
CommitDate: Mon Apr 22 09:05:10 2019 +0200

Fix typo

Change-Id: I8ed9dacb0ecc21b4ed1e9e5b49494357e8252f07
Reviewed-on: https://gerrit.libreoffice.org/71051
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/source/core/api/RowSetBase.hxx 
b/dbaccess/source/core/api/RowSetBase.hxx
index ea9d40fbcc90..a7446ea3439e 100644
--- a/dbaccess/source/core/api/RowSetBase.hxx
+++ b/dbaccess/source/core/api/RowSetBase.hxx
@@ -74,7 +74,7 @@ namespace dbaccess
 protected:
 typedef std::vector   TDataColumns;
 ::osl::Mutex*   m_pMutex;   // this is 
the mutex from the rowset itself
-::osl::Mutex// we need a extra mutex for 
columns to prevent deadlock when setting new values
+::osl::Mutex// we need an extra mutex for 
columns to prevent deadlock when setting new values
 // for a row
 m_aColumnsMutex;
 
@@ -366,7 +366,7 @@ namespace dbaccess
 */
 explicit ORowSetNotifier( ORowSetBase* m_pRowSet );
 
-/** use this one to construct an vector for change value notification
+/** use this one to construct a vector for change value notification
 */
 ORowSetNotifier( ORowSetBase* m_pRowSet,const 
ORowSetValueVector::Vector& i_aRow );
 
commit 335e8b01e76503b96f5c42ea5410a482f4d872be
Author: Andrea Gelmini 
AuthorDate: Wed Apr 17 13:20:58 2019 +
Commit: Julien Nabet 
CommitDate: Mon Apr 22 09:04:54 2019 +0200

Fix typo

Change-Id: I41e527ae8932bf5897c907d52a2053803dd8a7c6
Reviewed-on: https://gerrit.libreoffice.org/71058
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx 
b/dbaccess/source/ui/uno/copytablewizard.cxx
index e493dad24851..65dd8bbe6346 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -262,7 +262,7 @@ namespace dbaui
 voidimpl_checkForUnsupportedSettings_throw(
 const Reference< XPropertySet >& _rxSourceDescriptor ) const;
 
-/** obtaines the connection described by the given data access 
descriptor
+/** obtains the connection described by the given data access 
descriptor
 
 If needed and possible, the method will ask the user, using the 
interaction
 handler associated with the database described by the descriptor.
diff --git a/qadevOOo/tests/java/mod/_sc/ScTableColumnObj.java 
b/qadevOOo/tests/java/mod/_sc/ScTableColumnObj.java
index 256a18efb708..4a21e8d034d1 100644
--- a/qadevOOo/tests/java/mod/_sc/ScTableColumnObj.java
+++ b/qadevOOo/tests/java/mod/_sc/ScTableColumnObj.java
@@ -84,7 +84,7 @@ public class ScTableColumnObj extends TestCase {
 /**
 * Creating a TestEnvironment for the interfaces to be tested.
 * Retrieves a collection of spreadsheets from the document and takes one of
-* them. Obtaines the collection of columns in the range using the interface
+* them. Obtains the collection of columns in the range using the interface
 * XColumnRowRange. Retrieves the column with index 10 that is
 * the instance of the service com.sun.star.table.TableColumn.
 * Object relations created :
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source editeng/source emfio/source extensions/source

2019-04-13 Thread Noel Grandin (via logerrit)
 dbaccess/source/core/dataaccess/ModelImpl.cxx  |3 -
 dbaccess/source/core/dataaccess/databasedocument.cxx   |3 -
 dbaccess/source/ext/macromigration/migrationlog.cxx|3 -
 dbaccess/source/filter/xml/xmlExport.cxx   |3 -
 dbaccess/source/ui/app/AppDetailPageHelper.cxx |9 +--
 dbaccess/source/ui/app/AppDetailView.cxx   |6 --
 dbaccess/source/ui/app/AppSwapWindow.cxx   |3 -
 dbaccess/source/ui/app/AppTitleWindow.cxx  |6 --
 dbaccess/source/ui/app/AppView.cxx |6 --
 dbaccess/source/ui/browser/unodatbr.cxx|6 --
 dbaccess/source/ui/dlg/ConnectionHelper.cxx|9 +--
 dbaccess/source/ui/dlg/directsql.cxx   |3 -
 dbaccess/source/ui/misc/WCopyTable.cxx |4 -
 dbaccess/source/ui/relationdesign/RTableConnectionData.cxx |3 -
 dbaccess/source/ui/tabledesign/TableController.cxx |6 --
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx |3 -
 desktop/source/deployment/manager/dp_extensionmanager.cxx  |3 -
 desktop/source/lib/init.cxx|   37 -
 editeng/source/editeng/editeng.cxx |3 -
 editeng/source/editeng/editobj.cxx |3 -
 editeng/source/editeng/editview.cxx|3 -
 editeng/source/editeng/impedit.cxx |4 -
 editeng/source/editeng/impedit2.cxx|3 -
 editeng/source/editeng/impedit4.cxx|3 -
 editeng/source/misc/hangulhanja.cxx|3 -
 editeng/source/misc/svxacorr.cxx   |6 --
 emfio/source/reader/wmfreader.cxx  |4 -
 extensions/source/bibliography/datman.cxx  |4 -
 extensions/source/update/check/updatehdl.cxx   |3 -
 29 files changed, 50 insertions(+), 105 deletions(-)

New commits:
commit 8feca893a902abe3c238403f0a1f59a24fb24926
Author: Noel Grandin 
AuthorDate: Sat Apr 13 08:21:36 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Apr 13 14:46:45 2019 +0200

loplugin:sequentialassign in editeng..extensions

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

diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 6b7157215730..458f71b34d3f 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -310,8 +310,7 @@ void EditEngine::InsertView(EditView* pEditView, size_t 
nIndex)
 ImpEditEngine::ViewsType& rViews = pImpEditEngine->GetEditViews();
 rViews.insert(rViews.begin()+nIndex, pEditView);
 
-EditSelection aStartSel;
-aStartSel = pImpEditEngine->GetEditDoc().GetStartPaM();
+EditSelection aStartSel = pImpEditEngine->GetEditDoc().GetStartPaM();
 pEditView->pImpEditView->SetEditSelection( aStartSel );
 if ( !pImpEditEngine->GetActiveView() )
 pImpEditEngine->SetActiveView( pEditView );
diff --git a/editeng/source/editeng/editobj.cxx 
b/editeng/source/editeng/editobj.cxx
index 12c6643fdd42..c33d17d62ee8 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -934,10 +934,9 @@ void EditTextObjectImpl::GetAllSections( 
std::vector& rAttrs )
 continue;
 
 sal_Int32 nStart = rXAttr.GetStart(), nEnd = rXAttr.GetEnd();
-std::vector::iterator itCurAttr = itAttr;
 
 // Find the container whose start position matches.
-itCurAttr = std::find_if(itCurAttr, aAttrs.end(), 
FindBySectionStart(nPara, nStart));
+std::vector::iterator itCurAttr = 
std::find_if(itAttr, aAttrs.end(), FindBySectionStart(nPara, nStart));
 if (itCurAttr == aAttrs.end())
 {
 // This should never happen. There is a logic error 
somewhere...
diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 3d02f76e256e..57b0acd3b258 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -330,8 +330,7 @@ void EditView::Paint( const tools::Rectangle& rRect, 
OutputDevice* pTargetDevice
 void EditView::SetEditEngine( EditEngine* pEditEng )
 {
 pImpEditView->pEditEngine = pEditEng;
-EditSelection aStartSel;
-aStartSel = pImpEditView->pEditEngine->GetEditDoc().GetStartPaM();
+EditSelection aStartSel = 
pImpEditView->pEditEngine->GetEditDoc().GetStartPaM();
 pImpEditView->SetEditSelection( aStartSel );
 }
 
diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index 0c7d077a3586..87ed64446f39 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ 

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

2019-03-02 Thread Libreoffice Gerrit user
 dbaccess/source/ui/control/SqlNameEdit.cxx |   18 --
 dbaccess/source/ui/inc/SqlNameEdit.hxx |   16 
 2 files changed, 34 deletions(-)

New commits:
commit d4e3b48ee4c32bdb4e6cc37fb618cf818e152c31
Author: Caolán McNamara 
AuthorDate: Sat Mar 2 16:10:32 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Mar 2 22:40:57 2019 +0100

OSQLNameEdit not needed as a buildable anymore

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

diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx 
b/dbaccess/source/ui/control/SqlNameEdit.cxx
index 60d470569149..a3f7c3e1371d 100644
--- a/dbaccess/source/ui/control/SqlNameEdit.cxx
+++ b/dbaccess/source/ui/control/SqlNameEdit.cxx
@@ -67,8 +67,4 @@ namespace dbaui
 }
 }
 
-using namespace dbaui;
-
-VCL_BUILDER_FACTORY(OSQLNameEdit)
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit c1e8e5cf19a64dec11d6b0a5cd34256e4b86c4ad
Author: Caolán McNamara 
AuthorDate: Sat Mar 2 16:09:40 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Mar 2 22:40:45 2019 +0100

drop newly unused OSQLNameComboBox

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

diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx 
b/dbaccess/source/ui/control/SqlNameEdit.cxx
index d890a8a476fb..60d470569149 100644
--- a/dbaccess/source/ui/control/SqlNameEdit.cxx
+++ b/dbaccess/source/ui/control/SqlNameEdit.cxx
@@ -65,24 +65,10 @@ namespace dbaui
 }
 Edit::Modify();
 }
-void OSQLNameComboBox::Modify()
-{
-OUString sCorrected;
-if ( checkString( GetText(),sCorrected ) )
-{
-Selection aSel = GetSelection();
-aSel.setMax( aSel.getMin() );
-SetText( sCorrected );
-
-SaveValue();
-}
-ComboBox::Modify();
-}
 }
 
 using namespace dbaui;
 
 VCL_BUILDER_FACTORY(OSQLNameEdit)
-VCL_BUILDER_FACTORY(OSQLNameComboBox)
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/SqlNameEdit.hxx 
b/dbaccess/source/ui/inc/SqlNameEdit.hxx
index e1067f2f281b..fa5cd5b505c6 100644
--- a/dbaccess/source/ui/inc/SqlNameEdit.hxx
+++ b/dbaccess/source/ui/inc/SqlNameEdit.hxx
@@ -60,22 +60,6 @@ namespace dbaui
 // Edit
 virtual void Modify() override;
 };
-
-class OSQLNameComboBox : public ComboBox
-,public OSQLNameChecker
-{
-public:
-OSQLNameComboBox(vcl::Window* _pParent)
-: ComboBox(_pParent, WB_BORDER)
-, OSQLNameChecker(OUString())
-{
-}
-
-// Window overrides
-// Edit
-virtual void Modify() override;
-};
-
 }
 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_SQLNAMEEDIT_HXX
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - dbaccess/source framework/inc framework/source

2019-01-29 Thread Libreoffice Gerrit user
 dbaccess/source/core/dataaccess/datasource.cxx|   13 --
 framework/inc/classes/protocolhandlercache.hxx|6 +--
 framework/source/fwi/classes/protocolhandlercache.cxx |   35 +-
 3 files changed, 30 insertions(+), 24 deletions(-)

New commits:
commit 48c6f4e0885976f9d8ccbffc5088f37bb5f1b9f0
Author: Michael Stahl 
AuthorDate: Mon Jan 28 17:56:39 2019 +0100
Commit: Michael Stahl 
CommitDate: Tue Jan 29 12:19:57 2019 +0100

framework: avoid crashing in ~HandlerCFGAccess() in atexit()

Commit d587931fba77246db3a2ccc6ab61ca77446d23f4 changed
HandlerCache::s_pConfig to a unique_ptr, which may now crash on
shutdown because it's a utl::ConfigItem and by atexit() time the
configmgr is long gone.

Due to the HandlerCache::m_nRefCount, the crash probably only happens
in case of an unclean shutdown, but we don't know whether this can
happen in practice or not, so just avoid crashing on shutdown.

Change-Id: Ifd2b782aa5592c344d1bc85acaa434c3f2a69b60
Reviewed-on: https://gerrit.libreoffice.org/67029
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/framework/inc/classes/protocolhandlercache.hxx 
b/framework/inc/classes/protocolhandlercache.hxx
index 7f5af88f342e..a23acb57bc39 100644
--- a/framework/inc/classes/protocolhandlercache.hxx
+++ b/framework/inc/classes/protocolhandlercache.hxx
@@ -93,11 +93,11 @@ class FWI_DLLPUBLIC HandlerCache final
 private:
 
 /// list of all registered handler registered by her uno 
implementation names
-static std::unique_ptr m_pHandler;
+static std::unique_ptr s_pHandler;
 /// maps URL pattern to handler names
-static std::unique_ptr m_pPattern;
+static std::unique_ptr s_pPattern;
 /// informs about config updates
-static std::unique_ptr m_pConfig;
+static HandlerCFGAccess* s_pConfig;
 /// ref count to construct/destruct internal member lists on demand by 
using singleton mechanism
 static sal_Int32 m_nRefCount;
 
diff --git a/framework/source/fwi/classes/protocolhandlercache.cxx 
b/framework/source/fwi/classes/protocolhandlercache.cxx
index 41a8d5005602..0c23aaa80f37 100644
--- a/framework/source/fwi/classes/protocolhandlercache.cxx
+++ b/framework/source/fwi/classes/protocolhandlercache.cxx
@@ -73,10 +73,10 @@ PatternHash::const_iterator findPatternKey(PatternHash 
const * hash, const OUStr
 That means it use two static member list to hold all necessary 
information
 and a ref count mechanism to create/destroy it on demand.
  */
-std::unique_ptr HandlerCache::m_pHandler;
-std::unique_ptr HandlerCache::m_pPattern;
+std::unique_ptr HandlerCache::s_pHandler;
+std::unique_ptr HandlerCache::s_pPattern;
 sal_Int32HandlerCache::m_nRefCount = 0;
-std::unique_ptr HandlerCache::m_pConfig;
+HandlerCFGAccess* HandlerCache::s_pConfig = nullptr;
 
 /**
 @short  ctor of the cache of all registered protocol handler
@@ -91,11 +91,11 @@ HandlerCache::HandlerCache()
 
 if (m_nRefCount==0)
 {
-m_pHandler.reset(new HandlerHash);
-m_pPattern.reset(new PatternHash);
-m_pConfig.reset(new HandlerCFGAccess(PACKAGENAME_PROTOCOLHANDLER));
-m_pConfig->read(*m_pHandler, *m_pPattern);
-m_pConfig->setCache(this);
+s_pHandler.reset(new HandlerHash);
+s_pPattern.reset(new PatternHash);
+s_pConfig = new HandlerCFGAccess(PACKAGENAME_PROTOCOLHANDLER);
+s_pConfig->read(*s_pHandler, *s_pPattern);
+s_pConfig->setCache(this);
 }
 
 ++m_nRefCount;
@@ -112,11 +112,12 @@ HandlerCache::~HandlerCache()
 
 if( m_nRefCount==1)
 {
-m_pConfig->setCache(nullptr);
+s_pConfig->setCache(nullptr);
 
-m_pConfig.reset();
-m_pHandler.reset();
-m_pPattern.reset();
+delete s_pConfig;
+s_pConfig = nullptr;
+s_pHandler.reset();
+s_pPattern.reset();
 }
 
 --m_nRefCount;
@@ -133,10 +134,10 @@ bool HandlerCache::search( const OUString& sURL, 
ProtocolHandler* pReturn ) cons
 
 SolarMutexGuard aGuard;
 
-PatternHash::const_iterator pItem = findPatternKey(m_pPattern.get(), sURL);
-if (pItem!=m_pPattern->end())
+PatternHash::const_iterator pItem = findPatternKey(s_pPattern.get(), sURL);
+if (pItem != s_pPattern->end())
 {
-*pReturn = (*m_pHandler)[pItem->second];
+*pReturn = (*s_pHandler)[pItem->second];
 bFound = true;
 }
 
@@ -158,8 +159,8 @@ void HandlerCache::takeOver(std::unique_ptr 
pHandler, std::unique_p
 {
 SolarMutexGuard aGuard;
 
-m_pHandler = std::move(pHandler);
-m_pPattern = std::move(pPattern);
+s_pHandler = std::move(pHandler);
+s_pPattern = std::move(pPattern);
 }
 
 /**
commit 577a9708ea9594d60b66c1c71d24175c66d24096
Author: Michael Stahl 
AuthorDate: Mon Jan 28 17:14:03 2019 +0100
Commit: Michael Stahl 
CommitDate: Tue Jan 

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

2019-01-20 Thread Libreoffice Gerrit user
 dbaccess/source/ui/browser/genericcontroller.cxx |   23 ---
 sw/inc/authfld.hxx   |   46 +++
 sw/source/core/fields/authfld.cxx|  145 ++-
 sw/source/core/tox/txmsrt.cxx|4 
 sw/source/ui/index/swuiidxmrk.cxx|9 -
 sw/source/uibase/fldui/fldmgr.cxx|8 -
 6 files changed, 74 insertions(+), 161 deletions(-)

New commits:
commit 3b16e997f69efe2e3f6cdf64fe8fb2727b6ebaa7
Author: Noel Grandin 
AuthorDate: Fri Jan 18 15:38:07 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jan 21 07:34:09 2019 +0100

cleanup SwAuthEntry manual ref-counting

And remove the "handle" nonsense and just pass plain honest pointers to
a real type around

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

diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 72837f765c65..e03cc4252f1c 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -22,27 +22,24 @@
 #include "swdllapi.h"
 #include "fldbas.hxx"
 #include "toxe.hxx"
+#include 
 #include 
+#include 
 
 #include 
 #include 
 
-class SwAuthEntry
+class SwAuthEntry : public salhelper::SimpleReferenceObject
 {
 OUStringaAuthFields[AUTH_FIELD_END];
-sal_uInt16  nRefCount;
 public:
-SwAuthEntry() : nRefCount(0){}
+SwAuthEntry() = default;
 SwAuthEntry( const SwAuthEntry& rCopy );
 booloperator==(const SwAuthEntry& rComp);
 
 inline OUString const & GetAuthorField(ToxAuthorityField ePos) const;
 inline void SetAuthorField(ToxAuthorityField ePos,
 const OUString& rField);
-
-voidAddRef(){ ++nRefCount; }
-voidRemoveRef() { --nRefCount; }
-sal_uInt16  GetRefCount()   { return nRefCount; }
 };
 
 struct SwTOXSortKey
@@ -55,19 +52,19 @@ struct SwTOXSortKey
 };
 
 typedef std::vector SortKeyArr;
-typedef std::vector> SwAuthDataArr;
+typedef std::vector> SwAuthDataArr;
 
 class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
 {
 SwDoc*  m_pDoc;
 SwAuthDataArr   m_DataArr;
-std::vector m_SequArr;
-std::vector m_SequArrRLHidden; ///< hidden redlines
+std::vector m_SequArr;
+std::vector m_SequArrRLHidden; ///< hidden redlines
 SortKeyArr  m_SortKeyArr;
 sal_Unicode m_cPrefix;
 sal_Unicode m_cSuffix;
-boolm_bIsSequence :1;
-boolm_bSortByDocument :1;
+boolm_bIsSequence :1;
+boolm_bSortByDocument :1;
 LanguageTypem_eLanguage;
 OUStringm_sSortAlgorithm;
 
@@ -83,30 +80,27 @@ public:
 virtual voidQueryValue( css::uno::Any& rVal, sal_uInt16 nWhichId ) 
const override;
 virtual voidPutValue( const css::uno::Any& rVal, sal_uInt16 
nWhichId ) override;
 
-void SetDoc(SwDoc* pNewDoc)  { m_pDoc = pNewDoc; }
+voidSetDoc(SwDoc* pNewDoc)  { m_pDoc = 
pNewDoc; }
 SwDoc*  GetDoc(){ return m_pDoc; }
-voidRemoveField(sal_IntPtr nHandle);
-sal_IntPtr  AddField(const OUString& rFieldContents);
-voidAddField(sal_IntPtr nHandle);
+voidRemoveField(const SwAuthEntry* nHandle);
+SwAuthEntry*AddField(const OUString& rFieldContents);
 voidDelSequenceArray()
 {
 m_SequArr.clear();
 m_SequArrRLHidden.clear();
 }
 
-const SwAuthEntry*  GetEntryByHandle(sal_IntPtr nHandle) const;
-
 voidGetAllEntryIdentifiers( std::vector& rToFill 
) const;
-const SwAuthEntry*  GetEntryByIdentifier(const OUString& rIdentifier) 
const;
+SwAuthEntry*GetEntryByIdentifier(const OUString& rIdentifier) 
const;
 
 boolChangeEntryContent(const SwAuthEntry* pNewEntry);
 // import interface
 sal_uInt16  AppendField(const SwAuthEntry& rInsert);
-sal_IntPtr  GetHandle(sal_uInt16 nPos);
+SwAuthEntry*GetFieldByPos(sal_uInt16 nPos);
 
-sal_uInt16  GetSequencePos(sal_IntPtr nHandle, SwRootFrame const* 
pLayout);
+sal_uInt16  GetSequencePos(const SwAuthEntry* pAuthEntry, 
SwRootFrame const* pLayout);
 
-boolIsSequence() const  {return m_bIsSequence;}
+boolIsSequence() const  {return m_bIsSequence;}
 voidSetSequence(bool bSet)
 {
 DelSequenceArray();
@@ -121,7 +115,7 @@ public:
 sal_Unicode GetPrefix() const { return 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source dbaccess/uiconfig sc/source

2018-12-02 Thread Libreoffice Gerrit user
 dbaccess/source/ui/dlg/sqlmessage.cxx |6 ++
 dbaccess/uiconfig/ui/sqlexception.ui  |4 ++--
 sc/source/core/data/documen3.cxx  |4 
 3 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 3abcd34f37b6aba5025631c64a49d4c8c34effd2
Author: Caolán McNamara 
AuthorDate: Sat Dec 1 20:16:16 2018 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 3 00:43:12 2018 +0100

Resolves: tdf#121810 wrong column order

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

diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx 
b/dbaccess/source/ui/dlg/sqlmessage.cxx
index f1683f82f700..74b4f115e6ec 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -323,6 +323,12 @@ OExceptionChainDialog::OExceptionChainDialog(weld::Window* 
pParent, const Except
 
 lcl_insertExceptionEntry(*m_xExceptionList, m_aExceptions.size() - 1, 
aInfo22018);
 }
+
+if (m_xExceptionList->n_children())
+{
+m_xExceptionList->select(0);
+OnExceptionSelected(*m_xExceptionList);
+}
 }
 
 IMPL_LINK_NOARG(OExceptionChainDialog, OnExceptionSelected, weld::TreeView&, 
void)
diff --git a/dbaccess/uiconfig/ui/sqlexception.ui 
b/dbaccess/uiconfig/ui/sqlexception.ui
index 86521e0a9102..ef392f219271 100644
--- a/dbaccess/uiconfig/ui/sqlexception.ui
+++ b/dbaccess/uiconfig/ui/sqlexception.ui
@@ -4,10 +4,10 @@
   
   
 
-  
-  
   
   
+  
+  
   
   
 
commit 3aa48124342e737f2a11eef9473ebc33a3873820
Author: Caolán McNamara 
AuthorDate: Sun Dec 2 21:07:56 2018 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 3 00:42:59 2018 +0100

ofz#11679 avoid config using path

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

diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index e9dcf697e10d..615f79d85f9f 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -71,6 +71,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace com::sun::star;
@@ -558,6 +559,9 @@ bool ScDocument::LinkExternalTab( SCTAB& rTab, const 
OUString& aDocTab,
 return false;
 }
 rTab = 0;
+#if ENABLE_FUZZERS
+return false;
+#endif
 OUString  aFilterName; // Is filled by the Loader
 OUString  aOptions; // Filter options
 sal_uInt32 nLinkCnt = pExtDocOptions ? 
pExtDocOptions->GetDocSettings().mnLinkCnt : 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-21 Thread Libreoffice Gerrit user
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |4 ++--
 vcl/source/control/edit.cxx|7 ---
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit e8db509ee41369c9f805a8ed1a4447b5c03962be
Author: Caolán McNamara 
AuthorDate: Sat Oct 20 19:57:55 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 21 18:18:02 2018 +0200

pvs-studio: _pView was already dereferenced

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

diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx 
b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index fd7599d788fd..ba7fb22d0946 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -735,7 +735,7 @@ namespace
 // only show the messagebox the first time
 if (!bCritsOnAsterikWarning)
 {
-std::unique_ptr 
xBox(Application::CreateMessageDialog(_pView ? _pView->GetFrameWeld() : nullptr,
+std::unique_ptr 
xBox(Application::CreateMessageDialog(_pView->GetFrameWeld(),
   
VclMessageType::Warning, VclButtonsType::Ok,
   
DBA_RES(STR_QRY_CRITERIA_ON_ASTERISK)));
 xBox->run();
@@ -891,7 +891,7 @@ namespace
 // only show the  MessageBox the first time
 if (!bCritsOnAsterikWarning)
 {
-std::unique_ptr 
xBox(Application::CreateMessageDialog(_pView ? _pView->GetFrameWeld() : nullptr,
+std::unique_ptr 
xBox(Application::CreateMessageDialog(_pView->GetFrameWeld(),
   
VclMessageType::Warning, VclButtonsType::Ok,
   
DBA_RES(STR_QRY_ORDERBY_ON_ASTERISK)));
 xBox->run();
commit 6837fbb1884cd8ad928ac028f9a94fad54dc1827
Author: Caolán McNamara 
AuthorDate: Sat Oct 20 21:29:38 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sun Oct 21 18:17:49 2018 +0200

pvs-studio: silence bogus V656

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

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 895d35cef5e7..e92c2639b23d 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -727,9 +727,10 @@ void Edit::ImplDelete( const Selection& rSelection, 
sal_uInt8 nDirection, sal_uI
 }
 }
 
-maText.remove( static_cast(aSelection.Min()), 
static_cast(aSelection.Len()) );
-maSelection.Min() = aSelection.Min();
-maSelection.Max() = aSelection.Min();
+const auto nSelectionMin = aSelection.Min();
+maText.remove( static_cast(nSelectionMin), 
static_cast(aSelection.Len()) );
+maSelection.Min() = nSelectionMin;
+maSelection.Max() = nSelectionMin;
 ImplAlignAndPaint();
 mbInternModified = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-09-08 Thread Libreoffice Gerrit user
 dbaccess/source/ui/dlg/ConnectionHelper.cxx   |   12 +-
 dbaccess/source/ui/dlg/ConnectionHelper.hxx   |4 
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |  108 +++---
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |   36 +++
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx   |   30 +++---
 dbaccess/source/ui/dlg/TextConnectionHelper.hxx   |4 
 dbaccess/source/ui/dlg/UserAdmin.cxx  |4 
 dbaccess/source/ui/dlg/UserAdmin.hxx  |4 
 dbaccess/source/ui/dlg/admincontrols.cxx  |   26 ++---
 dbaccess/source/ui/dlg/admincontrols.hxx  |4 
 dbaccess/source/ui/dlg/adminpages.cxx |8 -
 dbaccess/source/ui/dlg/adminpages.hxx |8 -
 dbaccess/source/ui/dlg/advancedsettings.cxx   |   26 ++---
 dbaccess/source/ui/dlg/advancedsettings.hxx   |8 -
 dbaccess/source/ui/dlg/detailpages.cxx|   44 
 dbaccess/source/ui/dlg/detailpages.hxx|   16 +--
 dbaccess/source/ui/dlg/generalpage.cxx|8 -
 dbaccess/source/ui/dlg/generalpage.hxx|4 
 dbaccess/source/ui/dlg/tablespage.cxx |6 -
 dbaccess/source/ui/dlg/tablespage.hxx |4 
 filter/source/graphicfilter/icgm/bundles.hxx  |   13 +-
 filter/source/graphicfilter/icgm/elements.cxx |   33 +-
 filter/source/graphicfilter/icgm/elements.hxx |3 
 23 files changed, 195 insertions(+), 218 deletions(-)

New commits:
commit 9212fadc4d421148e1a3f8b668d82a93f65cc2c3
Author: Noel Grandin 
AuthorDate: Fri Sep 7 14:33:33 2018 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 8 19:28:08 2018 +0200

loplugin:useuniqueptr in OGenericAdministrationPage

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

diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx 
b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 8de2b38f75d5..fe0ba4585089 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -657,16 +657,16 @@ namespace dbaui
 return true;
 }
 
-void OConnectionHelper::fillWindows(std::vector< ISaveValueWrapper* >& 
_rControlList)
+void OConnectionHelper::fillWindows(std::vector< 
std::unique_ptr >& _rControlList)
 {
-_rControlList.push_back(new 
ODisableWrapper(m_pFT_Connection));
-_rControlList.push_back(new 
ODisableWrapper(m_pPB_Connection));
-_rControlList.push_back(new 
ODisableWrapper(m_pPB_CreateDB));
+_rControlList.emplace_back(new 
ODisableWrapper(m_pFT_Connection));
+_rControlList.emplace_back(new 
ODisableWrapper(m_pPB_Connection));
+_rControlList.emplace_back(new 
ODisableWrapper(m_pPB_CreateDB));
 }
 
-void OConnectionHelper::fillControls(std::vector< ISaveValueWrapper* >& 
_rControlList)
+void OConnectionHelper::fillControls(std::vector< 
std::unique_ptr >& _rControlList)
 {
-_rControlList.push_back( new OSaveValueWrapper( m_pConnectionURL 
) );
+_rControlList.emplace_back( new OSaveValueWrapper( 
m_pConnectionURL ) );
 }
 
 bool OConnectionHelper::commitURL()
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx 
b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
index 0f599e4a9a75..e7a1a2f3264b 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
@@ -57,9 +57,9 @@ namespace dbaui
 virtual boolPreNotify( NotifyEvent& _rNEvt ) override;
 
 // OGenericAdministrationPage::fillControls
-virtual voidfillControls(std::vector< ISaveValueWrapper* >& 
_rControlList) override;
+virtual voidfillControls(std::vector< 
std::unique_ptr >& _rControlList) override;
 // OGenericAdministrationPage::fillWindows
-virtual voidfillWindows(std::vector< ISaveValueWrapper* >& 
_rControlList) override;
+virtual voidfillWindows(std::vector< 
std::unique_ptr >& _rControlList) override;
 virtual voidimplInitControls(const SfxItemSet& _rSet, bool 
_bSaveValue) override;
 
 // setting/retrieving the current connection URL
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 3334dac786e4..e1ffd84be35c 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -98,12 +98,12 @@ using namespace ::com::sun::star;
 return bDoEnable;
 }
 
-void OTextConnectionPageSetup::fillControls(std::vector< 
ISaveValueWrapper* >& _rControlList)
+void OTextConnectionPageSetup::fillControls(std::vector< 
std::unique_ptr >& _rControlList)
 {
 OConnectionTabPageSetup::fillControls(_rControlList);
 m_pTextConnectionHelper->fillControls(_rControlList);
 }
-void 

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

2018-08-15 Thread Libreoffice Gerrit user
 dbaccess/source/ui/dlg/dbadmin.cxx |   14 --
 dbaccess/source/ui/inc/dbadmin.hxx |4 ++--
 dbaccess/source/ui/inc/unoadmin.hxx|2 +-
 dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx |2 +-
 dbaccess/source/ui/uno/DBTypeWizDlg.cxx|2 +-
 dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx   |2 +-
 dbaccess/source/ui/uno/TableFilterDlg.cxx  |2 +-
 dbaccess/source/ui/uno/UserSettingsDlg.cxx |2 +-
 dbaccess/source/ui/uno/admindlg.cxx|2 +-
 dbaccess/source/ui/uno/unoadmin.cxx|1 -
 mysqlc/source/mysqlc_prepared_resultset.cxx|   17 +++--
 mysqlc/source/mysqlc_prepared_resultset.hxx|6 +++---
 12 files changed, 23 insertions(+), 33 deletions(-)

New commits:
commit 48baa68e3ac12bbaf0d5b7912a0197accf341b25
Author: Noel Grandin 
AuthorDate: Mon Aug 13 14:20:55 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 08:38:59 2018 +0200

loplugin:useuniqueptr in OPreparedResultSet

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

diff --git a/mysqlc/source/mysqlc_prepared_resultset.cxx 
b/mysqlc/source/mysqlc_prepared_resultset.cxx
index d66259d0a9db..1d5b9ad359bf 100644
--- a/mysqlc/source/mysqlc_prepared_resultset.cxx
+++ b/mysqlc/source/mysqlc_prepared_resultset.cxx
@@ -84,7 +84,7 @@ OPreparedResultSet::OPreparedResultSet(OConnection& rConn, 
OPreparedStatement* p
 {
 m_nFieldCount = mysql_stmt_field_count(pStmt);
 m_pResult = mysql_stmt_result_metadata(m_pStmt);
-m_aFields = mysql_fetch_fields(m_pResult);
+m_aFields.reset(mysql_fetch_fields(m_pResult));
 }
 
 OPreparedResultSet::~OPreparedResultSet() {}
@@ -505,11 +505,8 @@ void SAL_CALL OPreparedResultSet::close()
 MutexGuard aGuard(m_aMutex);
 checkDisposed(OPreparedResultSet_BASE::rBHelper.bDisposed);
 
-if (m_aData)
-{
-delete[] m_aData;
-delete[] m_aMetaData;
-}
+m_aData.reset();
+m_aMetaData.reset();
 
 if (m_pResult)
 mysql_free_result(m_pResult);
@@ -636,9 +633,9 @@ sal_Bool SAL_CALL OPreparedResultSet::next()
 if (m_aData == nullptr)
 {
 bFirstRun = true;
-m_aData = new MYSQL_BIND[m_nFieldCount];
-memset(m_aData, 0, m_nFieldCount * sizeof(MYSQL_BIND));
-m_aMetaData = new BindMetaData[m_nFieldCount];
+m_aData.reset(new MYSQL_BIND[m_nFieldCount]);
+memset(m_aData.get(), 0, m_nFieldCount * sizeof(MYSQL_BIND));
+m_aMetaData.reset(new BindMetaData[m_nFieldCount]);
 }
 for (sal_Int32 i = 0; i < m_nFieldCount; ++i)
 {
@@ -657,7 +654,7 @@ sal_Bool SAL_CALL OPreparedResultSet::next()
 mysqlc_sdbc_driver::allocateSqlVar(_aData[i].buffer, 
m_aData[i].buffer_type,
m_aFields[i].length);
 }
-mysql_stmt_bind_result(m_pStmt, m_aData);
+mysql_stmt_bind_result(m_pStmt, m_aData.get());
 if (bFirstRun)
 mysql_stmt_store_result(m_pStmt);
 int failure = mysql_stmt_fetch(m_pStmt);
diff --git a/mysqlc/source/mysqlc_prepared_resultset.hxx 
b/mysqlc/source/mysqlc_prepared_resultset.hxx
index db3e1034cb76..53a1b0af10a9 100644
--- a/mysqlc/source/mysqlc_prepared_resultset.hxx
+++ b/mysqlc/source/mysqlc_prepared_resultset.hxx
@@ -70,9 +70,9 @@ class OPreparedResultSet final : public OBase_Mutex,
 
 // Use c style arrays, because we have to work with pointers
 // on these.
-MYSQL_BIND* m_aData = nullptr;
-MYSQL_FIELD* m_aFields = nullptr;
-BindMetaData* m_aMetaData = nullptr;
+std::unique_ptr m_aData;
+std::unique_ptr m_aFields;
+std::unique_ptr m_aMetaData;
 
 bool m_bWasNull = false;
 
commit 2088dac08b729805e981465526be3aad090462f0
Author: Noel Grandin 
AuthorDate: Sat Aug 11 14:09:12 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 15 08:38:44 2018 +0200

loplugin:useuniqueptr in ODbAdminDialog

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

diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx 
b/dbaccess/source/ui/dlg/dbadmin.cxx
index 3cfdc343d6ef..5075f47c4a37 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -286,7 +286,7 @@ void ODbAdminDialog::clearPassword()
 m_pImpl->clearPassword();
 }
 
-SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& 
_rpPool, std::vector*& _rpDefaults, 
::dbaccess::ODsnTypeCollection* _pTypeCollection)
+void ODbAdminDialog::createItemSet(std::unique_ptr& _rpSet, 
SfxItemPool*& _rpPool, std::vector*& _rpDefaults, 
::dbaccess::ODsnTypeCollection* _pTypeCollection)
 {
 // just to be sure 
 _rpSet = nullptr;
@@ -431,19 +431,13 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& 
_rpSet, SfxItemPool*& _rp
 

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

2018-05-29 Thread Noel Grandin
 dbaccess/source/ui/dlg/dbwizsetup.cxx  |   13 ++---
 dbaccess/source/ui/dlg/indexdialog.cxx |4 ++--
 dbaccess/source/ui/inc/dbwizsetup.hxx  |2 +-
 dbaccess/source/ui/inc/indexdialog.hxx |2 +-
 4 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit c9f120a424072808c0ed09fc2487541cc212c45e
Author: Noel Grandin 
Date:   Mon May 21 15:46:07 2018 +0200

loplugin:useuniqueptr in ODbTypeWizDialogSetup

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

diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx 
b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 3403203c2e33..03b520739f25 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -141,7 +141,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* 
_pParent
 m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB,this,this));
 m_pImpl->setDataSourceOrName(_aDataSourceName);
 Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
-m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() );
+m_pOutSet.reset( new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() 
) );
 
 m_pImpl->translateProperties(xDatasource, *m_pOutSet);
 
@@ -264,8 +264,7 @@ ODbTypeWizDialogSetup::~ODbTypeWizDialogSetup()
 
 void ODbTypeWizDialogSetup::dispose()
 {
-delete m_pOutSet;
-m_pOutSet = nullptr;
+m_pOutSet.reset();
 m_pGeneralPage.clear();
 m_pMySQLIntroPage.clear();
 m_pFinalPage.clear();
@@ -388,12 +387,12 @@ void ODbTypeWizDialogSetup::resetPages(const Reference< 
XPropertySet >& _rxDatas
 
 const SfxItemSet* ODbTypeWizDialogSetup::getOutputSet() const
 {
-return m_pOutSet;
+return m_pOutSet.get();
 }
 
 SfxItemSet* ODbTypeWizDialogSetup::getWriteOutputSet()
 {
-return m_pOutSet;
+return m_pOutSet.get();
 }
 
 std::pair< Reference,bool> 
ODbTypeWizDialogSetup::createConnection()
@@ -628,7 +627,7 @@ void ODbTypeWizDialogSetup::saveDatasource()
 {
 SfxTabPage* pPage = 
static_cast(WizardDialog::GetPage(getCurrentState()));
 if ( pPage )
-pPage->FillItemSet(m_pOutSet);
+pPage->FillItemSet(m_pOutSet.get());
 }
 
 bool ODbTypeWizDialogSetup::leaveState(WizardState _nState)
@@ -640,7 +639,7 @@ bool ODbTypeWizDialogSetup::leaveState(WizardState _nState)
 resetPages(m_pImpl->getCurrentDataSource());
 }
 SfxTabPage* pPage = 
static_cast(WizardDialog::GetPage(_nState));
-return pPage && pPage->DeactivatePage(m_pOutSet) != DeactivateRC::KeepPage;
+return pPage && pPage->DeactivatePage(m_pOutSet.get()) != 
DeactivateRC::KeepPage;
 }
 
 void ODbTypeWizDialogSetup::setTitle(const OUString& /*_sTitle*/)
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx 
b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 0f0588f9bf68..c84b730fab94 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -58,7 +58,7 @@ class ODbTypeWizDialogSetup final : public svt::RoadmapWizard 
, public IItemSetH
 {
 private:
 std::unique_ptr  m_pImpl;
-SfxItemSet* m_pOutSet;
+std::unique_ptr m_pOutSet;
 OUStringm_sURL;
 OUStringm_sOldURL;
 boolm_bIsConnectable : 1;
commit 1ebeb51e8bfa7b139e2661e8fe460a102dfb5659
Author: Noel Grandin 
Date:   Fri May 18 15:27:18 2018 +0200

loplugin:useuniqueptr in DbaIndexDialog

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

diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx 
b/dbaccess/source/ui/dlg/indexdialog.cxx
index e2e7adc0986f..c12b89e5f5c1 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -215,7 +215,7 @@ namespace dbaui
 
 setToolBox(m_pActions);
 
-m_pIndexes = new OIndexCollection();
+m_pIndexes.reset(new OIndexCollection());
 try
 {
 m_pIndexes->attach(_rxIndexes);
@@ -307,7 +307,7 @@ namespace dbaui
 void DbaIndexDialog::dispose()
 {
 setToolBox(nullptr);
-delete m_pIndexes;
+m_pIndexes.reset();
 m_pActions.clear();
 m_pIndexList.clear();
 m_pIndexDetails.clear();
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx 
b/dbaccess/source/ui/inc/indexdialog.hxx
index 766177035374..e7b458559fbb 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -89,7 +89,7 @@ namespace dbaui
 VclPtr  m_pFields;
 VclPtr  m_pClose;
 
-OIndexCollection*   m_pIndexes;
+std::unique_ptr m_pIndexes;
 SvTreeListEntry*m_pPreviousSelection;
 boolm_bEditAgain;
 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source xmloff/inc xmloff/source

2018-05-29 Thread Noel Grandin
 dbaccess/source/ui/dlg/dlgattr.cxx|4 +--
 dbaccess/source/ui/inc/dlgattr.hxx|2 -
 xmloff/inc/XMLTextHeaderFooterContext.hxx |1 
 xmloff/inc/animationimport.hxx|1 
 xmloff/inc/txtfldi.hxx|1 
 xmloff/inc/txtvfldi.hxx   |2 -
 xmloff/source/draw/animationimport.cxx|6 ++---
 xmloff/source/draw/animimp.cxx|   10 +++--
 xmloff/source/draw/eventimp.cxx   |   10 +++--
 xmloff/source/draw/ximpbody.cxx   |   12 +--
 xmloff/source/draw/ximpbody.hxx   |2 -
 xmloff/source/draw/ximpnote.cxx   |8 +++
 xmloff/source/draw/ximpnote.hxx   |3 --
 xmloff/source/draw/ximpstyl.cxx   |   24 ++
 xmloff/source/draw/ximpstyl.hxx   |6 -
 xmloff/source/style/xmlexppr.cxx  |2 -
 xmloff/source/style/xmlnumi.cxx   |   13 ---
 xmloff/source/text/XMLTextFrameContext.cxx|4 ---
 xmloff/source/text/XMLTextHeaderFooterContext.cxx |2 -
 xmloff/source/text/XMLTextListBlockContext.cxx|1 
 xmloff/source/text/XMLTextListBlockContext.hxx|1 
 xmloff/source/text/txtfldi.cxx|3 --
 xmloff/source/text/txtparai.cxx   |1 
 xmloff/source/text/txtparai.hxx   |2 -
 xmloff/source/text/txtvfldi.cxx   |5 +++-
 25 files changed, 42 insertions(+), 84 deletions(-)

New commits:
commit 2e80fe39a438ab702ad8f3e2456159328cb16365
Author: Noel Grandin 
Date:   Fri May 18 13:46:59 2018 +0200

loplugin:useuniqueptr in dbaui::SbaSbAttrDlg

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

diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx 
b/dbaccess/source/ui/dlg/dlgattr.cxx
index f64c42e3e8ba..d2c3031b72ee 100644
--- a/dbaccess/source/ui/dlg/dlgattr.cxx
+++ b/dbaccess/source/ui/dlg/dlgattr.cxx
@@ -38,7 +38,7 @@ SbaSbAttrDlg::SbaSbAttrDlg(vcl::Window* pParent, const 
SfxItemSet* pCellAttrs,
 : SfxTabDialog(pParent, "FieldDialog", "dbaccess/ui/fielddialog.ui", 
pCellAttrs)
 , m_nNumberFormatId(0)
 {
-pNumberInfoItem = new SvxNumberInfoItem( pFormatter, 0 );
+pNumberInfoItem.reset( new SvxNumberInfoItem( pFormatter, 0 ) );
 
 if (bHasFormat)
 m_nNumberFormatId = AddTabPage("format", RID_SVXPAGE_NUMBERFORMAT);
@@ -54,7 +54,7 @@ SbaSbAttrDlg::~SbaSbAttrDlg()
 
 void SbaSbAttrDlg::dispose()
 {
-delete pNumberInfoItem;
+pNumberInfoItem.reset();
 SfxTabDialog::dispose();
 }
 
diff --git a/dbaccess/source/ui/inc/dlgattr.hxx 
b/dbaccess/source/ui/inc/dlgattr.hxx
index d5b5c20b4102..1a10d63ace86 100644
--- a/dbaccess/source/ui/inc/dlgattr.hxx
+++ b/dbaccess/source/ui/inc/dlgattr.hxx
@@ -29,7 +29,7 @@ namespace dbaui
 
 class SbaSbAttrDlg : public SfxTabDialog
 {
-SvxNumberInfoItem* pNumberInfoItem;
+std::unique_ptr pNumberInfoItem;
 sal_uInt32 m_nNumberFormatId;
 
 public:
commit 03841dc12ff3ee65ca632039418c65bbfd5ccaea
Author: Noel Grandin 
Date:   Fri May 25 17:00:23 2018 +0200

loplugin:unusedfields-in-constructor in xmloff

fields that are only referenced in the constructor

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

diff --git a/xmloff/inc/XMLTextHeaderFooterContext.hxx 
b/xmloff/inc/XMLTextHeaderFooterContext.hxx
index 47688ba08021..385190dd5674 100644
--- a/xmloff/inc/XMLTextHeaderFooterContext.hxx
+++ b/xmloff/inc/XMLTextHeaderFooterContext.hxx
@@ -34,7 +34,6 @@ class XMLTextHeaderFooterContext: public SvXMLImportContext
 
 const OUString sOn;
 const OUString sShareContent;
-const OUString sShareContentFirst;
 const OUString sText;
 const OUString sTextFirst;
 const OUString sTextLeft;
diff --git a/xmloff/inc/animationimport.hxx b/xmloff/inc/animationimport.hxx
index 6d59ad9a4898..b59f8cb60b30 100644
--- a/xmloff/inc/animationimport.hxx
+++ b/xmloff/inc/animationimport.hxx
@@ -34,7 +34,6 @@ class AnimationsImportHelperImpl;
 class AnimationNodeContext : public SvXMLImportContext
 {
 std::shared_ptr mpHelper;
-bool mbRootContext;
 css::uno::Reference< css::animations::XAnimationNode > mxNode;
 
 void init_node( const css::uno::Reference< css::xml::sax::XAttributeList 
>& xAttrList );
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 350ca6d11e0e..936c7102b3fb 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -216,7 +216,6 @@ protected:
 class XMLAuthorFieldImportContext : public XMLSenderFieldImportContext
 {
 bool bAuthorFullName;
-const OUString sServiceAuthor;
 

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

2018-05-28 Thread Noel Grandin
 dbaccess/source/ui/inc/querycontroller.hxx |4 ++--
 dbaccess/source/ui/querydesign/querycontroller.cxx |   10 --
 svgio/source/svgreader/svgtextpathnode.cxx |   12 
 3 files changed, 10 insertions(+), 16 deletions(-)

New commits:
commit c269761290866b1634779dab89e2d5e2626caaa8
Author: Noel Grandin 
Date:   Mon May 21 15:49:30 2018 +0200

loplugin:useuniqueptr in pathTextBreakupHelper

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

diff --git a/svgio/source/svgreader/svgtextpathnode.cxx 
b/svgio/source/svgreader/svgtextpathnode.cxx
index dae7f4e47bd8..288782cfbcff 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -44,7 +44,7 @@ namespace svgio
 const sal_uInt32mnMaxIndex;
 sal_uInt32  mnIndex;
 basegfx::B2DCubicBezier maCurrentSegment;
-basegfx::B2DCubicBezierHelper*  mpB2DCubicBezierHelper;
+std::unique_ptr 
mpB2DCubicBezierHelper;
 double  mfCurrentSegmentLength;
 double  mfSegmentStartPosition;
 
@@ -72,21 +72,17 @@ namespace svgio
 
 void pathTextBreakupHelper::freeB2DCubicBezierHelper()
 {
-if(mpB2DCubicBezierHelper)
-{
-delete mpB2DCubicBezierHelper;
-mpB2DCubicBezierHelper = nullptr;
-}
+mpB2DCubicBezierHelper.reset();
 }
 
 basegfx::B2DCubicBezierHelper* 
pathTextBreakupHelper::getB2DCubicBezierHelper()
 {
 if(!mpB2DCubicBezierHelper && maCurrentSegment.isBezier())
 {
-mpB2DCubicBezierHelper = new 
basegfx::B2DCubicBezierHelper(maCurrentSegment);
+mpB2DCubicBezierHelper.reset(new 
basegfx::B2DCubicBezierHelper(maCurrentSegment));
 }
 
-return mpB2DCubicBezierHelper;
+return mpB2DCubicBezierHelper.get();
 }
 
 void pathTextBreakupHelper::advanceToPosition(double fNewPosition)
commit 9aff9f22adf20aa0c00663648d1875e325b24d42
Author: Noel Grandin 
Date:   Mon May 21 15:48:23 2018 +0200

loplugin:useuniqueptr in OQueryController

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

diff --git a/dbaccess/source/ui/inc/querycontroller.hxx 
b/dbaccess/source/ui/inc/querycontroller.hxx
index 6e99796fc474..3f6df60719e8 100644
--- a/dbaccess/source/ui/inc/querycontroller.hxx
+++ b/dbaccess/source/ui/inc/querycontroller.hxx
@@ -61,9 +61,9 @@ namespace dbaui
 
 css::uno::Sequence< css::beans::PropertyValue >   
m_aFieldInformation;
 
-::svxform::OSystemParseContext* m_pParseContext;
+std::unique_ptr<::svxform::OSystemParseContext>   m_pParseContext;
 ::connectivity::OSQLParser  m_aSqlParser;
-::connectivity::OSQLParseTreeIterator*  m_pSqlIterator;
+std::unique_ptr<::connectivity::OSQLParseTreeIterator> m_pSqlIterator;
 
 css::uno::Reference< css::sdb::XSQLQueryComposer >m_xComposer;
 /// if we're editing an existing view, this is non-NULL
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx 
b/dbaccess/source/ui/querydesign/querycontroller.cxx
index f60e1a76f7b7..8f065adb3a43 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -239,8 +239,7 @@ OQueryController::OQueryController(const Reference< 
XComponentContext >& _rM)
 :OJoinController(_rM)
 ,OQueryController_PBase( getBroadcastHelper() )
 ,m_pParseContext( new svxform::OSystemParseContext )
-,m_aSqlParser( _rM, m_pParseContext )
-,m_pSqlIterator(nullptr)
+,m_aSqlParser( _rM, m_pParseContext.get() )
 ,m_nLimit(-1)
 ,m_nVisibleRows(0x400)
 ,m_nSplitPos(-1)
@@ -343,8 +342,7 @@ void OQueryController::deleteIterator()
 {
 delete m_pSqlIterator->getParseTree();
 m_pSqlIterator->dispose();
-delete m_pSqlIterator;
-m_pSqlIterator = nullptr;
+m_pSqlIterator.reset();
 }
 }
 
@@ -354,7 +352,7 @@ void OQueryController::disposing()
 
 deleteIterator();
 
-delete m_pParseContext;
+m_pParseContext.reset();
 
 clearFields();
 OTableFields().swap(m_vUnUsedFieldsDesc);
@@ -942,7 +940,7 @@ void OQueryController::setQueryComposer()
 OSL_ENSURE(m_xComposer.is(),"No querycomposer available!");
 Reference xTablesSup(getConnection(), UNO_QUERY);
 deleteIterator();
-   

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

2018-05-28 Thread Noel Grandin
 dbaccess/source/ui/inc/TableConnection.hxx  |4 ++--
 dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx |1 +
 dbaccess/source/ui/querydesign/JoinTableView.cxx|8 
 dbaccess/source/ui/querydesign/TableConnection.cxx  |   10 --
 dbaccess/source/ui/querydesign/querydlg.cxx |4 ++--
 dbaccess/source/ui/querydesign/querydlg.hxx |2 +-
 dbaccess/source/ui/relationdesign/RTableConnection.cxx  |4 ++--
 7 files changed, 16 insertions(+), 17 deletions(-)

New commits:
commit dc8e63784687292ffa178ff29f6fe2f9fd100eea
Author: Noel Grandin 
Date:   Mon May 21 15:32:02 2018 +0200

loplugin:useuniqueptr in DlgQryJoin

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

diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx 
b/dbaccess/source/ui/querydesign/querydlg.cxx
index 2bf06735b947..fc5108442506 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -67,7 +67,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
 m_pConnData.reset(_pData->NewInstance());
 m_pConnData->CopyFrom(*_pData);
 
-m_pTableControl = new OTableListBoxControl(this, _pTableMap, this);
+m_pTableControl.reset(new OTableListBoxControl(this, _pTableMap, this));
 
 
m_pCBNatural->Check(static_cast(m_pConnData.get())->isNatural());
 
@@ -143,7 +143,7 @@ DlgQryJoin::~DlgQryJoin()
 
 void DlgQryJoin::dispose()
 {
-delete m_pTableControl;
+m_pTableControl.reset();
 m_pML_HelpText.clear();
 m_pPB_OK.clear();
 m_pLB_JoinType.clear();
diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx 
b/dbaccess/source/ui/querydesign/querydlg.hxx
index 93a8d53e54f8..004afdc4fc32 100644
--- a/dbaccess/source/ui/querydesign/querydlg.hxx
+++ b/dbaccess/source/ui/querydesign/querydlg.hxx
@@ -43,7 +43,7 @@ namespace dbaui
 VclPtrm_pLB_JoinType;
 VclPtr   m_pCBNatural;
 
-OTableListBoxControl*   m_pTableControl;
+std::unique_ptr m_pTableControl;
 
 EJoinType   eJoinType;
 TTableConnectionData::value_typem_pConnData; // contains left and 
right table
commit 39d19a88bd4f0bd22aa843b630ab50f9b2708d87
Author: Noel Grandin 
Date:   Mon May 21 10:33:18 2018 +0200

loplugin:useuniqueptr in OTableConnection

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

diff --git a/dbaccess/source/ui/inc/TableConnection.hxx 
b/dbaccess/source/ui/inc/TableConnection.hxx
index 7b6725772796..04759077eff8 100644
--- a/dbaccess/source/ui/inc/TableConnection.hxx
+++ b/dbaccess/source/ui/inc/TableConnection.hxx
@@ -36,7 +36,7 @@ namespace dbaui
 
 class OTableConnection : public vcl::Window
 {
-std::vector m_vConnLine;
+std::vector m_vConnLine;
 TTableConnectionData::value_type
 m_pData;
 VclPtr  m_pParent;
@@ -88,7 +88,7 @@ namespace dbaui
 tools::Rectangle   GetBoundingRect() const;
 
 const TTableConnectionData::value_type& GetData() const { return 
m_pData; }
-const std::vector&  GetConnLineList() const { return 
m_vConnLine; }
+const std::vector&  
GetConnLineList() const { return m_vConnLine; }
 OJoinTableView*  GetParent() const { return m_pParent; 
}
 virtual void Draw(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect);
 using Window::Draw;
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx 
b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 04a9da583b56..bd90d9688490 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx 
b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index f361ca0b125d..dda98512cb77 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -892,8 +892,8 @@ void OJoinTableView::SelectConn(OTableConnection* pConn)
 SvTreeListEntry* pFirstSourceVisible = 
pSourceBox->GetFirstEntryInView();
 SvTreeListEntry* pFirstDestVisible = 
pDestBox->GetFirstEntryInView();
 
-const std::vector& rLines = 
pConn->GetConnLineList();
-

[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source filter/source include/drawinglayer include/editeng include/filter

2018-05-17 Thread Noel Grandin
 dbaccess/source/core/api/resultset.cxx  |6 +-
 dbaccess/source/core/api/resultset.hxx  |1 
 dbaccess/source/filter/xml/xmlTable.cxx |3 -
 dbaccess/source/filter/xml/xmlTable.hxx |1 
 dbaccess/source/ui/app/AppView.cxx  |9 ---
 dbaccess/source/ui/app/AppView.hxx  |1 
 dbaccess/source/ui/dlg/RelationDlg.cxx  |3 -
 dbaccess/source/ui/dlg/queryorder.cxx   |2 
 dbaccess/source/ui/inc/RelationDlg.hxx  |1 
 dbaccess/source/ui/inc/WNameMatch.hxx   |2 
 dbaccess/source/ui/inc/queryorder.hxx   |1 
 dbaccess/source/ui/misc/WNameMatch.cxx  |   12 ++---
 dbaccess/source/ui/querydesign/querydlg.cxx |3 -
 dbaccess/source/ui/querydesign/querydlg.hxx |1 
 desktop/source/deployment/gui/dp_gui_service.cxx|8 +--
 drawinglayer/source/processor3d/zbufferprocessor3d.cxx  |5 --
 editeng/source/editeng/editobj.cxx  |4 -
 editeng/source/editeng/editobj2.hxx |2 
 editeng/source/editeng/editview.cxx |2 
 editeng/source/misc/SvXMLAutoCorrectImport.cxx  |   12 ++---
 editeng/source/misc/SvXMLAutoCorrectImport.hxx  |4 -
 editeng/source/uno/unotext2.cxx |   37 +++-
 extensions/source/bibliography/general.cxx  |3 -
 extensions/source/bibliography/general.hxx  |1 
 filter/source/flash/swfwriter.cxx   |4 -
 filter/source/flash/swfwriter.hxx   |1 
 filter/source/graphicfilter/idxf/dxfgrprd.cxx   |2 
 filter/source/graphicfilter/idxf/dxfgrprd.hxx   |2 
 filter/source/msfilter/svdfppt.cxx  |5 --
 include/drawinglayer/processor3d/zbufferprocessor3d.hxx |3 -
 include/editeng/editstat.hxx|5 --
 include/editeng/unotext.hxx |3 -
 include/filter/msfilter/svdfppt.hxx |1 
 33 files changed, 47 insertions(+), 103 deletions(-)

New commits:
commit ac13f4db592f91783e644535968a8d3202c94640
Author: Noel Grandin 
Date:   Wed May 16 16:51:05 2018 +0200

loplugin:unusedfields in dbaccess..drawinglayer

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

diff --git a/dbaccess/source/core/api/resultset.cxx 
b/dbaccess/source/core/api/resultset.cxx
index e7ed9e24daf8..4942597e9774 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -57,7 +57,6 @@ OResultSet::OResultSet(const css::uno::Reference< 
css::sdbc::XResultSet >& _xRes
,OPropertySetHelper(OResultSetBase::rBHelper)
,m_xDelegatorResultSet(_xResultSet)
,m_aWarnings( Reference< XWarningsSupplier >( _xResultSet, 
UNO_QUERY ) )
-   ,m_nResultSetType(0)
,m_nResultSetConcurrency(0)
,m_bIsBookmarkable(false)
 {
@@ -71,11 +70,12 @@ OResultSet::OResultSet(const css::uno::Reference< 
css::sdbc::XResultSet >& _xRes
 m_xDelegatorRowUpdate.set(m_xDelegatorResultSet, css::uno::UNO_QUERY);
 
 Reference< XPropertySet > xSet(m_xDelegatorResultSet, UNO_QUERY);
-xSet->getPropertyValue(PROPERTY_RESULTSETTYPE) >>= m_nResultSetType;
+sal_Int32 nResultSetType(0);
+xSet->getPropertyValue(PROPERTY_RESULTSETTYPE) >>= nResultSetType;
 xSet->getPropertyValue(PROPERTY_RESULTSETCONCURRENCY) >>= 
m_nResultSetConcurrency;
 
 // test for Bookmarks
-if (ResultSetType::FORWARD_ONLY != m_nResultSetType)
+if (ResultSetType::FORWARD_ONLY != nResultSetType)
 {
 Reference  xInfo(xSet->getPropertySetInfo());
 if (xInfo->hasPropertyByName(PROPERTY_ISBOOKMARKABLE))
diff --git a/dbaccess/source/core/api/resultset.hxx 
b/dbaccess/source/core/api/resultset.hxx
index 574b458bf986..34f13a14d8bf 100644
--- a/dbaccess/source/core/api/resultset.hxx
+++ b/dbaccess/source/core/api/resultset.hxx
@@ -72,7 +72,6 @@ namespace dbaccess
 
 ::dbtools::WarningsContainerm_aWarnings;
 std::unique_ptr   m_pColumns;
-sal_Int32   m_nResultSetType;
 sal_Int32   m_nResultSetConcurrency;
 boolm_bIsBookmarkable : 1;
 
diff --git a/dbaccess/source/filter/xml/xmlTable.cxx 
b/dbaccess/source/filter/xml/xmlTable.cxx
index a951ab1302c6..94c51199d802 100644
--- a/dbaccess/source/filter/xml/xmlTable.cxx
+++ b/dbaccess/source/filter/xml/xmlTable.cxx
@@ -48,7 +48,6 @@ OXMLTable::OXMLTable( ODBFilter& _rImport
 )

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

2018-05-14 Thread Noel Grandin
 dbaccess/source/core/api/RowSet.cxx|   17 ++---
 dbaccess/source/core/api/RowSet.hxx|2 -
 dbaccess/source/core/inc/tablecontainer.hxx|5 ++-
 dbaccess/source/ext/macromigration/macromigrationpages.cxx |6 ++--
 dbaccess/source/ext/macromigration/macromigrationpages.hxx |2 -
 5 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 0f53efefe14285101ee95a2f8a202b30f7089ea9
Author: Noel Grandin 
Date:   Tue May 8 12:58:00 2018 +0200

loplugin:useuniqueptr in SaveDBDocPage

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

diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx 
b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 09fd1f69b495..d4b84e5982e6 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -79,8 +79,8 @@ namespace dbmm
 get(m_pStartMigration, "startmigrate");
 get(m_pBrowseSaveAsLocation, "browse");
 get(m_pSaveAsLocation, "location");
-m_pLocationController = new svx::DatabaseLocationInputController(
-_rParentDialog.getComponentContext(), *m_pSaveAsLocation, 
*m_pBrowseSaveAsLocation);
+m_pLocationController.reset( new svx::DatabaseLocationInputController(
+_rParentDialog.getComponentContext(), *m_pSaveAsLocation, 
*m_pBrowseSaveAsLocation) );
 
 m_pSaveAsLocation->SetModifyHdl( LINK( this, SaveDBDocPage, 
OnLocationModified ) );
 m_pSaveAsLocation->SetDropDownLineCount( 20 );
@@ -95,7 +95,7 @@ namespace dbmm
 
 void SaveDBDocPage::dispose()
 {
-delete m_pLocationController;
+m_pLocationController.reset();
 m_pSaveAsLocation.clear();
 m_pBrowseSaveAsLocation.clear();
 m_pStartMigration.clear();
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx 
b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
index 6bba4ef64a27..8c28cfd3076d 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
@@ -83,7 +83,7 @@ namespace dbmm
 VclPtr< ::svt::OFileURLControl>  m_pSaveAsLocation;
 VclPtr m_pBrowseSaveAsLocation;
 VclPtr  m_pStartMigration;
-svx::DatabaseLocationInputController* m_pLocationController;
+std::unique_ptr 
m_pLocationController;
 
 // IWizardPageController overridables
 virtual voidinitializePage() override;
commit a245e5c60fac58889738a9705225c6378b35eef4
Author: Noel Grandin 
Date:   Tue May 8 12:42:55 2018 +0200

loplugin:useuniqueptr in ORowSet

hold this by rtl::Reference since we are taking references to it
elsewhere and passing them around.

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

diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index 77abccbaf3e1..f7c7f95cdac5 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -135,7 +135,6 @@ ORowSet::ORowSet( const Reference< 
css::uno::XComponentContext >& _rxContext )
 ,m_aRowsetListeners(*m_pMutex)
 ,m_aApproveListeners(*m_pMutex)
 ,m_aRowsChangeListener(*m_pMutex)
-,m_pTables(nullptr)
 ,m_nFetchDirection(FetchDirection::FORWARD)
 ,m_nFetchSize(50)
 ,m_nMaxFieldSize(0)
@@ -2244,9 +2243,9 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
 {
 xTables.set( xTablesAccess->getTables(), UNO_QUERY_THROW );
 }
-else if ( m_pTables )
+else if ( m_xTables )
 {
-xTables = m_pTables;
+xTables = m_xTables.get();
 }
 else
 {
@@ -2264,10 +2263,10 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
 DBG_UNHANDLED_EXCEPTION("dbaccess");
 }
 
-m_pTables = new 
OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,nullptr,nullptr,m_nInAppend);
-xTables = m_pTables;
+m_xTables = new 
OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,nullptr,nullptr,m_nInAppend);
+xTables = m_xTables.get();
 Sequence aTableFilter { "%" };
-m_pTables->construct(aTableFilter,Sequence< OUString>());
+m_xTables->construct(aTableFilter,Sequence< OUString>());
 }
 
 return xTables;
@@ -2275,19 +2274,19 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
 
 void ORowSet::impl_resetTables_nothrow()
 {
-if ( !m_pTables )
+if ( !m_xTables 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source dbaccess/uiconfig solenv/gbuild

2018-04-17 Thread Caolán McNamara
 dbaccess/source/core/inc/warndlg.hxx   |4 
 dbaccess/source/core/misc/warndlg.cxx  |2 --
 dbaccess/source/ui/dlg/migrwarndlg.cxx |2 --
 dbaccess/source/ui/inc/migrwarndlg.hxx |4 
 dbaccess/uiconfig/ui/migrwarndlg.ui|   33 +
 solenv/gbuild/platform/macosx.mk   |2 --
 6 files changed, 13 insertions(+), 34 deletions(-)

New commits:
commit 4b5f85447fd17d18f05f8d4a292ee6ac381f4252
Author: Caolán McNamara 
Date:   Tue Apr 17 11:48:13 2018 +0100

Resolves: tdf#117057 use same style warning as elsewhere

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

diff --git a/dbaccess/source/core/inc/warndlg.hxx 
b/dbaccess/source/core/inc/warndlg.hxx
index 54cfe88cb6a4..3e0935bd732c 100644
--- a/dbaccess/source/core/inc/warndlg.hxx
+++ b/dbaccess/source/core/inc/warndlg.hxx
@@ -15,10 +15,6 @@ namespace dbaccess
 {
 class MigrationWarnDialog : public weld::MessageDialogController
 {
-private:
-std::unique_ptr m_xOkBtn;
-std::unique_ptr m_xLaterBtn;
-
 public:
 MigrationWarnDialog(weld::Window* pParent);
 };
diff --git a/dbaccess/source/core/misc/warndlg.cxx 
b/dbaccess/source/core/misc/warndlg.cxx
index e8446b6e7539..985c892eb9fa 100644
--- a/dbaccess/source/core/misc/warndlg.cxx
+++ b/dbaccess/source/core/misc/warndlg.cxx
@@ -13,8 +13,6 @@ namespace dbaccess
 {
 MigrationWarnDialog::MigrationWarnDialog(weld::Window* pParent)
 : MessageDialogController(pParent, "TODOUIfile", "MigrationWarnDialog", 
"ask")
-, m_xOkBtn(m_xBuilder->weld_button("yes"))
-, m_xLaterBtn(m_xBuilder->weld_button("later"))
 {
 }
 }
diff --git a/dbaccess/source/ui/dlg/migrwarndlg.cxx 
b/dbaccess/source/ui/dlg/migrwarndlg.cxx
index 9281dc11a941..ef3fa007303c 100644
--- a/dbaccess/source/ui/dlg/migrwarndlg.cxx
+++ b/dbaccess/source/ui/dlg/migrwarndlg.cxx
@@ -13,8 +13,6 @@ namespace dbaui
 {
 MigrationWarnDialog::MigrationWarnDialog(weld::Window* pParent)
 : MessageDialogController(pParent, "dbaccess/ui/migrwarndlg.ui", 
"MigrationWarnDialog")
-, m_xOkBtn(m_xBuilder->weld_button("yes"))
-, m_xLaterBtn(m_xBuilder->weld_button("later"))
 {
 }
 }
diff --git a/dbaccess/source/ui/inc/migrwarndlg.hxx 
b/dbaccess/source/ui/inc/migrwarndlg.hxx
index 7f18ad02f446..25e31046ce57 100644
--- a/dbaccess/source/ui/inc/migrwarndlg.hxx
+++ b/dbaccess/source/ui/inc/migrwarndlg.hxx
@@ -15,10 +15,6 @@ namespace dbaui
 {
 class MigrationWarnDialog : public weld::MessageDialogController
 {
-private:
-std::unique_ptr m_xOkBtn;
-std::unique_ptr m_xLaterBtn;
-
 public:
 MigrationWarnDialog(weld::Window* pParent);
 };
diff --git a/dbaccess/uiconfig/ui/migrwarndlg.ui 
b/dbaccess/uiconfig/ui/migrwarndlg.ui
index 8fa8e4934520..c504f9b2ac9f 100644
--- a/dbaccess/uiconfig/ui/migrwarndlg.ui
+++ b/dbaccess/uiconfig/ui/migrwarndlg.ui
@@ -1,13 +1,15 @@
 
-
+
 
   
   
 False
-dialog
 Confirm Migration
 False
 True
+dialog
+The document contains 
embedded HSQL data, which is deprecated.
+Would you like to migrate to 
Firebird now?
 
   
 False
@@ -16,13 +18,13 @@
 
   
 False
-end
 
   
-yes
+gtk-yes
 True
 True
 True
+True
   
   
 True
@@ -31,11 +33,12 @@
   
 
 
-  
-later
+  
+_Later
 True
 True
 True
+True
   
   
 True
@@ -50,24 +53,14 @@
 0
   
 
-
-  
-True
-False
-The document contains embedded HSQL 
data, which is deprecated.
-Would you like to migrate to Firebird now?
-  
-  
-False
-True
-1
-  
-
   
 
 
   yes
-  later
+  no
 
+
+  
+
   
 
commit 201ec4edb0bb8e0baad04ee3a1a19bdef29e2c2b
Author: Tor Lillqvist 
Date:   Tue Apr 17 09:38:45 2018 +0300

No need to restrict optimization to -O1 level

Works fine with -O2 as far as I see. At least with current Xcode.

Change-Id: Id28e1bb905efffa3e3b548eb34f3455c8a021f63
Reviewed-on: https://gerrit.libreoffice.org/53041
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 

diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 781af67f2268..37ff092ef4cb 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ 

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

2018-04-08 Thread Lionel Elie Mamane
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |   74 -
 dbaccess/source/core/inc/SingleSelectQueryComposer.hxx |2 
 2 files changed, 73 insertions(+), 3 deletions(-)

New commits:
commit e29435932d84076c4d9c443e6f6fd95a08799386
Author: Lionel Elie Mamane 
Date:   Sun Apr 8 08:14:52 2018 +0200

tdf#116772 adapt handling of LIKE conditions to cleaned up StructuredFilter

Change-Id: Ifc60da9a95833ee7820a0e03354fa1a8c006e136
Reviewed-on: https://gerrit.libreoffice.org/52573
Tested-by: Jenkins 
Reviewed-by: Lionel Elie Mamane 

diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index f35ee41c1f44..e7a7af6870e9 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1003,8 +1003,11 @@ bool OSingleSelectQueryComposer::setANDCriteria( 
OSQLParseNode const * pConditio
 {
 return 
setComparsionPredicate(pCondition,_rIterator,rFilter,xFormatter);
 }
-else if (SQL_ISRULE(pCondition,like_predicate) ||
- SQL_ISRULE(pCondition,test_for_null) ||
+else if (SQL_ISRULE(pCondition,like_predicate))
+{
+return setLikePredicate(pCondition,_rIterator,rFilter,xFormatter);
+}
+else if (SQL_ISRULE(pCondition,test_for_null) ||
  SQL_ISRULE(pCondition,in_predicate) ||
  SQL_ISRULE(pCondition,all_or_any_predicate) ||
  SQL_ISRULE(pCondition,between_predicate))
@@ -1099,6 +1102,72 @@ sal_Int32 
OSingleSelectQueryComposer::getPredicateType(OSQLParseNode const * _pP
 return nPredicate;
 }
 
+bool OSingleSelectQueryComposer::setLikePredicate(OSQLParseNode const * 
pCondition, OSQLParseTreeIterator const & _rIterator,
+std::vector < PropertyValue >& 
rFilter, const Reference< css::util::XNumberFormatter > & xFormatter) const
+{
+OSL_ENSURE(SQL_ISRULE(pCondition, like_predicate),"setLikePredicate: 
pCondition is not a LikePredicate");
+
+assert(pCondition->count() == 2);
+OSQLParseNode const *pRowValue = pCondition->getChild(0);
+OSQLParseNode const *pPart2 = pCondition->getChild(1);
+
+PropertyValue aItem;
+if ( SQL_ISTOKEN(pPart2->getChild(0),NOT) )
+aItem.Handle = SQLFilterOperator::NOT_LIKE;
+else
+aItem.Handle = SQLFilterOperator::LIKE;
+
+if (SQL_ISRULE(pRowValue, column_ref))
+{
+OUString aValue;
+
+// skip (optional "NOT") and "LIKE"
+for (size_t i=2; i < pPart2->count(); i++)
+{
+pPart2->getChild(i)->parseNodeToPredicateStr(
+aValue, m_xConnection, xFormatter, m_aLocale, 
static_cast(m_sDecimalSep.toChar() ) );
+}
+
+aItem.Name = getColumnName(pRowValue,_rIterator);
+aItem.Value <<= aValue;
+rFilter.push_back(aItem);
+}
+else if (SQL_ISRULE(pRowValue, set_fct_spec ) ||
+ SQL_ISRULE(pRowValue, general_set_fct))
+{
+OUString aValue;
+OUString aColumnName;
+
+pPart2->getChild(2)->parseNodeToPredicateStr(aValue, m_xConnection, 
xFormatter, m_aLocale, static_cast( m_sDecimalSep.toChar() ) );
+pPart2->getChild(3)->parseNodeToPredicateStr(aValue, m_xConnection, 
xFormatter, m_aLocale, static_cast( m_sDecimalSep.toChar() ) );
+pRowValue->parseNodeToPredicateStr( aColumnName, m_xConnection, 
xFormatter, m_aLocale, static_cast( m_sDecimalSep .toChar() ) );
+
+aItem.Name = getColumnName(pRowValue,_rIterator);
+aItem.Value <<= aValue;
+rFilter.push_back(aItem);
+}
+else // Can only be an expression
+{
+OUString aName, aValue;
+
+OSQLParseNode const *pValue = pPart2->getChild(2);
+
+// Field names
+for (size_t i=0;i< pRowValue->count();i++)
+ pRowValue->getChild(i)->parseNodeToPredicateStr( aName, 
m_xConnection, xFormatter, m_aLocale, static_cast( 
m_sDecimalSep.toChar() ) );
+
+// Criterion
+for(size_t i=0;i< pValue->count();i++)
+pValue->getChild(i)->parseNodeToPredicateStr(aValue, 
m_xConnection, xFormatter, m_aLocale, static_cast( 
m_sDecimalSep.toChar() ) );
+pPart2->getChild(3)->parseNodeToPredicateStr(aValue, m_xConnection, 
xFormatter, m_aLocale, static_cast( m_sDecimalSep.toChar() ) );
+
+aItem.Name = aName;
+aItem.Value <<= aValue;
+rFilter.push_back(aItem);
+}
+return true;
+}
+
 bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode const * 
pCondition, OSQLParseTreeIterator const & _rIterator,
 std::vector < PropertyValue >& 
rFilter, const Reference< css::util::XNumberFormatter > & xFormatter) const
 {
diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx 
b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx

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

2018-04-07 Thread Tamas Bunth
 dbaccess/source/filter/hsqldb/columndef.hxx  |1 +
 dbaccess/source/filter/hsqldb/fbcreateparser.cxx |   11 +--
 svx/source/dialog/paraprev.cxx   |2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 29c6629a54bd5d6cb8ccbfc663b1fed36c57e616
Author: Tamas Bunth 
Date:   Sat Apr 7 16:07:03 2018 +0200

dbahsql: add default for autoincremented columns

Change-Id: I8b4c99ed9e3701193228c58cc9e64dc87a03da71
Reviewed-on: https://gerrit.libreoffice.org/52550
Tested-by: Jenkins 
Reviewed-by: Tamás Bunth 

diff --git a/dbaccess/source/filter/hsqldb/columndef.hxx 
b/dbaccess/source/filter/hsqldb/columndef.hxx
index 5b5c68f7e67a..2bdbef83cd11 100644
--- a/dbaccess/source/filter/hsqldb/columndef.hxx
+++ b/dbaccess/source/filter/hsqldb/columndef.hxx
@@ -35,6 +35,7 @@ public:
 bool isPrimaryKey() const { return m_bPrimaryKey; }
 bool isNullable() const { return m_bNullable; }
 bool isAutoIncremental() const { return m_nAutoIncrement >= 0; }
+sal_Int32 getStartValue() const { return m_nAutoIncrement; }
 const std::vector getParams() const { return m_aParams; }
 };
 }
diff --git a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx 
b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
index 764ccaca2d69..fe23eec6635b 100644
--- a/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
+++ b/dbaccess/source/filter/hsqldb/fbcreateparser.cxx
@@ -142,9 +142,16 @@ OUString FbCreateStmtParser::compose() const
 if (!sModifier.isEmpty())
 lcl_appendWithSpace(sSql, sModifier);
 
-// TODO autoincremental default value with "START WITH"
 if (columnIter->isAutoIncremental())
-lcl_appendWithSpace(sSql, "GENERATED BY DEFAULT AS IDENTITY (START 
WITH 0)");
+{
+lcl_appendWithSpace(sSql, "GENERATED BY DEFAULT AS IDENTITY (START 
WITH ");
+
+// start with 0:
+// HSQLDB: first value will be 0.
+// Firebird: first value will be 1.
+sSql.append(columnIter->getStartValue() - 1);
+sSql.append(")");
+}
 else if (!columnIter->isNullable())
 lcl_appendWithSpace(sSql, "NOT NULL");
 
commit e3d3a7c373657dcc39aaefab9fedce9f2d12cb63
Author: Caolán McNamara 
Date:   Thu Apr 5 08:30:59 2018 +0100

coverity#1433782 Unintended sign extension

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

diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx
index 1c0bc3f1..418ed7ca8f70 100644
--- a/svx/source/dialog/paraprev.cxx
+++ b/svx/source/dialog/paraprev.cxx
@@ -85,7 +85,7 @@ void SvxParaPrevWindow::DrawParagraph(vcl::RenderContext& 
rRenderContext)
 if (i == 3)
 {
 rRenderContext.SetFillColor(COL_GRAY);
-long nTop = nUpper * aLineSiz.Height() / aSize.Height();
+auto nTop = nUpper * aLineSiz.Height() / aSize.Height();
 aPnt.AdjustY(nTop * 2 );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source extensions/inc extensions/source include/sfx2

2018-03-20 Thread Caolán McNamara
 dbaccess/source/filter/xml/dbloader2.cxx |1 -
 dbaccess/source/ui/app/AppController.cxx |1 -
 dbaccess/source/ui/browser/sbagrid.cxx   |1 -
 dbaccess/source/ui/browser/unodatbr.cxx  |1 -
 dbaccess/source/ui/control/FieldDescControl.cxx  |1 -
 dbaccess/source/ui/dlg/ConnectionHelper.cxx  |1 -
 dbaccess/source/ui/dlg/ConnectionPage.cxx|1 -
 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx   |1 -
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx|1 -
 dbaccess/source/ui/dlg/DbAdminImpl.cxx   |1 -
 dbaccess/source/ui/dlg/TablesSingleDlg.cxx   |1 -
 dbaccess/source/ui/dlg/UserAdminDlg.cxx  |1 -
 dbaccess/source/ui/dlg/advancedsettings.cxx  |2 --
 dbaccess/source/ui/dlg/dbadmin.cxx   |1 -
 dbaccess/source/ui/dlg/dbwiz.cxx |1 -
 dbaccess/source/ui/dlg/dbwizsetup.cxx|1 -
 dbaccess/source/ui/dlg/detailpages.cxx   |1 -
 dbaccess/source/ui/dlg/dlgsave.cxx   |1 -
 dbaccess/source/ui/dlg/dsselect.cxx  |1 -
 dbaccess/source/ui/dlg/sqlmessage.cxx|1 -
 dbaccess/source/ui/dlg/tablespage.cxx|1 -
 dbaccess/source/ui/dlg/textconnectionsettings.cxx|2 --
 dbaccess/source/ui/inc/RelationDlg.hxx   |1 -
 dbaccess/source/ui/inc/dlgsave.hxx   |1 -
 dbaccess/source/ui/misc/DExport.cxx  |1 -
 dbaccess/source/ui/misc/RowSetDrop.cxx   |1 -
 dbaccess/source/ui/misc/RtfReader.cxx|1 -
 dbaccess/source/ui/misc/TableCopyHelper.cxx  |1 -
 dbaccess/source/ui/misc/UITools.cxx  |1 -
 dbaccess/source/ui/misc/WCPage.cxx   |1 -
 dbaccess/source/ui/misc/WCopyTable.cxx   |1 -
 dbaccess/source/ui/misc/linkeddocuments.cxx  |1 -
 dbaccess/source/ui/querydesign/JoinController.cxx|1 -
 dbaccess/source/ui/querydesign/JoinDesignView.cxx|1 -
 dbaccess/source/ui/querydesign/QueryDesignView.cxx   |1 -
 dbaccess/source/ui/querydesign/QueryTableView.cxx|1 -
 dbaccess/source/ui/querydesign/querycontroller.cxx   |1 -
 dbaccess/source/ui/querydesign/querydlg.cxx  |1 -
 dbaccess/source/ui/relationdesign/RelationDesignView.cxx |1 -
 dbaccess/source/ui/tabledesign/TEditControl.cxx  |1 -
 dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx |1 -
 dbaccess/source/ui/uno/copytablewizard.cxx   |1 -
 dbaccess/source/ui/uno/dbinteraction.cxx |1 -
 dbaccess/source/ui/uno/unoadmin.cxx  |1 -
 extensions/inc/bitmaps.hlst  |1 +
 extensions/source/update/ui/updatecheckui.cxx|3 +--
 include/sfx2/app.hxx |2 ++
 47 files changed, 4 insertions(+), 48 deletions(-)

New commits:
commit e3bd5ebf678ef7e5ba588d47eed2f027e84cb3cd
Author: Caolán McNamara 
Date:   Tue Mar 20 15:06:23 2018 +

drop msgbox include

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

diff --git a/dbaccess/source/filter/xml/dbloader2.cxx 
b/dbaccess/source/filter/xml/dbloader2.cxx
index 96593afbf386..801680548972 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -68,7 +68,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 using namespace ::ucbhelper;
diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index c0cc5dded3b9..b20b68d734a1 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -79,7 +79,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx 
b/dbaccess/source/ui/browser/sbagrid.cxx
index 000d2da02a90..878b00ebe7f5 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -69,7 +69,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx 
b/dbaccess/source/ui/browser/unodatbr.cxx
index 92fec3b8b9f8..bae7b9fe57d5 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -119,7 +119,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source sc/inc sc/source

2018-03-13 Thread Noel Grandin
 dbaccess/source/core/dataaccess/myucp_datasupplier.cxx |   18 ---
 sc/inc/conditio.hxx|   10 -
 sc/source/core/data/conditio.cxx   |   95 -
 3 files changed, 53 insertions(+), 70 deletions(-)

New commits:
commit 25f7be559d3688db716ecd83085436c77ad2f0f5
Author: Noel Grandin 
Date:   Tue Mar 13 10:44:21 2018 +0200

loplugin:useuniqueptr in DataSupplier_Impl

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

diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx 
b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
index 258e00c10a6a..4eb8d4906b6d 100644
--- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
+++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
@@ -54,14 +54,11 @@ struct ResultListEntry
 explicit ResultListEntry(const ContentProperties& rEntry) : rData( rEntry 
) {}
 };
 
-// ResultList.
-typedef std::vector< ResultListEntry* > ResultList;
-
 // struct DataSupplier_Impl.
 struct DataSupplier_Impl
 {
 osl::Mutex   m_aMutex;
-ResultList   m_aResults;
+std::vector< std::unique_ptr > m_aResults;
 rtl::Reference< ODocumentContainer > m_xContent;
 bool m_bCountFinal;
 
@@ -70,17 +67,8 @@ struct DataSupplier_Impl
 , m_bCountFinal(false)
 {
 }
-~DataSupplier_Impl();
 };
 
-DataSupplier_Impl::~DataSupplier_Impl()
-{
-for (auto const& result : m_aResults)
-{
-delete result;
-}
-}
-
 }
 
 // DataSupplier Implementation.
@@ -217,7 +205,7 @@ bool DataSupplier::getResult( sal_uInt32 nIndex )
 const OUString* pEnd   = pIter + aSeq.getLength();
 for(pIter = pIter + nPos;pIter != pEnd;++pIter,++nPos)
 {
-m_pImpl->m_aResults.push_back(
+m_pImpl->m_aResults.emplace_back(
 new ResultListEntry( 
m_pImpl->m_xContent->getContent(*pIter)->getContentProperties() ) );
 
 if ( nPos == nIndex )
@@ -263,7 +251,7 @@ sal_uInt32 DataSupplier::totalCount()
 const OUString* pIter = aSeq.getConstArray();
 const OUString* pEnd   = pIter + aSeq.getLength();
 for(;pIter != pEnd;++pIter)
-m_pImpl->m_aResults.push_back(
+m_pImpl->m_aResults.emplace_back(
 new ResultListEntry( 
m_pImpl->m_xContent->getContent(*pIter)->getContentProperties() ) );
 
 m_pImpl->m_bCountFinal = true;
commit 51da4c898d0c09f282838328f2a23f7b3e3b8d3f
Author: Noel Grandin 
Date:   Tue Mar 13 12:38:32 2018 +0200

loplugin:useuniqueptr in ScConditionEntry

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

diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 2c13f096d2e5..dc254ffc042c 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -308,19 +308,19 @@ class SC_DLLPUBLIC ScConditionEntry : public ScFormatEntry
 const formula::FormulaGrammar::Grammar eTempGrammar2;  // grammar to be 
used on (re)compilation, e.g. in XML import
 boolbIsStr1;// for recognition of empty strings
 boolbIsStr2;
-ScTokenArray*   pFormula1;  // entered formula
-ScTokenArray*   pFormula2;
+std::unique_ptr pFormula1;  // entered formula
+std::unique_ptr pFormula2;
 ScAddress   aSrcPos;// source position for formulas
 // temporary data:
 OUString  aSrcString; // formula source position as text 
during XML import
-ScFormulaCell*  pFCell1;
-ScFormulaCell*  pFCell2;
+std::unique_ptr  pFCell1;
+std::unique_ptr  pFCell2;
 boolbRelRef1;
 boolbRelRef2;
 boolbFirstRun;
 std::unique_ptr mpListener;
 
-voidSimplifyCompiledFormula( ScTokenArray*& rFormula,
+voidSimplifyCompiledFormula( std::unique_ptr& rFormula,
  double& rVal,
  bool& rIsStr,
  OUString& rStrVal );
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index c07d7672d789..d07c98ebbf8d 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -160,8 +160,8 @@ void ScConditionEntry::StartListening()
 
 const ScRangeList& rRanges = pCondFormat->GetRange();
 mpListener->stopListening();
-start_listen_to(*mpListener, pFormula1, rRanges);
-

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

2018-03-05 Thread Andrea Gelmini
 dbaccess/source/filter/hsqldb/hsqlimport.cxx |2 +-
 dbaccess/source/filter/hsqldb/rowinputbinary.hxx |1 -
 sw/qa/extras/tiledrendering/tiledrendering.cxx   |4 ++--
 3 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 65e98e66fe04941bddd23d94801a1646119cdc2f
Author: Andrea Gelmini 
Date:   Mon Mar 5 14:20:00 2018 +0100

Removed duplicated include

Change-Id: I9baebc135d62fac29512ae5e8eb5e43d61ac227a
Reviewed-on: https://gerrit.libreoffice.org/50773
Reviewed-by: Julien Nabet 
Tested-by: Jenkins 

diff --git a/dbaccess/source/filter/hsqldb/rowinputbinary.hxx 
b/dbaccess/source/filter/hsqldb/rowinputbinary.hxx
index e2e56944c55b..19fb24e28b89 100644
--- a/dbaccess/source/filter/hsqldb/rowinputbinary.hxx
+++ b/dbaccess/source/filter/hsqldb/rowinputbinary.hxx
@@ -15,7 +15,6 @@
 #include 
 
 #include 
-#include 
 
 namespace dbahsql
 {
commit 85c1b7ed35fd30cf3f095a2e3d09bf137ffb231b
Author: Andrea Gelmini 
Date:   Mon Mar 5 14:30:20 2018 +0100

Fix typos

Change-Id: I70e7db0926f8c5815637ae14c1193130d52c3224
Reviewed-on: https://gerrit.libreoffice.org/50774
Reviewed-by: Julien Nabet 
Tested-by: Jenkins 

diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx 
b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
index c2483e694a8d..c1f4cddd113c 100644
--- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx
+++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx
@@ -220,7 +220,7 @@ void HsqlImporter::processTree(HsqlBinaryNode& rNode, 
HsqlRowInputStream& rStrea
  *
  * Size is the size of ;
  * Balance: ?
- * Left/Right/Parent: File postition of the Left/Right/Parent child
+ * Left/Right/Parent: File position of the Left/Right/Parent child
  */
 void HsqlImporter::parseTableRows(const IndexVector& rIndexes,
   const std::vector& rColTypes,
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 780f02cd2865..394036c6d955 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2183,7 +2183,7 @@ void SwTiledRenderingTest::testSplitNodeRedlineCallback()
 Scheduler::ProcessEventsToIdle();
 
 // Assert that we get a notification about redline modification
-// The redline after the inserted node gets a different vertical positon
+// The redline after the inserted node gets a different vertical position
 CPPUNIT_ASSERT_EQUAL(1, m_nRedlineTableEntryModified);
 
 // 2. test case
@@ -2244,7 +2244,7 @@ void SwTiledRenderingTest::testDeleteNodeRedlineCallback()
 Scheduler::ProcessEventsToIdle();
 
 // Assert that we get a notification about redline modification
-// The redline after the removed node gets a different vertical positon
+// The redline after the removed node gets a different vertical position
 CPPUNIT_ASSERT_EQUAL(1, m_nRedlineTableEntryModified);
 
 // 2. test case
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-04 Thread Noel Grandin
 dbaccess/source/core/api/RowSet.cxx|8 
 dbaccess/source/core/api/RowSetBase.cxx|   10 +++---
 dbaccess/source/core/api/RowSetBase.hxx|4 ++--
 dbaccess/source/core/api/RowSetCache.cxx   |9 -
 dbaccess/source/core/api/RowSetCache.hxx   |4 ++--
 dbaccess/source/core/api/preparedstatement.cxx |6 ++
 dbaccess/source/core/api/resultset.cxx |   10 --
 dbaccess/source/core/api/resultset.hxx |2 +-
 dbaccess/source/core/dataaccess/connection.cxx |   22 ++
 dbaccess/source/core/dataaccess/connection.hxx |4 ++--
 dbaccess/source/core/dataaccess/intercept.cxx  |8 +++-
 dbaccess/source/core/dataaccess/intercept.hxx  |4 ++--
 dbaccess/source/core/inc/preparedstatement.hxx |2 +-
 13 files changed, 40 insertions(+), 53 deletions(-)

New commits:
commit 28799d303c84c7ec76c657043c7394ceec4b8416
Author: Noel Grandin 
Date:   Thu Mar 1 09:12:07 2018 +0200

loplugin:useuniqueptr in dbaccess(2)

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

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index 08a82c9dcb91..53b9492021f1 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -353,18 +353,17 @@ ORowSetCache::~ORowSetCache()
 if(m_pMatrix)
 {
 m_pMatrix->clear();
-delete m_pMatrix;
+m_pMatrix.reset();
 }
 
 if(m_pInsertMatrix)
 {
 m_pInsertMatrix->clear();
-delete m_pInsertMatrix;
+m_pInsertMatrix.reset();
 }
 m_xSet  = WeakReference< XResultSet>();
 m_xMetaData = nullptr;
 m_aUpdateTable  = nullptr;
-
 }
 
 void ORowSetCache::setFetchSize(sal_Int32 _nSize)
@@ -375,11 +374,11 @@ void ORowSetCache::setFetchSize(sal_Int32 _nSize)
 m_nFetchSize = _nSize;
 if(!m_pMatrix)
 {
-m_pMatrix = new ORowSetMatrix(_nSize);
+m_pMatrix.reset( new ORowSetMatrix(_nSize) );
 m_aMatrixIter = m_pMatrix->end();
 m_aMatrixEnd = m_pMatrix->end();
 
-m_pInsertMatrix = new ORowSetMatrix(1); // a little bit overkill but 
??? :-)
+m_pInsertMatrix.reset( new ORowSetMatrix(1) ); // a little bit 
overkill but ??? :-)
 m_aInsertRow= m_pInsertMatrix->end();
 }
 else
diff --git a/dbaccess/source/core/api/RowSetCache.hxx 
b/dbaccess/source/core/api/RowSetCache.hxx
index 2a90278afd5f..4a8373d1ee85 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -65,13 +65,13 @@ namespace dbaccess
 
 rtl::Reference m_xCacheSet; // 
is a bookmarkable, keyset or static resultset
 
-ORowSetMatrix*  m_pMatrix;  // represent 
the table struct
+std::unique_ptr  m_pMatrix;  // represent 
the table struct
 ORowSetMatrix::iterator m_aMatrixIter;  // represent a 
row of the table
 ORowSetMatrix::iterator m_aMatrixEnd;   // present the 
row behind the last row of the table
 ORowSetCacheMap m_aCacheIterators;
 TOldRowSetRows  m_aOldRows;
 
-ORowSetMatrix*  m_pInsertMatrix;// represent 
the rows which should be inserted normally this is only one
+std::unique_ptr  m_pInsertMatrix;// represent 
the rows which should be inserted normally this is only one
 ORowSetMatrix::iterator m_aInsertRow;   // represent a 
insert row
 
 connectivity::OSQLTable m_aUpdateTable; // used for 
updates/deletes and inserts
diff --git a/dbaccess/source/core/dataaccess/connection.cxx 
b/dbaccess/source/core/dataaccess/connection.cxx
index 4e5d6fd1bdc8..c0fc854971f5 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -311,7 +311,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
 {
 }
 Reference< XNameContainer > 
xTableDefinitions(_rDB.getTables(),UNO_QUERY);
-m_pTables = new OTableContainer( *this, m_aMutex, this, bCase, 
xTableDefinitions, this, m_nInAppend );
+m_pTables.reset( new OTableContainer( *this, m_aMutex, this, bCase, 
xTableDefinitions, this, m_nInAppend ) );
 
 // check if we supports types
 if ( xMeta.is() )
@@ -340,9 +340,9 @@ OConnection::OConnection(ODatabaseSource& _rDB
 }
 if(m_bSupportsViews)
 {
-m_pViews = new OViewContainer(*this, m_aMutex, this, bCase, 
this, m_nInAppend);
-m_pViews->addContainerListener(m_pTables);
-

[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source filter/source forms/source formula/source fpicker/source framework/source

2018-02-16 Thread Noel Grandin
 dbaccess/source/ui/browser/brwview.cxx  |2 -
 dbaccess/source/ui/browser/dataview.cxx |2 -
 dbaccess/source/ui/browser/sbagrid.cxx  |4 +-
 dbaccess/source/ui/control/FieldDescControl.cxx |   12 
 dbaccess/source/ui/dlg/adminpages.cxx   |2 -
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx   |2 -
 dbaccess/source/ui/dlg/sqlmessage.cxx   |2 -
 dbaccess/source/ui/querydesign/ConnectionLine.cxx   |   22 
 dbaccess/source/ui/querydesign/JoinController.cxx   |4 +-
 dbaccess/source/ui/querydesign/JoinTableView.cxx|   16 +--
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx   |6 ++--
 dbaccess/source/ui/querydesign/TableConnection.cxx  |4 +-
 dbaccess/source/ui/querydesign/TableWindow.cxx  |   16 +--
 dbaccess/source/ui/querydesign/TableWindowTitle.cxx |2 -
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx |   16 +--
 desktop/source/splash/splash.cxx|4 +-
 filter/source/flash/swfwriter1.cxx  |4 +-
 filter/source/graphicfilter/eps/eps.cxx |6 ++--
 filter/source/graphicfilter/ios2met/ios2met.cxx |4 +-
 filter/source/msfilter/escherex.cxx |4 +-
 filter/source/msfilter/eschesdo.cxx |   12 
 filter/source/msfilter/msdffimp.cxx |   16 +--
 filter/source/msfilter/svdfppt.cxx  |   14 +-
 filter/source/svg/svgwriter.cxx |   11 +++-
 forms/source/richtext/richtextimplcontrol.cxx   |   12 
 forms/source/solar/control/navtoolbar.cxx   |2 -
 formula/source/ui/dlg/structpg.cxx  |2 -
 fpicker/source/office/PlacesListBox.cxx |2 -
 fpicker/source/office/RemoteFilesDialog.cxx |2 -
 fpicker/source/office/iodlg.cxx |2 -
 framework/source/layoutmanager/layoutmanager.cxx|2 -
 framework/source/layoutmanager/toolbarlayoutmanager.cxx |8 ++---
 32 files changed, 109 insertions(+), 110 deletions(-)

New commits:
commit 413c7b426543e71f4865c858b5b4ca62b48573d3
Author: Noel Grandin 
Date:   Fri Feb 16 12:48:27 2018 +0200

Revert "loplugin:changetoolsgen in dbaccess..desktop" and reapply plugin

because I
(a) forgot to insert parentheses which changes the meaning of some 
expressions and
(b) I now use the AdjustFoo calls when changing unary operations, which 
reads much better

This reverts commit a9ca38bdf7ff9d15529b5903e640987fc14c0fa7.

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

diff --git a/dbaccess/source/ui/browser/brwview.cxx 
b/dbaccess/source/ui/browser/brwview.cxx
index c982d421ba98..297c952ede08 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -221,7 +221,7 @@ void 
UnoDataBrowserView::resizeDocumentView(tools::Rectangle& _rPlayground)
 
 Point aStatusPos( aPlaygroundPos.X() + 2, aTreeViewPos.Y() + 
aTreeViewSize.Height() - aStatusSize.Height() );
 m_pStatus->SetPosSizePixel( aStatusPos, aStatusSize );
-aTreeViewSize.setHeight( aTreeViewSize.Height() - 
aStatusSize.Height() );
+aTreeViewSize.AdjustHeight( -(aStatusSize.Height()) );
 }
 
 // set the size of treelistbox
diff --git a/dbaccess/source/ui/browser/dataview.cxx 
b/dbaccess/source/ui/browser/dataview.cxx
index 73b102c0eaa6..8f0586ec69fa 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -96,7 +96,7 @@ namespace dbaui
 // position the separator
 const Size aSeparatorSize( aPlayground.GetWidth(), 2 );
 m_aSeparator->SetPosSizePixel( aPlayground.TopLeft(), aSeparatorSize );
-aPlayground.SetTop( aPlayground.Top() + aSeparatorSize.Height() + 1 );
+aPlayground.AdjustTop(aSeparatorSize.Height() + 1 );
 
 // position the controls of the document's view
 resizeDocumentView( aPlayground );
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx 
b/dbaccess/source/ui/browser/sbagrid.cxx
index cf20acabfa4f..f2ffb3947489 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -600,8 +600,8 @@ void SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, 
const Point& _rMouseP
 if (HEADERBAR_ITEM_NOTFOUND != nId)
 {
 tools::Rectangle aColRect = GetItemRect(nId);
-aColRect.SetLeft( aColRect.Left() + nId ? 3 : 0 ); // the handle col 
(nId == 0) does not have a left margin for resizing
-

[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source editeng/source emfio/source extensions/source

2018-02-13 Thread Noel Grandin
 dbaccess/source/ui/app/AppDetailPageHelper.cxx  |8 
 dbaccess/source/ui/app/AppDetailView.cxx|8 
 dbaccess/source/ui/browser/brwview.cxx  |   12 
 dbaccess/source/ui/browser/dataview.cxx |2 
 dbaccess/source/ui/browser/sbagrid.cxx  |4 
 dbaccess/source/ui/control/FieldDescControl.cxx |   16 -
 dbaccess/source/ui/control/VertSplitView.cxx|8 
 dbaccess/source/ui/dlg/adminpages.cxx   |2 
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx   |2 
 dbaccess/source/ui/dlg/sqlmessage.cxx   |   12 
 dbaccess/source/ui/misc/UITools.cxx |4 
 dbaccess/source/ui/querydesign/ConnectionLine.cxx   |   64 ++--
 dbaccess/source/ui/querydesign/JoinController.cxx   |6 
 dbaccess/source/ui/querydesign/JoinTableView.cxx|   40 +-
 dbaccess/source/ui/querydesign/QueryDesignView.cxx  |4 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx   |8 
 dbaccess/source/ui/querydesign/TableConnection.cxx  |2 
 dbaccess/source/ui/querydesign/TableWindow.cxx  |   28 -
 dbaccess/source/ui/querydesign/TableWindowTitle.cxx |   10 
 dbaccess/source/ui/querydesign/querycontainerwindow.cxx |8 
 dbaccess/source/ui/tabledesign/TEditControl.cxx |2 
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx |   22 -
 desktop/source/splash/splash.cxx|2 
 editeng/source/accessibility/AccessibleStringWrap.cxx   |8 
 editeng/source/editeng/editdoc.cxx  |6 
 editeng/source/editeng/editeng.cxx  |   54 +--
 editeng/source/editeng/editview.cxx |4 
 editeng/source/editeng/impedit.cxx  |  120 +++
 editeng/source/editeng/impedit2.cxx |   30 -
 editeng/source/editeng/impedit3.cxx |  256 
 editeng/source/editeng/impedit4.cxx |8 
 editeng/source/items/frmitems.cxx   |8 
 editeng/source/items/numitem.cxx|4 
 editeng/source/items/svxfont.cxx|   22 -
 editeng/source/outliner/outlin2.cxx |2 
 editeng/source/outliner/outliner.cxx|   96 +++---
 editeng/source/outliner/outlvw.cxx  |4 
 editeng/source/uno/unoviwou.cxx |4 
 emfio/source/reader/emfreader.cxx   |4 
 emfio/source/reader/mtftools.cxx|   18 -
 emfio/source/reader/wmfreader.cxx   |   32 +-
 extensions/source/bibliography/toolbar.cxx  |6 
 extensions/source/propctrlr/browserline.cxx |8 
 extensions/source/propctrlr/browserlistbox.cxx  |   12 
 extensions/source/propctrlr/inspectorhelpwindow.cxx |4 
 extensions/source/propctrlr/standardcontrol.cxx |2 
 extensions/source/scanner/grid.cxx  |   22 -
 extensions/source/scanner/sanedlg.cxx   |   84 ++---
 extensions/source/update/ui/updatecheckui.cxx   |8 
 49 files changed, 550 insertions(+), 550 deletions(-)

New commits:
commit 2096aac8b958db66b3ddce16b06dca87edc8ba0a
Author: Noel Grandin 
Date:   Tue Feb 13 15:49:10 2018 +0200

loplugin:changetoolsgen in editeng..extensions

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

diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx 
b/editeng/source/accessibility/AccessibleStringWrap.cxx
index 64ea287dc9ff..63a2fca3ef34 100644
--- a/editeng/source/accessibility/AccessibleStringWrap.cxx
+++ b/editeng/source/accessibility/AccessibleStringWrap.cxx
@@ -48,16 +48,16 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 
nIndex, tools::Rectangl
 {
 // create a caret bounding rect that has the height of the
 // current font and is one pixel wide.
-rRect.Left() = mrDev.GetTextWidth(maText);
-rRect.Top() = 0;
+rRect.SetLeft( mrDev.GetTextWidth(maText) );
+rRect.SetTop( 0 );
 rRect.SetSize( Size(mrDev.GetTextHeight(), 1) );
 }
 else
 {
 long aXArray[2];
 mrDev.GetCaretPositions( maText, aXArray, nIndex, 1 );
-rRect.Left() = 0;
-rRect.Top() = 0;
+rRect.SetLeft( 0 );
+rRect.SetTop( 0 );
 rRect.SetSize( Size(mrDev.GetTextHeight(), labs(aXArray[0] - 
aXArray[1])) );
 rRect.Move( std::min(aXArray[0], aXArray[1]), 0 );
 }
diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index d7caea2f78df..55fe0bac0114 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source external/libetonyek

2017-10-25 Thread Stephan Bergmann
 dbaccess/source/core/recovery/subcomponentrecovery.cxx |4 ++--
 external/libetonyek/UnpackedTarball_libetonyek.mk  |1 +
 external/libetonyek/c++17.patch|   11 +++
 3 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 583b49dca97c26365bd6bafafc422297aa7e9ed1
Author: Stephan Bergmann 
Date:   Wed Oct 25 19:35:45 2017 +0200

Work around bogus Clang C++17 -Werror,-Wunused-value

...see  "Unexpected 
-Wunused-value
with -std=c++17".  The dereference operator is only there to make 
OWeakObject's
conversion operator to css::uno::Reference kick in, to
avoid an ambiguous conversion to XInterface, so use an rtl::Reference 
instead,
which removes the need for the dereference and makes the warning go away.

Change-Id: I52ddaa098d43eb1507ca621f9e9511dcfc0fdb9a

diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx 
b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index afd25657ae48..3e8dbea7a63a 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -536,7 +536,7 @@ namespace dbaccess
 if ( xDocDefinition.is() )
 {
 Reference< XController > xController( m_xDocumentUI, 
UNO_QUERY_THROW );
-Reference< XInterface >( *new SubComponentLoader( xController, 
xDocDefinition ) );
+rtl::Reference< SubComponentLoader >( new SubComponentLoader( 
xController, xDocDefinition ) );
 }
 
 return xSubComponent;
@@ -589,7 +589,7 @@ namespace dbaccess
 }
 
 Reference< XController > xController( m_xDocumentUI, UNO_QUERY_THROW );
-Reference< XInterface >( *new SubComponentLoader( xController, 
xSubComponent ) );
+rtl::Reference< SubComponentLoader >( new SubComponentLoader( 
xController, xSubComponent ) );
 
 return xSubComponent;
 }
commit 3c4011ea3552ee55ba8dc2c92639190016253b00
Author: Stephan Bergmann 
Date:   Wed Oct 25 19:34:52 2017 +0200

external/libetonyek: drop "register", for C++17

> Oct 24 18:21:51  dtardon, why is libetonyek-0.1.7.tar.xz 
containing
>  generated src/lib/KEY1Token.inc; is that by design or by mistake?
> Oct 24 18:23:32  sberg_, that's for windows
> Oct 24 18:24:15  dtardon, yuck; then you should at least have
>  generated it with a gperf that no longer emits "register" ;)
> Oct 24 18:25:35  sberg_, bundled libetonyek is built as shared 
lib;
>  the windows build is done as a Library, because the gcc wrapper for msvc
>  cannot do shared libs. and it's easier to include the .inc files in the
>  tarball than to re-create them using a CustomTarget inside libreoffice...
> Oct 24 18:25:58  sberg_, i'm using gperf on f27
> Oct 24 18:26:19  ... which is 3.1
> Oct 24 18:29:26  dtardon, then maybe they only fixed gperf past 
3.1; I
>  have a local checkout (that still claims to be 3.1, though) that came 
with a
>  commit dropping that "register" usage

Change-Id: I6a3d965cedbe05582d9e42f5595876c19a1b91a6

diff --git a/external/libetonyek/UnpackedTarball_libetonyek.mk 
b/external/libetonyek/UnpackedTarball_libetonyek.mk
index f178b469e028..1b59b77cab97 100644
--- a/external/libetonyek/UnpackedTarball_libetonyek.mk
+++ b/external/libetonyek/UnpackedTarball_libetonyek.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
external/libetonyek/ubsan.patch \
external/libetonyek/rpath.patch \
external/libetonyek/0001-add-missing-include-for-std-min.patch.1 \
+   external/libetonyek/c++17.patch \
 ))
 
 ifneq ($(OS),MACOSX)
diff --git a/external/libetonyek/c++17.patch b/external/libetonyek/c++17.patch
new file mode 100644
index ..bc4e9b96a46a
--- /dev/null
+++ b/external/libetonyek/c++17.patch
@@ -0,0 +1,11 @@
+--- src/lib/KEY1Token.inc
 src/lib/KEY1Token.inc
+@@ -524,7 +524,7 @@
+ 
+   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ {
+-  register int key = hash (str, len);
++  int key = hash (str, len);
+ 
+   if (key <= MAX_HASH_VALUE && key >= 0)
+ {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-08-29 Thread Maxim Monastirsky
 dbaccess/source/ui/app/AppDetailPageHelper.cxx |2 +-
 svx/source/tbxctrls/bulletsnumbering.cxx   |   17 -
 2 files changed, 1 insertion(+), 18 deletions(-)

New commits:
commit f9601b9232589bbb704f10073bf9b1516af5a923
Author: Maxim Monastirsky 
Date:   Sun May 28 15:45:15 2017 +0300

This should be ToolBoxItemBits::DROPDOWNONLY

as there is no select handler registered here.

Change-Id: Ide822efe2bacbe791d950883f18e029b26517c6b

diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx 
b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index f259e609b701..e09ee6dde5ef 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -197,7 +197,7 @@ OAppDetailPageHelper::OAppDetailPageHelper(vcl::Window* 
_pParent,OAppBorderWindo
 m_aTBPreview->SetOutStyle(TOOLBOX_STYLE_FLAT);
 m_aTBPreview->InsertItem(SID_DB_APP_DISABLE_PREVIEW,
  
vcl::CommandInfoProvider::GetLabelForCommand(".uno:DBDisablePreview", 
"com.sun.star.sdb.OfficeDatabaseDocument"),
- 
ToolBoxItemBits::LEFT|ToolBoxItemBits::DROPDOWN|ToolBoxItemBits::AUTOSIZE|ToolBoxItemBits::RADIOCHECK);
+ 
ToolBoxItemBits::LEFT|ToolBoxItemBits::DROPDOWNONLY|ToolBoxItemBits::AUTOSIZE|ToolBoxItemBits::RADIOCHECK);
 m_aTBPreview->SetHelpId(HID_APP_VIEW_PREVIEW_CB);
 m_aTBPreview->SetDropdownClickHdl( LINK( this, OAppDetailPageHelper, 
OnDropdownClickHdl ) );
 m_aTBPreview->Enable();
commit bd3975dbd9e76905adfa97bf2a32973951ca6d75
Author: Maxim Monastirsky 
Date:   Sun Jul 30 16:48:47 2017 +0300

Remove duplicate code

The base class has now the same code since 9f61005dd9c4b
("tdf#109309 Currency dropdown is misplaced under Wayland").

Change-Id: Id0380ea10711a46c125c1f2ba6be82f21830bd9f

diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx 
b/svx/source/tbxctrls/bulletsnumbering.cxx
index 03d4258ae2e8..1ca937bed72d 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -48,9 +48,6 @@ public:
 explicit NumberingToolBoxControl( const css::uno::Reference< 
css::uno::XComponentContext >& rxContext );
 virtual VclPtr createPopupWindow( vcl::Window* pParent ) 
override;
 
-// XStatusListener
-virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& 
rEvent ) override;
-
 // XInitialization
 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any 
>& aArguments ) override;
 
@@ -201,20 +198,6 @@ VclPtr 
NumberingToolBoxControl::createPopupWindow( vcl::Window* pPa
 return VclPtr::Create( *this, pParent, mePageType );
 }
 
-
-void SAL_CALL NumberingToolBoxControl::statusChanged( const 
css::frame::FeatureStateEvent& rEvent )
-{
-ToolBox* pToolBox = nullptr;
-sal_uInt16 nId = 0;
-if ( getToolboxId( nId,  ) )
-{
-pToolBox->EnableItem( nId, rEvent.IsEnabled );
-bool bChecked;
-if ( rEvent.State >>= bChecked )
-pToolBox->CheckItem( nId, bChecked );
-}
-}
-
 void SAL_CALL NumberingToolBoxControl::initialize( const css::uno::Sequence< 
css::uno::Any >& aArguments )
 {
 svt::PopupWindowController::initialize( aArguments );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source filter/source include/vbahelper include/xmloff sc/source sw/source vbahelper/source wizards/com

2017-01-07 Thread Julien Nabet
 dbaccess/source/ui/browser/dsbrowserDnD.cxx  | 
   4 -
 dbaccess/source/ui/browser/unodatbr.cxx  | 
  18 
 dbaccess/source/ui/inc/unodatbr.hxx  | 
   2 
 dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx   | 
   4 -
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx| 
  10 ++--
 filter/source/xslt/export/wordml/ooo2wordml_path.xsl | 
   4 -
 filter/source/xslt/import/wordml/wordml2ooo_path.xsl | 
   4 -
 filter/source/xslt/odf2xhtml/export/common/table_of_content.xsl  | 
   2 
 include/vbahelper/vbacollectionimpl.hxx  | 
   2 
 include/xmloff/XMLEventExport.hxx| 
   4 -
 sc/source/filter/excel/excimp8.cxx   | 
   2 
 sc/source/filter/excel/xistyle.cxx   | 
   2 
 sc/source/ui/vba/vbaoleobjects.cxx   | 
   2 
 sc/source/ui/vba/vbapalette.cxx  | 
   2 
 sc/source/ui/vba/vbaworksheets.cxx   | 
   2 
 sw/source/core/access/acccell.hxx| 
   2 
 sw/source/core/access/accdoc.hxx | 
   2 
 sw/source/core/access/accnotextframe.hxx | 
   2 
 sw/source/core/access/accpara.hxx| 
   2 
 sw/source/core/access/acctable.hxx   | 
   2 
 sw/source/ui/vba/vbabookmarks.cxx| 
   2 
 sw/source/ui/vba/vbapalette.cxx  | 
   2 
 sw/source/ui/vba/vbastyles.cxx   | 
   2 
 sw/source/ui/vba/vbatables.cxx   | 
   2 
 vbahelper/source/msforms/vbacontrols.cxx | 
   2 
 vbahelper/source/vbahelper/vbashape.cxx  | 
   4 -
 wizards/com/sun/star/wizards/form/FormControlArranger.java   | 
  22 +-
 wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarSingleColumn.java  | 
   2 
 wizards/com/sun/star/wizards/reportbuilder/layout/ColumnarTwoColumns.java| 
   2 
 wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsAbove.java   | 
   2 
 wizards/com/sun/star/wizards/reportbuilder/layout/InBlocksLabelsLeft.java| 
   2 
 wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java | 
   6 +-
 wizards/com/sun/star/wizards/reportbuilder/layout/Tabular.java   | 
  10 ++--
 33 files changed, 67 insertions(+), 67 deletions(-)

New commits:
commit d911663f0fa919fc66e10328482948a730e9c2e8
Author: Julien Nabet 
Date:   Sat Jan 7 08:59:09 2017 +0100

Typo: Acess->Access

Found thanks to Buovjaga

Change-Id: I73e36f50a1fd393859ba775ab084a488047864a3
Reviewed-on: https://gerrit.libreoffice.org/32810
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx 
b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index 95dd290..51221cc 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -66,7 +66,7 @@ namespace dbaui
 try
 {
 OUString aName = GetEntryText( _pApplyTo );
-OUString aDSName = getDataSourceAcessor( 
m_pTreeView->getListBox().GetRootLevelParent( _pApplyTo ) );
+OUString aDSName = getDataSourceAccessor( 
m_pTreeView->getListBox().GetRootLevelParent( _pApplyTo ) );
 
 ODataClipboard* pData = nullptr;
 SharedConnection xConnection;
@@ -227,7 +227,7 @@ namespace dbaui
 if ( ensureConnection( m_aAsyncDrop.pDroppedAt, xDestConnection ) 
&& xDestConnection.is() )
 {
 SvTreeListEntry* pDataSourceEntry = 
m_pTreeView->getListBox().GetRootLevelParent(m_aAsyncDrop.pDroppedAt);
-m_aTableCopyHelper.asyncCopyTagTable( m_aAsyncDrop, 
getDataSourceAcessor( pDataSourceEntry ), xDestConnection );
+m_aTableCopyHelper.asyncCopyTagTable( m_aAsyncDrop, 
getDataSourceAccessor( pDataSourceEntry ), xDestConnection );
 }
 }
 
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx 
b/dbaccess/source/ui/browser/unodatbr.cxx
index e442beb..7c05f3e 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1108,13 +1108,13 @@ namespace
 }
 }
 
-OUString SbaTableQueryBrowser::getDataSourceAcessor( SvTreeListEntry* 
_pDataSourceEntry ) const
+OUString 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source vcl/unx

2017-01-02 Thread Caolán McNamara
 dbaccess/source/filter/xml/xmlExport.cxx |8 +-
 vcl/unx/generic/gdi/gdiimpl.cxx  |   39 ---
 2 files changed, 18 insertions(+), 29 deletions(-)

New commits:
commit 29f971d0d210036656be667f58df57a25849fcee
Author: Caolán McNamara 
Date:   Mon Jan 2 21:20:07 2017 +

micro opt

Change-Id: I2d713783f1ad533c23a3fe319e7c37b7fd0e0e0d

diff --git a/dbaccess/source/filter/xml/xmlExport.cxx 
b/dbaccess/source/filter/xml/xmlExport.cxx
index 43d530d..cd1d864 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -665,13 +665,9 @@ void ODBExport::exportDataSourceSettings()
 ::std::vector< TypedPropertyValue >::const_iterator aEnd = 
m_aDataSourceSettings.end();
 for ( ; aIter != aEnd; ++aIter )
 {
-bool bIsSequence = TypeClass_SEQUENCE == aIter->Type.getTypeClass();
+const bool bIsSequence = TypeClass_SEQUENCE == 
aIter->Type.getTypeClass();
 
-Type aSimpleType;
-if ( bIsSequence )
-aSimpleType = ::comphelper::getSequenceElementType( 
aIter->Value.getValueType() );
-else
-aSimpleType = aIter->Type;
+Type aSimpleType(bIsSequence ? 
comphelper::getSequenceElementType(aIter->Value.getValueType()) : aIter->Type);
 
 AddAttribute( XML_NAMESPACE_DB, 
XML_DATA_SOURCE_SETTING_IS_LIST,bIsSequence ? XML_TRUE : XML_FALSE );
 AddAttribute( XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_NAME, 
aIter->Name );
commit 48954af3bc0957da9bf0d5ef9eb07c9079285932
Author: Caolán McNamara 
Date:   Mon Jan 2 21:10:18 2017 +

coverity#708661 Uninitialized scalar field

Change-Id: I1e87e7f6d135f9e4a0b4efbb4ce7e6e08663f675

diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 14b32dc..e929f6b 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -63,41 +63,35 @@
 #define DBG_TESTTRANS( _def_drawable )
 #endif // (OSL_DEBUG_LEVEL > 1) && defined SALGDI2_TESTTRANS
 
-#define STATIC_POINTS 64
-
 /* From  */
 typedef unsigned long Pixel;
 
 class SalPolyLine
 {
-XPoint Points_[STATIC_POINTS];
-XPoint *pFirst_;
+std::vector Points_;
 public:
 SalPolyLine(sal_uLong nPoints, const SalPoint *p)
-: pFirst_(nPoints+1 > STATIC_POINTS ? new XPoint[nPoints+1] : Points_)
+: Points_(nPoints+1)
 {
-for( sal_uLong i = 0; i < nPoints; i++ )
+for (sal_uLong i = 0; i < nPoints; ++i)
 {
-pFirst_[i].x = (short)p[i].mnX;
-pFirst_[i].y = (short)p[i].mnY;
+Points_[i].x = (short)p[i].mnX;
+Points_[i].y = (short)p[i].mnY;
 }
-pFirst_[nPoints] = pFirst_[0]; // close polyline
+Points_[nPoints] = Points_[0]; // close polyline
 }
 
-~SalPolyLine()
+const XPoint [](sal_uLong n) const
 {
-if( pFirst_ != Points_ )
-delete [] pFirst_;
+return Points_[n];
 }
 
-XPoint  [] ( sal_uLong n ) const
+XPoint [](sal_uLong n)
 {
-return pFirst_[n];
+return Points_[n];
 }
 };
 
-#undef STATIC_POINTS
-
 namespace
 {
 void setForeBack(XGCValues& rValues, const SalColormap& rColMap, const 
SalBitmap& rSalBitmap)
@@ -480,11 +474,10 @@ GC X11SalGraphicsImpl::SelectPen()
 return mpPenGC;
 }
 
-void X11SalGraphicsImpl::DrawLines( sal_uLong  nPoints,
-const SalPolyLine ,
-GC pGC,
-bool   bClose
-)
+void X11SalGraphicsImpl::DrawLines(sal_uLong  nPoints,
+   const SalPolyLine ,
+   GC pGC,
+   bool   bClose)
 {
 // calculate how many lines XWindow can draw in one go
 sal_uLong nMaxLines = (mrParent.GetDisplay()->GetMaxRequestSize() - 
sizeof(xPolyPointReq))
@@ -497,7 +490,7 @@ void X11SalGraphicsImpl::DrawLines( sal_uLong  
nPoints,
 XDrawLines( mrParent.GetXDisplay(),
 mrParent.GetDrawable(),
 pGC,
-[n],
+const_cast([n]),
 nMaxLines,
 CoordModeOrigin );
 
@@ -505,7 +498,7 @@ void X11SalGraphicsImpl::DrawLines( sal_uLong  
nPoints,
 XDrawLines( mrParent.GetXDisplay(),
 mrParent.GetDrawable(),
 pGC,
-[n],
+const_cast([n]),
 nPoints - n,
 CoordModeOrigin );
 if( bClose )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source editeng/source extensions/source filter/source

2016-11-04 Thread Noel Grandin
 dbaccess/source/core/api/CacheSet.cxx   |9 -
 dbaccess/source/core/api/KeySet.cxx |9 -
 dbaccess/source/core/api/OptimisticSet.cxx  |   16 +--
 dbaccess/source/core/api/View.cxx   |3 
 dbaccess/source/core/dataaccess/documentcontainer.cxx   |4 
 dbaccess/source/core/dataaccess/documentdefinition.cxx  |3 
 dbaccess/source/core/misc/dsntypes.cxx  |3 
 dbaccess/source/ui/control/FieldDescControl.cxx |3 
 dbaccess/source/ui/dlg/indexdialog.cxx  |   16 +--
 dbaccess/source/ui/dlg/queryfilter.cxx  |3 
 dbaccess/source/ui/dlg/queryorder.cxx   |6 -
 dbaccess/source/ui/dlg/tablespage.cxx   |3 
 dbaccess/source/ui/misc/TokenWriter.cxx |   22 +---
 dbaccess/source/ui/misc/UITools.cxx |6 -
 dbaccess/source/ui/misc/indexcollection.cxx |   19 +---
 dbaccess/source/ui/querydesign/QueryDesignView.cxx  |7 -
 dbaccess/source/ui/querydesign/querycontroller.cxx  |3 
 desktop/source/app/app.cxx  |3 
 desktop/source/deployment/registry/dp_backend.cxx   |4 
 desktop/source/migration/services/wordbookmigration.cxx |   10 --
 editeng/source/misc/svxacorr.cxx|5 -
 editeng/source/uno/unonrule.cxx |5 -
 extensions/source/dbpilots/controlwizard.cxx|3 
 extensions/source/dbpilots/gridwizard.cxx   |9 -
 extensions/source/propctrlr/formcomponenthandler.cxx|9 -
 filter/source/msfilter/escherex.cxx |   33 +--
 filter/source/msfilter/mstoolbar.cxx|6 -
 filter/source/msfilter/msvbahelper.cxx  |   19 +---
 filter/source/msfilter/svdfppt.cxx  |   60 -
 filter/source/svg/svgexport.cxx |   44 ++---
 filter/source/svg/svgreader.cxx |9 -
 filter/source/svg/svgwriter.cxx |   73 
 32 files changed, 133 insertions(+), 294 deletions(-)

New commits:
commit c1805c48ae6057d370a35f2e059f3ee82396c407
Author: Noel Grandin 
Date:   Fri Nov 4 12:29:35 2016 +0200

loplugin:oncevar in dbaccess

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

diff --git a/dbaccess/source/core/api/CacheSet.cxx 
b/dbaccess/source/core/api/CacheSet.cxx
index 7f492b4..723e292 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -157,16 +157,14 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& 
_rInsertRow,const connecti
 
 // set values and column names
 OUStringBuffer aValues(" VALUES ( ");
-static const char aPara[] = "?,";
 OUString aQuote = getIdentifierQuoteString();
-static const char aComma[] = ",";
 sal_Int32 i = 1;
 ORowVector< ORowSetValue >::Vector::const_iterator aIter = 
_rInsertRow->get().begin()+1;
 connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = 
_rInsertRow->get().end();
 for(; aIter != aEnd;++aIter)
 {
-aSql.append(::dbtools::quoteName( 
aQuote,m_xSetMetaData->getColumnName(i++)) + aComma);
-aValues.append(aPara);
+aSql.append(::dbtools::quoteName( 
aQuote,m_xSetMetaData->getColumnName(i++)) + ",");
+aValues.append("?,");
 }
 
 aSql[aSql.getLength() - 1] = ')';
@@ -227,7 +225,6 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
 
 OUString aColumnName;
 
-static const char aPara[] = "?,";
 static const char aAnd[] = " AND ";
 
 OUString aQuote  = getIdentifierQuoteString();
@@ -271,7 +268,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
 }
 if(aIter->isModified())
 {
-_sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + 
aPara);
+_sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + 
"?,");
 }
 }
 }
diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index a42d273..18724f6 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -221,12 +221,11 @@ namespace
 {
 void appendOneKeyColumnClause( const OUString , const OUString 
, const connectivity::ORowSetValue &_rValue, OUStringBuffer _buf )
 {
-static const char s_sDot[] = ".";
 OUString fullName;
 if (tblName.isEmpty())
 fullName = colName;
 else
-fullName = tblName + s_sDot + colName;
+fullName = tblName + "." + colName;
 if ( _rValue.isNull() )
 {
 o_buf.append(fullName + " IS NULL ");
@@ 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source extensions/source include/svtools reportdesign/source sfx2/source svtools/source

2016-10-13 Thread Caolán McNamara
 dbaccess/source/ui/app/AppDetailView.cxx |1 
 dbaccess/source/ui/dlg/ConnectionHelper.cxx  |2 
 dbaccess/source/ui/dlg/ConnectionPage.cxx|2 
 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx   |2 
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx|2 
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx  |1 
 dbaccess/source/ui/dlg/adminpages.cxx|2 
 dbaccess/source/ui/dlg/adtabdlg.cxx  |1 
 dbaccess/source/ui/dlg/dbadmin.cxx   |2 
 dbaccess/source/ui/dlg/dbwiz.cxx |1 
 dbaccess/source/ui/dlg/dbwizsetup.cxx|1 
 dbaccess/source/ui/dlg/detailpages.cxx   |2 
 dbaccess/source/ui/dlg/dsselect.cxx  |1 
 dbaccess/source/ui/dlg/generalpage.cxx   |2 
 dbaccess/source/ui/dlg/paramdialog.cxx   |1 
 dbaccess/source/ui/inc/localresaccess.hxx|   47 
 dbaccess/source/ui/querydesign/query.src |   16 
 dbaccess/source/ui/querydesign/querycontroller.cxx   |   11 
 extensions/source/abpilot/abspilot.cxx   |1 
 extensions/source/dbpilots/commonpagesdbp.cxx|1 
 extensions/source/dbpilots/controlwizard.cxx |1 
 extensions/source/propctrlr/formlinkdialog.cxx   |1 
 extensions/source/propctrlr/formmetadata.cxx |   20 
 extensions/source/propctrlr/formres.src  |  653 +++
 extensions/source/propctrlr/sqlcommanddesign.cxx |7 
 extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx |1 
 include/svtools/localresaccess.hxx   |   74 -
 reportdesign/source/ui/inspection/metadata.cxx   |1 
 sfx2/source/dialog/styfitem.cxx  |   41 
 svtools/source/dialogs/addresstemplate.cxx   |1 
 30 files changed, 271 insertions(+), 628 deletions(-)

New commits:
commit 15f5fdef976ac2a2fc7192ce7cd4324e0820a2ed
Author: Caolán McNamara 
Date:   Wed Oct 12 21:42:03 2016 +0100

move this monstrosity to the last place its used

Change-Id: I4691f20143406249afc8da1a6dfa901224f4a62d

diff --git a/extensions/source/abpilot/abspilot.cxx 
b/extensions/source/abpilot/abspilot.cxx
index 8ceb9e2..ca16523 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -23,7 +23,6 @@
 #include "componentmodule.hxx"
 #include 
 #include 
-#include 
 #include "typeselectionpage.hxx"
 #include "admininvokationpage.hxx"
 #include "tableselectionpage.hxx"
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx 
b/extensions/source/dbpilots/commonpagesdbp.cxx
index 84ee2e1..0dc6b27 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/extensions/source/dbpilots/controlwizard.cxx 
b/extensions/source/dbpilots/controlwizard.cxx
index 82ea3ea..8f9a21c 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -40,7 +40,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx 
b/extensions/source/propctrlr/formlinkdialog.cxx
index 500bbc9..dfaf22f 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx 
b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
index 15f97a5..012947b 100644
--- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
+++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
@@ -42,7 +42,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/include/svtools/localresaccess.hxx 
b/include/svtools/localresaccess.hxx
deleted file mode 100644
index f38b1d3..000
--- a/include/svtools/localresaccess.hxx
+++ /dev/null
@@ -1,74 +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 work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/svx svx/AllLangResTarget_svx.mk svx/source

2016-10-12 Thread Caolán McNamara
 dbaccess/source/ui/inc/dbu_resource.hrc   |4 --
 dbaccess/source/ui/tabledesign/TableDesignControl.cxx |   16 +
 dbaccess/source/ui/tabledesign/table.src  |   10 -
 include/svx/dialogs.hrc   |4 --
 svx/AllLangResTarget_svx.mk   |1 
 svx/source/sidebar/EmptyPanel.cxx |   17 +++--
 svx/source/sidebar/EmptyPanel.hrc |   25 --
 svx/source/sidebar/EmptyPanel.src |   32 --
 svx/source/stbctrls/stbctrls.src  |5 ++
 9 files changed, 21 insertions(+), 93 deletions(-)

New commits:
commit 8215167bac4f34a2f1432ab247c8984d8f448372
Author: Caolán McNamara 
Date:   Wed Oct 12 15:23:00 2016 +0100

de-src RID_DB_TAB_EDITOR control

Change-Id: Idba73ea9bf2486d40b24e59bf6f1f5092ec70558

diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc 
b/dbaccess/source/ui/inc/dbu_resource.hrc
index cfe1de2..01c1c78 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -141,10 +141,6 @@
 #define RID_MENU_JOINVIEW_CONNECTIONRID_MENU_START + 16
 #define RID_MENU_JOINVIEW_TABLE RID_MENU_START + 17
 
-// controls
-
-#define RID_DB_TAB_EDITOR   RID_CONTROL_START +  0
-
 // strings
 #define STR_TBL_TITLE   RID_STR_GEN_START
 #define STR_ERROR_DURING_CREATION   RID_STR_GEN_START + 1
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx 
b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
index 62dc378..a774f58 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -35,14 +35,16 @@ using namespace ::com::sun::star::util;
 #define HANDLE_ID 0
 
 OTableRowView::OTableRowView(vcl::Window* pParent)
-:EditBrowseBox(pParent, 
ModuleRes(RID_DB_TAB_EDITOR),EditBrowseBoxFlags::NONE,
-BrowserMode::COLUMNSELECTION | BrowserMode::MULTISELECTION 
| BrowserMode::AUTOSIZE_LASTCOL |
-BrowserMode::KEEPHIGHLIGHT | BrowserMode::HLINES | 
BrowserMode::VLINES)
-,m_nDataPos(-1)
-,m_nCurrentPos(-1)
-,m_nCurUndoActId(0)
+: EditBrowseBox(pParent, EditBrowseBoxFlags::NONE, 
WB_TABSTOP|WB_HIDE|WB_3DLOOK,
+BrowserMode::COLUMNSELECTION | BrowserMode::MULTISELECTION 
|
+BrowserMode::AUTOSIZE_LASTCOL | BrowserMode::KEEPHIGHLIGHT 
|
+BrowserMode::HLINES | BrowserMode::VLINES)
+, m_nDataPos(-1)
+, m_nCurrentPos(-1)
+, m_nCurUndoActId(0)
 {
-
+SetHelpId(HID_TABDESIGN_BACKGROUND);
+SetSizePixel(LogicToPixel(Size(40, 12), MapUnit::MapAppFont));
 }
 
 void OTableRowView::Init()
diff --git a/dbaccess/source/ui/tabledesign/table.src 
b/dbaccess/source/ui/tabledesign/table.src
index 1bcbf34..d0dc8ee 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -123,16 +123,6 @@ String STR_TAB_TABLE_PROPERTIES
 Text [ en-US ] = "Table properties";
 };
 
-Control RID_DB_TAB_EDITOR
-{
-Pos = MAP_APPFONT ( 0 , 0 ) ;
-Size = MAP_APPFONT ( 40 , 12 ) ;
-TabStop = TRUE ;
-SvLook = TRUE ;
-Hide = TRUE ;
-HelpId = HID_TABDESIGN_BACKGROUND ;
-};
-
 Menu RID_TABLEDESIGNROWPOPUPMENU
 {
 ItemList =
commit d1a6aea1dab9b0b5bf914dd3644e5279598c1f10
Author: Caolán McNamara 
Date:   Wed Oct 12 15:06:53 2016 +0100

de-src empty panel placeholder widgetry

Change-Id: I99a292cd76f40159f12cb98b362559e4109121c3

diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index c44b6c5..aba0095 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -196,9 +196,7 @@
 #define RID_SVXIMG_NOTCHECKED   (RID_SVX_START + 243)
 #define RID_SVXIMG_CHECKED  (RID_SVX_START + 244)
 
-#define RID_SIDEBAR_LINE_PANEL  (RID_SVX_START + 321)
-
-#define RID_SIDEBAR_EMPTY_PANEL (RID_SVX_START + 327)
+#define RID_SIDEBAR_EMPTY_PANEL_TEXT(RID_SVX_START + 321)
 
 // !!! IMPORTANT: consider and update RID_SVX_FIRSTFREE when introducing new 
RIDs !!! (see above)
 
diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk
index c56a5ce..3a98734 100644
--- a/svx/AllLangResTarget_svx.mk
+++ b/svx/AllLangResTarget_svx.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
 svx/source/form/fmstring.src \
 svx/source/items/svxerr.src \
 svx/source/items/svxitems.src \
-svx/source/sidebar/EmptyPanel.src \
 svx/source/sidebar/area/AreaPropertyPanel.src \
 svx/source/sidebar/line/LinePropertyPanel.src \
 svx/source/sidebar/paragraph/ParaPropertyPanel.src \
diff --git a/svx/source/sidebar/EmptyPanel.cxx 
b/svx/source/sidebar/EmptyPanel.cxx
index e436ba8..00579c3 100644
--- a/svx/source/sidebar/EmptyPanel.cxx
+++ 

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

2016-05-27 Thread Lionel Elie Mamane
 dbaccess/source/ui/querydesign/querydlg.cxx |4 +++-
 forms/source/component/FormComponent.cxx|2 +-
 svx/source/fmcomp/fmgridif.cxx  |   13 -
 3 files changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 51c8d22ec5e4d306f8f64afb355f95a23deb335d
Author: Lionel Elie Mamane 
Date:   Fri May 27 15:37:18 2016 +0200

tdf#93403 check for changed DataSource on all Controls on form reload

1) OBoundControlModel: when reload() asks us to connect to database column,
   redo it even if it was previously done.

2) FmXGridPeer: when getting Reloaded event that we subscribed to
   (and specifically from frm::ODatabaseFrom), pass along the event
   to all columns before we treat it. The columns (controls) are
   themselves subscribed to it, but they may get the event after us,
   which means our treatment still uses stale data, which we continue
   to display.

   The column controls should continue to subscribe by themselves for
   the case that they are not in a grid, but direct children of the
   form.

Change-Id: I0cbcf2dc792e8650157a69ddc414d755de0e549a

diff --git a/forms/source/component/FormComponent.cxx 
b/forms/source/component/FormComponent.cxx
index 7d66f42..fd7b2c7 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -2039,7 +2039,7 @@ void 
OBoundControlModel::impl_connectDatabaseColumn_noNotify( bool _bFromReload
 OSL_ENSURE( xRowSet.is(), 
"OBoundControlModel::impl_connectDatabaseColumn_noNotify: no row set!" );
 if ( !xRowSet.is() )
 return;
-if ( !hasField() )
+if ( !hasField() || _bFromReload )
 {
 // connect to the column
 connectToField( xRowSet );
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index b1460e4..fbb6d18 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1568,8 +1568,19 @@ void FmXGridPeer::unloading(const EventObject& 
/*aEvent*/) throw( RuntimeExcepti
 }
 
 
-void FmXGridPeer::reloaded(const EventObject& /*aEvent*/) throw( 
RuntimeException, std::exception )
+void FmXGridPeer::reloaded(const EventObject& aEvent) throw( RuntimeException, 
std::exception )
 {
+{
+const sal_Int32 cnt = m_xColumns->getCount();
+for(sal_Int32 i=0; i xll(m_xColumns->getByIndex(i), 
UNO_QUERY);
+if(xll.is())
+{
+xll->reloaded(aEvent);
+}
+}
+}
 updateGrid(m_xCursor);
 }
 
commit 0df3760bc2035a54454db9fe2774dca58c58593f
Author: Lionel Elie Mamane 
Date:   Fri May 27 11:51:10 2016 +0200

tdf#96516 do not increment position counter when an entry is removed

Change-Id: I81a4455df1fd5962d0362f4e5fa3396764a0ae5a

diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx 
b/dbaccess/source/ui/querydesign/querydlg.cxx
index dc743c0..3ea04b4 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -123,13 +123,15 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
 else
 {
 const sal_Int32 nCount = m_pLB_JoinType->GetEntryCount();
-for (sal_Int32 i = 0; i < nCount; ++i)
+for (sal_Int32 i = 0; i < nCount;)
 {
 const sal_IntPtr nJoinTyp = 
reinterpret_cast(m_pLB_JoinType->GetEntryData(i));
 if ( !bSupportFullJoin && nJoinTyp == ID_FULL_JOIN )
 m_pLB_JoinType->RemoveEntry(i);
 else if ( !bSupportOuterJoin && (nJoinTyp == ID_LEFT_JOIN || 
nJoinTyp == ID_RIGHT_JOIN) )
 m_pLB_JoinType->RemoveEntry(i);
+else
+++i;
 }
 
 m_pTableControl->NotifyCellChange();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-26 Thread Caolán McNamara
 dbaccess/source/ui/inc/JoinTableView.hxx|   12 +--
 dbaccess/source/ui/inc/QueryTableView.hxx   |6 -
 dbaccess/source/ui/inc/RelationTableView.hxx|4 -
 dbaccess/source/ui/querydesign/JoinTableView.cxx|   57 +++-
 dbaccess/source/ui/querydesign/QueryTableView.cxx   |   34 +
 dbaccess/source/ui/relationdesign/RelationTableView.cxx |   14 +--
 6 files changed, 64 insertions(+), 63 deletions(-)

New commits:
commit 3185d9b8fbaad56fc7170a277569b5e441d946f4
Author: Caolán McNamara 
Date:   Thu May 26 11:41:27 2016 +0100

Related: tdf#97854 confirm that on !bDelete there's a ref to the connection

so that its not deleted on removal from the vector

Change-Id: I6c1f7691ee415abf0f419fdd7fcf2341fe2bd1f3

diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx 
b/dbaccess/source/ui/inc/JoinTableView.hxx
index dcf..4b8c7cb 100644
--- a/dbaccess/source/ui/inc/JoinTableView.hxx
+++ b/dbaccess/source/ui/inc/JoinTableView.hxx
@@ -148,12 +148,12 @@ namespace dbaui
 
 it implies that the same as addConnection
 
-@param  _pConnection the connection which should be removed
-@param  _bDelete when true then the connection will be deleted
+@param  rConnection the connection which should be removed
+@param  bDelete when true then the connection will be deleted
 
 @return an iterator to next valid connection, so it can be used in 
any loop
 */
-virtual bool RemoveConnection(OTableConnection* _pConnection,bool 
_bDelete);
+virtual bool RemoveConnection(VclPtr& rConnection, 
bool bDelete);
 
 /** allows to add new connections to join table view
 
@@ -172,7 +172,7 @@ namespace dbaui
 OJoinDesignView* getDesignView() const { return m_pView; }
 OTableWindow* GetTabWindow( const OUString& rName );
 
-OTableConnection* GetSelectedConn() { return m_pSelectedConn; }
+VclPtr& GetSelectedConn() { return m_pSelectedConn; }
 /** @note NULL is explicitly allowed (then no-op) */
 void DeselectConn(OTableConnection* pConn);
 void SelectConn(OTableConnection* pConn);
@@ -271,7 +271,7 @@ namespace dbaui
 virtual void MouseButtonDown( const MouseEvent& rEvt ) override;
 virtual void Tracking( const TrackingEvent& rTEvt ) override;
 virtual void Paint( vcl::RenderContext& rRenderContext, const 
Rectangle& rRect ) override;
-virtual void ConnDoubleClicked( OTableConnection* pConnection );
+virtual void ConnDoubleClicked(VclPtr& rConnection);
 void SetDefaultTabWinPosSize( OTableWindow* pTabWin );
 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
 
@@ -312,7 +312,7 @@ namespace dbaui
 @param _aPos the position where the popup menu should appear
 @param _pSelConnection the connection which should be deleted
 */
-void executePopup(const Point& _aPos,OTableConnection* 
_pSelConnection);
+void executePopup(const Point& _aPos, VclPtr& 
rSelConnection);
 
 /** invalidates this window without children and set the controller
 modified
diff --git a/dbaccess/source/ui/inc/QueryTableView.hxx 
b/dbaccess/source/ui/inc/QueryTableView.hxx
index 05687bb..4b27fa3 100644
--- a/dbaccess/source/ui/inc/QueryTableView.hxx
+++ b/dbaccess/source/ui/inc/QueryTableView.hxx
@@ -33,7 +33,7 @@ namespace dbaui
 class OQueryTableView : public OJoinTableView
 {
 protected:
-virtual void ConnDoubleClicked(OTableConnection* pConnection) override;
+virtual void ConnDoubleClicked(VclPtr& rConnection) 
override;
 virtual void KeyInput(const KeyEvent& rEvt) override;
 
 virtual VclPtr createWindow(const 
TTableWindowData::value_type& _pData) override;
@@ -63,7 +63,7 @@ namespace dbaui
 /// base class overwritten: create and delete Connections
 virtual void AddConnection(const OJoinExchangeData& jxdSource, const 
OJoinExchangeData& jxdDest) override;
 
-virtual bool RemoveConnection( OTableConnection* _pConn ,bool 
_bDelete) override;
+virtual bool RemoveConnection(VclPtr& rConn, bool 
bDelete) override;
 
 // transfer of connections from and to UndoAction
 
@@ -74,7 +74,7 @@ namespace dbaui
 This results effectively in complete reset of request form, as all
 windows are hidden, as are all Connections to these windows and all
 request columns based on those tables */
-void DropConnection(OQueryTableConnection* pConn);
+void DropConnection(VclPtr& rConn);
 
 // show and hide TabWin (NOT create or delete)
 bool ShowTabWin(OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* 
pUndoAction, bool _bAppend);
diff --git a/dbaccess/source/ui/inc/RelationTableView.hxx 
b/dbaccess/source/ui/inc/RelationTableView.hxx
index 

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

2016-01-29 Thread akki95
 dbaccess/source/core/misc/dsntypes.cxx |2 +-
 dbaccess/source/inc/dsntypes.hxx   |   12 ++--
 dbaccess/source/ui/dlg/ConnectionPageSetup.cxx |5 +
 3 files changed, 12 insertions(+), 7 deletions(-)

New commits:
commit 82b4afb4295a58c1afee39877a894136d68111ec
Author: akki95 
Date:   Tue Jan 26 03:52:42 2016 +0530

whitespace fixup

Change-Id: Ia5a2cd92e069c038f4ff0c97876b95c5d81e4db1

diff --git a/dbaccess/source/core/misc/dsntypes.cxx 
b/dbaccess/source/core/misc/dsntypes.cxx
index 8f90a1a..fe94d2e 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -401,7 +401,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const 
OUString& _rDsn) const
 KnownPrefix( "sdbc:mysql:jdbc:",DST_MYSQL_JDBC, false ),
 KnownPrefix( "sdbc:mysql:mysqlc:",  DST_MYSQL_NATIVE,   false ),
 KnownPrefix( "sdbc:mysqlc:",DST_MYSQL_NATIVE_DIRECT,false ),
-KnownPrefix( "sdbc:postgresql:",DST_POSTGRES,false ),
+KnownPrefix( "sdbc:postgresql:",DST_POSTGRES   ,false ),
 
 KnownPrefix( "sdbc:address:mozilla:",   DST_MOZILLA,   
 true ),
 KnownPrefix( "sdbc:address:thunderbird:",   DST_THUNDERBIRD,   
 true ),
diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx
index 9ce1f7c..8de9a93 100644
--- a/dbaccess/source/inc/dsntypes.hxx
+++ b/dbaccess/source/inc/dsntypes.hxx
@@ -46,22 +46,22 @@ enum DATASOURCE_TYPE
 DST_ODBC= 10,
 DST_ADO = 11,
 DST_MOZILLA = 12,
- DST_THUNDERBIRD = 13,
+DST_THUNDERBIRD = 13,
 DST_LDAP= 14,
 DST_OUTLOOK = 15,
 DST_OUTLOOKEXP  = 16,
 DST_EVOLUTION   = 17,
 DST_EVOLUTION_GROUPWISE = 18,
 DST_EVOLUTION_LDAP  = 19,
- DST_KAB = 20,
- DST_MACAB   = 21,
+DST_KAB = 20,
+DST_MACAB   = 21,
 DST_MSACCESS_2007   = 22,
- DST_EMBEDDED_HSQLDB= 23,
+DST_EMBEDDED_HSQLDB = 23,
 DST_MYSQL_NATIVE= 24,
 DST_MYSQL_NATIVE_DIRECT = 25,
 DST_FIREBIRD= 26,
-DST_EMBEDDED_FIREBIRD= 27,
-DST_POSTGRES = 28,
+DST_EMBEDDED_FIREBIRD   = 27,
+DST_POSTGRES= 28,
 
 DST_USERDEFINE1,/// first user defined driver
 DST_USERDEFINE2,
commit 90e18b514f639827091cee0f04892d999046eb18
Author: akki95 
Date:   Tue Jan 26 03:52:42 2016 +0530

tdf#45775 PgSQL new DB allow empty Datasource

Change-Id: I5d672629ddf7f153f0ad1927f0f6c0ffc545c3ab

diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx 
b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 21e1ea3..864b406 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -138,6 +138,9 @@ namespace dbaui
 //! TODO
 //if (  ::dbaccess::DST_ORACLE_JDBC == m_eType )
 //m_eType =  ::dbaccess::DST_JDBC;
+if(m_pCollection->determineType(m_eType) == ::dbaccess::DST_POSTGRES){
+SetRoadmapStateValue(true);
+}
 
 OConnectionHelper::implInitControls(_rSet, _bSaveValue);
 
@@ -168,6 +171,8 @@ namespace dbaui
 }
 bool OConnectionTabPageSetup::checkTestConnection()
 {
+if ( m_pCollection->determineType(m_eType) ==  
::dbaccess::DST_POSTGRES )
+return true;
 return !m_pConnectionURL->IsVisible() || 
!m_pConnectionURL->GetTextNoPrefix().isEmpty();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source dbaccess/util sw/qa

2015-12-12 Thread Matúš Kukan
 dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx |   78 +--
 dbaccess/source/core/inc/services.hxx|   31 -
 dbaccess/source/core/misc/services.cxx   |   25 
 dbaccess/util/dba.component  |3 
 sw/qa/extras/uiwriter/data/tdf34957.odt  |binary
 5 files changed, 31 insertions(+), 106 deletions(-)

New commits:
commit 0769ad9284c4d71ab11e4460c0f380eca8d4c788
Author: Matúš Kukan 
Date:   Sat Dec 5 07:56:36 2015 +0100

test for tdf#34957: change font in test document to make it work here

Previously the text was too long, ending on second page,
and table was on third page here, but is expected on second.
Change font to 'Liberation Serif' which seems to be used elsewhere,
and set line spacing to 'single' which makes the test succeed.

Change-Id: I4fc903c5d83308608e70e3e440d5277abd487052

diff --git a/sw/qa/extras/uiwriter/data/tdf34957.odt 
b/sw/qa/extras/uiwriter/data/tdf34957.odt
index 5aacca0..291c6a2 100644
Binary files a/sw/qa/extras/uiwriter/data/tdf34957.odt and 
b/sw/qa/extras/uiwriter/data/tdf34957.odt differ
commit 1ded035f853ba62f02958175046948d2b47b8075
Author: Matúš Kukan 
Date:   Sat Nov 21 01:32:49 2015 +0100

tdf#74608 dbaccess: Constructor for singleton DataAccessDescriptorFactory

Change-Id: Id1453e3cf1c8aef22536b4e0797cca7e654316c0

diff --git a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx 
b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
index 567e231..e351d29 100644
--- a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
+++ b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
@@ -18,8 +18,6 @@
  */
 
 #include "dbastrings.hrc"
-#include "module_dba.hxx"
-#include "services.hxx"
 
 #include 
 #include 
@@ -28,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -36,28 +35,20 @@
 #include 
 #include 
 
-namespace dbaccess
+namespace
 {
 
 using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::XInterface;
-using ::com::sun::star::uno::UNO_QUERY;
-using ::com::sun::star::uno::UNO_QUERY_THROW;
-using ::com::sun::star::uno::UNO_SET_THROW;
-using ::com::sun::star::uno::Exception;
 using ::com::sun::star::uno::RuntimeException;
 using ::com::sun::star::uno::Any;
-using ::com::sun::star::uno::makeAny;
 using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::XComponentContext;
 using ::com::sun::star::lang::XServiceInfo;
-using ::com::sun::star::lang::XMultiServiceFactory;
 using ::com::sun::star::beans::XPropertySetInfo;
 using ::com::sun::star::beans::Property;
 using ::com::sun::star::sdbc::XConnection;
 using ::com::sun::star::sdbc::XResultSet;
-using ::com::sun::star::sdb::XDataAccessDescriptorFactory;
 using ::com::sun::star::beans::XPropertySet;
-using ::com::sun::star::uno::XComponentContext;
 using ::com::sun::star::beans::PropertyValue;
 
 namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute;
@@ -211,10 +202,7 @@ namespace dbaccess
 }
 
 // DataAccessDescriptorFactory
-typedef ::cppu::WeakImplHelper<   XServiceInfo
-  ,   XDataAccessDescriptorFactory
-  >   DataAccessDescriptorFactory_Base;
-class DataAccessDescriptorFactory : public DataAccessDescriptorFactory_Base
+class DataAccessDescriptorFactory: public 
::cppu::WeakImplHelper
 {
 public:
 // XServiceInfo
@@ -222,16 +210,9 @@ namespace dbaccess
 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName 
) throw (RuntimeException, std::exception) override;
 virtual Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) 
throw (RuntimeException, std::exception) override;
 
-// XServiceInfo - static versions
-static Sequence< OUString >  getSupportedServiceNames_static() throw( 
RuntimeException );
-static OUString  getImplementationName_static() throw( 
RuntimeException );
-static Reference< XInterface >  Create(const Reference< 
XComponentContext >& _rxContext);
-static OUString  getSingletonName_static();
-
 // XDataAccessDescriptorFactory
 virtual Reference< XPropertySet > SAL_CALL createDataAccessDescriptor( 
 ) throw (RuntimeException, std::exception) override;
 
-protected:
 explicit DataAccessDescriptorFactory( const Reference< 
XComponentContext >& _rxContext );
 virtual ~DataAccessDescriptorFactory();
 
@@ -248,30 +229,9 @@ namespace dbaccess
 {
 }
 
-OUString DataAccessDescriptorFactory::getSingletonName_static()
-{
-return OUString( "com.sun.star.sdb.DataAccessDescriptorFactory" );
-}
-
-Sequence< OUString > 

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

2015-12-05 Thread Matúš Kukan
 dbaccess/source/core/dataaccess/ComponentDefinition.cxx |   45 ++
 dbaccess/source/core/dataaccess/ComponentDefinition.hxx |   18 +---
 dbaccess/source/core/dataaccess/databasedocument.cxx|   66 
 dbaccess/source/core/dataaccess/databasedocument.hxx|6 -
 dbaccess/source/core/inc/services.hxx   |2 
 dbaccess/source/core/misc/services.cxx  |2 
 dbaccess/util/dba.component |6 -
 7 files changed, 40 insertions(+), 105 deletions(-)

New commits:
commit f229b9b04a9267f7f277304c0ebed7f8b2582a5d
Author: Matúš Kukan 
Date:   Sat Nov 21 00:39:35 2015 +0100

tdf#74608 dbaccess: Constructor feature for ODatabaseDocument

Change-Id: Id524a1a717c350cb0558ef5ff11da3e6c941c203

diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 3b07612..e25b714 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -22,8 +22,6 @@
 #include "datasource.hxx"
 #include "databasedocument.hxx"
 #include "dbastrings.hrc"
-#include "module_dba.hxx"
-#include "services.hxx"
 #include "documenteventexecutor.hxx"
 #include "databasecontext.hxx"
 #include "documentcontainer.hxx"
@@ -52,7 +50,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -111,11 +108,6 @@ using namespace ::com::sun::star::script;
 using namespace ::com::sun::star::script::provider;
 using namespace ::com::sun::star::ui;
 using namespace ::cppu;
-using namespace ::osl;
-
-using ::com::sun::star::awt::XWindow;
-using ::com::sun::star::ucb::XContent;
-using ::com::sun::star::sdb::application::XDatabaseDocumentUI;
 
 namespace dbaccess
 {
@@ -147,17 +139,6 @@ bool ViewMonitor::onSetCurrentController( const Reference< 
XController >& _rxCon
 return bLoadFinished;
 }
 
-} // namespace dbaccess
-
-// ODatabaseDocument
-
-extern "C" void SAL_CALL createRegistryInfo_ODatabaseDocument()
-{
-static ::dba::OAutoRegistration< ::dbaccess::ODatabaseDocument > 
aAutoRegistration;
-}
-
-namespace dbaccess
-{
 
 ODatabaseDocument::ODatabaseDocument(const 
::rtl::Reference& _pImpl )
 :ModelDependentComponent( _pImpl )
@@ -611,7 +592,7 @@ namespace
 {
 bool lcl_hasAnyModifiedSubComponent_throw( const Reference< XController >& 
i_rController )
 {
-Reference< XDatabaseDocumentUI > xDatabaseUI( i_rController, 
UNO_QUERY_THROW );
+Reference< css::sdb::application::XDatabaseDocumentUI > xDatabaseUI( 
i_rController, UNO_QUERY_THROW );
 
 Sequence< Reference< XComponent > > aComponents( 
xDatabaseUI->getSubComponents() );
 const Reference< XComponent >* component = aComponents.getConstArray();
@@ -1900,37 +1881,14 @@ void SAL_CALL ODatabaseDocument::removeEventListener( 
const Reference< lang::XEv
 }
 
 // XServiceInfo
-OUString ODatabaseDocument::getImplementationName(  ) throw(RuntimeException, 
std::exception)
-{
-return getImplementationName_static();
-}
-
-OUString ODatabaseDocument::getImplementationName_static(  ) 
throw(RuntimeException)
+OUString ODatabaseDocument::getImplementationName() throw(RuntimeException, 
std::exception)
 {
 return OUString("com.sun.star.comp.dba.ODatabaseDocument");
 }
 
-Sequence< OUString > ODatabaseDocument::getSupportedServiceNames(  ) throw 
(RuntimeException, std::exception)
+Sequence< OUString > ODatabaseDocument::getSupportedServiceNames() throw 
(RuntimeException, std::exception)
 {
-return getSupportedServiceNames_static();
-}
-
-Reference< XInterface > ODatabaseDocument::Create( const Reference< 
XComponentContext >& _rxContext )
-{
-Reference< XUnoTunnel > xDBContextTunnel( 
DatabaseContext::create(_rxContext), UNO_QUERY_THROW );
-ODatabaseContext* pContext = reinterpret_cast< ODatabaseContext* >( 
xDBContextTunnel->getSomething( 
ODatabaseContext::getUnoTunnelImplementationId() ) );
-
-::rtl::Reference pImpl( new ODatabaseModelImpl( 
_rxContext, *pContext ) );
-Reference< XModel > xModel( pImpl->createNewModel_deliverOwnership( false 
) );
-return xModel.get();
-}
-
-Sequence< OUString > ODatabaseDocument::getSupportedServiceNames_static(  ) 
throw (RuntimeException)
-{
-Sequence< OUString > aSNS( 2 );
-aSNS[0] = "com.sun.star.sdb.OfficeDatabaseDocument";
-aSNS[1] = "com.sun.star.document.OfficeDocument";
-return aSNS;
+return { "com.sun.star.sdb.OfficeDatabaseDocument", 
"com.sun.star.document.OfficeDocument" };
 }
 
 sal_Bool ODatabaseDocument::supportsService( const OUString& _rServiceName ) 
throw (RuntimeException, std::exception)
@@ -2252,4 +2210,20 @@ OUString SAL_CALL ODatabaseDocument::getUntitledPrefix() 
   throw (uno::RuntimeE
 
 }   // namespace dbaccess
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
+com_sun_star_comp_dba_ODatabaseDocument(css::uno::XComponentContext* context,
+

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

2015-12-02 Thread Lionel Elie Mamane
 dbaccess/source/ui/inc/WTypeSelect.hxx  |2 +-
 dbaccess/source/ui/misc/WTypeSelect.cxx |4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit de9d0e797903e7ecc19be2b05c7e89d5936ae02d
Author: Lionel Elie Mamane 
Date:   Thu Dec 3 05:09:15 2015 +0100

Revert "tdf#96012: Type formatting in Base shouldn't be multiselect"

This reverts commit 103cd686de34b668a838c459f3d827c02e704656.
Better fix for tdf#96012 in b2d479854a9182234a378166900240aee7e1c79b
("simple mode" for the multiselection)

Change-Id: Ia6d7e5132e3f1997906a03f67ea4d7d0cf54ce7a

diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx 
b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 5ff28dc..ba9e35e 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -246,7 +246,7 @@ OWizTypeSelect::OWizTypeSelect( vcl::Window* pParent, 
SvStream* _pStream )
 m_pAutoEt->SetText("10");
 m_pAutoEt->SetDecimalDigits(0);
 m_pAutoPb->SetClickHdl(LINK(this,OWizTypeSelect,ButtonClickHdl));
-m_pColumnNames->EnableMultiSelection(false);
+m_pColumnNames->EnableMultiSelection(true);
 
 try
 {
@@ -288,6 +288,8 @@ IMPL_LINK_NOARG_TYPED( OWizTypeSelect, ColumnSelectHdl, 
ListBox&, void )
 OFieldDescription* pField = 
static_cast(m_pColumnNames->GetEntryData(m_pColumnNames->GetEntryPos(aColumnName)));
 if(pField)
 m_pTypeControl->DisplayData(pField);
+
+m_pTypeControl->Enable(m_pColumnNames->GetSelectEntryCount() == 1 );
 }
 
 void OWizTypeSelect::Reset()
commit b2d479854a9182234a378166900240aee7e1c79b
Author: Lionel Elie Mamane 
Date:   Thu Dec 3 05:07:11 2015 +0100

tdf#96012 enable simple mode for the multilistbox

Change-Id: Ia4d4c56318bc7d32d317abbda27eda9d3413ba75

diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx 
b/dbaccess/source/ui/inc/WTypeSelect.hxx
index 2501707..5432411 100644
--- a/dbaccess/source/ui/inc/WTypeSelect.hxx
+++ b/dbaccess/source/ui/inc/WTypeSelect.hxx
@@ -72,7 +72,7 @@ namespace dbaui
 virtual boolPreNotify( NotifyEvent& rNEvt ) override;
 VclPtr m_pParentTabPage;
 public:
-OWizTypeSelectList( vcl::Window* pParent, WinBits nStyle = WB_BORDER )
+OWizTypeSelectList( vcl::Window* pParent, WinBits nStyle = WB_BORDER | 
WB_SIMPLEMODE )
 : MultiListBox(pParent,nStyle)
 , m_bPKey(false)
 , m_pParentTabPage(nullptr)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source wizards/com

2015-10-28 Thread Lionel Elie Mamane
 dbaccess/source/core/api/KeySet.cxx   |2 -
 wizards/com/sun/star/wizards/db/SQLQueryComposer.java |   26 +++---
 wizards/com/sun/star/wizards/ui/FilterComponent.java  |4 +-
 3 files changed, 25 insertions(+), 7 deletions(-)

New commits:
commit 0bc79eef361334040b41385953aaebb81e82b33c
Author: Lionel Elie Mamane 
Date:   Wed Oct 28 17:41:44 2015 +0100

base new query wizard: fix confusion between display name and field name

Change-Id: I75354ffea2daede55b34e4cf3321d57196be3d9b

diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java 
b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
index 8305f09..4a7a679 100644
--- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
+++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java
@@ -77,7 +77,7 @@ public class SQLQueryComposer
 int iAggregate = 
CurDBMetaData.getAggregateIndex(CurDBMetaData.FieldColumns[i].getDisplayFieldName());
 if (iAggregate > -1)
 {
-sSelectClause += 
CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + 
getComposedAliasFieldName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + 
")";
+sSelectClause += 
CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + 
getComposedAliasDisplayName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + 
")";
 if (_baddAliasFieldNames)
 {
 sSelectClause += 
getAliasFieldNameClause(CurDBMetaData.AggregateFieldNames[iAggregate][0]);
@@ -85,7 +85,7 @@ public class SQLQueryComposer
 }
 else
 {
-sSelectClause += 
getComposedAliasFieldName(CurDBMetaData.FieldColumns[i].getDisplayFieldName());
+sSelectClause += 
getComposedAliasDisplayName(CurDBMetaData.FieldColumns[i].getDisplayFieldName());
 if (_baddAliasFieldNames)
 {
 sSelectClause += 
getAliasFieldNameClause(CurDBMetaData.FieldColumns[i].getDisplayFieldName());
@@ -181,7 +181,7 @@ public class SQLQueryComposer
 {
 sOrder += ", ";
 }
-sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + 
"(" + 
getComposedAliasFieldName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + 
")";
+sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + 
"(" + 
getComposedAliasDisplayName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + 
")";
 sOrder += " " + CurDBMetaData.getSortFieldNames()[i][1];
 m_queryComposer.setOrder(sOrder);
 }
@@ -307,7 +307,7 @@ public class SQLQueryComposer
 }
 }
 
-private String getComposedAliasFieldName(String _fieldname)
+private String getComposedAliasDisplayName(String _fieldname)
 {
 FieldColumn CurFieldColumn = 
CurDBMetaData.getFieldColumnByDisplayName(_fieldname);
 final String curCommandName = CurFieldColumn.getCommandName();
@@ -325,6 +325,24 @@ public class SQLQueryComposer
 return quoteName(curAliasName) + "." + quoteName(curFieldName);
 }
 
+private String getComposedAliasFieldName(String _fieldname)
+{
+FieldColumn CurFieldColumn = 
CurDBMetaData.getFieldColumnByFieldName(_fieldname);
+final String curCommandName = CurFieldColumn.getCommandName();
+final String curFieldName = CurFieldColumn.getFieldName();
+CommandName curComposedCommandName = 
getComposedCommandByDisplayName(curCommandName);
+if (curComposedCommandName == null)
+{
+//return _fieldname;
+if ( curCommandName.length() > 0 )
+return quoteName(curCommandName) + "." + 
quoteName(curFieldName);
+else
+return quoteName(curFieldName);
+}
+String curAliasName = curComposedCommandName.getAliasName();
+return quoteName(curAliasName) + "." + quoteName(curFieldName);
+}
+
 private CommandName getComposedCommandByAliasName(String _AliasName)
 {
 if (composedCommandNames != null)
diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java 
b/wizards/com/sun/star/wizards/ui/FilterComponent.java
index ab6fa7a..38af3bc 100644
--- a/wizards/com/sun/star/wizards/ui/FilterComponent.java
+++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java
@@ -119,7 +119,7 @@ public class FilterComponent
 String sControlNameSuffix = sIncSuffix + "_" + 
getIndexNumber(sControlName);
 XListBox xCurFieldListBox = 
UnoRuntime.queryInterface(XListBox.class, 
CurUnoDialog.xDlgContainer.getControl(sControlName));
 String CurDisplayFieldName = 
xCurFieldListBox.getSelectedItem();
-FieldColumn CurFieldColumn = new 
FieldColumn(oQueryMetaData, CurDisplayFieldName);
+  

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

2015-10-13 Thread Stephan Bergmann
 dbaccess/source/core/api/RowSetCache.cxx |   17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 7ea5ad6e46b92bc9020c6332b46b20671fa85c5b
Author: Stephan Bergmann 
Date:   Tue Oct 13 17:35:11 2015 +0200

Assumed fix of a clang-analyzer-deadcode.DeadStores

...where the "bOk = false" from the leading "if" is always overwritten in 
the
following check of "bOk = sTableRange == _sUpdateTableName".  The code had 
been
effectively like that ever since it got introduced with
4ae41a466ad659524809c23c9086df70c5456a39 "INTEGRATION: CWS dba30," but it 
looks
broken.  I assume the two checks of "sTableRange == _sUpdateTableName" for
pNode->GetChild(0) and pNode->GetChild(2) shall only be done if the leading 
"if"
is not hit.  (And one remaining uncertainty is if really only one of those
"sTableRange == _sUpdateTableName" checks needs to be true or if both 
should be
true for bOk to be true.)

Change-Id: I453690d65326ed67d7a074d4e4783a743a60d454

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index bbc30b3..0a713d8 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -1551,13 +1551,16 @@ bool ORowSetCache::checkInnerJoin(const 
::connectivity::OSQLParseNode *pNode,con
 {
 bOk = false;
 }
-OUString sColumnName,sTableRange;
-OSQLParseTreeIterator::getColumnRange( pNode->getChild(0), 
_xConnection, sColumnName, sTableRange );
-bOk = sTableRange == _sUpdateTableName;
-if ( !bOk )
+else
 {
-OSQLParseTreeIterator::getColumnRange( pNode->getChild(2), 
_xConnection, sColumnName, sTableRange );
-bOk =  sTableRange == _sUpdateTableName;
+OUString sColumnName,sTableRange;
+OSQLParseTreeIterator::getColumnRange( pNode->getChild(0), 
_xConnection, sColumnName, sTableRange );
+bOk = sTableRange == _sUpdateTableName;
+if ( !bOk )
+{
+OSQLParseTreeIterator::getColumnRange( pNode->getChild(2), 
_xConnection, sColumnName, sTableRange );
+bOk =  sTableRange == _sUpdateTableName;
+}
 }
 }
 return bOk;
commit 2c5f5976b2afe22589244802e1f3b2e47811fdbe
Author: Stephan Bergmann 
Date:   Tue Oct 13 16:01:28 2015 +0200

clang-analyzer-deadcode.DeadStores

In 8b9e4e393eff8b89a37a5932548700c0b50bcab8 "initial import" the assignment 
to
bCheck was in a for loop that used bCheck in its condition,

  sal_Int32 nPos = m_nStartPos+1;
  for(; aIter != m_pMatrix->end() && bCheck;)
  {
  if(!aIter->isValid())
  ...
  m_pCacheSet->fillValueRow(*aIter++,nPos++);
  bCheck = m_pCacheSet->next();
  }

that loop was then replaced with

  sal_Int32 nPos = m_nStartPos;
  bCheck = fill(aIter,m_pMatrix->end(),nPos,bCheck);

(without further use of bCheck) in 2facbebb88fe72614d566c3187c8f86c5c61f8bd
"MWS_SRX644: migrate branch mws_srx644 -> HEAD" (and the braces around

  {
  ORowSetMatrix::iterator aIter(aEnd);
  sal_Int32 nPos = m_nStartPos + 1;
  bCheck = fill(aIter, m_pMatrix->end(), nPos, bCheck);
  }

introduced in 1234d599d4ee67bd725f0513431b2d4c56c9e09d "ORowSetCache: 
overhaul
internals," presumably to limit the scope of that aIter introduced there).

Change-Id: I1cf4a22fbd1b76d524251a82c3ab4e6ca7a9eca1

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index fe21eae..bbc30b3 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -926,7 +926,7 @@ bool ORowSetCache::moveWindow()
 {
 ORowSetMatrix::iterator aIter(aEnd);
 sal_Int32 nPos = m_nStartPos + 1;
-bCheck = fill(aIter, aNewEnd, nPos, bCheck);
+fill(aIter, aNewEnd, nPos, bCheck);
 }
 
 ::std::rotate(m_pMatrix->begin(), aEnd, aNewEnd);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source filter/source forms/source sw/source

2015-10-05 Thread Caolán McNamara
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx  |6 -
 dbaccess/source/ui/misc/dsmeta.cxx|8 -
 filter/source/config/cache/configflush.hxx|2 
 filter/source/config/cache/contenthandlerfactory.hxx  |2 
 filter/source/config/cache/filterfactory.hxx  |2 
 filter/source/config/cache/frameloaderfactory.hxx |2 
 filter/source/config/cache/querytokenizer.hxx |2 
 filter/source/config/cache/typedetection.cxx  |2 
 filter/source/config/cache/typedetection.hxx  |2 
 filter/source/flash/swfdialog.hxx |2 
 filter/source/flash/swffilter.cxx |6 -
 filter/source/flash/swfwriter.hxx |6 -
 filter/source/graphicfilter/egif/egif.cxx |2 
 filter/source/graphicfilter/epbm/epbm.cxx |2 
 filter/source/graphicfilter/epgm/epgm.cxx |2 
 filter/source/graphicfilter/eppm/eppm.cxx |4 
 filter/source/graphicfilter/eras/eras.cxx |2 
 filter/source/graphicfilter/etiff/etiff.cxx   |2 
 filter/source/graphicfilter/expm/expm.cxx |2 
 filter/source/graphicfilter/icgm/bitmap.hxx   |   22 +--
 filter/source/graphicfilter/icgm/elements.hxx |4 
 filter/source/graphicfilter/icgm/outact.hxx   |2 
 filter/source/graphicfilter/idxf/dxfgrprd.hxx |4 
 filter/source/graphicfilter/ipbm/ipbm.cxx |4 
 filter/source/graphicfilter/ipcd/ipcd.cxx |2 
 filter/source/graphicfilter/ipcx/ipcx.cxx |4 
 filter/source/graphicfilter/ipsd/ipsd.cxx |2 
 filter/source/graphicfilter/iras/iras.cxx |4 
 filter/source/graphicfilter/itga/itga.cxx |4 
 filter/source/msfilter/eschesdo.hxx   |  103 --
 filter/source/msfilter/viscache.hxx   |   30 ++---
 filter/source/odfflatxml/OdfFlatXml.cxx   |2 
 filter/source/pdf/impdialog.hxx   |4 
 filter/source/pdf/pdfdialog.hxx   |2 
 filter/source/pdf/pdfexport.cxx   |2 
 filter/source/pdf/pdffilter.hxx   |2 
 filter/source/placeware/exporter.hxx  |2 
 filter/source/placeware/filter.cxx|2 
 filter/source/placeware/tempfile.hxx  |2 
 filter/source/placeware/zip.hxx   |2 
 filter/source/storagefilterdetect/filterdetect.hxx|2 
 filter/source/svg/parserfragments.cxx |2 
 filter/source/svg/svgdialog.hxx   |2 
 filter/source/svg/svgwriter.hxx   |2 
 filter/source/t602/t602filter.hxx |6 -
 filter/source/textfilterdetect/filterdetect.hxx   |2 
 filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx   |2 
 filter/source/xmlfilteradaptor/streamwrap.hxx |2 
 filter/source/xmlfilterdetect/filterdetect.hxx|2 
 filter/source/xsltdialog/typedetectionexport.hxx  |2 
 filter/source/xsltdialog/xmlfilterdialogcomponent.cxx |2 
 filter/source/xsltdialog/xmlfilterjar.hxx |2 
 filter/source/xsltdialog/xmlfiltersettingsdialog.hxx  |2 
 filter/source/xsltdialog/xmlfiltertabpagebasic.hxx|2 
 filter/source/xsltdialog/xmlfiltertabpagexslt.hxx |2 
 filter/source/xsltdialog/xmlfiltertestdialog.cxx  |2 
 filter/source/xsltfilter/XSLTFilter.cxx   |2 
 forms/source/component/Button.hxx |2 
 sw/source/core/inc/flowfrm.hxx|   33 -
 sw/source/core/inc/frame.hxx  |   26 
 sw/source/core/layout/calcmove.cxx|7 -
 sw/source/core/layout/flowfrm.cxx |8 -
 sw/source/core/layout/fly.cxx |   12 --
 sw/source/core/layout/layact.cxx  |   11 -
 64 files changed, 192 insertions(+), 208 deletions(-)

New commits:
commit 56a5734b06e0f252722153d2e6af680fd9e6e429
Author: Caolán McNamara 
Date:   Mon Oct 5 17:10:47 2015 +0100

cppcheck: noExplicitConstructor

Change-Id: I80950aaf1385bd76b012eab7866fd16848751f45

diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx 
b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index bf48cda..343b840 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -89,7 +89,7 @@ namespace dbaui
 {
 }
 
-DataSourceHolder( const Reference< XDataSource >& _rxDataSource )
+explicit DataSourceHolder(const Reference< XDataSource >& 
_rxDataSource)
 {
 m_xDataSource = _rxDataSource;
 Reference< XDocumentDataSource > xDocDS( m_xDataSource, UNO_QUERY 

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

2015-09-17 Thread Lionel Elie Mamane
 dbaccess/source/core/api/RowSetCache.cxx |3 ++-
 svx/source/fmcomp/gridcell.cxx   |   15 +++
 2 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 558b08d55f69b04eea42a37abd97fbb4dbe3602f
Author: Lionel Elie Mamane 
Date:   Thu Sep 17 19:31:35 2015 +0200

silence warning when not a warning

Change-Id: I31d7835a5ed3053cd1a930b3fb922d689d6ddcbe

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index ed838ed..fe21eae 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -741,7 +741,8 @@ bool ORowSetCache::afterLast(  )
 
 bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos)
 {
-OSL_ENSURE(_nNewStartPos != _nNewEndPos,"ORowSetCache::fillMatrix: 
StartPos and EndPos can not be equal!");
+OSL_ENSURE((_nNewStartPos != _nNewEndPos) || (_nNewStartPos == 0 && 
_nNewEndPos == 0 && m_nRowCount == 0),
+   "ORowSetCache::fillMatrix: StartPos and EndPos can not be equal 
(unless the recordset is empty)!");
 // If _nNewStartPos >= 0, then fill the whole window with new data
 // Else if _nNewStartPos == -1, then fill only segment [m_nEndPos, 
_nNewEndPos)
 // Else, undefined (invalid argument)
commit a4677e8d868840ade21d74938c29ccdf75e9c666
Author: Lionel Elie Mamane 
Date:   Thu Sep 17 19:24:04 2015 +0200

make FmXGridCell more disposed-safe

fixes a segfault (crash) in these conditions:

* the form's AfterInsert StarBasic script does a reload() of the form

* the insert happens by clicking into a cell which has
  scripts linked to the events FocusLost and FocusGained.
  The case that led to discovering this involved a ListBox whose
  RecordSource changes when focus is gained or lost.

Then there was a race condition between the cell's dispose (from the
form's reload()) and the _old_ cell's FocusLost being executed.
NewStyleUNOScript::invoke would then call
xControl->getModel
with xControl being the involved cell,
leading FmXGridCell::getModel() to call m_pColumn->getModel()
with m_pColumn == NULL.

Change-Id: Ifb4402d37ee4faec80087ffccabe102acc016d60

diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 934be2e..04b8c2b 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -3254,6 +3254,7 @@ Reference< XInterface >  FmXGridCell::getContext() throw( 
RuntimeException, std:
 
 Reference< ::com::sun::star::awt::XControlModel >  FmXGridCell::getModel() 
throw( ::com::sun::star::uno::RuntimeException, std::exception )
 {
+checkDisposed(OComponentHelper::rBHelper.bDisposed);
 return Reference< ::com::sun::star::awt::XControlModel > 
(m_pColumn->getModel(), UNO_QUERY);
 }
 
@@ -3261,12 +3262,14 @@ Reference< ::com::sun::star::awt::XControlModel >  
FmXGridCell::getModel() throw
 
 sal_Bool FmXGridCell::getLock() throw( RuntimeException, std::exception )
 {
+checkDisposed(OComponentHelper::rBHelper.bDisposed);
 return m_pColumn->isLocked();
 }
 
 
 void FmXGridCell::setLock(sal_Bool _bLock) throw( RuntimeException, 
std::exception )
 {
+checkDisposed(OComponentHelper::rBHelper.bDisposed);
 if (getLock() == _bLock)
 return;
 else
@@ -3321,60 +3324,70 @@ void SAL_CALL FmXGridCell::setFocus(  ) throw 
(RuntimeException, std::exception)
 
 void SAL_CALL FmXGridCell::addWindowListener( const Reference< 
awt::XWindowListener >& _rxListener ) throw (RuntimeException, std::exception)
 {
+checkDisposed(OComponentHelper::rBHelper.bDisposed);
 m_aWindowListeners.addInterface( _rxListener );
 }
 
 
 void SAL_CALL FmXGridCell::removeWindowListener( const Reference< 
awt::XWindowListener >& _rxListener ) throw (RuntimeException, std::exception)
 {
+checkDisposed(OComponentHelper::rBHelper.bDisposed);
 m_aWindowListeners.removeInterface( _rxListener );
 }
 
 
 void SAL_CALL FmXGridCell::addFocusListener( const Reference< 
awt::XFocusListener >& _rxListener ) throw (RuntimeException, std::exception)
 {
+checkDisposed(OComponentHelper::rBHelper.bDisposed);
 m_aFocusListeners.addInterface( _rxListener );
 }
 
 
 void SAL_CALL FmXGridCell::removeFocusListener( const Reference< 
awt::XFocusListener >& _rxListener ) throw (RuntimeException, std::exception)
 {
+checkDisposed(OComponentHelper::rBHelper.bDisposed);
 m_aFocusListeners.removeInterface( _rxListener );
 }
 
 
 void SAL_CALL FmXGridCell::addKeyListener( const Reference< awt::XKeyListener 
>& _rxListener ) throw (RuntimeException, std::exception)
 {
+checkDisposed(OComponentHelper::rBHelper.bDisposed);
 m_aKeyListeners.addInterface( _rxListener );
 }
 
 
 void SAL_CALL FmXGridCell::removeKeyListener( const Reference< 
awt::XKeyListener >& _rxListener ) throw (RuntimeException, std::exception)
 {
+

[Libreoffice-commits] core.git: 2 commits - dbaccess/source filter/qa filter/source

2015-07-20 Thread Caolán McNamara
 dbaccess/source/ui/app/AppController.hxx |2 -
 dbaccess/source/ui/app/AppDetailView.hxx |2 -
 dbaccess/source/ui/app/AppIconControl.hxx|2 -
 filter/qa/cppunit/data/tiff/fail/hang-9.tiff |binary
 filter/source/graphicfilter/itiff/itiff.cxx  |   29 +--
 5 files changed, 22 insertions(+), 13 deletions(-)

New commits:
commit 97a0e7558b24792827d77217fb2d8b1106056963
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jul 20 12:28:03 2015 +0100

bail if offsets are past eof

Change-Id: I4a8e78231befff498894ec92a1f38af206e13129

diff --git a/filter/qa/cppunit/data/tiff/fail/hang-9.tiff 
b/filter/qa/cppunit/data/tiff/fail/hang-9.tiff
new file mode 100644
index 000..ef314ab
Binary files /dev/null and b/filter/qa/cppunit/data/tiff/fail/hang-9.tiff differ
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx 
b/filter/source/graphicfilter/itiff/itiff.cxx
index 769c57e..180b1c3 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -57,6 +57,7 @@ private:
 BitmapWriteAccess*  pMaskAcc;
 
 sal_uLong   nOrigPos;   // start position in 
pTIFF
+sal_uLong   nEndOfFile; // end of file 
position in pTIFF
 
 
 sal_uInt16  nDataType;
@@ -131,6 +132,7 @@ public:
 , pAlphaMask(NULL)
 , pMaskAcc(NULL)
 , nOrigPos(0)
+, nEndOfFile(0)
 , nDataType(0)
 , bByteSwap(false)
 , nNewSubFile(0)
@@ -540,7 +542,7 @@ bool TIFFReader::ReadMap()
 {
 if ( nCompression == 1 || nCompression == 32771 )
 {
-sal_uLong np, nStrip, nStripBytesPerRow;
+sal_uLong nStrip, nStripBytesPerRow;
 
 if ( nCompression == 1 )
 nStripBytesPerRow = nBytesPerRow;
@@ -548,7 +550,7 @@ bool TIFFReader::ReadMap()
 nStripBytesPerRow = ( nBytesPerRow + 1 )  0xfffe;
 for (sal_Int32 ny = 0; ny  nImageLength; ++ny)
 {
-for ( np = 0; np  nPlanes; np++ )
+for (sal_uLong np = 0; np  nPlanes; ++np)
 {
 nStrip = ny / GetRowsPerStrip() + np * nStripsPerPlane;
 if ( nStrip = nNumStripOffsets )
@@ -557,7 +559,7 @@ bool TIFFReader::ReadMap()
 if (np = SAL_N_ELEMENTS(pMap))
 return false;
 pTIFF-Read( pMap[ np ], nBytesPerRow );
-if ( pTIFF-GetError() )
+if (!pTIFF-good())
 return false;
 }
 if ( !ConvertScanline( ny ) )
@@ -566,7 +568,7 @@ bool TIFFReader::ReadMap()
 }
 else if ( nCompression == 2 || nCompression == 3 || nCompression == 4 )
 {
-sal_uLong np, nStrip, nOptions;
+sal_uLong nStrip, nOptions;
 if ( nCompression == 2 )
 {
 nOptions = CCI_OPTION_BYTEALIGNROW;
@@ -595,6 +597,9 @@ bool TIFFReader::ReadMap()
 nStrip = 0;
 if ( nStrip = nNumStripOffsets )
 return false;
+sal_uLong nOffset = pStripOffsets[nStrip];
+if (nOffset  nEndOfFile)
+return false;
 pTIFF-Seek(pStripOffsets[nStrip]);
 
 CCIDecompressor aCCIDecom( nOptions, nImageWidth );
@@ -603,14 +608,17 @@ bool TIFFReader::ReadMap()
 
 for (sal_Int32 ny = 0; ny  nImageLength; ++ny)
 {
-for ( np = 0; np  nPlanes; np++ )
+for (sal_uLong np = 0; np  nPlanes; np++ )
 {
 if ( ny / GetRowsPerStrip() + np * nStripsPerPlane  nStrip )
 {
 nStrip=ny/GetRowsPerStrip()+np*nStripsPerPlane;
 if ( nStrip = nNumStripOffsets )
 return false;
-pTIFF-Seek( pStripOffsets[ nStrip ] );
+nOffset = pStripOffsets[nStrip];
+if (nOffset  nEndOfFile)
+return false;
+pTIFF-Seek(nOffset);
 aCCIDecom.StartDecompression( *pTIFF );
 }
 if (np = SAL_N_ELEMENTS(pMap))
@@ -627,7 +635,7 @@ bool TIFFReader::ReadMap()
 else if ( nCompression == 5 )
 {
 LZWDecompressor aLZWDecom;
-sal_uLong np, nStrip;
+sal_uLong nStrip;
 nStrip=0;
 if ( nStrip = nNumStripOffsets )
 return false;
@@ -635,7 +643,7 @@ bool TIFFReader::ReadMap()
 aLZWDecom.StartDecompression(*pTIFF);
 for (sal_Int32 ny = 0; ny  nImageLength; ++ny)
 {
-for ( np = 0; np  nPlanes; np++ )
+for (sal_uLong np = 0; np  nPlanes; ++np)
 {
 if ( ny / GetRowsPerStrip() + np * nStripsPerPlane  nStrip )
 {
@@ -656,7 +664,7 @@ bool TIFFReader::ReadMap()
 }
 else if ( nCompression == 32773 )
 {
-sal_uLong nStrip,nRecCount,np,i;
+sal_uLong nStrip,nRecCount,i;
 

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

2015-07-20 Thread Caolán McNamara
 dbaccess/source/ui/browser/brwctrlr.cxx  |2 +-
 dbaccess/source/ui/browser/dbloader.cxx  |2 +-
 dbaccess/source/ui/browser/genericcontroller.cxx |2 +-
 dbaccess/source/ui/browser/sbagrid.cxx   |2 +-
 dbaccess/source/ui/browser/unodatbr.cxx  |4 ++--
 dbaccess/source/ui/control/RelationControl.cxx   |2 +-
 dbaccess/source/ui/control/dbtreelistbox.cxx |2 +-
 dbaccess/source/ui/control/sqledit.cxx   |2 +-
 dbaccess/source/ui/dlg/admincontrols.cxx |4 ++--
 dbaccess/source/ui/dlg/adminpages.hxx|4 ++--
 dbaccess/source/ui/dlg/dbfindex.hxx  |4 ++--
 dbaccess/source/ui/dlg/finteraction.hxx  |4 ++--
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx|2 +-
 dbaccess/source/ui/dlg/odbcconfig.hxx|2 +-
 dbaccess/source/ui/dlg/optionalboolitem.hxx  |2 +-
 dbaccess/source/ui/dlg/sqlmessage.cxx|8 
 dbaccess/source/ui/misc/UpdateHelperImpl.hxx |4 ++--
 dbaccess/source/ui/misc/asyncmodaldialog.cxx |2 +-
 dbaccess/source/ui/misc/controllerframe.cxx  |4 ++--
 dbaccess/source/ui/misc/dbaundomanager.cxx   |4 ++--
 dbaccess/source/ui/misc/dsmeta.cxx   |2 +-
 sw/source/core/doc/docnum.cxx|8 ++--
 22 files changed, 38 insertions(+), 34 deletions(-)

New commits:
commit 8a01693c79a24006cbe7d8642b97408eb23a1bd9
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jul 20 13:45:52 2015 +0100

test should check that all levels are equal

regression from

commit bf586debd4d8274cff2737f02beac465525328e8
Author: Matteo Casalin matteo.casa...@yahoo.com
Date:   Sat Feb 21 12:38:54 2015 +0100

Simplify

Change-Id: I09f83b2bab053fcd48fe1a1a4184cc11a4f9d663

diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 54822e8..fdf39db 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -654,13 +654,17 @@ static SwTextNode* lcl_FindOutlineNum( const 
SwOutlineNodes rOutlNds, OUString
 const SwNodeNum  rNdNum = *(pNd-GetNum());
 SwNumberTree::tNumberVector aLevelVal = 
rNdNum.GetNumberVector();
 // now compare with the one searched for
+bool bEqual = true;
 for( int n = 0; n  nLevel; ++n )
 {
-if ( aLevelVal[n] == nLevelVal[n] )
+if ( aLevelVal[n] != nLevelVal[n] )
 {
-return pNd;
+bEqual = false;
+break;
 }
 }
+if (bEqual)
+return pNd;
 }
 else
 {
commit 75938aff3848edb9fc705a70d79e9221b2c05c3a
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jul 20 13:06:13 2015 +0100

cppcheck: noExplicitConstructor

Change-Id: I45f2d96c7bd558405d0b5dfea3beb97ad720a82b

diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx 
b/dbaccess/source/ui/browser/brwctrlr.cxx
index 892ed35..6647b04 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -158,7 +158,7 @@ class SbaXDataBrowserController::FormControllerImpl
 SbaXDataBrowserController*  m_pOwner;
 
 public:
-FormControllerImpl(SbaXDataBrowserController* pOwner);
+explicit FormControllerImpl(SbaXDataBrowserController* pOwner);
 
 // XFormController
 virtual ::com::sun::star::uno::Reference 
::com::sun::star::form::runtime::XFormOperations  SAL_CALL getFormOperations() 
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/browser/dbloader.cxx 
b/dbaccess/source/ui/browser/dbloader.cxx
index a0f36d8..88e0f7f 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -70,7 +70,7 @@ private:
 Reference XFrame  m_xFrame;
 Reference XComponentContext   m_xContext;
 public:
-DBContentLoader(const Reference XComponentContext );
+explicit DBContentLoader(const Reference XComponentContext );
 virtual ~DBContentLoader();
 
 // XServiceInfo
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx 
b/dbaccess/source/ui/browser/genericcontroller.cxx
index 42bd37f..3f7d765 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -94,7 +94,7 @@ namespace dbaui
 class UserDefinedFeatures
 {
 public:
-UserDefinedFeatures( const Reference XController  _rxController );
+explicit UserDefinedFeatures( const Reference XController  
_rxController );
 
 static FeatureState getState( const URL _rFeatureURL );
 voidexecute( const URL _rFeatureURL, const Sequence 
PropertyValue _rArgs );
diff --git 

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

2015-06-25 Thread Noel Grandin
 dbaccess/source/ui/control/tabletree.cxx |4 ++--
 svx/source/inc/svdobjplusdata.hxx|2 --
 svx/source/svdraw/svdobjplusdata.cxx |2 --
 3 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 3f4978f8c660c595773c92b99d45d0631cac04b0
Author: Noel Grandin n...@peralex.com
Date:   Thu Jun 25 15:04:59 2015 +0200

loplugin:implicitboolconversion

Change-Id: Ib266bc70a99d84d4e3d845573f39e612dc6595f8

diff --git a/dbaccess/source/ui/control/tabletree.cxx 
b/dbaccess/source/ui/control/tabletree.cxx
index 789f774..85ce260 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -262,10 +262,10 @@ void OTableTreeListBox::UpdateTableList( const Reference 
XConnection  _rxConn
 {
 OUString sRootEntryText;
 if ( ::std::none_of(_rTables.begin(),_rTables.end(),
-[_rTables] (TNames::value_type name) { return 
name.second == sal_False; }) )
+[_rTables] (TNames::value_type name) { return 
!name.second; }) )
 sRootEntryText  = ModuleRes(STR_ALL_TABLES);
 else if ( ::std::none_of(_rTables.begin(),_rTables.end(),
- [_rTables] (TNames::value_type name) { 
return name.second == sal_True; }) )
+ [_rTables] (TNames::value_type name) { 
return !name.second; }) )
 sRootEntryText  = ModuleRes(STR_ALL_VIEWS);
 else
 sRootEntryText  = ModuleRes(STR_ALL_TABLES_AND_VIEWS);
commit 8bd2333e3636bc1e196fb7fccd73a0dc8518fa76
Author: Noel Grandin n...@peralex.com
Date:   Thu Jun 25 15:03:31 2015 +0200

remove custom RTTI from SdrObjPlusData

not used anywhere

Change-Id: I72e8f1862dd9075c548d178f93cd72fa32a56809

diff --git a/svx/source/inc/svdobjplusdata.hxx 
b/svx/source/inc/svdobjplusdata.hxx
index 7920df3..8f7c1a7 100644
--- a/svx/source/inc/svdobjplusdata.hxx
+++ b/svx/source/inc/svdobjplusdata.hxx
@@ -10,7 +10,6 @@
 #ifndef INCLUDED_SVX_SVDOBJPLUSDATA_HXX
 #define INCLUDED_SVX_SVDOBJPLUSDATA_HXX
 
-#include tools/rtti.hxx
 #include rtl/ustring.hxx
 
 class SdrObject;
@@ -34,7 +33,6 @@ class SdrObjPlusData
 OUString aObjDescription;
 
 public:
-TYPEINFO();
 SdrObjPlusData();
 virtual ~SdrObjPlusData();
 SdrObjPlusData* Clone(SdrObject* pObj1) const;
diff --git a/svx/source/svdraw/svdobjplusdata.cxx 
b/svx/source/svdraw/svdobjplusdata.cxx
index cc8fd35..e9d0696 100644
--- a/svx/source/svdraw/svdobjplusdata.cxx
+++ b/svx/source/svdraw/svdobjplusdata.cxx
@@ -14,8 +14,6 @@
 
 #include svl/SfxBroadcaster.hxx
 
-TYPEINIT0(SdrObjPlusData);
-
 SdrObjPlusData::SdrObjPlusData():
 pBroadcast(NULL),
 pUserDataList(NULL),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-08 Thread Miklos Vajna
 dbaccess/source/core/dataaccess/databasecontext.cxx  |   21 +--
 dbaccess/source/core/dataaccess/databasedocument.cxx |5 +++-
 2 files changed, 19 insertions(+), 7 deletions(-)

New commits:
commit cd33c5355f7c334e385595ba29adaa7844b252e2
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Mon Jun 8 09:41:18 2015 +0200

dbaccess: avoid pointless ucbhelper::Content instance in case of embedding

Change-Id: Ibc3d7a0d9b3373f17aa8d1da081946814904e6d5

diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx 
b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 775ecb6..32c63a1 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -320,11 +320,14 @@ Reference XInterface  
ODatabaseContext::loadObjectFromURL(const OUString _rNa
 bool bEmbeddedDataSource = 
_sURL.startsWithIgnoreAsciiCase(vnd.sun.star.pkg:);
 try
 {
-::ucbhelper::Content aContent( _sURL, NULL, 
comphelper::getProcessComponentContext() );
-if ( !aContent.isDocument()  !bEmbeddedDataSource )
-throw InteractiveIOException(
-_sURL, *this, InteractionClassification_ERROR, 
IOErrorCode_NO_FILE
-);
+if (!bEmbeddedDataSource)
+{
+::ucbhelper::Content aContent( _sURL, NULL, 
comphelper::getProcessComponentContext() );
+if ( !aContent.isDocument() )
+throw InteractiveIOException(
+_sURL, *this, InteractionClassification_ERROR, 
IOErrorCode_NO_FILE
+);
+}
 }
 catch ( const InteractiveIOException e )
 {
commit 4101949b2a9fcf399a1fa10c2547f745a24f5a3d
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Mon Jun 8 09:40:51 2015 +0200

dbaccess: set correct BaseURI for vnd.sun.star.pkg:// URLs on load

With this, in case the embedded data source definition has an URL like:

db:file-based-database xlink:href=../../calc-data-source.ods/ 
db:media-type=application/vnd.oasis.opendocument.spreadsheet/

That's resolved to
file:///path/to/directory/of/Writer/doc/calc-data-source.ods correctly.

Change-Id: Ieb67f9f5ae104689c6dadc14ec84c66bec70a687

diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx 
b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 6dd2efe..775ecb6 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -317,10 +317,10 @@ Reference XInterface  
ODatabaseContext::loadObjectFromURL(const OUString _rNa
 if ( aURL.GetProtocol() == INetProtocol::NotValid )
 throw NoSuchElementException( _rName, *this );
 
+bool bEmbeddedDataSource = 
_sURL.startsWithIgnoreAsciiCase(vnd.sun.star.pkg:);
 try
 {
 ::ucbhelper::Content aContent( _sURL, NULL, 
comphelper::getProcessComponentContext() );
-bool bEmbeddedDataSource = 
_sURL.startsWithIgnoreAsciiCase(vnd.sun.star.pkg:);
 if ( !aContent.isDocument()  !bEmbeddedDataSource )
 throw InteractiveIOException(
 _sURL, *this, InteractionClassification_ERROR, 
IOErrorCode_NO_FILE
@@ -363,6 +363,12 @@ Reference XInterface  
ODatabaseContext::loadObjectFromURL(const OUString _rNa
 aArgs.put( URL, _sURL );
 aArgs.put( MacroExecutionMode, MacroExecMode::USE_CONFIG );
 aArgs.put( InteractionHandler, 
task::InteractionHandler::createWithParent(m_aContext, 0) );
+if (bEmbeddedDataSource)
+{
+// In this case the host contains the real path, and the the path 
is the embedded stream name.
+OUString sBaseURI = 
aURL.GetHost(INetURLObject::DECODE_WITH_CHARSET) + 
aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET);
+aArgs.put(BaseURI, sBaseURI);
+}
 
 Sequence PropertyValue  aResource( aArgs.getPropertyValues() );
 xLoad-load( aResource );
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 43aa283..8c82907 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -502,7 +502,10 @@ void ODatabaseDocument::impl_import_nolck_throw( const 
Reference XComponentCont
 lcl_extractAndStartStatusIndicator( _rResource, xStatusIndicator, 
aFilterCreationArgs );
 
  uno::Reference beans::XPropertySet  xInfoSet( 
comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( 
aExportInfoMap ) ) );
-xInfoSet-setPropertyValue(BaseURI, 
uno::makeAny(_rResource.getOrDefault(URL,OUString(;
+OUString sBaseURI = _rResource.getOrDefault(BaseURI, OUString());
+if (sBaseURI.isEmpty())
+sBaseURI = _rResource.getOrDefault(URL,OUString());
+xInfoSet-setPropertyValue(BaseURI, uno::makeAny(sBaseURI));
 xInfoSet-setPropertyValue(StreamName, 

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

2015-06-05 Thread Miklos Vajna
 dbaccess/source/core/dataaccess/databasedocument.cxx |7 ++-
 sw/source/uibase/dbui/dbmgr.cxx  |3 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 0b2c324d79ef24913846d64ee5f9be516fd2d660
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Fri Jun 5 12:42:24 2015 +0200

SwDBManager: fix relative reference of embedded data source

When the MM wizard creates an embedded data source definition, then we
used to always write absolute references to e.g. the data source Calc
file. Pass BaseURI to the filter, so in case the document and the data
source is in the same directory, relative references can be written.

Change-Id: Iaa316adaf435f82bb574c7e5085ac04bf13a71f8

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index be81dce..a95fa52 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2635,7 +2635,8 @@ OUString SwDBManager::LoadAndRegisterDataSource(const 
DBConnURITypes type, const
 aSequence = comphelper::InitPropertySequence(
 {
 {TargetStorage, uno::makeAny(xStorage)},
-{StreamRelPath, uno::makeAny(aStreamRelPath)}
+{StreamRelPath, uno::makeAny(aStreamRelPath)},
+{BaseURI, uno::makeAny(aOwnURL)}
 });
 
 // Refer to the sub-storage name in the document settings, so
commit 1f1ad7ac0d1f60fb4db0b937fdac551118091ebc
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Fri Jun 5 12:38:50 2015 +0200

dbaccess: let ODatabaseDocument::impl_writeStorage_throw() respect BaseURI

Change-Id: Id30aaa624b9a1b0bbef016ef0b35bd39f19f6439

diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 84a592e..43aa283 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1658,7 +1658,12 @@ void ODatabaseDocument::impl_writeStorage_throw( const 
Reference XStorage  _r
 SvtSaveOptions aSaveOpt;
 xInfoSet-setPropertyValue(UsePrettyPrinting, 
uno::makeAny(aSaveOpt.IsPrettyPrinting()));
 if ( aSaveOpt.IsSaveRelFSys() )
-xInfoSet-setPropertyValue(BaseURI, 
uno::makeAny(_rMediaDescriptor.getOrDefault(URL,OUString(;
+{
+OUString sBaseURI = _rMediaDescriptor.getOrDefault(BaseURI, 
OUString());
+if (sBaseURI.isEmpty())
+sBaseURI = _rMediaDescriptor.getOrDefault(URL,OUString());
+xInfoSet-setPropertyValue(BaseURI, uno::makeAny(sBaseURI));
+}
 
 // Set TargetStorage, so it doesn't have to be re-constructed based on 
possibly empty URL.
 xInfoSet-setPropertyValue(TargetStorage, 
uno::makeAny(m_pImpl-getRootStorage()));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-06-01 Thread Miklos Vajna
 dbaccess/source/core/dataaccess/databasedocument.cxx |   30 +++-
 sw/inc/dbmgr.hxx |5 +-
 sw/source/ui/dbui/addresslistdialog.cxx  |   10 +++-
 sw/source/uibase/dbui/dbmgr.cxx  |   47 +--
 4 files changed, 84 insertions(+), 8 deletions(-)

New commits:
commit 54bf49a2be3a7bc370c7043011c6080918224ffa
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Mon Jun 1 12:13:44 2015 +0200

SwDBManager: embed data source definition if possible

In the past SwDBManager (used by the MM wizard) created a smaller .odb
file in the home directory by default in case the data source was
something external (.ods file, etc).

If the document is saved already (and experimental mode is enabled, as
this is still a work in progress), then stop saving these small .odb
files to the home directory, instead embed the data source definition
into the currently active .odt file.

Previously created such separate .odb files are still fully supported,
of course.

Change-Id: I7c1776e5ed57cdde05c0adfc5f7d1dc485363f03

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 5bf5432..27c86a7 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -350,7 +350,7 @@ public:
  the filename returned by a file picker and additional settings dialog.
  In case of success it returns the registered name, otherwise an empty 
string.
  */
-static OUStringLoadAndRegisterDataSource();
+static OUStringLoadAndRegisterDataSource(SwDocShell* pDocShell 
= 0);
 
 /**
  Loads a data source from file and registers it.
@@ -360,7 +360,8 @@ public:
  */
 static OUStringLoadAndRegisterDataSource(const DBConnURITypes 
type, const ::com::sun::star::uno::Any rUnoURI,
  const 
::com::sun::star::uno::Reference  ::com::sun::star::beans::XPropertySet  
*pSettings,
- const OUString rURI, 
const OUString *pPrefix = 0, const OUString *pDestDir = 0);
+ const OUString rURI, 
const OUString *pPrefix = 0, const OUString *pDestDir = 0,
+ SwDocShell* pDocShell 
= 0);
 /**
  Loads a data source from file and registers it.
 
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx 
b/sw/source/ui/dbui/addresslistdialog.cxx
index 9f989d0..16a55a7 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -56,6 +56,7 @@
 #include unotools/pathoptions.hxx
 #include svl/urihelper.hxx
 #include dbui.hrc
+#include view.hxx
 
 #include helpid.h
 #include unomid.h
@@ -345,7 +346,14 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl)
 
 IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl)
 {
-const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource();
+SwMailMergeWizard* pWizard = 0;
+if (GetParent()  GetParent()-GetParent())
+pWizard = dynamic_castSwMailMergeWizard*(GetParent()-GetParent());
+SwView* pView = 0;
+if (pWizard)
+pView = pWizard-GetSwView();
+
+const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(pView ? 
pView-GetDocShell() : 0);
 if(!sNewSource.isEmpty())
 {
 SvTreeListEntry* pNewSource = m_pListLB-InsertEntry(sNewSource);
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 942f58b..5f5c703 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -141,6 +141,8 @@
 #if ENABLE_CUPS  !defined(MACOSX)
 #include vcl/printerinfomanager.hxx
 #endif
+#include comphelper/propertysequence.hxx
+#include officecfg/Office/Common.hxx
 
 
 using namespace ::osl;
@@ -2397,7 +2399,7 @@ SequenceOUString SwDBManager::GetExistingDatabaseNames()
 return xDBContext-getElementNames();
 }
 
-OUString SwDBManager::LoadAndRegisterDataSource()
+OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell)
 {
 sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 
);
 Reference  XFilePicker  xFP = aDlgHelper.GetFilePicker();
@@ -2449,7 +2451,7 @@ OUString SwDBManager::LoadAndRegisterDataSource()
 if( xSettingsDlg-execute() )
 aSettings.set( uno::Reference  beans::XPropertySet ( 
xSettingsDlg, uno::UNO_QUERY_THROW ) );
 }
-sFind = LoadAndRegisterDataSource( type, aURLAny, DBCONN_FLAT == type 
? aSettings : 0, aURI );
+sFind = LoadAndRegisterDataSource( type, aURLAny, DBCONN_FLAT == type 
? aSettings : 0, aURI, 0, 0, pDocShell );
 }
 return sFind;
 }
@@ -2511,8 +2513,26 @@ SwDBManager::DBConnURITypes 
SwDBManager::GetDBunoURI(const OUString rURI, Any 
 return type;
 }
 
+/// Returns the URL of this SwDoc.
+OUString lcl_getOwnURL(SwDocShell* pDocShell)
+{
+OUString 

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

2015-05-28 Thread Caolán McNamara
 dbaccess/source/ui/querydesign/JoinController.cxx |2 +-
 xmloff/source/core/xmlexp.cxx |8 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 2ecf0ced9d2e55881033786fe95d45ceaeb73d37
Author: Caolán McNamara caol...@redhat.com
Date:   Thu May 28 15:20:48 2015 +0100

VclPtr: assert with query dialog open on closing query design

Change-Id: I40d196462ff2e37d86ca367d3a150c94872715f1

diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx 
b/dbaccess/source/ui/querydesign/JoinController.cxx
index ac48303..3852ef9 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -170,7 +170,7 @@ OJoinDesignView* OJoinController::getJoinView()
 
 void OJoinController::disposing()
 {
-m_pAddTableDialog   = NULL;
+m_pAddTableDialog.disposeAndClear();
 
 OJoinController_BASE::disposing();
 
commit 9bc314e38b6bcc268fe519b6d771a60087a1af9e
Author: Caolán McNamara caol...@redhat.com
Date:   Fri May 22 10:59:01 2015 +0100

add field namespace to styles.xml when saving fdo85232-1.docx to .odt

when = SvtSaveOptions::ODFVER_012

Change-Id: I0414bc4a83ae4787e10cd8a21f249da7e65a

diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 405a660..7b29bd7 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -336,6 +336,7 @@ void SvXMLExport::_InitCtor()
 mpNamespaceMap-Add( GetXMLToken(XML_NP_STYLE), 
GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
 }
 
+bool bAddFieldNM = false;
 // namespaces for documents
 if( getExportFlags()  
(SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT)
 )
 {
@@ -363,6 +364,7 @@ void SvXMLExport::_InitCtor()
 mpNamespaceMap-Add(
 GetXMLToken(XML_NP_LO_EXT), GetXMLToken(XML_N_LO_EXT),
 XML_NAMESPACE_LO_EXT);
+bAddFieldNM = true;
 }
 }
 if( getExportFlags()  
(SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
@@ -380,9 +382,13 @@ void SvXMLExport::_InitCtor()
 mpNamespaceMap-Add( GetXMLToken(XML_NP_XFORMS_1_0), 
GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
 mpNamespaceMap-Add( GetXMLToken(XML_NP_XSD), GetXMLToken(XML_N_XSD), 
XML_NAMESPACE_XSD );
 mpNamespaceMap-Add( GetXMLToken(XML_NP_XSI), GetXMLToken(XML_N_XSI), 
XML_NAMESPACE_XSI );
-mpNamespaceMap-Add( GetXMLToken(XML_NP_FIELD), 
GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
 mpNamespaceMap-Add( GetXMLToken(XML_NP_FORMX), 
GetXMLToken(XML_N_FORMX), XML_NAMESPACE_FORMX );
+bAddFieldNM = true;
 }
+
+if (bAddFieldNM)
+mpNamespaceMap-Add( GetXMLToken(XML_NP_FIELD), 
GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
+
 // RDFa: needed for content and header/footer styles
 if( getExportFlags()  
(SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT)
 )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source extensions/source formula/source reportdesign/source scripting/source sc/source sd/source sfx2/source svtools/source svx/sour

2015-05-25 Thread Michael Meeks
 dbaccess/source/ui/control/RelationControl.cxx|4 ++--
 dbaccess/source/ui/control/TableGrantCtrl.cxx |4 ++--
 dbaccess/source/ui/control/dbtreelistbox.cxx  |2 +-
 dbaccess/source/ui/dlg/directsql.cxx  |2 +-
 dbaccess/source/ui/dlg/indexdialog.cxx|2 +-
 dbaccess/source/ui/querydesign/TableWindowListBox.cxx |4 ++--
 dbaccess/source/ui/tabledesign/TEditControl.cxx   |   10 +-
 desktop/source/deployment/gui/dp_gui_dialog2.cxx  |8 
 desktop/source/deployment/gui/dp_gui_dialog2.hxx  |2 +-
 extensions/source/bibliography/bibview.cxx|2 +-
 extensions/source/propctrlr/formlinkdialog.cxx|2 +-
 formula/source/ui/dlg/funcutl.cxx |4 ++--
 reportdesign/source/ui/dlg/GroupsSorting.cxx  |6 +++---
 reportdesign/source/ui/report/DesignView.cxx  |   10 +-
 reportdesign/source/ui/report/ViewsWindow.cxx |2 ++
 reportdesign/source/ui/report/propbrw.cxx |2 +-
 sc/source/ui/condformat/condformatdlg.cxx |2 +-
 sc/source/ui/navipi/content.cxx   |2 +-
 sc/source/ui/pagedlg/tphf.cxx |2 +-
 sc/source/ui/view/preview.cxx |2 +-
 scripting/source/vbaevents/eventhelper.cxx|3 ++-
 sd/source/ui/dlg/sdtreelb.cxx |2 +-
 sfx2/source/control/recentdocsviewitem.cxx|2 +-
 sfx2/source/dialog/templdlg.cxx   |2 +-
 svtools/source/brwbox/editbrowsebox.cxx   |6 +++---
 svtools/source/contnr/imivctl1.cxx|4 ++--
 svtools/source/contnr/svimpbox.cxx|3 ++-
 svtools/source/control/ruler.cxx  |6 +++---
 svtools/source/control/tabbar.cxx |6 +++---
 svtools/source/dialogs/addresstemplate.cxx|2 +-
 svx/source/fmcomp/fmgridcl.cxx|2 +-
 svx/source/fmcomp/gridctrl.cxx|6 +++---
 svx/source/form/delayedevent.cxx  |   14 --
 svx/source/form/filtnav.cxx   |2 +-
 svx/source/form/fmPropBrw.cxx |2 +-
 svx/source/form/navigatortree.cxx |2 +-
 svx/source/gallery2/galbrws1.cxx  |4 ++--
 svx/source/tbxctrls/colrctrl.cxx  |2 +-
 sw/source/ui/config/mailconfigpage.cxx|2 +-
 sw/source/ui/dbui/addresslistdialog.cxx   |2 +-
 sw/source/ui/dbui/mmoutputtypepage.cxx|4 ++--
 sw/source/uibase/dochdl/swdtflvr.cxx  |2 +-
 sw/source/uibase/docvw/SidebarWin.cxx |4 ++--
 sw/source/uibase/shells/textsh2.cxx   |2 +-
 sw/source/uibase/utlui/glbltree.cxx   |3 +--
 sw/source/uibase/utlui/navipi.cxx |2 +-
 vcl/source/window/dialog.cxx  |2 +-
 47 files changed, 78 insertions(+), 89 deletions(-)

New commits:
commit 0618863375a1fab6d1c9376f161c5305c32163c3
Author: Michael Meeks michael.me...@collabora.com
Date:   Mon May 25 21:36:25 2015 +0100

tdf#91577 - fix unique_ptr conversion bugs in reportdesign.

Change-Id: Icc94ce266d567e7aad5afb5eacf0e85699ef4107

diff --git a/reportdesign/source/ui/report/DesignView.cxx 
b/reportdesign/source/ui/report/DesignView.cxx
index eca7c38..9d9f0ad 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -139,26 +139,26 @@ void ODesignView::dispose()
 if ( m_pPropWin )
 {
 
notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(TaskPaneList::RemoveWindow));
+m_pPropWin.disposeAndClear();
 }
 if ( m_pAddField )
 {
 SvtViewOptions aDlgOpt( E_WINDOW, OUString( UID_RPT_RPT_APP_VIEW ) );
 
aDlgOpt.SetWindowState(OStringToOUString(m_pAddField-GetWindowState(WINDOWSTATE_MASK_ALL),
 RTL_TEXTENCODING_ASCII_US));
 
notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(TaskPaneList::RemoveWindow));
+m_pAddField.disposeAndClear();
 }
 if ( m_pReportExplorer )
 {
 SvtViewOptions aDlgOpt(E_WINDOW, 
OStringToOUString(m_pReportExplorer-GetHelpId(), RTL_TEXTENCODING_UTF8));
 
aDlgOpt.SetWindowState(OStringToOUString(m_pReportExplorer-GetWindowState(WINDOWSTATE_MASK_ALL),
 RTL_TEXTENCODING_ASCII_US));
 
notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(TaskPaneList::RemoveWindow));
+m_pReportExplorer.disposeAndClear();
 }
 
-m_aSplitWin.disposeAndClear();
+m_pTaskPane.disposeAndClear();
 m_aScrollWindow.disposeAndClear();
-m_pTaskPane.clear();
-m_pReportExplorer.clear();
-m_pPropWin.clear();
-m_pAddField.clear();
+

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

2015-05-08 Thread Miklos Vajna
 dbaccess/source/core/dataaccess/databasecontext.cxx |   10 +-
 dbaccess/source/filter/xml/xmlfilter.cxx|4 
 2 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit a20d53afb97a278a16ad604cb65f107d33ab4fb9
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Fri May 8 11:14:12 2015 +0200

dbaccess: handle URL mark as StreamRelPath in ODatabaseContext

With this, dbaccess can not only load .odb files, but also other ODF
packages as well, as long as the URL's mark (the part after the #)
contains under what namespace the real .odb is.

This will be used for embedding data source definitions into .odt
documents by Writer in a bit.

Change-Id: Ic1e922418c185fd6ec49d442a3419b80c9a6c76a

diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx 
b/dbaccess/source/core/dataaccess/databasecontext.cxx
index e4fb8e6..4e6c185 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -310,9 +310,15 @@ Reference XInterface   
ODatabaseContext::getRegisteredObject(const OUString _
 return loadObjectFromURL( _rName, sURL );
 }
 
-Reference XInterface  ODatabaseContext::loadObjectFromURL(const OUString 
_rName,const OUString _sURL)
+Reference XInterface  ODatabaseContext::loadObjectFromURL(const OUString 
_rName,const OUString rURL)
 {
+OUString _sURL(rURL);
 INetURLObject aURL( _sURL );
+
+OUString aMark = aURL.GetMark(INetURLObject::DECODE_WITH_CHARSET);
+if (!aMark.isEmpty())
+_sURL = aURL.GetURLNoMark();
+
 if ( aURL.GetProtocol() == INetProtocol::NotValid )
 throw NoSuchElementException( _rName, *this );
 
@@ -361,6 +367,8 @@ Reference XInterface  
ODatabaseContext::loadObjectFromURL(const OUString _rNa
 aArgs.put( URL, _sURL );
 aArgs.put( MacroExecutionMode, MacroExecMode::USE_CONFIG );
 aArgs.put( InteractionHandler, 
task::InteractionHandler::createWithParent(m_aContext, 0) );
+if (!aMark.isEmpty())
+aArgs.put(StreamRelPath, aMark);
 
 Sequence PropertyValue  aResource( aArgs.getPropertyValues() );
 xLoad-load( aResource );
commit dbab26d1fdcc0891a0f3e098f10a5c98e328a48b
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Fri May 8 11:13:27 2015 +0200

dbaccess: handle StreamRelPath in ODBFilter::implImport()

Change-Id: I8a4d21f8bef272a6cdb5a72da274e65516c36617

diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx 
b/dbaccess/source/filter/xml/xmlfilter.cxx
index 4d2e8cc..60fd9f3 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -457,6 +457,10 @@ bool ODBFilter::implImport( const Sequence PropertyValue 
 rDescriptor )
 try
 {
 xStorage.set(pMedium-GetStorage(false), UNO_QUERY_THROW);
+
+OUString sStreamRelPath = 
aMediaDescriptor.getOrDefault(StreamRelPath, OUString());
+if (!sStreamRelPath.isEmpty())
+xStorage = xStorage-openStorageElement(sStreamRelPath, 
embed::ElementModes::READ);
 }
 catch (const Exception)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-05-05 Thread Miklos Vajna
 dbaccess/source/core/dataaccess/databasedocument.cxx |   43 +++---
 dbaccess/source/core/inc/core_resource.hrc   |1 
 dbaccess/source/core/resource/strings.src|5 --
 dbaccess/source/filter/xml/xmlfilter.cxx |   45 +++
 4 files changed, 64 insertions(+), 30 deletions(-)

New commits:
commit 2b1bd0fac8007adeefb91f6d505186221143fb4f
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Tue May 5 09:57:03 2015 +0200

dbaccess: implement ODatabaseDocument::loadFromStorage()

With this, it's finally possible to load a .odb file embedded inside a
.odt.

Change-Id: Ib5eec603ce958abd848e456871aacfad4ab0a8b7

diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 1721287..7028a9d 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1914,14 +1914,45 @@ Reference XDataSource  SAL_CALL 
ODatabaseDocument::getDataSource() throw (Runt
 return m_pImpl-getOrCreateDataSource();
 }
 
-void SAL_CALL ODatabaseDocument::loadFromStorage( const Reference XStorage  
/*xStorage*/, const Sequence PropertyValue  /*aMediaDescriptor*/ ) throw 
(IllegalArgumentException, DoubleInitializationException, IOException, 
Exception, RuntimeException, std::exception)
+namespace
 {
-DocumentGuard aGuard(*this, DocumentGuard::DefaultMethod);
+/// Property map for embedded import info set.
+comphelper::PropertyMapEntry const aEmbeddedImportInfoMap[] =
+{
+{OUString(StreamRelPath), 0, cppu::UnoTypeOUString::get(), 
beans::PropertyAttribute::MAYBEVOID, 0},
+{OUString(StreamName), 0, cppu::UnoTypeOUString::get(), 
beans::PropertyAttribute::MAYBEVOID, 0},
+{OUString(SourceStorage), 0, cppu::UnoTypeembed::XStorage::get(), 
beans::PropertyAttribute::MAYBEVOID, 0},
+{OUString(), 0, css::uno::Type(), 0, 0}
+};
+}
 
-throw Exception(
-DBACORE_RESSTRING( RID_STR_NO_EMBEDDING ),
-*this
-);
+void SAL_CALL ODatabaseDocument::loadFromStorage(const ReferenceXStorage 
xStorage, const SequencePropertyValue rMediaDescriptor) throw 
(IllegalArgumentException, DoubleInitializationException, IOException, 
Exception, RuntimeException, std::exception)
+{
+DocumentGuard aGuard(*this, DocumentGuard::InitMethod);
+
+uno::Referencebeans::XPropertySet 
xInfoSet(comphelper::GenericPropertySet_CreateInstance(new 
comphelper::PropertySetInfo(aEmbeddedImportInfoMap)));
+comphelper::NamedValueCollection aDescriptor(rMediaDescriptor);
+xInfoSet-setPropertyValue(StreamRelPath, 
uno::makeAny(aDescriptor.getOrDefault(HierarchicalDocumentName, OUString(;
+xInfoSet-setPropertyValue(StreamName, 
uno::makeAny(OUString(content.xml)));
+xInfoSet-setPropertyValue(SourceStorage, uno::makeAny(xStorage));
+
+uno::Sequenceuno::Any aFilterCreationArgs(1);
+aFilterCreationArgs[0] = xInfoSet;
+
+uno::Referencedocument::XImporter 
xImporter(m_pImpl-m_aContext-getServiceManager()-createInstanceWithArgumentsAndContext(com.sun.star.comp.sdb.DBFilter,
 aFilterCreationArgs, m_pImpl-m_aContext), uno::UNO_QUERY_THROW);
+
+uno::Referencelang::XComponent xComponent(*this, uno::UNO_QUERY_THROW);
+xImporter-setTargetDocument(xComponent);
+
+uno::Referencedocument::XFilter xFilter(xImporter, uno::UNO_QUERY_THROW);
+uno::Sequencebeans::PropertyValue aFilterArgs;
+xFilter-filter(aFilterArgs);
+
+// In case of embedding, XModel::attachResource is already called.
+if (m_bEmbedded)
+impl_setInitialized();
+
+impl_setModified_nothrow(false, aGuard);
 }
 
 void SAL_CALL ODatabaseDocument::storeToStorage( const Reference XStorage  
_rxStorage, const Sequence PropertyValue  _rMediaDescriptor ) throw 
(IllegalArgumentException, IOException, Exception, RuntimeException, 
std::exception)
diff --git a/dbaccess/source/core/inc/core_resource.hrc 
b/dbaccess/source/core/inc/core_resource.hrc
index 151d000..4ab8b27 100644
--- a/dbaccess/source/core/inc/core_resource.hrc
+++ b/dbaccess/source/core/inc/core_resource.hrc
@@ -91,7 +91,6 @@
 #define RID_STR_CURSOR_BEFORE_OR_AFTER  ( RID_CORE_STRINGS_START + 61 )
 #define RID_STR_NO_BOOKMARK_BEFORE_OR_AFTER ( RID_CORE_STRINGS_START + 62 )
 #define RID_STR_NO_BOOKMARK_DELETED ( RID_CORE_STRINGS_START + 63 )
-#define RID_STR_NO_EMBEDDING( RID_CORE_STRINGS_START + 64 )
 #define RID_STR_CONNECTION_REQUEST  ( RID_CORE_STRINGS_START + 65 )
 #define RID_STR_MISSING_EXTENSION   ( RID_CORE_STRINGS_START + 66 )
 
diff --git a/dbaccess/source/core/resource/strings.src 
b/dbaccess/source/core/resource/strings.src
index 1784a3d..fdad3c6 100644
--- a/dbaccess/source/core/resource/strings.src
+++ b/dbaccess/source/core/resource/strings.src
@@ -345,11 +345,6 @@ String RID_STR_NO_BOOKMARK_DELETED
 Text [ en-US ] = The current row is deleted, and thus doesn't have a 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source officecfg/registry postprocess/CustomTarget_registry.mk

2015-04-29 Thread Miklos Vajna
 dbaccess/source/core/dataaccess/databasedocument.cxx|   10 ++
 dbaccess/source/core/dataaccess/databasedocument.hxx|2 ++
 officecfg/registry/data/org/openoffice/Office/Embedding.xcu |   12 
 postprocess/CustomTarget_registry.mk|1 +
 4 files changed, 25 insertions(+)

New commits:
commit df44a6f767a1c4ad18e6b5b6638d6699d852ddb7
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Wed Apr 29 14:44:57 2015 +0200

officecfg, postprocess: allow embedding of Base documents

Don't advertise them on the UI, though.

With this, Insert - Object - OLE Object - Create from file can insert
a Base document into a Writer document model.

Change-Id: I18fdf98af8fb4f8b6ef0c3a910aaefba9e516dfd

diff --git a/officecfg/registry/data/org/openoffice/Office/Embedding.xcu 
b/officecfg/registry/data/org/openoffice/Office/Embedding.xcu
index e39af5d..2352f41 100644
--- a/officecfg/registry/data/org/openoffice/Office/Embedding.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Embedding.xcu
@@ -255,6 +255,18 @@
 valuePRIMARY SHOW OPEN HIDE UIACTIVATE IPACTIVATE SAVECOPYAS/value
   /prop
 /node
+node oor:name=F203786B-A78D-4E89-9D3D-94A108989E7F oor:op=replace 
install:module=base
+  prop oor:name=ObjectFactory
+valuecom.sun.star.embed.OOoEmbeddedObjectFactory/value
+  /prop
+  prop oor:name=ObjectDocumentServiceName
+valuecom.sun.star.sdb.OfficeDatabaseDocument/value
+  /prop
+  prop oor:name=ObjectMiscStatus/
+  prop oor:name=ObjectVerbs
+valuePRIMARY SHOW OPEN HIDE UIACTIVATE IPACTIVATE SAVECOPYAS/value
+  /prop
+/node
 node oor:name=D7896D52-B7AF-4820-9DFE-D404D015960F oor:op=replace 
install:module=reportbuilder
   prop oor:name=ObjectFactory
 valuecom.sun.star.embed.OOoEmbeddedObjectFactory/value
diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index e12640f..6168c59 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -41,6 +41,7 @@ postprocess_FILES_base := \
$(call gb_XcuFilterOthersTarget_get_target,fcfg_database_others.xcu) \
$(call gb_XcuFilterTypesTarget_get_target,fcfg_database_types.xcu) \
$(postprocess_MOD)/org/openoffice/Office/Common-base.xcu \
+   $(postprocess_MOD)/org/openoffice/Office/Embedding-base.xcu \
$(postprocess_MOD)/org/openoffice/Setup-base.xcu
 
 postprocess_DEPS_calc := main
commit fa2304aef2ea65cbbb15e3694a61c05999032d20
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Wed Apr 29 14:44:16 2015 +0200

dbaccess: attachResource() and load() calls are swapped in case of embedding

Change-Id: I34600202f0f5c988222f7d4f305ba90df09cd614

diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 5062648..5eab51c 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -173,6 +173,7 @@ ODatabaseDocument::ODatabaseDocument(const 
::rtl::ReferenceODatabaseModelImpl
 ,m_bClosing( false )
 ,m_bAllowDocumentScripting( false )
 ,m_bHasBeenRecovered( false )
+,m_bEmbedded(false)
 {
 OSL_TRACE( DD: ctor: %p: %p, this, m_pImpl.get() );
 
@@ -593,6 +594,9 @@ void SAL_CALL ODatabaseDocument::load( const Sequence 
PropertyValue  _Argumen
 
 // note that we do *not* call impl_setInitialized() here: The 
initialization is only complete
 // when the XModel::attachResource has been called, not sooner.
+// however, in case of embedding, XModel::attachResource is already called.
+if (m_bEmbedded)
+impl_setInitialized();
 
 impl_setModified_nothrow( false, aGuard );
 // - SYNCHRONIZED
@@ -756,6 +760,12 @@ void SAL_CALL ODatabaseDocument::recoverFromFile( const 
OUString i_SourceLocati
 // XModel
 sal_Bool SAL_CALL ODatabaseDocument::attachResource( const OUString _rURL, 
const Sequence PropertyValue  _rArguments ) throw (RuntimeException, 
std::exception)
 {
+if (_rURL.isEmpty()  _rArguments.getLength() == 1  _rArguments[0].Name 
== SetEmbedded)
+{
+m_bEmbedded = true;
+return true;
+}
+
 DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
 bool bRet = false;
 try
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx 
b/dbaccess/source/core/dataaccess/databasedocument.hxx
index 5b2b3e8..693ad29 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -200,6 +200,8 @@ class ODatabaseDocument :public ModelDependentComponent 
// ModelDepe
 bool   
 m_bClosing;
 bool   
  

[Libreoffice-commits] core.git: 2 commits - dbaccess/source sw/source unusedcode.easy

2015-04-07 Thread Caolán McNamara
 dbaccess/source/ui/inc/QueryViewSwitch.hxx |5 
 dbaccess/source/ui/inc/querycontainerwindow.hxx|2 -
 dbaccess/source/ui/querydesign/QueryViewSwitch.cxx |   18 --
 sw/source/filter/ww8/ww8graf.cxx   |3 ++
 sw/source/filter/ww8/ww8par.hxx|2 +
 sw/source/filter/ww8/ww8par6.cxx   |   26 +
 unusedcode.easy|1 
 7 files changed, 31 insertions(+), 26 deletions(-)

New commits:
commit b5ce50d1d07394f6b59b028373120369c83d5d66
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Apr 7 09:56:43 2015 +0100

negative after-text indents ignored by msword for apos

Change-Id: I33e178f23bc4b1372c4c329954b301ae68902154

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 456ce25..3a11d1e 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2905,7 +2905,10 @@ SwFlyFrmFmt* 
SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* rpObject,
 MoveOutsideFly(pRetFrmFmt, aSave.GetStartPos(),!bJoined);
 
 aSave.Restore( this );
+
+StripNegativeAfterIndent(pRetFrmFmt);
 }
+
 }
 return pRetFrmFmt;
 }
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index a7fdff5..0a34059 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1488,6 +1488,7 @@ private:
 bool IsDropCap();
 bool IsListOrDropcap() { return (!pAktItemSet  || bDropCap); };
 
+//Apo == Absolutely Positioned Object, MSWord's old-style frames
 WW8FlyPara *ConstructApo(const ApoTestResults rApo,
 const WW8_TablePos *pTabPos);
 bool StartApo(const ApoTestResults rApo, const WW8_TablePos *pTabPos, 
SvxULSpaceItem* pULSpaceItem = 0);
@@ -1495,6 +1496,7 @@ private:
 bool TestSameApo(const ApoTestResults rApo, const WW8_TablePos *pTabPos);
 ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd,
 const WW8_TablePos *pTabPos);
+void StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) const;
 
 void EndSpecial();
 bool ProcessSpecial(bool rbReSync, WW8_CP nStartCp);
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 418e130..b63e639 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2430,6 +2430,32 @@ bool SwWW8ImplReader::JoinNode(SwPaM rPam, bool 
bStealAttr)
 return bRet;
 }
 
+//In auto-width word frames negative after-indent values are ignored
+void SwWW8ImplReader::StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) const
+{
+const SwNodeIndex* pSttNd = pFlyFmt-GetCntnt().GetCntntIdx();
+if (!pSttNd)
+return;
+
+SwNodeIndex aIdx(*pSttNd, 1);
+SwNodeIndex aEnd(*pSttNd-GetNode().EndOfSectionNode());
+while (aIdx  aEnd)
+{
+SwTxtNode *pNd = aIdx.GetNode().GetTxtNode();
+if (pNd)
+{
+const SvxLRSpaceItem rLR = ItemGetSvxLRSpaceItem(*pNd, 
RES_LR_SPACE);
+if (rLR.GetRight()  0)
+{
+SvxLRSpaceItem aLR(rLR);
+aLR.SetRight(0);
+pNd-SetAttr(aLR);
+}
+}
+++aIdx;
+}
+}
+
 void SwWW8ImplReader::StopApo()
 {
 OSL_ENSURE(pWFlyPara, no pWFlyPara to close);
commit e3a899907bbf76469f074e35bbe82998a05bb2e8
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Apr 7 09:46:14 2015 +0100

OQueryViewSwitch::resizeDocumentView etc unused

Change-Id: Idadf26a1c4ec070c1a37ddac923b64620962ed9e

diff --git a/dbaccess/source/ui/inc/QueryViewSwitch.hxx 
b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
index a945da5..e6f936a 100644
--- a/dbaccess/source/ui/inc/QueryViewSwitch.hxx
+++ b/dbaccess/source/ui/inc/QueryViewSwitch.hxx
@@ -49,8 +49,6 @@ namespace dbaui
 void paste();
 // clears the whole query
 void clear();
-// set the view readonly or not
-void setReadOnly(bool _bReadOnly);
 // check if the statement is correct when not returning false
 bool checkStatement();
 // set the statement for representation
@@ -83,9 +81,6 @@ namespace dbaui
 
 void SetPosSizePixel( Point _rPt,Size _rSize);
 ::com::sun::star::uno::Reference 
::com::sun::star::uno::XComponentContext  getORB() const;
-protected:
-// return the Rectangle where I can paint myself
-void resizeDocumentView(Rectangle rRect);
 
 private:
 voidimpl_forceSQLView();
diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx 
b/dbaccess/source/ui/inc/querycontainerwindow.hxx
index 64f828e..646c5e1 100644
--- a/dbaccess/source/ui/inc/querycontainerwindow.hxx
+++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx
@@ -77,8 +77,6 @@ namespace dbaui
 void setSlotEnabled( sal_Int32 _nSlotId, bool _bEnable ){ 
m_pViewSwitch-setSlotEnabled( _nSlotId, _bEnable ); }
 void 

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

2015-03-24 Thread Noel Grandin
 dbaccess/source/core/dataaccess/bookmarkcontainer.cxx   |   15 
 dbaccess/source/core/dataaccess/bookmarkcontainer.hxx   |8 
 dbaccess/source/core/misc/DatabaseDataProvider.cxx  |1 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx  |   27 
 dbaccess/source/ui/app/AppDetailPageHelper.hxx  |7 
 dbaccess/source/ui/app/AppDetailView.cxx|   15 +++-
 dbaccess/source/ui/inc/ConnectionLineAccess.hxx |2 -
 dbaccess/source/ui/inc/JoinTableView.hxx|1 
 dbaccess/source/ui/inc/QueryTextView.hxx|4 --
 dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx |8 
 dbaccess/source/ui/querydesign/JoinTableView.cxx|4 --
 dbaccess/source/ui/querydesign/QueryTextView.cxx|   16 -
 dbaccess/source/ui/querydesign/QueryViewSwitch.cxx  |6 +--
 dbaccess/source/ui/uno/dbinteraction.hxx|3 -
 lotuswordpro/source/filter/lwpobjid.hxx |4 +-
 15 files changed, 11 insertions(+), 110 deletions(-)

New commits:
commit 61831eb81661db2572eaa6cabf7d8eba2c4d842c
Author: Noel Grandin n...@peralex.com
Date:   Tue Mar 24 08:38:42 2015 +0200

loplugin:constantfunction: dbaccess

Change-Id: I896f2716cb91169e30f555943174b5aa67e74b20

diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx 
b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index 17f28f8..881fe8b 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -101,7 +101,6 @@ Sequence OUString  SAL_CALL 
OBookmarkContainer::getSupportedServiceNames(  ) t
 void SAL_CALL OBookmarkContainer::insertByName( const OUString _rName, const 
Any aElement ) throw(IllegalArgumentException, ElementExistException, 
WrappedTargetException, RuntimeException, std::exception)
 {
 MutexGuard aGuard(m_rMutex);
-checkValid(true);
 
 if (checkExistence(_rName))
 throw ElementExistException();
@@ -131,7 +130,6 @@ void SAL_CALL OBookmarkContainer::removeByName( const 
OUString _rName ) throw(N
 OUString sOldBookmark;
 {
 MutexGuard aGuard(m_rMutex);
-checkValid(true);
 
 // check the arguments
 if (_rName.isEmpty())
@@ -161,7 +159,6 @@ void SAL_CALL OBookmarkContainer::removeByName( const 
OUString _rName ) throw(N
 void SAL_CALL OBookmarkContainer::replaceByName( const OUString _rName, const 
Any aElement ) throw(IllegalArgumentException, NoSuchElementException, 
WrappedTargetException, RuntimeException, std::exception)
 {
 ClearableMutexGuard aGuard(m_rMutex);
-checkValid(true);
 
 // check the arguments
 if (_rName.isEmpty())
@@ -211,14 +208,12 @@ void SAL_CALL 
OBookmarkContainer::removeContainerListener( const Reference XCon
 Type SAL_CALL OBookmarkContainer::getElementType( ) throw (RuntimeException, 
std::exception)
 {
 MutexGuard aGuard(m_rMutex);
-checkValid(false);
 return ::cppu::UnoTypeOUString::get();
 }
 
 sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException, 
std::exception)
 {
 MutexGuard aGuard(m_rMutex);
-checkValid(false);
 return !m_aBookmarks.empty();
 }
 
@@ -226,7 +221,6 @@ sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw 
(RuntimeException, st
 Reference XEnumeration  SAL_CALL OBookmarkContainer::createEnumeration(  ) 
throw(RuntimeException, std::exception)
 {
 MutexGuard aGuard(m_rMutex);
-checkValid(false);
 return new 
::comphelper::OEnumerationByIndex(static_castXIndexAccess*(this));
 }
 
@@ -234,14 +228,12 @@ Reference XEnumeration  SAL_CALL 
OBookmarkContainer::createEnumeration(  ) thr
 sal_Int32 SAL_CALL OBookmarkContainer::getCount(  ) throw(RuntimeException, 
std::exception)
 {
 MutexGuard aGuard(m_rMutex);
-checkValid(false);
 return m_aBookmarks.size();
 }
 
 Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 _nIndex ) 
throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException, 
std::exception)
 {
 MutexGuard aGuard(m_rMutex);
-checkValid(false);
 
 if ((_nIndex  0) || (_nIndex = (sal_Int32)m_aBookmarksIndexed.size()))
 throw IndexOutOfBoundsException();
@@ -252,7 +244,6 @@ Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 
_nIndex ) throw(IndexOutO
 Any SAL_CALL OBookmarkContainer::getByName( const OUString _rName ) 
throw(NoSuchElementException, WrappedTargetException, RuntimeException, 
std::exception)
 {
 MutexGuard aGuard(m_rMutex);
-checkValid(false);
 
 if (!checkExistence(_rName))
 throw NoSuchElementException();
@@ -263,7 +254,6 @@ Any SAL_CALL OBookmarkContainer::getByName( const OUString 
_rName ) throw(NoSuc
 Sequence OUString  SAL_CALL OBookmarkContainer::getElementNames(  ) 
throw(RuntimeException, std::exception)
 {
 MutexGuard aGuard(m_rMutex);
-checkValid(false);
 
 Sequence OUString  aNames(m_aBookmarks.size());
 

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

2015-03-13 Thread Julien Nabet
 dbaccess/source/ui/tabledesign/TableController.cxx |4 ++--
 xmloff/source/chart/PropertyMaps.cxx   |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 119d19678ac58cd45d4a606a69d2f392e386d4e3
Author: Julien Nabet serval2...@yahoo.fr
Date:   Fri Mar 13 21:34:02 2015 +0100

Typo: form the table-from the table

Change-Id: I41f5ac20eff8d2ebd75ea13fff12154306cbacf4

diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx 
b/dbaccess/source/ui/tabledesign/TableController.cxx
index 493527c..b21d9c8 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -527,7 +527,7 @@ void OTableController::impl_initialize()
 }
 try
 {
-loadData(); // fill the column information form the 
table
+loadData(); // fill the column information from the 
table
 getView()-initialize();// show the windows and fill with our 
information
 ClearUndoManager();
 setModified(sal_False); // and we are not modified yet
@@ -1510,7 +1510,7 @@ OUString OTableController::getPrivateTitle() const
 
 void OTableController::reload()
 {
-loadData(); // fill the column information form the table
+loadData(); // fill the column information from the table
 static_castOTableDesignView*(getView())-reSync();// show the 
windows and fill with our information
 ClearUndoManager();
 setModified(sal_False); // and we are not modified yet
commit 84ec8274fa19147d85271c870920d1b189a7bb97
Author: Julien Nabet serval2...@yahoo.fr
Date:   Fri Mar 13 19:47:38 2015 +0100

Typo: elemet-element

Change-Id: I204c49239faf3574b72530ba1118defb1ae31ff3

diff --git a/xmloff/source/chart/PropertyMaps.cxx 
b/xmloff/source/chart/PropertyMaps.cxx
index 2abcc13..9b330d4 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -251,7 +251,7 @@ void XMLChartExportPropertyMapper::ContextFilter(
 break;
 
 // the following property is deprecated
-// elemet-item symbol-image is used now
+// element-item symbol-image is used now
 case XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE_NAME:
 property-mnIndex = -1;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source sw/source unusedcode.easy

2015-02-04 Thread Caolán McNamara
 dbaccess/source/ui/inc/TableController.hxx |4 
 dbaccess/source/ui/tabledesign/TEditControl.cxx|   20 
 dbaccess/source/ui/tabledesign/TEditControl.hxx|3 ---
 dbaccess/source/ui/tabledesign/TableController.cxx |   11 ---
 sw/source/ui/fldui/javaedit.cxx|7 ++-
 unusedcode.easy|5 -
 6 files changed, 6 insertions(+), 44 deletions(-)

New commits:
commit 38a65f76bc944ea730ebac7640dc135248ec3da0
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 4 17:11:14 2015 +

Resolves: fdo#68137 crash in traversing script fields

use the same guards as the SwFldEditDlg does

Change-Id: I7d135cf969d9925cec57a90ef0fba8fe40f664eb

diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index e67d532..0e27086 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -73,7 +73,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, 
SwWrtShell* pWrtSh) :
 aFont.SetWeight( WEIGHT_LIGHT );
 m_pEditED-SetFont( aFont );
 
-pMgr = new SwFldMgr;
+pMgr = new SwFldMgr(pSh);
 pFld = static_castSwScriptField*(pMgr-GetCurFld());
 
 bNew = !(pFld  pFld-GetTyp()-Which() == RES_SCRIPTFLD);
@@ -88,6 +88,7 @@ SwJavaEditDialog::SwJavaEditDialog(vcl::Window* pParent, 
SwWrtShell* pWrtSh) :
 
 SwJavaEditDialog::~SwJavaEditDialog()
 {
+pSh-EnterStdMode();
 delete pMgr;
 delete pFileDlg;
 Application::SetDefDialogParent( pOldDefDlgParent );
@@ -95,6 +96,8 @@ SwJavaEditDialog::~SwJavaEditDialog()
 
 IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, PrevHdl)
 {
+pSh-EnterStdMode();
+
 SetFld();
 pMgr-GoPrev();
 pFld = static_castSwScriptField*(pMgr-GetCurFld());
@@ -107,6 +110,8 @@ IMPL_LINK_NOARG_INLINE_END(SwJavaEditDialog, PrevHdl)
 
 IMPL_LINK_NOARG_INLINE_START(SwJavaEditDialog, NextHdl)
 {
+pSh-EnterStdMode();
+
 SetFld();
 pMgr-GoNext();
 pFld = static_castSwScriptField*(pMgr-GetCurFld());
commit 7e1eb03a39b776adf0f479e2801214b1e2d0f6cc
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 4 17:15:02 2015 +

callcatcher: remove some more recently discovered unused methods

Change-Id: Ib01e444b24ad9288970066a47f3fcf3dbee1fc49

diff --git a/dbaccess/source/ui/inc/TableController.hxx 
b/dbaccess/source/ui/inc/TableController.hxx
index d44aa34..578eb99 100644
--- a/dbaccess/source/ui/inc/TableController.hxx
+++ b/dbaccess/source/ui/inc/TableController.hxx
@@ -133,10 +133,6 @@ namespace dbaui
 static ::com::sun::star::uno::Reference 
::com::sun::star::uno::XInterface 
 SAL_CALL Create(const ::com::sun::star::uno::Reference 
::com::sun::star::lang::XMultiServiceFactory );
 
-
-void Load(const ::com::sun::star::uno::Reference 
::com::sun::star::io::XObjectInputStream _rxIn);
-void Save(const ::com::sun::star::uno::Reference 
::com::sun::star::io::XObjectOutputStream _rxOut);
-
 protected:
 void startTableListening();
 void stopTableListening();
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx 
b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index ce169f3..ad3e528 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -129,15 +129,6 @@ void OTableEditorCtrl::Init()
 RowInserted(0, m_pRowList-size(), true);
 }
 
-void OTableEditorCtrl::UpdateAll()
-{
-RowRemoved(0, GetRowCount(), false);
-m_nDataPos = 0;
-
-InvalidateFeatures();
-Invalidate();
-}
-
 OTableEditorCtrl::OTableEditorCtrl(vcl::Window* pWindow)
 :OTableRowView(pWindow)
 ,pNameCell(NULL)
@@ -716,17 +707,6 @@ void OTableEditorCtrl::InvalidateFeatures()
 GetView()-getController().InvalidateFeature(SID_SAVEDOC);
 }
 
-void OTableEditorCtrl::Undo()
-{
-
-InvalidateFeatures();
-}
-
-void OTableEditorCtrl::Redo()
-{
-InvalidateFeatures();
-}
-
 void OTableEditorCtrl::CopyRows()
 {
 // set to the right row and save it
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx 
b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index cd9f73b..bfae245 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -100,8 +100,6 @@ namespace dbaui
 virtual void CellModified() SAL_OVERRIDE;
 virtual bool SaveModified() SAL_OVERRIDE; // is called before changing 
a cell (false prevents change)
 
-void Undo();
-void Redo();
 virtual OUString GetCellText(long nRow, sal_uInt16 nColId) const 
SAL_OVERRIDE;
 virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId) 
SAL_OVERRIDE;
 
@@ -125,7 +123,6 @@ namespace dbaui
 OTableEditorCtrl(vcl::Window* pParentWin);
 virtual ~OTableEditorCtrl();
 virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol) 
SAL_OVERRIDE;
-void UpdateAll();
   

[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/connectivity

2015-01-28 Thread Lionel Elie Mamane
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |6 --
 include/connectivity/sqlnode.hxx   |5 ++---
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit bec15074ae8eca9ff7deb795aae0e7a2f9789aaf
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 28 21:10:53 2015 +0100

That is well worth an assert

The exception thrown by at() is not treated meaningfully anyway.

Change-Id: I8c243541271d7da76b2a9b102e058b5f2d1ad6d3

diff --git a/include/connectivity/sqlnode.hxx b/include/connectivity/sqlnode.hxx
index bf7f476..b6c6234 100644
--- a/include/connectivity/sqlnode.hxx
+++ b/include/connectivity/sqlnode.hxx
@@ -446,10 +446,9 @@ namespace connectivity
 
 inline OSQLParseNode* OSQLParseNode::getChild(sal_uInt32 nPos) const
 {
-OSL_ENSURE(nPos  m_aChildren.size(), Invalid Position);
+assert(nPos  m_aChildren.size());
 
-//  return m_aChildren[nPos];
-return m_aChildren.at(nPos);
+return m_aChildren[nPos];
 }
 
 // utilities to query for a specific rule, token or punctuation
commit b63547c8ea8ac2e198193cba1026e7729c70f43a
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 28 21:09:42 2015 +0100

not all OrCriteria have three children

and some contain a column in the second child

Change-Id: Ifd69758336233ed0233120b3315d4f33655fa994

diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx 
b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 8acc411..032ca0d 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1305,10 +1305,12 @@ namespace
 {
 bool bRet = true;
 ::connectivity::OSQLParseNode* pFirstColumnRef = _pFirstColumnRef;
-for (int i = 0; i  3  bRet; i+=2)
+for (size_t i = 0; bRet  i  _pCondition-count()  bRet; ++i)
 {
 const  ::connectivity::OSQLParseNode* pChild = 
_pCondition-getChild(i);
-if ( SQL_ISRULE(pChild,search_condition) )
+if ( pChild-isToken() )
+continue;
+else if ( SQL_ISRULE(pChild,search_condition) )
 bRet = CheckOrCriteria(pChild,pFirstColumnRef);
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-25 Thread Caolán McNamara
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |2 +-
 editeng/source/editeng/impedit4.cxx|1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit db15e9290e8e966edc83393c2abc793bcd954193
Author: Caolán McNamara caol...@redhat.com
Date:   Sun Jan 25 14:03:56 2015 +

coverity#1266514 Useless call

Change-Id: I2a95e2faa7682934cd69264c82ed2618225be2a7

diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx 
b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index f8f8c2b..f4b765b 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1660,7 +1660,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( 
const Reference XPropert
 const sal_Int8* pEnd= pBegin + aSeq.getLength();
 for(;pBegin != pEnd;++pBegin)
 {
-aSQL.append( (sal_Int32)*pBegin, 16 ).getStr();
+aSQL.append( (sal_Int32)*pBegin, 16 );
 }
 if(nSearchable == ColumnSearch::CHAR)
 aSQL.append( \' );
commit f2a817edb0f31f65111544b57ee1bccc1a8d60a3
Author: Caolán McNamara caol...@redhat.com
Date:   Sun Jan 25 14:01:55 2015 +

coverity#1266515 Useless call

Change-Id: I554ca2a961a9ba6009bef23067febe8611ba1f80

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index d721ca3..667a969 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1918,7 +1918,6 @@ void ImpEditEngine::StartSpelling(EditView rEditView, 
bool bMultipleDoc)
 
 Reference XSpellAlternatives  ImpEditEngine::ImpFindNextError(EditSelection 
rSelection)
 {
-aEditDoc.GetObject( (aEditDoc.Count()-1) );
 EditSelection aCurSel( rSelection.Min() );
 
 OUString aWord;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source filter/source include/comphelper package/source reportdesign/source sc/source sd/source sfx2/source sw/qa test/source xmlhelp/source

2014-12-18 Thread Stephan Bergmann
 dbaccess/source/filter/xml/xmlfilter.cxx   |2 -
 filter/source/xsltdialog/xmlfilterjar.cxx  |4 +--
 include/comphelper/documentconstants.hxx   |   14 ++--
 include/comphelper/storagehelper.hxx   |   12 +-
 package/source/xstor/xfactory.cxx  |6 ++---
 package/source/zippackage/ZipPackage.cxx   |   10 -
 package/source/zippackage/ZipPackageStream.cxx |2 -
 reportdesign/source/core/api/ReportDefinition.cxx  |   12 +-
 reportdesign/source/ui/report/ReportController.cxx |8 +++
 sc/source/filter/xml/xmlwrap.cxx   |4 +--
 sd/source/ui/dlg/TemplateScanner.cxx   |2 -
 sfx2/source/doc/objserv.cxx|2 -
 sfx2/source/doc/objstor.cxx|4 +--
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx  |7 --
 test/source/xmltesttools.cxx   |   23 ++---
 xmlhelp/source/cxxhelp/provider/databases.cxx  |4 +--
 16 files changed, 60 insertions(+), 56 deletions(-)

New commits:
commit 84a7fa47a548e95892797e9f61d96ae051123121
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Dec 18 12:30:30 2014 +0100

XmlTestTools: fix conversion from UTF-8 xmlChar strings to OUString

...which resolves the mystery of 0ba6360363fb73b5b200bbc486ed8eeac5f3d337
Garbage in, garbage out?

Change-Id: I51f102699d0474872c80392b27f71030b5e3fb59

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index c953ad1..e3043e6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -589,12 +589,7 @@ DECLARE_OOXMLEXPORT_TEST(testDateControl, 
date-control.docx)
 assertXPath(pXmlDoc, /w:document/w:body/w:p/w:sdt/w:sdtPr/w:date, 
fullDate, 2014-03-05T00:00:00Z);
 assertXPath(pXmlDoc, 
/w:document/w:body/w:p/w:sdt/w:sdtPr/w:date/w:dateFormat, val, , dd' 
de '' de ');
 assertXPath(pXmlDoc, /w:document/w:body/w:p/w:sdt/w:sdtPr/w:date/w:lid, 
val, es-ES);
-static sal_Unicode const Broken[] = {
-'m', 'i', static_castsal_Unicode('\xC3'),
-static_castsal_Unicode('\xA9'), 'r', 'c', 'o', 'l', 'e', 's', ',',
-' ', '0', '5', ' ', 'd', 'e', ' ', 'm', 'a', 'r', 'z', 'o', ' ', 'd',
-'e', ' ', '2', '0', '1', '4' };
-assertXPathContent(pXmlDoc, 
/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t, OUString(Broken, 
SAL_N_ELEMENTS(Broken)));
+assertXPathContent(pXmlDoc, 
/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r/w:t, 
OUString::fromUtf8(mi\xC3\xA9rcoles, 05 de marzo de 2014));
 
 // check imported control
 uno::Referencedrawing::XControlShape xControl(getShape(1), 
uno::UNO_QUERY);
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index 32908a0..4694570 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -11,6 +11,23 @@
 
 #include boost/scoped_array.hpp
 
+namespace {
+
+OUString convert(xmlChar const * string) {
+OUString s;
+CPPUNIT_ASSERT_MESSAGE(
+xmlChar string is not UTF-8,
+rtl_convertStringToUString(
+s.pData, reinterpret_castchar const *(string), 
xmlStrlen(string),
+RTL_TEXTENCODING_UTF8,
+(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
+ | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
+ | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)));
+return s;
+}
+
+}
+
 XmlTestTools::XmlTestTools()
 {}
 
@@ -55,7 +72,7 @@ OUString XmlTestTools::getXPath(xmlDocPtr pXmlDoc, const 
OString rXPath, const
 return OUString();
 xmlNodePtr pXmlNode = pXmlNodes-nodeTab[0];
 xmlChar * prop = xmlGetProp(pXmlNode, BAD_CAST(rAttribute.getStr()));
-OUString s(OUString::createFromAscii((const char*)prop));
+OUString s(convert(prop));
 xmlFree(prop);
 xmlXPathFreeObject(pXmlObj);
 return s;
@@ -70,7 +87,7 @@ OUString XmlTestTools::getXPathContent(xmlDocPtr pXmlDoc, 
const OString rXPath)
 xmlXPathNodeSetGetLength(pXmlNodes)  0);
 
 xmlNodePtr pXmlNode = pXmlNodes-nodeTab[0];
-OUString s(OUString::createFromAscii((const 
char*)((pXmlNode-children[0]).content)));
+OUString s(convert((pXmlNode-children[0]).content));
 xmlXPathFreeObject(pXmlObj);
 return s;
 }
@@ -137,7 +154,7 @@ int XmlTestTools::getXPathPosition(xmlDocPtr pXmlDoc, const 
OString rXPath, con
 int nRet = 0;
 for (xmlNodePtr pChild = pXmlNode-children; pChild; pChild = pChild-next)
 {
-if (OUString::createFromAscii((const char*)pChild-name) == rChildName)
+if (convert(pChild-name) == rChildName)
 break;
 ++nRet;
 }
commit 180f0791daa3d3f959f4f70b9f83012bcbf47a64
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Dec 18 12:06:16 2014 +0100

comphelper: Use appropriate OUString functions on string constants

Change-Id: 

  1   2   >