Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2613

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/13/2613/1

Fixes fdo#55814 by reverting bb6bd1ff9

This commit revert bb6bd1ff9cd3eecec7eb2cd7bd0a4dcef584c903.
After reverting no crashes happen.

Change-Id: I45018618ed646db20b107251707e65c17068b073
---
M sw/source/core/doc/docfld.cxx
1 file changed, 1 insertion(+), 26 deletions(-)



diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 8c01695..be41983 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -1277,15 +1277,6 @@
     SwNewDBMgr* pMgr = GetNewDBMgr();
     pMgr->CloseAll(sal_False);
 
-    // Make sure we don't hide all sections, which would lead to a crash. First, count how many of 
them do we have.
-    int nShownSections = 0;
-    for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); it != 
mpUpdtFlds->GetSortLst()->end(); ++it )
-    {
-        SwSection* pSect = (SwSection*)(*it)->GetSection();
-        if ( pSect && !pSect->IsCondHidden())
-            nShownSections++;
-    }
-
     String aNew;
     for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); it != 
mpUpdtFlds->GetSortLst()->end(); ++it )
     {
@@ -1296,23 +1287,7 @@
             SwSbxValue aValue = aCalc.Calculate(
                                         pSect->GetCondition() );
             if(!aValue.IsVoidValue())
-            {
-                // Do we want to hide this one?
-                bool bHide = aValue.GetBool();
-                if (bHide && !pSect->IsCondHidden())
-                {
-                    // This section will be hidden, but it wasn't before
-                    if (nShownSections == 1)
-                    {
-                        // This would be the last section, so set its condition to false, and 
avoid hiding it.
-                        OUString aCond("0");
-                        pSect->SetCondition(aCond);
-                        bHide = false;
-                    }
-                    nShownSections--;
-                }
-                pSect->SetCondHidden( bHide );
-            }
+                pSect->SetCondHidden( aValue.GetBool() );
             continue;
         }
 

-- 
To view, visit https://gerrit.libreoffice.org/2613
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45018618ed646db20b107251707e65c17068b073
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: David Ostrovsky <David.Ostrovsky@gmx.de>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.