diff options
Diffstat (limited to 'scripting/source/provider/BrowseNodeFactoryImpl.cxx')
-rw-r--r-- | scripting/source/provider/BrowseNodeFactoryImpl.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index b27ac817329f..a0ff04cf2e1f 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -123,23 +123,20 @@ public: virtual sal_Bool SAL_CALL hasChildNodes() override { - if ( !m_Nodes.empty() ) + for (Reference<XBrowseNode> & xNode : m_Nodes) { - for (Reference<XBrowseNode> & xNode : m_Nodes) + try { - try - { - if ( xNode->hasChildNodes() ) - { - return true; - } - } - catch ( Exception& ) + if ( xNode->hasChildNodes() ) { - // some form of exception getting child nodes so move - // on to the next one + return true; } } + catch ( Exception& ) + { + // some form of exception getting child nodes so move + // on to the next one + } } return false; |