Kaydet (Commit) 0552cda5 authored tarafından Ivo Hinkelmann's avatar Ivo Hinkelmann

INTEGRATION: CWS fpicker6 (1.123.68); FILE MERGED

2006/08/01 17:45:08 cmc 1.123.68.1: #i63263# multiselect support
üst e7d297c8
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: filedlghelper.cxx,v $ * $RCSfile: filedlghelper.cxx,v $
* *
* $Revision: 1.123 $ * $Revision: 1.124 $
* *
* last change: $Author: hr $ $Date: 2006-06-19 22:21:27 $ * last change: $Author: ihi $ $Date: 2006-08-03 13:21:55 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -69,6 +69,9 @@ ...@@ -69,6 +69,9 @@
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKERNOTIFIER_HPP_ #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKERNOTIFIER_HPP_
#include <com/sun/star/ui/dialogs/XFilePickerNotifier.hpp> #include <com/sun/star/ui/dialogs/XFilePickerNotifier.hpp>
#endif #endif
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKERWORKAROUND_HPP_
#include <com/sun/star/ui/dialogs/XFilePickerWorkaround.hpp>
#endif
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPREVIEW_HPP_ #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPREVIEW_HPP_
#include <com/sun/star/ui/dialogs/XFilePreview.hpp> #include <com/sun/star/ui/dialogs/XFilePreview.hpp>
#endif #endif
...@@ -1551,10 +1554,30 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, ...@@ -1551,10 +1554,30 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList,
getRealFilter( rFilter ); getRealFilter( rFilter );
// fill the rpURLList // fill the rpURLList
Sequence < OUString > aPathSeq = mxFileDlg->getFiles(); Reference<XFilePickerWorkaround> xFileWorkarounds(mxFileDlg, UNO_QUERY);
Sequence < OUString > aPathSeq;
if (xFileWorkarounds.is())
{
aPathSeq = xFileWorkarounds->getFilesAsURIs();
if ( !aPathSeq.getLength() )
return ERRCODE_ABORT;
if ( aPathSeq.getLength() ) rpURLList = new SvStringsDtor;
for ( USHORT i = 0; i < aPathSeq.getLength(); ++i )
{
String* pURL = new String( aPathSeq[i] );
rpURLList->Insert( pURL, rpURLList->Count() );
}
}
else
{ {
OSL_TRACE("Obsolete & broken multiselect code path");
aPathSeq = mxFileDlg->getFiles();
if ( !aPathSeq.getLength() )
return ERRCODE_ABORT;
rpURLList = new SvStringsDtor; rpURLList = new SvStringsDtor;
if ( aPathSeq.getLength() == 1 ) if ( aPathSeq.getLength() == 1 )
...@@ -1580,11 +1603,9 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, ...@@ -1580,11 +1603,9 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList,
rpURLList->Insert( pURL, rpURLList->Count() ); rpURLList->Insert( pURL, rpURLList->Count() );
} }
} }
SaveLastUsedFilter();
return ERRCODE_NONE;
} }
else SaveLastUsedFilter();
return ERRCODE_ABORT; return ERRCODE_NONE;
} }
else else
return ERRCODE_ABORT; return ERRCODE_ABORT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment