50 std::unique_ptr<weld::TreeView> xCalcControl)
53 , xWriterTreeView(
std::move(xWriterControl))
54 , xCalcTreeView(
std::move(xCalcControl))
95 pTreeView->make_sorted();
99 bool bSortAtoZ = pTreeView->get_sort_order();
102 if (nColumn == pTreeView->get_sort_column())
104 bSortAtoZ = !bSortAtoZ;
105 pTreeView->set_sort_order(bSortAtoZ);
109 int nOldSortColumn = pTreeView->get_sort_column();
110 if (nOldSortColumn != -1)
112 pTreeView->set_sort_column(nColumn);
124 sal_Int32 nCompare = 0;
133 if (pLeftData && pRightData)
137 else if (pLeftData->
eType > pRightData->
eType)
148 if (pLeftData && pRightData)
166 Date aDateMin(1,1,1989);
252 if(pSearchPara!=
nullptr)
260 const OUString &rCommentStr)
282 sal_Int32 nStartPos = 0;
283 sal_Int32 nEndPos = rCommentStr.getLength();
296 :
SvxTPage(pParent,
"svx/ui/redlineviewpage.ui",
"RedlineViewPage")
297 , bEnableAccept(true)
298 , bEnableAcceptAll(true)
299 , bEnableReject(true)
300 , bEnableRejectAll(true)
302 , bEnableClearFormat(false)
303 , bEnableClearFormatAll(false)
304 , m_xAccept(m_xBuilder->weld_button(
"accept"))
305 , m_xReject(m_xBuilder->weld_button(
"reject"))
306 , m_xAcceptAll(m_xBuilder->weld_button(
"acceptall"))
307 , m_xRejectAll(m_xBuilder->weld_button(
"rejectall"))
308 , m_xUndo(m_xBuilder->weld_button(
"undo"))
309 , m_xViewData(new
SvxRedlinTable(m_xBuilder->weld_tree_view(
"writerchanges"),
310 m_xBuilder->weld_tree_view(
"calcchanges")))
318 m_xUndo->connect_clicked(aLink);
352 std::vector<int> aWidths
354 o3tl::narrowing<int>(nDigitWidth * 10),
355 o3tl::narrowing<int>(nDigitWidth * 20),
356 o3tl::narrowing<int>(nDigitWidth * 20)
370 std::vector<int> aWidths
372 o3tl::narrowing<int>(nDigitWidth * 20),
373 o3tl::narrowing<int>(nDigitWidth * 20),
374 o3tl::narrowing<int>(nDigitWidth * 20),
375 o3tl::narrowing<int>(nDigitWidth * 20)
431 if (&rPushB == m_xAccept.get())
433 AcceptClickLk.Call(
this);
435 else if (&rPushB == m_xAcceptAll.get())
437 AcceptAllClickLk.Call(
this);
439 else if (&rPushB == m_xReject.get())
441 RejectClickLk.Call(
this);
443 else if (&rPushB == m_xRejectAll.get())
445 RejectAllClickLk.Call(
this);
447 else if (&rPushB == m_xUndo.get())
449 UndoClickLk.Call(
this);
454 : m_xBuilder(
Application::CreateBuilder(pParent, rUIXMLDescription))
460 :
SvxTPage(pParent,
"svx/ui/redlinefilterpage.ui",
"RedlineFilterPage")
462 , m_pRedlinTable(nullptr)
463 , m_xCbDate(m_xBuilder->weld_check_button(
"date"))
464 , m_xLbDate(m_xBuilder->weld_combo_box(
"datecond"))
465 , m_xDfDate(new
SvtCalendarBox(m_xBuilder->weld_menu_button(
"startdate")))
466 , m_xTfDate(m_xBuilder->weld_formatted_spin_button(
"starttime"))
467 , m_xTfDateFormatter(new
weld::TimeFormatter(*m_xTfDate))
468 , m_xIbClock(m_xBuilder->weld_button(
"startclock"))
469 , m_xFtDate2(m_xBuilder->weld_label(
"and"))
470 , m_xDfDate2(new
SvtCalendarBox(m_xBuilder->weld_menu_button(
"enddate")))
471 , m_xTfDate2(m_xBuilder->weld_formatted_spin_button(
"endtime"))
472 , m_xTfDate2Formatter(new
weld::TimeFormatter(*m_xTfDate2))
473 , m_xIbClock2(m_xBuilder->weld_button(
"endclock"))
474 , m_xCbAuthor(m_xBuilder->weld_check_button(
"author"))
475 , m_xLbAuthor(m_xBuilder->weld_combo_box(
"authorlist"))
476 , m_xCbRange(m_xBuilder->weld_check_button(
"range"))
477 , m_xEdRange(m_xBuilder->weld_entry(
"rangeedit"))
478 , m_xBtnRange(m_xBuilder->weld_button(
"dotdotdot"))
479 , m_xCbAction(m_xBuilder->weld_check_button(
"action"))
480 , m_xLbAction(m_xBuilder->weld_combo_box(
"actionlist"))
481 , m_xCbComment(m_xBuilder->weld_check_button(
"comment"))
482 , m_xEdComment(m_xBuilder->weld_entry(
"commentedit"))
505 m_xTfDate->connect_value_changed(a3Link);
773 EnableDateLine1(
true);
774 EnableDateLine2(
false);
777 EnableDateLine1(
true);
778 EnableDateLine2(
false);
781 EnableDateLine1(
true);
782 m_xTfDate->set_sensitive(
false);
783 m_xTfDate->set_text(OUString());
784 EnableDateLine2(
false);
787 EnableDateLine1(
true);
788 m_xTfDate->set_sensitive(
false);
789 m_xTfDate->set_text(OUString());
790 EnableDateLine2(
false);
793 EnableDateLine1(
true);
794 EnableDateLine2(
true);
797 EnableDateLine1(
false);
798 EnableDateLine2(
false);
808 if (&rCB == m_xCbDate.get())
810 m_xLbDate->set_sensitive(m_xCbDate->get_active());
811 EnableDateLine1(
false);
812 EnableDateLine2(
false);
813 if(m_xCbDate->get_active()) SelDateHdl(*m_xLbDate);
815 else if (&rCB == m_xCbAuthor.get())
817 m_xLbAuthor->set_sensitive(m_xCbAuthor->get_active());
819 else if (&rCB == m_xCbRange.get())
821 m_xEdRange->set_sensitive(m_xCbRange->get_active());
822 m_xBtnRange->set_sensitive(m_xCbRange->get_active());
824 else if (&rCB == m_xCbAction.get())
826 m_xLbAction->set_sensitive(m_xCbAction->get_active());
828 else if (&rCB == m_xCbComment.get())
830 m_xEdComment->set_sensitive(m_xCbComment->get_active());
838 if (&rIB == m_xIbClock.get())
840 SetFirstDate(aDateTime);
841 SetFirstTime(aDateTime);
843 else if (&rIB == m_xIbClock2.get())
845 SetLastDate(aDateTime);
846 SetLastTime(aDateTime);
906 if (m_xDfDate.get() == &rTF)
908 if (m_xDfDate->get_label().isEmpty())
909 m_xDfDate->set_date(aDate);
911 if(m_pRedlinTable!=
nullptr)
912 m_pRedlinTable->SetFirstDate(m_xDfDate->get_date());
914 else if (m_xDfDate2.get() == &rTF)
916 if (m_xDfDate2->get_label().isEmpty())
917 m_xDfDate2->set_date(aDate);
920 m_pRedlinTable->SetLastDate(m_xDfDate2->get_date());
928 if (m_xTfDate.get() == &rTF)
930 if (m_xTfDate->get_text().isEmpty())
933 if (m_pRedlinTable!=
nullptr)
934 m_pRedlinTable->SetFirstTime(GetFirstTime());
936 else if (m_xTfDate2.get() == &rTF)
938 if (m_xTfDate2->get_text().isEmpty())
941 if (m_pRedlinTable!=
nullptr)
942 m_pRedlinTable->SetLastTime(GetLastTime());
954 : m_xBuilder(
Application::CreateBuilder(pParent,
"svx/ui/redlinecontrol.ui"))
955 , m_xTabCtrl(m_xBuilder->weld_notebook(
"tabcontrol"))
981 if (rPage ==
"filter")
983 m_xTPFilter->ActivatePage();
986 else if (rPage ==
"view")
988 m_xTPView->ActivatePage();
995 if (rPage ==
"filter")
996 m_xTPFilter->DeactivatePage();
997 else if (rPage ==
"view")
998 m_xTPView->DeactivatePage();
bool IsBetween(const DateTime &rFrom, const DateTime &rTo) const
sal_Int32 GetDate() const
void SetDate(sal_Int32 nNewDate)
void AddYears(sal_Int16 nAddYears)
std::unique_ptr< SvxTPView > m_xTPView
std::unique_ptr< weld::Notebook > m_xTabCtrl
std::unique_ptr< SvxTPFilter > m_xTPFilter
SvxAcceptChgCtr(weld::Container *pParent)
std::unique_ptr< comphelper::string::NaturalStringSorter > xSorter
void SetFilterAuthor(bool bFlag)
void SetDateTimeMode(SvxRedlinDateMode nMode)
void SetAuthor(const OUString &)
void SetFirstTime(const tools::Time &)
SvxRedlinTable(std::unique_ptr< weld::TreeView > xWriterControl, std::unique_ptr< weld::TreeView > xCalcControl)
weld::TreeView * pTreeView
std::unique_ptr< weld::TreeView > xCalcTreeView
void SetLastDate(const Date &)
void SetCommentParams(const utl::SearchParam *pSearchPara)
void SetFirstDate(const Date &)
DateTime aDaTiFilterFirst
std::unique_ptr< utl::TextSearch > pCommentSearcher
void SetLastTime(const tools::Time &)
bool IsValidEntry(std::u16string_view rAuthor, const DateTime &rDateTime, const OUString &rComment)
SvxRedlinDateMode nDaTiMode
void SetFilterDate(bool bFlag)
bool IsValidComment(const OUString &rComment)
void SetFilterComment(bool bFlag)
int ColCompare(const weld::TreeIter &rLeft, const weld::TreeIter &rRight)
std::unique_ptr< weld::TreeView > xWriterTreeView
Tabpage with the filter text entries etc.
std::unique_ptr< weld::ComboBox > m_xLbAction
std::unique_ptr< weld::CheckButton > m_xCbComment
void CheckComment(bool bFlag)
void ShowAction(bool bShow=true)
void SetFirstTime(const tools::Time &aTime)
virtual ~SvxTPFilter() override
void HideRange(bool bHide=true)
std::unique_ptr< weld::CheckButton > m_xCbDate
std::unique_ptr< SvtCalendarBox > m_xDfDate2
std::unique_ptr< weld::Entry > m_xEdComment
void SelectedAuthorPos(sal_Int32 nPos)
OUString GetSelectedAuthor() const
Date GetFirstDate() const
std::unique_ptr< weld::Button > m_xBtnRange
Link< SvxTPFilter *, void > aReadyLink
std::unique_ptr< weld::Entry > m_xEdRange
void SetRedlinTable(SvxRedlinTable *)
void SetLastTime(const tools::Time &aTime)
void CheckAction(bool bFlag)
void SetFirstDate(const Date &aDate)
void CheckDate(bool bFlag)
std::unique_ptr< weld::ComboBox > m_xLbAuthor
OUString GetComment() const
SvxRedlinDateMode GetDateMode() const
void SetComment(const OUString &rComment)
void InsertAuthor(const OUString &rString)
std::unique_ptr< weld::TimeFormatter > m_xTfDateFormatter
std::unique_ptr< weld::CheckButton > m_xCbAction
std::unique_ptr< weld::ComboBox > m_xLbDate
std::unique_ptr< weld::CheckButton > m_xCbAuthor
void CheckAuthor(bool bFlag)
void CheckRange(bool bFlag)
void SetRange(const OUString &rString)
OUString GetRange() const
std::unique_ptr< weld::FormattedSpinButton > m_xTfDate2
std::unique_ptr< weld::Label > m_xFtDate2
SvxTPFilter(weld::Container *pParent)
void Enable(bool bEnable=true)
std::unique_ptr< weld::Button > m_xIbClock
std::unique_ptr< weld::TimeFormatter > m_xTfDate2Formatter
sal_Int32 SelectAuthor(const OUString &aString)
void EnableDateLine2(bool bFlag)
void SetDateMode(sal_uInt16 nMode)
void EnableDateLine1(bool bFlag)
SvxRedlinTable * m_pRedlinTable
tools::Time GetLastTime() const
std::unique_ptr< weld::CheckButton > m_xCbRange
void SetLastDate(const Date &aDate)
tools::Time GetFirstTime() const
std::unique_ptr< weld::FormattedSpinButton > m_xTfDate
std::unique_ptr< SvtCalendarBox > m_xDfDate
std::unique_ptr< weld::Button > m_xIbClock2
Tabpage with the redlining entries.
void EnableRejectAll(bool bFlag)
SvxTPView(weld::Container *pParent)
void EnableAccept(bool bFlag)
void EnableClearFormat(bool bFlag)
virtual ~SvxTPView() override
virtual void ActivatePage() override
void EnableUndo(bool bFlag=true)
void EnableAcceptAll(bool bFlag)
bool bEnableClearFormatAll
void EnableReject(bool bFlag)
std::unique_ptr< weld::Button > m_xRejectAll
std::unique_ptr< weld::Button > m_xAccept
std::unique_ptr< weld::Button > m_xReject
std::unique_ptr< weld::Button > m_xUndo
void EnableClearFormatAll(bool bFlag)
std::unique_ptr< weld::Button > m_xAcceptAll
virtual void ActivatePage()
std::unique_ptr< weld::Container > m_xContainer
SvxTPage(weld::Container *pParent, const OUString &rUIXMLDescription, const OUString &rID)
virtual OUString get_text(int row, int col=-1) const=0
virtual int get_sort_column() const=0
virtual void set_column_fixed_widths(const std::vector< int > &rWidths)=0
virtual OUString get_id(int pos) const=0
IMPL_LINK_NOARG(SvxTPFilter, SelDateHdl, weld::ComboBox &, void)
IMPL_LINK(SvxRedlinTable, HeaderBarClick, int, nColumn, void)
constexpr OUStringLiteral HID_REDLINE_CTRL_VIEW
constexpr OUStringLiteral HID_REDLINE_CTRL_FILTER
#define LINK(Instance, Class, Member)
std::unique_ptr< sal_Int32[]> pData
const LanguageTag & getLocale()
class SvxPropertySetInfoPool
Reference< XComponentContext > getProcessComponentContext()
constexpr OUStringLiteral EMPTY
Reference< XNameAccess > m_xContainer