summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-13 14:01:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-13 17:03:26 +0200
commit601e9d4badd84c3c4824090f1bc39bef3b64cbd1 (patch)
tree90267c806f8967606a0c9769b117f6b881a8c515 /svx
parent17d4221c047eac47e26465ddc72d13fb89284f57 (diff)
inline some typedefs
Change-Id: I1608e03ff9f6fbc55987010e88897e034b690b3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115552 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/filtnav.cxx4
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/form/fmvwimp.cxx18
-rw-r--r--svx/source/inc/fmvwimp.hxx12
4 files changed, 17 insertions, 21 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 1ed83512fadb..f5cc1e1358df 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1559,8 +1559,6 @@ IMPL_LINK(FmFilterNavigator, PopupMenuHdl, const CommandEvent&, rEvt, bool)
return bHandled;
}
-typedef std::vector<std::unique_ptr<weld::TreeIter>> iter_vector;
-
bool FmFilterNavigator::getNextEntry(weld::TreeIter& rEntry)
{
bool bEntry = m_xTreeView->iter_next(rEntry);
@@ -1608,7 +1606,7 @@ IMPL_LINK(FmFilterNavigator, KeyInputHdl, const ::KeyEvent&, rKEvt, bool)
break;
- iter_vector aSelected;
+ std::vector<std::unique_ptr<weld::TreeIter>> aSelected;
m_xTreeView->selected_foreach([this, &aSelected](weld::TreeIter& rEntry){
aSelected.emplace_back(m_xTreeView->make_iterator(&rEntry));
return false;
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index ba2875998cdc..f0162740f8c6 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -2913,7 +2913,7 @@ void FmXFormShell::startFiltering_Lock()
else
xContainer = getActiveController_Lock()->getContainer();
- PFormViewPageWindowAdapter pAdapter = pXView->findWindow( xContainer );
+ rtl::Reference< FormViewPageWindowAdapter > pAdapter = pXView->findWindow( xContainer );
if ( pAdapter.is() )
{
const ::std::vector< Reference< runtime::XFormController> >& rControllerList = pAdapter->GetList();
@@ -2986,7 +2986,7 @@ void FmXFormShell::stopFiltering_Lock(bool bSave)
else
xContainer = getActiveController_Lock()->getContainer();
- PFormViewPageWindowAdapter pAdapter = pXView->findWindow(xContainer);
+ rtl::Reference< FormViewPageWindowAdapter > pAdapter = pXView->findWindow(xContainer);
if ( pAdapter.is() )
{
const ::std::vector< Reference< runtime::XFormController > >& rControllerList = pAdapter->GetList();
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 5bcb4ecb49d6..0a2440cbab1c 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -491,7 +491,7 @@ void SAL_CALL FmXFormView::elementInserted(const ContainerEvent& evt)
}
else
{
- PFormViewPageWindowAdapter pAdapter = findWindow( xControlContainer );
+ rtl::Reference< FormViewPageWindowAdapter > pAdapter = findWindow( xControlContainer );
if ( pAdapter.is() )
pAdapter->updateTabOrder( xForm );
}
@@ -514,10 +514,10 @@ void SAL_CALL FmXFormView::elementRemoved(const ContainerEvent& /*evt*/)
}
-PFormViewPageWindowAdapter FmXFormView::findWindow( const Reference< XControlContainer >& _rxCC ) const
+rtl::Reference< FormViewPageWindowAdapter > FmXFormView::findWindow( const Reference< XControlContainer >& _rxCC ) const
{
auto i = std::find_if(m_aPageWindowAdapters.begin(), m_aPageWindowAdapters.end(),
- [&_rxCC](const PFormViewPageWindowAdapter& rpAdapter) { return _rxCC == rpAdapter->getControlContainer(); });
+ [&_rxCC](const rtl::Reference< FormViewPageWindowAdapter >& rpAdapter) { return _rxCC == rpAdapter->getControlContainer(); });
if (i != m_aPageWindowAdapters.end())
return *i;
return nullptr;
@@ -535,7 +535,7 @@ void FmXFormView::addWindow(const SdrPageWindow& rWindow)
&& ( !findWindow( xCC ).is() )
)
{
- PFormViewPageWindowAdapter pAdapter = new FormViewPageWindowAdapter( comphelper::getProcessComponentContext(), rWindow, this );
+ rtl::Reference< FormViewPageWindowAdapter > pAdapter = new FormViewPageWindowAdapter( comphelper::getProcessComponentContext(), rWindow, this );
m_aPageWindowAdapters.push_back( pAdapter );
// listen at the ControlContainer to notice changes
@@ -554,7 +554,7 @@ void FmXFormView::removeWindow( const Reference< XControlContainer >& _rxCC )
// - the control container for a window is removed while the active mode is on
auto i = std::find_if(m_aPageWindowAdapters.begin(), m_aPageWindowAdapters.end(),
- [&_rxCC](const PFormViewPageWindowAdapter& rpAdapter) { return _rxCC == rpAdapter->getControlContainer(); });
+ [&_rxCC](const rtl::Reference< FormViewPageWindowAdapter >& rpAdapter) { return _rxCC == rpAdapter->getControlContainer(); });
if (i != m_aPageWindowAdapters.end())
{
Reference< XContainer > xContainer( _rxCC, UNO_QUERY );
@@ -601,7 +601,7 @@ void FmXFormView::resumeTabOrderUpdate()
// update the tab orders for all components which were collected since the suspendTabOrderUpdate call.
for (const auto& rContainer : m_aNeedTabOrderUpdate)
{
- PFormViewPageWindowAdapter pAdapter = findWindow( rContainer.first );
+ rtl::Reference< FormViewPageWindowAdapter > pAdapter = findWindow( rContainer.first );
if ( !pAdapter.is() )
continue;
@@ -695,7 +695,7 @@ IMPL_LINK_NOARG(FmXFormView, OnActivate, void*, void)
find_active_databaseform fad(pShImpl->getActiveController_Lock());
vcl::Window* pWindow = const_cast<vcl::Window*>(static_cast<const vcl::Window*>(m_pView->GetActualOutDev()));
- PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? nullptr : m_aPageWindowAdapters[0];
+ rtl::Reference< FormViewPageWindowAdapter > pAdapter = m_aPageWindowAdapters.empty() ? nullptr : m_aPageWindowAdapters[0];
for (const auto& rpPageWindowAdapter : m_aPageWindowAdapters)
{
if ( pWindow == rpPageWindowAdapter->getWindow() )
@@ -876,7 +876,7 @@ Reference< XFormController > FmXFormView::getFormController( const Reference< XF
{
Reference< XFormController > xController;
- for (const PFormViewPageWindowAdapter& pAdapter : m_aPageWindowAdapters)
+ for (const rtl::Reference< FormViewPageWindowAdapter >& pAdapter : m_aPageWindowAdapters)
{
if ( !pAdapter )
{
@@ -909,7 +909,7 @@ IMPL_LINK_NOARG(FmXFormView, OnAutoFocus, void*, void)
FmFormPage* pPage = dynamic_cast<FmFormPage*>( pSdrPage );
Reference< XIndexAccess > xForms( pPage ? Reference< XIndexAccess >( pPage->GetForms() ) : Reference< XIndexAccess >() );
- const PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? nullptr : m_aPageWindowAdapters[0];
+ const rtl::Reference< FormViewPageWindowAdapter > pAdapter = m_aPageWindowAdapters.empty() ? nullptr : m_aPageWindowAdapters[0];
const vcl::Window* pWindow = pAdapter ? pAdapter->getWindow() : nullptr;
ENSURE_OR_RETURN_VOID( xForms.is() && pWindow, "FmXFormView::OnAutoFocus: could not collect all essentials!" );
diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx
index dc56630c6ef3..ee85e565e4c0 100644
--- a/svx/source/inc/fmvwimp.hxx
+++ b/svx/source/inc/fmvwimp.hxx
@@ -127,9 +127,6 @@ private:
vcl::Window* getWindow() const {return m_pWindow;}
};
-typedef ::rtl::Reference< FormViewPageWindowAdapter > PFormViewPageWindowAdapter;
-typedef ::std::set< css::uno::Reference< css::form::XForm > > SetOfForms;
-typedef ::std::map< css::uno::Reference< css::awt::XControlContainer >, SetOfForms > MapControlContainerToSetOfForms;
class SdrModel;
class FmXFormView : public ::cppu::WeakImplHelper<
@@ -157,10 +154,11 @@ class FmXFormView : public ::cppu::WeakImplHelper<
css::sdb::SQLErrorEvent
m_aAsyncError; // error event which is to be displayed asyn. See m_nErrorMessageEvent.
- std::vector< PFormViewPageWindowAdapter >
+ std::vector< rtl::Reference< FormViewPageWindowAdapter > >
m_aPageWindowAdapters; // to be filled in alive mode only
- MapControlContainerToSetOfForms
- m_aNeedTabOrderUpdate;
+ typedef ::std::set< css::uno::Reference< css::form::XForm > > SetOfForms;
+ std::map< css::uno::Reference< css::awt::XControlContainer >, SetOfForms >
+ m_aNeedTabOrderUpdate; // map control container to set of forms
// list of selected objects, used for restoration when switching from Alive to DesignMode
SdrMarkList m_aMark;
@@ -206,7 +204,7 @@ public:
virtual void SAL_CALL focusLost( const css::awt::FocusEvent& e ) override;
FmFormView* getView() const {return m_pView;}
- PFormViewPageWindowAdapter findWindow( const css::uno::Reference< css::awt::XControlContainer >& _rxCC ) const;
+ rtl::Reference< FormViewPageWindowAdapter > findWindow( const css::uno::Reference< css::awt::XControlContainer >& _rxCC ) const;
css::uno::Reference< css::form::runtime::XFormController >
getFormController( const css::uno::Reference< css::form::XForm >& _rxForm, const OutputDevice& _rDevice ) const;