/// \return the \c Workarea associated to \p Buffer
/// \retval 0 if no \c WorkArea is found.
GuiWorkArea * workArea(Buffer & buffer);
/// \return the \c Workarea associated to \p Buffer
/// \retval 0 if no \c WorkArea is found.
GuiWorkArea * workArea(Buffer & buffer);
/// For completion of autosave or export threads.
void processingThreadStarted();
void processingThreadFinished();
/// For completion of autosave or export threads.
void processingThreadStarted();
void processingThreadFinished();
/// must be called in GUI thread
void doShowDialog(QString const & qname, QString const & qdata,
/// must be called in GUI thread
void doShowDialog(QString const & qname, QString const & qdata,
bool renameBuffer(Buffer & b, docstring const & newname);
///
bool saveBuffer(Buffer & b);
bool renameBuffer(Buffer & b, docstring const & newname);
///
bool saveBuffer(Buffer & b);
bool saveBuffer(Buffer & b, support::FileName const & fn);
/// closes a workarea, if close_buffer is true the buffer will
/// also be released, otherwise the buffer will be hidden.
bool saveBuffer(Buffer & b, support::FileName const & fn);
/// closes a workarea, if close_buffer is true the buffer will
/// also be released, otherwise the buffer will be hidden.
/// is the buffer in this workarea also shown in another tab ?
/// This tab can either be in the same view or in another one.
bool inMultiTabs(GuiWorkArea * wa);
/// is the buffer in this workarea also shown in another tab ?
/// This tab can either be in the same view or in another one.
bool inMultiTabs(GuiWorkArea * wa);