31 #include <svx/strings.hrc>
49 std::unique_ptr<weld::TreeView> xCalcControl)
52 , xWriterTreeView(
std::move(xWriterControl))
53 , xCalcTreeView(
std::move(xCalcControl))
100 pTreeView->make_sorted();
104 bool bSortAtoZ = pTreeView->get_sort_order();
107 if (nColumn == pTreeView->get_sort_column())
109 bSortAtoZ = !bSortAtoZ;
110 pTreeView->set_sort_order(bSortAtoZ);
114 int nOldSortColumn = pTreeView->get_sort_column();
115 if (nOldSortColumn != -1)
117 pTreeView->set_sort_column(nColumn);
129 sal_Int32 nCompare = 0;
138 if (pLeftData && pRightData)
142 else if (pLeftData->
eType > pRightData->
eType)
153 if (pLeftData && pRightData)
171 Date aDateMin(1,1,1989);
257 if(pSearchPara!=
nullptr)
265 const OUString &rCommentStr)
287 sal_Int32 nStartPos = 0;
288 sal_Int32 nEndPos = rCommentStr.getLength();
301 :
SvxTPage(pParent,
"svx/ui/redlineviewpage.ui",
"RedlineViewPage")
302 , bEnableAccept(true)
303 , bEnableAcceptAll(true)
304 , bEnableReject(true)
305 , bEnableRejectAll(true)
307 , bEnableClearFormat(false)
308 , bEnableClearFormatAll(false)
310 , m_xAccept(pTopLevel->weld_button(
"accept"))
311 , m_xReject(pTopLevel->weld_button(
"reject"))
312 , m_xAcceptAll(pTopLevel->weld_button(
"acceptall"))
313 , m_xRejectAll(pTopLevel->weld_button(
"rejectall"))
314 , m_xUndo(pTopLevel->weld_button(
"undo"))
315 , m_xViewData(new
SvxRedlinTable(m_xBuilder->weld_tree_view(
"writerchanges"),
316 m_xBuilder->weld_tree_view(
"calcchanges")))
318 Size aControlSize(80, 65);
327 m_xUndo->connect_clicked(aLink);
361 std::vector<int> aWidths;
362 aWidths.push_back(nDigitWidth * 10);
363 aWidths.push_back(nDigitWidth * 20);
364 aWidths.push_back(nDigitWidth * 20);
377 std::vector<int> aWidths;
378 aWidths.push_back(nDigitWidth * 20);
379 aWidths.push_back(nDigitWidth * 20);
380 aWidths.push_back(nDigitWidth * 20);
381 aWidths.push_back(nDigitWidth * 20);
412 OUString sClearFormat =
SvxResId(RID_SVXSTR_CLEARFORM);
413 sal_Int32
nPos = sText.indexOf(sClearFormat);
420 rButton.
set_label(sText +
"/" + sClearFormat);
427 rButton.
set_label(sText.copy(0, nPos - 1));
467 if (&rPushB == m_xAccept.get())
469 AcceptClickLk.Call(
this);
471 else if (&rPushB == m_xAcceptAll.get())
473 AcceptAllClickLk.Call(
this);
475 else if (&rPushB == m_xReject.get())
477 RejectClickLk.Call(
this);
479 else if (&rPushB == m_xRejectAll.get())
481 RejectAllClickLk.Call(
this);
483 else if (&rPushB == m_xUndo.get())
485 UndoClickLk.Call(
this);
490 : m_xBuilder(
Application::CreateBuilder(pParent, rUIXMLDescription))
496 :
SvxTPage(pParent,
"svx/ui/redlinefilterpage.ui",
"RedlineFilterPage")
498 , m_pRedlinTable(nullptr)
499 , m_xCbDate(m_xBuilder->weld_check_button(
"date"))
500 , m_xLbDate(m_xBuilder->weld_combo_box(
"datecond"))
501 , m_xDfDate(new
SvtCalendarBox(m_xBuilder->weld_menu_button(
"startdate")))
502 , m_xTfDate(m_xBuilder->weld_formatted_spin_button(
"starttime"))
503 , m_xTfDateFormatter(new
weld::TimeFormatter(*m_xTfDate))
504 , m_xIbClock(m_xBuilder->weld_button(
"startclock"))
505 , m_xFtDate2(m_xBuilder->weld_label(
"and"))
506 , m_xDfDate2(new
SvtCalendarBox(m_xBuilder->weld_menu_button(
"enddate")))
507 , m_xTfDate2(m_xBuilder->weld_formatted_spin_button(
"endtime"))
508 , m_xTfDate2Formatter(new
weld::TimeFormatter(*m_xTfDate2))
509 , m_xIbClock2(m_xBuilder->weld_button(
"endclock"))
510 , m_xCbAuthor(m_xBuilder->weld_check_button(
"author"))
511 , m_xLbAuthor(m_xBuilder->weld_combo_box(
"authorlist"))
512 , m_xCbRange(m_xBuilder->weld_check_button(
"range"))
513 , m_xEdRange(m_xBuilder->weld_entry(
"rangeedit"))
514 , m_xBtnRange(m_xBuilder->weld_button(
"dotdotdot"))
515 , m_xCbAction(m_xBuilder->weld_check_button(
"action"))
516 , m_xLbAction(m_xBuilder->weld_combo_box(
"actionlist"))
517 , m_xCbComment(m_xBuilder->weld_check_button(
"comment"))
518 , m_xEdComment(m_xBuilder->weld_entry(
"commentedit"))
541 m_xTfDate->connect_value_changed(a3Link);
809 EnableDateLine1(
true);
810 EnableDateLine2(
false);
813 EnableDateLine1(
true);
814 EnableDateLine2(
false);
817 EnableDateLine1(
true);
818 m_xTfDate->set_sensitive(
false);
819 m_xTfDate->set_text(OUString());
820 EnableDateLine2(
false);
823 EnableDateLine1(
true);
824 m_xTfDate->set_sensitive(
false);
825 m_xTfDate->set_text(OUString());
826 EnableDateLine2(
false);
829 EnableDateLine1(
true);
830 EnableDateLine2(
true);
833 EnableDateLine1(
false);
834 EnableDateLine2(
false);
844 if (&rCB == m_xCbDate.get())
846 m_xLbDate->set_sensitive(m_xCbDate->get_active());
847 EnableDateLine1(
false);
848 EnableDateLine2(
false);
849 if(m_xCbDate->get_active()) SelDateHdl(*m_xLbDate);
851 else if (&rCB == m_xCbAuthor.get())
853 m_xLbAuthor->set_sensitive(m_xCbAuthor->get_active());
855 else if (&rCB == m_xCbRange.get())
857 m_xEdRange->set_sensitive(m_xCbRange->get_active());
858 m_xBtnRange->set_sensitive(m_xCbRange->get_active());
860 else if (&rCB == m_xCbAction.get())
862 m_xLbAction->set_sensitive(m_xCbAction->get_active());
864 else if (&rCB == m_xCbComment.get())
866 m_xEdComment->set_sensitive(m_xCbComment->get_active());
874 if (&rIB == m_xIbClock.get())
876 SetFirstDate(aDateTime);
877 SetFirstTime(aDateTime);
879 else if (&rIB == m_xIbClock2.get())
881 SetLastDate(aDateTime);
882 SetLastTime(aDateTime);
942 if (m_xDfDate.get() == &rTF)
944 if (m_xDfDate->get_label().isEmpty())
945 m_xDfDate->set_date(aDate);
947 if(m_pRedlinTable!=
nullptr)
948 m_pRedlinTable->SetFirstDate(m_xDfDate->get_date());
950 else if (m_xDfDate2.get() == &rTF)
952 if (m_xDfDate2->get_label().isEmpty())
953 m_xDfDate2->set_date(aDate);
956 m_pRedlinTable->SetLastDate(m_xDfDate2->get_date());
964 if (m_xTfDate.get() == &rTF)
966 if (m_xTfDate->get_text().isEmpty())
969 if (m_pRedlinTable!=
nullptr)
970 m_pRedlinTable->SetFirstTime(GetFirstTime());
972 else if (m_xTfDate2.get() == &rTF)
974 if (m_xTfDate2->get_text().isEmpty())
977 if (m_pRedlinTable!=
nullptr)
978 m_pRedlinTable->SetLastTime(GetLastTime());
990 : m_xBuilder(
Application::CreateBuilder(pParent,
"svx/ui/redlinecontrol.ui"))
991 , m_xTabCtrl(m_xBuilder->weld_notebook(
"tabcontrol"))
1014 if (rPage ==
"filter")
1015 m_xTPFilter->ActivatePage();
1016 else if (rPage ==
"view")
1017 m_xTPView->ActivatePage();
1022 if (rPage ==
"filter")
1023 m_xTPFilter->DeactivatePage();
1024 else if (rPage ==
"view")
1025 m_xTPView->DeactivatePage();
void SetFilterDate(bool bFlag)
#define LINK(Instance, Class, Member)
virtual ~SvxTPFilter() override
void SetDateMode(sal_uInt16 nMode)
std::unique_ptr< weld::Button > m_xReject
Link< SvxTPFilter *, void > aReadyLink
void SetFilterComment(bool bFlag)
void SetFirstDate(const Date &aDate)
std::unique_ptr< utl::TextSearch > pCommentSearcher
std::unique_ptr< weld::Entry > m_xEdComment
std::unique_ptr< weld::TreeView > xCalcTreeView
std::unique_ptr< weld::FormattedSpinButton > m_xTfDate
std::unique_ptr< ContentProperties > pData
void SetCommentParams(const utl::SearchParam *pSearchPara)
tools::Time GetFirstTime() const
std::unique_ptr< weld::CheckButton > m_xCbAction
SvxTPage(weld::Container *pParent, const OUString &rUIXMLDescription, const OString &rID)
void AddYears(sal_Int16 nAddYears)
void SetAuthor(const OUString &)
bool IsValidComment(const OUString &rComment)
std::unique_ptr< weld::ComboBox > m_xLbAction
std::unique_ptr< weld::Button > m_xAcceptAll
void Enable(bool bEnable=true)
void SetRange(const OUString &rString)
void CheckRange(bool bFlag)
std::unique_ptr< weld::Button > m_xRejectAll
std::unique_ptr< SvxRedlinTable > m_xViewData
SvxRedlinDateMode nDaTiMode
std::unique_ptr< weld::CheckButton > m_xCbAuthor
void EnableRejectAll(bool bFlag)
std::unique_ptr< SvtCalendarBox > m_xDfDate
void SetFirstTime(const tools::Time &)
std::unique_ptr< comphelper::string::NaturalStringSorter > xSorter
void EnableClearFormat(bool bFlag)
virtual ~SvxTPView() override
std::unique_ptr< weld::Entry > m_xEdRange
void SetRedlinTable(SvxRedlinTable *)
constexpr tools::Long Width() const
void HideRange(bool bHide=true)
Reference< XNameAccess > m_xContainer
SvxTPView(weld::Container *pParent, weld::Window *pDialog, weld::Builder *pTopLevel)
std::unique_ptr< SvxTPView > m_xTPView
OUString SvxResId(const char *pId)
void SetFilterAuthor(bool bFlag)
std::unique_ptr< weld::TreeView > xWriterTreeView
virtual void set_column_fixed_widths(const std::vector< int > &rWidths)=0
virtual OUString get_id(int pos) const =0
sal_Int32 GetDate() const
void SetDate(sal_Int32 nNewDate)
std::unique_ptr< weld::ComboBox > m_xLbAuthor
OUString GetComment() const
virtual void ActivatePage() override
void CheckAuthor(bool bFlag)
Tabpage with the filter text entries etc.
SvxRedlinTable(std::unique_ptr< weld::TreeView > xWriterControl, std::unique_ptr< weld::TreeView > xCalcControl)
void EnableDateLine1(bool bFlag)
DateTime aDaTiFilterFirst
std::unique_ptr< weld::CheckButton > m_xCbComment
void SetFirstDate(const Date &)
std::unique_ptr< weld::Button > m_xBtnRange
tools::Time GetLastTime() const
std::unique_ptr< weld::ComboBox > m_xLbDate
IMPL_LINK(SvxRedlinTable, HeaderBarClick, int, nColumn, void)
void EnableClearFormatAll(bool bFlag)
void SetLastTime(const tools::Time &aTime)
std::unique_ptr< weld::Button > m_xIbClock2
void set_size_request(int nWidth, int nHeight)
std::unique_ptr< weld::Button > m_xIbClock
std::unique_ptr< weld::Button > m_xAccept
void CheckAction(bool bFlag)
OUString GetSelectedAuthor() const
std::unique_ptr< weld::Button > m_xUndo
virtual OUString get_text(int row, int col=-1) const =0
weld::TreeView * pTreeView
bool IsBetween(const DateTime &rFrom, const DateTime &rTo) const
std::unique_ptr< weld::Container > m_xContainer
SvxRedlinTable * m_pRedlinTable
std::unique_ptr< weld::FormattedSpinButton > m_xTfDate2
void ShowAction(bool bShow=true)
void CheckComment(bool bFlag)
void SelectedAuthorPos(sal_Int32 nPos)
std::unique_ptr< weld::Label > m_xFtDate2
std::unique_ptr< weld::CheckButton > m_xCbDate
const LanguageTag & getLocale()
void EnableUndo(bool bFlag=true)
bool IsValidEntry(std::u16string_view rAuthor, const DateTime &rDateTime, const OUString &rComment)
void SetLastTime(const tools::Time &)
virtual void resize_to_request()=0
std::unique_ptr< weld::Notebook > m_xTabCtrl
void EnableReject(bool bFlag)
virtual int get_sort_column() const =0
SvxTPFilter(weld::Container *pParent)
sal_Int32 SelectAuthor(const OUString &aString)
std::unique_ptr< SvxTPFilter > m_xTPFilter
constexpr tools::Long Height() const
Tabpage with the redlining entries.
void EnableAccept(bool bFlag)
void SetFirstTime(const tools::Time &aTime)
void SetLastDate(const Date &)
void SetLastDate(const Date &aDate)
Reference< XComponentContext > getProcessComponentContext()
std::unique_ptr< SvtCalendarBox > m_xDfDate2
void SetDateTimeMode(SvxRedlinDateMode nMode)
virtual void ActivatePage()
SvxAcceptChgCtr(weld::Container *pParent, weld::Window *pDialog, weld::Builder *pTopLevel)
void EnableDateLine2(bool bFlag)
Date GetFirstDate() const
IMPL_LINK_NOARG(SvxTPFilter, SelDateHdl, weld::ComboBox &, void)
int ColCompare(const weld::TreeIter &rLeft, const weld::TreeIter &rRight)
SvxRedlinDateMode GetDateMode() const
void CheckDate(bool bFlag)
void SetComment(const OUString &rComment)
std::unique_ptr< weld::TimeFormatter > m_xTfDateFormatter
void EnableClearFormatButton(weld::Button &, bool bFlag)
std::unique_ptr< weld::CheckButton > m_xCbRange
void InsertAuthor(const OUString &rString)
OUString GetRange() const
bool bEnableClearFormatAll
void EnableAcceptAll(bool bFlag)
std::unique_ptr< weld::TimeFormatter > m_xTfDate2Formatter