diff options
-rwxr-xr-x | compilerplugins/clang/unusedenumconstants.py | 1 | ||||
-rw-r--r-- | svtools/source/contnr/contentenumeration.cxx | 8 | ||||
-rw-r--r-- | svtools/source/contnr/contentenumeration.hxx | 3 | ||||
-rw-r--r-- | svtools/source/contnr/fileview.cxx | 15 | ||||
-rw-r--r-- | svtools/source/contnr/foldertree.cxx | 2 |
5 files changed, 13 insertions, 16 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py index 065b0dce43b1..4db682b53f30 100755 --- a/compilerplugins/clang/unusedenumconstants.py +++ b/compilerplugins/clang/unusedenumconstants.py @@ -144,6 +144,7 @@ for d in definitionSet: "sw/inc/toxe.hxx", # ToxAuthorityType (from UI) "include/svx/sxekitm.hxx", # SdrEdgeKind (from UI) "include/svx/paraprev.hxx", # SvxPrevLineSpace (from UI) + "include/svx/ctredlin.hxx", # SvxRedlinDateMode (from UI) # represents constants from an external API "opencl/inc/opencl_device_selection.h", "vcl/inc/sft.hxx", diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index fee02548db08..acc6cc4a019a 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -135,7 +135,7 @@ namespace svt EnumerationResult FileViewContentEnumerator::enumerateFolderContent() { - EnumerationResult eResult = ERROR; + EnumerationResult eResult = EnumerationResult::ERROR; try { @@ -298,7 +298,7 @@ namespace svt bCancelled = m_bCancelled; } } - eResult = SUCCESS; + eResult = EnumerationResult::SUCCESS; } catch( CommandAbortedException& ) { @@ -324,12 +324,12 @@ namespace svt ::osl::MutexGuard aGuard( m_aMutex ); pHandler = m_pResultHandler; if ( m_bCancelled ) - return ERROR; + return EnumerationResult::ERROR; } { ::osl::MutexGuard aGuard( m_rContentMutex ); - if ( eResult != SUCCESS ) + if ( eResult != EnumerationResult::SUCCESS ) // clear any "intermediate" and unfinished result m_rContent.clear(); } diff --git a/svtools/source/contnr/contentenumeration.hxx b/svtools/source/contnr/contentenumeration.hxx index 70bfef23b479..74beb8bd06a9 100644 --- a/svtools/source/contnr/contentenumeration.hxx +++ b/svtools/source/contnr/contentenumeration.hxx @@ -127,11 +127,10 @@ namespace svt //= EnumerationResult - enum EnumerationResult + enum class EnumerationResult { SUCCESS, /// the enumeration was successful ERROR, /// the enumeration was unsuccessful - RUNNING /// the enumeration is still running, and the maximum wait time has passed }; diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index f7fc478d7254..f18e73ff4cdf 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -1449,7 +1449,7 @@ const OUString* NameTranslator_Impl::GetTransTableFileName() const SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommandEnvironment > const & xEnv, FileViewFlags nFlags, bool bOnlyFolder ) :mpAntiImpl ( pAntiImpl ) - ,m_eAsyncActionResult ( ::svt::ERROR ) + ,m_eAsyncActionResult ( ::svt::EnumerationResult::ERROR ) ,m_bRunningAsyncAction ( false ) ,m_bAsyncActionCancelled ( false ) ,m_eViewMode ( eDetailedList ) @@ -1535,7 +1535,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( if ( !pAsyncDescriptor ) { ::svt::EnumerationResult eResult = m_xContentEnumerator->enumerateFolderContentSync( _rFolder, rBlackList ); - if ( ::svt::SUCCESS == eResult ) + if ( ::svt::EnumerationResult::SUCCESS == eResult ) { implEnumerationSuccess(); m_xContentEnumerator.clear(); @@ -1547,7 +1547,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( m_bRunningAsyncAction = true; m_bAsyncActionCancelled = false; - m_eAsyncActionResult = ::svt::ERROR; + m_eAsyncActionResult = ::svt::EnumerationResult::ERROR; m_aAsyncActionFinished.reset(); // don't (yet) set m_aCurrentAsyncActionHandler to pTimeout->aFinishHandler. @@ -1606,14 +1606,11 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( m_bRunningAsyncAction = false; switch ( m_eAsyncActionResult ) { - case ::svt::SUCCESS: + case ::svt::EnumerationResult::SUCCESS: return eSuccess; - case ::svt::ERROR: + case ::svt::EnumerationResult::ERROR: return eFailure; - - case ::svt::RUNNING: - return eStillRunning; } SAL_WARN( "svtools.contnr", "SvtFileView_Impl::GetFolderContent_Impl: unreachable!" ); @@ -1849,7 +1846,7 @@ void SvtFileView_Impl::enumerationDone( ::svt::EnumerationResult eResult ) m_aAsyncActionFinished.set(); - if ( svt::SUCCESS == eResult ) + if ( svt::EnumerationResult::SUCCESS == eResult ) implEnumerationSuccess(); if ( m_aCurrentAsyncActionHandler.IsSet() ) diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx index 2d6b8d1b8c58..0ea1a21ff10b 100644 --- a/svtools/source/contnr/foldertree.cxx +++ b/svtools/source/contnr/foldertree.cxx @@ -62,7 +62,7 @@ void FolderTree::FillTreeEntry( SvTreeListEntry* pEntry ) EnumerationResult eResult = xContentEnumerator->enumerateFolderContentSync( aFolder, m_aBlackList ); - if ( SUCCESS == eResult ) + if ( EnumerationResult::SUCCESS == eResult ) { for(SortingData_Impl* i : aContent) { |