+/// find the previous change in the buffer
+bool findPreviousChange(BufferView * bv);
+
+class FindAndReplaceOptions {
+public:
+ typedef enum {
+ S_BUFFER,
+ S_DOCUMENT,
+ S_OPEN_BUFFERS,
+ S_ALL_MANUALS
+ } SearchScope;
+ FindAndReplaceOptions(
+ docstring const & find_buf_name,
+ bool casesensitive,
+ bool matchword,
+ bool forward,
+ bool expandmacros,
+ bool ignoreformat,
+ docstring const & repl_buf_name,
+ bool keep_case,
+ SearchScope scope = S_BUFFER
+ );
+ FindAndReplaceOptions() { }
+ docstring find_buf_name;
+ bool casesensitive;
+ bool matchword;
+ bool forward;
+ bool expandmacros;
+ bool ignoreformat;
+ /// This is docstring() if no replace was requested
+ docstring repl_buf_name;
+ bool keep_case;
+ SearchScope scope;
+};
+
+/// Write a FindAdvOptions instance to a stringstream
+std::ostringstream & operator<<(std::ostringstream & os, lyx::FindAndReplaceOptions const & opt);
+
+/// Read a FindAdvOptions instance from a stringstream
+std::istringstream & operator>>(std::istringstream & is, lyx::FindAndReplaceOptions & opt);