diff options
-rw-r--r-- | sw/source/filter/html/htmlforw.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 710846dc9f7c..97636e64efff 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -28,7 +28,6 @@ #include <com/sun/star/form/XForm.hpp> #include <com/sun/star/form/FormComponentType.hpp> #include <com/sun/star/awt/XTextLayoutConstrains.hpp> -#include <comphelper/string.hxx> #include <hintids.hxx> #include <o3tl/any.hxx> #include <vcl/svapp.hxx> @@ -144,9 +143,21 @@ static void lcl_html_outEvents( SvStream& rStrm, continue; OUString sListener( pDescs[i].ListenerType ); - sal_Int32 nTok = comphelper::string::getTokenCount(sListener, '.'); - if( nTok ) - sListener = sListener.getToken( nTok-1, '.' ); + if (!sListener.isEmpty()) + { + const sal_Int32 nIdx { sListener.lastIndexOf('.')+1 }; + if (nIdx>0) + { + if (nIdx<sListener.getLength()) + { + sListener = sListener.copy(nIdx); + } + else + { + sListener.clear(); + } + } + } OUString sMethod( pDescs[i].EventMethod ); const sal_Char *pOpt = nullptr; |