diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-30 16:50:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-30 17:44:34 +0100 |
commit | 47dd2c63f649828a833543e21d4eca5866ec9ebe (patch) | |
tree | 0b9a64485028cb9c7c0ffc52cad79033b2cb6209 /dbaccess | |
parent | 6ddefb080b12f54f84a8de44347a9b1816972ad3 (diff) |
Rewrite uses of boost::optional
...to only use functions that are also available for std::optional (in
preparation for changing from boost::optional to std::optional):
* uses of get are replaced with operator * or operator ->
* uses of is_initialized are replaced with operator bool
* uses of reset with an argument are replace with operator =
(All of the replacements are also available for boost::optional "since forever",
so this change should not break builds against old --with-system-boost. An
alternative replacement for is_initialized would have been has_value, but that
is only available since Boost 1.68.)
Change-Id: I532687b6a5ee37dab28befb8e0eb05c22cbecf0f
Reviewed-on: https://gerrit.libreoffice.org/84124
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/CRowSetDataColumn.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/ContentHelper.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/ModelImpl.cxx | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index c11fe639bf25..3cf8c0f0858c 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -136,7 +136,7 @@ void SAL_CALL ORowSetDataColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHan { bool bVal = false; rValue >>= bVal; - m_isReadOnly.reset(bVal); + m_isReadOnly = bVal; } break; default: diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 7737ac0b2825..fcd6629640cd 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -133,7 +133,7 @@ OUString SAL_CALL OContentHelper::getContentType() if ( !m_pImpl->m_aProps.aContentType ) { // content type not yet retrieved - m_pImpl->m_aProps.aContentType.reset( determineContentType() ); + m_pImpl->m_aProps.aContentType = determineContentType(); } return *m_pImpl->m_aProps.aContentType; diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index 2912c625c465..076a0177e549 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -1246,17 +1246,17 @@ ODatabaseModelImpl::EmbeddedMacros ODatabaseModelImpl::determineEmbeddedMacros() { if ( ::sfx2::DocumentMacroMode::storageHasMacros( getOrCreateRootStorage() ) ) { - m_aEmbeddedMacros.reset( eDocumentWideMacros ); + m_aEmbeddedMacros = eDocumentWideMacros; } else if ( lcl_hasObjectsWithMacros_nothrow( *this, E_FORM ) || lcl_hasObjectsWithMacros_nothrow( *this, E_REPORT ) ) { - m_aEmbeddedMacros.reset( eSubDocumentMacros ); + m_aEmbeddedMacros = eSubDocumentMacros; } else { - m_aEmbeddedMacros.reset( eNoMacros ); + m_aEmbeddedMacros = eNoMacros; } } return *m_aEmbeddedMacros; |