[Libreoffice-commits] core.git: configmgr/source

2023-11-25 Thread Stephan Bergmann (via logerrit)
 configmgr/source/xcsparser.cxx |   28 
 1 file changed, 16 insertions(+), 12 deletions(-)

New commits:
commit 8ac9ef88ce9cf8a78748d420639eec0f23735e47
Author: Stephan Bergmann 
AuthorDate: Sat Nov 25 14:54:27 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Nov 25 23:10:06 2023 +0100

Simplify description/type parsing a bit

...it only pertains to property nodes

Change-Id: I706e14118e3f8c33190821f9bcce81bd60d665e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159953
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index d4e35cc75c39..50d7b9fa4791 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -109,7 +109,7 @@ void merge(
 }
 
 XcsParser::XcsParser(int layer, Data & data):
-valueParser_(layer), data_(data), state_(STATE_START), ignoring_(), 
bIsParsingInfo_(false), type_(TYPE_ERROR)
+valueParser_(layer), data_(data), state_(STATE_START), ignoring_(), 
bIsParsingInfo_(false)
 {}
 
 XcsParser::~XcsParser() {}
@@ -307,13 +307,17 @@ void XcsParser::endElement(xmlreader::XmlReader const & 
reader) {
 Element top(std::move(elements_.top()));
 elements_.pop();
 if (top.node.is()) {
-// Remove whitespace from description_ resulting from line 
breaks/indentation in xml files
-OUString desc(description_.makeStringAndClear());
-desc = desc.trim();
-while (desc.indexOf("  ") != -1)
-desc = desc.replaceAll("  ", " ");
-top.node->setDescription(desc);
-top.node->setType(type_);
+if (top.node->kind() == Node::KIND_PROPERTY
+|| top.node->kind() == Node::KIND_LOCALIZED_PROPERTY)
+{
+// Remove whitespace from description_ resulting from line 
breaks/indentation in xml files
+OUString desc(description_.makeStringAndClear());
+desc = desc.trim();
+while (desc.indexOf("  ") != -1)
+desc = desc.replaceAll("  ", " ");
+top.node->setDescription(desc);
+top.node->setType(type_);
+}
 if (elements_.empty()) {
 switch (state_) {
 case STATE_TEMPLATES:
@@ -474,7 +478,7 @@ void XcsParser::handleNodeRef(xmlreader::XmlReader & 
reader) {
 void XcsParser::handleProp(xmlreader::XmlReader & reader) {
 bool hasName = false;
 OUString name;
-valueParser_.type_ = TYPE_ERROR;
+type_ = TYPE_ERROR;
 bool localized = false;
 bool nillable = true;
 for (;;) {
@@ -489,9 +493,8 @@ void XcsParser::handleProp(xmlreader::XmlReader & reader) {
 } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
attrLn == "type")
 {
-valueParser_.type_ = xmldata::parseType(
+type_ = xmldata::parseType(
 reader, reader.getAttributeValue(true));
-type_ = valueParser_.type_;
 } else if (attrNsId == ParseManager::NAMESPACE_OOR &&
attrLn == "localized")
 {
@@ -506,10 +509,11 @@ void XcsParser::handleProp(xmlreader::XmlReader & reader) 
{
 throw css::uno::RuntimeException(
 "no prop name attribute in " + reader.getUrl());
 }
-if (valueParser_.type_ == TYPE_ERROR) {
+if (type_ == TYPE_ERROR) {
 throw css::uno::RuntimeException(
 "no prop type attribute in " + reader.getUrl());
 }
+valueParser_.type_ = type_;
 elements_.push(
 Element(
 (localized


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - configure.ac

2023-11-25 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ccbe835d2391087d67a41c0baf67b309d852a17d
Author: Andras Timar 
AuthorDate: Sat Nov 25 20:35:33 2023 +0100
Commit: Andras Timar 
CommitDate: Sat Nov 25 20:35:33 2023 +0100

Bump version to 22.05.21.1

Change-Id: Ib37d550643dbac62fa6fde15b69d327a5e52291a

diff --git a/configure.ac b/configure.ac
index 1c75c940e349..ac14c5440705 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[22.05.20.1],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[22.05.21.1],[],[],[https://collaboraoffice.com/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard


[Libreoffice-commits] core.git: 2 commits - distro-configs/LibreOfficeFlatpak.conf solenv/flatpak-manifest.in sw/source

2023-11-25 Thread Stephan Bergmann (via logerrit)
 distro-configs/LibreOfficeFlatpak.conf |1 
 solenv/flatpak-manifest.in |  106 +++--
 sw/source/filter/ww8/wrtww8.cxx|1 
 3 files changed, 104 insertions(+), 4 deletions(-)

New commits:
commit 564c34b01269ff4b574f1cc2a5de52ceebdd8b25
Author: Stephan Bergmann 
AuthorDate: Sat Nov 25 14:52:51 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Nov 25 19:31:35 2023 +0100

-Werror=maybe-uninitialized

Change-Id: I7b3dca8c698d3be304817ad3fa863bd3dfe54a1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159952
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index fdadb13d34a7..38fbfb21666a 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1911,6 +1911,7 @@ void MSWordExportBase::SaveData( SwNodeOffset nStt, 
SwNodeOffset nEnd )
 aData.pOldFlyOffset = m_pFlyOffset;
 aData.eOldAnchorType = m_eNewAnchorType;
 
+aData.bOldWriteAll = false;
 aData.bOldOutTable = m_bOutTable;
 aData.bOldFlyFrameAttrs = m_bOutFlyFrameAttrs;
 aData.bOldStartTOX = m_bStartTOX;
commit 4333186f8ccfb7309e1212a2c46624b4d56cf0f9
Author: Stephan Bergmann 
AuthorDate: Fri Nov 24 13:18:27 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Nov 25 19:31:25 2023 +0100

Update solenv/flatpak-manifest.in

* Incorporate
  

  "Update runtime to 23.08"

* Adapt to recent FONT_NOTO_* change

* Adapt to 3d5cafbe1727a95a54eb4a65d98d6d79ec46f0c8 "tdf#157518: external:
  bundle zxcvbn-c"

Change-Id: Ia956a35c99f487b56a0f58bb591bea366faddbce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159926
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/distro-configs/LibreOfficeFlatpak.conf 
b/distro-configs/LibreOfficeFlatpak.conf
index dae435621e89..b8375380ce02 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -60,4 +60,5 @@
 --without-system-redland
 --without-system-sane
 --without-system-xmlsec
+--without-system-zxcvbn
 --without-system-zxing
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 6e174109c78a..58e2ce8f46f2 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -1,7 +1,7 @@
 {
 "id": "org.libreoffice.LibreOffice",
 "runtime": "org.freedesktop.Platform",
-"runtime-version": "22.08",
+"runtime-version": "23.08",
 "sdk": "org.freedesktop.Sdk",
 "sdk-extensions": [
 "org.freedesktop.Sdk.Extension.openjdk17"
@@ -402,11 +402,102 @@
 "dest-filename": "@MDDS_TARBALL@"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/@FONT_NOTO_TARBALL@";,
-"sha256": "@FONT_NOTO_SHA256SUM@",
+"url": 
"https://dev-www.libreoffice.org/src/@FONT_NOTO_KUFI_ARABIC_TARBALL@";,
+"sha256": "@FONT_NOTO_KUFI_ARABIC_SHA256SUM@",
 "type": "file",
 "dest": "external/tarballs",
-"dest-filename": "@FONT_NOTO_TARBALL@"
+"dest-filename": "@FONT_NOTO_KUFI_ARABIC_TARBALL@"
+},
+{
+"url": 
"https://dev-www.libreoffice.org/src/@FONT_NOTO_SANS_TARBALL@";,
+"sha256": "@FONT_NOTO_SANS_SHA256SUM@",
+"type": "file",
+"dest": "external/tarballs",
+"dest-filename": "@FONT_NOTO_SANS_TARBALL@"
+},
+{
+"url": 
"https://dev-www.libreoffice.org/src/@FONT_NOTO_SERIF_TARBALL@";,
+"sha256": "@FONT_NOTO_SERIF_SHA256SUM@",
+"type": "file",
+"dest": "external/tarballs",
+"dest-filename": "@FONT_NOTO_SERIF_TARBALL@"
+},
+{
+"url": 
"https://dev-www.libreoffice.org/src/@FONT_NOTO_SANS_ARABIC_TARBALL@";,
+"sha256": "@FONT_NOTO_SANS_ARABIC_SHA256SUM@",
+"type": "file",
+"dest": "external/tarballs",
+"dest-filename": "@FONT_NOTO_SANS_ARABIC_TARBALL@"
+},
+{
+"url": 
"https://dev-www.libreoffice.org/src/@FONT_NOTO_NASKH_ARABIC_TARBALL@";,
+"sha256": "@FONT_NOTO_NASKH_ARABIC_SHA256SUM@",
+"type": "file",
+"dest": "external/tarballs",
+"dest-filename": "@FONT_NOTO_NASKH_ARABIC_TARBALL@"
+},
+{
+"url": 
"https://dev-www.libreoffice.org/src/@FONT_NOTO_SANS_HEBREW_TARBALL@";,
+   

[Libreoffice-commits] core.git: compilerplugins/clang writerfilter/source

2023-11-25 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/fieldcast.results   |3 ---
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |3 ++-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 77a47ead5d126cca8d5529a92ce20c40f0f6ca06
Author: Noel Grandin 
AuthorDate: Sat Nov 25 11:35:14 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 25 16:29:53 2023 +0100

loplugin:fieldcast in DomainMapper_Impl

Change-Id: I1d734e1d30b91b84d42067b9cc621581ad744a40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159949
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/compilerplugins/clang/fieldcast.results 
b/compilerplugins/clang/fieldcast.results
index c1ede6ef7ae5..7be14a330da5 100644
--- a/compilerplugins/clang/fieldcast.results
+++ b/compilerplugins/clang/fieldcast.results
@@ -625,9 +625,6 @@ vcl/source/window/impldockingwrapper.hxx:46
 vcl/source/window/menufloatingwindow.hxx:38
 MenuFloatingWindow pMenu VclPtr
 PopupMenu
-writerfilter/source/dmapper/DomainMapper_Impl.hxx:529
-writerfilter::dmapper::DomainMapper_Impl m_pLastSectionContext 
PropertyMapPtr
-writerfilter::dmapper::SectionPropertyMap
 writerfilter/source/dmapper/NumberingManager.hxx:221
 writerfilter::dmapper::ListsManager m_pCurrentDefinition class 
AbstractListDef::Pointer
 writerfilter::dmapper::ListDef
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index ae69b3ba5b89..e24d0e55389a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1269,7 +1269,8 @@ voidDomainMapper_Impl::PopProperties(ContextType eId)
 {
 if (m_aPropertyStacks[eId].size() == 1) // tdf#112202 only top level 
!!!
 {
-m_pLastSectionContext = m_aPropertyStacks[eId].top();
+m_pLastSectionContext = dynamic_cast< SectionPropertyMap* >( 
m_aPropertyStacks[eId].top().get() );
+assert(m_pLastSectionContext);
 }
 }
 else if (eId == CONTEXT_CHARACTER)
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index ec34244400dc..c6fa87537d9a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -526,7 +526,7 @@ private:
 std::unique_ptr m_pThemeHandler;
 
 PropertyMapPtr  m_pTopContext;
-PropertyMapPtr   m_pLastSectionContext;
+tools::SvRef m_pLastSectionContext;
 PropertyMapPtr   m_pLastCharacterContext;
 
 ::std::vector m_aCurrentTabStops;
@@ -655,7 +655,7 @@ public:
 
 SectionPropertyMap* GetLastSectionContext( )
 {
-return dynamic_cast< SectionPropertyMap* >( m_pLastSectionContext.get( 
) );
+return m_pLastSectionContext.get( );
 }
 
 css::uno::Reference const & 
GetPageStyles();


[Libreoffice-commits] core.git: editeng/inc editeng/source include/editeng include/svl svl/source vcl/source

2023-11-25 Thread Armin Le Grand (allotropia) (via logerrit)
 editeng/inc/editattr.hxx|   60 +--
 editeng/inc/editdoc.hxx |   16 +--
 editeng/source/editeng/editattr.cxx |  164 +++
 editeng/source/editeng/editdoc.cxx  |  167 +++-
 editeng/source/editeng/editeng.cxx  |5 
 editeng/source/editeng/editobj.cxx  |   37 +--
 editeng/source/editeng/editobj2.hxx |   11 --
 editeng/source/editeng/editundo.cxx |   20 ---
 editeng/source/editeng/editview.cxx |   12 +-
 editeng/source/editeng/fieldupdater.cxx |2 
 editeng/source/editeng/impedit.cxx  |6 -
 editeng/source/editeng/impedit.hxx  |1 
 editeng/source/editeng/impedit2.cxx |   24 +---
 editeng/source/editeng/impedit4.cxx |4 
 editeng/source/editeng/impedit5.cxx |5 
 include/editeng/editeng.hxx |1 
 include/svl/itemset.hxx |   18 +++
 svl/source/items/itempool.cxx   |   13 +-
 svl/source/items/itemset.cxx|   59 +++
 vcl/source/app/svapp.cxx|4 
 20 files changed, 306 insertions(+), 323 deletions(-)

New commits:
commit 52b692d16bc9b373067f3748fabf31aeace6e201
Author: Armin Le Grand (allotropia) 
AuthorDate: Fri Nov 24 16:12:03 2023 +0100
Commit: Armin Le Grand 
CommitDate: Sat Nov 25 16:13:47 2023 +0100

tdf#158317 fix cleanup of SfxPoolItems in editeng

It is not possible to use implCreateItemEntry/implCleanupItemEntry,
that is tooling limited *by purpose* to svl/Item/ItemSet stuff.
But what I can do is to do that SfxPoolItemHolder I already
talked/thought about. It is a helper that can safely hold a
SfxPoolItem in cases where an SfxItemSet is too expensive.
Think about it as a SfxItemSet for a single item. That solves
the problem why DirectPutItemInPool/DirectRemoveItemFromPool
is used in general (each usage is a 'compromize').
Did that now, works well. Editengine is now free of
DirectPutItemInPool/DirectRemoveItemFromPool.

Replaced ::CursorMoved with checkAndDeleteEmptyAttribs since all
these got static with no longer need to DirectRemoveItemFromPool.
Corrected create/delete counters.

Change-Id: Ia6e53f48ac2e479b461546515e68697039b5b628
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159931
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/editeng/inc/editattr.hxx b/editeng/inc/editattr.hxx
index fcc14ba5ce25..bb609ac1e996 100644
--- a/editeng/inc/editattr.hxx
+++ b/editeng/inc/editattr.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SvxFont;
 class SvxFontItem;
@@ -65,7 +66,7 @@ class SfxGrabBagItem;
 // bEdge: Attribute will not expand, if you want to expand just on the edge
 class EditCharAttrib
 {
-const SfxPoolItem*  pItem;
+SfxPoolItemHolder   maItemHolder;
 
 sal_Int32   nStart;
 sal_Int32   nEnd;
@@ -73,7 +74,7 @@ class EditCharAttrib
 boolbEdge   :1;
 
 public:
-EditCharAttrib( const SfxPoolItem& rAttr, sal_Int32 nStart, sal_Int32 nEnd 
);
+EditCharAttrib(SfxItemPool&, const SfxPoolItem&, sal_Int32 nStart, 
sal_Int32 nEnd);
 virtual ~EditCharAttrib();
 
 EditCharAttrib(const EditCharAttrib&) = delete;
@@ -81,8 +82,9 @@ public:
 
 voiddumpAsXml(xmlTextWriterPtr pWriter) const;
 
-sal_uInt16  Which() const   { return pItem->Which(); }
-const SfxPoolItem*  GetItem() const { return pItem; }
+const SfxPoolItemHolder& GetHolder() const {  return maItemHolder; }
+const SfxPoolItem* GetItem() const { return GetHolder().getItem(); }
+sal_uInt16 Which() const { if(GetItem()) return GetItem()->Which(); return 
0; }
 
 sal_Int32&  GetStart()  { return nStart; }
 sal_Int32&  GetEnd(){ return nEnd; }
@@ -153,7 +155,7 @@ inline void EditCharAttrib::Collaps( sal_Int32 nDiff )
 class EditCharAttribFont final : public EditCharAttrib
 {
 public:
-EditCharAttribFont( const SvxFontItem& rAttr, sal_Int32 nStart, sal_Int32 
nEnd );
+EditCharAttribFont(SfxItemPool&, const SfxPoolItem&, sal_Int32 nStart, 
sal_Int32 nEnd);
 
 virtual voidSetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
 };
@@ -163,7 +165,7 @@ public:
 class EditCharAttribWeight final : public EditCharAttrib
 {
 public:
-EditCharAttribWeight( const SvxWeightItem& rAttr, sal_Int32 nStart, 
sal_Int32 nEnd );
+EditCharAttribWeight(SfxItemPool&, const SfxPoolItem&, sal_Int32 nStart, 
sal_Int32 nEnd);
 
 virtual voidSetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
 };
@@ -172,7 +174,7 @@ public:
 class EditCharAttribItalic final : public EditCharAttrib
 {
 public:
-EditCharAttribItalic( const SvxPostureItem& rAttr, sal_Int32 nStart, 
sal_Int32 nEnd );
+EditCharAttribItalic(SfxItemPool&, const SfxPoolItem&, sal_Int32 nStart, 
sal_Int32 nEnd);
 
 v

[Libreoffice-commits] core.git: svx/uiconfig

2023-11-25 Thread Justin Luth (via logerrit)
 svx/uiconfig/ui/sidebarparagraph.ui |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit 2bb923d236cbd53ea2b10634537cb23fa545b0a2
Author: Justin Luth 
AuthorDate: Thu Nov 23 15:07:37 2023 -0500
Commit: Justin Luth 
CommitDate: Sat Nov 25 16:07:59 2023 +0100

tdf#115965 tdf#148790 sw sidebar: no need for RemoveBullet

"No List" was already removed from sw toolbar in 7.6.
Having it "lit up" when in a normal paragraph is distracting.

In LOKit it was desired to just remove it. Since the sidebar's
existing buttons for bullet and number lists are already toggles,
having a separate button to remove lists is almost completely pointless,
so let's remove it completely for all versions of LibreOffice.

This only affects SW. Only WriterVariants show mxTBxNumBullet
in svx/source/sidebar/paragraph/ParaPropertyPanel.cxx.

DrawImpress uses svx/source/sidebar/lists/ListsPropertyPanel.cxx
which didn't contain "No List".

Change-Id: Ie54b2647e2ec1729ebe3ab155e77b7fed3fff057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159886
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Justin Luth 
Reviewed-by: Pedro Silva 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159940
Tested-by: Jenkins

diff --git a/svx/uiconfig/ui/sidebarparagraph.ui 
b/svx/uiconfig/ui/sidebarparagraph.ui
index 590ab46a4212..8691368ae974 100644
--- a/svx/uiconfig/ui/sidebarparagraph.ui
+++ b/svx/uiconfig/ui/sidebarparagraph.ui
@@ -651,16 +651,6 @@
 False
   
 
-
-  
-True
-True
-  
-  
-False
-False
-  
-
   
   
 0


[Libreoffice-commits] core.git: compilerplugins/clang sw/source

2023-11-25 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/fieldcast.results |3 -
 sw/source/ui/misc/glossary.cxx  |5 +-
 sw/source/uibase/inc/unotools.hxx   |6 ++-
 sw/source/uibase/utlui/unotools.cxx |   54 +---
 4 files changed, 29 insertions(+), 39 deletions(-)

New commits:
commit d54ae809aa29fa7a9894c0a1236374fa96e01a43
Author: Noel Grandin 
AuthorDate: Sat Nov 25 11:14:44 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 25 15:22:28 2023 +0100

loplugin:fieldcast in SwOneExampleFrame

Change-Id: Ic00ad388b2c18d90075db8e8d0d6b114ed13841a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159948
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/compilerplugins/clang/fieldcast.results 
b/compilerplugins/clang/fieldcast.results
index 6fa27d645135..c1ede6ef7ae5 100644
--- a/compilerplugins/clang/fieldcast.results
+++ b/compilerplugins/clang/fieldcast.results
@@ -547,9 +547,6 @@ sw/source/uibase/inc/fldmgr.hxx:103
 sw/source/uibase/inc/swuiccoll.hxx:35
 SwCondCollPage m_pFormat SwFormat *
 SwConditionTextFormatColl
-sw/source/uibase/inc/unotools.hxx:48
-SwOneExampleFrame m_xCursor css::uno::Reference
-OTextCursorHelper
 unoidl/source/unoidl-read.cxx:151
 (anonymous namespace)::Entity entity const rtl::Reference
 unoidl::PublishableEntity
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index c7183d5126e1..8b2860c20c29 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -54,6 +54,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1042,7 +1043,7 @@ void SwGlossaryDlg::ResumeShowAutoText()
 m_xAutoText = text::AutoTextContainer::create( 
comphelper::getProcessComponentContext() );
 }
 
-uno::Reference< XTextCursor > & xCursor = 
m_xExampleFrame->GetTextCursor();
+rtl::Reference< SwXTextCursor > & xCursor = 
m_xExampleFrame->GetTextCursor();
 if(xCursor.is())
 {
 if (!sShortName.isEmpty())
@@ -1054,7 +1055,7 @@ void SwGlossaryDlg::ResumeShowAutoText()
 uno::Any aEntry(xGroup->getByName(sShortName));
 uno::Reference< XAutoTextEntry >  xEntry;
 aEntry >>= xEntry;
-xEntry->applyTo(xCursor);
+
xEntry->applyTo(static_cast(xCursor.get()));
 }
 }
 }
diff --git a/sw/source/uibase/inc/unotools.hxx 
b/sw/source/uibase/inc/unotools.hxx
index cda9ec73fcd5..e472a2f92706 100644
--- a/sw/source/uibase/inc/unotools.hxx
+++ b/sw/source/uibase/inc/unotools.hxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define EX_SHOW_ONLINE_LAYOUT   0x01
 // hard zoom value
@@ -39,13 +40,14 @@
 #define EX_LOCALIZE_TOC_STRINGS 0x08
 
 class SwView;
+class SwXTextCursor;
 
 class SW_DLLPUBLIC SwOneExampleFrame final : public 
weld::CustomWidgetController
 {
 ScopedVclPtr m_xVirDev;
 css::uno::Reference< css::frame::XModel > m_xModel;
 css::uno::Reference< css::frame::XController >m_xController;
-css::uno::Reference< css::text::XTextCursor > m_xCursor;
+rtl::Reference< SwXTextCursor >   m_xCursor;
 
 Idlem_aLoadedIdle;
 Link m_aInitializedLink;
@@ -74,7 +76,7 @@ public:
 virtual ~SwOneExampleFrame() override;
 
 css::uno::Reference< css::frame::XModel > &   GetModel()  {return 
m_xModel;}
-css::uno::Reference< css::text::XTextCursor > &   GetTextCursor() {return 
m_xCursor;}
+rtl::Reference< SwXTextCursor > & GetTextCursor() {return 
m_xCursor;}
 
 void ClearDocument();
 
diff --git a/sw/source/uibase/utlui/unotools.cxx 
b/sw/source/uibase/utlui/unotools.cxx
index 7e72566685e2..93edfaad30a7 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -143,8 +144,7 @@ void SwOneExampleFrame::Paint(vcl::RenderContext& 
rRenderContext, const tools::R
 Color aBgColor = 
SW_MOD()->GetColorConfig().GetColorValue(::svtools::DOCCOLOR).nColor;
 m_xVirDev->DrawWallpaper(tools::Rectangle(Point(), aSize), aBgColor);
 
-auto pCursor = dynamic_cast(m_xCursor.get());
-if (pCursor)
+if (m_xCursor)
 {
 uno::Reference xSettings(m_xController, 
uno::UNO_QUERY);
 uno::Reference  xViewProps = 
xSettings->getViewSettings();
@@ -156,7 +156,7 @@ void SwOneExampleFrame::Paint(vcl::RenderContext& 
rRenderContext, const tools::R
 
 m_xVirDev->Push(vcl::PushFlags::ALL);
 m_xVirDev->SetMapMode(MapMode(MapUnit::MapTwip));
-SwDoc *pDoc = pCursor->GetDoc();
+SwDoc *pDoc = m_xCursor->GetDoc();
 SwDocShell* pShell = pDoc->GetDocShell();
 tools::Rectangle aRect(Point(), m_xVirDev->PixelToLogic(aSize));
 pShell->SetVisArea(tools::Rectangle(Point(), Size(aR

[Libreoffice-commits] core.git: solenv/gbuild

2023-11-25 Thread Mike Kaganski (via logerrit)
 solenv/gbuild/UITest.mk |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit b5743ae5f576e45576426593da58fa74bb88c01b
Author: Mike Kaganski 
AuthorDate: Sat Nov 25 12:49:16 2023 +0100
Commit: Mike Kaganski 
CommitDate: Sat Nov 25 13:42:46 2023 +0100

Simplify UITest's custom configuration handling

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

diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk
index 65bc37c1d1bf..334080b70a70 100644
--- a/solenv/gbuild/UITest.mk
+++ b/solenv/gbuild/UITest.mk
@@ -60,11 +60,9 @@ else
$(call gb_Helper_abbreviate_dirs,\
rm -rf $(dir $(call gb_UITest_get_target,$*)) && \
mkdir -p $(dir $(call gb_UITest_get_target,$*))/user/user && \
-   cp $(SRCDIR)/qadevOOo/qa/registrymodifications.xcu $(dir $(call 
gb_UITest_get_target,$*))/user/user/ && \
+   cp -T $(if 
$(gb_UITest_use_config),$(gb_UITest_use_config),$(SRCDIR)/qadevOOo/qa/registrymodifications.xcu)
 $(dir $(call gb_UITest_get_target,$*))/user/user/registrymodifications.xcu && \
$(if $(gb_UITest__interactive),, \
rm -fr $@.core && mkdir -p $(dir $(call 
gb_UITest_get_target,$*))user/ && mkdir $@.core && cd $@.core && ) \
-   $(if $(gb_UITest_use_config), \
-   cp $(gb_UITest_use_config) $(dir $(call 
gb_UITest_get_target,$*))user/user && ) \
$(call gb_CppunitTest_coredumpctl_setup,$@) \
($(gb_UITest_PRECOMMAND) \
$(if $(G_SLICE),G_SLICE=$(G_SLICE)) \


[Libreoffice-commits] core.git: include/svtools svtools/qa svtools/source sw/source

2023-11-25 Thread Mike Kaganski (via logerrit)
 include/svtools/HtmlWriter.hxx  |   13 +++
 svtools/qa/unit/testHtmlWriter.cxx  |2 -
 svtools/source/svhtml/HtmlWriter.cxx|   53 +---
 sw/source/filter/html/htmlatr.cxx   |   14 +++-
 sw/source/filter/html/htmlflywriter.cxx |   10 +++---
 sw/source/filter/html/wrthtml.hxx   |4 +-
 6 files changed, 35 insertions(+), 61 deletions(-)

New commits:
commit 5446000df8fa88e137c2189616962f72dfded29f
Author: Mike Kaganski 
AuthorDate: Fri Nov 24 19:50:23 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 25 13:32:28 2023 +0100

Simplify HtmlWriter

And add some asserts, to make sure we don't add attributes outside of
opening tags. Make sure that HtmlWriter closes its opened elements.
Replace one occurrence where this was deliberately not done, with a
use of HTMLOutFuncs::Out_AsciiTag.

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

diff --git a/include/svtools/HtmlWriter.hxx b/include/svtools/HtmlWriter.hxx
index 9fe66a7d9ad2..a53b41d0522e 100644
--- a/include/svtools/HtmlWriter.hxx
+++ b/include/svtools/HtmlWriter.hxx
@@ -11,6 +11,7 @@
 #pragma once
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -42,19 +43,17 @@ public:
 
 void flushStack();
 
-static void writeAttribute(SvStream& rStream, std::string_view aAttribute, 
sal_Int32 aValue);
-static void writeAttribute(SvStream& rStream, std::string_view aAttribute,
-   std::string_view aValue);
-
-void attribute(std::string_view aAttribute, const char* aValue);
 void attribute(std::string_view aAttribute, sal_Int32 aValue);
 void attribute(std::string_view aAttribute, std::string_view aValue);
-void attribute(std::string_view aAttribute, std::u16string_view aValue);
+void attribute(std::string_view aAttribute, const OUString& aValue);
+template  void attribute(std::string_view aAttribute, const char 
(&aValue)[N])
+{
+attribute(aAttribute, OUString(aValue));
+}
 // boolean attribute e.g. 
 void attribute(std::string_view aAttribute);
 
 void single(const OString& aContent);
-void endAttribute();
 
 /// Writes character data.
 void characters(std::string_view rChars);
diff --git a/svtools/qa/unit/testHtmlWriter.cxx 
b/svtools/qa/unit/testHtmlWriter.cxx
index 3e7e10d34c12..513978b1f525 100644
--- a/svtools/qa/unit/testHtmlWriter.cxx
+++ b/svtools/qa/unit/testHtmlWriter.cxx
@@ -157,7 +157,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAttributeValues)
 aHtml.prettyPrint(false);
 aHtml.start("abc"_ostr);
 aHtml.attribute("one", "one");
-aHtml.attribute("two", u"two");
+aHtml.attribute("two", u"two"_ustr);
 aHtml.attribute("three", sal_Int32(12));
 aHtml.end();
 
diff --git a/svtools/source/svhtml/HtmlWriter.cxx 
b/svtools/source/svhtml/HtmlWriter.cxx
index 28a86bbce12a..cd73bad074da 100644
--- a/svtools/source/svhtml/HtmlWriter.cxx
+++ b/svtools/source/svhtml/HtmlWriter.cxx
@@ -25,7 +25,9 @@ HtmlWriter::HtmlWriter(SvStream& rStream, std::string_view 
rNamespace) :
 }
 
 HtmlWriter::~HtmlWriter()
-{}
+{
+assert(maElementStack.empty());
+}
 
 void HtmlWriter::prettyPrint(bool b)
 {
@@ -61,17 +63,6 @@ void HtmlWriter::single(const OString &aContent)
 end();
 }
 
-void HtmlWriter::endAttribute()
-{
-if (mbOpeningTagOpen)
-{
-mrStream.WriteOString("/>");
-if (mbPrettyPrint)
-mrStream.WriteOString("\n");
-mbOpeningTagOpen = false;
-}
-}
-
 void HtmlWriter::flushStack()
 {
 while (!maElementStack.empty())
@@ -115,27 +106,9 @@ void HtmlWriter::end()
 maElementStack.pop_back();
 }
 
-void HtmlWriter::writeAttribute(SvStream& rStream, std::string_view 
aAttribute, sal_Int32 aValue)
-{
-writeAttribute(rStream, aAttribute, OString::number(aValue));
-}
-
-void HtmlWriter::writeAttribute(SvStream& rStream, std::string_view 
aAttribute, std::string_view aValue)
-{
-rStream.WriteOString(aAttribute);
-rStream.WriteChar('=');
-rStream.WriteChar('"');
-HTMLOutFuncs::Out_String(rStream, OStringToOUString(aValue, 
RTL_TEXTENCODING_UTF8));
-rStream.WriteChar('"');
-}
-
 void HtmlWriter::attribute(std::string_view aAttribute, std::string_view 
aValue)
 {
-if (mbOpeningTagOpen && !aAttribute.empty() && !aValue.empty())
-{
-mrStream.WriteChar(' ');
-writeAttribute(mrStream, aAttribute, aValue);
-}
+attribute(aAttribute, OStringToOUString(aValue, RTL_TEXTENCODING_UTF8));
 }
 
 void HtmlWriter::attribute(std::string_view aAttribute, const sal_Int32 aValue)
@@ -143,18 +116,22 @@ void HtmlWriter::attribute(std::string_view aAttribute, 
const sal_Int32 aValue)
 attribute(aAttribute, OString::number(aValue));
 }
 
-void HtmlWriter::attribute(std::string_view aAttribute, const char* pValue)
+void HtmlWriter::attribu

[Libreoffice-commits] core.git: helpcontent2

2023-11-25 Thread Stanislav Horacek (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c34e5b5b4fee431ba2fa950b9bbf72d3008bb332
Author: Stanislav Horacek 
AuthorDate: Sat Nov 25 12:58:02 2023 +0100
Commit: Gerrit Code Review 
CommitDate: Sat Nov 25 12:58:02 2023 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 02faeab6e7b014ca97a8c452e829af4522dadfc8
  - Formatting Marks command is on View tab

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

diff --git a/helpcontent2 b/helpcontent2
index b1830be3caa3..02faeab6e7b0 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b1830be3caa3fae67973f8370aaf1a5e820e3caa
+Subproject commit 02faeab6e7b014ca97a8c452e829af4522dadfc8


[Libreoffice-commits] help.git: source/text

2023-11-25 Thread Stanislav Horacek (via logerrit)
 source/text/swriter/00/0403.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 02faeab6e7b014ca97a8c452e829af4522dadfc8
Author: Stanislav Horacek 
AuthorDate: Sat Nov 25 11:17:30 2023 +0100
Commit: Olivier Hallot 
CommitDate: Sat Nov 25 12:58:02 2023 +0100

Formatting Marks command is on View tab

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

diff --git a/source/text/swriter/00/0403.xhp 
b/source/text/swriter/00/0403.xhp
index c2fa1e72d9..88af2dbbd3 100644
--- a/source/text/swriter/00/0403.xhp
+++ b/source/text/swriter/00/0403.xhp
@@ -85,7 +85,7 @@
   Choose 
View - Formatting Marks 
   
   Choose Home 
- Toggle Formatting Marks.
-  Choose 
Insert - Formatting Marks.
+  Choose View 
- Formatting Marks.
   
   
 


[Libreoffice-commits] core.git: editeng/source solenv/gbuild sw/Module_sw.mk sw/qa sw/UITest_writer_tests8.mk

2023-11-25 Thread Matt K (via logerrit)
 editeng/source/misc/svxacorr.cxx  |   11 ++-
 solenv/gbuild/UITest.mk   |2 
 sw/Module_sw.mk   |1 
 sw/UITest_writer_tests8.mk|   20 +++
 sw/qa/uitest/writer_tests8/tdf156243.py   |   39 ++
 sw/qa/uitest/writer_tests8_data/registrymodifications.xcu |   12 
 6 files changed, 79 insertions(+), 6 deletions(-)

New commits:
commit b6e273aaaf597b60f78c1dd3db8676eea958a9f5
Author: Matt K 
AuthorDate: Thu Nov 23 21:47:34 2023 -0600
Commit: Mike Kaganski 
CommitDate: Sat Nov 25 12:41:49 2023 +0100

tdf#156243 Fix off-by-one bug for autocorrect

This change removes the "-1" from the code
that applies the autocorrection so that the entire
string to be autocorrected is replaced, instead
of leaving off the last character.  Also,
the starting character of the string is
preserved (i.e. non-bold if changing to bold)
by adding 1 to the start position; this is
for the case when the user cancels the
autocorrect dialog.

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

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 094ee2130f67..4c4b6883f247 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -833,37 +833,38 @@ bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& 
rDoc, const OUString& rT
 // of an empty hint in SetAttr which would be removed by Delete
 // (fdo#62536, AUTOFMT in Writer)
 rDoc.Delete( nEndPos, nEndPos + 1 );
-rDoc.Delete( nFndPos, nFndPos + 1 );
+
 // Span the Attribute over the area
 // the end.
 if( '*' == cInsChar )   // Bold
 {
 SvxWeightItem aSvxWeightItem( WEIGHT_BOLD, SID_ATTR_CHAR_WEIGHT );
-rDoc.SetAttr( nFndPos, nEndPos - 1,
+rDoc.SetAttr( nFndPos + 1, nEndPos,
   SID_ATTR_CHAR_WEIGHT,
   aSvxWeightItem);
 }
 else if( '/' == cInsChar )   // Italic
 {
 SvxPostureItem aSvxPostureItem( ITALIC_NORMAL, 
SID_ATTR_CHAR_POSTURE );
-rDoc.SetAttr( nFndPos, nEndPos - 1,
+rDoc.SetAttr( nFndPos + 1, nEndPos,
   SID_ATTR_CHAR_POSTURE,
   aSvxPostureItem);
 }
 else if( '-' == cInsChar )   // Strikeout
 {
 SvxCrossedOutItem aSvxCrossedOutItem( STRIKEOUT_SINGLE, 
SID_ATTR_CHAR_STRIKEOUT );
-rDoc.SetAttr( nFndPos, nEndPos - 1,
+rDoc.SetAttr( nFndPos + 1, nEndPos,
   SID_ATTR_CHAR_STRIKEOUT,
   aSvxCrossedOutItem);
 }
 else// Underline
 {
 SvxUnderlineItem aSvxUnderlineItem( LINESTYLE_SINGLE, 
SID_ATTR_CHAR_UNDERLINE );
-rDoc.SetAttr( nFndPos, nEndPos - 1,
+rDoc.SetAttr( nFndPos + 1, nEndPos,
   SID_ATTR_CHAR_UNDERLINE,
   aSvxUnderlineItem);
 }
+rDoc.Delete( nFndPos, nFndPos + 1 );
 }
 
 return -1 != nFndPos;
diff --git a/solenv/gbuild/UITest.mk b/solenv/gbuild/UITest.mk
index 5859b9e56de4..65bc37c1d1bf 100644
--- a/solenv/gbuild/UITest.mk
+++ b/solenv/gbuild/UITest.mk
@@ -64,7 +64,7 @@ else
$(if $(gb_UITest__interactive),, \
rm -fr $@.core && mkdir -p $(dir $(call 
gb_UITest_get_target,$*))user/ && mkdir $@.core && cd $@.core && ) \
$(if $(gb_UITest_use_config), \
-   cp $(gb_UITest_use_config) $(dir $(call 
gb_UITest_get_target,$*))user/. && ) \
+   cp $(gb_UITest_use_config) $(dir $(call 
gb_UITest_get_target,$*))user/user && ) \
$(call gb_CppunitTest_coredumpctl_setup,$@) \
($(gb_UITest_PRECOMMAND) \
$(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 9ef1c80c84f7..22cea818178a 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -212,6 +212,7 @@ $(eval $(call gb_Module_add_uicheck_targets,sw,\
UITest_writer_tests5 \
UITest_writer_tests6 \
UITest_writer_tests7 \
+   UITest_writer_tests8 \
UITest_sw_table \
UITest_sw_chart \
UITest_sw_fieldDialog \
diff --git a/sw/UITest_writer_tests8.mk b/sw/UITest_writer_tests8.mk
new file mode 100644
index ..a33fdedbe255
--- /dev/null
+++ b/sw/UITest_writer_tests8.mk
@@ -0,0 +1,20 @@
+# 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

[Libreoffice-commits] core.git: cui/source cui/uiconfig

2023-11-25 Thread Julien Nabet (via logerrit)
 cui/source/dialogs/hlinettp.cxx  |   27 
 cui/source/inc/hlinettp.hxx  |1 
 cui/uiconfig/ui/hyperlinkinternetpage.ui |   52 ---
 3 files changed, 2 insertions(+), 78 deletions(-)

New commits:
commit 8b50a615cbf6c09ed9cf6af6336e388cd32db28e
Author: Julien Nabet 
AuthorDate: Sat Nov 25 09:58:49 2023 +0100
Commit: Julien Nabet 
CommitDate: Sat Nov 25 12:08:24 2023 +0100

tdf#158357: UI simplify Hyperlink dialog by removing Hyperlink type 
radiobutton

+ rename "Hyperlink Type" into "Hyperlink Settings"
+ remove "Protocol" since ther's only 1 now

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

diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 21cf34b3c7b6..c74d6ae10699 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -36,7 +36,6 @@ 
SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent,
 : SvxHyperlinkTabPageBase(pParent, pDlg, 
"cui/ui/hyperlinkinternetpage.ui", "HyperlinkInternetPage",
   pItemSet)
 , m_bMarkWndOpen(false)
-, m_xRbtLinktypInternet(xBuilder->weld_radio_button("linktyp_internet"))
 , m_xCbbTarget(new SvxHyperURLBox(xBuilder->weld_combo_box("target")))
 , m_xFtTarget(xBuilder->weld_label("target_label"))
 {
@@ -56,12 +55,7 @@ 
SvxHyperlinkInternetTp::SvxHyperlinkInternetTp(weld::Container* pParent,
 
 SetExchangeSupport ();
 
-// set defaults
-m_xRbtLinktypInternet->set_active(true);
-
 // set handlers
-Link aLink( LINK ( this, SvxHyperlinkInternetTp, 
Click_SmartProtocol_Impl ) );
-m_xRbtLinktypInternet->connect_toggled( aLink );
 m_xCbbTarget->connect_focus_out( LINK ( this, SvxHyperlinkInternetTp, 
LostFocusTargetHdl_Impl ) );
 m_xCbbTarget->connect_changed( LINK ( this, SvxHyperlinkInternetTp, 
ModifiedTargetHdl_Impl ) );
 maTimer.SetInvokeHandler ( LINK ( this, SvxHyperlinkInternetTp, 
TimeoutHdl_Impl ) );
@@ -167,12 +161,6 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, TimeoutHdl_Impl, 
Timer *, void)
 
 void SvxHyperlinkInternetTp::SetScheme(std::u16string_view rScheme)
 {
-//if rScheme is empty or unknown the default behaviour is like it where 
HTTP
-bool bInternet = true;
-
-//update protocol button selection:
-m_xRbtLinktypInternet->set_active(bInternet);
-
 //update target:
 RemoveImproperProtocol(rScheme);
 m_xCbbTarget->SetSmartProtocol( GetSmartProtocolFromButtons() );
@@ -221,19 +209,6 @@ INetProtocol 
SvxHyperlinkInternetTp::GetSmartProtocolFromButtons()
 return INetProtocol::Http;
 }
 
-/*
-|*
-|* Click on Radiobutton : WWW or ...
-|*
-|/
-IMPL_LINK(SvxHyperlinkInternetTp, Click_SmartProtocol_Impl, weld::Toggleable&, 
rButton, void)
-{
-if (!rButton.get_active())
-return;
-OUString aScheme = GetSchemeFromButtons();
-SetScheme(aScheme);
-}
-
 /*
 |*
 |* Combobox Target lost the focus
@@ -246,7 +221,7 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, 
LostFocusTargetHdl_Impl, weld::Widget&,
 
 void SvxHyperlinkInternetTp::RefreshMarkWindow()
 {
-if (m_xRbtLinktypInternet->get_active() && IsMarkWndVisible())
+if (IsMarkWndVisible())
 {
 weld::WaitObject aWait(mpDialog->getDialog());
 OUString aStrURL( CreateAbsoluteURL() );
diff --git a/cui/source/inc/hlinettp.hxx b/cui/source/inc/hlinettp.hxx
index bb86dff9ca5e..ad308a401f45 100644
--- a/cui/source/inc/hlinettp.hxx
+++ b/cui/source/inc/hlinettp.hxx
@@ -36,7 +36,6 @@ class SvxHyperlinkInternetTp : public SvxHyperlinkTabPageBase
 private:
 boolm_bMarkWndOpen;
 
-std::unique_ptr m_xRbtLinktypInternet;
 std::unique_ptr m_xCbbTarget;
 std::unique_ptr m_xFtTarget;
 
diff --git a/cui/uiconfig/ui/hyperlinkinternetpage.ui 
b/cui/uiconfig/ui/hyperlinkinternetpage.ui
index 6a6a191a6b91..0031207e8f51 100644
--- a/cui/uiconfig/ui/hyperlinkinternetpage.ui
+++ b/cui/uiconfig/ui/hyperlinkinternetpage.ui
@@ -25,40 +25,6 @@
 12
 12
 6
-
-  
-  
-True
-False
-True
-6
-12
-
-  
-_Web
-True
-True
-False
-True
-True
-True
-
-  
-Creates an 
"http://"; hyperlink.
-  
-
-  
-  
-   

[Libreoffice-commits] core.git: sw/inc sw/source

2023-11-25 Thread Noel Grandin (via logerrit)
 sw/inc/IDocumentFieldsAccess.hxx |5 
 sw/inc/calc.hxx  |   61 ---
 sw/source/core/bastyp/calc.cxx   |  226 +++
 sw/source/core/doc/DocumentFieldsManager.cxx |   73 ++--
 sw/source/core/doc/docfld.cxx|   48 +
 sw/source/core/edit/editsh.cxx   |2 
 sw/source/core/fields/expfld.cxx |2 
 sw/source/core/inc/DocumentFieldsManager.hxx |2 
 sw/source/core/inc/docfld.hxx|   29 +--
 9 files changed, 114 insertions(+), 334 deletions(-)

New commits:
commit 947b23c20780ede6b4d588fb9b944f572e9f8bc8
Author: Noel Grandin 
AuthorDate: Sat Nov 25 00:53:37 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Nov 25 11:25:25 2023 +0100

Convert SwHashTable to std::unordered_map

Change-Id: I88b082dc61c05761fd162ea4cf1d30940c2dfccd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159941
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 

diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx
index 4664ae3bc846..4ffe7779833f 100644
--- a/sw/inc/IDocumentFieldsAccess.hxx
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -25,6 +25,7 @@
 #include 
 #include "swtypes.hxx"
 #include "nodeoffset.hxx"
+#include 
 
 class SwFieldTypes;
 class SwFieldType;
@@ -40,8 +41,6 @@ class SetGetExpField;
 class SwNode;
 class SwTable;
 enum class SwFieldIds : sal_uInt16;
-template  class SwHashTable;
-struct HashStr;
 class SwRootFrame;
 class IDocumentRedlineAccess;
 
@@ -128,7 +127,7 @@ namespace com::sun::star::uno { class Any; }
 
 virtual void FieldsToCalc(SwCalc& rCalc, const SetGetExpField& 
rToThisField, SwRootFrame const* pLayout) = 0;
 
-virtual void FieldsToExpand(SwHashTable & rTable, const 
SetGetExpField& rToThisField, SwRootFrame const& rLayout) = 0;
+virtual void FieldsToExpand(std::unordered_map & 
rTable, const SetGetExpField& rToThisField, SwRootFrame const& rLayout) = 0;
 
 virtual bool IsNewFieldLst() const = 0;
 
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 87583f752ff4..0e066bae145f 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -37,8 +38,6 @@ class SwFieldType;
 class SwDoc;
 class SwUserFieldType;
 
-#define TBLSZ 47// should be a prime, because of hash table
-
 const sal_Unicode cListDelim= '|';
 
 enum SwCalcOper
@@ -131,62 +130,12 @@ public:
 void SetDBvalue(bool bSet) {m_bDBvalue = bSet;}
 };
 
-// Calculate HashTables for VarTable and Operations
-struct SwHash
-{
-SwHash( OUString aStr );
-virtual ~SwHash();
-OUString aStr;
-std::unique_ptr pNext;
-};
-
-struct SwCalcExp final : public SwHash
+struct SwCalcExp
 {
 SwSbxValue  nValue;
 const SwFieldType* pFieldType;
 
-SwCalcExp( const OUString& rStr, SwSbxValue aVal,
-const SwFieldType* pFieldType );
-};
-
-/// T should be a subclass of SwHash
-template
-class SwHashTable
-{
-std::vector> m_aData;
-public:
-SwHashTable(size_t nSize) : m_aData(nSize)
-{
-assert(nSize < SAL_MAX_UINT32);
-}
-std::unique_ptr & operator[](size_t idx) { return m_aData[idx]; }
-std::unique_ptr const & operator[](size_t idx) const { return 
m_aData[idx]; }
-void resize(size_t nSize) { m_aData.resize(nSize); }
-
-T* Find( std::u16string_view aStr, sal_uInt32* pPos = nullptr ) const
-{
-size_t nTableSize = m_aData.size();
-assert(nTableSize < SAL_MAX_UINT32);
-sal_uInt32 ii = 0;
-for( size_t n = 0; n < aStr.size(); ++n )
-{
-ii = ii << 1 ^ aStr[n];
-}
-ii %= nTableSize;
-
-if( pPos )
-*pPos = ii;
-
-for( T* pEntry = m_aData[ii].get(); pEntry; pEntry = 
static_cast(pEntry->pNext.get()) )
-{
-if( aStr == pEntry->aStr )
-{
-return pEntry;
-}
-}
-return nullptr;
-}
-
+SwCalcExp( SwSbxValue aVal, const SwFieldType* pFieldType );
 };
 
 
@@ -198,7 +147,7 @@ extern "C" typedef double (*pfCalc)(double);
 
 class SwCalc
 {
-SwHashTable m_aVarTable;
+std::unordered_map m_aVarTable;
 OUStringBuffer m_aVarName;
 OUStringm_sCurrSym;
 OUStringm_sCommand;
@@ -245,7 +194,7 @@ public:
 SwCalcExp*  VarLook( const OUString &rStr, bool bIns = false );
 voidVarChange( const OUString& rStr, const SwSbxValue& rValue );
 voidVarChange( const OUString& rStr, double );
-SwHashTable & GetVarTable() { return m_aVarTable; }
+std::unordered_map & GetVarTable() { return 
m_aVarTable; }
 
 boolPush(const SwUserFieldType* pUserFieldType);
 voidPop();
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 62d300f60ba7..0c9643317a4e 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp