diff options
-rw-r--r-- | sw/inc/view.hxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewstat.cxx | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index abdba739c3b7..7e3feca87883 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -245,7 +245,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell m_bInDtor : 1, //detect destructor to prevent creating of sub shells while closing m_bOldShellWasPagePreview : 1, m_bIsPreviewDoubleClick : 1, // #i114045# - m_bMakeSelectionVisible : 1; // transport the bookmark selection + m_bMakeSelectionVisible : 1, // transport the bookmark selection + m_bForceChangesToolbar : 1; // on load of documents with change tracking bool m_bInitOnceCompleted = false; /// LibreOfficeKit has to force the page size for PgUp/PgDown diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 5f5fd34029af..a6639e3bcb9c 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -747,6 +747,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_bOldShellWasPagePreview(false), m_bIsPreviewDoubleClick(false), m_bMakeSelectionVisible(false), + m_bForceChangesToolbar(true), m_nLOKPageUpDownOffset(0) { static bool bRequestDoubleBuffering = getenv("VCL_DOUBLEBUFFERING_ENABLE"); diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 8dbcbe650090..30c18bdc0180 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -324,17 +324,15 @@ void SwView::GetState(SfxItemSet &rSet) break; case FN_REDLINE_ON: rSet.Put( SfxBoolItem( nWhich, GetDocShell()->IsChangeRecording() ) ); - // switch on the disabled Tracked Changes toolbar if the document hasn't - // modified, yet (i.e. on load), and if recording of changes is enabled - // or if it contains tracked changes. TODO: the toolbar stays there, but - // there is no need for it to manage changes only with the menus Edit/View, - // keyboard shortcuts or the experimental sidebar, so it's worth to add - // a View option for this behaviour. - if ( !GetDocShell()->IsModified() && ( GetDocShell()->IsChangeRecording() || + // switch on the disabled Tracked Changes toolbar if the view is + // new (e.g. on load), and if recording of changes is enabled + // or if it contains tracked changes. + if ( m_bForceChangesToolbar && ( GetDocShell()->IsChangeRecording() || m_pWrtShell->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable().size() ) ) { ShowUIElement("private:resource/toolbar/changes"); } + m_bForceChangesToolbar = false; break; case FN_REDLINE_PROTECT : rSet.Put( SfxBoolItem( nWhich, GetDocShell()->HasChangeRecordProtection() ) ); |