Fix build with wxUSE_FFILE=0.
Add the missing "#if wxUSE_FFILE" checks and add fallbacks to wxFile if it's available. Closes #15353. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4842,23 +4842,41 @@ public:
|
||||
*/
|
||||
virtual void ResetAndClearCommands();
|
||||
|
||||
#if wxUSE_FFILE && wxUSE_STREAMS
|
||||
//@{
|
||||
/**
|
||||
Loads content from a stream or file.
|
||||
Loads content from a file.
|
||||
Not all handlers will implement file loading.
|
||||
*/
|
||||
virtual bool LoadFile(const wxString& filename, wxRichTextFileType type = wxRICHTEXT_TYPE_ANY);
|
||||
//@}
|
||||
|
||||
//@{
|
||||
/**
|
||||
Saves content to a file.
|
||||
Not all handlers will implement file saving.
|
||||
*/
|
||||
virtual bool SaveFile(const wxString& filename, wxRichTextFileType type = wxRICHTEXT_TYPE_ANY);
|
||||
//@}
|
||||
#endif // wxUSE_FFILE
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
//@{
|
||||
/**
|
||||
Loads content from a stream.
|
||||
Not all handlers will implement loading from a stream.
|
||||
*/
|
||||
virtual bool LoadFile(wxInputStream& stream, wxRichTextFileType type = wxRICHTEXT_TYPE_ANY);
|
||||
//@}
|
||||
|
||||
//@{
|
||||
/**
|
||||
Saves content to a stream or file.
|
||||
Not all handlers will implement file saving.
|
||||
Saves content to a stream.
|
||||
Not all handlers will implement saving to a stream.
|
||||
*/
|
||||
virtual bool SaveFile(const wxString& filename, wxRichTextFileType type = wxRICHTEXT_TYPE_ANY);
|
||||
virtual bool SaveFile(wxOutputStream& stream, wxRichTextFileType type = wxRICHTEXT_TYPE_ANY);
|
||||
//@}
|
||||
#endif // wxUSE_STREAMS
|
||||
|
||||
/**
|
||||
Sets the handler flags, controlling loading and saving.
|
||||
|
@@ -573,6 +573,7 @@ public:
|
||||
int type = wxRICHTEXT_TYPE_ANY);
|
||||
#endif
|
||||
|
||||
#if wxUSE_FFILE && wxUSE_STREAMS
|
||||
/**
|
||||
Helper function for LoadFile(). Loads content into the control's buffer using the given type.
|
||||
|
||||
@@ -582,6 +583,7 @@ public:
|
||||
This function looks for a suitable wxRichTextFileHandler object.
|
||||
*/
|
||||
virtual bool DoLoadFile(const wxString& file, int fileType);
|
||||
#endif // wxUSE_FFILE && wxUSE_STREAMS
|
||||
|
||||
#ifdef DOXYGEN
|
||||
/**
|
||||
@@ -596,6 +598,7 @@ public:
|
||||
int type = wxRICHTEXT_TYPE_ANY);
|
||||
#endif
|
||||
|
||||
#if wxUSE_FFILE && wxUSE_STREAMS
|
||||
/**
|
||||
Helper function for SaveFile(). Saves the buffer content using the given type.
|
||||
|
||||
@@ -606,6 +609,7 @@ public:
|
||||
*/
|
||||
virtual bool DoSaveFile(const wxString& file = wxEmptyString,
|
||||
int fileType = wxRICHTEXT_TYPE_ANY);
|
||||
#endif // wxUSE_FFILE && wxUSE_STREAMS
|
||||
|
||||
/**
|
||||
Sets flags that change the behaviour of loading or saving.
|
||||
|
@@ -165,11 +165,15 @@ public:
|
||||
virtual ~wxRichTextPrinting();
|
||||
|
||||
/// Preview the file or buffer
|
||||
#if wxUSE_FFILE && wxUSE_STREAMS
|
||||
bool PreviewFile(const wxString& richTextFile);
|
||||
#endif
|
||||
bool PreviewBuffer(const wxRichTextBuffer& buffer);
|
||||
|
||||
/// Print the file or buffer
|
||||
#if wxUSE_FFILE && wxUSE_STREAMS
|
||||
bool PrintFile(const wxString& richTextFile, bool showPrintDialog = true);
|
||||
#endif
|
||||
bool PrintBuffer(const wxRichTextBuffer& buffer, bool showPrintDialog = true);
|
||||
|
||||
/// Shows page setup dialog
|
||||
|
Reference in New Issue
Block a user