summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-12-17 12:04:21 +1100
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-17 20:06:49 +0100
commitab0aa44cbc9d1ad33247e2ee0df8852c925dbe5c (patch)
tree03ea08cb1631defb317f1858414d9839ef9cead9 /sfx2
parent67444cbe5dae6e24db776ab712017ad063319276 (diff)
sfx2: remove SfxInPlaceClientList
After commit 21680809, which converted SfxInPlaceClientList to a vector, the class name is out of whack. There is no need for SfxInPlaceClientList, just use std::vector, also renamed the variables that use the class. Change-Id: I9f0c8d5800376617ac29fbe7da140af2703c0de7 Reviewed-on: https://gerrit.libreoffice.org/46631 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewimp.hxx20
-rw-r--r--sfx2/source/view/viewsh.cxx32
2 files changed, 24 insertions, 28 deletions
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 6752ebaf788e..2bb7cffb8a95 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -34,28 +34,24 @@
#include <vector>
class SfxBaseController;
-
typedef std::vector<SfxShell*> SfxShellArr_Impl;
-
class SfxClipboardChangeListener;
-using SfxInPlaceClientList = std::vector<SfxInPlaceClient*>;
-
struct SfxViewShell_Impl
{
- ::osl::Mutex aMutex;
+ ::osl::Mutex aMutex;
::comphelper::OInterfaceContainerHelper2 aInterceptorContainer;
- SfxShellArr_Impl aArr;
- Size aMargin;
- bool m_bHasPrintOptions;
- bool m_bIsShowView;
- sal_uInt16 m_nFamily;
+ SfxShellArr_Impl aArr;
+ Size aMargin;
+ bool m_bHasPrintOptions;
+ bool m_bIsShowView;
+ sal_uInt16 m_nFamily;
::rtl::Reference<SfxBaseController> m_pController;
std::unique_ptr< ::svt::AcceleratorExecute > m_xAccExec;
::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
std::shared_ptr< vcl::PrinterController > m_xPrinterController;
- mutable SfxInPlaceClientList* mpIPClientList;
+ mutable std::vector<SfxInPlaceClient*>* mpIPClients;
LibreOfficeKitCallback m_pLibreOfficeKitViewCallback;
void* m_pLibreOfficeKitViewData;
@@ -67,7 +63,7 @@ struct SfxViewShell_Impl
explicit SfxViewShell_Impl(SfxViewShellFlags const nFlags);
~SfxViewShell_Impl();
- SfxInPlaceClientList* GetIPClientList_Impl( bool bCreate = true ) const;
+ std::vector< SfxInPlaceClient* >* GetIPClients_Impl(bool bCreate = true) const;
};
#endif
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 2c38ac071a31..7c3b25eedaa6 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -215,7 +215,7 @@ SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
, m_bIsShowView(!(nFlags & SfxViewShellFlags::NO_SHOW))
, m_nFamily(0xFFFF) // undefined, default set by TemplateDialog
, m_pController(nullptr)
-, mpIPClientList(nullptr)
+, mpIPClients(nullptr)
, m_pLibreOfficeKitViewCallback(nullptr)
, m_pLibreOfficeKitViewData(nullptr)
, m_bTiledSearching(false)
@@ -224,14 +224,14 @@ SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
SfxViewShell_Impl::~SfxViewShell_Impl()
{
- DELETEZ(mpIPClientList);
+ DELETEZ(mpIPClients);
}
-SfxInPlaceClientList* SfxViewShell_Impl::GetIPClientList_Impl( bool bCreate ) const
+std::vector< SfxInPlaceClient* > *SfxViewShell_Impl::GetIPClients_Impl( bool bCreate ) const
{
- if (!mpIPClientList && bCreate)
- mpIPClientList = new SfxInPlaceClientList;
- return mpIPClientList;
+ if (!mpIPClients && bCreate)
+ mpIPClients = new std::vector< SfxInPlaceClient* >;
+ return mpIPClients;
}
SFX_IMPL_SUPERCLASS_INTERFACE(SfxViewShell,SfxShell)
@@ -351,18 +351,18 @@ OUString impl_searchFormatTypeForApp(const css::uno::Reference< css::frame::XFra
void SfxViewShell::NewIPClient_Impl( SfxInPlaceClient *pIPClient )
{
- pImpl->GetIPClientList_Impl()->push_back(pIPClient);
+ pImpl->GetIPClients_Impl()->push_back(pIPClient);
}
void SfxViewShell::IPClientGone_Impl( SfxInPlaceClient const *pIPClient )
{
- SfxInPlaceClientList* pClientList = pImpl->GetIPClientList_Impl();
+ std::vector< SfxInPlaceClient* > *pClients = pImpl->GetIPClients_Impl();
- for( SfxInPlaceClientList::iterator it = pClientList->begin(); it != pClientList->end(); ++it )
+ for(std::vector< SfxInPlaceClient* >::iterator it = pClients->begin(); it != pClients->end(); ++it)
{
if ( *it == pIPClient )
{
- pClientList->erase( it );
+ pClients->erase( it );
break;
}
}
@@ -770,7 +770,7 @@ SfxInPlaceClient* SfxViewShell::FindIPClient
vcl::Window* pObjParentWin
) const
{
- SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false);
+ std::vector< SfxInPlaceClient* > *pClients = pImpl->GetIPClients_Impl(false);
if ( !pClients )
return nullptr;
@@ -795,7 +795,7 @@ SfxInPlaceClient* SfxViewShell::GetIPClient() const
SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
{
// this method is needed as long as SFX still manages the border space for ChildWindows (see SfxFrame::Resize)
- SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false);
+ std::vector< SfxInPlaceClient* > *pClients = pImpl->GetIPClients_Impl(false);
if ( !pClients )
return nullptr;
@@ -810,7 +810,7 @@ SfxInPlaceClient* SfxViewShell::GetUIActiveIPClient_Impl() const
SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
{
- SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false);
+ std::vector< SfxInPlaceClient* > *pClients = pImpl->GetIPClients_Impl(false);
if ( !pClients )
return nullptr;
@@ -1575,7 +1575,7 @@ void SfxViewShell::ShowCursor( bool /*bOn*/ )
void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient const *pIP )
{
- SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false);
+ std::vector< SfxInPlaceClient* > *pClients = pImpl->GetIPClients_Impl(false);
if ( !pClients )
return;
@@ -1589,7 +1589,7 @@ void SfxViewShell::ResetAllClients_Impl( SfxInPlaceClient const *pIP )
void SfxViewShell::DisconnectAllClients()
{
- SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false);
+ std::vector< SfxInPlaceClient* > *pClients = pImpl->GetIPClients_Impl(false);
if ( !pClients )
return;
@@ -1606,7 +1606,7 @@ void SfxViewShell::QueryObjAreaPixel( tools::Rectangle& ) const
void SfxViewShell::VisAreaChanged()
{
- SfxInPlaceClientList *pClients = pImpl->GetIPClientList_Impl(false);
+ std::vector< SfxInPlaceClient* > *pClients = pImpl->GetIPClients_Impl(false);
if ( !pClients )
return;