LibreOffice Module fpicker (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SvtFileView Class Reference

#include <fileview.hxx>

Public Member Functions

 SvtFileView (weld::Window *pTopLevel, std::unique_ptr< weld::TreeView > xTreeView, std::unique_ptr< weld::IconView > xIconView, bool bOnlyFolder, bool bMultiSelection, bool bShowType=true)
 
 ~SvtFileView ()
 
void SetViewMode (FileViewMode eMode)
 
const OUString & GetViewURL () const
 
OUString GetURL (const weld::TreeIter &rEntry) const
 
OUString GetCurrentURL () const
 
bool GetParentURL (OUString &_rParentURL) const
 
void CreatedFolder (const OUString &rUrl, const OUString &rNewFolder)
 
void set_help_id (const OUString &rHelpId)
 
OUString get_help_id () const
 
void grab_focus ()
 
bool has_focus () const
 
OUString get_selected_text () const
 
weld::Widgetidentifier () const
 
FileViewResult Initialize (const OUString &rFolderURL, const OUString &rFilter, const FileViewAsyncAction *pAsyncDescriptor, const css::uno::Sequence< OUString > &rDenyList)
 initialize the view with the content of a folder given by URL, and apply an immediate filter More...
 
FileViewResult ExecuteFilter (const OUString &rFilter, const FileViewAsyncAction *pAsyncDescriptor)
 reads the current content of the current folder again, and applies the given filter to it More...
 
void CancelRunningAsyncAction ()
 cancels a running async action (if any) More...
 
FileViewResult PreviousLevel (const FileViewAsyncAction *pAsyncDescriptor)
 initializes the view with the parent folder of the current folder More...
 
void SetNoSelection ()
 
void SetSelectHdl (const Link< SvtFileView *, void > &rHdl)
 
void SetDoubleClickHdl (const Link< SvtFileView *, bool > &rHdl)
 
void SetOpenDoneHdl (const Link< SvtFileView *, void > &rHdl)
 
sal_uInt32 GetSelectionCount () const
 
SvtContentEntryFirstSelected () const
 
void selected_foreach (const std::function< bool(weld::TreeIter &)> &func)
 
void EnableDelete (bool bEnable)
 
OUString GetConfigString () const
 
void SetConfigString (std::u16string_view rCfgStr)
 
void EndInplaceEditing ()
 
::std::vector< SvtContentEntryGetContent ()
 

Private Member Functions

 DECL_LINK (HeaderSelect_Impl, int, void)
 

Private Attributes

std::unique_ptr< SvtFileView_ImplmpImpl
 
css::uno::Sequence< OUString > maDenyList
 

Detailed Description

Definition at line 61 of file fileview.hxx.

Constructor & Destructor Documentation

◆ SvtFileView()

SvtFileView::SvtFileView ( weld::Window pTopLevel,
std::unique_ptr< weld::TreeView xTreeView,
std::unique_ptr< weld::IconView xIconView,
bool  bOnlyFolder,
bool  bMultiSelection,
bool  bShowType = true 
)

◆ ~SvtFileView()

SvtFileView::~SvtFileView ( )

Definition at line 823 of file fileview.cxx.

Member Function Documentation

◆ CancelRunningAsyncAction()

void SvtFileView::CancelRunningAsyncAction ( )

cancels a running async action (if any)

@seealso Initialize @seealso ExecuteFilter @seealso FileViewAsyncAction

Definition at line 976 of file fileview.cxx.

References mpImpl.

Referenced by svt::AsyncPickerAction::cancel().

◆ CreatedFolder()

void SvtFileView::CreatedFolder ( const OUString &  rUrl,
const OUString &  rNewFolder 
)

Definition at line 865 of file fileview.cxx.

References mpImpl, sId, and weld::toId().

◆ DECL_LINK()

SvtFileView::DECL_LINK ( HeaderSelect_Impl  ,
int  ,
void   
)
private

◆ EnableDelete()

void SvtFileView::EnableDelete ( bool  bEnable)

Definition at line 1032 of file fileview.cxx.

References mpImpl.

◆ EndInplaceEditing()

void SvtFileView::EndInplaceEditing ( )

Definition at line 1037 of file fileview.cxx.

References mpImpl.

◆ ExecuteFilter()

FileViewResult SvtFileView::ExecuteFilter ( const OUString &  rFilter,
const FileViewAsyncAction pAsyncDescriptor 
)

reads the current content of the current folder again, and applies the given filter to it

Note 1: The folder is really read a second time. This implies that any new elements (which were not present when you called Initialize the last time) are now displayed.

Note 2: This method must not be called when you previously initialized the view from a sequence of strings, or a UNO content object.

Parameters
rFilterthe filter to be applied
pAsyncDescriptorIf not <NULL>, this struct describes the parameters for doing the action asynchronously.

Definition at line 966 of file fileview.cxx.

References eStillRunning, maDenyList, and mpImpl.

Referenced by svt::AsyncPickerAction::execute(), and Initialize().

◆ FirstSelected()

SvtContentEntry * SvtFileView::FirstSelected ( ) const

Definition at line 1004 of file fileview.cxx.

References mpImpl.

◆ get_help_id()

OUString SvtFileView::get_help_id ( ) const

Definition at line 918 of file fileview.cxx.

References mpImpl.

Referenced by svt::OControlAccess::getHelpURL().

◆ get_selected_text()

OUString SvtFileView::get_selected_text ( ) const

Definition at line 928 of file fileview.cxx.

References mpImpl.

◆ GetConfigString()

OUString SvtFileView::GetConfigString ( ) const

◆ GetContent()

std::vector< SvtContentEntry > SvtFileView::GetContent ( )

Definition at line 1090 of file fileview.cxx.

References mpImpl.

◆ GetCurrentURL()

OUString SvtFileView::GetCurrentURL ( ) const

Definition at line 844 of file fileview.cxx.

References aURL, SvtContentEntry::maURL, and mpImpl.

◆ GetParentURL()

bool SvtFileView::GetParentURL ( OUString &  _rParentURL) const

◆ GetSelectionCount()

sal_uInt32 SvtFileView::GetSelectionCount ( ) const

Definition at line 997 of file fileview.cxx.

References mpImpl.

◆ GetURL()

OUString SvtFileView::GetURL ( const weld::TreeIter rEntry) const

Definition at line 832 of file fileview.cxx.

References SvtContentEntry::maURL, and mpImpl.

◆ GetViewURL()

const OUString & SvtFileView::GetViewURL ( ) const

Definition at line 1022 of file fileview.cxx.

References mpImpl.

Referenced by SvtUpButton_Impl::FillURLMenu().

◆ grab_focus()

void SvtFileView::grab_focus ( )

Definition at line 813 of file fileview.cxx.

References mpImpl.

◆ has_focus()

bool SvtFileView::has_focus ( ) const

Definition at line 818 of file fileview.cxx.

References mpImpl.

◆ identifier()

weld::Widget * SvtFileView::identifier ( ) const

Definition at line 1803 of file fileview.cxx.

References mpImpl.

Referenced by svt::OControlAccess::IsFileViewWidget().

◆ Initialize()

FileViewResult SvtFileView::Initialize ( const OUString &  rFolderURL,
const OUString &  rFilter,
const FileViewAsyncAction pAsyncDescriptor,
const css::uno::Sequence< OUString > &  rDenyList 
)

initialize the view with the content of a folder given by URL, and apply an immediate filter

Parameters
rFolderURLthe URL of the folder whose content is to be read
rFilterthe initial filter to be applied
pAsyncDescriptorIf not <NULL>, this struct describes the parameters for doing the action asynchronously.

Definition at line 935 of file fileview.cxx.

References eFailure, eStillRunning, eSuccess, eTimeout, ExecuteFilter(), maDenyList, and mpImpl.

Referenced by svt::AsyncPickerAction::execute(), and PreviousLevel().

◆ PreviousLevel()

FileViewResult SvtFileView::PreviousLevel ( const FileViewAsyncAction pAsyncDescriptor)

initializes the view with the parent folder of the current folder

Parameters
rNewURLthe URL of the folder which we just navigated to
pAsyncDescriptorIf not <NULL>, this struct describes the parameters for doing the action asynchronously.

Definition at line 881 of file fileview.cxx.

References eFailure, GetParentURL(), Initialize(), maDenyList, and mpImpl.

Referenced by svt::AsyncPickerAction::execute().

◆ selected_foreach()

void SvtFileView::selected_foreach ( const std::function< bool(weld::TreeIter &)> &  func)

Definition at line 1795 of file fileview.cxx.

References mpImpl.

◆ set_help_id()

void SvtFileView::set_help_id ( const OUString &  rHelpId)

Definition at line 923 of file fileview.cxx.

References mpImpl.

Referenced by svt::OControlAccess::setHelpURL().

◆ SetConfigString()

void SvtFileView::SetConfigString ( std::u16string_view  rCfgStr)

◆ SetDoubleClickHdl()

void SvtFileView::SetDoubleClickHdl ( const Link< SvtFileView *, bool > &  rHdl)

Definition at line 992 of file fileview.cxx.

References mpImpl.

◆ SetNoSelection()

void SvtFileView::SetNoSelection ( )

Definition at line 981 of file fileview.cxx.

References mpImpl.

◆ SetOpenDoneHdl()

void SvtFileView::SetOpenDoneHdl ( const Link< SvtFileView *, void > &  rHdl)

Definition at line 1027 of file fileview.cxx.

References mpImpl.

◆ SetSelectHdl()

void SvtFileView::SetSelectHdl ( const Link< SvtFileView *, void > &  rHdl)

Definition at line 987 of file fileview.cxx.

References mpImpl.

◆ SetViewMode()

void SvtFileView::SetViewMode ( FileViewMode  eMode)

Definition at line 827 of file fileview.cxx.

References eMode, and mpImpl.

Member Data Documentation

◆ maDenyList

css::uno::Sequence<OUString> SvtFileView::maDenyList
private

Definition at line 65 of file fileview.hxx.

Referenced by ExecuteFilter(), Initialize(), and PreviousLevel().

◆ mpImpl

std::unique_ptr<SvtFileView_Impl> SvtFileView::mpImpl
private

The documentation for this class was generated from the following files: