editeng/source/uno/unofield.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
New commits: commit 5405bd8cb81f09d1631aeebd95bd6b00926ae931 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Jan 18 09:29:45 2021 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Jan 18 12:43:40 2021 +0100 Get the rest directly from startsWith Change-Id: Ie93fa23778dc224631c25dd1e9794a1af8ff4b99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109514 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 9fdc097132da..59772b594490 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -905,16 +905,13 @@ uno::Reference< uno::XInterface > SvxUnoTextCreateTextField( const OUString& Ser { uno::Reference< uno::XInterface > xRet; - const OUString aTextFieldPrexit( "com.sun.star.text.textfield." ); - // #i93308# up to OOo 3.2 we used this wrong namespace name with the capital T & F. This is // fixed since OOo 3.2 but for compatibility we will still provide support for the wrong notation. - if( (ServiceSpecifier.startsWith( aTextFieldPrexit )) || - (ServiceSpecifier.startsWith( "com.sun.star.text.TextField." )) ) + OUString aFieldType; + if( (ServiceSpecifier.startsWith( "com.sun.star.text.textfield.", &aFieldType )) || + (ServiceSpecifier.startsWith( "com.sun.star.text.TextField.", &aFieldType )) ) { - OUString aFieldType( ServiceSpecifier.copy( aTextFieldPrexit.getLength() ) ); - sal_Int32 nId = text::textfield::Type::UNSPECIFIED; if ( aFieldType == "DateTime" ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits