diff options
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/win32/VistaFilePicker.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/win32/VistaFilePickerImpl.cxx | 39 | ||||
-rw-r--r-- | fpicker/source/win32/VistaFilePickerImpl.hxx | 2 |
3 files changed, 6 insertions, 37 deletions
diff --git a/fpicker/source/win32/VistaFilePicker.cxx b/fpicker/source/win32/VistaFilePicker.cxx index e1eb66a9ce83..0737100d07e6 100644 --- a/fpicker/source/win32/VistaFilePicker.cxx +++ b/fpicker/source/win32/VistaFilePicker.cxx @@ -119,7 +119,7 @@ void SAL_CALL VistaFilePicker::appendFilter(const OUString& sTitle , { RequestRef rRequest(new Request()); rRequest->setRequest (VistaFilePickerImpl::E_APPEND_FILTER); - rRequest->setArgument(PROP_FILTER_TITLE, sTitle); + rRequest->setArgument(PROP_FILTER_TITLE, sTitle ); rRequest->setArgument(PROP_FILTER_VALUE, sFilter); m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED); diff --git a/fpicker/source/win32/VistaFilePickerImpl.cxx b/fpicker/source/win32/VistaFilePickerImpl.cxx index aa33dcdacbdb..ff0cf2c27956 100644 --- a/fpicker/source/win32/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/VistaFilePickerImpl.cxx @@ -360,22 +360,11 @@ void VistaFilePickerImpl::impl_sta_appendFilter(const RequestRef& rRequest) { const OUString sTitle = rRequest->getArgumentOrDefault(PROP_FILTER_TITLE, OUString()); const OUString sFilter = rRequest->getArgumentOrDefault(PROP_FILTER_VALUE, OUString()); + // SYNCHRONIZED-> ::osl::ResettableMutexGuard aLock(m_aMutex); - const sal_Int32 idx = sTitle.indexOf("(."); - if (idx > 0) - { - const OUString sTitle_ = sTitle.copy(0, idx); - m_mapRealFilter[sTitle_] = std::make_pair(sTitle, sFilter); - m_lFilters.addFilter(sTitle_, sFilter); - } - else - { - m_mapRealFilter[sTitle] = std::make_pair(sTitle, sFilter); - m_lFilters.addFilter(sTitle, sFilter); - } - + m_lFilters.addFilter(sTitle, sFilter); } @@ -395,20 +384,7 @@ void VistaFilePickerImpl::impl_sta_appendFilterGroup(const RequestRef& rRequest) for (i=0; i<c; ++i) { const css::beans::StringPair& rFilter = aFilterGroup[i]; - const OUString sTitle = rFilter.First; - const OUString sFilter = rFilter.Second; - const sal_Int32 idx = sTitle.indexOf("(."); - if (idx > 0) - { - const OUString sTitle_ = sTitle.copy(0, idx); - m_mapRealFilter[sTitle_] = std::make_pair(sTitle, sFilter); - m_lFilters.addFilter(sTitle_, sFilter); - } - else - { - m_mapRealFilter[sTitle] = std::make_pair(sTitle, sFilter); - m_lFilters.addFilter(sTitle, sFilter); - } + m_lFilters.addFilter(rFilter.First, rFilter.Second); } } @@ -441,15 +417,10 @@ void VistaFilePickerImpl::impl_sta_getCurrentFilter(const RequestRef& rRequest) OUString sTitle; ::sal_Int32 nRealIndex = (nIndex-1); // COM dialog base on 1 ... filter container on 0 .-) if ( - (nRealIndex >= 0) && + (nRealIndex >= 0 ) && (m_lFilters.getFilter(nRealIndex, sTitle)) - ) - { - if (m_mapRealFilter.find(sTitle) != m_mapRealFilter.end()) - sTitle = m_mapRealFilter[sTitle].first; - + ) rRequest->setArgument(PROP_FILTER_TITLE, sTitle); - } else if ( nRealIndex == -1 ) // Dialog not visible yet { sTitle = m_lFilters.getCurrentFilter(); diff --git a/fpicker/source/win32/VistaFilePickerImpl.hxx b/fpicker/source/win32/VistaFilePickerImpl.hxx index 460136a73b48..9cce75b5714f 100644 --- a/fpicker/source/win32/VistaFilePickerImpl.hxx +++ b/fpicker/source/win32/VistaFilePickerImpl.hxx @@ -37,7 +37,6 @@ #include <osl/thread.hxx> #include <osl/conditn.hxx> #include <rtl/ustring.hxx> -#include <map> namespace fpicker{ namespace win32{ @@ -306,7 +305,6 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex /// @todo document me CFilterContainer m_lFilters; - std::map<OUString, std::pair<OUString, OUString>> m_mapRealFilter; /** help us to handle dialog events and provide them to interested office |