fpicker/Library_fps_office.mk | 1 fpicker/source/office/OfficeFilePicker.cxx | 2 fpicker/source/office/RemoteFilesDialog.cxx | 959 +++++++++++++ fpicker/source/office/RemoteFilesDialog.hxx | 170 ++ fpicker/source/office/iodlg.hxx | 3 include/svtools/PlaceEditDialog.hxx | 2 include/svtools/RemoteFilesDialog.hxx | 182 -- include/svtools/foldertree.hxx | 56 officecfg/registry/data/org/openoffice/Office/Common.xcu | 4 svtools/Library_svt.mk | 2 svtools/source/contnr/foldertree.cxx | 116 + svtools/source/dialogs/PlaceEditDialog.cxx | 12 svtools/source/dialogs/RemoteFilesDialog.cxx | 1062 --------------- 13 files changed, 1323 insertions(+), 1248 deletions(-)
New commits: commit 0c5f7163fdf0306d46573974a2f279b659ed66b2 Author: Szymon KÅos <eszka...@gmail.com> Date: Mon Jul 13 16:32:07 2015 +0200 Separators between services types Change-Id: Ibd26abdb83b86256197311bc7a120b4b025ae814 diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx index de321a2..9cba4d5 100644 --- a/include/svtools/PlaceEditDialog.hxx +++ b/include/svtools/PlaceEditDialog.hxx @@ -51,6 +51,8 @@ private : */ std::vector< std::shared_ptr< DetailsContainer > > m_aDetailsContainers; + unsigned int m_nCurrentType; + public : PlaceEditDialog( vcl::Window* pParent); diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index a9b1bf7..6394722 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -573,6 +573,7 @@ <it>https://www.googleapis.com/drive/v2</it> <it>https://apis.live.net/v5.0</it> <it>https://api.alfresco.com/cmis/versions/1.0/atom/</it> + <it></it> <it>http://<host:port>/alfresco/cmisatom</it> <it>http://<host>/p8cmis/wsdl</it> <it>https://apps.lotuslive.com/files/basic/cmis/my/servicedoc</it> @@ -583,6 +584,7 @@ <it>http://<host>/_vti_bin/CMISSoapwsdl.aspx</it> <it>http://<host>/_api/Web</it> <it>http://<host>/</it> + <it></it> </value> </prop> <prop oor:name="CmisServersNames"> @@ -590,6 +592,7 @@ <it>Google Drive</it> <it>OneDrive</it> <it>Alfresco Cloud</it> + <it>--------------------</it> <it>Alfresco 4</it> <it>IBM FileNet P8</it> <it>Lotus Live Files</it> @@ -600,6 +603,7 @@ <it>SharePoint 2010</it> <it>SharePoint 2013</it> <it>Other CMIS</it> + <it>--------------------</it> </value> </prop> </node> diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 0d1dced..482b763 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -20,6 +20,7 @@ using namespace com::sun::star::uno; PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent) : ModalDialog(pParent, "PlaceEditDialog", "svt/ui/placeedit.ui") , m_xCurrentDetails() + , m_nCurrentType( 0 ) { get( m_pEDServerName, "name" ); get( m_pLBServerType, "type" ); @@ -249,11 +250,22 @@ IMPL_LINK_NOARG( PlaceEditDialog, EditUsernameHdl ) IMPL_LINK_NOARG( PlaceEditDialog, SelectTypeHdl ) { + if ( m_pLBServerType->GetSelectEntry() == "--------------------" ) + { + if( !m_pLBServerType->IsTravelSelect() ) + m_pLBServerType->SelectEntryPos( m_nCurrentType ); + else + m_pLBServerType->SetNoSelection(); + + return 0; + } + if (m_xCurrentDetails.get()) m_xCurrentDetails->show(false); sal_uInt16 nPos = m_pLBServerType->GetSelectEntryPos( ); m_xCurrentDetails = m_aDetailsContainers[nPos]; + m_nCurrentType = nPos; m_xCurrentDetails->show(true); commit 2e2b107a4251e7c08c7c9f39a26d00c1f6b65ae3 Author: Szymon KÅos <eszka...@gmail.com> Date: Mon Jul 13 14:31:15 2015 +0200 removed comment Change-Id: Ia74226be5f7d0776d60f04945c23a5b94cdc11b6 diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx index 2312a0a..80febee 100644 --- a/fpicker/source/office/iodlg.hxx +++ b/fpicker/source/office/iodlg.hxx @@ -57,8 +57,7 @@ class SvtFileDialogFilter_Impl; class SvtExpFileDlg_Impl; class CustomContainer; -class SvtFileDialog : //public ModalDialog, public ::svt::IFilePickerController, -public SvtFileDialog_Base +class SvtFileDialog : public SvtFileDialog_Base { private: VclPtr<CheckBox> _pCbReadOnly; commit 0103a14020057fa118d97e3a0a50a06efcc5c08b Author: Szymon KÅos <eszka...@gmail.com> Date: Mon Jul 13 14:29:09 2015 +0200 RemoteFilesDialog moved to fpicker Change-Id: I8e978d40ee022d15f482aec4567c3171b75b9720 diff --git a/fpicker/Library_fps_office.mk b/fpicker/Library_fps_office.mk index c109dce..6c484a0 100644 --- a/fpicker/Library_fps_office.mk +++ b/fpicker/Library_fps_office.mk @@ -49,6 +49,7 @@ $(eval $(call gb_Library_add_exception_objects,fps_office,\ fpicker/source/office/OfficeFilePicker \ fpicker/source/office/OfficeFolderPicker \ fpicker/source/office/PlacesListBox \ + fpicker/source/office/RemoteFilesDialog \ )) # vim: set noet sw=4 ts=4: diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index 915fd49..5fb8edc 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -20,7 +20,7 @@ #include "OfficeFilePicker.hxx" #include "iodlg.hxx" -#include <svtools/RemoteFilesDialog.hxx> +#include "RemoteFilesDialog.hxx" #include <list> #include <functional> diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx similarity index 98% rename from svtools/source/dialogs/RemoteFilesDialog.cxx rename to fpicker/source/office/RemoteFilesDialog.cxx index 2eea459..533940d 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <svtools/RemoteFilesDialog.hxx> +#include "RemoteFilesDialog.hxx" class FileViewContainer : public vcl::Window { @@ -757,7 +757,15 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl ) bExists = false; } - if ( !bExists ) + if ( bExists ) + { + OUString sMsg = ResId( STR_SVT_ALREADYEXISTOVERWRITE, *ResMgrHolder::getOrCreate() ); + sMsg = sMsg.replaceFirst( "$filename$", sName ); + ScopedVclPtrInstance< MessageDialog > aBox( this, sMsg, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO ); + if( aBox->Execute() != RET_YES ) + return 0; + } + else { if( m_eMode == REMOTEDLG_MODE_OPEN ) return 0; diff --git a/include/svtools/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx similarity index 96% rename from include/svtools/RemoteFilesDialog.hxx rename to fpicker/source/office/RemoteFilesDialog.hxx index db61e17..3462305 100644 --- a/include/svtools/RemoteFilesDialog.hxx +++ b/fpicker/source/office/RemoteFilesDialog.hxx @@ -11,13 +11,15 @@ #define INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX #include <svtools/foldertree.hxx> -#include <svtools/svtdllapi.h> #include <svtools/place.hxx> #include <svtools/PlaceEditDialog.hxx> #include <svtools/breadcrumb.hxx> #include <svtools/fileview.hxx> +#include <tools/resid.hxx> + #include <vcl/button.hxx> +#include <vcl/fpicker.hrc> #include <vcl/menubtn.hxx> #include <vcl/dialog.hxx> #include <vcl/vclptr.hxx> @@ -30,7 +32,8 @@ #include <vector> -#include "../../../fpicker/source/office/fpdialogbase.hxx" +#include "fpdialogbase.hxx" +#include "fpsofficeResMgr.hxx" using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; @@ -53,7 +56,7 @@ typedef ::com::sun::star::uno::Sequence< OUString > OUStringList; class FileViewContainer; -class SVT_DLLPUBLIC RemoteFilesDialog : public SvtFileDialog_Base +class RemoteFilesDialog : public SvtFileDialog_Base { public: RemoteFilesDialog( vcl::Window* pParent, WinBits nBits ); diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index 20a4c2f..f6c834d 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -139,7 +139,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/dialogs/mcvmath \ svtools/source/dialogs/PlaceEditDialog \ svtools/source/dialogs/prnsetup \ - svtools/source/dialogs/RemoteFilesDialog \ svtools/source/dialogs/restartdialog \ svtools/source/dialogs/roadmapwizard \ svtools/source/dialogs/ServerDetailsControls \ commit 8e4deb79da8bf1d8b2718101d9d3bd97b3750068 Author: Szymon KÅos <eszka...@gmail.com> Date: Mon Jul 13 12:01:12 2015 +0200 moved the FolderTree class Change-Id: I3231b32d3e3ade7dc3b366f03d6e189f5bc4d431 diff --git a/include/svtools/RemoteFilesDialog.hxx b/include/svtools/RemoteFilesDialog.hxx index fd12f39..db61e17 100644 --- a/include/svtools/RemoteFilesDialog.hxx +++ b/include/svtools/RemoteFilesDialog.hxx @@ -10,18 +10,15 @@ #ifndef INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX #define INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX +#include <svtools/foldertree.hxx> #include <svtools/svtdllapi.h> #include <svtools/place.hxx> #include <svtools/PlaceEditDialog.hxx> -#include <svtools/svtools.hrc> -#include <svtools/svtresid.hxx> #include <svtools/breadcrumb.hxx> #include <svtools/fileview.hxx> -#include <svtools/treelistentry.hxx> #include <vcl/button.hxx> #include <vcl/menubtn.hxx> -#include <vcl/lstbox.hxx> #include <vcl/dialog.hxx> #include <vcl/vclptr.hxx> #include <vcl/split.hxx> @@ -30,11 +27,6 @@ #include <officecfg/Office/Common.hxx> #include <com/sun/star/beans/StringPair.hpp> #include <com/sun/star/uno/Sequence.hxx> -#include <com/sun/star/ucb/XCommandEnvironment.hpp> -#include <com/sun/star/ucb/XProgressHandler.hpp> -#include <com/sun/star/task/XInteractionHandler.hpp> -#include <com/sun/star/task/InteractionHandler.hpp> -#include <ucbhelper/commandenvironment.hxx> #include <vector> @@ -42,11 +34,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::task; using namespace ::com::sun::star::ui::dialogs; -using namespace ::comphelper; -using namespace ::svt; enum SvtRemoteDlgMode { @@ -64,8 +52,6 @@ typedef std::shared_ptr< Place > ServicePtr; typedef ::com::sun::star::uno::Sequence< OUString > OUStringList; class FileViewContainer; -class Breadcrumb; -class FolderTree; class SVT_DLLPUBLIC RemoteFilesDialog : public SvtFileDialog_Base { diff --git a/include/svtools/foldertree.hxx b/include/svtools/foldertree.hxx new file mode 100644 index 0000000..213c254 --- /dev/null +++ b/include/svtools/foldertree.hxx @@ -0,0 +1,56 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_SVTOOLS_FOLDERTREE_HXX +#define INCLUDED_SVTOOLS_FOLDERTREE_HXX + +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/ucb/XCommandEnvironment.hpp> +#include <com/sun/star/task/InteractionHandler.hpp> + +#include <officecfg/Office/Common.hxx> + +#include <svtools/svtdllapi.h> +#include <svtools/svtools.hrc> +#include <svtools/svtresid.hxx> +#include <svtools/treelistentry.hxx> + +#include <tools/urlobj.hxx> + +#include <ucbhelper/commandenvironment.hxx> + +#include <vcl/image.hxx> +#include <vcl/lstbox.hxx> + +using namespace ::com::sun::star::ucb; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::task; +using namespace ::svt; + +class SVT_DLLPUBLIC FolderTree : public SvTreeListBox +{ +private: + Reference< XCommandEnvironment > m_xEnv; + ::osl::Mutex m_aMutex; + Sequence< OUString > m_aBlackList; + Image m_aFolderImage; + +public: + FolderTree( vcl::Window* pParent, WinBits nBits ); + + virtual void RequestingChildren( SvTreeListEntry* pEntry ); + + void FillTreeEntry( SvTreeListEntry* pEntry ); + void SetTreePath( OUString sUrl ); + void SetBlackList( const ::com::sun::star::uno::Sequence< OUString >& rBlackList ); +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index e3ce0a0..20a4c2f 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -92,6 +92,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/contnr/DocumentInfoPreview \ svtools/source/contnr/contentenumeration \ svtools/source/contnr/fileview \ + svtools/source/contnr/foldertree \ svtools/source/contnr/imivctl1 \ svtools/source/contnr/imivctl2 \ svtools/source/contnr/ivctrl \ diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx new file mode 100644 index 0000000..b4c27fd --- /dev/null +++ b/svtools/source/contnr/foldertree.cxx @@ -0,0 +1,116 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <svtools/foldertree.hxx> + +#include "contentenumeration.hxx" + +FolderTree::FolderTree( vcl::Window* pParent, WinBits nBits ) + : SvTreeListBox( pParent, nBits | WB_SORT | WB_TABSTOP ) + , m_aFolderImage( SvtResId( IMG_SVT_FOLDER ) ) +{ + Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); + Reference< XInteractionHandler > xInteractionHandler( + InteractionHandler::createWithParent( xContext, 0 ), UNO_QUERY_THROW ); + m_xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); + + SetDefaultCollapsedEntryBmp( m_aFolderImage ); + SetDefaultExpandedEntryBmp( m_aFolderImage ); +} + +void FolderTree::RequestingChildren( SvTreeListEntry* pEntry ) +{ + FillTreeEntry( pEntry ); +} + +void FolderTree::FillTreeEntry( SvTreeListEntry* pEntry ) +{ + // fill only empty entries + if( pEntry && GetChildCount( pEntry ) == 0 ) + { + ::std::vector< SortingData_Impl* > aContent; + + FileViewContentEnumerator* pContentEnumerator = new FileViewContentEnumerator( + m_xEnv, aContent, m_aMutex, NULL ); + + OUString* pURL = static_cast< OUString* >( pEntry->GetUserData() ); + + if( pURL ) + { + FolderDescriptor aFolder( *pURL ); + + EnumerationResult eResult = + pContentEnumerator->enumerateFolderContentSync( aFolder, m_aBlackList ); + + if ( SUCCESS == eResult ) + { + for( unsigned int i = 0; i < aContent.size(); i++ ) + { + if( aContent[i]->mbIsFolder ) + { + SvTreeListEntry* pNewEntry = InsertEntry( aContent[i]->GetTitle(), pEntry, true ); + + OUString* sData = new OUString( aContent[i]->maTargetURL ); + pNewEntry->SetUserData( static_cast< void* >( sData ) ); + } + } + } + } + } +} + +void FolderTree::SetTreePath( OUString sUrl ) +{ + INetURLObject aUrl( sUrl ); + aUrl.setFinalSlash(); + + OUString sPath = aUrl.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ); + + SvTreeListEntry* pEntry = First(); + bool end = false; + + while( pEntry && !end ) + { + if( pEntry->GetUserData() ) + { + OUString sNodeUrl = *static_cast< OUString* >( pEntry->GetUserData() ); + + INetURLObject aUrlObj( sNodeUrl ); + aUrlObj.setFinalSlash(); + + sNodeUrl = aUrlObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ); + + if( sPath == sNodeUrl ) + { + Select( pEntry ); + end = true; + } + else if( sPath.startsWith( sNodeUrl ) ) + { + if( !IsExpanded( pEntry ) ) + Expand( pEntry ); + + pEntry = FirstChild( pEntry ); + } + else + { + pEntry = NextSibling( pEntry ); + } + } + else + break; + } +} + +void FolderTree::SetBlackList( const ::com::sun::star::uno::Sequence< OUString >& rBlackList ) +{ + m_aBlackList = rBlackList; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index 41391e7..2eea459 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -8,119 +8,6 @@ */ #include <svtools/RemoteFilesDialog.hxx> -#include "../contnr/contentenumeration.hxx" - -class FolderTree : public SvTreeListBox -{ -private: - Reference< XCommandEnvironment > m_xEnv; - ::osl::Mutex m_aMutex; - Sequence< OUString > m_aBlackList; - Image m_aFolderImage; - -public: - FolderTree( vcl::Window* pParent, WinBits nBits ) - : SvTreeListBox( pParent, nBits | WB_SORT | WB_TABSTOP ) - , m_aFolderImage( SvtResId( IMG_SVT_FOLDER ) ) - { - Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); - Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent( xContext, 0 ), UNO_QUERY_THROW ); - m_xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); - - SetDefaultCollapsedEntryBmp( m_aFolderImage ); - SetDefaultExpandedEntryBmp( m_aFolderImage ); - } - - virtual void RequestingChildren( SvTreeListEntry* pEntry ) - { - FillTreeEntry( pEntry ); - } - - void FillTreeEntry( SvTreeListEntry* pEntry ) - { - // fill only empty entries - if( pEntry && GetChildCount( pEntry ) == 0 ) - { - ::std::vector< SortingData_Impl* > aContent; - - FileViewContentEnumerator* pContentEnumerator = new FileViewContentEnumerator( - m_xEnv, aContent, m_aMutex, NULL ); - - OUString* pURL = static_cast< OUString* >( pEntry->GetUserData() ); - - if( pURL ) - { - FolderDescriptor aFolder( *pURL ); - - EnumerationResult eResult = - pContentEnumerator->enumerateFolderContentSync( aFolder, m_aBlackList ); - - if ( SUCCESS == eResult ) - { - for( unsigned int i = 0; i < aContent.size(); i++ ) - { - if( aContent[i]->mbIsFolder ) - { - SvTreeListEntry* pNewEntry = InsertEntry( aContent[i]->GetTitle(), pEntry, true ); - - OUString* sData = new OUString( aContent[i]->maTargetURL ); - pNewEntry->SetUserData( static_cast< void* >( sData ) ); - } - } - } - } - } - } - - void SetTreePath( OUString sUrl ) - { - INetURLObject aUrl( sUrl ); - aUrl.setFinalSlash(); - - OUString sPath = aUrl.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ); - - SvTreeListEntry* pEntry = First(); - bool end = false; - - while( pEntry && !end ) - { - if( pEntry->GetUserData() ) - { - OUString sNodeUrl = *static_cast< OUString* >( pEntry->GetUserData() ); - - INetURLObject aUrlObj( sNodeUrl ); - aUrlObj.setFinalSlash(); - - sNodeUrl = aUrlObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ); - - if( sPath == sNodeUrl ) - { - Select( pEntry ); - end = true; - } - else if( sPath.startsWith( sNodeUrl ) ) - { - if( !IsExpanded( pEntry ) ) - Expand( pEntry ); - - pEntry = FirstChild( pEntry ); - } - else - { - pEntry = NextSibling( pEntry ); - } - } - else - break; - } - } - - void SetBlackList( const ::com::sun::star::uno::Sequence< OUString >& rBlackList ) - { - m_aBlackList = rBlackList; - } -}; class FileViewContainer : public vcl::Window { commit add00b42173e5277672893fd96648c353a532335 Author: Szymon KÅos <eszka...@gmail.com> Date: Mon Jul 13 11:08:36 2015 +0200 tree settings moved inside class Change-Id: I1cf0eb30f143e311a6a8c731f6dcc8e7ad7e4e5d diff --git a/include/svtools/RemoteFilesDialog.hxx b/include/svtools/RemoteFilesDialog.hxx index f1dc755..fd12f39 100644 --- a/include/svtools/RemoteFilesDialog.hxx +++ b/include/svtools/RemoteFilesDialog.hxx @@ -122,7 +122,6 @@ private: bool m_bMultiselection; bool m_bIsUpdated; bool m_bIsConnected; - Image m_aFolderImage; OUString m_sPath; OUString m_sStdDir; diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index b3aaaed..41391e7 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -16,15 +16,20 @@ private: Reference< XCommandEnvironment > m_xEnv; ::osl::Mutex m_aMutex; Sequence< OUString > m_aBlackList; + Image m_aFolderImage; public: FolderTree( vcl::Window* pParent, WinBits nBits ) - : SvTreeListBox( pParent, nBits ) + : SvTreeListBox( pParent, nBits | WB_SORT | WB_TABSTOP ) + , m_aFolderImage( SvtResId( IMG_SVT_FOLDER ) ) { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xInteractionHandler( InteractionHandler::createWithParent( xContext, 0 ), UNO_QUERY_THROW ); m_xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); + + SetDefaultCollapsedEntryBmp( m_aFolderImage ); + SetDefaultExpandedEntryBmp( m_aFolderImage ); } virtual void RequestingChildren( SvTreeListEntry* pEntry ) @@ -237,7 +242,6 @@ class FileViewContainer : public vcl::Window RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits ) : SvtFileDialog_Base( pParent, "RemoteFilesDialog", "svt/ui/remotefilesdialog.ui" ) , m_context( comphelper::getProcessComponentContext() ) - , m_aFolderImage( SvtResId( IMG_SVT_FOLDER ) ) , m_pSplitter( NULL ) , m_pFileView( NULL ) , m_pContainer( NULL ) @@ -293,14 +297,12 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits ) m_pSplitter->SetSplitHdl( LINK( this, RemoteFilesDialog, SplitHdl ) ); m_pSplitter->Show(); - m_pTreeView = VclPtr< FolderTree >::Create( m_pContainer, WB_BORDER | WB_SORT | WB_TABSTOP ); + m_pTreeView = VclPtr< FolderTree >::Create( m_pContainer, WB_BORDER ); Size aSize( 100, 200 ); m_pTreeView->set_height_request( aSize.Height() ); m_pTreeView->set_width_request( aSize.Width() ); m_pTreeView->SetSizePixel( aSize ); m_pTreeView->Show(); - m_pTreeView->SetDefaultCollapsedEntryBmp( m_aFolderImage ); - m_pTreeView->SetDefaultExpandedEntryBmp( m_aFolderImage ); m_pTreeView->SetSelectHdl( LINK( this, RemoteFilesDialog, TreeSelectHdl ) );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits