21#include <document.hxx>
30 :
ScAnyRefDlgController(pB, pCW, pParent,
"modules/scalc/ui/showchangesdialog.ui",
"ShowChangesDialog")
31 , m_rViewData(rViewData)
32 , rDoc(rViewData.GetDocument())
33 , m_xHighlightBox(m_xBuilder->weld_check_button(
"showchanges"))
34 , m_xCbAccept(m_xBuilder->weld_check_button(
"showaccepted"))
35 , m_xCbReject(m_xBuilder->weld_check_button(
"showrejected"))
36 , m_xOkButton(m_xBuilder->weld_button(
"ok"))
37 , m_xEdAssign(new
formula::RefEdit(m_xBuilder->weld_entry(
"range")))
38 , m_xRbAssign(new
formula::RefButton(m_xBuilder->weld_button(
"rangeref")))
39 , m_xBox(m_xBuilder->weld_container(
"box"))
68 for (
const auto& rItem : rUserColl)
74 if(pViewSettings!=
nullptr)
82 if (aDateTime != aEmpty)
88 if (aDateTime != aEmpty)
103 if(!aString.isEmpty())
140 DoClose( ScHighlightChgDlgWrapper::GetChildWindowId() );
146 if (bForced || !
m_xRbAssign->GetWidget()->get_visible())
166 if (m_xHighlightBox->get_active())
168 m_xFilterCtr->Enable(
true);
169 m_xCbAccept->set_sensitive(
true);
170 m_xCbReject->set_sensitive(
true);
174 m_xFilterCtr->Enable(
false);
175 m_xCbAccept->set_sensitive(
false);
176 m_xCbReject->set_sensitive(
false);
184 SetDispatcherLock(
true );
185 m_xEdAssign->GetWidget()->show();
186 m_xRbAssign->GetWidget()->show();
187 m_xEdAssign->SetText(m_xFilterCtr->GetRange());
188 m_xEdAssign->GrabFocus();
195 aChangeViewSet.SetShowChanges(m_xHighlightBox->get_active());
196 aChangeViewSet.SetHasDate(m_xFilterCtr->IsDate());
198 aChangeViewSet.SetTheDateMode(
eMode );
199 Date aFirstDate( m_xFilterCtr->GetFirstDate() );
200 tools::Time aFirstTime( m_xFilterCtr->GetFirstTime() );
201 Date aLastDate( m_xFilterCtr->GetLastDate() );
202 tools::Time aLastTime( m_xFilterCtr->GetLastTime() );
203 aChangeViewSet.SetTheFirstDateTime(
DateTime( aFirstDate, aFirstTime ) );
204 aChangeViewSet.SetTheLastDateTime(
DateTime( aLastDate, aLastTime ) );
205 aChangeViewSet.SetHasAuthor(m_xFilterCtr->IsAuthor());
206 aChangeViewSet.SetTheAuthorToShow(m_xFilterCtr->GetSelectedAuthor());
207 aChangeViewSet.SetHasRange(m_xFilterCtr->IsRange());
208 aChangeViewSet.SetShowAccepted(m_xCbAccept->get_active());
209 aChangeViewSet.SetShowRejected(m_xCbReject->get_active());
210 aChangeViewSet.SetHasComment(m_xFilterCtr->IsComment());
211 aChangeViewSet.SetTheComment(m_xFilterCtr->GetComment());
213 aLocalRangeList.
Parse(m_xFilterCtr->GetRange(), rDoc);
214 aChangeViewSet.SetTheRangeList(aLocalRangeList);
215 aChangeViewSet.AdjustDateMode( rDoc );
216 rDoc.SetChangeViewSettings(aChangeViewSet);
217 m_rViewData.GetDocShell()->PostPaintGridAll();
const std::set< OUString > & GetUserCollection() const
const OUString & GetUser() const
const ScRangeList & GetTheRangeList() const
const OUString & GetTheComment() const
const DateTime & GetTheFirstDateTime() const
SvxRedlinDateMode GetTheDateMode() const
bool IsShowRejected() const
void SetTheAuthorToShow(const OUString &aString)
const DateTime & GetTheLastDateTime() const
bool IsShowAccepted() const
const OUString & GetTheAuthorToShow() const
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
ScChangeViewSettings * GetChangeViewSettings() const
ScChangeTrack * GetChangeTrack() const
std::unique_ptr< weld::Button > m_xOkButton
std::unique_ptr< formula::RefEdit > m_xEdAssign
std::unique_ptr< formula::RefButton > m_xRbAssign
std::unique_ptr< weld::CheckButton > m_xCbReject
virtual bool IsRefInputMode() const override
virtual void SetActive() override
std::unique_ptr< SvxTPFilter > m_xFilterCtr
std::unique_ptr< weld::CheckButton > m_xCbAccept
virtual void RefInputDone(bool bForced=false) override
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
ScChangeViewSettings aChangeViewSet
std::unique_ptr< weld::CheckButton > m_xHighlightBox
virtual void Close() override
virtual ~ScHighlightChgDlg() override
ScHighlightChgDlg(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData)
ScRefFlags Parse(std::u16string_view, const ScDocument &, formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO, SCTAB nDefaultTab=0, sal_Unicode cDelimiter=0)
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
virtual void RefInputStart(formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
virtual void RefInputDone(bool bForced=false) override
bool DoClose(sal_uInt16 nId)
void SetDispatcherLock(bool bLock)
IMPL_LINK_NOARG(ScHighlightChgDlg, HighlightHandle, weld::Toggleable &, void)
IMPL_LINK(ScHighlightChgDlg, RefHandle, SvxTPFilter *, pRef, void)
#define LINK(Instance, Class, Member)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)