Hi all,

this patch makes scrolling in writer impossible :( it always brings the view back to the cursor (btw so does Tools -> Word Count, but only once it is invoked).

It looks like the cause is the following lines:

@@ -1197,6 +1198,25 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
                 }
             }
             break;
+
+            case FN_STAT_WORDCOUNT:
+            {
+                SwDocStat selectionStats;
+                SwDocStat documentStats;
+                {
+                    SwWait aWait( *GetDocShell(), sal_True );
+                    rShell.StartAction();
+                    rShell.CountWords(selectionStats);
+                    documentStats = rShell.GetUpdatedDocStat();
+                    rShell.EndAction();
+                }
+ rSet.Put(SfxStringItem(FN_STAT_WORDCOUNT, rtl::OUStringBuffer("Words: ") + .append(rtl::OUString::valueOf(static_cast<sal_Int64>(selectionStats.nWord)))
+                                                            .append('/')
+ .append(rtl::OUString::valueOf(static_cast<sal_Int64>(documentStats.nWord))).makeStringAndClear()));
+            }
+            break;


Any idea? How to count words without changing a viewpoint?

Regards,
Ivan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to