LibreOffice Module unotools (master) 1
Classes | Functions
SvtHistoryOptions Namespace Reference

Collect information about history features. More...

Classes

struct  HistoryItem
 Return the complete specified history list. More...
 

Functions

void Clear (EHistoryType eHistory)
 Clear complete specified list. More...
 
std::vector< HistoryItemGetList (EHistoryType eHistory)
 
void AppendItem (EHistoryType eHistory, const OUString &sURL, const OUString &sFilter, const OUString &sTitle, const std::optional< OUString > &sThumbnail, ::std::optional< bool > const oIsReadOnly)
 
void DeleteItem (EHistoryType eHistory, const OUString &sURL)
 Delete item from the specified list. More...
 
void TogglePinItem (EHistoryType eHistory, const OUString &sURL)
 
UNOTOOLS_DLLPUBLIC void AppendItem (EHistoryType eHistory, const OUString &sURL, const OUString &sFilter, const OUString &sTitle, const std::optional< OUString > &sThumbnail, std::optional< bool > oIsReadOnly)
 Append a new item to the specified list. More...
 

Detailed Description

Collect information about history features.

Interface methods to get and set value of config key "org.openoffice.Office.Common/History/..."

key "PickList": The last used documents displayed in the file menu. key "History": The last opened documents general.

Function Documentation

◆ AppendItem() [1/2]

void SvtHistoryOptions::AppendItem ( EHistoryType  eHistory,
const OUString &  sURL,
const OUString &  sFilter,
const OUString &  sTitle,
const std::optional< OUString > &  sThumbnail,
::std::optional< bool > const  oIsReadOnly 
)

◆ AppendItem() [2/2]

UNOTOOLS_DLLPUBLIC void SvtHistoryOptions::AppendItem ( EHistoryType  eHistory,
const OUString &  sURL,
const OUString &  sFilter,
const OUString &  sTitle,
const std::optional< OUString > &  sThumbnail,
std::optional< bool >  oIsReadOnly 
)

Append a new item to the specified list.

The oldest entry is deleted automatically when the size reaches the maximum.

Parameters
eHistoryselect right history.
sURLURL to save in history
sFilterfilter name to save in history
sTitledocument title to save in history
sThumbnailbase64 encoded thumbnail of the item
oIsReadOnlyitem was opened editable or read-only

◆ Clear()

UNOTOOLS_DLLPUBLIC void SvtHistoryOptions::Clear ( EHistoryType  eHistory)

Clear complete specified list.

Parameters
eHistoryselect right history.

Definition at line 71 of file historyoptions.cxx.

References DBG_UNHANDLED_EXCEPTION, comphelper::ConfigurationHelper::flush(), GetConfig(), and GetListAccess().

Referenced by DeleteItem().

◆ DeleteItem()

UNOTOOLS_DLLPUBLIC void SvtHistoryOptions::DeleteItem ( EHistoryType  eHistory,
const OUString &  sURL 
)

Delete item from the specified list.

Definition at line 291 of file historyoptions.cxx.

References Clear(), DBG_UNHANDLED_EXCEPTION, comphelper::ConfigurationHelper::flush(), GetConfig(), GetListAccess(), i, and nLength.

◆ GetList()

UNOTOOLS_DLLPUBLIC std::vector< HistoryItem > SvtHistoryOptions::GetList ( EHistoryType  eHistory)

◆ TogglePinItem()

UNOTOOLS_DLLPUBLIC void SvtHistoryOptions::TogglePinItem ( EHistoryType  eHistory,
const OUString &  sURL 
)