core.git: sc/inc sc/source

2024-09-18 Thread Rafael Lima (via logerrit)
 sc/inc/SolverSettings.hxx  |1 +
 sc/inc/globstr.hrc |1 +
 sc/source/core/data/SolverSettings.cxx |   14 ++
 sc/source/ui/miscdlgs/optsolver.cxx|   16 ++--
 4 files changed, 26 insertions(+), 6 deletions(-)

New commits:
commit 57ecae2843c80d67ab9a3aaaf004fe131c4f13ae
Author: Rafael Lima 
AuthorDate: Fri Sep 6 21:33:27 2024 +0200
Commit: Rafael Lima 
CommitDate: Wed Sep 18 20:59:55 2024 +0200

tdf#162760 Fix solver crashing with unset parameters

This patch fixes 2 related issues:
1) Solver engines may crash internally and we need to catch these 
exceptions and inform the user instead of letting Calc crash entirely.
2) When initializing solver settings, we only set the default values for 
the first engine; we need to set the defaults for all engines.

Change-Id: Ia598f7c17c25b5d6277f2ce24d2f4d552f897fe0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172955
Reviewed-by: Rafael Lima 
Tested-by: Jenkins

diff --git a/sc/inc/SolverSettings.hxx b/sc/inc/SolverSettings.hxx
index 7f328ed89eed..dd5afc5211fa 100644
--- a/sc/inc/SolverSettings.hxx
+++ b/sc/inc/SolverSettings.hxx
@@ -165,6 +165,7 @@ private:
 OUString m_sSocialConstant;
 OUString m_sConstrictionCoeff;
 OUString m_sMutationProbability;
+// SCO only
 OUString m_sLibrarySize;
 
 css::uno::Sequence m_aEngineOptions;
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index e0838445e736..49a186325f46 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -520,6 +520,7 @@
 #define STR_INVALIDVAR  NC_("STR_INVALIDVAR", 
"Undefined name for variable cell.")
 #define STR_INVALIDFORM NC_("STR_INVALIDFORM", 
"Undefined name as formula cell.")
 #define STR_NOFORMULA   NC_("STR_NOFORMULA", "Formula 
cell must contain a formula.")
+#define STR_SOLVER_ENGINE_ERROR NC_("STR_SOLVER_ENGINE_ERROR", 
"An internal error occurred while running the solver engine.")
 #define STR_INVALIDINPUTNC_("STR_INVALIDINPUT", 
"Invalid input.")
 #define STR_INVALIDCONDITIONNC_("STR_INVALIDCONDITION", 
"Invalid condition.")
 #define STR_QUERYREMOVE NC_("STR_QUERYREMOVE", "Should 
the entry
#
be deleted?")
diff --git a/sc/source/core/data/SolverSettings.cxx 
b/sc/source/core/data/SolverSettings.cxx
index 333751d26734..9917cdcc59e7 100644
--- a/sc/source/core/data/SolverSettings.cxx
+++ b/sc/source/core/data/SolverSettings.cxx
@@ -763,18 +763,24 @@ void SolverSettings::ResetToDefaults()
 m_sVariableCells = "";
 m_sMSEngineId = "1";
 
-// The default solver engine is the first implementation available
 css::uno::Sequence aEngineNames;
 css::uno::Sequence aDescriptions;
 ScSolverUtil::GetImplementations(aEngineNames, aDescriptions);
+
+// tdf#162760 Set the parameters of all available solver engines to the 
default values
+for (const auto& sEngine : aEngineNames)
+{
+css::uno::Sequence aEngineProps
+= ScSolverUtil::GetDefaults(sEngine);
+SetEngineOptions(aEngineProps);
+}
+
+// The default solver engine is the first implementation available
 m_sLOEngineName = aEngineNames[0];
 
 // Default engine options
 m_aEngineOptions = ScSolverUtil::GetDefaults(m_sLOEngineName);
 
-// Default solver engine options
-SetEngineOptions(m_aEngineOptions);
-
 // Clear all constraints
 m_aConstraints.clear();
 }
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx 
b/sc/source/ui/miscdlgs/optsolver.cxx
index 358754a884fe..a406e361c998 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -1116,8 +1116,20 @@ bool ScOptSolverDlg::CallSolver()   // return true 
-> close dialog after cal
 }
 }
 
-xSolver->solve();
-bool bSuccess = xSolver->getSuccess();
+// tdf#162760 The solver engine may crash unexpectedly, so we need a 
try...catch here
+bool bSuccess(false);
+try
+{
+xSolver->solve();
+bSuccess = xSolver->getSuccess();
+}
+catch (const uno::RuntimeException&)
+{
+std::unique_ptr 
xBox(Application::CreateMessageDialog(m_xDialog.get(),
+  VclMessageType::Error, 
VclButtonsType::Ok,
+  
ScResId(STR_SOLVER_ENGINE_ERROR)));
+xBox->run();
+}
 
 xProgress->response(RET_CLOSE);
 


core.git: Branch 'libreoffice-24-8' - sc/source

2024-09-11 Thread Rafael Lima (via logerrit)
 sc/source/ui/miscdlgs/solverutil.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4dc25ebbee7f4ff7c8eb561f5bfb03779e944f35
Author: Rafael Lima 
AuthorDate: Tue Sep 10 05:47:28 2024 +0200
Commit: Xisco Fauli 
CommitDate: Thu Sep 12 08:31:22 2024 +0200

tdf#162899 Accept BYTE and SHORT types in the Solver Options dialog

ScSolverUtil::GetDefaults should also accept values of types BYTE and 
SHORT. It currently only accepts LONG.

As described in the bug ticket, this is important when creating Solver 
extensions using Python, since pyObject2Any forces small integer numbers to be 
either BYTE or SHORT instead of LONG.

Change-Id: I17c7a344777c31ea333a4d21a2543d2de0b448fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173093
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 2c5718353658fce9f40157ee49c1f0af1f5cc0df)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173175
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/miscdlgs/solverutil.cxx 
b/sc/source/ui/miscdlgs/solverutil.cxx
index 31772a05cf9b..7b3ac25c9ada 100644
--- a/sc/source/ui/miscdlgs/solverutil.cxx
+++ b/sc/source/ui/miscdlgs/solverutil.cxx
@@ -162,7 +162,8 @@ uno::Sequence 
ScSolverUtil::GetDefaults( std::u16string_vi
 uno::Any aValue = xPropSet->getPropertyValue( rProp.Name );
 uno::TypeClass eClass = aValue.getValueTypeClass();
 // only use properties of supported types
-if ( eClass == uno::TypeClass_BOOLEAN || eClass == uno::TypeClass_LONG 
|| eClass == uno::TypeClass_DOUBLE )
+if (eClass == uno::TypeClass_BOOLEAN || eClass == uno::TypeClass_LONG 
|| eClass == uno::TypeClass_SHORT
+|| eClass == uno::TypeClass_BYTE || eClass == 
uno::TypeClass_DOUBLE)
 pDefaults[nValid++] = beans::PropertyValue( rProp.Name, -1, 
aValue, beans::PropertyState_DIRECT_VALUE );
 }
 aDefaults.realloc(nValid);


core.git: sc/source

2024-09-11 Thread Rafael Lima (via logerrit)
 sc/source/ui/miscdlgs/solverutil.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 2c5718353658fce9f40157ee49c1f0af1f5cc0df
Author: Rafael Lima 
AuthorDate: Tue Sep 10 05:47:28 2024 +0200
Commit: Mike Kaganski 
CommitDate: Wed Sep 11 19:44:05 2024 +0200

tdf#162899 Accept BYTE and SHORT types in the Solver Options dialog

ScSolverUtil::GetDefaults should also accept values of types BYTE and 
SHORT. It currently only accepts LONG.

As described in the bug ticket, this is important when creating Solver 
extensions using Python, since pyObject2Any forces small integer numbers to be 
either BYTE or SHORT instead of LONG.

Change-Id: I17c7a344777c31ea333a4d21a2543d2de0b448fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173093
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sc/source/ui/miscdlgs/solverutil.cxx 
b/sc/source/ui/miscdlgs/solverutil.cxx
index 31772a05cf9b..7b3ac25c9ada 100644
--- a/sc/source/ui/miscdlgs/solverutil.cxx
+++ b/sc/source/ui/miscdlgs/solverutil.cxx
@@ -162,7 +162,8 @@ uno::Sequence 
ScSolverUtil::GetDefaults( std::u16string_vi
 uno::Any aValue = xPropSet->getPropertyValue( rProp.Name );
 uno::TypeClass eClass = aValue.getValueTypeClass();
 // only use properties of supported types
-if ( eClass == uno::TypeClass_BOOLEAN || eClass == uno::TypeClass_LONG 
|| eClass == uno::TypeClass_DOUBLE )
+if (eClass == uno::TypeClass_BOOLEAN || eClass == uno::TypeClass_LONG 
|| eClass == uno::TypeClass_SHORT
+|| eClass == uno::TypeClass_BYTE || eClass == 
uno::TypeClass_DOUBLE)
 pDefaults[nValid++] = beans::PropertyValue( rProp.Name, -1, 
aValue, beans::PropertyState_DIRECT_VALUE );
 }
 aDefaults.realloc(nValid);


core.git: Branch 'libreoffice-24-8-1' - sw/source

2024-09-09 Thread Rafael Lima (via logerrit)
 sw/source/uibase/docvw/PostItMgr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit efa83921498980c43c21aba6678a1f0a587ebbf3
Author: Rafael Lima 
AuthorDate: Sun Sep 8 14:32:32 2024 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 9 12:12:21 2024 +0200

tdf#162852 Fix minimum comment sidebar width

If the mouse is released over the document, the value of nPxWidth can get 
negative, so we need a signed integer variable here to make std::clamp work as 
expected.

Change-Id: I721b53e9eddee4f02ad31718f8c7187242ba44e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173016
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 005eaf799a1e5424751d059afc09c92ea9b29566)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173021
(cherry picked from commit 4bbc45eb48f91a552a9583b6aad4d59b2dac96f8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173024
Reviewed-by: Christian Lohmaier 
Reviewed-by: Noel Grandin 
Tested-by: Xisco Fauli 

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index d68fc77c4940..29697f5742ae 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -2204,7 +2204,7 @@ bool SwPostItMgr::HasNotes() const
 void SwPostItMgr::SetSidebarWidth(Point aMousePos)
 {
 sal_uInt16 nZoom = mpWrtShell->GetViewOptions()->GetZoom();
-sal_uInt16 nPxWidth
+tools::Long nPxWidth
 = aMousePos.X() - 
mpEditWin->LogicToPixel(GetSidebarRect(aMousePos).TopLeft()).X();
 double nFactor = static_cast(nPxWidth) / 
static_cast(nZoom);
 nFactor = std::clamp(nFactor, 1.0, 8.0);


core.git: Branch 'libreoffice-24-8' - sw/source

2024-09-09 Thread Rafael Lima (via logerrit)
 sw/source/uibase/docvw/PostItMgr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4bbc45eb48f91a552a9583b6aad4d59b2dac96f8
Author: Rafael Lima 
AuthorDate: Sun Sep 8 14:32:32 2024 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 9 11:58:54 2024 +0200

tdf#162852 Fix minimum comment sidebar width

If the mouse is released over the document, the value of nPxWidth can get 
negative, so we need a signed integer variable here to make std::clamp work as 
expected.

Change-Id: I721b53e9eddee4f02ad31718f8c7187242ba44e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173016
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 005eaf799a1e5424751d059afc09c92ea9b29566)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173021

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index d68fc77c4940..29697f5742ae 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -2204,7 +2204,7 @@ bool SwPostItMgr::HasNotes() const
 void SwPostItMgr::SetSidebarWidth(Point aMousePos)
 {
 sal_uInt16 nZoom = mpWrtShell->GetViewOptions()->GetZoom();
-sal_uInt16 nPxWidth
+tools::Long nPxWidth
 = aMousePos.X() - 
mpEditWin->LogicToPixel(GetSidebarRect(aMousePos).TopLeft()).X();
 double nFactor = static_cast(nPxWidth) / 
static_cast(nZoom);
 nFactor = std::clamp(nFactor, 1.0, 8.0);


core.git: sw/source

2024-09-08 Thread Rafael Lima (via logerrit)
 sw/source/uibase/docvw/PostItMgr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 005eaf799a1e5424751d059afc09c92ea9b29566
Author: Rafael Lima 
AuthorDate: Sun Sep 8 14:32:32 2024 +0200
Commit: Xisco Fauli 
CommitDate: Mon Sep 9 08:29:14 2024 +0200

tdf#162852 Fix minimum comment sidebar width

If the mouse is released over the document, the value of nPxWidth can get 
negative, so we need a signed integer variable here to make std::clamp work as 
expected.

Change-Id: I721b53e9eddee4f02ad31718f8c7187242ba44e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173016
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 21af23963b58..589f6c02a9cd 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -2195,7 +2195,7 @@ bool SwPostItMgr::HasNotes() const
 void SwPostItMgr::SetSidebarWidth(Point aMousePos)
 {
 sal_uInt16 nZoom = mpWrtShell->GetViewOptions()->GetZoom();
-sal_uInt16 nPxWidth
+tools::Long nPxWidth
 = aMousePos.X() - 
mpEditWin->LogicToPixel(GetSidebarRect(aMousePos).TopLeft()).X();
 double nFactor = static_cast(nPxWidth) / 
static_cast(nZoom);
 nFactor = std::clamp(nFactor, 1.0, 8.0);


core.git: Branch 'libreoffice-24-8-1' - sc/source

2024-08-30 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/gridwin.cxx |   21 +
 1 file changed, 5 insertions(+), 16 deletions(-)

New commits:
commit 98e92c15855d2faf3021c0e3b3987997f49b9b85
Author: Rafael Lima 
AuthorDate: Thu Aug 22 16:26:55 2024 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Sat Aug 31 08:06:08 2024 +0200

tdf#161709 Remove extra space between cursor and cell edges

Change-Id: Icfdb88928b0d9f076a3c6190c241825ef918d5a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172266
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Reviewed-by: Rafael Lima 
Tested-by: Heiko Tietze 
(cherry picked from commit 3b4a8406c2e7f4f6a7ac43e192fdb8ef266d4b6d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172566
Reviewed-by: Xisco Fauli 
(cherry picked from commit 6766aae5d0d615445eda55077c0e94514b4c25d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172571
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 272ed144cff9..239b014cd5c9 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6623,17 +6623,11 @@ void ScGridWindow::UpdateCursorOverlay()
 tools::Long nSizeYPix;
 mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
-// tdf#143733 Make cell outline wider than the cell
-const double fZoom(mrViewData.GetZoomX());
-const sal_uInt16 nAdjustBorder(2 + fZoom / 2);
-aScrPos.AdjustX(-nAdjustBorder);
-aScrPos.AdjustY(-nAdjustBorder);
-
 if (bLayoutRTL)
 aScrPos.AdjustX( -(nSizeXPix - 2) );   // move instead of 
mirroring
 
 // show the cursor as 4 (thin) rectangles
-tools::Rectangle aRect(aScrPos, Size(nSizeXPix + 2*nAdjustBorder, 
nSizeYPix + 2*nAdjustBorder));
+tools::Rectangle aRect(aScrPos, Size(nSizeXPix, nSizeYPix));
 
 float fScaleFactor = GetDPIScaleFactor();
 
@@ -6957,10 +6951,7 @@ void ScGridWindow::UpdateAutoFillOverlay()
 tools::Long nSizeYPix;
 mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
-// tdf#161234 Make AutoFill handle follow cell outline. This happens only 
when the
-// autofill handle is in the same cell as the outline. Note that 
nAdjustBorder needs
-// to be calculated the same way as in ScGridWindow::UpdateCursorOverlay()
-double nAdjustBorder(0);
+// Consider the case of merged cells to determine where to place the 
AutoFill handle
 SCCOL nX2 = mrViewData.GetCurX();
 SCCOL nY2 = mrViewData.GetCurY();
 const ScMergeAttr* pMerge = rDoc.GetAttr(nX2, nY2, nTab, ATTR_MERGE);
@@ -6969,15 +6960,13 @@ void ScGridWindow::UpdateAutoFillOverlay()
 nX2 += pMerge->GetColMerge() - 1;
 nY2 += pMerge->GetRowMerge() - 1;
 }
-if (nX == nX2 && nY == nY2)
-nAdjustBorder = std::round(2 + 
static_cast(mrViewData.GetZoomX()) / 2);
 
 if (bLayoutRTL && !comphelper::LibreOfficeKit::isActive())
-aFillPos.AdjustX( -(nSizeXPix + nAdjustBorder + 
(aFillHandleSize.Width() / 2)) );
+aFillPos.AdjustX( -(nSizeXPix + (aFillHandleSize.Width() / 2)) );
 else
-aFillPos.AdjustX(nSizeXPix + nAdjustBorder - (aFillHandleSize.Width() 
/ 2) );
+aFillPos.AdjustX(nSizeXPix - (aFillHandleSize.Width() / 2) );
 
-aFillPos.AdjustY(nSizeYPix + nAdjustBorder);
+aFillPos.AdjustY(nSizeYPix);
 aFillPos.AdjustY( -(aFillHandleSize.Height() / 2) );
 
 tools::Rectangle aFillRect(aFillPos, aFillHandleSize);


core.git: Branch 'libreoffice-24-8-1' - include/svx sc/source svx/source

2024-08-30 Thread Rafael Lima (via logerrit)
 include/svx/sdr/overlay/overlayselection.hxx |3 -
 sc/source/ui/view/gridwin.cxx|   70 ---
 svx/source/sdr/overlay/overlayselection.cxx  |   10 +++
 3 files changed, 62 insertions(+), 21 deletions(-)

New commits:
commit 3284f5e49ef949be6dfd5bec640b6fb479907040
Author: Rafael Lima 
AuthorDate: Thu Jul 11 22:11:15 2024 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Aug 31 04:11:09 2024 +0200

tdf#162006 Use contrast outline for the AutoFill/Cursor handle as well

This patch draws a white line around the AutoFill handle for better 
contrast.

It also adds an internal white outline to the cursor overlay.

See bug ticket for screenshots.

Change-Id: I1567d272fd5a2835192c50973e84cb8c269fb04e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170354
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
(cherry picked from commit 1d1f47e6ca6367bf8fb828dd09cce197a96f643c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172565
Reviewed-by: Ilmari Lauhakangas 
(cherry picked from commit 0b5eedc5e98adcc9cff578a4a47a9d33adf7e579)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172667
Tested-by: Adolfo Jayme Barrientos 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/include/svx/sdr/overlay/overlayselection.hxx 
b/include/svx/sdr/overlay/overlayselection.hxx
index b83322acbf61..a05de575e430 100644
--- a/include/svx/sdr/overlay/overlayselection.hxx
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -30,7 +30,8 @@ namespace sdr::overlay
 {
 Invert,
 Solid,
-Transparent
+Transparent,
+NoFill
 };
 
 class SVXCORE_DLLPUBLIC OverlaySelection final : public OverlayObject
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1770a419f550..272ed144cff9 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6241,8 +6241,8 @@ void ScGridWindow::ImpCreateOverlayObjects()
 {
 UpdateHighlightOverlay();
 UpdateSelectionOverlay();
-UpdateAutoFillOverlay();
 UpdateCursorOverlay();
+UpdateAutoFillOverlay();
 UpdateCopySourceOverlay();
 UpdateDragRectOverlay();
 UpdateHeaderOverlay();
@@ -6726,9 +6726,24 @@ void ScGridWindow::UpdateCursorOverlay()
 std::move(aRanges),
 false, false));
 
+// Internal white contrast rectangle
+std::vector< basegfx::B2DRange > aRangesInternal;
+basegfx::B2DRange aRBInternal(aPixelRects[0].Right(), 
aPixelRects[2].Bottom(),
+  aPixelRects[1].Left() - 1, 
aPixelRects[3].Top() - 1);
+aRBInternal.transform(aTransform);
+aRangesInternal.push_back(aRBInternal);
+
+std::unique_ptr 
pOverlayInternal(new sdr::overlay::OverlaySelection(
+sdr::overlay::OverlayType::NoFill,
+COL_WHITE,
+std::move(aRangesInternal),
+true, false));
+
 xOverlayManager->add(*pOverlay);
+xOverlayManager->add(*pOverlayInternal);
 mpOOCursors.reset(new sdr::overlay::OverlayObjectList);
 mpOOCursors->append(std::move(pOverlay));
+mpOOCursors->append(std::move(pOverlayInternal));
 }
 }
 }
@@ -6931,13 +6946,11 @@ void ScGridWindow::UpdateAutoFillOverlay()
 ScDocument& rDoc = mrViewData.GetDocument();
 bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
 
-   // tdf#143733 tdf#145080 - improve border visibility
-   // constants picked for maximum consistency at 100%
-   // size = 6 at 100% (as before), 50% = 4.5, 200% = 9, 400% = 15
-const float fScaleFactor = 3 * GetDPIScaleFactor();
-const double fZoom(3 * mrViewData.GetZoomX());
-// Size should be even
-Size aFillHandleSize(fZoom + fScaleFactor, fZoom + fScaleFactor);
+// tdf#162006 Ensures the AutoFill handle is visible at any zoom level
+// At 100% = Total Size 8 (2px for the external white line; 6px for the 
handle itself)
+const double fScaleFactor(2 + 2 * GetDPIScaleFactor());
+const double fZoom(2 + 2 * mrViewData.GetZoomX());
+Size aFillHandleSize(fScaleFactor + fZoom, fScaleFactor + fZoom);
 
 Point aFillPos = mrViewData.GetScrPos( nX, nY, eWhich, true );
 tools::Long nSizeXPix;
@@ -6981,26 +6994,47 @@ void ScGridWindow::UpdateAutoFillOverlay()
 }
 else if (xOverlayManager.is())
 {
+const basegfx::B2DHomMatrix 
aTransform(GetOutDev()->GetInverseViewTransformation());
+
+// Outer rectangle (always white for contrast)
+std::vector< basegfx::B2DRange > aRangesOuter;
+basegfx::B2DRange aRBOuter = 
vcl::unotools::b2DRectangleFromRectangle(aFillRect);
+aRBOuter.transform(aTransform);
+aRangesOuter.push_back(aRBOuter);
+

core.git: Branch 'libreoffice-24-8' - include/svx sc/source svx/source

2024-08-30 Thread Rafael Lima (via logerrit)
 include/svx/sdr/overlay/overlayselection.hxx |3 -
 sc/source/ui/view/gridwin.cxx|   70 ---
 svx/source/sdr/overlay/overlayselection.cxx  |   10 +++
 3 files changed, 62 insertions(+), 21 deletions(-)

New commits:
commit 0b5eedc5e98adcc9cff578a4a47a9d33adf7e579
Author: Rafael Lima 
AuthorDate: Thu Jul 11 22:11:15 2024 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Fri Aug 30 13:56:55 2024 +0200

tdf#162006 Use contrast outline for the AutoFill/Cursor handle as well

This patch draws a white line around the AutoFill handle for better 
contrast.

It also adds an internal white outline to the cursor overlay.

See bug ticket for screenshots.

Change-Id: I1567d272fd5a2835192c50973e84cb8c269fb04e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170354
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
(cherry picked from commit 1d1f47e6ca6367bf8fb828dd09cce197a96f643c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172565
Reviewed-by: Ilmari Lauhakangas 

diff --git a/include/svx/sdr/overlay/overlayselection.hxx 
b/include/svx/sdr/overlay/overlayselection.hxx
index b83322acbf61..a05de575e430 100644
--- a/include/svx/sdr/overlay/overlayselection.hxx
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -30,7 +30,8 @@ namespace sdr::overlay
 {
 Invert,
 Solid,
-Transparent
+Transparent,
+NoFill
 };
 
 class SVXCORE_DLLPUBLIC OverlaySelection final : public OverlayObject
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c79a6493f6c6..239b014cd5c9 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6241,8 +6241,8 @@ void ScGridWindow::ImpCreateOverlayObjects()
 {
 UpdateHighlightOverlay();
 UpdateSelectionOverlay();
-UpdateAutoFillOverlay();
 UpdateCursorOverlay();
+UpdateAutoFillOverlay();
 UpdateCopySourceOverlay();
 UpdateDragRectOverlay();
 UpdateHeaderOverlay();
@@ -6720,9 +6720,24 @@ void ScGridWindow::UpdateCursorOverlay()
 std::move(aRanges),
 false, false));
 
+// Internal white contrast rectangle
+std::vector< basegfx::B2DRange > aRangesInternal;
+basegfx::B2DRange aRBInternal(aPixelRects[0].Right(), 
aPixelRects[2].Bottom(),
+  aPixelRects[1].Left() - 1, 
aPixelRects[3].Top() - 1);
+aRBInternal.transform(aTransform);
+aRangesInternal.push_back(aRBInternal);
+
+std::unique_ptr 
pOverlayInternal(new sdr::overlay::OverlaySelection(
+sdr::overlay::OverlayType::NoFill,
+COL_WHITE,
+std::move(aRangesInternal),
+true, false));
+
 xOverlayManager->add(*pOverlay);
+xOverlayManager->add(*pOverlayInternal);
 mpOOCursors.reset(new sdr::overlay::OverlayObjectList);
 mpOOCursors->append(std::move(pOverlay));
+mpOOCursors->append(std::move(pOverlayInternal));
 }
 }
 }
@@ -6925,13 +6940,11 @@ void ScGridWindow::UpdateAutoFillOverlay()
 ScDocument& rDoc = mrViewData.GetDocument();
 bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
 
-   // tdf#143733 tdf#145080 - improve border visibility
-   // constants picked for maximum consistency at 100%
-   // size = 6 at 100% (as before), 50% = 4.5, 200% = 9, 400% = 15
-const float fScaleFactor = 3 * GetDPIScaleFactor();
-const double fZoom(3 * mrViewData.GetZoomX());
-// Size should be even
-Size aFillHandleSize(fZoom + fScaleFactor, fZoom + fScaleFactor);
+// tdf#162006 Ensures the AutoFill handle is visible at any zoom level
+// At 100% = Total Size 8 (2px for the external white line; 6px for the 
handle itself)
+const double fScaleFactor(2 + 2 * GetDPIScaleFactor());
+const double fZoom(2 + 2 * mrViewData.GetZoomX());
+Size aFillHandleSize(fScaleFactor + fZoom, fScaleFactor + fZoom);
 
 Point aFillPos = mrViewData.GetScrPos( nX, nY, eWhich, true );
 tools::Long nSizeXPix;
@@ -6970,26 +6983,47 @@ void ScGridWindow::UpdateAutoFillOverlay()
 }
 else if (xOverlayManager.is())
 {
+const basegfx::B2DHomMatrix 
aTransform(GetOutDev()->GetInverseViewTransformation());
+
+// Outer rectangle (always white for contrast)
+std::vector< basegfx::B2DRange > aRangesOuter;
+basegfx::B2DRange aRBOuter = 
vcl::unotools::b2DRectangleFromRectangle(aFillRect);
+aRBOuter.transform(aTransform);
+aRangesOuter.push_back(aRBOuter);
+
+std::unique_ptr pOverlayOuter(new 
sdr::overlay::OverlaySelection(
+sdr::overlay::OverlayType::Solid,
+COL_WHITE,
+std::move(aRangesOuter),
+false, false));
+
+  

core.git: Branch 'libreoffice-24-8' - sc/source

2024-08-29 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/gridwin.cxx |   21 +
 1 file changed, 5 insertions(+), 16 deletions(-)

New commits:
commit 6766aae5d0d615445eda55077c0e94514b4c25d4
Author: Rafael Lima 
AuthorDate: Thu Aug 22 16:26:55 2024 +0200
Commit: Xisco Fauli 
CommitDate: Thu Aug 29 10:00:51 2024 +0200

tdf#161709 Remove extra space between cursor and cell edges

Change-Id: Icfdb88928b0d9f076a3c6190c241825ef918d5a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172266
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Reviewed-by: Rafael Lima 
Tested-by: Heiko Tietze 
(cherry picked from commit 3b4a8406c2e7f4f6a7ac43e192fdb8ef266d4b6d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172566
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 1770a419f550..c79a6493f6c6 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6623,17 +6623,11 @@ void ScGridWindow::UpdateCursorOverlay()
 tools::Long nSizeYPix;
 mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
-// tdf#143733 Make cell outline wider than the cell
-const double fZoom(mrViewData.GetZoomX());
-const sal_uInt16 nAdjustBorder(2 + fZoom / 2);
-aScrPos.AdjustX(-nAdjustBorder);
-aScrPos.AdjustY(-nAdjustBorder);
-
 if (bLayoutRTL)
 aScrPos.AdjustX( -(nSizeXPix - 2) );   // move instead of 
mirroring
 
 // show the cursor as 4 (thin) rectangles
-tools::Rectangle aRect(aScrPos, Size(nSizeXPix + 2*nAdjustBorder, 
nSizeYPix + 2*nAdjustBorder));
+tools::Rectangle aRect(aScrPos, Size(nSizeXPix, nSizeYPix));
 
 float fScaleFactor = GetDPIScaleFactor();
 
@@ -6944,10 +6938,7 @@ void ScGridWindow::UpdateAutoFillOverlay()
 tools::Long nSizeYPix;
 mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
-// tdf#161234 Make AutoFill handle follow cell outline. This happens only 
when the
-// autofill handle is in the same cell as the outline. Note that 
nAdjustBorder needs
-// to be calculated the same way as in ScGridWindow::UpdateCursorOverlay()
-double nAdjustBorder(0);
+// Consider the case of merged cells to determine where to place the 
AutoFill handle
 SCCOL nX2 = mrViewData.GetCurX();
 SCCOL nY2 = mrViewData.GetCurY();
 const ScMergeAttr* pMerge = rDoc.GetAttr(nX2, nY2, nTab, ATTR_MERGE);
@@ -6956,15 +6947,13 @@ void ScGridWindow::UpdateAutoFillOverlay()
 nX2 += pMerge->GetColMerge() - 1;
 nY2 += pMerge->GetRowMerge() - 1;
 }
-if (nX == nX2 && nY == nY2)
-nAdjustBorder = std::round(2 + 
static_cast(mrViewData.GetZoomX()) / 2);
 
 if (bLayoutRTL && !comphelper::LibreOfficeKit::isActive())
-aFillPos.AdjustX( -(nSizeXPix + nAdjustBorder + 
(aFillHandleSize.Width() / 2)) );
+aFillPos.AdjustX( -(nSizeXPix + (aFillHandleSize.Width() / 2)) );
 else
-aFillPos.AdjustX(nSizeXPix + nAdjustBorder - (aFillHandleSize.Width() 
/ 2) );
+aFillPos.AdjustX(nSizeXPix - (aFillHandleSize.Width() / 2) );
 
-aFillPos.AdjustY(nSizeYPix + nAdjustBorder);
+aFillPos.AdjustY(nSizeYPix);
 aFillPos.AdjustY( -(aFillHandleSize.Height() / 2) );
 
 tools::Rectangle aFillRect(aFillPos, aFillHandleSize);


core.git: sc/source

2024-08-23 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/gridwin.cxx |   21 +
 1 file changed, 5 insertions(+), 16 deletions(-)

New commits:
commit 3b4a8406c2e7f4f6a7ac43e192fdb8ef266d4b6d
Author: Rafael Lima 
AuthorDate: Thu Aug 22 16:26:55 2024 +0200
Commit: Rafael Lima 
CommitDate: Fri Aug 23 15:21:00 2024 +0200

tdf#161709 Remove extra space between cursor and cell edges

Change-Id: Icfdb88928b0d9f076a3c6190c241825ef918d5a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172266
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Reviewed-by: Rafael Lima 
Tested-by: Heiko Tietze 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 34860443ca54..d7848230bf8e 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6636,17 +6636,11 @@ void ScGridWindow::UpdateCursorOverlay()
 tools::Long nSizeYPix;
 mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
-// tdf#143733 Make cell outline wider than the cell
-const double fZoom(mrViewData.GetZoomX());
-const sal_uInt16 nAdjustBorder(2 + fZoom / 2);
-aScrPos.AdjustX(-nAdjustBorder);
-aScrPos.AdjustY(-nAdjustBorder);
-
 if (bLayoutRTL)
 aScrPos.AdjustX( -(nSizeXPix - 2) );   // move instead of 
mirroring
 
 // show the cursor as 4 (thin) rectangles
-tools::Rectangle aRect(aScrPos, Size(nSizeXPix + 2*nAdjustBorder, 
nSizeYPix + 2*nAdjustBorder));
+tools::Rectangle aRect(aScrPos, Size(nSizeXPix, nSizeYPix));
 
 float fScaleFactor = GetDPIScaleFactor();
 
@@ -6970,10 +6964,7 @@ void ScGridWindow::UpdateAutoFillOverlay()
 tools::Long nSizeYPix;
 mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
-// tdf#161234 Make AutoFill handle follow cell outline. This happens only 
when the
-// autofill handle is in the same cell as the outline. Note that 
nAdjustBorder needs
-// to be calculated the same way as in ScGridWindow::UpdateCursorOverlay()
-double nAdjustBorder(0);
+// Consider the case of merged cells to determine where to place the 
AutoFill handle
 SCCOL nX2 = mrViewData.GetCurX();
 SCCOL nY2 = mrViewData.GetCurY();
 const ScMergeAttr* pMerge = rDoc.GetAttr(nX2, nY2, nTab, ATTR_MERGE);
@@ -6982,15 +6973,13 @@ void ScGridWindow::UpdateAutoFillOverlay()
 nX2 += pMerge->GetColMerge() - 1;
 nY2 += pMerge->GetRowMerge() - 1;
 }
-if (nX == nX2 && nY == nY2)
-nAdjustBorder = std::round(2 + 
static_cast(mrViewData.GetZoomX()) / 2);
 
 if (bLayoutRTL && !comphelper::LibreOfficeKit::isActive())
-aFillPos.AdjustX( -(nSizeXPix + nAdjustBorder + 
(aFillHandleSize.Width() / 2)) );
+aFillPos.AdjustX( -(nSizeXPix + (aFillHandleSize.Width() / 2)) );
 else
-aFillPos.AdjustX(nSizeXPix + nAdjustBorder - (aFillHandleSize.Width() 
/ 2) );
+aFillPos.AdjustX(nSizeXPix - (aFillHandleSize.Width() / 2) );
 
-aFillPos.AdjustY(nSizeYPix + nAdjustBorder);
+aFillPos.AdjustY(nSizeYPix);
 aFillPos.AdjustY( -(aFillHandleSize.Height() / 2) );
 
 tools::Rectangle aFillRect(aFillPos, aFillHandleSize);


core.git: Branch 'libreoffice-24-8' - sw/source

2024-08-10 Thread Rafael Lima (via logerrit)
 sw/source/uibase/docvw/PostItMgr.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 3e040de9d5bb9587613277015d77133b9e2e0791
Author: Rafael Lima 
AuthorDate: Fri Jul 26 20:49:24 2024 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Aug 10 10:08:06 2024 +0200

tdf#159146 Fix layout after resizing commend width in Writer

This patch ensure that resizing the comment sidebar will update the entire 
layout.

Change-Id: Ia3c805569525c558191b253d694ac1f2e99f2ace
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171039
Tested-by: Jenkins
Reviewed-by: Rafael Lima 
Reviewed-by: Heiko Tietze 
(cherry picked from commit ec5235ddfd62ca490d13fbc2c91e740a44f9950e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171540
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index afb2238c3a04..d68fc77c4940 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -2212,6 +2212,11 @@ void SwPostItMgr::SetSidebarWidth(Point aMousePos)
 comphelper::ConfigurationChanges::create());
 officecfg::Office::Writer::Notes::DisplayWidthFactor::set(nFactor, 
xChanges);
 xChanges->commit();
+
+// tdf#159146 After resizing the sidebar the layout and the ruler needs to 
be updated
+mpWrtShell->InvalidateLayout(true);
+mpView->GetHRuler().Invalidate();
+
 LayoutPostIts();
 }
 


core.git: sw/source

2024-08-05 Thread Rafael Lima (via logerrit)
 sw/source/uibase/docvw/PostItMgr.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit ec5235ddfd62ca490d13fbc2c91e740a44f9950e
Author: Rafael Lima 
AuthorDate: Fri Jul 26 20:49:24 2024 +0200
Commit: Rafael Lima 
CommitDate: Tue Aug 6 00:22:23 2024 +0200

tdf#159146 Fix layout after resizing commend width in Writer

This patch ensure that resizing the comment sidebar will update the entire 
layout.

Change-Id: Ia3c805569525c558191b253d694ac1f2e99f2ace
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171039
Tested-by: Jenkins
Reviewed-by: Rafael Lima 
Reviewed-by: Heiko Tietze 

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index a768bc2b63d0..26cebad5fe8e 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -2203,6 +2203,11 @@ void SwPostItMgr::SetSidebarWidth(Point aMousePos)
 comphelper::ConfigurationChanges::create());
 officecfg::Office::Writer::Notes::DisplayWidthFactor::set(nFactor, 
xChanges);
 xChanges->commit();
+
+// tdf#159146 After resizing the sidebar the layout and the ruler needs to 
be updated
+mpWrtShell->InvalidateLayout(true);
+mpView->GetHRuler().Invalidate();
+
 LayoutPostIts();
 }
 


core.git: Branch 'libreoffice-24-8' - vcl/qt5

2024-08-03 Thread Rafael Lima (via logerrit)
 vcl/qt5/QtWidget.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 25335198fb2c8138247225330b24865987693d2f
Author: Rafael Lima 
AuthorDate: Fri Aug 2 19:30:18 2024 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Aug 3 12:29:27 2024 +0200

tdf#162297 Wrap tooltips in Qt5

Acoording to the Qt documentation, in order to wrap the tooltip a rich-text 
style needs to be set.

This patch sets a dummy style to make sure the tooltip gets wrapped in LO.

Change-Id: I7e950932572030581abc1c81fb4c146cb4394eb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171411
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit fa89130d4980662642cb81a05ec044dbe21fd5d0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171412

diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx
index 5c860333793f..5f2a001e53c1 100644
--- a/vcl/qt5/QtWidget.cxx
+++ b/vcl/qt5/QtWidget.cxx
@@ -721,8 +721,13 @@ bool QtWidget::handleEvent(QtFrame& rFrame, QWidget& 
rWidget, QEvent* pEvent)
 // Otherwise Qt will continue handling ToolTip events from the 
"parent" window.
 const QtFrame* pPopupFrame = GetQtInstance()->activePopup();
 if (!rFrame.m_aTooltipText.isEmpty() && (!pPopupFrame || pPopupFrame 
== &rFrame))
-QToolTip::showText(QCursor::pos(), 
toQString(rFrame.m_aTooltipText), &rWidget,
-   rFrame.m_aTooltipArea);
+{
+// tdf#162297 Use a dummy style to ensure the tooltip is wrapped
+QString sTooltipText("");
+sTooltipText += toQString(rFrame.m_aTooltipText);
+sTooltipText += "";
+QToolTip::showText(QCursor::pos(), sTooltipText, &rWidget, 
rFrame.m_aTooltipArea);
+}
 else
 {
 QToolTip::hideText();


core.git: vcl/qt5

2024-08-02 Thread Rafael Lima (via logerrit)
 vcl/qt5/QtWidget.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit fa89130d4980662642cb81a05ec044dbe21fd5d0
Author: Rafael Lima 
AuthorDate: Fri Aug 2 19:30:18 2024 +0200
Commit: Michael Weghorn 
CommitDate: Sat Aug 3 08:32:03 2024 +0200

tdf#162297 Wrap tooltips in Qt5

Acoording to the Qt documentation, in order to wrap the tooltip a rich-text 
style needs to be set.

This patch sets a dummy style to make sure the tooltip gets wrapped in LO.

Change-Id: I7e950932572030581abc1c81fb4c146cb4394eb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171411
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx
index 5c860333793f..5f2a001e53c1 100644
--- a/vcl/qt5/QtWidget.cxx
+++ b/vcl/qt5/QtWidget.cxx
@@ -721,8 +721,13 @@ bool QtWidget::handleEvent(QtFrame& rFrame, QWidget& 
rWidget, QEvent* pEvent)
 // Otherwise Qt will continue handling ToolTip events from the 
"parent" window.
 const QtFrame* pPopupFrame = GetQtInstance()->activePopup();
 if (!rFrame.m_aTooltipText.isEmpty() && (!pPopupFrame || pPopupFrame 
== &rFrame))
-QToolTip::showText(QCursor::pos(), 
toQString(rFrame.m_aTooltipText), &rWidget,
-   rFrame.m_aTooltipArea);
+{
+// tdf#162297 Use a dummy style to ensure the tooltip is wrapped
+QString sTooltipText("");
+sTooltipText += toQString(rFrame.m_aTooltipText);
+sTooltipText += "";
+QToolTip::showText(QCursor::pos(), sTooltipText, &rWidget, 
rFrame.m_aTooltipArea);
+}
 else
 {
 QToolTip::hideText();


core.git: officecfg/registry svx/source

2024-07-22 Thread Rafael Lima (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |2 +-
 svx/source/tbxctrls/tbcontrl.cxx   |   10 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit a7de9cc5e89cd0d0c2f6363b2c0cc265c528b121
Author: Rafael Lima 
AuthorDate: Fri Jul 19 23:03:12 2024 +0200
Commit: Rafael Lima 
CommitDate: Tue Jul 23 01:55:43 2024 +0200

tdf#162104 Make sure the standard palette gets selected in a clear profile

Commit [1] introduced localization of color palette names. However, the 
name defined in Common.xcs is not localized, so we need to make sure that the 
standard palette gets selected on a clear profile.

[1] 5e45351c52584fb116d2cc54da969734e5effab9

Change-Id: I2f03b3ab4bdbb77327388a754e1fc6f9d7413ba7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170732
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index a6c5c6e631fe..01482b557274 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -3253,7 +3253,7 @@
 
   Name of selected palette
 
-standard
+Standard
   
   
 
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 718759e4168f..95631463bd21 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2119,7 +2119,15 @@ ColorWindow::ColorWindow(OUString  rCommand,
 for (const auto& rPalette : aPaletteList)
 mxPaletteListBox->append_text(rPalette);
 mxPaletteListBox->thaw();
-OUString aPaletteName( 
officecfg::Office::Common::UserColors::PaletteName::get() );
+
+// tdf#162104 If the current palette does not exist, select the equivalent 
to the localized "Standard" palette
+// This is required because the names are now localized and in Common.xcs 
the "Standard" (in English)
+// palette is selected by default
+OUString 
aPaletteName(officecfg::Office::Common::UserColors::PaletteName::get());
+auto it = std::find(aPaletteList.begin(), aPaletteList.end(), 
aPaletteName);
+if (it == aPaletteList.end())
+aPaletteName = SvxResId(RID_SVXSTR_COLOR_PALETTE_STANDARD);
+
 mxPaletteListBox->set_active_text(aPaletteName);
 const int nSelectedEntry(mxPaletteListBox->get_active());
 if (nSelectedEntry != -1)


core.git: vcl/source

2024-07-21 Thread Rafael Lima (via logerrit)
 vcl/source/control/imivctl.hxx  |4 ++
 vcl/source/control/imivctl1.cxx |   57 
 2 files changed, 56 insertions(+), 5 deletions(-)

New commits:
commit 180f0c1ec8e195043b5f4298737a219026a8b944
Author: Rafael Lima 
AuthorDate: Tue Jul 16 20:52:28 2024 +0200
Commit: Michael Weghorn 
CommitDate: Mon Jul 22 07:05:00 2024 +0200

tdf#161501 Improve visuals of selected entries in Vertical tabs

This patch improves the following in vertical tabs:
1) Selected entries are painted natively when possible
2) Entries are a bit taller
3) Text is now vertically centered (for items that are text-only)
4) In native controls a mark is drawn on the selected tab

Change-Id: I42a8e002130030d1484c4149b146258921436af9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170554
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index 9a46b6c1bbc1..8363149bf60e 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -70,6 +70,10 @@ namespace o3tl {
 #define VER_DIST_BMP_STRING 3
 //  width offset of highlight rectangle for Text
 #define LROFFS_TEXT 2
+// Vertical text padding when the item contains only text
+#define VERT_TEXT_PADDING   4
+// Width of the marker used for the selected tab (native controls only)
+#define TAB_MARK_WIDTH  3
 
 #define DEFAULT_MAX_VIRT_WIDTH  200
 #define DEFAULT_MAX_VIRT_HEIGHT 200
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 4d37fe8c085b..20aeb9839a6c 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -81,7 +81,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
 
aVisRectChangedIdle.SetInvokeHandler(LINK(this,SvxIconChoiceCtrl_Impl,VisRectChangedHdl));
 
 Clear( true );
-Size gridSize((nWinStyle & WB_DETAILS) ? 150 : 140, (nWinStyle & 
WB_DETAILS) ?  20 : 70);
+Size gridSize((nWinStyle & WB_DETAILS) ? 150 : 140, (nWinStyle & 
WB_DETAILS) ?  26 : 70);
 if(pView->GetDPIScaleFactor() > 1)
 {
   gridSize.setHeight( gridSize.Height() * ( pView->GetDPIScaleFactor()) );
@@ -990,7 +990,20 @@ void SvxIconChoiceCtrl_Impl::PaintItem(const 
tools::Rectangle& rRect,
 {
 if (eItem == IcnViewFieldType::Text)
 {
-rRenderContext.DrawText(rRect, pEntry->GetText(), nCurTextDrawFlags);
+if (nWinBits & WB_DETAILS)
+{
+// Vertically center text when the entry is text-only
+tools::Long nBoundingHeight(CalcBoundingHeight());
+tools::Long nStringHeight = 
GetItemSize(IcnViewFieldType::Text).Height();
+tools::Long nNewY = (nBoundingHeight - nStringHeight) / 2;
+Point aRectTL(rRect.TopLeft().getX(), rRect.TopLeft().getY() + 
nNewY);
+tools::Rectangle aTextRect(aRectTL, rRect.GetSize());
+rRenderContext.DrawText(aTextRect, pEntry->GetText(), 
nCurTextDrawFlags);
+}
+else
+{
+rRenderContext.DrawText(rRect, pEntry->GetText(), 
nCurTextDrawFlags);
+}
 }
 else
 {
@@ -1054,9 +1067,38 @@ void 
SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po
 
 PaintEmphasis(aTextRect, bSelected, rRenderContext);
 
+// Background of selected entry
+tools::Rectangle aFocusRect(CalcFocusRect(pEntry));
+bool bNativeSelection = 
rRenderContext.IsNativeControlSupported(ControlType::WindowBackground, 
ControlPart::Entire);
 if (bSelected)
-vcl::RenderTools::DrawSelectionBackground(rRenderContext, *pView, 
CalcFocusRect(pEntry),
-  bActiveSelection ? 1 : 2, 
false, false, false);
+{
+if (bNativeSelection)
+{
+ControlState nState = ControlState::ENABLED;
+ImplControlValue aControlValue(0);
+bNativeSelection = 
rRenderContext.DrawNativeControl(ControlType::WindowBackground, 
ControlPart::Entire,
+aFocusRect, 
nState, aControlValue, OUString());
+}
+
+if (bNativeSelection)
+{
+// If a native control was drawn, then draw a mark at the left 
side of the selected tab
+aFocusRect.setWidth(TAB_MARK_WIDTH);
+Color aOldFillColor(rRenderContext.GetFillColor());
+Color aOldLineColor(rRenderContext.GetLineColor());
+Color 
aAccentColor(rRenderContext.GetSettings().GetStyleSettings().GetAccentColor());
+rRenderContext.SetFillColor(aAccentColor);
+rRenderContext.SetLineColor(aAccentColor);
+rRenderContext.DrawRect(aFocusRect);
+rRenderContext.SetFillColor(aOldFillColor);
+rRenderContext.SetLineColor(aOldLineColor);
+}
+else
+{
+vcl::RenderTools::DrawSelec

core.git: include/svx sc/source svx/source

2024-07-18 Thread Rafael Lima (via logerrit)
 include/svx/sdr/overlay/overlayselection.hxx |3 -
 sc/source/ui/view/gridwin.cxx|   70 ---
 svx/source/sdr/overlay/overlayselection.cxx  |   10 +++
 3 files changed, 62 insertions(+), 21 deletions(-)

New commits:
commit 1d1f47e6ca6367bf8fb828dd09cce197a96f643c
Author: Rafael Lima 
AuthorDate: Thu Jul 11 22:11:15 2024 +0200
Commit: Rafael Lima 
CommitDate: Thu Jul 18 14:12:15 2024 +0200

tdf#162006 Use contrast outline for the AutoFill/Cursor handle as well

This patch draws a white line around the AutoFill handle for better 
contrast.

It also adds an internal white outline to the cursor overlay.

See bug ticket for screenshots.

Change-Id: I1567d272fd5a2835192c50973e84cb8c269fb04e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170354
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins

diff --git a/include/svx/sdr/overlay/overlayselection.hxx 
b/include/svx/sdr/overlay/overlayselection.hxx
index b83322acbf61..a05de575e430 100644
--- a/include/svx/sdr/overlay/overlayselection.hxx
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -30,7 +30,8 @@ namespace sdr::overlay
 {
 Invert,
 Solid,
-Transparent
+Transparent,
+NoFill
 };
 
 class SVXCORE_DLLPUBLIC OverlaySelection final : public OverlayObject
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 18ce21d2004a..44edfd493736 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6246,8 +6246,8 @@ void ScGridWindow::ImpCreateOverlayObjects()
 {
 UpdateHighlightOverlay();
 UpdateSelectionOverlay();
-UpdateAutoFillOverlay();
 UpdateCursorOverlay();
+UpdateAutoFillOverlay();
 UpdateCopySourceOverlay();
 UpdateDragRectOverlay();
 UpdateHeaderOverlay();
@@ -6731,9 +6731,24 @@ void ScGridWindow::UpdateCursorOverlay()
 std::move(aRanges),
 false, false));
 
+// Internal white contrast rectangle
+std::vector< basegfx::B2DRange > aRangesInternal;
+basegfx::B2DRange aRBInternal(aPixelRects[0].Right(), 
aPixelRects[2].Bottom(),
+  aPixelRects[1].Left() - 1, 
aPixelRects[3].Top() - 1);
+aRBInternal.transform(aTransform);
+aRangesInternal.push_back(aRBInternal);
+
+std::unique_ptr 
pOverlayInternal(new sdr::overlay::OverlaySelection(
+sdr::overlay::OverlayType::NoFill,
+COL_WHITE,
+std::move(aRangesInternal),
+true, false));
+
 xOverlayManager->add(*pOverlay);
+xOverlayManager->add(*pOverlayInternal);
 mpOOCursors.reset(new sdr::overlay::OverlayObjectList);
 mpOOCursors->append(std::move(pOverlay));
+mpOOCursors->append(std::move(pOverlayInternal));
 }
 }
 }
@@ -6936,13 +6951,11 @@ void ScGridWindow::UpdateAutoFillOverlay()
 ScDocument& rDoc = mrViewData.GetDocument();
 bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
 
-   // tdf#143733 tdf#145080 - improve border visibility
-   // constants picked for maximum consistency at 100%
-   // size = 6 at 100% (as before), 50% = 4.5, 200% = 9, 400% = 15
-const float fScaleFactor = 3 * GetDPIScaleFactor();
-const double fZoom(3 * mrViewData.GetZoomX());
-// Size should be even
-Size aFillHandleSize(fZoom + fScaleFactor, fZoom + fScaleFactor);
+// tdf#162006 Ensures the AutoFill handle is visible at any zoom level
+// At 100% = Total Size 8 (2px for the external white line; 6px for the 
handle itself)
+const double fScaleFactor(2 + 2 * GetDPIScaleFactor());
+const double fZoom(2 + 2 * mrViewData.GetZoomX());
+Size aFillHandleSize(fScaleFactor + fZoom, fScaleFactor + fZoom);
 
 Point aFillPos = mrViewData.GetScrPos( nX, nY, eWhich, true );
 tools::Long nSizeXPix;
@@ -6986,26 +6999,47 @@ void ScGridWindow::UpdateAutoFillOverlay()
 }
 else if (xOverlayManager.is())
 {
+const basegfx::B2DHomMatrix 
aTransform(GetOutDev()->GetInverseViewTransformation());
+
+// Outer rectangle (always white for contrast)
+std::vector< basegfx::B2DRange > aRangesOuter;
+basegfx::B2DRange aRBOuter = 
vcl::unotools::b2DRectangleFromRectangle(aFillRect);
+aRBOuter.transform(aTransform);
+aRangesOuter.push_back(aRBOuter);
+
+std::unique_ptr pOverlayOuter(new 
sdr::overlay::OverlaySelection(
+sdr::overlay::OverlayType::Solid,
+COL_WHITE,
+std::move(aRangesOuter),
+false, false));
+
+// Inner rectangle
+std::vector< basegfx::B2DRange > aRangesInner;
+tools::Rectangle aRectInner(aFillRect);
+aRectInner.AdjustTop(1);
+aRectInner.A

core.git: sfx2/source

2024-07-15 Thread Rafael Lima (via logerrit)
 sfx2/source/sidebar/FocusManager.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 6113d5dc45232b602bee0e68cf7560d0b8656546
Author: Rafael Lima 
AuthorDate: Thu Jun 27 22:59:47 2024 +0200
Commit: Rafael Lima 
CommitDate: Mon Jul 15 20:57:43 2024 +0200

tdf#161782 Focus document when Esc is pressed in the Gallery/Navigator

When Esc is pressed on a Panel that has no visible title, move focus to the 
document.

Change-Id: Ib5571dbd9f8a37017e21d2e01e7b546eb2330751
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169668
Reviewed-by: Jim Raykowski 
Reviewed-by: Rafael Lima 
Tested-by: Jenkins

diff --git a/sfx2/source/sidebar/FocusManager.cxx 
b/sfx2/source/sidebar/FocusManager.cxx
index e86de2b7de6a..806ac3d3a823 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -298,10 +298,12 @@ bool FocusManager::HandleKeyEvent(
 }
 case PC_PanelContent:
 // Return focus to tab bar sidebar settings button or 
panel title.
-if (!IsDeckTitleVisible() && maPanels.size() == 1)
+if ((!IsDeckTitleVisible() && maPanels.size() == 1) ||
+
(!maPanels[aLocation.mnIndex]->GetTitleBar()->GetVisible()))
 FocusButton(0);
 else
 FocusPanel(aLocation.mnIndex, true);
+
 bConsumed = true;
 break;
 default:


core.git: Branch 'libreoffice-24-8' - sc/source

2024-07-14 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/gridwin.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7958f5b111954632ca2792a0c3d18d79de5397c6
Author: Rafael Lima 
AuthorDate: Wed Jul 10 19:29:52 2024 +0200
Commit: Xisco Fauli 
CommitDate: Sun Jul 14 23:56:32 2024 +0200

tdf#161785 Fix order overlays are repainted

Prior to this patch, the selection overlay was painted above the cursor 
when scrolling/resizing the window. This patch reorders it so that the 
selection overlay is always below the cursor.

Change-Id: I5a9a66eeb6285b4a9b8954a44189ddcb6039d155
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170299
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Tested-by: Heiko Tietze 
(cherry picked from commit 2f113fe5b2aeb2b9ca7866d88c31c0cc09889e2a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170359
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b1f3a3168792..1770a419f550 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6239,11 +6239,11 @@ void ScGridWindow::CursorChanged()
 
 void ScGridWindow::ImpCreateOverlayObjects()
 {
-UpdateCursorOverlay();
-UpdateCopySourceOverlay();
-UpdateSelectionOverlay();
 UpdateHighlightOverlay();
+UpdateSelectionOverlay();
 UpdateAutoFillOverlay();
+UpdateCursorOverlay();
+UpdateCopySourceOverlay();
 UpdateDragRectOverlay();
 UpdateHeaderOverlay();
 UpdateShrinkOverlay();


core.git: sc/source

2024-07-12 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/gridwin.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2f113fe5b2aeb2b9ca7866d88c31c0cc09889e2a
Author: Rafael Lima 
AuthorDate: Wed Jul 10 19:29:52 2024 +0200
Commit: Rafael Lima 
CommitDate: Fri Jul 12 14:47:42 2024 +0200

tdf#161785 Fix order overlays are repainted

Prior to this patch, the selection overlay was painted above the cursor 
when scrolling/resizing the window. This patch reorders it so that the 
selection overlay is always below the cursor.

Change-Id: I5a9a66eeb6285b4a9b8954a44189ddcb6039d155
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170299
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Tested-by: Heiko Tietze 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 0c38afb4f9f8..c83c320e7f9f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6240,11 +6240,11 @@ void ScGridWindow::CursorChanged()
 
 void ScGridWindow::ImpCreateOverlayObjects()
 {
-UpdateCursorOverlay();
-UpdateCopySourceOverlay();
-UpdateSelectionOverlay();
 UpdateHighlightOverlay();
+UpdateSelectionOverlay();
 UpdateAutoFillOverlay();
+UpdateCursorOverlay();
+UpdateCopySourceOverlay();
 UpdateDragRectOverlay();
 UpdateHeaderOverlay();
 UpdateShrinkOverlay();


core.git: sc/source

2024-07-10 Thread Rafael Lima (via logerrit)
 sc/source/ui/inc/gridwin.hxx   |1 +
 sc/source/ui/view/gridwin4.cxx |7 +++
 2 files changed, 8 insertions(+)

New commits:
commit f6c017fe3c62dae2aa2980b4e105d872a70e4024
Author: Rafael Lima 
AuthorDate: Wed May 29 14:59:19 2024 +0200
Commit: Rafael Lima 
CommitDate: Wed Jul 10 19:28:17 2024 +0200

tdf#159348 Update Highlight Overlay when window is resized

When the window is not maximized, the highlight overlay outside the current 
view is not painted when the window is resized. This patch fixes this issue by 
repainting the overlay when the window is resized.

Change-Id: I4ad35dcdabc0c95fd24c52a7b9cf7bc6f2583c1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168192
Tested-by: Jenkins
Reviewed-by: Rafael Lima 

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index ac5c81700f20..76cbe56f4c4e 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -439,6 +439,7 @@ public:
 using Window::Draw;
 voidDraw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
   ScUpdateMode eMode );
+void Resize() override;
 
 /// Draw content of the gridwindow; shared between the desktop and the 
tiled rendering.
 void DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableInfo, 
ScOutputData& aOutputData, bool bLogicText);
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 166056d914d8..b329e897d87c 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -438,6 +438,13 @@ void ScGridWindow::Paint( vcl::RenderContext& 
/*rRenderContext*/, const tools::R
 bIsInPaint = false;
 }
 
+void ScGridWindow::Resize()
+{
+// tdf#159348 update highlight overlay when window is resized
+if 
(officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get())
+UpdateHighlightOverlay();
+}
+
 void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, 
ScUpdateMode eMode )
 {
 ScDocument& rDoc = mrViewData.GetDocument();


core.git: Branch 'libreoffice-24-8' - svx/source

2024-07-10 Thread Rafael Lima (via logerrit)
 svx/source/sdr/overlay/overlayselection.cxx |   41 +---
 1 file changed, 20 insertions(+), 21 deletions(-)

New commits:
commit 84af307af8bebfc81d4173d4574c3b72efd4c253
Author: Rafael Lima 
AuthorDate: Thu Jun 27 21:28:18 2024 +0200
Commit: Rafael Lima 
CommitDate: Wed Jul 10 19:11:50 2024 +0200

tdf#161817 Fix Autofill overlay when zoom is low

Prior to this patch, the calculation of the offset to draw the outline was 
incorrect, which caused the two lines of the outline to overlap.

This patch fixes this issue and makes the outline work at any zoom level.

Change-Id: I95d0b240a53beda872cdf6f0e7d75b48966217d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169665
Reviewed-by: Rafael Lima 
Tested-by: Jenkins
(cherry picked from commit 7383298e141dcc3df23c8c849513b7782b0785e2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170113

diff --git a/svx/source/sdr/overlay/overlayselection.cxx 
b/svx/source/sdr/overlay/overlayselection.cxx
index bd00e8a7f5df..78a1421943d5 100644
--- a/svx/source/sdr/overlay/overlayselection.cxx
+++ b/svx/source/sdr/overlay/overlayselection.cxx
@@ -33,30 +33,22 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace sdr::overlay
 {
 
 // combine ranges geometrically to a single, ORed polygon
-static basegfx::B2DPolyPolygon impCombineRangesToPolyPolygon(const 
std::vector< basegfx::B2DRange >& rRanges, bool bOffset)
+static basegfx::B2DPolyPolygon impCombineRangesToPolyPolygon(const 
std::vector< basegfx::B2DRange >& rRanges, bool bOffset, double fOffset)
 {
-// Determines the offset in twips.
-// The offset is only needed if the contrast outline is drawn
-sal_Int32 nOffset(0);
-if (bOffset)
-{
-Size aSize(1, 1);
-aSize = o3tl::convert(aSize, o3tl::Length::px, 
o3tl::Length::twip);
-nOffset = aSize.getWidth();
-}
-
 const sal_uInt32 nCount(rRanges.size());
 basegfx::B2DPolyPolygon aRetval;
 
 for(sal_uInt32 a(0); a < nCount; a++)
 {
 basegfx::B2DRange aRange(rRanges[a]);
-aRange.grow(nOffset);
+if (bOffset)
+aRange.grow(fOffset);
 const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(aRange));
 
 if(0 == a)
@@ -172,15 +164,7 @@ namespace sdr::overlay
 
 if(mbBorder)
 {
-// External outline using themed color
-basegfx::B2DPolyPolygon 
aPolyPolygon(impCombineRangesToPolyPolygon(getRanges(), mbContrastOutline));
-const drawinglayer::primitive2d::Primitive2DReference 
aSelectionOutline(
-new 
drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
-std::move(aPolyPolygon),
-aRGBColor));
-
-// add both to result
-aRetval = 
drawinglayer::primitive2d::Primitive2DContainer {aUnifiedTransparence, 
aSelectionOutline};
+aRetval = 
drawinglayer::primitive2d::Primitive2DContainer {aUnifiedTransparence};
 
 // tdf#161204 Outline with white color to provide 
contrast
 if (mbContrastOutline)
@@ -192,6 +176,21 @@ namespace sdr::overlay
 basegfx::BColor(1.0, 1.0, 1.0)));
 
aRetval.append(drawinglayer::primitive2d::Primitive2DContainer{aContrastSelectionOutline});
 }
+
+// Offset to be applied to the external outline
+double fOffset(0);
+if (getOverlayManager())
+fOffset = 
getOverlayManager()->getOutputDevice().PixelToLogic(Size(1, 1)).getWidth();
+
+// External outline using themed color
+basegfx::B2DPolyPolygon 
aPolyPolygon(impCombineRangesToPolyPolygon(getRanges(), mbContrastOutline, 
fOffset));
+const drawinglayer::primitive2d::Primitive2DReference 
aSelectionOutline(
+new 
drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
+std::move(aPolyPolygon),
+aRGBColor));
+
+// Add to result
+
aRetval.append(drawinglayer::primitive2d::Primitive2DContainer 
{aSelectionOutline});
 }
 else
 {


core.git: Branch 'libreoffice-24-8' - sc/source

2024-07-10 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/gridwin.cxx |   43 +++---
 1 file changed, 32 insertions(+), 11 deletions(-)

New commits:
commit 027cbc70f446af91c982c98474027f36ec554e8a
Author: Rafael Lima 
AuthorDate: Tue Jun 25 22:31:38 2024 +0200
Commit: Rafael Lima 
CommitDate: Wed Jul 10 19:11:32 2024 +0200

tdf#161709 Make selection rectangle symmetric at any zoom level

The previous method to calculate the rectangles used to draw the cursor did 
not play well with fractional numbers, making them look asymmetrical at some 
zoom levels.

This patch makes sure that the cursor is symetrical at any zoom level.

Change-Id: I196177e6722772db3a8c8ad343e35c148e4772a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169546
Reviewed-by: Rafael Lima 
Tested-by: Jenkins
(cherry picked from commit 81f2185c111b7d8154a2de128d490a0a9e822f19)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170114

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 9c9ed3f474ae..b1f3a3168792 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6624,7 +6624,8 @@ void ScGridWindow::UpdateCursorOverlay()
 mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
 // tdf#143733 Make cell outline wider than the cell
-const double nAdjustBorder(2 + mrViewData.GetZoomX());
+const double fZoom(mrViewData.GetZoomX());
+const sal_uInt16 nAdjustBorder(2 + fZoom / 2);
 aScrPos.AdjustX(-nAdjustBorder);
 aScrPos.AdjustY(-nAdjustBorder);
 
@@ -6689,15 +6690,35 @@ void ScGridWindow::UpdateCursorOverlay()
 // tdf#143733, tdf#145080 - improve border visibility
 // constants picked for maximum consistency at 100% and 
adequate response on zoom
 // line width = 1.5 at 100% (0.75 left +/- 0.75 right), 50% = 
1, 200% = 1.25, 400% = 2.25
-const double MinSize = 0.25 * GetDPIScaleFactor();
-double fZoom(mrViewData.GetZoomX() * 0.5);
-for(const tools::Rectangle & rRA : aPixelRects)
-{
-basegfx::B2DRange aRB(rRA.Left() - MinSize - fZoom, 
rRA.Top() - MinSize - fZoom,
-  rRA.Right() + MinSize + fZoom, 
rRA.Bottom() + MinSize + fZoom);
-aRB.transform(aTransform);
-aRanges.push_back(aRB);
-}
+const double fCurZoom(mrViewData.GetZoomX());
+const double fMinSize = 0.25 * GetDPIScaleFactor();
+const double fAdjust(fMinSize + mrViewData.GetZoomX() * 0.5);
+int nAdjustPixel(o3tl::convert(fAdjust, o3tl::Length::pt, 
o3tl::Length::px));
+// If zoom level is 50% or greater the rectangles must be at 
least 1 pixel thick
+if (fCurZoom >= 0.5)
+nAdjustPixel = std::max(1, nAdjustPixel);
+
+// Below each rectangle is adjusted so that they have 
thickness of nAdjustPixel
+// Left rectangle
+basegfx::B2DRange aRBLeft(aPixelRects[0].Left() - 
nAdjustPixel, aPixelRects[0].Top() - nAdjustPixel,
+  aPixelRects[0].Right(), 
aPixelRects[0].Bottom() + nAdjustPixel);
+aRBLeft.transform(aTransform);
+aRanges.push_back(aRBLeft);
+// Right rectangle
+basegfx::B2DRange aRBRight(aPixelRects[1].Left(), 
aPixelRects[1].Top() - nAdjustPixel,
+   aPixelRects[1].Right() + 
nAdjustPixel, aPixelRects[1].Bottom() + nAdjustPixel);
+aRBRight.transform(aTransform);
+aRanges.push_back(aRBRight);
+// Top rectangle
+basegfx::B2DRange aRBTop(aPixelRects[2].Left() - nAdjustPixel, 
aPixelRects[2].Top() - nAdjustPixel,
+ aPixelRects[2].Right() + 
nAdjustPixel, aPixelRects[2].Bottom());
+aRBTop.transform(aTransform);
+aRanges.push_back(aRBTop);
+// Bottom rectangle
+basegfx::B2DRange aRBBottom(aPixelRects[3].Left() - 
nAdjustPixel, aPixelRects[3].Top(),
+aPixelRects[3].Right() + 
nAdjustPixel, aPixelRects[3].Bottom() + nAdjustPixel);
+aRBBottom.transform(aTransform);
+aRanges.push_back(aRBBottom);
 
 std::unique_ptr pOverlay(new 
sdr::overlay::OverlaySelection(
 sdr::overlay::OverlayType::Solid,
@@ -6936,7 +6957,7 @@ void ScGridWindow::UpdateAutoFillOverlay()
 nY2 += pMerge->GetRowMerge() - 1;
 }
 if (nX == nX2 && nY == nY2)
-nAdjustBorder = 2 + static_cast(mrViewData.GetZoomX());
+nAdjustBorder = std::round(2 + 
static_cast(mrViewData.GetZoomX()) / 2);
 
   

core.git: Branch 'libreoffice-24-8' - include/svx sc/source svx/source

2024-06-25 Thread Rafael Lima (via logerrit)
 include/svx/sdr/overlay/overlayselection.hxx |4 +-
 sc/source/ui/view/gridwin.cxx|   16 -
 svx/source/sdr/overlay/overlayselection.cxx  |   44 ---
 3 files changed, 38 insertions(+), 26 deletions(-)

New commits:
commit ef744cd5719335e9f98fbc0996c6bb32d072475e
Author: Rafael Lima 
AuthorDate: Thu Jun 20 19:48:19 2024 +0200
Commit: Rafael Lima 
CommitDate: Tue Jun 25 22:49:15 2024 +0200

tdf#161658 Limit new selection overlay to Calc only

Previous patches [1] and [2] introduced a contrast white line to the 
selection overlay that was supposed to affect only Calc, but it ended up 
affecting other areas of LO, such as the star math editor as well as Writer.

This patch makes sure the changes only affect cell selection in Calc.

[1] dc243f0122ba656d2630e93bebfb84a2bfe4042a
[2] 3c0db898092c2cf6148c01f6c561acc199d484f5

Change-Id: Ie910120e4b71c55ad8c00a905e1204e291a711f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169292
Reviewed-by: Rafael Lima 
Tested-by: Jenkins
(cherry picked from commit c3e80cbaaa62d1150860cc5281dfc784dbbde8af)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169440

diff --git a/include/svx/sdr/overlay/overlayselection.hxx 
b/include/svx/sdr/overlay/overlayselection.hxx
index d456ac6bf11b..b83322acbf61 100644
--- a/include/svx/sdr/overlay/overlayselection.hxx
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -48,6 +48,7 @@ namespace sdr::overlay
 sal_uInt16  mnLastTransparence;
 
 boolmbBorder : 1;
+boolmbContrastOutline : 1;
 
 // geometry creation for OverlayObject, can use local *Last* values
 virtual drawinglayer::primitive2d::Primitive2DContainer 
createOverlayObjectPrimitive2DSequence() override;
@@ -57,7 +58,8 @@ namespace sdr::overlay
 OverlayType eType,
 const Color& rColor,
 std::vector< basegfx::B2DRange >&& rRanges,
-bool bBorder);
+bool bBorder,
+bool bContrastOutline = false);
 virtual ~OverlaySelection() override;
 
 // data read access
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5d298458cb75..9c9ed3f474ae 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6703,7 +6703,7 @@ void ScGridWindow::UpdateCursorOverlay()
 sdr::overlay::OverlayType::Solid,
 aCursorColor,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOCursors.reset(new sdr::overlay::OverlayObjectList);
@@ -6792,7 +6792,7 @@ void ScGridWindow::UpdateSelectionOverlay()
 sdr::overlay::OverlayType::Transparent,
 aHighlight,
 std::move(aRanges),
-true));
+true, true));
 
 xOverlayManager->add(*pOverlay);
 mpOOSelection.reset(new sdr::overlay::OverlayObjectList);
@@ -6861,7 +6861,7 @@ void ScGridWindow::UpdateHighlightOverlay()
 sdr::overlay::OverlayType::Transparent,
 aHighlightColor,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOHighlight.reset(new sdr::overlay::OverlayObjectList);
@@ -6975,7 +6975,7 @@ void ScGridWindow::UpdateAutoFillOverlay()
 sdr::overlay::OverlayType::Solid,
 aHandleColor,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOAutoFill.reset(new sdr::overlay::OverlayObjectList);
@@ -7121,7 +7121,7 @@ void ScGridWindow::UpdateDragRectOverlay()
 sdr::overlay::OverlayType::Invert,
 COL_BLACK,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOODragRect.reset(new sdr::overlay::OverlayObjectList);
@@ -7197,7 +7197,7 @@ void ScGridWindow::UpdateHeaderOverlay()
 sdr::overlay::OverlayType::Invert,
 COL_BLACK,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOHeader.reset(new sdr::overlay::OverlayObjectList);
@@ -7267,7 +7267,7 @@ void ScGridWindow::UpdateShrinkOverlay()
 sdr::overlay::OverlayType::Invert,
 COL_BLACK,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOShrink.reset(new sdr::overlay:

core.git: include/svx sc/source svx/source

2024-06-22 Thread Rafael Lima (via logerrit)
 include/svx/sdr/overlay/overlayselection.hxx |4 +-
 sc/source/ui/view/gridwin.cxx|   16 -
 svx/source/sdr/overlay/overlayselection.cxx  |   44 ---
 3 files changed, 38 insertions(+), 26 deletions(-)

New commits:
commit c3e80cbaaa62d1150860cc5281dfc784dbbde8af
Author: Rafael Lima 
AuthorDate: Thu Jun 20 19:48:19 2024 +0200
Commit: Rafael Lima 
CommitDate: Sat Jun 22 14:38:54 2024 +0200

tdf#161658 Limit new selection overlay to Calc only

Previous patches [1] and [2] introduced a contrast white line to the 
selection overlay that was supposed to affect only Calc, but it ended up 
affecting other areas of LO, such as the star math editor as well as Writer.

This patch makes sure the changes only affect cell selection in Calc.

[1] dc243f0122ba656d2630e93bebfb84a2bfe4042a
[2] 3c0db898092c2cf6148c01f6c561acc199d484f5

Change-Id: Ie910120e4b71c55ad8c00a905e1204e291a711f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169292
Reviewed-by: Rafael Lima 
Tested-by: Jenkins

diff --git a/include/svx/sdr/overlay/overlayselection.hxx 
b/include/svx/sdr/overlay/overlayselection.hxx
index d456ac6bf11b..b83322acbf61 100644
--- a/include/svx/sdr/overlay/overlayselection.hxx
+++ b/include/svx/sdr/overlay/overlayselection.hxx
@@ -48,6 +48,7 @@ namespace sdr::overlay
 sal_uInt16  mnLastTransparence;
 
 boolmbBorder : 1;
+boolmbContrastOutline : 1;
 
 // geometry creation for OverlayObject, can use local *Last* values
 virtual drawinglayer::primitive2d::Primitive2DContainer 
createOverlayObjectPrimitive2DSequence() override;
@@ -57,7 +58,8 @@ namespace sdr::overlay
 OverlayType eType,
 const Color& rColor,
 std::vector< basegfx::B2DRange >&& rRanges,
-bool bBorder);
+bool bBorder,
+bool bContrastOutline = false);
 virtual ~OverlaySelection() override;
 
 // data read access
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index ee06a5aa4835..1eed1390d9d4 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6701,7 +6701,7 @@ void ScGridWindow::UpdateCursorOverlay()
 sdr::overlay::OverlayType::Solid,
 aCursorColor,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOCursors.reset(new sdr::overlay::OverlayObjectList);
@@ -6790,7 +6790,7 @@ void ScGridWindow::UpdateSelectionOverlay()
 sdr::overlay::OverlayType::Transparent,
 aHighlight,
 std::move(aRanges),
-true));
+true, true));
 
 xOverlayManager->add(*pOverlay);
 mpOOSelection.reset(new sdr::overlay::OverlayObjectList);
@@ -6859,7 +6859,7 @@ void ScGridWindow::UpdateHighlightOverlay()
 sdr::overlay::OverlayType::Transparent,
 aHighlightColor,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOHighlight.reset(new sdr::overlay::OverlayObjectList);
@@ -6973,7 +6973,7 @@ void ScGridWindow::UpdateAutoFillOverlay()
 sdr::overlay::OverlayType::Solid,
 aHandleColor,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOAutoFill.reset(new sdr::overlay::OverlayObjectList);
@@ -7119,7 +7119,7 @@ void ScGridWindow::UpdateDragRectOverlay()
 sdr::overlay::OverlayType::Invert,
 COL_BLACK,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOODragRect.reset(new sdr::overlay::OverlayObjectList);
@@ -7195,7 +7195,7 @@ void ScGridWindow::UpdateHeaderOverlay()
 sdr::overlay::OverlayType::Invert,
 COL_BLACK,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOHeader.reset(new sdr::overlay::OverlayObjectList);
@@ -7265,7 +7265,7 @@ void ScGridWindow::UpdateShrinkOverlay()
 sdr::overlay::OverlayType::Invert,
 COL_BLACK,
 std::move(aRanges),
-false));
+false, false));
 
 xOverlayManager->add(*pOverlay);
 mpOOShrink.reset(new sdr::overlay::OverlayObjectList);
@@ -7330,7 +7330,7 @@ void ScGridWindow::UpdateSparklineGroupOverlay()
 
 std::unique_ptr pOverlay(n

core.git: Branch 'libreoffice-24-8' - sc/inc sc/source

2024-06-14 Thread Rafael Lima (via logerrit)
 sc/inc/document.hxx|   21 ++---
 sc/source/ui/miscdlgs/solvrdlg.cxx |   24 +++-
 2 files changed, 41 insertions(+), 4 deletions(-)

New commits:
commit 9895b2ef7bddb87ed597002361cde7d27a91d8de
Author: Rafael Lima 
AuthorDate: Tue Jun 11 11:19:40 2024 -0300
Commit: Xisco Fauli 
CommitDate: Fri Jun 14 09:02:32 2024 +0200

tdf#161462 Remember Goal Seek settings

Each time the user opens the Goal Seek dialogs, all settings are reset. 
This patch makes these settings be remembered during the same session.

Change-Id: I60a121b4001f4666ee25ab807fdc3860cf798296
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168683
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
(cherry picked from commit daedc81fa22690ce1a08b477a52360f05e4f5ed9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168725
Reviewed-by: Xisco Fauli 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 4dbce67d2928..cc714491e6d9 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -319,6 +319,15 @@ enum ScMutationGuardFlags
 CORE = 0x0001, /// Core calc data structures should not be mutated
 };
 
+// Stores settings used in the Goal Seek
+struct ScGoalSeekSettings
+{
+bool bDefined = false;
+ScAddress aFormulaCell;
+ScAddress aVariableCell;
+OUString sTargetValue;
+};
+
 typedef std::unique_ptr> 
ScTableUniquePtr;
 
 class ScDocument
@@ -453,6 +462,9 @@ private:
 
 css::uno::Reference< css::script::vba::XVBAEventProcessor >
 mxVbaEvents;
+
+// Stores Goal Seek settings
+ScGoalSeekSettings maGoalSeekSettings;
 public:
 /// list of ScInterpreterTableOpParams currently in use
 std::vector m_TableOpList;
@@ -1967,9 +1979,12 @@ public:
 voidGetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
   SCCOL& rCol, SCROW& rRow );
 
-boolSolver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
-SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
-const OUString& sValStr, double& nX);
+// Goal Seek solver
+bool   Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
+   SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
+   const OUString& sValStr, double& nX);
+ScGoalSeekSettings GetGoalSeekSettings() { return maGoalSeekSettings; }
+void   SetGoalSeekSettings(ScGoalSeekSettings aNewSettings) { 
maGoalSeekSettings = aNewSettings; }
 
 SC_DLLPUBLIC void   ApplySelectionPattern( const ScPatternAttr& 
rAttr, const ScMarkData& rMark,
ScEditDataArray* 
pDataArray = nullptr, bool* pIsChanged = nullptr );
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx 
b/sc/source/ui/miscdlgs/solvrdlg.cxx
index 824f4bfad752..4f1b38f1f857 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -95,7 +95,21 @@ void ScSolverDlg::Init()
 
 OUString aStr(theFormulaCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
 
-m_xEdFormulaCell->SetText( aStr );
+// If Goal Seek settings are stored in the document, restore them
+ScGoalSeekSettings aSettings = pDoc->GetGoalSeekSettings();
+if (aSettings.bDefined)
+{
+OUString 
sFormulaString(aSettings.aFormulaCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
+OUString 
sVariableString(aSettings.aVariableCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
+m_xEdFormulaCell->SetText(sFormulaString);
+m_xEdVariableCell->SetText(sVariableString);
+m_xEdTargetVal->set_text(aSettings.sTargetValue);
+}
+else
+{
+m_xEdFormulaCell->SetText( aStr );
+}
+
 m_xEdFormulaCell->GrabFocus();
 m_pEdActive = m_xEdFormulaCell.get();
 }
@@ -201,6 +215,14 @@ IMPL_LINK(ScSolverDlg, BtnHdl, weld::Button&, rBtn, void)
 ScRefFlags  nRes1 = theFormulaCell .Parse( 
m_xEdFormulaCell->GetText(),  *pDoc, eConv );
 ScRefFlags  nRes2 = theVariableCell.Parse( 
m_xEdVariableCell->GetText(), *pDoc, eConv );
 
+// Remember Goal Seek settings for the next time the dialog opens
+ScGoalSeekSettings aSettings;
+aSettings.bDefined = true;
+aSettings.aFormulaCell = theFormulaCell;
+aSettings.aVariableCell = theVariableCell;
+aSettings.sTargetValue = theTargetValStr;
+pDoc->SetGoalSeekSettings(aSettings);
+
 if ( (nRes1 & ScRefFlags::VALID) == ScRefFlags::VALID )
 {
 if ( (nRes2 & ScRefFlags::VALID) == ScRefFlags::VALID )


core.git: Branch 'libreoffice-24-8' - sc/source

2024-06-13 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/viewfun2.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 01f92e1ed22cb23b60052964a7203801393e5acf
Author: Rafael Lima 
AuthorDate: Fri Jun 7 20:20:59 2024 +0200
Commit: Xisco Fauli 
CommitDate: Thu Jun 13 10:38:04 2024 +0200

tdf#161338 Do not change variable cell when Goal Seek fails

When Goal Seek fails, N/A error is inserted in the cell even if the user 
chooses No in the message dialog.

Note that the solver definition in ScDocument::Solver forcefully inserts 
N/A when the solver fails, which seems to be usefull when creating scripts that 
use the Goal Seek. However, this behavior is not usefull when using the UI.

This patch restores the original value of the variable cell when Goal Seek 
fails.

Change-Id: I52d83b9de9b13667a81dd4a3ae8ab1c8545d6958
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168537
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Rafael Lima 
(cherry picked from commit d05f1ec2e20eb86ceb99e9ff5d4efb9ff9356dbb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168722
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 6e9095207b2b..e67ba5922516 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2287,6 +2287,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
 OUString  aMsgStr;
 OUString  aResStr;
 double  nSolveResult;
+double nOriginalValue = rDoc.GetValue(ScAddress(nDestCol, nDestRow, 
nDestTab));
 
 GetFrameWin()->EnterWait();
 
@@ -2327,9 +2328,16 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
   VclMessageType::Question, 
VclButtonsType::YesNo, aMsgStr));
 xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0));
 xBox->set_default_response(RET_NO);
-if (xBox->run() == RET_YES)
+int nResponse = xBox->run();
+if (nResponse == RET_YES)
 EnterValue( nDestCol, nDestRow, nDestTab, nSolveResult );
 
+// tdf#161338 If Goal Seek fails, restore the original value
+// Note that ScDocument::Solver forcefully changes the variable cell to 
N/A error
+// if the Goal Seek solver fails; so here we need to restore the value
+if (!bExact && nResponse == RET_NO)
+rDoc.SetValue(nDestCol, nDestRow, nDestTab, nOriginalValue);
+
 GetViewData().GetViewShell()->UpdateInputHandler( true );
 }
 


core.git: sc/inc sc/source

2024-06-12 Thread Rafael Lima (via logerrit)
 sc/inc/document.hxx|   21 ++---
 sc/source/ui/miscdlgs/solvrdlg.cxx |   24 +++-
 2 files changed, 41 insertions(+), 4 deletions(-)

New commits:
commit daedc81fa22690ce1a08b477a52360f05e4f5ed9
Author: Rafael Lima 
AuthorDate: Tue Jun 11 11:19:40 2024 -0300
Commit: Rafael Lima 
CommitDate: Thu Jun 13 01:46:50 2024 +0200

tdf#161462 Remember Goal Seek settings

Each time the user opens the Goal Seek dialogs, all settings are reset. 
This patch makes these settings be remembered during the same session.

Change-Id: I60a121b4001f4666ee25ab807fdc3860cf798296
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168683
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 4dbce67d2928..cc714491e6d9 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -319,6 +319,15 @@ enum ScMutationGuardFlags
 CORE = 0x0001, /// Core calc data structures should not be mutated
 };
 
+// Stores settings used in the Goal Seek
+struct ScGoalSeekSettings
+{
+bool bDefined = false;
+ScAddress aFormulaCell;
+ScAddress aVariableCell;
+OUString sTargetValue;
+};
+
 typedef std::unique_ptr> 
ScTableUniquePtr;
 
 class ScDocument
@@ -453,6 +462,9 @@ private:
 
 css::uno::Reference< css::script::vba::XVBAEventProcessor >
 mxVbaEvents;
+
+// Stores Goal Seek settings
+ScGoalSeekSettings maGoalSeekSettings;
 public:
 /// list of ScInterpreterTableOpParams currently in use
 std::vector m_TableOpList;
@@ -1967,9 +1979,12 @@ public:
 voidGetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
   SCCOL& rCol, SCROW& rRow );
 
-boolSolver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
-SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
-const OUString& sValStr, double& nX);
+// Goal Seek solver
+bool   Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
+   SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
+   const OUString& sValStr, double& nX);
+ScGoalSeekSettings GetGoalSeekSettings() { return maGoalSeekSettings; }
+void   SetGoalSeekSettings(ScGoalSeekSettings aNewSettings) { 
maGoalSeekSettings = aNewSettings; }
 
 SC_DLLPUBLIC void   ApplySelectionPattern( const ScPatternAttr& 
rAttr, const ScMarkData& rMark,
ScEditDataArray* 
pDataArray = nullptr, bool* pIsChanged = nullptr );
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx 
b/sc/source/ui/miscdlgs/solvrdlg.cxx
index 824f4bfad752..4f1b38f1f857 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -95,7 +95,21 @@ void ScSolverDlg::Init()
 
 OUString aStr(theFormulaCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
 
-m_xEdFormulaCell->SetText( aStr );
+// If Goal Seek settings are stored in the document, restore them
+ScGoalSeekSettings aSettings = pDoc->GetGoalSeekSettings();
+if (aSettings.bDefined)
+{
+OUString 
sFormulaString(aSettings.aFormulaCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
+OUString 
sVariableString(aSettings.aVariableCell.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention()));
+m_xEdFormulaCell->SetText(sFormulaString);
+m_xEdVariableCell->SetText(sVariableString);
+m_xEdTargetVal->set_text(aSettings.sTargetValue);
+}
+else
+{
+m_xEdFormulaCell->SetText( aStr );
+}
+
 m_xEdFormulaCell->GrabFocus();
 m_pEdActive = m_xEdFormulaCell.get();
 }
@@ -201,6 +215,14 @@ IMPL_LINK(ScSolverDlg, BtnHdl, weld::Button&, rBtn, void)
 ScRefFlags  nRes1 = theFormulaCell .Parse( 
m_xEdFormulaCell->GetText(),  *pDoc, eConv );
 ScRefFlags  nRes2 = theVariableCell.Parse( 
m_xEdVariableCell->GetText(), *pDoc, eConv );
 
+// Remember Goal Seek settings for the next time the dialog opens
+ScGoalSeekSettings aSettings;
+aSettings.bDefined = true;
+aSettings.aFormulaCell = theFormulaCell;
+aSettings.aVariableCell = theVariableCell;
+aSettings.sTargetValue = theTargetValStr;
+pDoc->SetGoalSeekSettings(aSettings);
+
 if ( (nRes1 & ScRefFlags::VALID) == ScRefFlags::VALID )
 {
 if ( (nRes2 & ScRefFlags::VALID) == ScRefFlags::VALID )


core.git: sc/source

2024-06-12 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/viewfun2.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit d05f1ec2e20eb86ceb99e9ff5d4efb9ff9356dbb
Author: Rafael Lima 
AuthorDate: Fri Jun 7 20:20:59 2024 +0200
Commit: Rafael Lima 
CommitDate: Wed Jun 12 16:29:36 2024 +0200

tdf#161338 Do not change variable cell when Goal Seek fails

When Goal Seek fails, N/A error is inserted in the cell even if the user 
chooses No in the message dialog.

Note that the solver definition in ScDocument::Solver forcefully inserts 
N/A when the solver fails, which seems to be usefull when creating scripts that 
use the Goal Seek. However, this behavior is not usefull when using the UI.

This patch restores the original value of the variable cell when Goal Seek 
fails.

Change-Id: I52d83b9de9b13667a81dd4a3ae8ab1c8545d6958
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168537
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Rafael Lima 

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 6e9095207b2b..e67ba5922516 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2287,6 +2287,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
 OUString  aMsgStr;
 OUString  aResStr;
 double  nSolveResult;
+double nOriginalValue = rDoc.GetValue(ScAddress(nDestCol, nDestRow, 
nDestTab));
 
 GetFrameWin()->EnterWait();
 
@@ -2327,9 +2328,16 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
   VclMessageType::Question, 
VclButtonsType::YesNo, aMsgStr));
 xBox->set_title(ScResId(STR_MSSG_DOSUBTOTALS_0));
 xBox->set_default_response(RET_NO);
-if (xBox->run() == RET_YES)
+int nResponse = xBox->run();
+if (nResponse == RET_YES)
 EnterValue( nDestCol, nDestRow, nDestTab, nSolveResult );
 
+// tdf#161338 If Goal Seek fails, restore the original value
+// Note that ScDocument::Solver forcefully changes the variable cell to 
N/A error
+// if the Goal Seek solver fails; so here we need to restore the value
+if (!bExact && nResponse == RET_NO)
+rDoc.SetValue(nDestCol, nDestRow, nDestTab, nOriginalValue);
+
 GetViewData().GetViewShell()->UpdateInputHandler( true );
 }
 


core.git: Branch 'libreoffice-24-8' - svx/source

2024-06-11 Thread Rafael Lima (via logerrit)
 svx/source/sdr/overlay/overlayselection.cxx |   33 +---
 1 file changed, 16 insertions(+), 17 deletions(-)

New commits:
commit 3c0db898092c2cf6148c01f6c561acc199d484f5
Author: Rafael Lima 
AuthorDate: Tue Jun 11 01:04:30 2024 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Jun 12 01:07:15 2024 +0200

tdf#161204 Fix selection outline with overlapping ranges

The previous commit [1] caused a regression in the outline when two or more 
ranges overlapped in the selection. This patch fixes the issue.

[1] dc243f0122ba656d2630e93bebfb84a2bfe4042a

Change-Id: Ib5ec72504ba0efaae715c47628c3d5a47557f506
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168625
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svx/source/sdr/overlay/overlayselection.cxx 
b/svx/source/sdr/overlay/overlayselection.cxx
index 232d6dcc487b..700aa1915c75 100644
--- a/svx/source/sdr/overlay/overlayselection.cxx
+++ b/svx/source/sdr/overlay/overlayselection.cxx
@@ -40,12 +40,19 @@ namespace sdr::overlay
 // combine ranges geometrically to a single, ORed polygon
 static basegfx::B2DPolyPolygon impCombineRangesToPolyPolygon(const 
std::vector< basegfx::B2DRange >& rRanges)
 {
+// Determines the offset in twips
+Size aSize(1, 1);
+aSize = o3tl::convert(aSize, o3tl::Length::px, o3tl::Length::twip);
+const sal_Int32 nOffset = aSize.getWidth();
+
 const sal_uInt32 nCount(rRanges.size());
 basegfx::B2DPolyPolygon aRetval;
 
 for(sal_uInt32 a(0); a < nCount; a++)
 {
-const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(rRanges[a]));
+basegfx::B2DRange aRange(rRanges[a]);
+aRange.grow(nOffset);
+const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(aRange));
 
 if(0 == a)
 {
@@ -60,23 +67,15 @@ namespace sdr::overlay
 return aRetval;
 }
 
-// Creates an ORed polygon with all the ranges shrinked by 1px
-// This is used to draw the internal white line in the selection
-static basegfx::B2DPolyPolygon 
impCombineRangesToInternalPolyPolygon(const std::vector< basegfx::B2DRange >& 
rRanges)
+// tdf#161204 Creates a poly-polygon using white hairline to provide 
contrast
+static basegfx::B2DPolyPolygon 
impCombineRangesToContrastPolyPolygon(const std::vector< basegfx::B2DRange >& 
rRanges)
 {
-// Determines the offset in twips
-Size aSize(1, 1);
-aSize = o3tl::convert(aSize, o3tl::Length::px, o3tl::Length::twip);
-const sal_Int32 nShrink = aSize.getWidth();
-
 const sal_uInt32 nCount(rRanges.size());
 basegfx::B2DPolyPolygon aRetval;
 
 for(sal_uInt32 a(0); a < nCount; a++)
 {
-basegfx::B2DRange aRange(rRanges[a]);
-aRange.grow(-nShrink);
-const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(aRange));
+const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(rRanges[a]));
 
 if(0 == a)
 {
@@ -175,16 +174,16 @@ namespace sdr::overlay
 std::move(aPolyPolygon),
 aRGBColor));
 
-// Internal outline with white color to provide 
contrast
-basegfx::B2DPolyPolygon 
aInternalPolyPolygon(impCombineRangesToInternalPolyPolygon(getRanges()));
-const drawinglayer::primitive2d::Primitive2DReference 
aInternalSelectionOutline(
+// tdf#161204 Outline with white color to provide 
contrast
+basegfx::B2DPolyPolygon 
aContrastPolyPolygon(impCombineRangesToContrastPolyPolygon(getRanges()));
+const drawinglayer::primitive2d::Primitive2DReference 
aContrastSelectionOutline(
 new 
drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
-std::move(aInternalPolyPolygon),
+std::move(aContrastPolyPolygon),
 basegfx::BColor(1.0, 1.0, 1.0)));
 
 // add both to result
 aRetval = 
drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence, 
aSelectionOutline };
-
aRetval.append(drawinglayer::primitive2d::Primitive2DContainer{aUnifiedTransparence,
 aInternalSelectionOutline});
+
aRetval.append(drawinglayer::primitive2d::Primitive2DContainer{aUnifiedTransparence,
 aContrastSelectionOutline});
 }
 else
 {


core.git: svx/source

2024-06-11 Thread Rafael Lima (via logerrit)
 svx/source/sdr/overlay/overlayselection.cxx |   33 +---
 1 file changed, 16 insertions(+), 17 deletions(-)

New commits:
commit 81f73ee5128eaa6328a2b08b0398202d747312ca
Author: Rafael Lima 
AuthorDate: Tue Jun 11 01:04:30 2024 +0200
Commit: Rafael Lima 
CommitDate: Tue Jun 11 20:13:01 2024 +0200

tdf#161204 Fix selection outline with overlapping ranges

The previous commit [1] caused a regression in the outline when two or more 
ranges overlapped in the selection. This patch fixes the issue.

[1] dc243f0122ba656d2630e93bebfb84a2bfe4042a

Change-Id: Ib5ec72504ba0efaae715c47628c3d5a47557f506
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168618
Reviewed-by: Rafael Lima 
Tested-by: Jenkins

diff --git a/svx/source/sdr/overlay/overlayselection.cxx 
b/svx/source/sdr/overlay/overlayselection.cxx
index 232d6dcc487b..700aa1915c75 100644
--- a/svx/source/sdr/overlay/overlayselection.cxx
+++ b/svx/source/sdr/overlay/overlayselection.cxx
@@ -40,12 +40,19 @@ namespace sdr::overlay
 // combine ranges geometrically to a single, ORed polygon
 static basegfx::B2DPolyPolygon impCombineRangesToPolyPolygon(const 
std::vector< basegfx::B2DRange >& rRanges)
 {
+// Determines the offset in twips
+Size aSize(1, 1);
+aSize = o3tl::convert(aSize, o3tl::Length::px, o3tl::Length::twip);
+const sal_Int32 nOffset = aSize.getWidth();
+
 const sal_uInt32 nCount(rRanges.size());
 basegfx::B2DPolyPolygon aRetval;
 
 for(sal_uInt32 a(0); a < nCount; a++)
 {
-const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(rRanges[a]));
+basegfx::B2DRange aRange(rRanges[a]);
+aRange.grow(nOffset);
+const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(aRange));
 
 if(0 == a)
 {
@@ -60,23 +67,15 @@ namespace sdr::overlay
 return aRetval;
 }
 
-// Creates an ORed polygon with all the ranges shrinked by 1px
-// This is used to draw the internal white line in the selection
-static basegfx::B2DPolyPolygon 
impCombineRangesToInternalPolyPolygon(const std::vector< basegfx::B2DRange >& 
rRanges)
+// tdf#161204 Creates a poly-polygon using white hairline to provide 
contrast
+static basegfx::B2DPolyPolygon 
impCombineRangesToContrastPolyPolygon(const std::vector< basegfx::B2DRange >& 
rRanges)
 {
-// Determines the offset in twips
-Size aSize(1, 1);
-aSize = o3tl::convert(aSize, o3tl::Length::px, o3tl::Length::twip);
-const sal_Int32 nShrink = aSize.getWidth();
-
 const sal_uInt32 nCount(rRanges.size());
 basegfx::B2DPolyPolygon aRetval;
 
 for(sal_uInt32 a(0); a < nCount; a++)
 {
-basegfx::B2DRange aRange(rRanges[a]);
-aRange.grow(-nShrink);
-const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(aRange));
+const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(rRanges[a]));
 
 if(0 == a)
 {
@@ -175,16 +174,16 @@ namespace sdr::overlay
 std::move(aPolyPolygon),
 aRGBColor));
 
-// Internal outline with white color to provide 
contrast
-basegfx::B2DPolyPolygon 
aInternalPolyPolygon(impCombineRangesToInternalPolyPolygon(getRanges()));
-const drawinglayer::primitive2d::Primitive2DReference 
aInternalSelectionOutline(
+// tdf#161204 Outline with white color to provide 
contrast
+basegfx::B2DPolyPolygon 
aContrastPolyPolygon(impCombineRangesToContrastPolyPolygon(getRanges()));
+const drawinglayer::primitive2d::Primitive2DReference 
aContrastSelectionOutline(
 new 
drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
-std::move(aInternalPolyPolygon),
+std::move(aContrastPolyPolygon),
 basegfx::BColor(1.0, 1.0, 1.0)));
 
 // add both to result
 aRetval = 
drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence, 
aSelectionOutline };
-
aRetval.append(drawinglayer::primitive2d::Primitive2DContainer{aUnifiedTransparence,
 aInternalSelectionOutline});
+
aRetval.append(drawinglayer::primitive2d::Primitive2DContainer{aUnifiedTransparence,
 aContrastSelectionOutline});
 }
 else
 {


core.git: svx/source

2024-06-10 Thread Rafael Lima (via logerrit)
 svx/source/sdr/overlay/overlayselection.cxx |   40 
 1 file changed, 40 insertions(+)

New commits:
commit dc243f0122ba656d2630e93bebfb84a2bfe4042a
Author: Rafael Lima 
AuthorDate: Sat Jun 8 00:32:10 2024 +0200
Commit: Rafael Lima 
CommitDate: Mon Jun 10 19:20:30 2024 +0200

tdf#161204 Improve visibility of outline in the selection overlay

As discussed in the design meeting, this patch adds an internal white 
outline to the selection overlay to provide better contrast.

FTR: This is the same approach used by other office suites (Excel, 
OnlyOffice, etc).

Change-Id: I9b279ebfa9efbd2b5d9894b94ebda653c3dba6e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168538
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Reviewed-by: Rafael Lima 

diff --git a/svx/source/sdr/overlay/overlayselection.cxx 
b/svx/source/sdr/overlay/overlayselection.cxx
index ba1d90d7092a..963546145b46 100644
--- a/svx/source/sdr/overlay/overlayselection.cxx
+++ b/svx/source/sdr/overlay/overlayselection.cxx
@@ -60,6 +60,37 @@ namespace sdr::overlay
 return aRetval;
 }
 
+// Creates an ORed polygon with all the ranges shriked by 1px
+// This is used to draw the internal white line in the selection
+static basegfx::B2DPolyPolygon 
impCombineRangesToInternalPolyPolygon(const std::vector< basegfx::B2DRange >& 
rRanges)
+{
+// Determines the offset in twips
+Size aSize(1, 1);
+aSize = o3tl::convert(aSize, o3tl::Length::px, o3tl::Length::twip);
+const sal_Int32 nShrink = aSize.getWidth();
+
+const sal_uInt32 nCount(rRanges.size());
+basegfx::B2DPolyPolygon aRetval;
+
+for(sal_uInt32 a(0); a < nCount; a++)
+{
+basegfx::B2DRange aRange(rRanges[a]);
+aRange.grow(-nShrink);
+const basegfx::B2DPolygon 
aDiscretePolygon(basegfx::utils::createPolygonFromRect(aRange));
+
+if(0 == a)
+{
+aRetval.append(aDiscretePolygon);
+}
+else
+{
+aRetval = basegfx::utils::solvePolygonOperationOr(aRetval, 
basegfx::B2DPolyPolygon(aDiscretePolygon));
+}
+}
+
+return aRetval;
+}
+
 // check if wanted type OverlayType::Transparent or OverlayType::Solid
 // is possible. If not, fallback to invert mode (classic mode)
 static OverlayType impCheckPossibleOverlayType(OverlayType 
aOverlayType)
@@ -137,14 +168,23 @@ namespace sdr::overlay
 
 if(mbBorder)
 {
+// External outline using themed color
 basegfx::B2DPolyPolygon 
aPolyPolygon(impCombineRangesToPolyPolygon(getRanges()));
 const drawinglayer::primitive2d::Primitive2DReference 
aSelectionOutline(
 new 
drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
 std::move(aPolyPolygon),
 aRGBColor));
 
+// Internal outline with white color to provide 
contrast
+basegfx::B2DPolyPolygon 
aInternalPolyPolygon(impCombineRangesToInternalPolyPolygon(getRanges()));
+const drawinglayer::primitive2d::Primitive2DReference 
aInternalSelectionOutline(
+new 
drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D(
+std::move(aInternalPolyPolygon),
+basegfx::BColor(1.0, 1.0, 1.0)));
+
 // add both to result
 aRetval = 
drawinglayer::primitive2d::Primitive2DContainer { aUnifiedTransparence, 
aSelectionOutline };
+
aRetval.append(drawinglayer::primitive2d::Primitive2DContainer{aUnifiedTransparence,
 aInternalSelectionOutline});
 }
 else
 {


core.git: sc/source

2024-05-30 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/gridwin.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a78e908093d5c5e1b1f1401b0863c98b9b523ea9
Author: Rafael Lima 
AuthorDate: Wed May 29 14:09:40 2024 +0200
Commit: Rafael Lima 
CommitDate: Fri May 31 03:23:39 2024 +0200

tdf#161309 Update AutoFill overlay after changes

Right after the cursor changes, the AutoFill overlay needs to be updated as 
well.

Change-Id: Ie82d36a3ff60635225c794650aaba6e6bfbed5ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168191
Reviewed-by: Rafael Lima 
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b948bf837f41..f1141dc3d8ab 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6200,6 +6200,7 @@ void ScGridWindow::CursorChanged()
 // now, just re-create them
 
 UpdateCursorOverlay();
+UpdateAutoFillOverlay();
 UpdateSparklineGroupOverlay();
 }
 


core.git: sc/source

2024-05-29 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/gridwin.cxx |   24 
 1 file changed, 20 insertions(+), 4 deletions(-)

New commits:
commit a764f661e0e1b94af128cc2290ee6510adad5ffd
Author: Rafael Lima 
AuthorDate: Fri May 24 14:31:04 2024 +0200
Commit: Rafael Lima 
CommitDate: Wed May 29 14:03:16 2024 +0200

tdf#161234 New design for the cell outline

The change introduced by commit I9df98 made the cell outline a bit wider 
than the actual cell. However, that change did not play well with higher zoom 
levels because:
1) The AutoFill handle disconnected from the cell outline
2) The distance between the outline and the cell was too far in at higher 
zoom levels

This patch proposes an alternative design that deals with both issues.

Change-Id: Ic3cd7d240f6cfc1af4a39409537e264912ef61b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167945
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Rafael Lima 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 2762929ccb9b..1b62cfb695e4 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6589,7 +6589,8 @@ void ScGridWindow::UpdateCursorOverlay()
 tools::Long nSizeYPix;
 mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
-const double nAdjustBorder(mrViewData.GetZoomX() * 3);
+// tdf#143733 Make cell outline wider than the cell
+const double nAdjustBorder(2 + mrViewData.GetZoomX());
 aScrPos.AdjustX(-nAdjustBorder);
 aScrPos.AdjustY(-nAdjustBorder);
 
@@ -6888,12 +6889,27 @@ void ScGridWindow::UpdateAutoFillOverlay()
 tools::Long nSizeYPix;
 mrViewData.GetMergeSizePixel( nX, nY, nSizeXPix, nSizeYPix );
 
+// tdf#161234 Make AutoFill handle follow cell outline. This happens only 
when the
+// autofill handle is in the same cell as the outline. Note that 
nAdjustBorder needs
+// to be calculated the same way as in ScGridWindow::UpdateCursorOverlay()
+double nAdjustBorder(0);
+SCCOL nX2 = mrViewData.GetCurX();
+SCCOL nY2 = mrViewData.GetCurY();
+const ScMergeAttr* pMerge = rDoc.GetAttr(nX2, nY2, nTab, ATTR_MERGE);
+if (pMerge->GetColMerge() >= 1 || pMerge->GetRowMerge() >= 1)
+{
+nX2 += pMerge->GetColMerge() - 1;
+nY2 += pMerge->GetRowMerge() - 1;
+}
+if (nX == nX2 && nY == nY2)
+nAdjustBorder = 2 + static_cast(mrViewData.GetZoomX());
+
 if (bLayoutRTL && !comphelper::LibreOfficeKit::isActive())
-aFillPos.AdjustX( -(nSizeXPix - 2 + (aFillHandleSize.Width() / 2)) );
+aFillPos.AdjustX( -(nSizeXPix + nAdjustBorder + 
(aFillHandleSize.Width() / 2)) );
 else
-aFillPos.AdjustX(nSizeXPix - (aFillHandleSize.Width() / 2) );
+aFillPos.AdjustX(nSizeXPix + nAdjustBorder - (aFillHandleSize.Width() 
/ 2) );
 
-aFillPos.AdjustY(nSizeYPix );
+aFillPos.AdjustY(nSizeYPix + nAdjustBorder);
 aFillPos.AdjustY( -(aFillHandleSize.Height() / 2) );
 
 tools::Rectangle aFillRect(aFillPos, aFillHandleSize);


core.git: sc/inc

2024-05-17 Thread Rafael Lima (via logerrit)
 sc/inc/scfuncs.hrc |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8d16b7a9e6dad1c3590c74af3eee952bd8fc3284
Author: Rafael Lima 
AuthorDate: Fri May 17 19:09:17 2024 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri May 17 21:57:15 2024 +0200

tdf#160835 Fix the use of "population" in Calc functions

Change-Id: If72058a34534dc477d07e9683c0d38d7169eecf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167688
Tested-by: Adolfo Jayme Barrientos 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index d193625cd982..79348fed8e39 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -1757,7 +1757,7 @@ const TranslateId SC_OPCODE_VAR_A_ARY[] =
 {
 NC_("SC_OPCODE_VAR_A", "Returns the variance based on a sample. Text is 
evaluated as zero."),
 NC_("SC_OPCODE_VAR_A", "Value "),
-NC_("SC_OPCODE_VAR_A", "Value 1; value 2; ... are arguments representing a 
sample taken from a basic total population.")
+NC_("SC_OPCODE_VAR_A", "Value 1; value 2; ... are arguments representing a 
sample taken from the population.")
 };
 
 // -=*# Resource for function VARP #*=-
@@ -1805,7 +1805,7 @@ const TranslateId SC_OPCODE_ST_DEV_A_ARY[] =
 {
 NC_("SC_OPCODE_ST_DEV_A", "Returns the standard deviation based on a 
sample. Text is evaluated as zero."),
 NC_("SC_OPCODE_ST_DEV_A", "Value "),
-NC_("SC_OPCODE_ST_DEV_A", "Value 1; value 2; ... are arguments 
representing a sample taken from a basic total population.")
+NC_("SC_OPCODE_ST_DEV_A", "Value 1; value 2; ... are arguments 
representing a sample taken from the population.")
 };
 
 // -=*# Resource for function STDEVP #*=-
@@ -1845,7 +1845,7 @@ const TranslateId SC_OPCODE_AVERAGE_A_ARY[] =
 {
 NC_("SC_OPCODE_AVERAGE_A", "Returns the average value for a sample. Text 
is evaluated as zero."),
 NC_("SC_OPCODE_AVERAGE_A", "Value "),
-NC_("SC_OPCODE_AVERAGE_A", "Value 1; value 2; ... are arguments 
representing a sample taken from a basic total population.")
+NC_("SC_OPCODE_AVERAGE_A", "Value 1; value 2; ... are arguments 
representing a sample taken from the population.")
 };
 
 // -=*# Resource for function DEVSQ #*=-


core.git: sc/inc sc/qa sc/source

2024-04-08 Thread Rafael Lima (via logerrit)
 sc/inc/table.hxx   |2 -
 sc/qa/uitest/data/tdf160104.ods|binary
 sc/qa/uitest/solver/solver.py  |   57 +
 sc/qa/unit/data/ods/SolverModel.ods|binary
 sc/qa/unit/ucalc_solver.cxx|   24 +
 sc/source/core/data/SolverSettings.cxx |3 +
 6 files changed, 85 insertions(+), 1 deletion(-)

New commits:
commit 2533960315607bf3e86ad014d2daa4bfa7e3fa59
Author: Rafael Lima 
AuthorDate: Mon Apr 1 14:46:35 2024 +0100
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 8 16:03:03 2024 +0200

tdf#160064 Hide named ranges/expressions of solver models

Prior to this patch, all named ranges/expressions associated with solver 
models were visible by default, which clutters the UI with various names in the 
Manage Names dialog.

Now all such named ranges/expressions are hidden by default, thus mimicking 
what MSO does.

Change-Id: I79727b375c48527632c4967d174c61f99ff41050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165621
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index f04b1fa0df7a..f578926535ae 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -1047,7 +1047,7 @@ public:
  const ScObjectHandling eObjectHandling = 
ScObjectHandling::RecalcPosMode);
 
 void SetRangeName(std::unique_ptr pNew);
-ScRangeName* GetRangeName() const;
+SC_DLLPUBLIC ScRangeName* GetRangeName() const;
 
 void PreprocessRangeNameUpdate(
 sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& 
rCompileCxt );
diff --git a/sc/qa/uitest/data/tdf160104.ods b/sc/qa/uitest/data/tdf160104.ods
index a98340f80a50..ea8f23bb4791 100644
Binary files a/sc/qa/uitest/data/tdf160104.ods and 
b/sc/qa/uitest/data/tdf160104.ods differ
diff --git a/sc/qa/uitest/solver/solver.py b/sc/qa/uitest/solver/solver.py
index 2a164b90f6c5..ed8132b0f205 100644
--- a/sc/qa/uitest/solver/solver.py
+++ b/sc/qa/uitest/solver/solver.py
@@ -132,4 +132,61 @@ class solver(UITestCase):
 # Here isModified needs to be True because changes were made to 
the Solver dialog
 self.assertTrue(calc_doc.isModified())
 
+
+# Tests whether all solver named ranges are hidden in the UI
+def test_tdf160064(self):
+# This test uses the same file from bug tdf#160104, so no need to 
check if the model is correct upon opening
+with self.ui_test.load_file(get_url_for_data_file("tdf160104.ods")) as 
calc_doc:
+# The Manage Names dialog must not contain any names
+with 
self.ui_test.execute_dialog_through_command(".uno:DefineName") as xDialog:
+xList = xDialog.getChild("names")
+self.assertEqual('0', get_state_as_dict(xList)['Children'])
+
+# Makes a small change in the solver dialog by clicking the 
"Minimize" button
+with 
self.ui_test.execute_modeless_dialog_through_command(".uno:SolverDialog", 
close_button="") as xDialog:
+xMin = xDialog.getChild("min")
+xMin.executeAction("CLICK", ())
+# Closes the dialog
+xCloseBtn = xDialog.getChild("close")
+xCloseBtn.executeAction("CLICK", ())
+
+# Here the file has been modified and needs to be saved and 
reloaded
+self.assertTrue(calc_doc.isModified())
+self.xUITest.executeCommand('.uno:Save')
+self.xUITest.executeCommand('.uno:Reload')
+
+# Open the Solver dialog and check whether the model is loaded 
correctly
+with 
self.ui_test.execute_modeless_dialog_through_command(".uno:SolverDialog", 
close_button="") as xDialog:
+xTargetEdit = xDialog.getChild("targetedit")
+xMin = xDialog.getChild("min")
+xChangeEdit = xDialog.getChild("changeedit")
+xRef1Edit = xDialog.getChild("ref1edit")
+xVal1Edit = xDialog.getChild("val1edit")
+xOp1List = xDialog.getChild("op1list")
+xRef2Edit = xDialog.getChild("ref2edit")
+xVal2Edit = xDialog.getChild("val2edit")
+xOp2List = xDialog.getChild("op2list")
+
+# Checks whether the solver model was loaded correctly
+self.assertEqual("$F$2", 
get_state_as_dict(xTargetEdit)["Text"])
+self.assertEqual("true", get_state_as_dict(xMin)["Checked"])
+self.assertEqual("$D$2:$D$11", 
get_state_as_dict(xChangeEdit)["Text"])
+self.assertEqual("$F$5", get_state_as_dict(xRef1Edit)["Text"])
+self.assertEqual("$F$8", get_state_as_dict(xVal1Edit)["Text"])
+self.assertEqual("≤", 
get_state_as_dict(xOp1List)["SelectEntryText"])
+self.assertEqual("$D$2:$D$11", 
get_state_as_dict(xRef2Edit)["Text"])
+self.assertEqual("", get_state_

core.git: sc/uiconfig sd/uiconfig sw/uiconfig

2024-04-03 Thread Rafael Lima (via logerrit)
 sc/uiconfig/scalc/ui/notebookbar.ui   |   19 +++---
 sc/uiconfig/scalc/ui/notebookbar_compact.ui   |2 -
 sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui|   19 +++---
 sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui   |   19 +++---
 sd/uiconfig/sdraw/ui/notebookbar.ui   |   19 +++---
 sd/uiconfig/sdraw/ui/notebookbar_compact.ui   |2 -
 sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui|   13 +
 sd/uiconfig/simpress/ui/notebookbar.ui|   19 +++---
 sd/uiconfig/simpress/ui/notebookbar_compact.ui|2 -
 sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui |   13 +
 sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui|   13 +
 sw/uiconfig/swriter/ui/notebookbar.ui |   15 ++-
 sw/uiconfig/swriter/ui/notebookbar_compact.ui |1 
 sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui  |   19 +++---
 sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui |   19 +++---
 15 files changed, 169 insertions(+), 25 deletions(-)

New commits:
commit f8e927e6cdbc99240d8967a5e920ce33d45838d2
Author: Rafael Lima 
AuthorDate: Tue Apr 2 09:31:28 2024 -0300
Commit: Rafael Lima 
CommitDate: Wed Apr 3 15:38:10 2024 +0200

tdf#160376 Add uno:Reload to the Notebookbar UI

The command uno:Reload is missing from some of the Notebookbar UI variants 
(f.i. in Calc notebookbar_compact.ui has it, but the others do not).

This patch adds the uno:Reload command to all variants of the Tabbed UI in 
all LO apps.

Change-Id: Ic56a05a15bc52a51bc45435ca938a6879452189f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165675
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Rafael Lima 

diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index 4e9058aa7faf..46f674647d80 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -469,6 +469,19 @@
 False
   
 
+
+  
+True
+False
+.uno:Reload
+  
+
+
+  
+True
+False
+  
+
 
   
 True
@@ -484,7 +497,7 @@
   
 
 
-  
+  
 True
 False
   
@@ -511,7 +524,7 @@
   
 
 
-  
+  
 True
 False
   
@@ -545,7 +558,7 @@
   
 
 
-  
+  
 True
 False
   
diff --git a/sc/uiconfig/scalc/ui/notebookbar_compact.ui 
b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
index 01102b481c35..513679ec6ce1 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
@@ -609,7 +609,7 @@
 
 
   
-False
+True
 False
 .uno:Reload
   
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui 
b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
index 899f839699ec..e577579264c0 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
@@ -668,6 +668,19 @@
 False
   
 
+
+  
+True
+False
+.uno:Reload
+  
+
+
+  
+True
+False
+  
+
 
   
 True
@@ -683,7 +696,7 @@
   
 
 
-  
+  
 True
 False
   
@@ -710,7 +723,7 @@
   
 
 
-  
+  
 True
 False
   
@@ -744,7 +757,7 @@
   
 
 
-  
+  
 True
 False
   
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui 
b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
index 1c700123fabc..b7e91985a525 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
@@ -1175,6 +1175,19 @@
 False
   
 
+
+  
+True
+False
+.uno:Reload
+  
+
+
+  
+True
+False
+  
+
 
   
 True
@@ -1190,7 +1203,7 @@
   
 
 
-  
+  
 True
 False
   
@@ -1217,7 +1230,7 @@
   
 
 
-  
+  
 True
 False
   
@@ -1251,7 +1264,7 @@
   
 
 
-  
+  
 True
 False
   
diff --git a/sd/uiconfig/sdraw/ui/notebookbar.ui 
b/sd/uiconfig/sdraw/ui/notebookbar.ui
index bf0a03ea1229..37ab230d261c 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar.ui
@@ -499,6 +499,19 @@
 False
   
 
+
+  
+True
+False
+.uno:Reload
+  
+
+
+  
+True
+False
+  
+
 
   
 True
@@ -514,7 +527,7 @@
   
 
 
-  

core.git: schema/libreoffice sc/qa sc/source

2024-03-31 Thread Rafael Lima (via logerrit)
 sc/qa/unit/data/ods/NamedExpressionsHidden.ods  |binary
 sc/qa/unit/subsequent_filters_test.cxx  |   59 
 sc/source/filter/xml/xmlexprt.cxx   |4 
 sc/source/filter/xml/xmlnexpi.cxx   |4 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   19 +++
 5 files changed, 86 insertions(+)

New commits:
commit 350c590620226c4d5b94aa01d3853e15af3cebb0
Author: Rafael Lima 
AuthorDate: Mon Mar 25 15:24:30 2024 +0100
Commit: Tomaž Vajngerl 
CommitDate: Mon Apr 1 05:56:10 2024 +0200

tdf#160356 Add support for hidden named expressions in Calc

Since bug 154449 was fixed, Calc now supports hidden named ranges. However, 
named expressions were not considered in the original patch and it would be 
useful to support hidden named expressions as well.

This patch adds suppport for hidden named expressions (import and export).

Change-Id: I2580416dcd5db0fcb2aa9061085cdc9975fb03c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165239
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/qa/unit/data/ods/NamedExpressionsHidden.ods 
b/sc/qa/unit/data/ods/NamedExpressionsHidden.ods
new file mode 100644
index ..61e6d1feac6b
Binary files /dev/null and b/sc/qa/unit/data/ods/NamedExpressionsHidden.ods 
differ
diff --git a/sc/qa/unit/subsequent_filters_test.cxx 
b/sc/qa/unit/subsequent_filters_test.cxx
index 87e00ac7f3f0..a0cbd4f0780c 100644
--- a/sc/qa/unit/subsequent_filters_test.cxx
+++ b/sc/qa/unit/subsequent_filters_test.cxx
@@ -703,6 +703,65 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest, 
testHiddenRangeNameXLSX)
  pRangeData2->GetUnoType() & 
sheet::NamedRangeFlag::HIDDEN);
 }
 
+CPPUNIT_TEST_FIXTURE(ScFiltersTest, testHiddenNamedExpression)
+{
+createScDoc();
+ScDocument* pDoc = getScDoc();
+
+// Adds two hidden named expressions and two non-hidden named expressions
+ScRangeName* pNamedRanges = pDoc->GetRangeName();
+ScRangeData* pRangeData1 = new ScRangeData(*pDoc, "NAME1", "100");
+pRangeData1->AddType(ScRangeData::Type::Hidden);
+pNamedRanges->insert(pRangeData1);
+ScRangeData* pRangeData2 = new ScRangeData(*pDoc, "NAME2", "text1");
+pRangeData2->AddType(ScRangeData::Type::Hidden);
+pNamedRanges->insert(pRangeData2);
+ScRangeData* pRangeData3 = new ScRangeData(*pDoc, "NAME3", "200");
+pNamedRanges->insert(pRangeData3);
+ScRangeData* pRangeData4 = new ScRangeData(*pDoc, "NAME4", "text2");
+pNamedRanges->insert(pRangeData4);
+CPPUNIT_ASSERT_EQUAL(size_t(4), pNamedRanges->size());
+
+// Save and reload to test whether the named expressions retain the hidden 
 where applicable
+saveAndReload("calc8");
+pDoc = getScDoc();
+pNamedRanges = pDoc->GetRangeName();
+CPPUNIT_ASSERT_EQUAL(size_t(4), pNamedRanges->size());
+pRangeData1 = pNamedRanges->findByUpperName(OUString("NAME1"));
+CPPUNIT_ASSERT(pRangeData1);
+CPPUNIT_ASSERT_EQUAL(ScRangeData::Type::Hidden, pRangeData1->GetType());
+CPPUNIT_ASSERT_EQUAL(OUString("100"), pRangeData1->GetSymbol());
+pRangeData2 = pNamedRanges->findByUpperName(OUString("NAME2"));
+CPPUNIT_ASSERT(pRangeData2);
+CPPUNIT_ASSERT_EQUAL(ScRangeData::Type::Hidden, pRangeData2->GetType());
+CPPUNIT_ASSERT_EQUAL(OUString("text1"), pRangeData2->GetSymbol());
+pRangeData3 = pNamedRanges->findByUpperName(OUString("NAME3"));
+CPPUNIT_ASSERT(pRangeData3);
+CPPUNIT_ASSERT_EQUAL(ScRangeData::Type::Name, pRangeData3->GetType());
+CPPUNIT_ASSERT_EQUAL(OUString("200"), pRangeData3->GetSymbol());
+pRangeData4 = pNamedRanges->findByUpperName(OUString("NAME4"));
+CPPUNIT_ASSERT(pRangeData4);
+CPPUNIT_ASSERT_EQUAL(ScRangeData::Type::Name, pRangeData4->GetType());
+CPPUNIT_ASSERT_EQUAL(OUString("text2"), pRangeData4->GetSymbol());
+}
+
+CPPUNIT_TEST_FIXTURE(ScFiltersTest, testHiddenNamedExpressionODS)
+{
+createScDoc("ods/NamedExpressionsHidden.ods");
+ScDocument* pDoc = getScDoc();
+
+// The document has 2 named expressions; the first is hidden; the second 
is visible
+ScRangeName* pNamedRanges = pDoc->GetRangeName();
+ScRangeData* pRangeData1 = 
pNamedRanges->findByUpperName(OUString("NAME1"));
+CPPUNIT_ASSERT(pRangeData1);
+CPPUNIT_ASSERT_EQUAL(ScRangeData::Type::Hidden, pRangeData1->GetType());
+CPPUNIT_ASSERT_EQUAL(OUString("100"), pRangeData1->GetSymbol());
+ScRangeData* pRangeData2 = 
pNamedRanges->findByUpperName(OUString("NAME2"));
+CPPUNIT_ASSERT(pRangeData2);
+CPPUNIT_ASSERT_EQUAL(ScRangeData::Type::Name, pRangeData2->GetType());
+CPPUNIT_ASSERT_EQUAL(OUString("200"), pRangeData2->GetSymbol());
+}
+
 CPPUNIT_TEST_FIXTURE(ScFiltersTest, testHyperlinksXLSX)
 {
 createScDoc("xlsx/hyperlinks.xlsx");
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index abef9391b1fb..e776c006643a 100644
--

core.git: sc/uiconfig sd/uiconfig

2024-03-30 Thread Rafael Lima (via logerrit)
 sc/uiconfig/scalc/ui/notebookbar.ui   |7 ---
 sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui|7 ---
 sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui   |7 ---
 sd/uiconfig/sdraw/ui/notebookbar.ui   |7 ---
 sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui|7 ---
 sd/uiconfig/simpress/ui/notebookbar.ui|7 ---
 sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui |7 ---
 sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui|7 ---
 8 files changed, 56 deletions(-)

New commits:
commit 1b00c292754c529ca6615d6b39a8545f340c7f50
Author: Rafael Lima 
AuthorDate: Tue Mar 26 12:50:59 2024 -0300
Commit: Rafael Lima 
CommitDate: Sat Mar 30 14:52:16 2024 +0100

tdf#160378 Remove NewGlobalDoc from the Tabbed UI in sd and sc

The command NewGlobalDoc is not supported by Calc, Impress and Draw, so 
they should not exist in the Tabbed UI. Otherwise, a gap appears, since there's 
no info about this command.

Change-Id: I0dd2b4639cfb44437d6726d6f138c4767c5a3175
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165351
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index 855719bb3946..4e9058aa7faf 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -463,13 +463,6 @@
 .uno:SaveACopy
   
 
-
-  
-True
-False
-.uno:NewGlobalDoc
-  
-
 
   
 True
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui 
b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
index 2533c66719f0..899f839699ec 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
@@ -662,13 +662,6 @@
 .uno:SaveACopy
   
 
-
-  
-True
-False
-.uno:NewGlobalDoc
-  
-
 
   
 True
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui 
b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
index b036557cea0f..1c700123fabc 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
@@ -1169,13 +1169,6 @@
 .uno:SaveAsRemote
   
 
-
-  
-True
-False
-.uno:NewGlobalDoc
-  
-
 
   
 True
diff --git a/sd/uiconfig/sdraw/ui/notebookbar.ui 
b/sd/uiconfig/sdraw/ui/notebookbar.ui
index 32e7212d5e70..bf0a03ea1229 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar.ui
@@ -493,13 +493,6 @@
 .uno:SaveACopy
   
 
-
-  
-True
-False
-.uno:NewGlobalDoc
-  
-
 
   
 True
diff --git a/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui 
b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui
index 083af53572d3..81f1395a293c 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui
@@ -737,13 +737,6 @@
 .uno:SaveACopy
   
 
-
-  
-True
-False
-.uno:NewGlobalDoc
-  
-
 
   
 True
diff --git a/sd/uiconfig/simpress/ui/notebookbar.ui 
b/sd/uiconfig/simpress/ui/notebookbar.ui
index 18530c457d7a..843b7c9f079d 100644
--- a/sd/uiconfig/simpress/ui/notebookbar.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar.ui
@@ -415,13 +415,6 @@
 .uno:SaveACopy
   
 
-
-  
-True
-False
-.uno:NewGlobalDoc
-  
-
 
   
 True
diff --git a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui 
b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui
index d2f71a8cb993..dbb79ead7deb 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui
@@ -717,13 +717,6 @@
 .uno:SaveACopy
   
 
-
-  
-True
-False
-.uno:NewGlobalDoc
-  
-
 
   
 True
diff --git a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui 
b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
index 5d4f592b856e..dea621413f5c 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
@@ -767,13 +767,6 @@
 .uno:SaveAsRemote
   
 
-
-  
-True
-False
-.uno:NewGlobalDoc
-  
-
 
   
 True


core.git: Branch 'libreoffice-7-6' - sc/inc sc/qa sc/source

2024-03-24 Thread Rafael Lima (via logerrit)
 sc/inc/SolverSettings.hxx  |  117 -
 sc/qa/unit/data/ods/tdf158735.ods  |binary
 sc/qa/unit/ucalc_solver.cxx|   29 
 sc/source/core/data/SolverSettings.cxx |  220 +
 4 files changed, 356 insertions(+), 10 deletions(-)

New commits:
commit 68b0c3a6ac189eea011d1809480e13f7d33652a6
Author: Rafael Lima 
AuthorDate: Mon Mar 4 19:01:40 2024 +0100
Commit: Tomaž Vajngerl 
CommitDate: Sun Mar 24 11:31:55 2024 +0100

tdf#158735 Save solver settings for DEPS and SCO as well

When bug tdf#38948 was originally fixed, the solvers DEPS and SCO were not 
considered. This caused a regression, because setting engine options for these 
solvers made them never be saved, even in its own sheet.

This patch fixes that by incorporating the engine options for DEPS and SCO.

Change-Id: I93af712f91da2f7b1ac57ed74f6c2c2d7d411bba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164376
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 04d884cc99eb66679fb254129b54488bd40e5abf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164385
Reviewed-by: Xisco Fauli 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164531

diff --git a/sc/inc/SolverSettings.hxx b/sc/inc/SolverSettings.hxx
index ec1ef994a7b8..985e8d30f796 100644
--- a/sc/inc/SolverSettings.hxx
+++ b/sc/inc/SolverSettings.hxx
@@ -39,11 +39,34 @@ enum SolverParameter
 SP_LO_ENGINE, // Engine name used in LO
 SP_MS_ENGINE, // Engine ID used in MSO
 SP_INTEGER, // Assume all variables are integer (0: no, 1: yes)
+// LpSolve, CoinMP and SwarmSolver
 SP_NON_NEGATIVE, // Assume non negativity (1: yes, 2: no)
 SP_EPSILON_LEVEL, // Epsilon level
 SP_LIMIT_BBDEPTH, // Branch and bound depth
 SP_TIMEOUT, // Time limit to return a solution
-SP_ALGORITHM // Algorithm used by the SwarmSolver (1, 2 or 3)
+SP_ALGORITHM, // Algorithm used by the SwarmSolver (1, 2 or 3)
+// Engine options common for DEPS and SCO
+SP_SWARM_SIZE, // Size of Swarm
+SP_LEARNING_CYCLES, // Learning Cycles
+SP_GUESS_VARIABLE_RANGE, // Variable Bounds Guessing
+SP_VARIABLE_RANGE_THRESHOLD, // Variable Bounds Threshold (when guessing)
+SP_ACR_COMPARATOR, // Use ACR Comparator (instead of BCH)
+SP_RND_STARTING_POINT, // Use Random starting point
+SP_STRONGER_PRNG, // Use a stronger random generator (slower)
+SP_STAGNATION_LIMIT, // Stagnation Limit
+SP_STAGNATION_TOLERANCE, // Stagnation Tolerance
+SP_ENHANCED_STATUS, // Show enhanced solver status
+// DEPS Options
+SP_AGENT_SWITCH_RATE, // Agent Switch Rate (DE Probability)
+SP_SCALING_MIN, // DE: Min Scaling Factor (0-1.2)
+SP_SCALING_MAX, // DE: Max Scaling Factor (0-1.2)
+SP_CROSSOVER_PROB, // DE: Crossover Probability (0-1)
+SP_COGNITIVE_CONST, // Cognitive Constant
+SP_SOCIAL_CONST, // Social Constant
+SP_CONSTRICTION_COEFF, // PS: Constriction Coefficient
+SP_MUTATION_PROB, // Mutation Probability (0-0.005)
+// SCO Options
+SP_LIBRARY_SIZE, // Size of library
 };
 
 // Starts at 1 to maintain MS compatibility
@@ -123,6 +146,28 @@ private:
 OUString m_sLimitBBDepth;
 OUString m_sTimeout;
 OUString m_sAlgorithm;
+// DEPS and SCO
+OUString m_sSwarmSize;
+OUString m_sLearningCycles;
+OUString m_sGuessVariableRange;
+OUString m_sVariableRangeThreshold;
+OUString m_sUseACRComparator;
+OUString m_sUseRandomStartingPoint;
+OUString m_sUseStrongerPRNG;
+OUString m_sStagnationLimit;
+OUString m_sTolerance;
+OUString m_sEnhancedSolverStatus;
+// DEPS only
+OUString m_sAgentSwitchRate;
+OUString m_sScalingFactorMin;
+OUString m_sScalingFactorMax;
+OUString m_sCrossoverProbability;
+OUString m_sCognitiveConstant;
+OUString m_sSocialConstant;
+OUString m_sConstrictionCoeff;
+OUString m_sMutationProbability;
+OUString m_sLibrarySize;
+
 css::uno::Sequence m_aEngineOptions;
 
 std::vector m_aConstraints;
@@ -131,7 +176,9 @@ private:
 
 // Used to create or read a single solver parameter based on its named 
range
 bool ReadParamValue(SolverParameter eParam, OUString& rValue, bool 
bRemoveQuotes = false);
+bool ReadDoubleParamValue(SolverParameter eParam, OUString& rValue);
 void WriteParamValue(SolverParameter eParam, OUString sValue, bool bQuoted 
= false);
+void WriteDoubleParamValue(SolverParameter eParam, std::u16string_view 
sValue);
 
 // Creates or reads all constraints stored in named ranges
 void ReadConstraints();
@@ -149,19 +196,46 @@ private:
 
 // Maps solver parameters to named ranges
 std::map m_mNamedRanges
-= { { SP_OBJ_CELL, "solver_opt" },  { SP_OBJ_TYPE, "solver_typ" },
-{ SP_OBJ_VAL, "solver_val" },   { SP_VAR_CELLS, "solver_adj" },
-{ SP_CONSTR_COUNT

core.git: sc/inc sc/qa sc/source

2024-03-20 Thread Rafael Lima (via logerrit)
 sc/inc/SolverSettings.hxx  |1 
 sc/qa/uitest/data/tdf160104.ods|binary
 sc/qa/uitest/solver/solver.py  |   74 +
 sc/source/core/data/SolverSettings.cxx |   18 ++
 sc/source/ui/miscdlgs/optsolver.cxx|   97 ++---
 5 files changed, 171 insertions(+), 19 deletions(-)

New commits:
commit 6c97cd3691ea0f7d9e580b1c4ea0fca81d47758a
Author: Rafael Lima 
AuthorDate: Sun Mar 10 22:26:15 2024 +0100
Commit: Tomaž Vajngerl 
CommitDate: Wed Mar 20 11:16:34 2024 +0100

tdf#160104 Do not mark file as modified if nothing changed in the Solver 
dialog

Change-Id: I1bef38a21179bb725c7fb7a08fe90309d26239ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164616
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/inc/SolverSettings.hxx b/sc/inc/SolverSettings.hxx
index 985e8d30f796..0f01f1020356 100644
--- a/sc/inc/SolverSettings.hxx
+++ b/sc/inc/SolverSettings.hxx
@@ -299,6 +299,7 @@ public:
 
 SC_DLLPUBLIC void SaveSolverSettings();
 SC_DLLPUBLIC void ResetToDefaults();
+SC_DLLPUBLIC bool TabHasSolverModel();
 };
 
 } // namespace sc
diff --git a/sc/qa/uitest/data/tdf160104.ods b/sc/qa/uitest/data/tdf160104.ods
new file mode 100644
index ..a98340f80a50
Binary files /dev/null and b/sc/qa/uitest/data/tdf160104.ods differ
diff --git a/sc/qa/uitest/solver/solver.py b/sc/qa/uitest/solver/solver.py
index faabdfb1ce50..2a164b90f6c5 100644
--- a/sc/qa/uitest/solver/solver.py
+++ b/sc/qa/uitest/solver/solver.py
@@ -58,4 +58,78 @@ class solver(UITestCase):
 #verify
 self.assertEqual(get_cell_by_position(calc_doc, 0, 1, 
1).getValue(), 400)
 
+
+# Tests the isModified property on a blank Calc file
+def test_tdf160104_blank_file(self):
+with self.ui_test.create_doc_in_start_center("calc") as calc_doc:
+self.assertFalse(calc_doc.isModified())
+with 
self.ui_test.execute_modeless_dialog_through_command(".uno:SolverDialog", 
close_button="") as xDialog:
+xCloseBtn = xDialog.getChild("close")
+xCloseBtn.executeAction("CLICK", ())
+
+# Here isModified needs to be False because the dialog was opened 
and closed with no changes
+self.assertFalse(calc_doc.isModified())
+
+# Now open the dialog again and make some changes
+with 
self.ui_test.execute_modeless_dialog_through_command(".uno:SolverDialog", 
close_button="") as xDialog:
+xCloseBtn = xDialog.getChild("close")
+xMin = xDialog.getChild("min")
+xChangeEdit = xDialog.getChild("changeedit")
+
+# Click the Minimize option and change variable cells
+xMin.executeAction("CLICK", ())
+xChangeEdit.executeAction("TYPE", mkPropertyValues({"TEXT": 
"$A$1:$A$10"}))
+xCloseBtn.executeAction("CLICK", ())
+
+# Here isModified needs to be True because changes were made to 
the dialog
+self.assertTrue(calc_doc.isModified())
+
+
+# Tests the isModified property on an existing file that contains a solver 
model
+def test_tdf160104_with_file(self):
+with self.ui_test.load_file(get_url_for_data_file("tdf160104.ods")) as 
calc_doc:
+self.assertFalse(calc_doc.isModified())
+with 
self.ui_test.execute_modeless_dialog_through_command(".uno:SolverDialog", 
close_button="") as xDialog:
+xTargetEdit = xDialog.getChild("targetedit")
+xMax = xDialog.getChild("max")
+xChangeEdit = xDialog.getChild("changeedit")
+xRef1Edit = xDialog.getChild("ref1edit")
+xVal1Edit = xDialog.getChild("val1edit")
+xOp1List = xDialog.getChild("op1list")
+xRef2Edit = xDialog.getChild("ref2edit")
+xVal2Edit = xDialog.getChild("val2edit")
+xOp2List = xDialog.getChild("op2list")
+
+# Checks whether the solver model was loaded correctly
+self.assertEqual("$F$2", 
get_state_as_dict(xTargetEdit)["Text"])
+self.assertEqual("true", get_state_as_dict(xMax)["Checked"])
+self.assertEqual("$D$2:$D$11", 
get_state_as_dict(xChangeEdit)["Text"])
+self.assertEqual("$F$5", get_state_as_dict(xRef1Edit)["Text"])
+self.assertEqual("$F$8", get_state_as_dict(xVal1Edit)["Text"])
+self.assertEqual("≤", 
get_state_as_dict(xOp1List)["SelectEntryText"])
+self.assertEqual("$D$2:$D$11", 
get_state_as_dict(xRef2Edit)["Text"])
+self.assertEqual("", get_state_as_dict(xVal2Edit)["Text"])
+self.assertEqual("Binary", 
get_state_as_dict(xOp2List)["SelectEntryText"])
+
+# Closes the dialog without making changes
+xCloseBtn = xDialog.getChild("close")
+xClo

core.git: xmlsecurity/inc xmlsecurity/source xmlsecurity/uiconfig

2024-03-19 Thread Rafael Lima (via logerrit)
 xmlsecurity/inc/macrosecurity.hxx|7 ++
 xmlsecurity/inc/strings.hrc  |1 
 xmlsecurity/source/dialogs/macrosecurity.cxx |   34 ++
 xmlsecurity/uiconfig/ui/securitylevelpage.ui |   86 ++-
 4 files changed, 127 insertions(+), 1 deletion(-)

New commits:
commit 6178387f7bcc35df9272978ec936f8b53c6da80d
Author: Rafael Lima 
AuthorDate: Thu Mar 14 00:45:43 2024 +0100
Commit: Rafael Lima 
CommitDate: Tue Mar 19 14:48:34 2024 +0100

tdf#159985 Warn about the need to reload file after changing macro security 
level

Change-Id: I191fd5d676d6d54fb0ef15652420afdceab2fc78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164810
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Heiko Tietze 

diff --git a/xmlsecurity/inc/macrosecurity.hxx 
b/xmlsecurity/inc/macrosecurity.hxx
index 5d9feb94c808..162ffad3ce72 100644
--- a/xmlsecurity/inc/macrosecurity.hxx
+++ b/xmlsecurity/inc/macrosecurity.hxx
@@ -72,6 +72,8 @@ class MacroSecurityLevelTP : public MacroSecurityTP
 {
 private:
 sal_uInt16   mnCurLevel;
+// Stores the security level when the dialog opens. Used to check if the 
value changed
+sal_uInt16   mnInitialLevel;
 
 std::unique_ptr m_xVeryHighRB;
 std::unique_ptr m_xHighRB;
@@ -81,6 +83,11 @@ private:
 std::unique_ptr m_xHighImg;
 std::unique_ptr m_xMedImg;
 std::unique_ptr m_xLowImg;
+std::unique_ptr m_xWarningLb;
+std::unique_ptr m_xWarningImg;
+std::unique_ptr m_xWarningBox;
+
+void SetWarningLabel(const OUString& sMsg);
 
 DECL_LINK(RadioButtonHdl, weld::Toggleable&, void);
 public:
diff --git a/xmlsecurity/inc/strings.hrc b/xmlsecurity/inc/strings.hrc
index 7e99a58d5286..b450f885df6e 100644
--- a/xmlsecurity/inc/strings.hrc
+++ b/xmlsecurity/inc/strings.hrc
@@ -64,5 +64,6 @@
 #define STR_ENCRYPT 
NC_("selectcertificatedialog|str_encrypt", "Encrypt")
 
 #define STR_BROKEN_MACRO_CERTIFICATE_DATA   
NC_("STR_BROKEN_MACRO_CERTIFICATE_DATA", "Macro security problem!

Broken certificate data: %{data}")
+#define STR_RELOAD_FILE_WARNING 
NC_("STR_RELOAD_FILE_WARNING", "Reload the file to apply the new macro security 
level")
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx 
b/xmlsecurity/source/dialogs/macrosecurity.cxx
index ca4df4e64c03..9432220ae5ae 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -105,6 +105,9 @@ MacroSecurityLevelTP::MacroSecurityLevelTP(weld::Container* 
pParent, MacroSecuri
 , m_xHighImg(m_xBuilder->weld_widget("highimg"))
 , m_xMedImg(m_xBuilder->weld_widget("medimg"))
 , m_xLowImg(m_xBuilder->weld_widget("lowimg"))
+, m_xWarningLb(m_xBuilder->weld_label("warningmsg"))
+, m_xWarningImg(m_xBuilder->weld_image("warningimg"))
+, m_xWarningBox(m_xBuilder->weld_box("warningbox"))
 {
 m_xLowRB->connect_toggled( LINK( this, MacroSecurityLevelTP, 
RadioButtonHdl ) );
 m_xMediumRB->connect_toggled( LINK( this, MacroSecurityLevelTP, 
RadioButtonHdl ) );
@@ -129,6 +132,7 @@ MacroSecurityLevelTP::MacroSecurityLevelTP(weld::Container* 
pParent, MacroSecuri
 }
 
 mnCurLevel = 
static_cast(SvtSecurityOptions::GetMacroSecurityLevel());
+mnInitialLevel = mnCurLevel;
 bool bReadonly = SvtSecurityOptions::IsReadOnly( 
SvtSecurityOptions::EOption::MacroSecLevel );
 
 weld::RadioButton* pCheck = nullptr;
@@ -166,6 +170,28 @@ 
MacroSecurityLevelTP::MacroSecurityLevelTP(weld::Container* pParent, MacroSecuri
 m_xMediumRB->set_sensitive(false);
 m_xLowRB->set_sensitive(false);
 }
+
+SetWarningLabel("");
+// Use same font color as in InfobarType::WARNING
+m_xWarningLb->set_font_color(Color(0x70, 0x43, 0x00));
+m_xWarningImg->set_size_request(24, 24);
+}
+
+void MacroSecurityLevelTP::SetWarningLabel(const OUString& sMsg)
+{
+m_xWarningLb->set_label(sMsg);
+if (!sMsg.isEmpty())
+{
+m_xWarningLb->show();
+m_xWarningImg->show();
+m_xWarningBox->set_background(Color(0xFE, 0xEF, 0xB3));
+}
+else
+{
+m_xWarningLb->hide();
+m_xWarningImg->hide();
+m_xWarningBox->set_background(COL_TRANSPARENT);
+}
 }
 
 IMPL_LINK_NOARG(MacroSecurityLevelTP, RadioButtonHdl, weld::Toggleable&, void)
@@ -183,6 +209,14 @@ IMPL_LINK_NOARG(MacroSecurityLevelTP, RadioButtonHdl, 
weld::Toggleable&, void)
 mnCurLevel = nNewLevel;
 m_pDlg->EnableReset();
 }
+
+// Show warning message if a different security level is chosen
+if (nNewLevel != mnInitialLevel)
+SetWarningLabel(XsResId(STR_RELOAD_FILE_WARNING));
+else
+{
+SetWarningLabel("");
+}
 }
 
 void MacroSecurityLevelTP::ClosePage()
diff --git a/xmlsecurity/uiconfig/ui/securitylevelpage.ui 
b/xmlsecurity/uiconfig/ui/securitylevelpage.ui
i

core.git: Branch 'distro/collabora/co-24.04' - 10 commits - configure.ac external/skia pyuno/source sc/source sd/source sw/source vcl/qa vcl/qt5 vcl/win writerfilter/source

2024-03-17 Thread Rafael Lima (via logerrit)
 configure.ac  |4 +-
 external/skia/Library_skia.mk |5 ++
 pyuno/source/module/pyuno.cxx |3 +
 pyuno/source/module/pyuno_callable.cxx|3 +
 pyuno/source/module/pyuno_iterator.cxx|6 +++
 pyuno/source/module/pyuno_runtime.cxx |3 +
 pyuno/source/module/pyuno_struct.cxx  |3 +
 sc/source/ui/miscdlgs/solveroptions.cxx   |2 -
 sd/source/core/drawdoc2.cxx   |6 ++-
 sd/source/core/sdpage.cxx |3 +
 sw/source/core/layout/tabfrm.cxx  |2 -
 sw/source/filter/ww8/wrtw8nds.cxx |   41 +++---
 vcl/qa/cppunit/pdfexport/data/tdf142133.docx  |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx|   35 ++
 vcl/qt5/QtInstance.cxx|5 ++
 vcl/win/window/salframe.cxx   |2 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   23 +++-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |3 +
 18 files changed, 115 insertions(+), 34 deletions(-)

New commits:
commit ae2fa89cf241942e5a80e4f3b08182bcdab138da
Author: Rafael Lima 
AuthorDate: Wed Mar 13 23:30:17 2024 +0100
Commit: Andras Timar 
CommitDate: Sun Mar 17 20:42:33 2024 +0100

tdf#160122 Increase height of the Solver Options dialog

Currently the Solver Options dialog (Tools - Solver and then click the 
Options button) has a height of 6 rows, which is good for the Linear and Swarm 
non-linear solvers, since they have 4-5 options.

However, the SCO and DEPS engines have 12 and 19 options, respectively, so 
it is very unconfortable to view and scroll through these options with such a 
small dialog.

This patch raises the height of the dialog to 12, so that scrolling is 
minimized, making it more confortable to navigate through the solver options.

Change-Id: I51c1c6880613818dd91c6bb8494775c863e8b406
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164749
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 58f565cb2dcf6e7b7eb2eb269776993516a29bf0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164875

diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx 
b/sc/source/ui/miscdlgs/solveroptions.cxx
index 3d5b2b47c178..81f5c8b7b4ce 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -69,7 +69,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog(weld::Window* 
pParent,
 , m_xBtnEdit(m_xBuilder->weld_button("edit"))
 {
 
m_xLbSettings->set_size_request(m_xLbSettings->get_approximate_digit_width() * 
32,
-m_xLbSettings->get_height_rows(6));
+m_xLbSettings->get_height_rows(12));
 
 m_xLbSettings->enable_toggle_buttons(weld::ColumnToggleType::Check);
 
commit 4756c7e6632f41ae48648f13ac463e6413f3315d
Author: Patrick Luby 
AuthorDate: Sat Mar 16 14:46:29 2024 -0400
Commit: Andras Timar 
CommitDate: Sun Mar 17 20:42:33 2024 +0100

tdf#160036 Enable SKSL when using Skia/Raster

Starting with the upgrade of Skia from m111 to m116, SKSL is disabled
by default for Skia/Raster so define SK_RASTER_PIPELINE_OPS_ALL to
enable it.

Change-Id: Ibd10efa0540f1e87123c341b529c8e3931e1a8fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164933
Tested-by: Jenkins
Reviewed-by: Patrick Luby 
(cherry picked from commit 22dbaf45fb378107ad7daa0d7894939d6e0c7ee3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164876
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk
index c2163d299327..55af14cd2daf 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_Library_add_defs,skia,\
 -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \
 $(if $(filter INTEL,$(CPUNAME)),$(if $(filter 
WNT,$(OS)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE1,-DSK_CPU_SSE_LEVEL=0)) \
 $(if $(filter X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2) 
\
+-DSK_ENABLE_SKSL_IN_RASTER_PIPELINE \
 ))
 
 # SK_DEBUG controls runtime checks and is controlled by config_skia.h and 
depends on DBG_UTIL.
@@ -565,6 +566,8 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,skia,\
 UnpackedTarball/skia/src/sksl/analysis/SkSLReturnsInputAlpha \
 UnpackedTarball/skia/src/sksl/analysis/SkSLSymbolTableStackBuilder \
 UnpackedTarball/skia/src/sksl/analysis/SkSLSwitchCaseContainsExit \
+UnpackedTarball/skia/src/sksl/analysis/SkSLGetLoopControlFlowInfo \
+UnpackedTarball/skia/src/sksl/analysis/SkSLIsDynamicallyUniformExpression \
 UnpackedTarball/skia/src/sksl/codegen/SkSLGLSLCodeGenerator \

core.git: Branch 'libreoffice-24-2' - sc/source

2024-03-17 Thread Rafael Lima (via logerrit)
 sc/source/ui/miscdlgs/solveroptions.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 765242935149dca7cb41e10462708739b71f2810
Author: Rafael Lima 
AuthorDate: Wed Mar 13 23:30:17 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Mar 17 17:12:27 2024 +0100

tdf#160122 Increase height of the Solver Options dialog

Currently the Solver Options dialog (Tools - Solver and then click the 
Options button) has a height of 6 rows, which is good for the Linear and Swarm 
non-linear solvers, since they have 4-5 options.

However, the SCO and DEPS engines have 12 and 19 options, respectively, so 
it is very unconfortable to view and scroll through these options with such a 
small dialog.

This patch raises the height of the dialog to 12, so that scrolling is 
minimized, making it more confortable to navigate through the solver options.

Change-Id: I51c1c6880613818dd91c6bb8494775c863e8b406
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164749
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 58f565cb2dcf6e7b7eb2eb269776993516a29bf0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164875

diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx 
b/sc/source/ui/miscdlgs/solveroptions.cxx
index 3d5b2b47c178..81f5c8b7b4ce 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -69,7 +69,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog(weld::Window* 
pParent,
 , m_xBtnEdit(m_xBuilder->weld_button("edit"))
 {
 
m_xLbSettings->set_size_request(m_xLbSettings->get_approximate_digit_width() * 
32,
-m_xLbSettings->get_height_rows(6));
+m_xLbSettings->get_height_rows(12));
 
 m_xLbSettings->enable_toggle_buttons(weld::ColumnToggleType::Check);
 


core.git: sc/source

2024-03-16 Thread Rafael Lima (via logerrit)
 sc/source/ui/miscdlgs/solveroptions.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f58b9659067de7fd8fcd8391b4bf1a2513cedaf7
Author: Rafael Lima 
AuthorDate: Wed Mar 13 23:30:17 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Mar 16 22:48:50 2024 +0100

tdf#160122 Increase height of the Solver Options dialog

Currently the Solver Options dialog (Tools - Solver and then click the 
Options button) has a height of 6 rows, which is good for the Linear and Swarm 
non-linear solvers, since they have 4-5 options.

However, the SCO and DEPS engines have 12 and 19 options, respectively, so 
it is very unconfortable to view and scroll through these options with such a 
small dialog.

This patch raises the height of the dialog to 12, so that scrolling is 
minimized, making it more confortable to navigate through the solver options.

Change-Id: I51c1c6880613818dd91c6bb8494775c863e8b406
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164749
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx 
b/sc/source/ui/miscdlgs/solveroptions.cxx
index 3d5b2b47c178..81f5c8b7b4ce 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -69,7 +69,7 @@ ScSolverOptionsDialog::ScSolverOptionsDialog(weld::Window* 
pParent,
 , m_xBtnEdit(m_xBuilder->weld_button("edit"))
 {
 
m_xLbSettings->set_size_request(m_xLbSettings->get_approximate_digit_width() * 
32,
-m_xLbSettings->get_height_rows(6));
+m_xLbSettings->get_height_rows(12));
 
 m_xLbSettings->enable_toggle_buttons(weld::ColumnToggleType::Check);
 


core.git: xmlsecurity/uiconfig

2024-03-16 Thread Rafael Lima (via logerrit)
 xmlsecurity/uiconfig/ui/securitylevelpage.ui |  102 +--
 1 file changed, 51 insertions(+), 51 deletions(-)

New commits:
commit 24cf7ffcb06c47e1084f08c7bcdcf15fb29f75ea
Author: Rafael Lima 
AuthorDate: Sat Mar 16 15:02:32 2024 +0100
Commit: Mike Kaganski 
CommitDate: Sat Mar 16 20:47:28 2024 +0100

Resave securitylevelpage.ui with newer Glade

Change-Id: I9a2c3b5d93453730baccec37fa0a3ac91808bad9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164873
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/xmlsecurity/uiconfig/ui/securitylevelpage.ui 
b/xmlsecurity/uiconfig/ui/securitylevelpage.ui
index 5292a72fcf17..911bed1c3768 100644
--- a/xmlsecurity/uiconfig/ui/securitylevelpage.ui
+++ b/xmlsecurity/uiconfig/ui/securitylevelpage.ui
@@ -1,29 +1,29 @@
 
-
+
 
   
-  
+  
   
 True
-False
+False
 True
 True
-6
+6
 vertical
-6
-12
-True
+6
+12
+True
 
   
 _Low (not recommended).
 All macros will be executed without confirmation.
 Use this setting only if you are certain that all documents that will be 
opened are safe.
 True
-True
-False
+True
+False
 True
-True
-True
+True
+True
 high
 
   
@@ -32,8 +32,8 @@ Use this setting only if you are certain that all documents 
that will be opened
 
   
   
-1
-3
+1
+3
   
 
 
@@ -41,11 +41,11 @@ Use this setting only if you are certain that all documents 
that will be opened
 _Medium.
 Confirmation required before executing macros from untrusted 
sources.
 True
-True
-False
+True
+False
 True
-True
-True
+True
+True
 high
 
   
@@ -54,8 +54,8 @@ Confirmation required before executing macros from untrusted 
sources.
 
   
   
-1
-2
+1
+2
   
 
 
@@ -64,12 +64,12 @@ Confirmation required before executing macros from 
untrusted sources.
 Only signed macros and macros from trusted file locations are executed.
 Unsigned macros are disabled.
 True
-True
-False
+True
+False
 True
-True
+True
 True
-True
+True
 
   
 Only signed macros or macros 
from a trusted file location are allowed to run. Macros signed with untrusted 
certificates will require confirmation to run, when located in untrusted file 
locations. Trusted certificates and trusted file locations can be set on the 
Trusted Sources tab page.
@@ -77,8 +77,8 @@ Unsigned macros are disabled.
 
   
   
-1
-1
+1
+1
   
 
 
@@ -87,11 +87,11 @@ Unsigned macros are disabled.
 Only macros from trusted file locations are allowed to run.
 All other macros, regardless whether signed or not, are disabled.
 True
-True
-False
+True
+False
 True
-True
-True
+True
+True
 high
 
   
@@ -100,60 +100,60 @@ All other macros, regardless whether signed or not, are 
disabled.
 
   
   
-1
-0
+1
+0
   
 
 
   
-False
-True
+False
+True
 center
 center
-res/lock.png
+res/lock.png
   
   
-0
-0
+0
+0
   
 
 
   
-False
-True
+False
+True
 center
 center
-res/lock.png
+res/lock.png
   
   
-0
-1
+0
+1
   
 
 
   
-False
-True
+False
+True
 center
 center
-res/lock.png
+res/lock.png
   
   
-0
-2
+0
+2
   
 
 
   
-False
-True
+False
+True
 center
 center
-res/lock.png
+res/lock.png
   
   
-0
-3
+0
+3
   
 
   


core.git: sc/qa sc/source

2024-03-12 Thread Rafael Lima (via logerrit)
 sc/qa/unit/data/xlsx/tdf156814.xlsx|binary
 sc/qa/unit/ucalc_solver.cxx|   48 +++
 sc/source/core/data/SolverSettings.cxx |   51 +
 3 files changed, 87 insertions(+), 12 deletions(-)

New commits:
commit d3049ab4786005c6bd17c66f8edcb98210bf511c
Author: Rafael Lima 
AuthorDate: Fri Mar 8 21:49:47 2024 +0100
Commit: Tomaž Vajngerl 
CommitDate: Tue Mar 12 15:36:28 2024 +0100

tdf#156814 Remove sheet name if range belongs to the same sheet (Solver)

When solver models are imported from XLSX, ranges come with sheet names 
even when they belong to the same sheet, which clutter the solver dialog.

This patch checks when this happens and remove sheet names when the solver 
model is imported.

Change-Id: I3994f1312667946aab330c734ff820e94673d018
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164610
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/qa/unit/data/xlsx/tdf156814.xlsx 
b/sc/qa/unit/data/xlsx/tdf156814.xlsx
new file mode 100644
index ..49e430b41554
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf156814.xlsx differ
diff --git a/sc/qa/unit/ucalc_solver.cxx b/sc/qa/unit/ucalc_solver.cxx
index 7834597e9c07..f7db19cad59a 100644
--- a/sc/qa/unit/ucalc_solver.cxx
+++ b/sc/qa/unit/ucalc_solver.cxx
@@ -34,19 +34,19 @@ std::vector 
SolverTest::CreateConstraintsModelA()
 std::vector aConstraints;
 
 ModelConstraint aConstr1;
-aConstr1.aLeftStr = "C1:C10";
+aConstr1.aLeftStr = "$C$1:$C$10";
 aConstr1.nOperator = CO_LESS_EQUAL;
 aConstr1.aRightStr = "100";
 aConstraints.push_back(aConstr1);
 
 ModelConstraint aConstr2;
-aConstr2.aLeftStr = "F5";
+aConstr2.aLeftStr = "$F$5";
 aConstr2.nOperator = CO_EQUAL;
 aConstr2.aRightStr = "500";
 aConstraints.push_back(aConstr2);
 
 ModelConstraint aConstr3;
-aConstr3.aLeftStr = "D1:D5";
+aConstr3.aLeftStr = "$D$1:$D$5";
 aConstr3.nOperator = CO_BINARY;
 aConstr3.aRightStr = "";
 aConstraints.push_back(aConstr3);
@@ -59,15 +59,15 @@ void SolverTest::TestConstraintsModelA(SolverSettings* 
pSettings)
 {
 std::vector aConstraints = pSettings->GetConstraints();
 
-CPPUNIT_ASSERT_EQUAL(OUString("C1:C10"), aConstraints[0].aLeftStr);
+CPPUNIT_ASSERT_EQUAL(OUString("$C$1:$C$10"), aConstraints[0].aLeftStr);
 CPPUNIT_ASSERT_EQUAL(CO_LESS_EQUAL, aConstraints[0].nOperator);
 CPPUNIT_ASSERT_EQUAL(OUString("100"), aConstraints[0].aRightStr);
 
-CPPUNIT_ASSERT_EQUAL(OUString("F5"), aConstraints[1].aLeftStr);
+CPPUNIT_ASSERT_EQUAL(OUString("$F$5"), aConstraints[1].aLeftStr);
 CPPUNIT_ASSERT_EQUAL(CO_EQUAL, aConstraints[1].nOperator);
 CPPUNIT_ASSERT_EQUAL(OUString("500"), aConstraints[1].aRightStr);
 
-CPPUNIT_ASSERT_EQUAL(OUString("D1:D5"), aConstraints[2].aLeftStr);
+CPPUNIT_ASSERT_EQUAL(OUString("$D$1:$D$5"), aConstraints[2].aLeftStr);
 CPPUNIT_ASSERT_EQUAL(CO_BINARY, aConstraints[2].nOperator);
 CPPUNIT_ASSERT_EQUAL(OUString(""), aConstraints[2].aRightStr);
 }
@@ -93,19 +93,19 @@ CPPUNIT_TEST_FIXTURE(SolverTest, testSingleModel)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), 
pSettings->GetParameter(SP_CONSTR_COUNT).toInt32());
 
 // Create a simple model
-pSettings->SetParameter(SP_OBJ_CELL, OUString("A1"));
+pSettings->SetParameter(SP_OBJ_CELL, OUString("$A$1"));
 pSettings->SetParameter(SP_OBJ_TYPE, OUString::number(OT_MINIMIZE));
 pSettings->SetParameter(SP_OBJ_VAL, OUString::number(0));
-pSettings->SetParameter(SP_VAR_CELLS, OUString("D1:D5"));
+pSettings->SetParameter(SP_VAR_CELLS, OUString("$D$1:$D$5"));
 std::vector aConstraints = CreateConstraintsModelA();
 pSettings->SetConstraints(aConstraints);
 
 // Test if the model parameters were set
-CPPUNIT_ASSERT_EQUAL(OUString("A1"), pSettings->GetParameter(SP_OBJ_CELL));
+CPPUNIT_ASSERT_EQUAL(OUString("$A$1"), 
pSettings->GetParameter(SP_OBJ_CELL));
 CPPUNIT_ASSERT_EQUAL(static_cast(OT_MINIMIZE),
  pSettings->GetParameter(SP_OBJ_TYPE).toInt32());
 CPPUNIT_ASSERT_EQUAL(OUString("0"), pSettings->GetParameter(SP_OBJ_VAL));
-CPPUNIT_ASSERT_EQUAL(OUString("D1:D5"), 
pSettings->GetParameter(SP_VAR_CELLS));
+CPPUNIT_ASSERT_EQUAL(OUString("$D$1:$D$5"), 
pSettings->GetParameter(SP_VAR_CELLS));
 
 // Test if the constraints were correctly set before saving
 CPPUNIT_ASSERT_EQUAL(sal_Int32(3), 
pSettings->GetParameter(SP_CONSTR_COUNT).toInt32());
@@ -120,11 +120,11 @@ CPPUNIT_TEST_FIXTURE(SolverTest, testSingleModel)
 CPPUNIT_ASSERT(pSettings);
 
 // Test if the model parameters remain set in the file
-CPPUNIT_ASSERT_EQUAL(OUString("A1"), pSettings->GetParameter(SP_OBJ_CELL));
+CPPUNIT_ASSERT_EQUAL(OUString("$A$1"), 
pSettings->GetParameter(SP_OBJ_CELL));
 CPPUNIT_ASSERT_EQUAL(static_cast(OT_MINIMIZE),
  pSettings->GetParameter(SP_O

core.git: Branch 'libreoffice-24-2' - sc/inc sc/qa sc/source

2024-03-07 Thread Rafael Lima (via logerrit)
 sc/inc/SolverSettings.hxx  |  117 -
 sc/qa/unit/data/ods/tdf158735.ods  |binary
 sc/qa/unit/ucalc_solver.cxx|   29 
 sc/source/core/data/SolverSettings.cxx |  220 +
 4 files changed, 356 insertions(+), 10 deletions(-)

New commits:
commit fa8351c50bd8f14830a461c09805e43c6fdb065d
Author: Rafael Lima 
AuthorDate: Mon Mar 4 19:01:40 2024 +0100
Commit: Xisco Fauli 
CommitDate: Thu Mar 7 12:11:37 2024 +0100

tdf#158735 Save solver settings for DEPS and SCO as well

When bug tdf#38948 was originally fixed, the solvers DEPS and SCO were not 
considered. This caused a regression, because setting engine options for these 
solvers made them never be saved, even in its own sheet.

This patch fixes that by incorporating the engine options for DEPS and SCO.

Change-Id: I93af712f91da2f7b1ac57ed74f6c2c2d7d411bba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164376
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 04d884cc99eb66679fb254129b54488bd40e5abf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164385
Reviewed-by: Xisco Fauli 

diff --git a/sc/inc/SolverSettings.hxx b/sc/inc/SolverSettings.hxx
index ec1ef994a7b8..985e8d30f796 100644
--- a/sc/inc/SolverSettings.hxx
+++ b/sc/inc/SolverSettings.hxx
@@ -39,11 +39,34 @@ enum SolverParameter
 SP_LO_ENGINE, // Engine name used in LO
 SP_MS_ENGINE, // Engine ID used in MSO
 SP_INTEGER, // Assume all variables are integer (0: no, 1: yes)
+// LpSolve, CoinMP and SwarmSolver
 SP_NON_NEGATIVE, // Assume non negativity (1: yes, 2: no)
 SP_EPSILON_LEVEL, // Epsilon level
 SP_LIMIT_BBDEPTH, // Branch and bound depth
 SP_TIMEOUT, // Time limit to return a solution
-SP_ALGORITHM // Algorithm used by the SwarmSolver (1, 2 or 3)
+SP_ALGORITHM, // Algorithm used by the SwarmSolver (1, 2 or 3)
+// Engine options common for DEPS and SCO
+SP_SWARM_SIZE, // Size of Swarm
+SP_LEARNING_CYCLES, // Learning Cycles
+SP_GUESS_VARIABLE_RANGE, // Variable Bounds Guessing
+SP_VARIABLE_RANGE_THRESHOLD, // Variable Bounds Threshold (when guessing)
+SP_ACR_COMPARATOR, // Use ACR Comparator (instead of BCH)
+SP_RND_STARTING_POINT, // Use Random starting point
+SP_STRONGER_PRNG, // Use a stronger random generator (slower)
+SP_STAGNATION_LIMIT, // Stagnation Limit
+SP_STAGNATION_TOLERANCE, // Stagnation Tolerance
+SP_ENHANCED_STATUS, // Show enhanced solver status
+// DEPS Options
+SP_AGENT_SWITCH_RATE, // Agent Switch Rate (DE Probability)
+SP_SCALING_MIN, // DE: Min Scaling Factor (0-1.2)
+SP_SCALING_MAX, // DE: Max Scaling Factor (0-1.2)
+SP_CROSSOVER_PROB, // DE: Crossover Probability (0-1)
+SP_COGNITIVE_CONST, // Cognitive Constant
+SP_SOCIAL_CONST, // Social Constant
+SP_CONSTRICTION_COEFF, // PS: Constriction Coefficient
+SP_MUTATION_PROB, // Mutation Probability (0-0.005)
+// SCO Options
+SP_LIBRARY_SIZE, // Size of library
 };
 
 // Starts at 1 to maintain MS compatibility
@@ -123,6 +146,28 @@ private:
 OUString m_sLimitBBDepth;
 OUString m_sTimeout;
 OUString m_sAlgorithm;
+// DEPS and SCO
+OUString m_sSwarmSize;
+OUString m_sLearningCycles;
+OUString m_sGuessVariableRange;
+OUString m_sVariableRangeThreshold;
+OUString m_sUseACRComparator;
+OUString m_sUseRandomStartingPoint;
+OUString m_sUseStrongerPRNG;
+OUString m_sStagnationLimit;
+OUString m_sTolerance;
+OUString m_sEnhancedSolverStatus;
+// DEPS only
+OUString m_sAgentSwitchRate;
+OUString m_sScalingFactorMin;
+OUString m_sScalingFactorMax;
+OUString m_sCrossoverProbability;
+OUString m_sCognitiveConstant;
+OUString m_sSocialConstant;
+OUString m_sConstrictionCoeff;
+OUString m_sMutationProbability;
+OUString m_sLibrarySize;
+
 css::uno::Sequence m_aEngineOptions;
 
 std::vector m_aConstraints;
@@ -131,7 +176,9 @@ private:
 
 // Used to create or read a single solver parameter based on its named 
range
 bool ReadParamValue(SolverParameter eParam, OUString& rValue, bool 
bRemoveQuotes = false);
+bool ReadDoubleParamValue(SolverParameter eParam, OUString& rValue);
 void WriteParamValue(SolverParameter eParam, OUString sValue, bool bQuoted 
= false);
+void WriteDoubleParamValue(SolverParameter eParam, std::u16string_view 
sValue);
 
 // Creates or reads all constraints stored in named ranges
 void ReadConstraints();
@@ -149,19 +196,46 @@ private:
 
 // Maps solver parameters to named ranges
 std::map m_mNamedRanges
-= { { SP_OBJ_CELL, "solver_opt" },  { SP_OBJ_TYPE, "solver_typ" },
-{ SP_OBJ_VAL, "solver_val" },   { SP_VAR_CELLS, "solver_adj" },
-{ SP_CONSTR_COUNT, "solver_num" },  { SP_LO_ENGINE, 
"solver_lo_eng" },
-{ SP_MS_ENGINE, "solver_eng" }, 

core.git: sc/inc sc/qa sc/source

2024-03-05 Thread Rafael Lima (via logerrit)
 sc/inc/SolverSettings.hxx  |  117 -
 sc/qa/unit/data/ods/tdf158735.ods  |binary
 sc/qa/unit/ucalc_solver.cxx|   29 
 sc/source/core/data/SolverSettings.cxx |  220 +
 4 files changed, 356 insertions(+), 10 deletions(-)

New commits:
commit 04d884cc99eb66679fb254129b54488bd40e5abf
Author: Rafael Lima 
AuthorDate: Mon Mar 4 19:01:40 2024 +0100
Commit: Tomaž Vajngerl 
CommitDate: Wed Mar 6 04:33:24 2024 +0100

tdf#158735 Save solver settings for DEPS and SCO as well

When bug tdf#38948 was originally fixed, the solvers DEPS and SCO were not 
considered. This caused a regression, because setting engine options for these 
solvers made them never be saved, even in its own sheet.

This patch fixes that by incorporating the engine options for DEPS and SCO.

Change-Id: I93af712f91da2f7b1ac57ed74f6c2c2d7d411bba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164376
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/inc/SolverSettings.hxx b/sc/inc/SolverSettings.hxx
index ec1ef994a7b8..985e8d30f796 100644
--- a/sc/inc/SolverSettings.hxx
+++ b/sc/inc/SolverSettings.hxx
@@ -39,11 +39,34 @@ enum SolverParameter
 SP_LO_ENGINE, // Engine name used in LO
 SP_MS_ENGINE, // Engine ID used in MSO
 SP_INTEGER, // Assume all variables are integer (0: no, 1: yes)
+// LpSolve, CoinMP and SwarmSolver
 SP_NON_NEGATIVE, // Assume non negativity (1: yes, 2: no)
 SP_EPSILON_LEVEL, // Epsilon level
 SP_LIMIT_BBDEPTH, // Branch and bound depth
 SP_TIMEOUT, // Time limit to return a solution
-SP_ALGORITHM // Algorithm used by the SwarmSolver (1, 2 or 3)
+SP_ALGORITHM, // Algorithm used by the SwarmSolver (1, 2 or 3)
+// Engine options common for DEPS and SCO
+SP_SWARM_SIZE, // Size of Swarm
+SP_LEARNING_CYCLES, // Learning Cycles
+SP_GUESS_VARIABLE_RANGE, // Variable Bounds Guessing
+SP_VARIABLE_RANGE_THRESHOLD, // Variable Bounds Threshold (when guessing)
+SP_ACR_COMPARATOR, // Use ACR Comparator (instead of BCH)
+SP_RND_STARTING_POINT, // Use Random starting point
+SP_STRONGER_PRNG, // Use a stronger random generator (slower)
+SP_STAGNATION_LIMIT, // Stagnation Limit
+SP_STAGNATION_TOLERANCE, // Stagnation Tolerance
+SP_ENHANCED_STATUS, // Show enhanced solver status
+// DEPS Options
+SP_AGENT_SWITCH_RATE, // Agent Switch Rate (DE Probability)
+SP_SCALING_MIN, // DE: Min Scaling Factor (0-1.2)
+SP_SCALING_MAX, // DE: Max Scaling Factor (0-1.2)
+SP_CROSSOVER_PROB, // DE: Crossover Probability (0-1)
+SP_COGNITIVE_CONST, // Cognitive Constant
+SP_SOCIAL_CONST, // Social Constant
+SP_CONSTRICTION_COEFF, // PS: Constriction Coefficient
+SP_MUTATION_PROB, // Mutation Probability (0-0.005)
+// SCO Options
+SP_LIBRARY_SIZE, // Size of library
 };
 
 // Starts at 1 to maintain MS compatibility
@@ -123,6 +146,28 @@ private:
 OUString m_sLimitBBDepth;
 OUString m_sTimeout;
 OUString m_sAlgorithm;
+// DEPS and SCO
+OUString m_sSwarmSize;
+OUString m_sLearningCycles;
+OUString m_sGuessVariableRange;
+OUString m_sVariableRangeThreshold;
+OUString m_sUseACRComparator;
+OUString m_sUseRandomStartingPoint;
+OUString m_sUseStrongerPRNG;
+OUString m_sStagnationLimit;
+OUString m_sTolerance;
+OUString m_sEnhancedSolverStatus;
+// DEPS only
+OUString m_sAgentSwitchRate;
+OUString m_sScalingFactorMin;
+OUString m_sScalingFactorMax;
+OUString m_sCrossoverProbability;
+OUString m_sCognitiveConstant;
+OUString m_sSocialConstant;
+OUString m_sConstrictionCoeff;
+OUString m_sMutationProbability;
+OUString m_sLibrarySize;
+
 css::uno::Sequence m_aEngineOptions;
 
 std::vector m_aConstraints;
@@ -131,7 +176,9 @@ private:
 
 // Used to create or read a single solver parameter based on its named 
range
 bool ReadParamValue(SolverParameter eParam, OUString& rValue, bool 
bRemoveQuotes = false);
+bool ReadDoubleParamValue(SolverParameter eParam, OUString& rValue);
 void WriteParamValue(SolverParameter eParam, OUString sValue, bool bQuoted 
= false);
+void WriteDoubleParamValue(SolverParameter eParam, std::u16string_view 
sValue);
 
 // Creates or reads all constraints stored in named ranges
 void ReadConstraints();
@@ -149,19 +196,46 @@ private:
 
 // Maps solver parameters to named ranges
 std::map m_mNamedRanges
-= { { SP_OBJ_CELL, "solver_opt" },  { SP_OBJ_TYPE, "solver_typ" },
-{ SP_OBJ_VAL, "solver_val" },   { SP_VAR_CELLS, "solver_adj" },
-{ SP_CONSTR_COUNT, "solver_num" },  { SP_LO_ENGINE, 
"solver_lo_eng" },
-{ SP_MS_ENGINE, "solver_eng" }, { SP_INTEGER, "solver_int" },
-{ SP_NON_NEGATIVE, "solver_neg" },  { SP_EPSILON_LEVEL, 
"solver_eps" },
-{ SP_LIMIT_BBDEPTH, "solver_bbd

core.git: sc/source

2024-02-29 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/tabvwshf.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3432dec53cfa6409dffebfdd67ce663362c71115
Author: Rafael Lima 
AuthorDate: Thu Feb 22 21:36:55 2024 +0100
Commit: Mike Kaganski 
CommitDate: Thu Feb 29 12:28:04 2024 +0100

tdf#159847 Fix "Duplicate Sheet" when two files have the same name

Prior to this fix, if two files were opened and had the same file name (but 
in a different directory), Calc might not create the duplicate sheet in the 
correct file.

Change-Id: I7cdbdd2f3dae6752a3b78bbdcb74fbecb5b24b68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163763
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index f73925b23c6b..dd0a12930870 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -212,7 +212,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
 {
 // Get info about current document and selected tab
 SCTAB nTab = rViewData.GetTabNo();
-OUString aDocName = GetViewData().GetDocShell()->GetTitle();
+OUString aDocName = 
GetViewData().GetDocShell()->GetTitle(SFX_TITLE_FULLNAME);
 sal_uInt16 nDoc = 0;
 bool bCpy = true;
 
@@ -229,7 +229,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
 {
 pScSh->GetTitle();
 
-if (aDocName == pScSh->GetTitle())
+if (aDocName == pScSh->GetTitle(SFX_TITLE_FULLNAME))
 {
 nDoc = i;
 break;


core.git: cui/source

2024-02-05 Thread Rafael Lima (via logerrit)
 cui/source/options/treeopt.cxx |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit 263e431f76447c6933343a4a07c9ed6d193af867
Author: Rafael Lima 
AuthorDate: Thu Feb 1 13:04:20 2024 +0100
Commit: Julien Nabet 
CommitDate: Mon Feb 5 18:50:58 2024 +0100

tdf#159476 Remove experimental status from Basic IDE entry in Options dialog

Change-Id: Icbc9d131d90e639490f6dfd896565c994a17b172
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162829
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 7d0ae590b49b..2c8abb9cfa5e 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1757,13 +1757,6 @@ void OfaTreeOptionsDialog::generalOptions(const 
std::vector& vPageId
 continue;
 }
 
-// Disable Basic IDE options, if experimental features are not 
enabled
-if( RID_SVXPAGE_BASICIDE_OPTIONS == nPageId )
-{
-if( ! officecfg::Office::Common::Misc::ExperimentalMode::get() 
)
-continue;
-}
-
 if (!vPageId.empty())
 {
 if (std::find(vPageId.begin(), vPageId.end(), nPageId) != 
vPageId.end())


core.git: 2 commits - basctl/sdi basctl/source basctl/uiconfig include/sfx2 include/vcl officecfg/registry sfx2/sdi svx/source vcl/source

2024-02-01 Thread Rafael Lima (via logerrit)
 basctl/sdi/baside.sdi |6 
 basctl/source/basicide/baside2.cxx|6 
 basctl/source/basicide/basides1.cxx   |7 
 basctl/source/basicide/unomodel.cxx   |   51 ++
 basctl/source/basicide/unomodel.hxx   |3 
 basctl/uiconfig/basicide/menubar/menubar.xml  |2 
 include/sfx2/sfxsids.hrc  |1 
 include/vcl/textview.hxx  |3 
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu|6 
 officecfg/registry/data/org/openoffice/Office/UI/BasicIDECommands.xcu |5 
 sfx2/sdi/sfx.sdi  |   16 
 svx/source/tbxctrls/tbunosearchcontrollers.cxx|   20 -
 vcl/source/edit/textview.cxx  |  177 
++
 13 files changed, 298 insertions(+), 5 deletions(-)

New commits:
commit 22b5007e2740e1f461968f3c8e919326eb4d4785
Author: Rafael Lima 
AuthorDate: Sat Jan 13 22:26:48 2024 +0100
Commit: Andreas Heinisch 
CommitDate: Thu Feb 1 13:37:28 2024 +0100

tdf#140004 Toggle comment in the Basic IDE

This patch adds the "toggle comment" functionality to the Basic IDE.
The shortcut Ctrl + Alt + C is used to execute it.

It works similarly to other code editors such as Kate and VSCode.

Change-Id: Ifdae42b3729cc909baf87c729fe8c3cdf6428184
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162005
Reviewed-by: Andreas Heinisch 
Tested-by: Andreas Heinisch 

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 74b425cf6db4..34f34a6362e2 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -688,6 +688,12 @@ shell basctl_Shell
 ExecMethod  = ExecuteDialog;
 StateMethod = GetState;
 ]
+
+SID_TOGGLE_COMMENT
+[
+StateMethod = GetState;
+ExecMethod  = ExecuteGlobal;
+]
 }
 
 interface BasicIDEDocument
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index db9b109f7947..62bbaa799815 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1066,6 +1066,12 @@ void ModulWindow::ExecuteGlobal (SfxRequest& rReq)
 GetDispatcher()->Execute(SID_GOTOLINE);
 }
 break;
+
+case SID_TOGGLE_COMMENT:
+{
+GetEditView()->ToggleComment();
+}
+break;
 }
 }
 
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 8052845983f3..6fe3b9a562f6 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1235,6 +1235,13 @@ void Shell::GetState(SfxItemSet &rSet)
 rSet.DisableItem( nWh );
 }
 break;
+case SID_TOGGLE_COMMENT:
+{
+// Only available in a ModulWindow if the document can be 
edited
+if (pCurWin && (!dynamic_cast(pCurWin.get()) || 
pCurWin->IsReadOnly()))
+rSet.DisableItem(nWh);
+}
+break;
 case SID_GOTOLINE:
 {
 // if this is not a module window hide the
diff --git a/basctl/uiconfig/basicide/menubar/menubar.xml 
b/basctl/uiconfig/basicide/menubar/menubar.xml
index d649f968c8d9..bf41ce562bec 100644
--- a/basctl/uiconfig/basicide/menubar/menubar.xml
+++ b/basctl/uiconfig/basicide/menubar/menubar.xml
@@ -55,6 +55,7 @@
 
 
 
+
 
 
 
@@ -177,4 +178,3 @@
 
 
 
-
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 4c8a080c1b2f..176e500c55b3 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -670,6 +670,7 @@ class SvxZoomItem;
 #define SID_BASICIDE_WATCH  TypedWhichId( 
SID_BASICIDE_START + 55 )
 #define SID_BASICIDE_STACK  TypedWhichId( 
SID_BASICIDE_START + 56 )
 #define SID_BASICIDE_COLOR_SCHEME_DLG   ( SID_BASICIDE_START + 57 )
+#define SID_TOGGLE_COMMENT  ( SID_BASICIDE_START + 58 )
 #define SID_OPTIONS_TREEDIALOG  ( SID_BASICIDE_START + 862)
 #define SID_OPTIONS_SECURITY( SID_BASICIDE_START + 863)
 
diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx
index 84a89e8c58d8..0de1f7c0d5a9 100644
--- a/include/vcl/textview.hxx
+++ b/include/vcl/textview.hxx
@@ -222,6 +222,9 @@ public:
 
 boolIndentBlock();
 boolUnindentBlock();
+
+// Used in the Basic IDE to toggle comment on a block of code
+voidToggleComment();
 };
 
 #endif
diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecf

core.git: basctl/source

2024-01-31 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/baside2.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit df0c602aa6579604bc734bbfb5956261eb026b23
Author: Rafael Lima 
AuthorDate: Wed Jan 31 13:54:43 2024 +0100
Commit: Andreas Heinisch 
CommitDate: Wed Jan 31 22:58:22 2024 +0100

Related tdf#158750 Fix line highlight for all modules when color scheme 
changes

Prior to this patch, if a library had multiple modules and the color scheme 
was changed (via View - Color Scheme), the line hightlight color would only 
update for the current module and remain unchanged for the other modules in the 
same library.

Change-Id: Idda78c07d02534dfedcd927c37116a2617500ebc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162818
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 98f016a57236..db9b109f7947 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1450,6 +1450,7 @@ void ModulWindow::SetEditorColorScheme(const OUString& 
rColorScheme)
 Wallpaper aBackgroundColor(GetLayout().GetSyntaxBackgroundColor());
 rEditWindow.SetBackground(aBackgroundColor);
 
rEditWindow.GetWindow(GetWindowType::Border)->SetBackground(aBackgroundColor);
+
rEditWindow.SetLineHighlightColor(GetShell()->GetColorConfig()->GetColorScheme(rColorScheme).m_aLineHighlightColor);
 
 // The EditEngine is created only when the module is actually opened for 
the first time,
 // therefore we need to check if it actually exists before updating its 
syntax highlighting


core.git: Branch 'libreoffice-7-6' - sc/source

2024-01-30 Thread Rafael Lima (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 341840f4f97ca03b3d2e416014f4f406cb8b2a2f
Author: Rafael Lima 
AuthorDate: Tue Jan 23 23:36:11 2024 +0100
Commit: Xisco Fauli 
CommitDate: Tue Jan 30 09:28:16 2024 +0100

tdf#159329 Fix AutoFilter arrow color in dark mode

When using dark mode, the arrow is black over a dark background. This patch 
makes it use the dialog text color for better contrast.

Change-Id: Icf07d50599191417dee294e1f4c925fe1a8a7655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162460
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
(cherry picked from commit b0f678ca59a65a3c302c3c3a499230fbc52ed5bd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162616
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 2ff0e4a4dc00..71654ec5b886 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -171,14 +171,7 @@ void ScCheckListMenuControl::CreateDropDown()
 {
 const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
 
-// tdf#151820 The color used for the arrow head depends on the background 
color
-Color aBackgroundColor = rStyleSettings.GetWindowColor();
-Color aSpinColor;
-if (aBackgroundColor.IsDark())
-aSpinColor = rStyleSettings.GetLightColor();
-else
-aSpinColor = rStyleSettings.GetDarkShadowColor();
-
+Color aSpinColor = rStyleSettings.GetDialogTextColor();
 int nWidth = (mxMenu->get_text_height() * 3) / 4;
 mxDropDown->SetOutputSizePixel(Size(nWidth, nWidth));
 DecorationView aDecoView(mxDropDown.get());


core.git: Branch 'distro/collabora/co-24.04' - 19 commits - basctl/source canvas/source cui/uiconfig external/onlineupdate offapi/com oox/source readlicense_oo/license sc/qa sc/source sd/source sfx2/s

2024-01-29 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/baside2b.cxx   |9 
 canvas/source/cairo/cairo_canvashelper.cxx|2 
 cui/uiconfig/ui/linetabpage.ui|1 
 external/onlineupdate/lo.patch|   13 
 offapi/com/sun/star/style/CharacterProperties.idl |8 
 oox/source/drawingml/chart/chartspaceconverter.cxx|3 
 readlicense_oo/license/CREDITS.fodt   | 4851 +-
 sc/qa/uitest/calc_tests8/navigator.py |   27 
 sc/source/ui/cctrl/checklistmenu.cxx  |9 
 sc/source/ui/navipi/navipi.cxx|1 
 sd/source/ui/view/drviewsf.cxx|   15 
 sfx2/source/doc/guisaveas.cxx |2 
 svl/source/crypto/cryptosign.cxx  |5 
 svx/source/accessibility/AccessibleShape.cxx  |2 
 sw/inc/ndtxt.hxx  |2 
 sw/qa/core/text/data/tdf159336.odt|binary
 sw/qa/core/text/text.cxx  |   35 
 sw/qa/uitest/data/tdf106733.fodt  |   66 
 sw/qa/uitest/writer_tests8/tdf106733.py   |  112 
 sw/qa/uitest/writer_tests8/tdf159102.py   |   42 
 sw/source/core/inc/txtfrm.hxx |2 
 sw/source/core/layout/frmtool.cxx |   27 
 sw/source/core/layout/trvlfrm.cxx |   67 
 sw/source/core/text/EnhancedPDFExportHelper.cxx   |5 
 sw/source/core/text/guess.cxx |7 
 sw/source/core/text/itrcrsr.cxx   |5 
 sw/source/core/text/itrform2.cxx  |2 
 sw/source/core/text/txtfrm.cxx|4 
 sw/source/core/txtnode/thints.cxx |   25 
 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |   12 
 vcl/qa/cppunit/pdfexport/data/LinkPages.fodt  |  138 
 vcl/qa/cppunit/pdfexport/pdfexport.cxx|  607 ++
 vcl/qt5/QtWidget.cxx  |3 
 xmloff/source/text/txtprmap.cxx   |2 
 34 files changed, 3731 insertions(+), 2380 deletions(-)

New commits:
commit d48d8a41699f5a4d3cfad5d924ed9dd4ed628fcd
Author: Rafael Lima 
AuthorDate: Tue Jan 23 23:36:11 2024 +0100
Commit: Andras Timar 
CommitDate: Mon Jan 29 10:30:26 2024 +0100

tdf#159329 Fix AutoFilter arrow color in dark mode

When using dark mode, the arrow is black over a dark background. This patch 
makes it use the dialog text color for better contrast.

Change-Id: Icf07d50599191417dee294e1f4c925fe1a8a7655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162460
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
(cherry picked from commit b0f678ca59a65a3c302c3c3a499230fbc52ed5bd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162615
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index ecee4dab0600..d11d5405347e 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -171,14 +171,7 @@ void ScCheckListMenuControl::CreateDropDown()
 {
 const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
 
-// tdf#151820 The color used for the arrow head depends on the background 
color
-Color aBackgroundColor = rStyleSettings.GetWindowColor();
-Color aSpinColor;
-if (aBackgroundColor.IsDark())
-aSpinColor = rStyleSettings.GetLightColor();
-else
-aSpinColor = rStyleSettings.GetDarkShadowColor();
-
+Color aSpinColor = rStyleSettings.GetDialogTextColor();
 int nWidth = (mxMenu->get_text_height() * 3) / 4;
 mxDropDown->SetOutputSizePixel(Size(nWidth, nWidth), /*bErase*/true, 
/*bAlphaMaskTransparent*/true);
 DecorationView aDecoView(mxDropDown.get());
commit 3ef06c78e05fe41414720172865cfc4df5f1ba26
Author: Oliver Specht 
AuthorDate: Tue Dec 12 15:51:42 2023 +0100
Commit: Andras Timar 
CommitDate: Mon Jan 29 10:30:26 2024 +0100

tdf#158652 notify navigator on insert/edit/delete comment

links changes of the drawing engine to comments as it was
done before with pictures, shapes and OLE objects
ui unit test included

Change-Id: I4fde3a82b80e73758fb3da94ed2553453d09e9ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160624
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 0097f8595791f4bbf499ebd423f4f80ec8e38dbe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162381
Reviewed-by: Caolán McNamara 

diff --git a/sc/qa/uitest/calc_tests8/navigator.py 
b/sc/qa/uitest/calc_tests8/navigator.py
index ec8fa2ae9a2e..9c1769dcf49d 100644
--- a/sc/qa/uitest/calc_tests8/navigator.py
+++ b/sc/qa/uitest/calc_tests8/navigator.py
@@ -10,6 +10,7 @@
 from uitest.framework import UITestCase
 from libreoffice.u

core.git: Branch 'libreoffice-24-2' - sc/source

2024-01-29 Thread Rafael Lima (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit d60520f8aabefd8f2893b8656c555c25be93c16c
Author: Rafael Lima 
AuthorDate: Tue Jan 23 23:36:11 2024 +0100
Commit: Xisco Fauli 
CommitDate: Mon Jan 29 10:22:19 2024 +0100

tdf#159329 Fix AutoFilter arrow color in dark mode

When using dark mode, the arrow is black over a dark background. This patch 
makes it use the dialog text color for better contrast.

Change-Id: Icf07d50599191417dee294e1f4c925fe1a8a7655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162460
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
(cherry picked from commit b0f678ca59a65a3c302c3c3a499230fbc52ed5bd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162615
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 92e7096fc25a..578c248b7f9c 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -171,14 +171,7 @@ void ScCheckListMenuControl::CreateDropDown()
 {
 const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
 
-// tdf#151820 The color used for the arrow head depends on the background 
color
-Color aBackgroundColor = rStyleSettings.GetWindowColor();
-Color aSpinColor;
-if (aBackgroundColor.IsDark())
-aSpinColor = rStyleSettings.GetLightColor();
-else
-aSpinColor = rStyleSettings.GetDarkShadowColor();
-
+Color aSpinColor = rStyleSettings.GetDialogTextColor();
 int nWidth = (mxMenu->get_text_height() * 3) / 4;
 mxDropDown->SetOutputSizePixel(Size(nWidth, nWidth), /*bErase*/true, 
/*bAlphaMaskTransparent*/true);
 DecorationView aDecoView(mxDropDown.get());


core.git: basctl/source

2024-01-26 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/baside2b.cxx |5 +
 basctl/source/basicide/linenumberwindow.cxx |3 +++
 2 files changed, 8 insertions(+)

New commits:
commit 80480fb5ecc18a0a9b6c45cc35eba721f636
Author: Rafael Lima 
AuthorDate: Wed Jan 24 22:42:47 2024 +0100
Commit: Hossein 
CommitDate: Fri Jan 26 17:05:48 2024 +0100

tdf#153853 Line numbering and breakpoint should be on the left (RTL)

As requested by the user in the ticket, the Line Numering and Breakpoint 
windows should be on the left side, even on RTL locales.

Change-Id: Iad2ba8efa0a23a13cf88c2fa277c4eed45002aae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162540
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 9ee9c70c23ac..e5fd31d22a21 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2050,6 +2050,10 @@ ComplexEditorWindow::ComplexEditorWindow( ModulWindow* 
pParent ) :
 aEWVScrollBar(VclPtr::Create(this, false)),
 aEWHScrollBar(VclPtr::Create(this, true))
 {
+// tdf#153853 The line numbering and breakpoint windows should appear on
+// the left, even on RTL locales
+EnableRTL(false);
+
 aEdtWindow->Show();
 aBrkWindow->Show();
 
@@ -2858,6 +2862,7 @@ CodeCompleteWindow::CodeCompleteWindow(EditorWindow* pPar)
 m_xListBox->connect_changed(LINK(this, CodeCompleteWindow, ImplSelectHdl));
 m_xListBox->connect_key_press(LINK(this, CodeCompleteWindow, KeyInputHdl));
 m_xListBox->make_sorted();
+m_xListBox->set_direction(false);
 
 m_xListBox->set_size_request(150, 150); // default, this will adopt the 
line length
 SetSizePixel(m_xContainer->get_preferred_size());
diff --git a/basctl/source/basicide/linenumberwindow.cxx 
b/basctl/source/basicide/linenumberwindow.cxx
index 7b4b07da726f..80fff0872f10 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -21,6 +21,9 @@ LineNumberWindow::LineNumberWindow(vcl::Window* pParent, 
ModulWindow* pModulWind
 , m_pModulWindow(pModulWindow)
 , m_nCurYOffset(0)
 {
+// tdf#153853 The line number window does not need to be affected by RTL
+EnableRTL(false);
+
 const Wallpaper 
aBackground(GetSettings().GetStyleSettings().GetWindowColor());
 SetBackground(aBackground);
 GetWindow(GetWindowType::Border)->SetBackground(aBackground);


core.git: sc/source

2024-01-26 Thread Rafael Lima (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit b0f678ca59a65a3c302c3c3a499230fbc52ed5bd
Author: Rafael Lima 
AuthorDate: Tue Jan 23 23:36:11 2024 +0100
Commit: Rafael Lima 
CommitDate: Fri Jan 26 14:37:36 2024 +0100

tdf#159329 Fix AutoFilter arrow color in dark mode

When using dark mode, the arrow is black over a dark background. This patch 
makes it use the dialog text color for better contrast.

Change-Id: Icf07d50599191417dee294e1f4c925fe1a8a7655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162460
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index ecee4dab0600..d11d5405347e 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -171,14 +171,7 @@ void ScCheckListMenuControl::CreateDropDown()
 {
 const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
 
-// tdf#151820 The color used for the arrow head depends on the background 
color
-Color aBackgroundColor = rStyleSettings.GetWindowColor();
-Color aSpinColor;
-if (aBackgroundColor.IsDark())
-aSpinColor = rStyleSettings.GetLightColor();
-else
-aSpinColor = rStyleSettings.GetDarkShadowColor();
-
+Color aSpinColor = rStyleSettings.GetDialogTextColor();
 int nWidth = (mxMenu->get_text_height() * 3) / 4;
 mxDropDown->SetOutputSizePixel(Size(nWidth, nWidth), /*bErase*/true, 
/*bAlphaMaskTransparent*/true);
 DecorationView aDecoView(mxDropDown.get());


core.git: sw/uiconfig

2024-01-25 Thread Rafael Lima (via logerrit)
 sw/uiconfig/swriter/ui/gotopagedialog.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit cd01f035c4c3e20f890dd48b7a734bf0513ab667
Author: Rafael Lima 
AuthorDate: Wed Jan 24 01:09:31 2024 +0100
Commit: Rafael Lima 
CommitDate: Thu Jan 25 13:48:39 2024 +0100

tdf#159349 Dialog "Go to Page" in Writer should not be resizable

Change-Id: Ica252b9e8c1ba4f7e5218d2264dd31c18eda06d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162462
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sw/uiconfig/swriter/ui/gotopagedialog.ui 
b/sw/uiconfig/swriter/ui/gotopagedialog.ui
index f40abed5018d..b57e88fc5a06 100644
--- a/sw/uiconfig/swriter/ui/gotopagedialog.ui
+++ b/sw/uiconfig/swriter/ui/gotopagedialog.ui
@@ -6,6 +6,7 @@
 False
 6
 Go to Page
+False
 True
 0
 0


core.git: basctl/uiconfig

2024-01-24 Thread Rafael Lima (via logerrit)
 basctl/uiconfig/basicide/ui/gotolinedialog.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 52188252bb5d44e15266b84b771599a453438ba6
Author: Rafael Lima 
AuthorDate: Wed Jan 24 00:46:48 2024 +0100
Commit: Rafael Lima 
CommitDate: Wed Jan 24 12:11:08 2024 +0100

Related tdf#158749 The "Go to Line" dialog should not be resizable

Change-Id: I93c5c1b4a2832b60e194abd7e7d528362885bb24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162461
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/basctl/uiconfig/basicide/ui/gotolinedialog.ui 
b/basctl/uiconfig/basicide/ui/gotolinedialog.ui
index fdef2dec1f19..84960ce7d4e0 100644
--- a/basctl/uiconfig/basicide/ui/gotolinedialog.ui
+++ b/basctl/uiconfig/basicide/ui/gotolinedialog.ui
@@ -6,6 +6,7 @@
 False
 6
 Go to Line
+False
 True
 0
 0


core.git: basctl/inc basctl/Library_basctl.mk basctl/sdi basctl/source basctl/uiconfig

2024-01-23 Thread Rafael Lima (via logerrit)
 basctl/Library_basctl.mk  |1 
 basctl/inc/strings.hrc|1 
 basctl/sdi/baside.sdi |1 
 basctl/source/basicide/LineStatusControl.cxx  |   45 
 basctl/source/basicide/baside2.cxx|   12 +++
 basctl/source/basicide/basidesh.cxx   |2 
 basctl/source/basicide/moduldl2.cxx   |   31 +++-
 basctl/source/basicide/moduldlg.hxx   |8 +-
 basctl/source/inc/LineStatusControl.hxx   |   30 
 basctl/uiconfig/basicide/ui/gotolinedialog.ui |   92 +++---
 10 files changed, 162 insertions(+), 61 deletions(-)

New commits:
commit d9d9ec70395ed5ad8ac4b985b8c9215af7436258
Author: Rafael Lima 
AuthorDate: Mon Jan 15 18:08:12 2024 +0100
Commit: Rafael Lima 
CommitDate: Tue Jan 23 12:11:33 2024 +0100

tdf#158749 Open "Go to Line" dialog from the statusbar in Basic IDE

With this change, if the user clicks the StatusGetPosition item in the 
status bar, the Go To Line dialog will be shown.

Change-Id: Iba75e2dbf6ba83fce24e1af237bdf9813d4ecb69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162108
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk
index 13d3bce29e41..cb41fa9e461c 100644
--- a/basctl/Library_basctl.mk
+++ b/basctl/Library_basctl.mk
@@ -95,6 +95,7 @@ $(eval $(call gb_Library_add_exception_objects,basctl,\
basctl/source/basicide/iderdll \
basctl/source/basicide/layout \
basctl/source/basicide/linenumberwindow \
+   basctl/source/basicide/LineStatusControl \
basctl/source/basicide/localizationmgr \
basctl/source/basicide/macrodlg \
basctl/source/basicide/moduldl2 \
diff --git a/basctl/inc/strings.hrc b/basctl/inc/strings.hrc
index 44efc2f52ed8..ee83fbb543b0 100644
--- a/basctl/inc/strings.hrc
+++ b/basctl/inc/strings.hrc
@@ -113,6 +113,7 @@
 #define RID_STR_READONLYNC_("RID_STR_READONLY", 
"Read-only")
 #define RID_STR_MODULE_READONLY NC_("RID_STR_READONLY_WARNING", 
"This module is read-only and cannot be edited.")
 #define RID_STR_DIALOG_READONLY NC_("RID_STR_READONLY_WARNING", 
"This dialog is read-only and cannot be edited.")
+#define RID_LINE_STATUS_CONTROL NC_("RID_LINE_STATUS_CONTROL", 
"Current line and character. Click to open 'Go to Line' dialog.")
 
 // Color scheme names
 #define RID_STR_COLORSCHEME_DEFAULT NC_("RID_STR_COLORSCHEME_DEFAULT", 
"Default")
diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 40ddd8b3bfd7..74b425cf6db4 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -618,6 +618,7 @@ shell basctl_Shell
 
 SID_BASICIDE_STAT_POS
 [
+ExecMethod  = ExecuteGlobal;
 StateMethod = GetState;
 ]
 
diff --git a/basctl/source/basicide/LineStatusControl.cxx 
b/basctl/source/basicide/LineStatusControl.cxx
new file mode 100644
index ..fd716b3901f7
--- /dev/null
+++ b/basctl/source/basicide/LineStatusControl.cxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace basctl
+{
+SFX_IMPL_STATUSBAR_CONTROL(LineStatusControl, SfxStringItem);
+
+LineStatusControl::LineStatusControl(sal_uInt16 _nSlotId, sal_uInt16 _nId, 
StatusBar& rStb)
+: SfxStatusBarControl(_nSlotId, _nId, rStb)
+{
+}
+
+LineStatusControl::~LineStatusControl() {}
+
+void LineStatusControl::StateChangedAtStatusBarControl(sal_uInt16 /*nSID*/, 
SfxItemState eState,
+   const SfxPoolItem* 
pState)
+{
+if (eState == SfxItemState::DEFAULT)
+{
+// Can access pState
+GetStatusBar().SetItemText(GetId(), static_cast(pState)->GetValue());
+GetStatusBar().SetQuickHelpText(GetId(), 
IDEResId(RID_LINE_STATUS_CONTROL));
+}
+else
+{
+GetStatusBar().SetItemText(GetId(), u""_ustr);
+GetStatusBar().SetQuickHelpText(GetId(), u""_ustr);
+}
+}
+
+} // namespace basctl
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 74c25d6f4631..98f016a57236 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include "moduldlg.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -1027,12 +1028,15 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
 break;
 case SID_GOTOLINE:
 {
-GotoLineDialog aGotoDlg(GetFrameWeld());
+

core.git: Branch 'libreoffice-7-6' - basctl/source

2024-01-22 Thread Rafael Lima (via logerrit)
 basctl/source/dlged/dlged.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3fd80b31eb997847e04571b21ec512928a70bf81
Author: Rafael Lima 
AuthorDate: Wed Jan 17 20:33:43 2024 +0100
Commit: Xisco Fauli 
CommitDate: Mon Jan 22 22:18:48 2024 +0100

tdf#159247 Fix crash while adding control with default properties (Dialog 
Editor)

Controls created using the Ctrl+toolbar (which adds a control with default 
properties) did not have a parent form, which causes the crash.

Change-Id: Ic2f469e6656a93bbed25d86092384f81b21aaca5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162217
Tested-by: Jenkins
Reviewed-by: Patrick Luby 
Reviewed-by: Rafael Lima 
(cherry picked from commit c4e5b1b934fc3c59fb35ae6c02a0ddf8501a6d28)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162278
Reviewed-by: Xisco Fauli 
(cherry picked from commit 41146e08e1dda001a7c490f6a28aad09174b4d65)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162282

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 1917e3ff4a56..26db2effb039 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -623,6 +623,8 @@ void DlgEditor::CreateDefaultObject()
 
 // set default property values
 pDlgEdObj->SetDefaults();
+// set the form to which the new object belongs
+pDlgEdObj->SetDlgEdForm(pDlgEdForm.get());
 
 // insert object into drawing page
 SdrPageView* pPageView = pDlgEdView->GetSdrPageView();


core.git: Branch 'libreoffice-24-2-0' - helpcontent2

2024-01-22 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit df5fea3fab250a11b37d0803716d740e4fab2ba6
Author: Rafael Lima 
AuthorDate: Mon Jan 22 14:36:30 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Jan 22 14:36:30 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'libreoffice-24-2-0'
  to c2520523383ab38a49b9f61cc05b74ed49de046c
  - Silence strings for translation in sf_dataset.xhp

Change-Id: I62754d87b3feef4b54f7de43ec041c20c9ad07b2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161940
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit e464f139740062a8da409d74c2942205dbe99aa0)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161999
(cherry picked from commit 8a46af6d1523f0092c0a000cce688ec4916b9ef9)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/162373
Reviewed-by: Christian Lohmaier 

diff --git a/helpcontent2 b/helpcontent2
index f8dfcc874016..c2520523383a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f8dfcc8740164aad277abb73584b2d103ed3b189
+Subproject commit c2520523383ab38a49b9f61cc05b74ed49de046c


help.git: Branch 'libreoffice-24-2-0' - source/text

2024-01-22 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_dataset.xhp |   30 ++--
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit c2520523383ab38a49b9f61cc05b74ed49de046c
Author: Rafael Lima 
AuthorDate: Thu Jan 11 22:12:05 2024 +0100
Commit: Christian Lohmaier 
CommitDate: Mon Jan 22 14:36:29 2024 +0100

Silence strings for translation in sf_dataset.xhp

Change-Id: I62754d87b3feef4b54f7de43ec041c20c9ad07b2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161940
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit e464f139740062a8da409d74c2942205dbe99aa0)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161999
(cherry picked from commit 8a46af6d1523f0092c0a000cce688ec4916b9ef9)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/162373
Reviewed-by: Christian Lohmaier 

diff --git a/source/text/sbasic/shared/03/sf_dataset.xhp 
b/source/text/sbasic/shared/03/sf_dataset.xhp
index 47158a535e..8f3d509b0e 100644
--- a/source/text/sbasic/shared/03/sf_dataset.xhp
+++ b/source/text/sbasic/shared/03/sf_dataset.xhp
@@ -515,11 +515,11 @@
 
 
 
-  currId = 
oDataset.GetValue(FieldName := "ID")
+  currId = oDataset.GetValue(FieldName := 
"ID")
 
 
 
-  curr_id = 
dataset.GetValue(fieldname = "ID")
+  curr_id = dataset.GetValue(fieldname = 
"ID")
 
   
 
@@ -559,7 +559,7 @@
 
   dataset = 
database.CreateDataset("Customers")
   new_data = {"Name": 
"John", "Age": 30, "City": "Chicago"}
-  new_id = 
dataset.Insert(new_data)
+  new_id = dataset.Insert(new_data)
 
 The following calls 
are accepted in Python:
 
@@ -588,11 +588,11 @@
 
 
 
-  oDataset.MoveFirst()
+  oDataset.MoveFirst()
 
 
 
-  dataset.MoveFirst()
+  dataset.MoveFirst()
 
   
 
@@ -618,13 +618,13 @@
 
 
 
-  oDataset.MoveNext()
-  oDataset.MoveNext(5)
+  oDataset.MoveNext()
+  oDataset.MoveNext(5)
 
 
 
-  dataset.MoveNext()
-  dataset.MoveNext(5)
+  dataset.MoveNext()
+  dataset.MoveNext(5)
 
   
 
@@ -647,13 +647,13 @@
 
 
 
-  oDataset.Reload()
+  oDataset.Reload()
   oDataset.Reload(Filter := "[Name] = 'John'", OrderBy 
:= "Age")
 
 
 
-  dataset.Reload()
-  dataset.Reload(Filter = "[Name] = 'John'", OrderBy = 
"Age"
+  dataset.Reload()
+  dataset.Reload(Filter = "[Name] = 'John'", OrderBy = 
"Age")
 
   
 
@@ -675,10 +675,10 @@
 
 The example below 
updates the current record using a Dictionary.
 
-  oNewValues = 
CreateScriptService("Dictionary")
+  oNewValues = 
CreateScriptService("Dictionary")
   oNewValues.Add("Age", 51)
   oNewValues.Add("City", "New York")
-  oDataset.Update(oNewValues)
+  oDataset.Update(oNewValues)
 
 The same result can 
be achieved by passing all pairs of fields and values as arguments:
 
@@ -687,7 +687,7 @@
 
 
   new_values = {"Age": 
51, "City": "New York"}
-  dataset.Update(new_values)
+  dataset.Update(new_values)
 
 
   dataset.Update("Age", 51, "City", "New 
York")


core.git: Branch 'distro/collabora/co-24.04' - helpcontent2

2024-01-20 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4c9b23c7fe074ad8c9a86fea95e26a6ee0049ea5
Author: Rafael Lima 
AuthorDate: Sat Jan 20 19:39:58 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Sat Jan 20 19:39:58 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'distro/collabora/co-24.04'
  to 3a01a710608f9237d25f509056cc41ad73e43da6
  - Silence strings for translation in sf_database.xhp

Change-Id: Ibbccb617adbb97da9f892ead789db8f643f78f83
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161930
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit d6168024a68482349db0c02713e79d37a31519ce)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/162137
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index d529ecdee07d..3a01a710608f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d529ecdee07d04f261fd13d05ecf2e0ee9f18a4b
+Subproject commit 3a01a710608f9237d25f509056cc41ad73e43da6


help.git: Branch 'distro/collabora/co-24.04' - source/text

2024-01-20 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_database.xhp |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 3a01a710608f9237d25f509056cc41ad73e43da6
Author: Rafael Lima 
AuthorDate: Thu Jan 11 13:23:18 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Jan 16 16:38:05 2024 +0100

Silence strings for translation in sf_database.xhp

Change-Id: Ibbccb617adbb97da9f892ead789db8f643f78f83
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161930
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit d6168024a68482349db0c02713e79d37a31519ce)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/162137
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sbasic/shared/03/sf_database.xhp 
b/source/text/sbasic/shared/03/sf_database.xhp
index 852fb6a0f4..b898e0549b 100644
--- a/source/text/sbasic/shared/03/sf_database.xhp
+++ b/source/text/sbasic/shared/03/sf_database.xhp
@@ -68,10 +68,10 @@
 
 
   
-NONE
+NONE
   
   
-0
+0
   
   
 Transaction 
handling is disabled and the database is set to the default auto-commit 
mode.
@@ -79,10 +79,10 @@
 
 
   
-READ_UNCOMMITTED
+READ_UNCOMMITTED
   
   
-1
+1
   
   
 Dirty reads, 
non-repeatable reads and phantom reads can occur.
@@ -91,10 +91,10 @@
 
 
   
-READ_COMMITTED
+READ_COMMITTED
   
   
-2
+2
   
   
 Dirty reads 
are prevented, however non-repeatable reads and phantom reads can 
occur.
@@ -103,10 +103,10 @@
 
 
   
-REPEATABLE_READ
+REPEATABLE_READ
   
   
-4
+4
   
   
 Dirty reads 
and non-repeatable reads are prevented. However, phantom reads can 
occur.
@@ -115,10 +115,10 @@
 
 
   
-SERIALIZABLE
+SERIALIZABLE
   
   
-8
+8
   
   
 Dirty reads, 
non-repeatable reads and phantom reads are prevented.


core.git: Branch 'libreoffice-24-2' - basctl/source

2024-01-19 Thread Rafael Lima (via logerrit)
 basctl/source/dlged/dlged.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8472ffa70887b8f68d7e8f17faef377a83b0695e
Author: Rafael Lima 
AuthorDate: Wed Jan 17 20:33:43 2024 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 19 17:08:20 2024 +0100

tdf#159247 Fix crash while adding control with default properties (Dialog 
Editor)

Controls created using the Ctrl+toolbar (which adds a control with default 
properties) did not have a parent form, which causes the crash.

Change-Id: Ic2f469e6656a93bbed25d86092384f81b21aaca5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162217
Tested-by: Jenkins
Reviewed-by: Patrick Luby 
Reviewed-by: Rafael Lima 
(cherry picked from commit c4e5b1b934fc3c59fb35ae6c02a0ddf8501a6d28)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162278
Reviewed-by: Xisco Fauli 

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 2eb099718b5b..a91a6511bd50 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -620,6 +620,8 @@ void DlgEditor::CreateDefaultObject()
 
 // set default property values
 pDlgEdObj->SetDefaults();
+// set the form to which the new object belongs
+pDlgEdObj->SetDlgEdForm(pDlgEdForm.get());
 
 // insert object into drawing page
 SdrPageView* pPageView = pDlgEdView->GetSdrPageView();


core.git: basctl/source

2024-01-19 Thread Rafael Lima (via logerrit)
 basctl/source/dlged/dlged.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c4e5b1b934fc3c59fb35ae6c02a0ddf8501a6d28
Author: Rafael Lima 
AuthorDate: Wed Jan 17 20:33:43 2024 +0100
Commit: Rafael Lima 
CommitDate: Fri Jan 19 13:23:55 2024 +0100

tdf#159247 Fix crash while adding control with default properties (Dialog 
Editor)

Controls created using the Ctrl+toolbar (which adds a control with default 
properties) did not have a parent form, which causes the crash.

Change-Id: Ic2f469e6656a93bbed25d86092384f81b21aaca5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162217
Tested-by: Jenkins
Reviewed-by: Patrick Luby 
Reviewed-by: Rafael Lima 

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index be3c4cc1584f..1aa9ca380416 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -620,6 +620,8 @@ void DlgEditor::CreateDefaultObject()
 
 // set default property values
 pDlgEdObj->SetDefaults();
+// set the form to which the new object belongs
+pDlgEdObj->SetDlgEdForm(pDlgEdForm.get());
 
 // insert object into drawing page
 SdrPageView* pPageView = pDlgEdView->GetSdrPageView();


core.git: basctl/uiconfig

2024-01-18 Thread Rafael Lima (via logerrit)
 basctl/uiconfig/basicide/ui/colorscheme.ui |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 950af5a45723d16cc5e91324f021a2e77470f2ce
Author: Rafael Lima 
AuthorDate: Wed Jan 17 19:59:08 2024 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jan 18 09:52:14 2024 +0100

tdf#159221 Fix color scheme names under Gtk3 (Basic IDE)

Color scheme names were not appearing in the "Color Scheme" dialog in the 
Basic IDE under gtk3 (View - Color Scheme).

This patch fixes that.

Change-Id: I9b019f3ed867ca6f45b53d67a3dc01139251391e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162215
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/basctl/uiconfig/basicide/ui/colorscheme.ui 
b/basctl/uiconfig/basicide/ui/colorscheme.ui
index 709f946d854a..7cc51fd7602f 100644
--- a/basctl/uiconfig/basicide/ui/colorscheme.ui
+++ b/basctl/uiconfig/basicide/ui/colorscheme.ui
@@ -4,10 +4,10 @@
   
   
 
-  
-  
   
   
+  
+  
 
   
   
@@ -179,6 +179,9 @@
   
 
   
+  
+0
+  
 
   
 


core.git: Branch 'libreoffice-24-2' - helpcontent2

2024-01-16 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 66f829f1f41800ca9e31f0dd82fa78fdad02a77a
Author: Rafael Lima 
AuthorDate: Tue Jan 16 16:38:06 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Jan 16 16:38:06 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'libreoffice-24-2'
  to 3a01a710608f9237d25f509056cc41ad73e43da6
  - Silence strings for translation in sf_database.xhp

Change-Id: Ibbccb617adbb97da9f892ead789db8f643f78f83
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161930
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit d6168024a68482349db0c02713e79d37a31519ce)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/162137
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index d529ecdee07d..3a01a710608f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d529ecdee07d04f261fd13d05ecf2e0ee9f18a4b
+Subproject commit 3a01a710608f9237d25f509056cc41ad73e43da6


help.git: Branch 'libreoffice-24-2' - source/text

2024-01-16 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_database.xhp |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 3a01a710608f9237d25f509056cc41ad73e43da6
Author: Rafael Lima 
AuthorDate: Thu Jan 11 13:23:18 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Jan 16 16:38:05 2024 +0100

Silence strings for translation in sf_database.xhp

Change-Id: Ibbccb617adbb97da9f892ead789db8f643f78f83
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161930
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit d6168024a68482349db0c02713e79d37a31519ce)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/162137
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sbasic/shared/03/sf_database.xhp 
b/source/text/sbasic/shared/03/sf_database.xhp
index 852fb6a0f4..b898e0549b 100644
--- a/source/text/sbasic/shared/03/sf_database.xhp
+++ b/source/text/sbasic/shared/03/sf_database.xhp
@@ -68,10 +68,10 @@
 
 
   
-NONE
+NONE
   
   
-0
+0
   
   
 Transaction 
handling is disabled and the database is set to the default auto-commit 
mode.
@@ -79,10 +79,10 @@
 
 
   
-READ_UNCOMMITTED
+READ_UNCOMMITTED
   
   
-1
+1
   
   
 Dirty reads, 
non-repeatable reads and phantom reads can occur.
@@ -91,10 +91,10 @@
 
 
   
-READ_COMMITTED
+READ_COMMITTED
   
   
-2
+2
   
   
 Dirty reads 
are prevented, however non-repeatable reads and phantom reads can 
occur.
@@ -103,10 +103,10 @@
 
 
   
-REPEATABLE_READ
+REPEATABLE_READ
   
   
-4
+4
   
   
 Dirty reads 
and non-repeatable reads are prevented. However, phantom reads can 
occur.
@@ -115,10 +115,10 @@
 
 
   
-SERIALIZABLE
+SERIALIZABLE
   
   
-8
+8
   
   
 Dirty reads, 
non-repeatable reads and phantom reads are prevented.


core.git: extensions/inc include/svx

2024-01-14 Thread Rafael Lima (via logerrit)
 extensions/inc/strings.hrc |2 +-
 include/svx/strings.hrc|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 83c1df8e524cc74c6d1afcadb3cccba5ef2eb123
Author: Rafael Lima 
AuthorDate: Fri Jan 12 14:56:40 2024 +0100
Commit: Mike Kaganski 
CommitDate: Mon Jan 15 02:17:15 2024 +0100

tdf#159151 Fix double space in Tree Control

Change-Id: I400b0f84d52f365636ab86410abde330f3c05cbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161947
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/extensions/inc/strings.hrc b/extensions/inc/strings.hrc
index e124f4a635be..a14f66ef78a2 100644
--- a/extensions/inc/strings.hrc
+++ b/extensions/inc/strings.hrc
@@ -283,7 +283,7 @@
 #define RID_STR_PROPTITLE_NUMERICFIELD  
NC_("RID_STR_PROPTITLE_NUMERICFIELD", "Numeric Field")
 #define RID_STR_PROPTITLE_CURRENCYFIELD 
NC_("RID_STR_PROPTITLE_CURRENCYFIELD", "Currency Field")
 #define RID_STR_PROPTITLE_PATTERNFIELD  
NC_("RID_STR_PROPTITLE_PATTERNFIELD", "Pattern Field")
-#define RID_STR_PROPTITLE_DBGRID
NC_("RID_STR_PROPTITLE_DBGRID", "Table Control ")
+#define RID_STR_PROPTITLE_DBGRID
NC_("RID_STR_PROPTITLE_DBGRID", "Table Control")
 
 #define STR_DETAIL_FORM NC_("STR_DETAIL_FORM", "Sub 
Form")
 #define STR_MASTER_FORM NC_("STR_MASTER_FORM", "Master 
Form")
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index bc42cae37ea4..2630cc98a5e9 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1230,7 +1230,7 @@
 #define RID_STR_PROPTITLE_IMAGEBUTTON   
NC_("RID_STR_PROPTITLE_IMAGEBUTTON", "Image Button")
 #define RID_STR_PROPTITLE_IMAGECONTROL  
NC_("RID_STR_PROPTITLE_IMAGECONTROL", "Image Control")
 #define RID_STR_PROPTITLE_FILECONTROL   
NC_("RID_STR_PROPTITLE_FILECONTROL", "File Selection")
-#define RID_STR_PROPTITLE_DBGRID
NC_("RID_STR_PROPTITLE_DBGRID", "Table Control ")
+#define RID_STR_PROPTITLE_DBGRID
NC_("RID_STR_PROPTITLE_DBGRID", "Table Control")
 #define RID_STR_PROPTITLE_SCROLLBAR 
NC_("RID_STR_PROPTITLE_SCROLLBAR", "Scrollbar")
 #define RID_STR_PROPTITLE_SPINBUTTON
NC_("RID_STR_PROPTITLE_SPINBUTTON", "Spin Button")
 #define RID_STR_PROPTITLE_NAVBAR
NC_("RID_STR_PROPTITLE_NAVBAR", "Navigation Bar")


core.git: helpcontent2

2024-01-14 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6028845f24b4271cc6578e4d9d59d8fbc08974db
Author: Rafael Lima 
AuthorDate: Mon Jan 15 01:18:34 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Jan 15 01:18:34 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to d33c78198fbb0d56f08eb265d6ce432b1a7f66b1
  - Fix strings in sf_dialogcontrol.xhp

Change-Id: Idf185b763d6a566d39bf7403015fc961d53ab614
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161935
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 85b7b1975b0b..d33c78198fbb 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 85b7b1975b0b8a9afd1abfc94c69f1152400ce04
+Subproject commit d33c78198fbb0d56f08eb265d6ce432b1a7f66b1


help.git: source/text

2024-01-14 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_dialogcontrol.xhp |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d33c78198fbb0d56f08eb265d6ce432b1a7f66b1
Author: Rafael Lima 
AuthorDate: Thu Jan 11 19:49:32 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Jan 15 01:18:34 2024 +0100

Fix strings in sf_dialogcontrol.xhp

Change-Id: Idf185b763d6a566d39bf7403015fc961d53ab614
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161935
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sbasic/shared/03/sf_dialogcontrol.xhp 
b/source/text/sbasic/shared/03/sf_dialogcontrol.xhp
index 95badd3d29..2e93839ff5 100644
--- a/source/text/sbasic/shared/03/sf_dialogcontrol.xhp
+++ b/source/text/sbasic/shared/03/sf_dialogcontrol.xhp
@@ -109,7 +109,7 @@
• ListBox• NumericField• 
PatternField• ProgressBar• RadioButton• 
ScrollBar


-   • 
TableControl• TextField• TimeField• 
TreeControl  
+   • TableControl• TextField• 
TimeField• TreeControl  

 
   
@@ -148,7 +148,7 @@
 Button, …
  
  
-The Border property refers to the surrounding of the control: 
3D, FLAT or NONE.
+The Border property refers to the 
surrounding of the control: "3D", "FLAT" or "NONE".
  
   
   
@@ -799,7 +799,7 @@
  
   

-   There's no Value 
property for GroupBox, Hyperlink, ImageControl and TreeControl dialog 
controls.
+   There is no Value 
property for GroupBox, Hyperlink, 
ImageControl and TreeControl dialog 
controls.
 
Event properties



core.git: helpcontent2

2024-01-14 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bb5ae2ed78bdf94c56c581da21bb139554e0d6b1
Author: Rafael Lima 
AuthorDate: Mon Jan 15 01:18:13 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Jan 15 01:18:13 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 85b7b1975b0b8a9afd1abfc94c69f1152400ce04
  - Fix sentences in sf_document.xhp

Change-Id: Ia3a3090e243c719255e3b7de02d26acc3bd4dc87
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161936
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index be416c32550a..85b7b1975b0b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit be416c32550aa2fe0c0cfa94b437848a280261bb
+Subproject commit 85b7b1975b0b8a9afd1abfc94c69f1152400ce04


help.git: source/text

2024-01-14 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_document.xhp |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 85b7b1975b0b8a9afd1abfc94c69f1152400ce04
Author: Rafael Lima 
AuthorDate: Thu Jan 11 20:13:08 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Jan 15 01:18:13 2024 +0100

Fix sentences in sf_document.xhp

Change-Id: Ia3a3090e243c719255e3b7de02d26acc3bd4dc87
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161936
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sbasic/shared/03/sf_document.xhp 
b/source/text/sbasic/shared/03/sf_document.xhp
index 3397dd67b7..3f1776e72d 100644
--- a/source/text/sbasic/shared/03/sf_document.xhp
+++ b/source/text/sbasic/shared/03/sf_document.xhp
@@ -353,7 +353,7 @@
 UNO Object
 
 
-A com.sun.star.XXX.DocumentSettings UNO 
object - where XXX is sheet, text, drawing or presentation - that gives access 
to UNO internal properties, that are specific to the document's 
type.
+A com.sun.star.XXX.DocumentSettings UNO 
object, where XXX is either sheet, text, 
drawing or presentation. This object 
gives access to the internal UNO properties that are specific to the document's 
type.
 
   
 
@@ -540,7 +540,7 @@
   
 family: One of the style families 
present in the actual document, as a case-sensitive string. Valid family names 
can be retrieved using StyleFamilies property.
   
-  stylelist: A single style name as a 
string or an array of style names. The style names may be localized or not. The 
StylesList is typically the output of the execution of a 
Styles() method.
+  stylelist: A single style name as a 
string or an array of style names. The style names may be localized or not. The 
StylesList is typically the output of the execution of a 
Styles() method.
   
   
   
@@ -586,7 +586,7 @@
   
   
 doc.Echo(echoon = False, hourglass = 
True)
-...
+...
 doc.Echo()
   
 
@@ -661,7 +661,7 @@
   
   
   filename: The file from which to load 
the styles in the FileSystem notation. The file is presumed 
to be of the same document type as the actual document.
-  families: One of the style families 
present in the actual document, as a case-sensitive string or an array of such 
strings. Default = all families.
+  families: One of the style families 
present in the actual document, as a case-sensitive string or an array of such 
strings. Leave this argument blank to import all families.
   overwrite: When 
True, the actual styles may be overwritten. Default is 
False.
   
   
@@ -970,14 +970,14 @@
   
   
 
-  
+
 
XStyles 
-
 
   
 Document service;XStyles
   
   XStyles
-  This method returns 
the UNO representation of a given style for all document types except 
Base. Nothing is returned when the 
StyleName does not exist in the given Family.
+  This method returns 
the UNO representation of a given style for all document types except 
Base. Nothing is returned when the 
StyleName does not exist in the given family.
   
   
 svc.XStyles(family: str, stylename: str): uno


core.git: Branch 'libreoffice-24-2' - helpcontent2

2024-01-13 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b3d64e6fbdaccf558cdbd1ac4da8d53c623ebb56
Author: Rafael Lima 
AuthorDate: Sat Jan 13 20:14:15 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Sat Jan 13 20:14:15 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'libreoffice-24-2'
  to 8a46af6d1523f0092c0a000cce688ec4916b9ef9
  - Silence strings for translation in sf_dataset.xhp

Change-Id: I62754d87b3feef4b54f7de43ec041c20c9ad07b2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161940
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit e464f139740062a8da409d74c2942205dbe99aa0)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161999

diff --git a/helpcontent2 b/helpcontent2
index 4a851d785063..8a46af6d1523 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 4a851d785063f7286f134810ef87ee5e945a3ba7
+Subproject commit 8a46af6d1523f0092c0a000cce688ec4916b9ef9


help.git: Branch 'libreoffice-24-2' - source/text

2024-01-13 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_dataset.xhp |   30 ++--
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 8a46af6d1523f0092c0a000cce688ec4916b9ef9
Author: Rafael Lima 
AuthorDate: Thu Jan 11 22:12:05 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Jan 13 20:14:14 2024 +0100

Silence strings for translation in sf_dataset.xhp

Change-Id: I62754d87b3feef4b54f7de43ec041c20c9ad07b2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161940
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit e464f139740062a8da409d74c2942205dbe99aa0)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161999

diff --git a/source/text/sbasic/shared/03/sf_dataset.xhp 
b/source/text/sbasic/shared/03/sf_dataset.xhp
index 47158a535e..8f3d509b0e 100644
--- a/source/text/sbasic/shared/03/sf_dataset.xhp
+++ b/source/text/sbasic/shared/03/sf_dataset.xhp
@@ -515,11 +515,11 @@
 
 
 
-  currId = 
oDataset.GetValue(FieldName := "ID")
+  currId = oDataset.GetValue(FieldName := 
"ID")
 
 
 
-  curr_id = 
dataset.GetValue(fieldname = "ID")
+  curr_id = dataset.GetValue(fieldname = 
"ID")
 
   
 
@@ -559,7 +559,7 @@
 
   dataset = 
database.CreateDataset("Customers")
   new_data = {"Name": 
"John", "Age": 30, "City": "Chicago"}
-  new_id = 
dataset.Insert(new_data)
+  new_id = dataset.Insert(new_data)
 
 The following calls 
are accepted in Python:
 
@@ -588,11 +588,11 @@
 
 
 
-  oDataset.MoveFirst()
+  oDataset.MoveFirst()
 
 
 
-  dataset.MoveFirst()
+  dataset.MoveFirst()
 
   
 
@@ -618,13 +618,13 @@
 
 
 
-  oDataset.MoveNext()
-  oDataset.MoveNext(5)
+  oDataset.MoveNext()
+  oDataset.MoveNext(5)
 
 
 
-  dataset.MoveNext()
-  dataset.MoveNext(5)
+  dataset.MoveNext()
+  dataset.MoveNext(5)
 
   
 
@@ -647,13 +647,13 @@
 
 
 
-  oDataset.Reload()
+  oDataset.Reload()
   oDataset.Reload(Filter := "[Name] = 'John'", OrderBy 
:= "Age")
 
 
 
-  dataset.Reload()
-  dataset.Reload(Filter = "[Name] = 'John'", OrderBy = 
"Age"
+  dataset.Reload()
+  dataset.Reload(Filter = "[Name] = 'John'", OrderBy = 
"Age")
 
   
 
@@ -675,10 +675,10 @@
 
 The example below 
updates the current record using a Dictionary.
 
-  oNewValues = 
CreateScriptService("Dictionary")
+  oNewValues = 
CreateScriptService("Dictionary")
   oNewValues.Add("Age", 51)
   oNewValues.Add("City", "New York")
-  oDataset.Update(oNewValues)
+  oDataset.Update(oNewValues)
 
 The same result can 
be achieved by passing all pairs of fields and values as arguments:
 
@@ -687,7 +687,7 @@
 
 
   new_values = {"Age": 
51, "City": "New York"}
-  dataset.Update(new_values)
+  dataset.Update(new_values)
 
 
   dataset.Update("Age", 51, "City", "New 
York")


core.git: helpcontent2

2024-01-13 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f21fb5f530d40b4decdb5b9c153412f195293df2
Author: Rafael Lima 
AuthorDate: Sat Jan 13 19:42:21 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Sat Jan 13 19:42:21 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to b8c6c19ab2fac10cdade1ae96721422814b19be3
  - Silence strings for translation in sf_dataset.xhp

Change-Id: I62754d87b3feef4b54f7de43ec041c20c9ad07b2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161940
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 2039fbabf053..b8c6c19ab2fa 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2039fbabf053a19c9eaeee3db95dc8d710dfeb69
+Subproject commit b8c6c19ab2fac10cdade1ae96721422814b19be3


help.git: source/text

2024-01-13 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_dataset.xhp |   30 ++--
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit b8c6c19ab2fac10cdade1ae96721422814b19be3
Author: Rafael Lima 
AuthorDate: Thu Jan 11 22:12:05 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Jan 13 19:42:20 2024 +0100

Silence strings for translation in sf_dataset.xhp

Change-Id: I62754d87b3feef4b54f7de43ec041c20c9ad07b2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161940
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sbasic/shared/03/sf_dataset.xhp 
b/source/text/sbasic/shared/03/sf_dataset.xhp
index e63f16e3df..1d55a5dd5a 100644
--- a/source/text/sbasic/shared/03/sf_dataset.xhp
+++ b/source/text/sbasic/shared/03/sf_dataset.xhp
@@ -515,11 +515,11 @@
 
 
 
-  currId = 
oDataset.GetValue(FieldName := "ID")
+  currId = oDataset.GetValue(FieldName := 
"ID")
 
 
 
-  curr_id = 
dataset.GetValue(fieldname = "ID")
+  curr_id = dataset.GetValue(fieldname = 
"ID")
 
   
 
@@ -559,7 +559,7 @@
 
   dataset = 
database.CreateDataset("Customers")
   new_data = {"Name": 
"John", "Age": 30, "City": "Chicago"}
-  new_id = 
dataset.Insert(new_data)
+  new_id = dataset.Insert(new_data)
 
 The following calls 
are accepted in Python:
 
@@ -588,11 +588,11 @@
 
 
 
-  oDataset.MoveFirst()
+  oDataset.MoveFirst()
 
 
 
-  dataset.MoveFirst()
+  dataset.MoveFirst()
 
   
 
@@ -618,13 +618,13 @@
 
 
 
-  oDataset.MoveNext()
-  oDataset.MoveNext(5)
+  oDataset.MoveNext()
+  oDataset.MoveNext(5)
 
 
 
-  dataset.MoveNext()
-  dataset.MoveNext(5)
+  dataset.MoveNext()
+  dataset.MoveNext(5)
 
   
 
@@ -647,13 +647,13 @@
 
 
 
-  oDataset.Reload()
+  oDataset.Reload()
   oDataset.Reload(Filter := "[Name] = 'John'", OrderBy 
:= "Age")
 
 
 
-  dataset.Reload()
-  dataset.Reload(Filter = "[Name] = 'John'", OrderBy = 
"Age"
+  dataset.Reload()
+  dataset.Reload(Filter = "[Name] = 'John'", OrderBy = 
"Age")
 
   
 
@@ -675,10 +675,10 @@
 
 The example below 
updates the current record using a Dictionary.
 
-  oNewValues = 
CreateScriptService("Dictionary")
+  oNewValues = 
CreateScriptService("Dictionary")
   oNewValues.Add("Age", 51)
   oNewValues.Add("City", "New York")
-  oDataset.Update(oNewValues)
+  oDataset.Update(oNewValues)
 
 The same result can 
be achieved by passing all pairs of fields and values as arguments:
 
@@ -687,7 +687,7 @@
 
 
   new_values = {"Age": 
51, "City": "New York"}
-  dataset.Update(new_values)
+  dataset.Update(new_values)
 
 
   dataset.Update("Age", 51, "City", "New 
York")


help.git: Changes to 'distro/collabora/co-24.04'

2024-01-12 Thread Rafael Lima (via logerrit)
New branch 'distro/collabora/co-24.04' available with the following commits:


help.git: Changes to 'refs/tags/co-24.04-branch-point'

2024-01-12 Thread Rafael Lima (via logerrit)
Tag 'co-24.04-branch-point' created by Andras Timar 
 at 2024-01-12 16:25 +

co-24.04-branch-point

Changes since libreoffice-24-2-branch-point-29:
---
 0 files changed
---


core.git: Branch 'libreoffice-24-2' - helpcontent2

2024-01-11 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7a0513ce48ed6da73eec22ba20ea8a7dcce8ec1d
Author: Rafael Lima 
AuthorDate: Thu Jan 11 22:03:23 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 11 22:03:23 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'libreoffice-24-2'
  to 4a851d785063f7286f134810ef87ee5e945a3ba7
  - Silence string for translation in sf_intro.xhp

Change-Id: I12d48417dc979e85138b78f906fae3486f9673b4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161938
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 3ed389a88b0650556d19ad64ad7b6f66ef4bee0d)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161939
Tested-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index c903a5157e0b..4a851d785063 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c903a5157e0b9fe44a624965b642d1af57ec2b28
+Subproject commit 4a851d785063f7286f134810ef87ee5e945a3ba7


help.git: Branch 'libreoffice-24-2' - source/text

2024-01-11 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_intro.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4a851d785063f7286f134810ef87ee5e945a3ba7
Author: Rafael Lima 
AuthorDate: Thu Jan 11 21:25:11 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jan 11 22:03:23 2024 +0100

Silence string for translation in sf_intro.xhp

Change-Id: I12d48417dc979e85138b78f906fae3486f9673b4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161938
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 3ed389a88b0650556d19ad64ad7b6f66ef4bee0d)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161939
Tested-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sbasic/shared/03/sf_intro.xhp 
b/source/text/sbasic/shared/03/sf_intro.xhp
index dced4f25b9..02e8d5a864 100644
--- a/source/text/sbasic/shared/03/sf_intro.xhp
+++ b/source/text/sbasic/shared/03/sf_intro.xhp
@@ -191,7 +191,7 @@
 
   
   In this case, set the 
environment variable PYTHONPATH as follows before starting 
the Python interpreter:
-  export 
PYTHONPATH=/usr/lib/libreoffice/program:/usr/lib/python3/dist-packages
+  export 
PYTHONPATH=/usr/lib/libreoffice/program:/usr/lib/python3/dist-packages
   The location of these files will be 
different for each operating system and %PRODUCTNAME installation method.
 
   


core.git: helpcontent2

2024-01-11 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa86997621e490fb490828e6a86f42e209d21283
Author: Rafael Lima 
AuthorDate: Thu Jan 11 22:02:42 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 11 22:02:42 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 04877b3bb878e30f8df562a35bc97163ee6be9ff
  - Silence string for translation in sf_intro.xhp

Change-Id: I12d48417dc979e85138b78f906fae3486f9673b4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161938
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 46e73230cf1f..04877b3bb878 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 46e73230cf1f0b3c9f21391099c2e15d8a54db3b
+Subproject commit 04877b3bb878e30f8df562a35bc97163ee6be9ff


help.git: source/text

2024-01-11 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_intro.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 04877b3bb878e30f8df562a35bc97163ee6be9ff
Author: Rafael Lima 
AuthorDate: Thu Jan 11 21:25:11 2024 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jan 11 22:02:41 2024 +0100

Silence string for translation in sf_intro.xhp

Change-Id: I12d48417dc979e85138b78f906fae3486f9673b4
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161938
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sbasic/shared/03/sf_intro.xhp 
b/source/text/sbasic/shared/03/sf_intro.xhp
index dced4f25b9..02e8d5a864 100644
--- a/source/text/sbasic/shared/03/sf_intro.xhp
+++ b/source/text/sbasic/shared/03/sf_intro.xhp
@@ -191,7 +191,7 @@
 
   
   In this case, set the 
environment variable PYTHONPATH as follows before starting 
the Python interpreter:
-  export 
PYTHONPATH=/usr/lib/libreoffice/program:/usr/lib/python3/dist-packages
+  export 
PYTHONPATH=/usr/lib/libreoffice/program:/usr/lib/python3/dist-packages
   The location of these files will be 
different for each operating system and %PRODUCTNAME installation method.
 
   


core.git: basctl/source officecfg/registry

2024-01-11 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/BasicColorConfig.cxx  |   31 --
 basctl/source/basicide/baside2.cxx   |1 
 basctl/source/basicide/baside2.hxx   |7 +
 basctl/source/basicide/baside2b.cxx  |   51 +++
 basctl/source/basicide/linenumberwindow.cxx  |   26 +
 basctl/source/basicide/linenumberwindow.hxx  |1 
 basctl/source/inc/colorscheme.hxx|1 
 officecfg/registry/data/org/openoffice/Office/BasicIDE.xcu   |   30 ++
 officecfg/registry/schema/org/openoffice/Office/BasicIDE.xcs |   10 ++
 9 files changed, 149 insertions(+), 9 deletions(-)

New commits:
commit bf410be4502c2d78e38856c455833681c6b8a151
Author: Rafael Lima 
AuthorDate: Wed Jan 10 20:34:55 2024 +0100
Commit: Andreas Heinisch 
CommitDate: Thu Jan 11 19:56:08 2024 +0100

tdf#158750 Highlight the line where the cursor is positioned (Basic IDE)

This patch implements support for highlighting the selected line in the 
code editor, similar to what Kate, VSCode, etc do.

If the cursor is positioned in a single line and nothing is selected, then 
a highlight color is applied to the line. The line number window also 
highlights the selected line.

Change-Id: I2047d79500cd783b122b6752bb00996de0a7c702
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161861
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/basctl/source/basicide/BasicColorConfig.cxx 
b/basctl/source/basicide/BasicColorConfig.cxx
index 21ff95bc0f8e..ab17b164934b 100644
--- a/basctl/source/basicide/BasicColorConfig.cxx
+++ b/basctl/source/basicide/BasicColorConfig.cxx
@@ -49,13 +49,16 @@ ColorScheme BasicColorConfig::GetColorScheme(const 
OUString& rScheme)
 return GetAutomaticColorScheme();
 }
 
-std::vector aVecPropNames = {
-OUString(rScheme + "/GenericColor/Color"),   OUString(rScheme + 
"/IdentifierColor/Color"),
-OUString(rScheme + "/NumberColor/Color"),OUString(rScheme + 
"/StringColor/Color"),
-OUString(rScheme + "/CommentColor/Color"),   OUString(rScheme + 
"/ErrorColor/Color"),
-OUString(rScheme + "/OperatorColor/Color"),  OUString(rScheme + 
"/KeywordColor/Color"),
-OUString(rScheme + "/BackgroundColor/Color")
-};
+std::vector aVecPropNames = { OUString(rScheme + 
"/GenericColor/Color"),
+OUString(rScheme + 
"/IdentifierColor/Color"),
+OUString(rScheme + 
"/NumberColor/Color"),
+OUString(rScheme + 
"/StringColor/Color"),
+OUString(rScheme + 
"/CommentColor/Color"),
+OUString(rScheme + 
"/ErrorColor/Color"),
+OUString(rScheme + 
"/OperatorColor/Color"),
+OUString(rScheme + 
"/KeywordColor/Color"),
+OUString(rScheme + 
"/BackgroundColor/Color"),
+OUString(rScheme + 
"/LineHighlightColor/Color") };
 
 css::uno::Sequence aPropNames(aVecPropNames.size());
 OUString* pPropNames = aPropNames.getArray();
@@ -77,12 +80,22 @@ ColorScheme BasicColorConfig::GetColorScheme(const 
OUString& rScheme)
 aColors[6] >>= aColorScheme.m_aOperatorColor;
 aColors[7] >>= aColorScheme.m_aKeywordColor;
 aColors[8] >>= aColorScheme.m_aBackgroundColor;
+aColors[9] >>= aColorScheme.m_aLineHighlightColor;
 
 return aColorScheme;
 }
 
 ColorScheme BasicColorConfig::GetAutomaticColorScheme()
 {
+// Application Colors do not define a line highlight color, so here we 
adjust
+// the background color to get a highlight color
+Color aBackgroundColor = 
aColorConfig.GetColorValue(svtools::BASICEDITOR).nColor;
+Color aHighlightColor(aBackgroundColor);
+if (aBackgroundColor.IsDark())
+aHighlightColor.ApplyTintOrShade(1000);
+else
+aHighlightColor.ApplyTintOrShade(-1000);
+
 ColorScheme aScheme = { DEFAULT_SCHEME,
 false,
 
aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor,
@@ -93,7 +106,9 @@ ColorScheme BasicColorConfig::GetAutomaticColorScheme()
 
aColorConfig.GetColorValue(svtools::BASICERROR).nColor,
 
aColorConfig.GetColorValue(svtools::BASICOPERATOR).nColor,
 
aColorConfig.GetColorValue(svtools::BASICKEYWORD).nColor,
-
aColorConfig.GetColorValue(svtools::BASICEDITOR).nColor };
+aBackgroundColor,
+aHighlightColor };
+
 return aScheme;
 }
 
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index a3

core.git: helpcontent2

2024-01-11 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 45f3398c9a816f70815cf38620cf5db2ce66431c
Author: Rafael Lima 
AuthorDate: Thu Jan 11 19:50:54 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 11 19:50:54 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 46e73230cf1f0b3c9f21391099c2e15d8a54db3b
  - Improve sentences and fix strings in sf_dialog.xhp

Change-Id: Ic710fe6e92f73b5f247d881046b71a165ec6812f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161933
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 163b2d43d3e7..46e73230cf1f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 163b2d43d3e746a5c71c77b61e9e5dba4a34c039
+Subproject commit 46e73230cf1f0b3c9f21391099c2e15d8a54db3b


help.git: source/text

2024-01-11 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_dialog.xhp |  152 ++---
 1 file changed, 76 insertions(+), 76 deletions(-)

New commits:
commit 46e73230cf1f0b3c9f21391099c2e15d8a54db3b
Author: Rafael Lima 
AuthorDate: Thu Jan 11 18:54:02 2024 +0100
Commit: Olivier Hallot 
CommitDate: Thu Jan 11 19:50:54 2024 +0100

Improve sentences and fix strings in sf_dialog.xhp

Change-Id: Ic710fe6e92f73b5f247d881046b71a165ec6812f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161933
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/sbasic/shared/03/sf_dialog.xhp 
b/source/text/sbasic/shared/03/sf_dialog.xhp
index 37b1f9078d..1c6f0110de 100644
--- a/source/text/sbasic/shared/03/sf_dialog.xhp
+++ b/source/text/sbasic/shared/03/sf_dialog.xhp
@@ -552,8 +552,8 @@

  Sub 
TriggerEvent(oEvent As Object)

  Dim oDialog1 As Object, oDialog2 As Object, lExec As Long
- 
Set oDialog1 = CreateScriptService("DialogEvent", oEvent) ' The 
dialog that caused the event
- 
Set oDialog2 = CreateScriptService("Dialog", ...) ' Open a 
second dialog
+ 
Set oDialog1 = CreateScriptService("DialogEvent", oEvent) ' The dialog 
that caused the event
+ 
Set oDialog2 = CreateScriptService("Dialog", ...) ' Open a second 
dialog
  
oDialog2.Center(oDialog1)
  
lExec = oDialog2.Execute()
  
Select Case lExec
@@ -589,7 +589,7 @@



-  Set myButton2 = 
oDlg.CloneControl("Button1", "Button2", 30, 30)
+  Set myButton2 = oDlg.CloneControl("Button1", 
"Button2", 30, 30)



@@ -637,7 +637,7 @@
   Dialog service;CreateButton

CreateButton
-   Create a new control 
of type Button in the current dialog.
+   Creates a new 
control of type Button in the current dialog.

svc.CreateButton(ControlName: str, Place: any,  
Toggle: bool = False, Push: str = ""): svc

@@ -651,7 +651,7 @@
All elements are 
expressed in Map 
AppFont units.

Toggle: 
when True a Toggle button is created. Default = 
False
-   Push: 
"OK", "CANCEL" or "" (default)
+   Push: 
"OK", "CANCEL" or "" (default)

  
  An instance of 
SFDialogs.DialogControl
 service or Nothing.
@@ -659,7 +659,7 @@



- Set 
myButton = oDlg.CreateButton("Button1", Array(20, 20, 60, 
15))
+ Set 
myButton = oDlg.CreateButton("Button1", Array(20, 20, 60, 15))



@@ -673,7 +673,7 @@
   Dialog service;CreateCheckBox

CreateCheckBox
-   Create a new control 
of type CheckBox in the current dialog.
+   Creates a new 
control of type CheckBox in the current dialog.

svc.CreateCheckBox(ControlName: str, Place: any, 
Multiline: bool = False): svc

@@ -682,7 +682,7 @@



- Set 
myCheckBox = oDlg.CreateCheckBox("CheckBox1", Array(20, 20, 60, 15), 
MultiLine := True)
+ Set 
myCheckBox = oDlg.CreateCheckBox("CheckBox1", Array(20, 20, 60, 15), MultiLine 
:= True)



@@ -696,18 +696,18 @@
   Dialog service;CreateComboBox

CreateComboBox
-   Create a new control 
of type ComboBox in the current dialog.
+   Creates a new 
control of type ComboBox in the current dialog.

svc.CreateComboBox(ControlName: str, Place: any, 
Border: str = "3D", DropDown: bool = True, LineCount: num = 5): 
svc

-   Border: 
"3D" (default) or "FLAT" or "NONE"
+   Border: 
"3D" (default), "FLAT" or "NONE"
DropDown: When True 
(default), a drop down button is displayed
LineCount: Specifies the maximum line 
count displayed in the drop down (default = 5)

   


- Set 
myComboBox = oDlg.CreateComboBox("ComboBox1", Array(20, 20, 60, 15), 
Dropdown := True)
+ Set 
myComboBox = oDlg.CreateComboBox("ComboBox1", Array(20, 20, 60, 15), Dropdown 
:= True)



@@ -721,11 +721,11 @@
   Dialog service;CreateCurrencyField

CreateCurrencyField
-   Create a new control 
of type CurrencyField in the current dialog.
+   Creates a new 
control of type CurrencyField in the current 
dialog.

svc.CreateCurrencyField(ControlName: str, Place: 
any, Border ="3D", SpinButton: bool = False, MinValue: num = -100, 
MaxValue: num = +100, Increment: num = 1, Accuracy: num = 2): 
svc

-   Border: 
"3D" (default) or "FLAT" or "NONE"
+   Border: 
"3D" (default), "FLAT" or "NONE"
SpinButton: when 
True (default = False), a spin button is 
present
MinValue: the smallest value that can 
be entered in the control. Default = -100
MaxValue: the largest value that can be 
entered in the control. Default = +100
@@ -735,7 +735,7 @@
   


- Set 
myCurrencyField = oDlg.CreateCurrencyField("CurrencyField1", 
Array(20, 20, 60, 15), SpinButton := True)
+ Set 
myCurrencyField = oDlg.CreateCurrencyField("CurrencyField1", Array(20, 20, 60, 
15), SpinButton := True)



@@ -749,11 +749,11 @@
   Dialog service;CreateDateField

CreateDateField
-   Create 

core.git: basctl/source officecfg/registry

2024-01-11 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/baside2.cxx   |   10 
 basctl/source/basicide/basides1.cxx  |   27 ---
 basctl/source/basicide/basidesh.cxx  |6 ++
 officecfg/registry/schema/org/openoffice/Office/BasicIDE.xcs |   18 +++
 4 files changed, 56 insertions(+), 5 deletions(-)

New commits:
commit c0075bf84ecb64186f42c861985af43e120101f9
Author: Rafael Lima 
AuthorDate: Tue Jan 9 23:01:02 2024 +0100
Commit: Andreas Heinisch 
CommitDate: Thu Jan 11 19:49:28 2024 +0100

tdf#155381 Remember the visibility of UI components in the Basic IDE

This patch remembers the visibility of the Object Catalog, Watched 
Expressions and Stack Window in the Basic IDE.

Change-Id: I2fea038ffc56af45cd6570feeb14ab84307f8cef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161852
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 8eebbdb44e8d..a36cec6fe245 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1458,6 +1458,16 @@ ModulWindowLayout::ModulWindowLayout (vcl::Window* 
pParent, ObjectCatalog& rObje
 // Get active color scheme from the registry
 m_sColorSchemeId = 
GetShell()->GetColorConfig()->GetCurrentColorSchemeName();
 aSyntaxColors.ApplyColorScheme(m_sColorSchemeId, true);
+
+// Initialize the visibility of the Stack Window
+bool bStackVisible = 
::officecfg::Office::BasicIDE::EditorSettings::StackWindow::get();
+if (!bStackVisible)
+aStackWindow->Show(bStackVisible);
+
+// Initialize the visibility of the Watched Expressions window
+bool bWatchVisible = 
::officecfg::Office::BasicIDE::EditorSettings::WatchWindow::get();
+if (!bWatchVisible)
+aWatchWindow->Show(bWatchVisible);
 }
 
 ModulWindowLayout::~ModulWindowLayout()
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 507902a34d0a..8052845983f3 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -423,14 +423,21 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
 break;
 
 case SID_BASICIDE_OBJCAT:
-// toggling object catalog
-aObjectCatalog->Show(!aObjectCatalog->IsVisible());
+{
+// Toggle the visibility of the object catalog
+bool bVisible = aObjectCatalog->IsVisible();
+aObjectCatalog->Show(!bVisible);
 if (pLayout)
 pLayout->ArrangeWindows();
 // refresh the button state
 if (SfxBindings* pBindings = GetBindingsPtr())
 pBindings->Invalidate(SID_BASICIDE_OBJCAT);
-break;
+
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+
officecfg::Office::BasicIDE::EditorSettings::ObjectCatalog::set(!bVisible, 
batch);
+batch->commit();
+}
+break;
 
 case SID_BASICIDE_WATCH:
 {
@@ -438,9 +445,14 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
 if (!dynamic_cast(pLayout.get()))
 return;
 
-
pModulLayout->ShowWatchWindow(!pModulLayout->IsWatchWindowVisible());
+bool bVisible = pModulLayout->IsWatchWindowVisible();
+pModulLayout->ShowWatchWindow(!bVisible);
 if (SfxBindings* pBindings = GetBindingsPtr())
 pBindings->Invalidate(SID_BASICIDE_WATCH);
+
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+
officecfg::Office::BasicIDE::EditorSettings::WatchWindow::set(!bVisible, batch);
+batch->commit();
 }
 break;
 
@@ -450,9 +462,14 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
 if (!dynamic_cast(pLayout.get()))
 return;
 
-
pModulLayout->ShowStackWindow(!pModulLayout->IsStackWindowVisible());
+bool bVisible = pModulLayout->IsStackWindowVisible();
+pModulLayout->ShowStackWindow(!bVisible);
 if (SfxBindings* pBindings = GetBindingsPtr())
 pBindings->Invalidate(SID_BASICIDE_STACK);
+
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+
officecfg::Office::BasicIDE::EditorSettings::StackWindow::set(!bVisible, batch);
+batch->commit();
 }
 break;
 
diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index e64e34e0ff59..420a51a2de8b 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -75,6 +75,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace basctl
 {
@@ -211,6 +212,11 @@ void Shell::Init()
 InitTabBar();
 InitZoomLevel();
 
+// Initialize the visibility of the Object Catalog
+bool bObjCatVisible = 
::officecfg::Office::BasicIDE::

core.git: helpcontent2

2024-01-11 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6c0463e38d138e0e502bc9c8ae9a01f4809ef5df
Author: Rafael Lima 
AuthorDate: Thu Jan 11 19:37:56 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 11 19:37:56 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to abbdd32a5cd87a4f21ba17e4ea9de6fd224b8ed4
  - Fix strings in sf_dataset.xhp

Change-Id: Ifdee53dc4a92d9f889e9dc92943331659d28775b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161931
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index d6168024a684..abbdd32a5cd8 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d6168024a68482349db0c02713e79d37a31519ce
+Subproject commit abbdd32a5cd87a4f21ba17e4ea9de6fd224b8ed4


help.git: source/text

2024-01-11 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_dataset.xhp |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit abbdd32a5cd87a4f21ba17e4ea9de6fd224b8ed4
Author: Rafael Lima 
AuthorDate: Thu Jan 11 14:12:23 2024 +0100
Commit: Olivier Hallot 
CommitDate: Thu Jan 11 19:37:56 2024 +0100

Fix strings in sf_dataset.xhp

Change-Id: Ifdee53dc4a92d9f889e9dc92943331659d28775b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161931
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/sbasic/shared/03/sf_dataset.xhp 
b/source/text/sbasic/shared/03/sf_dataset.xhp
index a3b7ae61a3..e63f16e3df 100644
--- a/source/text/sbasic/shared/03/sf_dataset.xhp
+++ b/source/text/sbasic/shared/03/sf_dataset.xhp
@@ -134,7 +134,7 @@
   Dictionary service
 
 
-  Returns a 
Dictionary  with the default values used for each field in 
the dataset. The fields or columns in the dataset are the keys in the 
dictionary.
+  Returns a 
Dictionary with the default values used for each field in 
the dataset. The fields or columns in the dataset are the keys in the 
dictionary.
   The 
database field types are converted to their corresponding Basic/Python data 
types. When the field type is undefined, the default value is 
Null if the field is nullable or 
Empty.
 
   
@@ -379,7 +379,7 @@
   Dataset service;CreateDataset
 
 CreateDataset
-Returns a 
Dataset service instance from an existing dataset by 
applying the specified filter and order by statements.
+Returns a 
Dataset service instance from an existing dataset by 
applying the specified filter and ORDER BY 
statements.
 
 
   svc.CreateDataset(opt filter: str, opt orderby: str): svc
@@ -393,17 +393,17 @@
   ' Use an empty 
string to remove the current filter
   oNewDataset = oDataset.CreateDataset(Filter := 
"")
   ' Examples of 
common filters
-  oNewDataset = oDataset.CreateDataset(Filter := 
"[Name] = 'John'")
-  oNewDataset = oDataset.CreateDataset(Filter := 
"[Name] LIKE 'A'")
+  oNewDataset = 
oDataset.CreateDataset(Filter := "[Name] = 'John'")
+  oNewDataset = 
oDataset.CreateDataset(Filter := "[Name] LIKE 'A'")
   ' It is possible to 
append additional conditions to the current filter
-  oNewDataset = oDataset.CreateDataset(Filter := "(" 
& oDataset.Filter & ") AND [Name] LIKE 'A'")
+  oNewDataset = 
oDataset.CreateDataset(Filter := "(" & oDataset.Filter & ") AND [Name] 
LIKE 'A'")
 
 
 
   new_dataset = dataset.CreateDataset(filter = 
"")
-  new_dataset = dataset.CreateDataset(filter = "[Name] 
= 'John'")
-  new_dataset = dataset.CreateDataset(filter = "[Name] 
LIKE 'A'")
-  new_dataset = dataset.CreateDataset(filter = 
f"({dataset.Filter}) AND [Name] LIKE 'A'")
+  new_dataset = 
dataset.CreateDataset(filter = "[Name] = 'John'")
+  new_dataset = 
dataset.CreateDataset(filter = "[Name] LIKE 'A'")
+  new_dataset = 
dataset.CreateDataset(filter = f"({dataset.Filter}) AND [Name] LIKE 
'A'")
 
   
 


core.git: helpcontent2

2024-01-11 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 89d0ab74e58fdbc0f305a6fec6bd5da677599691
Author: Rafael Lima 
AuthorDate: Thu Jan 11 14:20:37 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Thu Jan 11 14:20:37 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to d6168024a68482349db0c02713e79d37a31519ce
  - Silence strings for translation in sf_database.xhp

Change-Id: Ibbccb617adbb97da9f892ead789db8f643f78f83
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161930
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index b85bb4516175..d6168024a684 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b85bb4516175e71903a9c5db583724231fa60471
+Subproject commit d6168024a68482349db0c02713e79d37a31519ce


help.git: source/text

2024-01-11 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_database.xhp |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit d6168024a68482349db0c02713e79d37a31519ce
Author: Rafael Lima 
AuthorDate: Thu Jan 11 13:23:18 2024 +0100
Commit: Olivier Hallot 
CommitDate: Thu Jan 11 14:20:36 2024 +0100

Silence strings for translation in sf_database.xhp

Change-Id: Ibbccb617adbb97da9f892ead789db8f643f78f83
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161930
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/sbasic/shared/03/sf_database.xhp 
b/source/text/sbasic/shared/03/sf_database.xhp
index 852fb6a0f4..b898e0549b 100644
--- a/source/text/sbasic/shared/03/sf_database.xhp
+++ b/source/text/sbasic/shared/03/sf_database.xhp
@@ -68,10 +68,10 @@
 
 
   
-NONE
+NONE
   
   
-0
+0
   
   
 Transaction 
handling is disabled and the database is set to the default auto-commit 
mode.
@@ -79,10 +79,10 @@
 
 
   
-READ_UNCOMMITTED
+READ_UNCOMMITTED
   
   
-1
+1
   
   
 Dirty reads, 
non-repeatable reads and phantom reads can occur.
@@ -91,10 +91,10 @@
 
 
   
-READ_COMMITTED
+READ_COMMITTED
   
   
-2
+2
   
   
 Dirty reads 
are prevented, however non-repeatable reads and phantom reads can 
occur.
@@ -103,10 +103,10 @@
 
 
   
-REPEATABLE_READ
+REPEATABLE_READ
   
   
-4
+4
   
   
 Dirty reads 
and non-repeatable reads are prevented. However, phantom reads can 
occur.
@@ -115,10 +115,10 @@
 
 
   
-SERIALIZABLE
+SERIALIZABLE
   
   
-8
+8
   
   
 Dirty reads, 
non-repeatable reads and phantom reads are prevented.


core.git: sc/source

2024-01-10 Thread Rafael Lima (via logerrit)
 sc/source/ui/view/output.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit bd88a9ec95bf2eba157bbdd6ccfd72cc468399bf
Author: Rafael Lima 
AuthorDate: Tue Jan 9 19:19:38 2024 +0100
Commit: Rafael Lima 
CommitDate: Wed Jan 10 20:29:19 2024 +0100

tdf#159075 Fix drawing comment triangle in Calc

Change-Id: I82779ecd3ca4cf7ad95ab8f927c1a5e371613bf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161768
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 23f3cecb539f..edad3a96f0b6 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2519,7 +2519,9 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& 
rRenderContext)
 }
 // DPI/ZOOM 100/100 => 10, 100/50 => 7, 100/150 => 13
 // DPI/ZOOM 150/100 => 13, 150/50 => 8.5, 150/150 => 17.5
-const double nSize( rRenderContext.GetDPIScaleFactor() * 
aZoomX * 6 + 4);
+const double fSize(rRenderContext.GetDPIScaleFactor() * 
aZoomX * 6 + 4);
+// Make sure we have an integer size to draw a proper 
triangle
+sal_Int16 nSize = static_cast(fSize);
 Point aPoints[3];
 aPoints[0] = Point(nMarkX, nPosY);
 aPoints[0].setX( bLayoutRTL ? aPoints[0].X() + nSize : 
aPoints[0].X() - nSize );


core.git: helpcontent2

2024-01-10 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7afd11f8e476884662c18db85445752cc030b2e2
Author: Rafael Lima 
AuthorDate: Wed Jan 10 15:29:29 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Wed Jan 10 15:29:29 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to b85bb4516175e71903a9c5db583724231fa60471
  - tdf#156925 Document the Color Scheme dialog

Change-Id: Ida045c1f2884b70b1f9a961eb2c17e8553b8f25b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161850
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 88e571fc83ad..b85bb4516175 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 88e571fc83adaad9c813df8cacc0cdfdef59174f
+Subproject commit b85bb4516175e71903a9c5db583724231fa60471


help.git: AllLangHelp_sbasic.mk source/text

2024-01-10 Thread Rafael Lima (via logerrit)
 AllLangHelp_sbasic.mk  |1 
 source/text/sbasic/shared/color_scheme.xhp |   52 +
 source/text/shared/optionen/01012000.xhp   |2 -
 3 files changed, 54 insertions(+), 1 deletion(-)

New commits:
commit b85bb4516175e71903a9c5db583724231fa60471
Author: Rafael Lima 
AuthorDate: Tue Jan 9 20:55:08 2024 +0100
Commit: Olivier Hallot 
CommitDate: Wed Jan 10 15:29:29 2024 +0100

tdf#156925 Document the Color Scheme dialog

Change-Id: Ida045c1f2884b70b1f9a961eb2c17e8553b8f25b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/161850
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 8f89b33ffb..c4c51f9b1a 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -407,6 +407,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/CallByName \
 helpcontent2/source/text/sbasic/shared/classmodule \
 helpcontent2/source/text/sbasic/shared/collection \
+helpcontent2/source/text/sbasic/shared/color_scheme \
 helpcontent2/source/text/sbasic/shared/compatible \
 helpcontent2/source/text/sbasic/shared/compatibilitymode \
 helpcontent2/source/text/sbasic/shared/Compiler_options \
diff --git a/source/text/sbasic/shared/color_scheme.xhp 
b/source/text/sbasic/shared/color_scheme.xhp
new file mode 100644
index 00..14b5795f40
--- /dev/null
+++ b/source/text/sbasic/shared/color_scheme.xhp
@@ -0,0 +1,52 @@
+
+
+
+
+
+  
+Color Scheme
+/text/sbasic/shared/color_scheme.xhp
+  
+
+
+
+  
+Basic IDE;Color schemes
+  
+  
+  
+  Color Scheme
+  Changes the color 
scheme to be used in the Basic IDE code editor.
+  
+
+Choose 
View - Color Scheme.
+  
+
+  Basic IDE Color Options
+  Choose whether to use 
the Application Colors or a specific color scheme:
+  
+
+  Use 
Application Colors: Select this option to use the colors defined in 
the Application 
Colors dialog.
+
+
+  Choose 
Color Scheme: Select this option to use one of the available color 
schemes in the dialog.
+
+  
+
+  Color Schemes
+  Lists the available 
color schemes that can be applied to the Basic IDE code editor.
+  When the option 
Choose Color Scheme is selected, the list of color schemes 
is enabled. Choose one of the available color schemes and click 
OK to apply it.
+  New color schemes can be installed via 
extensions. Visit the https://extensions.libreoffice.org";>Extensions website to download 
additional Basic IDE color schemes.
+
+  
+
+  
+
+
diff --git a/source/text/shared/optionen/01012000.xhp 
b/source/text/shared/optionen/01012000.xhp
index 906e19e736..1def34b67d 100644
--- a/source/text/shared/optionen/01012000.xhp
+++ b/source/text/shared/optionen/01012000.xhp
@@ -38,7 +38,7 @@
 
 
 
-Application Colors
+Application 
Colors
 Sets the colors for the $[officename] user interface. You can 
save the current settings as color scheme and load them later.
 
 


core.git: sc/source sc/uiconfig

2024-01-10 Thread Rafael Lima (via logerrit)
 sc/source/ui/navipi/content.cxx  |   13 -
 sc/uiconfig/scalc/ui/dropmenu.ui |8 
 2 files changed, 20 insertions(+), 1 deletion(-)

New commits:
commit ba3627ba899adb896855fddee9a0fdd8968b603a
Author: Rafael Lima 
AuthorDate: Tue Jan 9 14:15:21 2024 +0100
Commit: Rafael Lima 
CommitDate: Wed Jan 10 12:57:34 2024 +0100

tdf#158704 Add "Delete Comment" command to the Navigator context menu

Change-Id: Ied128145ab0e171e536233dda2d31ec3eace1543
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161766
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Rafael Lima 

diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 6c472e97dc2e..af8b64b6fdba 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -601,9 +601,12 @@ IMPL_LINK(ScContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
 sActive = sId;
 xDocMenu->set_active(sActive, true);
 
-// Edit Comments entry is only visible for comments
+// Edit/Delete Comments are only visible for comments
 if (nType != ScContentId::NOTE)
+{
 xPop->set_visible("edit", false);
+xPop->set_visible("delete", false);
+}
 
 OUString sIdent = xPop->popup_at_rect(m_xTreeView.get(), 
tools::Rectangle(rCEvt.GetMousePosPixel(), Size(1, 1)));
 if (sIdent == "hyperlink")
@@ -632,6 +635,14 @@ IMPL_LINK(ScContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
 bDone = true;
 }
 }
+else if (sIdent == "delete")
+{
+ScAddress aPos = GetNotePos(nChild);
+pParentWindow->SetCurrentTable(aPos.Tab());
+pParentWindow->SetCurrentCell(aPos.Col(), aPos.Row());
+ScTabViewShell* pScTabViewShell = 
ScNavigatorDlg::GetTabViewShell();
+pScTabViewShell->DeleteContents(InsertDeleteFlags::NOTE);
+}
 }
 break;
 default: break;
diff --git a/sc/uiconfig/scalc/ui/dropmenu.ui b/sc/uiconfig/scalc/ui/dropmenu.ui
index 7ed44d4093d0..cc585c5ab735 100644
--- a/sc/uiconfig/scalc/ui/dropmenu.ui
+++ b/sc/uiconfig/scalc/ui/dropmenu.ui
@@ -86,5 +86,13 @@
 True
   
 
+
+  
+True
+False
+Delete Comment
+True
+  
+
   
 


core.git: sc/source

2024-01-10 Thread Rafael Lima (via logerrit)
 sc/source/ui/navipi/content.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9df028306fa75726eeda491f4d643d2a1073b33f
Author: Rafael Lima 
AuthorDate: Tue Jan 9 13:34:39 2024 +0100
Commit: Rafael Lima 
CommitDate: Wed Jan 10 12:32:31 2024 +0100

tdf#158763 Focus the document after clicking Edit Comment

This patch is needed to make the gtk3 backend focus the document after the 
Edit Comment is clicked in the Navigator sidebar.

It already worked in gen and kf5.

Change-Id: Ic46be72e6ee7df71f2031e1c6b5f0bf153a8a8c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161765
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Rafael Lima 

diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 9e1cc51afd44..6c472e97dc2e 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -629,6 +629,7 @@ IMPL_LINK(ScContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
 GetManualOrCurrent()->GetDocFunc().ShowNote(aPos, 
true);
 ScTabViewShell* pScTabViewShell = 
ScNavigatorDlg::GetTabViewShell();
 pScTabViewShell->EditNote();
+bDone = true;
 }
 }
 }


  1   2   3   4   5   6   7   8   >