basegfx/inc/pch/precompiled_basegfx.hxx | 2 basegfx/source/range/b2drangeclipper.cxx | 2 bin/includebloat.awk | 34 canvas/source/cairo/cairo_canvasfont.hxx | 2 canvas/source/cairo/cairo_canvashelper.hxx | 2 canvas/source/cairo/cairo_devicehelper.hxx | 2 canvas/source/cairo/cairo_spritedevicehelper.hxx | 2 canvas/source/cairo/cairo_textlayout.hxx | 2 canvas/source/directx/dx_bitmapcanvashelper.hxx | 2 canvas/source/directx/dx_canvasfont.hxx | 2 canvas/source/directx/dx_canvashelper.hxx | 2 canvas/source/directx/dx_devicehelper.hxx | 2 canvas/source/directx/dx_graphicsprovider.hxx | 2 canvas/source/directx/dx_spritedevicehelper.hxx | 2 canvas/source/directx/dx_textlayout.hxx | 2 canvas/source/opengl/ogl_bitmapcanvashelper.hxx | 2 canvas/source/opengl/ogl_canvasfont.hxx | 2 canvas/source/opengl/ogl_spritedevicehelper.hxx | 2 canvas/source/opengl/ogl_textlayout.hxx | 2 canvas/source/vcl/canvasfont.hxx | 2 canvas/source/vcl/canvashelper.hxx | 2 canvas/source/vcl/devicehelper.hxx | 2 canvas/source/vcl/spritedevicehelper.hxx | 2 canvas/source/vcl/textlayout.hxx | 2 canvas/source/vcl/windowoutdevholder.hxx | 2 cppcanvas/inc/pch/precompiled_cppcanvas.hxx | 2 cppcanvas/source/mtfrenderer/bitmapaction.cxx | 2 cppcanvas/source/mtfrenderer/cachedprimitivebase.hxx | 2 cppcanvas/source/mtfrenderer/lineaction.cxx | 2 cppcanvas/source/mtfrenderer/pointaction.cxx | 2 cppcanvas/source/mtfrenderer/polypolyaction.cxx | 2 cppcanvas/source/mtfrenderer/textaction.cxx | 2 cppcanvas/source/mtfrenderer/transparencygroupaction.cxx | 2 cui/source/options/optpath.cxx | 2 cui/source/options/tsaurls.cxx | 2 desktop/inc/pch/precompiled_deploymentgui.hxx | 2 desktop/source/deployment/gui/dp_gui_service.cxx | 2 extensions/source/logging/logger.cxx | 5 extensions/source/update/check/updatehdl.hxx | 2 filter/source/svg/svgfilter.cxx | 2 filter/source/svg/svgimport.cxx | 2 framework/inc/pch/precompiled_fwk.hxx | 2 framework/source/layoutmanager/layoutmanager.cxx | 2 include/canvas/base/canvascustomspritebase.hxx | 2 include/canvas/parametricpolypolygon.hxx | 2 include/canvas/rendering/irendermodule.hxx | 2 include/canvas/spriteredrawmanager.hxx | 2 include/comphelper/servicedecl.hxx | 2 include/drawinglayer/primitive2d/baseprimitive2d.hxx | 2 include/drawinglayer/primitive3d/baseprimitive3d.hxx | 2 include/o3tl/cow_wrapper.hxx | 2 include/sfx2/DocumentMetadataAccess.hxx | 2 include/sfx2/fcontnr.hxx | 2 include/sfx2/infobar.hxx | 2 include/svtools/DocumentInfoPreview.hxx | 2 include/svtools/treelist.hxx | 26 include/vcl/bitmap.hxx | 107 - include/vcl/builder.hxx | 5 include/vcl/combobox.hxx | 61 include/vcl/edit.hxx | 16 include/vcl/opengl/OpenGLContext.hxx | 2 include/vcl/settings.hxx | 6 oox/inc/pch/precompiled_oox.hxx | 2 oox/source/drawingml/fillproperties.cxx | 5 reportdesign/inc/pch/precompiled_rpt.hxx | 2 reportdesign/inc/pch/precompiled_rptui.hxx | 2 reportdesign/source/core/api/ReportDefinition.cxx | 2 reportdesign/source/ui/report/ReportController.cxx | 2 sd/source/filter/ppt/pptinanimations.cxx | 3 sd/source/ui/func/fuoltext.cxx | 2 sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx | 3 sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 2 sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx | 2 sd/source/ui/tools/PreviewRenderer.cxx | 2 sfx2/source/dialog/templdlg.cxx | 1 sfx2/source/doc/graphhelp.cxx | 2 slideshow/source/engine/pointersymbol.hxx | 2 slideshow/source/engine/shapes/viewappletshape.hxx | 2 slideshow/source/engine/shapes/viewbackgroundshape.hxx | 2 slideshow/source/engine/shapes/viewmediashape.hxx | 2 slideshow/source/engine/shapes/viewshape.hxx | 2 slideshow/source/engine/slide/userpaintoverlay.hxx | 2 slideshow/source/engine/waitsymbol.hxx | 2 slideshow/source/inc/activitiesfactory.hxx | 2 slideshow/source/inc/activitiesqueue.hxx | 2 slideshow/source/inc/listenercontainer.hxx | 2 slideshow/source/inc/unoviewcontainer.hxx | 2 svgio/inc/svgio/svgreader/svgdocument.hxx | 2 svtools/source/contnr/treelist.cxx | 248 +-- svtools/source/control/inettbc.cxx | 3 svtools/source/control/ruler.cxx | 2 svx/source/fmcomp/gridctrl.cxx | 2 svx/source/form/fmtextcontrolshell.cxx | 2 svx/source/svdraw/svdedxv.cxx | 3 sw/inc/doc.hxx | 13 sw/inc/ndarr.hxx | 2 sw/inc/shellio.hxx | 2 sw/inc/txatbase.hxx | 2 sw/source/core/doc/poolfmt.cxx | 37 sw/source/core/inc/DocumentChartDataProviderManager.hxx | 2 sw/source/core/inc/DocumentContentOperationsManager.hxx | 2 sw/source/core/inc/DocumentDeviceManager.hxx | 2 sw/source/core/inc/DocumentDrawModelManager.hxx | 2 sw/source/core/inc/DocumentExternalDataManager.hxx | 2 sw/source/core/inc/DocumentFieldsManager.hxx | 2 sw/source/core/inc/DocumentLayoutManager.hxx | 2 sw/source/core/inc/DocumentLinksAdministrationManager.hxx | 2 sw/source/core/inc/DocumentListItemsManager.hxx | 2 sw/source/core/inc/DocumentListsManager.hxx | 2 sw/source/core/inc/DocumentOutlineNodesManager.hxx | 2 sw/source/core/inc/DocumentRedlineManager.hxx | 2 sw/source/core/inc/DocumentStateManager.hxx | 2 sw/source/core/inc/DocumentStatisticsManager.hxx | 2 sw/source/core/inc/DocumentStylePoolManager.hxx | 2 sw/source/core/inc/DocumentTimerManager.hxx | 2 sw/source/core/inc/swthreadmanager.hxx | 2 sw/source/core/text/pormulti.cxx | 2 sw/source/filter/ww8/docxtablestyleexport.cxx | 2 unoxml/source/rdf/librdf_repository.cxx | 2 vcl/inc/ResampleKernel.hxx | 131 + vcl/inc/opengl/salbmp.hxx | 4 vcl/opengl/scale.cxx | 8 vcl/osx/DragSource.hxx | 2 vcl/osx/DragSourceContext.hxx | 2 vcl/osx/DropTarget.hxx | 2 vcl/osx/OSXTransferable.hxx | 2 vcl/osx/clipboard.hxx | 2 vcl/source/control/combobox.cxx | 766 +++++----- vcl/source/control/edit.cxx | 47 vcl/source/filter/wmf/wmf.cxx | 2 vcl/source/gdi/bitmap3.cxx | 7 vcl/source/window/builder.cxx | 2 vcl/unx/generic/window/salframe.cxx | 2 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 2 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 2 vcl/unx/kde4/KDESalFrame.cxx | 3 xmloff/inc/txtlists.hxx | 2 137 files changed, 1004 insertions(+), 764 deletions(-)
New commits: commit 6ee9ca5ae9d33aa10e0b86dc9a44c8d69564d556 Author: Michael Stahl <mst...@redhat.com> Date: Fri Jul 10 23:05:36 2015 +0200 svtools: pimplify SvListView Sadly this saves only 56MB of preprocessor input. Change-Id: I9ea78306884c5dcb54b61da87b43f700083daf2c diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx index 0d78444..6092bcc 100644 --- a/include/svtools/treelist.hxx +++ b/include/svtools/treelist.hxx @@ -30,7 +30,6 @@ #include <limits.h> #include <vector> -#include <boost/ptr_container/ptr_map.hpp> enum class SvListAction { @@ -243,23 +242,8 @@ class SVT_DLLPUBLIC SvListView { friend class SvTreeList; - typedef boost::ptr_map<SvTreeListEntry*, SvViewDataEntry> SvDataTable; - - sal_uLong nVisibleCount; - sal_uLong nSelectionCount; - bool bVisPositionsValid; - - SVT_DLLPRIVATE void InitTable(); - SVT_DLLPRIVATE void RemoveViewData( SvTreeListEntry* pParent ); - - SvDataTable maDataTable; // Mapping SvTreeListEntry -> ViewData - - void ActionMoving( SvTreeListEntry* pEntry,SvTreeListEntry* pTargetPrnt,sal_uLong nChildPos); - void ActionMoved( SvTreeListEntry* pEntry,SvTreeListEntry* pTargetPrnt,sal_uLong nChildPos); - void ActionInserted( SvTreeListEntry* pEntry ); - void ActionInsertedTree( SvTreeListEntry* pEntry ); - void ActionRemoving( SvTreeListEntry* pEntry ); - void ActionClear(); + struct Impl; + std::unique_ptr<Impl> m_pImpl; protected: SvTreeList* pModel; @@ -306,8 +290,7 @@ public: SvTreeListEntry* PrevVisible( SvTreeListEntry* pEntry, sal_uInt16& rDelta ) const { return pModel->PrevVisible(this,pEntry,rDelta); } - sal_uLong GetSelectionCount() const - { return nSelectionCount; } + sal_uLong GetSelectionCount() const; SvTreeListEntry* FirstSelected() const { return pModel->FirstSelected(this); } @@ -350,8 +333,7 @@ public: void SetEntryFocus( SvTreeListEntry* pEntry, bool bFocus ); const SvViewDataEntry* GetViewData( const SvTreeListEntry* pEntry ) const; SvViewDataEntry* GetViewData( SvTreeListEntry* pEntry ); - bool HasViewData() const - { return maDataTable.size() > 1; } // There's always a ROOT + bool HasViewData() const; virtual SvViewDataEntry* CreateViewData( SvTreeListEntry* pEntry ); virtual void InitViewData( SvViewDataEntry*, SvTreeListEntry* pEntry ); diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index d6ee88f..3d2c798 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -22,6 +22,40 @@ #include <svtools/viewdataentry.hxx> #include <osl/diagnose.h> +#include <boost/ptr_container/ptr_map.hpp> + + +typedef boost::ptr_map<SvTreeListEntry*, SvViewDataEntry> SvDataTable; + +struct SvListView::Impl +{ + SvListView & m_rThis; + + SvDataTable m_DataTable; // Mapping SvTreeListEntry -> ViewData + + sal_uLong m_nVisibleCount; + sal_uLong m_nSelectionCount; + bool m_bVisPositionsValid; + + Impl(SvListView & rThis) + : m_rThis(rThis) + , m_nVisibleCount(0) + , m_nSelectionCount(0) + , m_bVisPositionsValid(false) + {} + + void InitTable(); + void RemoveViewData( SvTreeListEntry* pParent ); + + void ActionMoving(SvTreeListEntry* pEntry, SvTreeListEntry* pTargetPrnt, sal_uLong nChildPos); + void ActionMoved(SvTreeListEntry* pEntry, SvTreeListEntry* pTargetPrnt, sal_uLong nChildPos); + void ActionInserted(SvTreeListEntry* pEntry); + void ActionInsertedTree(SvTreeListEntry* pEntry); + void ActionRemoving(SvTreeListEntry* pEntry); + void ActionClear(); +}; + + SvTreeList::SvTreeList() : mbEnableInvalidate(true) { @@ -582,10 +616,10 @@ sal_uLong SvTreeList::GetVisiblePos( const SvListView* pView, SvTreeListEntry* p { DBG_ASSERT(pView&&pEntry,"View/Entry?"); - if ( !pView->bVisPositionsValid ) + if (!pView->m_pImpl->m_bVisPositionsValid) { // to make GetVisibleCount refresh the positions - const_cast<SvListView*>(pView)->nVisibleCount = 0; + const_cast<SvListView*>(pView)->m_pImpl->m_nVisibleCount = 0; GetVisibleCount( const_cast<SvListView*>(pView) ); } const SvViewDataEntry* pViewData = pView->GetViewData( pEntry ); @@ -597,8 +631,8 @@ sal_uLong SvTreeList::GetVisibleCount( SvListView* pView ) const assert(pView && "GetVisCount:No View"); if( !pView->HasViewData() ) return 0; - if ( pView->nVisibleCount ) - return pView->nVisibleCount; + if (pView->m_pImpl->m_nVisibleCount) + return pView->m_pImpl->m_nVisibleCount; sal_uLong nPos = 0; SvTreeListEntry* pEntry = First(); // first entry is always visible @@ -615,8 +649,8 @@ sal_uLong SvTreeList::GetVisibleCount( SvListView* pView ) const OSL_FAIL("nVisibleCount bad"); } #endif - pView->nVisibleCount = nPos; - pView->bVisPositionsValid = true; + pView->m_pImpl->m_nVisibleCount = nPos; + pView->m_pImpl->m_bVisPositionsValid = true; return nPos; } @@ -746,9 +780,9 @@ SvTreeListEntry* SvTreeList::NextVisible(const SvListView* pView,SvTreeListEntry // nDelta entries existent? // example: 0,1,2,3,4,5,6,7,8,9 nVisPos=5 nDelta=7 // nNewDelta = 10-nVisPos-1 == 4 - if ( nVisPos+nDelta >= pView->nVisibleCount ) + if (nVisPos+nDelta >= pView->m_pImpl->m_nVisibleCount) { - nDelta = (sal_uInt16)(pView->nVisibleCount-nVisPos); + nDelta = static_cast<sal_uInt16>(pView->m_pImpl->m_nVisibleCount-nVisPos); nDelta--; } sal_uInt16 nDeltaTmp = nDelta; @@ -945,8 +979,8 @@ void SvTreeList::Expand( SvListView* pView, SvTreeListEntry* pEntry ) // if parent is visible, invalidate status data if ( pView->IsExpanded( pParent ) ) { - pView->bVisPositionsValid = false; - pView->nVisibleCount = 0; + pView->m_pImpl->m_bVisPositionsValid = false; + pView->m_pImpl->m_nVisibleCount = 0; } } @@ -964,8 +998,8 @@ void SvTreeList::Collapse( SvListView* pView, SvTreeListEntry* pEntry ) SvTreeListEntry* pParent = pEntry->pParent; if ( pView->IsExpanded(pParent) ) { - pView->nVisibleCount = 0; - pView->bVisPositionsValid = false; + pView->m_pImpl->m_nVisibleCount = 0; + pView->m_pImpl->m_bVisPositionsValid = false; } } @@ -980,7 +1014,7 @@ bool SvTreeList::Select( SvListView* pView, SvTreeListEntry* pEntry, bool bSelec else { pViewData->SetSelected(true); - pView->nSelectionCount++; + pView->m_pImpl->m_nSelectionCount++; } } else @@ -990,7 +1024,7 @@ bool SvTreeList::Select( SvListView* pView, SvTreeListEntry* pEntry, bool bSelec else { pViewData->SetSelected(false); - pView->nSelectionCount--; + pView->m_pImpl->m_nSelectionCount--; } } return true; @@ -1058,9 +1092,9 @@ void SvTreeList::SelectAll( SvListView* pView, bool bSelect ) pEntry = Next( pEntry ); } if ( bSelect ) - pView->nSelectionCount = nEntryCount; + pView->m_pImpl->m_nSelectionCount = nEntryCount; else - pView->nSelectionCount = 0; + pView->m_pImpl->m_nSelectionCount = 0; } @@ -1148,50 +1182,55 @@ std::pair<SvTreeListEntries::iterator, SvTreeListEntries::iterator> SvListView::SvListView() + : m_pImpl(new Impl(*this)) + , pModel(nullptr) { - pModel = 0; - nSelectionCount = 0; - nVisibleCount = 0; - bVisPositionsValid = false; } - SvListView::~SvListView() { - maDataTable.clear(); + m_pImpl->m_DataTable.clear(); } -void SvListView::InitTable() +sal_uLong SvListView::GetSelectionCount() const +{ return m_pImpl->m_nSelectionCount; } + +bool SvListView::HasViewData() const +{ return m_pImpl->m_DataTable.size() > 1; } // There's always a ROOT + + +void SvListView::Impl::InitTable() { - DBG_ASSERT(pModel,"InitTable:No Model"); - DBG_ASSERT(!nSelectionCount&&!nVisibleCount&&!bVisPositionsValid,"InitTable: Not cleared!"); + DBG_ASSERT(m_rThis.pModel,"InitTable:No Model"); + DBG_ASSERT(!m_nSelectionCount && !m_nVisibleCount && !m_bVisPositionsValid, + "InitTable: Not cleared!"); - if( maDataTable.size() ) + if (!m_DataTable.empty()) { - DBG_ASSERT(maDataTable.size()==1,"InitTable: TableCount != 1"); + DBG_ASSERT(m_DataTable.size() == 1, "InitTable: TableCount != 1"); // Delete the view data allocated to the Clear in the root. // Attention: The model belonging to the root entry (and thus the entry // itself) might already be deleted. - maDataTable.clear(); + m_DataTable.clear(); } SvTreeListEntry* pEntry; SvViewDataEntry* pViewData; // insert root entry - pEntry = pModel->pRootItem; + pEntry = m_rThis.pModel->pRootItem; pViewData = new SvViewDataEntry; pViewData->SetExpanded(true); - maDataTable.insert( pEntry, pViewData ); + m_DataTable.insert( pEntry, pViewData ); // now all the other entries - pEntry = pModel->First(); + pEntry = m_rThis.pModel->First(); while( pEntry ) { - pViewData = CreateViewData( pEntry ); + pViewData = m_rThis.CreateViewData( pEntry ); DBG_ASSERT(pViewData,"InitTable:No ViewData"); - InitViewData( pViewData, pEntry ); - maDataTable.insert( pEntry, pViewData ); - pEntry = pModel->Next( pEntry ); + m_rThis.InitViewData( pViewData, pEntry ); + m_DataTable.insert( pEntry, pViewData ); + pEntry = m_rThis.pModel->Next( pEntry ); } } @@ -1202,17 +1241,17 @@ SvViewDataEntry* SvListView::CreateViewData( SvTreeListEntry* ) void SvListView::Clear() { - maDataTable.clear(); - nSelectionCount = 0; - nVisibleCount = 0; - bVisPositionsValid = false; + m_pImpl->m_DataTable.clear(); + m_pImpl->m_nSelectionCount = 0; + m_pImpl->m_nVisibleCount = 0; + m_pImpl->m_bVisPositionsValid = false; if( pModel ) { // insert root entry SvTreeListEntry* pEntry = pModel->pRootItem; SvViewDataEntry* pViewData = new SvViewDataEntry; pViewData->SetExpanded(true); - maDataTable.insert( pEntry, pViewData ); + m_pImpl->m_DataTable.insert( pEntry, pViewData ); } } @@ -1228,7 +1267,7 @@ void SvListView::SetModel( SvTreeList* pNewModel ) delete pModel; } pModel = pNewModel; - InitTable(); + m_pImpl->InitTable(); pNewModel->InsertView( this ); if( bBroadcastCleared ) ModelNotification( SvListAction::CLEARED,0,0,0 ); @@ -1272,75 +1311,75 @@ void SvListView::ModelHasEntryInvalidated( SvTreeListEntry*) { } -void SvListView::ActionMoving( SvTreeListEntry* pEntry,SvTreeListEntry*,sal_uLong) +void SvListView::Impl::ActionMoving( SvTreeListEntry* pEntry,SvTreeListEntry*,sal_uLong) { SvTreeListEntry* pParent = pEntry->pParent; DBG_ASSERT(pParent,"Model not consistent"); - if (pParent != pModel->pRootItem && pParent->maChildren.size() == 1) + if (pParent != m_rThis.pModel->pRootItem && pParent->maChildren.size() == 1) { - SvViewDataEntry* pViewData = maDataTable.find( pParent )->second; + SvViewDataEntry* pViewData = m_DataTable.find( pParent )->second; pViewData->SetExpanded(false); } - // vorlaeufig - nVisibleCount = 0; - bVisPositionsValid = false; + // preliminary + m_nVisibleCount = 0; + m_bVisPositionsValid = false; } -void SvListView::ActionMoved( SvTreeListEntry* /* pEntry */ , +void SvListView::Impl::ActionMoved( SvTreeListEntry* /* pEntry */ , SvTreeListEntry* /* pTargetPrnt */ , sal_uLong /* nChildPos */ ) { - nVisibleCount = 0; - bVisPositionsValid = false; + m_nVisibleCount = 0; + m_bVisPositionsValid = false; } -void SvListView::ActionInserted( SvTreeListEntry* pEntry ) +void SvListView::Impl::ActionInserted( SvTreeListEntry* pEntry ) { DBG_ASSERT(pEntry,"Insert:No Entry"); - SvViewDataEntry* pData = CreateViewData( pEntry ); - InitViewData( pData, pEntry ); + SvViewDataEntry* pData = m_rThis.CreateViewData( pEntry ); + m_rThis.InitViewData( pData, pEntry ); #ifdef DBG_UTIL std::pair<SvDataTable::iterator, bool> aSuccess = #endif - maDataTable.insert( pEntry, pData ); + m_DataTable.insert( pEntry, pData ); DBG_ASSERT(aSuccess.second,"Entry already in View"); - if ( nVisibleCount && pModel->IsEntryVisible( this, pEntry )) + if (m_nVisibleCount && m_rThis.pModel->IsEntryVisible(&m_rThis, pEntry)) { - nVisibleCount = 0; - bVisPositionsValid = false; + m_nVisibleCount = 0; + m_bVisPositionsValid = false; } } -void SvListView::ActionInsertedTree( SvTreeListEntry* pEntry ) +void SvListView::Impl::ActionInsertedTree( SvTreeListEntry* pEntry ) { - if ( pModel->IsEntryVisible( this, pEntry )) + if (m_rThis.pModel->IsEntryVisible(&m_rThis, pEntry)) { - nVisibleCount = 0; - bVisPositionsValid = false; + m_nVisibleCount = 0; + m_bVisPositionsValid = false; } // iterate over entry and its children SvTreeListEntry* pCurEntry = pEntry; - sal_uInt16 nRefDepth = pModel->GetDepth( pCurEntry ); + sal_uInt16 nRefDepth = m_rThis.pModel->GetDepth( pCurEntry ); while( pCurEntry ) { - DBG_ASSERT(maDataTable.find(pCurEntry) != maDataTable.end(),"Entry already in Table"); - SvViewDataEntry* pViewData = CreateViewData( pCurEntry ); + DBG_ASSERT(m_DataTable.find(pCurEntry) != m_DataTable.end(),"Entry already in Table"); + SvViewDataEntry* pViewData = m_rThis.CreateViewData( pCurEntry ); DBG_ASSERT(pViewData,"No ViewData"); - InitViewData( pViewData, pEntry ); - maDataTable.insert( pCurEntry, pViewData ); - pCurEntry = pModel->Next( pCurEntry ); - if ( pCurEntry && pModel->GetDepth(pCurEntry) <= nRefDepth) + m_rThis.InitViewData( pViewData, pEntry ); + m_DataTable.insert( pCurEntry, pViewData ); + pCurEntry = m_rThis.pModel->Next( pCurEntry ); + if ( pCurEntry && m_rThis.pModel->GetDepth(pCurEntry) <= nRefDepth) pCurEntry = 0; } } -void SvListView::RemoveViewData( SvTreeListEntry* pParent ) +void SvListView::Impl::RemoveViewData( SvTreeListEntry* pParent ) { SvTreeListEntries::iterator it = pParent->maChildren.begin(), itEnd = pParent->maChildren.end(); for (; it != itEnd; ++it) { SvTreeListEntry& rEntry = *it; - maDataTable.erase(&rEntry); + m_DataTable.erase(&rEntry); if (rEntry.HasChildren()) RemoveViewData(&rEntry); } @@ -1348,44 +1387,44 @@ void SvListView::RemoveViewData( SvTreeListEntry* pParent ) -void SvListView::ActionRemoving( SvTreeListEntry* pEntry ) +void SvListView::Impl::ActionRemoving( SvTreeListEntry* pEntry ) { DBG_ASSERT(pEntry,"Remove:No Entry"); - SvViewDataEntry* pViewData = maDataTable.find( pEntry )->second; + SvViewDataEntry* pViewData = m_DataTable.find( pEntry )->second; sal_uLong nSelRemoved = 0; if ( pViewData->IsSelected() ) - nSelRemoved = 1 + pModel->GetChildSelectionCount( this, pEntry ); - nSelectionCount -= nSelRemoved; + nSelRemoved = 1 + m_rThis.pModel->GetChildSelectionCount(&m_rThis, pEntry); + m_nSelectionCount -= nSelRemoved; sal_uLong nVisibleRemoved = 0; - if ( pModel->IsEntryVisible( this, pEntry ) ) - nVisibleRemoved = 1 + pModel->GetVisibleChildCount( this, pEntry ); - if( nVisibleCount ) + if (m_rThis.pModel->IsEntryVisible(&m_rThis, pEntry)) + nVisibleRemoved = 1 + m_rThis.pModel->GetVisibleChildCount(&m_rThis, pEntry); + if( m_nVisibleCount ) { #ifdef DBG_UTIL - if( nVisibleCount < nVisibleRemoved ) + if (m_nVisibleCount < nVisibleRemoved) { OSL_FAIL("nVisibleRemoved bad"); } #endif - nVisibleCount -= nVisibleRemoved; + m_nVisibleCount -= nVisibleRemoved; } - bVisPositionsValid = false; + m_bVisPositionsValid = false; - maDataTable.erase(pEntry); + m_DataTable.erase(pEntry); RemoveViewData( pEntry ); SvTreeListEntry* pCurEntry = pEntry->pParent; - if (pCurEntry && pCurEntry != pModel->pRootItem && pCurEntry->maChildren.size() == 1) + if (pCurEntry && pCurEntry != m_rThis.pModel->pRootItem && pCurEntry->maChildren.size() == 1) { - pViewData = maDataTable.find(pCurEntry)->second; + pViewData = m_DataTable.find(pCurEntry)->second; pViewData->SetExpanded(false); } } -void SvListView::ActionClear() +void SvListView::Impl::ActionClear() { - Clear(); + m_rThis.Clear(); } void SvListView::ModelNotification( SvListAction nActionId, SvTreeListEntry* pEntry1, @@ -1394,30 +1433,30 @@ void SvListView::ModelNotification( SvListAction nActionId, SvTreeListEntry* pEn switch( nActionId ) { case SvListAction::INSERTED: - ActionInserted( pEntry1 ); + m_pImpl->ActionInserted( pEntry1 ); ModelHasInserted( pEntry1 ); break; case SvListAction::INSERTED_TREE: - ActionInsertedTree( pEntry1 ); + m_pImpl->ActionInsertedTree( pEntry1 ); ModelHasInsertedTree( pEntry1 ); break; case SvListAction::REMOVING: ModelIsRemoving( pEntry1 ); - ActionRemoving( pEntry1 ); + m_pImpl->ActionRemoving( pEntry1 ); break; case SvListAction::REMOVED: ModelHasRemoved( pEntry1 ); break; case SvListAction::MOVING: ModelIsMoving( pEntry1, pEntry2, nPos ); - ActionMoving( pEntry1, pEntry2, nPos ); + m_pImpl->ActionMoving( pEntry1, pEntry2, nPos ); break; case SvListAction::MOVED: - ActionMoved( pEntry1, pEntry2, nPos ); + m_pImpl->ActionMoved( pEntry1, pEntry2, nPos ); ModelHasMoved( pEntry1 ); break; case SvListAction::CLEARING: - ActionClear(); + m_pImpl->ActionClear(); ModelHasCleared(); // sic! for compatibility reasons! break; case SvListAction::CLEARED: @@ -1427,14 +1466,14 @@ void SvListView::ModelNotification( SvListAction nActionId, SvTreeListEntry* pEn ModelHasEntryInvalidated( pEntry1 ); break; case SvListAction::RESORTED: - bVisPositionsValid = false; + m_pImpl->m_bVisPositionsValid = false; break; case SvListAction::RESORTING: break; case SvListAction::REVERSING: break; case SvListAction::REVERSED: - bVisPositionsValid = false; + m_pImpl->m_bVisPositionsValid = false; break; default: OSL_FAIL("unknown ActionId"); @@ -1448,9 +1487,9 @@ void SvListView::InitViewData( SvViewDataEntry*, SvTreeListEntry* ) bool SvListView::IsExpanded( SvTreeListEntry* pEntry ) const { DBG_ASSERT(pEntry,"IsExpanded:No Entry"); - SvDataTable::const_iterator itr = maDataTable.find(pEntry); - DBG_ASSERT(itr != maDataTable.end(),"Entry not in Table"); - if (itr == maDataTable.end()) + SvDataTable::const_iterator itr = m_pImpl->m_DataTable.find(pEntry); + DBG_ASSERT(itr != m_pImpl->m_DataTable.end(),"Entry not in Table"); + if (itr == m_pImpl->m_DataTable.end()) return false; return itr->second->IsExpanded(); } @@ -1458,8 +1497,8 @@ bool SvListView::IsExpanded( SvTreeListEntry* pEntry ) const bool SvListView::IsSelected( SvTreeListEntry* pEntry ) const { DBG_ASSERT(pEntry,"IsExpanded:No Entry"); - SvDataTable::const_iterator itr = maDataTable.find(pEntry ); - if (itr == maDataTable.end()) + SvDataTable::const_iterator itr = m_pImpl->m_DataTable.find(pEntry); + if (itr == m_pImpl->m_DataTable.end()) return false; return itr->second->IsSelected(); } @@ -1467,23 +1506,24 @@ bool SvListView::IsSelected( SvTreeListEntry* pEntry ) const void SvListView::SetEntryFocus( SvTreeListEntry* pEntry, bool bFocus ) { DBG_ASSERT(pEntry,"SetEntryFocus:No Entry"); - SvDataTable::iterator itr = maDataTable.find(pEntry); - DBG_ASSERT(itr != maDataTable.end(),"Entry not in Table"); + SvDataTable::iterator itr = m_pImpl->m_DataTable.find(pEntry); + DBG_ASSERT(itr != m_pImpl->m_DataTable.end(),"Entry not in Table"); itr->second->SetFocus(bFocus); } const SvViewDataEntry* SvListView::GetViewData( const SvTreeListEntry* pEntry ) const { - SvDataTable::const_iterator itr = maDataTable.find( const_cast<SvTreeListEntry*>(pEntry) ); - if (itr == maDataTable.end()) + SvDataTable::const_iterator itr = + m_pImpl->m_DataTable.find(const_cast<SvTreeListEntry*>(pEntry)); + if (itr == m_pImpl->m_DataTable.end()) return NULL; return itr->second; } SvViewDataEntry* SvListView::GetViewData( SvTreeListEntry* pEntry ) { - SvDataTable::iterator itr = maDataTable.find( pEntry ); - DBG_ASSERT(itr != maDataTable.end(),"Entry not in model or wrong view"); + SvDataTable::iterator itr = m_pImpl->m_DataTable.find( pEntry ); + DBG_ASSERT(itr != m_pImpl->m_DataTable.end(),"Entry not in model or wrong view"); return itr->second; } commit fafd0b61cc8e3476c0eaaccf42a5ce2e72954295 Author: Michael Stahl <mst...@redhat.com> Date: Fri Jul 10 21:25:30 2015 +0200 extensions: convert boost::bind Change-Id: I7922140eaaeb428da0f268cac41f7a227693c25a diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx index d185ee6..71330c0 100644 --- a/extensions/source/logging/logger.cxx +++ b/extensions/source/logging/logger.cxx @@ -29,7 +29,6 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/logging/XLoggerPool.hpp> -#include <boost/bind.hpp> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <cppuhelper/implbase2.hxx> @@ -175,9 +174,9 @@ namespace logging return; m_aHandlers.forEach< XLogHandler >( - ::boost::bind( &XLogHandler::publish, _1, ::boost::cref( _rRecord ) ) ); + [&] (Reference<XLogHandler> const& rxListener) { rxListener->publish(_rRecord); } ); m_aHandlers.forEach< XLogHandler >( - ::boost::bind( &XLogHandler::flush, _1 ) ); + [] (Reference<XLogHandler> const& rxListener) { rxListener->flush(); } ); } OUString SAL_CALL EventLogger::getName() throw (RuntimeException, std::exception) commit ad94eaf540260296e8aee0b5bff91d22a5fe6b78 Author: Michael Stahl <mst...@redhat.com> Date: Fri Jul 10 19:25:24 2015 +0200 vcl: avoid a boost::ptr_map in VclBuilder This eliminates 638MB of preprocessor input. Change-Id: Ife434310ec08e408e1f8aaf52d6298f8caa209af diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index b0d8ace..baf523d 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -18,6 +18,8 @@ #include <vcl/dllapi.h> #include <vcl/window.hxx> #include <vcl/vclptr.hxx> + +#include <memory> #include <map> #include <set> #include <stack> @@ -26,7 +28,6 @@ # //some problem with MacOSX and a check define # undef check #endif -#include <boost/ptr_container/ptr_map.hpp> #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -124,7 +125,7 @@ private: VclBuilder(const VclBuilder&) SAL_DELETED_FUNCTION; VclBuilder& operator=(const VclBuilder&) SAL_DELETED_FUNCTION; - typedef boost::ptr_map<OUString, osl::Module> ModuleMap; + typedef std::map<OUString, std::unique_ptr<osl::Module>> ModuleMap; //We store these until the builder is deleted, that way we can use the //ui-previewer on custom widgets and guarantee the modules they are from diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index dba80c0..9a5a5b5 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1751,7 +1751,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & #else pModule->loadRelative(&thisModule, sModule); #endif - aI = m_aModuleMap.insert(sModule, pModule).first; + aI = m_aModuleMap.insert(std::make_pair(sModule, std::unique_ptr<osl::Module>(pModule))).first; } customMakeWidget pFunction = reinterpret_cast<customMakeWidget>(aI->second->getFunctionSymbol(sFunction)); #else commit 72c11ce76abebdbe88a7be793dbf690c54b30500 Author: Michael Stahl <mst...@redhat.com> Date: Fri Jul 10 18:55:12 2015 +0200 remove unused ptr_container includes Change-Id: I55e15669520075f74c3fc730f8c6549d19de5ab3 diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx index 1d3adc6..f423190 100644 --- a/include/sfx2/infobar.hxx +++ b/include/sfx2/infobar.hxx @@ -17,8 +17,6 @@ #include <sfx2/dllapi.h> #include <sfx2/childwin.hxx> -#include <boost/ptr_container/ptr_vector.hpp> - /** SfxChildWindow for positioning the InfoBar in the view. */ class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 2676905..94ba1ed 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -52,11 +52,11 @@ class NSOpenGLView; #endif #include <vcl/dllapi.h> -#include <boost/ptr_container/ptr_map.hpp> #include <vcl/window.hxx> #include <tools/gen.hxx> #include <vcl/syschild.hxx> +#include <map> #include <set> class OpenGLFramebuffer; commit ac010423b6e9005896ca73a55a7d65dd698767d3 Author: Michael Stahl <mst...@redhat.com> Date: Fri Jul 10 18:44:56 2015 +0200 sw: clean up SwDoc::maPatternNms nonsense Change-Id: I0a166d1b58b23cac96ae27d446d6d8ed2442df8e diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index b5461ba..706f79d 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -263,7 +263,7 @@ class SW_DLLPUBLIC SwDoc : Idle maOLEModifiedIdle; //< Timer for update modified OLE-Objects SwDBData maDBData; //< database descriptor OUString msTOIAutoMarkURL; //< URL of table of index AutoMark file - boost::ptr_vector< boost::nullable<OUString> > maPatternNms; // Array for names of document-templates + std::vector<OUString> m_PatternNames; //< Array for names of document-templates com::sun::star::uno::Reference<com::sun::star::container::XNameContainer> mxXForms; //< container with XForms models mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator; @@ -907,17 +907,10 @@ public: static bool IsUsed( const SwNumRule& ); // Set name of newly loaded document template. - sal_uInt16 SetDocPattern( const OUString& rPatternName ); + size_t SetDocPattern(const OUString& rPatternName); // @return name of document template. Can be 0! - const OUString* GetDocPattern( sal_uInt16 nPos ) const - { - if(nPos >= maPatternNms.size()) - return NULL; - if(boost::is_null(maPatternNms.begin() + nPos)) - return NULL; - return &(maPatternNms[nPos]); - } + const OUString* GetDocPattern(size_t nPos) const; // Query / connect current document with glossary document. void SetGlossaryDoc( SwDoc* pDoc ) { mpGlossaryDoc = pDoc; } diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index f290b05..3244fb7 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -131,28 +131,31 @@ bool SwDoc::IsUsed( const SwNumRule& rRule ) return bUsed; } +const OUString* SwDoc::GetDocPattern(size_t const nPos) const +{ + if (nPos >= m_PatternNames.size()) + return nullptr; + return &m_PatternNames[nPos]; +} + // Look for the style name's position. If it doesn't exist, // insert a anew -sal_uInt16 SwDoc::SetDocPattern( const OUString& rPatternName ) +size_t SwDoc::SetDocPattern(const OUString& rPatternName) { OSL_ENSURE( !rPatternName.isEmpty(), "no Document style name" ); - size_t nNewPos = maPatternNms.size(); - for(size_t n = 0; n < maPatternNms.size(); ++n) - if( boost::is_null(maPatternNms.begin() + n) ) - { - if( nNewPos == maPatternNms.size() ) - nNewPos = n; - } - else if( rPatternName == maPatternNms[n] ) - return n; - - if( nNewPos < maPatternNms.size() ) - maPatternNms.erase(maPatternNms.begin() + nNewPos); // Free space again - - maPatternNms.insert(maPatternNms.begin() + nNewPos, new OUString(rPatternName)); - getIDocumentState().SetModified(); - return nNewPos; + auto const iter( + std::find(m_PatternNames.begin(), m_PatternNames.end(), rPatternName)); + if (iter != m_PatternNames.end()) + { + return std::distance(m_PatternNames.begin(), iter); + } + else + { + m_PatternNames.push_back(rPatternName); + getIDocumentState().SetModified(); + return m_PatternNames.size() - 1; + } } sal_uInt16 GetPoolParent( sal_uInt16 nId ) commit 20bd0a2ee9ed899ea542c2de08efda243dbef446 Author: Michael Stahl <mst...@redhat.com> Date: Fri Jul 10 14:22:25 2015 +0200 vcl: remove boost/signal2/signal.hpp from header The most relevant signal member function appears to be connect(), so let's create a wrapper function for that now, without the more esoteric ordering features for now. Move the signal member itself to a new pImpl. The benefits are worth it: preprocessor input reduced by 2.8GB, that's 9% of the total (excluding system headers which are not counted because they don't generate dependencies). Change-Id: I0aaeda51a5630a348bb12c81a83f67afbd508a14 diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 45c8bbb..f44456c 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -51,6 +51,8 @@ #include "optHeaderTabListbox.hxx" #include <vcl/help.hxx> +#include <boost/scoped_ptr.hpp> + using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::ui::dialogs; diff --git a/cui/source/options/tsaurls.cxx b/cui/source/options/tsaurls.cxx index 142ea65..a886975 100644 --- a/cui/source/options/tsaurls.cxx +++ b/cui/source/options/tsaurls.cxx @@ -15,6 +15,8 @@ #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> +#include <boost/scoped_ptr.hpp> + using namespace ::com::sun::star; TSAURLsDialog::TSAURLsDialog(vcl::Window* pParent) diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index e44c37d..b3a56df 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -50,6 +50,8 @@ #include "svgfilter.hxx" #include "svgwriter.hxx" +#include <boost/scoped_ptr.hpp> + using namespace ::com::sun::star; namespace diff --git a/filter/source/svg/svgimport.cxx b/filter/source/svg/svgimport.cxx index b803b6d..1d3daaf 100644 --- a/filter/source/svg/svgimport.cxx +++ b/filter/source/svg/svgimport.cxx @@ -43,6 +43,8 @@ #include <unotools/mediadescriptor.hxx> #include <tools/zcodec.hxx> +#include <boost/scoped_ptr.hpp> + using namespace ::com::sun::star; using namespace ::svgi; diff --git a/include/svtools/DocumentInfoPreview.hxx b/include/svtools/DocumentInfoPreview.hxx index 9eba310..6cd4fc8 100644 --- a/include/svtools/DocumentInfoPreview.hxx +++ b/include/svtools/DocumentInfoPreview.hxx @@ -29,6 +29,8 @@ #include <tools/wintypes.hxx> #include <vcl/window.hxx> +#include <boost/scoped_ptr.hpp> + class SvtDocInfoTable_Impl; namespace com { namespace sun { namespace star { diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index c134780..a245985 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -20,17 +20,23 @@ #ifndef INCLUDED_VCL_EDIT_HXX #define INCLUDED_VCL_EDIT_HXX -#include <boost/signals2/signal.hpp> +#include <vcl/ctrl.hxx> + +#include <functional> +#include <memory> + #include <tools/solar.h> #include <vcl/dllapi.h> #include <vcl/timer.hxx> #include <vcl/idle.hxx> -#include <vcl/ctrl.hxx> #include <vcl/menu.hxx> #include <vcl/dndhelp.hxx> #include <vcl/vclptr.hxx> #include <com/sun/star/uno/Reference.h> +// forward declare signals stuff - those headers are staggeringly expensive +namespace boost { namespace signals2 { class connection; } } + namespace com { namespace sun { namespace star { @@ -68,6 +74,9 @@ enum AutocompleteAction{ AUTOCOMPLETE_KEYINPUT, AUTOCOMPLETE_TABFORWARD, AUTOCOM class VCL_DLLPUBLIC Edit : public Control, public vcl::unohelper::DragAndDropClient { private: + struct Impl; + ::std::unique_ptr<Impl> m_pImpl; + VclPtr<Edit> mpSubEdit; Timer* mpUpdateDataTimer; TextFilter* mpFilterText; @@ -244,7 +253,8 @@ public: void SetSubEdit( Edit* pEdit ); Edit* GetSubEdit() const { return mpSubEdit; } - boost::signals2::signal< void ( Edit* ) > autocompleteSignal; + void SignalConnectAutocomplete(::boost::signals2::connection * pConnection, + ::std::function<void (Edit *)>); AutocompleteAction GetAutocompleteAction() const { return meAutocompleteAction; } virtual Size CalcMinimumSize() const; diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index d5ed372..f1e8b22 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -65,6 +65,9 @@ #include <pptatom.hxx> #include "pptin.hxx" #include "randomnode.hxx" + +#include <boost/scoped_ptr.hpp> + #include <algorithm> using ::std::map; diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx index 79c13a1..b7fbe74 100644 --- a/sd/source/ui/func/fuoltext.cxx +++ b/sd/source/ui/func/fuoltext.cxx @@ -35,6 +35,8 @@ #include "ViewShell.hxx" #include "OutlineViewShell.hxx" +#include <boost/scoped_ptr.hpp> + #include <stdio.h> namespace sd { diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx index 5bec93d..21b47c2 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx @@ -27,6 +27,9 @@ #include <osl/mutex.hxx> #include <svx/sdrpageuser.hxx> +#include <boost/scoped_ptr.hpp> + + namespace sd { namespace slidesorter { namespace cache { class RequestData; diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 316189f..1aaae26 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -83,6 +83,8 @@ #include <com/sun/star/drawing/XDrawPages.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> +#include <boost/scoped_ptr.hpp> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::sd::slidesorter::model; diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx index 62818dc..6923b11 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx @@ -30,6 +30,8 @@ #include <tools/link.hxx> #include <tools/gen.hxx> +#include <boost/scoped_ptr.hpp> + namespace sd { namespace slidesorter { class SlideSorter; } } diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 6603263..4cf2694 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -36,6 +36,8 @@ #include <svx/sdr/contact/viewobjectcontact.hxx> #include <svx/sdr/contact/viewcontact.hxx> +#include <boost/scoped_ptr.hpp> + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index d4e01ca..5b91be9 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -18,6 +18,7 @@ */ #include <boost/noncopyable.hpp> +#include <boost/scoped_ptr.hpp> #include <vcl/menu.hxx> #include <vcl/settings.hxx> diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index ca19d1b..1167db3 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -53,6 +53,8 @@ #include "graphhelp.hxx" #include "doc.hrc" +#include <boost/scoped_ptr.hpp> + using namespace css; SvMemoryStream* GraphicHelper::getFormatStrFromGDI_Impl( const GDIMetaFile* pGDIMeta, ConvertDataFormat nFormat ) diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 4f34198..7579687 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -893,7 +893,8 @@ void SvtURLBox::Init(bool bSetDefaultHelpID) SetText( OUString() ); - GetSubEdit()->autocompleteSignal.connect( boost::bind( &SvtURLBox::AutoCompleteHandler, this, _1 ) ); + GetSubEdit()->SignalConnectAutocomplete(nullptr, + [this] (Edit *const pEdit) { this->AutoCompleteHandler(pEdit); } ); UpdatePicklistForSmartProtocol_Impl(); EnableAutoSize(GetStyle() & WB_AUTOSIZE); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 4595b42..0d6c6ab 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -29,6 +29,8 @@ #include <svtools/svtools.hrc> #include <svtools/colorcfg.hxx> +#include <boost/scoped_ptr.hpp> + #include <vector> using namespace std; diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index cdb3302..3607211 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -56,6 +56,8 @@ #include <comphelper/property.hxx> +#include <boost/scoped_ptr.hpp> + #include <algorithm> #include <cstdlib> #include <map> diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index fab7097..62a07c8 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -63,6 +63,8 @@ #include <vcl/outdev.hxx> #include <osl/mutex.hxx> +#include <boost/scoped_ptr.hpp> + namespace svx { diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index f577522..dc7f4f6 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -60,6 +60,9 @@ #include <sdr/overlay/overlaytools.hxx> #include <svx/sdr/table/tablecontroller.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> + +#include <boost/scoped_ptr.hpp> + #include <memory> diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index ca60bae..d66702e 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -50,6 +50,8 @@ #include <swtable.hxx> #include <fmtfsize.hxx> +#include <boost/scoped_ptr.hpp> + using namespace ::com::sun::star; // A SwMultiPortion is not a simple portion, diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx index 60510da..1142f35 100644 --- a/sw/source/filter/ww8/docxtablestyleexport.cxx +++ b/sw/source/filter/ww8/docxtablestyleexport.cxx @@ -15,6 +15,8 @@ #include <comphelper/sequenceashashmap.hxx> #include <o3tl/make_unique.hxx> +#include <boost/optional.hpp> + using namespace com::sun::star; using namespace oox; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 15a3c09..9249acb 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -284,8 +284,12 @@ void ComboBox::EnableAutocomplete( bool bEnable, bool bMatchCase ) if ( bEnable ) { if( !m_pImpl->m_AutocompleteConnection.connected()) - m_pImpl->m_AutocompleteConnection = m_pImpl->m_pSubEdit->autocompleteSignal.connect( - boost::bind( &ComboBox::Impl::ImplAutocompleteHandler, m_pImpl.get(), _1 ) ); + { + m_pImpl->m_pSubEdit->SignalConnectAutocomplete( + &m_pImpl->m_AutocompleteConnection, + [this] (Edit *const pEdit) { m_pImpl->ImplAutocompleteHandler(pEdit); } + ); + } } else m_pImpl->m_AutocompleteConnection.disconnect(); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index ce1d9bb..43ba36c 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -65,6 +65,9 @@ #include <vcl/unohelp2.hxx> #include <officecfg/Office/Common.hxx> + +#include <boost/signals2/signal.hpp> + #include <memory> using namespace ::com::sun::star; @@ -154,21 +157,29 @@ void Impl_IMEInfos::DestroyAttribs() nLen = 0; } -Edit::Edit( WindowType nType ) : - Control( nType ) +struct Edit::Impl +{ + boost::signals2::signal< void (Edit *) > m_AutocompleteSignal; +}; + +Edit::Edit( WindowType nType ) + : Control( nType ) + , m_pImpl(new Impl) { ImplInitEditData(); } -Edit::Edit( vcl::Window* pParent, WinBits nStyle ) : - Control( WINDOW_EDIT ) +Edit::Edit( vcl::Window* pParent, WinBits nStyle ) + : Control( WINDOW_EDIT ) + , m_pImpl(new Impl) { ImplInitEditData(); ImplInit( pParent, nStyle ); } -Edit::Edit( vcl::Window* pParent, const ResId& rResId ) : - Control( WINDOW_EDIT ) +Edit::Edit( vcl::Window* pParent, const ResId& rResId ) + : Control( WINDOW_EDIT ) + , m_pImpl(new Impl) { rResId.SetRT( RSC_EDIT ); WinBits nStyle = ImplInitRes( rResId ); @@ -1639,12 +1650,12 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) ImplCopyToSelectionClipboard(); } - if ( bGoEnd && !autocompleteSignal.empty() && !rKEvt.GetKeyCode().GetModifier() ) + if (bGoEnd && !m_pImpl->m_AutocompleteSignal.empty() && !rKEvt.GetKeyCode().GetModifier()) { if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.getLength()) ) { meAutocompleteAction = AUTOCOMPLETE_KEYINPUT; - autocompleteSignal( this ); + m_pImpl->m_AutocompleteSignal( this ); } } @@ -1739,12 +1750,12 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) if ( !mbReadOnly ) { ImplInsertText(OUString(rKEvt.GetCharCode()), 0, true); - if ( !autocompleteSignal.empty() ) + if (!m_pImpl->m_AutocompleteSignal.empty()) { if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.getLength()) ) { meAutocompleteAction = AUTOCOMPLETE_KEYINPUT; - autocompleteSignal( this ); + m_pImpl->m_AutocompleteSignal( this ); } } } @@ -2103,12 +2114,12 @@ void Edit::Command( const CommandEvent& rCEvt ) Invalidate(); // #i25161# call auto complete handler for ext text commit also - if ( autocompleteSignal.empty() ) + if (m_pImpl->m_AutocompleteSignal.empty()) { if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.getLength()) ) { meAutocompleteAction = AUTOCOMPLETE_KEYINPUT; - autocompleteSignal( this ); + m_pImpl->m_AutocompleteSignal( this ); } } } @@ -2720,7 +2731,7 @@ void Edit::SetSubEdit(Edit* pEdit) mpSubEdit->mbIsSubEdit = true; mpSubEdit->SetReadOnly(mbReadOnly); - mpSubEdit->autocompleteSignal.connect(autocompleteSignal); + mpSubEdit->m_pImpl->m_AutocompleteSignal.connect(m_pImpl->m_AutocompleteSignal); } } @@ -3047,4 +3058,14 @@ Selection Edit::GetSurroundingTextSelection() const return GetSelection(); } +void Edit::SignalConnectAutocomplete( + boost::signals2::connection *const pConnection, + std::function<void (Edit *)> slot) +{ + boost::signals2::connection const& rConnection( + m_pImpl->m_AutocompleteSignal.connect(slot)); + if (pConnection) + *pConnection = rConnection; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx index 21ab4a4..c566bc3 100644 --- a/vcl/source/filter/wmf/wmf.cxx +++ b/vcl/source/filter/wmf/wmf.cxx @@ -24,6 +24,8 @@ #include <vcl/gdimetafiletools.hxx> #include <comphelper/scopeguard.hxx> +#include <boost/bind.hpp> + bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem, WMF_EXTERNALHEADER *pExtHeader ) { sal_uInt32 nMetaType; diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 4ce6f75..d11e520 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -70,6 +70,8 @@ #include "svids.hrc" #include "impbmp.hxx" +#include <boost/optional.hpp> + #include <algorithm> #ifndef Button6 commit ece8699f8f22f6bae137c601bc29b83b75dc3bf3 Author: Michael Stahl <mst...@redhat.com> Date: Fri Jul 10 12:05:48 2015 +0200 vcl: pImplify ComboBox The boost::signal stuff is quite heavy (33 kloc), so try to hide it from the header. Change-Id: I87826ccfd2a151aff274ffa6b7159a988f751808 diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index 87e2b92..d0189d5 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -20,9 +20,7 @@ #ifndef INCLUDED_VCL_COMBOBOX_HXX #define INCLUDED_VCL_COMBOBOX_HXX -#include <boost/signals2/connection.hpp> #include <vcl/dllapi.h> -#include <vcl/ctrl.hxx> #include <vcl/combobox.h> #include <vcl/edit.hxx> @@ -35,45 +33,8 @@ class ImplBtn; class VCL_DLLPUBLIC ComboBox : public Edit { private: - VclPtr<Edit> mpSubEdit; - VclPtr<ImplListBox> mpImplLB; - VclPtr<ImplBtn> mpBtn; - VclPtr<ImplListBoxFloatingWindow> mpFloatWin; - sal_uInt16 mnDDHeight; - sal_Unicode mcMultiSep; - bool mbDDAutoSize : 1; - bool mbSyntheticModify : 1; - bool mbMatchCase : 1; - sal_Int32 m_nMaxWidthChars; - Link<> maSelectHdl; - Link<> maDoubleClickHdl; - boost::signals2::scoped_connection mAutocompleteConnection; - - struct ComboBoxBounds - { - Point aSubEditPos; - Size aSubEditSize; - - Point aButtonPos; - Size aButtonSize; - }; - -private: - SAL_DLLPRIVATE void ImplInitComboBoxData(); - SAL_DLLPRIVATE void ImplUpdateFloatSelection(); - SAL_DLLPRIVATE ComboBoxBounds calcComboBoxDropDownComponentBounds( - const Size &rOutSize, const Size &rBorderOutSize) const; - - DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplCancelHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplDoubleClickHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplPopupModeEndHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplSelectionChangedHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplListItemSelectHdl , void* ); - - SAL_DLLPRIVATE void ImplClickButtonHandler( ImplBtn* ); - SAL_DLLPRIVATE void ImplUserDrawHandler( UserDrawEvent* ); - SAL_DLLPRIVATE void ImplAutocompleteHandler( Edit* ); + struct Impl; + std::unique_ptr<Impl> m_pImpl; protected: using Window::ImplInit; @@ -84,7 +45,7 @@ protected: SAL_DLLPRIVATE long getMaxWidthScrollBarAndDownButton() const; protected: - bool IsDropDownBox() const { return mpFloatWin != nullptr; } + bool IsDropDownBox() const; virtual void FillLayoutData() const SAL_OVERRIDE; @@ -120,7 +81,7 @@ public: sal_uInt16 GetDropDownLineCount() const; void EnableAutoSize( bool bAuto ); - bool IsAutoSizeEnabled() const { return mbDDAutoSize; } + bool IsAutoSizeEnabled() const; void EnableDDAutoWidth( bool b ); @@ -160,13 +121,13 @@ public: void EnableMultiSelection( bool bMulti ); bool IsMultiSelectionEnabled() const; - void SetMultiSelectionSeparator( sal_Unicode cSep ) { mcMultiSep = cSep; } - sal_Unicode GetMultiSelectionSeparator() const { return mcMultiSep; } + void SetMultiSelectionSeparator( sal_Unicode cSep ); + sal_Unicode GetMultiSelectionSeparator() const; - void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; } - const Link<>& GetSelectHdl() const { return maSelectHdl; } - void SetDoubleClickHdl( const Link<>& rLink ) { maDoubleClickHdl = rLink; } - const Link<>& GetDoubleClickHdl() const { return maDoubleClickHdl; } + void SetSelectHdl(const Link<>& rLink); + const Link<>& GetSelectHdl() const; + void SetDoubleClickHdl(const Link<>& rLink); + const Link<>& GetDoubleClickHdl() const; Size CalcMinimumSize() const SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; @@ -216,7 +177,7 @@ public: using Control::GetIndexForPoint; long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const; - sal_Int32 getMaxWidthChars() const { return m_nMaxWidthChars; } + sal_Int32 getMaxWidthChars() const; void setMaxWidthChars(sal_Int32 nWidth); virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 4f41c31..15a3c09 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -17,7 +17,12 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <vcl/combobox.hxx> + #include <set> + +#include <boost/signals2/connection.hpp> + #include <comphelper/string.hxx> #include <tools/debug.hxx> #include <tools/rc.h> @@ -25,13 +30,59 @@ #include <vcl/lstbox.h> #include <vcl/button.hxx> #include <vcl/event.hxx> -#include <vcl/combobox.hxx> #include <vcl/settings.hxx> #include <svdata.hxx> #include <ilstbox.hxx> #include <controldata.hxx> + +struct ComboBoxBounds +{ + Point aSubEditPos; + Size aSubEditSize; + + Point aButtonPos; + Size aButtonSize; +}; + +struct ComboBox::Impl +{ + ComboBox & m_rThis; + VclPtr<Edit> m_pSubEdit; + VclPtr<ImplListBox> m_pImplLB; + VclPtr<ImplBtn> m_pBtn; + VclPtr<ImplListBoxFloatingWindow> m_pFloatWin; + sal_uInt16 m_nDDHeight; + sal_Unicode m_cMultiSep; + bool m_isDDAutoSize : 1; + bool m_isSyntheticModify : 1; + bool m_isMatchCase : 1; + sal_Int32 m_nMaxWidthChars; + Link<> m_SelectHdl; + Link<> m_DoubleClickHdl; + boost::signals2::scoped_connection m_AutocompleteConnection; + + Impl(ComboBox & rThis) : m_rThis(rThis) {} + + void ImplInitComboBoxData(); + void ImplUpdateFloatSelection(); + ComboBoxBounds calcComboBoxDropDownComponentBounds( + const Size &rOutSize, const Size &rBorderOutSize) const; + + DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* ); + DECL_DLLPRIVATE_LINK( ImplCancelHdl, void* ); + DECL_DLLPRIVATE_LINK( ImplDoubleClickHdl, void* ); + DECL_DLLPRIVATE_LINK( ImplPopupModeEndHdl, void* ); + DECL_DLLPRIVATE_LINK( ImplSelectionChangedHdl, void* ); + DECL_DLLPRIVATE_LINK( ImplListItemSelectHdl , void* ); + + void ImplClickButtonHandler( ImplBtn* ); + void ImplUserDrawHandler( UserDrawEvent* ); + void ImplAutocompleteHandler( Edit* ); +}; + + static void lcl_GetSelectedEntries( ::std::set< sal_Int32 >& rSelectedPos, const OUString& rText, sal_Unicode cTokenSep, const ImplEntryList* pEntryList ) { for (sal_Int32 n = comphelper::string::getTokenCount(rText, cTokenSep); n;) @@ -44,18 +95,20 @@ static void lcl_GetSelectedEntries( ::std::set< sal_Int32 >& rSelectedPos, const } } -ComboBox::ComboBox( vcl::Window* pParent, WinBits nStyle ) : - Edit( WINDOW_COMBOBOX ) +ComboBox::ComboBox(vcl::Window *const pParent, WinBits const nStyle) + : Edit( WINDOW_COMBOBOX ) + , m_pImpl(new Impl(*this)) { - ImplInitComboBoxData(); + m_pImpl->ImplInitComboBoxData(); ImplInit( pParent, nStyle ); SetWidthInChars(-1); } -ComboBox::ComboBox( vcl::Window* pParent, const ResId& rResId ) : - Edit( WINDOW_COMBOBOX ) +ComboBox::ComboBox(vcl::Window *const pParent, const ResId& rResId) + : Edit( WINDOW_COMBOBOX ) + , m_pImpl(new Impl(*this)) { - ImplInitComboBoxData(); + m_pImpl->ImplInitComboBoxData(); rResId.SetRT( RSC_COMBOBOX ); WinBits nStyle = ImplInitRes( rResId ); ImplInit( pParent, nStyle ); @@ -73,29 +126,29 @@ ComboBox::~ComboBox() void ComboBox::dispose() { - mpSubEdit.disposeAndClear(); + m_pImpl->m_pSubEdit.disposeAndClear(); - VclPtr< ImplListBox > pImplLB = mpImplLB; - mpImplLB.clear(); + VclPtr< ImplListBox > pImplLB = m_pImpl->m_pImplLB; + m_pImpl->m_pImplLB.clear(); pImplLB.disposeAndClear(); - mpFloatWin.disposeAndClear(); - mpBtn.disposeAndClear(); + m_pImpl->m_pFloatWin.disposeAndClear(); + m_pImpl->m_pBtn.disposeAndClear(); Edit::dispose(); } -void ComboBox::ImplInitComboBoxData() +void ComboBox::Impl::ImplInitComboBoxData() { - mpSubEdit.disposeAndClear(); - mpBtn = NULL; - mpImplLB = NULL; - mpFloatWin = NULL; + m_pSubEdit.disposeAndClear(); + m_pBtn = nullptr; + m_pImplLB = nullptr; + m_pFloatWin = nullptr; - mnDDHeight = 0; - mbDDAutoSize = true; - mbSyntheticModify = false; - mbMatchCase = false; - mcMultiSep = ';'; + m_nDDHeight = 0; + m_isDDAutoSize = true; + m_isSyntheticModify = false; + m_isMatchCase = false; + m_cMultiSep = ';'; m_nMaxWidthChars = -1; } @@ -103,9 +156,9 @@ void ComboBox::ImplCalcEditHeight() { sal_Int32 nLeft, nTop, nRight, nBottom; GetBorder( nLeft, nTop, nRight, nBottom ); - mnDDHeight = (sal_uInt16)(mpSubEdit->GetTextHeight() + nTop + nBottom + 4); + m_pImpl->m_nDDHeight = (sal_uInt16)(m_pImpl->m_pSubEdit->GetTextHeight() + nTop + nBottom + 4); if ( !IsDropDownBox() ) - mnDDHeight += 4; + m_pImpl->m_nDDHeight += 4; Rectangle aCtrlRegion( Point( 0, 0 ), Size( 10, 10 ) ); Rectangle aBoundRegion, aContentRegion; @@ -118,8 +171,8 @@ void ComboBox::ImplCalcEditHeight() aBoundRegion, aContentRegion ) ) { const long nNCHeight = aBoundRegion.GetHeight(); - if( mnDDHeight < nNCHeight ) - mnDDHeight = sal::static_int_cast<sal_uInt16>( nNCHeight ); + if (m_pImpl->m_nDDHeight < nNCHeight) + m_pImpl->m_nDDHeight = sal::static_int_cast<sal_uInt16>(nNCHeight); } } @@ -147,14 +200,14 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) WinBits nListStyle = nStyle; if( nStyle & WB_DROPDOWN ) { - mpFloatWin = VclPtr<ImplListBoxFloatingWindow>::Create( this ); - mpFloatWin->SetAutoWidth( true ); - mpFloatWin->SetPopupModeEndHdl( LINK( this, ComboBox, ImplPopupModeEndHdl ) ); + m_pImpl->m_pFloatWin = VclPtr<ImplListBoxFloatingWindow>::Create( this ); + m_pImpl->m_pFloatWin->SetAutoWidth( true ); + m_pImpl->m_pFloatWin->SetPopupModeEndHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplPopupModeEndHdl) ); - mpBtn = VclPtr<ImplBtn>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE ); - ImplInitDropDownButton( mpBtn ); - mpBtn->buttonDownSignal.connect( boost::bind( &ComboBox::ImplClickButtonHandler, this, _1 )); - mpBtn->Show(); + m_pImpl->m_pBtn = VclPtr<ImplBtn>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE ); + ImplInitDropDownButton( m_pImpl->m_pBtn ); + m_pImpl->m_pBtn->buttonDownSignal.connect( boost::bind( &ComboBox::Impl::ImplClickButtonHandler, m_pImpl.get(), _1 )); + m_pImpl->m_pBtn->Show(); nEditStyle |= WB_NOBORDER; nListStyle &= ~WB_BORDER; @@ -170,30 +223,30 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) } } - mpSubEdit.set( VclPtr<Edit>::Create( this, nEditStyle ) ); - mpSubEdit->EnableRTL( false ); - SetSubEdit( mpSubEdit ); - mpSubEdit->SetPosPixel( Point() ); + m_pImpl->m_pSubEdit.set( VclPtr<Edit>::Create( this, nEditStyle ) ); + m_pImpl->m_pSubEdit->EnableRTL( false ); + SetSubEdit( m_pImpl->m_pSubEdit ); + m_pImpl->m_pSubEdit->SetPosPixel( Point() ); EnableAutocomplete( true ); - mpSubEdit->Show(); + m_pImpl->m_pSubEdit->Show(); vcl::Window* pLBParent = this; - if ( mpFloatWin ) - pLBParent = mpFloatWin; - mpImplLB = VclPtr<ImplListBox>::Create( pLBParent, nListStyle|WB_SIMPLEMODE|WB_AUTOHSCROLL ); - mpImplLB->SetPosPixel( Point() ); - mpImplLB->SetSelectHdl( LINK( this, ComboBox, ImplSelectHdl ) ); - mpImplLB->SetCancelHdl( LINK( this, ComboBox, ImplCancelHdl ) ); - mpImplLB->SetDoubleClickHdl( LINK( this, ComboBox, ImplDoubleClickHdl ) ); - mpImplLB->userDrawSignal.connect( boost::bind( &ComboBox::ImplUserDrawHandler, this, _1 ) ); - mpImplLB->SetSelectionChangedHdl( LINK( this, ComboBox, ImplSelectionChangedHdl ) ); - mpImplLB->SetListItemSelectHdl( LINK( this, ComboBox, ImplListItemSelectHdl ) ); - mpImplLB->Show(); - - if ( mpFloatWin ) - mpFloatWin->SetImplListBox( mpImplLB ); + if (m_pImpl->m_pFloatWin) + pLBParent = m_pImpl->m_pFloatWin; + m_pImpl->m_pImplLB = VclPtr<ImplListBox>::Create( pLBParent, nListStyle|WB_SIMPLEMODE|WB_AUTOHSCROLL ); + m_pImpl->m_pImplLB->SetPosPixel( Point() ); + m_pImpl->m_pImplLB->SetSelectHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplSelectHdl) ); + m_pImpl->m_pImplLB->SetCancelHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplCancelHdl) ); + m_pImpl->m_pImplLB->SetDoubleClickHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplDoubleClickHdl) ); + m_pImpl->m_pImplLB->userDrawSignal.connect( boost::bind( &ComboBox::Impl::ImplUserDrawHandler, m_pImpl.get(), _1 ) ); + m_pImpl->m_pImplLB->SetSelectionChangedHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplSelectionChangedHdl) ); + m_pImpl->m_pImplLB->SetListItemSelectHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplListItemSelectHdl) ); + m_pImpl->m_pImplLB->Show(); + + if (m_pImpl->m_pFloatWin) + m_pImpl->m_pFloatWin->SetImplListBox( m_pImpl->m_pImplLB ); else - mpImplLB->GetMainWindow()->AllowGrabFocus( true ); + m_pImpl->m_pImplLB->GetMainWindow()->AllowGrabFocus( true ); ImplCalcEditHeight(); @@ -226,65 +279,66 @@ void ComboBox::ImplLoadRes( const ResId& rResId ) void ComboBox::EnableAutocomplete( bool bEnable, bool bMatchCase ) { - mbMatchCase = bMatchCase; + m_pImpl->m_isMatchCase = bMatchCase; if ( bEnable ) { - if( !mAutocompleteConnection.connected()) - mAutocompleteConnection = mpSubEdit->autocompleteSignal.connect( - boost::bind( &ComboBox::ImplAutocompleteHandler, this, _1 ) ); + if( !m_pImpl->m_AutocompleteConnection.connected()) + m_pImpl->m_AutocompleteConnection = m_pImpl->m_pSubEdit->autocompleteSignal.connect( + boost::bind( &ComboBox::Impl::ImplAutocompleteHandler, m_pImpl.get(), _1 ) ); } else - mAutocompleteConnection.disconnect(); + m_pImpl->m_AutocompleteConnection.disconnect(); } bool ComboBox::IsAutocompleteEnabled() const { - return mAutocompleteConnection.connected(); + return m_pImpl->m_AutocompleteConnection.connected(); } -void ComboBox::ImplClickButtonHandler( ImplBtn* ) +void ComboBox::Impl::ImplClickButtonHandler( ImplBtn* ) { - CallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); - mpSubEdit->GrabFocus(); - if ( !mpImplLB->GetEntryList()->GetMRUCount() ) + m_rThis.CallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); + m_pSubEdit->GrabFocus(); + if (!m_pImplLB->GetEntryList()->GetMRUCount()) ImplUpdateFloatSelection(); else - mpImplLB->SelectEntry( 0 , true ); - mpBtn->SetPressed( true ); - SetSelection( Selection( 0, SELECTION_MAX ) ); - mpFloatWin->StartFloat( true ); - CallEventListeners( VCLEVENT_DROPDOWN_OPEN ); + m_pImplLB->SelectEntry( 0 , true ); + m_pBtn->SetPressed( true ); + m_rThis.SetSelection( Selection( 0, SELECTION_MAX ) ); + m_pFloatWin->StartFloat( true ); + m_rThis.CallEventListeners( VCLEVENT_DROPDOWN_OPEN ); - ImplClearLayoutData(); - if( mpImplLB ) - mpImplLB->GetMainWindow()->ImplClearLayoutData(); + m_rThis.ImplClearLayoutData(); + if (m_pImplLB) + m_pImplLB->GetMainWindow()->ImplClearLayoutData(); } -IMPL_LINK_NOARG(ComboBox, ImplPopupModeEndHdl) +IMPL_LINK_NOARG(ComboBox::Impl, ImplPopupModeEndHdl) { - if( mpFloatWin->IsPopupModeCanceled() ) + if (m_pFloatWin->IsPopupModeCanceled()) { - if ( !mpImplLB->GetEntryList()->IsEntryPosSelected( mpFloatWin->GetPopupModeStartSaveSelection() ) ) + if (!m_pImplLB->GetEntryList()->IsEntryPosSelected( + m_pFloatWin->GetPopupModeStartSaveSelection())) { - mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), true ); - bool bTravelSelect = mpImplLB->IsTravelSelect(); - mpImplLB->SetTravelSelect( true ); - Select(); - mpImplLB->SetTravelSelect( bTravelSelect ); + m_pImplLB->SelectEntry(m_pFloatWin->GetPopupModeStartSaveSelection(), true); + bool bTravelSelect = m_pImplLB->IsTravelSelect(); + m_pImplLB->SetTravelSelect( true ); + m_rThis.Select(); + m_pImplLB->SetTravelSelect( bTravelSelect ); } } - ImplClearLayoutData(); - if( mpImplLB ) - mpImplLB->GetMainWindow()->ImplClearLayoutData(); + m_rThis.ImplClearLayoutData(); + if (m_pImplLB) + m_pImplLB->GetMainWindow()->ImplClearLayoutData(); - mpBtn->SetPressed( false ); - CallEventListeners( VCLEVENT_DROPDOWN_CLOSE ); + m_pBtn->SetPressed( false ); + m_rThis.CallEventListeners( VCLEVENT_DROPDOWN_CLOSE ); return 0; } -void ComboBox::ImplAutocompleteHandler( Edit* pEdit ) +void ComboBox::Impl::ImplAutocompleteHandler( Edit* pEdit ) { Selection aSel = pEdit->GetSelection(); AutocompleteAction eAction = pEdit->GetAutocompleteAction(); @@ -297,7 +351,7 @@ void ComboBox::ImplAutocompleteHandler( Edit* pEdit ) { OUString aFullText = pEdit->GetText(); OUString aStartText = aFullText.copy( 0, (sal_Int32)aSel.Max() ); - sal_Int32 nStart = mpImplLB->GetCurrentPos(); + sal_Int32 nStart = m_pImplLB->GetCurrentPos(); if ( nStart == LISTBOX_ENTRY_NOTFOUND ) nStart = 0; @@ -310,62 +364,66 @@ void ComboBox::ImplAutocompleteHandler( Edit* pEdit ) bForward = false; if (nStart) nStart = nStart - 1; - else if (mpImplLB->GetEntryList()->GetEntryCount()) - nStart = mpImplLB->GetEntryList()->GetEntryCount()-1; + else if (m_pImplLB->GetEntryList()->GetEntryCount()) + nStart = m_pImplLB->GetEntryList()->GetEntryCount()-1; } sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND; - if( ! mbMatchCase ) + if (!m_isMatchCase) { // Try match case insensitive from current position - nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, true ); + nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, true ); if ( nPos == LISTBOX_ENTRY_NOTFOUND ) // Try match case insensitive, but from start - nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, true ); + nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, + bForward ? 0 : (m_pImplLB->GetEntryList()->GetEntryCount()-1), + bForward, true ); } if ( nPos == LISTBOX_ENTRY_NOTFOUND ) // Try match full from current position - nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, false ); + nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, false ); if ( nPos == LISTBOX_ENTRY_NOTFOUND ) // Match full, but from start - nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, false ); + nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, + bForward ? 0 : (m_pImplLB->GetEntryList()->GetEntryCount()-1), + bForward, false ); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { - OUString aText = mpImplLB->GetEntryList()->GetEntryText( nPos ); + OUString aText = m_pImplLB->GetEntryList()->GetEntryText( nPos ); Selection aSelection( aText.getLength(), aStartText.getLength() ); pEdit->SetText( aText, aSelection ); } } } -IMPL_LINK_NOARG(ComboBox, ImplSelectHdl) +IMPL_LINK_NOARG(ComboBox::Impl, ImplSelectHdl) { - bool bPopup = IsInDropDown(); + bool bPopup = m_rThis.IsInDropDown(); bool bCallSelect = false; - if ( mpImplLB->IsSelectionChanged() || bPopup ) + if (m_pImplLB->IsSelectionChanged() || bPopup) { OUString aText; - if ( IsMultiSelectionEnabled() ) + if (m_rThis.IsMultiSelectionEnabled()) { - aText = mpSubEdit->GetText(); + aText = m_pSubEdit->GetText(); // remove all entries to which there is an entry, but which is not selected sal_Int32 nIndex = 0; while ( nIndex >= 0 ) { sal_Int32 nPrevIndex = nIndex; - OUString aToken = aText.getToken( 0, mcMultiSep, nIndex ); + OUString aToken = aText.getToken( 0, m_cMultiSep, nIndex ); sal_Int32 nTokenLen = aToken.getLength(); aToken = comphelper::string::strip(aToken, ' '); - sal_Int32 nP = mpImplLB->GetEntryList()->FindEntry( aToken ); - if ( (nP != LISTBOX_ENTRY_NOTFOUND) && (!mpImplLB->GetEntryList()->IsEntryPosSelected( nP )) ) + sal_Int32 nP = m_pImplLB->GetEntryList()->FindEntry( aToken ); + if ((nP != LISTBOX_ENTRY_NOTFOUND) && (!m_pImplLB->GetEntryList()->IsEntryPosSelected(nP))) { aText = aText.replaceAt( nPrevIndex, nTokenLen, "" ); nIndex = nIndex - nTokenLen; sal_Int32 nSepCount=0; - if ( (nPrevIndex+nSepCount < aText.getLength()) && (aText[nPrevIndex+nSepCount] == mcMultiSep) ) + if ((nPrevIndex+nSepCount < aText.getLength()) && (aText[nPrevIndex+nSepCount] == m_cMultiSep)) { nIndex--; ++nSepCount; @@ -377,87 +435,87 @@ IMPL_LINK_NOARG(ComboBox, ImplSelectHdl) // attach missing entries ::std::set< sal_Int32 > aSelInText; - lcl_GetSelectedEntries( aSelInText, aText, mcMultiSep, mpImplLB->GetEntryList() ); - sal_Int32 nSelectedEntries = mpImplLB->GetEntryList()->GetSelectEntryCount(); + lcl_GetSelectedEntries( aSelInText, aText, m_cMultiSep, m_pImplLB->GetEntryList() ); + sal_Int32 nSelectedEntries = m_pImplLB->GetEntryList()->GetSelectEntryCount(); for ( sal_Int32 n = 0; n < nSelectedEntries; n++ ) { - sal_Int32 nP = mpImplLB->GetEntryList()->GetSelectEntryPos( n ); + sal_Int32 nP = m_pImplLB->GetEntryList()->GetSelectEntryPos( n ); if ( !aSelInText.count( nP ) ) { - if ( !aText.isEmpty() && (aText[ aText.getLength()-1 ] != mcMultiSep) ) - aText += OUString(mcMultiSep); + if (!aText.isEmpty() && (aText[aText.getLength()-1] != m_cMultiSep)) + aText += OUString(m_cMultiSep); if ( !aText.isEmpty() ) aText += " "; // slightly loosen - aText += mpImplLB->GetEntryList()->GetEntryText( nP ); - aText += OUString(mcMultiSep); + aText += m_pImplLB->GetEntryList()->GetEntryText( nP ); + aText += OUString(m_cMultiSep); } } - aText = comphelper::string::stripEnd( aText, mcMultiSep ); + aText = comphelper::string::stripEnd( aText, m_cMultiSep ); } else { - aText = mpImplLB->GetEntryList()->GetSelectEntry( 0 ); + aText = m_pImplLB->GetEntryList()->GetSelectEntry( 0 ); } - mpSubEdit->SetText( aText ); + m_pSubEdit->SetText( aText ); Selection aNewSelection( 0, aText.getLength() ); - if ( IsMultiSelectionEnabled() ) + if (m_rThis.IsMultiSelectionEnabled()) aNewSelection.Min() = aText.getLength(); - mpSubEdit->SetSelection( aNewSelection ); + m_pSubEdit->SetSelection( aNewSelection ); bCallSelect = true; } // #84652# Call GrabFocus and EndPopupMode before calling Select/Modify, but after changing the text - if ( bPopup && !mpImplLB->IsTravelSelect() && - ( !IsMultiSelectionEnabled() || !mpImplLB->GetSelectModifier() ) ) + if (bPopup && !m_pImplLB->IsTravelSelect() && + (!m_rThis.IsMultiSelectionEnabled() || !m_pImplLB->GetSelectModifier())) { - mpFloatWin->EndPopupMode(); - GrabFocus(); + m_pFloatWin->EndPopupMode(); + m_rThis.GrabFocus(); } if ( bCallSelect ) { - mpSubEdit->SetModifyFlag(); - mbSyntheticModify = true; - Modify(); - mbSyntheticModify = false; - Select(); + m_pSubEdit->SetModifyFlag(); + m_isSyntheticModify = true; + m_rThis.Modify(); + m_isSyntheticModify = false; + m_rThis.Select(); } return 0; } -IMPL_LINK_NOARG( ComboBox, ImplListItemSelectHdl ) +IMPL_LINK_NOARG( ComboBox::Impl, ImplListItemSelectHdl ) { - CallEventListeners( VCLEVENT_DROPDOWN_SELECT ); + m_rThis.CallEventListeners( VCLEVENT_DROPDOWN_SELECT ); return 1; } -IMPL_LINK_NOARG(ComboBox, ImplCancelHdl) +IMPL_LINK_NOARG(ComboBox::Impl, ImplCancelHdl) { - if( IsInDropDown() ) - mpFloatWin->EndPopupMode(); + if (m_rThis.IsInDropDown()) + m_pFloatWin->EndPopupMode(); return 1; } -IMPL_LINK( ComboBox, ImplSelectionChangedHdl, void*, n ) +IMPL_LINK( ComboBox::Impl, ImplSelectionChangedHdl, void*, n ) { - if ( !mpImplLB->IsTrackingSelect() ) + if (!m_pImplLB->IsTrackingSelect()) { sal_Int32 nChanged = (sal_Int32)reinterpret_cast<sal_uLong>(n); - if ( !mpSubEdit->IsReadOnly() && mpImplLB->GetEntryList()->IsEntryPosSelected( nChanged ) ) - mpSubEdit->SetText( mpImplLB->GetEntryList()->GetEntryText( nChanged ) ); + if (!m_pSubEdit->IsReadOnly() && m_pImplLB->GetEntryList()->IsEntryPosSelected(nChanged)) + m_pSubEdit->SetText(m_pImplLB->GetEntryList()->GetEntryText(nChanged)); } return 1; } -IMPL_LINK_NOARG(ComboBox, ImplDoubleClickHdl) +IMPL_LINK_NOARG(ComboBox::Impl, ImplDoubleClickHdl) { - DoubleClick(); + m_rThis.DoubleClick(); return 0; } @@ -465,19 +523,19 @@ void ComboBox::ToggleDropDown() { if( IsDropDownBox() ) { - if( mpFloatWin->IsInPopupMode() ) - mpFloatWin->EndPopupMode(); + if (m_pImpl->m_pFloatWin->IsInPopupMode()) + m_pImpl->m_pFloatWin->EndPopupMode(); else { - mpSubEdit->GrabFocus(); - if ( !mpImplLB->GetEntryList()->GetMRUCount() ) - ImplUpdateFloatSelection(); + m_pImpl->m_pSubEdit->GrabFocus(); + if (!m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount()) + m_pImpl->ImplUpdateFloatSelection(); else - mpImplLB->SelectEntry( 0 , true ); + m_pImpl->m_pImplLB->SelectEntry( 0 , true ); CallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); - mpBtn->SetPressed( true ); + m_pImpl->m_pBtn->SetPressed( true ); SetSelection( Selection( 0, SELECTION_MAX ) ); - mpFloatWin->StartFloat( true ); + m_pImpl->m_pFloatWin->StartFloat( true ); CallEventListeners( VCLEVENT_DROPDOWN_OPEN ); } } @@ -485,41 +543,43 @@ void ComboBox::ToggleDropDown() void ComboBox::Select() { - ImplCallEventListenersAndHandler( VCLEVENT_COMBOBOX_SELECT, maSelectHdl, this ); + ImplCallEventListenersAndHandler( VCLEVENT_COMBOBOX_SELECT, m_pImpl->m_SelectHdl, this ); } void ComboBox::DoubleClick() { - ImplCallEventListenersAndHandler( VCLEVENT_COMBOBOX_DOUBLECLICK, maDoubleClickHdl, this ); + ImplCallEventListenersAndHandler( VCLEVENT_COMBOBOX_DOUBLECLICK, m_pImpl->m_DoubleClickHdl, this ); } +bool ComboBox::IsAutoSizeEnabled() const { return m_pImpl->m_isDDAutoSize; } + void ComboBox::EnableAutoSize( bool bAuto ) { - mbDDAutoSize = bAuto; - if ( mpFloatWin ) + m_pImpl->m_isDDAutoSize = bAuto; + if (m_pImpl->m_pFloatWin) { - if ( bAuto && !mpFloatWin->GetDropDownLineCount() ) + if (bAuto && !m_pImpl->m_pFloatWin->GetDropDownLineCount()) { // Adapt to GetListBoxMaximumLineCount here; was on fixed number of five before AdaptDropDownLineCountToMaximum(); } else if ( !bAuto ) { - mpFloatWin->SetDropDownLineCount( 0 ); + m_pImpl->m_pFloatWin->SetDropDownLineCount( 0 ); } } } void ComboBox::EnableDDAutoWidth( bool b ) { - if ( mpFloatWin ) - mpFloatWin->SetAutoWidth( b ); + if (m_pImpl->m_pFloatWin) + m_pImpl->m_pFloatWin->SetAutoWidth( b ); } void ComboBox::SetDropDownLineCount( sal_uInt16 nLines ) { - if ( mpFloatWin ) - mpFloatWin->SetDropDownLineCount( nLines ); + if (m_pImpl->m_pFloatWin) + m_pImpl->m_pFloatWin->SetDropDownLineCount( nLines ); } void ComboBox::AdaptDropDownLineCountToMaximum() @@ -531,8 +591,8 @@ void ComboBox::AdaptDropDownLineCountToMaximum() sal_uInt16 ComboBox::GetDropDownLineCount() const { sal_uInt16 nLines = 0; - if ( mpFloatWin ) - nLines = mpFloatWin->GetDropDownLineCount(); + if (m_pImpl->m_pFloatWin) + nLines = m_pImpl->m_pFloatWin->GetDropDownLineCount(); return nLines; } @@ -541,15 +601,15 @@ void ComboBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, { if( IsDropDownBox() && ( nFlags & PosSizeFlags::Size ) ) { - Size aPrefSz = mpFloatWin->GetPrefSize(); - if ( ( nFlags & PosSizeFlags::Height ) && ( nHeight >= 2*mnDDHeight ) ) - aPrefSz.Height() = nHeight-mnDDHeight; + Size aPrefSz = m_pImpl->m_pFloatWin->GetPrefSize(); + if ((nFlags & PosSizeFlags::Height) && (nHeight >= 2*m_pImpl->m_nDDHeight)) + aPrefSz.Height() = nHeight-m_pImpl->m_nDDHeight; if ( nFlags & PosSizeFlags::Width ) aPrefSz.Width() = nWidth; - mpFloatWin->SetPrefSize( aPrefSz ); + m_pImpl->m_pFloatWin->SetPrefSize( aPrefSz ); if ( IsAutoSizeEnabled() && ! (nFlags & PosSizeFlags::Dropdown) ) - nHeight = mnDDHeight; + nHeight = m_pImpl->m_nDDHeight; } Edit::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); @@ -559,41 +619,44 @@ void ComboBox::Resize() { Control::Resize(); - if (mpSubEdit) + if (m_pImpl->m_pSubEdit) { Size aOutSz = GetOutputSizePixel(); if( IsDropDownBox() ) { - ComboBoxBounds aBounds(calcComboBoxDropDownComponentBounds(aOutSz, + ComboBoxBounds aBounds(m_pImpl->calcComboBoxDropDownComponentBounds(aOutSz, GetWindow(GetWindowType::Border)->GetOutputSizePixel())); - mpSubEdit->SetPosSizePixel(aBounds.aSubEditPos, aBounds.aSubEditSize); - mpBtn->SetPosSizePixel(aBounds.aButtonPos, aBounds.aButtonSize); + m_pImpl->m_pSubEdit->SetPosSizePixel(aBounds.aSubEditPos, aBounds.aSubEditSize); + m_pImpl->m_pBtn->SetPosSizePixel(aBounds.aButtonPos, aBounds.aButtonSize); } else { - mpSubEdit->SetSizePixel( Size( aOutSz.Width(), mnDDHeight ) ); - mpImplLB->setPosSizePixel( 0, mnDDHeight, aOutSz.Width(), aOutSz.Height() - mnDDHeight ); + m_pImpl->m_pSubEdit->SetSizePixel(Size(aOutSz.Width(), m_pImpl->m_nDDHeight)); + m_pImpl->m_pImplLB->setPosSizePixel(0, m_pImpl->m_nDDHeight, + aOutSz.Width(), aOutSz.Height() - m_pImpl->m_nDDHeight); if ( !GetText().isEmpty() ) - ImplUpdateFloatSelection(); + m_pImpl->ImplUpdateFloatSelection(); } } // adjust the size of the FloatingWindow even when invisible // as KEY_PGUP/DOWN is being processed... - if ( mpFloatWin ) - mpFloatWin->SetSizePixel( mpFloatWin->CalcFloatSize() ); + if (m_pImpl->m_pFloatWin) + m_pImpl->m_pFloatWin->SetSizePixel(m_pImpl->m_pFloatWin->CalcFloatSize()); } +bool ComboBox::IsDropDownBox() const { return m_pImpl->m_pFloatWin != nullptr; } + void ComboBox::FillLayoutData() const { mpControlData->mpLayoutData = new vcl::ControlLayoutData(); - AppendLayoutData( *mpSubEdit ); - mpSubEdit->SetLayoutDataParent( this ); - ImplListBoxWindow* rMainWindow = mpImplLB->GetMainWindow(); - if( mpFloatWin ) + AppendLayoutData( *m_pImpl->m_pSubEdit ); + m_pImpl->m_pSubEdit->SetLayoutDataParent( this ); + ImplListBoxWindow* rMainWindow = m_pImpl->m_pImplLB->GetMainWindow(); + if (m_pImpl->m_pFloatWin) { // dropdown mode - if( mpFloatWin->IsReallyVisible() ) + if (m_pImpl->m_pFloatWin->IsReallyVisible()) { AppendLayoutData( *rMainWindow ); rMainWindow->SetLayoutDataParent( this ); @@ -612,60 +675,60 @@ void ComboBox::StateChanged( StateChangedType nType ) if ( nType == StateChangedType::ReadOnly ) { - mpImplLB->SetReadOnly( IsReadOnly() ); - if ( mpBtn ) - mpBtn->Enable( IsEnabled() && !IsReadOnly() ); + m_pImpl->m_pImplLB->SetReadOnly( IsReadOnly() ); + if (m_pImpl->m_pBtn) + m_pImpl->m_pBtn->Enable( IsEnabled() && !IsReadOnly() ); } else if ( nType == StateChangedType::Enable ) { - mpSubEdit->Enable( IsEnabled() ); - mpImplLB->Enable( IsEnabled() && !IsReadOnly() ); - if ( mpBtn ) - mpBtn->Enable( IsEnabled() && !IsReadOnly() ); + m_pImpl->m_pSubEdit->Enable( IsEnabled() ); + m_pImpl->m_pImplLB->Enable( IsEnabled() && !IsReadOnly() ); + if (m_pImpl->m_pBtn) + m_pImpl->m_pBtn->Enable( IsEnabled() && !IsReadOnly() ); Invalidate(); } else if( nType == StateChangedType::UpdateMode ) { - mpImplLB->SetUpdateMode( IsUpdateMode() ); + m_pImpl->m_pImplLB->SetUpdateMode( IsUpdateMode() ); } else if ( nType == StateChangedType::Zoom ) { - mpImplLB->SetZoom( GetZoom() ); - mpSubEdit->SetZoom( GetZoom() ); + m_pImpl->m_pImplLB->SetZoom( GetZoom() ); + m_pImpl->m_pSubEdit->SetZoom( GetZoom() ); ImplCalcEditHeight(); Resize(); } else if ( nType == StateChangedType::ControlFont ) { - mpImplLB->SetControlFont( GetControlFont() ); - mpSubEdit->SetControlFont( GetControlFont() ); + m_pImpl->m_pImplLB->SetControlFont( GetControlFont() ); + m_pImpl->m_pSubEdit->SetControlFont( GetControlFont() ); ImplCalcEditHeight(); Resize(); } else if ( nType == StateChangedType::ControlForeground ) { - mpImplLB->SetControlForeground( GetControlForeground() ); - mpSubEdit->SetControlForeground( GetControlForeground() ); + m_pImpl->m_pImplLB->SetControlForeground( GetControlForeground() ); + m_pImpl->m_pSubEdit->SetControlForeground( GetControlForeground() ); } else if ( nType == StateChangedType::ControlBackground ) { - mpImplLB->SetControlBackground( GetControlBackground() ); - mpSubEdit->SetControlBackground( GetControlBackground() ); + m_pImpl->m_pImplLB->SetControlBackground( GetControlBackground() ); + m_pImpl->m_pSubEdit->SetControlBackground( GetControlBackground() ); } else if ( nType == StateChangedType::Style ) { SetStyle( ImplInitStyle( GetStyle() ) ); - mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) != 0 ); + m_pImpl->m_pImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) != 0 ); } else if( nType == StateChangedType::Mirroring ) { - if( mpBtn ) + if (m_pImpl->m_pBtn) { - mpBtn->EnableRTL( IsRTLEnabled() ); - ImplInitDropDownButton( mpBtn ); + m_pImpl->m_pBtn->EnableRTL( IsRTLEnabled() ); + ImplInitDropDownButton( m_pImpl->m_pBtn ); } - mpSubEdit->CompatStateChanged( StateChangedType::Mirroring ); - mpImplLB->EnableRTL( IsRTLEnabled() ); + m_pImpl->m_pSubEdit->CompatStateChanged( StateChangedType::Mirroring ); + m_pImpl->m_pImplLB->EnableRTL( IsRTLEnabled() ); Resize(); } } @@ -679,13 +742,13 @@ void ComboBox::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - if ( mpBtn ) + if (m_pImpl->m_pBtn) { - mpBtn->SetSettings( GetSettings() ); - ImplInitDropDownButton( mpBtn ); + m_pImpl->m_pBtn->SetSettings( GetSettings() ); + ImplInitDropDownButton( m_pImpl->m_pBtn ); } Resize(); - mpImplLB->Resize(); // not called by ComboBox::Resize() if ImplLB is unchanged + m_pImpl->m_pImplLB->Resize(); // not called by ComboBox::Resize() if ImplLB is unchanged SetBackground(); // due to a hack in Window::UpdateSettings the background must be reset // otherwise it will overpaint NWF drawn comboboxes @@ -701,8 +764,9 @@ bool ComboBox::PreNotify( NotifyEvent& rNEvt ) bool ComboBox::Notify( NotifyEvent& rNEvt ) { bool nDone = false; - if( ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) && ( rNEvt.GetWindow() == mpSubEdit ) - && !IsReadOnly() ) + if ((rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) + && (rNEvt.GetWindow() == m_pImpl->m_pSubEdit) + && !IsReadOnly()) { KeyEvent aKeyEvt = *rNEvt.GetKeyEvent(); sal_uInt16 nKeyCode = aKeyEvt.GetKeyCode().GetCode(); @@ -713,51 +777,55 @@ bool ComboBox::Notify( NotifyEvent& rNEvt ) case KEY_PAGEUP: case KEY_PAGEDOWN: { - ImplUpdateFloatSelection(); - if( ( nKeyCode == KEY_DOWN ) && mpFloatWin && !mpFloatWin->IsInPopupMode() && aKeyEvt.GetKeyCode().IsMod2() ) + m_pImpl->ImplUpdateFloatSelection(); + if ((nKeyCode == KEY_DOWN) && m_pImpl->m_pFloatWin + && !m_pImpl->m_pFloatWin->IsInPopupMode() + && aKeyEvt.GetKeyCode().IsMod2()) { CallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); - mpBtn->SetPressed( true ); - if ( mpImplLB->GetEntryList()->GetMRUCount() ) - mpImplLB->SelectEntry( 0 , true ); + m_pImpl->m_pBtn->SetPressed( true ); + if (m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount()) + m_pImpl->m_pImplLB->SelectEntry( 0 , true ); SetSelection( Selection( 0, SELECTION_MAX ) ); - mpFloatWin->StartFloat( false ); + m_pImpl->m_pFloatWin->StartFloat( false ); CallEventListeners( VCLEVENT_DROPDOWN_OPEN ); nDone = true; } - else if( ( nKeyCode == KEY_UP ) && mpFloatWin && mpFloatWin->IsInPopupMode() && aKeyEvt.GetKeyCode().IsMod2() ) + else if ((nKeyCode == KEY_UP) && m_pImpl->m_pFloatWin + && m_pImpl->m_pFloatWin->IsInPopupMode() + && aKeyEvt.GetKeyCode().IsMod2()) { - mpFloatWin->EndPopupMode(); + m_pImpl->m_pFloatWin->EndPopupMode(); nDone = true; } else { - nDone = mpImplLB->ProcessKeyInput( aKeyEvt ); + nDone = m_pImpl->m_pImplLB->ProcessKeyInput( aKeyEvt ); } } break; case KEY_RETURN: { - if( ( rNEvt.GetWindow() == mpSubEdit ) && IsInDropDown() ) + if ((rNEvt.GetWindow() == m_pImpl->m_pSubEdit) && IsInDropDown()) { - mpImplLB->ProcessKeyInput( aKeyEvt ); + m_pImpl->m_pImplLB->ProcessKeyInput( aKeyEvt ); nDone = true; } } break; } } - else if ( (rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) && mpFloatWin ) + else if ((rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS) && m_pImpl->m_pFloatWin) { - if( mpFloatWin->HasChildPathFocus() ) - mpSubEdit->GrabFocus(); - else if ( mpFloatWin->IsInPopupMode() && !HasChildPathFocus( true ) ) - mpFloatWin->EndPopupMode(); + if (m_pImpl->m_pFloatWin->HasChildPathFocus()) + m_pImpl->m_pSubEdit->GrabFocus(); + else if (m_pImpl->m_pFloatWin->IsInPopupMode() && !HasChildPathFocus(true)) + m_pImpl->m_pFloatWin->EndPopupMode(); } else if( (rNEvt.GetType() == MouseNotifyEvent::COMMAND) && (rNEvt.GetCommandEvent()->GetCommand() == CommandEventId::Wheel) && - (rNEvt.GetWindow() == mpSubEdit) ) + (rNEvt.GetWindow() == m_pImpl->m_pSubEdit) ) { MouseWheelBehaviour nWheelBehavior( GetSettings().GetMouseSettings().GetWheelBehavior() ); if ( ( nWheelBehavior == MouseWheelBehaviour::ALWAYS ) @@ -766,16 +834,17 @@ bool ComboBox::Notify( NotifyEvent& rNEvt ) ) ) { - nDone = mpImplLB->HandleWheelAsCursorTravel( *rNEvt.GetCommandEvent() ); + nDone = m_pImpl->m_pImplLB->HandleWheelAsCursorTravel( *rNEvt.GetCommandEvent() ); } else { nDone = false; // don't eat this event, let the default handling happen (i.e. scroll the context) } } - else if( ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) && ( rNEvt.GetWindow() == mpImplLB->GetMainWindow() ) ) + else if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN) + && (rNEvt.GetWindow() == m_pImpl->m_pImplLB->GetMainWindow())) { - mpSubEdit->GrabFocus(); + m_pImpl->m_pSubEdit->GrabFocus(); } return nDone || Edit::Notify( rNEvt ); @@ -786,7 +855,7 @@ void ComboBox::SetText( const OUString& rStr ) CallEventListeners( VCLEVENT_COMBOBOX_SETTEXT ); Edit::SetText( rStr ); - ImplUpdateFloatSelection(); + m_pImpl->ImplUpdateFloatSelection(); } void ComboBox::SetText( const OUString& rStr, const Selection& rNewSelection ) @@ -794,85 +863,86 @@ void ComboBox::SetText( const OUString& rStr, const Selection& rNewSelection ) CallEventListeners( VCLEVENT_COMBOBOX_SETTEXT ); Edit::SetText( rStr, rNewSelection ); - ImplUpdateFloatSelection(); + m_pImpl->ImplUpdateFloatSelection(); } void ComboBox::Modify() { - if ( !mbSyntheticModify ) - ImplUpdateFloatSelection(); + if (!m_pImpl->m_isSyntheticModify) + m_pImpl->ImplUpdateFloatSelection(); Edit::Modify(); } -void ComboBox::ImplUpdateFloatSelection() +void ComboBox::Impl::ImplUpdateFloatSelection() { - if (!mpImplLB || !mpSubEdit) + if (!m_pImplLB || m_pSubEdit) return; // move text in the ListBox into the visible region - mpImplLB->SetCallSelectionChangedHdl( false ); - if ( !IsMultiSelectionEnabled() ) + m_pImplLB->SetCallSelectionChangedHdl( false ); + if (!m_rThis.IsMultiSelectionEnabled()) { - OUString aSearchStr( mpSubEdit->GetText() ); + OUString aSearchStr( m_pSubEdit->GetText() ); sal_Int32 nSelect = LISTBOX_ENTRY_NOTFOUND; bool bSelect = true; - if ( mpImplLB->GetCurrentPos() != LISTBOX_ENTRY_NOTFOUND ) + if (m_pImplLB->GetCurrentPos() != LISTBOX_ENTRY_NOTFOUND) { - OUString aCurrent = mpImplLB->GetEntryList()->GetEntryText( mpImplLB->GetCurrentPos() ); + OUString aCurrent = m_pImplLB->GetEntryList()->GetEntryText( + m_pImplLB->GetCurrentPos()); if ( aCurrent == aSearchStr ) - nSelect = mpImplLB->GetCurrentPos(); + nSelect = m_pImplLB->GetCurrentPos(); } if ( nSelect == LISTBOX_ENTRY_NOTFOUND ) - nSelect = mpImplLB->GetEntryList()->FindEntry( aSearchStr ); + nSelect = m_pImplLB->GetEntryList()->FindEntry( aSearchStr ); if ( nSelect == LISTBOX_ENTRY_NOTFOUND ) { - nSelect = mpImplLB->GetEntryList()->FindMatchingEntry( aSearchStr ); + nSelect = m_pImplLB->GetEntryList()->FindMatchingEntry( aSearchStr ); bSelect = false; } if( nSelect != LISTBOX_ENTRY_NOTFOUND ) { - if ( !mpImplLB->IsVisible( nSelect ) ) - mpImplLB->ShowProminentEntry( nSelect ); - mpImplLB->SelectEntry( nSelect, bSelect ); + if (!m_pImplLB->IsVisible(nSelect)) + m_pImplLB->ShowProminentEntry( nSelect ); + m_pImplLB->SelectEntry( nSelect, bSelect ); } else { - nSelect = mpImplLB->GetEntryList()->GetSelectEntryPos( 0 ); + nSelect = m_pImplLB->GetEntryList()->GetSelectEntryPos( 0 ); if( nSelect != LISTBOX_ENTRY_NOTFOUND ) - mpImplLB->SelectEntry( nSelect, false ); - mpImplLB->ResetCurrentPos(); + m_pImplLB->SelectEntry( nSelect, false ); + m_pImplLB->ResetCurrentPos(); } } else { ::std::set< sal_Int32 > aSelInText; - lcl_GetSelectedEntries( aSelInText, mpSubEdit->GetText(), mcMultiSep, mpImplLB->GetEntryList() ); - for ( sal_Int32 n = 0; n < mpImplLB->GetEntryList()->GetEntryCount(); n++ ) - mpImplLB->SelectEntry( n, aSelInText.count( n ) ); + lcl_GetSelectedEntries(aSelInText, m_pSubEdit->GetText(), m_cMultiSep, m_pImplLB->GetEntryList()); + for (sal_Int32 n = 0; n < m_pImplLB->GetEntryList()->GetEntryCount(); n++) + m_pImplLB->SelectEntry( n, aSelInText.count( n ) ); } - mpImplLB->SetCallSelectionChangedHdl( true ); + m_pImplLB->SetCallSelectionChangedHdl( true ); } sal_Int32 ComboBox::InsertEntry(const OUString& rStr, sal_Int32 const nPos) { - assert(nPos >= 0 && COMBOBOX_MAX_ENTRIES > mpImplLB->GetEntryList()->GetEntryCount()); + assert(nPos >= 0 && COMBOBOX_MAX_ENTRIES > m_pImpl->m_pImplLB->GetEntryList()->GetEntryCount()); sal_Int32 nRealPos; if (nPos == COMBOBOX_APPEND) nRealPos = nPos; else { - const sal_Int32 nMRUCount = mpImplLB->GetEntryList()->GetMRUCount(); + const sal_Int32 nMRUCount = m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); assert(nPos <= COMBOBOX_MAX_ENTRIES - nMRUCount); nRealPos = nPos + nMRUCount; } - nRealPos = mpImplLB->InsertEntry( nRealPos, rStr ); - nRealPos -= mpImplLB->GetEntryList()->GetMRUCount(); + nRealPos = m_pImpl->m_pImplLB->InsertEntry( nRealPos, rStr ); + nRealPos -= m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, reinterpret_cast<void*>(nRealPos) ); return nRealPos; } @@ -880,20 +950,20 @@ sal_Int32 ComboBox::InsertEntry(const OUString& rStr, sal_Int32 const nPos) sal_Int32 ComboBox::InsertEntryWithImage( const OUString& rStr, const Image& rImage, sal_Int32 const nPos) { - assert(nPos >= 0 && COMBOBOX_MAX_ENTRIES > mpImplLB->GetEntryList()->GetEntryCount()); + assert(nPos >= 0 && COMBOBOX_MAX_ENTRIES > m_pImpl->m_pImplLB->GetEntryList()->GetEntryCount()); sal_Int32 nRealPos; if (nPos == COMBOBOX_APPEND) nRealPos = nPos; else { - const sal_Int32 nMRUCount = mpImplLB->GetEntryList()->GetMRUCount(); + const sal_Int32 nMRUCount = m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); assert(nPos <= COMBOBOX_MAX_ENTRIES - nMRUCount); nRealPos = nPos + nMRUCount; } - nRealPos = mpImplLB->InsertEntry( nRealPos, rStr, rImage ); - nRealPos -= mpImplLB->GetEntryList()->GetMRUCount(); + nRealPos = m_pImpl->m_pImplLB->InsertEntry( nRealPos, rStr, rImage ); + nRealPos -= m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, reinterpret_cast<void*>(nRealPos) ); return nRealPos; } @@ -905,81 +975,92 @@ void ComboBox::RemoveEntry( const OUString& rStr ) void ComboBox::RemoveEntryAt(sal_Int32 const nPos) { - const sal_Int32 nMRUCount = mpImplLB->GetEntryList()->GetMRUCount(); + const sal_Int32 nMRUCount = m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); if (nPos < 0 || nPos > COMBOBOX_MAX_ENTRIES - nMRUCount) return; - mpImplLB->RemoveEntry( nPos + nMRUCount ); + m_pImpl->m_pImplLB->RemoveEntry( nPos + nMRUCount ); CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, reinterpret_cast<void*>(nPos) ); } void ComboBox::Clear() { - mpImplLB->Clear(); + m_pImpl->m_pImplLB->Clear(); CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, reinterpret_cast<void*>(-1) ); } Image ComboBox::GetEntryImage( sal_Int32 nPos ) const { - if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) ) - return mpImplLB->GetEntryList()->GetEntryImage( nPos ); + if (m_pImpl->m_pImplLB->GetEntryList()->HasEntryImage(nPos)) + return m_pImpl->m_pImplLB->GetEntryList()->GetEntryImage( nPos ); return Image(); } sal_Int32 ComboBox::GetEntryPos( const OUString& rStr ) const { - sal_Int32 nPos = mpImplLB->GetEntryList()->FindEntry( rStr ); + sal_Int32 nPos = m_pImpl->m_pImplLB->GetEntryList()->FindEntry( rStr ); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) - nPos -= mpImplLB->GetEntryList()->GetMRUCount(); + nPos -= m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); return nPos; } sal_Int32 ComboBox::GetEntryPos( const void* pData ) const { - sal_Int32 nPos = mpImplLB->GetEntryList()->FindEntry( pData ); + sal_Int32 nPos = m_pImpl->m_pImplLB->GetEntryList()->FindEntry( pData ); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) - nPos = nPos - mpImplLB->GetEntryList()->GetMRUCount(); + nPos = nPos - m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); return nPos; } OUString ComboBox::GetEntry( sal_Int32 nPos ) const { - const sal_Int32 nMRUCount = mpImplLB->GetEntryList()->GetMRUCount(); + const sal_Int32 nMRUCount = m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); if (nPos < 0 || nPos > COMBOBOX_MAX_ENTRIES - nMRUCount) return OUString(); - return mpImplLB->GetEntryList()->GetEntryText( nPos + nMRUCount ); + return m_pImpl->m_pImplLB->GetEntryList()->GetEntryText( nPos + nMRUCount ); } sal_Int32 ComboBox::GetEntryCount() const { - return mpImplLB->GetEntryList()->GetEntryCount() - mpImplLB->GetEntryList()->GetMRUCount(); + return m_pImpl->m_pImplLB->GetEntryList()->GetEntryCount() - m_pImpl->m_pImplLB->GetEntryList()->GetMRUCount(); } bool ComboBox::IsTravelSelect() const { - return mpImplLB->IsTravelSelect(); + return m_pImpl->m_pImplLB->IsTravelSelect(); } bool ComboBox::IsInDropDown() const { - return mpFloatWin && mpFloatWin->IsInPopupMode(); + return m_pImpl->m_pFloatWin && m_pImpl->m_pFloatWin->IsInPopupMode(); } +void ComboBox::SetMultiSelectionSeparator(sal_Unicode cSep) { m_pImpl->m_cMultiSep = cSep; } +sal_Unicode ComboBox::GetMultiSelectionSeparator() const { return m_pImpl->m_cMultiSep; } + void ComboBox::EnableMultiSelection( bool bMulti ) { - mpImplLB->EnableMultiSelection( bMulti, false ); - mpImplLB->SetMultiSelectionSimpleMode( true ); + m_pImpl->m_pImplLB->EnableMultiSelection( bMulti, false ); + m_pImpl->m_pImplLB->SetMultiSelectionSimpleMode( true ); } bool ComboBox::IsMultiSelectionEnabled() const { - return mpImplLB->IsMultiSelectionEnabled(); + return m_pImpl->m_pImplLB->IsMultiSelectionEnabled(); } +void ComboBox::SetSelectHdl(const Link<>& rLink) { m_pImpl->m_SelectHdl = rLink; } + +const Link<>& ComboBox::GetSelectHdl() const { return m_pImpl->m_SelectHdl; } + +void ComboBox::SetDoubleClickHdl(const Link<>& rLink) { m_pImpl->m_DoubleClickHdl = rLink; } + +const Link<>& ComboBox::GetDoubleClickHdl() const { return m_pImpl->m_DoubleClickHdl; } + long ComboBox::CalcWindowSizePixel( sal_uInt16 nLines ) const { - return mpImplLB->GetEntryHeight() * nLines; + return m_pImpl->m_pImplLB->GetEntryHeight() * nLines; } Size ComboBox::GetOptimalSize() const @@ -1014,30 +1095,30 @@ Size ComboBox::CalcMinimumSize() const { Size aSz; - if (!mpImplLB) + if (!m_pImpl->m_pImplLB) ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits