[Libreoffice-commits] core.git: include/vcl vcl/CppunitTest_vcl_font.mk vcl/inc vcl/qa vcl/source vcl/win

2021-09-17 Thread Chris Sherlock (via logerrit)
 include/vcl/outdev.hxx|4 -
 vcl/CppunitTest_vcl_font.mk   |8 +-
 vcl/inc/PhysicalFontCollection.hxx|2 
 vcl/inc/PhysicalFontFamily.hxx|7 +
 vcl/inc/font/PhysicalFontFaceCollection.hxx   |   50 
 vcl/inc/outdev.h  |   14 ---
 vcl/qa/cppunit/physicalfontfacecollection.cxx |  101 ++
 vcl/source/font/PhysicalFontCollection.cxx|5 -
 vcl/source/font/PhysicalFontFamily.cxx|3 
 vcl/source/gdi/embeddedfontshelper.cxx|3 
 vcl/source/gdi/print.cxx  |9 +-
 vcl/source/gdi/virdev.cxx |3 
 vcl/source/outdev/font.cxx|   17 ++--
 vcl/source/outdev/outdev.cxx  |5 -
 vcl/win/gdi/salfont.cxx   |3 
 15 files changed, 194 insertions(+), 40 deletions(-)

New commits:
commit d596eb99c887b52ab99c38665cf1cacbcd24b029
Author: Chris Sherlock 
AuthorDate: Sun Sep 5 13:35:13 2021 +1000
Commit: Mike Kaganski 
CommitDate: Sat Sep 18 07:52:10 2021 +0200

vcl: rename ImplDeviceFontList to PhysicalFontFaceCollection and test

- renamed ImplDeviceFontList to PhysicalFontFaceCollection and moved to
  own header file
- wrote unit test for PhysicalFontFaceCollection

Note that this is part of a series of patches where I also move font
files into the relevant font directories, and into the vcl::font
namespace.

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index b70ad6664038..54703cb88d34 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -70,7 +70,6 @@ class LogicalFontInstance;
 struct SystemGraphicsData;
 class ImplFontCache;
 class PhysicalFontCollection;
-class ImplDeviceFontList;
 class ImplDeviceFontSizeList;
 class ImplMultiTextLineInfo;
 class SalGraphics;
