diff options
Diffstat (limited to 'cui/source/dialogs/cuigaldlg.cxx')
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 559e878ce25c..9a1a2e26a4ed 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -24,6 +24,7 @@ #include <algorithm> #include <cassert> +#include <utility> #include <vcl/errinf.hxx> #include <ucbhelper/content.hxx> #include <vcl/svapp.hxx> @@ -52,6 +53,7 @@ #include <svx/dialmgr.hxx> #include <svx/strings.hrc> #include <osl/diagnose.h> +#include <o3tl/string_view.hxx> using namespace ::ucbhelper; using namespace ::cppu; @@ -64,11 +66,11 @@ using namespace ::com::sun::star::uno; SearchThread::SearchThread(SearchProgress* pProgress, TPGalleryThemeProperties* pBrowser, - const INetURLObject& rStartURL) + INetURLObject aStartURL) : Thread("cuiSearchThread") , mpProgress(pProgress) , mpBrowser(pBrowser) - , maStartURL(rStartURL) + , maStartURL(std::move(aStartURL)) { } @@ -187,9 +189,9 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, } } -SearchProgress::SearchProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage, const INetURLObject& rStartURL) +SearchProgress::SearchProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage, INetURLObject aStartURL) : GenericDialogController(pParent, "cui/ui/gallerysearchprogress.ui", "GallerySearchProgress") - , startUrl_(rStartURL) + , startUrl_(std::move(aStartURL)) , m_pTabPage(pTabPage) , m_xFtSearchDir(m_xBuilder->weld_label("dir")) , m_xFtSearchType(m_xBuilder->weld_label("file")) @@ -334,7 +336,8 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void) if( !aRemoveEntries[ i ] ) aRemainingVector.push_back( m_pTabPage->aFoundList[i] ); - m_pTabPage->aFoundList = std::move(aRemainingVector); + std::swap(m_pTabPage->aFoundList, aRemainingVector); + aRemainingVector.clear(); // refill list box for( i = 0, nCount = aRemoveEntries.size(); i < nCount; ++i ) @@ -342,10 +345,8 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void) aRemainingVector.push_back(m_pTabPage->m_xLbxFound->get_text(i)); m_pTabPage->m_xLbxFound->clear(); - for( i = 0, nCount = aRemainingVector.size(); i < nCount; ++i ) m_pTabPage->m_xLbxFound->append_text(aRemainingVector[i]); - aRemainingVector.clear(); m_pTabPage->m_xLbxFound->thaw(); @@ -491,7 +492,7 @@ GalleryThemeProperties::GalleryThemeProperties(weld::Widget* pParent, m_xDialog->set_title(aText); } -void GalleryThemeProperties::PageCreated(const OString& rId, SfxTabPage &rPage) +void GalleryThemeProperties::PageCreated(const OUString& rId, SfxTabPage &rPage) { if (rId == "general") static_cast<TPGalleryThemeGeneral&>( rPage ).SetXChgData( pData ); @@ -620,7 +621,7 @@ void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData ) m_xCbxPreview->set_sensitive(false); } -void TPGalleryThemeProperties::StartSearchFiles( const OUString& _rFolderURL, short _nDlgResult ) +void TPGalleryThemeProperties::StartSearchFiles( std::u16string_view _rFolderURL, short _nDlgResult ) { if ( RET_OK == _nDlgResult ) { @@ -706,7 +707,7 @@ void TPGalleryThemeProperties::FillFilterList() #if HAVE_FEATURE_AVMEDIA // media filters - static constexpr OUStringLiteral aWildcard = u"*."; + static constexpr OUString aWildcard = u"*."_ustr; ::avmedia::FilterNameVector aFilters= ::avmedia::MediaWindow::getMediaFilters(); for(const std::pair<OUString,OUString> & aFilter : aFilters) @@ -755,7 +756,7 @@ void TPGalleryThemeProperties::FillFilterList() { if ( !aExtensions.isEmpty() ) aExtensions += ";"; - aExtensions += aWildcard + aFilter.second.getToken( 0, ';', nIndex ); + aExtensions += OUString::Concat(aWildcard) + o3tl::getToken(aFilter.second, 0, ';', nIndex ); } } #endif |