ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java |    6 +++-
 sw/source/core/layout/paintfrm.cxx                              |   13 
++++++----
 2 files changed, 12 insertions(+), 7 deletions(-)

New commits:
commit ad65448f3a3c1186c2c86970cbb7df1c48f81ba7
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Dec 13 16:27:32 2024 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Dec 14 20:12:33 2024 +0100

    Get the style color and number just once
    
    Change-Id: I4dfa6feb1f41f9c62bd025ff521adc011c655926
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178453
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 68486df83780..a24963e7afca 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -4576,15 +4576,18 @@ void SwTextFrame::PaintParagraphStylesHighlighting() 
const
 
         pRenderContext->Push(vcl::PushFlags::ALL);
 
-        pRenderContext->SetFillColor(rParaStylesColorMap[sStyleName].first);
-        pRenderContext->SetLineColor(rParaStylesColorMap[sStyleName].first);
+        Color nStyleColor = rParaStylesColorMap[sStyleName].first;
+        int nStyleNumber = rParaStylesColorMap[sStyleName].second;
+
+        pRenderContext->SetFillColor(nStyleColor);
+        pRenderContext->SetLineColor(nStyleColor);
 
         pRenderContext->DrawRect(aRect);
 
         // draw hatch pattern if paragraph has direct formatting
         if 
(SwDoc::HasParagraphDirectFormatting(SwPosition(*GetTextNodeForParaProps())))
         {
-            Color aHatchColor(rParaStylesColorMap[sStyleName].first);
+            Color aHatchColor(nStyleColor);
             // make hatch line color 41% darker than the fill color
             aHatchColor.ApplyTintOrShade(-4100);
             Hatch aHatch(HatchStyle::Single, aHatchColor, 50, 450_deg10);
@@ -4593,8 +4596,8 @@ void SwTextFrame::PaintParagraphStylesHighlighting() const
 
         pRenderContext->SetFont(aFont);
         
pRenderContext->SetLayoutMode(vcl::text::ComplexTextLayoutFlags::Default);
-        
pRenderContext->SetTextFillColor(rParaStylesColorMap[sStyleName].first);
-        pRenderContext->DrawText(aRect, 
OUString::number(rParaStylesColorMap[sStyleName].second),
+        pRenderContext->SetTextFillColor(nStyleColor);
+        pRenderContext->DrawText(aRect, OUString::number(nStyleNumber),
                                  DrawTextFlags::Center | 
DrawTextFlags::VCenter);
 
         pRenderContext->Pop();
commit 4544d10c3833b05a5cdb653e8ba59749f09430f1
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Nov 11 11:19:11 2024 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Dec 14 20:12:24 2024 +0100

    cid#1556282 silence Unguarded read
    
    Change-Id: If95e72b324378b334e106c9cb78e8e198f819573
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178451
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java 
b/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java
index 4000a1d0a463..199232e6d9c7 100644
--- a/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java
+++ b/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java
@@ -114,6 +114,7 @@ public final class socketAcceptor implements XAcceptor {
         com.sun.star.lang.IllegalArgumentException
     {
         ServerSocket serv;
+        Boolean noDelay = null;
         synchronized (this) {
             if (server == null) {
                 ConnectionDescriptor desc
@@ -142,6 +143,7 @@ public final class socketAcceptor implements XAcceptor {
                                                     + " vs. "
                                                     + connectionDescription);
             }
+            noDelay = tcpNoDelay;
             serv = server;
         }
         Socket socket = null;
@@ -153,8 +155,8 @@ public final class socketAcceptor implements XAcceptor {
             }
             // we enable tcpNoDelay for loopback connections because
             // it can make a significant speed difference on linux boxes.
-            if (tcpNoDelay != null) {
-                socket.setTcpNoDelay(tcpNoDelay.booleanValue());
+            if (noDelay != null) {
+                socket.setTcpNoDelay(noDelay.booleanValue());
             }
             else {
                 InetSocketAddress address = 
(InetSocketAddress)socket.getRemoteSocketAddress();

Reply via email to