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"))
59 OUString aAuthorStr, aDateStr;
65 aAuthorStr = rAuthor.GetValue();
73 aDateStr = rDate.GetValue();
85 aTextStr = rText.GetValue();
106 OUString sTxt = OUString::Concat(rAuthor) +
", " + rDate;
123 m_aPrevHdlLink.Call( *
this );
128 m_aNextHdlLink.Call( *
this );
137 OUString
aStr( m_xEditED->get_text() +
"\n---- " );
139 if ( !aTmp.isEmpty() )
143 aStr += rLocaleWrapper.
getDate(aDate) +
", " + rLocaleWrapper.
getTime(aTime,
false) +
" ----\n";
146 m_xEditED->set_text(
aStr);
147 sal_Int32 nLen =
aStr.getLength();
148 m_xEditED->grab_focus();
149 m_xEditED->select_region(nLen, nLen);
158 m_xOutSet->Put(
SvxPostItTextItem(m_xEditED->get_text(), SID_ATTR_POSTIT_TEXT ) );
Reference< XExecutableDialog > m_xDialog
static const AllSettings & GetSettings()
OUString getDate(const Date &rDate) const
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const SfxItemSet & m_rSet
std::unique_ptr< weld::Label > m_xAltTitle
SvxPostItDialog(weld::Widget *pParent, const SfxItemSet &rCoreSet, bool bPrevNext)
void ShowLastAuthor(std::u16string_view rAuthor, std::u16string_view rDate)
std::unique_ptr< weld::Button > m_xNextBtn
static WhichRangesContainer GetRanges()
std::unique_ptr< weld::Button > m_xPrevBtn
std::unique_ptr< weld::Label > m_xLastEditFT
std::unique_ptr< weld::Button > m_xOKBtn
std::unique_ptr< weld::Button > m_xAuthorBtn
std::unique_ptr< weld::TextView > m_xEditED
virtual ~SvxPostItDialog() override
void EnableTravel(bool bNext, bool bPrev)
LineEnd GetSystemLineEnd()
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
#define LINK(Instance, Class, Member)
const LocaleDataWrapper & GetLocaleDataWrapper(LanguageType nLang)
IMPL_LINK_NOARG(SvxPostItDialog, PrevHdl, weld::Button &, void)