[Libreoffice-commits] core.git: include/svx officecfg/registry sc/inc sc/sdi sc/source sc/uiconfig sd/sdi sd/source svx/sdi sw/inc sw/sdi sw/source
Gulsah Kose
gulsah.1004 at gmail.com
Thu May 11 14:12:53 UTC 2017
include/svx/svxids.hrc | 2
officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu | 8 --
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 11 +++
officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 11 ---
sc/inc/document.hxx | 12 ++-
sc/inc/table.hxx | 2
sc/sdi/cellsh.sdi | 1
sc/source/core/data/document.cxx | 30 ++++++++
sc/source/core/data/table2.cxx | 33 +++++++++
sc/source/ui/view/cellsh.cxx | 26 +++++++
sc/source/ui/view/cellsh1.cxx | 35 ++++++++++
sc/uiconfig/scalc/menubar/menubar.xml | 1
sd/sdi/drviewsh.sdi | 2
sd/sdi/grviewsh.sdi | 2
sd/source/ui/annotations/annotationmanager.cxx | 4 -
svx/sdi/svx.sdi | 2
sw/inc/cmdid.h | 3
sw/sdi/_viewsh.sdi | 2
sw/sdi/swriter.sdi | 17 ----
sw/source/uibase/docvw/PostItMgr.cxx | 2
sw/source/uibase/misc/swruler.cxx | 2
sw/source/uibase/uiview/view0.cxx | 4 -
22 files changed, 161 insertions(+), 51 deletions(-)
New commits:
commit 198f5a16fd4c5bf691a3450bbf16e88c000f9baa
Author: Gulsah Kose <gulsah.1004 at gmail.com>
Date: Wed Apr 19 16:29:43 2017 +0300
tdf#107258 Create show/hide all comments toggle button.
Created new show/hide all comments button for calc by
ShowAnnotations command. Unifyied writer, calc and impress's
ShowAnnotations slot.
Change-Id: I27149d09ee1763b84258c5e0c890a9628c8874c0
Signed-off-by: Gulsah Kose <gulsah.1004 at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/36697
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 0eb5bf579c33..91ad64d3ff93 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -903,7 +903,7 @@
#define SID_NEXT_POSTIT ( SID_SVX_START + 1095 )
#define SID_PREVIOUS_POSTIT ( SID_SVX_START + 1096 )
#define SID_DELETEALL_POSTIT ( SID_SVX_START + 1097 )
-#define SID_SHOW_POSTIT ( SID_SVX_START + 1098 )
+#define SID_TOGGLE_NOTES ( SID_SVX_START + 1098 )
#define SID_REPLYTO_POSTIT ( SID_SVX_START + 1099 )
#define SID_DELETEALLBYAUTHOR_POSTIT ( SID_SVX_START + 1100 )
#define SID_INSERT_POSTIT ( SID_SVX_START + 1101 )
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 9b1e57b93b60..e27d12445848 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1855,14 +1855,6 @@
<value>1</value>
</prop>
</node>
- <node oor:name=".uno:ShowAnnotations" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Comme~nts</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
- </node>
<node oor:name=".uno:DeleteAnnotation" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">~Delete Comment</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index b76cd6f49213..7f3830bdfd35 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -28,6 +28,17 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:ShowAnnotations" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Show Comme~nts</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
+ <value xml:lang="en-US">Comments</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>9</value>
+ </prop>
+ </node>
<node oor:name=".uno:ChangeControlType" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">~Replace with</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 8e0aaed3299d..db76ef1f043a 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -61,17 +61,6 @@
<value>8</value>
</prop>
</node>
- <node oor:name=".uno:ShowAnnotations" oor:op="replace">
- <prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Show Comments</value>
- </prop>
- <prop oor:name="ContextLabel" oor:type="xs:string">
- <value xml:lang="en-US">Comments</value>
- </prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>8</value>
- </prop>
- </node>
<node oor:name=".uno:InsertScript" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">S~cript...</value>
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 26547d24ced4..29f8af4d849d 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -238,6 +238,13 @@ enum ScDocumentMode
SCDOCMODE_UNDO
};
+enum CommentCaptionState
+{
+ ALLSHOWN, // All comments captions are shown
+ ALLHIDDEN, // All comments captions are hidden
+ MIXED // There are comments in shown and hidden.
+};
+
struct ScDocStat
{
OUString aDocName;
@@ -1103,8 +1110,9 @@ public:
* Ensure that all note objects have an associated sdr object. The export
* code uses sdr objects to export note data.
*/
- void CreateAllNoteCaptions();
- void ForgetNoteCaptions( const ScRangeList& rRanges, bool bPreserveData );
+ void CreateAllNoteCaptions();
+ void ForgetNoteCaptions( const ScRangeList& rRanges, bool bPreserveData );
+ CommentCaptionState GetAllNoteCaptionsState( const ScRangeList& rRanges);
ScAddress GetNotePosition( size_t nIndex ) const;
ScAddress GetNotePosition( size_t nIndex, SCTAB nTab ) const;
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 66ded63e9472..87ba9c6df206 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -36,6 +36,7 @@
#include <formula/types.hxx>
#include "calcmacros.hxx"
#include "formula/errorcodes.hxx"
+#include "document.hxx"
#include <set>
#include <map>
@@ -432,6 +433,7 @@ public:
void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
void GetNotesInRange( const ScRange& rRange, std::vector<sc::NoteEntry>& rNotes ) const;
+ CommentCaptionState GetAllNoteCaptionsState( const ScRange& rRange, std::vector<sc::NoteEntry>& rNotes );
bool ContainsNotesInRange( const ScRange& rRange ) const;
bool TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize ) const;
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 8e80db555901..6812a2d4bd89 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -209,6 +209,7 @@ interface CellSelection
FID_NOTE_VISIBLE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_HIDE_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_SHOW_NOTE [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
+ SID_TOGGLE_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_HIDE_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_SHOW_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
FID_DELETE_ALL_NOTES [ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 918cce784866..d96451afacad 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6501,6 +6501,36 @@ void ScDocument::ForgetNoteCaptions( const ScRangeList& rRanges, bool bPreserveD
}
}
+CommentCaptionState ScDocument::GetAllNoteCaptionsState( const ScRangeList& rRanges )
+{
+ CommentCaptionState aOldState, aState = CommentCaptionState::ALLHIDDEN; //because of Werror=maybe-uninitialized
+ std::vector<sc::NoteEntry> aNotes;
+
+ for (size_t i = 0, n = rRanges.size(); i < n; ++i)
+ {
+ const ScRange* pRange = rRanges[i];
+
+ for( SCTAB nTab = pRange->aStart.Tab(); nTab <= pRange->aEnd.Tab(); ++nTab )
+ {
+ aState = maTabs[nTab]->GetAllNoteCaptionsState( *pRange, aNotes );
+ if (aState == CommentCaptionState::MIXED)
+ return aState;
+
+ if (nTab - 1 >= 0) // it is possible that a range is ALLSHOWN, another range is ALLHIDDEN,
+ { // we have to detect that situation as mixed.
+ aOldState = maTabs[nTab-1]->GetAllNoteCaptionsState( *pRange, aNotes );
+
+ if (aState != aOldState)
+ {
+ aState = CommentCaptionState::MIXED;
+ return aState;
+ }
+ }
+ }
+ }
+ return aState;
+}
+
ScAddress ScDocument::GetNotePosition( size_t nIndex ) const
{
for (size_t nTab = 0; nTab < maTabs.size(); ++nTab)
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index edd9378bd200..6c770797f44c 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1614,6 +1614,39 @@ void ScTable::GetNotesInRange( const ScRange& rRange, std::vector<sc::NoteEntry>
}
}
+CommentCaptionState ScTable::GetAllNoteCaptionsState(const ScRange& rRange, std::vector<sc::NoteEntry>& rNotes )
+{
+ SCROW nStartRow = rRange.aStart.Row();
+ SCROW nEndRow = rRange.aEnd.Row();
+ bool bIsFirstNoteShownState = true; // because of error: -Werror=maybe-uninitialized
+ bool bFirstControl = true;
+
+ for (SCCOL nCol = rRange.aStart.Col(); nCol <= rRange.aEnd.Col(); ++nCol)
+ {
+ if (bFirstControl && pDocument->HasColNotes(nCol, nTab)) // detect status of first note caption
+ {
+ aCol[nCol].GetNotesInRange(nStartRow, nEndRow, rNotes);
+ bIsFirstNoteShownState = rNotes.begin()->mpNote->IsCaptionShown();
+ bFirstControl = false;
+ }
+
+ if (pDocument->HasColNotes(nCol, nTab))
+ {
+ aCol[nCol].GetNotesInRange(nStartRow, nEndRow, rNotes);
+
+ for(std::vector<sc::NoteEntry>::const_iterator itr = rNotes.begin(),
+ itrEnd = rNotes.end(); itr != itrEnd; ++itr)
+ {
+ if ( bIsFirstNoteShownState != itr->mpNote->IsCaptionShown()) // compare the first note caption with others
+ {
+ return CommentCaptionState::MIXED;
+ }
+ }
+ }
+ }
+ return (bIsFirstNoteShownState) ? CommentCaptionState::ALLSHOWN : CommentCaptionState::ALLHIDDEN;
+}
+
bool ScTable::ContainsNotesInRange( const ScRange& rRange ) const
{
SCROW nStartRow = rRange.aStart.Row();
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index cd65b89645e1..79d356e1a86f 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -1041,6 +1041,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case FID_DELETE_ALL_NOTES:
{
bool bHasNotes = false;
+
for (auto const& rTab : rMark.GetSelectedTabs())
{
if (pDoc->HasTabNotes( rTab ))
@@ -1055,6 +1056,31 @@ void ScCellShell::GetState(SfxItemSet &rSet)
}
break;
+ case SID_TOGGLE_NOTES:
+ {
+ bool bHasNotes = false;
+ ScRangeList aRanges;
+
+ for (auto const& rTab : rMark.GetSelectedTabs())
+ {
+ if (pDoc->HasTabNotes( rTab ))
+ {
+ bHasNotes = true;
+ aRanges.Append(ScRange(0,0,rTab,MAXCOL,MAXROW,rTab));
+ }
+ }
+
+ if ( !bHasNotes )
+ rSet.DisableItem( nWhich );
+ else
+ {
+ CommentCaptionState eState = pDoc->GetAllNoteCaptionsState( aRanges );
+ bool bAllNotesInShown = !(eState == ALLHIDDEN || eState == MIXED);
+ rSet.Put( SfxBoolItem( SID_TOGGLE_NOTES, bAllNotesInShown) );
+ }
+ }
+ break;
+
case SID_DELETE_NOTE:
{
bool bEnable = false;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 05f6397a4ed3..ce3fe707a663 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2356,6 +2356,41 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
break;
+ case SID_TOGGLE_NOTES:
+ {
+ ScViewData* pData = GetViewData();
+ ScMarkData& rMark = pData->GetMarkData();
+ ScDocument* pDoc = pData->GetDocument();
+ ScRangeList aRanges;
+ std::vector<sc::NoteEntry> aNotes;
+
+ for (auto const& rTab : rMark.GetSelectedTabs())
+ aRanges.Append(ScRange(0,0,rTab,MAXCOL,MAXROW,rTab));
+
+ CommentCaptionState eState = pDoc->GetAllNoteCaptionsState( aRanges );
+ pDoc->GetNotesInRange(aRanges, aNotes);
+ bool bShowNote = (eState == ALLHIDDEN || eState == MIXED);
+
+ OUString aUndo = ScGlobal::GetRscString( bShowNote ? STR_UNDO_SHOWALLNOTES : STR_UNDO_HIDEALLNOTES );
+ pData->GetDocShell()->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pData->GetViewShell()->GetViewShellId() );
+
+ for(std::vector<sc::NoteEntry>::const_iterator itr = aNotes.begin(),
+ itrEnd = aNotes.end(); itr != itrEnd; ++itr)
+ {
+ const ScAddress& rAdr = itr->maPos;
+ pData->GetDocShell()->GetDocFunc().ShowNote( rAdr, bShowNote );
+ }
+
+ pData->GetDocShell()->GetUndoManager()->LeaveListAction();
+
+ if (!pReqArgs)
+ rReq.AppendItem( SfxBoolItem( SID_TOGGLE_NOTES, bShowNote ) );
+
+ rReq.Done();
+ rBindings.Invalidate( SID_TOGGLE_NOTES );
+ }
+ break;
+
case SID_DELETE_NOTE:
{
const SfxPoolItem* pId;
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 3f61a0220218..a6acb537dc79 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -147,6 +147,7 @@
<menu:menuitem menu:id=".uno:ViewRowColumnHeaders"/>
<menu:menuitem menu:id=".uno:ViewValueHighlighting"/>
<menu:menuitem menu:id=".uno:ToggleFormula"/>
+ <menu:menuitem menu:id=".uno:ShowAnnotations"/>
<menu:menu menu:id=".uno:GridMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:GridVisible"/>
diff --git a/sd/sdi/drviewsh.sdi b/sd/sdi/drviewsh.sdi
index 553843a144fb..174b919ccaaf 100644
--- a/sd/sdi/drviewsh.sdi
+++ b/sd/sdi/drviewsh.sdi
@@ -144,7 +144,7 @@ interface ImpressEditView : DrawView
ExecMethod = Execute ;
StateMethod = GetState ;
]
- SID_SHOW_POSTIT
+ SID_TOGGLE_NOTES
[
ExecMethod = ExecuteAnnotation;
StateMethod = GetAnnotationState;
diff --git a/sd/sdi/grviewsh.sdi b/sd/sdi/grviewsh.sdi
index df765f3c62ee..f5d1642ac4ac 100644
--- a/sd/sdi/grviewsh.sdi
+++ b/sd/sdi/grviewsh.sdi
@@ -39,7 +39,7 @@ shell GraphicViewShell
ExecMethod = ExecuteAnnotation;
StateMethod = GetAnnotationState;
]
- SID_SHOW_POSTIT
+ SID_TOGGLE_NOTES
[
ExecMethod = ExecuteAnnotation;
StateMethod = GetAnnotationState;
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index b5802d726994..3701957bc67a 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -364,7 +364,7 @@ void AnnotationManagerImpl::ExecuteAnnotation(SfxRequest& rReq )
case SID_REPLYTO_POSTIT:
ExecuteReplyToAnnotation( rReq );
break;
- case SID_SHOW_POSTIT:
+ case SID_TOGGLE_NOTES:
ShowAnnotations( !mbShowAnnotations );
break;
}
@@ -752,7 +752,7 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet)
if( bReadOnly || bWrongPageKind || (nCurrentODFVersion <= SvtSaveOptions::ODFVER_012) )
rSet.DisableItem( SID_INSERT_POSTIT );
- rSet.Put(SfxBoolItem(SID_SHOW_POSTIT, mbShowAnnotations));
+ rSet.Put(SfxBoolItem(SID_TOGGLE_NOTES, mbShowAnnotations));
Reference< XAnnotation > xAnnotation;
GetSelectedAnnotation( xAnnotation );
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index e9249c4cea6e..a8c2a3431aa1 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -4445,7 +4445,7 @@ SfxVoidItem EditAnnotation SID_EDIT_POSTIT
GroupId = GID_EDIT;
]
-SfxVoidItem ShowAnnotations SID_SHOW_POSTIT
+SfxVoidItem ShowAnnotations SID_TOGGLE_NOTES
()
[
AutoUpdate = FALSE,
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 0b2662a3089d..e626bbb93458 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -173,8 +173,7 @@
#define FN_SET_MODOPT_TBLNUMFMT (FN_VIEW + 52) /* Number recognition in tables */
#define FN_HSCROLL_METRIC (FN_VIEW + 53) /* Metric horizontal scrollbar */
#define FN_VSCROLL_METRIC (FN_VIEW + 54) /* Metric vertical scrollbar */
-#define FN_VIEW_NOTES (FN_VIEW + 55)
-
+// 55 is free
#define FN_NAVIGATION_POPUP (FN_VIEW + 56) /* Navigation Popup */
#define FN_SCROLL_PREV (FN_VIEW + 57) /* uno:ScrollToPrevious */
#define FN_SCROLL_NEXT (FN_VIEW + 58) /* uno:ScrollToNext */
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index 97e5c6eab343..76e691dc35e0 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -789,7 +789,7 @@ interface BaseTextEditView
Export = FALSE;
]
- FN_VIEW_NOTES
+ SID_TOGGLE_NOTES
[
ExecMethod = ExecViewOptions ;
StateMethod = StateViewOptions ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index aa5d898eb18a..0146294d4ed6 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -5349,23 +5349,6 @@ SfxUInt16Item ShowMultiplePages FN_SHOW_MULTIPLE_PAGES
ToolBoxConfig = TRUE,
GroupId = GID_VIEW;
]
-SfxBoolItem ShowAnnotations FN_VIEW_NOTES
-
-[
- AutoUpdate = TRUE,
- FastCall = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = TRUE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
-
-
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- ToolBoxConfig = TRUE,
- GroupId = GID_OPTIONS;
-]
SfxBoolItem ShowHiddenParagraphs FN_VIEW_HIDDEN_PARA
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 6f49708864d2..2651538f6f82 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -497,7 +497,7 @@ void SwPostItMgr::Focus(SfxBroadcaster& rBC)
{
if (!mpWrtShell->GetViewOptions()->IsPostIts())
{
- SfxRequest aRequest(mpView->GetViewFrame(),FN_VIEW_NOTES);
+ SfxRequest aRequest(mpView->GetViewFrame(), SID_TOGGLE_NOTES);
mpView->ExecViewOptions(aRequest);
}
diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index 2ed26d26f061..1a1c1ef5dee9 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -237,7 +237,7 @@ void SwCommentRuler::MouseButtonDown( const MouseEvent& rMEvt )
// Toggle notes visibility
SwView &rView = mpSwWin->GetView();
- SfxRequest aRequest( rView.GetViewFrame(), FN_VIEW_NOTES );
+ SfxRequest aRequest( rView.GetViewFrame(), SID_TOGGLE_NOTES );
rView.ExecViewOptions( aRequest );
// It is inside comment control, so update help text
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 791af4811fb2..78daaedce1c3 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -267,7 +267,7 @@ void SwView::StateViewOptions(SfxItemSet &rSet)
aBool.SetValue( pOpt->IsViewMetaChars() ); break;
case FN_VIEW_TABLEGRID:
aBool.SetValue( SwViewOption::IsTableBoundaries() ); break;
- case FN_VIEW_NOTES:
+ case SID_TOGGLE_NOTES:
{
aBool.SetValue( pOpt->IsPostIts());
if (!GetPostItMgr()->HasNotes())
@@ -413,7 +413,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
pOpt->setBrowseMode( bFlag );
break;
- case FN_VIEW_NOTES:
+ case SID_TOGGLE_NOTES:
if ( STATE_TOGGLE == eState )
bFlag = !pOpt->IsPostIts();
More information about the Libreoffice-commits
mailing list