[Libreoffice-commits] core.git: 2 commits - include/tools vcl/source

Noel Grandin noel.grandin at collabora.co.uk
Mon Aug 21 19:32:58 UTC 2017


 include/tools/wintypes.hxx     |    2 --
 vcl/source/window/splitwin.cxx |   38 +++++++++++---------------------------
 vcl/source/window/toolbox.cxx  |    2 +-
 3 files changed, 12 insertions(+), 30 deletions(-)

New commits:
commit 128282219cab1e94f092276067a40ee5a34b59ff
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Aug 21 11:13:53 2017 +0200

    WB_FLATSPLITDRAW is dead
    
    since
    
        commit 2235846149e89dd9fe83cd4fbaf32908983aa571
        Date:   Tue Nov 23 18:50:48 2010 +0100
        vcl117: reduce duplication of enums
    
    Change-Id: Ib9c8015934bc794df4b96cd35f5f93b23f372f70
    Reviewed-on: https://gerrit.libreoffice.org/41386
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index 1fb95291e028..a6b3826698fa 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -219,7 +219,6 @@ WinBits const WB_DOCKBORDER =           0x00001000;
 
 // Window-Bits for SplitWindow
 WinBits const WB_NOSPLITDRAW =          0x01000000;
-WinBits const WB_FLATSPLITDRAW =        0x02000000;
 
 // Window-Bits for MessageBoxen
 WinBits const WB_OK =                   0x00100000;
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 4314a48d53b6..10854d9767bf 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1009,7 +1009,7 @@ void SplitWindow::ImplDrawBack(vcl::RenderContext& rRenderContext, ImplSplitSet*
     }
 }
 
-static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet, bool bRows, bool bFlat, bool bDown = true)
+static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet, bool bRows, bool bDown)
 {
     if (pSet->mpItems.empty())
         return;
@@ -1034,31 +1034,23 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet
                 nTop    = rItems[i]->mnLeft;
                 nBottom = rItems[i]->mnLeft+rItems[i]->mnWidth-1;
 
-                if (bFlat)
-                    nPos--;
-
                 if (bDown || (nItemSplitSize >= nSplitSize))
                 {
                     rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
                     rRenderContext.DrawLine(Point(nTop, nPos + 1), Point(nBottom, nPos + 1));
                 }
                 nPos += nSplitSize-2;
-                if (bFlat)
-                    nPos+=2;
                 if ((!bDown && (nItemSplitSize >= 2)) ||
                     (bDown  && (nItemSplitSize >= nSplitSize - 1)))
                 {
                     rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
                     rRenderContext.DrawLine(Point(nTop, nPos), Point(nBottom, nPos));
                 }
-                if (!bFlat)
+                nPos++;
+                if (!bDown || (nItemSplitSize >= nSplitSize))
                 {
-                    nPos++;
-                    if (!bDown || (nItemSplitSize >= nSplitSize))
-                    {
-                        rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor());
-                        rRenderContext.DrawLine(Point(nTop, nPos), Point(nBottom, nPos));
-                    }
+                    rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor());
+                    rRenderContext.DrawLine(Point(nTop, nPos), Point(nBottom, nPos));
                 }
             }
             else
@@ -1066,30 +1058,23 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet
                 nTop    = rItems[i]->mnTop;
                 nBottom = rItems[i]->mnTop+pSet->mpItems[i]->mnHeight-1;
 
-                if (bFlat)
-                    nPos--;
                 if (bDown || (nItemSplitSize >= nSplitSize))
                 {
                     rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
                     rRenderContext.DrawLine(Point(nPos + 1, nTop), Point(nPos+1, nBottom));
                 }
                 nPos += pSet->mnSplitSize - 2;
-                if (bFlat)
-                    nPos += 2;
                 if ((!bDown && (nItemSplitSize >= 2)) ||
                     (bDown  && (nItemSplitSize >= nSplitSize - 1)))
                 {
                     rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
                     rRenderContext.DrawLine(Point(nPos, nTop), Point(nPos, nBottom));
                 }
-                if( !bFlat )
+                nPos++;
+                if (!bDown || (nItemSplitSize >= nSplitSize))
                 {
-                    nPos++;
-                    if (!bDown || (nItemSplitSize >= nSplitSize))
-                    {
-                        rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor());
-                        rRenderContext.DrawLine(Point(nPos, nTop), Point(nPos, nBottom));
-                    }
+                    rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor());
+                    rRenderContext.DrawLine(Point(nPos, nTop), Point(nPos, nBottom));
                 }
             }
         }
@@ -1099,7 +1084,7 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet
     {
         if (rItems[i]->mpSet && rItems[i]->mnWidth && rItems[i]->mnHeight)
         {
-            ImplDrawSplit(rRenderContext, rItems[i]->mpSet, !(rItems[i]->mnBits & SplitWindowItemFlags::ColSet), bFlat);
+            ImplDrawSplit(rRenderContext, rItems[i]->mpSet, !(rItems[i]->mnBits & SplitWindowItemFlags::ColSet), true/*bDown*/);
         }
     }
 }
@@ -2302,8 +2287,7 @@ void SplitWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
     // draw splitter
     if (!(mnWinStyle & WB_NOSPLITDRAW))
     {
-        bool bFlat = (GetStyle() & WB_FLATSPLITDRAW) == WB_FLATSPLITDRAW;
-        ImplDrawSplit(rRenderContext, mpMainSet, mbHorz, bFlat, !mbBottomRight);
+        ImplDrawSplit(rRenderContext, mpMainSet, mbHorz, !mbBottomRight);
     }
 }
 
commit d5329c153149d29b25f1ec9d19ada8b62e350b6d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Aug 21 11:04:26 2017 +0200

    WB_FORCETABCYCLE is dead
    
    since
    
        commit 7ced337e1f0e1fae81ff7f196e59e558b729bdde
        Date:   Tue Jun 18 16:59:27 2013 +0200
        startcenter: GSOC Use Widget Layout for the Start Center
    
    Change-Id: I406059568f15500a21a1b41d3a4b8e12b2adb5cf
    Reviewed-on: https://gerrit.libreoffice.org/41385
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index c8b4083c88bb..1fb95291e028 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -213,7 +213,6 @@ WinBits const WB_SCALE =                0x08000000;
 // Window-Bits for ToolBox
 WinBits const WB_LINESPACING =          0x01000000;
 WinBits const WB_SCROLL =               0x02000000;
-WinBits const WB_FORCETABCYCLE =        0x04000000;
 
 // Window-Bits for DockingWindows
 WinBits const WB_DOCKBORDER =           0x00001000;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 26579b2ddf98..810c589a8333 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3962,7 +3962,7 @@ bool ToolBox::EventNotify( NotifyEvent& rNEvt )
                     pParent->GetChildCount() != 1);
                 bool bNoTabCycling = bOldSchoolContainer || isContainerWindow(pParent);
 
-                if( bNoTabCycling &&  ! (GetStyle() & WB_FORCETABCYCLE) )
+                if( bNoTabCycling )
                     return DockingWindow::EventNotify( rNEvt );
                 else if( ImplChangeHighlightUpDn( aKeyCode.IsShift() , bNoTabCycling ) )
                     return false;


More information about the Libreoffice-commits mailing list