Submitted By:              Douglas R. Reno <renodr at linuxfromscratch dot org>
Date:                      2021-06-22
Initial Package Version:   3.0.4
Origin:                    Upstream
Upstream Status:           Applied
Description:               Fixes a build error in Abiword when using GCC-11. This
                           occurs due to improper usage of exceptions.

diff -Naurp abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/AiksaurusGTK.cpp abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/AiksaurusGTK.cpp
--- abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/AiksaurusGTK.cpp	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/AiksaurusGTK.cpp	2021-06-22 16:41:52.006871606 -0500
@@ -51,15 +51,15 @@ namespace AiksaurusGTK_impl
             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 @@ namespace AiksaurusGTK_impl
     }
 
 
-    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 @@ namespace AiksaurusGTK_impl
     }
 
 
-    const char* DialogImpl::runThesaurus(const char* word) throw()
+    const char* DialogImpl::runThesaurus(const char* word) noexcept(false)
     {
         try {
 
@@ -180,7 +180,7 @@ namespace AiksaurusGTK_impl
     }
 
 
-    void DialogImpl::setTitle(const char* word) throw()
+    void DialogImpl::setTitle(const char* word) noexcept(false)
     {
         try {
             d_title = (word) ? (word) : ("");
@@ -191,7 +191,7 @@ namespace AiksaurusGTK_impl
     }
 
 
-    void DialogImpl::eventCancel() throw()
+    void DialogImpl::eventCancel() noexcept(false)
     {
         gtk_main_quit();
     }
@@ -216,7 +216,7 @@ namespace AiksaurusGTK_impl
     }
 
 
-    void DialogImpl::eventSearch(const char* word) throw()
+    void DialogImpl::eventSearch(const char* word) noexcept(false)
     {
         try {
             std::string w( (word) ? (word) : ("") );
diff -Naurp abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/DialogMediator.h abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/DialogMediator.h
--- abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/DialogMediator.h	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/DialogMediator.h	2021-06-22 16:42:28.272602076 -0500
@@ -26,10 +26,10 @@ namespace AiksaurusGTK_impl
     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;
     };
 }
 
diff -Naurp abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Display.cpp abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Display.cpp
--- abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Display.cpp	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Display.cpp	2021-06-22 16:44:45.639368429 -0500
@@ -29,7 +29,7 @@ using namespace std;
 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 @@ namespace AiksaurusGTK_impl
     }
 
 
-    Display::~Display() throw()
+    Display::~Display() noexcept(false)
     {
         for(int i = 0;i < static_cast<int>(d_meanings.size());++i)
         {
@@ -71,7 +71,7 @@ namespace AiksaurusGTK_impl
 
 
     void Display::_createMeaning(const string& title, vector<string>& words)
-        throw(std::bad_alloc)
+        noexcept(false)
     {
         Meaning *mean = new Meaning(title, words, *this);
         d_meanings.push_back(mean);
@@ -79,7 +79,7 @@ namespace AiksaurusGTK_impl
     }
 
 
-    void Display::_resetDisplay() throw()
+    void Display::_resetDisplay() noexcept(false)
     {
         // Recreate our layout widget.
         if (d_layout)
@@ -96,7 +96,7 @@ namespace AiksaurusGTK_impl
         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 @@ namespace AiksaurusGTK_impl
 
 
 
-    void Display::_checkThesaurus() throw(Exception)
+    void Display::_checkThesaurus() noexcept(false)
     {
         if (d_thesaurus.error()[0])
         {
@@ -151,7 +151,7 @@ namespace AiksaurusGTK_impl
     }
 
     void Display::_displayAlternatives()
-        throw(Exception, std::bad_alloc)
+        noexcept(false)
     {
         _checkThesaurus();
         vector<string> words;
@@ -165,7 +165,7 @@ namespace AiksaurusGTK_impl
     }
 
 
-    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 @@ namespace AiksaurusGTK_impl
         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 @@ namespace AiksaurusGTK_impl
     }
 
 
-    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 @@ namespace AiksaurusGTK_impl
     }
 
 
-    void Display::_handleSelection(GtkWidget* list) throw()
+    void Display::_handleSelection(GtkWidget* list) noexcept(false)
     {
         for(int i = 0;i < static_cast<int>(d_meanings.size());++i)
         {
@@ -215,13 +215,13 @@ namespace AiksaurusGTK_impl
     }
 
 
-    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 @@ namespace AiksaurusGTK_impl
     // 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;
diff -Naurp abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Display.h abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Display.h
--- abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Display.h	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Display.h	2021-06-22 16:46:30.674483221 -0500
@@ -28,30 +28,30 @@ namespace AiksaurusGTK_impl
             GtkWidget* d_layout;
             std::vector<Meaning*> 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<std::string>& 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);
     };
 
 }