@@ -107,6 +106,7 @@ namespace vcl
 class WindowOutputDevice;
 namespace font {
 struct Feature;
+class PhysicalFontFaceCollection;
 }
 
 namespace text {
@@ -183,7 +183,7 @@ private:
 mutable VclPtrmpNextGraphics; ///< Next output 
device in list
 GDIMetaFile*mpMetaFile;
 mutable rtl::Reference mpFontInstance;
-mutable std::unique_ptr mpDeviceFontList;
+mutable std::unique_ptr  
mpFontFaceCollection;
 mutable std::unique_ptr mpDeviceFontSizeList;
 std::vectormaOutDevStateStack;
 std::unique_ptr mpOutDevData;
diff --git a/vcl/CppunitTest_vcl_font.mk b/vcl/CppunitTest_vcl_font.mk
index 8b66a989fa50..55a850e044a6 100644
--- a/vcl/CppunitTest_vcl_font.mk
+++ b/vcl/CppunitTest_vcl_font.mk
@@ -16,15 +16,21 @@ $(eval $(call gb_CppunitTest_set_include,vcl_font,\
 
 $(eval $(call gb_CppunitTest_add_exception_objects,vcl_font, \
vcl/qa/cppunit/font \
+   vcl/qa/cppunit/physicalfontfacecollection \
 ))
 
-$(eval $(call gb_CppunitTest_use_externals,vcl_font,boost_headers))
+$(eval $(call gb_CppunitTest_use_externals,vcl_font,\
+   boost_headers \
+   harfbuzz \
+   graphite \
+))
 
 $(eval $(call gb_CppunitTest_use_libraries,vcl_font, \
comphelper \
cppu \
cppuhelper \
sal \
+   salhelper \
svt \
test \
tl \
diff --git a/vcl/inc/PhysicalFontCollection.hxx 
b/vcl/inc/PhysicalFontCollection.hxx
index 38e591600467..c3ccdb69d438 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -67,7 +67,7 @@ public:
 
 // misc utilities
 std::shared_ptr Clone() const;
-std::unique_ptr GetDeviceFontList() const;
+std::unique_ptr 
GetFontFaceCollection() const;
 std::unique_ptr GetDeviceFontSizeList( const 
OUString& rFontName ) const;
 
 private:
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx
index 0137aca3b7c4..77f0938ebead 100644
--- a/vcl/inc/PhysicalFontFamily.hxx
+++ b/vcl/inc/PhysicalFontFamily.hxx
@@ -30,7 +30,10 @@
 
 #include "PhysicalFontFace.hxx"
 
-class ImplDeviceFontList;
+namespace vcl::font
+{
+class PhysicalFontFaceCollection;
+}
 class PhysicalFontFace;
 class PhysicalFontCollection;
 
@@ -74,7 +77,7 @@ public:
 
 PhysicalFontFace*   FindBestFontFace( const FontSelectPattern& rFSD ) 
const;
 
-voidUpdateDevFontList( ImplDeviceFontList& ) const;
+void
UpdateDevFontList(vcl::font::PhysicalFontFaceCollection&) const;
 voidUpdateCloneFontList(PhysicalFontCollection&) const;
 
 static void CalcType( ImplFontAttrs& rType, FontWeight& rWeight, 
FontWidth& rWidth,
diff --git a/vcl/inc/font/PhysicalFontFaceCollection.hxx 
b/vcl/inc/font/PhysicalFontFaceCollection.hxx
new file mode 100644
index ..9b4622690bfb

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

2021-09-17 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/inc/conttree.hxx|5 +++-
 sw/source/uibase/uiview/viewsrch.cxx |2 +
 sw/source/uibase/utlui/glbltree.cxx  |   42 ---
 3 files changed, 45 insertions(+), 4 deletions(-)

New commits:
commit 1f9a792a391f0811bbb5f570ad5c84d13312c539
Author: Jim Raykowski 
AuthorDate: Tue Sep 14 16:07:53 2021 -0800
Commit: Jim Raykowski 
CommitDate: Sat Sep 18 07:20:36 2021 +0200

tdf#144349 Make Navigator global tree track sub-document sections

Master document relies on the Navigator listing all the sub-documents.
However there is no connection between the currently selected section
(containing the sub-document) and the entry in the Navigator making it
very hard to see what file needs to be edited. This patch highlights
the corresponding item in the Navigator at the current cursor position
in the document.

Change-Id: Iee32d1db0e40e302bfff7a879d47a5632ce4ed43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122103
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/sw/source/uibase/inc/conttree.hxx 
b/sw/source/uibase/inc/conttree.hxx
index 4ac942e9ecd7..78e078cc78f3 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -282,7 +282,7 @@ public:
 SwGlobalTreeDropTarget(SwGlobalTree& rTreeView);
 };
 
-class SwGlobalTree final
+class SwGlobalTree final : public SfxListener
 {
 private:
 std::unique_ptr m_xTreeView;
@@ -368,6 +368,9 @@ public:
 voidExecuteContextMenuAction(std::string_view 
rSelectedPopupEntry);
 
 const SwWrtShell*   GetActiveWrtShell() const {return m_pActiveShell;}
+
+virtual void Notify(SfxBroadcaster& rBC, SfxHint const& rHint) override;
+void UpdateTracking();
 };
 
 #endif
diff --git a/sw/source/uibase/uiview/viewsrch.cxx 
b/sw/source/uibase/uiview/viewsrch.cxx
index 66fb79ac3809..ba86732a82a3 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -256,6 +256,8 @@ void SwView::ExecSearch(SfxRequest& rReq)
 bool bRet = SearchAll();
 m_pWrtShell->GetSfxViewShell()->setTiledSearching(false);
 
+GetDocShell()->Broadcast(
+SfxHint(SfxHintId::SwNavigatorUpdateTracking));
 GetDocShell()->Broadcast(
 
SfxHint(SfxHintId::SwNavigatorSelectOutlinesWithSelections));
 
diff --git a/sw/source/uibase/utlui/glbltree.cxx 
b/sw/source/uibase/utlui/glbltree.cxx
index 8ea94f9680f8..81c351f7249a 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -773,8 +773,33 @@ void 
SwGlobalTree::ExecuteContextMenuAction(std::string_view rSelectedPopupEntry
 
 IMPL_LINK_NOARG(SwGlobalTree, Timeout, Timer *, void)
 {
-if (!m_xTreeView->has_focus() && Update(false))
-Display();
+if (m_pActiveShell && m_pActiveShell->GetView().GetEditWin().HasFocus())
+{
+if (Update(false))
+Display();
+UpdateTracking();
+}
+}
+
+void SwGlobalTree::UpdateTracking()
+{
+if (!m_pActiveShell)
+return;
+
+// track section at cursor position in document
+m_xTreeView->unselect_all();
+
+const SwSection* pActiveShellCurrSection = 
m_pActiveShell->GetCurrSection();
+if (pActiveShellCurrSection)
+{
+const SwSection* pSection = pActiveShellCurrSection;
+SwSection* pParent;
+while ((pParent = pSection->GetParent()) != nullptr)
+pSection = pParent;
+
+if (pSection)
+m_xTreeView->select_text(pSection->GetSectionName());
+}
 }
 
 void SwGlobalTree::GotoContent(const SwGlblDocContent* pCont)
@@ -803,6 +828,7 @@ void SwGlobalTree::ShowTree()
 {
 m_aUpdateTimer.Start();
 m_xTreeView->show();
+UpdateTracking();
 }
 
 void SwGlobalTree::HideTree()
@@ -854,10 +880,13 @@ bool SwGlobalTree::Update(bool bHard)
 bool bRet = false;
 if (pActView && pActView->GetWrtShellPtr())
 {
-const SwWrtShell* pOldShell = m_pActiveShell;
+SwWrtShell* pOldShell = m_pActiveShell;
 m_pActiveShell = pActView->GetWrtShellPtr();
 if(m_pActiveShell != pOldShell)
 {
+if (pOldShell)
+EndListening(*pOldShell->GetView().GetDocShell());
+StartListening(*m_pActiveShell->GetView().GetDocShell());
 m_pSwGlblDocContents.reset();
 }
 if(!m_pSwGlblDocContents)
@@ -1090,4 +1119,11 @@ IMPL_LINK( SwGlobalTree, DialogClosedHdl, 
sfx2::FileDialogHelper*, _pFileDlg, vo
 m_pDocContent.reset();
 }
 
+void SwGlobalTree::Notify(SfxBroadcaster& rBC, SfxHint const& rHint)
+{
+SfxListener::Notify(rBC, rHint);
+if (rHint.GetId() == SfxHintId::SwNavigatorUpdateTracking)
+UpdateTracking();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2021-09-17 Thread Chris Sherlock (via logerrit)
 include/vcl/outdev.hxx |2 ++
 vcl/inc/PhysicalFontCollection.hxx |2 ++
 vcl/inc/PhysicalFontFamily.hxx |2 ++
 vcl/source/font/PhysicalFontCollection.cxx |2 ++
 vcl/source/font/PhysicalFontFamily.cxx |2 ++
 vcl/source/gdi/embeddedfontshelper.cxx |2 ++
 vcl/source/gdi/print.cxx   |2 ++
 vcl/source/gdi/virdev.cxx  |2 ++
 vcl/source/outdev/font.cxx |2 ++
 vcl/win/gdi/salfont.cxx|2 ++
 10 files changed, 20 insertions(+)

New commits:
commit 363d0e7e2875d0f99cf0442353202c96c097f5e2
Author: Chris Sherlock 
AuthorDate: Thu Sep 16 12:52:07 2021 +1000
Commit: Mike Kaganski 
CommitDate: Sat Sep 18 05:52:05 2021 +0200

vcl: add sal/config.h in preparation for patch

The convention is that we need to add sal/config.h to the start of
files.

 mikekaganski do you want me to add sal/config.h to cxx files
 as well as headers?
 chris_wot: rather ask sberg :)
<@sberg> chris_wot, always, always as first include, by convention
 thanks, I'll make sure I do this on any files I touch - if 
that's OK

I have a patch queued to rename ImplDeviceFontList to
PhysicalFontFaceCollection, which I am adding a test to. Submitting this
patch so I can hopefully one day land this patch.

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 0890da948a0b..b70ad6664038 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#include 
+
 #include 
 #include 
 #include 
diff --git a/vcl/inc/PhysicalFontCollection.hxx 
b/vcl/inc/PhysicalFontCollection.hxx
index 89d6fdf222e8..38e591600467 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#include 
+
 #include 
 
 #include "fontinstance.hxx"
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx
index f883d383be54..0137aca3b7c4 100644
--- a/vcl/inc/PhysicalFontFamily.hxx
+++ b/vcl/inc/PhysicalFontFamily.hxx
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#include 
+
 #include 
 #include 
 
diff --git a/vcl/source/font/PhysicalFontCollection.cxx 
b/vcl/source/font/PhysicalFontCollection.cxx
index f6a693068d34..7161e5b35c49 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 
 #include 
diff --git a/vcl/source/font/PhysicalFontFamily.cxx 
b/vcl/source/font/PhysicalFontFamily.cxx
index d5ab2415b338..cd8634aeb0ed 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx 
b/vcl/source/gdi/embeddedfontshelper.cxx
index 1a67603da911..cbe4ceed3454 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
 #include 
 #include 
 #include 
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 91e516b67c86..f46d6ed03ec5 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 #include 
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index bc9f9ffe5838..8f5a1d96f329 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 53727e3378cc..4161ea8ce236 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 #include 
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index b65ea0ae69cf..e07680c87dec 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 


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

2021-09-17 Thread Chris Sherlock (via logerrit)
 include/vcl/outdev.hxx |5 +
 vcl/inc/PhysicalFontCollection.hxx |5 +
 vcl/inc/PhysicalFontFamily.hxx |5 +
 vcl/inc/outdev.h   |5 +
 4 files changed, 4 insertions(+), 16 deletions(-)

New commits:
commit 83070c694c742ef1e86e017a5e684e72b23bf3c9
Author: Chris Sherlock 
AuthorDate: Thu Sep 16 12:46:23 2021 +1000
Commit: Mike Kaganski 
CommitDate: Sat Sep 18 05:51:17 2021 +0200

tdf#124176 - Use pragma once instead of include guards

I have a patch queued to rename ImplDeviceFontList to
PhysicalFontFaceCollection, which I am adding a test to. Submitting
patch to update the include guards to pragma once

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 6e357b077a14..0890da948a0b 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_OUTDEV_HXX
-#define INCLUDED_VCL_OUTDEV_HXX
+#pragma once
 
 #include 
 #include 
@@ -1907,6 +1906,4 @@ protected:
 
 };
 
-#endif // INCLUDED_VCL_OUTDEV_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/PhysicalFontCollection.hxx 
b/vcl/inc/PhysicalFontCollection.hxx
index 8af07e2883cf..89d6fdf222e8 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_PHYSICALFONTCOLLECTION_HXX
-#define INCLUDED_VCL_INC_PHYSICALFONTCOLLECTION_HXX
+#pragma once
 
 #include 
 
@@ -91,6 +90,4 @@ private:
 
 };
 
-#endif // INCLUDED_VCL_INC_PHYSICALFONTCOLLECTION_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx
index 5c2ae12f24c8..f883d383be54 100644
--- a/vcl/inc/PhysicalFontFamily.hxx
+++ b/vcl/inc/PhysicalFontFamily.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_PHYSICALFONTFAMILY_HXX
-#define INCLUDED_VCL_INC_PHYSICALFONTFAMILY_HXX
+#pragma once
 
 #include 
 #include 
@@ -96,6 +95,4 @@ private:
 FontWidth   meMatchWidth;   // MATCH - Width
 };
 
-#endif // INCLUDED_VCL_INC_PHYSICALFONTFAMILY_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index 8746d790eb62..16871789bb22 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_OUTDEV_H
-#define INCLUDED_VCL_INC_OUTDEV_H
+#pragma once
 
 #include 
 #include 
@@ -139,6 +138,4 @@ struct ImplOutDevData
 
 void ImplFontSubstitute( OUString& rFontName );
 
-#endif // INCLUDED_VCL_INC_OUTDEV_H
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


Re: Improvement for Hebrew writing

2021-09-17 Thread Regina Henschel

Hi Simone,

Simone Aiello schrieb am 16.09.2021 um 16:46:
The software has problems with the integration of Latin text and Hebrew 
text. Would it be possible to make a change?


Yes. It depends on your skills, how you can help.

 Or make a plugin to make

things better?


"plugin" ?

 Is there anyone who could help me reprogram the software

If you want to fix something in the code, then you can start reading in
https://wiki.documentfoundation.org/Development. Follow the links in 
section "Getting Started with Development"



and figure out where I could work to customize it?
If your question is not about development, but you need help to use 
LibreOffice, then this is the wrong mailing list. In that case use 
us...@global.libreoffice.org or https://ask.libreoffice.org/c/english/5


Kind regards,
Regina



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

2021-09-17 Thread Mike Kaganski (via logerrit)
 sc/source/core/data/global.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit c5aef25352d20e052ec3a697f3cb979d3bbf9df6
Author: Mike Kaganski 
AuthorDate: Fri Sep 17 21:50:01 2021 +0200
Commit: Mike Kaganski 
CommitDate: Fri Sep 17 22:52:27 2021 +0200

Use atomic::exchange when cleaning up

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

diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index cbc2bcec709d..e795912dd2e3 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -527,8 +527,8 @@ void ScGlobal::Clear()
 ExitExternalFunc();
 ClearAutoFormat();
 xSearchItem.reset();
-delete pLegacyFuncCollection.load(); pLegacyFuncCollection = nullptr;
-delete pAddInCollection.load(); pAddInCollection = nullptr;
+delete pLegacyFuncCollection.exchange(nullptr);
+delete pAddInCollection.exchange(nullptr);
 xUserList.reset();
 xStarCalcFunctionList.reset(); // Destroy before ResMgr!
 xStarCalcFunctionMgr.reset();
@@ -539,15 +539,15 @@ void ScGlobal::Clear()
 xEmptyBrushItem.reset();
 xButtonBrushItem.reset();
 xEnglishFormatter.reset();
-delete pCaseTransliteration.load(); pCaseTransliteration = nullptr;
-delete pTransliteration.load(); pTransliteration = nullptr;
-delete pCaseCollator.load(); pCaseCollator = nullptr;
-delete pCollator.load(); pCollator = nullptr;
+delete pCaseTransliteration.exchange(nullptr);
+delete pTransliteration.exchange(nullptr);
+delete pCaseCollator.exchange(nullptr);
+delete pCollator.exchange(nullptr);
 oCalendar.reset();
 oSysLocale.reset();
-delete pLocale.load(); pLocale = nullptr;
+delete pLocale.exchange(nullptr);
 
-delete pUnitConverter.load(); pUnitConverter = nullptr;
+delete pUnitConverter.exchange(nullptr);
 xFieldEditEngine.reset();
 
 xDrawClipDocShellRef.clear();


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

2021-09-17 Thread Andreas Heinisch (via logerrit)
 cui/source/tabpages/paragrph.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8aec73d7a93b37778198d416ca4ef285734f2024
Author: Andreas Heinisch 
AuthorDate: Fri Sep 17 20:40:55 2021 +0200
Commit: Andreas Heinisch 
CommitDate: Fri Sep 17 21:43:43 2021 +0200

tdf139131 - Sort page styles under Paragraph -> Text Flow

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

diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 6726da03961d..a7075bd862e7 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1940,6 +1940,8 @@ 
SvxExtParagraphTabPage::SvxExtParagraphTabPage(weld::Container* pPage, weld::Dia
 SfxStyleSheetBase* pStyle = pPool->First(SfxStyleFamily::Page);
 OUString aStdName;
 
+// tdf139131 - sort page styles
+m_xApplyCollBox->make_sorted();
 while( pStyle )
 {
 if ( aStdName.isEmpty() )


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

2021-09-17 Thread Noel Grandin (via logerrit)
 include/svl/numformat.hxx   |2 -
 include/svl/ondemand.hxx|   76 +---
 svl/source/numbers/zforlist.cxx |8 ++--
 3 files changed, 77 insertions(+), 9 deletions(-)

New commits:
commit 82689553221e1f8ceab62d72a27b31902d45f436
Author: Noel Grandin 
AuthorDate: Fri Sep 17 16:03:11 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 17 21:26:26 2021 +0200

create OnDemandCharClass cache

and use it in SvNumberFormatter for situations where we are rapidly
switching locales (e.g. spreadsheet with alternating locales on adjacent
rows)

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

diff --git a/include/svl/numformat.hxx b/include/svl/numformat.hxx
index a851032ef47c..4026ff71e4a4 100644
--- a/include/svl/numformat.hxx
+++ b/include/svl/numformat.hxx
@@ -563,7 +563,7 @@ private:
 std::unique_ptr pFormatTable; // For the UI dialog
 std::unique_ptr
 pMergeTable; // List of indices for merging two formatters
-std::optional oCharClass; // CharacterClassification
+OnDemandCharClass xCharClass; // CharacterClassification
 OnDemandLocaleDataWrapper xLocaleData; // LocaleData switched between 
SYSTEM, ENGLISH and other
 OnDemandTransliterationWrapper xTransliteration; // Transliteration loaded 
on demand
 OnDemandCalendarWrapper xCalendar; // Calendar loaded on demand
diff --git a/include/svl/ondemand.hxx b/include/svl/ondemand.hxx
index 71bec2207a24..4a0a91b18264 100644
--- a/include/svl/ondemand.hxx
+++ b/include/svl/ondemand.hxx
@@ -19,15 +19,16 @@
 
 #pragma once
 
-#include 
-#include 
+#include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
+#include 
 
 /*
 On demand instantiation and initialization of several i18n wrappers,
@@ -278,4 +279,71 @@ public:
 }
 };
 
+/** @short
+SvNumberformatter uses it upon switching locales.
+
+@descr
+Avoids reloading and analysing of locale data again and again.
+
+@ATTENTION
+If the default ctor is used the init() method MUST be called before
+accessing any locale data.
+ */
+
+class OnDemandCharClass
+{
+std::optional moCharClass1;
+std::optional moCharClass2;
+int nCurrent; // -1 == uninitialised, 0 == class1, 1 == class2
+
+public:
+OnDemandCharClass()
+: nCurrent(-1)
+{
+}
+
+void changeLocale(const css::uno::Reference& 
xContext,
+  const LanguageTag& rLanguageTag)
+{
+// check for existing match
+if (moCharClass1 && moCharClass1->getLanguageTag() == rLanguageTag)
+{
+nCurrent = 0;
+return;
+}
+if (moCharClass2 && moCharClass2->getLanguageTag() == rLanguageTag)
+{
+nCurrent = 1;
+return;
+}
+// no match - update one the current entries
+if (nCurrent == -1 || nCurrent == 1)
+{
+moCharClass1.emplace(xContext, rLanguageTag);
+nCurrent = 0;
+}
+else
+{
+moCharClass2.emplace(xContext, rLanguageTag);
+nCurrent = 1;
+}
+}
+
+const CharClass* get() const
+{
+switch (nCurrent)
+{
+case 0:
+return &*moCharClass1;
+case 1:
+return &*moCharClass2;
+default:
+assert(false);
+return nullptr;
+}
+}
+const CharClass* operator->() const { return get(); }
+const CharClass& operator*() const { return *get(); }
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 9c35f99547fc..e623a0239743 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -303,7 +303,7 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
 nDefaultSystemCurrencyFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
 
 maLanguageTag.reset( eLang );
-oCharClass.emplace( m_xContext, maLanguageTag );
+xCharClass.changeLocale( m_xContext, maLanguageTag );
 xLocaleData.init( m_xContext, maLanguageTag );
 xCalendar.init( m_xContext, maLanguageTag.getLocale() );
 xTransliteration.init( m_xContext, eLang );
@@ -338,7 +338,7 @@ void SvNumberFormatter::ChangeIntl(LanguageType eLnge)
 ActLnge = eLnge;
 
 maLanguageTag.reset( eLnge );
-oCharClass.emplace( m_xContext, maLanguageTag );
+xCharClass.changeLocale( m_xContext, maLanguageTag );
 xLocaleData.changeLocale( maLanguageTag );
 xCalendar.changeLocale( maLanguageTag.getLocale() );
 xTransliteration.changeLocale( eLnge );
@@ -532,7 +532,7 @@ const ::utl::TransliterationWrapper* 
SvNumberFormatter::GetTransliteration() con
 return xTransliteration.get();
 }
 
-co

[Libreoffice-commits] core.git: include/svl

2021-09-17 Thread Noel Grandin (via logerrit)
 include/svl/ondemand.hxx |   73 ++-
 1 file changed, 35 insertions(+), 38 deletions(-)

New commits:
commit 54906a9b925dee3fd0076e9d258a82c223d62520
Author: Noel Grandin 
AuthorDate: Fri Sep 17 15:25:07 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 17 21:26:10 2021 +0200

no need to allocate the cached items separately in the intl wrappers

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

diff --git a/include/svl/ondemand.hxx b/include/svl/ondemand.hxx
index d142f16ca4b3..71bec2207a24 100644
--- a/include/svl/ondemand.hxx
+++ b/include/svl/ondemand.hxx
@@ -17,10 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SVL_ONDEMAND_HXX
-#define INCLUDED_SVL_ONDEMAND_HXX
+#pragma once
 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -55,8 +54,8 @@ class OnDemandLocaleDataWrapper
 SvtSysLocale aSysLocale;
 LanguageType eCurrentLanguage;
 LanguageType eLastAnyLanguage;
-std::unique_ptr pEnglish;
-std::unique_ptr pAny;
+std::optional moEnglish;
+std::optional moAny;
 int nCurrent; // 0 == system, 1 == english, 2 == any
 bool bInitialized;
 
@@ -86,20 +85,20 @@ public:
 nCurrent = 0;
 else if (eLang == LANGUAGE_ENGLISH_US)
 {
-if (!pEnglish)
-pEnglish.reset(new LocaleDataWrapper(m_xContext, 
rLanguageTag));
+if (!moEnglish)
+moEnglish.emplace(m_xContext, rLanguageTag);
 nCurrent = 1;
 }
 else
 {
-if (!pAny)
+if (!moAny)
 {
-pAny.reset(new LocaleDataWrapper(m_xContext, rLanguageTag));
+moAny.emplace(m_xContext, rLanguageTag);
 eLastAnyLanguage = eLang;
 }
 else if (eLastAnyLanguage != eLang)
 {
-pAny.reset(new LocaleDataWrapper(m_xContext, rLanguageTag));
+moAny.emplace(m_xContext, rLanguageTag);
 eLastAnyLanguage = eLang;
 }
 nCurrent = 2;
@@ -116,9 +115,9 @@ public:
 case 0:
 return &aSysLocale.GetLocaleData();
 case 1:
-return pEnglish.get();
+return &*moEnglish;
 case 2:
-return pAny.get();
+return &*moAny;
 default:
 assert(false);
 return nullptr;
@@ -142,8 +141,8 @@ class OnDemandCalendarWrapper
 css::lang::Locale aEnglishLocale;
 css::lang::Locale aLocale;
 mutable css::lang::Locale aLastAnyLocale;
-mutable std::unique_ptr pEnglishPtr;
-mutable std::unique_ptr pAnyPtr;
+mutable std::optional moEnglish;
+mutable std::optional moAny;
 
 public:
 OnDemandCalendarWrapper()
@@ -158,8 +157,8 @@ public:
 {
 m_xContext = rxContext;
 changeLocale(rLocale);
-pEnglishPtr.reset();
-pAnyPtr.reset();
+moEnglish.reset();
+moAny.reset();
 }
 
 void changeLocale(const css::lang::Locale& rLocale) { aLocale = rLocale; }
@@ -169,27 +168,27 @@ public:
 CalendarWrapper* pPtr;
 if (aLocale == aEnglishLocale)
 {
-if (!pEnglishPtr)
+if (!moEnglish)
 {
-pEnglishPtr.reset(new CalendarWrapper(m_xContext));
-pEnglishPtr->loadDefaultCalendar(aEnglishLocale);
+moEnglish.emplace(m_xContext);
+moEnglish->loadDefaultCalendar(aEnglishLocale);
 }
-pPtr = pEnglishPtr.get();
+pPtr = &*moEnglish;
 }
 else
 {
-if (!pAnyPtr)
+if (!moAny)
 {
-pAnyPtr.reset(new CalendarWrapper(m_xContext));
-pAnyPtr->loadDefaultCalendar(aLocale);
+moAny.emplace(m_xContext);
+moAny->loadDefaultCalendar(aLocale);
 aLastAnyLocale = aLocale;
 }
 else if (aLocale != aLastAnyLocale)
 {
-pAnyPtr->loadDefaultCalendar(aLocale);
+moAny->loadDefaultCalendar(aLocale);
 aLastAnyLocale = aLocale;
 }
-pPtr = pAnyPtr.get();
+pPtr = &*moAny;
 }
 return pPtr;
 }
@@ -205,7 +204,7 @@ class OnDemandTransliterationWrapper
 css::uno::Reference m_xContext;
 LanguageType eLanguage;
 TransliterationFlags nType;
-mutable std::unique_ptr<::utl::TransliterationWrapper> pPtr;
+mutable std::optional<::utl::TransliterationWrapper> moTransliterate;
 mutable bool bValid;
 bool bInitialized;
 
@@ -225,7 +224,7 @@ public:
 m_xContext = rxContext;
 nType = TransliterationFlags::IGNORE_CASE;
  

[Libreoffice-commits] core.git: include/svl solenv/clang-format

2021-09-17 Thread Noel Grandin (via logerrit)
 include/svl/ondemand.hxx|  366 +++-
 solenv/clang-format/excludelist |1 
 2 files changed, 177 insertions(+), 190 deletions(-)

New commits:
commit 39ccb910fdc3f9212cb9a299fce5d06dc61d87ea
Author: Noel Grandin 
AuthorDate: Fri Sep 17 15:20:19 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 17 21:25:53 2021 +0200

clang-format ondemand.hxx

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

diff --git a/include/svl/ondemand.hxx b/include/svl/ondemand.hxx
index 097a34f6726c..d142f16ca4b3 100644
--- a/include/svl/ondemand.hxx
+++ b/include/svl/ondemand.hxx
@@ -51,79 +51,81 @@
 
 class OnDemandLocaleDataWrapper
 {
-css::uno::Reference< css::uno::XComponentContext > m_xContext;
-SvtSysLocaleaSysLocale;
-LanguageTypeeCurrentLanguage;
-LanguageTypeeLastAnyLanguage;
-std::unique_ptr  pEnglish;
-std::unique_ptr<  LocaleDataWrapper>  pAny;
-int nCurrent; // 0 == system, 1 == english, 2 == 
any
-boolbInitialized;
+css::uno::Reference m_xContext;
+SvtSysLocale aSysLocale;
+LanguageType eCurrentLanguage;
+LanguageType eLastAnyLanguage;
+std::unique_ptr pEnglish;
+std::unique_ptr pAny;
+int nCurrent; // 0 == system, 1 == english, 2 == any
+bool bInitialized;
 
 public:
-OnDemandLocaleDataWrapper()
-: eLastAnyLanguage( LANGUAGE_DONTKNOW )
-, nCurrent(0)
-, bInitialized(false)
-{
-eCurrentLanguage = LANGUAGE_SYSTEM;
-}
-
-boolisInitialized() const   { return bInitialized; 
}
-
-voidinit(
-const css::uno::Reference< 
css::uno::XComponentContext >& rxContext,
-const LanguageTag& rLanguageTag
-)
-{
-m_xContext = rxContext;
-changeLocale( rLanguageTag );
-bInitialized = true;
-}
-
-voidchangeLocale( const LanguageTag& rLanguageTag )
-{
-LanguageType eLang = 
rLanguageTag.getLanguageType( false);
-if ( eLang == LANGUAGE_SYSTEM )
-nCurrent = 0;
-else if ( eLang == LANGUAGE_ENGLISH_US 
)
-{
-if ( !pEnglish )
-pEnglish.reset( new 
LocaleDataWrapper( m_xContext, rLanguageTag ) );
-nCurrent = 1;
-}
-else
-{
-if ( !pAny )
-{
-pAny.reset( new 
LocaleDataWrapper( m_xContext, rLanguageTag ) );
-eLastAnyLanguage = eLang;
-}
-else if ( eLastAnyLanguage != 
eLang )
-{
-pAny.reset( new 
LocaleDataWrapper( m_xContext, rLanguageTag ) );
-eLastAnyLanguage = eLang;
-}
-nCurrent = 2;
-}
-eCurrentLanguage = eLang;
-}
-
-LanguageTypegetCurrentLanguage() const
-{ return eCurrentLanguage; }
-
-const   LocaleDataWrapper*  get() const
+OnDemandLocaleDataWrapper()
+: eLastAnyLanguage(LANGUAGE_DONTKNOW)
+, nCurrent(0)
+, bInitialized(false)
+{
+eCurrentLanguage = LANGUAGE_SYSTEM;
+}
+
+bool isInitialized() const { return bInitialized; }
+
+void init(const css::uno::Reference& 
rxContext,
+  const LanguageTag& rLanguageTag)
+{
+m_xContext = rxContext;
+changeLocale(rLanguageTag);
+bInitialized = true;
+}
+
+void changeLoca

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

2021-09-17 Thread Noel Grandin (via logerrit)
 include/svl/numformat.hxx   |4 +++-
 svl/source/numbers/zforlist.cxx |8 
 2 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 661f8785e6727dca1ef23c51ae9ecf4d3da299d3
Author: Noel Grandin 
AuthorDate: Fri Sep 17 15:15:54 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 17 21:25:38 2021 +0200

no need to allocate CharClass separately in SvNumberFormatter

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

diff --git a/include/svl/numformat.hxx b/include/svl/numformat.hxx
index 3256adf881b5..a851032ef47c 100644
--- a/include/svl/numformat.hxx
+++ b/include/svl/numformat.hxx
@@ -24,6 +24,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 class SvNumberFormatterRegistry_Impl;
 class NfCurrencyTable;
@@ -561,7 +563,7 @@ private:
 std::unique_ptr pFormatTable; // For the UI dialog
 std::unique_ptr
 pMergeTable; // List of indices for merging two formatters
-std::unique_ptr pCharClass; // CharacterClassification
+std::optional oCharClass; // CharacterClassification
 OnDemandLocaleDataWrapper xLocaleData; // LocaleData switched between 
SYSTEM, ENGLISH and other
 OnDemandTransliterationWrapper xTransliteration; // Transliteration loaded 
on demand
 OnDemandCalendarWrapper xCalendar; // Calendar loaded on demand
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 077d04867e0f..9c35f99547fc 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -303,7 +303,7 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
 nDefaultSystemCurrencyFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
 
 maLanguageTag.reset( eLang );
-pCharClass.reset( new CharClass( m_xContext, maLanguageTag ) );
+oCharClass.emplace( m_xContext, maLanguageTag );
 xLocaleData.init( m_xContext, maLanguageTag );
 xCalendar.init( m_xContext, maLanguageTag.getLocale() );
 xTransliteration.init( m_xContext, eLang );
@@ -338,7 +338,7 @@ void SvNumberFormatter::ChangeIntl(LanguageType eLnge)
 ActLnge = eLnge;
 
 maLanguageTag.reset( eLnge );
-pCharClass.reset( new CharClass( m_xContext, maLanguageTag ) );
+oCharClass.emplace( m_xContext, maLanguageTag );
 xLocaleData.changeLocale( maLanguageTag );
 xCalendar.changeLocale( maLanguageTag.getLocale() );
 xTransliteration.changeLocale( eLnge );
@@ -532,7 +532,7 @@ const ::utl::TransliterationWrapper* 
SvNumberFormatter::GetTransliteration() con
 return xTransliteration.get();
 }
 
-const CharClass* SvNumberFormatter::GetCharClass() const { return 
pCharClass.get(); }
+const CharClass* SvNumberFormatter::GetCharClass() const { return oCharClass ? 
&*oCharClass : nullptr; }
 
 const LocaleDataWrapper* SvNumberFormatter::GetLocaleData() const { return 
xLocaleData.get(); }
 
@@ -1846,7 +1846,7 @@ bool SvNumberFormatter::GetPreviewStringGuess( const 
OUString& sFormatString,
 eLnge = ActLnge;
 bool bEnglish = (eLnge == LANGUAGE_ENGLISH_US);
 
-OUString aFormatStringUpper( pCharClass->uppercase( sFormatString ) );
+OUString aFormatStringUpper( oCharClass->uppercase( sFormatString ) );
 sal_uInt32 nCLOffset = ImpGenerateCL( eLnge );
 sal_uInt32 nKey = ImpIsEntry( aFormatStringUpper, nCLOffset, eLnge );
 if ( nKey != NUMBERFORMAT_ENTRY_NOT_FOUND )


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

2021-09-17 Thread Caolán McNamara (via logerrit)
 sw/source/filter/html/htmlplug.cxx |2 ++
 sw/source/filter/html/swhtml.cxx   |   10 --
 sw/source/filter/html/swhtml.hxx   |3 ++-
 3 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit b4edda1842c301a06c5528860542153590027b42
Author: Caolán McNamara 
AuthorDate: Fri Sep 17 15:31:23 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 17 21:04:26 2021 +0200

ofz#38652 Avoid timeout in html import

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

diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index e3cb057759d5..707badeac7ab 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1161,6 +1161,8 @@ void SwHTMLParser::InsertFloatingFrame()
 RegisterFlyFrame( pFlyFormat );
 
 m_bInFloatingFrame = true;
+
+++m_nFloatingFrames;
 }
 
 sal_uInt16 SwHTMLWriter::GuessOLENodeFrameType( const SwNode& rNode )
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 122a4ea88213..053a3c4177e4 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -314,6 +314,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCursor, 
SvStream& rIn,
 m_bFuzzing(utl::ConfigManager::IsFuzzing()),
 m_isInTableStructure(false),
 m_nTableDepth( 0 ),
+m_nFloatingFrames( 0 ),
 m_pTempViewFrame(nullptr)
 {
 // If requested explicitly, then force ignoring of comments (don't create 
postits for them).
@@ -1463,8 +1464,13 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
 break;
 
 case HtmlTokenId::IFRAME_ON:
-InsertFloatingFrame();
-m_bCallNextToken = m_bInFloatingFrame && m_xTable;
+if (m_bFuzzing && m_nFloatingFrames > 64)
+SAL_WARN("sw.html", "Not importing any more FloatingFrames for 
fuzzing performance");
+else
+{
+InsertFloatingFrame();
+m_bCallNextToken = m_bInFloatingFrame && m_xTable;
+}
 break;
 
 case HtmlTokenId::LINEBREAK:
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index d2b1fad6bca2..d4f65b2616a2 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -472,7 +472,8 @@ class SwHTMLParser : public SfxHTMLParser, public 
SvtListener
 bool m_bFuzzing;
 bool m_isInTableStructure;
 
-sal_Int32 m_nTableDepth;
+int m_nTableDepth;
+int m_nFloatingFrames;
 
 /// the names corresponding to the DOCINFO field subtypes INFO[1-4]
 OUString m_InfoNames[4];


[Libreoffice-commits] core.git: include/xmloff xmloff/source

2021-09-17 Thread Noel Grandin (via logerrit)
 include/xmloff/xmlnumfe.hxx  |1 -
 xmloff/source/style/xmlnumfe.cxx |9 +
 2 files changed, 1 insertion(+), 9 deletions(-)

New commits:
commit ed9c39da0a90ecd4677a4d80a541ca64493994ce
Author: Noel Grandin 
AuthorDate: Fri Sep 17 15:13:07 2021 +0200
Commit: Eike Rathke 
CommitDate: Fri Sep 17 20:14:25 2021 +0200

no need to store a CharClass in SvXMLNumFmtExport

we only use it at one site, and at that site we can use the CharClass
inside the formatter whose locale we just updated.

Spotted by erack.

Change-Id: I049c6fc399e62cfe83f3ae396ea8d0e7497e673f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122250
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/include/xmloff/xmlnumfe.hxx b/include/xmloff/xmlnumfe.hxx
index 28bfe8d1a2ad..2949aed76679 100644
--- a/include/xmloff/xmlnumfe.hxx
+++ b/include/xmloff/xmlnumfe.hxx
@@ -53,7 +53,6 @@ private:
 OUStringBuffer  sTextContent;
 boolbHasText;
 std::unique_ptr  pUsedList;
-std::unique_ptr  pCharClass;
 std::unique_ptr  pLocaleData;
 
 SAL_DLLPRIVATE void AddCalendarAttr_Impl( const OUString& rCalendar );
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 42a918df4573..1f0639febaa5 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -221,8 +221,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
 
 if ( pFormatter )
 {
-pCharClass.reset( new CharClass( pFormatter->GetComponentContext(),
-pFormatter->GetLanguageTag() ) );
 pLocaleData.reset( new LocaleDataWrapper( 
pFormatter->GetComponentContext(),
 pFormatter->GetLanguageTag() ) );
 }
@@ -230,7 +228,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
 {
 LanguageTag aLanguageTag( MsLangId::getSystemLanguage() );
 
-pCharClass.reset( new CharClass( rExport.getComponentContext(), 
aLanguageTag ) );
 pLocaleData.reset( new LocaleDataWrapper( 
rExport.getComponentContext(), aLanguageTag ) );
 }
 
@@ -254,8 +251,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
 
 if ( pFormatter )
 {
-pCharClass.reset( new CharClass( pFormatter->GetComponentContext(),
-pFormatter->GetLanguageTag() ) );
 pLocaleData.reset( new LocaleDataWrapper( 
pFormatter->GetComponentContext(),
 pFormatter->GetLanguageTag() ) );
 }
@@ -263,7 +258,6 @@ SvXMLNumFmtExport::SvXMLNumFmtExport(
 {
 LanguageTag aLanguageTag( MsLangId::getSystemLanguage() );
 
-pCharClass.reset( new CharClass( rExport.getComponentContext(), 
aLanguageTag ) );
 pLocaleData.reset( new LocaleDataWrapper( 
rExport.getComponentContext(), aLanguageTag ) );
 }
 
@@ -895,8 +889,7 @@ bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const 
OUString& rString,
 OUString sCurString, sDummy;
 pFormatter->GetCompatibilityCurrency( sCurString, sDummy );
 
-pCharClass.reset( new CharClass( pFormatter->GetComponentContext(), 
aLanguageTag ) );
-OUString sUpperStr = pCharClass->uppercase(rString);
+OUString sUpperStr = pFormatter->GetCharClass()->uppercase(rString);
 sal_Int32 nPos = lcl_FindSymbol( sUpperStr, sCurString );
 if ( nPos >= 0 )
 {


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

2021-09-17 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/ww8graf2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0b1d1739aa2ed7e0fbdc79a1403bfdc8dad3958b
Author: Caolán McNamara 
AuthorDate: Fri Sep 17 14:46:23 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 17 17:09:02 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/sw/source/filter/ww8/ww8graf2.cxx 
b/sw/source/filter/ww8/ww8graf2.cxx
index de4ec0824686..91b4d3e882c1 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -444,7 +444,7 @@ bool SwWW8ImplReader::PicRead(SvStream *pDataStream, 
WW8_PIC *pPic,
 bool bVer67)
 {
 //Only the first 0x2e bytes are the same between version 6/7 and 8+
-WW8_PIC_SHADOW aPicS;
+WW8_PIC_SHADOW aPicS{};
 pDataStream->ReadBytes( &aPicS, sizeof( aPicS ) );
 WW8PicShadowToReal( &aPicS, pPic );
 for (WW8_BRC & i : pPic->rgbrc)


[Libreoffice-commits] core.git: sc/qa

2021-09-17 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/subsequent_filters_test.cxx |   23 ---
 1 file changed, 4 insertions(+), 19 deletions(-)

New commits:
commit 44e1dbb95de4b2cf326ef5d29be6432e195dfb01
Author: Xisco Fauli 
AuthorDate: Fri Sep 17 14:56:54 2021 +0200
Commit: Xisco Fauli 
CommitDate: Fri Sep 17 16:39:32 2021 +0200

CppunitTest_sc_subsequent_filters_test: simplify code

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

diff --git a/sc/qa/unit/subsequent_filters_test.cxx 
b/sc/qa/unit/subsequent_filters_test.cxx
index cc7fe47271be..1bdfceb446ba 100644
--- a/sc/qa/unit/subsequent_filters_test.cxx
+++ b/sc/qa/unit/subsequent_filters_test.cxx
@@ -1854,25 +1854,10 @@ void 
ScFiltersTest::testPassword_Impl(std::u16string_view aFileNameBase)
 createFileURL(aFileNameBase, aFileExtension, aFileName);
 OUString aFilterType(getFileFormats()[0].pTypeName, 
strlen(getFileFormats()[0].pTypeName), RTL_TEXTENCODING_UTF8);
 
-auto pFilter = std::make_shared(
-aFilterName,
-OUString(), getFileFormats()[0].nFormatType,
-SotClipboardFormatId::STARCALC_8,
-aFilterType, OUString(),
-OUString(), "private:factory/scalc*" );
-pFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT);
-
-ScDocShellRef xDocSh = new ScDocShell;
-SfxMedium* pMedium = new SfxMedium(aFileName, StreamMode::STD_READWRITE);
-SfxItemSet* pSet = pMedium->GetItemSet();
-pSet->Put(SfxStringItem(SID_PASSWORD, "test"));
-pMedium->SetFilter(pFilter);
-if (!xDocSh->DoLoad(pMedium))
-{
-xDocSh->DoClose();
-// load failed.
-xDocSh.clear();
-}
+SfxFilterFlags nFormatType = getFileFormats()[0].nFormatType;
+OUString aPass("test");
+ScDocShellRef xDocSh = ScBootstrapFixture::load(aFileName, aFilterName, 
OUString(), aFilterType,
+nFormatType, SotClipboardFormatId::STARCALC_8, 
SOFFICE_FILEFORMAT_CURRENT, &aPass);
 
 CPPUNIT_ASSERT_MESSAGE("Failed to load password.ods", xDocSh.is());
 xDocSh->DoClose();


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

2021-09-17 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xiescher.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit d02f39f67539682fd6fc673796e95f935dd139f0
Author: Caolán McNamara 
AuthorDate: Fri Sep 17 11:59:31 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 17 16:32:19 2021 +0200

ofz: Avoid timeout

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

diff --git a/sc/source/filter/excel/xiescher.cxx 
b/sc/source/filter/excel/xiescher.cxx
index 9122b207a605..9ccd3521c391 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -43,6 +43,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1503,6 +1504,12 @@ void XclImpTextObj::DoPreProcessSdrObj( 
XclImpDffConverter& rDffConv, SdrObject&
 {
 if( maTextData.mxString->IsRich() )
 {
+if (maTextData.mxString->GetText().getLength() > 1024 && 
utl::ConfigManager::IsFuzzing())
+{
+SAL_WARN("sc.filter", "truncating slow long rich text for 
fuzzing performance");
+
maTextData.mxString->SetText(maTextData.mxString->GetText().copy(0, 1024));
+}
+
 // rich text
 std::unique_ptr< EditTextObject > xEditObj(
 XclImpStringHelper::CreateTextObject( GetRoot(), 
*maTextData.mxString ) );


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - editeng/source

2021-09-17 Thread Henry Castro (via logerrit)
 editeng/source/editeng/editview.cxx |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit fc715ea8fa206bd52045efc49c4abc1238b99aa4
Author: Henry Castro 
AuthorDate: Tue Aug 24 14:45:55 2021 -0400
Commit: Andras Timar 
CommitDate: Fri Sep 17 16:06:20 2021 +0200

lok: ensure no more tunneled spellchecking menu

Change-Id: Ic79d9b6d606573d93830347390c6466b033e9f12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120963
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index e76d8eb60374..3a179d009391 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1096,16 +1096,10 @@ void EditView::ExecuteSpellPopup( const Point& 
rPosPixel, LinkRemoveItem(nAutoCorrId);
 aPopupMenu->RemoveItem(nAutoCorrectDlgId);
 
-// For mobile phones, send the context menu structure
-const SfxViewShell* pViewShell = SfxViewShell::Current();
-if (pViewShell && pViewShell->isLOKMobilePhone())
-{
-LOKSendSpellPopupMenu(aPopupMenu, nGuessLangWord, 
nGuessLangPara, nWords);
-return;
-}
-else // For desktop or tablet, we use the tunneled dialog
-aPopupMenu->SetLOKNotifier(SfxViewShell::Current());
+LOKSendSpellPopupMenu(aPopupMenu, nGuessLangWord, nGuessLangPara, 
nWords);
+return;
 }
+
 sal_uInt16 nId = aPopupMenu->Execute(pImpEditView->GetWindow(), 
aTempRect, PopupMenuFlags::NoMouseUpClose);
 
 aPaM2 = pImpEditView->pEditEngine->pImpEditEngine->CreateEditPaM(aP2);


[Libreoffice-commits] core.git: vcl/unx

2021-09-17 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit ac3bc06fc2da5d5ca0d5b2c64440480c7e870494
Author: Caolán McNamara 
AuthorDate: Fri Sep 17 10:24:50 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 17 15:05:16 2021 +0200

gtk4: fill context menus

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index b09e7f56d503..2131dbabb24a 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -10431,6 +10431,8 @@ public:
 void* pData = g_object_get_data(G_OBJECT(pTopLevelMenu), 
"g-lo-GtkInstanceMenu");
 m_pTopLevelMenuHelper = static_cast(pData);
 }
+#else
+update_action_group_from_popover_model();
 #endif
 }
 
@@ -10449,6 +10451,8 @@ public:
 GMainLoop* pLoop = g_main_loop_new(nullptr, true);
 
 #if GTK_CHECK_VERSION(4, 0, 0)
+gtk_widget_insert_action_group(pWidget, "menu", m_pActionGroup);
+
 gulong nSignalId = g_signal_connect_swapped(G_OBJECT(m_pMenu), 
"closed", G_CALLBACK(g_main_loop_quit), pLoop);
 
 GdkRectangle aRect;
@@ -10524,6 +10528,8 @@ public:
 gtk_widget_unparent(GTK_WIDGET(m_pMenu));
 else
 gtk_widget_set_parent(GTK_WIDGET(m_pMenu), pOrigParent);
+
+gtk_widget_insert_action_group(pWidget, "menu", nullptr);
 #else
 gtk_menu_detach(m_pMenu);
 #endif


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

2021-09-17 Thread Noel Grandin (via logerrit)
 sc/inc/global.hxx  |2 +-
 sc/source/core/data/global.cxx |   10 +-
 sc/source/core/data/table6.cxx |2 +-
 sc/source/core/tool/formulaopt.cxx |2 +-
 sc/source/core/tool/interpr1.cxx   |4 ++--
 sc/source/core/tool/interpr5.cxx   |2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit b6c5d2d2661256a7789043b133ded51c6fdad3ff
Author: Noel Grandin 
AuthorDate: Fri Sep 17 12:34:57 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 17 15:03:49 2021 +0200

rather return ref from GetLocale

since we never return a nullptr.

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

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 5ebd8263eabb..38911878c437 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -544,7 +544,7 @@ public:
 /// case-sensitive collator
 static CollatorWrapper& GetCaseCollator();
 static CollatorWrapper& GetCollator(bool bCaseSensitive);
-static css::lang::Locale*   GetLocale();
+static css::lang::Locale&   GetLocale();
 
 SC_DLLPUBLIC static ::utl::TransliterationWrapper& GetTransliteration();
 static ::utl::TransliterationWrapper& GetCaseTransliteration();
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index b950cfe3003f..cbc2bcec709d 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -1028,7 +1028,7 @@ CalendarWrapper& ScGlobal::GetCalendar()
 if ( !oCalendar )
 {
 oCalendar.emplace( ::comphelper::getProcessComponentContext() );
-oCalendar->loadDefaultCalendar( *GetLocale() );
+oCalendar->loadDefaultCalendar( GetLocale() );
 }
 return *oCalendar;
 }
@@ -1050,7 +1050,7 @@ CollatorWrapper& ScGlobal::GetCollator()
 []()
 {
 CollatorWrapper* p = new CollatorWrapper( 
::comphelper::getProcessComponentContext() );
-p->loadDefaultCollator( *GetLocale(), SC_COLLATOR_IGNORES );
+p->loadDefaultCollator( GetLocale(), SC_COLLATOR_IGNORES );
 return p;
 },
 GetMutex());
@@ -1061,7 +1061,7 @@ CollatorWrapper& ScGlobal::GetCaseCollator()
 []()
 {
 CollatorWrapper* p = new CollatorWrapper( 
::comphelper::getProcessComponentContext() );
-p->loadDefaultCollator( *GetLocale(), 0 );
+p->loadDefaultCollator( GetLocale(), 0 );
 return p;
 },
 GetMutex());
@@ -1070,9 +1070,9 @@ CollatorWrapper& ScGlobal::GetCollator(bool 
bCaseSensitive)
 {
 return bCaseSensitive ? GetCaseCollator() : GetCollator();
 }
-css::lang::Locale* ScGlobal::GetLocale()
+css::lang::Locale& ScGlobal::GetLocale()
 {
-return comphelper::doubleCheckedInit( pLocale,
+return *comphelper::doubleCheckedInit( pLocale,
 []() { return new css::lang::Locale( 
Application::GetSettings().GetLanguageTag().getLocale()); });
 }
 
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 6b3321d2440c..f0e82629573b 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -826,7 +826,7 @@ bool ScTable::SearchAndReplace(
 {
 //  SearchParam no longer needed - SearchOptions contains all 
settings
 i18nutil::SearchOptions2 aSearchOptions = 
rSearchItem.GetSearchOptions();
-aSearchOptions.Locale = *ScGlobal::GetLocale();
+aSearchOptions.Locale = ScGlobal::GetLocale();
 
 //  reflect UseAsianOptions flag in SearchOptions
 //  (use only ignore case and width if asian options are disabled).
diff --git a/sc/source/core/tool/formulaopt.cxx 
b/sc/source/core/tool/formulaopt.cxx
index 63362984164e..6c9e790aa00b 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -54,7 +54,7 @@ void ScFormulaOptions::GetDefaultFormulaSeparators(
 rSepArrayCol = ";";
 rSepArrayRow = "|";
 
-const lang::Locale& rLocale = *ScGlobal::GetLocale();
+const lang::Locale& rLocale = ScGlobal::GetLocale();
 const OUString& rLang = rLocale.Language;
 if (rLang == "ru")
 // Don't do automatic guess for these languages, and fall back to
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 5923116be0d2..1477eaaab424 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2273,7 +2273,7 @@ void ScInterpreter::ScCell()
 {
 ScRefCellValue aCell(mrDoc, aCellPos);
 
-ScCellKeywordTranslator::transKeyword(aInfoType, 
ScGlobal::GetLocale(), ocCell);
+ScCellKeywordTranslator::transKeyword(aInfoType, 
&ScGlobal::GetLocale(), ocCell);
 
 // *** ADDRESS INFO ***
 if( aInfoType == "COL" )
@@ -2453,7 +2453,7 @@ void ScInterpreter::ScCellExternal()
 }
 aRef.Se

[Libreoffice-commits] core.git: 2 commits - sc/inc sc/qa sc/source

2021-09-17 Thread Noel Grandin (via logerrit)
 sc/inc/global.hxx|   12 
 sc/qa/unit/ucalc.cxx |3 +--
 sc/source/core/data/autonamecache.cxx|2 +-
 sc/source/core/data/conditio.cxx |   10 +-
 sc/source/core/data/dociter.cxx  |   14 ++
 sc/source/core/data/document.cxx |2 +-
 sc/source/core/data/dpcache.cxx  |   14 ++
 sc/source/core/data/dpitemdata.cxx   |4 ++--
 sc/source/core/data/dpobject.cxx |   12 ++--
 sc/source/core/data/funcdesc.cxx |2 +-
 sc/source/core/data/global.cxx   |   24 
 sc/source/core/data/table3.cxx   |   11 +--
 sc/source/core/tool/autoform.cxx |8 
 sc/source/core/tool/compare.cxx  |   17 -
 sc/source/core/tool/compiler.cxx |6 +++---
 sc/source/core/tool/dbdata.cxx   |4 ++--
 sc/source/core/tool/doubleref.cxx|2 +-
 sc/source/core/tool/interpr1.cxx |8 
 sc/source/core/tool/rangelst.cxx |4 ++--
 sc/source/core/tool/rangenam.cxx |2 +-
 sc/source/core/tool/typedstrdata.cxx |8 
 sc/source/core/tool/userlist.cxx |4 ++--
 sc/source/filter/excel/xelink.cxx|2 +-
 sc/source/ui/app/inputhdl.cxx|   10 +-
 sc/source/ui/dbgui/scuiasciiopt.cxx  |2 +-
 sc/source/ui/docshell/externalrefmgr.cxx |   12 ++--
 sc/source/ui/docshell/tablink.cxx|2 +-
 sc/source/ui/miscdlgs/acredlin.cxx   |2 +-
 sc/source/ui/miscdlgs/solveroptions.cxx  |2 +-
 sc/source/ui/view/dbfunc3.cxx|2 +-
 30 files changed, 106 insertions(+), 101 deletions(-)

New commits:
commit f9e09ba0513bbd0eaf872a60e6824a5b20229dfa
Author: Noel Grandin 
AuthorDate: Fri Sep 17 11:24:25 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 17 15:03:09 2021 +0200

rather return ref from GetTransliteration

since we never return a nullptr.
Also add a new utility method to simplify the call sites that need to
pick the right collator

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

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index a8b939114201..5ebd8263eabb 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -546,8 +546,9 @@ public:
 static CollatorWrapper& GetCollator(bool bCaseSensitive);
 static css::lang::Locale*   GetLocale();
 
-SC_DLLPUBLIC static ::utl::TransliterationWrapper* GetpTransliteration();
-static ::utl::TransliterationWrapper* GetCaseTransliteration();
+SC_DLLPUBLIC static ::utl::TransliterationWrapper& GetTransliteration();
+static ::utl::TransliterationWrapper& GetCaseTransliteration();
+static ::utl::TransliterationWrapper& GetTransliteration(bool 
bCaseSensitive);
 
 SC_DLLPUBLIC static LanguageTypeeLnge;
 static constexpr sal_Unicode cListDelimiter = ',';
diff --git a/sc/source/core/data/autonamecache.cxx 
b/sc/source/core/data/autonamecache.cxx
index a2be03c25796..f74219baf706 100644
--- a/sc/source/core/data/autonamecache.cxx
+++ b/sc/source/core/data/autonamecache.cxx
@@ -77,7 +77,7 @@ const ScAutoNameAddresses& 
ScAutoNameCache::GetNameOccurrences( const OUString&
 ;   // nothing, prevent compiler warning
 break;
 }
-if ( ScGlobal::GetpTransliteration()->isEqual( aStr, rName ) )
+if ( ScGlobal::GetTransliteration().isEqual( aStr, rName ) )
 {
 rAddresses.push_back(aIter.GetPos());
 }
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 3f5d4aefdbb6..10bf90b7d275 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -866,7 +866,7 @@ bool ScDocument::RenameTab( SCTAB nTab, const OUString& 
rName, bool bExternalDoc
 if (maTabs[i] && (i != nTab))
 {
 OUString aOldName = maTabs[i]->GetName();
-bValid = !ScGlobal::GetpTransliteration()->isEqual( rName, 
aOldName );
+bValid = !ScGlobal::GetTransliteration().isEqual( rName, 
aOldName );
 }
 if (bValid)
 {
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 2867c6616fa5..d544fb884d9c 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -695,8 +695,7 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam 
&rParam) const
 
 tools::Long nPos = -1;
 CollatorWrapper& rCollator = ScGlobal::GetCollator(rParam.bCaseSens);
-::utl::TransliterationWrapper* pTransliteration = (rParam.bCaseSens ?
-   
ScGlobal::GetCaseTransliteration()

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

2021-09-17 Thread Noel Grandin (via logerrit)
 sc/inc/global.hxx   |4 ++--
 sc/source/core/data/documen2.cxx|4 ++--
 sc/source/core/data/dpcache.cxx |2 +-
 sc/source/core/data/dptabsrc.cxx|4 ++--
 sc/source/core/data/dputil.cxx  |6 +++---
 sc/source/core/data/global.cxx  |8 
 sc/source/core/data/globalx.cxx |2 +-
 sc/source/core/data/postit.cxx  |2 +-
 sc/source/core/data/table3.cxx  |2 +-
 sc/source/core/tool/compiler.cxx|   10 +-
 sc/source/core/tool/editutil.cxx|6 +++---
 sc/source/core/tool/formulaopt.cxx  |2 +-
 sc/source/core/tool/numformat.cxx   |2 +-
 sc/source/core/tool/optutil.cxx |2 +-
 sc/source/core/tool/userlist.cxx|2 +-
 sc/source/filter/excel/excimp8.cxx  |2 +-
 sc/source/filter/html/htmlexp.cxx   |2 +-
 sc/source/filter/xcl97/xcl97rec.cxx |2 +-
 sc/source/ui/app/inputhdl.cxx   |8 
 sc/source/ui/cctrl/checklistmenu.cxx|4 ++--
 sc/source/ui/cctrl/editfield.cxx|4 ++--
 sc/source/ui/dbgui/scendlg.cxx  |4 ++--
 sc/source/ui/docshell/docsh3.cxx|4 ++--
 sc/source/ui/docshell/docsh6.cxx|4 ++--
 sc/source/ui/miscdlgs/acredlin.cxx  |   10 +-
 sc/source/ui/miscdlgs/conflictsdlg.cxx  |4 ++--
 sc/source/ui/miscdlgs/redcom.cxx|4 ++--
 sc/source/ui/miscdlgs/sharedocdlg.cxx   |8 
 sc/source/ui/miscdlgs/solveroptions.cxx |8 
 sc/source/ui/optdlg/tpformula.cxx   |2 +-
 sc/source/ui/vba/vbarange.cxx   |4 ++--
 sc/source/ui/view/cellsh2.cxx   |4 ++--
 sc/source/ui/view/colrowba.cxx  |2 +-
 sc/source/ui/view/gridwin5.cxx  |4 ++--
 sc/source/ui/view/output2.cxx   |4 ++--
 35 files changed, 73 insertions(+), 73 deletions(-)

New commits:
commit c67b9a4ce5ac3a09437730d8440c84159b581622
Author: Noel Grandin 
AuthorDate: Fri Sep 17 09:43:00 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 17 14:46:39 2021 +0200

rather return ref from GetCalendar

since we never return a nullptr

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

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index a8c885f48155..6a3eab0d837d 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -538,7 +538,7 @@ public:
 SC_DLLPUBLIC static const LocaleDataWrapper& getLocaleData();
 SC_DLLPUBLIC static const CharClass& getCharClass();
 
-static CalendarWrapper* GetCalendar();
+static CalendarWrapper& GetCalendar();
 SC_DLLPUBLIC static CollatorWrapper*GetCollator();
 static CollatorWrapper* GetCaseCollator();
 static css::lang::Locale*   GetLocale();
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 1950c8500d39..24ef497b3424 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -2388,14 +2388,14 @@ ScDPMember* ScDPMembers::getByIndex(sal_Int32 nIndex) 
const
 else if ( nHier == SC_DAPI_HIERARCHY_WEEK && nLev == 
SC_DAPI_LEVEL_WEEKDAY )
 {
 nVal = nIndex;  // DayOfWeek is 0-based
-aName = ScGlobal::GetCalendar()->getDisplayName(
+aName = ScGlobal::GetCalendar().getDisplayName(
 css::i18n::CalendarDisplayIndex::DAY,
 sal::static_int_cast(nVal), 0 );
 }
 else if ( nHier == SC_DAPI_HIERARCHY_QUARTER && nLev == 
SC_DAPI_LEVEL_MONTH )
 {
 nVal = nIndex;  // Month is 0-based
-aName = ScGlobal::GetCalendar()->getDisplayName(
+aName = ScGlobal::GetCalendar().getDisplayName(
 css::i18n::CalendarDisplayIndex::MONTH,
 sal::static_int_cast(nVal), 0 );
 }
diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx
index 23f18b906485..b589d4e80156 100644
--- a/sc/source/core/data/dputil.cxx
+++ b/sc/source/core/data/dputil.cxx
@@ -116,7 +116,7 @@ OUString ScDPUtil::getDateGroupName(
 case sheet::DataPilotFieldGroupBy::QUARTERS:
 return 
ScGlobal::getLocaleData().getQuarterAbbreviation(sal_Int16(nValue-1));// 
nValue is 1-based
 case css::sheet::DataPilotFieldGroupBy::MONTHS:
-return ScGlobal::GetCalendar()->getDisplayName(
+return ScGlobal::GetCalendar().getDisplayName(
 i18n::CalendarDisplayIndex::MONTH, 
sal_Int16(nValue-1), 0);// 0-based, get short name
 case sheet::DataPilotFieldGroupBy::DAYS:
 {
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index

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

2021-09-17 Thread Chris Sherlock (via logerrit)
 include/vcl/outdev.hxx |2 +-
 vcl/inc/PhysicalFontCollection.hxx |2 +-
 vcl/inc/PhysicalFontFamily.hxx |2 +-
 vcl/inc/outdev.h   |2 +-
 vcl/source/font/PhysicalFontCollection.cxx |3 +--
 vcl/source/gdi/embeddedfontshelper.cxx |2 +-
 vcl/source/gdi/print.cxx   |2 +-
 vcl/source/gdi/virdev.cxx  |2 +-
 vcl/source/outdev/font.cxx |2 +-
 vcl/source/outdev/outdev.cxx   |2 +-
 vcl/win/gdi/salfont.cxx|2 +-
 11 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit fec9c3d6f272d45a73dd4dad390a69e444ffc9e2
Author: Chris Sherlock 
AuthorDate: Thu Sep 16 12:41:19 2021 +1000
Commit: Mike Kaganski 
CommitDate: Fri Sep 17 14:10:54 2021 +0200

vcl: update vim modelines in preparation for new change

I have a patch queued to rename ImplDeviceFontList to
PhysicalFontFaceCollection, which I am adding a test to. Submitting
patch to update the modelines in the files that I will change in that
patch.

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 2839e5c98da5..6e357b077a14 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1909,4 +1909,4 @@ protected:
 
 #endif // INCLUDED_VCL_OUTDEV_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/PhysicalFontCollection.hxx 
b/vcl/inc/PhysicalFontCollection.hxx
index 87b94fe2ce3b..8af07e2883cf 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -93,4 +93,4 @@ private:
 
 #endif // INCLUDED_VCL_INC_PHYSICALFONTCOLLECTION_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx
index cd9f3f08e8d1..5c2ae12f24c8 100644
--- a/vcl/inc/PhysicalFontFamily.hxx
+++ b/vcl/inc/PhysicalFontFamily.hxx
@@ -98,4 +98,4 @@ private:
 
 #endif // INCLUDED_VCL_INC_PHYSICALFONTFAMILY_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index df4c2f205182..8746d790eb62 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -141,4 +141,4 @@ void ImplFontSubstitute( OUString& rFontName );
 
 #endif // INCLUDED_VCL_INC_OUTDEV_H
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/font/PhysicalFontCollection.cxx 
b/vcl/source/font/PhysicalFontCollection.cxx
index 1d047781de4d..f6a693068d34 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -1263,5 +1263,4 @@ PhysicalFontFamily* 
PhysicalFontCollection::FindFontFamily( FontSelectPattern& r
 return pFoundData;
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx 
b/vcl/source/gdi/embeddedfontshelper.cxx
index 5664857d3474..1a67603da911 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -329,4 +329,4 @@ OUString EmbeddedFontsHelper::fontFileUrl( 
std::u16string_view familyName, FontF
 return ok ? url : "";
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index ea3d70053978..91e516b67c86 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1683,4 +1683,4 @@ void Printer::SetSystemTextColor(SystemTextColorFlags, 
bool)
 SetTextColor(COL_BLACK);
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 5520ce93c073..bc9f9ffe5838 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -510,4 +510,4 @@ tools::Long VirtualDevice::GetFontExtLeading() const
 return mpFontInstance->mxFontMetric->GetExternalLeading();
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 06c339dd795c..53727e3378cc 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl

[Libreoffice-commits] core.git: sal/rtl

2021-09-17 Thread Mike Kaganski (via logerrit)
 sal/rtl/string.cxx  |4 ++--
 sal/rtl/strtmpl.hxx |8 
 sal/rtl/ustring.cxx |4 ++--
 3 files changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 11c8109fa109ef8178679b4de6efde695b99e0a8
Author: Mike Kaganski 
AuthorDate: Fri Sep 17 07:42:31 2021 +0200
Commit: Mike Kaganski 
CommitDate: Fri Sep 17 13:44:20 2021 +0200

Drop this unneeded indirection

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

diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx
index 94be8029032a..b8a96d43a07b 100644
--- a/sal/rtl/string.cxx
+++ b/sal/rtl/string.cxx
@@ -23,7 +23,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 
@@ -599,7 +598,8 @@ void SAL_CALL rtl_string_new(rtl_String** ppThis) 
SAL_THROW_EXTERN_C()
 
 rtl_String* SAL_CALL rtl_string_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C()
 {
-return rtl::str::alloc(nLen);
+assert(nLen >= 0);
+return rtl::str::Alloc(nLen);
 }
 
 void SAL_CALL rtl_string_new_WithLength(rtl_String** ppThis, sal_Int32 nLen) 
SAL_THROW_EXTERN_C()
diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx
index 493184f92efa..f26c21225177 100644
--- a/sal/rtl/strtmpl.hxx
+++ b/sal/rtl/strtmpl.hxx
@@ -1099,14 +1099,6 @@ template  void new_( 
IMPL_RTL_STRINGDATA** ppThis
 
 /* --- */
 
-template  IMPL_RTL_STRINGDATA* alloc( sal_Int32 
nLen )
-{
-assert(nLen >= 0);
-return Alloc( nLen );
-}
-
-/* --- */
-
 template 
 void new_WithLength( IMPL_RTL_STRINGDATA** ppThis, sal_Int32 nLen )
 {
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index 4aac6455..ee84510bcc7f 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -27,7 +27,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -1793,7 +1792,8 @@ void SAL_CALL rtl_uString_new(rtl_uString** ppThis) 
SAL_THROW_EXTERN_C()
 
 rtl_uString* SAL_CALL rtl_uString_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C()
 {
-return rtl::str::alloc(nLen);
+assert(nLen >= 0);
+return rtl::str::Alloc(nLen);
 }
 
 void SAL_CALL rtl_uString_new_WithLength(rtl_uString** ppThis, sal_Int32 nLen) 
SAL_THROW_EXTERN_C()


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/source

2021-09-17 Thread Szymon Kłos (via logerrit)
 sw/source/core/doc/extinput.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit d8dbd123bfa7f39489ceb15ac83142635531fd43
Author: Szymon Kłos 
AuthorDate: Thu Sep 16 16:53:40 2021 +0200
Commit: Andras Timar 
CommitDate: Fri Sep 17 13:37:04 2021 +0200

lok: IME: directly copy formatting for inserted text

This is a fix for online where after:

lok: IME: preserve formatting when inserting at the end of paragraph


https://cgit.freedesktop.org/libreoffice/core/commit/?h=distro/collabora/cp-6.4&id=bf96d1f23e5c12f9263643dfdab94fd1361bb098

text formatting is lost.

Change-Id: I3d316f8f4c4d750eac7900228f9f2d99f70d99bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122199
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index 4795862e9e1a..9f60ec1fabcf 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -102,18 +102,17 @@ SwExtTextInput::~SwExtTextInput()
 {
 // we need to keep correct formatting
 // ie. when we erase first, then we will lost information 
about format
-// so:
-// 0. initial status:  | OLD
-// 1. insert new content using Doc interface at the end so we 
will use the same formatting
-//status:  | OLD | NEW
-// 2. erase old content which is placed at "start" position 
and before recently inserted text
-//status:  | NEW
 
 sal_Int32 nLenghtOfOldString = nEndCnt - nSttCnt;
 
 if( bInsText )
 {
 pDoc->getIDocumentContentOperations().InsertString( *this, 
sText );
+
+// Copy formatting to the inserted string
+SfxItemSet aSet(pTNd->GetDoc()->GetAttrPool(), 
aCharFormatSetRange);
+pTNd->GetParaAttr( aSet, nSttCnt + nLenghtOfOldString, 
nEndCnt + nLenghtOfOldString );
+pTNd->SetAttr( aSet, nSttCnt, nEndCnt );
 }
 
 pTNd->EraseText( rIdx, nLenghtOfOldString );


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

2021-09-17 Thread Marco Pinto (via logerrit)
 extras/source/autocorr/lang/pt/DocumentList.xml | 5111 
 1 file changed, 2556 insertions(+), 2555 deletions(-)

New commits:
commit 8c49b17e482545e3c5c67d7b4bbf452eed366695
Author: Marco Pinto 
AuthorDate: Tue Aug 31 23:58:35 2021 +0200
Commit: Andras Timar 
CommitDate: Fri Sep 17 13:34:52 2021 +0200

Sorted the list except emojis.

This will make it easier to update without inserting each word manually.

Also added the two blank spaces on the start of each line.

Change-Id: Ida85d28404aca759331d6089946be8dd970c79db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121414
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/extras/source/autocorr/lang/pt/DocumentList.xml 
b/extras/source/autocorr/lang/pt/DocumentList.xml
index ee4aee118309..df9289b8c2f4 100644
--- a/extras/source/autocorr/lang/pt/DocumentList.xml
+++ b/extras/source/autocorr/lang/pt/DocumentList.xml
@@ -1,2614 +1,2615 @@
  http://openoffice.org/2001/block-list";>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

... etc. - the rest is truncated


[Libreoffice-commits] dev-tools.git: qa/document_analyser.py

2021-09-17 Thread Ahlaam Rafiq (via logerrit)
 qa/document_analyser.py |   79 
 1 file changed, 79 insertions(+)

New commits:
commit 71ffc7eba9137e94a96b72fed762cc1c9a82baeb
Author: Ahlaam Rafiq 
AuthorDate: Sun Apr 4 13:17:48 2021 +0300
Commit: Ilmari Lauhakangas 
CommitDate: Fri Sep 17 13:25:19 2021 +0200

tdf#124141 add document analyser

Co-authored-by: Sebastian O. 
Change-Id: Ie1e3474d020721538d6618addf7094b3307d9f5c
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/113567
Reviewed-by: Xisco Fauli 
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Ilmari Lauhakangas 

diff --git a/qa/document_analyser.py b/qa/document_analyser.py
new file mode 100644
index 000..06bc98a
--- /dev/null
+++ b/qa/document_analyser.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python3
+#
+# 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 https://mozilla.org/MPL/2.0/.
+#
+
+"""
+Document analyser uses the odfpy module: https://pypi.org/project/odfpy/
+
+This script prints:
+bookmark count, cell count, changetracking count, character count, 
+comment count, draw count, frame count, hyperlink count, 
+image count, non-whitespace character count, object count, OLE object count, 
+page count, paragraph count, row count, sentence count, 
+syllable count, table count, textbox count, word count, and paragraph styles.
+
+"""
+
+import odf
+from odf.namespaces import TEXTNS
+from odf.element import Element
+from odf.opendocument import load
+from odf import text,meta,office,draw
+
+
+print("Enter filename: ")
+filename=input()
+
+doc=load(filename)
+
+#document statistics from the odf.meta 
module
+print("\nDOCUMENT STATISTICS\n")
+for stat in doc.getElementsByType(meta.DocumentStatistic):
+print("Cell count",stat.getAttribute('cellcount'))
+print("Character count:",stat.getAttribute('charactercount'))
+print("Draw count:",stat.getAttribute('drawcount'))
+print("Frame count:",stat.getAttribute('framecount'))  
+print("Image count:",stat.getAttribute('imagecount'))
+print("Non-whitespace character 
count:",stat.getAttribute('nonwhitespacecharactercount'))
+print("Object count:",stat.getAttribute('objectcount'))
+print("Object linking and embedding (OLE) object 
count:",stat.getAttribute('oleobjectcount'))
+print("Page count:",stat.getAttribute('pagecount'))
+print("Paragraph count:",stat.getAttribute('paragraphcount'))
+print("Row count:",stat.getAttribute('rowcount'))
+print("Sentence count:",stat.getAttribute('sentencecount'))
+print("Syllable count:",stat.getAttribute('syllablecount'))
+print("Table count:",stat.getAttribute('tablecount'))
+print("Word count:",stat.getAttribute('wordcount'))
+
+
+#type counter for attributes not covered by 
odf.meta.DocumentStatistic
+def type_counter(doc,type):
+count=0
+for element in doc.getElementsByType(type):
+count+=1
+return count
+
+types={
+'Bookmark':text.Bookmark,
+'Changetracking':text.FormatChange,
+'Comment':office.Annotation,
+'Hyperlink':text.A,
+'Textbox':draw.TextBox
+}
+
+for key,value in types.items():
+print(key,'count:',type_counter(doc,value))
+
+#paragraph styles
+def paragraph_style(doc):
+i = 1
+for paragraph in doc.getElementsByType(text.P):
+print('Paragraph',i,'style:',paragraph.getAttribute('stylename'))
+i+=1
+
+paragraph_style(doc)


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

2021-09-17 Thread Caolán McNamara (via logerrit)
 unotools/source/misc/syslocale.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 55adeb1c3fbcf32c7c44a3f0c310b56298f551f9
Author: Caolán McNamara 
AuthorDate: Fri Sep 17 10:35:23 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 17 13:03:22 2021 +0200

need optional header

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

diff --git a/unotools/source/misc/syslocale.cxx 
b/unotools/source/misc/syslocale.cxx
index b55e1316cabe..f6fd3c18a45b 100644
--- a/unotools/source/misc/syslocale.cxx
+++ b/unotools/source/misc/syslocale.cxx
@@ -31,8 +31,9 @@
 #include 
 #include 
 
-#include 
 #include 
+#include 
+#include 
 
 using namespace osl;
 using namespace com::sun::star;


[Libreoffice-commits] core.git: vcl/unx

2021-09-17 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/customcellrenderer.cxx |   14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 370577a641b77b6cf0a08fa73a1ae62fd0bea15b
Author: Caolán McNamara 
AuthorDate: Fri Sep 17 10:24:06 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 17 13:02:38 2021 +0200

gtk4: guard vcl calls from gtk

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

diff --git a/vcl/unx/gtk3/customcellrenderer.cxx 
b/vcl/unx/gtk3/customcellrenderer.cxx
index c43638648dc6..94d6a01f2cee 100644
--- a/vcl/unx/gtk3/customcellrenderer.cxx
+++ b/vcl/unx/gtk3/customcellrenderer.cxx
@@ -30,7 +30,11 @@ G_DEFINE_TYPE(CustomCellRenderer, custom_cell_renderer, 
GTK_TYPE_CELL_RENDERER_T
 
 static void custom_cell_renderer_init(CustomCellRenderer* self)
 {
-new (&self->device) VclPtr;
+{
+SolarMutexGuard aGuard;
+new (&self->device) VclPtr;
+}
+
 // prevent loplugin:unreffun firing on macro generated function
 (void)custom_cell_renderer_get_instance_private(self);
 }
@@ -96,8 +100,12 @@ static void custom_cell_renderer_finalize(GObject* object)
 CustomCellRenderer* cellsurface = CUSTOM_CELL_RENDERER(object);
 
 g_free(cellsurface->id);
-cellsurface->device.disposeAndClear();
-cellsurface->device.~VclPtr();
+
+{
+SolarMutexGuard aGuard;
+cellsurface->device.disposeAndClear();
+cellsurface->device.~VclPtr();
+}
 
 G_OBJECT_CLASS(custom_cell_renderer_parent_class)->finalize(object);
 }


[Libreoffice-commits] core.git: include/svx include/xmloff odk/docs odk/examples offapi/com officecfg/registry qadevOOo/tests sd/source svx/source xmloff/source

2021-09-17 Thread rocso (via logerrit)
 include/svx/strings.hrc  |   
10 ++---
 include/svx/svddrag.hxx  |
8 ++--
 include/svx/svdmrkv.hxx  |   
16 
 include/svx/svdobj.hxx   |
6 +--
 include/svx/svdoedge.hxx |   
18 -
 include/svx/svdpntv.hxx  |
8 ++--
 include/svx/svdview.hxx  |
4 +-
 include/xmloff/shapeimport.hxx   |
8 ++--
 odk/docs/idl/idl_chapter_refs.txt|
2 -
 odk/examples/DevelopersGuide/Drawing/GluePointDemo.java  |
4 +-
 odk/examples/DevelopersGuide/Drawing/Organigram.java |
4 +-
 offapi/com/sun/star/drawing/ConnectorShape.idl   |
4 +-
 offapi/com/sun/star/drawing/EnhancedCustomShapeGluePointType.idl |   
10 ++---
 offapi/com/sun/star/drawing/EnhancedCustomShapePath.idl  |
2 -
 offapi/com/sun/star/drawing/EscapeDirection.idl  |
2 -
 offapi/com/sun/star/drawing/GluePoint2.idl   |   
14 +++
 offapi/com/sun/star/drawing/Shape.idl|
2 -
 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |   
20 +-
 officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu |
4 +-
 officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu  |
2 -
 qadevOOo/tests/java/ifc/drawing/_XGluePointsSupplier.java|
2 -
 sd/source/ui/dlg/gluectrl.cxx|
4 +-
 sd/source/ui/func/fuconbez.cxx   |
2 -
 sd/source/ui/func/fuediglu.cxx   |
8 ++--
 sd/source/ui/func/fusel.cxx  |
8 ++--
 sd/source/ui/view/drviews4.cxx   |
4 +-
 sd/source/ui/view/drviews7.cxx   |
2 -
 svx/source/engine3d/obj3d.cxx|
6 +--
 svx/source/engine3d/scene3d.cxx  |
6 +--
 svx/source/inc/svdobjplusdata.hxx|
2 -
 svx/source/svdraw/svdcrtv.cxx|
2 -
 svx/source/svdraw/svddrgmt.cxx   |
2 -
 svx/source/svdraw/svddrgv.cxx|
4 +-
 svx/source/svdraw/svdglue.cxx|
4 +-
 svx/source/svdraw/svdhdl.cxx |
2 -
 svx/source/svdraw/svdmrkv.cxx|
2 -
 svx/source/svdraw/svdmrkv1.cxx   |
4 +-
 svx/source/svdraw/svdobj.cxx |   
12 +++---
 svx/source/svdraw/svdoedge.cxx   |   
12 +++---
 svx/source/svdraw/svdview.cxx|
4 +-
 svx/source/unodraw/gluepts.cxx   |   
12 +++---
 xmloff/source/draw/shapeexport.cxx   |
4 +-
 xmloff/source/draw/shapeimport.cxx   |   
12 +++---
 xmloff/source/draw/ximpshap.cxx  |
4 +-
 44 files changed, 136 insertions(+), 136 deletions(-)

New commits:
commit 4f7560240d8a9273fd5ecbc76e7ac054b3a6e4ae
Author: rocso 
AuthorDate: Fri Sep 17 17:12:37 2021 +1000
Commit: Heiko Tietze 
CommitDate: Fri Sep 17 12:53:38 2021 +0200

tdf#143550 - use the term "gluepoints" consistently

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

diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 915c84762686..1b30c31fa1a0 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -206,7 +206,7 @@
 #define STR_EditImportMtf   
NC_("STR_EditImportMtf", "Split %1")
 #define STR_ExchangePaste   
NC_("STR_ExchangePaste", "Insert object(s)")
 #define STR_DragInsertPoint 
NC_("STR_DragInsertPoint", "Insert point to %1")
-#define STR_DragInsertGluePoint 
NC_("STR_DragInsertGluePoint", "Insert glue point to %1")
+#define STR_DragInsertGluePoint 
NC_("STR_DragInsertGluePoint", "Insert glue

[Libreoffice-commits] core.git: helpcontent2

2021-09-17 Thread rocso (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 74691a6f1b4aaadfed284ba9746032e438f7468b
Author: rocso 
AuthorDate: Fri Sep 17 20:39:43 2021 +1000
Commit: Gerrit Code Review 
CommitDate: Fri Sep 17 12:39:43 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to ee13bc67bf0a292b19985923536924f5ab1abd0b
  - tdf#143550 - make gluepoints terminology consistent

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

diff --git a/helpcontent2 b/helpcontent2
index 04b0cb75e8e2..ee13bc67bf0a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 04b0cb75e8e2fea295159d15a101ddf9f4fdb943
+Subproject commit ee13bc67bf0a292b19985923536924f5ab1abd0b


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

2021-09-17 Thread rocso (via logerrit)
 source/text/sdraw/main0210.xhp|4 +--
 source/text/sdraw/main0503.xhp|2 -
 source/text/sdraw/main_edit.xhp   |4 +--
 source/text/simpress/00/0402.xhp  |2 -
 source/text/simpress/02/10030200.xhp  |   34 +++---
 source/text/simpress/02/1010.xhp  |2 -
 source/text/simpress/02/1301.xhp  |8 +++
 source/text/simpress/guide/gluepoints.xhp |   26 +++---
 source/text/simpress/guide/orgchart.xhp   |2 -
 source/text/simpress/main0210.xhp |4 +--
 source/text/simpress/main_edit.xhp|4 +--
 11 files changed, 46 insertions(+), 46 deletions(-)

New commits:
commit ee13bc67bf0a292b19985923536924f5ab1abd0b
Author: rocso 
AuthorDate: Fri Sep 17 14:11:01 2021 +1000
Commit: Olivier Hallot 
CommitDate: Fri Sep 17 12:39:41 2021 +0200

tdf#143550 - make gluepoints terminology consistent

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

diff --git a/source/text/sdraw/main0210.xhp b/source/text/sdraw/main0210.xhp
index 183806238..421c4ff03 100644
--- a/source/text/sdraw/main0210.xhp
+++ b/source/text/sdraw/main0210.xhp
@@ -60,8 +60,8 @@
 
 Points
 Enables you to 
edit points on your drawing.
-Glue Points
-Enables you to 
edit glue points on your drawing.
+Gluepoints
+Enables you to 
edit gluepoints on your drawing.
 
 
 
diff --git a/source/text/sdraw/main0503.xhp b/source/text/sdraw/main0503.xhp
index a6b3c8554..be136d402 100644
--- a/source/text/sdraw/main0503.xhp
+++ b/source/text/sdraw/main0503.xhp
@@ -43,7 +43,7 @@
   Grids 
and Snap Lines
   Grids and 
snap lines provide a visual cue to help you align objects in your drawing. You 
can also choose to snap an object to a grid line, snap line or to the edge of 
another object.
   Connecting Objects to Show Relationships
-  You can 
connect objects in $[officename] Draw with special lines called 
"connectors" to show the relationship between objects. Connectors 
attach to glue points on drawing objects and remain attached when the connected 
objects are moved. Connectors are useful for creating organization charts and 
technical diagrams.
+  You can 
connect objects in $[officename] Draw with special lines called 
"connectors" to show the relationship between objects. Connectors 
attach to gluepoints on drawing objects and remain attached when the connected 
objects are moved. Connectors are useful for creating organization charts and 
technical diagrams.
   Displaying Dimensions
   Technical 
diagrams often show the dimensions of objects in the drawing. In $[officename] 
Draw, you can use dimension lines to calculate and display linear 
dimensions.
   Gallery
diff --git a/source/text/sdraw/main_edit.xhp b/source/text/sdraw/main_edit.xhp
index a5cf7f52d..63e35c6af 100644
--- a/source/text/sdraw/main_edit.xhp
+++ b/source/text/sdraw/main_edit.xhp
@@ -41,8 +41,8 @@
 
 Points
 Enables you to 
edit points on your drawing.
-Glue points
-Enables you to 
edit glue points on your drawing.
+Gluepoints
+Enables you to 
edit gluepoints on your drawing.
 Duplicate
 
 Cross-fading
diff --git a/source/text/simpress/00/0402.xhp 
b/source/text/simpress/00/0402.xhp
index 6529fdf34..eba3bb4f4 100644
--- a/source/text/simpress/00/0402.xhp
+++ b/source/text/simpress/00/0402.xhp
@@ -41,7 +41,7 @@
 
   Choose Edit - Fields
 
-  Click the Glue Points icon 
on the Drawing Bar
+  Click the Show Gluepoint 
Functions icon on the Drawing Bar
 UFI: this is called from text\simpress\02\10030200.xhp to 
fix bug #i23785#

 
\ No newline at end of file
diff --git a/source/text/simpress/02/10030200.xhp 
b/source/text/simpress/02/10030200.xhp
index 46e4ef830..51ff30e34 100644
--- a/source/text/simpress/02/10030200.xhp
+++ b/source/text/simpress/02/10030200.xhp
@@ -27,9 +27,9 @@
 
 
 
-object bars; editing glue 
points
+object bars; editing 
gluepoints
 
-Glue Points Bar
+Gluepoints Bar
 
 Insert or modify the properties of a gluepoint. A gluepoint is a point 
where you can attach a connector line.  By default, %PRODUCTNAME automatically places a gluepoint at the 
center of each side of the bounding rectangle for every object you 
create.
 
@@ -37,7 +37,7 @@
 
 
 
-Insert 
Glue Point 
+Insert 
Gluepoint 
 Inserts a gluepoint where you click in an 
object.
 
 
@@ -117,7 +117,7 @@
 
 
 
-Glue 
Point Relative
+Gluepoint Relative
 Maintains the relative position of a selected gluepoint 
when you resize an object.
 
 
@@ -127,13 +127,13 @@

 
 
-Glue Point 
Relative
+Gluepoint 
Relative
 
 
 
 
 
-Glue 
Point Horizontal Left
+Gluepoint Horizontal Left
 When the object is resized, the current gluepoint 
remains fixed to the left edge of the object.
 
 
@@ -143,13 +143,13 @@

 
 
-Glue Point 
Horizontal Left
+Gluepoint 
Horizontal Left
 
 
 
 
 
-Glue 
Point Horizontal Center
+Glu

[Libreoffice-commits] core.git: helpcontent2

2021-09-17 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2f7c5188a71a66f5352a8e0cdf741efdce64b63b
Author: Olivier Hallot 
AuthorDate: Fri Sep 17 12:16:35 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Sep 17 12:16:35 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 04b0cb75e8e2fea295159d15a101ddf9f4fdb943
  - Fix grammar

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

diff --git a/helpcontent2 b/helpcontent2
index 0730e0e4e050..04b0cb75e8e2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0730e0e4e05095fba949378e2cc489f31784c7e4
+Subproject commit 04b0cb75e8e2fea295159d15a101ddf9f4fdb943


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

2021-09-17 Thread Olivier Hallot (via logerrit)
 source/text/scalc/01/12120300.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 04b0cb75e8e2fea295159d15a101ddf9f4fdb943
Author: Olivier Hallot 
AuthorDate: Fri Sep 17 11:32:41 2021 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Sep 17 12:16:34 2021 +0200

Fix grammar

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

diff --git a/source/text/scalc/01/12120300.xhp 
b/source/text/scalc/01/12120300.xhp
index 43da7d8c3..8ddc3c6e9 100644
--- a/source/text/scalc/01/12120300.xhp
+++ b/source/text/scalc/01/12120300.xhp
@@ -32,7 +32,7 @@
   
   
   Error 
Alert
-  Define the error 
message that is displayed when invalid data is entered in a 
cell.
+  Defines the error 
message that is displayed when invalid data is entered in a 
cell.
 
 You can also 
start a macro with an error message. A sample macro is provided at the end of 
this page.
 


[Libreoffice-commits] core.git: vcl/unx

2021-09-17 Thread Michael Weghorn (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx  |8 
 vcl/unx/gtk3/salnativewidgets-gtk.cxx |7 ---
 2 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 8ded3f9562aec04e54dd36677f5a99e0d6cbec23
Author: Michael Weghorn 
AuthorDate: Fri Sep 17 09:31:22 2021 +0200
Commit: Michael Weghorn 
CommitDate: Fri Sep 17 12:06:48 2021 +0200

Fix gtk4 build ('--enable-werror')

Fixes

[CXX] vcl/unx/gtk4/transferableprovider.cxx
In file included from vcl/unx/gtk4/salnativewidgets-gtk.cxx:10:
vcl/unx/gtk4/../gtk3/salnativewidgets-gtk.cxx:364:19: error: 
‘gTreeViewWidget’ defined but not used [-Werror=unused-variable]
  364 | static GtkWidget* gTreeViewWidget;
  |   ^~~
vcl/unx/gtk4/../gtk3/salnativewidgets-gtk.cxx:363:19: error: ‘gListBox’ 
defined but not used [-Werror=unused-variable]
  363 | static GtkWidget* gListBox;
  |   ^~~~
vcl/unx/gtk4/../gtk3/salnativewidgets-gtk.cxx:362:19: error: 
‘gComboBox’ defined but not used [-Werror=unused-variable]
  362 | static GtkWidget* gComboBox;
  |   ^
vcl/unx/gtk4/../gtk3/salnativewidgets-gtk.cxx:355:19: error: ‘gSpinBox’ 
defined but not used [-Werror=unused-variable]
  355 | static GtkWidget* gSpinBox;
  |   ^~~~
cc1plus: all warnings being treated as errors
make[1]: *** [solenv/gbuild/LinkTarget.mk:307: 
workdir/CxxObject/vcl/unx/gtk4/salnativewidgets-gtk.o] Error 1
make[1]: *** Waiting for unfinished jobs
In file included from vcl/unx/gtk4/notifyinglayout.hxx:13,
 from vcl/unx/gtk4/gtkinst.cxx:14:
vcl/unx/gtk4/../gtk3/gtkinst.cxx:4385:11: error: ‘static void 
{anonymous}::GtkInstanceWidget::LinkStubasync_drag_cancel(void*, void*)’ 
defined but not used [-Werror=unused-function]
 4385 | IMPL_LINK(GtkInstanceWidget, async_drag_cancel, void*, arg, 
void)
  |   ^
include/tools/link.hxx:45:13: note: in definition of macro ‘IMPL_LINK’
   45 | RetType Class::LinkStub##Member(void * instance, ArgType 
data) { \
  | ^
cc1plus: all warnings being treated as errors
make[1]: *** [solenv/gbuild/LinkTarget.mk:304: 
workdir/CxxObject/vcl/unx/gtk4/gtkinst.o] Error 1
make: *** [Makefile:288: build] Error 2

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 9f0cada7e763..b09e7f56d503 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -2514,7 +2514,9 @@ protected:
 GtkWidget* m_pMouseEventBox;
 GtkInstanceBuilder* m_pBuilder;
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
 DECL_LINK(async_drag_cancel, void*, void);
+#endif
 
 bool IsFirstFreeze() const { return m_nFreezeCount == 0; }
 bool IsLastThaw() const { return m_nFreezeCount == 1; }
@@ -4382,9 +4384,9 @@ public:
 
 }
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
 IMPL_LINK(GtkInstanceWidget, async_drag_cancel, void*, arg, void)
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 m_pDragCancelEvent = nullptr;
 GdkDragContext* context = static_cast(arg);
 
@@ -4396,10 +4398,8 @@ IMPL_LINK(GtkInstanceWidget, async_drag_cancel, void*, 
arg, void)
 g_signal_emit_by_name(context, "cancel", 0, 
GDK_DRAG_CANCEL_USER_CANCELLED);
 
 g_object_unref(context);
-#else
-(void)arg;
-#endif
 }
+#endif
 
 namespace
 {
diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/salnativewidgets-gtk.cxx
index c034c1135d89..8fe550371d7e 100644
--- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx
@@ -352,16 +352,17 @@ tools::Rectangle GtkSalGraphics::NWGetScrollButtonRect( 
ControlPart nPart, tools
 
 static GtkWidget* gCacheWindow;
 static GtkWidget* gDumbContainer;
-static GtkWidget* gSpinBox;
 #if GTK_CHECK_VERSION(4, 0, 0)
 static GtkWidget* gVScrollbar;
 static GtkWidget* gHScrollbar;
 static GtkWidget* gTextView;
-#endif
-static GtkWidget* gEntryBox;
+#else
 static GtkWidget* gComboBox;
 static GtkWidget* gListBox;
+static GtkWidget* gSpinBox;
 static GtkWidget* gTreeViewWidget;
+#endif
+static GtkWidget* gEntryBox;
 
 namespace
 {


[Libreoffice-commits] dev-tools.git: clang/bin

2021-09-17 Thread Miklos Vajna (via logerrit)
 clang/bin/clang-rename-wrapper |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2c6ea2aac8f00d6d598f1c50244ebebd738d7bc8
Author: Miklos Vajna 
AuthorDate: Fri Sep 17 11:29:02 2021 +0200
Commit: Miklos Vajna 
CommitDate: Fri Sep 17 11:30:21 2021 +0200

clang: add clang-rename-wrapper

This is almost the same as the old rename-wrapper, but it uses
clang-rename, not that custom "rename" tool from this repo.

And remove the old wrapper, I don't think anybody uses it.

diff --git a/clang/bin/rename-wrapper b/clang/bin/clang-rename-wrapper
similarity index 92%
rename from clang/bin/rename-wrapper
rename to clang/bin/clang-rename-wrapper
index 6f4e938..da7cbac 100755
--- a/clang/bin/rename-wrapper
+++ b/clang/bin/clang-rename-wrapper
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 mydir=$(dirname $0)
-myname=rename
+myname=clang-rename
 if [ -h $0 ]; then
 mydir=$(dirname $(readlink -f $0))
 fi
@@ -29,7 +29,7 @@ if [ -n "$file" ]; then
 mkdir -p /tmp/rename
 RENAME_ARGS="$RENAME_ARGS -export-fixes=$(mktemp -p /tmp/rename 
XX.yaml)"
 fi
-$mydir/$myname $RENAME_ARGS $file -- "$@"
+$myname $RENAME_ARGS $file -- "$@"
 ret=$?
 fi
 


[Libreoffice-commits] core.git: vcl/unx

2021-09-17 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit d0940e0cca552f65ea4e85d9895682afab230c87
Author: Caolán McNamara 
AuthorDate: Thu Sep 16 15:06:05 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 17 11:27:11 2021 +0200

gtk4: get menus attached to menubuttons after load time working

run update_action_group_from_popover_model on the newly attached menu

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 60b2a7450846..9f0cada7e763 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -10763,11 +10763,13 @@ void GtkInstanceMenuButton::set_menu(weld::Menu* 
pMenu)
 {
 GtkInstanceMenu* pPopoverWidget = dynamic_cast(pMenu);
 m_pPopover = nullptr;
-GtkWidget* pMenuWidget = GTK_WIDGET(pPopoverWidget ? 
pPopoverWidget->getMenu() : nullptr);
+m_pMenu = pPopoverWidget ? pPopoverWidget->getMenu() : nullptr;
+
 #if !GTK_CHECK_VERSION(4, 0, 0)
-gtk_menu_button_set_popup(m_pMenuButton, pMenuWidget);
+gtk_menu_button_set_popup(m_pMenuButton, GTK_WIDGET(m_pMenu));
 #else
-gtk_menu_button_set_popover(m_pMenuButton, pMenuWidget);
+gtk_menu_button_set_popover(m_pMenuButton, GTK_WIDGET(m_pMenu));
+update_action_group_from_popover_model();
 #endif
 }
 


[Libreoffice-commits] core.git: vcl/unx

2021-09-17 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   27 +++
 1 file changed, 3 insertions(+), 24 deletions(-)

New commits:
commit b4cf6dd97837c34a3e4b754f5132026830051720
Author: Caolán McNamara 
AuthorDate: Thu Sep 16 16:51:19 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Sep 17 11:26:44 2021 +0200

gtk4: listen to "toggled" so callbacks see get_menu_item_active of true

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 13e441fe58f8..60b2a7450846 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -10852,7 +10852,7 @@ private:
 
 GtkWidget* pToggleButton = 
gtk_widget_get_first_child(GTK_WIDGET(pMenuButton));
 assert(GTK_IS_TOGGLE_BUTTON(pToggleButton));
-g_signal_connect(pToggleButton, "state-flags-changed", 
G_CALLBACK(signalItemFlagsChanged), this);
+g_signal_connect(pToggleButton, "toggled", 
G_CALLBACK(signalItemToggled), this);
 #endif
 
 // by default the GtkMenuButton down arrow button is as wide as
@@ -10909,7 +10909,6 @@ private:
 signal_clicked(::get_buildable_id(GTK_BUILDABLE(pItem)));
 }
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
 static void signalItemToggled(GtkToggleButton* pItem, gpointer widget)
 {
 GtkInstanceToolbar* pThis = static_cast(widget);
@@ -10921,37 +10920,17 @@ private:
 {
 for (const auto& a : m_aMenuButtonMap)
 {
+#if !GTK_CHECK_VERSION(4, 0, 0)
 if (a.second->getWidget() == GTK_WIDGET(pItem))
-{
-signal_toggle_menu(a.first);
-break;
-}
-}
-}
 #else
-static void signalItemFlagsChanged(GtkToggleButton* pItem, GtkStateFlags 
flags, gpointer widget)
-{
-GtkInstanceToolbar* pThis = static_cast(widget);
-bool bOldChecked = flags & GTK_STATE_FLAG_CHECKED;
-bool bNewChecked = gtk_widget_get_state_flags(GTK_WIDGET(pItem)) & 
GTK_STATE_FLAG_CHECKED;
-if (bOldChecked == bNewChecked)
-return;
-SolarMutexGuard aGuard;
-pThis->signal_item_toggled(pItem);
-}
-
-void signal_item_toggled(GtkToggleButton* pItem)
-{
-for (auto& a : m_aMenuButtonMap)
-{
 if (a.second->getWidget() == 
gtk_widget_get_parent(GTK_WIDGET(pItem)))
+#endif
 {
 signal_toggle_menu(a.first);
 break;
 }
 }
 }
-#endif
 
 #if GTK_CHECK_VERSION(4, 0, 0)
 static void set_item_image(GtkWidget* pItem, GtkWidget* pImage)


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

2021-09-17 Thread Stephan Bergmann (via logerrit)
 i18npool/source/transliteration/transliteration_body.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 061f7ba80efe621503531ca9512b194ad8cefcd3
Author: Stephan Bergmann 
AuthorDate: Fri Sep 17 09:24:22 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 17 11:24:46 2021 +0200

Fix calculation of alloca'ed memory size

...after 16d645e5b8f11b4ddb49a2b58bde388b28960abc "speedup
Transliteration_body::transliterateImpl", which caused
dynamic-stack-buffer-overflow 
( ==4003==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 
0x7fffe890f7d2 at pc 0x004b1c2d bp 0x7fffe890f490 sp 0x7fffe890ec40
> WRITE of size 2 at 0x7fffe890f7d2 thread T0
> #0 0x4b1c2c in __asan_memmove 
/home/tdf/lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc:30
> #1 0x2b8b4222ef65 in char16_t* std::__copy_move::__copy_m(char16_t const*, char16_t 
const*, char16_t*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:368:6
> #2 0x2b8b4222eec0 in char16_t* std::__copy_move_a(char16_t const*, char16_t const*, char16_t*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:385:14
> #3 0x2b8b4222d9be in char16_t* std::__copy_move_a2(char16_t const*, char16_t const*, char16_t*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:422:18
> #4 0x2b8b4222d2be in char16_t* std::copy(char16_t const*, char16_t const*, char16_t*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:454:15
> #5 0x2b8b4222cf43 in char16_t* std::__copy_n(char16_t const*, signed char, char16_t*, 
std::random_access_iterator_tag) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:782:14
> #6 0x2b8b4222b495 in char16_t* std::copy_n(char16_t const*, signed char, char16_t*) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:806:14
> #7 0x2b8b42225872 in 
i18npool::Transliteration_body::transliterateImpl(rtl::OUString const&, int, 
int, com::sun::star::uno::Sequence*) 
/i18npool/source/transliteration/transliteration_body.cxx:145:13
> #8 0x2b8b42236f35 in 
i18npool::transliteration_commonclass::transliterateString2String(rtl::OUString 
const&, int, int) 
/i18npool/source/transliteration/transliteration_commonclass.cxx:109:12
> #9 0x2b8b41fbc740 in i18npool::cclass_Unicode::toUpper(rtl::OUString 
const&, int, int, com::sun::star::lang::Locale const&) 
/i18npool/source/characterclassification/cclass_unicode.cxx:67:19
> #10 0x2b8b41fbc7b2 in non-virtual thunk to 
i18npool::cclass_Unicode::toUpper(rtl::OUString const&, int, int, 
com::sun::star::lang::Locale const&) 
/i18npool/source/characterclassification/cclass_unicode.cxx
> #11 0x2b8b41ff1335 in 
i18npool::CharacterClassificationImpl::toUpper(rtl::OUString const&, int, int, 
com::sun::star::lang::Locale const&) 
/i18npool/source/characterclassification/characterclassificationImpl.cxx:47:63
[...]

Change-Id: I5273e234c8921f635e31c414cb0e427ee8b04a95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122234
Reviewed-by: Noel Grandin 
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/i18npool/source/transliteration/transliteration_body.cxx 
b/i18npool/source/transliteration/transliteration_body.cxx
index 3581212af8b3..1f4541082435 100644
--- a/i18npool/source/transliteration/transliteration_body.cxx
+++ b/i18npool/source/transliteration/transliteration_body.cxx
@@ -104,9 +104,8 @@ Transliteration_body::transliterateImpl(
 constexpr sal_Int32 nLocalBuf = 2048;
 sal_Unicode* out;
 std::unique_ptr pHeapBuf;
-size_t nBytes = (nCount + 1) * sizeof(sal_Unicode);
-if (nBytes <= nLocalBuf * NMAPPINGMAX)
-out = static_cast(alloca(nBytes));
+if (nCount <= nLocalBuf)
+out = static_cast(alloca(nCount * NMAPPINGMAX * 
sizeof(sal_Unicode)));
 else
 {
 pHeapBuf.reset(new sal_Unicode[ nCount * NMAPPINGMAX ]);


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

2021-09-17 Thread Stephan Bergmann (via logerrit)
 configmgr/source/valueparser.cxx   |4 +++-
 oox/source/ppt/comments.cxx|5 -
 xmloff/source/draw/animationimport.cxx |8 ++--
 3 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit a6db8971bf37b696ae7b1d0f8fb4d11a1e541da1
Author: Stephan Bergmann 
AuthorDate: Fri Sep 17 07:42:32 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 17 11:14:40 2021 +0200

Some more uses of rtl_math_(u)StringToDouble

...to avoid construction of temporary O(U)Strings, in anticipation of using
C++17 std::from_chars once that is available in all our baselines, similar 
to
99a1290b3f2c8584db0a33fe48adf93dccce3a92 "Use existing 
rtl_math_stringToDouble"

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

diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index 49ddba36fc27..6245cb11b654 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -128,7 +129,8 @@ bool parseValue(xmlreader::Span const & text, sal_Int64 * 
value) {
 
 bool parseValue(xmlreader::Span const & text, double * value) {
 assert(text.is() && value != nullptr);
-*value = OString(text.begin, text.length).toDouble();
+*value = rtl_math_stringToDouble(
+text.begin, text.begin + text.length, '.', 0, nullptr, nullptr);
 //TODO: check valid lexical representation
 return true;
 }
diff --git a/oox/source/ppt/comments.cxx b/oox/source/ppt/comments.cxx
index 78dc5295497f..8034a3978b45 100644
--- a/oox/source/ppt/comments.cxx
+++ b/oox/source/ppt/comments.cxx
@@ -9,6 +9,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 namespace oox::ppt
@@ -37,7 +38,9 @@ void Comment::setDateTime(const OUString& sDateTime)
 aDateTime.Day = sDateTime.getToken(0, 'T', nIdx).toUInt32();
 aDateTime.Hours = sDateTime.getToken(0, ':', nIdx).toUInt32();
 aDateTime.Minutes = sDateTime.getToken(0, ':', nIdx).toUInt32();
-double seconds = sDateTime.copy(nIdx).toDouble();
+double seconds = rtl_math_uStringToDouble(sDateTime.getStr() + nIdx,
+  sDateTime.getStr() + 
sDateTime.getLength(), '.', 0,
+  nullptr, nullptr);
 aDateTime.Seconds = floor(seconds);
 seconds -= aDateTime.Seconds;
 aDateTime.NanoSeconds = ::rtl::math::round(seconds * 10);
diff --git a/xmloff/source/draw/animationimport.cxx 
b/xmloff/source/draw/animationimport.cxx
index f39922967f48..1c8ff364bccd 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -50,6 +50,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -408,8 +409,11 @@ Sequence< TimeFilterPair > 
AnimationsImportHelperImpl::convertTimeFilter( const
 sal_Int32 nPos = aToken.indexOf( ',' );
 if( nPos >= 0 )
 {
-pValues->Time = aToken.copy( 0, nPos ).toDouble();
-pValues->Progress = aToken.copy( nPos+1 ).toDouble();
+pValues->Time = rtl_math_uStringToDouble(
+aToken.getStr(), aToken.getStr() + nPos, '.', 0, nullptr, 
nullptr);
+pValues->Progress = rtl_math_uStringToDouble(
+aToken.getStr() + nPos + 1, aToken.getStr() + 
aToken.getLength(), '.', 0,
+nullptr, nullptr);
 }
 pValues++;
 }


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

2021-09-17 Thread Baran Aytas (via logerrit)
 sc/source/core/data/patattr.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 6184eefa835f0495ed8136471d61837f5662b6d6
Author: Baran Aytas 
AuthorDate: Sat Sep 11 19:28:47 2021 +0300
Commit: Michael Stahl 
CommitDate: Fri Sep 17 10:52:41 2021 +0200

tdf#140226: Make use of SfxPoolItems more typesafe by using StaticWhichCast

Change-Id: Ideaf9ec500af7c3aecbb7086a123a3764cac54d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121956
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 795f8671522f..b9b2859104b2 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -581,19 +581,19 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& 
rEditSet, const SfxItemSet& r
 
 if ( pCondSet->GetItemState( ATTR_FONT_COLOR, true, &pItem ) != 
SfxItemState::SET )
 pItem = &rSrcSet.Get( ATTR_FONT_COLOR );
-aColorItem.reset(static_cast(pItem->Clone()));
+aColorItem.reset(&pItem->Clone()->StaticWhichCast(ATTR_FONT_COLOR));
 
 if ( pCondSet->GetItemState( ATTR_FONT, true, &pItem ) != 
SfxItemState::SET )
 pItem = &rSrcSet.Get( ATTR_FONT );
-aFontItem.reset(static_cast(pItem->Clone()));
+aFontItem.reset(&pItem->Clone()->StaticWhichCast(ATTR_FONT));
 
 if ( pCondSet->GetItemState( ATTR_CJK_FONT, true, &pItem ) != 
SfxItemState::SET )
 pItem = &rSrcSet.Get( ATTR_CJK_FONT );
-aCjkFontItem.reset(static_cast(pItem->Clone()));
+aCjkFontItem.reset(&pItem->Clone()->StaticWhichCast(ATTR_CJK_FONT));
 
 if ( pCondSet->GetItemState( ATTR_CTL_FONT, true, &pItem ) != 
SfxItemState::SET )
 pItem = &rSrcSet.Get( ATTR_CTL_FONT );
-aCtlFontItem.reset(static_cast(pItem->Clone()));
+aCtlFontItem.reset(&pItem->Clone()->StaticWhichCast(ATTR_CTL_FONT));
 
 if ( pCondSet->GetItemState( ATTR_FONT_HEIGHT, true, &pItem ) != 
SfxItemState::SET )
 pItem = &rSrcSet.Get( ATTR_FONT_HEIGHT );
@@ -627,11 +627,11 @@ void ScPatternAttr::FillToEditItemSet( SfxItemSet& 
rEditSet, const SfxItemSet& r
 
 if ( pCondSet->GetItemState( ATTR_FONT_UNDERLINE, true, &pItem ) != 
SfxItemState::SET )
 pItem = &rSrcSet.Get( ATTR_FONT_UNDERLINE );
-aUnderlineItem.reset(static_cast(pItem->Clone()));
+
aUnderlineItem.reset(&pItem->Clone()->StaticWhichCast(ATTR_FONT_UNDERLINE));
 
 if ( pCondSet->GetItemState( ATTR_FONT_OVERLINE, true, &pItem ) != 
SfxItemState::SET )
 pItem = &rSrcSet.Get( ATTR_FONT_OVERLINE );
-aOverlineItem.reset(static_cast(pItem->Clone()));
+
aOverlineItem.reset(&pItem->Clone()->StaticWhichCast(ATTR_FONT_OVERLINE));
 
 if ( pCondSet->GetItemState( ATTR_FONT_WORDLINE, true, &pItem ) != 
SfxItemState::SET )
 pItem = &rSrcSet.Get( ATTR_FONT_WORDLINE );


[Libreoffice-commits] core.git: include/unotools linguistic/source svl/source sw/inc sw/source unotools/source xmloff/source

2021-09-17 Thread Noel Grandin (via logerrit)
 include/unotools/charclass.hxx |4 -
 linguistic/source/misc.cxx |   22 +-
 linguistic/source/spelldsp.cxx |6 -
 svl/source/numbers/zforlist.cxx|2 
 sw/inc/calc.hxx|3 
 sw/source/core/bastyp/calc.cxx |7 +
 sw/source/core/fields/usrfld.cxx   |6 -
 sw/source/core/txtnode/txtedt.cxx  |   11 +--
 unotools/source/i18n/charclass.cxx |  133 ++---
 unotools/source/misc/syslocale.cxx |   12 +--
 xmloff/source/style/xmlnumfe.cxx   |2 
 11 files changed, 56 insertions(+), 152 deletions(-)

New commits:
commit dac29c278531d5474289eb54aa03987c4958ac83
Author: Noel Grandin 
AuthorDate: Thu Sep 16 11:03:04 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 17 10:49:21 2021 +0200

speedup toUpperCase when called in parallel

by removing locking from CharClass, which means we need to make it an
immutable class

Since SharedStringPool in sc/ stores a pointer to the CharClass in
use, we have to tweak SvtSysLocale so that the object does not change
location.

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

diff --git a/include/unotools/charclass.hxx b/include/unotools/charclass.hxx
index 521f3abe003b..f3c81a18e51b 100644
--- a/include/unotools/charclass.hxx
+++ b/include/unotools/charclass.hxx
@@ -62,7 +62,6 @@ class UNOTOOLS_DLLPUBLIC CharClass
 {
 LanguageTag maLanguageTag;
 css::uno::Reference< css::i18n::XCharacterClassification >xCC;
-mutable std::mutexaMutex;
 
 CharClass(const CharClass&) = delete;
 CharClass& operator=(const CharClass&) = delete;
@@ -79,9 +78,6 @@ public:
 
 ~CharClass();
 
-/// set a new Locale
-void setLanguageTag( const LanguageTag& rLanguageTag );
-
 /// get current Locale
 const LanguageTag& getLanguageTag() const;
 
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 363b5f445a47..f541b97551e6 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -566,21 +566,10 @@ uno::Reference< XHyphenatedWord > 
RebuildHyphensAndControlChars(
 return xRes;
 }
 
-static CharClass & lcl_GetCharClass()
-{
-static CharClass aCC( LanguageTag( LANGUAGE_ENGLISH_US ));
-return aCC;
-}
-
-static std::mutex s_GetCharClassMutex;
-
 bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, 
LanguageType nLanguage )
 {
-std::scoped_lock  aGuard( s_GetCharClassMutex );
-
-CharClass &rCC = lcl_GetCharClass();
-rCC.setLanguageTag( LanguageTag( nLanguage ));
-sal_Int32 nFlags = rCC.getStringType( rText, nPos, nLen );
+CharClass aCC(( LanguageTag( nLanguage ) ));
+sal_Int32 nFlags = aCC.getStringType( rText, nPos, nLen );
 return  (nFlags & KCharacterType::UPPER)
 && !(nFlags & KCharacterType::LOWER);
 }
@@ -612,11 +601,8 @@ CapType capitalType(const OUString& aTerm, CharClass const 
* pCC)
 
 OUString ToLower( const OUString &rText, LanguageType nLanguage )
 {
-std::scoped_lock  aGuard( s_GetCharClassMutex );
-
-CharClass &rCC = lcl_GetCharClass();
-rCC.setLanguageTag( LanguageTag( nLanguage ));
-return rCC.lowercase( rText );
+CharClass aCC(( LanguageTag( nLanguage ) ));
+return aCC.lowercase( rText );
 }
 
 // sorted(!) array of unicode ranges for code points that are exclusively(!) 
used as numbers
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index dbece3def648..c1b309b00adf 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -813,9 +813,9 @@ void SpellCheckerDispatcher::FlushSpellCache()
 
 void SpellCheckerDispatcher::setCharClass(const LanguageTag& rLanguageTag)
 {
-if (!m_pCharClass)
-m_pCharClass.reset( new CharClass(rLanguageTag) );
-m_pCharClass->setLanguageTag(rLanguageTag);
+if (m_pCharClass && m_pCharClass->getLanguageTag() == rLanguageTag)
+return;
+m_pCharClass.reset( new CharClass(rLanguageTag) );
 }
 
 
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 6ef3dddcd016..077d04867e0f 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -338,7 +338,7 @@ void SvNumberFormatter::ChangeIntl(LanguageType eLnge)
 ActLnge = eLnge;
 
 maLanguageTag.reset( eLnge );
-pCharClass->setLanguageTag( maLanguageTag );
+pCharClass.reset( new CharClass( m_xContext, maLanguageTag ) );
 xLocaleData.changeLocale( maLanguageTag );
 xCalendar.changeLocale( maLanguageTag.getLocale() );
 xTransliteration.changeLocale( eLnge );
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 4121cc7f0e72..5ff42c15c59e 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -240,7 +240,8 @@ public:
 
 boolPush(const SwUserFieldType* pUserFieldType);
 voidPop();
-   

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sfx2/source

2021-09-17 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/DeckTitleBar.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 876254bee420e89e560ac8dbbb1828bda92ed2e8
Author: Caolán McNamara 
AuthorDate: Thu Sep 16 09:10:08 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Sep 17 10:41:03 2021 +0200

occasionally the bg color of the deck grip is wrong

Change-Id: I318e817a8e99b9f01aee90f042bfac39a1c4b5d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122120
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx 
b/sfx2/source/sidebar/DeckTitleBar.cxx
index 6700014e82a4..42379e5354f3 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -53,6 +53,7 @@ public:
 virtual void Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& /*rRect*/) override
 {
 
rRenderContext.SetBackground(Theme::GetColor(Theme::Color_DeckTitleBarBackground));
+rRenderContext.Erase();
 rRenderContext.DrawBitmapEx(Point(0, 0), maGrip);
 }
 };


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

2021-09-17 Thread Noel Grandin (via logerrit)
 sc/inc/global.hxx |5 +++--
 sc/source/core/data/dpcache.cxx   |2 +-
 sc/source/core/data/global.cxx|   26 +-
 sc/source/core/data/table3.cxx|2 +-
 sc/source/core/tool/cellkeytranslator.cxx |2 +-
 sc/source/core/tool/compare.cxx   |2 +-
 sc/source/ui/app/inputwin.cxx |2 +-
 7 files changed, 21 insertions(+), 20 deletions(-)

New commits:
commit fbad565fcb5ee8d20a1a83838e66b43aeb23bfa4
Author: Noel Grandin 
AuthorDate: Fri Sep 17 08:59:22 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 17 10:19:39 2021 +0200

use optional for some fields in ScGlobal

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

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index f9a773c39b6f..7cf4d84b402f 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -35,6 +35,7 @@
 #undef bool
 
 #include 
+#include 
 #include 
 
 namespace com::sun::star::uno { template  class Reference; }
@@ -521,7 +522,7 @@ class ScGlobal
 static std::unique_ptr xEnglishFormatter;  // 
for UNO / XML export
 
 static css::uno::Reference< css::i18n::XOrdinalSuffix> xOrdinalSuffix;
-static std::unique_ptr  xCalendar;
+static std::optionaloCalendar;
 static std::atomic pCaseCollator;
 static std::atomic pCollator;
 static std::atomic<::utl::TransliterationWrapper*> pTransliteration;
@@ -533,7 +534,7 @@ class ScGlobal
 static void InitPPT();
 
 public:
-static std::unique_ptr xSysLocale;
+static std::optional oSysLocale;
 SC_DLLPUBLIC static const LocaleDataWrapper* getLocaleDataPtr();
 SC_DLLPUBLIC static const CharClass& getCharClass();
 
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 9b572a810b94..2900dd318e77 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -811,7 +811,7 @@ bool ScDPCache::ValidQuery( SCROW nRow, const ScQueryParam 
&rParam) const
 {
 OUString aQueryStr = 
rEntry.GetQueryItem().maString.getString();
 css::uno::Sequence< sal_Int32 > xOff;
-const LanguageType nLang = 
ScGlobal::xSysLocale->GetLanguageTag().getLanguageType();
+const LanguageType nLang = 
ScGlobal::oSysLocale->GetLanguageTag().getLanguageType();
 OUString aCell = pTransliteration->transliterate(
 aCellStr, nLang, 0, aCellStr.getLength(), &xOff);
 OUString aQuer = pTransliteration->transliterate(
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 3b3db8292df2..81da6d470fef 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -80,8 +80,8 @@ std::atomic 
ScGlobal::pAddInCollection(nullptr);
 std::unique_ptr ScGlobal::xUserList;
 LanguageTypeScGlobal::eLnge = LANGUAGE_SYSTEM;
 std::atomic ScGlobal::pLocale(nullptr);
-std::unique_ptr   ScGlobal::xSysLocale;
-std::unique_ptr ScGlobal::xCalendar;
+std::optional   ScGlobal::oSysLocale;
+std::optional ScGlobal::oCalendar;
 std::atomic ScGlobal::pCollator(nullptr);
 std::atomic ScGlobal::pCaseCollator(nullptr);
 std::atomic<::utl::TransliterationWrapper*> 
ScGlobal::pTransliteration(nullptr);
@@ -438,7 +438,7 @@ void ScGlobal::Init()
 // FIXME: So remove this variable?
 eLnge = LANGUAGE_SYSTEM;
 
-xSysLocale = std::make_unique();
+oSysLocale.emplace();
 
 xEmptyBrushItem = std::make_unique( COL_TRANSPARENT, 
ATTR_BACKGROUND );
 xButtonBrushItem = std::make_unique( Color(), 
ATTR_BACKGROUND );
@@ -543,8 +543,8 @@ void ScGlobal::Clear()
 delete pTransliteration.load(); pTransliteration = nullptr;
 delete pCaseCollator.load(); pCaseCollator = nullptr;
 delete pCollator.load(); pCollator = nullptr;
-xCalendar.reset();
-xSysLocale.reset();
+oCalendar.reset();
+oSysLocale.reset();
 delete pLocale.load(); pLocale = nullptr;
 
 delete pUnitConverter.load(); pUnitConverter = nullptr;
@@ -1003,30 +1003,30 @@ utl::TransliterationWrapper* 
ScGlobal::GetpTransliteration()
 const LocaleDataWrapper* ScGlobal::getLocaleDataPtr()
 {
 OSL_ENSURE(
-xSysLocale,
+oSysLocale,
 "ScGlobal::getLocaleDataPtr() called before ScGlobal::Init()");
 
-return &xSysLocale->GetLocaleData();
+return &oSysLocale->GetLocaleData();
 }
 
 const CharClass& ScGlobal::getCharClass()
 {
 OSL_ENSURE(
-xSysLocale,
+oSysLocale,
 "ScGlobal::getCharClassPtr() called before ScGlobal::Init()");
 
-return xSysLocale->GetCharClass();
+return oSysLocale->GetCharClass();
 }
 
 CalendarWrapper* ScGlobal::GetCalendar()
 {
 assert(!bThreadedGroupCalcInProgress);
-if ( 

[Libreoffice-commits] dev-tools.git: test-bugzilla-files/new-control.py test-bugzilla-files/zip.sh

2021-09-17 Thread Gülşah Köse (via logerrit)
 test-bugzilla-files/new-control.py |   11 +++
 test-bugzilla-files/zip.sh |8 
 2 files changed, 19 insertions(+)

New commits:
commit 6b7fd54d6da91b4253df19692a2ead2d22943f5c
Author: Gülşah Köse 
AuthorDate: Thu Sep 16 19:03:46 2021 +0300
Commit: Miklos Vajna 
CommitDate: Fri Sep 17 10:11:34 2021 +0200

Show a warning if CPU load average is higher than limit.

If CPU load average is higher than limit, we will add
a warning line to mail body.

Change-Id: If73f82e868639ca02bf224bf07bf0c37fcf1ec3a
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/122200
Tested-by: Miklos Vajna 
Reviewed-by: Miklos Vajna 

diff --git a/test-bugzilla-files/new-control.py 
b/test-bugzilla-files/new-control.py
index 10479a4..a83c65a 100644
--- a/test-bugzilla-files/new-control.py
+++ b/test-bugzilla-files/new-control.py
@@ -88,6 +88,16 @@ def checkDiskSpace():
 diskusagefile.write(str(freeGiB))
 diskusagefile.close()
 
+def checkCPULoadAverage():
+cpuload, _, _ = os.getloadavg()
+cpuload /= float(os.cpu_count())
+limit = 0.9
+
+if cpuload > limit:
+cpuusagefile = open("/srv/crashtestdata/cpuusageinfo.txt", "w")
+cpuusagefile.write(str(cpuload))
+cpuusagefile.close()
+
 def usage():
 message = """usage: {program} [option] dir"
  - h | --help: print usage information
@@ -122,6 +132,7 @@ if __name__ == "__main__":
 if asan == 1:
 workers = 64
 
+checkCPULoadAverage()
 checkDiskSpace()
 with concurrent.futures.ThreadPoolExecutor(max_workers=workers) as 
executor:
 future_to_task = {executor.submit(execute_task, task_file, asan): 
task_file for task_file in get_tasks(directory, task_size)}
diff --git a/test-bugzilla-files/zip.sh b/test-bugzilla-files/zip.sh
index 0ad6f11..a0c2202 100755
--- a/test-bugzilla-files/zip.sh
+++ b/test-bugzilla-files/zip.sh
@@ -39,6 +39,13 @@ if [ -e $diskusagefile ]; then
 free_disk_space="$(cat $diskusagefile)"
 rm $diskusagefile
 fi
+
+cpuusagefile=$CRASHTESTDATA/cpuusageinfo.txt
+if [ -e $cpuusagefile ]; then
+cpu_usage="$(cat $cpuusagefile)"
+rm $cpuusagefile
+fi
+
 cat << EOF > mail.txt
 Hi,
 
@@ -53,6 +60,7 @@ $num_of_odf_diffs files have differences compared to the 
previous run.
 EOF
 
 [ ! -z "${free_disk_space}" ] && echo "Warning! Remaining disk space is 
${free_disk_space} GiB." >> mail.txt && echo "" >> mail.txt
+[ ! -z "${cpu_usage}" ] && echo "Warning! CPU load average is ${cpu_usage}." 
>> mail.txt && echo "" >> mail.txt
 
 cat << EOF >> mail.txt
 - Your friendly crashtest bot


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/source sw/uiconfig

2021-09-17 Thread Balazs Varga (via logerrit)
 sw/source/ui/dbui/mmresultdialogs.cxx|   56 +--
 sw/source/ui/inc/mmresultdialogs.hxx |2 
 sw/uiconfig/swriter/ui/mmresultsavedialog.ui |3 -
 3 files changed, 39 insertions(+), 22 deletions(-)

New commits:
commit d8e5a8c7c3ff747023e7b4b501b7eaef86c40592
Author: Balazs Varga 
AuthorDate: Fri Sep 10 08:46:23 2021 +0200
Commit: László Németh 
CommitDate: Fri Sep 17 09:50:54 2021 +0200

tdf#144427 tdf#144483 sw mailmerge: fix merge all document

Not all records were merged if we selected the “From 'X' To 'Y' of the
“Save Merged Documents” or “Print Merged Documents” or "Send to Email"
dialog windows and write some value into them and then we switched back
on to Save/Print/Send All record (opened via the Mail merge toolbar).

Regression from commit: ec44f87d5b99a3299322d0b79abc4c6808877865
(tdf#117212 sw mailmerge: merge only the selected range)

(cherry picked from commit f3993912ec4b526aa57cb4bfb4745d7298a4da82)

tdf#144483 sw mail merge: save ranges in a single document

In the Save mail merged document dialog, it wasn't possible
to save mail ranges in a single document, because of the bad
UI of the dialog window: grouping range selector as a radio
button with the single document/individual documents radio
buttons. Moreover, commit f3993912ec4b526aa57cb4bfb4745d7298a4da82
"tdf#144427 sw mailmerge: fix merge all document" removed
the hidden workaround: setting range at the third radio button,
and selecting the first radio button. Using checkbox for the
third option solved the problem as proposed.

(cherry picked from commit 45c4caff685b15a0f1b87ef05436a7e6aca96851)

Fix broken ui file

...after 45c4caff685b15a0f1b87ef05436a7e6aca96851 "tdf#144483 sw mail merge:
save ranges in a single document", causing CppunitTest_sw_dialogs_test to 
fail
with

> warn:vcl.gtk:2759211:2759211:vcl/unx/gtk3/gtkinst.cxx:21611: 
GtkInstanceBuilder: error when calling gtk_builder_add_from_file: 
~/lo/core/instdir/share/config/soffice.cfg/modules/swriter/ui/mmresultsavedialog.ui:165:49
 Invalid property: GtkCheckButton.group

(cherry picked from commit 7b37af5af6afe75ad952538c145a4f4e61de9a96)

Change-Id: I01fc664fe76f74cefe4faa81b324088ec37b9881
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121982
Reviewed-by: László Németh 
Reviewed-by: Balazs Varga 
Tested-by: Jenkins

diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx 
b/sw/source/ui/dbui/mmresultdialogs.cxx
index 6e081c68a9a1..fe39b8ed90d9 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -251,7 +251,7 @@ SwMMResultSaveDialog::SwMMResultSaveDialog(weld::Window* 
pParent)
 , m_bCancelSaving(false)
 , m_xSaveAsOneRB(m_xBuilder->weld_radio_button("singlerb"))
 , m_xSaveIndividualRB(m_xBuilder->weld_radio_button("individualrb"))
-, m_xFromRB(m_xBuilder->weld_radio_button("fromrb"))
+, m_xFromRB(m_xBuilder->weld_check_button("fromrb"))
 , m_xFromNF(m_xBuilder->weld_spin_button("from"))
 , m_xToFT(m_xBuilder->weld_label("toft"))
 , m_xToNF(m_xBuilder->weld_spin_button("to"))
@@ -552,11 +552,17 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
weld::Button&, void)
 std::shared_ptr xConfigItem = 
pView->GetMailMergeConfigItem();
 assert(xConfigItem);
 
-sal_uInt32 nBegin = static_cast(m_xFromNF->get_value() - 1);
-sal_uInt32 nEnd = static_cast(m_xToNF->get_value());
-sal_uInt32 nMax = static_cast(m_xToNF->get_max());
-if (nEnd > nMax)
-nEnd = nMax;
+const sal_uInt32 nDocumentCount = xConfigItem->GetMergedDocumentCount();
+sal_uInt32 nBegin = 0;
+sal_uInt32 nEnd = nDocumentCount;
+
+if (m_xFromRB->get_active())
+{
+nBegin = static_cast(m_xFromNF->get_value() - 1);
+nEnd = static_cast(m_xToNF->get_value());
+if (nEnd > nDocumentCount)
+nEnd = nDocumentCount;
+}
 
 xConfigItem->SetBeginEnd(nBegin, nEnd);
 
@@ -773,11 +779,17 @@ IMPL_LINK_NOARG(SwMMResultPrintDialog, PrintHdl_Impl, 
weld::Button&, void)
 std::shared_ptr xConfigItem = 
pView->GetMailMergeConfigItem();
 assert(xConfigItem);
 
-sal_uInt32 nBegin = static_cast(m_xFromNF->get_value() - 1);
-sal_uInt32 nEnd = static_cast(m_xToNF->get_value());
-sal_uInt32 nMax = static_cast(m_xToNF->get_max());
-if (nEnd > nMax)
-nEnd = nMax;
+const sal_uInt32 nDocumentCount = xConfigItem->GetMergedDocumentCount();
+sal_uInt32 nBegin = 0;
+sal_uInt32 nEnd = nDocumentCount;
+
+if (m_xFromRB->get_active())
+{
+nBegin = static_cast(m_xFromNF->get_value() - 1);
+nEnd = static_cast(m_xToNF->get_value());
+if (nEnd > nDocumentCount)
+nEnd = nDocumentCount;
+}
 
 xConfigItem->SetBeginEnd(nBegin, nEnd);
 
@@ -791,8 +803,8 @@ IMPL_LINK_NOARG(SwMMResu

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

2021-09-17 Thread Stephan Bergmann (via logerrit)
 connectivity/source/commontools/FValue.cxx |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit f2111a924ac7bf654e1bf30018007140deec9d78
Author: Stephan Bergmann 
AuthorDate: Fri Sep 17 07:45:52 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 17 09:20:44 2021 +0200

Use OUString::unacquired

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

diff --git a/connectivity/source/commontools/FValue.cxx 
b/connectivity/source/commontools/FValue.cxx
index 2f1cabbd4520..c4f8f9faeac1 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -1041,7 +1041,7 @@ bool ORowSetValue::getBool()const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 
-bRet = OUString(m_aValue.m_pString).toInt32() != 0;
+bRet = OUString::unacquired(&m_aValue.m_pString).toInt32() != 
0;
 break;
 case DataType::FLOAT:
 bRet = m_aValue.m_nFloat != 0.0;
@@ -1098,7 +1098,7 @@ sal_Int8 ORowSetValue::getInt8()const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 case DataType::LONGVARCHAR:
-nRet = sal_Int8(OUString(m_aValue.m_pString).toInt32());
+nRet = 
sal_Int8(OUString::unacquired(&m_aValue.m_pString).toInt32());
 break;
 case DataType::FLOAT:
 nRet = sal_Int8(m_aValue.m_nFloat);
@@ -1169,7 +1169,7 @@ sal_uInt8 ORowSetValue::getUInt8()const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 case DataType::LONGVARCHAR:
-nRet = sal_uInt8(OUString(m_aValue.m_pString).toInt32());
+nRet = 
sal_uInt8(OUString::unacquired(&m_aValue.m_pString).toInt32());
 break;
 case DataType::FLOAT:
 nRet = sal_uInt8(m_aValue.m_nFloat);
@@ -1244,7 +1244,7 @@ sal_Int16 ORowSetValue::getInt16()  const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 case DataType::LONGVARCHAR:
-nRet = sal_Int16(OUString(m_aValue.m_pString).toInt32());
+nRet = 
sal_Int16(OUString::unacquired(&m_aValue.m_pString).toInt32());
 break;
 case DataType::FLOAT:
 nRet = sal_Int16(m_aValue.m_nFloat);
@@ -1315,7 +1315,7 @@ sal_uInt16 ORowSetValue::getUInt16()  const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 case DataType::LONGVARCHAR:
-nRet = sal_uInt16(OUString(m_aValue.m_pString).toInt32());
+nRet = 
sal_uInt16(OUString::unacquired(&m_aValue.m_pString).toInt32());
 break;
 case DataType::FLOAT:
 nRet = sal_uInt16(m_aValue.m_nFloat);
@@ -1386,7 +1386,7 @@ sal_Int32 ORowSetValue::getInt32()  const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 case DataType::LONGVARCHAR:
-nRet = OUString(m_aValue.m_pString).toInt32();
+nRet = OUString::unacquired(&m_aValue.m_pString).toInt32();
 break;
 case DataType::FLOAT:
 nRet = sal_Int32(m_aValue.m_nFloat);
@@ -1459,7 +1459,7 @@ sal_uInt32 ORowSetValue::getUInt32()  const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 case DataType::LONGVARCHAR:
-nRet = OUString(m_aValue.m_pString).toUInt32();
+nRet = OUString::unacquired(&m_aValue.m_pString).toUInt32();
 break;
 case DataType::FLOAT:
 nRet = sal_uInt32(m_aValue.m_nFloat);
@@ -1532,7 +1532,7 @@ sal_Int64 ORowSetValue::getLong()   const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 case DataType::LONGVARCHAR:
-nRet = OUString(m_aValue.m_pString).toInt64();
+nRet = OUString::unacquired(&m_aValue.m_pString).toInt64();
 break;
 case DataType::FLOAT:
 nRet = sal_Int64(m_aValue.m_nFloat);
@@ -1605,7 +1605,7 @@ sal_uInt64 ORowSetValue::getULong()   const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 case DataType::LONGVARCHAR:
-nRet = OUString(m_aValue.m_pString).toUInt64();
+nRet = OUString::unacquired(&m_aValue.m_pString).toUInt64();
 break;
 case DataType::FLOAT:
 nRet = sal_uInt64(m_aValue.m_nFloat);
@@ -1678,7 +1678,7 @@ float ORowSetValue::getFloat()  const
 case DataType::DECIMAL:
 case DataType::NUMERIC:
 case DataType::LONGVARCHAR:
-nRet = OUString(m_aValue.m_pString).toFloat();
+