sc/source/filter/oox/extlstcontext.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 4a3eba59bef50ae1535482ef7021b50b68e4f016
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Fri Mar 17 11:03:36 2023 -0400
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Jun 15 09:36:14 2023 +0200

    sc: filter: oox: add missing formula if it is a text ...
    
    conditional format:
    
        <x14:cfRule type="containsText" priority="3" text="Done" 
id="{00730073-0059-47BC-840A-00E100CE00F2}">
          <xm:f>NOT(ISERROR(SEARCH("Done",C1)))</xm:f>
          <x14:dxf>
          <font>
           <color rgb="FF006100"/>
          </font>
          <fill>
           <patternFill patternType="solid">
            <fgColor rgb="FFC6EFCE"/>
            <bgColor rgb="FFC6EFCE"/>
           </patternFill>
          </fill>
         </x14:dxf>
        </x14:cfRule>
    
    Signed-off-by: Henry Castro <hcas...@collabora.com>
    Change-Id: I4da117a1a122b3895788645dcd5de3e36cdcad0f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149067
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153008
    Tested-by: Jenkins
    (cherry picked from commit 7c2cfc26381dd31ab43e357eea7a3f5e63d3d6f4)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153075
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 2646f0969958..5328accac5c8 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -274,6 +274,12 @@ void ExtConditionalFormattingContext::onEndElement()
         break;
         case XLS14_TOKEN( cfRule ):
         {
+            if (IsSpecificTextCondMode(maModel.eOperator) && nFormulaCount == 
1)
+            {
+                maModel.aFormula = aChars;
+                maModel.eOperator = ScConditionMode::Direct;
+            }
+
             getStyles().getExtDxfs().forEachMem( &Dxf::finalizeImport );
             maModel.aStyle = getStyles().createExtDxfStyle(rStyleIdx);
             rStyleIdx++;

Reply via email to