sc/source/ui/condformat/condformateasydlg.cxx |   27 --------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)

New commits:
commit 94082ff2b66f9054cccf70e29cbed507b03b5cba
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Mon Nov 25 19:41:37 2024 +0530
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Nov 26 09:36:49 2024 +0100

    Revert "sc: prefill easy condition dialog with editing condition data"
    
    This reverts commit 598e93b1b11f4cdff96f6117c2a7d35f3698fd23.
    
    Change-Id: Ifdbc8920f232d388eac2a07cd6e2e2dece204a7a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177283
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sc/source/ui/condformat/condformateasydlg.cxx 
b/sc/source/ui/condformat/condformateasydlg.cxx
index ddc904a2f5c7..3e1bb5e015b2 100644
--- a/sc/source/ui/condformat/condformateasydlg.cxx
+++ b/sc/source/ui/condformat/condformateasydlg.cxx
@@ -273,33 +273,10 @@ 
ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings* pBindings,
     aRange.Format(sRangeString, ScRefFlags::VALID, *mpDocument, 
mpDocument->GetAddressConvention());
     mxRangeEntry->SetText(sRangeString);
 
-    OUString sStyleName;
-    if (format)
-    {
-        const ScFormatEntry* entry = format->GetEntry(mnEntryIndex);
-        ScFormatEntry::Type type = entry->GetType();
-        if (type == ScFormatEntry::Type::Condition)
-        {
-            const ScCondFormatEntry* condEntry = static_cast<const 
ScCondFormatEntry*>(entry);
-            sStyleName = condEntry->GetStyle();
-            if (mxNumberEntry->get_visible())
-                
mxNumberEntry->set_text(condEntry->GetExpression(aRange.GetTopLeftCorner(), 0));
-            if (mxNumberEntry2->get_visible())
-                
mxNumberEntry2->set_text(condEntry->GetExpression(aRange.GetTopLeftCorner(), 
1));
-        }
-        else if (type == ScFormatEntry::Type::Date)
-        {
-            const ScCondDateFormatEntry* dateEntry
-                = static_cast<const ScCondDateFormatEntry*>(entry);
-            sStyleName = dateEntry->GetStyleName();
-        }
-    }
-
     StartListening(*mpDocument->GetStyleSheetPool(), 
DuplicateHandling::Prevent);
     ScCondFormatHelper::FillStyleListBox(mpDocument, *mxStyles);
 
-    mxStyles->set_active_text(sStyleName);
-    StyleSelectHdl(*mxStyles);
+    mxStyles->set_active(1);
     mxWdPreviewWin->show();
 }
 
commit 98bfac9e12089f52aa74c789ecc45254103b933d
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Mon Nov 25 19:39:50 2024 +0530
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Nov 26 09:36:42 2024 +0100

    Revert "sc: fixed crashing on conditional format entry selection"
    
    This reverts commit 69c6ce6d8c6c6a6f9e3f0ea1319dbdb2190ccaab.
    
    Change-Id: Ie18c90ff6bf933845aae35521c9131d90ccb8c0b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177282
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sc/source/ui/condformat/condformateasydlg.cxx 
b/sc/source/ui/condformat/condformateasydlg.cxx
index 267ead5c5878..ddc904a2f5c7 100644
--- a/sc/source/ui/condformat/condformateasydlg.cxx
+++ b/sc/source/ui/condformat/condformateasydlg.cxx
@@ -277,8 +277,6 @@ 
ConditionalFormatEasyDialog::ConditionalFormatEasyDialog(SfxBindings* pBindings,
     if (format)
     {
         const ScFormatEntry* entry = format->GetEntry(mnEntryIndex);
-        if (!entry)
-            return;
         ScFormatEntry::Type type = entry->GetType();
         if (type == ScFormatEntry::Type::Condition)
         {

Reply via email to