[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/ServerDetailsControls.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit c18dc237dc28eef504a0867cf5be6461edec6bbc Author: Szymon KÅosDate: Sat Oct 10 20:01:02 2015 +0200 remember host name Change-Id: I74ebde5402ac385fe24cb5b4eb9a3ed9dcef2fe6 diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index 26fe15f..accb47f 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -137,6 +137,7 @@ bool HostDetailsContainer::setUrl( const INetURLObject& rUrl ) if ( bSuccess ) { +m_sHost = rUrl.GetHost( ); m_pEDHost->SetText( rUrl.GetHost( ) ); m_pEDPort->SetValue( rUrl.GetPort( ) ); m_pEDRoot->SetText( rUrl.GetURLPath() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/PlaceEditDialog.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit 2660a20170f31c764a7a5720c0d8b678dfb84666 Author: Szymon KÅosDate: Sat Oct 10 19:31:29 2015 +0200 fixed CMIS service editing Change-Id: I62e89700b158ace1edcf26384f4294ba0661444a diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index cdea1e8..7f9ffa5 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -64,6 +64,7 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptrsetUrl( rUrl ); if ( bSuccess ) { -m_pLBServerType->SelectEntryPos( i ); -SelectTypeHdl( m_pLBServerType ); - // Fill the Username field if ( rUrl.HasUserData( ) ) +{ m_pEDUsername->SetText( INetURLObject::decode( rUrl.GetUser( ), INetURLObject::DECODE_WITH_CHARSET ) ); +m_aDetailsContainers[i]->setUsername( INetURLObject::decode( rUrl.GetUser( ), + INetURLObject::DECODE_WITH_CHARSET ) ); +} + +m_pLBServerType->SelectEntryPos( i ); +SelectTypeHdl( m_pLBServerType ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/contnr/fileview.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 77d9c32242ffbbfd081292fc84e89db193014750 Author: Szymon KÅos eszka...@gmail.com Date: Wed Aug 26 11:52:42 2015 +0200 Date modified column - no seconds Change-Id: I443d0dd691d8030ab6a0bf5e4eeded5ad73750a5 diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 5b72684..c40414d 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -1945,7 +1945,7 @@ void SvtFileView_Impl::CreateDisplayText_Impl() const LocaleDataWrapper rLocaleData = aSysLocale.GetLocaleData(); aValue += rLocaleData.getDate( (*aIt)-maModDate ); aValue += aDateSep; -aValue += rLocaleData.getTime( (*aIt)-maModDate ); +aValue += rLocaleData.getTime( (*aIt)-maModDate, false ); } (*aIt)-maDisplayText = aValue; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/control/breadcrumb.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 286cc57c9a31695b51845ca7932d795731619cb9 Author: Szymon KÅos eszka...@gmail.com Date: Wed Jul 29 11:09:44 2015 +0200 path must contain user name Change-Id: Ic8c98e724645d49fd9c6da796f9e060aa784246f diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx index 5ae725d..53e1780 100644 --- a/svtools/source/control/breadcrumb.cxx +++ b/svtools/source/control/breadcrumb.cxx @@ -74,8 +74,12 @@ void Breadcrumb::SetURL( const OUString rURL ) INetURLObject aURL( rURL ); aURL.setFinalSlash(); +OUString sUser = aURL.GetUser( INetURLObject::NO_DECODE ); OUString sPath = aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET); -OUString sRootPath = INetURLObject::GetScheme( aURL.GetProtocol() ) + aURL.GetHost(); +OUString sRootPath = INetURLObject::GetScheme( aURL.GetProtocol() ) ++ sUser ++ ( sUser.isEmpty() ? OUString() : @ ) ++ aURL.GetHost(); int nSegments = aURL.getSegmentCount(); unsigned int nPos = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/PlaceEditDialog.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit e969fc9842d5f1e6090913b95d9c6b232f139e77 Author: Szymon KÅos eszka...@gmail.com Date: Fri Jul 17 09:34:06 2015 +0200 Separator should not be the default selection Change-Id: Id879e795d3b6722ca0d86f8f6a8a32b0ef6f12bd diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 482b763..15034dd 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -140,7 +140,6 @@ void PlaceEditDialog::InitDetails( ) bool bSkipOneDrive= OUString( ONEDRIVE_CLIENT_ID ).isEmpty() || OUString( ONEDRIVE_CLIENT_SECRET ).isEmpty(); - Sequence OUString aTypesUrlsList( officecfg::Office::Common::Misc::CmisServersUrls::get( xContext ) ); Sequence OUString aTypesNamesList( officecfg::Office::Common::Misc::CmisServersNames::get( xContext ) ); @@ -182,6 +181,10 @@ void PlaceEditDialog::InitDetails( ) // Set default to first value m_pLBServerType-SelectEntryPos( 0 ); + +if ( m_pLBServerType-GetSelectEntry() == ) +m_pLBServerType-SelectEntryPos( 1 ); + SelectTypeHdl( m_pLBServerType ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx |4 1 file changed, 4 deletions(-) New commits: commit cb033a67bb7647fb03303ef7bed55d9d908e6b13 Author: Szymon KÅos eszka...@gmail.com Date: Fri Jul 10 21:35:02 2015 +0200 don't expand last url level in the tree Change-Id: Iea4f650374921f1c50d8edeac384841113640d5e diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index 6b4e39b..b3aaaed 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -92,10 +92,6 @@ public: if( sPath == sNodeUrl ) { Select( pEntry ); - -if( !IsExpanded( pEntry ) ) -Expand( pEntry ); - end = true; } else if( sPath.startsWith( sNodeUrl ) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx | 49 --- 1 file changed, 30 insertions(+), 19 deletions(-) New commits: commit 85eee1b128bef28bf5d280b4708a05172ff44df8 Author: Szymon KÅos eszka...@gmail.com Date: Thu Jul 9 17:01:11 2015 +0200 RemoteFilesDialog: fixes needed for saving documents Change-Id: I3134f82d81ed2c2de7d6197fbec5610b53814e1e diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index 05f1ac9..03fa023 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -494,7 +494,12 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString sURL ) if( m_pFileView ) { -OUString sFilter = GetCurFilter(); +OUString sFilter = FILEDIALOG_FILTER_ALL; + +if( m_nCurrentFilter != LISTBOX_ENTRY_NOTFOUND ) +{ +sFilter = m_aFilters[m_nCurrentFilter].second; +} m_pFileView-EndInplaceEditing( false ); eResult = m_pFileView-Initialize( sURL, sFilter, NULL, GetBlackList() ); @@ -791,9 +796,12 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl ) bool bFileDlg = ( m_eType == REMOTEDLG_TYPE_FILEDLG ); bool bSelected = ( m_pFileView-GetSelectionCount() 0 ); +if( !sCurrentPath.endsWith( OUString( / ) ) ) +sCurrentPath += OUString( / ); + if( !bSelected ) { -m_sPath = sCurrentPath + / + INetURLObject::encode( sName, INetURLObject::PART_FPATH, INetURLObject::ENCODE_ALL ); +m_sPath = sCurrentPath + INetURLObject::encode( sName, INetURLObject::PART_FPATH, INetURLObject::ENCODE_ALL ); } else { @@ -826,14 +834,11 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl ) if ( !bExists ) { -// TODO - -return 0; +if( m_eMode == REMOTEDLG_MODE_OPEN ) +return 0; } -if( bExists ) -EndDialog( RET_OK ); - +EndDialog( RET_OK ); return 1; } @@ -899,11 +904,7 @@ OUString RemoteFilesDialog::GetCurFilter() const if( m_nCurrentFilter != LISTBOX_ENTRY_NOTFOUND ) { -sFilter = m_aFilters[m_nCurrentFilter].second; -} -else -{ -sFilter = FILEDIALOG_FILTER_ALL; +sFilter = m_aFilters[m_nCurrentFilter].first; } return sFilter; @@ -967,12 +968,22 @@ std::vectorOUString RemoteFilesDialog::GetPathList() const bool RemoteFilesDialog::ContentIsFolder( const OUString rURL ) { -Reference XComponentContext xContext = ::comphelper::getProcessComponentContext(); -Reference XInteractionHandler xInteractionHandler( -InteractionHandler::createWithParent( xContext, 0 ), UNO_QUERY_THROW ); -Reference XCommandEnvironment xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference XProgressHandler () ); -::ucbhelper::Content aContent( rURL, xEnv, xContext ); -return aContent.isFolder(); +try +{ +Reference XComponentContext xContext = ::comphelper::getProcessComponentContext(); +Reference XInteractionHandler xInteractionHandler( +InteractionHandler::createWithParent( xContext, 0 ), UNO_QUERY_THROW ); +Reference XCommandEnvironment xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference XProgressHandler () ); +::ucbhelper::Content aContent( rURL, xEnv, xContext ); + +return aContent.isFolder(); +} +catch( const Exception ) +{ +// a content doesn't exist +} + +return false; } sal_Int32 RemoteFilesDialog::getTargetColorDepth() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/PlaceEditDialog.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 842e5d46f1d80c2c83164ff871bca1c325cf6bef Author: Szymon KÅos eszka...@gmail.com Date: Thu Jun 25 12:54:23 2015 +0200 PlaceEditDialog: Encode username Change-Id: Iaedb63df57196ee291f29976f611075289a5255a diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx b/svtools/source/dialogs/PlaceEditDialog.cxx index 26a7e8a..bbc1f43 100644 --- a/svtools/source/dialogs/PlaceEditDialog.cxx +++ b/svtools/source/dialogs/PlaceEditDialog.cxx @@ -79,7 +79,8 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const std::shared_ptrPla // Fill the Username field if ( rUrl.HasUserData( ) ) -m_pEDUsername-SetText( rUrl.GetUser( ) ); +m_pEDUsername-SetText( INetURLObject::decode( rUrl.GetUser( ), + INetURLObject::DECODE_WITH_CHARSET ) ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) New commits: commit 16fda0ed618102ecacfbe5a5af1eaed4b4f11ebb Author: Szymon KÅos eszka...@gmail.com Date: Thu Jun 25 12:48:27 2015 +0200 RemoteFilesDialog: opening files using double click Change-Id: Ieea2d757525679b9686629f2d8e75e71cccbf2e0 diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index 405548e..c89f73f 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -641,9 +641,19 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, IMPL_LINK_NOARG ( RemoteFilesDialog, DoubleClickHdl ) { -OUString sURL = m_pFileView-GetCurrentURL(); +SvTreeListEntry* pEntry = m_pFileView-FirstSelected(); +SvtContentEntry* pData = static_cast SvtContentEntry* ( pEntry-GetUserData() ); + +if( pData-mbIsFolder ) +{ +OUString sURL = m_pFileView-GetCurrentURL(); -OpenURL( sURL ); +OpenURL( sURL ); +} +else +{ +EndDialog( RET_OK ); +} return 1; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 166c62e0425d8a5d33fffd11ba24d60dfe03188c Author: Szymon KÅos eszka...@gmail.com Date: Wed Jun 24 20:16:05 2015 +0200 RemoteFilesDialog: correct count of array elements Change-Id: Ia1744324045a9d5e4f6c8cf8b22ed6a99e629731 diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index b7734e0..c5aef0f 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -85,7 +85,7 @@ class FileViewContainer : public vcl::Window void changeFocus(bool bReverse) { -if(!bReverse m_nCurrentFocus = 4) +if(!bReverse m_nCurrentFocus 4) { m_pFocusWidgets[++m_nCurrentFocus]-SetFakeFocus(true); m_pFocusWidgets[m_nCurrentFocus]-GrabFocus(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) New commits: commit 5c8202a61bb6e80e99acab95f165ca3f711a94cd Author: Szymon KÅos eszka...@gmail.com Date: Mon Jun 22 10:31:06 2015 +0200 RemoteFilesDialog: service type before the name Change-Id: If89178e13abe7aaae06f03eb3bdd96f4d37d73db diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index 594f1b1..9ec4883 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -276,6 +276,30 @@ void RemoteFilesDialog::Resize() } } +OUString lcl_GetServiceType(ServicePtr pService) +{ +INetProtocol aProtocol = pService-GetUrlObject().GetProtocol(); +switch(aProtocol) +{ +case INetProtocol::Ftp: +return OUString(FTP); +case INetProtocol::Cmis: +return OUString(CMIS); +case INetProtocol::Smb: +return OUString(Windows Share); +case INetProtocol::File: +return OUString(SSH); +case INetProtocol::Http: +return OUString(WebDAV); +case INetProtocol::Https: +return OUString(WebDAV); +case INetProtocol::Generic: +return OUString(SSH); +default: +return OUString(); +} +} + void RemoteFilesDialog::FillServicesListbox() { m_pServices_lb-Clear(); @@ -293,7 +317,12 @@ void RemoteFilesDialog::FillServicesListbox() // Add to the listbox only remote services, not local bookmarks if(!pService-IsLocal()) { -m_pServices_lb-InsertEntry(placesNamesList[nPlace]); +OUString sPrefix = lcl_GetServiceType(pService); + +if(!sPrefix.isEmpty()) + sPrefix += : ; + +m_pServices_lb-InsertEntry(sPrefix + placesNamesList[nPlace]); } } @@ -441,7 +470,13 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, AddServiceHdl ) ServicePtr newService = aDlg-GetPlace(); m_aServices.push_back(newService); m_pServices_lb-Enable(true); -m_pServices_lb-InsertEntry(newService-GetName()); + +OUString sPrefix = lcl_GetServiceType(newService); + +if(!sPrefix.isEmpty()) + sPrefix += : ; + +m_pServices_lb-InsertEntry(sPrefix + newService-GetName()); m_pServices_lb-SelectEntryPos(m_pServices_lb-GetEntryCount() - 1); m_bIsUpdated = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx | 58 --- 1 file changed, 52 insertions(+), 6 deletions(-) New commits: commit 30a758dbcc1334fbd5670c541a90312a259359f0 Author: Szymon KÅos eszka...@gmail.com Date: Mon Jun 22 09:28:09 2015 +0200 RemoteFilesDialog: accessibility, TABSTOP Change-Id: I72ab457d557fdee04115f4c8f78f6d908fb56254 diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index 663d719..594f1b1 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -17,9 +17,12 @@ class FileViewContainer : public vcl::Window VclPtrSvTreeListBox m_pTreeView; VclPtrSplitter m_pSplitter; +int m_nCurrentFocus; +vcl::Window* m_pFocusWidgets[4]; + public: FileViewContainer(vcl::Window *pParent) -: Window(pParent) +: Window(pParent, WB_TABSTOP) , m_pFileView(NULL) , m_pTreeView(NULL) , m_pSplitter(NULL) @@ -40,11 +43,17 @@ class FileViewContainer : public vcl::Window void init(SvtFileView* pFileView, Splitter* pSplitter, - SvTreeListBox* pTreeView) + SvTreeListBox* pTreeView, + vcl::Window* pPrevSibling, + vcl::Window* pNextSibling) { m_pFileView = pFileView; m_pTreeView = pTreeView; m_pSplitter = pSplitter; +m_pFocusWidgets[0] = pPrevSibling; +m_pFocusWidgets[1] = pTreeView; +m_pFocusWidgets[2] = pFileView; +m_pFocusWidgets[3] = pNextSibling; } virtual void Resize() SAL_OVERRIDE @@ -73,6 +82,43 @@ class FileViewContainer : public vcl::Window placesNewSize.Height() = aSize.Height(); m_pTreeView-SetSizePixel( placesNewSize ); } + +void changeFocus(bool bReverse) +{ +if(!bReverse m_nCurrentFocus = 4) +{ +m_pFocusWidgets[++m_nCurrentFocus]-SetFakeFocus(true); +m_pFocusWidgets[m_nCurrentFocus]-GrabFocus(); +} +else if(m_nCurrentFocus 0) +{ +m_pFocusWidgets[--m_nCurrentFocus]-SetFakeFocus(true); +m_pFocusWidgets[m_nCurrentFocus]-GrabFocus(); +} +} + +virtual void GetFocus() SAL_OVERRIDE +{ +m_nCurrentFocus = 1; +m_pFocusWidgets[m_nCurrentFocus]-SetFakeFocus(true); +m_pFocusWidgets[m_nCurrentFocus]-GrabFocus(); +} + +virtual bool Notify(NotifyEvent rNEvt) +{ +if(rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) +{ +const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); +const vcl::KeyCode rCode = pKeyEvent-GetKeyCode(); +bool bShift = rCode.IsShift(); +if(rCode.GetCode() == KEY_TAB) +{ +changeFocus(bShift); +return true; +} +} +return Window::Notify(rNEvt); +} }; RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits) @@ -128,7 +174,7 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits) m_pContainer-set_hexpand(true); m_pContainer-set_vexpand(true); -m_pFileView = VclPtrSvtFileView::Create( m_pContainer, WB_BORDER, +m_pFileView = VclPtrSvtFileView::Create( m_pContainer, WB_BORDER | WB_TABSTOP, REMOTEDLG_TYPE_PATHDLG == m_eType, m_bMultiselection ); @@ -142,7 +188,7 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits) m_pSplitter-SetSplitHdl( LINK( this, RemoteFilesDialog, SplitHdl ) ); m_pSplitter-Show(); -m_pTreeView = VclPtrSvTreeListBox::Create( m_pContainer, WB_BORDER | WB_SORT ); +m_pTreeView = VclPtrSvTreeListBox::Create( m_pContainer, WB_BORDER | WB_SORT | WB_TABSTOP ); Size aSize(100, 200); m_pTreeView-set_height_request(aSize.Height()); m_pTreeView-set_width_request(aSize.Width()); @@ -159,11 +205,11 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits) nPosX += m_pSplitter-GetSizePixel().Width(); m_pFileView-SetPosPixel(Point(nPosX, 0)); -m_pContainer-init(m_pFileView, m_pSplitter, m_pTreeView); +m_pContainer-init( m_pFileView, m_pSplitter, m_pTreeView, m_pAddService_btn, m_pFilter_lb ); m_pContainer-Show(); m_pContainer-Enable( false ); -m_pAddService_btn-SetMenuMode(MENUBUTTON_MENUMODE_TIMED); +m_pAddService_btn-SetMenuMode( MENUBUTTON_MENUMODE_TIMED ); m_pAddService_btn-SetClickHdl( LINK( this, RemoteFilesDialog, AddServiceHdl ) ); m_pAddService_btn-SetSelectHdl( LINK( this, RemoteFilesDialog, EditServiceMenuHdl ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx | 11 +++ 1 file changed, 11 insertions(+) New commits: commit e512d04269a8c3b8278e4022e9fdd696854c4bf9 Author: Szymon KÅos eszka...@gmail.com Date: Mon Jun 22 10:55:21 2015 +0200 RemoteFilesDialog: CMIS subtypes Change-Id: Id67d2982aec65533b511eae44f439fdc4f7fa251 diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index 9ec4883..8bba8fe 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -284,7 +284,18 @@ OUString lcl_GetServiceType(ServicePtr pService) case INetProtocol::Ftp: return OUString(FTP); case INetProtocol::Cmis: +{ +OUString sHost = pService-GetUrlObject().GetHost( INetURLObject::DECODE_WITH_CHARSET ); + +if(sHost.startsWith(GDRIVE_BASE_URL)) +return OUString(Google Drive); +else if(sHost.startsWith(ALFRESCO_CLOUD_BASE_URL)) +return OUString(Alfresco Cloud); +else if(sHost.startsWith(ONEDRIVE_BASE_URL)) +return OUString(OneDrive); + return OUString(CMIS); +} case INetProtocol::Smb: return OUString(Windows Share); case INetProtocol::File: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/ServerDetailsControls.cxx | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) New commits: commit 3dd618a99a54fd2d23327b90cb2915f1cb4ef109 Author: Szymon KÅos eszka...@gmail.com Date: Fri Jun 19 18:40:55 2015 +0200 PlaceEditDialog: user name filled in the auth message box Change-Id: I85f0e3fdb91c2494797ef63a85579b3f0fc7ed6e diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index e13b35b..c30b53b 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -360,6 +360,17 @@ IMPL_LINK_NOARG( CmisDetailsContainer, RefreshReposHdl ) { OUString sBindingUrl = m_pEDBinding-GetText().trim( ); +OUString sEncodedUsername = ; + +if ( !m_sUsername.isEmpty( ) ) +{ +sEncodedUsername = rtl::Uri::encode(m_sUsername, +rtl_UriCharClassUserinfo, +rtl_UriEncodeKeepEscapes, +RTL_TEXTENCODING_UTF8 ); +sEncodedUsername += @; +} + // Clean the listbox m_pLBRepository-Clear( ); m_aRepoIds.clear( ); @@ -373,7 +384,7 @@ IMPL_LINK_NOARG( CmisDetailsContainer, RefreshReposHdl ) rtl_UriCharClassRelSegment, rtl_UriEncodeKeepEscapes, RTL_TEXTENCODING_UTF8 ); -sUrl = vnd.libreoffice.cmis:// + sEncodedBinding; +sUrl = vnd.libreoffice.cmis:// + sEncodedUsername + sEncodedBinding; } // Get the Content ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) New commits: commit a0ce0882415707829007865dca4fa5c9eba43727 Author: Szymon KÅos eszka...@gmail.com Date: Wed Jun 10 11:06:04 2015 +0200 service name as root in the breadcrumb Change-Id: I6707f332bdca7064d24f4920ecb0f3206dd68868 diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index fdbe5851..20eca9a 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -83,7 +83,7 @@ class Breadcrumb : public VclHBox std::vector VclPtr FixedHyperlink m_aLinks; std::vector VclPtr FixedText m_aSeparators; -OUString m_sPath; +OUString m_sRootName; OUString m_sClickedURL; Link m_aClickHdl; @@ -132,9 +132,13 @@ class Breadcrumb : public VclHBox return m_sClickedURL; } +void SetRootName( const OUString rURL ) +{ +m_sRootName = rURL; +} + void SetURL( const OUString rURL ) { -m_sPath = rURL; INetURLObject aURL( rURL ); aURL.setFinalSlash(); OUString sPath = aURL.GetURLPath(INetURLObject::DECODE_WITH_CHARSET); @@ -143,7 +147,7 @@ class Breadcrumb : public VclHBox unsigned int nPos = 0; unsigned int i; -m_aLinks[0]-SetText( Root ); +m_aLinks[0]-SetText( m_sRootName ); m_aLinks[0]-Show(); m_aLinks[0]-SetURL( INetURLObject::GetScheme( aURL.GetProtocol() ) + aURL.GetHost() ); @@ -523,12 +527,14 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SelectServiceHdl ) if(nPos 0) { OUString sURL = m_aServices[nPos]-GetUrl(); +OUString sName = m_aServices[nPos]-GetName(); if( OpenURL( sURL ) == eSuccess ) { +m_pPath-SetRootName( sName ); m_pTreeView-Clear(); -SvTreeListEntry* pRoot = m_pTreeView-InsertEntry( m_pServices_lb-GetSelectEntry(), NULL, true ); +SvTreeListEntry* pRoot = m_pTreeView-InsertEntry( sName, NULL, true ); OUString* sData = new OUString( sURL ); pRoot-SetUserData( static_cast void* ( sData ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/ServerDetailsControls.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit 4d1f6231259abb44743c8550f6838538c47f53ac Author: Szymon KÅos eszka...@gmail.com Date: Fri May 29 13:07:59 2015 +0200 remember the binding URL when editing CMIS connection Change-Id: I0ec7d84e7fd43cc8d67145b7ae99ae13b182bb26 diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index c98fb40..a98bba0 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -308,15 +308,14 @@ bool CmisDetailsContainer::setUrl( const INetURLObject rUrl ) if ( bSuccess ) { -OUString sBindingUrl; OUString sRepositoryId; OUString sDecodedHost = rUrl.GetHost( INetURLObject::DECODE_WITH_CHARSET ); INetURLObject aHostUrl( sDecodedHost ); -sBindingUrl = aHostUrl.GetURLNoMark( ); +m_sBinding = aHostUrl.GetURLNoMark( ); sRepositoryId = aHostUrl.GetMark( ); -m_pEDBinding-SetText( sBindingUrl ); +m_pEDBinding-SetText( m_sBinding ); m_pEDPath-SetText( rUrl.GetURLPath() ); } return bSuccess; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source svtools/uiconfig
svtools/source/dialogs/RemoteFilesDialog.cxx | 22 ++ svtools/uiconfig/ui/remotefilesdialog.ui |8 2 files changed, 30 insertions(+) New commits: commit 1bf41094aba59770ee12d9bdcd0dba79ac89f717 Author: Szymon KÅos eszka...@gmail.com Date: Tue May 26 18:11:41 2015 +0200 added the delete service option Change-Id: I81ddfbf3e0d856b3263d005d283279ebb58f1ffc diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index d43578c..60063d9 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -170,6 +170,28 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, break; }; } +else if(sIdent == delete_service m_pServices_lb-GetEntryCount() 0) +{ +unsigned int nSelected = m_pServices_lb-GetSelectEntryPos(); +unsigned int nPos = GetSelectedServicePos(); + +// TODO: Confirm dialog + +m_aServices.erase(m_aServices.begin() + nPos); +m_pServices_lb-RemoveEntry(nSelected); + +if(m_pServices_lb-GetEntryCount() 0) +{ +m_pServices_lb-SelectEntryPos(0); +} +else +{ +m_pServices_lb-SetNoSelection(); +m_pServices_lb-Enable(false); +} + +m_bIsUpdated = true; +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/uiconfig/ui/remotefilesdialog.ui b/svtools/uiconfig/ui/remotefilesdialog.ui index c01ef56..894ce8e 100644 --- a/svtools/uiconfig/ui/remotefilesdialog.ui +++ b/svtools/uiconfig/ui/remotefilesdialog.ui @@ -139,5 +139,13 @@ property name=use_underlineTrue/property /object /child +child + object class=GtkMenuItem id=delete_service +property name=visibleTrue/property +property name=can_focusFalse/property +property name=label translatable=yes_Delete service/property +property name=use_underlineTrue/property + /object +/child /object /interface ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit dc29e48029ec8162bd6971e8353e66b0b8f015f7 Author: Szymon KÅos eszka...@gmail.com Date: Mon May 25 22:10:35 2015 +0200 loop break Change-Id: I8bebd2a21e14f1f012ff52b600babef6289fb52d diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index 9b6a322..b69d4bd 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -141,6 +141,7 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, MenuButton *, pButton, { placesUrlsList[i] = pEditedService-GetUrl(); placesNamesList[i] = pEditedService-GetName(); +break; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - svtools/source
svtools/source/dialogs/RemoteFilesDialog.cxx | 30 ++- 1 file changed, 16 insertions(+), 14 deletions(-) New commits: commit 060bafcdf8698f15e7246b41dd91371440115fe0 Author: Szymon KÅos eszka...@gmail.com Date: Thu May 21 17:53:55 2015 +0200 filter places and add only remote services Change-Id: If4ced3f6766f07dfb454a5c8056a98d8365dcf70 diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx index e91cf19..28b153d 100644 --- a/svtools/source/dialogs/RemoteFilesDialog.cxx +++ b/svtools/source/dialogs/RemoteFilesDialog.cxx @@ -11,6 +11,8 @@ using namespace ::com::sun::star::uno; +const OUString sLocalFilePrefix = file://; + RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits) : ModalDialog(pParent, RemoteFilesDialog, svt/ui/remotefilesdialog.ui) , m_context(comphelper::getProcessComponentContext()) @@ -47,15 +49,18 @@ void RemoteFilesDialog::fillServicesListbox() Sequence OUString placesUrlsList(officecfg::Office::Common::Misc::FilePickerPlacesUrls::get(m_context)); Sequence OUString placesNamesList(officecfg::Office::Common::Misc::FilePickerPlacesNames::get(m_context)); -// TODO: filter - only online services if(placesUrlsList.getLength() 0 placesNamesList.getLength() 0) { for(sal_Int32 nPlace = 0; nPlace placesUrlsList.getLength() nPlace placesNamesList.getLength(); ++nPlace) { -ServicePtr pService(new Place(placesNamesList[nPlace], placesUrlsList[nPlace], true)); -m_aServices.push_back(pService); +// Add only remote services, not local bookmarks +if(placesUrlsList[nPlace].compareTo(sLocalFilePrefix, sLocalFilePrefix.getLength()) != 0) +{ +ServicePtr pService(new Place(placesNamesList[nPlace], placesUrlsList[nPlace], true)); +m_aServices.push_back(pService); -m_pServices_lb-InsertEntry(placesNamesList[nPlace]); +m_pServices_lb-InsertEntry(placesNamesList[nPlace]); +} } m_pServices_lb-SelectEntryPos(0); @@ -80,18 +85,15 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, AddServiceHdl ) m_pServices_lb-InsertEntry(newService-GetName()); m_pServices_lb-SelectEntryPos(m_pServices_lb-GetEntryCount() - 1); -// save services +// load all places (with local bookmarks), add new service and save all -Sequence OUString placesUrlsList(m_aServices.size()); -Sequence OUString placesNamesList(m_aServices.size()); +Sequence OUString placesUrlsList(officecfg::Office::Common::Misc::FilePickerPlacesUrls::get(m_context)); +placesUrlsList.realloc(placesUrlsList.getLength() + 1); +Sequence OUString placesNamesList(officecfg::Office::Common::Misc::FilePickerPlacesNames::get(m_context)); +placesNamesList.realloc(placesNamesList.getLength() + 1); -int i = 0; -for(std::vectorServicePtr::const_iterator it = m_aServices.begin(); it != m_aServices.end(); ++it) -{ -placesUrlsList[i] = (*it)-GetUrl(); -placesNamesList[i] = (*it)-GetName(); -i++; -} +placesUrlsList[placesUrlsList.getLength() - 1] = newService-GetUrl(); +placesNamesList[placesNamesList.getLength() - 1] = newService-GetName(); std::shared_ptrcomphelper::ConfigurationChanges batch(comphelper::ConfigurationChanges::create(m_context)); officecfg::Office::Common::Misc::FilePickerPlacesUrls::set(placesUrlsList, batch); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits