Description: Remove deprecated throw specifiers Author: Hubert Figuière Origin: upstream, https://gitlab.gnome.org/World/AbiWord/-/commit/ef29fc9 Bug-Debian: https://bugs.debian.org/983960 Last-Update: 2024-07-01 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/plugins/aiksaurus/aiksaurusgtk3/AiksaurusGTK.cpp +++ b/plugins/aiksaurus/aiksaurusgtk3/AiksaurusGTK.cpp @@ -51,15 +51,15 @@ DialogImpl(); virtual ~DialogImpl(); - const char* runThesaurus(const char* word) throw(); - void setTitle(const char* title) throw(); - void setReplacebar(bool replacebar) throw(); - void setInitialMessage(const char* message) throw(std::bad_alloc); - - void eventCancel() throw(); - void eventReplace(const char* replacement) throw(); - void eventSelectWord(const char* word) throw(); - void eventSearch(const char* word) throw(); + const char* runThesaurus(const char* word) noexcept(false); + void setTitle(const char* title) noexcept(false); + void setReplacebar(bool replacebar) noexcept(false); + void setInitialMessage(const char* message) noexcept(false); + + void eventCancel() noexcept(false); + void eventReplace(const char* replacement) noexcept(false); + void eventSelectWord(const char* word) noexcept(false); + void eventSearch(const char* word) noexcept(false); }; @@ -78,13 +78,13 @@ } - void DialogImpl::setReplacebar(bool replacebar) throw() + void DialogImpl::setReplacebar(bool replacebar) noexcept(false) { d_showreplacebar = replacebar; } - void DialogImpl::setInitialMessage(const char* message) throw(std::bad_alloc) + void DialogImpl::setInitialMessage(const char* message) noexcept(false) { d_initialMessage = message; } @@ -149,7 +149,7 @@ } - const char* DialogImpl::runThesaurus(const char* word) throw() + const char* DialogImpl::runThesaurus(const char* word) noexcept(false) { try { @@ -180,7 +180,7 @@ } - void DialogImpl::setTitle(const char* word) throw() + void DialogImpl::setTitle(const char* word) noexcept(false) { try { d_title = (word) ? (word) : (""); @@ -191,13 +191,13 @@ } - void DialogImpl::eventCancel() throw() + void DialogImpl::eventCancel() noexcept(false) { gtk_main_quit(); } - void DialogImpl::eventReplace(const char* replacement) throw() + void DialogImpl::eventReplace(const char* replacement) noexcept(false) { try { d_replacement = replacement; @@ -209,14 +209,14 @@ } - void DialogImpl::eventSelectWord(const char* word) throw() + void DialogImpl::eventSelectWord(const char* word) noexcept(false) { if (d_replacebar_ptr) d_replacebar_ptr->setText(word); } - void DialogImpl::eventSearch(const char* word) throw() + void DialogImpl::eventSearch(const char* word) noexcept(false) { try { std::string w( (word) ? (word) : ("") ); --- a/plugins/aiksaurus/aiksaurusgtk3/DialogMediator.h +++ b/plugins/aiksaurus/aiksaurusgtk3/DialogMediator.h @@ -26,10 +26,10 @@ class DialogMediator { public: - virtual void eventCancel() throw() = 0; - virtual void eventReplace(const char* replacement) throw() = 0; - virtual void eventSelectWord(const char* word) throw() = 0; - virtual void eventSearch(const char* word) throw() = 0; + virtual void eventCancel() noexcept(false) = 0; + virtual void eventReplace(const char* replacement) noexcept(false) = 0; + virtual void eventSelectWord(const char* word) noexcept(false) = 0; + virtual void eventSearch(const char* word) noexcept(false) = 0; }; } --- a/plugins/aiksaurus/aiksaurusgtk3/Display.cpp +++ b/plugins/aiksaurus/aiksaurusgtk3/Display.cpp @@ -29,7 +29,7 @@ namespace AiksaurusGTK_impl { - Display::Display(DialogMediator& mediator) throw() + Display::Display(DialogMediator& mediator) noexcept(false) : d_mediator(mediator) { // ensure that styles are set up. @@ -61,7 +61,7 @@ } - Display::~Display() throw() + Display::~Display() noexcept(false) { for(int i = 0;i < static_cast(d_meanings.size());++i) { @@ -71,7 +71,7 @@ void Display::_createMeaning(const string& title, vector& words) - throw(std::bad_alloc) + noexcept(false) { Meaning *mean = new Meaning(title, words, *this); d_meanings.push_back(mean); @@ -79,7 +79,7 @@ } - void Display::_resetDisplay() throw() + void Display::_resetDisplay() noexcept(false) { // Recreate our layout widget. if (d_layout) @@ -96,7 +96,7 @@ d_meanings.clear(); } - void Display::_displayResults(const char* word) throw(Exception, std::bad_alloc) + void Display::_displayResults(const char* word) noexcept(false) { _checkThesaurus(); @@ -135,7 +135,7 @@ - void Display::_checkThesaurus() throw(Exception) + void Display::_checkThesaurus() noexcept(false) { if (d_thesaurus.error()[0]) { @@ -151,7 +151,7 @@ } void Display::_displayAlternatives() - throw(Exception, std::bad_alloc) + noexcept(false) { _checkThesaurus(); vector words; @@ -165,7 +165,7 @@ } - void Display::showMessage(const char* message) throw() + void Display::showMessage(const char* message) noexcept(false) { _resetDisplay(); GtkWidget* label = gtk_label_new(message); @@ -174,7 +174,7 @@ gtk_widget_show_all(d_layout); } - void Display::search(const char* word) throw(std::bad_alloc) + void Display::search(const char* word) noexcept(false) { try { @@ -195,7 +195,7 @@ } - void Display::_handleClick(bool isDoubleClick, const char* text) throw(std::bad_alloc) + void Display::_handleClick(bool isDoubleClick, const char* text) noexcept(false) { string str(text); // might throw @@ -206,7 +206,7 @@ } - void Display::_handleSelection(GtkWidget* list) throw() + void Display::_handleSelection(GtkWidget* list) noexcept(false) { for(int i = 0;i < static_cast(d_meanings.size());++i) { @@ -215,13 +215,13 @@ } - GtkWidget* Display::getDisplay() throw() + GtkWidget* Display::getDisplay() noexcept(false) { return d_scroller; } - const Aiksaurus& Display::getThesaurus() const throw() + const Aiksaurus& Display::getThesaurus() const noexcept(false) { return d_thesaurus; } @@ -233,7 +233,7 @@ // To do this, we have to set up a resource first so that the // styles mean what we want them to mean. // - void Display::_initResources() throw() + void Display::_initResources() noexcept(false) { // Execute this code only once. static bool done = false; --- a/plugins/aiksaurus/aiksaurusgtk3/Display.h +++ b/plugins/aiksaurus/aiksaurusgtk3/Display.h @@ -28,30 +28,30 @@ GtkWidget* d_layout; std::vector d_meanings; - void _handleSelection(GtkWidget* list) throw(); - void _handleClick(bool isDoubleClick, const char* text) throw(std::bad_alloc); + void _handleSelection(GtkWidget* list) noexcept(false); + void _handleClick(bool isDoubleClick, const char* text) noexcept(false); - void _resetDisplay() throw(); + void _resetDisplay() noexcept(false); void _createMeaning(const std::string& title, std::vector& words) - throw(std::bad_alloc); + noexcept(false); - void _displayResults(const char* word) throw(Exception, std::bad_alloc); - void _displayAlternatives() throw(Exception, std::bad_alloc); + void _displayResults(const char* word) noexcept(false); + void _displayAlternatives() noexcept(false); - void _checkThesaurus() throw(Exception); + void _checkThesaurus() noexcept(false); -// static void _initResources() throw(); +// static void _initResources() noexcept(false); public: - Display(DialogMediator& parent) throw(); - ~Display() throw(); + Display(DialogMediator& parent) noexcept(false); + ~Display() noexcept(false); - const Aiksaurus& getThesaurus() const throw(); - GtkWidget* getDisplay() throw(); + const Aiksaurus& getThesaurus() const noexcept(false); + GtkWidget* getDisplay() noexcept(false); - void search(const char* word) throw(std::bad_alloc); - void showMessage(const char* message) throw(); + void search(const char* word) noexcept(false); + void showMessage(const char* message) noexcept(false); }; } --- a/plugins/aiksaurus/aiksaurusgtk3/Meaning.cpp +++ b/plugins/aiksaurus/aiksaurusgtk3/Meaning.cpp @@ -9,7 +9,7 @@ namespace AiksaurusGTK_impl { - static void ucwords(string& str) throw() + static void ucwords(string& str) noexcept(false) { bool ws = true; for(int i = 0;i < static_cast(str.size());++i) @@ -26,7 +26,7 @@ } Meaning::Meaning(const string& title, vector& words, Display& display) - throw(bad_alloc) + noexcept(false) : d_title(title), d_words(words), d_display(display), d_lists(4), d_models(4) { d_masterLayout = gtk_event_box_new(); @@ -126,12 +126,12 @@ } - Meaning::~Meaning() throw() + Meaning::~Meaning() noexcept(false) { } - GtkWidget* Meaning::getLayout() throw() + GtkWidget* Meaning::getLayout() noexcept(false) { return d_masterLayout; } @@ -139,7 +139,7 @@ gint Meaning::_wordclick (GtkTreeSelection *sel, gpointer data) - throw(std::bad_alloc) + noexcept(false) { Meaning *m = static_cast(data); GtkTreeView *tv = gtk_tree_selection_get_tree_view(sel); @@ -159,7 +159,7 @@ } - void Meaning::unselectListsExcept(GtkWidget* list) throw() + void Meaning::unselectListsExcept(GtkWidget* list) noexcept(false) { for(int i = 0;i < static_cast(d_lists.size());++i) { --- a/plugins/aiksaurus/aiksaurusgtk3/Meaning.h +++ b/plugins/aiksaurus/aiksaurusgtk3/Meaning.h @@ -25,18 +25,18 @@ GtkWidget* d_label; static gint _wordclick(GtkTreeSelection *sel, - gpointer data) throw(std::bad_alloc); + gpointer data) noexcept(false); public: Meaning(const string& title, vector& words, Display& display) - throw(std::bad_alloc); + noexcept(false); - ~Meaning() throw(); + ~Meaning() noexcept(false); - GtkWidget* getLayout() throw(); + GtkWidget* getLayout() noexcept(false); - void unselectListsExcept(GtkWidget* me) throw(); + void unselectListsExcept(GtkWidget* me) noexcept(false); }; } --- a/plugins/aiksaurus/aiksaurusgtk3/Toolbar.cpp +++ b/plugins/aiksaurus/aiksaurusgtk3/Toolbar.cpp @@ -26,7 +26,7 @@ namespace AiksaurusGTK_impl { - Toolbar::Toolbar(DialogMediator& mediator, GtkWidget* window) throw(std::bad_alloc) + Toolbar::Toolbar(DialogMediator& mediator, GtkWidget* window) noexcept(false) : d_mediator(mediator), d_searchbar_words(12), d_ishistorymove(false), @@ -87,12 +87,12 @@ _updateNavigation(); } - Toolbar::~Toolbar() throw() + Toolbar::~Toolbar() noexcept(false) { } - void Toolbar::_updateNavigation() throw(std::bad_alloc) + void Toolbar::_updateNavigation() noexcept(false) { if (d_history.size_back()) d_backbutton_ptr->enable(); @@ -111,7 +111,7 @@ d_forwardbutton_ptr->updateMenuOptions(); } - void Toolbar::search(const char* str) throw(std::bad_alloc) + void Toolbar::search(const char* str) noexcept(false) { if (!d_ishistorymove) d_history.search(str); @@ -126,29 +126,29 @@ gtk_combo_box_text_append_text(combo, reinterpret_cast(ptr->data)); } - void Toolbar::_setTooltip(GtkWidget* w, const char* str) throw() + void Toolbar::_setTooltip(GtkWidget* w, const char* str) noexcept(false) { gtk_widget_set_tooltip_text(w, str); } - void Toolbar::focus() throw() + void Toolbar::focus() noexcept(false) { gtk_window_set_focus(GTK_WINDOW(d_window_ptr), gtk_bin_get_child(GTK_BIN(d_searchbar_ptr))); } - const char* Toolbar::getText() const throw() + const char* Toolbar::getText() const noexcept(false) { return gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(d_searchbar_ptr)))); } - GtkWidget* Toolbar::getToolbar() throw() + GtkWidget* Toolbar::getToolbar() noexcept(false) { return d_toolbar_ptr; } - void Toolbar::_backClicked(GtkWidget*, gpointer data) throw() + void Toolbar::_backClicked(GtkWidget*, gpointer data) noexcept(false) { Toolbar* tb = static_cast(data); tb->d_history.move_back(); @@ -157,7 +157,7 @@ tb->d_ishistorymove = false; } - void Toolbar::_backMenuClicked(GList* element, gpointer data) throw() + void Toolbar::_backMenuClicked(GList* element, gpointer data) noexcept(false) { Toolbar* tb = static_cast(data); tb->d_history.move_back_to(element); @@ -166,7 +166,7 @@ tb->d_ishistorymove = false; } - void Toolbar::_forwardClicked(GtkWidget*, gpointer data) throw() + void Toolbar::_forwardClicked(GtkWidget*, gpointer data) noexcept(false) { Toolbar* tb = static_cast(data); tb->d_history.move_forward(); @@ -175,7 +175,7 @@ tb->d_ishistorymove = false; } - void Toolbar::_forwardMenuClicked(GList* element, gpointer data) throw() + void Toolbar::_forwardMenuClicked(GList* element, gpointer data) noexcept(false) { Toolbar* tb = static_cast(data); tb->d_history.move_forward_to(element); @@ -184,7 +184,7 @@ tb->d_ishistorymove = false; } - void Toolbar::_searchBarChanged(GtkWidget*, gpointer data) throw() + void Toolbar::_searchBarChanged(GtkWidget*, gpointer data) noexcept(false) { Toolbar* tb = static_cast(data); bool popup_visible; @@ -194,7 +194,7 @@ tb->d_searchhack = true; } - void Toolbar::_searchBarHide(GtkWidget*, gpointer data) throw() + void Toolbar::_searchBarHide(GtkWidget*, gpointer data) noexcept(false) { Toolbar* tb = static_cast(data); @@ -204,12 +204,12 @@ tb->d_searchhack = false; } - void Toolbar::_searchBarActivate(GtkWidget* w, gpointer data) throw() + void Toolbar::_searchBarActivate(GtkWidget* w, gpointer data) noexcept(false) { _searchClicked(w, data); } - void Toolbar::_searchClicked(GtkWidget*, gpointer data) throw() + void Toolbar::_searchClicked(GtkWidget*, gpointer data) noexcept(false) { Toolbar* tb = static_cast(data); tb->d_mediator.eventSearch( tb->getText() ); --- a/plugins/aiksaurus/aiksaurusgtk3/Toolbar.h +++ b/plugins/aiksaurus/aiksaurusgtk3/Toolbar.h @@ -55,33 +55,33 @@ GtkWidget* d_searchbar_ptr; GtkWidget* d_searchbar_label_ptr; - void _updateNavigation() throw(std::bad_alloc); + void _updateNavigation() noexcept(false); - void _setTooltip(GtkWidget* w, const char* str) throw(); + void _setTooltip(GtkWidget* w, const char* str) noexcept(false); - static void _backClicked(GtkWidget* w, gpointer data) throw(); - static void _backMenuClicked(GList* element, gpointer data) throw(); + static void _backClicked(GtkWidget* w, gpointer data) noexcept(false); + static void _backMenuClicked(GList* element, gpointer data) noexcept(false); - static void _forwardClicked(GtkWidget* w, gpointer data) throw(); - static void _forwardMenuClicked(GList* element, gpointer data) throw(); + static void _forwardClicked(GtkWidget* w, gpointer data) noexcept(false); + static void _forwardMenuClicked(GList* element, gpointer data) noexcept(false); - static void _searchBarChanged(GtkWidget* w, gpointer data) throw(); - static void _searchBarShow(GtkWidget* w, gpointer data) throw(); - static void _searchBarHide(GtkWidget* w, gpointer data) throw(); - static void _searchBarActivate(GtkWidget* w, gpointer d) throw(); + static void _searchBarChanged(GtkWidget* w, gpointer data) noexcept(false); + static void _searchBarShow(GtkWidget* w, gpointer data) noexcept(false); + static void _searchBarHide(GtkWidget* w, gpointer data) noexcept(false); + static void _searchBarActivate(GtkWidget* w, gpointer d) noexcept(false); - static void _searchClicked(GtkWidget* w, gpointer data) throw(); + static void _searchClicked(GtkWidget* w, gpointer data) noexcept(false); public: - Toolbar(DialogMediator& mediator, GtkWidget* window) throw(std::bad_alloc); - ~Toolbar() throw(); + Toolbar(DialogMediator& mediator, GtkWidget* window) noexcept(false); + ~Toolbar() noexcept(false); - GtkWidget* getToolbar() throw(); - const char* getText() const throw(); - void focus() throw(); + GtkWidget* getToolbar() noexcept(false); + const char* getText() const noexcept(false); + void focus() noexcept(false); - void search(const char* str) throw(std::bad_alloc); + void search(const char* str) noexcept(false); }; } --- a/plugins/sdw/xp/docinfo.cpp +++ b/plugins/sdw/xp/docinfo.cpp @@ -38,7 +38,7 @@ /** Reads a bytestring, followed by a padding. aMaxlen is the max. number of bytes to read. */ static void readPaddedByteString(GsfInput* aStream, UT_UCS4String& aString, UT_iconv_t aConverter, UT_uint32 aMaxlen) - throw(UT_Error) + noexcept(false) { UT_UCS4Char* str; readByteString(aStream, str, aConverter); @@ -116,7 +116,7 @@ } void SDWDocInfo::load(GsfInfile* aDoc, PD_Document* aPDDoc) - throw(UT_Error) + noexcept(false) { char* headStr = NULL; --- a/plugins/sdw/xp/docinfo.h +++ b/plugins/sdw/xp/docinfo.h @@ -41,7 +41,7 @@ * @param aDoc The OLE Document which contains the stream * @param aPDDoc The PD_Document on which the metadata will be set. * Should be called as load(mDoc, getDoc()); */ - static void load(GsfInfile *aDoc, PD_Document* aPDDoc) throw(UT_Error); + static void load(GsfInfile *aDoc, PD_Document* aPDDoc) noexcept(false); }; #endif --- a/plugins/sdw/xp/ie_imp_StarOffice.cpp +++ b/plugins/sdw/xp/ie_imp_StarOffice.cpp @@ -183,7 +183,7 @@ #endif void streamRead(GsfInput* aStream, TextAttr& aAttr, gsf_off_t aEoa) - throw(UT_Error) + noexcept(false) { UT_uint8 flags; gsf_off_t newPos; @@ -423,7 +423,7 @@ } void readByteString(GsfInput* stream, char*& str, UT_uint16* aLength) - throw(UT_Error) + noexcept(false) { UT_uint16 length; str = NULL; @@ -436,7 +436,7 @@ *aLength = length; } -void readByteString(GsfInput* stream, UT_UCS4Char*& str, UT_iconv_t converter, SDWCryptor* cryptor) throw(UT_Error) +void readByteString(GsfInput* stream, UT_UCS4Char*& str, UT_iconv_t converter, SDWCryptor* cryptor) noexcept(false) { UT_uint16 len; char* rawString; @@ -532,7 +532,7 @@ // ******************************************************************************** // Header Class -void DocHdr::load(GsfInput* stream) throw(UT_Error) +void DocHdr::load(GsfInput* stream) noexcept(false) { UT_DEBUGMSG(("SDW: entering DocHdr::load\n")); static const char sw3hdr[] = "SW3HDR"; @@ -614,7 +614,7 @@ g_object_unref(G_OBJECT(mOle)); } -void IE_Imp_StarOffice::readRecSize(GsfInput* aStream, UT_uint32& aSize, gsf_off_t* aEOR) throw(UT_Error) { +void IE_Imp_StarOffice::readRecSize(GsfInput* aStream, UT_uint32& aSize, gsf_off_t* aEOR) noexcept(false) { // Yes, that's correct, only 3 bytes. guint8 buf [3]; aSize = 0; @@ -630,7 +630,7 @@ *aEOR = gsf_input_tell(aStream) + aSize; } -void readFlagRec(GsfInput* stream, UT_uint8& flags, gsf_off_t* newPos) throw(UT_Error) +void readFlagRec(GsfInput* stream, UT_uint8& flags, gsf_off_t* newPos) noexcept(false) { streamRead(stream, flags); if (newPos) --- a/plugins/sdw/xp/ie_imp_StarOffice.h +++ b/plugins/sdw/xp/ie_imp_StarOffice.h @@ -49,7 +49,7 @@ * str must be delete[]'d, not free'd! * aLength, if non-null, contains the length of the string in bytes. */ void readByteString(GsfInput* stream, char*& str, UT_uint16* aLength = NULL) - throw(UT_Error); + noexcept(false); /*! Reads a bytestring from a stream and converts it to UCS-4. Optionally, * it can also decrypt it. @@ -57,7 +57,7 @@ * @param str The string where the bytestring should be stored * @param converter Iconv handle for charset conversion * @param cryptor (Optional) The cryptor used for decrypting the string */ -void readByteString(GsfInput* stream, UT_UCS4Char*& str, UT_iconv_t converter, SDWCryptor* cryptor = NULL) throw(UT_Error); +void readByteString(GsfInput* stream, UT_UCS4Char*& str, UT_iconv_t converter, SDWCryptor* cryptor = NULL) noexcept(false); class DocHdr { public: @@ -67,7 +67,7 @@ * \param stream The OLE Stream to load from - should be the one * with the name "StarWriterDocument" * \throw UT_Error on failure */ - void load(GsfInput* stream) throw(UT_Error); + void load(GsfInput* stream) noexcept(false); UT_uint8 cLen; // ??? UT_uint16 nVersion; @@ -199,7 +199,7 @@ * \param aStream the stream to read from * \param aSize Reference to the size of the record * \param aEOR End of Record - file position where the record is finished*/ - void readRecSize(GsfInput* stream, UT_uint32& aSize, gsf_off_t* aEOR = NULL) throw(UT_Error); + void readRecSize(GsfInput* stream, UT_uint32& aSize, gsf_off_t* aEOR = NULL) noexcept(false); /*! Reads a string from the file where the first sint32 contains the length. If it * is zero-terminated, length must include the byte for termination. The string will * be converted to the charset given in mDocHdr. If the document is encrypted, the @@ -207,7 +207,7 @@ * \param stream The stream to read from * \param str Reference to pointer to UT_UCS4Char, where the string is stored. * Must be free'd. Is NULL if the function fails. */ - void readByteString(GsfInput* stream, UT_UCS4Char*& str) throw(UT_Error) { + void readByteString(GsfInput* stream, UT_UCS4Char*& str) noexcept(false) { ::readByteString(stream, str, mDocHdr.converter, mDocHdr.cryptor); } @@ -222,32 +222,32 @@ * \param flags Flags (also contain the length in the 4 least significant bytes) * \param newPos (optional) Pointer to a variable where the position after the * flags record is stored. */ -void readFlagRec(GsfInput* stream, UT_uint8& flags, gsf_off_t* newPos = NULL) throw(UT_Error); +void readFlagRec(GsfInput* stream, UT_uint8& flags, gsf_off_t* newPos = NULL) noexcept(false); /*! Reads one character from the given GsfInput. * \param aStream The OLE Stream * \param aChar Reference to the character * \throw UT_Error on failure */ -inline void readChar(GsfInput* aStream, char& aChar) throw(UT_Error) { +inline void readChar(GsfInput* aStream, char& aChar) noexcept(false) { if (!gsf_input_read(aStream, 1, reinterpret_cast(&aChar))) throw UT_IE_BOGUSDOCUMENT; } -inline void streamRead(GsfInput* aStream, UT_uint8& aDest) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, UT_uint8& aDest) noexcept(false) { if (!gsf_input_read(aStream, 1, static_cast(&aDest))) throw UT_IE_BOGUSDOCUMENT; } -inline void streamRead(GsfInput* aStream, UT_sint8& aDest) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, UT_sint8& aDest) noexcept(false) { streamRead(aStream, reinterpret_cast(aDest)); } -inline void streamRead(GsfInput* aStream, char& aDest) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, char& aDest) noexcept(false) { streamRead(aStream, reinterpret_cast(aDest)); } -inline void streamRead(GsfInput* aStream, UT_uint16& aDest, bool isLittleEndian = true) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, UT_uint16& aDest, bool isLittleEndian = true) noexcept(false) { guint8 buf [2]; if (!gsf_input_read(aStream, 2, buf)) throw UT_IE_BOGUSDOCUMENT; @@ -259,11 +259,11 @@ } } -inline void streamRead(GsfInput* aStream, UT_sint16& aDest, bool isLittleEndian = true) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, UT_sint16& aDest, bool isLittleEndian = true) noexcept(false) { streamRead(aStream, reinterpret_cast(aDest), isLittleEndian); } -inline void streamRead(GsfInput* aStream, UT_uint32& aDest, bool isLittleEndian = true) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, UT_uint32& aDest, bool isLittleEndian = true) noexcept(false) { guint8 buf [4]; if (!gsf_input_read(aStream, 4, buf)) throw UT_IE_BOGUSDOCUMENT; @@ -275,17 +275,17 @@ } } -inline void streamRead(GsfInput* aStream, UT_sint32& aDest, bool isLittleEndian = true) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, UT_sint32& aDest, bool isLittleEndian = true) noexcept(false) { streamRead(aStream, reinterpret_cast(aDest), isLittleEndian); } // reads the value as uint8 -inline void streamRead(GsfInput* aStream, bool& aDest) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, bool& aDest) noexcept(false) { streamRead(aStream, reinterpret_cast(aDest)); } // Class ID -inline void streamRead(GsfInput* aStream, ClsId& aClsId) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, ClsId& aClsId) noexcept(false) { streamRead(aStream, aClsId.n1); streamRead(aStream, aClsId.n2); streamRead(aStream, aClsId.n3); @@ -301,18 +301,18 @@ #include "ut_debugmsg.h" // for completeness... -inline void streamRead(GsfInput* aStream, char* aBuffer, UT_uint32 length) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, char* aBuffer, UT_uint32 length) noexcept(false) { if (!gsf_input_read(aStream, length, reinterpret_cast(aBuffer))) throw UT_IE_BOGUSDOCUMENT; } -inline void streamRead(GsfInput* aStream, UT_uint8* aBuffer, UT_uint32 length) throw(UT_Error) { +inline void streamRead(GsfInput* aStream, UT_uint8* aBuffer, UT_uint32 length) noexcept(false) { if (!gsf_input_read(aStream, length, static_cast(aBuffer))) throw UT_IE_BOGUSDOCUMENT; } // readRecSize must have been called already. readFlagRec must not. // aEoa = position of the end of the attr. -void streamRead(GsfInput* aStream, TextAttr& aAttr, gsf_off_t aEoa) throw(UT_Error); +void streamRead(GsfInput* aStream, TextAttr& aAttr, gsf_off_t aEoa) noexcept(false); #endif /* IE_IMP_STAROFFICE_H */ --- a/src/af/util/xp/ut_iconv.cpp +++ b/src/af/util/xp/ut_iconv.cpp @@ -73,7 +73,7 @@ /*! * Convert characters from in_charset to out_charset */ -auto_iconv::auto_iconv(const char * in_charset, const char *out_charset) throw(UT_iconv_t) +auto_iconv::auto_iconv(const char * in_charset, const char *out_charset) noexcept(false) { m_h = UT_ICONV_INVALID; --- a/src/af/util/xp/ut_iconv.h +++ b/src/af/util/xp/ut_iconv.h @@ -43,8 +43,7 @@ explicit auto_iconv(UT_iconv_t iconv); - explicit auto_iconv(const char * in_charset, const char *out_charset) - throw(UT_iconv_t); + explicit auto_iconv(const char * in_charset, const char *out_charset) noexcept(false); ~auto_iconv(); operator UT_iconv_t();