[Libreoffice-commits] core.git: svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Sep 1 20:38:29 UTC 2018


 svx/source/svdraw/svdpagv.cxx |   46 +++++-------------------------------------
 1 file changed, 6 insertions(+), 40 deletions(-)

New commits:
commit d59acca8d1e33585d6f29cd85e8cb0d598067f9b
Author:     Regina Henschel <rb.henschel at t-online.de>
AuthorDate: Sat Sep 1 13:03:29 2018 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sat Sep 1 22:38:08 2018 +0200

    tdf#119611 Use generic SetAll() in SdrPageView ctor.
    
    The LayerAdmin has invalid values in case of charts. In
    consequence a bitfield with only zeros was generated,
    meaning all is invisible and not printable.
    
    Change-Id: I59d341ac8742f81b5f9afb28dc9add459a01525f
    Reviewed-on: https://gerrit.libreoffice.org/59895
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index bbb0d8e19e99..1aa17c27d7f7 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -143,47 +143,13 @@ SdrPageView::SdrPageView(SdrPage* pPage1, SdrView& rNewView)
     {
         aPgOrg.setX(mpPage->GetLeftBorder() );
         aPgOrg.setY(mpPage->GetUpperBorder() );
-
-        // Get layersets from document, master page or page to be ODF conform.
-        // Currently only partly implemented, the comments show, what is missing.
-        const SdrLayerAdmin& rPageLayerAdmin( mpPage->GetLayerAdmin() );
-        if ( rPageLayerAdmin.GetLayerCount() == 0 )
-        {
-            // if (master page has layers)
-            //      Get LayerIDSet from master page.
-            // else
-            //      Get default LayerIDSet from document
-            //      Currently the parent LayerAdmin is the LayerAdmin of the document
-                    SdrLayerAdmin* pParentLayerAdmin = rPageLayerAdmin.GetParent();
-                    if ( pParentLayerAdmin )
-                    {
-                        pParentLayerAdmin->getVisibleLayersODF( aLayerVisi );
-                        pParentLayerAdmin->getPrintableLayersODF( aLayerPrn );
-                        pParentLayerAdmin->getLockedLayersODF( aLayerLock );
-                    }
-                     else
-                    {
-                        // This should not happen. ToDo: assertion for debug mode
-                        aLayerVisi.SetAll();
-                        aLayerPrn.SetAll();
-                    }
-        }
-        else
-        {
-            // page has own Layers. Get LayerIDSet from page, maybe from master page in addition.
-            rPageLayerAdmin.getVisibleLayersODF( aLayerVisi );
-            rPageLayerAdmin.getPrintableLayersODF( aLayerPrn );
-            rPageLayerAdmin.getLockedLayersODF( aLayerLock );
-            // if (master page has layers)
-            //        Add the layer IDs for master page layers to the set from the page.
-        }
-    }
-    else
-    {   // SdrPageView without page?
-        // ToDo: assertion for debug mode
-        aLayerVisi.SetAll();
-        aLayerPrn.SetAll();
     }
+    // For example, in the case of charts, there is a LayerAdmin, but it has no valid values. Therefore
+    // a solution like pLayerAdmin->getVisibleLayersODF(aLayerVisi) is not possible. So use the
+    // generic SetAll() for now.
+    aLayerVisi.SetAll();
+    aLayerPrn.SetAll();
+
     mbHasMarked = false;
     mbVisible = false;
     pCurrentList = nullptr;


More information about the Libreoffice-commits mailing list