loplugin:expandablemethods in UnoControls..vbahelper
Change-Id: I7e607df2a1f6d4eb207ee0d3eb30f41fac44a0c6 Reviewed-on: https://gerrit.libreoffice.org/30262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
97f0fbe583
commit
c5498c310f
8 changed files with 25 additions and 78 deletions
|
@ -379,8 +379,6 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
void impl_releasePeer();
|
||||
|
||||
OMRCListenerMultiplexerHelper* impl_getMultiplexer();
|
||||
|
||||
css::uno::Reference< css::uno::XComponentContext > m_xComponentContext;
|
||||
|
|
|
@ -231,7 +231,25 @@ void SAL_CALL BaseControl::dispose() throw( RuntimeException, std::exception )
|
|||
|
||||
// release context and peer
|
||||
m_xContext.clear();
|
||||
impl_releasePeer();
|
||||
if ( m_xPeer.is() )
|
||||
{
|
||||
if ( m_xGraphicsPeer.is() )
|
||||
{
|
||||
removePaintListener( this );
|
||||
removeWindowListener( this );
|
||||
m_xGraphicsPeer.clear();
|
||||
}
|
||||
|
||||
m_xPeer->dispose();
|
||||
m_xPeerWindow.clear();
|
||||
m_xPeer.clear();
|
||||
|
||||
if ( m_pMultiplexer != nullptr )
|
||||
{
|
||||
// take changes on multiplexer
|
||||
m_pMultiplexer->setPeer( Reference< XWindow >() );
|
||||
}
|
||||
}
|
||||
|
||||
// release view
|
||||
if ( m_xGraphicsView.is() )
|
||||
|
@ -741,34 +759,6 @@ void BaseControl::impl_recalcLayout( const WindowEvent& /*aEvent*/ )
|
|||
// But we make it not pure virtual because it's not necessary for all derived classes!
|
||||
}
|
||||
|
||||
// protected method
|
||||
|
||||
|
||||
// private method
|
||||
|
||||
void BaseControl::impl_releasePeer()
|
||||
{
|
||||
if ( m_xPeer.is() )
|
||||
{
|
||||
if ( m_xGraphicsPeer.is() )
|
||||
{
|
||||
removePaintListener( this );
|
||||
removeWindowListener( this );
|
||||
m_xGraphicsPeer.clear();
|
||||
}
|
||||
|
||||
m_xPeer->dispose();
|
||||
m_xPeerWindow.clear();
|
||||
m_xPeer.clear();
|
||||
|
||||
if ( m_pMultiplexer != nullptr )
|
||||
{
|
||||
// take changes on multiplexer
|
||||
m_pMultiplexer->setPeer( Reference< XWindow >() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// private method
|
||||
|
||||
OMRCListenerMultiplexerHelper* BaseControl::impl_getMultiplexer()
|
||||
|
|
|
@ -142,13 +142,6 @@ namespace utl
|
|||
css::uno::Sequence< OUString >
|
||||
getNodeNames() const throw();
|
||||
|
||||
/** enables or disables name escaping when accessing direct children<p/>
|
||||
Escaping is disabled by default, usually you enable it for set nodes (e.g. with calling setEscape(isSetNode)).
|
||||
Once escaping is enabled, you should not access indirect children (e.g. openNode("child/grandchild"), 'cause
|
||||
escaping for such names may not be supported by the underlying API objects.
|
||||
@see getEscape
|
||||
*/
|
||||
void setEscape(bool _bEnable);
|
||||
/** get the flag specifying the current escape behaviour
|
||||
@see setEscape
|
||||
*/
|
||||
|
|
|
@ -120,23 +120,6 @@ namespace utl
|
|||
*/
|
||||
void read( );
|
||||
|
||||
/** updates the configuration data
|
||||
|
||||
<p>The current values in memory (your exchange locations registered using the registerXXX methods) is
|
||||
forwarded to their respective configuration nodes.</p>
|
||||
|
||||
<p>Note that calling <method>write</method>(<sal_True/) is the same as calling <method>commit</method>(<TRUE/>).</p>
|
||||
|
||||
@precond
|
||||
The access must have been created for update access
|
||||
|
||||
You must explicitly call <method>commit</method> to make your changes persistent.
|
||||
|
||||
@see read
|
||||
@see commit
|
||||
*/
|
||||
void write();
|
||||
|
||||
/** commits any changes done
|
||||
|
||||
<p>Note that calling <method>write</method>(<sal_True/) is the same as calling <method>commit</method>(<TRUE/>).</p>
|
||||
|
|
|
@ -254,8 +254,6 @@ public:
|
|||
|
||||
static void basicexception( const css::uno::Exception& ex ) throw( css::script::BasicErrorException );
|
||||
|
||||
static void runtimeexception( const OUString& DetailedMessage, const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ) throw( css::uno::RuntimeException );
|
||||
|
||||
static void runtimeexception( int err, const OUString& additionalArgument ) throw( css::uno::RuntimeException );
|
||||
};
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace utl
|
|||
startComponentListening(xConfigNodeComp);
|
||||
|
||||
if (isValid())
|
||||
setEscape(isSetNode());
|
||||
m_bEscapeNames = isSetNode() && Reference< XStringEscape >::query(m_xDirectAccess).is();
|
||||
}
|
||||
|
||||
OConfigurationNode::OConfigurationNode(const OConfigurationNode& _rSource)
|
||||
|
@ -303,11 +303,6 @@ namespace utl
|
|||
return OConfigurationNode();
|
||||
}
|
||||
|
||||
void OConfigurationNode::setEscape(bool _bEnable)
|
||||
{
|
||||
m_bEscapeNames = _bEnable && Reference< XStringEscape >::query(m_xDirectAccess).is();
|
||||
}
|
||||
|
||||
bool OConfigurationNode::isSetNode() const
|
||||
{
|
||||
bool bIsSet = false;
|
||||
|
|
|
@ -271,20 +271,14 @@ namespace utl
|
|||
);
|
||||
}
|
||||
|
||||
void OConfigurationValueContainer::write()
|
||||
void OConfigurationValueContainer::commit()
|
||||
{
|
||||
// collect the current values in the exchange locations
|
||||
// write the current values in the exchange locations
|
||||
std::for_each(
|
||||
m_pImpl->aAccessors.begin(),
|
||||
m_pImpl->aAccessors.end(),
|
||||
UpdateToConfig( m_pImpl->aConfigRoot, m_pImpl->rMutex )
|
||||
);
|
||||
}
|
||||
|
||||
void OConfigurationValueContainer::commit()
|
||||
{
|
||||
// write the current values in the exchange locations
|
||||
write();
|
||||
|
||||
// commit the changes done
|
||||
m_pImpl->aConfigRoot.commit( );
|
||||
|
|
|
@ -1063,15 +1063,11 @@ void DebugHelper::basicexception( const css::uno::Exception& ex ) throw( css::sc
|
|||
basicexception( OUString(), ex, ERRCODE_BASIC_INTERNAL_ERROR, OUString() );
|
||||
}
|
||||
|
||||
void DebugHelper::runtimeexception( const OUString& DetailedMessage, const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ) throw( css::uno::RuntimeException )
|
||||
void DebugHelper::runtimeexception( int err, const OUString& /*additionalArgument*/ ) throw( css::uno::RuntimeException )
|
||||
{
|
||||
// #TODO #FIXME ( do we want to support additionalArg here )
|
||||
throw css::uno::RuntimeException( DetailedMessage.concat( " " ).concat( ex.Message ).concat(" ").concat(OUString::number(err)), css::uno::Reference< css::uno::XInterface >() );
|
||||
}
|
||||
|
||||
void DebugHelper::runtimeexception( int err, const OUString& additionalArgument ) throw( css::uno::RuntimeException )
|
||||
{
|
||||
runtimeexception( OUString(), css::uno::Exception(), err, additionalArgument );
|
||||
throw css::uno::RuntimeException( css::uno::Exception().Message + " " + OUString::number(err),
|
||||
css::uno::Reference< css::uno::XInterface >() );
|
||||
}
|
||||
|
||||
Millimeter::Millimeter():m_nMillimeter(0) {}
|
||||
|
|
Loading…
Reference in a new issue