summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 693cdb80d6a9..b1708ca470b5 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -17,6 +17,7 @@
#include <optional>
#include <com/sun/star/text/WrapTextMode.hpp>
+#include <com/sun/star/io/WrongFormatException.hpp>
#include <oox/mathml/importutils.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -631,13 +632,15 @@ public:
RTFParserState& top()
{
if (m_Impl.empty())
- throw std::out_of_range("empty rtf state stack");
+ throw css::io::WrongFormatException(
+ "Parser state is empty! Invalid usage of destination braces in RTF?", nullptr);
return m_Impl.back();
}
void pop()
{
if (m_Impl.empty())
- throw std::out_of_range("empty rtf state stack");
+ throw css::io::WrongFormatException(
+ "Parser state is empty! Invalid usage of destination braces in RTF?", nullptr);
return m_Impl.pop_back();
}
void push(RTFParserState const& rState) { return m_Impl.push_back(rState); }