[Libreoffice-commits] core.git: configure.ac

2021-05-31 Thread Stephan Bergmann (via logerrit)
 configure.ac |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e6c25186c8584f68b5f8074004556bd855200fff
Author: Stephan Bergmann 
AuthorDate: Mon May 31 13:30:37 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jun 1 08:54:55 2021 +0200

Adapt to hamcrest-2.2-3.fc35.noarch.rpm

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

diff --git a/configure.ac b/configure.ac
index a6cf3a72b538..736c772eebee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13430,6 +13430,8 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" 
-a "$cross_compiling" != "
 HAMCREST_JAR=/usr/share/lib/java/hamcrest.jar
 elif test -e /usr/share/java/hamcrest/core.jar; then
 HAMCREST_JAR=/usr/share/java/hamcrest/core.jar
+elif test -e /usr/share/java/hamcrest/hamcrest.jar; then
+HAMCREST_JAR=/usr/share/java/hamcrest/hamcrest.jar
 else
 HAMCREST_JAR=/usr/share/java/hamcrest.jar
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Noel Grandin (via logerrit)
 sc/source/core/data/attarray.cxx |   26 --
 sc/source/core/data/column.cxx   |6 +++---
 sc/source/core/data/column2.cxx  |6 +++---
 sc/source/core/data/documen8.cxx |6 +++---
 sc/source/core/data/patattr.cxx  |8 
 sc/source/ui/view/viewfunc.cxx   |4 ++--
 6 files changed, 27 insertions(+), 29 deletions(-)

New commits:
commit d95e54676039a593b797455674863ccd9a902d52
Author: Noel Grandin 
AuthorDate: Mon May 31 11:20:42 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Jun 1 08:49:35 2021 +0200

no need to allocate these on the heap

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

diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index d7683b601435..41fb51471c43 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1529,12 +1529,11 @@ void ScAttrArray::RemoveAreaMerge(SCROW nStartRow, 
SCROW nEndRow)
 for (SCROW nThisRow = nThisStart; nThisRow <= nThisEnd; nThisRow++)
 rDocument.ApplyAttr( nThisCol, nThisRow, nTab, *pAttr );
 
-std::unique_ptr pNewPattern(new ScPatternAttr( 
rDocument.GetPool() ));
-SfxItemSet* pSet = &pNewPattern->GetItemSet();
+ScPatternAttr aNewPattern( rDocument.GetPool() );
+SfxItemSet* pSet = &aNewPattern.GetItemSet();
 pSet->Put( *pFlagAttr );
 rDocument.ApplyPatternAreaTab( nThisCol, nThisStart, nMergeEndCol, 
nMergeEndRow,
-nTab, *pNewPattern );
-pNewPattern.reset();
+nTab, aNewPattern );
 
 Search( nThisEnd, nIndex );// data changed
 }