diff -Naurp abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Meaning.cpp abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Meaning.cpp
--- abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Meaning.cpp	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Meaning.cpp	2021-06-22 16:49:16.721825831 -0500
@@ -9,7 +9,7 @@ using namespace std;
 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<int>(str.size());++i)
@@ -26,7 +26,7 @@ namespace AiksaurusGTK_impl
     }
 
     Meaning::Meaning(const string& title, vector<string>& 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 @@ namespace AiksaurusGTK_impl
 
     }
 
-    Meaning::~Meaning() throw()
+    Meaning::~Meaning() noexcept(false)
     {
 
     }
 
-    GtkWidget* Meaning::getLayout() throw()
+    GtkWidget* Meaning::getLayout() noexcept(false)
     {
         return d_masterLayout;
     }
@@ -139,7 +139,7 @@ namespace AiksaurusGTK_impl
 
     gint Meaning::_wordclick
     (GtkTreeSelection *sel, gpointer data)
-    throw(std::bad_alloc)
+    noexcept(false)
     {
         Meaning *m = static_cast<Meaning*>(data);
 		GtkTreeView *tv = gtk_tree_selection_get_tree_view(sel);
@@ -159,7 +159,7 @@ namespace AiksaurusGTK_impl
     }
 
 
-    void Meaning::unselectListsExcept(GtkWidget* list) throw()
+    void Meaning::unselectListsExcept(GtkWidget* list) noexcept(false)
     {
         for(int i = 0;i < static_cast<int>(d_lists.size());++i)
         {
diff -Naurp abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Meaning.h abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Meaning.h
--- abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Meaning.h	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Meaning.h	2021-06-22 16:49:50.811512000 -0500
@@ -25,18 +25,18 @@ namespace AiksaurusGTK_impl
             GtkWidget* d_label;
 
             static gint _wordclick(GtkTreeSelection *sel,
-                                   gpointer data) throw(std::bad_alloc);
+                                   gpointer data) noexcept(false)
 
         public:
 
             Meaning(const string& title, vector<string>& 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);
     };
 }
 
diff -Naurp abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Toolbar.cpp abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Toolbar.cpp
--- abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Toolbar.cpp	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Toolbar.cpp	2021-06-22 16:52:13.038389985 -0500
@@ -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 @@ namespace AiksaurusGTK_impl
         _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 @@ namespace AiksaurusGTK_impl
         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 @@ namespace AiksaurusGTK_impl
 			gtk_combo_box_text_append_text(combo, reinterpret_cast<const char*>(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<Toolbar*>(data);
         tb->d_history.move_back();
@@ -157,7 +157,7 @@ namespace AiksaurusGTK_impl
         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<Toolbar*>(data);
         tb->d_history.move_back_to(element);
@@ -166,7 +166,7 @@ namespace AiksaurusGTK_impl
         tb->d_ishistorymove = false;
     }
 
-    void Toolbar::_forwardClicked(GtkWidget*, gpointer data) throw()
+    void Toolbar::_forwardClicked(GtkWidget*, gpointer data) noexcept(false)
     {
         Toolbar* tb = static_cast<Toolbar*>(data);
         tb->d_history.move_forward();
@@ -175,7 +175,7 @@ namespace AiksaurusGTK_impl
         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<Toolbar*>(data);
         tb->d_history.move_forward_to(element);
@@ -184,7 +184,7 @@ namespace AiksaurusGTK_impl
         tb->d_ishistorymove = false;
     }
 
-    void Toolbar::_searchBarChanged(GtkWidget*, gpointer data) throw()
+    void Toolbar::_searchBarChanged(GtkWidget*, gpointer data) noexcept(false)
     {
         Toolbar* tb = static_cast<Toolbar*>(data);
 		bool popup_visible;
@@ -194,7 +194,7 @@ namespace AiksaurusGTK_impl
             tb->d_searchhack = true;
     }
 
-    void Toolbar::_searchBarHide(GtkWidget*, gpointer data) throw()
+    void Toolbar::_searchBarHide(GtkWidget*, gpointer data) noexcept(false)
     {
         Toolbar* tb = static_cast<Toolbar*>(data);
 
@@ -204,12 +204,12 @@ namespace AiksaurusGTK_impl
         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<Toolbar*>(data);
         tb->d_mediator.eventSearch( tb->getText() );
diff -Naurp abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Toolbar.h abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Toolbar.h
--- abiword-3.0.4.orig/plugins/aiksaurus/aiksaurusgtk3/Toolbar.h	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/aiksaurus/aiksaurusgtk3/Toolbar.h	2021-06-22 16:53:50.134359311 -0500
@@ -55,33 +55,33 @@ namespace AiksaurusGTK_impl
             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);
     };
 
 }
