diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-01-18 09:29:45 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-01-18 12:43:40 +0100 |
commit | 5405bd8cb81f09d1631aeebd95bd6b00926ae931 (patch) | |
tree | c58e7c8da77c2ab30f1b5a74a0a071835add30fd | |
parent | 991b3b3945790bb2699493e6645b4a3228f8a195 (diff) |
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.kaganski@collabora.com>
-rw-r--r-- | editeng/source/uno/unofield.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
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" ) |