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>
This commit is contained in:
parent
991b3b3945
commit
5405bd8cb8
1 changed files with 3 additions and 6 deletions
|
@ -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" )
|
||||
|
|
Loading…
Reference in a new issue