19#ifndef INCLUDED_SFX2_DINFDLG_HXX
20#define INCLUDED_SFX2_DINFDLG_HXX
22#include <config_options.h>
26#include <com/sun/star/beans/PropertyValue.hpp>
27#include <com/sun/star/util/DateTime.hpp>
28#include <com/sun/star/util/Duration.hpp>
29#include <com/sun/star/document/CmisProperty.hpp>
48 class XDocumentProperties;
57class UNLESS_MERGELIBS(SFX2_DLLPUBLIC) SfxDocumentInfoItem final :
public SfxStringItem
60 sal_Int32 m_AutoloadDelay;
61 OUString m_AutoloadURL;
62 bool m_isAutoloadEnabled;
63 OUString m_DefaultTarget;
64 OUString m_TemplateName;
66 css::util::DateTime m_CreationDate;
67 OUString m_ModifiedBy;
68 css::util::DateTime m_ModificationDate;
70 css::util::DateTime m_PrintDate;
71 sal_Int16 m_EditingCycles;
72 sal_Int32 m_EditingDuration;
73 OUString m_Description;
78 bool m_bDeleteUserData;
80 bool m_bUseThumbnailSave;
81 std::vector< std::unique_ptr<CustomProperty> > m_aCustomProperties;
82 css::uno::Sequence< css::document::CmisProperty > m_aCmisProperties;
86 SfxDocumentInfoItem();
87 SfxDocumentInfoItem(
const OUString &rFileName,
88 const css::uno::Reference< css::document::XDocumentProperties> & i_xDocProps,
89 const css::uno::Sequence< css::document::CmisProperty> & i_cmisProps,
90 bool bUseUserData,
bool bUseThumbnailSave );
91 SfxDocumentInfoItem(
const SfxDocumentInfoItem& );
92 virtual ~SfxDocumentInfoItem()
override;
95 void UpdateDocumentInfo(
96 const css::uno::Reference< css::document::XDocumentProperties> & i_xDocProps,
97 bool i_bDoNotUpdateUserDefined =
false)
99 bool isCmisDocument()
const {
return m_aCmisProperties.hasElements();}
101 bool isAutoloadEnabled()
const {
return m_isAutoloadEnabled; }
102 sal_Int32 getAutoloadDelay()
const {
return m_AutoloadDelay; }
103 const OUString& getAutoloadURL()
const {
return m_AutoloadURL; }
104 const OUString& getDefaultTarget()
const {
return m_DefaultTarget; }
105 const OUString& getTemplateName()
const {
return m_TemplateName; }
106 const OUString& getAuthor()
const {
return m_Author; }
108 const css::util::DateTime&
109 getCreationDate()
const {
return m_CreationDate; }
110 const OUString& getModifiedBy()
const {
return m_ModifiedBy; }
112 const css::util::DateTime&
113 getModificationDate()
const {
return m_ModificationDate; }
114 const OUString& getPrintedBy()
const {
return m_PrintedBy; }
115 const css::util::DateTime&
116 getPrintDate()
const {
return m_PrintDate; }
117 sal_Int16 getEditingCycles()
const {
return m_EditingCycles; }
118 sal_Int32 getEditingDuration()
const {
return m_EditingDuration; }
119 const OUString& getDescription()
const {
return m_Description; }
120 void setDescription(
const OUString& i_val) { m_Description = i_val; }
121 const OUString& getKeywords()
const {
return m_Keywords; }
122 void setKeywords(
const OUString& i_val) { m_Keywords = i_val; }
123 const OUString& getSubject()
const {
return m_Subject; }
124 void setSubject(
const OUString& i_val) { m_Subject = i_val; }
125 const OUString&
getTitle()
const {
return m_Title; }
126 void setTitle(
const OUString& i_val) { m_Title = i_val; }
129 void resetUserData(
const OUString & i_rAuthor);
131 void SetTemplate(
bool b ) { m_bHasTemplate = b; }
132 bool HasTemplate()
const {
return m_bHasTemplate; }
133 void SetDeleteUserData(
bool bSet );
134 void SetUseUserData(
bool bSet );
135 void SetUseThumbnailSave(
bool bSet );
136 bool IsUseUserData()
const {
return m_bUseUserData;}
137 bool IsUseThumbnailSave()
const {
return m_bUseThumbnailSave;}
140 std::vector< std::unique_ptr<CustomProperty> > GetCustomProperties()
const;
141 void ClearCustomProperties();
142 void AddCustomProperty(
const OUString& sName,
143 const css::uno::Any& rValue );
145 const css::uno::Sequence< css::document::CmisProperty >&
146 GetCmisProperties()
const {
return m_aCmisProperties;}
148 void SetCmisProperties(
const css::uno::Sequence< css::document::CmisProperty >& cmisProps );
149 virtual SfxDocumentInfoItem*
Clone(
SfxItemPool* pPool =
nullptr )
const override;
152 virtual bool PutValue(
const css::uno::Any& rVal,
sal_uInt8 nMemberId )
override;
196 void ImplUpdateSignatures();
197 void ImplCheckPasswordState();
199 virtual bool FillItemSet(
SfxItemSet* )
override;
208 void EnableUseUserData();
222 virtual bool FillItemSet(
SfxItemSet* )
override;
235 virtual void PageCreated(
const OUString& rId,
SfxTabPage& rPage)
override;
239 void AddFontTabPage();
250 ::std::optional<sal_Int16>
m_TZ;
253 void set_visible(
bool bVisible);
254 Date get_date()
const;
255 void set_date(
const Date& rDate);
305 std::unique_ptr<weld::Button> xEditButton);
307 void SetDuration(
const css::util::Duration& rDuration );
308 const css::util::Duration&
GetDuration()
const {
return m_aDuration; }
310 void set_visible(
bool bVisible);
324 std::unique_ptr<weld::RadioButton> xYesButton,
325 std::unique_ptr<weld::RadioButton> xNoButton);
328 void CheckYes() { m_xYesButton->set_active(
true); }
329 void CheckNo() { m_xNoButton->set_active(
true); }
394 void CreateNewLine();
395 void StoreCustomProperties();
405 void SetVisibleLineCount(sal_uInt32 nCount);
410 void AddLine(
const OUString& sName, css::uno::Any
const & rAny );
411 bool AreAllLinesValid()
const;
412 void ClearAllLines();
413 void DoScroll( sal_Int32 nNewPos );
414 void ReloadLinesContent();
416 css::uno::Sequence< css::beans::PropertyValue >
417 GetCustomProperties();
418 void SetCustomProperties(std::vector< std::unique_ptr<CustomProperty> >&& rProperties);
449 void AddLine(css::uno::Any
const & rAny);
454 css::uno::Sequence<css::beans::PropertyValue>
456 {
return m_xPropertiesWin->GetCustomProperties(); }
457 void SetCustomProperties(std::vector< std::unique_ptr<CustomProperty> >&& rProperties);
472 virtual bool FillItemSet(
SfxItemSet* )
override;
545 void AddLine(
const OUString& sId,
const OUString& sName,
546 const OUString& sType,
const bool bUpdatable,
547 const bool bRequired,
const bool bMultiValued,
548 const bool bOpenChoice,
549 css::uno::Any& aChoices,
550 css::uno::Any
const & rAny );
551 void ClearAllLines();
553 css::uno::Sequence< css::document::CmisProperty >
554 GetCmisProperties()
const;
568 void AddLine(
const OUString& sId,
const OUString& sName,
569 const OUString& sType,
const bool bUpdatable,
570 const bool bRequired,
const bool bMultiValude,
571 const bool bOpenChoice,
572 css::uno::Any& aChoices,
573 css::uno::Any
const & rAny );
575 void ClearAllLines();
576 css::uno::Sequence< css::document::CmisProperty >
588 virtual bool FillItemSet(
SfxItemSet* )
override;
CmisPropertiesWindow m_aPropertiesWin
std::unique_ptr< weld::ScrolledWindow > m_xScrolledWindow
css::uno::Sequence< css::document::CmisProperty > GetCmisProperties() const
std::unique_ptr< weld::Container > m_xBox
std::vector< std::unique_ptr< CmisPropertyLine > > m_aCmisPropertiesLines
SvNumberFormatter m_aNumberFormatter
css::uno::Sequence< css::document::CmisProperty > GetCmisProperties() const
virtual bool operator==(const SfxPoolItem &rItem) const override
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
std::unique_ptr< CustomPropertiesWindow > m_xPropertiesWin
std::unique_ptr< weld::Container > m_xBody
DECL_LINK(ScrollHdl, weld::ScrolledWindow &, void)
std::unique_ptr< weld::Label > m_xName
DECL_LINK(ResizeHdl, const Size &, void)
std::unique_ptr< weld::Widget > m_xBox
bool AreAllLinesValid() const
std::unique_ptr< weld::Label > m_xValue
css::uno::Sequence< css::beans::PropertyValue > GetCustomProperties() const
DECL_LINK(RemovedHdl, void *, void)
std::unique_ptr< weld::ScrolledWindow > m_xVertScroll
std::unique_ptr< weld::Label > m_xType
std::unique_ptr< SvtCalendarBox > m_xDateField
::std::optional< sal_Int16 > m_TZ
std::unique_ptr< weld::Entry > m_xEntry
css::util::Duration m_aDuration
const css::util::Duration & GetDuration() const
DECL_LINK(ClickHdl, weld::Button &, void)
std::shared_ptr< DurationDialog_Impl > m_xDurationDialog
std::unique_ptr< weld::Button > m_xEditButton
std::unique_ptr< weld::TimeFormatter > m_xFormatter
void set_visible(bool bVisible)
std::unique_ptr< weld::FormattedSpinButton > m_xTimeField
Link< void *, void > m_aRemovedHdl
void SetLineHeight(sal_Int32 nLineHeight)
std::vector< std::unique_ptr< CustomPropertyLine > > m_aCustomPropertiesLines
sal_Int32 GetLineHeight() const
sal_uInt16 GetTotalLineCount() const
weld::Label & m_rHeaderAccType
DECL_LINK(EditTimeoutHdl, Timer *, void)
SvNumberFormatter m_aNumberFormatter
void SetRemovedHdl(const Link< void *, void > &rLink)
CustomPropertyLine * m_pCurrentLine
weld::Label & m_rHeaderAccValue
weld::Label & m_rHeaderAccName
sal_uInt16 GetExistingLineCount() const
void SetHeight(int nHeight)
weld::Container & m_rBody
Idle m_aEditLoseFocusIdle
sal_uInt32 GetCurrentDataModelPosition() const
sal_Int32 GetHeight() const
DECL_LINK(BoxTimeoutHdl, Timer *, void)
std::vector< std::unique_ptr< CustomProperty > > m_aCustomProperties
std::unique_ptr< weld::SpinButton > m_xHourNF
std::unique_ptr< weld::CheckButton > m_xNegativeCB
std::unique_ptr< weld::SpinButton > m_xMinuteNF
std::unique_ptr< weld::SpinButton > m_xMSecondNF
std::unique_ptr< weld::SpinButton > m_xDayNF
std::unique_ptr< weld::SpinButton > m_xSecondNF
std::unique_ptr< weld::SpinButton > m_xYearNF
std::unique_ptr< weld::SpinButton > m_xMonthNF
std::unique_ptr< CmisPropertiesControl > m_xPropertiesCtrl
std::unique_ptr< weld::Button > m_xAdd
DECL_LINK(AddHdl, weld::Button &, void)
std::unique_ptr< CustomPropertiesControl > m_xPropertiesCtrl
std::unique_ptr< weld::Entry > m_xKeywordsEd
std::unique_ptr< weld::TextView > m_xCommentEd
SfxDocumentInfoItem * m_pInfoItem
std::unique_ptr< weld::Entry > m_xThemaEd
std::unique_ptr< weld::Entry > m_xTitleEd
std::unique_ptr< weld::Label > m_xNameED
std::unique_ptr< weld::Label > m_xChangeValFt
std::unique_ptr< weld::LinkButton > m_xFileValEd
std::unique_ptr< weld::Button > m_xSignatureBtn
DECL_LINK(SignatureHdl, weld::Button &, void)
std::unique_ptr< weld::ComboBox > m_xImagePreferredDpiComboBox
DECL_LINK(DeleteHdl, weld::Button &, void)
DECL_LINK(ChangePassHdl, weld::Button &, void)
std::unique_ptr< weld::Label > m_xShowTypeFT
VclPtr< AbstractPasswordToOpenModifyDialog > m_xPasswordDialog
std::unique_ptr< weld::Image > m_xBmp
std::unique_ptr< weld::Label > m_xCreateValFt
std::unique_ptr< weld::Label > m_xShowSizeFT
std::unique_ptr< weld::CheckButton > m_xUseUserDataCB
std::unique_ptr< weld::Label > m_xTemplValFt
std::unique_ptr< weld::Label > m_xDocNoValFt
std::unique_ptr< weld::Button > m_xDeleteBtn
OUString m_aMultiSignedStr
std::unique_ptr< weld::Button > m_xChangePassBtn
std::unique_ptr< weld::CheckButton > m_xUseThumbnailSaveCB
std::unique_ptr< weld::Label > m_xTemplFt
DECL_LINK(ImagePreferredDPICheckBoxClicked, weld::Toggleable &, void)
std::unique_ptr< weld::Label > m_xSignedValFt
std::unique_ptr< weld::Label > m_xPrintValFt
std::unique_ptr< weld::CheckButton > m_xImagePreferredDpiCheckButton
std::unique_ptr< weld::Label > m_xTimeLogValFt
virtual SfxStringItem * Clone(SfxItemPool *=nullptr) const override
static SfxPoolItem * CreateDefault()
void Clear(EHistoryType eHistory)
std::u16string_view getTitle(std::u16string_view aPath)
std::unique_ptr< weld::Frame > m_xFrame
std::unique_ptr< weld::FormattedSpinButton > m_xTimeField
std::unique_ptr< weld::TimeFormatter > m_xFormatter
std::unique_ptr< weld::Builder > m_xBuilder
std::unique_ptr< SvtCalendarBox > m_xDateField
std::vector< std::unique_ptr< CmisYesNo > > m_aYesNos
std::vector< std::unique_ptr< CmisValue > > m_aValues
std::unique_ptr< weld::Builder > m_xBuilder
std::unique_ptr< weld::Label > m_xType
std::unique_ptr< weld::Frame > m_xFrame
std::vector< std::unique_ptr< CmisDateTime > > m_aDateTimes
std::unique_ptr< weld::Label > m_xName
std::unique_ptr< weld::Entry > m_xValueEdit
std::unique_ptr< weld::Builder > m_xBuilder
std::unique_ptr< weld::Frame > m_xFrame
std::unique_ptr< weld::RadioButton > m_xNoButton
std::unique_ptr< weld::Frame > m_xFrame
std::unique_ptr< weld::Builder > m_xBuilder
std::unique_ptr< weld::RadioButton > m_xYesButton
DECL_LINK(BoxLoseFocusHdl, weld::Widget &, void)
DECL_LINK(EditLoseFocusHdl, weld::Widget &, void)
std::unique_ptr< CustomPropertiesYesNoButton > m_xYesNoButton
std::unique_ptr< CustomPropertiesTimeField > m_xTimeField
std::unique_ptr< weld::Button > m_xRemoveButton
std::unique_ptr< weld::Widget > m_xDateTimeBox
std::unique_ptr< weld::Container > m_xLine
DECL_LINK(RemoveHdl, weld::Button &, void)
DECL_LINK(TypeHdl, weld::ComboBox &, void)
std::unique_ptr< weld::Entry > m_xValueEdit
std::unique_ptr< weld::ComboBox > m_xNameBox
std::unique_ptr< weld::Widget > m_xDurationBox
std::unique_ptr< CustomPropertiesDurationField > m_xDurationField
std::unique_ptr< CustomPropertiesDateField > m_xDateField
std::unique_ptr< weld::Builder > m_xBuilder
CustomPropertiesWindow * m_pParent
std::unique_ptr< weld::ComboBox > m_xTypeBox