dbaccess/source/ui/dlg/admincontrols.cxx | 132 +------ dbaccess/source/ui/dlg/admincontrols.hxx | 6 dbaccess/source/ui/dlg/advancedsettings.hxx | 2 dbaccess/source/ui/dlg/detailpages.hxx | 1 dbaccess/source/ui/dlg/generalpage.cxx | 30 + dbaccess/source/ui/dlg/generalpage.hxx | 4 include/svtools/dialogcontrolling.hxx | 265 --------------- include/tools/solar.h | 41 +- lingucomponent/source/languageguessing/simpleguesser.cxx | 2 lingucomponent/source/spellcheck/spell/sspellimp.cxx | 4 lingucomponent/source/thesaurus/libnth/nthesdta.cxx | 2 reportdesign/source/ui/inc/DateTime.hxx | 2 solenv/clang-format/blacklist | 2 svtools/Library_svt.mk | 1 svtools/source/misc/dialogcontrolling.cxx | 192 ---------- toolkit/source/awt/vclxgraphics.cxx | 2 toolkit/source/awt/vclxmenu.cxx | 2 toolkit/source/awt/vclxtoolkit.cxx | 2 toolkit/source/awt/vclxwindows.cxx | 14 toolkit/source/controls/controlmodelcontainerbase.cxx | 2 toolkit/source/controls/dialogcontrol.cxx | 6 toolkit/source/controls/geometrycontrolmodel.cxx | 2 toolkit/source/controls/roadmapcontrol.cxx | 16 toolkit/source/controls/stdtabcontroller.cxx | 2 toolkit/source/controls/tabpagemodel.cxx | 2 toolkit/source/controls/unocontrolmodel.cxx | 4 toolkit/source/controls/unocontrols.cxx | 10 tools/source/datetime/ttime.cxx | 4 tools/source/fsys/urlobj.cxx | 2 ucb/source/cacher/cachedcontentresultset.cxx | 2 ucb/source/cacher/dynamicresultsetwrapper.cxx | 2 ucb/source/core/ucb.cxx | 2 ucb/source/core/ucbcmds.cxx | 10 ucb/source/sorter/sortresult.cxx | 20 - ucb/source/ucp/ext/ucpext_content.cxx | 2 ucb/source/ucp/file/filglob.cxx | 2 ucb/source/ucp/ftp/ftpcontent.cxx | 2 ucb/source/ucp/gio/gio_content.cxx | 38 +- ucb/source/ucp/webdav-neon/ContentProperties.cxx | 13 ucb/source/ucp/webdav-neon/NeonSession.cxx | 26 - ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx | 2 ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx | 2 ucbhelper/source/client/content.cxx | 4 43 files changed, 177 insertions(+), 706 deletions(-)
New commits: commit 30e99b793fc26d2c86363bf8c023cdd2c05940b1 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Feb 10 12:28:24 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Feb 11 07:00:53 2019 +0100 loplugin:indentation in ucb..ucbhelper Change-Id: Ifa4b34065dacf9e144f076631c57f1d01aedaeeb Reviewed-on: https://gerrit.libreoffice.org/67608 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index 93db8c575688..c9592879397f 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -1492,7 +1492,7 @@ sal_Bool SAL_CALL CachedContentResultSet return true; sal_Int32 nNewRow = m_nRow + rows; - if( nNewRow < 0 ) + if( nNewRow < 0 ) nNewRow = 0; if( impl_isKnownValidPosition( nNewRow ) ) diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx index c7aa27949429..fc6d0dbf90de 100644 --- a/ucb/source/cacher/dynamicresultsetwrapper.cxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx @@ -240,7 +240,7 @@ void DynamicResultSetWrapper::impl_notify( const ListEvent& Changes ) aWelcome.Old = m_xMyResultOne; aWelcome.New = m_xMyResultTwo; - rAction.ActionInfo <<= aWelcome; + rAction.ActionInfo <<= aWelcome; } else { diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 6b3cf12a8f3b..24687458cf64 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -303,7 +303,7 @@ void SAL_CALL UniversalContentBroker::dispose() m_pDisposeEventListeners->disposeAndClear( aEvt ); } - if ( m_xNotifier.is() ) + if ( m_xNotifier.is() ) m_xNotifier->removeChangesListener( this ); } diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 8df2f9f94b1c..c7c62dfc374c 100644 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -337,12 +337,12 @@ OUString createDesiredName( } // query, fragment present? - sal_Int32 nPos = aName.indexOf( '?' ); - if ( nPos == -1 ) - nPos = aName.indexOf( '#' ); + sal_Int32 nPos = aName.indexOf( '?' ); + if ( nPos == -1 ) + nPos = aName.indexOf( '#' ); - if ( nPos != -1 ) - aName = aName.copy( 0, nPos ); + if ( nPos != -1 ) + aName = aName.copy( 0, nPos ); } return aName; } diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index 147df9c760ee..118524114b82 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -952,8 +952,8 @@ sal_IntPtr SortedResultSet::CompareImpl( const Reference < XResultSet >& xResult nTmp = static_cast<sal_Int32>(aTwo.Year) - static_cast<sal_Int32>(aOne.Year); if ( !nTmp ) { nTmp = static_cast<sal_Int32>(aTwo.Month) - static_cast<sal_Int32>(aOne.Month); - if ( !nTmp ) - nTmp = static_cast<sal_Int32>(aTwo.Day) - static_cast<sal_Int32>(aOne.Day); + if ( !nTmp ) + nTmp = static_cast<sal_Int32>(aTwo.Day) - static_cast<sal_Int32>(aOne.Day); } if ( nTmp < 0 ) @@ -976,14 +976,13 @@ sal_IntPtr SortedResultSet::CompareImpl( const Reference < XResultSet >& xResult aTwo = xRowTwo->getTime( nColumn ); nTmp = static_cast<sal_Int32>(aTwo.Hours) - static_cast<sal_Int32>(aOne.Hours); - if ( !nTmp ) { + if ( !nTmp ) nTmp = static_cast<sal_Int32>(aTwo.Minutes) - static_cast<sal_Int32>(aOne.Minutes); - if ( !nTmp ) { + if ( !nTmp ) nTmp = static_cast<sal_Int32>(aTwo.Seconds) - static_cast<sal_Int32>(aOne.Seconds); if ( !nTmp ) nTmp = static_cast<sal_Int32>(aTwo.NanoSeconds) - static_cast<sal_Int32>(aOne.NanoSeconds); - }} if ( nTmp < 0 ) nCompare = -1; @@ -1005,20 +1004,19 @@ sal_IntPtr SortedResultSet::CompareImpl( const Reference < XResultSet >& xResult aTwo = xRowTwo->getTimestamp( nColumn ); nTmp = static_cast<sal_Int32>(aTwo.Year) - static_cast<sal_Int32>(aOne.Year); - if ( !nTmp ) { + if ( !nTmp ) nTmp = static_cast<sal_Int32>(aTwo.Month) - static_cast<sal_Int32>(aOne.Month); - if ( !nTmp ) { + if ( !nTmp ) nTmp = static_cast<sal_Int32>(aTwo.Day) - static_cast<sal_Int32>(aOne.Day); - if ( !nTmp ) { + if ( !nTmp ) nTmp = static_cast<sal_Int32>(aTwo.Hours) - static_cast<sal_Int32>(aOne.Hours); - if ( !nTmp ) { + if ( !nTmp ) nTmp = static_cast<sal_Int32>(aTwo.Minutes) - static_cast<sal_Int32>(aOne.Minutes); - if ( !nTmp ) { + if ( !nTmp ) nTmp = static_cast<sal_Int32>(aTwo.Seconds) - static_cast<sal_Int32>(aOne.Seconds); if ( !nTmp ) nTmp = static_cast<sal_Int32>(aTwo.NanoSeconds) - static_cast<sal_Int32>(aOne.NanoSeconds); - }}}}} if ( nTmp < 0 ) nCompare = -1; diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index 6ba10687a970..9d5376c14d7c 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -234,7 +234,7 @@ namespace ucb { namespace ucp { namespace ext else if ( aCommand.Name == "open" ) { OpenCommandArgument2 aOpenCommand; - if ( !( aCommand.Argument >>= aOpenCommand ) ) + if ( !( aCommand.Argument >>= aOpenCommand ) ) { ::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( OUString(), *this, -1 ) ), diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index e19be3458919..e7c96e49f62f 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -749,7 +749,7 @@ namespace fileaccess { { ioErrorCode = IOErrorCode_GENERAL; aMsg = "a general error during transfer command"; - break; + break; } default: ioErrorCode = IOErrorCode_GENERAL; diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 3d79dca53259..9962b7b1d465 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -649,7 +649,7 @@ sal_Int32 InsertData::read(sal_Int8 *dest,sal_Int32 nBytesRequested) sal_Int32 m = 0; if(m_xInputStream.is()) { - Sequence<sal_Int8> seq(nBytesRequested); + Sequence<sal_Int8> seq(nBytesRequested); m = m_xInputStream->readBytes(seq,nBytesRequested); memcpy(dest,seq.getConstArray(),m); } diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index a581c34adb2a..7f363f5e2921 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -161,56 +161,56 @@ uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterfac { case G_IO_ERROR_FAILED: { io::IOException aExcept(sMessage, rContext); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_NOT_MOUNTED: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING_PATH, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_NOT_FOUND: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_EXISTS: { ucb::NameClashException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, sName); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_INVALID_ARGUMENT: { lang::IllegalArgumentException aExcept(sMessage, rContext, -1 ); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_PERMISSION_DENIED: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_ACCESS_DENIED, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_IS_DIRECTORY: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_FILE, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_NOT_REGULAR_FILE: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_FILE, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_NOT_DIRECTORY: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_DIRECTORY, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_FILENAME_TOO_LONG: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_NAME_TOO_LONG, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_PENDING: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_PENDING, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_CLOSED: case G_IO_ERROR_CANCELLED: @@ -218,45 +218,45 @@ uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterfac case G_IO_ERROR_WRONG_ETAG: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_GENERAL, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_NOT_SUPPORTED: case G_IO_ERROR_CANT_CREATE_BACKUP: case G_IO_ERROR_WOULD_MERGE: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_SUPPORTED, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_NO_SPACE: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_OUT_OF_DISK_SPACE, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_INVALID_FILENAME: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_INVALID_CHARACTER, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_READ_ONLY: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_WRITE_PROTECTED, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_TIMED_OUT: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_DEVICE_NOT_READY, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_WOULD_RECURSE: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_RECURSIVE, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_BUSY: case G_IO_ERROR_WOULD_BLOCK: { ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, task::InteractionClassification_ERROR, ucb::IOErrorCode_LOCKING_VIOLATION, aArgs); - EXCEPT(aExcept); } + EXCEPT(aExcept); } break; case G_IO_ERROR_HOST_NOT_FOUND: { ucb::InteractiveNetworkResolveNameException aExcept(sMessage, rContext, diff --git a/ucb/source/ucp/webdav-neon/ContentProperties.cxx b/ucb/source/ucp/webdav-neon/ContentProperties.cxx index 2a9186b059cb..c13f0ed0b550 100644 --- a/ucb/source/ucp/webdav-neon/ContentProperties.cxx +++ b/ucb/source/ucp/webdav-neon/ContentProperties.cxx @@ -236,7 +236,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bCreationDate ) { - propertyNames.push_back( DAVProperties::CREATIONDATE ); + propertyNames.push_back( DAVProperties::CREATIONDATE ); bCreationDate = true; } } @@ -244,8 +244,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bLastModified ) { - propertyNames.push_back( - DAVProperties::GETLASTMODIFIED ); + propertyNames.push_back( DAVProperties::GETLASTMODIFIED ); bLastModified = true; } } @@ -253,8 +252,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bContentType ) { - propertyNames.push_back( - DAVProperties::GETCONTENTTYPE ); + propertyNames.push_back( DAVProperties::GETCONTENTTYPE ); bContentType = true; } } @@ -262,8 +260,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bContentLength ) { - propertyNames.push_back( - DAVProperties::GETCONTENTLENGTH ); + propertyNames.push_back( DAVProperties::GETCONTENTLENGTH ); bContentLength = true; } } @@ -271,7 +268,7 @@ void ContentProperties::UCBNamesToDAVNames( { if ( !bResourceType ) { - propertyNames.push_back( DAVProperties::RESOURCETYPE ); + propertyNames.push_back( DAVProperties::RESOURCETYPE ); bResourceType = true; } } diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx index 6d1215b7fe21..667d24b05351 100644 --- a/ucb/source/ucp/webdav-neon/NeonSession.cxx +++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx @@ -1025,10 +1025,10 @@ void NeonSession::PROPFIND( const OUString & inPath, #if defined SAL_LOG_INFO { //debug SAL_INFO( "ucb.ucp.webdav", "PROPFIND - relative URL: <" << inPath << "> Depth: " << inDepth ); - for(const auto& rPropName : inPropNames) - { + for(const auto& rPropName : inPropNames) + { SAL_INFO( "ucb.ucp.webdav", "PROPFIND - property requested: " << rPropName ); - } + } } //debug #endif @@ -1726,22 +1726,22 @@ bool NeonSession::UNLOCK( NeonLock * pLock ) if ( ne_unlock( m_pHttpSession, pLock ) == NE_OK ) { #if defined SAL_LOG_INFO - { - char * p = ne_uri_unparse( &(pLock->uri) ); - SAL_INFO( "ucb.ucp.webdav", "UNLOCK (from store) - relative URL: <" << p << "> token: <" << pLock->token << "> succeeded." ); - ne_free( p ); - } + { + char * p = ne_uri_unparse( &(pLock->uri) ); + SAL_INFO( "ucb.ucp.webdav", "UNLOCK (from store) - relative URL: <" << p << "> token: <" << pLock->token << "> succeeded." ); + ne_free( p ); + } #endif return true; } else { #if defined SAL_LOG_INFO - { - char * p = ne_uri_unparse( &(pLock->uri) ); - SAL_INFO( "ucb.ucp.webdav", "UNLOCK (from store) - relative URL: <" << p << "> token: <" << pLock->token << "> failed!" ); - ne_free( p ); - } + { + char * p = ne_uri_unparse( &(pLock->uri) ); + SAL_INFO( "ucb.ucp.webdav", "UNLOCK (from store) - relative URL: <" << p << "> token: <" << pLock->token << "> failed!" ); + ne_free( p ); + } #endif return false; } diff --git a/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx index 173c3f9c4c20..659bf5d49cc1 100644 --- a/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav-neon/UCBDeadPropertyValue.cxx @@ -494,7 +494,7 @@ bool UCBDeadPropertyValue::toXML( const uno::Any & rInData, // Encode value! It must not contain XML reserved chars! aStringValue = encodeValue( aStringValue ); - rOutData = aXMLPre; + rOutData = aXMLPre; rOutData += aStringType; rOutData += aXMLMid; rOutData += aStringValue; diff --git a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx index 66591aa1f749..253999e6079c 100644 --- a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx @@ -474,7 +474,7 @@ bool DataSupplier::getData() } } - m_pImpl->m_bCountFinal = true; + m_pImpl->m_bCountFinal = true; // Callback possible, because listeners may be informed! aGuard.clear(); diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index 3308ac3b892e..0af6636c80d1 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -1008,7 +1008,7 @@ bool Content::isFolder() >>= bFolder ) return bFolder; - ucbhelper::cancelCommandExecution( + ucbhelper::cancelCommandExecution( makeAny( UnknownPropertyException( "Unable to retrieve value of property 'IsFolder'!", get() ) ), @@ -1031,7 +1031,7 @@ bool Content::isDocument() >>= bDoc ) return bDoc; - ucbhelper::cancelCommandExecution( + ucbhelper::cancelCommandExecution( makeAny( UnknownPropertyException( "Unable to retrieve value of property 'IsDocument'!", get() ) ), commit 9e03f6820417c9fcda27b49d9fa5a464f1255c84 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sun Feb 10 12:27:45 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Feb 11 07:00:45 2019 +0100 loplugin:indentation in lingucomponent..tools Change-Id: I96ed4c51ce3fe45c1cb69a7d7ff917f1e152462e Reviewed-on: https://gerrit.libreoffice.org/67607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/tools/solar.h b/include/tools/solar.h index 9ee55c4ad5de..5ea3be835525 100644 --- a/include/tools/solar.h +++ b/include/tools/solar.h @@ -55,16 +55,19 @@ inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return static_cast<sal_uIn + (static_cast<sal_uInt32>(p[2]) << 16) + (static_cast<sal_uInt32>(p[3]) << 24)); } #if defined OSL_LITENDIAN -inline double SVBT64ToDouble( const SVBT64 p ) { double n; - reinterpret_cast<sal_uInt8*>(&n)[0] = p[0]; - reinterpret_cast<sal_uInt8*>(&n)[1] = p[1]; - reinterpret_cast<sal_uInt8*>(&n)[2] = p[2]; - reinterpret_cast<sal_uInt8*>(&n)[3] = p[3]; - reinterpret_cast<sal_uInt8*>(&n)[4] = p[4]; - reinterpret_cast<sal_uInt8*>(&n)[5] = p[5]; - reinterpret_cast<sal_uInt8*>(&n)[6] = p[6]; - reinterpret_cast<sal_uInt8*>(&n)[7] = p[7]; - return n; } +inline double SVBT64ToDouble( const SVBT64 p ) +{ + double n; + reinterpret_cast<sal_uInt8*>(&n)[0] = p[0]; + reinterpret_cast<sal_uInt8*>(&n)[1] = p[1]; + reinterpret_cast<sal_uInt8*>(&n)[2] = p[2]; + reinterpret_cast<sal_uInt8*>(&n)[3] = p[3]; + reinterpret_cast<sal_uInt8*>(&n)[4] = p[4]; + reinterpret_cast<sal_uInt8*>(&n)[5] = p[5]; + reinterpret_cast<sal_uInt8*>(&n)[6] = p[6]; + reinterpret_cast<sal_uInt8*>(&n)[7] = p[7]; + return n; +} #else inline double SVBT64ToDouble( const SVBT64 p ) { double n; reinterpret_cast<sal_uInt8*>(&n)[0] = p[7]; @@ -78,12 +81,18 @@ inline double SVBT64ToDouble( const SVBT64 p ) { double n; return n; } #endif -inline void ShortToSVBT16( sal_uInt16 n, SVBT16 p ) { p[0] = static_cast<sal_uInt8>(n); - p[1] = static_cast<sal_uInt8>(n >> 8); } -inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = static_cast<sal_uInt8>(n); - p[1] = static_cast<sal_uInt8>(n >> 8); - p[2] = static_cast<sal_uInt8>(n >> 16); - p[3] = static_cast<sal_uInt8>(n >> 24); } +inline void ShortToSVBT16( sal_uInt16 n, SVBT16 p ) +{ + p[0] = static_cast<sal_uInt8>(n); + p[1] = static_cast<sal_uInt8>(n >> 8); +} +inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) +{ + p[0] = static_cast<sal_uInt8>(n); + p[1] = static_cast<sal_uInt8>(n >> 8); + p[2] = static_cast<sal_uInt8>(n >> 16); + p[3] = static_cast<sal_uInt8>(n >> 24); +} #if defined OSL_LITENDIAN inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = reinterpret_cast<sal_uInt8*>(&n)[0]; p[1] = reinterpret_cast<sal_uInt8*>(&n)[1]; diff --git a/lingucomponent/source/languageguessing/simpleguesser.cxx b/lingucomponent/source/languageguessing/simpleguesser.cxx index 589fbeb54f2b..3220935e1688 100644 --- a/lingucomponent/source/languageguessing/simpleguesser.cxx +++ b/lingucomponent/source/languageguessing/simpleguesser.cxx @@ -65,7 +65,7 @@ static int startsAsciiCaseInsensitive(const std::string &s1, const std::string & - rtl::toAsciiUpperCase(static_cast<unsigned char>(s2[i])); if(s1[i] == '.' || s2[i] == '.') {ret = 0;} //. is a neutral character } - return ret; + return ret; } /** diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index e62dfe5c6194..1a6bb0390f9d 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -382,7 +382,7 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL { MutexGuard aGuard( GetLinguMutex() ); - if (rLocale == Locale() || rWord.isEmpty()) + if (rLocale == Locale() || rWord.isEmpty()) return true; if (!hasLocale( rLocale )) @@ -507,7 +507,7 @@ Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell( { MutexGuard aGuard( GetLinguMutex() ); - if (rLocale == Locale() || rWord.isEmpty()) + if (rLocale == Locale() || rWord.isEmpty()) return nullptr; if (!hasLocale( rLocale )) diff --git a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx index 7e23f023c4e5..c01584eff8c5 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesdta.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesdta.cxx @@ -59,7 +59,7 @@ OUString SAL_CALL Meaning::getMeaning() Sequence< OUString > SAL_CALL Meaning::querySynonyms() { MutexGuard aGuard( GetLinguMutex() ); - return aSyn; + return aSyn; } void Meaning::SetSynonyms( const Sequence< OUString > &rSyn ) diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index 80d40dd87f96..26b128e5d41e 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -301,7 +301,7 @@ void VCLXGraphics::draw( const uno::Reference< awt::XDisplayBitmap >& rxBitmapHa BitmapEx aBmpEx = VCLUnoHelper::GetBitmap( xBitmap ); Point aPos(nDestX - nSourceX, nDestY - nSourceY); - Size aSz = aBmpEx.GetSizePixel(); + Size aSz = aBmpEx.GetSizePixel(); if(nDestWidth != nSourceWidth) { diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 38d3a6c6dd88..d9ec3a6487f7 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -60,7 +60,7 @@ VCLXMenu::~VCLXMenu() if ( mpMenu ) { mpMenu->RemoveEventListener( LINK( this, VCLXMenu, MenuEventListener ) ); - mpMenu.disposeAndClear(); + mpMenu.disposeAndClear(); } } diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 14727b21d7e9..fc46f5d3c51a 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -1194,7 +1194,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, *ppNewComp = new VCLXFrame; // Frame control needs to receive // Mouse events - pGroupBox->SetMouseTransparent( false ); + pGroupBox->SetMouseTransparent( false ); } break; case WindowType::HELPBUTTON: diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 8d73de9c9e7c..2a296cda4ab2 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2039,7 +2039,7 @@ namespace { Image lcl_getImageFromURL( const OUString& i_rImageURL ) { - if ( i_rImageURL.isEmpty() ) + if ( i_rImageURL.isEmpty() ) return Image(); try @@ -2050,12 +2050,12 @@ namespace aMediaProperties.put( "URL", i_rImageURL ); Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() ); return Image( xGraphic ); - } - catch( const uno::Exception& ) - { + } + catch( const uno::Exception& ) + { DBG_UNHANDLED_EXCEPTION("toolkit"); - } - return Image(); + } + return Image(); } } void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent ) @@ -6433,7 +6433,7 @@ void VCLXPatternField::setProperty( const OUString& PropertyName, const css::uno aEditMask = aString; else aLiteralMask = aString; - setMasks( aEditMask, aLiteralMask ); + setMasks( aEditMask, aLiteralMask ); } } break; diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 514cfccec5b9..80a526d3ae20 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -538,7 +538,7 @@ void ControlModelContainerBase::insertByName( const OUString& aName, const Any& if ( xM.is() ) { Reference< beans::XPropertySet > xProps( xM, UNO_QUERY ); - if ( xProps.is() ) + if ( xProps.is() ) { Reference< beans::XPropertySetInfo > xPropInfo = xProps.get()->getPropertySetInfo(); diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 035822570ecf..1d4b9fe735df 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -338,7 +338,7 @@ sal_Bool UnoDialogControl::setModel( const Reference< XControlModel >& rxModel ) { // #Can we move all the Resource stuff to the ControlContainerBase ? SolarMutexGuard aGuard; - bool bRet = ControlContainerBase::setModel( rxModel ); + bool bRet = ControlContainerBase::setModel( rxModel ); ImplStartListingForResourceEvents(); return bRet; } @@ -767,8 +767,8 @@ void UnoMultiPageControl::bindPage( const uno::Reference< awt::XControl >& _rxCo uno::Reference< awt::XSimpleTabController > xTabCntrl( getPeer(), uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xProps( _rxControl->getModel(), uno::UNO_QUERY ); - VCLXTabPage* pXPage = dynamic_cast< VCLXTabPage* >( xPage.get() ); - TabPage* pPage = pXPage ? pXPage->getTabPage() : nullptr; + VCLXTabPage* pXPage = dynamic_cast< VCLXTabPage* >( xPage.get() ); + TabPage* pPage = pXPage ? pXPage->getTabPage() : nullptr; if ( xTabCntrl.is() && pPage ) { VCLXMultiPage* pXTab = dynamic_cast< VCLXMultiPage* >( xTabCntrl.get() ); diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx index 62c1d53b161a..8f576dc7c312 100644 --- a/toolkit/source/controls/geometrycontrolmodel.cxx +++ b/toolkit/source/controls/geometrycontrolmodel.cxx @@ -476,7 +476,7 @@ throw IllegalArgumentException(); } - HashMapString2Int &rMap = ServiceSpecifierMap::get(); + HashMapString2Int &rMap = ServiceSpecifierMap::get(); HashMapString2Int::iterator aPropMapIdPos = rMap.find( m_sServiceSpecifier ); if ( rMap.end() == aPropMapIdPos ) { diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx index 8c38d0f3f8d5..230980f46e31 100644 --- a/toolkit/source/controls/roadmapcontrol.cxx +++ b/toolkit/source/controls/roadmapcontrol.cxx @@ -152,7 +152,7 @@ static void lcl_throwIndexOutOfBoundsException( ) Any aRet = UnoControlRoadmapModel_Base::queryAggregation( rType ); if ( !aRet.hasValue() ) aRet = UnoControlRoadmapModel_IBase::queryInterface( rType ); - return aRet; + return aRet; } @@ -220,7 +220,7 @@ static void lcl_throwIndexOutOfBoundsException( ) // As long as only vectors with up to 10 elements are // involved it should be sufficient sal_Int32 UnoControlRoadmapModel::GetUniqueID() - { + { Any aAny; bool bIncrement = true; sal_Int32 CurID = 0; @@ -241,10 +241,10 @@ static void lcl_throwIndexOutOfBoundsException( ) CurID++; break; } - } - } - return CurID; - } + } + } + return CurID; + } ContainerEvent UnoControlRoadmapModel::GetContainerEvent(sal_Int32 Index, const Reference< XInterface >& xRoadmapItem) @@ -369,9 +369,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( UnoRoadmapControl, UnoControlRoadmap_Base, UnoCon sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel >& _rModel) { - - - Reference< XContainer > xC( getModel(), UNO_QUERY ); + Reference< XContainer > xC( getModel(), UNO_QUERY ); if ( xC.is() ) xC->removeContainerListener( this ); diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index 394364eea74a..eed32b9f889e 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -309,7 +309,7 @@ void StdTabController::activateTabOrder( ) Reference< XVclContainerPeer > xVclContainerPeer; if ( xC.is() ) xVclContainerPeer.set(xC->getPeer(), css::uno::UNO_QUERY); - if ( !xC.is() || !xVclContainerPeer.is() ) + if ( !xC.is() || !xVclContainerPeer.is() ) return; // This may return a TabController, which returns desired list of controls faster diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx index 738b526568b3..f3538c5ddda5 100644 --- a/toolkit/source/controls/tabpagemodel.cxx +++ b/toolkit/source/controls/tabpagemodel.cxx @@ -115,7 +115,7 @@ void SAL_CALL UnoControlTabPageModel::initialize (const Sequence<Any>& rArgument sal_Int16 nPageId = -1; if ( rArguments.getLength() == 1 ) { - if ( !( rArguments[ 0 ] >>= nPageId )) + if ( !( rArguments[ 0 ] >>= nPageId )) throw lang::IllegalArgumentException(); m_nTabPageId = nPageId; } diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index ffe7363bd9f7..37b185438867 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -943,7 +943,7 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre { if ( nVersion < 2 ) { - if ( !pFD ) + if ( !pFD ) { pFD.reset(new css::awt::FontDescriptor); if ( maData.find(BASEPROPERTY_FONTDESCRIPTOR) != maData.end() ) // due to defaults... @@ -1331,7 +1331,7 @@ void UnoControlModel::setPropertyValues( const css::uno::Sequence< OUString >& r // will implicitly call property listeners, and this should not happen with // our mutex locked // #i23451# - setFastPropertyValues( nProps, pHandles, pValues, nValidHandles ); + setFastPropertyValues( nProps, pHandles, pValues, nValidHandles ); } else aGuard.clear(); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 6c01ea0736be..7fe06b1119ef 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -313,7 +313,7 @@ void UnoEditControl::setText( const OUString& aText ) { maText = aText; mbSetTextInPeer = true; - uno::Reference < awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); + uno::Reference < awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); if ( xText.is() ) xText->setText( maText ); } @@ -382,7 +382,7 @@ OUString UnoEditControl::getText() OUString UnoEditControl::getSelectedText() { OUString sSelected; - uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); + uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); if ( xText.is() ) sSelected = xText->getSelectedText(); @@ -391,7 +391,7 @@ OUString UnoEditControl::getSelectedText() void UnoEditControl::setSelection( const awt::Selection& aSelection ) { - uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); + uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); if ( xText.is() ) xText->setSelection( aSelection ); } @@ -399,7 +399,7 @@ void UnoEditControl::setSelection( const awt::Selection& aSelection ) awt::Selection UnoEditControl::getSelection() { awt::Selection aSel; - uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); + uno::Reference< awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); if ( xText.is() ) aSel = xText->getSelection(); return aSel; @@ -435,7 +435,7 @@ void UnoEditControl::setMaxTextLen( sal_Int16 nLen ) { mnMaxTextLen = nLen; mbSetMaxTextLenInPeer = true; - uno::Reference < awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); + uno::Reference < awt::XTextComponent > xText( getPeer(), uno::UNO_QUERY ); if ( xText.is() ) xText->setMaxTextLen( mnMaxTextLen ); } diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx index a843949ee3f0..b5b3e1c533a0 100644 --- a/tools/source/datetime/ttime.cxx +++ b/tools/source/datetime/ttime.cxx @@ -429,8 +429,8 @@ Time tools::Time::GetUTCOffset() gmtime_r( &nTime, &aTM ); nUTC = mktime( &aTM ); #endif - nCacheTicks = nTicks; - nCacheSecOffset = (nLocalTime-nUTC) / 60; + nCacheTicks = nTicks; + nCacheSecOffset = (nLocalTime-nUTC) / 60; } nTempTime = abs( nCacheSecOffset ); diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 445e27772955..bd6c25fa66ee 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -3246,7 +3246,7 @@ bool INetURLObject::insertName(OUString const & rTheName, bool bSkip = pPrefixEnd < pEnd && *pPrefixEnd == '/'; bInsertSlash = false; pSuffixBegin = pPathEnd; - while (nIndex-- > 0) + while (nIndex-- > 0) for (;;) { if (bSkip) commit 7df04009b98165f89c89f1e506ebafd2fecc8f5a Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Feb 8 11:55:18 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Feb 11 07:00:35 2019 +0100 remove ControlDependencyManager and just use our normal handlers, instead of this weird magic Change-Id: I8245787bec2a755ce6aba31ed681577771537ca1 Reviewed-on: https://gerrit.libreoffice.org/67534 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx index 22303969b09a..517852513d51 100644 --- a/dbaccess/source/ui/dlg/admincontrols.cxx +++ b/dbaccess/source/ui/dlg/admincontrols.cxx @@ -28,101 +28,6 @@ namespace dbaui { - // TextResetOperatorEventFilter - class TextResetOperatorEventFilter : public ::svt::IWindowEventFilter - { - public: - TextResetOperatorEventFilter() - { - } - - // IWindowEventFilter - virtual bool payAttentionTo( const VclWindowEvent& _rEvent ) const override - { - return ( _rEvent.GetId() == VclEventId::WindowEnabled ) - || ( _rEvent.GetId() == VclEventId::WindowDisabled ) - || ( _rEvent.GetId() == VclEventId::EditModify ); - } - }; - - // TextResetOperator - class TextResetOperator :public ::svt::IWindowOperator - { - public: - explicit TextResetOperator( const OUString& _rDisabledText ) - :m_sDisabledText( _rDisabledText ) - { - } - - // IWindowOperator - virtual void operateOn( const VclWindowEvent& _rTrigger, vcl::Window& _rOperateOn ) const override; - - private: - const OUString m_sDisabledText; - OUString m_sUserText; - }; - - void TextResetOperator::operateOn( const VclWindowEvent& _rTrigger, vcl::Window& _rOperateOn ) const - { - OSL_ENSURE( _rTrigger.GetWindow() == &_rOperateOn, "TextResetOperator::operateOn: you're misusing this implementation!" ); - - switch ( _rTrigger.GetId() ) - { - case VclEventId::NONE: - // initial call - const_cast< TextResetOperator* >( this )->m_sUserText = _rTrigger.GetWindow()->GetText(); - break; - - case VclEventId::EditModify: - if ( _rTrigger.GetWindow()->IsEnabled() ) - const_cast< TextResetOperator* >( this )->m_sUserText = _rTrigger.GetWindow()->GetText(); - break; - - case VclEventId::WindowEnabled: - _rOperateOn.SetText( m_sUserText ); - break; - - case VclEventId::WindowDisabled: - _rOperateOn.SetText( m_sDisabledText ); - break; - - default: - OSL_FAIL( "TextResetOperator::operateOn: unexpected event ID!" ); - // all those IDs should have been filtered out by payAttentionTo - break; - } - } - - // TextResetOperatorController - class TextResetOperatorController_Base - { - protected: - explicit TextResetOperatorController_Base( const OUString& _rDisabledText ) - :m_pEventFilter( new TextResetOperatorEventFilter ) - ,m_pOperator( new TextResetOperator( _rDisabledText ) ) - { - } - - const ::svt::PWindowEventFilter& getEventFilter() const { return m_pEventFilter; } - const ::svt::PWindowOperator& getOperator() const { return m_pOperator; } - - private: - ::svt::PWindowEventFilter m_pEventFilter; - ::svt::PWindowOperator m_pOperator; - }; - - class TextResetOperatorController :public TextResetOperatorController_Base - ,public ::svt::DialogController - { - public: - TextResetOperatorController( vcl::Window& _rObservee, const OUString& _rDisabledText ) - :TextResetOperatorController_Base( _rDisabledText ) - ,::svt::DialogController( _rObservee, getEventFilter(), getOperator() ) - { - addDependentWindow( _rObservee ); - } - }; - // MySQLNativeSettings MySQLNativeSettings::MySQLNativeSettings( vcl::Window& _rParent, const Link<void*,void>& _rControlModificationLink ) :TabPage( &_rParent, "MysqlNativeSettings", "dbaccess/ui/mysqlnativesettings.ui" ), @@ -142,6 +47,8 @@ namespace dbaui get(m_pSocket, "socket"); get(m_pNamedPipe, "namedpipe"); + m_pHostName->SetText("localhost"); + m_pDatabaseName->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) ); m_pHostName->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) ); m_pPort->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) ); @@ -149,14 +56,7 @@ namespace dbaui m_pNamedPipe->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) ); m_pSocketRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, RadioToggleHdl) ); m_pNamedPipeRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, RadioToggleHdl) ); - - m_aControlDependencies.enableOnRadioCheck( *m_pHostPortRadio, *m_pHostNameLabel, *m_pHostName, *m_pPortLabel, *m_pPort, *m_pDefaultPort ); - m_aControlDependencies.enableOnRadioCheck( *m_pSocketRadio, *m_pSocket ); - m_aControlDependencies.enableOnRadioCheck( *m_pNamedPipeRadio, *m_pNamedPipe ); - - m_aControlDependencies.addController( std::shared_ptr<svt::DialogController>( - new TextResetOperatorController( *m_pHostName, "localhost" ) - ) ); + m_pHostPortRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, RadioToggleHdl) ); // sockets are available on Unix systems only, named pipes only on Windows #ifdef UNX @@ -170,12 +70,36 @@ namespace dbaui IMPL_LINK(MySQLNativeSettings, RadioToggleHdl, RadioButton&, rRadioButton, void) { - m_aControlModificationLink.Call(&rRadioButton); + if (&rRadioButton == &*m_pSocketRadio || &rRadioButton == &*m_pNamedPipeRadio) + m_aControlModificationLink.Call(&rRadioButton); + bool bSelected = rRadioButton.IsChecked(); + if (&rRadioButton == &*m_pHostPortRadio) + { + m_pHostNameLabel->Enable(bSelected); + m_pHostName->Enable(bSelected); + m_pPortLabel->Enable(bSelected); + m_pPort->Enable(bSelected); + m_pDefaultPort->Enable(bSelected); + if (bSelected) + m_pHostName->SetText(m_sHostNameUserText); + else + m_pHostName->SetText("localhost"); + } + else if (&rRadioButton == &*m_pSocketRadio) + m_pSocket->Enable(bSelected); + else if (&rRadioButton == &*m_pNamedPipeRadio) + m_pNamedPipe->Enable(bSelected); } IMPL_LINK(MySQLNativeSettings, EditModifyHdl, Edit&, rEdit, void) { m_aControlModificationLink.Call(&rEdit); + + if (&rEdit == m_pHostName.get()) + { + if (m_pHostName->IsEnabled()) + m_sHostNameUserText = m_pHostName->GetText(); + } } MySQLNativeSettings::~MySQLNativeSettings() diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx index de6aed4fdc9e..71366a09266f 100644 --- a/dbaccess/source/ui/dlg/admincontrols.hxx +++ b/dbaccess/source/ui/dlg/admincontrols.hxx @@ -26,8 +26,6 @@ #include <vcl/field.hxx> #include <vcl/fixed.hxx> -#include <svtools/dialogcontrolling.hxx> - namespace dbaui { @@ -48,8 +46,8 @@ namespace dbaui VclPtr<Edit> m_pSocket; VclPtr<Edit> m_pNamedPipe; Link<void*,void> m_aControlModificationLink; - ::svt::ControlDependencyManager - m_aControlDependencies; + OUString m_sHostNameUserText; + DECL_LINK(RadioToggleHdl, RadioButton&, void); DECL_LINK(EditModifyHdl, Edit&, void); diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx index a285c733a2f0..a523e8e8d4ee 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hxx +++ b/dbaccess/source/ui/dlg/advancedsettings.hxx @@ -23,8 +23,6 @@ #include "adminpages.hxx" #include <dsmeta.hxx> -#include <svtools/dialogcontrolling.hxx> - #include <vcl/field.hxx> #include <vector> diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index 6e50f67d59b5..47ba2089850a 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -30,7 +30,6 @@ #include "TextConnectionHelper.hxx" #include "admincontrols.hxx" -#include <svtools/dialogcontrolling.hxx> #include <o3tl/typed_flags_set.hxx> enum class OCommonBehaviourTabPageFlags { diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 9f1c2c6f58a6..ba609c6a89b4 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -577,12 +577,6 @@ namespace dbaui m_pFT_DocListLabel->Enable( false ); m_pLB_DocumentList->Enable( false ); } - else - { - m_aControlDependencies.enableOnRadioCheck( *m_pRB_CreateDatabase, *m_pEmbeddedDBType, *m_pFT_EmbeddedDBLabel ); - m_aControlDependencies.enableOnRadioCheck( *m_pRB_ConnectDatabase, *m_pDatasourceType ); - m_aControlDependencies.enableOnRadioCheck( *m_pRB_OpenExistingDatabase, *m_pPB_OpenDatabase, *m_pFT_DocListLabel, *m_pLB_DocumentList ); - } m_pLB_DocumentList->SetDropDownLineCount( 20 ); if ( m_pLB_DocumentList->GetEntryCount() ) @@ -675,12 +669,34 @@ namespace dbaui m_aCreationModeHandler.Call( *this ); OnEmbeddedDBTypeSelected( *m_pEmbeddedDBType ); + + bool bValid, bReadonly; + getFlags( GetItemSet(), bValid, bReadonly ); + if ( bValid && !bReadonly ) + { + m_pEmbeddedDBType->Enable(m_pRB_CreateDatabase->IsChecked()); + m_pFT_EmbeddedDBLabel->Enable(m_pRB_CreateDatabase->IsChecked()); + } } - IMPL_LINK_NOARG( OGeneralPageWizard, OnSetupModeSelected, Button*, void ) + IMPL_LINK( OGeneralPageWizard, OnSetupModeSelected, Button*, pButton, void ) { m_aCreationModeHandler.Call( *this ); OnDatasourceTypeSelected(*m_pDatasourceType); + + bool bValid, bReadonly; + getFlags( GetItemSet(), bValid, bReadonly ); + if ( bValid && !bReadonly ) + { + if (pButton == m_pRB_ConnectDatabase.get()) + m_pDatasourceType->Enable(m_pRB_ConnectDatabase->IsChecked()); + else if (pButton == m_pRB_OpenExistingDatabase.get()) + { + m_pPB_OpenDatabase->Enable(m_pRB_OpenExistingDatabase->IsChecked()); + m_pFT_DocListLabel->Enable(m_pRB_OpenExistingDatabase->IsChecked()); + m_pLB_DocumentList->Enable(m_pRB_OpenExistingDatabase->IsChecked()); + } + } } IMPL_LINK_NOARG( OGeneralPageWizard, OnDocumentSelected, ListBox&, void ) diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 711913410e91..eb4ec41af21a 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -25,7 +25,6 @@ #include <vcl/fixed.hxx> #include <vcl/lstbox.hxx> #include <vcl/edit.hxx> -#include <svtools/dialogcontrolling.hxx> namespace dbaui { @@ -157,9 +156,6 @@ namespace dbaui Link<OGeneralPageWizard&,void> m_aDocumentSelectionHandler; /// to be called when a document in the RecentDoc list is selected Link<OGeneralPageWizard&,void> m_aChooseDocumentHandler; /// to be called when a recent document has been definitely chosen - ::svt::ControlDependencyManager - m_aControlDependencies; - bool m_bInitEmbeddedDBList : 1; void insertEmbeddedDBTypeEntryData( const OUString& _sType, const OUString& sDisplayName ); diff --git a/include/svtools/dialogcontrolling.hxx b/include/svtools/dialogcontrolling.hxx deleted file mode 100644 index a3915a3d40b3..000000000000 --- a/include/svtools/dialogcontrolling.hxx +++ /dev/null @@ -1,265 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SVTOOLS_DIALOGCONTROLLING_HXX -#define INCLUDED_SVTOOLS_DIALOGCONTROLLING_HXX - -#include <svtools/svtdllapi.h> - -#include <tools/link.hxx> -#include <vcl/button.hxx> -#include <vcl/vclevent.hxx> - -#include <memory> - -namespace svt -{ - - - //= IWindowOperator - - /** an abstract interface for operating on a ->Window - */ - class SVT_DLLPUBLIC SAL_NO_VTABLE IWindowOperator - { - public: - /** called when an event happened which should be reacted to - - @param _rTrigger - the event which triggered the call. If the Id of the event is 0, then this is the initial - call which is made when ->_rOperateOn is added to the responsibility of the DialogController. - @param _rOperateOn - the window on which to operate - */ - virtual void operateOn( const VclWindowEvent& _rTrigger, vcl::Window& _rOperateOn ) const = 0; - - virtual ~IWindowOperator(); - }; - typedef std::shared_ptr< IWindowOperator > PWindowOperator; - - - //= IWindowEventFilter - - /** an abstract interface for deciding whether a ->VclWindowEvent - is worth paying attention to - */ - class SVT_DLLPUBLIC SAL_NO_VTABLE IWindowEventFilter - { - public: - virtual bool payAttentionTo( const VclWindowEvent& _rEvent ) const = 0; - - virtual ~IWindowEventFilter(); - }; - typedef std::shared_ptr< IWindowEventFilter > PWindowEventFilter; - - - //= DialogController - - struct DialogController_Data; - /** a class controlling interactions between dialog controls - - An instance of this class listens to all events fired by a certain - ->Control (more precise, a ->Window), the so-called instigator. - - Additionally, the ->DialogController maintains a list of windows which - are affected by changes in the instigator window. Let's call those the - dependent windows. - - Now, by help of an owner-provided ->IWindowEventFilter, the ->DialogController - decides which events are worth attention. By help of an owner-provided - ->IWindowOperator, it handles those events for all dependent windows. - */ - class SVT_DLLPUBLIC DialogController - { - private: - ::std::unique_ptr< DialogController_Data > m_pImpl; - - public: - DialogController( vcl::Window& _rInstigator, const PWindowEventFilter& _pEventFilter, const PWindowOperator& _pOperator ); - virtual ~DialogController(); - - /** adds a window to the list of dependent windows - - @param _rWindow - The window to add to the list of dependent windows. - - The caller is responsible for life-time control: The given window - must live at least as long as the ->DialogController instance does. - */ - void addDependentWindow( vcl::Window& _rWindow ); - - /** resets the controller so that no actions happened anymore. - - The instances is disfunctional after this method has been called. - */ - void reset(); - - private: - void impl_update( const VclWindowEvent& _rTriggerEvent, vcl::Window& _rWindow ); - - DECL_LINK( OnWindowEvent, VclWindowEvent&, void ); - - private: - DialogController( const DialogController& ) = delete; - DialogController& operator=( const DialogController& ) = delete; - }; - - //= ControlDependencyManager - - struct ControlDependencyManager_Data; - /** helper class for managing control dependencies - - Instances of this class are intended to be held as members of a dialog/tabpage/whatever - class, with easy administration of inter-control dependencies (such as "Enable - control X if and only if checkbox Y is checked). - */ - class SVT_DLLPUBLIC ControlDependencyManager - { - private: - ::std::unique_ptr< ControlDependencyManager_Data > m_pImpl; - - public: - ControlDependencyManager(); - ~ControlDependencyManager(); - - /** ensures that a given window is enabled or disabled, according to the check state - of a given radio button - @param _rRadio - denotes the radio button whose check state is to observe - @param _rDependentWindow - denotes the window which should be enabled when ->_rRadio is checked, and - disabled when it's unchecked - */ - void enableOnRadioCheck( RadioButton& _rRadio, vcl::Window& _rDependentWindow ); - void enableOnRadioCheck( RadioButton& _rRadio, vcl::Window& _rDependentWindow1, vcl::Window& _rDependentWindow2 ); - void enableOnRadioCheck( RadioButton& _rRadio, vcl::Window& _rDependentWindow1, vcl::Window& _rDependentWindow2, vcl::Window& _rDependentWindow3 ); - void enableOnRadioCheck( RadioButton& _rRadio, vcl::Window& _rDependentWindow1, vcl::Window& _rDependentWindow2, vcl::Window& _rDependentWindow3, vcl::Window& _rDependentWindow4, vcl::Window& _rDependentWindow5 ); - - /** adds a non-standard controller whose functionality is not covered by the other methods - - @param _pController - the controller to add to the manager. Must not be <NULL/>. - */ - void addController( const std::shared_ptr<DialogController>& _pController ); - - private: - ControlDependencyManager( const ControlDependencyManager& ) = delete; - ControlDependencyManager& operator=( const ControlDependencyManager& ) = delete; - }; - - - //= EnableOnCheck - - /** a helper class implementing the ->IWindowOperator interface, - which enables a dependent window depending on the check state of - an instigator window. - - @see DialogController - */ - template< class CHECKABLE > - class SVT_DLLPUBLIC EnableOnCheck : public IWindowOperator - { - public: - typedef CHECKABLE SourceType; - - private: - SourceType& m_rCheckable; - - public: - /** constructs the instance - - @param _rCheckable - a ->Window instance which supports a boolean method IsChecked. Usually - a ->RadioButton or ->CheckBox - */ - EnableOnCheck( SourceType& _rCheckable ) - :m_rCheckable( _rCheckable ) - { - } - - virtual void operateOn( const VclWindowEvent& /*_rTrigger*/, vcl::Window& _rOperateOn ) const override - { - _rOperateOn.Enable( m_rCheckable.IsChecked() ); - } - }; - - - //= FilterForRadioOrCheckToggle - - /** a helper class implementing the ->IWindowEventFilter interface, - which filters for radio buttons or check boxes being toggled. - - Technically, the class simply filters for the ->VclEventId::RadiobuttonToggle - and the ->VclEventId::CheckboxToggle event. - */ - class SVT_DLLPUBLIC FilterForRadioOrCheckToggle : public IWindowEventFilter - { - const vcl::Window& m_rWindow; - public: - FilterForRadioOrCheckToggle( const vcl::Window& _rWindow ) - :m_rWindow( _rWindow ) - { - } - - bool payAttentionTo( const VclWindowEvent& _rEvent ) const override - { - if ( ( _rEvent.GetWindow() == &m_rWindow ) - && ( ( _rEvent.GetId() == VclEventId::RadiobuttonToggle ) - || ( _rEvent.GetId() == VclEventId::CheckboxToggle ) - ) - ) - return true; - return false; - } - }; - - - //= RadioDependentEnabler - - /** a ->DialogController derivee which enables or disables its dependent windows, - depending on the check state of a radio button. - - The usage of this class is as simple as - <code> - pController = new RadioDependentEnabler( m_aOptionSelectSomething ); - pController->addDependentWindow( m_aLabelSelection ); - pController->addDependentWindow( m_aListSelection ); - </code> - - With this, both <code>m_aLabelSelection</code> and <code>m_aListSelection</code> will - be disabled if and only <code>m_aOptionSelectSomething</code> is checked. - */ - class SVT_DLLPUBLIC RadioDependentEnabler : public DialogController - { - public: - RadioDependentEnabler( RadioButton& _rButton ) - :DialogController( _rButton, - PWindowEventFilter( new FilterForRadioOrCheckToggle( _rButton ) ), - PWindowOperator( new EnableOnCheck< RadioButton >( _rButton ) ) ) - { - } - }; - - -} // namespace svt - - -#endif // INCLUDED_SVTOOLS_DIALOGCONTROLLING_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/inc/DateTime.hxx b/reportdesign/source/ui/inc/DateTime.hxx index 2f7a1eaca881..0906c7906e57 100644 --- a/reportdesign/source/ui/inc/DateTime.hxx +++ b/reportdesign/source/ui/inc/DateTime.hxx @@ -24,8 +24,6 @@ #include <com/sun/star/util/XNumberFormats.hpp> #include <com/sun/star/lang/Locale.hpp> -#include <svtools/dialogcontrolling.hxx> - namespace rptui { class OReportController; diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index 075874d37c0f..c7d477027848 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -7031,7 +7031,6 @@ include/svtools/controldims.hxx include/svtools/ctrlbox.hxx include/svtools/ctrltool.hxx include/svtools/dialogclosedlistener.hxx -include/svtools/dialogcontrolling.hxx include/svtools/editbrowsebox.hxx include/svtools/editimplementation.hxx include/svtools/editsyntaxhighlighter.hxx @@ -13930,7 +13929,6 @@ svtools/source/misc/acceleratorexecute.cxx svtools/source/misc/bindablecontrolhelper.cxx svtools/source/misc/cliplistener.cxx svtools/source/misc/dialogclosedlistener.cxx -svtools/source/misc/dialogcontrolling.cxx svtools/source/misc/ehdl.cxx svtools/source/misc/embedhlp.cxx svtools/source/misc/embedtransfer.cxx diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index d17c85396e3d..d50cdaac4105 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -151,7 +151,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/misc/bindablecontrolhelper \ svtools/source/misc/cliplistener \ svtools/source/misc/dialogclosedlistener \ - svtools/source/misc/dialogcontrolling \ svtools/source/misc/ehdl \ svtools/source/misc/embedhlp \ svtools/source/misc/embedtransfer \ diff --git a/svtools/source/misc/dialogcontrolling.cxx b/svtools/source/misc/dialogcontrolling.cxx deleted file mode 100644 index f0bf61cf3a6b..000000000000 --- a/svtools/source/misc/dialogcontrolling.cxx +++ /dev/null @@ -1,192 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <svtools/dialogcontrolling.hxx> -#include <vcl/window.hxx> -#include <osl/diagnose.h> -#include <tools/debug.hxx> - -#include <algorithm> - - -namespace svt -{ - - - //= IWindowOperator - - - IWindowOperator::~IWindowOperator() - { - } - - - //= IWindowEventFilter - - - IWindowEventFilter::~IWindowEventFilter() - { - } - - - //= DialogController_Data - - struct DialogController_Data - { - VclPtr<vcl::Window> xInstigator; - ::std::vector< VclPtr<vcl::Window> > aConcernedWindows; - PWindowEventFilter pEventFilter; - PWindowOperator pOperator; - - DialogController_Data( vcl::Window& _xInstigator, const PWindowEventFilter& _pEventFilter, const PWindowOperator& _pOperator ) - :xInstigator( &_xInstigator ) - ,pEventFilter( _pEventFilter ) - ,pOperator( _pOperator ) - { - } - }; - - - //= DialogController - - - DialogController::DialogController( vcl::Window& _xInstigator, const PWindowEventFilter& _pEventFilter, - const PWindowOperator& _pOperator ) - :m_pImpl( new DialogController_Data( _xInstigator, _pEventFilter, _pOperator ) ) - { - DBG_ASSERT( m_pImpl->pEventFilter.get() && m_pImpl->pOperator.get(), - "DialogController::DialogController: invalid filter and/or operator!" ); - - m_pImpl->xInstigator->AddEventListener( LINK( this, DialogController, OnWindowEvent ) ); - } - - - DialogController::~DialogController() - { - reset(); - } - - - void DialogController::reset() - { - if (m_pImpl->xInstigator) - m_pImpl->xInstigator->RemoveEventListener( LINK( this, DialogController, OnWindowEvent ) ); - m_pImpl->xInstigator.clear(); - m_pImpl->aConcernedWindows.clear(); - m_pImpl->pEventFilter.reset(); - m_pImpl->pOperator.reset(); - } - - - void DialogController::addDependentWindow( vcl::Window& _rWindow ) - { - m_pImpl->aConcernedWindows.emplace_back(&_rWindow ); - - VclWindowEvent aEvent( &_rWindow, VclEventId::NONE, nullptr ); - impl_update( aEvent, _rWindow ); - } - - - IMPL_LINK( DialogController, OnWindowEvent, VclWindowEvent&, _rEvent, void ) - { - if ( !m_pImpl->pEventFilter->payAttentionTo( _rEvent ) ) - return; - for (auto const& concernedWindow : m_pImpl->aConcernedWindows) - impl_update(_rEvent, *concernedWindow); - } - - - void DialogController::impl_update( const VclWindowEvent& _rTriggerEvent, vcl::Window& _rWindow ) - { - m_pImpl->pOperator->operateOn( _rTriggerEvent, _rWindow ); - } - - - //= ControlDependencyManager_Data - - struct ControlDependencyManager_Data - { - ::std::vector< std::shared_ptr<DialogController> > aControllers; - }; - - - //= ControlDependencyManager - - - ControlDependencyManager::ControlDependencyManager() - :m_pImpl( new ControlDependencyManager_Data ) - { - } - - - ControlDependencyManager::~ControlDependencyManager() - { - } - - - void ControlDependencyManager::addController( const std::shared_ptr<DialogController>& _pController ) - { - OSL_ENSURE(_pController != nullptr, "ControlDependencyManager::addController: invalid " - "controller, this will crash, sooner or later!"); - m_pImpl->aControllers.push_back( _pController ); - } - - - void ControlDependencyManager::enableOnRadioCheck( RadioButton& _rRadio, vcl::Window& _rDependentWindow ) - { - std::shared_ptr<DialogController> pController( new RadioDependentEnabler( _rRadio ) ); - pController->addDependentWindow( _rDependentWindow ); - m_pImpl->aControllers.push_back( pController ); - } - - - void ControlDependencyManager::enableOnRadioCheck( RadioButton& _rRadio, vcl::Window& _rDependentWindow1, vcl::Window& _rDependentWindow2 ) - { - std::shared_ptr<DialogController> pController( new RadioDependentEnabler( _rRadio ) ); - pController->addDependentWindow( _rDependentWindow1 ); - pController->addDependentWindow( _rDependentWindow2 ); - m_pImpl->aControllers.push_back( pController ); - } - - - void ControlDependencyManager::enableOnRadioCheck( RadioButton& _rRadio, vcl::Window& _rDependentWindow1, vcl::Window& _rDependentWindow2, vcl::Window& _rDependentWindow3 ) - { - std::shared_ptr<DialogController> pController( new RadioDependentEnabler( _rRadio ) ); - pController->addDependentWindow( _rDependentWindow1 ); - pController->addDependentWindow( _rDependentWindow2 ); - pController->addDependentWindow( _rDependentWindow3 ); - m_pImpl->aControllers.push_back( pController ); - } - - - void ControlDependencyManager::enableOnRadioCheck( RadioButton& _rRadio, vcl::Window& _rDependentWindow1, vcl::Window& _rDependentWindow2, vcl::Window& _rDependentWindow3, vcl::Window& _rDependentWindow4, vcl::Window& _rDependentWindow5 ) - { - std::shared_ptr<DialogController> pController( new RadioDependentEnabler( _rRadio ) ); - pController->addDependentWindow( _rDependentWindow1 ); - pController->addDependentWindow( _rDependentWindow2 ); - pController->addDependentWindow( _rDependentWindow3 ); - pController->addDependentWindow( _rDependentWindow4 ); - pController->addDependentWindow( _rDependentWindow5 ); - m_pImpl->aControllers.push_back( pController ); - } - -} // namespace svt - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits