[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - sd/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 6 13:44:21 UTC 2019


 sd/source/ui/framework/configuration/ConfigurationTracer.cxx |    8 +--
 sd/source/ui/framework/configuration/ConfigurationTracer.hxx |    2 
 sd/source/ui/view/drviews1.cxx                               |   26 ++---------
 3 files changed, 10 insertions(+), 26 deletions(-)

New commits:
commit 56385457a29cac061f1ded91d0f70249bbfe3fa4
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Nov 18 14:58:45 2018 -0500
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 6 15:43:48 2019 +0200

    sd: use OSL_DEBUG_LEVEL instead of DEBUG
    
    Reviewed-on: https://gerrit.libreoffice.org/68258
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/76240
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 0c4a2b126c4aaa6f87baa1d86973b25fe7691009)
    
    Change-Id: I0703a1564a23657e956e43fe4cbf1d9549acb94f
    Reviewed-on: https://gerrit.libreoffice.org/77010
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
index 4db6aa54d8c9..7ddaa23ae906 100644
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
@@ -19,7 +19,7 @@
 
 #include "ConfigurationTracer.hxx"
 
-#include <cstdio>
+#include <com/sun/star/drawing/framework/XConfiguration.hpp>
 #include <sal/log.hxx>
 
 using namespace ::com::sun::star::uno;
@@ -31,11 +31,11 @@ void ConfigurationTracer::TraceConfiguration (
     const Reference<XConfiguration>& rxConfiguration,
     const char* pMessage)
 {
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >=1
     SAL_INFO("sd.ui","" << pMessage << " at " << rxConfiguration.get() << " {");
     if (rxConfiguration.is())
     {
-        TraceBoundResources(rxConfiguration, NULL, 0);
+        TraceBoundResources(rxConfiguration, nullptr, 0);
     }
     else
     {
@@ -48,7 +48,7 @@ void ConfigurationTracer::TraceConfiguration (
 #endif
 }
 
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >=1
 void ConfigurationTracer::TraceBoundResources (
     const Reference<XConfiguration>& rxConfiguration,
     const Reference<XResourceId>& rxResourceId,
diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
index 991141843728..c78c4d986ab5 100644
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
@@ -33,7 +33,7 @@ public:
     static void TraceConfiguration (
         const css::uno::Reference<css::drawing::framework::XConfiguration>& rxConfiguration,
         const char* pMessage);
-#ifdef DEBUG
+#if OSL_DEBUG_LEVEL >=1
     static void TraceBoundResources (
         const css::uno::Reference<css::drawing::framework::XConfiguration>& rxConfiguration,
         const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
commit 36b89cd4214b7a160a8e03c861d73185bcf6a576
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Nov 28 22:06:05 2018 -0500
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 6 15:43:34 2019 +0200

    LOK: sd: use native SdPage to flag selection
    
    The slide-sorter is actually still necessary to apply/change
    the master slide of a given slide, so we must enable it.
    
    Change-Id: I3f59f58be76ab1c63453b4f6288044572800a556
    
    Change-Id: I7554ba4afd28d7ea4f3ed6ba375d9765a89ef21c
    Reviewed-on: https://gerrit.libreoffice.org/69618
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/73497
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 8213923c183c95c58b8c82ab6ad5e3f1611a4202)
    Reviewed-on: https://gerrit.libreoffice.org/77009
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index f8d688959e07..a0f5b7ffae52 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -772,31 +772,15 @@ bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
  */
 bool DrawViewShell::SelectPage(sal_uInt16 nPage, sal_uInt16 nSelect)
 {
-    slidesorter::SlideSorterViewShell* pSlideSorterViewShell
-        = slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase());
-    if (pSlideSorterViewShell != nullptr)
+    SdPage* pPage = GetDoc()->GetSdPage(nPage, PageKind::Standard);
+    if (pPage)
     {
-        slidesorter::controller::PageSelector& aPageSelector
-            = pSlideSorterViewShell->GetSlideSorter().GetController().GetPageSelector();
         if (nSelect == 0)
-        {
-            // Deselect.
-            aPageSelector.DeselectPage(nPage);
-
-        }
+            pPage->SetSelected(false); // Deselect.
         else if (nSelect == 1)
-        {
-            // Select.
-            aPageSelector.SelectPage(nPage);
-        }
+            pPage->SetSelected(true); // Select.
         else
-        {
-            // Toggle.
-            if (aPageSelector.IsPageSelected(nPage))
-                aPageSelector.DeselectPage(nPage);
-            else
-                aPageSelector.SelectPage(nPage);
-        }
+            pPage->SetSelected(!pPage->IsSelected()); // Toggle.
 
         return true;
     }


More information about the Libreoffice-commits mailing list