diff -Naurp abiword-3.0.4.orig/plugins/sdw/xp/docinfo.cpp abiword-3.0.4/plugins/sdw/xp/docinfo.cpp
--- abiword-3.0.4.orig/plugins/sdw/xp/docinfo.cpp	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/sdw/xp/docinfo.cpp	2021-06-22 16:55:30.595394396 -0500
@@ -38,7 +38,7 @@ SDWDocInfo::~SDWDocInfo() {}
 /** 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 @@ static inline void do_SetMetadata(PD_Doc
 }
 
 void SDWDocInfo::load(GsfInfile* aDoc, PD_Document* aPDDoc) 
-	throw(UT_Error)
+	noexcept(false)
 {
 	char* headStr = NULL;
 
diff -Naurp abiword-3.0.4.orig/plugins/sdw/xp/docinfo.h abiword-3.0.4/plugins/sdw/xp/docinfo.h
--- abiword-3.0.4.orig/plugins/sdw/xp/docinfo.h	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/sdw/xp/docinfo.h	2021-06-22 16:55:40.610597158 -0500
@@ -41,7 +41,7 @@ class SDWDocInfo {
 		 * @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
diff -Naurp abiword-3.0.4.orig/plugins/sdw/xp/ie_imp_StarOffice.cpp abiword-3.0.4/plugins/sdw/xp/ie_imp_StarOffice.cpp
--- abiword-3.0.4.orig/plugins/sdw/xp/ie_imp_StarOffice.cpp	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/sdw/xp/ie_imp_StarOffice.cpp	2021-06-22 16:58:26.863960359 -0500
@@ -183,7 +183,7 @@ static UT_uint16 lcl_sw3io__CompressWhic
 #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 @@ static UT_String _getPassword (XAP_Frame
 }
 
 void readByteString(GsfInput* stream, char*& str, UT_uint16* aLength) 
-    throw(UT_Error) 
+    noexcept(false)
 {
 	UT_uint16 length;
 	str = NULL;
@@ -436,7 +436,7 @@ void readByteString(GsfInput* stream, ch
 		*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 @@ bool IE_Imp_StarOffice_Sniffer::getDlgLa
 // ********************************************************************************
 // 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 @@ IE_Imp_StarOffice::~IE_Imp_StarOffice()
 		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 @@ void IE_Imp_StarOffice::readRecSize(GsfI
 		*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)
diff -Naurp abiword-3.0.4.orig/plugins/sdw/xp/ie_imp_StarOffice.h abiword-3.0.4/plugins/sdw/xp/ie_imp_StarOffice.h
--- abiword-3.0.4.orig/plugins/sdw/xp/ie_imp_StarOffice.h	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/plugins/sdw/xp/ie_imp_StarOffice.h	2021-06-22 17:02:12.097510433 -0500
@@ -49,7 +49,7 @@ struct ClsId {
  * 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 @@ void readByteString(GsfInput* stream, ch
  * @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 @@ class DocHdr {
 		 * \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 @@ class IE_Imp_StarOffice : public IE_Imp
 		 * \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 @@ class IE_Imp_StarOffice : public IE_Imp
 		 * \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 @@ class IE_Imp_StarOffice : public IE_Imp
  * \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<guint8*>(&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<guint8*>(&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<UT_uint8 &>(aDest));
 }
 
-inline void streamRead(GsfInput* aStream, char& aDest) throw(UT_Error) {
+inline void streamRead(GsfInput* aStream, char& aDest) noexcept(false) {
 	streamRead(aStream, reinterpret_cast<UT_uint8 &>(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
 	}
 }
 
-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<UT_uint16 &>(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
 	}
 }
 
-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<UT_uint32 &>(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<UT_uint8&>(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 @@ inline void streamRead(GsfInput* aStream
 #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<guint8 *>(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<guint8*>(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 */
diff -Naurp abiword-3.0.4.orig/src/af/util/xp/ut_iconv.cpp abiword-3.0.4/src/af/util/xp/ut_iconv.cpp
--- abiword-3.0.4.orig/src/af/util/xp/ut_iconv.cpp	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/src/af/util/xp/ut_iconv.cpp	2021-06-22 17:02:29.994871752 -0500
@@ -73,7 +73,7 @@ auto_iconv::auto_iconv(UT_iconv_t iconv)
 /*!
  * 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;
 
diff -Naurp abiword-3.0.4.orig/src/af/util/xp/ut_iconv.h abiword-3.0.4/src/af/util/xp/ut_iconv.h
--- abiword-3.0.4.orig/src/af/util/xp/ut_iconv.h	2019-11-26 19:22:10.000000000 -0600
+++ abiword-3.0.4/src/af/util/xp/ut_iconv.h	2021-06-22 17:02:45.492184586 -0500
@@ -44,7 +44,7 @@ class ABI_EXPORT auto_iconv
   explicit auto_iconv(UT_iconv_t iconv);
 
   explicit auto_iconv(const char * in_charset, const char *out_charset)
-      throw(UT_iconv_t);
+      noexcept(false);
   ~auto_iconv();
   operator UT_iconv_t();
 
