22#include <com/sun/star/document/XDocumentProperties.hpp>
25#include <tools/datetime.hxx>
30#include <officecfg/Office/Common.hxx>
35#include <sfx2/sfxsids.hrc>
78 if (
aURL.GetProtocol() == INetProtocol::VndSunStarHelp )
91 std::shared_ptr<const SfxFilter> pFilter = pMed->
GetFilter();
93 aFilter = pFilter->GetFilterName();
95 std::optional<OUString> aThumbnail;
100 officecfg::Office::Common::History::RecentDocsThumbnail::get())
104 if ( pEncryptionDataItem )
107 aThumbnail = OUString();
116 if (aWriter.
write(aResultBitmap))
118 Sequence<sal_Int8> aSequence(
static_cast<const sal_Int8*
>(aStream.
GetData()), aStream.
Tell());
121 aThumbnail =
aBuffer.makeStringAndClear();
136 if (
aURL.GetProtocol() == INetProtocol::File )
138 pFilter ? pFilter->GetMimeType() : OUString(),
139 pFilter ? pFilter->GetServiceName() : OUString() );
182 uno::Reference<document::XDocumentProperties> xDocProps(
184 if (xDocProps.is()) {
static void AddToRecentDocumentList(const OUString &rFileUrl, const OUString &rMimeType, const OUString &rDocumentService)
static bool IsHeadlessModeEnabled()
css::util::DateTime GetUNODateTime() const
void PutUrl(const INetURLObject &rUrl)
static INetURLHistory * GetOrCreate()
SfxObjectShell * GetObjShell() const
SfxEventHintId GetEventId() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
const std::shared_ptr< const SfxFilter > & GetFilter() const
bool IsOriginallyLoadedReadOnly() const
SAL_DLLPRIVATE bool IsUpdatePickList() const
SfxItemSet & GetItemSet() const
const OUString & GetOrigURL() const
css::uno::Reference< css::document::XDocumentProperties > getDocProperties() const
OUString GetSharedFileURL() const
bool IsAvoidRecentDocs() const
Don't add to the recent documents - it's an expensive operation, sometimes it is not wanted.
bool IsEnableSetModified() const
SfxMedium * GetMedium() const
OUString GetTitle(sal_uInt16 nMaxLen=0) const
BitmapEx GetPreviewBitmap() const
void EnableSetModified(bool bEnable=true)
SfxObjectCreateMode GetCreateMode() const
const OUString & GetDocumentURL() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
static void AddDocumentToPickList(const SfxObjectShell *pDocShell)
Adds the given document to the pick list (recent documents) if it satisfies certain requirements,...
SfxPickListImpl(SfxApplication &rApp)
SfxPickList(SfxApplication &rApp)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
static void encode(OUStringBuffer &aStrBuffer, const css::uno::Sequence< sal_Int8 > &aPass)
bool write(const BitmapEx &rBitmap)
void AppendItem(EHistoryType eHistory, const OUString &sURL, const OUString &sFilter, const OUString &sTitle, const std::optional< OUString > &sThumbnail, ::std::optional< bool > const oIsReadOnly)
#define SFX_TITLE_PICKLIST
std::unique_ptr< char[]> aBuffer