diff options
Diffstat (limited to 'dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx')
-rw-r--r-- | dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx index e736e365aea9..0d3676db5d80 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -42,7 +42,7 @@ #include <sal/log.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <tools/debug.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -152,14 +152,14 @@ namespace dbaui bool documentHasScriptSupport() const { - OSL_PRECOND( !!m_aDocScriptSupport, + OSL_PRECOND( m_aDocScriptSupport.has_value(), "DBSubComponentController_Impl::documentHasScriptSupport: not completely initialized, yet - don't know!?" ); - return !!m_aDocScriptSupport && *m_aDocScriptSupport; + return m_aDocScriptSupport.has_value() && *m_aDocScriptSupport; } void setDocumentScriptSupport( const bool _bSupport ) { - OSL_PRECOND( !m_aDocScriptSupport, + OSL_PRECOND( !m_aDocScriptSupport.has_value(), "DBSubComponentController_Impl::setDocumentScriptSupport: already initialized!" ); m_aDocScriptSupport = ::std::optional< bool >( _bSupport ); } @@ -176,11 +176,9 @@ namespace dbaui { } - void DBSubComponentController::impl_initialize() + void DBSubComponentController::impl_initialize(const ::comphelper::NamedValueCollection& rArguments) { - OGenericUnoController::impl_initialize(); - - const ::comphelper::NamedValueCollection& rArguments( getInitParams() ); + OGenericUnoController::impl_initialize(rArguments); Reference< XConnection > xConnection; xConnection = rArguments.getOrDefault( PROPERTY_ACTIVE_CONNECTION, xConnection ); @@ -210,7 +208,7 @@ namespace dbaui if ( _rType.equals( cppu::UnoType<XScriptInvocationContext>::get() ) ) { if ( m_pImpl->documentHasScriptSupport() ) - return makeAny( Reference< XScriptInvocationContext >( this ) ); + return Any( Reference< XScriptInvocationContext >( this ) ); return Any(); } @@ -535,8 +533,7 @@ namespace dbaui Reference< XTitle > xTitle(getPrivateModel(),UNO_QUERY); if ( xTitle.is() ) { - sTitle.append( xTitle->getTitle() ); - sTitle.append(" : "); + sTitle.append( xTitle->getTitle() + " : "); } sTitle.append( getPrivateTitle() ); return sTitle.makeStringAndClear(); |