diff options
| author | Michael Weghorn <m.weghorn@posteo.de> | 2024-11-26 15:42:33 +0100 |
|---|---|---|
| committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-11-26 17:49:07 +0100 |
| commit | 649d2de3dc195c457875ff2b031920e876cd0575 (patch) | |
| tree | d66660734cd0ebb59d17270ac3f6b168f0aee714 /svtools | |
| parent | b5ac3d2092fce7d78f39ee501b509a353b8cd173 (diff) | |
svtools: Move THeaderCellMapFunctorDispose struct out of impl class
Move to anonymous namespace in the only .cxx where it's used.
Change-Id: Ifa1219c49e5673d3440a889b2fd814059a29b5bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177351
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'svtools')
| -rw-r--r-- | svtools/source/brwbox/brwbox1.cxx | 20 | ||||
| -rw-r--r-- | svtools/source/brwbox/brwimpl.hxx | 18 |
2 files changed, 19 insertions, 19 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 185fc13848b5..a368eab2407a 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -48,12 +48,30 @@ using namespace svt; namespace { + struct THeaderCellMapFunctorDispose + { + void operator()(const svt::BrowseBoxImpl::THeaderCellMap::value_type& _aType) + { + css::uno::Reference<css::lang::XComponent> xComp(_aType.second, css::uno::UNO_QUERY); + OSL_ENSURE(xComp.is() || !_aType.second.is(), "THeaderCellMapFunctorDispose: invalid accessible cell (no XComponent)!"); + if (xComp.is()) + try + { + xComp->dispose(); + } + catch(const css::uno::Exception&) + { + TOOLS_WARN_EXCEPTION("svtools", "THeaderCellMapFunctorDispose"); + } + } + }; + void disposeAndClearHeaderCell(::svt::BrowseBoxImpl::THeaderCellMap& _rHeaderCell) { ::std::for_each( _rHeaderCell.begin(), _rHeaderCell.end(), - ::svt::BrowseBoxImpl::THeaderCellMapFunctorDispose() + THeaderCellMapFunctorDispose() ); _rHeaderCell.clear(); } diff --git a/svtools/source/brwbox/brwimpl.hxx b/svtools/source/brwbox/brwimpl.hxx index 8c7017675a3f..6ce6fee6ed3c 100644 --- a/svtools/source/brwbox/brwimpl.hxx +++ b/svtools/source/brwbox/brwimpl.hxx @@ -35,24 +35,6 @@ namespace svt public: typedef ::std::map< sal_Int32, css::uno::Reference< css::accessibility::XAccessible > > THeaderCellMap; - struct THeaderCellMapFunctorDispose - { - void operator()(const THeaderCellMap::value_type& _aType) - { - css::uno::Reference< css::lang::XComponent > xComp( _aType.second, css::uno::UNO_QUERY ); - OSL_ENSURE( xComp.is() || !_aType.second.is(), "THeaderCellMapFunctorDispose: invalid accessible cell (no XComponent)!" ); - if ( xComp.is() ) - try - { - xComp->dispose(); - } - catch( const css::uno::Exception& ) - { - TOOLS_WARN_EXCEPTION( "svtools", "THeaderCellMapFunctorDispose" ); - } - } - }; - public: vcl::AccessibleFactoryAccess m_aFactoryAccess; rtl::Reference<vcl::IAccessibleBrowseBox> m_pAccessible; |