@@ -1819,15 +1818,14 @@ void ScAttrArray::FindStyleSheet( const 
SfxStyleSheetBase* pStyleSheet, ScFlatBo
 
 if (bReset)
 {
-std::unique_ptr pNewPattern(new 
ScPatternAttr(*mvData[nPos].pPattern));
+ScPatternAttr aNewPattern(*mvData[nPos].pPattern);
 rDocument.GetPool()->Remove(*mvData[nPos].pPattern);
-pNewPattern->SetStyleSheet( static_cast(
+aNewPattern.SetStyleSheet( static_cast(
 rDocument.GetStyleSheetPool()->
 Find( ScResId(STR_STYLENAME_STANDARD),
   SfxStyleFamily::Para,
   SfxStyleSearchBits::Auto | 
SfxStyleSearchBits::ScStandard ) ) );
-mvData[nPos].pPattern = 
&rDocument.GetPool()->Put(*pNewPattern);
-pNewPattern.reset();
+mvData[nPos].pPattern = &rDocument.GetPool()->Put(aNewPattern);
 
 if (Concat(nPos))
 {
@@ -2427,20 +2425,20 @@ void ScAttrArray::CopyArea(
 }
 else if ( nStripFlags != ScMF::NONE )
 {
-std::unique_ptr pTmpPattern(new ScPatternAttr( 
*pOldPattern ));
+ScPatternAttr aTmpPattern( *pOldPattern );
 ScMF nNewFlags = ScMF::NONE;
 if ( nStripFlags != ScMF::All )
-nNewFlags = 
pTmpPattern->GetItem(ATTR_MERGE_FLAG).GetValue() & ~nStripFlags;
+nNewFlags = 
aTmpPattern.GetItem(ATTR_MERGE_FLAG).GetValue() & ~nStripFlags;
 
 if ( nNewFlags != ScMF::NONE )
-pTmpPattern->GetItemSet().Put( ScMergeFlagAttr( nNewFlags 
) );
+aTmpPattern.GetItemSet().Put( ScMergeFlagAttr( nNewFlags ) 
);
 else
-pTmpPattern->GetItemSet().ClearItem( ATTR_MERGE_FLAG );
+aTmpPattern.GetItemSet().ClearItem( ATTR_MERGE_FLAG );
 
 if (bSamePool)
-pNewPattern = &pDestDocPool->Put(*pTmpPattern);
+pNewPattern = &pDestDocPool->Put(aTmpPattern);
 else
-pNewPattern = pTmpPattern->PutInPool( 
&rAttrArray.rDocument, &rDocument );
+pNewPattern = aTmpPattern.PutInPool( 
&rAttrArray.rDocument, &rDocument );
 }
 else
 {
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index cf8231d4eca7..8cdbf7e9386c 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -720,9 +720,9 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& 
rAttr )
 ScDocumentPool* pDocPool = GetDoc().GetPool();
 
 const ScPatternAttr* pOldPattern = pAttrArray->GetPattern( nRow );
-std::unique_ptr pTemp(new ScPatternAttr(*pOldPattern));
-pTemp->GetItemSet().Put(rAttr);
-const ScPatternAttr* pNewPattern = &pDocPool->Put( *pTemp );
+ScPatternAttr aTemp(*pOldPattern);
+aTemp.GetItemSet().Put(rAttr);
+const ScPatternAttr* pNewPattern = &pDocPool->Put( aTe

[Libreoffice-commits] core.git: writerfilter/CppunitTest_writerfilter_rtftok.mk writerfilter/qa writerfilter/source

2021-05-31 Thread Miklos Vajna (via logerrit)
 writerfilter/CppunitTest_writerfilter_rtftok.mk  |1 
 writerfilter/qa/cppunittests/rtftok/data/invalid-hex.rtf |3 
 writerfilter/qa/cppunittests/rtftok/rtftokenizer.cxx |   63 +++
 writerfilter/source/rtftok/rtftokenizer.cxx  |   15 ++-
 4 files changed, 77 insertions(+), 5 deletions(-)

New commits:
commit 6fc8a6b0b52509d735971f079d7b1660559d475d
Author: Miklos Vajna 
AuthorDate: Mon May 31 21:12:12 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jun 1 08:46:10 2021 +0200

tdf#142325 RTF import: tolerate invalid hex markup like "\'3?"

The RTF spec says \'hh is the expected form, where both "h" are 0-9, a-f
or A-F. But Word accepts the bugdoc, so don't reject this input, handle
\' as \'0.

At least the current case ignores the actual value, as it's a single
character to provide a non-unicode value after \uN for old readers that
don't support Unicode.

Change-Id: Ib61247ab08278ca5012cc887cee26c7571c29fc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116499
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/writerfilter/CppunitTest_writerfilter_rtftok.mk 
b/writerfilter/CppunitTest_writerfilter_rtftok.mk
index db038292ebdd..07271b777ae0 100644
--- a/writerfilter/CppunitTest_writerfilter_rtftok.mk
+++ b/writerfilter/CppunitTest_writerfilter_rtftok.mk
@@ -18,6 +18,7 @@ $(eval $(call 
gb_CppunitTest_use_externals,writerfilter_rtftok,\
 $(eval $(call gb_CppunitTest_add_exception_objects,writerfilter_rtftok, \
 writerfilter/qa/cppunittests/rtftok/rtfsdrimport \
 writerfilter/qa/cppunittests/rtftok/rtfsprm \
+writerfilter/qa/cppunittests/rtftok/rtftokenizer \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,writerfilter_rtftok, \
diff --git a/writerfilter/qa/cppunittests/rtftok/data/invalid-hex.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/invalid-hex.rtf
new file mode 100644
index ..8f9224c0e905
--- /dev/null
+++ b/writerfilter/qa/cppunittests/rtftok/data/invalid-hex.rtf
@@ -0,0 +1,3 @@
+{\rtf1
+x\u345\'3?x
+\par}
diff --git a/writerfilter/qa/cppunittests/rtftok/rtftokenizer.cxx 
b/writerfilter/qa/cppunittests/rtftok/rtftokenizer.cxx
new file mode 100644
index ..530e9bb7245a
--- /dev/null
+++ b/writerfilter/qa/cppunittests/rtftok/rtftokenizer.cxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+
+using namespace ::com::sun::star;
+
+namespace
+{
+/// Tests for writerfilter/source/rtftok/rtftokenizer.cxx.
+class Test : public test::BootstrapFixture, public unotest::MacrosTest
+{
+private:
+uno::Reference mxComponent;
+
+public:
+void setUp() override;
+void tearDown() override;
+uno::Reference& getComponent() { return mxComponent; }
+};
+
+void Test::setUp()
+{
+test::BootstrapFixture::setUp();
+
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+}
+
+void Test::tearDown()
+{
+if (mxComponent.is())
+mxComponent->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+constexpr OUStringLiteral DATA_DIRECTORY = 
u"/writerfilter/qa/cppunittests/rtftok/data/";
+
+CPPUNIT_TEST_FIXTURE(Test, testInvalidHex)
+{
+// Given a document with a markup like "\'3?":
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"invalid-hex.rtf";
+
+// When load that document:
+getComponent() = loadFromDesktop(aURL);
+
+// Then make sure the result matches Word, rather than just refusing to 
import the document:
+uno::Reference xTextDocument(getComponent(), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8("xřx"), 
xTextDocument->getText()->getString());
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx 
b/writerfilter/source/rtftok/rtftokenizer.cxx
index a04f57a632e6..d702b8dbd9c9 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -144,11 +144,16 @@ RTFError RTFTokenizer::resolveParse()
 else
 {
 SAL_INFO("writerfilter.rtf", __func__ << ": hex 
internal state");
-b = b << 4;
-sal_Int8 parsed = msfilter::rtfutil::AsHex(ch);
-if (parsed == -1)
-return RTFError::HEX_INVALID;
-b += parsed;
+// Assume that \' means \'0.
+if (rtl::isAsciiDigit(static_cast(ch))
+|| (ch >= 'a' && ch <= 'f') || (ch >= 'A' && ch <= 
'F'))
+   

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

2021-05-31 Thread Justin Luth (via logerrit)
 sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt |binary
 sw/qa/extras/ww8export/ww8export3.cxx  |6 ++
 sw/source/filter/ww8/wrtw8num.cxx  |   11 +++
 sw/source/filter/ww8/wrtww8.hxx|1 +
 sw/source/filter/ww8/ww8atr.cxx|7 +++
 5 files changed, 25 insertions(+)

New commits:
commit 2691f74e454870c549ec395f9d19cb88538d1c50
Author: Justin Luth 
AuthorDate: Fri May 28 16:03:52 2021 +0200
Commit: Andras Timar 
CommitDate: Tue Jun 1 08:19:58 2021 +0200

tdf#138302 partial revert tdf#108496: DOCX: redesign of override in lists

LO 6.4.5 commit cf13fe3e6f6a40f6db064d65d4514d13a23a31f0
was only concerned about DOCX, but just elinated shared code.
So restore the shared code and just don't execute it for DOCX.

It doesn't look like RTF was working before this,
but this does fix DOC format.
I looked for existing unit tests in rtf and doc,
but none were found that hit this code.

Change-Id: Id624f73181384f38e1ef9f27575e0fb82eea19c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116349
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116452
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt 
b/sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt
new file mode 100644
index ..8c99963616a7
Binary files /dev/null and 
b/sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index df108531118d..837de2500422 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -157,6 +157,12 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, 
testChicagoNumberingFootnote)
 CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
 }
 
+DECLARE_WW8EXPORT_TEST(tesTdf138302_restartNumbering, 
"tdf138302_restartNumbering.odt")
+{
+uno::Reference xPara(getParagraph(8), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty(xPara, 
"ListLabelString"));
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc")
 {
 uno::Reference pageStyles = 
getStyles("PageStyles");
diff --git a/sw/source/filter/ww8/wrtw8num.cxx 
b/sw/source/filter/ww8/wrtw8num.cxx
index e8f26c3292b3..7454acd83dee 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -61,6 +61,17 @@ SwNumRule* MSWordExportBase::DuplicateNumRuleImpl(const 
SwNumRule *pRule)
 return pMyNumRule;
 }
 
+sal_uInt16 MSWordExportBase::DuplicateNumRule(const SwNumRule* pRule, 
sal_uInt8 nLevel, sal_uInt16 nVal)
+{
+SwNumRule* const pMyNumRule = DuplicateNumRuleImpl(pRule);
+
+SwNumFormat aNumFormat(pMyNumRule->Get(nLevel));
+aNumFormat.SetStart(nVal);
+pMyNumRule->Set(nLevel, aNumFormat);
+
+return GetNumberingId(*pMyNumRule);
+}
+
 // multiple SwList can be based on the same SwNumRule; ensure one w:abstractNum
 // per SwList
 sal_uInt16 MSWordExportBase::DuplicateAbsNum(OUString const& rListId,
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 851e50a4b55b..8a9ae600ac77 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -657,6 +657,7 @@ public:
 /// List is set to restart at a particular value so for export make a
 /// completely new list based on this one and export that instead,
 /// which duplicates words behaviour in this respect.
+sal_uInt16 DuplicateNumRule(const SwNumRule* pRule, sal_uInt8 nLevel, 
sal_uInt16 nVal);
 SwNumRule * DuplicateNumRuleImpl(const SwNumRule *pRule);
 
 /// check if a new abstractNum is needed for this list
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index eb5d42253024..3af874cb41fa 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3671,6 +3671,13 @@ void AttributeOutputBase::ParaNumRule( const 
SwNumRuleItem& rNumRule )
 }
 }
 }
+else if (pTextNd->IsListRestart())
+{
+sal_uInt16 nStartWith = 
static_cast(pTextNd->GetActualListStartValue());
+nNumId = GetExport().DuplicateNumRule(pRule, nLvl, nStartWith);
+if (USHRT_MAX != nNumId)
+++nNumId;
+}
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Andrea Gelmini (via logerrit)
 sc/qa/unit/ucalc_copypaste.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f535acdab1ae90ea326393c0ff419ee6ece6f627
Author: Andrea Gelmini 
AuthorDate: Tue Jun 1 00:03:03 2021 +0200
Commit: Julien Nabet 
CommitDate: Tue Jun 1 07:55:35 2021 +0200

Fix typo

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

diff --git a/sc/qa/unit/ucalc_copypaste.cxx b/sc/qa/unit/ucalc_copypaste.cxx
index 9dc3fe8ba3c0..18f1bb07c970 100644
--- a/sc/qa/unit/ucalc_copypaste.cxx
+++ b/sc/qa/unit/ucalc_copypaste.cxx
@@ -10036,7 +10036,7 @@ void TestCopyPaste::testCutTransposedFormulasSquare()
 m_pDoc->UpdateTranspose(aDestRange.aStart, pOrigClipDoc, aDestMark, 
nullptr);
 pTransClip.reset();
 
-printRange(m_pDoc, aDestRange, "Forumlas after cut transposed");
+printRange(m_pDoc, aDestRange, "Formulas after cut transposed");
 printFormula(m_pDoc, 2, 6, nTab);
 
 // Check results
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/commandpopup/CommandPopup.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2752a0a7e72b1d7e5f8bf22a3b4f17c69fdd7a48
Author: Tomaž Vajngerl 
AuthorDate: Mon May 31 17:11:06 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jun 1 05:32:51 2021 +0200

tdf#142243 actually call toLower not tuUpper when calling toLower

But it doesn't have an effect as both uppercase or lowercase work
as long as it is used consistently.

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

diff --git a/sfx2/source/commandpopup/CommandPopup.cxx 
b/sfx2/source/commandpopup/CommandPopup.cxx
index a903a0b12628..5500f8913673 100644
--- a/sfx2/source/commandpopup/CommandPopup.cxx
+++ b/sfx2/source/commandpopup/CommandPopup.cxx
@@ -155,7 +155,7 @@ OUString MenuContentHandler::toLower(OUString const& 
rString)
 {
 const css::lang::Locale& rLocale = 
Application::GetSettings().GetUILanguageTag().getLocale();
 
-return m_xCharacterClassification->toUpper(rString, 0, 
rString.getLength(), rLocale);
+return m_xCharacterClassification->toLower(rString, 0, 
rString.getLength(), rLocale);
 }
 
 CommandListBox::CommandListBox(weld::Window* pParent, 
uno::Reference const& xFrame)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Vector screenshots for the manuals: better quality and more visually attractive

2021-05-31 Thread Hossein Noorikhah
Hello,

You may already know that with Gtk 3, it is possible to take vector
screenshots
from a GUI. The utility created by Joachim Breitner (nomeata) takes care of
the
job:
https://github.com/nomeata/gtk-vector-screenshot

But, this does not work out of the box. I have tried to take vector
screenshots
from LibreOffice gtk3 gui, and it led to an immediate crash. I have
debugged the
soffice binary, and I came across several assertions that are checked and
some
aborts in case of specific threading situations. I have temporarily disabled
these assertions and aborts, and by further disabling the autosave,
everything
was fine, and I could take vector screenshots. The tiny patch is attached.

I have created a proof of concept document from "LibreOffice Writer Guide",
section titled “20. Customizing Writer”, and created vector screenshots in
SVG
format for almost all of the previously raster screenshots. The quality of
the
PDF output is much better, the file is more visually attractive and it is
better
for print and display.

Vector ODT:
https://wiki.documentfoundation.org/images/7/79/WG7120-CustomizingWriter-vector.odt

Vector PDF:
https://wiki.documentfoundation.org/images/4/4b/WG7120-CustomizingWriter-vector.pdf

There are few remaining things:

1. Vector screenshot does not add window decorations, so some workaround is
needed. For example, some toplevel Gtk widgets contain decorations in the
screenshots, so these can be used for containing the window contents.

2. Trying to take screenshots closes menus, etc, and this can be handled by
creating a delay in taking screenshots.

3. Not everything is vector. For example, document contents in LibreOffice
and
also toolbar and status bar icons are not vectors. This is because of the
way
text and images are rendered in LibreOffice. If you take screenshots from
other
applications, the output is different. Try Glade and Gedit for the
comparison.

On the development side, I doubt that having these aborts will be useful at
runtime. There are hundreds of aborts and thousands of asserts in the code
in which I
think should be revised. Crashing the application in case of some problem is
usually a bad idea.

Assertions in C++, and Why Not to Use assert()
https://web.archive.org/web/20191110223903/https://www.softwariness.com/articles/assertions-in-cpp/

Regards,
Hossein
diff --git a/comphelper/source/misc/solarmutex.cxx b/comphelper/source/misc/solarmutex.cxx
index 5d1052327154..8a35daa5c4bf 100644
--- a/comphelper/source/misc/solarmutex.cxx
+++ b/comphelper/source/misc/solarmutex.cxx
@@ -60,10 +60,10 @@ void SolarMutex::doAcquire( const sal_uInt32 nLockCount )
 
 sal_uInt32 SolarMutex::doRelease( bool bUnlockAll )
 {
-if ( !IsCurrentThread() )
-std::abort();
-if ( m_nCount == 0 )
-std::abort();
+//if ( !IsCurrentThread() )
+//std::abort();
+//if ( m_nCount == 0 )
+//std::abort();
 
 const sal_uInt32 nCount = bUnlockAll ? m_nCount : 1;
 m_nCount -= nCount;
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 495d22cee201..1ff139785808 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1467,7 +1467,7 @@ void AutoRecovery::implts_dispatch(const DispatchParams& aParams)
 }
 catch(const css::uno::RuntimeException&)
 {
-throw;
+//throw;
 }
 catch(const css::uno::Exception&)
 {
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index a60f33790505..6cb7f4abec62 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -342,8 +342,9 @@ void GtkYieldMutex::ThreadsEnter()
 if (!yieldCounts.empty()) {
 auto n = yieldCounts.top();
 yieldCounts.pop();
-assert(n > 0);
-n--;
+//assert(n > 0);
+if(n>0)
+n--;
 if (n > 0)
 acquire(n);
 }
@@ -351,7 +352,7 @@ void GtkYieldMutex::ThreadsEnter()
 
 void GtkYieldMutex::ThreadsLeave()
 {
-assert(m_nCount != 0);
+//assert(m_nCount != 0);
 yieldCounts.push(m_nCount);
 release(true);
 }
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: dictionaries

2021-05-31 Thread Stanislav Horacek (via logerrit)
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3b57ebb445df8a2bc3d916ea79f8af45e20e4e62
Author: Stanislav Horacek 
AuthorDate: Mon May 31 22:29:47 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Mon May 31 22:29:47 2021 +0200

Update git submodules

* Update dictionaries from branch 'master'
  to 19a842695c9bca652718e6ea3808a8f995164ef4
  - Czech Hunspell: sort words in .dic file

Change-Id: I1e3fef34b64bd358d16880795acab6d9b71ad7dc
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/116276
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/dictionaries b/dictionaries
index 48a66dd55f3e..19a842695c9b 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 48a66dd55f3e76556f73779ab121feefcd07d3fe
+Subproject commit 19a842695c9bca652718e6ea3808a8f995164ef4
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: cs_CZ/cs_CZ.dic

2021-05-31 Thread Stanislav Horacek (via logerrit)
 cs_CZ/cs_CZ.dic |584710 

 1 file changed, 292355 insertions(+), 292355 deletions(-)

New commits:
commit 19a842695c9bca652718e6ea3808a8f995164ef4
Author: Stanislav Horacek 
AuthorDate: Sun May 16 15:12:05 2021 +0200
Commit: Stanislav Horáček 
CommitDate: Mon May 31 22:29:47 2021 +0200

Czech Hunspell: sort words in .dic file

Change-Id: I1e3fef34b64bd358d16880795acab6d9b71ad7dc
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/116276
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/cs_CZ/cs_CZ.dic b/cs_CZ/cs_CZ.dic
index c0b9693..14976c6 100644
--- a/cs_CZ/cs_CZ.dic
+++ b/cs_CZ/cs_CZ.dic
@@ -1,41 +1,7 @@
 302541
+a
 AACR
-ABC
-ABS
-AC
-ACPI
-AD
-ADSL
-AFL
-AFP
-AGP
-AGS
-AI
-AIDS
-AIT
-AMU
-ANSA
-ANSI
-AP
-APN
-ARES
-ARO
-ARP
-ASCII
-ASIC
-ASP
-ASPI
-ASŘ
-AT
-ATA
-ATAPI
-ATS
-AU
-AUD
-AV
-AVC
-AVU
-AZ
+áách
 Aachen
 Aakjaer/PV
 Aakjaerová/Y
@@ -50,9 +16,16 @@ Aarestrupův/Y
 Aasen/PV
 Aasenová/Y
 Aasenův/Y
+abakový/YRN
+abakus/H
+abakusový/YKRN
+abandonování/SN
+abandonovaný/YKRN
+abandonovat/ATN
 Abarca/PV
 Abarcová/Y
 Abarcův/Y
+abasie/Z
 Abasiyanik/PV
 Abasiyaniková/Y
 Abasiyanikův/Y
@@ -62,45 +35,73 @@ Abašeliův/Y
 Abašidze/PV
 Abašidzová/Y
 Abašidzův/Y
+abatyše/Z
+abatyšin/Y
+abaxiální/YKRN
+abázie/Z
+abazština/ZQ
+abba
 Abbagnano/PV
 Abbagnanová/Y
 Abbagnanův/Y
 Abbas/UV
+Abbás/UV
 Abbasová/Y
+Abbásová/Y
 Abbasův/Y
+Abbásův/Y
+abbé
+abbéech
+abbého
 Abbeloos/UV
 Abbeloosová/Y
 Abbeloosův/Y
+abbém
+abbému
+abbéové
+abbéů
+abbéům
+abbéův/Y
+abbéy
 Abbott/PV
 Abbottová/Y
 Abbottův/Y
 Abbrent/PV
 Abbrentová/Y
 Abbrentův/Y
-Abbás/UV
-Abbásová/Y
-Abbásův/Y
 Abbúd/PV
 Abbúdová/Y
 Abbúdův/Y
-Abcházcův/Y
-Abcházec/UV
-Abcházie/Z
-Abcházka/ZQ
-Abcházčin/Y
-Abdul/PV
-Abdulová/Y
-Abdulův/Y
+ABC
 Abdér/PV
 Abdérová/Y
 Abdérův/Y
+abdikace/Z
+abdikační/YRN
+abdikování/SN
+abdikovaný/YKRN
+abdikovat/ATN
+abdikující/YN
+abdominální/YKRN
+abdukce/Z
+abdukční/YR
+abduktor/H
+Abdul/PV
+Abdulová/Y
+Abdulův/Y
 Abe/PV
 Abeba
+abeceda/ZQ
+abecední/YKRN
 Abeggův/Y
 Abel/PV
+Ábel/PV
 Abelaira/PV
 Abelairová/Y
 Abelairův/Y
+Abélard/PV
+Abélardová/Y
+Abélardův/Y
 Abeles/UV
 Abelesová/Y
 Abelesův/Y
@@ -111,21 +112,29 @@ Abelliův/Y
 Abellová/Y
 Abellův/Y
 Abelová/Y
+Ábelová/Y
+abelovský/YKRN
+Abelův/Y
+Ábelův/Y
 Abely/PV
 Abelyová/Y
 Abelyův/Y
-Abelův/Y
 Abendroth/PV
 Abendrothová/Y
 Abendrothův/Y
+aberace/Z
+aberační/YRN
+aberantní/YKRN
 Abercrombie/PV
 Abercrombiová/Y
 Abercrombiův/Y
 Aberdeen/H
+aberdeenský/Y
 Aberle/PV
 Aberlová/Y
 Aberlův/Y
 Abert/PV
+abertamský/YR
 Abertamy/DHQ
 Abertová/Y
 Abertův/Y
@@ -135,62 +144,138 @@ Abeskův/Y
 Abgarowicz/PV
 Abgarowiczová/Y
 Abgarowiczův/Y
+abgébovat/ATN
+abhomotopický/YR
+abhomotopie/Z
+Abcházcův/Y
+Abcházčin/Y
+Abcházec/UV
+Abcházie/Z
+Abcházka/ZQ
+abchazský/YRN
+abchazština/ZQ
+abcházština/ZQ
+ábíčko/MQ
 Abidjan/H
+abidjanský/Y
 Abidžan/H
+abidžanský/Y
+Abík/PV
+Abíková/Y
+Abíkův/Y
+abionóza/ZQ
+abiotický/YCR
+abiturient/PI
+abiturientčin/Y
+abiturientka/ZQ
+abiturientní/Y
+abiturientský/Y
+abiturientův/Y
+abjudikace/Z
+abjurace/Z
+ablace/Z
+ablační/YRN
+ablaktace/Z
+ablativ/H
+ablativní/YKRN
+ablegace/Z
+abnormalita/ZQ
+abnormálnější/YRW
+abnormální/YKRN
+abnormita/ZQ
+abnormní/YR
+abolice/Z
+abolicionismus/Q
+abolicionista/PD
+abolicionistčin/Y
+abolicionistický/YR
+abolicionistka/ZQ
+abolicionistův/Y
+abolicismus/Q
+aboliční/YRN
+abonent/PI
+abonentčin/Y
+abonentka/ZQ
+abonentní/YR
+abonentský/YRN
+abonentův/Y
+abonmá
+abonomá
+abonovaný/YRN
+abonovat/ATN
+aborální/YKR
+abortace/Z
+abortivita/ZQ
+abortivní/YKRN
+abortivum/MQ
+abortus/Q
 About/PV
 Aboutová/Y
 Aboutův/Y
+Abová/Y
 Abovjan/PV
 Abovjanová/Y
 Abovjanův/Y
-Abová/Y
 Abraham/PV
+Abrahám/PV
+Abrahamčík/PV
+Abrahamčíková/Y
+Abrahamčíkův/Y
+Abrahámek/PV
 Abrahamffy/PV
 Abrahamffyová/Y
 Abrahamffyův/Y
+Abrahámková/Y
+Abrahámkův/Y
 Abrahamová/Y
+Abrahámová/Y
+abrahámoviny/ZQ
 Abrahams/UV
 Abrahamsová/Y
 Abrahamsův/Y
-Abrahamčík/PV
-Abrahamčíková/Y
-Abrahamčíkův/Y
 Abrahamův/Y
-Abrahám/PV
-Abrahámek/PV
-Abrahámková/Y
-Abrahámkův/Y
-Abrahámová/Y
 Abrahámův/Y
 Abram/PV
 Abramcov/PV
-Abramcovová/Y
 Abramcová/Y
+Abramcovová/Y
 Abramcovův/Y
 Abramcův/Y
 Abramec/UV
 Abramov/PV
-Abramovová/Y
 Abramová/Y
+Abramovová/Y
 Abramovův/Y
 Abramowski/PV
 Abramowskiová/Y
 Abramowskiův/Y
 Abramův/Y
+abrasivní/YRN
+abrasní/YKRN
 Abravanel/PV
 Abravanelová/Y
 Abravanelův/Y
-Abreu/PV
-Abreuová/Y
-Abreuův/Y
+abraze/Z
+abrazívní/YKRN
+abrazivní/YRN
+abrazivo/MQ
+abrazivum/MQ
+abrazní/YR
+abreakce/Z
+abreografie/Z
+abresivní/YKRN
 Abrešek/PV
 Abrešková/Y
 Abreškův/Y
+Abreu/PV
+Abreuová/Y
+Abreuův/Y
+abreviace/Z
 Abrham/PV
-Abrhamová/Y
-Abrhamův/Y
 Abrhám/PV
+Abrhamová/Y
 Abrhámová/Y
+Abrhamův/Y
 Abrhámův/Y
 Abrla/PV
 Abrle/PV
@@ -199,88 +284,215 @@ Abrlův/Y
 Abrman/PV
 Abrmanová/Y
 Abrmanův/Y
+abrogace/Z
 Abrt/PV
 Abrtová/Y
 Abrtův/Y
+abruptní/YRN
+abruzský/Y
 Abruzzi
 Abruzzy/ZQ
+ABS
 Absalom/PV
 Absalomová/Y
 Absalomův/Y
 

[Libreoffice-commits] core.git: dictionaries

2021-05-31 Thread Stanislav Horacek (via logerrit)
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2fc300a8b7b36421b6260a419215690500dfb205
Author: Stanislav Horacek 
AuthorDate: Mon May 31 22:23:39 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Mon May 31 22:23:39 2021 +0200

Update git submodules

* Update dictionaries from branch 'master'
  to 48a66dd55f3e76556f73779ab121feefcd07d3fe
  - Czech Hunspell: use UTF8 encoding

Change-Id: I97e274fe4611cf1a2669e6c73950faed8f1f5bfd
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/116275
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/dictionaries b/dictionaries
index e7a4c67cdc49..48a66dd55f3e 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit e7a4c67cdc491548388b43175741ee6e933fdde3
+Subproject commit 48a66dd55f3e76556f73779ab121feefcd07d3fe
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: cs_CZ/cs_CZ.aff cs_CZ/cs_CZ.dic

2021-05-31 Thread Stanislav Horacek (via logerrit)
 cs_CZ/cs_CZ.aff | 3924 
 cs_CZ/cs_CZ.dic |485458 

 2 files changed, 244691 insertions(+), 244691 deletions(-)

New commits:
commit 48a66dd55f3e76556f73779ab121feefcd07d3fe
Author: Stanislav Horacek 
AuthorDate: Sun May 16 15:09:16 2021 +0200
Commit: Stanislav Horáček 
CommitDate: Mon May 31 22:23:39 2021 +0200

Czech Hunspell: use UTF8 encoding

Change-Id: I97e274fe4611cf1a2669e6c73950faed8f1f5bfd
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/116275
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/cs_CZ/cs_CZ.aff b/cs_CZ/cs_CZ.aff
index 268e267..253da07 100644
--- a/cs_CZ/cs_CZ.aff
+++ b/cs_CZ/cs_CZ.aff
@@ -1,5 +1,5 @@
-SET ISO8859-2
-TRY 
a�e��i�o�u��y�bc�d�lmn�fjkpr�s�t�vghqwxz�A�E��I�O�U��Y�BC�D�LMN�FJKPR�S�T�VGHQWXZ�
+SET UTF-8
+TRY 
aáeéěiíoóuúůyýbcčdďlmnňfjkprřsštťvghqwxzžAÁEÉĚIÍOÓUÚŮYÝBCČDĎLMNŇFJKPRŘSŠTŤVGHQWXZŽ
 
 PFX N Y 1
 PFX N   0   ne .
@@ -15,239 +15,239 @@ PFX W   0   nejne  .
 PFX F Y 10
 PFX F   0   jedna  .
 PFX F   0   dvaa   .
-PFX F   0   t�ia   .
-PFX F   0   �ty�ia .
-PFX F   0   �tyrya .
-PFX F   0   p�ta   .
-PFX F   0   �esta  .
+PFX F   0   třia   .
+PFX F   0   čtyřia .
+PFX F   0   čtyrya .
+PFX F   0   pěta   .
+PFX F   0   šesta  .
 PFX F   0   sedma  .
 PFX F   0   osma   .
-PFX F   0   dev�ta .
+PFX F   0   devěta .
 
 SFX P Y 124
 SFX P   0   a  [^aeokl]
 SFX P   0   u  [^aeoklu]
 SFX P   0   ovi[^aeokl]
 SFX P   0   e  [^aeoklurcgh]
-SFX P   0   e  [aeiouy]r
-SFX P   r   �e [^aeiouy]r
+SFX P   0   e  [aeiouyáéíóúůýě]r
+SFX P   r   ře [^aeiouyáéíóúůýě]r
 SFX P   0   em [^aeokl]
-SFX P   0   �  [^aeokl]
-SFX P   0   �m [^aeokl]
+SFX P   0   ů  [^aeokl]
+SFX P   0   ům [^aeokl]
 SFX P   0   y  [^aeokl]
 SFX P   0   ech[^aeoklghu]
-SFX P   g   z�ch   g
-SFX P   h   z�ch   [^c]h
-SFX P   ch  ��ch   ch
-SFX P   0   �chu
-SFX P   0   a  [^e�]k
-SFX P   0   u  [^e�]k
-SFX P   0   ovi[^e�]k
-SFX P   0   em [^e�]k
-SFX P   0   �  [^e�]k
-SFX P   0   �m [^e�]k
-SFX P   k   c�ch   [^e�]k
-SFX P   0   y  [^e�]k
+SFX P   g   zích   g
+SFX P   h   zích   [^c]h
+SFX P   ch  ších   ch
+SFX P   0   íchu
+SFX P   0   a  [^eě]k
+SFX P   0   u  [^eě]k
+SFX P   0   ovi[^eě]k
+SFX P   0   em [^eě]k
+SFX P   0   ů  [^eě]k
+SFX P   0   ům [^eě]k
+SFX P   k   cích   [^eě]k
+SFX P   0   y  [^eě]k
 SFX P   ek  ka ek
 SFX P   ek  ku ek
 SFX P   ek  kovi   ek
 SFX P   ek  kemek
-SFX P   ek  k� ek
-SFX P   ek  k�mek
-SFX P   ek  c�ch   ek
+SFX P   ek  ků ek
+SFX P   ek  kůmek
+SFX P   ek  cích   ek
 SFX P   ek  ky ek
-SFX P   0   a  [^dtn]�k
-SFX P   0   u  [^dtn]�k
-SFX P   0   ovi[^dtn]�k
-SFX P   0   em [^dtn]�k
-SFX P   0   k� [^dtn]�k
-SFX P   0   k�m[^dtn]�k
-SFX P   0   c�ch   [^dtn]�k
-SFX P   0   ky [^dtn]�k
-SFX P   d�k �kad�k
-SFX P   d�k �kud�k
-SFX P   d�k �kovi  d�k
-SFX P   d�k �kem   d�k
-SFX P   d�k �k�d�k
-SFX P   d�k �k�m   d�k
-SFX P   d�k �c�ch  d�k
-SFX P   d�k �kyd�k
-SFX P   n�k �kan�k
-SFX P   n�k �kun�k
-SFX P   n�k �kovi  n�k
-SFX P   n�k �kem   n�k
-SFX P   n�k �k�n�k
-SFX P   n�k �k�m   n�k
-SFX P   n�k �c�ch  n�k
-SFX P   n�k �kyn�k
-SFX P   t�k �kat�k
-SFX P   t�k �kut�k
-SFX P   t�k �kovi  t�k
-SFX P   t�k �kem   t�k
-SFX P   t�k �k�t�k
-SFX P   t�k �k�m   t�k
-SFX P   t�k �c�ch  t�k
-SFX P   t�k �kyt�k
-SFX P   0   a  [bdt��iou]el
-SFX P   0   u  [bdt��iou]el
-SFX P   0   ovi[bdt��iou]el
-SFX P   0   e  [bdt��iou]el
-SFX P   0   em [bdt��

[Libreoffice-commits] core.git: dictionaries

2021-05-31 Thread Stanislav Horacek (via logerrit)
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7d4b63047cd7ca5927789471e31f86d939944d68
Author: Stanislav Horacek 
AuthorDate: Mon May 31 22:21:53 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Mon May 31 22:21:53 2021 +0200

Update git submodules

* Update dictionaries from branch 'master'
  to e7a4c67cdc491548388b43175741ee6e933fdde3
  - restore more advanced Czech Hunspell dictionary

which used to be in LibreOffice till commit
b31244205066114f5721beef118be7f9e518cd22

Change-Id: Idd856ff4caedb1d8e7b4f0c42231014bd956da7f
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/116274
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/dictionaries b/dictionaries
index 4fa94195b813..e7a4c67cdc49 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 4fa94195b8136364dd40bf2b0366a0fe32058899
+Subproject commit e7a4c67cdc491548388b43175741ee6e933fdde3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: cs_CZ/cs_CZ.aff cs_CZ/cs_CZ.dic

2021-05-31 Thread Stanislav Horacek (via logerrit)
 cs_CZ/cs_CZ.aff |  131 
 cs_CZ/cs_CZ.dic |436285 

 2 files changed, 286196 insertions(+), 150220 deletions(-)

New commits:
commit e7a4c67cdc491548388b43175741ee6e933fdde3
Author: Stanislav Horacek 
AuthorDate: Sun May 16 14:58:00 2021 +0200
Commit: Stanislav Horáček 
CommitDate: Mon May 31 22:21:53 2021 +0200

restore more advanced Czech Hunspell dictionary

which used to be in LibreOffice till commit
b31244205066114f5721beef118be7f9e518cd22

Change-Id: Idd856ff4caedb1d8e7b4f0c42231014bd956da7f
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/116274
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/cs_CZ/cs_CZ.aff b/cs_CZ/cs_CZ.aff
index ece9194..268e267 100644
--- a/cs_CZ/cs_CZ.aff
+++ b/cs_CZ/cs_CZ.aff
@@ -1,5 +1,5 @@
 SET ISO8859-2
-TRY a�e��i�o�u��y�bc�d�lmn�fjkpr�s�t�vghqwx
+TRY 
a�e��i�o�u��y�bc�d�lmn�fjkpr�s�t�vghqwxz�A�E��I�O�U��Y�BC�D�LMN�FJKPR�S�T�VGHQWXZ�
 
 PFX N Y 1
 PFX N   0   ne .
@@ -136,7 +136,7 @@ SFX P   a   o  a
 SFX P   a   ou a
 SFX P   a   �  a
 SFX P   a   �m a
-SFX P   a   ech[^k��]a
+SFX P   a   ech[^k��h]a
 SFX P   ka  c�ch   ka
 SFX P   �a  d�ch   �a
 SFX P   �a  n�ch   �a
@@ -249,7 +249,7 @@ SFX U   e   
 SFX U   e   �m e
 SFX U   e   �che
 
-SFX D Y 55
+SFX D Y 68
 SFX D   es  a  es
 SFX D   es  u  es
 SFX D   es  ovies
@@ -263,6 +263,19 @@ SFX D   es  y  [^i]es
 SFX D   es  �chies
 SFX D   es  �chkes
 SFX D   es  i  ies
+SFX D   �s  a  �s
+SFX D   �s  u  �s
+SFX D   �s  ovi�s
+SFX D   �s  e  [^ghk]�s
+SFX D   �s  em �s
+SFX D   �s  ov��s
+SFX D   �s  �  �s
+SFX D   �s  �m �s
+SFX D   �s  ech[^ighk]�s
+SFX D   �s  y  [^i]�s
+SFX D   �s  �chi�s
+SFX D   �s  �chk�s
+SFX D   �s  i  i�s
 SFX D   os  a  os
 SFX D   os  u  os
 SFX D   os  ovios
@@ -292,19 +305,19 @@ SFX D   us  i  [ei]us
 SFX D   0   �  [^eou]s
 SFX D   0   �  [^asy]
 SFX D   a   �  a
+SFX D   ky  ek [aeiouy][lr]ky
+SFX D   y   0  [^aeiouy][lr]ky
 SFX D   ky  ek [�dntv]ky
-SFX D   y   �  [^�dntv]ky
-SFX D   ny  n  any
-SFX D   y   �  [^kn]y
-SFX D   y   �m [�dntv]ky
-SFX D   y   �m [^�dntv]ky
-SFX D   y   �m [^k]y
+SFX D   y   0  [^�dntvrl]ky
+SFX D   ly  el [dkpz]ly
+SFX D   y   0  [^dkpz]ly
+SFX D   y   0  [^kl]y
+SFX D   y   �m y
 SFX D   y   �ch[gh]y
-SFX D   y   �ch[�dntv]ky
-SFX D   ky  c�ch   [^�dntv]ky
-SFX D   y   ech[^ghk]y
+SFX D   y   �chky
+SFX D   y   �chry
+SFX D   y   ech[^ghkr]y
 SFX D   y   �ch[sz]y
-SFX D   y   ami[�dntv]ky
 
 SFX H Y 24
 SFX H   0   u  [^ey]
@@ -389,14 +402,15 @@ SFX L   0   
 SFX L   0   �m [^e]n
 SFX L   0   ech[^e]n
 
-SFX S Y 60
-SFX S   0   e  [^e��c�n]
-SFX S   0   i  [^e��c�n]
-SFX S   0   em [^e��c�n]
-SFX S   0   �  [^e��c�n]
-SFX S   0   �m [^e��c�n]
+SFX S Y 45
+SFX S   0   e  [^e��c�]
+SFX S   0   i  [^e��c�]
+SFX S   0   em [^e��c�]
+SFX S   0   �  [^e��c�]
+SFX S   0   �m [^e��c�]
 SFX S   0   �ch[^e��c�nlsz]
-SFX S   0   ech[sz]
+SFX S   0   y  n
+SFX S   0   ech[nsz]
 SFX S   0   ech�l
 SFX S   0   �ch[^�]l
 SFX S   ec  ce ec
@@ -427,22 +441,6 @@ SFX S   0   
 SFX S   0   �m [^e]�
 SFX S   �   n�m[^e]�
 SFX S   �   n�ch   [^e]�
-SFX S   en  ne [^mn]en
-SFX S   en  nu [^mn]en
-SFX S   en  ni [^mn]en
-SFX S   en  nem[^mn]en
-SFX S   en  ny [^mn]en
-SFX S   en  n� [^mn]en
-SFX S   en  n�m[^mn]en
-SFX S   en  nech   [^mn]en
-SFX S   0   e  [mn]en
-SFX S   0   u  [mn]en
-SFX S   0   i  [mn]en
-SFX S   0 

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

2021-05-31 Thread Noel Grandin (via logerrit)
 sd/source/filter/eppt/grouptable.hxx  |7 +++
 sd/source/filter/eppt/pptx-grouptable.cxx |   12 ++--
 sw/source/ui/fldui/fldtdlg.cxx|6 +++---
 sw/source/uibase/inc/fldtdlg.hxx  |3 ++-
 4 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 1abd712e337909fe6c10930b16998eed0f50ae17
Author: Noel Grandin 
AuthorDate: Mon May 31 15:48:33 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 21:36:58 2021 +0200

fix leak in SwFieldDlg

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

diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index de2c1adc3935..70d69203af14 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -126,7 +126,7 @@ SfxItemSet* SwFieldDlg::CreateInputItemSet(const OString& 
rID)
 SwDocShell *const 
pDocSh(static_cast(SfxObjectShell::Current()));
 if (rID == "docinfo" && pDocSh) // might not have a shell if the dialog is 
restored on startup
 {
-SfxItemSet* pISet = new SfxItemSet( pDocSh->GetPool(), 
svl::Items{} );
+mxInputItemSet = std::make_unique( pDocSh->GetPool(), 
svl::Items{} );
 using namespace ::com::sun::star;
 uno::Reference xDPS(
 pDocSh->GetModel(), uno::UNO_QUERY_THROW);
@@ -135,8 +135,8 @@ SfxItemSet* SwFieldDlg::CreateInputItemSet(const OString& 
rID)
 uno::Reference< beans::XPropertySet > xUDProps(
 xDocProps->getUserDefinedProperties(),
 uno::UNO_QUERY_THROW);
-pISet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) );
-return pISet;
+mxInputItemSet->Put( SfxUnoAnyItem( SID_DOCINFO, 
uno::makeAny(xUDProps) ) );
+return mxInputItemSet.get();
 }
 else
 return nullptr;
diff --git a/sw/source/uibase/inc/fldtdlg.hxx b/sw/source/uibase/inc/fldtdlg.hxx
index 8f690bb25f9e..f55e84e2c202 100644
--- a/sw/source/uibase/inc/fldtdlg.hxx
+++ b/sw/source/uibase/inc/fldtdlg.hxx
@@ -22,7 +22,7 @@
 #include 
 
 #include 
-
+#include 
 #include 
 
 class SfxBindings;
@@ -37,6 +37,7 @@ class SwFieldDlg : public SfxTabDialogController
 boolm_bHtmlMode;
 boolm_bDataBaseMode;
 boolm_bClosing;
+std::unique_ptr mxInputItemSet;
 
 virtual SfxItemSet* CreateInputItemSet(const OString& rId) override;
 virtual voidPageCreated(const OString& rId, SfxTabPage& rPage) 
override;
commit a8c4db643eb4c332f2e8f25b2fd8c84401a847ac
Author: Noel Grandin 
AuthorDate: Mon May 31 15:26:13 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 21:36:40 2021 +0200

flatten vector

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

diff --git a/sd/source/filter/eppt/grouptable.hxx 
b/sd/source/filter/eppt/grouptable.hxx
index 6d252ceb8f29..885f9574164e 100644
--- a/sd/source/filter/eppt/grouptable.hxx
+++ b/sd/source/filter/eppt/grouptable.hxx
@@ -49,15 +49,14 @@ class GroupTable
 
 sal_uInt32  mnIndex;
 sal_uInt32  mnGroupsClosed;
-std::vector>
-mvGroupEntry;
+std::vector mvGroupEntry;
 
 public:
 
 sal_uInt32  GetCurrentGroupIndex() const { return mnIndex; 
};
 sal_Int32   GetCurrentGroupLevel() const { return 
mvGroupEntry.size() - 1; };
-css::uno::Reference< css::container::XIndexAccess > &
-GetCurrentGroupAccess() const { return 
mvGroupEntry.back()->mXIndexAccess; };
+const css::uno::Reference< css::container::XIndexAccess > &
+GetCurrentGroupAccess() const { return 
mvGroupEntry.back().mXIndexAccess; };
 sal_uInt32  GetGroupsClosed();
 voidResetGroupTable( sal_uInt32 nCount );
 voidClearGroupTable();
diff --git a/sd/source/filter/eppt/pptx-grouptable.cxx 
b/sd/source/filter/eppt/pptx-grouptable.cxx
index 1f743df45911..bf91f2fb692e 100644
--- a/sd/source/filter/eppt/pptx-grouptable.cxx
+++ b/sd/source/filter/eppt/pptx-grouptable.cxx
@@ -37,10 +37,10 @@ bool GroupTable::EnterGroup( css::uno::Reference< 
css::container::XIndexAccess >
 bool bRet = false;
 if ( rXIndexAccessRef.is() )
 {
-std::unique_ptr pNewGroup( new GroupEntry( 
rXIndexAccessRef ) );
-if ( pNewGroup->mnCount )
+GroupEntry aNewGroup( rXIndexAccessRef );
+if ( aNewGroup.mnCount )
 {
-mvGroupEntry.push_back( std::move(pNewGroup) );
+mvGroupEntry.push_back( std::move(aNewGroup) );
 bRet = true;
 }
 }
@@ -62,16 +62,16 @@ void GroupTable::ClearGroupTabl

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

2021-05-31 Thread Noel Grandin (via logerrit)
 framework/inc/classes/protocolhandlercache.hxx|7 +++--
 framework/source/fwi/classes/protocolhandlercache.cxx |   24 +-
 2 files changed, 16 insertions(+), 15 deletions(-)

New commits:
commit d1dfb7d56137ea62d6f3cdfb07f3ee841eb28f9e
Author: Noel Grandin 
AuthorDate: Mon May 31 11:11:30 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 21:36:25 2021 +0200

no need to allocate these separately

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

diff --git a/framework/inc/classes/protocolhandlercache.hxx 
b/framework/inc/classes/protocolhandlercache.hxx
index 78a3449f8aa9..d29ba6795248 100644
--- a/framework/inc/classes/protocolhandlercache.hxx
+++ b/framework/inc/classes/protocolhandlercache.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include 
+#include 
 
 #include 
 
@@ -90,9 +91,9 @@ class HandlerCache final
 private:
 
 /// list of all registered handler registered by her uno 
implementation names
-static std::unique_ptr s_pHandler;
+static std::optional s_pHandler;
 /// maps URL pattern to handler names
-static std::unique_ptr s_pPattern;
+static std::optional s_pPattern;
 /// informs about config updates
 static HandlerCFGAccess* s_pConfig;
 /// ref count to construct/destruct internal member lists on demand by 
using singleton mechanism
@@ -107,7 +108,7 @@ class HandlerCache final
 bool search( const OUString& sURL, ProtocolHandler* pReturn ) const;
 bool search( const css::util::URL&  aURL, ProtocolHandler* pReturn ) 
const;
 
-void takeOver(std::unique_ptr pHandler, 
std::unique_ptr pPattern);
+void takeOver(HandlerHash aHandler, PatternHash aPattern);
 };
 
 /**
diff --git a/framework/source/fwi/classes/protocolhandlercache.cxx 
b/framework/source/fwi/classes/protocolhandlercache.cxx
index 9288536480d9..1879554c7bed 100644
--- a/framework/source/fwi/classes/protocolhandlercache.cxx
+++ b/framework/source/fwi/classes/protocolhandlercache.cxx
@@ -68,8 +68,8 @@ PatternHash::const_iterator findPatternKey(PatternHash const 
* hash, const OUStr
 That means it use two static member list to hold all necessary 
information
 and a ref count mechanism to create/destroy it on demand.
  */
-std::unique_ptr HandlerCache::s_pHandler;
-std::unique_ptr HandlerCache::s_pPattern;
+std::optional HandlerCache::s_pHandler;
+std::optional HandlerCache::s_pPattern;
 sal_Int32HandlerCache::m_nRefCount = 0;
 HandlerCFGAccess* HandlerCache::s_pConfig = nullptr;
 
@@ -86,8 +86,8 @@ HandlerCache::HandlerCache()
 
 if (m_nRefCount==0)
 {
-s_pHandler.reset(new HandlerHash);
-s_pPattern.reset(new PatternHash);
+s_pHandler.emplace();
+s_pPattern.emplace();
 s_pConfig = new HandlerCFGAccess(PACKAGENAME_PROTOCOLHANDLER);
 s_pConfig->read(*s_pHandler, *s_pPattern);
 s_pConfig->setCache(this);
@@ -129,7 +129,7 @@ bool HandlerCache::search( const OUString& sURL, 
ProtocolHandler* pReturn ) cons
 
 SolarMutexGuard aGuard;
 
-PatternHash::const_iterator pItem = findPatternKey(s_pPattern.get(), sURL);
+PatternHash::const_iterator pItem = findPatternKey(s_pPattern ? 
&*s_pPattern : nullptr, sURL);
 if (pItem != s_pPattern->end())
 {
 *pReturn = (*s_pHandler)[pItem->second];
@@ -150,12 +150,12 @@ bool HandlerCache::search( const css::util::URL& aURL, 
ProtocolHandler* pReturn
 return search( aURL.Complete, pReturn );
 }
 
-void HandlerCache::takeOver(std::unique_ptr pHandler, 
std::unique_ptr pPattern)
+void HandlerCache::takeOver(HandlerHash aHandler, PatternHash aPattern)
 {
 SolarMutexGuard aGuard;
 
-s_pHandler = std::move(pHandler);
-s_pPattern = std::move(pPattern);
+s_pHandler = std::move(aHandler);
+s_pPattern = std::move(aPattern);
 }
 
 /**
@@ -240,12 +240,12 @@ void HandlerCFGAccess::read( HandlerHash& rHandlerHash, 
PatternHash& rPatternHas
 
 void HandlerCFGAccess::Notify(const css::uno::Sequence< OUString >& 
/*lPropertyNames*/)
 {
-std::unique_ptr pHandler(new HandlerHash);
-std::unique_ptr pPattern(new PatternHash);
+HandlerHash aHandler;
+PatternHash aPattern;
 
-read(*pHandler, *pPattern);
+read(aHandler, aPattern);
 if (m_pCache)
-m_pCache->takeOver(std::move(pHandler), std::move(pPattern));
+m_pCache->takeOver(std::move(aHandler), std::move(aPattern));
 }
 
 void HandlerCFGAccess::ImplCommit()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Noel Grandin (via logerrit)
 sd/source/ui/annotations/annotationmanager.cxx   |   22 ++---
 sd/source/ui/docshell/docshel2.cxx   |4 +--
 sd/source/ui/framework/tools/FrameworkHelper.cxx |   24 +++
 sd/source/ui/inc/framework/FrameworkHelper.hxx   |2 -
 4 files changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 0fa764925185a8a7836967b62ea89b17e60cf45c
Author: Noel Grandin 
AuthorDate: Mon May 31 11:06:39 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 21:03:02 2021 +0200

no need to allocate these on the heap

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

diff --git a/sd/source/ui/annotations/annotationmanager.cxx 
b/sd/source/ui/annotations/annotationmanager.cxx
index d1986d4309c1..95e7bfb4b901 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -560,10 +560,10 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( 
SfxRequest const & rReq )
 if( !pTextApi )
 return;
 
-std::unique_ptr< ::Outliner > pOutliner( new 
::Outliner(GetAnnotationPool(),OutlinerMode::TextObject) );
+::Outliner aOutliner( GetAnnotationPool(),OutlinerMode::TextObject );
 
-SdDrawDocument::SetCalcFieldValueHdl( pOutliner.get() );
-pOutliner->SetUpdateMode( true );
+SdDrawDocument::SetCalcFieldValueHdl( &aOutliner );
+aOutliner.SetUpdateMode( true );
 
 OUString aStr(SdResId(STR_ANNOTATION_REPLY));
 OUString sAuthor( xAnnotation->getAuthor() );
@@ -580,24 +580,24 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( 
SfxRequest const & rReq )
 aStr += sQuote + "\"\n";
 
 for( sal_Int32 nIdx = 0; nIdx >= 0; )
-pOutliner->Insert( aStr.getToken( 0, '\n', nIdx ), EE_PARA_APPEND, -1 
);
+aOutliner.Insert( aStr.getToken( 0, '\n', nIdx ), EE_PARA_APPEND, -1 );
 
-if( pOutliner->GetParagraphCount() > 1 )
+if( aOutliner.GetParagraphCount() > 1 )
 {
-SfxItemSet aAnswerSet( pOutliner->GetEmptyItemSet() );
+SfxItemSet aAnswerSet( aOutliner.GetEmptyItemSet() );
 aAnswerSet.Put(SvxPostureItem(ITALIC_NORMAL,EE_CHAR_ITALIC));
 
 ESelection aSel;
-aSel.nEndPara = pOutliner->GetParagraphCount()-2;
-aSel.nEndPos = pOutliner->GetText( pOutliner->GetParagraph( 
aSel.nEndPara ) ).getLength();
+aSel.nEndPara = aOutliner.GetParagraphCount()-2;
+aSel.nEndPos = aOutliner.GetText( aOutliner.GetParagraph( 
aSel.nEndPara ) ).getLength();
 
-pOutliner->QuickSetAttribs( aAnswerSet, aSel );
+aOutliner.QuickSetAttribs( aAnswerSet, aSel );
 }
 
 if (!sReplyText.isEmpty())
-pOutliner->Insert(sReplyText);
+aOutliner.Insert(sReplyText);
 
-std::unique_ptr< OutlinerParaObject > pOPO( pOutliner->CreateParaObject() 
);
+std::unique_ptr< OutlinerParaObject > pOPO( aOutliner.CreateParaObject() );
 pTextApi->SetText(*pOPO);
 
 OUString sReplyAuthor;
diff --git a/sd/source/ui/docshell/docshel2.cxx 
b/sd/source/ui/docshell/docshel2.cxx
index 28f8ca7b91e9..2610e3ce60fe 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -50,7 +50,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, 
sal_uInt16 nAspect)
   // THUMBNAIL: here we may can set the draft mode
 }
 
-std::unique_ptr pView( new ClientView(this, pOut) );
+std::optional pView( std::in_place, this, pOut );
 
 pView->SetHlplVisible(false);
 pView->SetGridVisible(false);
@@ -202,7 +202,7 @@ BitmapEx DrawDocShell::GetPagePreviewBitmap(SdPage* pPage)
 aMapMode.SetScaleY( aFrac );
 pVDev->SetMapMode( aMapMode );
 
-std::unique_ptr pView(new ClientView( this, pVDev ));
+std::optional pView( std::in_place, this, pVDev );
 FrameView*  pFrameView = GetFrameView();
 pView->ShowSdrPage( pPage );
 
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx 
b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 362e80795e5f..985c72d6d576 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -285,7 +285,7 @@ public:
 
 //- FrameworkHelper ---
 
-std::unique_ptr FrameworkHelper::mpViewURLMap(new 
ViewURLMap());
+FrameworkHelper::ViewURLMap FrameworkHelper::maViewURLMap;
 
 FrameworkHelper::InstanceMap FrameworkHelper::maInstanceMap;
 
@@ -447,19 +447,19 @@ Reference FrameworkHelper::RequestView (
 
 ViewShell::ShellType FrameworkHelper::GetViewId (const OUString& rsViewURL)
 {
-if (mpViewURLMap->empty())
+if (maViewURLMap.empty())
 {
-(*mpViewURLMap)[msImpressViewURL] = ViewShell::ST_IMPRESS;
-(*mpViewURLMap)[msDrawViewURL] = ViewShell::ST_DRAW;
-(*mpViewURLMap)[msOutlineViewURL] = ViewShell::ST_OUTLINE;
-(*mpVie

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

2021-05-31 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   29 +++--
 1 file changed, 19 insertions(+), 10 deletions(-)

New commits:
commit 486d3dd4f68dd4f93d2f5c94d5cce3112ddf6d40
Author: Caolán McNamara 
AuthorDate: Mon May 31 17:32:40 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 20:51:45 2021 +0200

gtk4: reenable Box reorder_child

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 53b301748dfb..857c48563260 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -4973,7 +4973,6 @@ std::unique_ptr 
GtkInstanceWidget::weld_parent() const
 }
 
 namespace {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 
 struct ButtonOrder
 {
@@ -5069,14 +5068,30 @@ public:
 
 virtual void reorder_child(weld::Widget* pWidget, int nNewPosition) 
override
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 GtkInstanceWidget* pGtkWidget = 
dynamic_cast(pWidget);
 assert(pGtkWidget);
 GtkWidget* pChild = pGtkWidget->getWidget();
+
+#if !GTK_CHECK_VERSION(4, 0, 0)
 gtk_box_reorder_child(m_pBox, pChild, nNewPosition);
 #else
-(void)pWidget;
-(void)nNewPosition;
+if (nNewPosition == 0)
+gtk_box_reorder_child_after(m_pBox, pChild, nullptr);
+else
+{
+int nNewSiblingPos = nNewPosition - 1;
+int nChildPosition = 0;
+for (GtkWidget* pNewSibling = 
gtk_widget_get_first_child(GTK_WIDGET(m_pBox));
+ pNewSibling; pNewSibling = 
gtk_widget_get_next_sibling(pNewSibling))
+{
+if (nChildPosition == nNewSiblingPos)
+{
+gtk_box_reorder_child_after(m_pBox, pChild, pNewSibling);
+break;
+}
+++nChildPosition;
+}
+}
 #endif
 }
 
@@ -5086,7 +5101,6 @@ public:
 }
 };
 
-#endif
 }
 
 namespace
@@ -21879,16 +21893,11 @@ public:
 
 virtual std::unique_ptr weld_box(const OString &id) override
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 GtkBox* pBox = GTK_BOX(gtk_builder_get_object(m_pBuilder, 
id.getStr()));
 if (!pBox)
 return nullptr;
 auto_add_parentless_widgets_to_container(GTK_WIDGET(pBox));
 return std::make_unique(pBox, this, false);
-#else
-(void)id;
-return nullptr;
-#endif
 }
 
 virtual std::unique_ptr weld_paned(const OString &id) override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit 140f4f6d1d74debd3dda209e6f554ed9c102aa2e
Author: Caolán McNamara 
AuthorDate: Mon May 31 16:43:09 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 20:51:20 2021 +0200

gtk4: reenable event dialog that now works again

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index d64c486b5d12..53b301748dfb 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -22327,10 +22327,13 @@ weld::Builder* 
GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
 rUIFile != "cui/ui/acoroptionspage.ui" &&
 rUIFile != "cui/ui/acorreplacepage.ui" &&
 rUIFile != "cui/ui/applylocalizedpage.ui" &&
+rUIFile != "cui/ui/eventassigndialog.ui" &&
+rUIFile != "cui/ui/eventassignpage.ui" &&
 rUIFile != "cui/ui/autocorrectdialog.ui" &&
 rUIFile != "cui/ui/hyperlinkdialog.ui" &&
 rUIFile != "cui/ui/hyperlinkdocpage.ui" &&
 rUIFile != "cui/ui/hyperlinkinternetpage.ui" &&
+rUIFile != "cui/ui/hyperlinkmarkdialog.ui" &&
 rUIFile != "cui/ui/hyperlinkmailpage.ui" &&
 rUIFile != "cui/ui/hyperlinknewdocpage.ui" &&
 rUIFile != "cui/ui/hyphenate.ui" &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basctl/uiconfig bin/ui-rules-enforcer.py cui/uiconfig sc/uiconfig sd/uiconfig

2021-05-31 Thread Caolán McNamara (via logerrit)
 basctl/uiconfig/basicide/ui/basicmacrodialog.ui  |1 -
 bin/ui-rules-enforcer.py |   16 
 cui/uiconfig/ui/eventassignpage.ui   |1 -
 cui/uiconfig/ui/macroselectordialog.ui   |1 -
 sc/uiconfig/scalc/ui/regressiondialog.ui |1 -
 sd/uiconfig/simpress/ui/optimpressgeneralpage.ui |1 -
 6 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 87fe3110bb74df751985ef6c68d98493ff8c0451
Author: Caolán McNamara 
AuthorDate: Mon May 31 16:39:59 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 20:50:54 2021 +0200

GtkLabel:track-visited-links was removed

but we have some uses of it, which all look accidental

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

diff --git a/basctl/uiconfig/basicide/ui/basicmacrodialog.ui 
b/basctl/uiconfig/basicide/ui/basicmacrodialog.ui
index ff6a0890450a..2f700a31fab0 100644
--- a/basctl/uiconfig/basicide/ui/basicmacrodialog.ui
+++ b/basctl/uiconfig/basicide/ui/basicmacrodialog.ui
@@ -166,7 +166,6 @@
 False
 Existing Macros In:
 end
-False
 
   
 
diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index e981ade27b26..5e46367112cf 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -192,6 +192,21 @@ def remove_check_button_align(current):
 raise Exception(sys.argv[1] + ': non-default yalign', yalign.text)
   current.remove(yalign)
 
+def remove_track_visited_links(current):
+  track_visited_links = None
+  islabel = current.get('class') == "GtkLabel"
+  for child in current:
+remove_track_visited_links(child)
+if not islabel:
+continue
+if child.tag == "property":
+  attributes = child.attrib
+  if attributes.get("name") == "track_visited_links" or 
attributes.get("name") == "track-visited-links":
+track_visited_links = child
+
+  if track_visited_links != None:
+current.remove(track_visited_links)
+
 with open(sys.argv[1], encoding="utf-8") as f:
   header = f.readline()
   f.seek(0)
@@ -212,6 +227,7 @@ if not sys.argv[1].endswith('/multiline.ui'): # let this 
one alone not truncate
 replace_button_use_stock(root)
 replace_image_stock(root)
 remove_check_button_align(root)
+remove_track_visited_links(root)
 
 with open(sys.argv[1], 'wb') as o:
   # without encoding='unicode' (and the matching encode("utf8")) we get &# 
replacements for non-ascii characters
diff --git a/cui/uiconfig/ui/eventassignpage.ui 
b/cui/uiconfig/ui/eventassignpage.ui
index e24cb15552f5..26274e4f6a03 100644
--- a/cui/uiconfig/ui/eventassignpage.ui
+++ b/cui/uiconfig/ui/eventassignpage.ui
@@ -319,7 +319,6 @@
 True
 False
 Existing Macros
-False
 
   
 
diff --git a/cui/uiconfig/ui/macroselectordialog.ui 
b/cui/uiconfig/ui/macroselectordialog.ui
index 4b502ddfaa96..624d853ec035 100644
--- a/cui/uiconfig/ui/macroselectordialog.ui
+++ b/cui/uiconfig/ui/macroselectordialog.ui
@@ -241,7 +241,6 @@
 True
 False
 Macro Name
-False
 
   
 
diff --git a/sc/uiconfig/scalc/ui/regressiondialog.ui 
b/sc/uiconfig/scalc/ui/regressiondialog.ui
index 02063b1f9200..38771503dc8f 100644
--- a/sc/uiconfig/scalc/ui/regressiondialog.ui
+++ b/sc/uiconfig/scalc/ui/regressiondialog.ui
@@ -500,7 +500,6 @@
 True
 False
 True
-False
   
   
 True
diff --git a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui 
b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
index 9d16fd74d966..9ef705a080b8 100644
--- a/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
+++ b/sd/uiconfig/simpress/ui/optimpressgeneralpage.ui
@@ -327,7 +327,6 @@
 True
 fill
 metricFields
-False
 0
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit a8ba9ce02f8d2b1fa5639a5bcc77693652152813
Author: Caolán McNamara 
AuthorDate: Mon May 31 16:24:28 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 20:50:33 2021 +0200

gtk4: we definitely want large icons where we were using 
GTK_ICON_SIZE_DIALOG

e.g. in the hyperlink dialog

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index ed195f56a760..d64c486b5d12 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -20908,6 +20908,23 @@ ConvertResult Convert3To4(const 
Reference& xNode)
 xRemoveList.push_back(xChild);
 }
 
+if (sName == "icon-size")
+{
+if (GetParentObjectType(xChild) == "GtkImage")
+{
+if (xChild->getFirstChild()->getNodeValue() == "6")
+{
+auto xDoc = xChild->getOwnerDocument();
+// convert old GTK_ICON_SIZE_DIALOG to new 
GTK_ICON_SIZE_LARGE
+auto xIconSize = CreateProperty(xDoc, "icon-size", 
"2");
+xChild->getParentNode()->insertBefore(xIconSize, 
xChild);
+xRemoveList.push_back(xChild);
+}
+else
+SAL_WARN( "vcl.gtk", "what should we do with an 
icon-size of: " << xChild->getFirstChild()->getNodeValue());
+}
+}
+
 if (sName == "truncate-multiline")
 {
 if (GetParentObjectType(xChild) == "GtkSpinButton")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/hyperlinkdocpage.ui  |3 ---
 cui/uiconfig/ui/hyperlinkinternetpage.ui |1 -
 cui/uiconfig/ui/hyperlinkmailpage.ui |2 --
 cui/uiconfig/ui/hyperlinknewdocpage.ui   |2 --
 vcl/unx/gtk3/gtkinst.cxx |6 ++
 5 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit ceb1d69eda4c7351e64cb92d40d7c48f3790f83b
Author: Caolán McNamara 
AuthorDate: Mon May 31 16:16:08 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 20:50:10 2021 +0200

no need for always-show-image if there is just an image and no text

and reenable hyperlink dialog for gtk4

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

diff --git a/cui/uiconfig/ui/hyperlinkdocpage.ui 
b/cui/uiconfig/ui/hyperlinkdocpage.ui
index a6a1ca03ee0a..b1a29b35b43c 100644
--- a/cui/uiconfig/ui/hyperlinkdocpage.ui
+++ b/cui/uiconfig/ui/hyperlinkdocpage.ui
@@ -59,7 +59,6 @@
 True
 Open File
 image2
-True
 
   
 Opens the 
Open dialog, where you can select a file.
@@ -165,7 +164,6 @@
 True
 Target in Document
 image1
-True
 
   
 Opens the 
Target in Document dialog.
@@ -370,7 +368,6 @@
 True
 True
 Events
-True
 
   
 Opens the 
Assign Macro dialog, in which you can give events such as "mouse over object" 
or "trigger hyperlink" their own program codes.
diff --git a/cui/uiconfig/ui/hyperlinkinternetpage.ui 
b/cui/uiconfig/ui/hyperlinkinternetpage.ui
index 47b03a7c5d09..4b311bc078db 100644
--- a/cui/uiconfig/ui/hyperlinkinternetpage.ui
+++ b/cui/uiconfig/ui/hyperlinkinternetpage.ui
@@ -381,7 +381,6 @@
 True
 True
 Events
-True
 
   
 Opens 
the Assign Macro dialog, in which you can give events such as "mouse over 
object" or "trigger hyperlink" their own program codes.
diff --git a/cui/uiconfig/ui/hyperlinkmailpage.ui 
b/cui/uiconfig/ui/hyperlinkmailpage.ui
index 9a691e2005b8..77568d69a9e9 100644
--- a/cui/uiconfig/ui/hyperlinkmailpage.ui
+++ b/cui/uiconfig/ui/hyperlinkmailpage.ui
@@ -54,7 +54,6 @@
 True
 Data Sources...
 image1
-True
 
   
 Hides 
or shows the data source browser.
@@ -295,7 +294,6 @@
 True
 True
 Events
-True
 
   
 Opens the 
Assign Macro dialog, in which you can give events such as "mouse over object" 
or "trigger hyperlink" their own program codes.
diff --git a/cui/uiconfig/ui/hyperlinknewdocpage.ui 
b/cui/uiconfig/ui/hyperlinknewdocpage.ui
index 45e99dcb6bd2..bdb6a23c1b59 100644
--- a/cui/uiconfig/ui/hyperlinknewdocpage.ui
+++ b/cui/uiconfig/ui/hyperlinknewdocpage.ui
@@ -118,7 +118,6 @@
 True
 Select Path
 image1
-True
 
   
 Opens the 
Select Path dialog, where you can select a path.
@@ -380,7 +379,6 @@
 True
 True
 Events
-True
 
   
 Opens the 
Assign Macro dialog, in which you can give events such as "mouse over object" 
or "trigger hyperlink" their own program codes.
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 23416bd904c1..ed195f56a760 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -22311,10 +22311,16 @@ weld::Builder* 
GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
 rUIFile != "cui/ui/acorreplacepage.ui" &&
 rUIFile != "cui/ui/applylocalizedpage.ui" &&
 rUIFile != "cui/ui/autocorrectdialog.ui" &&
+rUIFile != "cui/ui/hyperlinkdialog.ui" &&
+rUIFile != "cui/ui/hyperlinkdocpage.ui" &&
+rUIFile != "cui/ui/hyperlinkinternetpage.ui" &&
+rUIFile != "cui/ui/hyperlinkmailpage.ui" &&
+rUIFile != "cui/ui/hyperlinknewdocpage.ui" &&
 rUIFile != "cui/ui/hyphenate.ui" &&
 rUIFile != "cui/ui/insertfloatingframe.ui" &&
 rUIFile != "cui/ui/objectnamedialog.ui" &&
 rUIFile != "cui/ui/objecttitledescdialog.ui" &&
+rUIFile != "cui/ui/pastespecial.ui" &&
 rUIFile != "cui/ui/percentdialog.ui" &&
 rUIFile != "cui/ui/signatureline.

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

2021-05-31 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   35 +++
 1 file changed, 19 insertions(+), 16 deletions(-)

New commits:
commit f30fae2a910188b741ac7f346e1bad04656128bd
Author: Caolán McNamara 
AuthorDate: Mon May 31 15:13:28 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 20:49:46 2021 +0200

gtk4: gdk_clipboard_is_local can replace our hack for that

and detach_clipboard for our purposes is equivalent to the old
ClipboardClear case. Listen to "changed" for the owner change
replacement instead of notify::formats

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 43e419aa2305..23416bd904c1 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -966,6 +966,7 @@ void VclGtkClipboard::ClipboardGet(GtkSelectionData 
*selection_data, guint info)
 }
 #endif
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
 namespace
 {
 const OString& getPID()
@@ -982,11 +983,7 @@ namespace
 }
 return sPID;
 }
-}
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
-namespace
-{
 void ClipboardGetFunc(GdkClipboard* /*clipboard*/, GtkSelectionData 
*selection_data,
   guint info,
   gpointer user_data_or_owner)
@@ -1005,11 +1002,19 @@ namespace
 
 namespace
 {
+#if GTK_CHECK_VERSION(4, 0, 0)
+void handle_owner_change(GdkClipboard *clipboard, gpointer user_data)
+{
+VclGtkClipboard* pThis = static_cast(user_data);
+pThis->OwnerPossiblyChanged(clipboard);
+}
+#else
 void handle_owner_change(GdkClipboard *clipboard, GdkEvent* /*event*/, 
gpointer user_data)
 {
 VclGtkClipboard* pThis = static_cast(user_data);
 pThis->OwnerPossiblyChanged(clipboard);
 }
+#endif
 }
 
 void VclGtkClipboard::OwnerPossiblyChanged(GdkClipboard* clipboard)
@@ -1032,7 +1037,6 @@ void VclGtkClipboard::OwnerPossiblyChanged(GdkClipboard* 
clipboard)
 //avoid possible recursion
 g_signal_handler_disconnect(clipboard, m_nOwnerChangedSignalId);
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
 OString sTunnel = "application/x-libreoffice-internal-id-" + getPID();
 GdkAtom *targets;
 gint n_targets;
@@ -1050,15 +1054,9 @@ void VclGtkClipboard::OwnerPossiblyChanged(GdkClipboard* 
clipboard)
 
 g_free(targets);
 }
-#endif
 
-#if GTK_CHECK_VERSION(4, 0, 0)
-m_nOwnerChangedSignalId = g_signal_connect(clipboard, "notify::formats",
-   
G_CALLBACK(handle_owner_change), this);
-#else
 m_nOwnerChangedSignalId = g_signal_connect(clipboard, "owner-change",

G_CALLBACK(handle_owner_change), this);
-#endif
 #endif
 
 if (!bSelf)
@@ -1292,7 +1290,7 @@ VclGtkClipboard::VclGtkClipboard(SelectionType eSelection)
 {
 GdkClipboard* clipboard = clipboard_get(m_eSelection);
 #if GTK_CHECK_VERSION(4, 0, 0)
-m_nOwnerChangedSignalId = g_signal_connect(clipboard, "notify::formats",
+m_nOwnerChangedSignalId = g_signal_connect(clipboard, "changed",

G_CALLBACK(handle_owner_change), this);
 #else
 m_nOwnerChangedSignalId = g_signal_connect(clipboard, "owner-change",
@@ -1444,11 +1442,18 @@ static GdkContentFormats* 
clipboard_content_ref_formats(GdkContentProvider *prov
 return content->clipboard->ref_formats();
 }
 
+static void clipboard_content_detach_clipboard(GdkContentProvider *provider, 
GdkClipboard*)
+{
+ClipboardContent *content = CLIPBOARD_CONTENT(provider);
+return content->clipboard->ClipboardClear();
+}
+
 static void clipboard_content_class_init(ClipboardContentClass* klass)
 {
   GdkContentProviderClass *provider_class = GDK_CONTENT_PROVIDER_CLASS(klass);
 
   provider_class->ref_formats = clipboard_content_ref_formats;
+  provider_class->detach_clipboard = clipboard_content_detach_clipboard;
   provider_class->write_mime_type_async = 
clipboard_content_write_mime_type_async;
   provider_class->write_mime_type_finish = 
clipboard_content_write_mime_type_finish;
 }
@@ -1529,11 +1534,9 @@ void VclGtkClipboard::setContents(
 #endif
 if (!aGtkTargets.empty())
 {
-OString sTunnel = "application/x-libreoffice-internal-id-" + 
getPID();
-#if GTK_CHECK_VERSION(4, 0, 0)
-aGtkTargets.push_back(sTunnel);
-#else
+#if !GTK_CHECK_VERSION(4, 0, 0)
 GtkTargetEntry aEntry;
+OString sTunnel = "application/x-libreoffice-internal-id-" + 
getPID();
 aEntry.target = g_strdup(sTunnel.getStr());
 aEntry.flags = 0;
 aEntry.info = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Noel Grandin (via logerrit)
 sfx2/inc/autoredactdialog.hxx|4 +--
 sfx2/source/doc/autoredactdialog.cxx |   36 ++-
 sfx2/source/doc/doctemplates.cxx |   16 +++
 3 files changed, 25 insertions(+), 31 deletions(-)

New commits:
commit af83bf98b2ea907437edf964cf7af50a5bc66096
Author: Noel Grandin 
AuthorDate: Mon May 31 15:49:04 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 19:53:14 2021 +0200

fix leak in redaction dialog

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

diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index 657881979df2..fe43eef840f0 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -92,7 +92,7 @@ enum class StartFileDialogType
 class SfxAutoRedactDialog final : public SfxDialogController
 {
 SfxObjectShellLock m_xDocShell;
-std::vector> m_aTableTargets;
+std::vector, OUString>> 
m_aTableTargets;
 std::unique_ptr m_pFileDlg;
 bool m_bIsValidState;
 bool m_bTargetsCopied;
@@ -116,7 +116,7 @@ class SfxAutoRedactDialog final : public SfxDialogController
 
 void StartFileDialog(StartFileDialogType nType, const OUString& rTitle);
 /// Carry out proper addition both to the targets box, and to the 
tabletargets vector.
-void addTarget(RedactionTarget* pTarget);
+void addTarget(std::unique_ptr pTarget);
 /// Clear all targets both visually and from the targets vector
 void clearTargets();
 
diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 32c9eb7c9502..eaa90476ea1f 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -366,7 +366,8 @@ boost::property_tree::ptree redactionTargetToJSON(const 
RedactionTarget* pTarget
 return aNode;
 }
 
-RedactionTarget* JSONtoRedactionTarget(const 
boost::property_tree::ptree::value_type& rValue)
+std::unique_ptr
+JSONtoRedactionTarget(const boost::property_tree::ptree::value_type& rValue)
 {
 OUString sName = 
OUString::fromUtf8(rValue.second.get("sName").c_str());
 RedactionTargetType eType
@@ -378,10 +379,8 @@ RedactionTarget* JSONtoRedactionTarget(const 
boost::property_tree::ptree::value_
 = 
OUString::fromUtf8(rValue.second.get("bWholeWords").c_str()).toBoolean();
 sal_uInt32 nID = atoi(rValue.second.get("nID").c_str());
 
-RedactionTarget* pTarget
-= new RedactionTarget({ sName, eType, sContent, bCaseSensitive, 
bWholeWords, nID });
-
-return pTarget;
+return std::unique_ptr(
+new RedactionTarget{ sName, eType, sContent, bCaseSensitive, 
bWholeWords, nID });
 }
 }
 
@@ -418,8 +417,7 @@ IMPL_LINK_NOARG(SfxAutoRedactDialog, LoadHdl, 
sfx2::FileDialogHelper*, void)
 for (const boost::property_tree::ptree::value_type& rValue :
  aTargetsJSON.get_child("RedactionTargets"))
 {
-RedactionTarget* pTarget = JSONtoRedactionTarget(rValue);
-addTarget(pTarget);
+addTarget(JSONtoRedactionTarget(rValue));
 }
 }
 catch (css::uno::Exception& e)
@@ -454,7 +452,8 @@ IMPL_LINK_NOARG(SfxAutoRedactDialog, SaveHdl, 
sfx2::FileDialogHelper*, void)
 boost::property_tree::ptree aTargetsArray;
 for (const auto& targetPair : m_aTableTargets)
 {
-aTargetsArray.push_back(std::make_pair("", 
redactionTargetToJSON(targetPair.first)));
+aTargetsArray.push_back(
+std::make_pair("", 
redactionTargetToJSON(targetPair.first.get(;
 }
 
 // Build the JSON tree
@@ -496,21 +495,21 @@ void 
SfxAutoRedactDialog::StartFileDialog(StartFileDialogType nType, const OUStr
 m_pFileDlg->StartExecuteModal(aDlgClosedLink);
 }
 
-void SfxAutoRedactDialog::addTarget(RedactionTarget* pTarget)
+void SfxAutoRedactDialog::addTarget(std::unique_ptr pTarget)
 {
 // Only the visual/display part
-m_xTargetsBox->InsertTarget(pTarget);
+m_xTargetsBox->InsertTarget(pTarget.get());
 
 // Actually add to the targets vector
-if (m_xTargetsBox->GetTargetByName(pTarget->sName))
-m_aTableTargets.emplace_back(pTarget, pTarget->sName);
+auto name = pTarget->sName;
+if (m_xTargetsBox->GetTargetByName(name))
+m_aTableTargets.emplace_back(std::move(pTarget), name);
 else
 {
 std::unique_ptr 
xBox(Application::CreateMessageDialog(
 getDialog(), VclMessageType::Warning, VclButtonsType::Ok,
 SfxResId(STR_REDACTION_TARGET_ADD_ERROR)));
 xBox->run();
-delete pTarget;
 }
 }
 
@@ -520,11 +519,6 @@ void SfxAutoRedactDialog::clearTargets()
 m_xTargetsBox->clear();
 
 // Clear the targets vector
-auto delTarget
-= [](const std::pair& targetPair) { delete 
targetPair.first; };
-
-std::for_each(m_aTableTargets.begin(), m_aTableTarge

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

2021-05-31 Thread Noel Grandin (via logerrit)
 sc/source/ui/Accessibility/AccessibleText.cxx |   22 ++
 sc/source/ui/inc/AccessibleText.hxx   |4 ++--
 2 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit 760933de5ab47f6313f93e28e31829e627b48b21
Author: Noel Grandin 
AuthorDate: Mon May 31 15:35:58 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 19:52:48 2021 +0200

fix leak in JunitTest_sc_unoapi_2

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

diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx 
b/sc/source/ui/Accessibility/AccessibleText.cxx
index 54f8f15f49fc..13c67f73730b 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1077,7 +1077,6 @@ ScDocShell* 
ScAccessiblePreviewHeaderCellTextData::GetDocShell(ScPreviewShell* p
 ScAccessibleHeaderTextData::ScAccessibleHeaderTextData(ScPreviewShell* 
pViewShell,
 const EditTextObject* pEditObj, SvxAdjust eAdjust)
 :
-mpViewForwarder(nullptr),
 mpViewShell(pViewShell),
 mpDocSh(nullptr),
 mpEditObj(pEditObj),
@@ -1113,8 +1112,8 @@ void ScAccessibleHeaderTextData::Notify( SfxBroadcaster&, 
const SfxHint& rHint )
 {
 mpViewShell = nullptr;// invalid now
 mpDocSh = nullptr;
-if (mpViewForwarder)
-mpViewForwarder->SetInvalid();
+if (mxViewForwarder)
+mxViewForwarder->SetInvalid();
 }
 }
 
@@ -1176,15 +1175,14 @@ SvxTextForwarder* 
ScAccessibleHeaderTextData::GetTextForwarder()
 
 SvxViewForwarder* ScAccessibleHeaderTextData::GetViewForwarder()
 {
-if (!mpViewForwarder)
-mpViewForwarder = new ScPreviewHeaderFooterViewForwarder(mpViewShell);
-return mpViewForwarder;
+if (!mxViewForwarder)
+mxViewForwarder = 
std::make_unique(mpViewShell);
+return mxViewForwarder.get();
 }
 
 ScAccessibleNoteTextData::ScAccessibleNoteTextData(ScPreviewShell* pViewShell,
 const OUString& sText, const ScAddress& aCellPos, 
bool bMarkNote)
 :
-mpViewForwarder(nullptr),
 mpViewShell(pViewShell),
 mpDocSh(nullptr),
 msText(sText),
@@ -1221,8 +1219,8 @@ void ScAccessibleNoteTextData::Notify( SfxBroadcaster&, 
const SfxHint& rHint )
 {
 mpViewShell = nullptr;// invalid now
 mpDocSh = nullptr;
-if (mpViewForwarder)
-mpViewForwarder->SetInvalid();
+if (mxViewForwarder)
+mxViewForwarder->SetInvalid();
 }
 }
 
@@ -1279,9 +1277,9 @@ SvxTextForwarder* 
ScAccessibleNoteTextData::GetTextForwarder()
 
 SvxViewForwarder* ScAccessibleNoteTextData::GetViewForwarder()
 {
-if (!mpViewForwarder)
-mpViewForwarder = new ScPreviewNoteViewForwarder(mpViewShell);
-return mpViewForwarder;
+if (!mxViewForwarder)
+mxViewForwarder = 
std::make_unique(mpViewShell);
+return mxViewForwarder.get();
 }
 
 // CSV import =
diff --git a/sc/source/ui/inc/AccessibleText.hxx 
b/sc/source/ui/inc/AccessibleText.hxx
index 57a02475f0bb..23fdb3cb25ea 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -217,7 +217,7 @@ public:
 
 virtual voidUpdateData() override {  }
 private:
-ScPreviewViewForwarder* mpViewForwarder;
+std::unique_ptr mxViewForwarder;
 ScPreviewShell* mpViewShell;
 std::unique_ptr  mpEditEngine;
 std::unique_ptr mpForwarder;
@@ -244,7 +244,7 @@ public:
 
 virtual voidUpdateData() override {  }
 private:
-ScPreviewViewForwarder* mpViewForwarder;
+std::unique_ptr mxViewForwarder;
 ScPreviewShell* mpViewShell;
 std::unique_ptr mpEditEngine;
 std::unique_ptr mpForwarder;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx  |  120 
 sw/source/filter/html/htmlflywriter.cxx |4 -
 sw/source/filter/html/wrthtml.cxx   |   10 +-
 sw/source/filter/html/wrthtml.hxx   |3 
 4 files changed, 105 insertions(+), 32 deletions(-)

New commits:
commit e1546b790763c1004dc2e2e3581c666466d7cf9c
Author: Miklos Vajna 
AuthorDate: Mon May 31 17:37:02 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 31 19:25:44 2021 +0200

sw XHTML / reqif export: export PNG images directly, without an OLE wrapper

Do this by default and add a ExportImagesAsOLE=true option for those who
want the old behavior.

Adapt existing tests to ask for the old behavior and add a new one that
depends on the new default.

Change-Id: If863215ce267d6accc85b5c8f7bdbd3f2b1e9187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116486
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 2dd946c03bfe..9ace986366f3 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -704,34 +704,55 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOleImg, 
"reqif-ole-img.xhtml")
 CPPUNIT_ASSERT(aStream.indexOf("type=\"image/png\"") != -1);
 }
 
-DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfPngImg, "reqif-png-img.xhtml")
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqIfPngImg)
 {
-uno::Reference xShape(getShape(1), uno::UNO_QUERY);
-CPPUNIT_ASSERT(xShape.is());
+auto verify = [this](bool bExported) {
+uno::Reference xShape(getShape(1), uno::UNO_QUERY);
+CPPUNIT_ASSERT(xShape.is());
 
-if (!mbExported)
-{
-// Imported PNG image is not an object.
-CPPUNIT_ASSERT_EQUAL(OUString("Image1"), xShape->getName());
-return;
-}
-
-// All images are exported as objects in ReqIF mode.
-CPPUNIT_ASSERT_EQUAL(OUString("Object1"), xShape->getName());
+if (!bExported)
+{
+// Imported PNG image is not an object.
+CPPUNIT_ASSERT_EQUAL(OUString("Image1"), xShape->getName());
+return;
+}
 
-// This was , not , which is not valid in the reqif-xhtml
-// subset.
-SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
-CPPUNIT_ASSERT(pStream);
-sal_uInt64 nLength = pStream->TellEnd();
-OString aStream(read_uInt8s_ToOString(*pStream, nLength));
-CPPUNIT_ASSERT(aStream.indexOf("getName());
+
+// This was , not , which is not valid in the reqif-xhtml
+// subset.
+SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
+CPPUNIT_ASSERT(pStream);
+sal_uInt64 nLength = pStream->TellEnd();
+OString aStream(read_uInt8s_ToOString(*pStream, nLength));
+CPPUNIT_ASSERT(aStream.indexOf(" aLoadProperties = {
+comphelper::makePropertyValue("FilterName", OUString("HTML 
(StarWriter)")),
+comphelper::makePropertyValue("FilterOptions", 
OUString("xhtmlns=reqif-xhtml")),
+};
+mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", 
aLoadProperties);
+verify(/*bExported=*/false);
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+uno::Sequence aStoreProperties = {
+comphelper::makePropertyValue("FilterName", OUString("HTML 
(StarWriter)")),
+comphelper::makePropertyValue("FilterOptions", 
OUString("xhtmlns=reqif-xhtml")),
+comphelper::makePropertyValue("ExportImagesAsOLE", true),
+};
+xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
+mxComponent->dispose();
+mxComponent
+= loadFromDesktop(maTempFile.GetURL(), 
"com.sun.star.text.TextDocument", aLoadProperties);
+verify(/*bExported=*/true);
 }
 
 DECLARE_HTMLEXPORT_TEST(testReqIfJpgImg, "reqif-jpg-img.xhtml")
@@ -911,10 +932,19 @@ DECLARE_HTMLEXPORT_TEST(testTransparentImage, 
"transparent-image.odt")
 CPPUNIT_ASSERT_MESSAGE(aMessage.toUtf8().getStr(), 
aSource.endsWith(".gif"));
 }
 
-DECLARE_HTMLEXPORT_TEST(testTransparentImageReqIf, "transparent-image.odt")
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testTransparentImageReqIf)
 {
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"transparent-image.odt";
+mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", {});
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+uno::Sequence aStoreProperties = {
+comphelper::makePropertyValue("FilterName", OUString("HTML 
(StarWriter)")),
+comphelper::makePropertyValue("FilterOptions", 
OUString("xhtmlns=reqif-xhtml")),
+comphelper::makePropertyValue("ExportImagesAsOLE", true),
+};
+xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
 SvMemoryStream aStream;
-wrapFragment(maTempFile, aStream);
+HtmlExportTest::wrapFragment(maTempFile, aStream);
 xmlDocUniquePtr pDoc = pars

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

2021-05-31 Thread Noel Grandin (via logerrit)
 editeng/source/editeng/eertfpar.cxx |8 +++---
 editeng/source/editeng/eertfpar.hxx |2 -
 editeng/source/rtf/rtfitem.cxx  |2 -
 editeng/source/rtf/svxrtf.cxx   |   42 
 include/editeng/svxrtf.hxx  |   12 +-
 5 files changed, 31 insertions(+), 35 deletions(-)

New commits:
commit 2efe1e8977a83143696b8db49c7c26bbff91c04c
Author: Noel Grandin 
AuthorDate: Mon May 31 10:10:50 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 18:33:10 2021 +0200

no need to allocate EditNodeIdx separately

it is just two pointers

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

diff --git a/editeng/source/editeng/eertfpar.cxx 
b/editeng/source/editeng/eertfpar.cxx
index ecc1247c913d..278699dbfcb1 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -275,7 +275,7 @@ void EditRTFParser::MovePos( bool const bForward )
 aCurSel.Max(), i18n::CharacterIteratorMode::SKIPCHARACTER);
 }
 
-void EditRTFParser::SetEndPrevPara( EditNodeIdx*& rpNodePos,
+void EditRTFParser::SetEndPrevPara( std::optional& rpNodePos,
 sal_Int32& rCntPos )
 {
 // The Intention is to: determine the current insert position of the
@@ -289,7 +289,7 @@ void EditRTFParser::SetEndPrevPara( EditNodeIdx*& rpNodePos,
 nCurPara--;
 ContentNode* pPrevNode = mpEditEngine->GetEditDoc().GetObject( nCurPara );
 assert(pPrevNode && "pPrevNode = 0!");
-rpNodePos = new EditNodeIdx(mpEditEngine, pPrevNode);
+rpNodePos = EditNodeIdx(mpEditEngine, pPrevNode);
 rCntPos = pPrevNode->Len();
 }
 
@@ -612,9 +612,9 @@ sal_Int32 EditNodeIdx::GetIdx() const
 EditPosition::EditPosition(EditEngine* pEE, EditSelection* pSel) :
 mpEditEngine(pEE), mpCurSel(pSel) {}
 
-std::unique_ptr EditPosition::MakeNodeIdx() const
+EditNodeIdx EditPosition::MakeNodeIdx() const
 {
-return std::make_unique(mpEditEngine, 
mpCurSel->Max().GetNode());
+return EditNodeIdx(mpEditEngine, mpCurSel->Max().GetNode());
 }
 
 sal_Int32 EditPosition::GetNodeIdx() const
diff --git a/editeng/source/editeng/eertfpar.hxx 
b/editeng/source/editeng/eertfpar.hxx
index 582e46a68a81..19ce00ce3297 100644
--- a/editeng/source/editeng/eertfpar.hxx
+++ b/editeng/source/editeng/eertfpar.hxx
@@ -37,7 +37,7 @@ private:
 virtual voidInsertPara() override;
 virtual voidInsertText() override;
 virtual voidMovePos( bool bForward = true ) override;
-virtual voidSetEndPrevPara( EditNodeIdx*& rpNodePos,
+virtual voidSetEndPrevPara( std::optional& rpNodePos,
 sal_Int32& rCntPos ) override;
 
 virtual voidUnknownAttrToken( int nToken ) override;
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 699fe0834f7e..ef370d98995f 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -206,7 +206,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
 break;
 
 SvxRTFItemStackType* pCurrent = aAttrStack.empty() ? nullptr : 
aAttrStack.back().get();
-if( !pCurrent || (pCurrent->pSttNd->GetIdx() == 
mxInsertPosition->GetNodeIdx() &&
+if( !pCurrent || (pCurrent->mxStartNodeIdx->GetIdx() == 
mxInsertPosition->GetNodeIdx() &&
 pCurrent->nSttCnt == mxInsertPosition->GetCntIdx() ))
 break;
 
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index df0f030f0c57..ac262af2e759 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -680,7 +680,7 @@ void SvxRTFParser::AttrGroupEnd()   // process the current, 
delete from Stack
 SvxRTFItemStackType *pCurrent = aAttrStack.empty() ? nullptr : 
aAttrStack.back().get();
 
 do {// middle check loop
-sal_Int32 nOldSttNdIdx = pOld->pSttNd->GetIdx();
+sal_Int32 nOldSttNdIdx = pOld->mxStartNodeIdx->GetIdx();
 if (!pOld->m_pChildList &&
 ((!pOld->aAttrSet.Count() && !pOld->nStyleNo ) ||
 (nOldSttNdIdx == mxInsertPosition->GetNodeIdx() &&
@@ -718,8 +718,8 @@ void SvxRTFParser::AttrGroupEnd()   // process the current, 
delete from Stack
 bCrsrBack = nNd != mxInsertPosition->GetNodeIdx();
 }
 
-if( pOld->pSttNd->GetIdx() < mxInsertPosition->GetNodeIdx() ||
-( pOld->pSttNd->GetIdx() == mxInsertPosition->GetNodeIdx() &&
+if( pOld->mxStartNodeIdx->GetIdx() < mxInsertPosition->GetNodeIdx() ||
+( pOld->mxStartNodeIdx->GetIdx() == mxInsertPosition->GetNodeIdx() 
&&
   pOld->nSttCnt <= mxInsertPosition->GetCntIdx() ) )
 {
 if( !bCrsrBack )
@@ -756,7 +756,7 @@ void SvxRTFParser::AttrGroupEnd()

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

2021-05-31 Thread Noel Grandin (via logerrit)
 editeng/source/editeng/eertfpar.cxx |5 
 editeng/source/rtf/rtfitem.cxx  |   12 +-
 editeng/source/rtf/svxrtf.cxx   |   40 ++--
 include/editeng/svxrtf.hxx  |6 +
 4 files changed, 28 insertions(+), 35 deletions(-)

New commits:
commit 21ad3e6cbdf9568c1152a2eab8178e4219e40c33
Author: Noel Grandin 
AuthorDate: Mon May 31 09:49:55 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 18:32:39 2021 +0200

EditPosition does not need to be allocated separately

it's just two pointers big

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

diff --git a/editeng/source/editeng/eertfpar.cxx 
b/editeng/source/editeng/eertfpar.cxx
index 2be675266f36..ecc1247c913d 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -612,11 +612,6 @@ sal_Int32 EditNodeIdx::GetIdx() const
 EditPosition::EditPosition(EditEngine* pEE, EditSelection* pSel) :
 mpEditEngine(pEE), mpCurSel(pSel) {}
 
-std::unique_ptr EditPosition::Clone() const
-{
-return std::unique_ptr(new EditPosition(mpEditEngine, 
mpCurSel));
-}
-
 std::unique_ptr EditPosition::MakeNodeIdx() const
 {
 return std::make_unique(mpEditEngine, 
mpCurSel->Max().GetNode());
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index de9a66d8eddc..699fe0834f7e 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -206,8 +206,8 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
 break;
 
 SvxRTFItemStackType* pCurrent = aAttrStack.empty() ? nullptr : 
aAttrStack.back().get();
-if( !pCurrent || (pCurrent->pSttNd->GetIdx() == 
pInsPos->GetNodeIdx() &&
-pCurrent->nSttCnt == pInsPos->GetCntIdx() ))
+if( !pCurrent || (pCurrent->pSttNd->GetIdx() == 
mxInsertPosition->GetNodeIdx() &&
+pCurrent->nSttCnt == mxInsertPosition->GetCntIdx() ))
 break;
 
 int nLastToken = GetStackPtr(-1)->nTokenId;
@@ -219,7 +219,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
 {
 // Open a new Group
 std::unique_ptr pNew(new 
SvxRTFItemStackType(
-*pCurrent, *pInsPos, true ));
+*pCurrent, *mxInsertPosition, 
true ));
 pNew->SetRTFDefaults( GetRTFDefaults() );
 
 // "Set" all valid attributes up until this point
@@ -232,7 +232,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
 }
 else
 // continue to use this entry as a new one
-pCurrent->SetStartPos( *pInsPos );
+pCurrent->SetStartPos( *mxInsertPosition );
 
 pSet = &pCurrent->aAttrSet;
 } while( false );
@@ -1704,7 +1704,7 @@ void SvxRTFParser::RTFPardPlain( bool const bPard, 
SfxItemSet** ppSet )
 if (pCurrent->aAttrSet.Count() || pCurrent->m_pChildList || 
pCurrent->nStyleNo)
 {
 // open a new group
-std::unique_ptr pNew(new SvxRTFItemStackType( 
*pCurrent, *pInsPos, true ));
+std::unique_ptr pNew(new SvxRTFItemStackType( 
*pCurrent, *mxInsertPosition, true ));
 pNew->SetRTFDefaults( GetRTFDefaults() );
 
 // Set all until here valid attributes
@@ -1717,7 +1717,7 @@ void SvxRTFParser::RTFPardPlain( bool const bPard, 
SfxItemSet** ppSet )
 else
 {
 // continue to use this entry as new
-pCurrent->SetStartPos( *pInsPos );
+pCurrent->SetStartPos( *mxInsertPosition );
 bNewStkEntry = false;
 }
 }
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 4bf5c3811bdc..df0f030f0c57 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -83,14 +83,14 @@ SvxRTFParser::~SvxRTFParser()
 
 void SvxRTFParser::SetInsPos( const EditPosition& rNew )
 {
-pInsPos = rNew.Clone();
+mxInsertPosition = rNew;
 }
 
 SvParserState SvxRTFParser::CallParser()
 {
-DBG_ASSERT( pInsPos, "no insertion position");
+DBG_ASSERT( mxInsertPosition, "no insertion position");
 
-if( !pInsPos )
+if( !mxInsertPosition )
 return SvParserState::Error;
 
 if( !maColorTable.empty() )
@@ -614,10 +614,10 @@ SvxRTFItemStackType* SvxRTFParser::GetAttrSet_()
 SvxRTFItemStackType* pCurrent = aAttrStack.empty() ? nullptr : 
aAttrStack.back().get();
 std::unique_ptr pNew;
 if( pCurrent )
-pNew.reset(new SvxRTFItemStackType( *pCurrent, *pInsPos, 
false/*bCopyAttr*/ ));
+pNew.reset(new SvxRTFItemStackType( *pCurrent, *mxInsertPosition

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

2021-05-31 Thread Noel Grandin (via logerrit)
 editeng/source/editeng/impedit2.cxx |4 ++--
 editeng/source/editeng/impedit4.cxx |8 
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 962bc9059e875f98e244b584c582f5b1674106b9
Author: Noel Grandin 
AuthorDate: Mon May 31 09:27:48 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 18:32:16 2021 +0200

no need to allocate these on the heap

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

diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 76285d237fd8..dae90e5e435a 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2950,7 +2950,7 @@ bool ImpEditEngine::UpdateFields()
 if (rAttr.Which() == EE_FEATURE_FIELD)
 {
 EditCharAttribField& rField = 
static_cast(rAttr);
-std::unique_ptr pCurrent(new 
EditCharAttribField(rField));
+EditCharAttribField aCurrent(rField);
 rField.Reset();
 
 if (!aStatus.MarkNonUrlFields() && !aStatus.MarkUrlFields())
@@ -2975,7 +2975,7 @@ bool ImpEditEngine::UpdateFields()
 nPara, rField.GetStart(), rField.GetTextColor(), 
rField.GetFieldColor());
 
 rField.SetFieldValue(aFldValue);
-if (rField != *pCurrent)
+if (rField != aCurrent)
 {
 bChanges = true;
 bChangesInPara = true;
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index a105dc77142c..059d0bc7a523 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1456,10 +1456,10 @@ EESpellState ImpEditEngine::Spell(EditView* pEditView, 
weld::Widget* pDialogPare
 else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart )
 bIsStart = true;
 
-std::unique_ptr pWrp(new EditSpellWrapper(pDialogParent,
-bIsStart, pEditView ));
-pWrp->SpellDocument();
-pWrp.reset();
+{
+EditSpellWrapper aWrp(pDialogParent, bIsStart, pEditView );
+aWrp.SpellDocument();
+}
 
 if ( !bMultipleDoc )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-05-31 Thread Kevin Suo (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c4809b7c4e7f198464293e36d7f04cafe93597fc
Author: Kevin Suo 
AuthorDate: Tue Jun 1 00:18:39 2021 +0800
Commit: Gerrit Code Review 
CommitDate: Mon May 31 18:18:39 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to e36e33937f9cda7fde9ab56f9eb25f6f549700c7
  - tdf#142531: fix help css for Simplified Chinese display on Linux

The font "system-ui" may cause trouble in some system, although it may 
look good in several systems.
See e.g. https://infinnie.github.io/blog/2017/systemui.html.

This change removes the "system-ui" font from the list, still put 
"Segoe UI" before any others, but moves "sans-serif" forward so that it falls 
back to the UI font in most linux distros.

Tested on Win10 and this does not impact the display for English or 
Chinese, but really improves a lot on Linux (Fedora 32 for me).

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

diff --git a/helpcontent2 b/helpcontent2
index 226a545d3366..e36e33937f9c 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 226a545d33667a0c9526593a5182ac0a849933e2
+Subproject commit e36e33937f9cda7fde9ab56f9eb25f6f549700c7
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/default.css

2021-05-31 Thread Kevin Suo (via logerrit)
 help3xsl/default.css |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e36e33937f9cda7fde9ab56f9eb25f6f549700c7
Author: Kevin Suo 
AuthorDate: Mon May 31 23:34:25 2021 +0800
Commit: Olivier Hallot 
CommitDate: Mon May 31 18:18:39 2021 +0200

tdf#142531: fix help css for Simplified Chinese display on Linux

The font "system-ui" may cause trouble in some system, although it may look 
good in several systems.
See e.g. https://infinnie.github.io/blog/2017/systemui.html.

This change removes the "system-ui" font from the list, still put "Segoe 
UI" before any others, but moves "sans-serif" forward so that it falls back to 
the UI font in most linux distros.

Tested on Win10 and this does not impact the display for English or 
Chinese, but really improves a lot on Linux (Fedora 32 for me).

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

diff --git a/help3xsl/default.css b/help3xsl/default.css
index 29cb0f010..2eff6c39f 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -40,7 +40,7 @@ h6,
 .listitem,
 .listitemintable,
 .tablecontent {
-font-family: -apple-system, system-ui, "Segoe UI", Roboto, Ubuntu, 
Cantarell, "Noto Sans", "DejaVu Sans", "Lucida Grande", "Helvetica Neue", 
Helvetica, Arial, sans-serif, FreeSerif, NanumGothic, "Noto Sans Tibetan", 
Taprom;
+font-family: -apple-system, "Segoe UI", sans-serif, Roboto, Ubuntu, 
Cantarell, "Noto Sans", "DejaVu Sans", "Lucida Grande", "Helvetica Neue", 
Helvetica, Arial, FreeSerif, NanumGothic, "Noto Sans Tibetan", Taprom;
 }
 .input {
 background-color: rgba(0,0,0,0.04);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Help for Build DEB and/or RPM Packages

2021-05-31 Thread siqin

Hi All.

I am want to build LibreOffice on Ubuntu 20.10.

According to the "Building LibreOffice on Linux and *BSD systems: Tips 
and Tricks"


1. Install the dependencies.

    Debian and Ubuntu

2. Cloning and building.

    git clone https://gerrit.libreoffice.org/core libreoffice
    cd libreoffice
    ./autogen.sh
    make check

3. Running build

    instdir/program/soffice --writer
    instdir/program/soffice --calc

It was okay so far, But when build DEB and/or RPM Packages, I got an error.

    ./autogen.sh --with-distro=LibreOfficeLinux 
--with-package-format="deb rpm" --enable-epm

    make

./configure: line 40704: cd: ../share/ant/bin: No such file or directory
./configure: line 40704: cd: ../share/ant/bin: No such file or directory
./configure: line 40704: cd: ../share/ant/bin: No such file or directory
./configure: line 40704: cd: ../share/ant/bin: No such file or directory

.

Did I miss something?

    ant -version

    Apache Ant(TM) version 1.10.8 compiled on January 8 1970

Thank you.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


100 Paper Cuts - GSoC

2021-05-31 Thread Bayram Çiçek

Hello LibreOffice Community,

I'm Bayram Çiçek. I am so happy and excited to be a part of LibreOffice 
as a GSoC student.


My project is 100 Paper Cuts 
 
. The project aims to improve LibreOffice's user interface, implementing 
enhancement requests and solving the most annoying UX issues. I will try 
to solve as many issues as I can during GSoC.


I'm very thankful to the GSoC and LibreOffice to provide this great 
opportunity.


--

Regards,
Bayram Çiçek

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-05-31 Thread Mike Kaganski (via logerrit)
 solenv/gbuild/platform/com_MSC_defs.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 0f5eb62300255d60d144cdf5dfe90f754cca15ed
Author: Mike Kaganski 
AuthorDate: Mon May 31 14:11:54 2021 +0200
Commit: Mike Kaganski 
CommitDate: Mon May 31 16:50:44 2021 +0200

Enable -bigobj on MSVC

This fixes this error:

  C:\lo\src\core\sc\qa\unit\ucalc_copypaste.cxx : fatal error C1128: number 
of sections exceeded object file format limit: compile with /bigobj

According to [1], it is enabled by default in all UWP projects, which
presumably means there's no harm in enabling it (other than some
compiling overhead, which impact is unclear at the moment).

Enabling it unconditionally, it would not create a mismatch like in
7788e87ce25183c1d6f92a3b972b8dd8c88e58e3.

[1] 
https://docs.microsoft.com/en-us/cpp/build/reference/bigobj-increase-number-of-sections-in-dot-obj-file

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

diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
index 2737cfa26af9..1fa6d87bdd29 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -113,6 +113,7 @@ gb_CFLAGS := \
-W4 \
-wd4244 \
-wd4505 \
+   -bigobj \
 
 gb_CXXFLAGS_DISABLE_WARNINGS = -w
 
@@ -145,6 +146,7 @@ gb_CXXFLAGS := \
-wd4505 \
-wd4611 \
-wd4706 \
+   -bigobj \
 
 ifeq ($(CPUNAME),INTEL)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/default.css helpers/convertfilters.py source/text

2021-05-31 Thread Kevin Suo (via logerrit)
 help3xsl/default.css|6 
 helpers/convertfilters.py   |  235 +++-
 source/text/shared/guide/convertfilters.xhp | 1401 ++--
 3 files changed, 696 insertions(+), 946 deletions(-)

New commits:
commit 226a545d33667a0c9526593a5182ac0a849933e2
Author: Kevin Suo 
AuthorDate: Sun May 30 20:39:31 2021 +0800
Commit: Olivier Hallot 
CommitDate: Mon May 31 16:45:00 2021 +0200

tdf#142417: Improve convertfilters.py and add API Names column

This commit involves two parts:
1. Improved the convertfilters.py helper script to make sure
 the generated convertfilters.xhp file is complete, accurate
 and containing no duplicated entries, and also add codes
 to also generate API Names column, as discussed in tdf#142417.
 Importantly, the code is modified to generate fixed IDs,
 rather than the previously random IDs or sequential IDs which
 may make the PO translation strings to show fuzzy when the
 file is re-generated.
2. This helper script is run and the convertfilters.xhp is
 updated.
3. The default css is modified to better display the page.
 There is no need to set overflow=auto for the DisplayArea,
 otherwise the scrollbar goes to the bottom of that area which
 is not visible. Also added a css class to display smaller
 fonts for the table.

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

diff --git a/help3xsl/default.css b/help3xsl/default.css
index ce1dd77f8..29cb0f010 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -196,8 +196,6 @@ table {
 background: #FEFEFE;
 box-shadow: rgba(0,0,0,0.08) 0 1px 5px 0;
 border-collapse: collapse;
-margin-left: auto;
-margin-right: auto;
 }
 table, th, td {
 border-top: 0;
@@ -216,6 +214,10 @@ table, th, td {
 vertical-align:top;
 }
 
+.table_font_small {
+font-size: 0.98rem;
+}
+
 h1,
 h2,
 h3,
diff --git a/helpers/convertfilters.py b/helpers/convertfilters.py
old mode 100644
new mode 100755
index 209a78c1d..dcb25af00
--- a/helpers/convertfilters.py
+++ b/helpers/convertfilters.py
@@ -6,106 +6,173 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
-# Run this in instdir/share/registry/
+# This script is used to generate the convertfilters.xhp file located
+# in helpcontent2/source/text/shared/guide.
+#
+# Run this script followed by the path of instdir/share/registry/
+# i.e.: ./convertfilters.py /path/to/source/core/instdir/share/registry
+# 
 # Requires Python 3.6 or greater.
 
+import os
 import sys
 import random
 import time
 from math import floor
 from lxml import etree
 
+output_file_path = os.path.join(os.path.dirname(sys.argv[0]), 
"convertfilters.xhp")
+try:
+registry_dir = sys.argv[1]
+except IndexError:
+print("Usage: ./convertfilters.py 
/path/to/source/core/instdir/share/registry")
+sys.exit(1)
+
+if not os.path.exists(registry_dir):
+print(f"{registry_dir} does not exist. Make sure you have built the core 
repo before running this script")
+sys.exit(1)
+
 modules = 
["writer.xcd","calc.xcd","impress.xcd","draw.xcd","math.xcd","base.xcd","graphicfilter.xcd"]
 
-def rdm(prefix):
-return prefix + "_id" + str(floor(random.random() * 1000) + 1) + 
str(int(time.time()))
+def gen_id(apiname):
+'''This function accepts module name and an API Name of the filter, and 
then generate 
+a unique ID. API Names are used since they are unique within the page.
+
+Do not use random numbers or sequence-count numbers here since it will 
cause all words to be "fuzzy" in PO files
+when the xhp file is regenerated.
+'''
+apiname = apiname.replace(" ", "_")
+apiname = apiname.replace("(", "_")
+apiname = apiname.replace(")", "_")
+apiname = apiname.replace("/", "_")
+
+return apiname
 
-output = ""
-output += f'\n'
-output += f'\n'
-output += f'\n'
-output += f'\n'
-output += f'\n'
-output += f'File Conversion Filters 
Tables\n'
-output += f'/text/shared/guide/convertfilters.xhp\n'
-output += f'\n\n\n'
-output += f'\n'
-output += f'\n'
-output += f'filters;document conversion\n'
-output += f'document conversion;filters\n'
-output += f'convert-to;filters\n'
-output += f'command line document 
conversion;filters\n'
-output += f'module file filters\n'
-output += f'\n'
-output += f'File 
Conversion Filter Names\n'
-output += f'Tables with filter 
names for command line document conversion.\n'
-output += f'\n'
-output += f'Filter 
nameMedia 
typeFile name 
extensions\n'
+output = '''
+
+
+
+
+File Conversion Filters Tables
+/text/shared/guide/convertfilters.xhp
+
+
+
+
+
+filters;document conversion
+document conversion;filters
+convert-to;filters
+command lin

[Libreoffice-commits] core.git: 2 commits - helpcontent2 translations

2021-05-31 Thread Kevin Suo (via logerrit)
 helpcontent2 |2 +-
 translations |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit cfca68e0f70f6b9fa54f32cc21585c073677229b
Author: Kevin Suo 
AuthorDate: Mon May 31 22:45:00 2021 +0800
Commit: Gerrit Code Review 
CommitDate: Mon May 31 16:45:00 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 226a545d33667a0c9526593a5182ac0a849933e2
  - tdf#142417: Improve convertfilters.py and add API Names column

This commit involves two parts:
1. Improved the convertfilters.py helper script to make sure
 the generated convertfilters.xhp file is complete, accurate
 and containing no duplicated entries, and also add codes
 to also generate API Names column, as discussed in tdf#142417.
 Importantly, the code is modified to generate fixed IDs,
 rather than the previously random IDs or sequential IDs which
 may make the PO translation strings to show fuzzy when the
 file is re-generated.
2. This helper script is run and the convertfilters.xhp is
 updated.
3. The default css is modified to better display the page.
 There is no need to set overflow=auto for the DisplayArea,
 otherwise the scrollbar goes to the bottom of that area which
 is not visible. Also added a css class to display smaller
 fonts for the table.

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

diff --git a/helpcontent2 b/helpcontent2
index 8ca38307bd81..226a545d3366 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8ca38307bd81fbb37a664dd848fd1fda2c2b4181
+Subproject commit 226a545d33667a0c9526593a5182ac0a849933e2
commit cf23ebbbc356aa676077494585781ba6e8f937ba
Author: Christian Lohmaier 
AuthorDate: Mon May 31 16:40:33 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Mon May 31 16:40:33 2021 +0200

Update git submodules

* Update translations from branch 'master'
  to 387ea1005f554dadedc7073e947bbd93dfa38c25
  - update translations for master

and force-fix errors using pocheck

Change-Id: I5a54db2572738c26858f69eba71239fa9474f0a4

diff --git a/translations b/translations
index 48ffdf216a07..387ea1005f55 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 48ffdf216a07738135223c4f95e9f942be8a5dd9
+Subproject commit 387ea1005f554dadedc7073e947bbd93dfa38c25
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Noel Grandin (via logerrit)
 xmlscript/source/xmldlg_imexp/imp_share.hxx|2 ++
 xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx |3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 057b25c04ea1032c20d99fc3eda88680cd0b9e54
Author: Noel Grandin 
AuthorDate: Mon May 31 10:57:33 2021 +0200
Commit: Caolán McNamara 
CommitDate: Mon May 31 16:19:53 2021 +0200

crashtesting fix

when doing
soffice --convert-to ods tdf96952-1.xls

after
commit 5c79032077d387053c62829d62518695f68555c1
Date:   Tue May 25 09:32:58 2021 +0200
fix leaks in loading xmlscript

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

diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx 
b/xmlscript/source/xmldlg_imexp/imp_share.hxx
index 99a52b58dcb1..2cc574c01b93 100644
--- a/xmlscript/source/xmldlg_imexp/imp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx
@@ -531,6 +531,8 @@ public:
 class BulletinBoardElement
 : public ControlElement
 {
+// we are the owner of this, so have to keep a reference to it
+rtl::Reference mxDialogImport;
 public:
 virtual css::uno::Reference< css::xml::input::XElement >
 SAL_CALL startChildElement(
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx 
b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index da2fd2d2c412..66a69a2b5518 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -1725,7 +1725,8 @@ BulletinBoardElement::BulletinBoardElement(
 OUString const & rLocalName,
 Reference< xml::input::XAttributes > const & xAttributes,
 ElementBase * pParent, DialogImport * pImport )
-: ControlElement( rLocalName, xAttributes, pParent, pImport )
+: ControlElement( rLocalName, xAttributes, pParent, pImport ),
+  mxDialogImport(pImport)
 {
 OUString aValue( _xAttributes->getValueByUidName( 
m_pImport->XMLNS_DIALOGS_UID, "left" ) );
 if (!aValue.isEmpty())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: sigma symbol tailoring

2021-05-31 Thread KKing

However, there is the .uno:AutoSum that does the original action. So, you
can customize to assign to Menu, a Toolbar, a Context menu, or a Keyboard
short-cut.
ta, how do I call ".uno:AutoSum" do I have setup a reference to 
"com.sun.star. something"


Also wondered about sendkeys ALT+=
But I must be missing something


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/comphelper

2021-05-31 Thread Tor Lillqvist (via logerrit)
 include/comphelper/profilezone.hxx |   36 +++-
 include/comphelper/traceevent.hxx  |   20 +++-
 2 files changed, 38 insertions(+), 18 deletions(-)

New commits:
commit e42bcedec1c825e4cbc6eb0e955dd4e26696c4d4
Author: Tor Lillqvist 
AuthorDate: Mon May 31 15:55:20 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Mon May 31 16:08:10 2021 +0200

Avoid empty std::map constructor

Change-Id: Ie1bc333409fb201d82dd2cff7597e281600f01db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116449
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/include/comphelper/profilezone.hxx 
b/include/comphelper/profilezone.hxx
index c3e68f83ce13..f771a618fb54 100644
--- a/include/comphelper/profilezone.hxx
+++ b/include/comphelper/profilezone.hxx
@@ -31,6 +31,23 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent
 
 void addRecording();
 
+ ProfileZone(const char* sName, const OUString &sArgs, bool bConsole)
+: NamedEvent(sName, sArgs)
+, m_bConsole(bConsole)
+, m_nNesting(-1)
+{
+if (s_bRecording || m_bConsole)
+{
+TimeValue systemTime;
+osl_getSystemTime( &systemTime );
+m_nCreateTime = static_cast(systemTime.Seconds) * 
100 + systemTime.Nanosec/1000;
+
+m_nNesting = s_nNesting++;
+}
+else
+m_nCreateTime = 0;
+}
+
  public:
 
 /**
@@ -48,21 +65,14 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent
  * Similar to the DEBUG macro in sal/log.hxx, don't forget to remove these 
lines before
  * committing.
  */
-ProfileZone(const char* sName, bool bConsole = false, const 
std::map &args = std::map())
-: NamedEvent(sName, args)
-, m_bConsole(bConsole)
-, m_nNesting(-1)
+ProfileZone(const char* sName, const std::map &aArgs, 
bool bConsole = false)
+: ProfileZone(sName, createArgsString(aArgs), bConsole)
 {
-if (s_bRecording || m_bConsole)
-{
-TimeValue systemTime;
-osl_getSystemTime( &systemTime );
-m_nCreateTime = static_cast(systemTime.Seconds) * 
100 + systemTime.Nanosec/1000;
+}
 
-m_nNesting = s_nNesting++;
-}
-else
-m_nCreateTime = 0;
+ProfileZone(const char* sName, bool bConsole = false)
+: ProfileZone(sName, OUString(), bConsole)
+{
 }
 
 ~ProfileZone()
diff --git a/include/comphelper/traceevent.hxx 
b/include/comphelper/traceevent.hxx
index 339e924e637d..d3189cbc85f1 100644
--- a/include/comphelper/traceevent.hxx
+++ b/include/comphelper/traceevent.hxx
@@ -82,12 +82,17 @@ protected:
 const int m_nPid;
 const OUString m_sArgs;
 
-TraceEvent(std::map args)
+TraceEvent(const OUString& sArgs)
 : m_nPid(getPid())
-, m_sArgs(createArgsString(args))
+, m_sArgs(sArgs)
 {
 }
 
+TraceEvent(std::map aArgs)
+: TraceEvent(createArgsString(aArgs))
+ {
+ }
+
 public:
 static void addInstantEvent(const char* sName, const std::map& args
= std::map());
@@ -105,9 +110,14 @@ class COMPHELPER_DLLPUBLIC NamedEvent : public TraceEvent
 protected:
 const char* m_sName;
 
-NamedEvent(const char* sName,
-   const std::map& args = std::map())
-: TraceEvent(args)
+NamedEvent(const char* sName, const OUString& sArgs)
+: TraceEvent(sArgs)
+, m_sName(sName ? sName : "(null)")
+{
+}
+
+NamedEvent(const char* sName, const std::map& aArgs)
+: TraceEvent(aArgs)
 , m_sName(sName ? sName : "(null)")
 {
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source editeng/source filter/source include/editeng sc/source sd/qa sd/source svx/source sw/source

2021-05-31 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/numpages.cxx|   24 ++--
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |2 
 editeng/source/editeng/editdbg.cxx  |2 
 editeng/source/items/numitem.cxx|   66 
 editeng/source/outliner/outliner.cxx|4 
 editeng/source/outliner/outlvw.cxx  |   14 +-
 editeng/source/uno/unonrule.cxx |   15 --
 filter/source/msfilter/svdfppt.cxx  |   37 +++---
 include/editeng/numitem.hxx |9 +
 include/editeng/unonrule.hxx|2 
 sc/source/ui/unoobj/styleuno.cxx|2 
 sd/qa/unit/export-tests-ooxml1.cxx  |   10 -
 sd/qa/unit/export-tests-ooxml2.cxx  |2 
 sd/qa/unit/import-tests.cxx |   20 +--
 sd/qa/unit/tiledrendering/tiledrendering.cxx|4 
 sd/source/core/stlpool.cxx  |2 
 sd/source/ui/dlg/BulletAndPositionDlg.cxx   |4 
 sd/source/ui/dlg/dlgolbul.cxx   |   20 +--
 sd/source/ui/dlg/prltempl.cxx   |2 
 sd/source/ui/func/fuolbull.cxx  |   15 +-
 sd/source/ui/func/futempl.cxx   |2 
 sd/source/ui/view/drtxtob1.cxx  |2 
 sd/source/ui/view/drviews3.cxx  |   12 --
 sd/source/ui/view/drviewsf.cxx  |2 
 sd/source/ui/view/viewshel.cxx  |   13 --
 svx/source/unodraw/unomod.cxx   |6 -
 sw/source/uibase/app/docstyle.cxx   |6 -
 sw/source/uibase/shells/txtnum.cxx  |   10 -
 28 files changed, 160 insertions(+), 149 deletions(-)

New commits:
commit 5b8729a741bd65c2f61ae9caba7ea15a139835e5
Author: Noel Grandin 
AuthorDate: Mon May 31 09:19:20 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 15:50:04 2021 +0200

no need to allocate SvxNumRule separately in SvxNumBulletItem

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

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index df227f53346d..fbeb40aa4b3d 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -239,7 +239,7 @@ void  SvxSingleNumPickTabPage::ActivatePage(const 
SfxItemSet& rSet)
 }
 if(SfxItemState::SET == rSet.GetItemState(nNumItemId, false, &pItem))
 {
-pSaveNum.reset( new SvxNumRule(*static_cast(pItem)->GetNumRule()) );
+pSaveNum.reset( new SvxNumRule(static_cast(pItem)->GetNumRule()) );
 }
 if(pActNum && *pSaveNum != *pActNum)
 {
@@ -283,7 +283,7 @@ void  SvxSingleNumPickTabPage::Reset( const SfxItemSet* 
rSet )
 }
 }
 DBG_ASSERT(eState == SfxItemState::SET, "no item found!");
-pSaveNum.reset( new SvxNumRule(*static_cast(pItem)->GetNumRule()) );
+pSaveNum.reset( new SvxNumRule(static_cast(pItem)->GetNumRule()) );
 
 if(!pActNum)
 pActNum.reset( new SvxNumRule(*pSaveNum) );
@@ -390,7 +390,7 @@ void  SvxBulletPickTabPage::ActivatePage(const SfxItemSet& 
rSet)
 }
 if(SfxItemState::SET == rSet.GetItemState(nNumItemId, false, &pItem))
 {
-pSaveNum.reset( new SvxNumRule(*static_cast(pItem)->GetNumRule()) );
+pSaveNum.reset( new SvxNumRule(static_cast(pItem)->GetNumRule()) );
 }
 if(pActNum && *pSaveNum != *pActNum)
 {
@@ -433,7 +433,7 @@ void  SvxBulletPickTabPage::Reset( const SfxItemSet* rSet )
 
 }
 DBG_ASSERT(eState == SfxItemState::SET, "no item found!");
-pSaveNum.reset( new SvxNumRule(*static_cast(pItem)->GetNumRule()) );
+pSaveNum.reset( new SvxNumRule(static_cast(pItem)->GetNumRule()) );
 
 if(!pActNum)
 pActNum.reset( new SvxNumRule(*pSaveNum) );
@@ -573,7 +573,7 @@ void  SvxNumPickTabPage::ActivatePage(const SfxItemSet& 
rSet)
 }
 if(SfxItemState::SET == rSet.GetItemState(nNumItemId, false, &pItem))
 {
-pSaveNum.reset( new SvxNumRule(*static_cast(pItem)->GetNumRule()) );
+pSaveNum.reset( new SvxNumRule(static_cast(pItem)->GetNumRule()) );
 }
 if(pActNum && *pSaveNum != *pActNum)
 {
@@ -616,7 +616,7 @@ void  SvxNumPickTabPage::Reset( const SfxItemSet* rSet )
 
 }
 DBG_ASSERT(eState == SfxItemState::SET, "no item found!");
-pSaveNum.reset( new SvxNumRule(*static_cast(pItem)->GetNumRule()) );
+pSaveNum.reset( new SvxNumRule(static_cast(pItem)->GetNumRule()) );
 
 if(!pActNum)
 pActNum.reset( new SvxNumRule(*pSaveNum) );
@@ -801,7 +801,7 @@ void  SvxBitmap

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

2021-05-31 Thread Stephan Bergmann (via logerrit)
 sd/source/ui/remotecontrol/DiscoveryService.cxx |   12 +---
 1 file changed, 1 insertion(+), 11 deletions(-)

New commits:
commit 68a6c70f25762374f7aed0d4d755345c6f37c78d
Author: Stephan Bergmann 
AuthorDate: Mon May 31 10:56:38 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 31 15:23:50 2021 +0200

Simplify construction of a hardcoded IPv4 address

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

diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx 
b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 9ed2ae727761..cf0043387403 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -119,17 +119,7 @@ void DiscoveryService::setupSockets()
 
 struct ip_mreq multicastRequest;
 
-// the Win32 SDK 8.1 deprecates inet_addr()
-#if defined(_WIN32)
-IN_ADDR addr;
-INT ret = InetPtonW(AF_INET, L"239.0.0.1", & addr);
-if (1 == ret)
-{
-multicastRequest.imr_multiaddr.s_addr = addr.S_un.S_addr;
-}
-#else
-multicastRequest.imr_multiaddr.s_addr = inet_addr( "239.0.0.1" );
-#endif
+multicastRequest.imr_multiaddr.s_addr = htonl((239U << 24) | 1U); // 
239.0.0.1
 multicastRequest.imr_interface.s_addr = htonl(INADDR_ANY);
 
 rc = setsockopt( mSocket, IPPROTO_IP, IP_ADD_MEMBERSHIP,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/osl sal/qa

2021-05-31 Thread Stephan Bergmann (via logerrit)
 sal/osl/unx/socket.cxx |   11 +++
 sal/qa/osl/socket.cxx  |   22 +++---
 2 files changed, 26 insertions(+), 7 deletions(-)

New commits:
commit 1fef071c01caf6c293dd941ee7c8340e6894afc3
Author: Stephan Bergmann 
AuthorDate: Mon May 31 11:29:48 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 31 15:22:33 2021 +0200

Replace inet_addr with inet_pton

...as inet_addr is deprecated (it does not allow to distinguish successful
return for "255.255.255.255" from -1 error return); and update tests

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

diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx
index c78e43a9de93..cc1798e4eb1d 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -426,7 +426,10 @@ oslSocketAddr SAL_CALL osl_createInetBroadcastAddr (
 &pDottedAddr, strDottedAddr->buffer, strDottedAddr->length,
 RTL_TEXTENCODING_UTF8, OUSTRING_TO_OSTRING_CVTFLAGS);
 
-nAddr = inet_addr (pDottedAddr->buffer);
+in_addr buf;
+if (inet_pton (AF_INET, pDottedAddr->buffer, &buf) == 1) {
+nAddr = buf.s_addr;
+}
 rtl_string_release (pDottedAddr);
 }
 
@@ -494,11 +497,11 @@ oslSocketAddr osl_psz_createInetSocketAddr (
 sal_Int32   Port)
 {
 oslSocketAddr pAddr = nullptr;
-sal_Int32 Addr = inet_addr(pszDottedAddr);
-if(Addr != -1)
+in_addr buf;
+if(inet_pton(AF_INET, pszDottedAddr, &buf) == 1)
 {
 /* valid dotted addr */
-pAddr = createSocketAddrWithFamily( osl_Socket_FamilyInet, htons(Port) 
, Addr );
+pAddr = createSocketAddrWithFamily( osl_Socket_FamilyInet, htons(Port) 
, buf.s_addr );
 }
 return pAddr;
 }
diff --git a/sal/qa/osl/socket.cxx b/sal/qa/osl/socket.cxx
index dab2621f2293..813702f4ca21 100644
--- a/sal/qa/osl/socket.cxx
+++ b/sal/qa/osl/socket.cxx
@@ -19,18 +19,34 @@ namespace
 class SocketTest : public CppUnit::TestFixture
 {
 CPPUNIT_TEST_SUITE(SocketTest);
-CPPUNIT_TEST(test_getDottedInetAddrOfSocketAddr);
+CPPUNIT_TEST(test_createInetSocketAddr);
+CPPUNIT_TEST(test_createInetBroadcastAddr);
 CPPUNIT_TEST_SUITE_END();
 
-void test_getDottedInetAddrOfSocketAddr()
+void test_createInetSocketAddr()
 {
 OUString const in("123.4.56.78");
-auto const addr = osl_createInetSocketAddr(in.pData, 0);
+auto const addr = osl_createInetSocketAddr(in.pData, 100);
 CPPUNIT_ASSERT(addr != nullptr);
+CPPUNIT_ASSERT_EQUAL(osl_Socket_FamilyInet, 
osl_getFamilyOfSocketAddr(addr));
 OUString out;
 auto const res = osl_getDottedInetAddrOfSocketAddr(addr, &out.pData);
 CPPUNIT_ASSERT_EQUAL(osl_Socket_Ok, res);
 CPPUNIT_ASSERT_EQUAL(in, out);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(100), 
osl_getInetPortOfSocketAddr(addr));
+}
+
+void test_createInetBroadcastAddr()
+{
+OUString const in("123.4.56.78");
+auto const addr = osl_createInetBroadcastAddr(in.pData, 100);
+CPPUNIT_ASSERT(addr != nullptr);
+CPPUNIT_ASSERT_EQUAL(osl_Socket_FamilyInet, 
osl_getFamilyOfSocketAddr(addr));
+OUString out;
+auto const res = osl_getDottedInetAddrOfSocketAddr(addr, &out.pData);
+CPPUNIT_ASSERT_EQUAL(osl_Socket_Ok, res);
+CPPUNIT_ASSERT_EQUAL(OUString("123.255.255.255"), out);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(100), 
osl_getInetPortOfSocketAddr(addr));
 }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Arnaud Versini (via logerrit)
 sdext/source/minimizer/pppoptimizertoken.cxx |9 +
 sdext/source/pdfimport/misc/pwdinteract.cxx  |   11 ++-
 2 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit d220fc00c2c3d7a2a24fd762599d1bfcc27f34d5
Author: Arnaud Versini 
AuthorDate: Sun May 30 19:32:41 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 15:21:39 2021 +0200

sdext : use std::mutex when possible

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

diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx 
b/sdext/source/minimizer/pppoptimizertoken.cxx
index 9a5c2eac9a62..9130621ff762 100644
--- a/sdext/source/minimizer/pppoptimizertoken.cxx
+++ b/sdext/source/minimizer/pppoptimizertoken.cxx
@@ -19,16 +19,17 @@
 
 
 #include "pppoptimizertoken.hxx"
-#include 
+
 #include 
 #include 
 #include 
+#include 
 
 typedef std::unordered_map< const char*, PPPOptimizerTokenEnum, 
rtl::CStringHash, rtl::CStringEqual> TypeNameHashMap;
 static TypeNameHashMap* pHashMap = nullptr;
-static ::osl::Mutex& getHashMapMutex()
+static std::mutex& getHashMapMutex()
 {
-static osl::Mutex s_aHashMapProtection;
+static std::mutex s_aHashMapProtection;
 return s_aHashMapProtection;
 }
 
@@ -166,7 +167,7 @@ PPPOptimizerTokenEnum TKGet( const OUString& rToken )
 {
 if ( !pHashMap )
 {   // init hash map
-::osl::MutexGuard aGuard( getHashMapMutex() );
+std::lock_guard aGuard( getHashMapMutex() );
 if ( !pHashMap )
 {
 TypeNameHashMap* pH = new TypeNameHashMap;
diff --git a/sdext/source/pdfimport/misc/pwdinteract.cxx 
b/sdext/source/pdfimport/misc/pwdinteract.cxx
index 4179795cc073..9885a6606a54 100644
--- a/sdext/source/pdfimport/misc/pwdinteract.cxx
+++ b/sdext/source/pdfimport/misc/pwdinteract.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -44,7 +45,7 @@ class PDFPasswordRequest:
 task::XInteractionRequest, task::XInteractionPassword >
 {
 private:
-mutable osl::Mutexm_aMutex;
+mutable std::mutexm_aMutex;
 uno::Any  m_aRequest;
 OUString m_aPassword;
 bool  m_bSelected;
@@ -65,7 +66,7 @@ public:
 // XInteractionContinuation
 virtual void SAL_CALL select() override;
 
-bool isSelected() const { osl::MutexGuard const guard( m_aMutex ); return 
m_bSelected; }
+bool isSelected() const { std::scoped_lock const guard( m_aMutex ); return 
m_bSelected; }
 
 private:
 virtual ~PDFPasswordRequest() override {}
@@ -98,21 +99,21 @@ uno::Sequence< uno::Reference< 
task::XInteractionContinuation > > PDFPasswordReq
 
 void PDFPasswordRequest::setPassword( const OUString& rPwd )
 {
-osl::MutexGuard const guard( m_aMutex );
+std::scoped_lock const guard( m_aMutex );
 
 m_aPassword = rPwd;
 }
 
 OUString PDFPasswordRequest::getPassword()
 {
-osl::MutexGuard const guard( m_aMutex );
+std::scoped_lock const guard( m_aMutex );
 
 return m_aPassword;
 }
 
 void PDFPasswordRequest::select()
 {
-osl::MutexGuard const guard( m_aMutex );
+std::scoped_lock const guard( m_aMutex );
 
 m_bSelected = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Arnaud Versini (via logerrit)
 canvas/source/factory/cf_service.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 39aa29712fe4c7a1c432cecf03d9d491537c02e6
Author: Arnaud Versini 
AuthorDate: Sun May 30 19:36:59 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 15:20:25 2021 +0200

canvas : use std::mutex in CanvasFactory

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

diff --git a/canvas/source/factory/cf_service.cxx 
b/canvas/source/factory/cf_service.cxx
index 4e31197de2be..6919d56fb219 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -21,6 +21,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -34,7 +35,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -58,7 +58,7 @@ class CanvasFactory
 typedef std::vector< CachePair >CacheVector;
 
 
-mutable ::osl::Mutex  m_mutex;
+mutable std::mutexm_mutex;
 Reference  m_xContext;
 Reference m_xCanvasConfigNameAccess;
 AvailVector   m_aAvailableImplementations;
@@ -288,7 +288,7 @@ Reference CanvasFactory::lookupAndUse(
 OUString const & serviceName, Sequence const & args,
 Reference const & xContext ) const
 {
-::osl::MutexGuard guard(m_mutex);
+std::lock_guard guard(m_mutex);
 
 // forcing last entry from impl list, if config flag set
 bool bForceLastEntry(false);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Noel (via logerrit)
 include/vcl/vclreferencebase.hxx |8 ++--
 include/vcl/window.hxx   |3 ++-
 vcl/qa/cppunit/lifecycle.cxx |4 ++--
 vcl/source/app/vclevent.cxx  |5 ++---
 vcl/source/window/window.cxx |   33 ++---
 5 files changed, 26 insertions(+), 27 deletions(-)

New commits:
commit 9abedad72c73ad83b66f3f8d261efdc5ce889683
Author: Noel 
AuthorDate: Sun Mar 28 10:28:45 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 15:19:31 2021 +0200

Drop Window::IsDisposed

in favour of the isDisposed in the VclReferenceBase base class,
so we have one flag for this instead of two.

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

diff --git a/include/vcl/vclreferencebase.hxx b/include/vcl/vclreferencebase.hxx
index b7dc2b9183a2..2ba39026a362 100644
--- a/include/vcl/vclreferencebase.hxx
+++ b/include/vcl/vclreferencebase.hxx
@@ -22,11 +22,14 @@
 #include 
 #include 
 
+class VclBuilder;
+
 class VCL_DLLPUBLIC VclReferenceBase
 {
 mutable oslInterlockedCount mnRefCnt;
 
 template friend class VclPtr;
+friend class ::VclBuilder; // needed by ::delete_by_window(vcl::Window 
*pWindow)
 
 public:
 void acquire() const
@@ -54,14 +57,15 @@ private:
 
 protected:
 VclReferenceBase();
-protected:
 virtual ~VclReferenceBase();
 
-protected:
+// This is only supposed to be called from disposeOnce
 virtual voiddispose();
 
 public:
+// This is normally supposed to be called from VclPtr::disposeAndClear
 voiddisposeOnce();
+
 boolisDisposed() const { return mbDisposed; }
 
 };
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 9d8c5ae954c5..1cdb347a486e 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -60,6 +60,7 @@ class VCLXWindow;
 class VclWindowEvent;
 class AllSettings;
 class InputContext;
+class VclEventListeners;
 enum class ImplPaintFlags;
 enum class VclEventId;
 enum class PointerStyle;
@@ -472,6 +473,7 @@ class VCL_DLLPUBLIC Window : public virtual VclReferenceBase
 friend class ::ImplBorderWindow;
 friend class ::PaintHelper;
 friend class ::LifecycleTest;
+friend class ::VclEventListeners;
 
 // TODO: improve missing functionality
 // only required because of SetFloatingMode()
@@ -796,7 +798,6 @@ public:
 boolIsMenuFloatingWindow() const;
 boolIsToolbarFloatingWindow() const;
 boolIsTopWindow() const;
-boolIsDisposed() const;
 SystemWindow*   GetSystemWindow() const;
 
 /// Can the widget derived from this Window do the double-buffering via 
RenderContext properly?
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx
index ee706178bad2..853cef3828e4 100644
--- a/vcl/qa/cppunit/lifecycle.cxx
+++ b/vcl/qa/cppunit/lifecycle.cxx
@@ -294,9 +294,9 @@ void LifecycleTest::testToolkit()
 // test UNO dispose
 css::uno::Reference xWinComponent = xWindow;
 CPPUNIT_ASSERT(xWinComponent.is());
-CPPUNIT_ASSERT(!pVclWin->getRef()->IsDisposed());
+CPPUNIT_ASSERT(!pVclWin->getRef()->isDisposed());
 xWinComponent->dispose();
-CPPUNIT_ASSERT(pVclWin->getRef()->IsDisposed());
+CPPUNIT_ASSERT(pVclWin->getRef()->isDisposed());
 
 // test UNO cleanup
 xWinComponent.clear();
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 8d2142fa4821..af6ff02a15a8 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -35,9 +35,8 @@ void VclEventListeners::Call( VclSimpleEvent& rEvent ) const
 if (VclWindowEvent* pWindowEvent = dynamic_cast(&rEvent))
 {
 VclPtr xWin(pWindowEvent->GetWindow());
-// see tdf#142549 before changing IsDisposed() to isDisposed(), maybe 
!xWin->mpWindowImpl
-// or special case VclEventId::ObjectDying ?
-while ( aIter != aEnd && (!xWin || !xWin->IsDisposed()) )
+// checking mpWindowImpl to see if disposal is complete yet
+while ( aIter != aEnd && (!xWin || xWin->mpWindowImpl) )
 {
 Link &rLink = *aIter;
 // check this hasn't been removed in some re-enterancy scenario 
fdo#47368
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index fa3cb12133d5..5c9d7c431437 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -134,17 +134,12 @@ namespace
 }
 #endif
 
-bool Window::IsDisposed() const
-{
-return !mpWindowImpl;
-}
-
 void Window::dispose()
 {
 assert( mpWindowImpl );
 assert( !mpWindowImpl->mbInDispose ); // should only be called from 
disposeOnce()
 assert( (!mpWindowImpl->mpParent

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

2021-05-31 Thread Noel Grandin (via logerrit)
 sc/source/ui/miscdlgs/acredlin.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6034b642581803e2cb2566abe0a0cab0cbfeb50a
Author: Noel Grandin 
AuthorDate: Mon May 31 11:41:27 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 15:18:16 2021 +0200

properly fix leak in ScAcceptChgDlg

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

diff --git a/sc/source/ui/miscdlgs/acredlin.cxx 
b/sc/source/ui/miscdlgs/acredlin.cxx
index 1f8f06e7a451..68ce160809fa 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -278,7 +278,7 @@ void ScAcceptChgDlg::ClearView()
 nAcceptCount=0;
 nRejectCount=0;
 weld::TreeView& rTreeView = pTheView->GetWidget();
-rTreeView.selected_foreach(
+rTreeView.all_foreach(
 [&rTreeView](weld::TreeIter& rEntry)
 {
 ScRedlinData *pEntryData = 
reinterpret_cast(rTreeView.get_id(rEntry).toInt64());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/ooxml-analyze' - bin/ooxml-analyze.py

2021-05-31 Thread Gülşah Köse (via logerrit)
 bin/ooxml-analyze.py |   38 ++
 1 file changed, 22 insertions(+), 16 deletions(-)

New commits:
commit 056ebfae35f6725b9089439a7bf868dad48fdd0f
Author: Gülşah Köse 
AuthorDate: Mon May 31 16:08:23 2021 +0300
Commit: Gülşah Köse 
CommitDate: Mon May 31 16:08:28 2021 +0300

Fix the use of exist extracted files path and change result output

Tool was counting the text context that consists of whitespaces.
Prevent this, not count that texts as text contexts eg:  " "

Change-Id: Ib71123b82082166addd423b734661a158ec2254e

diff --git a/bin/ooxml-analyze.py b/bin/ooxml-analyze.py
index 12b9ba590db9..9db39d8c47da 100755
--- a/bin/ooxml-analyze.py
+++ b/bin/ooxml-analyze.py
@@ -8,6 +8,7 @@ def main(argv):
 inputdir = ''
 outputdir = ''
 extracted_files_dir_by_user = ''
+extracted_files_dir = ''
 
 #read the arguments
 try:
@@ -34,23 +35,27 @@ def main(argv):
 # use default directory path for extracted ooxml files.
 extracted_files_dir = os.path.join(outputdir, 'extractedfiles')
 extract_files(inputdir, extracted_files_dir)
-
-# create seperate result files for each ooxml document as .result in output directory
-for ext_dir in get_list_of_subdir(extracted_files_dir):
-i = ext_dir.rfind('/')
-sub_result_name = ext_dir[i+1:] + ".result"
-sub_result_list = []
-count_elements(ext_dir, sub_result_list)
-sub_result_path = os.path.join(outputdir, sub_result_name)
-
-# sort the result sub list according to tag names
-sub_result_list = sorted(sub_result_list, key=lambda x: 
list(x[0].keys())[0], reverse=False)
-
-with open(sub_result_path, "w") as log_file:
-pprint.pprint(sub_result_list, log_file)
 else:
 # use user defined directory path for extracted ooxml files.
-count_elements(extracted_files_dir_by_user, result_list)
+extracted_files_dir = extracted_files_dir_by_user
+
+# create seperate result files for each ooxml document as .result in output directory
+for ext_dir in get_list_of_subdir(extracted_files_dir):
+i = ext_dir.rfind('/')
+sub_result_name = ext_dir[i+1:] + ".result"
+sub_result_list = []
+count_elements(ext_dir, sub_result_list)
+sub_result_path = os.path.join(outputdir, sub_result_name)
+
+# sort the result sub list according to tag names
+sub_result_list = sorted(sub_result_list, key=lambda x: 
list(x[0].keys())[0], reverse=False)
+
+if os.path.exists(sub_result_path):
+os.remove(sub_result_path)
+for i in sub_result_list:
+with open(sub_result_path, "a") as log_file:
+print(i, file=log_file)
+log_file.close()
 
 # unzip all ooxml files into the given path
 def extract_files(inputdir, extracted_files_dir):
@@ -154,7 +159,8 @@ def count_elements(extracted_files_dir, result_list):
 else:
 result_list[tag_idx][2][attr_value] +=1
 
-if not (str(child.text) == "None"):
+# count text contents except consisted of whitespaces.
+if not (str(child.text) == "None" or str(child.text).strip()==""):
 if not child.text in result_list[tag_idx][3].keys():
 result_list[tag_idx][3][child.text] = 1
 else:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Caolán McNamara (via logerrit)
 compilerplugins/clang/reservedid.cxx |2 
 vcl/inc/unx/gtk/gtkinst.hxx  |   15 +
 vcl/unx/gtk3/gtkinst.cxx |  264 +++
 3 files changed, 255 insertions(+), 26 deletions(-)

New commits:
commit bf571610d3498b98bae30042fb23a4c0f4a4
Author: Caolán McNamara 
AuthorDate: Mon May 31 12:26:18 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 15:06:40 2021 +0200

gtk4: enable cut and paste into other applications

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

diff --git a/compilerplugins/clang/reservedid.cxx 
b/compilerplugins/clang/reservedid.cxx
index 169942f9c392..0792c96b2da6 100644
--- a/compilerplugins/clang/reservedid.cxx
+++ b/compilerplugins/clang/reservedid.cxx
@@ -197,6 +197,8 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) {
 // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
 && s != "_ADOUser"
 // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
+&& s != "_ClipboardContent" // vcl/unx/gtk3/gtkinst.cxx
+&& s != "_ClipboardContentClass" // vcl/unx/gtk3/gtkinst.cxx
 && s != "_FcPattern" // vcl/inc/unx/fc_fontoptions.hxx
 && s != "_GdkDisplay"
 // vcl/unx/gtk/xid_fullscreen_on_all_monitors.c
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index f389c6433b9c..3aaa03d1ddb6 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -65,12 +65,23 @@ struct VclToGtkHelper
 #else
 std::vector FormatsToGtk(const 
css::uno::Sequence &rFormats);
 #endif
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+void setSelectionData(const 
css::uno::Reference &rTrans,
+  GdkContentProvider* provider,
+  const char* mime_type,
+  GOutputStream* stream,
+  int io_priority,
+  GCancellable* cancellable,
+  GAsyncReadyCallback callback,
+  gpointer user_data);
+#else
 void setSelectionData(const 
css::uno::Reference &rTrans,
   GtkSelectionData *selection_data, guint info);
 #endif
 private:
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+OString makeGtkTargetEntry(const css::datatransfer::DataFlavor& rFlavor);
+#else
 GtkTargetEntry makeGtkTargetEntry(const css::datatransfer::DataFlavor& 
rFlavor);
 #endif
 };
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index a60f33790505..43e419aa2305 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -889,7 +889,16 @@ public:
 virtual void SAL_CALL removeClipboardListener(
 const Reference< css::datatransfer::clipboard::XClipboardListener >& 
listener ) override;
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+GdkContentFormats* ref_formats();
+void write_mime_type_async(GdkContentProvider* provider,
+   const char* mime_type,
+   GOutputStream* stream,
+   int io_priority,
+   GCancellable* cancellable,
+   GAsyncReadyCallback callback,
+   gpointer user_data);
+#else
 void ClipboardGet(GtkSelectionData *selection_data, guint info);
 #endif
 void OwnerPossiblyChanged(GdkClipboard *clipboard);
@@ -927,7 +936,25 @@ Reference< css::datatransfer::XTransferable > 
VclGtkClipboard::getContents()
 return m_aContents;
 }
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+void VclGtkClipboard::write_mime_type_async(GdkContentProvider* provider,
+const char* mime_type,
+GOutputStream* stream,
+int io_priority,
+GCancellable* cancellable,
+GAsyncReadyCallback callback,
+gpointer user_data)
+{
+if (!m_aContents.is())
+return;
+// tdf#129809 take a reference in case m_aContents is replaced during this
+// call
+Reference xCurrentContents(m_aContents);
+m_aConversionHelper.setSelectionData(xCurrentContents, provider, mime_type,
+ stream, io_priority, cancellable,
+ callback, user_data);
+}
+#else
 void VclGtkClipboard::ClipboardGet(GtkSelectionData *selection_data, guint 
info)
 {
 if (!m_aContents.is())
@@ -991,6 +1018,9 @@ void VclGtkClipboard::OwnerPossiblyChanged(GdkClipboard* 
clipboard)
 if (!m_aContents.is())
   

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/qa xmloff/source

2021-05-31 Thread Vasily Melenchuk (via logerrit)
 sw/qa/extras/odfexport/data/tdf137199.docx |binary
 sw/qa/extras/odfexport/odfexport.cxx   |   11 +++
 xmloff/source/style/xmlnume.cxx|   19 ++-
 3 files changed, 29 insertions(+), 1 deletion(-)

New commits:
commit 911383c83fcdea23f19895e6857a86521c23f448
Author: Vasily Melenchuk 
AuthorDate: Fri May 28 09:10:35 2021 +0300
Commit: Thorsten Behrens 
CommitDate: Mon May 31 14:45:36 2021 +0200

tdf#137199: sw: convert list format string to prefix/suffix for ODF

Since internally LO is able right now to use list level format strings
and prefixes/suffixes only for backward compatibility, there is a need
for conversion from format string (like "%1.") to prefix ("") and suffix
(".") still used by ODT.

Change-Id: If4b459e1b25b7f0ce511e6ac2de0824bb2c43d05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116288
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116316
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116363
Tested-by: Thorsten Behrens 

diff --git a/sw/qa/extras/odfexport/data/tdf137199.docx 
b/sw/qa/extras/odfexport/data/tdf137199.docx
new file mode 100644
index ..25b52977beca
Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf137199.docx differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 321ce301fb9c..3045586f991f 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -112,6 +112,17 @@ DECLARE_ODFEXPORT_TEST(testMathObjectFlatExport, 
"2_MathType3.docx")
 CPPUNIT_ASSERT_EQUAL(OUString(" size 12{2+2=4} {}"), formula2);
 }
 
+DECLARE_ODFEXPORT_TEST(testTdf137199, "tdf137199.docx")
+{
+CPPUNIT_ASSERT_EQUAL(OUString(">1<"), 
getProperty(getParagraph(1), "ListLabelString"));
+
+CPPUNIT_ASSERT_EQUAL(OUString("1)"), 
getProperty(getParagraph(2), "ListLabelString"));
+
+CPPUNIT_ASSERT_EQUAL(OUString("HELLO1WORLD!"), 
getProperty(getParagraph(3), "ListLabelString"));
+
+CPPUNIT_ASSERT_EQUAL(OUString("HELLO2WORLD!"), 
getProperty(getParagraph(4), "ListLabelString"));
+}
+
 static void testTdf43569_CheckIfFieldParse()
 {
 {
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 0f5a45dc40da..b549f447eb0c 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -119,7 +119,24 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 
nLevel,
 {
 rProp.Value >>= sSuffix;
 }
-else if( rProp.Name == "BulletChar" )
+else if (rProp.Name == "ListFormat")
+{
+OUString sListFormat;
+rProp.Value >>= sListFormat;
+
+// Since we have no support for entire format string it should be 
converted
+// to prefix and suffix. Of course, it is not so flexible as 
format string,
+// but it is the only option
+sal_Int32 nFirstReplacement = sListFormat.indexOf('%');
+sal_Int32 nLastReplacement = sListFormat.lastIndexOf('%') + 1;
+if (nFirstReplacement > 0)
+// Everything before first '%' will be prefix
+sPrefix = sListFormat.copy(0, nFirstReplacement);
+if (nLastReplacement >= 0 && nLastReplacement  < 
sListFormat.getLength() -1 )
+// Everything beyond last '%' (+1 for follow up id) is a suffix
+sSuffix = sListFormat.copy(nLastReplacement + 1);
+}
+else if (rProp.Name == "BulletChar")
 {
 OUString sValue;
 rProp.Value >>= sValue;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/qa writerfilter/source

2021-05-31 Thread Vasily Melenchuk (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf132752.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx|7 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |9 +
 3 files changed, 16 insertions(+)

New commits:
commit a3f2312a68f48e3ad07c643b8eba0f10bd2e81fc
Author: Vasily Melenchuk 
AuthorDate: Wed May 19 13:58:35 2021 +0300
Commit: Thorsten Behrens 
CommitDate: Mon May 31 14:44:41 2021 +0200

tdf#132752: docx import: improvements for first line indent in lists

As far as I see, Word is using lists with id=0 and no list definitions
to reset list numbering used in this paragraph. At the same time Word
is still using some of default list properties. For example in this
scenario parent style has defined first line indent, but in paragrath
it is overwritten by "not existing" list=0 without definitions.

To this moment I know about only first line indent behavior, but
probably some other properties are also affected.

Change-Id: I344c907bb7a7b83a91f5727e13ad184fb44137b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115795
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116221
Tested-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf132752.docx 
b/sw/qa/extras/ooxmlexport/data/tdf132752.docx
new file mode 100644
index ..57eddc455fca
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf132752.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 18a22bbdd30c..e1fed0f145b3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -446,6 +446,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120394, "tdf120394.docx")
 }
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf132752, "tdf132752.docx")
+{
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1801), 
getProperty(getParagraph(1), "ParaLeftMargin"));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), 
getProperty(getParagraph(1), "ParaRightMargin"));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty(getParagraph(1), 
"ParaFirstLineIndent"));
+}
+
 DECLARE_OOXMLEXPORT_TEST(testHyphenationAuto, "hyphenation.odt")
 {
 // Explicitly set hyphenation=auto on document level
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 32ca18ce..be63df248946 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1400,6 +1400,15 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 
 if ( pStyleSheetProperties->GetListLevel() >= 0 )
 pParaContext->Insert( PROP_NUMBERING_LEVEL, 
uno::makeAny(pStyleSheetProperties->GetListLevel()), false);
+
+if (nListId == 0 && !pList)
+{
+// Seems situation with listid=0 and missing list definition is 
used by MS Word
+// to remove numbering defined previously. But some default 
numbering attributes
+// are still applied. This is first line indent, probably 
something more?
+if (!pParaContext->isSet(PROP_PARA_FIRST_LINE_INDENT))
+pParaContext->Insert(PROP_PARA_FIRST_LINE_INDENT, 
uno::makeAny(sal_Int16(0)), false);
+}
 }
 
 // apply AutoSpacing: it has priority over all other margin settings
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-05-31 Thread Steve Fanning (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 48f7f5d0543eedc0d8c85ccef7233b58f49beb8a
Author: Steve Fanning 
AuthorDate: Mon May 31 14:42:48 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Mon May 31 14:42:48 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 8ca38307bd81fbb37a664dd848fd1fda2c2b4181
  - Clarify example in help description of Calc's DOLLAR function.

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

diff --git a/helpcontent2 b/helpcontent2
index d0fc1c870940..8ca38307bd81 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d0fc1c87094067bc528cac5a66fd667dc41af125
+Subproject commit 8ca38307bd81fbb37a664dd848fd1fda2c2b4181
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Steve Fanning (via logerrit)
 source/text/scalc/01/04060110.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8ca38307bd81fbb37a664dd848fd1fda2c2b4181
Author: Steve Fanning 
AuthorDate: Sun May 30 12:04:39 2021 +0200
Commit: Olivier Hallot 
CommitDate: Mon May 31 14:42:48 2021 +0200

Clarify example in help description of Calc's DOLLAR function.

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

diff --git a/source/text/scalc/01/04060110.xhp 
b/source/text/scalc/01/04060110.xhp
index 3a4ab2306..274dc2d6d 100644
--- a/source/text/scalc/01/04060110.xhp
+++ b/source/text/scalc/01/04060110.xhp
@@ -242,7 +242,7 @@
  
Decimals is the optional number of decimal places.
 
 
- =DOLLAR(255) returns $255.00.
+ =DOLLAR(255) returns $255.00 for the English (USA) locale 
and USD (dollar) currency; ¥255.00 for the Japanese locale and JPY (yen) 
currency; or 255,00 € for the German (Germany) locale and EUR (euro) 
currency.
  =DOLLAR(367.456;2) returns $367.46. Use the decimal 
separator that corresponds to the current 
locale setting.
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-05-31 Thread Ming Hua (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6e99e299a6e50bc054304077096d7c20e66fff65
Author: Ming Hua 
AuthorDate: Mon May 31 14:39:24 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Mon May 31 14:39:24 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to d0fc1c87094067bc528cac5a66fd667dc41af125
  - Use UI term "Impress" instead of "SIMPRESS"

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

diff --git a/helpcontent2 b/helpcontent2
index d443ebed5df3..d0fc1c870940 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d443ebed5df323aa13c2f5fa505b98366d8a4f9c
+Subproject commit d0fc1c87094067bc528cac5a66fd667dc41af125
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Ming Hua (via logerrit)
 source/text/shared/06/simpress_screenshots.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d0fc1c87094067bc528cac5a66fd667dc41af125
Author: Ming Hua 
AuthorDate: Mon May 31 08:08:51 2021 +0200
Commit: Olivier Hallot 
CommitDate: Mon May 31 14:39:24 2021 +0200

Use UI term "Impress" instead of "SIMPRESS"

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

diff --git a/source/text/shared/06/simpress_screenshots.xhp 
b/source/text/shared/06/simpress_screenshots.xhp
index 6eaeb23d2..1ab3ac12d 100644
--- a/source/text/shared/06/simpress_screenshots.xhp
+++ b/source/text/shared/06/simpress_screenshots.xhp
@@ -11,7 +11,7 @@
 
 
 
-SIMPRESS Screenshots
+Impress Screenshots
 /text/shared/06/simpress_screenshots.xhp
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: .vscode/vs-code-template.code-workspace.in

2021-05-31 Thread Christian Lohmaier (via logerrit)
 .vscode/vs-code-template.code-workspace.in |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 447d13023dcba333d34aba315e9093d1c82b8912
Author: Christian Lohmaier 
AuthorDate: Fri May 28 15:23:27 2021 +0200
Commit: Christian Lohmaier 
CommitDate: Mon May 31 13:31:27 2021 +0200

vscode: tell gitlens how to linkifiy our buglinks in commits

Change-Id: I7cc8efa94f75581d30047abf5c401b68741fb2a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116342
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/.vscode/vs-code-template.code-workspace.in 
b/.vscode/vs-code-template.code-workspace.in
index 5839525df7be..4f5d25cc3899 100644
--- a/.vscode/vs-code-template.code-workspace.in
+++ b/.vscode/vs-code-template.code-workspace.in
@@ -50,6 +50,12 @@
"C_Cpp.clang_format_path": "/opt/lo/bin/clang-format",
"editor.rulers": [
100
+   ],
+   "gitlens.autolinks": [
+   {
+   "prefix": "tdf#",
+   "url": 
"https://bugs.documentfoundation.org/show_bug.cgi?id="
+   }
]
},
"tasks": {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac .gitignore

2021-05-31 Thread Jan-Marek Glogowski (via logerrit)
 .gitignore   |2 ++
 configure.ac |   25 +
 2 files changed, 19 insertions(+), 8 deletions(-)

New commits:
commit 57f7b8f86bcd29b71e6d5f2990536eec64beeb05
Author: Jan-Marek Glogowski 
AuthorDate: Mon May 31 10:13:36 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon May 31 13:21:24 2021 +0200

configure: Keep warnings file and cat build ones

Re-cat's the build / cross-toolset warnings file at the end of
the host configure run and keeps them.

Change-Id: If46fa3660dbd04cd5a23a4d9cd79fd19067dcfbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116437
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/.gitignore b/.gitignore
index 1e210142c8a3..c0a41f579713 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,10 +40,12 @@
 /autogen.lastrun.bak
 /ChangeLog
 /config.Build.log
+/config.Build.warn
 /config.guess
 /config.log
 /config.status
 /config.parms
+/config.warn
 /config_host.mk
 /config_host.mk.last
 /config_host.mk.stamp
diff --git a/configure.ac b/configure.ac
index 43fb8d877515..a6cf3a72b538 100644
--- a/configure.ac
+++ b/configure.ac
@@ -202,12 +202,14 @@ AbsolutePath()
 fi
 }
 
-rm -f warn
+WARNINGS_FILE=config.warn
+WARNINGS_FILE_FOR_BUILD=config.Build.warn
+rm -f "$WARNINGS_FILE" "$WARNINGS_FILE_FOR_BUILD"
 have_WARNINGS="no"
 add_warning()
 {
 if test "$have_WARNINGS" = "no"; then
-echo "*" > warn
+echo "*" > "$WARNINGS_FILE"
 have_WARNINGS="yes"
 if which tput >/dev/null && test "`tput colors 2>/dev/null || echo 0`" 
-ge 8; then
 dnl  as actual byte (U+1b), [ escaped using quadrigraph @<:@
@@ -216,7 +218,7 @@ add_warning()
 COLORWARN="* WARNING :"
 fi
 fi
-echo "$COLORWARN $@" >> warn
+echo "$COLORWARN $@" >> "$WARNINGS_FILE"
 }
 
 dnl Some Mac User have the bad habit of letting a lot of crap
@@ -5420,6 +5422,7 @@ if test "$cross_compiling" = "yes"; then
 mv config.log ../config.Build.log
 mkdir -p ../config_build
 mv config_host/*.h ../config_build
+test -f "$WARNINGS_FILE" && mv "$WARNINGS_FILE" 
"../$WARNINGS_FILE_FOR_BUILD"
 
 # all these will get a _FOR_BUILD postfix
 DIRECT_FOR_BUILD_SETTINGS="
@@ -11419,8 +11422,8 @@ dnl We need touch with -h option support.
 dnl ===
 AC_PATH_PROG(TOUCH, touch)
 test -z "$TOUCH" && AC_MSG_ERROR([touch is required])
-touch warn
-if ! "$TOUCH" -h warn 2>/dev/null > /dev/null; then
+touch "$WARNINGS_FILE"
+if ! "$TOUCH" -h "$WARNINGS_FILE" 2>/dev/null > /dev/null; then
 AC_MSG_ERROR([touch version with -h option support is required to build, 
please install it and make sure it is the one found first in PATH],,)
 fi
 
@@ -14424,9 +14427,15 @@ $GNUMAKE check
 _EOF
 fi
 
-if test -f warn; then
-cat warn
-rm warn
+if test -f "$WARNINGS_FILE_FOR_BUILD"; then
+echo "BUILD / cross-toolset config, repeated ($WARNINGS_FILE_FOR_BUILD)"
+cat "$WARNINGS_FILE_FOR_BUILD"
+echo
+fi
+
+if test -f "$WARNINGS_FILE"; then
+echo "HOST config ($WARNINGS_FILE)"
+cat "$WARNINGS_FILE"
 fi
 
 dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Jan-Marek Glogowski (via logerrit)
 RepositoryExternal.mk|   10 +-
 solenv/gbuild/TargetLocations.mk |1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 7efb6328cb5e43d87afbbd81cf0165683e9fd4c3
Author: Jan-Marek Glogowski 
AuthorDate: Mon May 31 02:26:43 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon May 31 13:19:21 2021 +0200

gbuild: implement gb_UnoApi_get_target_for_build

Change-Id: Iaee243510023bf935097914fd6c4fcb701d35c13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116438
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index d9a22effc962..688bef98ac1a 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3869,7 +3869,7 @@ define gb_Executable__register_climaker
 $(call gb_Executable_add_runtime_dependencies,climaker,\
$(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
$(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
-   $(call gb_UnoApi_get_target,udkapi) \
+   $(call gb_UnoApi_get_target_for_build,udkapi) \
$(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,uno)
 )
 endef
@@ -3893,8 +3893,8 @@ $(call gb_Executable_add_runtime_dependencies,gengal,\
$(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/$(call 
gb_Helper_get_rcfile,louno) \
$(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
$(INSTROOT_FOR_BUILD)/$(LIBO_ETC_FOLDER)/services/services.rdb \
-   $(call gb_UnoApi_get_target,offapi) \
-   $(call gb_UnoApi_get_target,udkapi) \
+   $(call gb_UnoApi_get_target_for_build,offapi) \
+   $(call gb_UnoApi_get_target_for_build,udkapi) \
 )
 endef
 
@@ -3932,7 +3932,7 @@ $(call gb_Executable_add_runtime_dependencies,saxparser,\
$(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
$(call gb_Rdb_get_target_for_build,saxparser) \
$(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
-   $(call gb_UnoApi_get_target,udkapi) \
+   $(call gb_UnoApi_get_target_for_build,udkapi) \
 )
 endef
 
@@ -3943,7 +3943,7 @@ define gb_Executable__register_uno
 $(call gb_Executable_add_runtime_dependencies,uno,\
$(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
$(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
-   $(call gb_UnoApi_get_target,udkapi) \
+   $(call gb_UnoApi_get_target_for_build,udkapi) \
 )
 endef
 
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 46e875d6d227..0df1cd2bb9d5 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -29,6 +29,7 @@ gb_PackagePart_get_destinations = \
 
 # kind of lame but with just 3 of these why bother with registration etc.
 gb_UnoApi_get_target = $(INSTROOT)/$(if $(filter 
udkapi,$(1)),$(LIBO_URE_MISC_FOLDER)/types,$(LIBO_ETC_FOLDER)/types/$(1)).rdb
+gb_UnoApi_get_target_for_build = $(INSTROOT_FOR_BUILD)/$(if $(filter 
udkapi,$(1)),$(LIBO_URE_MISC_FOLDER)/types,$(LIBO_ETC_FOLDER)/types/$(1)).rdb
 
 # workdir target patterns
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Jan-Marek Glogowski (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx |   14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit af281d5bc2fb3f2c31f1718b711b32213a12219c
Author: Jan-Marek Glogowski 
AuthorDate: Mon May 31 02:01:56 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon May 31 13:16:19 2021 +0200

no-zxing: Unused GenerateQRCode function

... and while at it fix (new?) [loplugin:stringviewparam].

Change-Id: I4b991e58040df8082e141ba3c7a0d1968871d517
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116436
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index 9e4d1df1d96d..9a42e4ddc057 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -98,11 +98,9 @@ OString ConvertToSVGFormat(const ZXing::BitMatrix& bitmatrix)
 sb.append("\"/>\n");
 return sb.toString();
 }
-#endif
 
-OString GenerateQRCode(const OUString& aQRText, tools::Long aQRECC, int 
aQRBorder)
+OString GenerateQRCode(std::u16string_view aQRText, tools::Long aQRECC, int 
aQRBorder)
 {
-#if ENABLE_ZXING
 // Associated ZXing error correction levels (0-8) to our constants 
arbitrarily.
 int bqrEcc = 1;
 
@@ -137,14 +135,10 @@ OString GenerateQRCode(const OUString& aQRText, 
tools::Long aQRECC, int aQRBorde
 writer.setEncoding(ZXing::CharacterSet::UTF8);
 ZXing::BitMatrix bitmatrix = 
writer.encode(ZXing::TextUtfEncoding::FromUtf8(QRText), 0, 0);
 return ConvertToSVGFormat(bitmatrix);
-#else
-(void)aQRText;
-(void)aQRECC;
-(void)aQRBorder;
-return OString();
-#endif
-}
 }
+#endif
+
+} // anonymous namespace
 
 QrCodeGenDialog::QrCodeGenDialog(weld::Widget* pParent, Reference 
xModel,
  bool bEditExisting)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Balazs Varga (via logerrit)
 sc/source/ui/view/gridwin.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit e8bba8229080f873b89b39551e924d1c8609fc07
Author: Balazs Varga 
AuthorDate: Mon May 31 10:19:42 2021 +0200
Commit: Tünde Tóth 
CommitDate: Mon May 31 13:14:47 2021 +0200

Related tdf#68113 sc autofilter: clean-up for

commit: e6431d55bff7ae09c8b0708a0876c699bacca644
(tdf#68113 sc autofilter: fix not empty button unchecks all entries)

Change-Id: Id7cff40ae48dd09b44b0b553f50e379ecbb472f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116431
Tested-by: Jenkins
Reviewed-by: Tünde Tóth 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 635b13700b68..ca1dd4df1587 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -664,21 +664,20 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW 
nRow)
 
 ScQueryParam aParam;
 pDBData->GetQueryParam(aParam);
-bool bQueryByNonEmpty = false;
 std::vector aEntries = aParam.FindAllEntriesByField(nCol);
 std::unordered_set aSelectedString;
 std::unordered_set aSelectedValue;
-for (ScQueryEntry* pEntry : aEntries)
+bool bQueryByNonEmpty = aEntries.size() == 1 && 
aEntries[0]->IsQueryByNonEmpty();
+
+if (!bQueryByNonEmpty)
 {
-if (pEntry && pEntry->bDoQuery && pEntry->eOp == SC_EQUAL)
+for (ScQueryEntry* pEntry : aEntries)
 {
-if (!pEntry->IsQueryByNonEmpty())
+if (pEntry && pEntry->eOp == SC_EQUAL)
 {
 ScQueryEntry::QueryItemsType& rItems = pEntry->GetQueryItems();
 std::for_each(rItems.begin(), rItems.end(), 
AddSelectedItemString(aSelectedString, aSelectedValue));
 }
-else
-bQueryByNonEmpty = true;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit da035d7fcd0faceae59f3ba11adc82c77c5fb4f3
Author: Andras Timar 
AuthorDate: Mon May 31 12:26:17 2021 +0200
Commit: Andras Timar 
CommitDate: Mon May 31 12:26:25 2021 +0200

Bump version to 21.06

Change-Id: I7acc10d053215c15d71b6bc66753933fe4d96f80

diff --git a/configure.ac b/configure.ac
index ee59b965a6c2..583f3ce2820a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[21.05.1.1],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[21.06.1.1],[],[],[https://collaboraoffice.com/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Balazs Varga (via logerrit)
 sc/inc/table.hxx  |2 -
 sc/qa/uitest/autofilter/autofilter.py |   39 +-
 sc/source/core/data/documen3.cxx  |2 -
 sc/source/core/data/table3.cxx|4 +--
 sc/source/ui/dbgui/filtdlg.cxx|7 +-
 5 files changed, 44 insertions(+), 10 deletions(-)

New commits:
commit 1f755525189884e4b2824889a6b9dea8933402db
Author: Balazs Varga 
AuthorDate: Tue May 25 18:23:16 2021 +0200
Commit: László Németh 
CommitDate: Mon May 31 12:15:41 2021 +0200

tdf#142402 sc UI: store formatted values in standard filter

value list and filter by formatted values later, just like
we do in the autofilter.

Follow-up to commit 4fd1333ba4bb4f2311e9098291154772bd310429
"tdf#140968 tdf#140978 XLSX import: fix lost rounded filters".

Change-Id: If26f4c0abd54de05b497861f2c278972bd8072de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116115
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index cbf97d7dbd36..4a538428c163 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -961,7 +961,7 @@ public:
 SCSIZE  Query(const ScQueryParam& rQueryParam, bool bKeepSub);
 boolCreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW 
nRow2, ScQueryParam& rQueryParam);
 
-void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, 
ScFilterEntries& rFilterEntries );
+void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, 
ScFilterEntries& rFilterEntries, bool bFiltering = false);
 void GetFilteredFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, const 
ScQueryParam& rParam, ScFilterEntries& rFilterEntries, bool bFiltering );
 [[nodiscard]]
 bool GetDataEntries(SCCOL nCol, SCROW nRow, std::set& 
rStrings);
diff --git a/sc/qa/uitest/autofilter/autofilter.py 
b/sc/qa/uitest/autofilter/autofilter.py
index 334f7a90b3dd..70c6b3c3b89d 100644
--- a/sc/qa/uitest/autofilter/autofilter.py
+++ b/sc/qa/uitest/autofilter/autofilter.py
@@ -6,7 +6,7 @@
 #
 
 from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file, 
select_by_text
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from libreoffice.calc.document import is_row_hidden
 from uitest.uihelper.calc import enter_text_to_cell
@@ -455,5 +455,42 @@ class AutofilterTest(UITestCase):
 self.assertTrue(is_row_hidden(doc, 7))
 self.assertFalse(is_row_hidden(doc, 8))
 
+self.ui_test.close_doc()
+
+def test_tdf142402(self):
+doc = self.ui_test.load_file(get_url_for_data_file("tdf140968.xlsx"))
+
+xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "0", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+#Choose Standard Filter... button
+xMenu = xFloatWindow.getChild("menu")
+
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"}))
+
+xDialog = self.xUITest.getTopFocusWindow()
+xval1 = xDialog.getChild("val1")
+
+select_by_text(xval1, "0.365")
+
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+self.assertFalse(is_row_hidden(doc, 0))
+self.assertFalse(is_row_hidden(doc, 1))
+self.assertTrue(is_row_hidden(doc, 2))
+self.assertTrue(is_row_hidden(doc, 3))
+self.assertTrue(is_row_hidden(doc, 4))
+self.assertTrue(is_row_hidden(doc, 5))
+self.assertTrue(is_row_hidden(doc, 6))
+
 self.ui_test.close_doc()
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 5db63b6e7815..8d6f6a2baadf 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1606,7 +1606,7 @@ void ScDocument::GetFilterEntriesArea(
 {
 if ( ValidTab(nTab) && nTab < static_cast(maTabs.size()) && 
maTabs[nTab] )
 {
-maTabs[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, 
rFilterEntries );
+maTabs[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, 
rFilterEntries, true );
 sortAndRemoveDuplicates( rFilterEntries.maStrData, bCaseSens);
 }
 }
diff --git a/sc/source/core

Fwd: [libreoffice-projects] LibreOffice IRC channels moving to Libera.Chat

2021-05-31 Thread sophi
FYI
 Message transféré 
Sujet : [libreoffice-projects] LibreOffice IRC channels moving to
Libera.Chat
Date : Mon, 31 May 2021 12:06:56 +0200
De : Mike Saunders 
Pour : Tdf Projects 

Hello everyone,

We are moving our IRC channels to a new host, Libera.Chat, which is run
by a Swedish non-profit organisation. More information on the blog:

https://blog.documentfoundation.org/blog/2021/05/31/libreoffice-irc-channels-moving-to-libera-chat/

-- 
Mike Saunders, Marketing and Community Coordinator
The Document Foundation

-- 
To unsubscribe e-mail to: projects+unsubscr...@global.libreoffice.org
Problems?
https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/projects/
Privacy Policy: https://www.documentfoundation.org/privacy
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-05-31 Thread Caolán McNamara (via logerrit)
 sc/source/filter/inc/defnamesbuffer.hxx |2 +-
 sc/source/filter/inc/workbookhelper.hxx |7 +--
 sc/source/filter/oox/defnamesbuffer.cxx |   23 ---
 sc/source/filter/oox/workbookhelper.cxx |   32 +---
 4 files changed, 35 insertions(+), 29 deletions(-)

New commits:
commit 9bf1089965672d3825b587cbd888093ac362013e
Author: Caolán McNamara 
AuthorDate: Mon May 31 09:30:52 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 11:46:32 2021 +0200

crashtesting: use after free on export of tdf122510-1.xlsx to ods

and also tdf95549-3.xlsm

related to:

commit f8c1048eb437b1e685b76198165844e2ecc97a56
Date:   Wed May 19 19:04:02 2021 +0200

fix leak in oox import

and:

commit 3cd6402c5443c8069c07d9e420d5ef5b43af6bef
Date:   Thu May 6 18:47:30 2021 +0200

tdf#127301 XLSX import: hide hidden named range of autofilter

clearly this is fragile so just explicitly return who owns the
ScRangeData*

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

diff --git a/sc/source/filter/inc/defnamesbuffer.hxx 
b/sc/source/filter/inc/defnamesbuffer.hxx
index 03eec97af201..3200bd5dc8de 100644
--- a/sc/source/filter/inc/defnamesbuffer.hxx
+++ b/sc/source/filter/inc/defnamesbuffer.hxx
@@ -122,7 +122,7 @@ public:
 private:
 typedef ::std::unique_ptr< StreamDataSequence >   StreamDataSeqPtr;
 
-ScRangeData*mpScRangeData;   /// ScRangeData of the defined 
name.
+RangeDataRetmaScRangeData;  /// ScRangeData of the defined 
name.
 sal_Int32   mnTokenIndex;   /// Name index used in API token 
array.
 sal_Int16   mnCalcSheet;/// Calc sheet index for 
sheet-local names.
 sal_Unicode mcBuiltinId;/// Identifier for built-in 
defined names.
diff --git a/sc/source/filter/inc/workbookhelper.hxx 
b/sc/source/filter/inc/workbookhelper.hxx
index e6633d15f4f9..d6d04007d39c 100644
--- a/sc/source/filter/inc/workbookhelper.hxx
+++ b/sc/source/filter/inc/workbookhelper.hxx
@@ -160,10 +160,13 @@ public:
 css::uno::Reference< css::style::XStyle >
 getStyleObject( const OUString& rStyleName, bool 
bPageStyle ) const;
 
+// second is true if ownership belongs to the caller
+typedef std::pair RangeDataRet;
+
 /** Creates and returns a defined name on-the-fly in the Calc document.
 The name will not be buffered in the global defined names buffer.
 @param orName  (in/out-parameter) Returns the resulting used name. */
-ScRangeData* createNamedRangeObject(
+RangeDataRet createNamedRangeObject(
 OUString& orName,
 const css::uno::Sequence< 
css::sheet::FormulaToken>& rTokens,
 sal_Int32 nIndex,
@@ -172,7 +175,7 @@ public:
 /** Creates and returns a defined name on-the-fly in the sheet.
 The name will not be buffered in the global defined names buffer.
 @param orName  (in/out-parameter) Returns the resulting used name. */
-ScRangeData* createLocalNamedRangeObject(
+RangeDataRet createLocalNamedRangeObject(
 OUString& orName,
 const css::uno::Sequence< 
css::sheet::FormulaToken>& rTokens,
 sal_Int32 nIndex,
diff --git a/sc/source/filter/oox/defnamesbuffer.cxx 
b/sc/source/filter/oox/defnamesbuffer.cxx
index a554ab9cd0f1..9eebaf1633a7 100644
--- a/sc/source/filter/oox/defnamesbuffer.cxx
+++ b/sc/source/filter/oox/defnamesbuffer.cxx
@@ -146,7 +146,7 @@ const OUString& DefinedNameBase::getUpcaseModelName() const
 
 DefinedName::DefinedName( const WorkbookHelper& rHelper ) :
 DefinedNameBase( rHelper ),
-mpScRangeData(nullptr),
+maScRangeData(nullptr, false),
 mnTokenIndex( -1 ),
 mnCalcSheet( 0 ),
 mcBuiltinId( BIFF_DEFNAME_UNKNOWN )
@@ -233,9 +233,9 @@ void DefinedName::createNameObject( sal_Int32 nIndex )
 
 // create the name and insert it into the document, maCalcName will be 
changed to the resulting name
 if (maModel.mnSheet >= 0)
-mpScRangeData = createLocalNamedRangeObject( maCalcName, 
ApiTokenSequence(), nIndex, nNameFlags, maModel.mnSheet, maModel.mbHidden );
+maScRangeData = createLocalNamedRangeObject( maCalcName, 
ApiTokenSequence(), nIndex, nNameFlags, maModel.mnSheet, maModel.mbHidden );
 else
-mpScRangeData = createNamedRangeObject( maCalcName, 
ApiTokenSequence(), nIndex, nNameFlags, maModel.mbHidden );
+maScRangeData = createNamedRangeObject( maCalcName, 
ApiTokenSequence(), nIndex, nNameFlags, maModel.mbHidden );
 mnTokenIndex = nIndex;
 }
 
@@ -259,17 +259,18 @@ std::unique_ptr DefinedName::getScTokens(
 
 void DefinedName::convertFormula( const

[Libreoffice-commits] core.git: sd/qa sd/source

2021-05-31 Thread Attila Bakos (NISZ) (via logerrit)
 sd/qa/unit/data/pptx/LostPlaceholderFill.odp |binary
 sd/qa/unit/export-tests-ooxml1.cxx   |   53 +++
 sd/source/filter/eppt/pptx-epptooxml.cxx |   18 +
 3 files changed, 71 insertions(+)

New commits:
commit 8acc6bc43e0334157b97b36f570987a49c5febdd
Author: Attila Bakos (NISZ) 
AuthorDate: Tue May 25 16:48:51 2021 +0200
Commit: László Németh 
CommitDate: Mon May 31 11:43:02 2021 +0200

tdf#142537 PPTX export: fix placeholder style export

Regression from: b6b02e0b4c9d739836e1f61a886ea45b01e6696e
(tdf#111903 tdf#137152 PPTX export: fix placeholders)

Placeholders lost the formatting, which has been fixed.
(fill, effects, and outline)

Change-Id: I2b9300b85cf3641d89d748a03377f950e668a2af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116113
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/sd/qa/unit/data/pptx/LostPlaceholderFill.odp 
b/sd/qa/unit/data/pptx/LostPlaceholderFill.odp
new file mode 100644
index ..d2ea8dab6d4a
Binary files /dev/null and b/sd/qa/unit/data/pptx/LostPlaceholderFill.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx 
b/sd/qa/unit/export-tests-ooxml1.cxx
index 08504c8286a6..b5222c40f913 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -115,6 +115,7 @@ public:
 void testNarrationMimeType();
 void testTdf140865Wordart3D();
 void testTdf124457();
+void testPlaceholderFillAndOutlineExport();
 
 CPPUNIT_TEST_SUITE(SdOOXMLExportTest1);
 
@@ -172,6 +173,7 @@ public:
 CPPUNIT_TEST(testNarrationMimeType);
 CPPUNIT_TEST(testTdf140865Wordart3D);
 CPPUNIT_TEST(testTdf124457);
+CPPUNIT_TEST(testPlaceholderFillAndOutlineExport);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -442,6 +444,57 @@ void SdOOXMLExportTest1::testLostPlaceholders()
 xDocShRef->DoClose();
 }
 
+void SdOOXMLExportTest1::testPlaceholderFillAndOutlineExport()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/LostPlaceholderFill.odp"),
 ODP);
+
+uno::Any aFillStyle;
+uno::Any aFillColor;
+uno::Any aLineStyle;
+uno::Any aLineColor;
+
+for (int i = 1; i <= 2; i++)
+{
+CPPUNIT_ASSERT(xDocShRef.is());
+
+auto pDoc = xDocShRef->GetDoc();
+CPPUNIT_ASSERT(pDoc);
+auto pPage = pDoc->GetPage(1);
+CPPUNIT_ASSERT(pPage);
+auto pObj = pPage->GetObj(1);
+CPPUNIT_ASSERT(pObj);
+
+uno::Reference xShp(pObj->getUnoShape(), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xShp);
+
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong ShapeType!", 
OUString(u"com.sun.star.presentation.OutlinerShape"), xShp->getShapeType());
+uno::Reference xShpProps(xShp, uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("It must be a placeholder!", true, 
xShpProps->getPropertyValue("IsPresentationObject").get());
+
+if (i == 1)
+{
+aFillStyle = xShpProps->getPropertyValue("FillStyle");
+aFillColor = xShpProps->getPropertyValue("FillColor");
+
+aLineStyle = xShpProps->getPropertyValue("LineStyle");
+aLineColor = xShpProps->getPropertyValue("LineColor");
+
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
+continue;
+}
+else
+{
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The Placeholder fillstyle has not 
been exported!", aFillStyle, xShpProps->getPropertyValue("FillStyle"));
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The Placeholder fillcolor has not 
been exported!", aFillColor, xShpProps->getPropertyValue("FillColor"));
+
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The Placeholder linestyle has not 
been exported!", aLineStyle, xShpProps->getPropertyValue("LineStyle"));
+CPPUNIT_ASSERT_EQUAL_MESSAGE("The Placeholder linecolor has not 
been exported!", aLineColor, xShpProps->getPropertyValue("LineColor"));
+break;
+}
+}
+xDocShRef->DoClose();
+}
+
 void SdOOXMLExportTest1::testFdo71961()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/fdo71961.odp"), ODP);
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 089e3bbdffa5..a1a6dd6cad5d 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1534,7 +1534,25 @@ ShapeExport& 
PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap
 WritePresetShape("rect");
 Reference< XPropertySet > xProps(xShape, UNO_QUERY);
 if (xProps.is())
+{
 WriteBlipFill(xProps, "Graphic");
+// Do not forget to export the visible properties.
+WriteFill( xProps );
+WriteOutline( xProps );
+WriteShapeEffects( xProps );
+
+bool bHas3DEffectinShape = false;
+uno::Sequence grabBag;
+if (xProps->getPropertySetIn

[Libreoffice-commits] core.git: compilerplugins/clang cui/source editeng/inc editeng/source include/editeng include/IwyuFilter_include.yaml sd/qa sd/source svl/source svx/sdi sw/source

2021-05-31 Thread Gülşah Köse (via logerrit)
 compilerplugins/clang/constantparam.booleans.results |4 
 cui/source/dialogs/SpellDialog.cxx   |2 
 cui/source/tabpages/backgrnd.cxx |   10 -
 editeng/inc/editattr.hxx |3 
 editeng/source/editeng/editattr.cxx  |4 
 editeng/source/editeng/editdbg.cxx   |2 
 editeng/source/editeng/editdoc.cxx   |2 
 editeng/source/editeng/editeng.cxx   |2 
 editeng/source/editeng/eerdll.cxx|2 
 editeng/source/items/textitem.cxx|  122 +--
 include/IwyuFilter_include.yaml  |1 
 include/editeng/colritem.hxx |   34 -
 include/editeng/eeitem.hxx   |3 
 sd/qa/unit/export-tests-ooxml1.cxx   |   20 +--
 sd/qa/unit/export-tests.cxx  |9 -
 sd/source/core/stlpool.cxx   |8 -
 sd/source/ui/func/fuchar.cxx |2 
 sd/source/ui/func/futempl.cxx|4 
 sd/source/ui/view/drtxtob1.cxx   |2 
 sd/source/ui/view/drviews2.cxx   |2 
 svl/source/items/poolitem.cxx|1 
 svx/sdi/svx.sdi  |4 
 svx/sdi/svxitems.sdi |1 
 sw/source/uibase/shells/drwtxtex.cxx |2 
 24 files changed, 51 insertions(+), 195 deletions(-)

New commits:
commit 936af331ba6f5073aeaa0f10f5f2af1def1d74c6
Author: Gülşah Köse 
AuthorDate: Fri May 28 01:23:53 2021 +0300
Commit: Gülşah Köse 
CommitDate: Mon May 31 11:36:18 2021 +0200

Clean redundant SvxBackgroundColorItem and use SvxColorItem instead.

SvxBackgroundColorItem is just copied from SvxColorItem. There is
nothing special to SvxBackgroundColorItem class. SvxColorItem is a
generic item and it's used on many places related with colors. We can
use SvxColorItem for background colors too.

Change-Id: Iacea31a7557b806e95f5859ff60add9a2626ec05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116282
Reviewed-by: Jan Holesovsky 
Tested-by: Jenkins

diff --git a/compilerplugins/clang/constantparam.booleans.results 
b/compilerplugins/clang/constantparam.booleans.results
index 94efdc01da0a..e34c49f419b8 100644
--- a/compilerplugins/clang/constantparam.booleans.results
+++ b/compilerplugins/clang/constantparam.booleans.results
@@ -706,10 +706,6 @@ include/editeng/boxitem.hxx:114
 _Bool SvxBoxItem::HasBorder(_Bool) const
 _Bool bTreatPaddingAsBorder
 1
-include/editeng/colritem.hxx:69
-void SvxBackgroundColorItem::SvxBackgroundColorItem(const unsigned short)
-const unsigned short nId
-0
 include/editeng/editeng.hxx:548
 void EditEngine::dumpAsXmlEditDoc(struct _xmlTextWriter *) const
 struct _xmlTextWriter * pWriter
diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 338990b31628..b583fa03768e 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1067,7 +1067,7 @@ bool 
SpellDialog::GetNextSentence_Impl(std::unique_ptr* pG
 }
 
 if (elem.bIsField)
-
m_xSentenceED->SetAttrib(SvxBackgroundColorItem(COL_LIGHTGRAY, 
EE_CHAR_BKGCOLOR), nStartPosition, nEndPosition);
+m_xSentenceED->SetAttrib(SvxColorItem(COL_LIGHTGRAY, 
EE_CHAR_BKGCOLOR), nStartPosition, nEndPosition);
 m_xSentenceED->SetAttrib(SvxLanguageItem(elem.eLanguage, 
EE_CHAR_LANGUAGE), nStartPosition, nEndPosition);
 nStartPosition = nEndPosition;
 }
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 38190271d778..3aac1fae51a7 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -153,8 +153,8 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
 {
 if ( SID_ATTR_CHAR_BACK_COLOR == nSlot )
 {
-maSet.Put( SvxBackgroundColorItem( COL_TRANSPARENT, nWhich 
) );
-rCoreSet->Put( SvxBackgroundColorItem( COL_TRANSPARENT, 
nWhich ) );
+maSet.Put( SvxColorItem( COL_TRANSPARENT, nWhich ) );
+rCoreSet->Put( SvxColorItem( COL_TRANSPARENT, nWhich ) );
 }
 else
 {
@@ -169,8 +169,8 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
 XFillColorItem aColorItem( maSet.Get( XATTR_FILLCOLOR ) );
 if ( SID_ATTR_CHAR_BACK_COLOR == nSlot )
 {
-maSet.Put( SvxBackgroundColorItem( aColorItem.GetColorValue(), 
nWhich ) );
-rCoreSet->Put( SvxBackgroundColorItem( 
aColorItem.GetColorValue(), nWhich ) );
+maSet.Put( SvxColor

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

2021-05-31 Thread Noel Grandin (via logerrit)
 editeng/source/uno/unoipset.cxx |   16 
 include/editeng/unoipset.hxx|2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 7d34acfeec112ab5cdabba059d01d8876be4
Author: Noel Grandin 
AuthorDate: Sun May 30 13:03:38 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 11:20:55 2021 +0200

flatten SvxItemPropertySet a little

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

diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 8a4ad0c29bac..cdc1bac825df 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -54,10 +54,10 @@ SvxItemPropertySet::~SvxItemPropertySet()
 
 uno::Any* SvxItemPropertySet::GetUsrAnyForID(SfxItemPropertyMapEntry const & 
entry) const
 {
-for (auto const & pActual : aCombineList)
+for (auto const & rActual : aCombineList)
 {
-if( pActual->nWID == entry.nWID && pActual->memberId == 
entry.nMemberId )
-return &pActual->aAny;
+if( rActual.nWID == entry.nWID && rActual.memberId == entry.nMemberId )
+return const_cast(&rActual.aAny);
 }
 return nullptr;
 }
@@ -66,11 +66,11 @@ uno::Any* 
SvxItemPropertySet::GetUsrAnyForID(SfxItemPropertyMapEntry const & ent
 void SvxItemPropertySet::AddUsrAnyForID(
 const uno::Any& rAny, SfxItemPropertyMapEntry const & entry)
 {
-std::unique_ptr pNew(new SvxIDPropertyCombine);
-pNew->nWID = entry.nWID;
-pNew->memberId = entry.nMemberId;
-pNew->aAny = rAny;
-aCombineList.push_back( std::move(pNew) );
+SvxIDPropertyCombine aNew;
+aNew.nWID = entry.nWID;
+aNew.memberId = entry.nMemberId;
+aNew.aAny = rAny;
+aCombineList.push_back( std::move(aNew) );
 }
 
 
diff --git a/include/editeng/unoipset.hxx b/include/editeng/unoipset.hxx
index 10a0030aa75b..2c079a06b37f 100644
--- a/include/editeng/unoipset.hxx
+++ b/include/editeng/unoipset.hxx
@@ -34,7 +34,7 @@ class EDITENG_DLLPUBLIC SvxItemPropertySet
 {
 SfxItemPropertyMap  m_aPropertyMap;
 mutable css::uno::Reference m_xInfo;
-::std::vector< std::unique_ptr > aCombineList;
+::std::vector< SvxIDPropertyCombine > aCombineList;
 SfxItemPool&mrItemPool;
 
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/CppunitTest_sal_osl.mk sal/osl sal/qa

2021-05-31 Thread Stephan Bergmann (via logerrit)
 sal/CppunitTest_sal_osl.mk |1 +
 sal/osl/unx/socket.cxx |5 -
 sal/qa/osl/socket.cxx  |   40 
 3 files changed, 45 insertions(+), 1 deletion(-)

New commits:
commit 33bf4f0bcf941ee4609f558442035514f54cbc8a
Author: Stephan Bergmann 
AuthorDate: Mon May 31 09:36:28 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 31 10:59:46 2021 +0200

Replace inet_ntoa with inet_ntop

...as inet_ntoa is potentially not thread-safe; and add a test

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

diff --git a/sal/CppunitTest_sal_osl.mk b/sal/CppunitTest_sal_osl.mk
index b5e1b0658324..392da456459c 100644
--- a/sal/CppunitTest_sal_osl.mk
+++ b/sal/CppunitTest_sal_osl.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sal_osl,\
sal/qa/osl/process/osl_Thread \
sal/qa/osl/profile/osl_old_testprofile \
sal/qa/osl/setthreadname/test-setthreadname \
+   sal/qa/osl/socket \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,sal_osl,\
diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx
index 376d6f1412ce..c78e43a9de93 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -1092,7 +1092,10 @@ oslSocketResult SAL_CALL 
osl_getDottedInetAddrOfSocketAddr(oslSocketAddr Addr, r
 return osl_Socket_Error;
 }
 
-
rtl_uString_newFromAscii(ustrDottedInetAddr,inet_ntoa(pSystemInetAddr->sin_addr));
+char buf[INET_ADDRSTRLEN];
+auto const text = inet_ntop(AF_INET, &pSystemInetAddr->sin_addr, buf, 
INET_ADDRSTRLEN);
+assert(text != nullptr);
+rtl_uString_newFromAscii(ustrDottedInetAddr,text);
 
 return osl_Socket_Ok;
 
diff --git a/sal/qa/osl/socket.cxx b/sal/qa/osl/socket.cxx
new file mode 100644
index ..dab2621f2293
--- /dev/null
+++ b/sal/qa/osl/socket.cxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+namespace
+{
+class SocketTest : public CppUnit::TestFixture
+{
+CPPUNIT_TEST_SUITE(SocketTest);
+CPPUNIT_TEST(test_getDottedInetAddrOfSocketAddr);
+CPPUNIT_TEST_SUITE_END();
+
+void test_getDottedInetAddrOfSocketAddr()
+{
+OUString const in("123.4.56.78");
+auto const addr = osl_createInetSocketAddr(in.pData, 0);
+CPPUNIT_ASSERT(addr != nullptr);
+OUString out;
+auto const res = osl_getDottedInetAddrOfSocketAddr(addr, &out.pData);
+CPPUNIT_ASSERT_EQUAL(osl_Socket_Ok, res);
+CPPUNIT_ASSERT_EQUAL(in, out);
+}
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SocketTest);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Justin Luth (via logerrit)
 sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt |binary
 sw/qa/extras/ww8export/ww8export3.cxx  |6 ++
 sw/source/filter/ww8/wrtw8num.cxx  |   11 +++
 sw/source/filter/ww8/wrtww8.hxx|1 +
 sw/source/filter/ww8/ww8atr.cxx|7 +++
 5 files changed, 25 insertions(+)

New commits:
commit 5107bc515fba130bf4a488324f97971789a92f37
Author: Justin Luth 
AuthorDate: Fri May 28 16:03:52 2021 +0200
Commit: Justin Luth 
CommitDate: Mon May 31 10:51:04 2021 +0200

tdf#138302 partial revert tdf#108496: DOCX: redesign of override in lists

LO 6.4.5 commit cf13fe3e6f6a40f6db064d65d4514d13a23a31f0
was only concerned about DOCX, but just elinated shared code.
So restore the shared code and just don't execute it for DOCX.

It doesn't look like RTF was working before this,
but this does fix DOC format.
I looked for existing unit tests in rtf and doc,
but none were found that hit this code.

Change-Id: Id624f73181384f38e1ef9f27575e0fb82eea19c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116349
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk 
(cherry picked from commit f49e5902a3737c02fabf5bec23243ccb126426c4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116170
Reviewed-by: Justin Luth 

diff --git a/sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt 
b/sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt
new file mode 100644
index ..8c99963616a7
Binary files /dev/null and 
b/sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index c16272c2707d..08f7cf5b1614 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -185,6 +185,12 @@ DECLARE_WW8EXPORT_TEST(testdf79553_lineNumbers, 
"tdf79553_lineNumbers.doc")
 CPPUNIT_ASSERT_MESSAGE("automatic distance", nValue > 0);
 }
 
+DECLARE_WW8EXPORT_TEST(tesTdf138302_restartNumbering, 
"tdf138302_restartNumbering.odt")
+{
+uno::Reference xPara(getParagraph(8), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty(xPara, 
"ListLabelString"));
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc")
 {
 uno::Reference pageStyles = 
getStyles("PageStyles");
diff --git a/sw/source/filter/ww8/wrtw8num.cxx 
b/sw/source/filter/ww8/wrtw8num.cxx
index c3f8eabe9fd9..7c1866f74718 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -56,6 +56,17 @@ SwNumRule* MSWordExportBase::DuplicateNumRuleImpl(const 
SwNumRule *pRule)
 return pMyNumRule;
 }
 
+sal_uInt16 MSWordExportBase::DuplicateNumRule(const SwNumRule* pRule, 
sal_uInt8 nLevel, sal_uInt16 nVal)
+{
+SwNumRule* const pMyNumRule = DuplicateNumRuleImpl(pRule);
+
+SwNumFormat aNumFormat(pMyNumRule->Get(nLevel));
+aNumFormat.SetStart(nVal);
+pMyNumRule->Set(nLevel, aNumFormat);
+
+return GetNumberingId(*pMyNumRule);
+}
+
 // multiple SwList can be based on the same SwNumRule; ensure one w:abstractNum
 // per SwList
 sal_uInt16 MSWordExportBase::DuplicateAbsNum(OUString const& rListId,
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 1baa627ece71..69f9f2b1a2ed 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -651,6 +651,7 @@ public:
 /// List is set to restart at a particular value so for export make a
 /// completely new list based on this one and export that instead,
 /// which duplicates words behaviour in this respect.
+sal_uInt16 DuplicateNumRule(const SwNumRule* pRule, sal_uInt8 nLevel, 
sal_uInt16 nVal);
 SwNumRule * DuplicateNumRuleImpl(const SwNumRule *pRule);
 
 /// check if a new abstractNum is needed for this list
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index c1959186979c..14afa9919405 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3627,6 +3627,13 @@ void AttributeOutputBase::ParaNumRule( const 
SwNumRuleItem& rNumRule )
 }
 }
 }
+else if (pTextNd->IsListRestart())
+{
+sal_uInt16 nStartWith = 
static_cast(pTextNd->GetActualListStartValue());
+nNumId = GetExport().DuplicateNumRule(pRule, nLvl, nStartWith);
+if (USHRT_MAX != nNumId)
+++nNumId;
+}
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Noel Grandin (via logerrit)
 sw/inc/node.hxx |4 ++--
 sw/source/core/doc/doclay.cxx   |6 +++---
 sw/source/core/docnode/node.cxx |   19 +--
 sw/source/core/edit/autofmt.cxx |5 +
 sw/source/core/layout/atrfrm.cxx|   15 ++-
 sw/source/core/layout/frmtool.cxx   |   14 +-
 sw/source/core/layout/wsfrm.cxx |   16 +---
 sw/source/core/txtnode/ndtxt.cxx|6 +++---
 sw/source/filter/xml/XMLRedlineImportHelper.cxx |2 +-
 9 files changed, 31 insertions(+), 56 deletions(-)

New commits:
commit c7f484eb774fc90cf8e1540a703c5c3856312ef2
Author: Noel Grandin 
AuthorDate: Sun May 30 09:35:42 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 10:46:58 2021 +0200

no need to allocate this separately

std: :vector is only 3 words big in it's empty state

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

diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index c5693ce98c87..53e2a79d0068 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -107,7 +107,7 @@ private:
 /// all SwFrameFormat that are anchored at the node
 /// invariant: SwFrameFormat is in the list iff
 /// SwFrameFormat::GetAnchor().GetContentAnchor() points to this node
-std::optional> m_xAnchoredFlys;
+std::vector m_aAnchoredFlys;
 
 protected:
 SwStartNode* m_pStartOfSection;
@@ -294,7 +294,7 @@ public:
 
 sal_uInt8 HasPrevNextLayNode() const;
 
-std::vector const* GetAnchoredFlys() const { return 
m_xAnchoredFlys ? &*m_xAnchoredFlys : nullptr; }
+std::vector const & GetAnchoredFlys() const { return 
m_aAnchoredFlys; }
 void AddAnchoredFly(SwFrameFormat *);
 void RemoveAnchoredFly(SwFrameFormat *);
 
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 43b4408ec080..556ff77fdb78 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1571,11 +1571,11 @@ bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) 
const
 checkFormats.push_back( pFormat );
 }
 #endif
-std::vector const*const 
pFlys(pFlyNd->GetAnchoredFlys());
+std::vector const & rFlys(pFlyNd->GetAnchoredFlys());
 bool bFound(false);
-for (size_t i = 0; pFlys && i < pFlys->size(); ++i)
+for (size_t i = 0; i < rFlys.size(); ++i)
 {
-const SwFrameFormat *const pFormat = (*pFlys)[i];
+const SwFrameFormat *const pFormat = rFlys[i];
 const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
 if( pIdx && pFlyNd == &pIdx->GetNode() )
 {
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 3b0245969246..4f7b18ba3a68 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -347,7 +347,7 @@ SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const 
SwNodeType nNdType )
 
 SwNode::~SwNode()
 {
-assert(!m_xAnchoredFlys || GetDoc().IsInDtor()); // must all be deleted
+assert(m_aAnchoredFlys.empty() || GetDoc().IsInDtor()); // must all be 
deleted
 InvalidateInSwCache(RES_OBJECTDYING);
 assert(!IsInCache());
 }
@@ -2119,11 +2119,7 @@ void SwNode::AddAnchoredFly(SwFrameFormat *const 
pFlyFormat)
 assert(&pFlyFormat->GetAnchor(false).GetContentAnchor()->nNode.GetNode() 
== this);
 // check node type, cf. SwFormatAnchor::SetAnchor()
 assert(IsTextNode() || IsStartNode() || IsTableNode());
-if (!m_xAnchoredFlys)
-{
-m_xAnchoredFlys.emplace();
-}
-m_xAnchoredFlys->push_back(pFlyFormat);
+m_aAnchoredFlys.push_back(pFlyFormat);
 }
 
 void SwNode::RemoveAnchoredFly(SwFrameFormat *const pFlyFormat)
@@ -2132,14 +2128,9 @@ void SwNode::RemoveAnchoredFly(SwFrameFormat *const 
pFlyFormat)
 // cannot assert this in Remove because it is called when new anchor is 
already set
 //assert(&pFlyFormat->GetAnchor(false).GetContentAnchor()->nNode.GetNode() 
== this);
 assert(IsTextNode() || IsStartNode() || IsTableNode());
-assert(m_xAnchoredFlys);
-auto it(std::find(m_xAnchoredFlys->begin(), m_xAnchoredFlys->end(), 
pFlyFormat));
-assert(it != m_xAnchoredFlys->end());
-m_xAnchoredFlys->erase(it);
-if (m_xAnchoredFlys->empty())
-{
-m_xAnchoredFlys.reset();
-}
+auto it(std::find(m_aAnchoredFlys.begin(), m_aAnchoredFlys.end(), 
pFlyFormat));
+assert(it != m_aAnchoredFlys.end());
+m_aAnchoredFlys.erase(it);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index b9b4d8480a7a..12df8e7383e9 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -345,11 +345,8 @@ bool SwAutoFormat::Ha

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

2021-05-31 Thread Noel Grandin (via logerrit)
 editeng/source/rtf/svxrtf.cxx |   36 +---
 include/editeng/svxrtf.hxx|2 +-
 2 files changed, 18 insertions(+), 20 deletions(-)

New commits:
commit 8371ae143ef31c332bdcf753ca1dff722a531229
Author: Noel Grandin 
AuthorDate: Sun May 30 17:04:59 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 10:35:08 2021 +0200

vcl::Font is already a copy-on-write structure

with an impl pointer, no need to use unique_ptr when storing in a map

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

diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 17ef94553ec5..4bf5c3811bdc 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -442,13 +442,13 @@ void SvxRTFParser::ReadColorTable()
 void SvxRTFParser::ReadFontTable()
 {
 int _nOpenBrakets = 1;  // the first was already detected earlier!!
-std::unique_ptr pFont(new vcl::Font);
+vcl::Font aFont;
 short nFontNo(0), nInsFontNo (0);
 OUString sAltNm, sFntNm;
 bool bIsAltFntNm = false;
 
 rtl_TextEncoding nSystemChar = lcl_GetDefaultTextEncodingForRTF();
-pFont->SetCharSet( nSystemChar );
+aFont.SetCharSet( nSystemChar );
 SetEncoding( nSystemChar );
 
 while( _nOpenBrakets && IsParserWorking() )
@@ -487,33 +487,33 @@ void SvxRTFParser::ReadFontTable()
 ++_nOpenBrakets;
 break;
 case RTF_FROMAN:
-pFont->SetFamily( FAMILY_ROMAN );
+aFont.SetFamily( FAMILY_ROMAN );
 break;
 case RTF_FSWISS:
-pFont->SetFamily( FAMILY_SWISS );
+aFont.SetFamily( FAMILY_SWISS );
 break;
 case RTF_FMODERN:
-pFont->SetFamily( FAMILY_MODERN );
+aFont.SetFamily( FAMILY_MODERN );
 break;
 case RTF_FSCRIPT:
-pFont->SetFamily( FAMILY_SCRIPT );
+aFont.SetFamily( FAMILY_SCRIPT );
 break;
 case RTF_FDECOR:
-pFont->SetFamily( FAMILY_DECORATIVE );
+aFont.SetFamily( FAMILY_DECORATIVE );
 break;
 // for technical/symbolic font of the rtl_TextEncoding is changed!
 case RTF_FTECH:
-pFont->SetCharSet( RTL_TEXTENCODING_SYMBOL );
+aFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
 [[fallthrough]];
 case RTF_FNIL:
-pFont->SetFamily( FAMILY_DONTKNOW );
+aFont.SetFamily( FAMILY_DONTKNOW );
 break;
 case RTF_FCHARSET:
 if (-1 != nTokenValue)
 {
 rtl_TextEncoding nrtl_TextEncoding = 
rtl_getTextEncodingFromWindowsCharset(
 static_cast(nTokenValue));
-pFont->SetCharSet(nrtl_TextEncoding);
+aFont.SetCharSet(nrtl_TextEncoding);
 //When we're in a font, the fontname is in the font
 //charset, except for symbol fonts I believe
 if (nrtl_TextEncoding == RTL_TEXTENCODING_SYMBOL)
@@ -525,10 +525,10 @@ void SvxRTFParser::ReadFontTable()
 switch( nTokenValue )
 {
 case 1:
-pFont->SetPitch( PITCH_FIXED );
+aFont.SetPitch( PITCH_FIXED );
 break;
 case 2:
-pFont->SetPitch( PITCH_VARIABLE );
+aFont.SetPitch( PITCH_VARIABLE );
 break;
 }
 break;
@@ -558,16 +558,14 @@ void SvxRTFParser::ReadFontTable()
 if (!sAltNm.isEmpty())
 sFntNm += ";" + sAltNm;
 
-pFont->SetFamilyName( sFntNm );
-m_FontTable.insert(std::make_pair(nInsFontNo, std::move(pFont)));
-pFont.reset(new vcl::Font);
-pFont->SetCharSet( nSystemChar );
+aFont.SetFamilyName( sFntNm );
+m_FontTable.insert(std::make_pair(nInsFontNo, aFont));
+aFont = vcl::Font();
+aFont.SetCharSet( nSystemChar );
 sAltNm.clear();
 sFntNm.clear();
 }
 }
-// the last one we have to delete manually
-pFont.reset();
 SkipToken();// the closing brace is evaluated "above"
 
 // set the default font in the Document
@@ -602,7 +600,7 @@ const vcl::Font& SvxRTFParser::GetFont( sal_uInt16 nId )
 SvxRTFFontTbl::const_iterator it = m_FontTable.find( nId );
 if (it != m_FontTable.end())
 {
-return *it->second;
+return it->second;
 }
 const SvxFontItem& rDfltFont = static_cast(
 pAttrPool->GetDefaultItem( aPl

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

2021-05-31 Thread Noel Grandin (via logerrit)
 sw/inc/IDocumentMarkAccess.hxx |3 ++-
 sw/source/core/doc/docbm.cxx   |8 
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 288a3c2dde611086e6aa5d7a7a15729e027ae75f
Author: Noel Grandin 
AuthorDate: Sun May 30 10:02:29 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 31 10:28:26 2021 +0200

no need to allocate this separately

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

diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index e678f52605ff..3a05a2053bbe 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -23,6 +23,7 @@
 #include 
 #include "IMark.hxx"
 #include 
+#include 
 
 class SwPaM;
 struct SwPosition;
@@ -60,7 +61,7 @@ class IDocumentMarkAccess
 class SW_DLLPUBLIC iterator
 {
 private:
-
std::unique_ptr::const_iterator> m_pIter;
+
std::optional::const_iterator> m_pIter;
 
 public:
 // MarkManager implementation needs to get the real iterator
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index d09bcb6e6046..825785fa9caa 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -60,18 +60,18 @@ IDocumentMarkAccess::iterator::get() const
 }
 
 
IDocumentMarkAccess::iterator::iterator(std::vector<::sw::mark::MarkBase*>::const_iterator
 const& rIter)
-: m_pIter(new std::vector<::sw::mark::MarkBase*>::const_iterator(rIter))
+: m_pIter(rIter)
 {
 }
 
 IDocumentMarkAccess::iterator::iterator(iterator const& rOther)
-: m_pIter(new 
std::vector<::sw::mark::MarkBase*>::const_iterator(*rOther.m_pIter))
+: m_pIter(rOther.m_pIter)
 {
 }
 
 auto IDocumentMarkAccess::iterator::operator=(iterator const& rOther) -> 
iterator&
 {
-m_pIter.reset(new 
std::vector<::sw::mark::MarkBase*>::const_iterator(*rOther.m_pIter));
+m_pIter = rOther.m_pIter;
 return *this;
 }
 
@@ -120,7 +120,7 @@ bool IDocumentMarkAccess::iterator::operator!=(iterator 
const& rOther) const
 }
 
 IDocumentMarkAccess::iterator::iterator()
-: m_pIter(new std::vector<::sw::mark::MarkBase*>::const_iterator())
+: m_pIter(std::in_place)
 {
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Tor Lillqvist (via logerrit)
 include/comphelper/profilezone.hxx |   24 +---
 include/comphelper/traceevent.hxx  |   20 +++-
 2 files changed, 32 insertions(+), 12 deletions(-)

New commits:
commit 1bafb0dd8bd1a210e23c02491e81a29a0722e3da
Author: Tor Lillqvist 
AuthorDate: Thu May 27 10:43:16 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Mon May 31 10:22:24 2021 +0200

Avoid empty std::map constructor

Change-Id: Ie1bc333409fb201d82dd2cff7597e281600f01db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116232
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/include/comphelper/profilezone.hxx 
b/include/comphelper/profilezone.hxx
index ebaae5aa43e8..36730e7f8af6 100644
--- a/include/comphelper/profilezone.hxx
+++ b/include/comphelper/profilezone.hxx
@@ -30,13 +30,8 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent
 
 void addRecording();
 
- public:
-
-// Note that the char pointer is stored as such in the ProfileZone object 
and used in the
-// destructor, so be sure to pass a pointer that stays valid for the 
duration of the object's
-// lifetime.
-ProfileZone(const char* sName, const std::map &args = 
std::map())
-: NamedEvent(sName, args)
+ProfileZone(const char* sName, const OUString &sArgs)
+: NamedEvent(sName, sArgs)
 , m_nNesting(-1)
 {
 if (s_bRecording)
@@ -51,6 +46,21 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent
 m_nCreateTime = 0;
 }
 
+ public:
+
+// Note that the char pointer is stored as such in the ProfileZone object 
and used in the
+// destructor, so be sure to pass a pointer that stays valid for the 
duration of the object's
+// lifetime.
+ProfileZone(const char* sName, const std::map &aArgs)
+: ProfileZone(sName, createArgsString(aArgs))
+{
+}
+
+ProfileZone(const char* sName)
+: ProfileZone(sName, OUString())
+{
+}
+
 ~ProfileZone()
 {
 if (m_nCreateTime > 0)
diff --git a/include/comphelper/traceevent.hxx 
b/include/comphelper/traceevent.hxx
index 339e924e637d..cc3c390d7e59 100644
--- a/include/comphelper/traceevent.hxx
+++ b/include/comphelper/traceevent.hxx
@@ -82,9 +82,14 @@ protected:
 const int m_nPid;
 const OUString m_sArgs;
 
-TraceEvent(std::map args)
+TraceEvent(const OUString& sArgs)
 : m_nPid(getPid())
-, m_sArgs(createArgsString(args))
+, m_sArgs(sArgs)
+{
+}
+
+TraceEvent(std::map args)
+: TraceEvent(createArgsString(args))
 {
 }
 
@@ -105,9 +110,14 @@ class COMPHELPER_DLLPUBLIC NamedEvent : public TraceEvent
 protected:
 const char* m_sName;
 
-NamedEvent(const char* sName,
-   const std::map& args = std::map())
-: TraceEvent(args)
+NamedEvent(const char* sName, const OUString& sArgs)
+: TraceEvent(sArgs)
+, m_sName(sName ? sName : "(null)")
+{
+}
+
+NamedEvent(const char* sName, const std::map& aArgs)
+: TraceEvent(aArgs)
 , m_sName(sName ? sName : "(null)")
 {
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx  |   40 
--
 writerfilter/qa/cppunittests/dmapper/data/textbox-textline-top.docx |binary
 writerfilter/source/dmapper/GraphicImport.cxx   |   13 ++-
 3 files changed, 40 insertions(+), 13 deletions(-)

New commits:
commit 2ff02e6d31702611d0294c31b69f043b61d22a47
Author: Miklos Vajna 
AuthorDate: Wed May 26 11:56:04 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 31 10:07:46 2021 +0200

tdf#139915 DOCX import: fix anchored obj position with to-char and TEXT_LINE

There were multiple problems here:

- commit 8f1a1092d47947847e1d888b0284e8364c663d1f (tdf#97371 DOCX
import: fix text covered by shape, 2016-01-28) disabled to-char
anchoring for TEXT_LINE (e.g. "alignment top, relative to line") because
changing the anchor type of a TextBox could not be changed, but this has
been implemented in sw/ in the meantime, so it can be dropped

- Now that the anchor type is to-char, we can set the vertical relation
to TEXT_LINE, but Word's positive value is "below line", and ours mean
"towards the top of the page, from the bottom of the line", so we need
to drop the workaround of commit
3303a4c5f21874453e634d84408c50e7a0055a4d (tdf#135153 DOCX import: avoid
line-of-text relation with to-para anchoring, 2021-01-18)

Once these are in place, we can fix the remaining problem by inverting
the vertical position of the shape, which instantly fixes the
overlapping textboxes in the bugdoc.

(cherry picked from commit 2f21e4f357ec60450df84ddd858c3cf0a4711b02)

Conflicts:
writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
writerfilter/source/dmapper/GraphicImport.cxx

Change-Id: I895abb76d3bd3bbe3a84e5c27a77df722b96226a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116231
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx 
b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
index bc0271fa13a4..122996d2a675 100644
--- a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -181,16 +182,39 @@ CPPUNIT_TEST_FIXTURE(Test, testTextboxTextline)
 uno::Reference 
xDrawPageSupplier(getComponent(), uno::UNO_QUERY);
 uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
 uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
-sal_Int16 nActual{};
-CPPUNIT_ASSERT(xShape->getPropertyValue("VertOrientRelation") >>= nActual);
+sal_Int16 nActualRelation{};
+CPPUNIT_ASSERT(xShape->getPropertyValue("VertOrientRelation") >>= 
nActualRelation);
+sal_Int32 nActualPosition{};
+CPPUNIT_ASSERT(xShape->getPropertyValue("VertOrientPosition") >>= 
nActualPosition);
+
+sal_Int16 nExpectedRelation = text::RelOrientation::TEXT_LINE;
+CPPUNIT_ASSERT_EQUAL(nExpectedRelation, nActualRelation);
+// 0 on this branch, but sw/qa/extras/ooxmlexport/data/tdf97371.docx shows 
that negative values
+// work fine in general, don't bother:
+// sal_Int32 nExpectedPosition = -2;
+// CPPUNIT_ASSERT_EQUAL(nExpectedPosition, nActualPosition);
+}
 
+CPPUNIT_TEST_FIXTURE(Test, testTextboxTextlineTop)
+{
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"textbox-textline-top.docx";
+getComponent() = loadFromDesktop(aURL);
+uno::Reference 
xDrawPageSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+sal_Int16 nActualRelation{};
+CPPUNIT_ASSERT(xShape->getPropertyValue("VertOrientRelation") >>= 
nActualRelation);
+sal_Int16 nExpectedRelation = text::RelOrientation::TEXT_LINE;
 // Without the accompanying fix in place, this test would have failed with:
-// - Expected: 0 (text::RelOrientation::FRAME)
-// - Actual  : 9 (text::RelOrientation::TEXT_LINE)
-// i.e. the relation had a value which doesn't make sense for to-para 
anchoring (only for
-// to-char anchoring).
-sal_Int16 nExpected = text::RelOrientation::FRAME;
-CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
+// - Expected: 9 (TEXT_LINE)
+// - Actual  : 0 (FRAME)
+// i.e. the anchor point for the positioning was wrong, resulting in 
overlapping textboxes.
+CPPUNIT_ASSERT_EQUAL(nExpectedRelation, nActualRelation);
+
+sal_Int16 nActualOrient{};
+CPPUNIT_ASSERT(xShape->getPropertyValue("VertOrient") >>= nActualOrient);
+sal_Int16 nExpectedOrient = text::VertOrientation::BOTTOM;
+CPPUNIT_ASSERT_EQUAL(nExpectedOrient, nActualOrient);
 }
 }
 
diff --git 
a/writerfilter/qa/cppunittests/dmapper/data/textbox-textline-top.docx 
b/writerfilter/qa/cppunittests/

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

2021-05-31 Thread Miklos Vajna (via logerrit)
 writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx  |   21 
++
 writerfilter/qa/cppunittests/dmapper/data/textbox-textline.docx |binary
 writerfilter/source/dmapper/GraphicImport.cxx   |7 +++
 3 files changed, 28 insertions(+)

New commits:
commit 10843ca47ea495d39f32fa30b83d4da9153ee053
Author: Miklos Vajna 
AuthorDate: Mon Jan 18 20:51:26 2021 +0100
Commit: Miklos Vajna 
CommitDate: Mon May 31 10:07:20 2021 +0200

tdf#135153 DOCX import: avoid line-of-text relation with to-para anchoring

Regression from commit 8f1a1092d47947847e1d888b0284e8364c663d1f
(tdf#97371 DOCX import: fix text covered by shape, 2016-01-28), the
problem was that once the import decides that a shape should have no
to-char anchoring, it should not leave behind vertical relation types
which make no sense for to-para anchoring.

text::RelOrientation::TEXT_LINE is specific to to-char anchoring, so
reset the relation back to the default text::RelOrientation::FRAME.

This means we'll no longer show "from top" on the UI while the doc model
contains "from bottom": and those have to be in sync, otherwise pressing
"down" while the shape is selected will actually move it up.

(cherry picked from commit 3303a4c5f21874453e634d84408c50e7a0055a4d)

Conflicts:
writerfilter/source/dmapper/GraphicImport.cxx

Change-Id: I660a7bb30133ea866cc4ba1620ae15fea243ef8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116230
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx 
b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
index 37e462012c66..bc0271fa13a4 100644
--- a/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx
@@ -171,6 +171,27 @@ CPPUNIT_TEST_FIXTURE(Test, testWrapPolyCrop)
 // were wrapping around the image, not only 2 as Word does it.
 CPPUNIT_ASSERT_EQUAL(2368., aPolygon.getB2DPoint(0).getY());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testTextboxTextline)
+{
+// Load a document with a shape with a textbox.
+// The shape's vertical relation is .
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"textbox-textline.docx";
+getComponent() = loadFromDesktop(aURL);
+uno::Reference 
xDrawPageSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+sal_Int16 nActual{};
+CPPUNIT_ASSERT(xShape->getPropertyValue("VertOrientRelation") >>= nActual);
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 0 (text::RelOrientation::FRAME)
+// - Actual  : 9 (text::RelOrientation::TEXT_LINE)
+// i.e. the relation had a value which doesn't make sense for to-para 
anchoring (only for
+// to-char anchoring).
+sal_Int16 nExpected = text::RelOrientation::FRAME;
+CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/qa/cppunittests/dmapper/data/textbox-textline.docx 
b/writerfilter/qa/cppunittests/dmapper/data/textbox-textline.docx
new file mode 100644
index ..493604d778e9
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/textbox-textline.docx differ
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx 
b/writerfilter/source/dmapper/GraphicImport.cxx
index f8a2482d39ef..ae98dadfc004 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -841,6 +841,13 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
 
 xShapeProps->setPropertyValue("AnchorType", 
uno::makeAny(eAnchorType));
 
+if (m_pImpl->nVertRelation == 
text::RelOrientation::TEXT_LINE && bTextBox)
+{
+// TEXT_LINE to specific to to-char anchoring, we 
have to-para, so reset
+// to default.
+m_pImpl->nVertRelation = 
text::RelOrientation::FRAME;
+}
+
 //only the position orientation is handled in 
applyPosition()
 m_pImpl->applyPosition(xShapeProps);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - 3 commits - sw/qa sw/source

2021-05-31 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx|   44 
 sw/source/filter/html/htmlflywriter.cxx   |2 
 sw/source/filter/html/htmlreqifreader.cxx |  156 ++
 sw/source/filter/html/htmlreqifreader.hxx |4 
 4 files changed, 162 insertions(+), 44 deletions(-)

New commits:
commit 7a5717cb8ad4c6b30d46ad86326fa4274bd84f12
Author: Miklos Vajna 
AuthorDate: Fri May 28 16:02:50 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 31 10:04:24 2021 +0200

sw XHTML / reqif export, RTF markup of images: write OLE1 presentation data

With this, images are exported as PBrush OLE objects, to please some
consumers (e.g. IBM Doors).

(cherry picked from commit 5fbd20682f34c817359156889ecbc3ad8290d72c)

Conflicts:
sw/source/filter/html/htmlreqifreader.cxx

Change-Id: I89805cd66709d96cbe71853d65671f76a3fc871f

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 5074c5e54e0d..50e001c72890 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -152,11 +152,6 @@ OLE1Reader::OLE1Reader(SvStream& rStream)
 rStream.ReadUInt32(m_nNativeDataSize);
 rStream.SeekRel(m_nNativeDataSize);
 
-if (!rStream.remainingSize())
-{
-return;
-}
-
 rStream.ReadUInt32(nData); // OLEVersion for presentation data
 CPPUNIT_ASSERT(rStream.good());
 rStream.ReadUInt32(nData); // FormatID
@@ -1492,6 +1487,11 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqifImageToOle)
 // Without the accompanying fix in place, this test would have failed, as 
aOle1 was empty.
 OLE1Reader aOle1Reader(aOle1);
 CPPUNIT_ASSERT(aOle1Reader.m_nNativeDataSize);
+
+// Make sure that the presentation data byte array is not empty.
+// Without the accompanying fix in place, this test would have failed, as 
aOle1 only contained
+// the native data.
+CPPUNIT_ASSERT(aOle1Reader.m_nPresentationDataSize);
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/html/htmlreqifreader.cxx 
b/sw/source/filter/html/htmlreqifreader.cxx
index 70b0d697ea4a..8a6101fa93ee 100644
--- a/sw/source/filter/html/htmlreqifreader.cxx
+++ b/sw/source/filter/html/htmlreqifreader.cxx
@@ -555,18 +555,7 @@ bool WrapGraphicInRtf(const Graphic& rGraphic, const 
SwFrameFormat& rFormat, SvS
 aNativeData.Seek(0);
 aOle1.WriteStream(aNativeData);
 
-// TODO Write Presentation.
-
-// End objdata.
-msfilter::rtfutil::WriteHex(static_cast(aOle1.GetData()), aOle1.GetSize(),
-&rRtf);
-rRtf.WriteCharPtr("}");
-rRtf.WriteOString(SAL_NEWLINE_STRING);
-
-rRtf.WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_RESULT);
-rRtf.WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_PICT);
-
-// Prepare presendation data.
+// Prepare presentation data.
 const sal_uInt8* pPresentationData = nullptr;
 sal_uInt64 nPresentationData = 0;
 SvMemoryStream aGraphicStream;
@@ -580,6 +569,43 @@ bool WrapGraphicInRtf(const Graphic& rGraphic, const 
SwFrameFormat& rFormat, SvS
 msfilter::rtfutil::StripMetafileHeader(pPresentationData, 
nPresentationData);
 }
 
+// Write Presentation.
+// OLEVersion.
+aOle1.WriteUInt32(0x0501);
+// FormatID: constant means the ClassName field is present.
+aOle1.WriteUInt32(0x0005);
+// ClassName: null terminated pascal string.
+OString aPresentationClassName("METAFILEPICT");
+aOle1.WriteUInt32(aPresentationClassName.getLength() + 1);
+aOle1.WriteOString(aPresentationClassName);
+aOle1.WriteChar(0);
+const sal_uInt8* pBytes = nullptr;
+sal_uInt64 nBytes = 0;
+// Take presentation data for OLE1 from RTF.
+pBytes = pPresentationData;
+nBytes = nPresentationData;
+// Width.
+aOle1.WriteUInt32(nWidth);
+// Height.
+aOle1.WriteUInt32(nHeight * -1);
+// PresentationDataSize: size of (reserved fields + pBytes).
+aOle1.WriteUInt32(8 + nBytes);
+// Reserved1-4.
+aOle1.WriteUInt16(0x0008);
+aOle1.WriteUInt16(0x31b1);
+aOle1.WriteUInt16(0x1dd9);
+aOle1.WriteUInt16(0x);
+aOle1.WriteBytes(pBytes, nBytes);
+
+// End objdata.
+msfilter::rtfutil::WriteHex(static_cast(aOle1.GetData()), aOle1.GetSize(),
+&rRtf);
+rRtf.WriteCharPtr("}");
+rRtf.WriteOString(SAL_NEWLINE_STRING);
+
+rRtf.WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_RESULT);
+rRtf.WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_PICT);
+
 Size aMapped(rGraphic.GetPrefSize());
 rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PICW);
 rRtf.WriteOString(OString::number(aMapped.Width()));
commit ffbf6916e2bd7de4daa862e11e52c9ff24929260
Author: Miklos Vajna 
AuthorDate: Thu May 27 16:54:59 2021 +0200
Commit: Miklos Vajna 
CommitDate: Fri May 28 16:20:07 2021 +0200

sw XHTML / reqif export, RTF markup of images: write objdata

The native data is BMP

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

2021-05-31 Thread Miklos Vajna (via logerrit)
 sw/source/filter/basflt/fltshell.cxx  |   82 ++---
 sw/source/filter/html/htmlatr.cxx |  206 --
 sw/source/filter/html/htmlnum.cxx |   14 +-
 sw/source/filter/html/htmlnum.hxx |   66 +-
 sw/source/filter/inc/fltshell.hxx |   26 ++--
 sw/source/filter/inc/msfilter.hxx |2 
 sw/source/filter/ww8/writerhelper.cxx |   10 -
 sw/source/filter/ww8/ww8graf.cxx  |4 
 sw/source/filter/ww8/ww8par.cxx   |   26 ++--
 sw/source/filter/ww8/ww8par5.cxx  |2 
 sw/source/filter/ww8/ww8par6.cxx  |   10 -
 11 files changed, 222 insertions(+), 226 deletions(-)

New commits:
commit efc3412b1a86dfff56c49364efb36256d057a1e1
Author: Miklos Vajna 
AuthorDate: Mon May 31 08:53:32 2021 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 31 10:05:40 2021 +0200

sw: prefix members of HTMLEndPosLst, SwFltStackEntry, SwFltTOX and ...

... SwHTMLNumRuleInfo

See tdf#94879 for motivation.

Change-Id: Ie091511f7b2fff3949295c310045631676879655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116421
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sw/source/filter/basflt/fltshell.cxx 
b/sw/source/filter/basflt/fltshell.cxx
index f2c6c8c7eac4..e81bcec11df4 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -78,15 +78,15 @@ static OUString lcl_getTypePath(OUString& rType)
 SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, 
std::unique_ptr pHt)
 : m_aMkPos(rStartPos)
 , m_aPtPos(rStartPos)
-, pAttr( std::move(pHt) )
+, m_pAttr( std::move(pHt) )
 , m_isAnnotationOnEnd(false)
 , mnStartCP(-1)
 , mnEndCP(-1)
-, bIsParaEnd(false)
+, m_bIsParaEnd(false)
 {
-bOld= false;// used for marking Attributes *before* skipping field 
results
-bOpen = true;   // lock the attribute --> may first
-bConsumedByField = false;
+m_bOld= false;// used for marking Attributes *before* skipping 
field results
+m_bOpen = true;   // lock the attribute --> may first
+m_bConsumedByField = false;
 }
 
 SwFltStackEntry::~SwFltStackEntry()
@@ -100,7 +100,7 @@ void SwFltStackEntry::SetEndPos(const SwPosition& rEndPos)
 // Everything with sal_uInt16s, lest the inserting of new text at
 // the cursor position moves the attribute's range
 // That's not the desired behavior!
-bOpen = false;  // release and remember END
+m_bOpen = false;  // release and remember END
 m_aPtPos.FromSwPosition(rEndPos);
 }
 
@@ -168,8 +168,8 @@ bool SwFltStackEntry::MakeRegion(SwDoc& rDoc, SwPaM& 
rRegion, RegionMode const e
 
 bool SwFltStackEntry::MakeRegion(SwDoc& rDoc, SwPaM& rRegion, RegionMode 
eCheck) const
 {
-return MakeRegion(rDoc, rRegion, eCheck, m_aMkPos, m_aPtPos, bIsParaEnd,
-pAttr->Which());
+return MakeRegion(rDoc, rRegion, eCheck, m_aMkPos, m_aPtPos, m_bIsParaEnd,
+m_pAttr->Which());
 }
 
 SwFltControlStack::SwFltControlStack(SwDoc& rDo, sal_uLong nFieldFl)
@@ -218,7 +218,7 @@ void SwFltControlStack::MoveAttrs(const SwPosition& rPos, 
MoveAttrsMode eMode)
 assert(!(rEntry.m_isAnnotationOnEnd && 
rEntry.m_aPtPos.m_nContent > nPosCt));
 if (eMode == MoveAttrsMode::POSTIT_INSERTED
 &&  rEntry.m_aPtPos.m_nContent == nPosCt
-&&  rEntry.pAttr->Which() == RES_FLTR_ANNOTATIONMARK)
+&&  rEntry.m_pAttr->Which() == RES_FLTR_ANNOTATIONMARK)
 {
 rEntry.m_isAnnotationOnEnd = true;
 eMode = MoveAttrsMode::DEFAULT; // only set 1 flag
@@ -236,7 +236,7 @@ void SwFltControlStack::MarkAllAttrsOld()
 {
 size_t nCnt = m_Entries.size();
 for (size_t i=0; i < nCnt; ++i)
-m_Entries[i]->bOld = true;
+m_Entries[i]->m_bOld = true;
 }
 
 namespace
@@ -245,12 +245,12 @@ namespace
 const SfxPoolItem& rAttr)
 {
 return (pExtendCandidate &&
-!pExtendCandidate->bConsumedByField &&
+!pExtendCandidate->m_bConsumedByField &&
 //if we bring character attributes into the fold we need to 
both
 //a) consider RES_CHRATR_FONTSIZE and RES_CHRATR_FONT wrt 
Word's CJK/CTL variants
 //b) consider crossing table cell boundaries (tdf#102334)
 isPARATR_LIST(rAttr.Which()) &&
-*(pExtendCandidate->pAttr) == rAttr);
+*(pExtendCandidate->m_pAttr) == rAttr);
 }
 }
 
@@ -270,7 +270,7 @@ void SwFltControlStack::NewAttr(const SwPosition& rPos, 
const SfxPoolItem& rAttr
 //from. If so we merge it with this one and elide adding another
 //to the stack
 pExtendCandidate->SetEndPos(rPos);
-pExtendCandidate->bOpen=true;
+pExtendCandidate->m_bOpen=true;
 }
 else
 {
@@ -331,8 +331,8 @@ void SwFltControlStack:

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

2021-05-31 Thread Stephan Bergmann (via logerrit)
 chart2/source/model/template/CandleStickChartType.hxx |3 ++-
 compilerplugins/clang/fragiledestructor.cxx   |2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 6cb1745c24c7651050e30216860c539fa13cc0e2
Author: Stephan Bergmann 
AuthorDate: Mon May 31 08:30:38 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 31 09:57:37 2021 +0200

tdf#142467: Update comments with GCC bug ID

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

diff --git a/chart2/source/model/template/CandleStickChartType.hxx 
b/chart2/source/model/template/CandleStickChartType.hxx
index 969c14c24d35..13dfb30db47f 100644
--- a/chart2/source/model/template/CandleStickChartType.hxx
+++ b/chart2/source/model/template/CandleStickChartType.hxx
@@ -23,7 +23,8 @@
 namespace chart
 {
 
-// see tdf#142467 before restoring 'final'
+// see  "[10/11/12 
Regression] using
+// declaration causing virtual call with wrongly adjusted this pointer" before 
restoring 'final'
 class CandleStickChartType /* final */ : public ChartType
 {
 public:
diff --git a/compilerplugins/clang/fragiledestructor.cxx 
b/compilerplugins/clang/fragiledestructor.cxx
index 9bce19ccda27..c9f8568fdafd 100644
--- a/compilerplugins/clang/fragiledestructor.cxx
+++ b/compilerplugins/clang/fragiledestructor.cxx
@@ -51,7 +51,7 @@ public:
  return false;
 if (loplugin::isSamePathname(fn, SRCDIR 
"/sw/source/core/layout/ssfrm.cxx")) // ~SwFrame calling IsDeleteForbidden
  return false;
-if (loplugin::isSamePathname(fn, SRCDIR 
"/chart2/source/model/template/CandleStickChartType.cxx")) // to ignore 
tdf#142467 workaround
+if (loplugin::isSamePathname(fn, SRCDIR 
"/chart2/source/model/template/CandleStickChartType.cxx")) // to ignore 
 "[10/11/12 Regression] 
using declaration causing virtual call with wrongly adjusted this pointer" 
workaround
  return false;
 
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - officecfg/registry starmath/source

2021-05-31 Thread Gabor Kelemen (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   13 
++
 starmath/source/edit.cxx   |5 ++-
 2 files changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 7db006c1b1601533bfc7c361af69800a8b17979e
Author: Gabor Kelemen 
AuthorDate: Thu May 27 11:28:21 2021 +0200
Commit: László Németh 
CommitDate: Mon May 31 09:47:32 2021 +0200

tdf#142257 (related) Replace Ctrl+[] shortcuts in Calc for Hungarian

To mimic Excel shortcuts and make them work on Windows+HU keyboard layout

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

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index dee162fb7036..7e540357387b 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -1301,12 +1301,16 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for 
some emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:MarkPrecedents
+
+
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:MarkDependents
+
+
   
 
 
@@ -1408,6 +1412,15 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Underline
+
+.uno:MarkDependents
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+
+.uno:MarkPrecedents
   
 
 
commit 50fa8ea7406c5ac94f54c497e43f2489a7af24c8
Author: Caolán McNamara 
AuthorDate: Sun May 30 15:10:42 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 09:47:20 2021 +0200

cid#1476301 Dereference null return value

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

diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 079be31c88ae..2588e9f60325 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -711,8 +711,9 @@ void SmEditTextWindow::UpdateStatus(bool bSetDocModified)
 SmModule *pMod = SM_MOD();
 if (pMod && pMod->GetConfig()->IsAutoRedraw())
 Flush();
-if (bSetDocModified)
-mrEditWindow.GetDoc()->SetModified();
+
+if (SmDocShell *pModifyDoc = bSetDocModified ? mrEditWindow.GetDoc() : 
nullptr)
+pModifyDoc->SetModified();
 
 static_cast(GetEditEngine())->executeZoom(GetEditView());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-31 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkdata.hxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 55cc7b0d96bb2e21ff101cde9ea08e9b0091147a
Author: Caolán McNamara 
AuthorDate: Sun May 30 15:08:01 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon May 31 09:47:00 2021 +0200

cid#1485136 Structurally dead code

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

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 5b37adaed263..cc37cd12a19b 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -173,11 +173,12 @@ inline bool surface_get_device_position(GdkSurface* 
pSurface,
pMask);
 #else
 int nX(x), nY(y);
-return gdk_window_get_device_position(pSurface, pDevice,
-   &nX, &nY,
-   pMask);
+bool bRet = gdk_window_get_device_position(pSurface, pDevice,
+   &nX, &nY,
+   pMask);
 x = nX;
 y = nY;
+return bRet;
 #endif
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - cui/source

2021-05-31 Thread Muhammet Kara (via logerrit)
 cui/source/dialogs/AdditionsDialog.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 9a9089d0f7c205ed6428e55fb86062c715483a4b
Author: Muhammet Kara 
AuthorDate: Sat May 29 18:17:54 2021 +0300
Commit: Xisco Fauli 
CommitDate: Mon May 31 09:18:26 2021 +0200

tdf#136292: Fix crash on invalid JSON from the extensions API

Change-Id: I91ed555f93173dee10e87025b231560693be50b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116390
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
(cherry picked from commit e98b0891d6e0f1d6be4e4a4761bd1ab16bfab85c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116168
Reviewed-by: Xisco Fauli 

diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index 8bd5dee65222..a80e8562c398 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -45,6 +45,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -124,7 +125,15 @@ void parseResponse(const std::string& rResponse, 
std::vector& aAdd
 if (rResponse.empty())
 return;
 
-aJsonDoc.load(rResponse, aConfig);
+try
+{
+aJsonDoc.load(rResponse, aConfig);
+}
+catch (const orcus::json::parse_error&)
+{
+TOOLS_WARN_EXCEPTION("cui.dialogs", "Invalid JSON file from the 
extensions API");
+return;
+}
 
 auto aDocumentRoot = aJsonDoc.get_document_root();
 if (aDocumentRoot.type() != orcus::json::node_t::object)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits