connectivity/source/parse/sqliterator.cxx |    6 +++---
 sw/source/uibase/shells/textsh1.cxx       |   10 ++++++++--
 2 files changed, 11 insertions(+), 5 deletions(-)

New commits:
commit bf770e860382ff8b6483b820a6dacb55f1cd5c68
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Thu Apr 20 12:43:38 2023 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Thu Apr 20 15:16:34 2023 +0200

    Typo: nCurentPos->nCurrentPos (connectivity/sqliterator)
    
    Change-Id: I6580e81a8a792ff98e1b8594ed79bd77b684b719
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150684
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/connectivity/source/parse/sqliterator.cxx 
b/connectivity/source/parse/sqliterator.cxx
index 64ea48d0351a..1a205953f7aa 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -1216,10 +1216,10 @@ void 
OSQLParseTreeIterator::traverseSearchCondition(OSQLParseNode const * pSearc
         OSL_ENSURE(pSearchCondition->count() == 2,"OSQLParseTreeIterator: 
error in parse tree!");
         const OSQLParseNode* pPart2 = pSearchCondition->getChild(1);
 
-        sal_Int32 nCurentPos = pPart2->count()-2;
+        sal_Int32 nCurrentPos = pPart2->count()-2;
 
-        OSQLParseNode * pNum_value_exp  = pPart2->getChild(nCurentPos);
-        OSQLParseNode * pOptEscape      = pPart2->getChild(nCurentPos+1);
+        OSQLParseNode * pNum_value_exp  = pPart2->getChild(nCurrentPos);
+        OSQLParseNode * pOptEscape      = pPart2->getChild(nCurrentPos+1);
 
         OSL_ENSURE(pNum_value_exp != nullptr,"OSQLParseTreeIterator: error in 
parse tree!");
         OSL_ENSURE(pOptEscape != nullptr,"OSQLParseTreeIterator: error in 
parse tree!");
commit 06c61d3581d95354d627c7de1a7d97b62c8f61c6
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Wed Apr 19 20:06:28 2023 -0400
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Thu Apr 20 15:16:32 2023 +0200

    tdf#154817 sw UI: no hatch/gradient name if not selected
    
    This fixes a LO 7.2.0 regression caused by
    commit 3f6797c29e9672eba354400f24a669244fd746c0.
    
    A unique name was being created for gradients and hatches
    every time the paragraph dialog box was OK'd,
    even if the Area tab was not selected or natigated to.
    
    Only create the name if the gradient or hatch is actually
    selected as the fill type.
    
    Change-Id: I088954db07d025570b0f5ecd5785020052c6f1f5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150669
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index e331b290121c..b66772a6dbca 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -51,6 +51,7 @@
 #include <svx/SmartTagItem.hxx>
 #include <svx/xflgrit.hxx>
 #include <svx/xflhtit.hxx>
+#include <svx/xfillit0.hxx>
 #include <fmtinfmt.hxx>
 #include <wrtsh.hxx>
 #include <wview.hxx>
@@ -1585,7 +1586,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
                             pSet->Put(SfxStringItem(FN_DROP_CHAR_STYLE_NAME, 
sCharStyleName));
                         }
 
-                        const XFillGradientItem* pTempGradItem = 
pSet->GetItem<XFillGradientItem>(XATTR_FILLGRADIENT);
+                        const XFillStyleItem* pFS = 
pSet->GetItem<XFillStyleItem>(XATTR_FILLSTYLE);
+                        bool bSet = pFS && pFS->GetValue() == 
drawing::FillStyle_GRADIENT;
+                        const XFillGradientItem* pTempGradItem
+                            = bSet ? 
pSet->GetItem<XFillGradientItem>(XATTR_FILLGRADIENT) : nullptr;
                         if (pTempGradItem && 
pTempGradItem->GetName().isEmpty())
                         {
                             // MigrateItemSet guarantees unique gradient names
@@ -1594,7 +1598,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
                             SdrModel::MigrateItemSet(&aMigrateSet, pSet, 
pDrawModel);
                         }
 
-                        const XFillHatchItem* pTempHatchItem = 
pSet->GetItem<XFillHatchItem>(XATTR_FILLHATCH);
+                        bSet = pFS && pFS->GetValue() == 
drawing::FillStyle_HATCH;
+                        const XFillHatchItem* pTempHatchItem
+                            = bSet ? 
pSet->GetItem<XFillHatchItem>(XATTR_FILLHATCH) : nullptr;
                         if (pTempHatchItem && 
pTempHatchItem->GetName().isEmpty())
                         {
                             SfxItemSetFixed<XATTR_FILLHATCH, XATTR_FILLHATCH> 
aMigrateSet(rWrtSh.GetView().GetPool());

Reply via email to