29 #include <svx/svxids.hrc>
40 , m_xLastEditFT(m_xBuilder->weld_label(
"lastedit"))
41 , m_xAltTitle(m_xBuilder->weld_label(
"alttitle"))
42 , m_xEditED(m_xBuilder->weld_text_view(
"edit"))
43 , m_xInsertAuthor(m_xBuilder->weld_widget(
"insertauthor"))
44 , m_xAuthorBtn(m_xBuilder->weld_button(
"author"))
45 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
46 , m_xPrevBtn(m_xBuilder->weld_button(
"previous"))
47 , m_xNextBtn(m_xBuilder->weld_button(
"next"))
55 sal_uInt16 nWhich = 0;
61 OUString aAuthorStr, aDateStr;
68 aAuthorStr = rAuthor.GetValue();
79 aDateStr = rDate.GetValue();
94 aTextStr = rText.GetValue();
115 OUString sTxt = OUString::Concat(rAuthor) +
", " + rDate;
121 static const sal_uInt16 pRanges[] =
123 SID_ATTR_POSTIT_AUTHOR,
124 SID_ATTR_POSTIT_TEXT,
138 m_aPrevHdlLink.Call( *
this );
143 m_aNextHdlLink.Call( *
this );
152 OUString
aStr( m_xEditED->get_text() +
"\n---- " );
154 if ( !aTmp.isEmpty() )
158 aStr += rLocaleWrapper.
getDate(aDate) +
", " + rLocaleWrapper.
getTime(aTime,
false) +
" ----\n";
161 m_xEditED->set_text(
aStr);
162 sal_Int32 nLen =
aStr.getLength();
163 m_xEditED->grab_focus();
164 m_xEditED->select_region(nLen, nLen);
172 m_rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) );
174 m_rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_DATE ) ) );
176 m_rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_TEXT ) ) );
#define LINK(Instance, Class, Member)
std::unique_ptr< weld::Button > m_xOKBtn
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
std::unique_ptr< weld::Button > m_xPrevBtn
void EnableTravel(bool bNext, bool bPrev)
static const AllSettings & GetSettings()
std::unique_ptr< weld::Label > m_xAltTitle
SvxPostItDialog(weld::Widget *pParent, const SfxItemSet &rCoreSet, bool bPrevNext)
virtual ~SvxPostItDialog() override
std::unique_ptr< weld::Label > m_xLastEditFT
LineEnd GetSystemLineEnd()
void ShowLastAuthor(std::u16string_view rAuthor, std::u16string_view rDate)
static const sal_uInt16 * GetRanges()
const SfxItemSet & m_rSet
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const LocaleDataWrapper & GetLocaleDataWrapper(LanguageType nLang)
IMPL_LINK_NOARG(SvxPostItDialog, PrevHdl, weld::Button &, void)
SfxItemPool * GetPool() const
std::unique_ptr< weld::TextView > m_xEditED
std::unique_ptr< weld::Button > m_xNextBtn
OUString getDate(const Date &rDate) const
std::unique_ptr< weld::Button > m_xAuthorBtn
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
Reference< XExecutableDialog > m_xDialog
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const