writerfilter/source/dmapper/DomainMapper_Impl.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit e4243a140345a4bcd800217115b42667e277c6a3
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Thu Apr 21 14:49:33 2022 +0200
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Fri Apr 22 05:55:38 2022 +0200

    cleanup writerfilter lcl_ParseFormat
    
    If there is no \@, then we will never match what
    util::findQuotedText is looking for, so don't bother.
    
    Change-Id: I0a6709046673d98d00d74e921d7f502c9df54b46
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133265
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2ce7081d286d..2aff26ad5ad4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4219,18 +4219,17 @@ style::NumberingType::
 static OUString lcl_ParseFormat( const OUString& rCommand )
 {
     //  The command looks like: " DATE \@"dd MMMM yyyy" or "09/02/2014"
-    //  Remove whitespace permitted by standard between \@ and "
     OUString command;
     sal_Int32 delimPos = rCommand.indexOf("\\@");
     if (delimPos != -1)
     {
+        // Remove whitespace permitted by standard between \@ and "
         sal_Int32 wsChars = rCommand.indexOf('\"') - delimPos - 2;
         command = rCommand.replaceAt(delimPos+2, wsChars, u"");
+        return OUString(msfilter::util::findQuotedText(command, "\\@\"", 
'\"'));
     }
-    else
-        command = rCommand;
 
-    return OUString(msfilter::util::findQuotedText(command, "\\@\"", '\"'));
+    return OUString();
 }
 /*-------------------------------------------------------------------------
 extract a parameter (with or without quotes) between the command and the 
following backslash

Reply via email to