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

2021-03-31 Thread Mike Kaganski (via logerrit)
 include/vcl/fileregistration.hxx |3 +++
 vcl/win/app/fileregistration.cxx |5 +
 2 files changed, 8 insertions(+)

New commits:
commit 3595b8037d9d00fe5fa45f79dd19a032fc5f0ba5
Author: Mike Kaganski 
AuthorDate: Thu Apr 1 09:11:52 2021 +0300
Commit: Mike Kaganski 
CommitDate: Thu Apr 1 08:24:51 2021 +0200

Fix --disable-pch Windows build - missing includes

... after commit 6a6cd129f34220fadf5d134a2dc2c1e368acbc4f

Change-Id: I681fec2e801a02681f4f6722681832d7046e164f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113437
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/include/vcl/fileregistration.hxx b/include/vcl/fileregistration.hxx
index 3dd16f728cc9..ad9ac876e9e8 100644
--- a/include/vcl/fileregistration.hxx
+++ b/include/vcl/fileregistration.hxx
@@ -11,6 +11,9 @@
 
 #include 
 
+#include 
+#include 
+
 namespace vcl::fileregistration
 {
 VCL_DLLPUBLIC void LaunchRegistrationUI();
diff --git a/vcl/win/app/fileregistration.cxx b/vcl/win/app/fileregistration.cxx
index 863e66d0a3b1..7454f5e0c2f4 100644
--- a/vcl/win/app/fileregistration.cxx
+++ b/vcl/win/app/fileregistration.cxx
@@ -15,10 +15,15 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
 #include 
+#include 
+
+#include 
 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-31 Thread Jim Raykowski (via logerrit)
 svx/source/svdraw/svdedtv.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3b92b0c7a6d6832917fbc5073c3299a1ffe861da
Author: Jim Raykowski 
AuthorDate: Wed Mar 31 15:56:39 2021 -0800
Commit: Noel Grandin 
CommitDate: Thu Apr 1 08:04:38 2021 +0200

tdf#141405 fix null reference use crash

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

diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index c49474cf6c20..3470a8d91458 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -1005,8 +1005,8 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, 
SdrPageView& rPV, SdrInser
 
 css::uno::Reference 
xServices(GetModel()->getUnoModel(),
   css::uno::UNO_QUERY);
-if (xServices->supportsService("com.sun.star.sheet.SpreadsheetDocument") ||
-xServices->supportsService("com.sun.star.text.TextDocument"))
+if (xServices.is() && 
(xServices->supportsService("com.sun.star.sheet.SpreadsheetDocument") ||
+   
xServices->supportsService("com.sun.star.text.TextDocument")))
 {
 const bool bUndo(IsUndoEnabled());
 GetModel()->EnableUndo(false);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry sfx2/Library_sfx.mk sfx2/source

2021-03-31 Thread Samuel Mehrbrodt (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   16 ++
 sfx2/Library_sfx.mk|3 +
 sfx2/source/inc/eventsupplier.hxx  |4 +
 sfx2/source/notify/eventsupplier.cxx   |   34 +
 4 files changed, 57 insertions(+)

New commits:
commit 0a893a15b02a3662e3c68776be09534c9f955e4f
Author: Samuel Mehrbrodt 
AuthorDate: Tue Mar 16 16:27:44 2021 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Apr 1 07:45:21 2021 +0200

Add mechanism to selectively enable macros for document events

Change-Id: I56703b2c0ee009a645458c78c026c546b2e7e321
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112584
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 91bf8142c72f..486c9aafb47f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2783,6 +2783,22 @@
   
   true
 
+
+  
+List of script URLS which are allowed to be called by 
document events.
+Look into content.xml of the odf file to find the URL.
+You can either write the full URL, a part of it (starting from the 
beginning),
+or use regular expressions.
+Examples:
+  * 
vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=user
+  * vnd.sun.star.script:Standard.Module1
+  * vnd.sun.star.script:YourScript.*location=share
+  * .*location=application.*
+
+When this list is empty, all document event URLs are allowed.
+
+  
+
 
   
 List with trusted authors.
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index b5126ca87893..34ea74dfe38c 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -69,6 +69,9 @@ $(eval $(call gb_Library_use_libraries,sfx,\
 
 $(eval $(call gb_Library_use_externals,sfx,\
 boost_headers \
+icu_headers \
+icui18n \
+icuuc \
 libxml2 \
 orcus \
 orcus-parser\
diff --git a/sfx2/source/inc/eventsupplier.hxx 
b/sfx2/source/inc/eventsupplier.hxx
index b6d63a09ea59..3aa73a7ffc8d 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -78,6 +78,10 @@ public:
 ::comphelper::NamedValueCollection& 
o_normalizedDescriptor,
 SfxObjectShell* i_document );
 static void Execute( css::uno::Any const & aEventData, const 
css::document::DocumentEvent& aTrigger, SfxObjectShell* pDoc );
+
+private:
+/// Check if script URL whitelist exists, and if so, if current script url 
is part of it
+static bool isScriptURLAllowed(const OUString& aScriptURL);
 };
 
 #endif
diff --git a/sfx2/source/notify/eventsupplier.cxx 
b/sfx2/source/notify/eventsupplier.cxx
index 57c8ebe31751..091ed963de90 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -33,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -41,6 +43,10 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 using namespace css;
 using namespace ::com::sun::star;
 
@@ -147,6 +153,31 @@ sal_Bool SAL_CALL SfxEvents_Impl::hasElements()
 return maEventNames.hasElements();
 }
 
+bool SfxEvents_Impl::isScriptURLAllowed(const OUString& aScriptURL)
+{
+std::optional> allowedEvents(
+
officecfg::Office::Common::Security::Scripting::AllowedDocumentEventURLs::get());
+// When AllowedDocumentEventURLs is empty, all event URLs are allowed
+if (!allowedEvents)
+return true;
+
+icu::ErrorCode status;
+const uint32_t rMatcherFlags = UREGEX_CASE_INSENSITIVE;
+icu::UnicodeString usInput(aScriptURL.getStr());
+const css::uno::Sequence& rAllowedEvents = *allowedEvents;
+for (auto const& allowedEvent : rAllowedEvents)
+{
+icu::UnicodeString usRegex(allowedEvent.getStr());
+icu::RegexMatcher rmatch1(usRegex, usInput, rMatcherFlags, status);
+if (aScriptURL.startsWith(allowedEvent) || rmatch1.matches(status))
+{
+return true;
+}
+}
+
+return false;
+}
+
 void SfxEvents_Impl::Execute( uno::Any const & aEventData, const 
document::DocumentEvent& aTrigger, SfxObjectShell* pDoc )
 {
 uno::Sequence < beans::PropertyValue > aProperties;
@@ -185,6 +216,9 @@ void SfxEvents_Impl::Execute( uno::Any const & aEventData, 
const document::Docum
 if (aScript.isEmpty())
 return;
 
+if (!isScriptURLAllowed(aScript))
+return;
+
 if (!pDoc)
 pDoc = SfxObjectShell::Current();
 
___

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-1+backports' - 6 commits - android/source

2021-03-31 Thread Michael Weghorn (via logerrit)
 android/source/res/values-de/strings.xml  |9 
 android/source/res/values-tr/strings.xml  |7 
 android/source/res/values/strings.xml |9 
 android/source/src/java/org/libreoffice/LOKitTileProvider.java|   13 -
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java  |   81 
++
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |  120 
+-
 6 files changed, 107 insertions(+), 132 deletions(-)

New commits:
commit 2d2e8414cbc0e52359d9b0440f06d4c99135a227
Author: Michael Weghorn 
AuthorDate: Wed Mar 31 15:04:36 2021 +0200
Commit: Michael Weghorn 
CommitDate: Thu Apr 1 07:18:38 2021 +0200

android: Don't mark doc changed on keypress in readonly mode

Since input etc. is otherwise ignored in readonly mode,
also don't mark the document as changed on keypress.

This e.g. avoids an unnecessary dialog whether or not to
save the document after opening a document with experimental
editing mode disabled, then pressing a key (on hardware
keyboard, soft keyboard isn't shown in readonly mode)
and then pressing the "Back" button to close the document
again.

Change-Id: I095c79549719d376005e1c642c58e6b1bb9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113417
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 441342654e5b4c61317b9a596396a1d817dd8547)

diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 960e3374a97a..cfdc81000f51 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -168,8 +168,8 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 layerView.setOnKeyListener(new View.OnKeyListener() {
 @Override
 public boolean onKey(View view, int i, KeyEvent keyEvent) {
-if(keyEvent.getKeyCode() != KeyEvent.KEYCODE_BACK){
-isDocumentChanged=true;
+if(!isReadOnlyMode() && keyEvent.getKeyCode() != 
KeyEvent.KEYCODE_BACK){
+setDocumentChanged(true);
 }
 return false;
 }
commit f6d174c66025ad21829aa3e7f65a75ce6fa0074d
Author: Michael Weghorn 
AuthorDate: Wed Mar 31 14:55:15 2021 +0200
Commit: Michael Weghorn 
CommitDate: Thu Apr 1 07:18:33 2021 +0200

android: Drop some unused imports

Change-Id: If72949f949cba23397d87c8f67b9434861f9bb7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113414
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 51f6e11aee50cc429021be27bd33875593425683)

diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index a070c292009c..960e3374a97a 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -40,7 +40,6 @@ import org.libreoffice.overlay.CalcHeadersController;
 import org.libreoffice.overlay.DocumentOverlay;
 import org.libreoffice.storage.DocumentProviderFactory;
 import org.libreoffice.storage.IFile;
-import org.libreoffice.ui.FileUtilities;
 import org.libreoffice.ui.LibreOfficeUIActivity;
 import org.mozilla.gecko.gfx.GeckoLayerClient;
 import org.mozilla.gecko.gfx.LayerView;
diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index f05bcae58a49..539b355cc932 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -11,12 +11,10 @@ package org.libreoffice.ui;
 
 import android.Manifest;
 import android.app.Activity;
-import android.app.AlertDialog;
 import android.content.ActivityNotFoundException;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
-import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.SharedPreferences;
@@ -29,7 +27,6 @@ import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Build;
 import android.os.Bundle;
-import android.os.Handler;
 import android.preference.PreferenceManager;
 import android.support.annotation.NonNull;
 import android.support.design.widget.FloatingActionButton;
@@ -45,7 +42,6 @@ import android.support.v7.widget.GridLayoutManager;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.Toolbar;

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source include/vcl officecfg/registry solenv/sanitizers vcl/inc vcl/Library_vcl.mk vcl/win

2021-03-31 Thread Matt K (via logerrit)
 cui/Library_cui.mk |5 
 cui/UIConfig_cui.mk|6 
 cui/source/dialogs/fileextcheckdlg.cxx |   55 +++
 cui/source/factory/dlgfact.cxx |   11 
 cui/source/factory/dlgfact.hxx |6 
 cui/source/inc/fileextcheckdlg.hxx |   39 ++
 cui/source/options/optgdlg.cxx |   43 +-
 cui/source/options/optgdlg.hxx |1 
 cui/uiconfig/ui/fileextcheckdialog.ui  |  109 +++
 cui/uiconfig/ui/optgeneralpage.ui  |   15 
 desktop/source/app/app.cxx |   10 
 include/vcl/abstdlg.hxx|6 
 include/vcl/fileregistration.hxx   |   21 +
 officecfg/registry/data/org/openoffice/Office/Common.xcu   |3 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |7 
 solenv/sanitizers/ui/cui.suppr |1 
 vcl/Library_vcl.mk |1 
 vcl/inc/strings.hrc|3 
 vcl/win/app/fileregistration.cxx   |  198 +
 19 files changed, 514 insertions(+), 26 deletions(-)

New commits:
commit 6a6cd129f34220fadf5d134a2dc2c1e368acbc4f
Author: Matt K 
AuthorDate: Thu Mar 25 00:40:33 2021 -0500
Commit: Mike Kaganski 
CommitDate: Thu Apr 1 06:30:36 2021 +0200

tdf#45735 New UI dialog at app startup to check default file formats

On Windows only, and only on a non-admin installation, check on application
startup whether the file formats ".ods", ".odt", and ".odp" are registered
to be opened by LibreOffice by default.  If any of the formats are not
default, show a UI dialog informing the user which formats are not default
and ask the user to set the defaults.  If the user selects "OK" to set
defaults then the Windows UI corresponding to the user's Windows version is
opened for selecting defaults per program.  There is also a checkbox on the
dialog to select whether checking is performed on application startup.

Also, in Tools -> Options -> General, add a UI checkbox for performing this
check on application startup, and refactor the existing button "Windows
Default apps" to use the same Windows UI Launch APIs.

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

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index f2df06cc5f2c..d6fa68e0d194 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -85,7 +85,10 @@ ifeq ($(OS),WNT)
 $(eval $(call gb_Library_use_system_win32_libs,cui,\
 advapi32 \
 shlwapi \
-ole32 \
+))
+
+$(eval $(call gb_Library_add_exception_objects,cui,\
+cui/source/dialogs/fileextcheckdlg \
 ))
 endif
 
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 153d6fe98fda..ff3c718b21d6 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -9,6 +9,12 @@
 
 $(eval $(call gb_UIConfig_UIConfig,cui))
 
+ifeq ($(OS),WNT)
+$(eval $(call gb_UIConfig_add_uifiles,cui,\
+   cui/uiconfig/ui/fileextcheckdialog \
+))
+endif
+
 $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/aboutdialog \
cui/uiconfig/ui/aboutconfigdialog\
diff --git a/cui/source/dialogs/fileextcheckdlg.cxx 
b/cui/source/dialogs/fileextcheckdlg.cxx
new file mode 100644
index ..732f8367436a
--- /dev/null
+++ b/cui/source/dialogs/fileextcheckdlg.cxx
@@ -0,0 +1,55 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+
+#include 
+#include 
+
+#include 
+
+FileExtCheckDialog::FileExtCheckDialog(weld::Window* pParent, const OUString& 
sTitle,
+   const OUString& sMsg)
+: GenericDialogController(pParent, "cui/ui/fileextcheckdialog.ui", 
"FileExtCheckDialog")
+, m_pText(m_xBuilde

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

2021-03-31 Thread Mike Kaganski (via logerrit)
 include/oox/export/utils.hxx|7 +--
 sw/source/filter/ww8/docxsdrexport.cxx  |2 +-
 sw/source/filter/ww8/rtfattributeoutput.cxx |   27 ++-
 sw/source/filter/ww8/wrtw8esh.cxx   |7 ---
 sw/source/filter/ww8/ww8par.cxx |   18 ++
 5 files changed, 38 insertions(+), 23 deletions(-)

New commits:
commit d10a49d64469411a23b3660a82106405808da028
Author: Mike Kaganski 
AuthorDate: Wed Mar 31 20:38:30 2021 +0300
Commit: Mike Kaganski 
CommitDate: Thu Apr 1 06:16:04 2021 +0200

Use o3tl::convert for conversion to/from EMUs

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

diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx
index 510505aa3d84..1a9a790d2182 100644
--- a/include/oox/export/utils.hxx
+++ b/include/oox/export/utils.hxx
@@ -20,6 +20,9 @@
 #ifndef INCLUDED_OOX_EXPORT_UTILS_HXX
 #define INCLUDED_OOX_EXPORT_UTILS_HXX
 
+#include 
+
+#include 
 #include 
 #include 
 
@@ -52,12 +55,12 @@ static constexpr const char* ToPsz10(bool b)
 
 static constexpr sal_Int64 PPTtoEMU( sal_Int32 nPPT )
 {
-return static_cast( static_cast(nPPT) * 1587.5 );
+return o3tl::convert(nPPT, o3tl::Length::master, o3tl::Length::emu);
 }
 
 static constexpr sal_Int64 TwipsToEMU( sal_Int32 nTwips )
 {
-return sal_Int64( nTwips ) * 635;
+return o3tl::convert(nTwips, o3tl::Length::twip, o3tl::Length::emu);
 }
 
 template 
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index 9b461f4c3831..90a0183817e4 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -668,7 +668,7 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 && (!alignV || strcmp(alignV, "top") == 0))
 {
 alignV = nullptr;
-nPosYEMU = 635;
+nPosYEMU = TwipsToEMU(1);
 }
 
 if (alignV != nullptr)
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index e96297635270..91a0362aa686 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -64,6 +64,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3195,9 +3196,11 @@ void RtfAttributeOutput::FormatLRSpace(const 
SvxLRSpaceItem& rLRSpace)
 {
 // Wrap: top and bottom spacing, convert from twips to EMUs.
 m_aFlyProperties.push_back(std::make_pair(
-"dxWrapDistLeft", OString::number(rLRSpace.GetLeft() * 635)));
+"dxWrapDistLeft", 
OString::number(o3tl::convert(rLRSpace.GetLeft(), o3tl::Length::twip,
+
o3tl::Length::emu;
 m_aFlyProperties.push_back(std::make_pair(
-"dxWrapDistRight", OString::number(rLRSpace.GetRight() * 635)));
+"dxWrapDistRight", OString::number(o3tl::convert(
+   rLRSpace.GetRight(), o3tl::Length::twip, 
o3tl::Length::emu;
 }
 }
 
@@ -3287,9 +3290,11 @@ void RtfAttributeOutput::FormatULSpace(const 
SvxULSpaceItem& rULSpace)
 {
 // Wrap: top and bottom spacing, convert from twips to EMUs.
 m_aFlyProperties.push_back(std::make_pair(
-"dyWrapDistTop", OString::number(rULSpace.GetUpper() * 635)));
+"dyWrapDistTop", 
OString::number(o3tl::convert(rULSpace.GetUpper(), o3tl::Length::twip,
+   
o3tl::Length::emu;
 m_aFlyProperties.push_back(std::make_pair(
-"dyWrapDistBottom", OString::number(rULSpace.GetLower() * 635)));
+"dyWrapDistBottom", OString::number(o3tl::convert(
+rULSpace.GetLower(), o3tl::Length::twip, 
o3tl::Length::emu;
 }
 }
 
@@ -3531,13 +3536,17 @@ void RtfAttributeOutput::FormatBox(const SvxBoxItem& 
rBox)
 {
 // Borders: spacing to contents, convert from twips to EMUs.
 m_aFlyProperties.push_back(std::make_pair(
-"dxTextLeft", 
OString::number(rBox.GetDistance(SvxBoxItemLine::LEFT) * 635)));
+"dxTextLeft", 
OString::number(o3tl::convert(rBox.GetDistance(SvxBoxItemLine::LEFT),
+o3tl::Length::twip, 
o3tl::Length::emu;
 m_aFlyProperties.push_back(std::make_pair(
-"dyTextTop", OString::number(rBox.GetDistance(SvxBoxItemLine::TOP) 
* 635)));
+"dyTextTop", 
OString::number(o3tl::convert(rBox.GetDistance(SvxBoxItemLine::TOP),
+   o3tl::Length::twip, 
o3tl::Length::emu;
 m_aFlyProperties.push_back(std::make_pair(
-"dxTextRight", 
OString::number(rB

[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - include/vcl vcl/qa vcl/source

2021-03-31 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 4a36766b2cae049f4b51e0135a4519a793b98429
Author: Tomaž Vajngerl 
AuthorDate: Wed Mar 31 19:13:17 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Apr 1 12:56:55 2021 +0900

vcl: move MapMode reading adn writing to TypeSerializer

remove usage of ReadMapMode and WriteMapMode and add tests

Change-Id: I40e1da8aea5c2171d9dbb6343fbf61912e5b3367

diff --git a/include/vcl/TypeSerializer.hxx b/include/vcl/TypeSerializer.hxx
index 7be2f54198e7..e85b25b1cfe3 100644
--- a/include/vcl/TypeSerializer.hxx
+++ b/include/vcl/TypeSerializer.hxx
@@ -50,6 +50,9 @@ public:
 
 void readGraphic(Graphic& rGraphic);
 void writeGraphic(const Graphic& rGraphic);
+
+void readMapMode(MapMode& rMapMode);
+void writeMapMode(MapMode const& rMapMode);
 };
 
 #endif
diff --git a/include/vcl/mapmod.hxx b/include/vcl/mapmod.hxx
index e6c96048c90c..9af61f8b7e69 100644
--- a/include/vcl/mapmod.hxx
+++ b/include/vcl/mapmod.hxx
@@ -59,20 +59,20 @@ public:
 MapMode&operator=( MapMode&& rMapMode );
 booloperator==( const MapMode& rMapMode ) const;
 booloperator!=( const MapMode& rMapMode ) const
-{ return !(MapMode::operator==( rMapMode )); }
+{
+return !(MapMode::operator==( rMapMode ));
+}
 boolIsDefault() const;
 
-friend SvStream& ReadMapMode( SvStream& rIStm, MapMode& rMapMode );
-friend SvStream& WriteMapMode( SvStream& rOStm, const MapMode& rMapMode );
-
 // tdf#117984 needs to be thread-safe due to being used e.g. in Bitmaps
 // vcl::ScopedBitmapAccess in parallelized 3D renderer
 typedef o3tl::cow_wrapper< ImplMapMode, o3tl::ThreadSafeRefCountingPolicy 
> ImplType;
 
+// If only the map unit is set.
+bool IsSimple() const;
+
 private:
 ImplTypempImplMapMode;
-
-SAL_DLLPRIVATE bool IsSimple() const;
 };
 
 template
diff --git a/vcl/qa/cppunit/TypeSerializerTest.cxx 
b/vcl/qa/cppunit/TypeSerializerTest.cxx
index f8de4e9ce3a2..5d7b72b0f560 100644
--- a/vcl/qa/cppunit/TypeSerializerTest.cxx
+++ b/vcl/qa/cppunit/TypeSerializerTest.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -67,6 +68,7 @@ private:
 void testGraphic_Bitmap_NoGfxLink();
 void testGraphic_Animation();
 void testGraphic_GDIMetaFile();
+void testMapMode();
 
 CPPUNIT_TEST_SUITE(TypeSerializerTest);
 CPPUNIT_TEST(testGradient);
@@ -74,6 +76,7 @@ private:
 CPPUNIT_TEST(testGraphic_Bitmap_NoGfxLink);
 CPPUNIT_TEST(testGraphic_Animation);
 CPPUNIT_TEST(testGraphic_GDIMetaFile);
+CPPUNIT_TEST(testMapMode);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -345,6 +348,42 @@ void TypeSerializerTest::testGraphic_GDIMetaFile()
 }
 }
 
+void TypeSerializerTest::testMapMode()
+{
+{ // "simple" case - only map unit is set, IsSimple = true
+MapMode aMapMode(MapUnit::Map100thMM);
+
+SvMemoryStream aStream;
+TypeSerializer aSerializer(aStream);
+aSerializer.writeMapMode(aMapMode);
+aStream.Seek(STREAM_SEEK_TO_BEGIN);
+
+MapMode aReadMapMode;
+aSerializer.readMapMode(aReadMapMode);
+CPPUNIT_ASSERT_EQUAL(MapUnit::Map100thMM, aReadMapMode.GetMapUnit());
+CPPUNIT_ASSERT_EQUAL(true, aReadMapMode.IsSimple());
+}
+{ // "complex" case - map unit, origin and scale are set, IsSimple = false
+MapMode aMapMode(MapUnit::MapTwip, Point(5, 10), Fraction(1, 2), 
Fraction(2, 3));
+
+SvMemoryStream aStream;
+TypeSerializer aSerializer(aStream);
+aSerializer.writeMapMode(aMapMode);
+aStream.Seek(STREAM_SEEK_TO_BEGIN);
+
+MapMode aReadMapMode;
+aSerializer.readMapMode(aReadMapMode);
+CPPUNIT_ASSERT_EQUAL(MapUnit::MapTwip, aReadMapMode.GetMapUnit());
+CPPUNIT_ASSERT_EQUAL(tools::Long(5), aReadMapMode.GetOrigin().X());
+CPPUNIT_ASSERT_EQUAL(tools::Long(10), aReadMapMode.GetOrigin().Y());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), 
aReadMapMode.GetScaleX().GetNumerator());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), 
aReadMapMode.GetScaleX().GetDenominator());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), 
aReadMapMode.GetScaleY().GetNumerator());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), 
aReadMapMode.GetScaleY().GetDenominator());
+CPPUNIT_ASSERT_EQUAL(false, aReadMapMode.IsSimple());
+}
+}
+
 } // namespace
 
 CPPUNIT_TEST_SUITE_REGISTRATION(TypeSerializerTest);
diff --git a/vcl/source/filter/graphicfilter2.cxx 
b/vcl/source/filter/graphicfilter2.cxx
index 2b66d2d29395..5666497ce08f 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -1062,10 +1062,9 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, 
bool bExtendedInfo )
 if( bExtendedInfo )
 {
 MapMode aMapMode;
-
 rStm.SeekRel( 0x06 );
-Rea

[Libreoffice-commits] core.git: icon-themes/colibre icon-themes/colibre_svg

2021-03-31 Thread Rizal Muttaqin (via logerrit)
 icon-themes/colibre/cmd/32/ar/continuenumbering.png |binary
 icon-themes/colibre/cmd/32/continuenumbering.png|binary
 icon-themes/colibre/cmd/ar/lc_continuenumbering.png |binary
 icon-themes/colibre/cmd/ar/sc_continuenumbering.png |binary
 icon-themes/colibre/cmd/lc_continuenumbering.png|binary
 icon-themes/colibre/cmd/sc_continuenumbering.png|binary
 icon-themes/colibre_svg/cmd/32/ar/continuenumbering.svg |2 +-
 icon-themes/colibre_svg/cmd/32/continuenumbering.svg|2 +-
 icon-themes/colibre_svg/cmd/ar/lc_continuenumbering.svg |2 +-
 icon-themes/colibre_svg/cmd/ar/sc_continuenumbering.svg |2 +-
 icon-themes/colibre_svg/cmd/lc_continuenumbering.svg|2 +-
 icon-themes/colibre_svg/cmd/sc_continuenumbering.svg|2 +-
 12 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 83a7f7a9bc47c64c23d64b24e5d03499a3eede84
Author: Rizal Muttaqin 
AuthorDate: Wed Mar 31 09:23:40 2021 +0700
Commit: Rizal Muttaqin 
CommitDate: Thu Apr 1 03:44:30 2021 +0200

tdf#126689 Colibre: revise continue Previous Numbering icons

Change-Id: I7740dcb3dc14cd9a0b350f8dd868bdd59ca0e3db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113394
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin 

diff --git a/icon-themes/colibre/cmd/32/ar/continuenumbering.png 
b/icon-themes/colibre/cmd/32/ar/continuenumbering.png
index fdc97052adf7..d0e1091f4b51 100644
Binary files a/icon-themes/colibre/cmd/32/ar/continuenumbering.png and 
b/icon-themes/colibre/cmd/32/ar/continuenumbering.png differ
diff --git a/icon-themes/colibre/cmd/32/continuenumbering.png 
b/icon-themes/colibre/cmd/32/continuenumbering.png
index 3831535e9476..bf4875afa937 100644
Binary files a/icon-themes/colibre/cmd/32/continuenumbering.png and 
b/icon-themes/colibre/cmd/32/continuenumbering.png differ
diff --git a/icon-themes/colibre/cmd/ar/lc_continuenumbering.png 
b/icon-themes/colibre/cmd/ar/lc_continuenumbering.png
index 23d626c1879f..d2aa1f8dc967 100644
Binary files a/icon-themes/colibre/cmd/ar/lc_continuenumbering.png and 
b/icon-themes/colibre/cmd/ar/lc_continuenumbering.png differ
diff --git a/icon-themes/colibre/cmd/ar/sc_continuenumbering.png 
b/icon-themes/colibre/cmd/ar/sc_continuenumbering.png
index 5196fb4f3b04..21c36fbf85b5 100644
Binary files a/icon-themes/colibre/cmd/ar/sc_continuenumbering.png and 
b/icon-themes/colibre/cmd/ar/sc_continuenumbering.png differ
diff --git a/icon-themes/colibre/cmd/lc_continuenumbering.png 
b/icon-themes/colibre/cmd/lc_continuenumbering.png
index 29ca0706d748..c191627984c7 100644
Binary files a/icon-themes/colibre/cmd/lc_continuenumbering.png and 
b/icon-themes/colibre/cmd/lc_continuenumbering.png differ
diff --git a/icon-themes/colibre/cmd/sc_continuenumbering.png 
b/icon-themes/colibre/cmd/sc_continuenumbering.png
index 6e3ea46eba04..699293c04eb9 100644
Binary files a/icon-themes/colibre/cmd/sc_continuenumbering.png and 
b/icon-themes/colibre/cmd/sc_continuenumbering.png differ
diff --git a/icon-themes/colibre_svg/cmd/32/ar/continuenumbering.svg 
b/icon-themes/colibre_svg/cmd/32/ar/continuenumbering.svg
index 196384805166..2472612b7c3c 100644
--- a/icon-themes/colibre_svg/cmd/32/ar/continuenumbering.svg
+++ b/icon-themes/colibre_svg/cmd/32/ar/continuenumbering.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg";>
\ No newline at end of file
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/colibre_svg/cmd/32/continuenumbering.svg 
b/icon-themes/colibre_svg/cmd/32/continuenumbering.svg
index 7f89cdd7c4ce..e53d0713b54d 100644
--- a/icon-themes/colibre_svg/cmd/32/continuenumbering.svg
+++ b/icon-themes/colibre_svg/cmd/32/continuenumbering.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg";>
\ No newline at end of file
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/colibre_svg/cmd/ar/lc_continuenumbering.svg 
b/icon-themes/colibre_svg/cmd/ar/lc_continuenumbering.svg
index 5f8342bf7052..0b51d89276bb 100644
--- a/icon-themes/colibre_svg/cmd/ar/lc_continuenumbering.svg
+++ b/icon-themes/colibre_svg/cmd/ar/lc_continuenumbering.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg";>
\ No newline at end of file
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/colibre_svg/cmd/ar/sc_continuenumbering.svg 
b/icon-themes/colibre_svg/cmd/ar/sc_continuenumbering.svg
index 58dc7149c7ac..5fec2f2c6c31 100644
--- a/icon-themes/colibre_svg/cmd/ar/sc_continuenumbering.svg
+++ b/icon-themes/colibre_svg/cmd/ar/sc_continuenumbering.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg";>
\ No newline at end of file
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/colibre_svg/cmd/lc_continuenumbering.svg 
b/icon-themes/colibre_svg/cmd/lc_continuenumbering.svg
index c37f8ccb40d1..44376752a9f6 100644
--- a/icon-themes/colibre_svg/cmd/lc_continuenumbering.svg
+++ b/icon-themes/colibre_svg/cmd/lc_continuenumbering.svg
@@ -1 +1 @@
-http://www.w3

[Libreoffice-commits] core.git: scripting/java

2021-03-31 Thread Stephan Bergmann (via logerrit)
 scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java | 
 101 --
 1 file changed, 7 insertions(+), 94 deletions(-)

New commits:
commit 5707ec3303f8215af91aac7d7f7cc29bf67b6c99
Author: Stephan Bergmann 
AuthorDate: Wed Mar 31 16:30:23 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Mar 31 22:13:08 2021 +0200

Use javax.xml.transform instead of reflection to write a Document

At least on Fedora 34 when building with 
--with-jdk-home=/usr/lib/jvm/java-16
against java-latest-openjdk-headless-16.0.0.0.36-1.rolling.fc34.x86_64,
CustomTarget_odk/build-examples_java failed with

> ERROR: Exception occurred: An error occurred while enabling: SayHello 
.../desktop/source/deployment/registry/dp_backend.cxx:645
>
> ERROR: unopkg failed.
>
> make[2]: *** [Makefile:92: 
.../workdir/CustomTarget/odk/build-examples_java/out/sdk/LINUXexample.out/misc/ScriptingFramework/SayHello/devguide_scriptingframework_SayHello_register_scriptpkg.flag]
 Error 1

because of

> info:bridges:1209707:1209707:bridges/source/jni_uno/jni_uno2java.cxx:117: 
exception occurred uno->java: [com.sun.star.lang.WrappedTargetException] 
java.io.IOException
> java stack trace:
> com.sun.star.lang.WrappedTargetException: java.io.IOException
> at 
com.sun.star.script.framework.container.UnoPkgContainer.writeUnoPackageDB(UnoPkgContainer.java:279)
> at 
com.sun.star.script.framework.container.UnoPkgContainer.processUnoPackage(UnoPkgContainer.java:330)
> at 
com.sun.star.script.framework.provider.ScriptProvider.insertByName(ScriptProvider.java:563)
> Caused by: java.io.IOException
> at 
com.sun.star.script.framework.container.XMLParserFactory$DefaultParser.write(XMLParserFactory.java:190)
> at 
com.sun.star.script.framework.container.DeployedUnoPackagesDB.write(DeployedUnoPackagesDB.java:107)
> at 
com.sun.star.script.framework.container.UnoPkgContainer.writeUnoPackageDB(UnoPkgContainer.java:270)
> ... 2 more
> Caused by: java.lang.IllegalAccessException: class 
com.sun.star.script.framework.container.XMLParserFactory$DefaultParser cannot 
access class com.sun.org.apache.xml.internal.serialize.XMLSerializer (in module 
java.xml) because module java.xml does not export 
com.sun.org.apache.xml.internal.serialize to unnamed module @50860e85
> at 
java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:385)
> at 
java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:687)
> at 
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:489)
> at 
java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
> at 
java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:350)
> at java.base/java.lang.Class.newInstance(Class.java:642)
> at 
com.sun.star.script.framework.container.XMLParserFactory$DefaultParser.write(XMLParserFactory.java:145)
> ... 4 more

The javax.xml.transform functionality appears to be available since Java 
1.4, so
it should not be a problem if we unconditionally use it.

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

diff --git 
a/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java 
b/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java
index c34908f8c773..02c9e6c34244 100644
--- 
a/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java
+++ 
b/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java
@@ -22,11 +22,13 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import java.lang.reflect.Method;
-
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
 
 import org.w3c.dom.Document;
 
@@ -91,99 +93,10 @@ public class XMLParserFactory {
 }
 
 public void write(Document doc, OutputStream out) throws IOException {
-
-Class clazz = doc.getClass();
-String name = clazz.getName();
-
-// depending on the class of the Document object use introspection
-// to invoke the appropriate methods for writing the XML
-// this code is based on the code used by the NetBeans
-// class XMLUtilImpl in the openide module
 try {
-if (name.equals("com.sun.xml.tree.XmlDocument") ||
-   

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

2021-03-31 Thread Henry Castro (via logerrit)
 extensions/source/bibliography/framectr.cxx |   73 ++--
 extensions/source/bibliography/framectr.hxx |   12 ++--
 2 files changed, 43 insertions(+), 42 deletions(-)

New commits:
commit edc7b4bad6361f00aff69b65a722fb230c6e120c
Author: Henry Castro 
AuthorDate: Wed Mar 31 09:44:24 2021 -0400
Commit: Henry Castro 
CommitDate: Wed Mar 31 21:12:19 2021 +0200

lok: "BibFrameController_Impl" prefix m_* members

Change-Id: I2bead3015d306c678d81980ef14e7689ab4acc54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113419
Tested-by: Jenkins
Reviewed-by: Henry Castro 

diff --git a/extensions/source/bibliography/framectr.cxx 
b/extensions/source/bibliography/framectr.cxx
index 2bb4246fe4c5..7b0a5dd9eaba 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -147,17 +147,17 @@ void BibFrameCtrl_Impl::disposing( const 
lang::EventObject& /*Source*/ )
 
 BibFrameController_Impl::BibFrameController_Impl( const uno::Reference< 
awt::XWindow > & xComponent,
 BibDataManager* pDataManager)
-:xWindow( xComponent )
+:m_xWindow( xComponent )
 ,m_xDatMan( pDataManager )
 {
-bDisposing=false;
-mxImpl = new BibFrameCtrl_Impl;
-mxImpl->pController = this;
+m_bDisposing = false;
+m_xImpl = new BibFrameCtrl_Impl;
+m_xImpl->pController = this;
 }
 
 BibFrameController_Impl::~BibFrameController_Impl()
 {
-mxImpl->pController = nullptr;
+m_xImpl->pController = nullptr;
 m_xDatMan.clear();
 }
 
@@ -180,8 +180,8 @@ css::uno::Sequence< OUString > SAL_CALL 
BibFrameController_Impl::getSupportedSer
 
 void BibFrameController_Impl::attachFrame( const uno::Reference< XFrame > & 
xArg )
 {
-xFrame = xArg;
-xFrame->addFrameActionListener( mxImpl );
+m_xFrame = xArg;
+m_xFrame->addFrameActionListener( m_xImpl );
 }
 
 sal_Bool BibFrameController_Impl::attachModel( const uno::Reference< XModel > 
& /*xModel*/ )
@@ -192,9 +192,9 @@ sal_Bool BibFrameController_Impl::attachModel( const 
uno::Reference< XModel > &
 sal_Bool BibFrameController_Impl::suspend( sal_Bool bSuspend )
 {
 if ( bSuspend )
-getFrame()->removeFrameActionListener( mxImpl );
+getFrame()->removeFrameActionListener( m_xImpl );
 else
-getFrame()->addFrameActionListener( mxImpl );
+getFrame()->addFrameActionListener( m_xImpl );
 return true;
 }
 
@@ -209,7 +209,7 @@ void BibFrameController_Impl::restoreViewData( const 
uno::Any& /*Value*/ )
 
 uno::Reference< XFrame >  BibFrameController_Impl::getFrame()
 {
-return xFrame;
+return m_xFrame;
 }
 
 uno::Reference< XModel >  BibFrameController_Impl::getModel()
@@ -219,28 +219,28 @@ uno::Reference< XModel >  
BibFrameController_Impl::getModel()
 
 void BibFrameController_Impl::dispose()
 {
-bDisposing = true;
+m_bDisposing = true;
 lang::EventObject aObject;
 aObject.Source = static_cast(this);
-mxImpl->aLC.disposeAndClear(aObject);
+m_xImpl->aLC.disposeAndClear(aObject);
 m_xDatMan.clear();
-aStatusListeners.clear();
+m_aStatusListeners.clear();
 m_xLastQueriedFocusWin.clear();
 }
 
 void BibFrameController_Impl::addEventListener( const uno::Reference< 
lang::XEventListener > & aListener )
 {
-mxImpl->aLC.addInterface( cppu::UnoType::get(), 
aListener );
+m_xImpl->aLC.addInterface( cppu::UnoType::get(), 
aListener );
 }
 
 void BibFrameController_Impl::removeEventListener( const uno::Reference< 
lang::XEventListener > & aListener )
 {
-mxImpl->aLC.removeInterface( cppu::UnoType::get(), 
aListener );
+m_xImpl->aLC.removeInterface( cppu::UnoType::get(), 
aListener );
 }
 
 uno::Reference< frame::XDispatch >  BibFrameController_Impl::queryDispatch( 
const util::URL& aURL, const OUString& /*aTarget*/, sal_Int32 /*nSearchFlags*/ )
 {
-if ( !bDisposing )
+if ( !m_bDisposing )
 {
 const CmdToInfoCache& rCmdCache = GetCommandToInfoCache();
 CmdToInfoCache::const_iterator pIter = rCmdCache.find( aURL.Complete );
@@ -366,11 +366,11 @@ static vcl::Window* lcl_GetFocusChild( vcl::Window const 
* pParent )
 //class XDispatch
 void BibFrameController_Impl::dispatch(const util::URL& _rURL, const 
uno::Sequence< beans::PropertyValue >& aArgs)
 {
-if ( bDisposing )
+if ( m_bDisposing )
 return;
 
 ::SolarMutexGuard aGuard;
-weld::Window* pParent = Application::GetFrameWeld(xWindow);
+weld::Window* pParent = Application::GetFrameWeld(m_xWindow);
 weld::WaitObject aWaitObject(pParent);
 
 OUString aCommand( _rURL.Path);
@@ -404,10 +404,10 @@ void BibFrameController_Impl::dispatch(const util::URL& 
_rURL, const uno::Sequen
 }
 else if(aCommand == "Bib/autoFilter")
 {
-sal_uInt16 nCount = aStatusListeners.size();
+sal_uInt16 nCount = m_aStatusListeners.size();
 for ( sal_uInt16 n=0; naURL.Path == "Bib/removeFilter" )
 

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

2021-03-31 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 4de064ca4b001993f5b7742b7cb40944d70e1ba1
Author: Caolán McNamara 
AuthorDate: Mon Mar 29 21:10:10 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Mar 31 21:07:10 2021 +0200

ensure background color is used when layout widgets bg is overridden

so in the sidebar the header lines with a custom bg are always drawn
with that bg when resized

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 94f2a159577a..656211e13cf3 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -227,9 +227,16 @@ void SalInstanceWidget::set_background(const Color& rColor)
 {
 m_xWidget->SetControlBackground(rColor);
 m_xWidget->SetBackground(m_xWidget->GetControlBackground());
-// turn off WB_CLIPCHILDREN otherwise the bg won't extend "under"
-// transparent children of the widget
-m_xWidget->SetStyle(m_xWidget->GetStyle() & ~WB_CLIPCHILDREN);
+if (m_xWidget->GetStyle() & WB_CLIPCHILDREN)
+{
+// turn off WB_CLIPCHILDREN otherwise the bg won't extend "under"
+// transparent children of the widget e.g. expander in sidebar panel 
header
+m_xWidget->SetStyle(m_xWidget->GetStyle() & ~WB_CLIPCHILDREN);
+// and toggle mbClipChildren on instead otherwise the bg won't fill 
e.g.
+// deck titlebar header when its width is stretched
+WindowImpl* pImpl = m_xWidget->ImplGetWindowImpl();
+pImpl->mbClipChildren = true;
+}
 }
 
 SalInstanceWidget::SalInstanceWidget(vcl::Window* pWidget, SalInstanceBuilder* 
pBuilder,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-31 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/SidebarChildWindow.cxx |6 +++---
 sfx2/source/sidebar/SidebarController.cxx  |   19 ---
 2 files changed, 11 insertions(+), 14 deletions(-)

New commits:
commit 84b512ab3d8007293f2e8d338814db3ce7e4a63e
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 11:14:12 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Mar 31 21:06:37 2021 +0200

tabbar is now too wide under windows hidpi

probably since:

commit 75b9109a2da35cf0f0914504145d84cf918c6af2
Date:   Thu Nov 12 20:48:50 2020 +

weld TabBar

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

diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx 
b/sfx2/source/sidebar/SidebarChildWindow.cxx
index e8054b445325..04d1f1037f4b 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -54,7 +54,7 @@ SidebarChildWindow::SidebarChildWindow(vcl::Window* 
pParentWindow, sal_uInt16 nI
 if (!comphelper::LibreOfficeKit::isActive())
 {
 pDockWin->SetSizePixel(
-Size(TabBar::GetDefaultWidth() * 
GetWindow()->GetDPIScaleFactor(),
+Size(TabBar::GetDefaultWidth(),
  pDockWin->GetSizePixel().Height()));
 }
 }
@@ -66,7 +66,7 @@ SidebarChildWindow::SidebarChildWindow(vcl::Window* 
pParentWindow, sal_uInt16 nI
 // Undock sidebar in LOK to allow for resizing freely
 // (i.e. when the client window is resized) and collapse
 // it so the client can open it on demand.
-pDockWin->SetFloatingSize(Size(pDockWin->GetSizePixel().Width() * 
GetWindow()->GetDPIScaleFactor(),
+pDockWin->SetFloatingSize(Size(pDockWin->GetSizePixel().Width(),
pDockWin->GetSizePixel().Height()));
 pDockWin->SetFloatingMode(true);
 }
@@ -84,7 +84,7 @@ sal_Int32 SidebarChildWindow::GetDefaultWidth(vcl::Window 
const* pWindow)
 const static sal_Int32 nMaxPropertyPageWidth(146);
 
 return pWindow->LogicToPixel(Point(nMaxPropertyPageWidth,1), 
MapMode(MapUnit::MapAppFont)).X()
-+ TabBar::GetDefaultWidth() * pWindow->GetDPIScaleFactor();
++ TabBar::GetDefaultWidth();
 }
 else
 return 0;
diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 56622cbb2691..e278ded14849 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -420,7 +420,7 @@ void SidebarController::NotifyResize()
 return;
 }
 
-const sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * 
mpTabBar->GetDPIScaleFactor();
+const sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth();
 
 const sal_Int32 nWidth(mpParentWindow->GetSizePixel().Width());
 const sal_Int32 nHeight(mpParentWindow->GetSizePixel().Height());
@@ -524,7 +524,7 @@ void SidebarController::ProcessNewWidth (const sal_Int32 
nNewWidth)
 mbIsDeckOpen = true;
 RequestCloseDeck();
 
-if (mnWidthOnSplitterButtonDown > TabBar::GetDefaultWidth() * 
mpTabBar->GetDPIScaleFactor())
+if (mnWidthOnSplitterButtonDown > TabBar::GetDefaultWidth())
 mnSavedSidebarWidth = mnWidthOnSplitterButtonDown;
 }
 }
@@ -659,8 +659,7 @@ void SidebarController::OpenThenToggleDeck (
 // Make sure the sidebar is wide enough to fit the requested content
 if (mpCurrentDeck && mpTabBar)
 {
-sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + 
TabBar::GetDefaultWidth())
-* mpTabBar->GetDPIScaleFactor();
+sal_Int32 nRequestedWidth = mpCurrentDeck->GetMinimalWidth() + 
TabBar::GetDefaultWidth();
 if (mnSavedSidebarWidth < nRequestedWidth)
 SetChildWindowWidth(nRequestedWidth);
 }
@@ -885,7 +884,7 @@ void SidebarController::SwitchToDeck (
 #endif
 
 SfxSplitWindow* pSplitWindow = GetSplitWindow();
-sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * 
mpTabBar->GetDPIScaleFactor();
+sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth();
 WindowAlign eAlign = pSplitWindow ? pSplitWindow->GetAlign() : 
WindowAlign::Right;
 tools::Long nDeckX;
 if (eAlign == WindowAlign::Left) // attach the Sidebar towards the 
left-side of screen
@@ -1289,7 +1288,7 @@ void SidebarController::UpdateDeckOpenState()
 // No state requested.
 return;
 
-const sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * 
mpTabBar->GetDPIScaleFactor();
+const sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth();
 
 // Update (change) the open state when it either has not yet been 
initialized
 // or when its value differs from the requested state.
@@ -1429,13 +1428,11 @@ void SidebarController

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

2021-03-31 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xistream.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 741c72e00ed3d647121ce385c0f9442ecebb6216
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 10:37:50 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Mar 31 21:06:16 2021 +0200

cid#1242892 silence Untrusted loop bound

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

diff --git a/sc/source/filter/excel/xistream.cxx 
b/sc/source/filter/excel/xistream.cxx
index f5f82e5176ff..e1126aaf2950 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -797,8 +797,10 @@ void XclImpStream::Ignore( std::size_t nBytes )
 {
 // implementation similar to Read(), but without really reading anything
 std::size_t nBytesLeft = nBytes;
-while( mbValid && (nBytesLeft > 0) )
+while (mbValid)
 {
+if (!nBytesLeft)
+break;
 sal_uInt16 nReadSize = GetMaxRawReadSize( nBytesLeft );
 mbValid = checkSeek(mrStrm, mrStrm.Tell() + nReadSize);
 mnRawRecLeft = mnRawRecLeft - nReadSize;
___
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

2021-03-31 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_dialogs/openDialogs.py |3 -
 sw/qa/uitest/writer_tests7/tdf140863.py|   75 +
 2 files changed, 77 insertions(+), 1 deletion(-)

New commits:
commit 7932e971436870ece45a6ba75fb484e53edac7a1
Author: Xisco Fauli 
AuthorDate: Wed Mar 31 15:05:09 2021 +0200
Commit: Xisco Fauli 
CommitDate: Wed Mar 31 20:10:03 2021 +0200

tdf#140863: sw: Add UItest

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

diff --git a/sw/qa/uitest/writer_dialogs/openDialogs.py 
b/sw/qa/uitest/writer_dialogs/openDialogs.py
index 4dbacaa1215e..086904cc3712 100644
--- a/sw/qa/uitest/writer_dialogs/openDialogs.py
+++ b/sw/qa/uitest/writer_dialogs/openDialogs.py
@@ -37,7 +37,8 @@ dialogs = [
 # {"command": ".uno:InsertBreak", "closeButton": "cancel"},
 # tested in uitest/writer_tests/insertBreakDialog.py
 {"command": ".uno:InsertObject", "closeButton": "cancel"},
-{"command": ".uno:InsertSection", "closeButton": "cancel"},
+# {"command": ".uno:InsertSection", "closeButton": "cancel"},
+# tested in sw/qa/uitest/writer_tests7/tdf140863.py
 {"command": ".uno:InsertFrame", "closeButton": "cancel"},
 {"command": ".uno:InsertObjectFloatingFrame", "closeButton": "cancel"},
 {"command": ".uno:FontworkGalleryFloater", "closeButton": "cancel"},
diff --git a/sw/qa/uitest/writer_tests7/tdf140863.py 
b/sw/qa/uitest/writer_tests7/tdf140863.py
new file mode 100644
index ..f0355e4684ed
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf140863.py
@@ -0,0 +1,75 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+
+class tdf140863(UITestCase):
+
+def test_tdf140863(self):
+
+self.ui_test.create_doc_in_start_center("writer")
+
+# Insert one section
+self.ui_test.execute_dialog_through_command(".uno:InsertSection")
+
+xDialog = self.xUITest.getTopFocusWindow()
+
+xOkBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOkBtn)
+
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+# Insert a page break in the section
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+self.xUITest.executeCommand(".uno:InsertPagebreak")
+self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+document = self.ui_test.get_component()
+self.assertEqual(1, len(document.TextSections))
+self.assertTrue(document.TextSections.Section1.IsVisible)
+
+
+self.ui_test.execute_dialog_through_command(".uno:EditRegion")
+
+xDialog = self.xUITest.getTopFocusWindow()
+
+xHide = xDialog.getChild('hide')
+self.assertEqual('false', get_state_as_dict(xHide)['Selected'])
+
+xHide.executeAction('CLICK', tuple())
+
+xOkBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOkBtn)
+
+self.assertEqual(1, len(document.TextSections))
+self.assertFalse(document.TextSections.Section1.IsVisible)
+self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "1")
+
+self.ui_test.execute_dialog_through_command(".uno:EditRegion")
+
+xDialog = self.xUITest.getTopFocusWindow()
+
+xHide = xDialog.getChild('hide')
+self.assertEqual('true', get_state_as_dict(xHide)['Selected'])
+
+xHide.executeAction('CLICK', tuple())
+
+xOkBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOkBtn)
+
+self.assertEqual(1, len(document.TextSections))
+self.assertTrue(document.TextSections.Section1.IsVisible)
+
+# Without the fix in place, this test would have failed with
+# AssertionError: '1' != '2'
+self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+self.ui_test.close_doc()
+
+# 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: android/source

2021-03-31 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |4 
++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 441342654e5b4c61317b9a596396a1d817dd8547
Author: Michael Weghorn 
AuthorDate: Wed Mar 31 15:04:36 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Mar 31 20:09:43 2021 +0200

android: Don't mark doc changed on keypress in readonly mode

Since input etc. is otherwise ignored in readonly mode,
also don't mark the document as changed on keypress.

This e.g. avoids an unnecessary dialog whether or not to
save the document after opening a document with experimental
editing mode disabled, then pressing a key (on hardware
keyboard, soft keyboard isn't shown in readonly mode)
and then pressing the "Back" button to close the document
again.

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

diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 960e3374a97a..cfdc81000f51 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -168,8 +168,8 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 layerView.setOnKeyListener(new View.OnKeyListener() {
 @Override
 public boolean onKey(View view, int i, KeyEvent keyEvent) {
-if(keyEvent.getKeyCode() != KeyEvent.KEYCODE_BACK){
-isDocumentChanged=true;
+if(!isReadOnlyMode() && keyEvent.getKeyCode() != 
KeyEvent.KEYCODE_BACK){
+setDocumentChanged(true);
 }
 return false;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-31 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java  |1 -
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |5 
-
 2 files changed, 6 deletions(-)

New commits:
commit 51f6e11aee50cc429021be27bd33875593425683
Author: Michael Weghorn 
AuthorDate: Wed Mar 31 14:55:15 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Mar 31 20:08:49 2021 +0200

android: Drop some unused imports

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

diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index a070c292009c..960e3374a97a 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -40,7 +40,6 @@ import org.libreoffice.overlay.CalcHeadersController;
 import org.libreoffice.overlay.DocumentOverlay;
 import org.libreoffice.storage.DocumentProviderFactory;
 import org.libreoffice.storage.IFile;
-import org.libreoffice.ui.FileUtilities;
 import org.libreoffice.ui.LibreOfficeUIActivity;
 import org.mozilla.gecko.gfx.GeckoLayerClient;
 import org.mozilla.gecko.gfx.LayerView;
diff --git 
a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java 
b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index f05bcae58a49..539b355cc932 100644
--- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -11,12 +11,10 @@ package org.libreoffice.ui;
 
 import android.Manifest;
 import android.app.Activity;
-import android.app.AlertDialog;
 import android.content.ActivityNotFoundException;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
-import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.SharedPreferences;
@@ -29,7 +27,6 @@ import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Build;
 import android.os.Bundle;
-import android.os.Handler;
 import android.preference.PreferenceManager;
 import android.support.annotation.NonNull;
 import android.support.design.widget.FloatingActionButton;
@@ -45,7 +42,6 @@ import android.support.v7.widget.GridLayoutManager;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.Toolbar;
-import android.text.InputType;
 import android.util.Log;
 import android.view.ContextMenu;
 import android.view.ContextMenu.ContextMenuInfo;
@@ -60,7 +56,6 @@ import android.view.ViewGroup;
 import android.view.animation.Animation;
 import android.view.animation.AnimationUtils;
 import android.view.animation.OvershootInterpolator;
-import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - android/source emfio/qa emfio/source

2021-03-31 Thread Bartosz Kosiorek (via logerrit)
 android/source/res/values-de/strings.xml  |1 
 android/source/res/values-tr/strings.xml  |1 
 android/source/res/values/strings.xml |1 
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |   19 

 emfio/qa/cppunit/emf/EmfImportTest.cxx|   24 
+
 emfio/qa/cppunit/emf/data/TestFillRegion.emf  |binary
 emfio/source/reader/emfreader.cxx |   46 
+-
 7 files changed, 50 insertions(+), 42 deletions(-)

New commits:
commit 5d4d8278b7fd2a555d6c9678d37877853562bd85
Author: Bartosz Kosiorek 
AuthorDate: Wed Mar 31 17:50:59 2021 +0200
Commit: Bartosz Kosiorek 
CommitDate: Wed Mar 31 20:08:37 2021 +0200

tdf#55058 tdf#141394 EMF FILLRGN record is not displayed correctly

The EMR_FILLRGN record fills the specified region by using the specified 
brush.

After deep analyse of [EMF] documentation, it seems that
bounds from RegionDataHeader was treated as first rectangle of
region. As a result whole bounds was treated as the Region.

Change-Id: Ie34877b71292c05a1f17381a6de51aaed2386565
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113423
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 

diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx 
b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index f587135e1b1e..4213b373eebb 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -51,6 +51,7 @@ class Test : public test::BootstrapFixture, public 
XmlTestTools, public unotest:
 void TestLinearGradient();
 void TestTextMapMode();
 void TestEnglishMapMode();
+void TestFillRegion();
 void TestCreatePen();
 void TestPdfInEmf();
 
@@ -69,6 +70,7 @@ public:
 CPPUNIT_TEST(TestLinearGradient);
 CPPUNIT_TEST(TestTextMapMode);
 CPPUNIT_TEST(TestEnglishMapMode);
+CPPUNIT_TEST(TestFillRegion);
 CPPUNIT_TEST(TestCreatePen);
 CPPUNIT_TEST(TestPdfInEmf);
 CPPUNIT_TEST_SUITE_END();
@@ -309,6 +311,28 @@ void Test::TestEnglishMapMode()
 
 }
 
+void Test::TestFillRegion()
+{
+// Check import of EMF image with records: CREATEBRUSHINDIRECT, FILLRGN. 
The SETICMMODE is also used.
+Primitive2DSequence aSequence = 
parseEmf(u"/emfio/qa/cppunit/emf/data/TestFillRegion.emf");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(comphelper::sequenceToContainer(aSequence));
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polypolygon", 
"path", "m0 0h3943v3939h-3943z");
+
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polypolygoncolor", 1);
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polypolygoncolor[1]/polypolygon",
+"path", "m1323 
0h1323v1322h1323v1322h-1323v1322h-1323v-1322h-1323v-1322h1323z");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polypolygoncolor[1]", "color", "#ff");
+
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polygonhairline", 1);
+assertXPathContent(pDocument, 
"/primitive2D/metafile/transform/mask/polygonhairline[1]/polygon",
+   "1323,0 2646,0 2646,1322 3969,1322 3969,2644 2646,2644 
2646,3966 1323,3966 1323,2644 0,2644 0,1322 1323,1322");
+assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polygonhairline[1]", "color", "#00");
+}
+
 void Test::TestCreatePen()
 {
 // Check import of EMF image with records: RESTOREDC, SAVEDC, MOVETOEX, 
LINETO, POLYLINE16, EXTTEXTOUTW with DxBuffer
diff --git a/emfio/qa/cppunit/emf/data/TestFillRegion.emf 
b/emfio/qa/cppunit/emf/data/TestFillRegion.emf
new file mode 100644
index ..da7d4cd65d1f
Binary files /dev/null and b/emfio/qa/cppunit/emf/data/TestFillRegion.emf differ
diff --git a/emfio/source/reader/emfreader.cxx 
b/emfio/source/reader/emfreader.cxx
index 451c998a7669..12b4fce29323 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -333,38 +333,42 @@ bool ImplReadRegion( tools::PolyPolygon& rPolyPoly, 
SvStream& rStream, sal_uInt3
 if (nLen == 0)
 return false;
 
-sal_uInt32 nHdSize, nType, nCount, nRgnSize, i;
+sal_uInt32 nHdSize, nType, nCountRects, nRgnSize, i;
 rStream.ReadUInt32(nHdSize);
 rStream.ReadUInt32(nType);
-rStream.ReadUInt32(nCount);
+rStream.ReadUInt32(nCountRects);
 rStream.ReadUInt32(nRgnSize);
 
-if (!rStream.good() || nCount == 0 || nType != RDH_RECTANGLES)
+if (!rStream.good() || nCountRects == 0 || nType != RDH_RECTANGLES)
 return false;
 
 sal_uInt32 nSize;
-if (o3tl::checked_multiply(nCount, 16, nSize))
+if (o3tl::checked_multiply(nCountRects, 16, nSize))
 

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

2021-03-31 Thread Michael Weghorn (via logerrit)
 android/source/res/values-de/strings.xml  |8 
 android/source/res/values-tr/strings.xml  |6 
 android/source/res/values/strings.xml |8 
 android/source/src/java/org/libreoffice/LOKitTileProvider.java|   17 -
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java  |   75 
+++
 android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |   96 
++
 6 files changed, 105 insertions(+), 105 deletions(-)

New commits:
commit 4b8540911bc8fabee0729b31780a1ba8b4663121
Author: Michael Weghorn 
AuthorDate: Wed Mar 31 10:58:01 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Mar 31 20:07:54 2021 +0200

android: Use system file picker to create new docs

Similar to the way that existing documents can be
opened from within the Android Viewer app
using the system file picker by using
'Intent.ACTION_OPEN_DOCUMENT', use the system file picker
via 'Intent.ACTION_CREATE_DOCUMENT' to create new docs
as well, instead of providing a custom dialog to
insert a file name.

As described at [1], this allows to save files
in locations supported by any existing
DocumentsProvider (e.g. a Nextcloud share,
if the Nextcloud app is installed and set up),
not just locally.

This also allows to further unify the handling in
LOMainActivity. Just like for the cases where an
existing document is opened using the system file
picker or a document is passed from a third-party app,
the document URI is now set in the Intent, a
temporary file is used and writing back to the
actual URI happens on save.

Drop LibreOfficeMainActivity's method 'showSaveStatusMessage',
which was only meant to be used when a new file was created, but
was called from the more generic 'LOKitTileProvider::saveDocumentAs'.
Change that to show a more general error message when saving fails.
Since the actual file is now created by the DocumentsProvider,
LOKitTileProvider only operates on the temporary copy anyway.

Side note: With this change in place, overwriting
existing files also no longer just happens silently,
as used to be the case when typing the name of an existing
file in the custom dialog for creating new files
earlier.

Since 'Intent.ACTION_OPEN_DOCUMENT' was introduced
in SDK version 19 (Android 4.4), restrict creating
new docs to corresponding devices.

[1] 
https://developer.android.com/training/data-storage/shared/documents-files

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

diff --git a/android/source/res/values-de/strings.xml 
b/android/source/res/values-de/strings.xml
index 4c6e25342ef7..6828066524c9 100644
--- a/android/source/res/values-de/strings.xml
+++ b/android/source/res/values-de/strings.xml
@@ -100,8 +100,6 @@
 Dokument wird gespeichert…
 Speichern unvollständig. Gab es 
Änderungen?
 Speichern des Dokuments ist 
fehlgeschlagen.
-"Neue Datei angelegt - "
-Neue Datei konnte nicht angelegt 
weden, bitte Prüfen Sie den eingegeben Dateinamen.
 
 
 Speicheranbieter-Einstellungen
@@ -128,10 +126,6 @@
 Abbrechen
 NEIN
 
-
-Dateiname eingeben
-ANLEGEN
-
 
 Präsentation
 Folie hinzufügen
@@ -223,8 +217,10 @@
 Anzeigesprache
 Wählen Sie die 
Standard-Anzeigesprache
 PDF-Export nicht möglich
+Speichern nicht möglich
 PDF exportiert nach
 Ihr Gerät unterstützt Drucken 
nicht
+Erstellen neuer Dokumente 
auf diesem Gerät nicht verfügbar, benötigt Android-SDK-Version >= 19.
 Fehler
 Name für Abschnitt eingeben
 Bmp ist null!
diff --git a/android/source/res/values-tr/strings.xml 
b/android/source/res/values-tr/strings.xml
index 4ce70e91607d..357f441a8e86 100644
--- a/android/source/res/values-tr/strings.xml
+++ b/android/source/res/values-tr/strings.xml
@@ -96,8 +96,6 @@
 Kaydetme tamamlandı.
 Belge kaydediliyor…
 Kayıt tamamlanmadı. Değişiklik 
yapıldı mı?
-"Yeni dosya oluşturuldu - "
-Yeni dosya oluşturma başarısız. 
Lütfen dosya ismini kontrol ediniz.
 
 
 Depolama sağlayıcısı 
ayarları
@@ -124,10 +122,6 @@
 İptal
 Hayır
 
-
-Dosya ismi girin
-OLUŞTUR
-
 
 Slayt Gösterisi
 Slayt Ekle
diff --git a/android/source/res/values/strings.xml 
b/android/source/res/values/strings.xml
index 8205176df685..5cd2c978cef5 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -100,8 +100,6 @@
 Saving the document…
 Saving the document failed.
 Save incomplete. Were there any 
changes?
-"Created new file - "
-Unable to create new file, please 
check entered file name.
 
 
 Storage provider settings
@@

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

2021-03-31 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LOKitTileProvider.java |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 19e1f3723d4bfb91dadf77b398261da0e8237a8b
Author: Michael Weghorn 
AuthorDate: Wed Mar 31 11:22:30 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Mar 31 20:07:28 2021 +0200

android: Only update file path for "real Save As"

Follow-up for commit a1abf2c865228e6ed33e99ab73b94357ddbc590f
(tdf#139350 android: Add param to allow a "real" "Save As").

The file path should only be updated when the newly saved
doc is actually used (i.e. 'takeOwnership=true'),
not when just saving a copy or exporting to a different
file format.

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

diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java 
b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index 0a9ad6a90685..85eda566bae3 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -349,7 +349,9 @@ class LOKitTileProvider implements TileProvider {
 }
 });
 } else {
-mInputFile = filePath;
+if (takeOwnership) {
+mInputFile = filePath;
+}
 LOKitShell.getMainHandler().post(new Runnable() {
 @Override
 public void run() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-31 Thread Michael Weghorn (via logerrit)
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 05a3ce9abb329969e7edaafd0a2e9057c73d0fbb
Author: Michael Weghorn 
AuthorDate: Wed Mar 31 10:11:20 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Mar 31 20:07:08 2021 +0200

android: Drop unused 'newDocumentType' member

It appears to have been unused since it was added
in

commit 78098b8494be7123bc4a8b50faa13445e5afd8ce
Date:   Mon Mar 27 22:26:47 2017 +0530

Add BottomSheetBehavior to formatting toolbar

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

diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index b9896c3c046c..6db06d155322 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -93,7 +93,6 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 private DocumentOverlay mDocumentOverlay;
 private File mTempFile = null;
 private File mTempSlideShowFile = null;
-private String newDocumentType = null;
 public boolean firstStart = true;
 
 BottomSheetBehavior bottomToolbarSheetBehavior;
___
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-03-31 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 81670b05fbb7096ec91c806a8f68496f66bc8b87
Author: Andras Timar 
AuthorDate: Wed Mar 31 19:34:22 2021 +0200
Commit: Andras Timar 
CommitDate: Wed Mar 31 19:35:19 2021 +0200

[cp] Let the PRODUCTVERSION be 2021

Change-Id: I28a47a21f597c3b4f41eec01a5cdf9b790e28a64

diff --git a/configure.ac b/configure.ac
index e38091b29615..d72bd74b1a0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -465,7 +465,7 @@ dnl 
===
 dnl Product version
 dnl ===
 AC_MSG_CHECKING([for product version])
-PRODUCTVERSION="$LIBO_VERSION_MAJOR.$LIBO_VERSION_PATCH"
+PRODUCTVERSION="$LIBO_VERSION_MAJOR"
 AC_MSG_RESULT([$PRODUCTVERSION])
 AC_SUBST(PRODUCTVERSION)
 
___
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' - helpcontent2

2021-03-31 Thread Andras Timar (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3cb13663e6073680729b3c8b042524cfc81415ac
Author: Andras Timar 
AuthorDate: Wed Mar 31 19:31:41 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Mar 31 19:31:41 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'distro/collabora/co-2021'
  to 18cba6fc7fed38dbf26ceb8a4579aa5737b8ce0a
  - Fix broken links (OK in master)

Change-Id: Iaff1e962593680327437b809b8b42ce82eb42af7

  - [cp] Xapian Omega setup for help.collaboraoffice.com

Change-Id: Iaa28803be627db8915e7f426b400ac3b26e7b3a2

  - [cp] help page footer

Change-Id: I257d7dd85a896ff69e391a05206c1cb419997331

  - [cp] Hide 'Please support us!' button

Change-Id: I003b30b6b47e1323f4ef2a504ed72585561a386f

  - [cp] Revert the .xhp parts of "Deploy videos in New Help (WIP)"

Partially reverts commit 93ebf037016819613322ef1c39951a3de893ec14.

Change-Id: I21224f97e9c47d5dfeb8e000102237a5664d3d41

  - [cp] Exchange the logo.

Change-Id: I138d97fd40764ff455354f4ad53f9a7fb72faba8
Reviewed-on: https://gerrit.libreoffice.org/58797
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

  - [cp] Collabora favicon

Change-Id: I00bfc8fff17435356f393de32b585d12c37fea5e

  - [cp] Collabora support link

Change-Id: I980fe8fc2779647bbe1dfce649f06b3cbd36f864

  - [cp] remove TDF Piwik tracker

Change-Id: Icabdcae5d5828417d3540bf36f6bb747001189e3

  - [cp] set branch to distro/collabora/co-2021 in .gitreview

Change-Id: I3611766b7aa9da1444d4aab118fc2a10e0f1d706

diff --git a/helpcontent2 b/helpcontent2
index 84fc53d74283..18cba6fc7fed 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 84fc53d74283a053b3002d9108a1760369b6b606
+Subproject commit 18cba6fc7fed38dbf26ceb8a4579aa5737b8ce0a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'distro/collabora/co-2021' - 10 commits - AllLangHelp_shared.mk .gitreview help3xsl/default.css help3xsl/help2.js help3xsl/help.html help3xsl/index2.html help3xs

2021-03-31 Thread Andras Timar (via logerrit)
 .gitreview|2 
 AllLangHelp_shared.mk |1 
 Package_html_media.mk |2 
 help3xsl/default.css  |5 -
 help3xsl/help.html|2 
 help3xsl/help2.js |7 --
 help3xsl/index.html   |2 
 help3xsl/index2.html  |2 
 help3xsl/online_transform.xsl |   16 ++--
 help3xsl/xap_templ_query.xsl  |2 
 source/auxiliary/swriter.tree |2 
 source/media/navigation/collabora-online-logo.svg |   77 ++
 source/media/navigation/favicon.ico   |binary
 source/media/navigation/libo-symbol-white.svg |1 
 source/text/sbasic/shared/main0601.xhp|1 
 source/text/scalc/main.xhp|1 
 source/text/schart/main.xhp   |1 
 source/text/sdatabase/main.xhp|1 
 source/text/sdraw/main.xhp|1 
 source/text/shared/05/new_help.xhp|1 
 source/text/shared/06/youtubevideos.xhp   |   23 --
 source/text/shared/guide/template_manager.xhp |2 
 source/text/shared/main0108.xhp   |2 
 source/text/simpress/main.xhp |1 
 source/text/smath/main.xhp|1 
 source/text/swriter/guide/templates_styles.xhp|2 
 source/text/swriter/main.xhp  |1 
 27 files changed, 97 insertions(+), 62 deletions(-)

New commits:
commit 18cba6fc7fed38dbf26ceb8a4579aa5737b8ce0a
Author: Andras Timar 
AuthorDate: Wed Mar 31 19:31:13 2021 +0200
Commit: Andras Timar 
CommitDate: Wed Mar 31 19:31:13 2021 +0200

Fix broken links (OK in master)

Change-Id: Iaff1e962593680327437b809b8b42ce82eb42af7

diff --git a/source/auxiliary/swriter.tree b/source/auxiliary/swriter.tree
index 26d2cd238..dde7dccfe 100644
--- a/source/auxiliary/swriter.tree
+++ b/source/auxiliary/swriter.tree
@@ -135,7 +135,7 @@
 Using Styles From 
Another Document or Template
 Creating New 
Styles From Selections
 Updating Styles From 
Selections
-Creating and 
Changing Default and Custom Templates
+Creating and 
Changing Default and Custom Templates

 Changing Page 
Orientation (Landscape or Portrait)
 Changing the Case of 
Text
diff --git a/source/text/shared/guide/template_manager.xhp 
b/source/text/shared/guide/template_manager.xhp
index 9d6a16f9b..9e33b1aea 100644
--- a/source/text/shared/guide/template_manager.xhp
+++ b/source/text/shared/guide/template_manager.xhp
@@ -189,7 +189,7 @@
 
 
 See 
Templates and 
Styles for related information.
-See 
Creating a Document 
Template for related information.
+See 
Creating a Document 
Template for related information.
 See 
Chapter 3 – Using Styles and Templates in the Getting Started Guide, available 
from the https://documentation.libreoffice.org/en/english-documentation/getting-started-guide/";>documentation
 website.
 Refer to https://templates.libreoffice.org";>https://templates.libreoffice.org
 for templates to download.
 
diff --git a/source/text/swriter/guide/templates_styles.xhp 
b/source/text/swriter/guide/templates_styles.xhp
index 0606faa15..4b00d0a2b 100644
--- a/source/text/swriter/guide/templates_styles.xhp
+++ b/source/text/swriter/guide/templates_styles.xhp
@@ -40,7 +40,7 @@
   
   
   
-  
+  
  

 
commit f29a89ac06b0465c74efe1923fadc7cee64e34ff
Author: Andras Timar 
AuthorDate: Tue Jul 28 16:09:48 2020 +0200
Commit: Andras Timar 
CommitDate: Wed Mar 31 19:04:19 2021 +0200

[cp] Xapian Omega setup for help.collaboraoffice.com

Change-Id: Iaa28803be627db8915e7f426b400ac3b26e7b3a2

diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 79390d7c1..0f70329c1 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -229,8 +229,11 @@
 
 
 
-
-
+
+
+
+
+
 
 
 
commit 1b6cf494abd3c3892d071c41e6cb2c248340a8db
Author: Andras Timar 
AuthorDate: Wed Aug 22 09:55:44 2018 +0200
Commit: Andras Timar 
CommitDate: Wed Mar 31 19:04:19 2021 +0200

[cp] help page footer

Change-Id: I257d7dd85a896ff69e391a05206c1cb419997331

diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 988ed6380..79390d7c1 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -246,12 +246,7 @@
 
 
 
-http://schema.org/Organization";>
-
-
-
-https://

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

2021-03-31 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ww8export/data/rtl-gutter.doc  |binary
 sw/qa/extras/ww8export/ww8export3.cxx   |   17 +
 sw/source/filter/ww8/ww8atr.cxx |   12 
 sw/source/filter/ww8/ww8attributeoutput.hxx |2 ++
 sw/source/filter/ww8/ww8par.hxx |1 +
 sw/source/filter/ww8/ww8par6.cxx|9 ++---
 6 files changed, 38 insertions(+), 3 deletions(-)

New commits:
commit 8b7ff52ac87795881a4d86395885778f1da3d18b
Author: Miklos Vajna 
AuthorDate: Wed Mar 31 15:04:25 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 18:43:21 2021 +0200

tdf#140343 sw page rtl gutter margin: add DOC filter

The import's tokenizer was there since commit
3e13e053749e1bf19179bf83bdf0a18a9488b5e8 (#i2408# Import and export
set/ask references fields as set/input, change references to bookmarks
to show variable as appropiate, 2002-02-04), but it tried to read 2
bytes, not 1 byte, so it was broken. This did not cause problems in
practice till commit b897cc4dfc7111eb8dfd5d8aa8c970f21ab035d6
(consistently track amount of buffers remaining, 2017-04-10) started to
check for not reading past the end of the buffer.

The export was missing, since we previously tried to handle this at
import time, so the doc model didn't have the info anymore.

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

diff --git a/sw/qa/extras/ww8export/data/rtl-gutter.doc 
b/sw/qa/extras/ww8export/data/rtl-gutter.doc
new file mode 100644
index ..37cbf8707ce6
Binary files /dev/null and b/sw/qa/extras/ww8export/data/rtl-gutter.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index b2afbce478de..6364762be9b0 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -708,6 +708,23 @@ DECLARE_WW8EXPORT_TEST(testPresetDash, 
"tdf127166_prstDash_Word97.doc")
 }
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testRtlGutter)
+{
+auto verify = [this]() {
+uno::Reference xStandard(
+getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+CPPUNIT_ASSERT(getProperty(xStandard, "RtlGutter"));
+};
+
+// Given a document with RTL gutter, when loading it:
+load(mpTestDocumentPath, "rtl-gutter.doc");
+// Then make sure the section's gutter is still RTL:
+// Without the accompanying fix in place, this test would have failed as 
the SPRM was missing.
+verify();
+reload(mpFilter, "rtl-gutter.doc");
+verify();
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf120394, "tdf120394.doc")
 {
 CPPUNIT_ASSERT_EQUAL(1, getPages());
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 2103490e9cc7..4e0451e6072e 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4105,6 +4105,18 @@ void WW8AttributeOutput::FormatLRSpace( const 
SvxLRSpaceItem& rLR )
 }
 }
 
+void WW8AttributeOutput::SectionRtlGutter(const SfxBoolItem& rRtlGutter)
+{
+if (!rRtlGutter.GetValue())
+{
+return;
+}
+
+// sprmSFRTLGutter
+m_rWW8Export.InsUInt16(NS_sprm::SFRTLGutter::val);
+m_rWW8Export.pO->push_back(1);
+}
+
 void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
 {
 // Flys are still missing ( see RTF )
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx 
b/sw/source/filter/ww8/ww8attributeoutput.hxx
index 7bd1dd1d1e00..f9ea183d1e6b 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -434,6 +434,8 @@ protected:
 
 virtual void WriteBookmarkInActParagraph( const OUString& rName, sal_Int32 
nFirstRunPos, sal_Int32 nLastRunPos ) override;
 
+void SectionRtlGutter( const SfxBoolItem& rRtlGutter) override;
+
 /// Reference to the export, where to get the data from
 WW8Export &m_rWW8Export;
 
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index fcfac3503ad1..ec3702a68a39 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -799,6 +799,7 @@ public:
 sal_uInt32 nPgLeft;
 sal_uInt32 nPgRight;
 sal_uInt32 nPgGutter;
+bool m_bRtlGutter = false;
 
 css::drawing::TextVerticalAdjust mnVerticalAdjustment;
 sal_uInt8 mnBorders;
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 453f7f5aa7d3..4753ca2c1114 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -486,8 +486,7 @@ void wwSectionManager::SetLeftRight(wwSection &rSection)
 */
 if (rSection.maSep.fRTLGutter)
 {
-nWWRi += nWWGu;
-nWWGu = 0;
+rSection.m_bRtlGutter = true;
 }
 
 // Left / Right
@@ -530,6 +529,9 @@ void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, 
SwFrameForma

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - distro-configs/CPAndroidBranding.conf

2021-03-31 Thread Aron Budea (via logerrit)
 distro-configs/CPAndroidBranding.conf |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit edb5418588841413170618a8070c785d038e048f
Author: Aron Budea 
AuthorDate: Thu Jul 9 00:55:25 2020 +0200
Commit: Andras Timar 
CommitDate: Wed Mar 31 18:38:57 2021 +0200

android: we want full Chinese localization

Change-Id: Ie67bc68f25431dd0391885ac43d87f2717eec1bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98392
Tested-by: Aron Budea 
Reviewed-by: Aron Budea 

diff --git a/distro-configs/CPAndroidBranding.conf 
b/distro-configs/CPAndroidBranding.conf
index 6cded31764c2..21b5bb5635e0 100644
--- a/distro-configs/CPAndroidBranding.conf
+++ b/distro-configs/CPAndroidBranding.conf
@@ -7,7 +7,7 @@
 --with-vendor=Collabora
 --disable-scripting-beanshell
 --disable-scripting-javascript
---with-lang=de en-US es fr pt-BR
+--with-lang=de en-US es fr pt-BR zh-CN zh-TW
 --with-myspell-dicts
 --enable-release-build
 --disable-community-flavor
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: install_deps.sh

2021-03-31 Thread Noel Grandin (via logerrit)
 install_deps.sh |   52 
 1 file changed, 52 insertions(+)

New commits:
commit 8da9f85abc508140b90e4f5be587aa05d4f1e5f4
Author: Noel Grandin 
AuthorDate: Tue Mar 30 10:35:05 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 31 17:38:48 2021 +0200

Initial version of script to install dependencies

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

diff --git a/install_deps.sh b/install_deps.sh
new file mode 100755
index ..7759527cf4a8
--- /dev/null
+++ b/install_deps.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+#
+# 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/.
+#
+# This script attempts to install the necessary dependencies to do LibreOffice 
development.
+#
+# It should be kept in sync with the instructions at
+#https://wiki.documentfoundation.org/Development/BuildingOnLinux
+#
+
+# Detect OS (i.e. distro)
+if [ -f /etc/os-release ]; then
+# freedesktop.org and systemd
+. /etc/os-release
+OS=$NAME
+VER=$VERSION_ID
+elif type lsb_release >/dev/null 2>&1; then
+# linuxbase.org
+OS=$(lsb_release -si)
+VER=$(lsb_release -sr)
+elif [ -f /etc/lsb-release ]; then
+# For some versions of Debian/Ubuntu without lsb_release command
+. /etc/lsb-release
+OS=$DISTRIB_ID
+VER=$DISTRIB_RELEASE
+elif [ -f /etc/debian_version ]; then
+# Older Debian/Ubuntu/etc.
+OS=Debian
+VER=$(cat /etc/debian_version)
+elif [ -f /etc/SuSe-release ]; then
+# Older SuSE/etc.
+...
+elif [ -f /etc/redhat-release ]; then
+# Older Red Hat, CentOS, etc.
+...
+else
+# Fall back to uname, e.g. "Linux ", also works for BSD, etc.
+OS=$(uname -s)
+VER=$(uname -r)
+fi
+
+echo "Detected OS/Distro/Version" $OS $VER
+
+if [ "$OS" = "Debian" -o "$OS" = "Ubuntu" ]; then
+apt-get install git build-essential zip ccache junit4 libkrb5-dev nasm 
graphviz python3 python3-dev qtbase5-dev libkf5coreaddons-dev libkf5i18n-dev 
libkf5config-dev libkf5windowsystem-dev libkf5kio-dev autoconf libcups2-dev 
libfontconfig1-dev gperf default-jdk doxygen libxslt1-dev xsltproc 
libxml2-utils libxrandr-dev bison flex libgtk-3-dev 
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev ant ant-optional
+else
+echo "Sorry, I don't know how to install dependencies for" $OS
+fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: canvas/source include/vcl vcl/headless vcl/qt5 vcl/quartz vcl/skia vcl/source vcl/unx vcl/win

2021-03-31 Thread Noel (via logerrit)
 canvas/source/directx/dx_vcltools.cxx   |6 ---
 include/vcl/BitmapReadAccess.hxx|8 
 include/vcl/Scanline.hxx|5 --
 vcl/headless/svpbmp.cxx |9 +
 vcl/qt5/Qt5Bitmap.cxx   |4 --
 vcl/quartz/salbmp.cxx   |3 -
 vcl/skia/salbmp.cxx |3 -
 vcl/source/bitmap/BitmapReadAccess.cxx  |   54 
 vcl/source/bitmap/BitmapWriteAccess.cxx |6 ---
 vcl/source/bitmap/bitmappaint.cxx   |   46 ---
 vcl/source/bitmap/bmpfast.cxx   |   14 
 vcl/source/bitmap/dibtools.cxx  |1 
 vcl/source/bitmap/salbmp.cxx|8 
 vcl/source/gdi/salmisc.cxx  |   24 --
 vcl/source/helper/canvasbitmap.cxx  |   14 
 vcl/unx/generic/gdi/salbmp.cxx  |   18 --
 vcl/win/gdi/salbmp.cxx  |1 
 17 files changed, 6 insertions(+), 218 deletions(-)

New commits:
commit 740757d17452e3b2f9bfa7897c05dedeca639e34
Author: Noel 
AuthorDate: Wed Mar 31 14:32:02 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 31 17:38:04 2021 +0200

remove internal 4bit scanline formats

since we have already removed the 4-bit internal bitmap formats.

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

diff --git a/canvas/source/directx/dx_vcltools.cxx 
b/canvas/source/directx/dx_vcltools.cxx
index 68a07ae79b4a..707d358e5869 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -176,7 +176,6 @@ namespace dxcanvas::tools
 // one of the following formats:
 
 //ScanlineFormat::N1BitMsbPal
-//ScanlineFormat::N4BitMsnPal
 //ScanlineFormat::N8BitPal
 //ScanlineFormat::N24BitTcBgr
 //ScanlineFormat::N32BitTcMask
@@ -240,7 +239,6 @@ namespace dxcanvas::tools
 // to hand-formulate the following
 // formats, too.
 case ScanlineFormat::N1BitMsbPal:
-case ScanlineFormat::N4BitMsnPal:
 case ScanlineFormat::N32BitTcMask:
 {
 Scanline pAScan = 
pAlphaReadAccess->GetScanline( y );
@@ -261,7 +259,6 @@ namespace dxcanvas::tools
 break;
 
 case ScanlineFormat::N1BitLsbPal:
-case ScanlineFormat::N4BitLsnPal:
 case ScanlineFormat::N24BitTcRgb:
 case ScanlineFormat::N32BitTcAbgr:
 case ScanlineFormat::N32BitTcArgb:
@@ -285,7 +282,6 @@ namespace dxcanvas::tools
 // one of the following formats:
 
 //ScanlineFormat::N1BitMsbPal
-//ScanlineFormat::N4BitMsnPal
 //ScanlineFormat::N8BitPal
 //ScanlineFormat::N24BitTcBgr
 //ScanlineFormat::N32BitTcMask
@@ -371,7 +367,6 @@ namespace dxcanvas::tools
 // to hand-formulate the following
 // formats, too.
 case ScanlineFormat::N1BitMsbPal:
-case ScanlineFormat::N4BitMsnPal:
 case ScanlineFormat::N32BitTcMask:
 {
 Scanline pMScan = 
pMaskReadAccess->GetScanline( y );
@@ -395,7 +390,6 @@ namespace dxcanvas::tools
 break;
 
 case ScanlineFormat::N1BitLsbPal:
-case ScanlineFormat::N4BitLsnPal:
 case ScanlineFormat::N24BitTcRgb:
 case ScanlineFormat::N32BitTcAbgr:
 case ScanlineFormat::N32BitTcArgb:
diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx
index 845e9994aa6b..b68332e89294 100644
--- a/include/vcl/BitmapReadAccess.hxx
+++ b/include/vcl/BitmapReadAccess.hxx
@@ -119,10 +119,6 @@ public:
   const ColorMask& rMask);
 static BitmapColor GetPixelForN1BitLsbPal(ConstScanline pScanline, 
tools::Long nX,
   const ColorMask& rMask);
-static BitmapColor GetPixelForN4BitMsnPal(ConstScanline pScanline, 
tools::Long nX,
-  const ColorMask& rMask);
-static BitmapColor GetPixelForN4BitLsnPal(ConstScanline pScanline, 
tools::Long nX,
-  const ColorMask& rMask);
 static Bit

Re: GSoC 2021

2021-03-31 Thread Ilmari Lauhakangas

On 31.3.2021 16.50, Balázs Sántha wrote:
My name is Balázs Sántha, and I am third year student studying computer 
engineering at Budapest University of Technology and Economics.


I have a good knowledge in C++ and Java, and getting familier with 
Python too.
Not so long ago, I did my first commit to LibreOffice: 
https://gerrit.libreoffice.org/c/core/+/111637 


Right now I am working on a unit test related to this commit.

On the ideas page, I got interested in with the "Implement table styles 
DOCX support" and I would like to work on that problem.
Earlier, I was working and searching solution for the slow import of 
footnotes. However, I did not manage to solve it, I read and learned a 
lot about how the writerfilter works.


I am not sure what is the next step, but I am ready to contact!


You can submit your proposal into Google's system. It can be a draft at 
first, if you want mentors to comment on details. The timeline is here: 
https://wiki.documentfoundation.org/Development/GSoC/2021#Important_dates


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


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

2021-03-31 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_dialogs/openDialogs.py |3 -
 sw/qa/uitest/writer_tests7/tdf140863.py|   75 +
 2 files changed, 77 insertions(+), 1 deletion(-)

New commits:
commit b5558e4ac6c2f134f07ea87a143694b17adb4482
Author: Xisco Fauli 
AuthorDate: Wed Mar 31 15:05:09 2021 +0200
Commit: Xisco Fauli 
CommitDate: Wed Mar 31 16:53:46 2021 +0200

tdf#140863: sw: Add UItest

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

diff --git a/sw/qa/uitest/writer_dialogs/openDialogs.py 
b/sw/qa/uitest/writer_dialogs/openDialogs.py
index 6c8cb699a7a6..b4d9b356e153 100644
--- a/sw/qa/uitest/writer_dialogs/openDialogs.py
+++ b/sw/qa/uitest/writer_dialogs/openDialogs.py
@@ -37,7 +37,8 @@ dialogs = [
 # {"command": ".uno:InsertBreak", "closeButton": "cancel"},
 # tested in uitest/writer_tests/insertBreakDialog.py
 {"command": ".uno:InsertObject", "closeButton": "cancel"},
-{"command": ".uno:InsertSection", "closeButton": "cancel"},
+# {"command": ".uno:InsertSection", "closeButton": "cancel"},
+# tested in sw/qa/uitest/writer_tests7/tdf140863.py
 {"command": ".uno:InsertFrame", "closeButton": "cancel"},
 {"command": ".uno:InsertObjectFloatingFrame", "closeButton": "cancel"},
 {"command": ".uno:FontworkGalleryFloater", "closeButton": "cancel"},
diff --git a/sw/qa/uitest/writer_tests7/tdf140863.py 
b/sw/qa/uitest/writer_tests7/tdf140863.py
new file mode 100644
index ..f0355e4684ed
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf140863.py
@@ -0,0 +1,75 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+
+class tdf140863(UITestCase):
+
+def test_tdf140863(self):
+
+self.ui_test.create_doc_in_start_center("writer")
+
+# Insert one section
+self.ui_test.execute_dialog_through_command(".uno:InsertSection")
+
+xDialog = self.xUITest.getTopFocusWindow()
+
+xOkBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOkBtn)
+
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+# Insert a page break in the section
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+self.xUITest.executeCommand(".uno:InsertPagebreak")
+self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+document = self.ui_test.get_component()
+self.assertEqual(1, len(document.TextSections))
+self.assertTrue(document.TextSections.Section1.IsVisible)
+
+
+self.ui_test.execute_dialog_through_command(".uno:EditRegion")
+
+xDialog = self.xUITest.getTopFocusWindow()
+
+xHide = xDialog.getChild('hide')
+self.assertEqual('false', get_state_as_dict(xHide)['Selected'])
+
+xHide.executeAction('CLICK', tuple())
+
+xOkBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOkBtn)
+
+self.assertEqual(1, len(document.TextSections))
+self.assertFalse(document.TextSections.Section1.IsVisible)
+self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "1")
+
+self.ui_test.execute_dialog_through_command(".uno:EditRegion")
+
+xDialog = self.xUITest.getTopFocusWindow()
+
+xHide = xDialog.getChild('hide')
+self.assertEqual('true', get_state_as_dict(xHide)['Selected'])
+
+xHide.executeAction('CLICK', tuple())
+
+xOkBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOkBtn)
+
+self.assertEqual(1, len(document.TextSections))
+self.assertTrue(document.TextSections.Section1.IsVisible)
+
+# Without the fix in place, this test would have failed with
+# AssertionError: '1' != '2'
+self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "2")
+
+self.ui_test.close_doc()
+
+# 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: Branch 'distro/cib/libreoffice-6-1' - 2 commits - include/xmloff xmlsecurity/qa xmlsecurity/source

2021-03-31 Thread Michael Stahl (via logerrit)
 include/xmloff/xmlnmspe.hxx|3 
 xmlsecurity/qa/unit/signing/signing.cxx|   43 
 xmlsecurity/source/helper/ooxmlsecexporter.cxx |   10 
 xmlsecurity/source/helper/ooxmlsecparser.cxx   | 1465 +
 xmlsecurity/source/helper/ooxmlsecparser.hxx   |   75 -
 5 files changed, 1365 insertions(+), 231 deletions(-)

New commits:
commit f6f36865b06b64cd36c71779ed66afe4d515aa06
Author: Michael Stahl 
AuthorDate: Tue Mar 30 17:37:31 2021 +0200
Commit: Michael Stahl 
CommitDate: Wed Mar 31 14:19:35 2021 +0200

xmlsecurity: replace OOXMLSecParser implementation

This is similar to 12b15be8f4f930a04d8056b9219ac969b42a9784 and following
commits, but OOXMLSecParser has some differences to XSecParser, such as
using a ds:Manifest, and requires a couple extra namespaces.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113381
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit cc1d19f7bbaefa5fb22ebd1344112755068b93c9)

Change-Id: I56e39d9609db8fcad50ca1632ff482c1f0a30ff5

diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx
index cc97a9c5aaa4..a7505a64190d 100644
--- a/include/xmloff/xmlnmspe.hxx
+++ b/include/xmloff/xmlnmspe.hxx
@@ -145,6 +145,9 @@ const sal_uInt16 XML_NAMESPACE_DSIG =201;
 const sal_uInt16 XML_NAMESPACE_DS =  202;
 const sal_uInt16 XML_NAMESPACE_XADES132 =203;
 const sal_uInt16 XML_NAMESPACE_XADES141 =204;
+// OOXML digital signature extension namespaces, also based on xmldsig-core
+const sal_uInt16 XML_NAMESPACE_MDSSI =   205;
+const sal_uInt16 XML_NAMESPACE_MSODIGSIG =   206;
 
 #endif // INCLUDED_XMLOFF_XMLNMSPE_HXX
 
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx 
b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index 3a9b04fe3691..56026cda5341 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -11,30 +11,1240 @@
 #include "ooxmlsecparser.hxx"
 #include 
 
+#include 
+#include 
+
+#include 
+
+#include 
+
 using namespace com::sun::star;
 
+class OOXMLSecParser::Context
+{
+protected:
+friend class OOXMLSecParser;
+OOXMLSecParser & m_rParser;
+private:
+std::unique_ptr m_pOldNamespaceMap;
+
+public:
+Context(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: m_rParser(rParser)
+, m_pOldNamespaceMap(std::move(pOldNamespaceMap))
+{
+}
+
+virtual ~Context() = default;
+
+virtual void StartElement(
+css::uno::Reference const& 
/*xAttrs*/)
+{
+}
+
+virtual void EndElement()
+{
+}
+
+virtual std::unique_ptr CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/);
+
+virtual void Characters(OUString const& /*rChars*/)
+{
+}
+};
+
+// it's possible that an unsupported element has an Id attribute and a
+// ds:Reference digesting it - probably this means XSecController needs to know
+// about it. (For known elements, the Id attribute is only processed according
+// to the schema.)
+class OOXMLSecParser::UnknownContext
+: public OOXMLSecParser::Context
+{
+public:
+UnknownContext(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+{
+}
+
+virtual void StartElement(
+css::uno::Reference const& xAttrs) 
override
+{
+m_rParser.HandleIdAttr(xAttrs);
+}
+};
+
+auto OOXMLSecParser::Context::CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/)
+-> std::unique_ptr
+{
+// default: create new base context
+return std::make_unique(m_rParser, 
std::move(pOldNamespaceMap));
+}
+
+/**
+note: anything in ds:Object should be trusted *only* if there is a ds:Reference
+  to it so it is signed (exception: the xades:EncapsulatedX509Certificate).
+  ds:SignedInfo precedes all ds:Object.
+
+  There may be multiple ds:Signature for purpose of counter-signatures
+  but the way XAdES describes these, only the ds:SignatureValue element
+  would be referenced, so requiring a ds:Reference for anything in
+  ds:Object shouldn't cause issues.
+ */
+class OOXMLSecParser::ReferencedContextImpl
+: public OOXMLSecParser::Context
+{
+protected:
+bool m_isReferenced;
+
+public:
+ReferencedContextImpl(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap,
+bool const isReferenced)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+, m_isReferenced(isReferenced)
+{
+}
+
+OUString 
Ch

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - include/xmloff xmlsecurity/source

2021-03-31 Thread Michael Stahl (via logerrit)
 include/xmloff/xmlnmspe.hxx  |3 
 xmlsecurity/source/helper/ooxmlsecparser.cxx | 1472 +++
 xmlsecurity/source/helper/ooxmlsecparser.hxx |   75 -
 3 files changed, 1315 insertions(+), 235 deletions(-)

New commits:
commit d5dd8a19aa351382fb97b52886d4e11556997060
Author: Michael Stahl 
AuthorDate: Tue Mar 30 17:37:31 2021 +0200
Commit: Michael Stahl 
CommitDate: Wed Mar 31 16:27:58 2021 +0200

xmlsecurity: replace OOXMLSecParser implementation

This is similar to 12b15be8f4f930a04d8056b9219ac969b42a9784 and following
commits, but OOXMLSecParser has some differences to XSecParser, such as
using a ds:Manifest, and requires a couple extra namespaces.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113381
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit cc1d19f7bbaefa5fb22ebd1344112755068b93c9)

Change-Id: I56e39d9609db8fcad50ca1632ff482c1f0a30ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113411
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx
index cc97a9c5aaa4..a7505a64190d 100644
--- a/include/xmloff/xmlnmspe.hxx
+++ b/include/xmloff/xmlnmspe.hxx
@@ -145,6 +145,9 @@ const sal_uInt16 XML_NAMESPACE_DSIG =201;
 const sal_uInt16 XML_NAMESPACE_DS =  202;
 const sal_uInt16 XML_NAMESPACE_XADES132 =203;
 const sal_uInt16 XML_NAMESPACE_XADES141 =204;
+// OOXML digital signature extension namespaces, also based on xmldsig-core
+const sal_uInt16 XML_NAMESPACE_MDSSI =   205;
+const sal_uInt16 XML_NAMESPACE_MSODIGSIG =   206;
 
 #endif // INCLUDED_XMLOFF_XMLNMSPE_HXX
 
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx 
b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index 3a9b04fe3691..56026cda5341 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -11,30 +11,1240 @@
 #include "ooxmlsecparser.hxx"
 #include 
 
+#include 
+#include 
+
+#include 
+
+#include 
+
 using namespace com::sun::star;
 
+class OOXMLSecParser::Context
+{
+protected:
+friend class OOXMLSecParser;
+OOXMLSecParser & m_rParser;
+private:
+std::unique_ptr m_pOldNamespaceMap;
+
+public:
+Context(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: m_rParser(rParser)
+, m_pOldNamespaceMap(std::move(pOldNamespaceMap))
+{
+}
+
+virtual ~Context() = default;
+
+virtual void StartElement(
+css::uno::Reference const& 
/*xAttrs*/)
+{
+}
+
+virtual void EndElement()
+{
+}
+
+virtual std::unique_ptr CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/);
+
+virtual void Characters(OUString const& /*rChars*/)
+{
+}
+};
+
+// it's possible that an unsupported element has an Id attribute and a
+// ds:Reference digesting it - probably this means XSecController needs to know
+// about it. (For known elements, the Id attribute is only processed according
+// to the schema.)
+class OOXMLSecParser::UnknownContext
+: public OOXMLSecParser::Context
+{
+public:
+UnknownContext(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+{
+}
+
+virtual void StartElement(
+css::uno::Reference const& xAttrs) 
override
+{
+m_rParser.HandleIdAttr(xAttrs);
+}
+};
+
+auto OOXMLSecParser::Context::CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/)
+-> std::unique_ptr
+{
+// default: create new base context
+return std::make_unique(m_rParser, 
std::move(pOldNamespaceMap));
+}
+
+/**
+note: anything in ds:Object should be trusted *only* if there is a ds:Reference
+  to it so it is signed (exception: the xades:EncapsulatedX509Certificate).
+  ds:SignedInfo precedes all ds:Object.
+
+  There may be multiple ds:Signature for purpose of counter-signatures
+  but the way XAdES describes these, only the ds:SignatureValue element
+  would be referenced, so requiring a ds:Reference for anything in
+  ds:Object shouldn't cause issues.
+ */
+class OOXMLSecParser::ReferencedContextImpl
+: public OOXMLSecParser::Context
+{
+protected:
+bool m_isReferenced;
+
+public:
+ReferencedContextImpl(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap,
+bool const isReferenced)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+, m_isReferenced(isReferenced)
+{
+}
+
+OU

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

2021-03-31 Thread Bjoern Michaelsen (via logerrit)
 sw/source/core/docnode/section.cxx |   44 ++---
 1 file changed, 17 insertions(+), 27 deletions(-)

New commits:
commit 296c1b3b7e2fca6d54e3e61684d70d12f7989624
Author: Bjoern Michaelsen 
AuthorDate: Sun Nov 22 10:47:20 2020 +0100
Commit: Xisco Fauli 
CommitDate: Wed Mar 31 16:26:26 2021 +0200

tdf#140863: section.cxx: Remove remaining SwClientNotifyCalls

Change-Id: I569c5952a7491c37c677ad6b6d5f803a50b2e701
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106341
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen 
(cherry picked from commit 5fc6a601d7a1978db291fd0f7dcec638a7c25651)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113361
Reviewed-by: Michael Stahl 
Tested-by: Xisco Fauli 

diff --git a/sw/source/core/docnode/section.cxx 
b/sw/source/core/docnode/section.cxx
index a3dad1262b23..00adf5a40f47 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -66,13 +66,6 @@
 using namespace ::com::sun::star;
 
 namespace {
-
-void lcl_SwClientNotify(sw::BroadcastingModify& rModify, const 
SfxPoolItem* pOldNew)
-{
-const sw::LegacyModifyHint aHint(pOldNew, pOldNew);
-rModify.SwClientNotifyCall(rModify, aHint);
-}
-
 class SwIntrnlSectRefLink : public SwBaseLink
 {
 SwSectionFormat& m_rSectFormat;
@@ -318,8 +311,8 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, 
bool const bCondition)
 // This should be shown by the bHiddenFlag.
 
 // Tell all Children that they are hidden
-SwMsgPoolItem aMsgItem( RES_SECTION_HIDDEN );
-lcl_SwClientNotify(*pFormat, &aMsgItem);
+const SwMsgPoolItem aMsgItem( RES_SECTION_HIDDEN );
+pFormat->CallSwClientNotify(sw::LegacyModifyHint(&aMsgItem, 
&aMsgItem));
 
 // Delete all Frames
 pFormat->DelFrames();
@@ -333,8 +326,8 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, 
bool const bCondition)
 if( !pParentSect || !pParentSect->IsHiddenFlag() )
 {
 // Tell all Children that the Parent is not hidden anymore
-SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN );
-lcl_SwClientNotify(*pFormat, &aMsgItem);
+const SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN );
+pFormat->CallSwClientNotify(sw::LegacyModifyHint(&aMsgItem, 
&aMsgItem));
 
 pFormat->MakeFrames();
 }
@@ -719,8 +712,8 @@ void SwSectionFormat::DelFrames()
 SwContentNode* pCNd = GetDoc()->GetNodes().GoNextSection( &aNextNd, true, 
false );
 if( pCNd )
 {
-const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get( RES_PAGEDESC );
-lcl_SwClientNotify(*pCNd, &rItem);
+const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get(RES_PAGEDESC);
+pCNd->CallSwClientNotify(sw::LegacyModifyHint(&rItem, &rItem));
 }
 }
 
@@ -945,22 +938,19 @@ void SwSectionFormat::UpdateParent()
 bIsHidden = pPS->IsHiddenFlag();
 }
 SwIterator aIter(*this);
-for(SwSectionFormat* pLast = aIter.First(); pLast; pLast = aIter.Next())
-{
-if(!pProtect->IsContentProtected() != !pSection->IsProtectFlag())
-lcl_SwClientNotify(*static_cast(pLast), 
static_cast(pProtect));
+if(!pProtect->IsContentProtected() != !pSection->IsProtectFlag())
+CallSwClientNotify(sw::LegacyModifyHint(pProtect, pProtect));
 
-// edit in readonly sections
-if(!pEditInReadonly->GetValue() != !pSection->IsEditInReadonlyFlag())
-lcl_SwClientNotify(*static_cast(pLast), 
static_cast(pEditInReadonly));
+// edit in readonly sections
+if(!pEditInReadonly->GetValue() != !pSection->IsEditInReadonlyFlag())
+CallSwClientNotify(sw::LegacyModifyHint(pEditInReadonly, 
pEditInReadonly));
 
-if(bIsHidden == pSection->IsHiddenFlag())
-{
-SwMsgPoolItem aMsgItem( static_cast(bIsHidden
-? RES_SECTION_HIDDEN
-: RES_SECTION_NOT_HIDDEN ) );
-lcl_SwClientNotify(*static_cast(pLast), 
&aMsgItem);
-}
+if(bIsHidden == pSection->IsHiddenFlag())
+{
+SwMsgPoolItem aMsgItem(static_cast(bIsHidden
+? RES_SECTION_HIDDEN
+: RES_SECTION_NOT_HIDDEN));
+CallSwClientNotify(sw::LegacyModifyHint(&aMsgItem, &aMsgItem));
 }
 }
 
___
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-1+backports' - xmlsecurity/qa xmlsecurity/source

2021-03-31 Thread Miklos Vajna (via logerrit)
 xmlsecurity/qa/unit/signing/signing.cxx|   43 +
 xmlsecurity/source/helper/ooxmlsecexporter.cxx |   10 -
 xmlsecurity/source/helper/ooxmlsecparser.cxx   |7 
 3 files changed, 57 insertions(+), 3 deletions(-)

New commits:
commit b2582b647c4811de7df29b76aa5041e1d9fdb601
Author: Miklos Vajna 
AuthorDate: Wed Mar 31 13:58:28 2021 +0200
Commit: Michael Stahl 
CommitDate: Wed Mar 31 15:52:48 2021 +0200

xmlsecurity nss: fix OOXML signing with ECDSA key

Reviewed-on: https://gerrit.libreoffice.org/54779
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 6b1b8ef51b752f9711d6581283d6c515d3c50d9b)

Change-Id: Id2b59887fcd69e294a6d9db17ec0446615054ecc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113410
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index 5a0cad34cb85..aa793daaec32 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -73,6 +73,7 @@ public:
 
 void testDescription();
 void testECDSA();
+void testECDSAOOXML();
 /// Test a typical ODF where all streams are signed.
 void testODFGood();
 /// Test a typical broken ODF signature where one stream is corrupted.
@@ -131,6 +132,7 @@ public:
 CPPUNIT_TEST_SUITE(SigningTest);
 CPPUNIT_TEST(testDescription);
 CPPUNIT_TEST(testECDSA);
+CPPUNIT_TEST(testECDSAOOXML);
 CPPUNIT_TEST(testODFGood);
 CPPUNIT_TEST(testODFBroken);
 CPPUNIT_TEST(testODFNo);
@@ -372,6 +374,47 @@ void SigningTest::testECDSA()
 
CPPUNIT_ASSERT_EQUAL(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED,
 rInformations[0].nStatus);
 }
 
+void SigningTest::testECDSAOOXML()
+{
+// Create an empty document and store it to a tempfile, finally load it as 
a storage.
+createDoc("");
+
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("MS Word 2007 XML");
+xStorable->storeAsURL(aTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+DocumentSignatureManager aManager(mxComponentContext, 
DocumentSignatureMode::Content);
+CPPUNIT_ASSERT(aManager.init());
+uno::Reference xStorage
+= comphelper::OStorageHelper::GetStorageOfFormatFromURL(
+ZIP_STORAGE_FORMAT_STRING, aTempFile.GetURL(), 
embed::ElementModes::READWRITE);
+CPPUNIT_ASSERT(xStorage.is());
+aManager.mxStore = xStorage;
+aManager.maSignatureHelper.SetStorage(xStorage, "1.2");
+
+// Then add a document signature.
+uno::Reference xCertificate
+= getCertificate(aManager, 
svl::crypto::SignatureMethodAlgorithm::ECDSA);
+if (!xCertificate.is())
+return;
+OUString aDescription;
+sal_Int32 nSecurityId;
+aManager.add(xCertificate, mxSecurityContext, aDescription, nSecurityId,
+ /*bAdESCompliant=*/false);
+
+// Read back the signature and make sure that it's valid.
+aManager.read(/*bUseTempStream=*/true);
+std::vector& rInformations = 
aManager.maCurrentSignatureInformations;
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rInformations.size());
+// This was SecurityOperationStatus_UNKNOWN, signing with an ECDSA key was
+// broken.
+
CPPUNIT_ASSERT_EQUAL(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED,
+ rInformations[0].nStatus);
+}
+
 void SigningTest::testOOXMLDescription()
 {
 // Create an empty document and store it to a tempfile, finally load it as 
a storage.
diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx 
b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
index 942a3c0a4618..e27d0f5a06f8 100644
--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
@@ -130,9 +130,13 @@ void 
OOXMLSecExporter::Impl::writeCanonicalizationTransform()
 void OOXMLSecExporter::Impl::writeSignatureMethod()
 {
 rtl::Reference pAttributeList(new 
SvXMLAttributeList());
-pAttributeList->AddAttribute("Algorithm", ALGO_RSASHA256);
-m_xDocumentHandler->startElement(
-"SignatureMethod", 
uno::Reference(pAttributeList.get()));
+
+if (m_rInformation.eAlgorithmID == 
svl::crypto::SignatureMethodAlgorithm::ECDSA)
+pAttributeList->AddAttribute("Algorithm", ALGO_ECDSASHA256);
+else
+pAttributeList->AddAttribute("Algorithm", ALGO_RSASHA256);
+
+m_xDocumentHandler->startElement("SignatureMethod", 
uno::Reference(pAttributeList.get()));
 m_xDocumentHandler->endElement("SignatureMethod");
 }
 
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx 
b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index e329b8d35176..3a9b04fe3691 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx

GSoC 2021

2021-03-31 Thread Balázs Sántha
Dear mentors!

My name is Balázs Sántha, and I am third year student studying computer
engineering at Budapest University of Technology and Economics.

I have a good knowledge in C++ and Java, and getting familier with Python
too.
Not so long ago, I did my first commit to LibreOffice:
https://gerrit.libreoffice.org/c/core/+/111637
Right now I am working on a unit test related to this commit.

On the ideas page, I got interested in with the "Implement table styles
DOCX support" and I would like to work on that problem.
Earlier, I was working and searching solution for the slow import of
footnotes. However, I did not manage to solve it, I read and learned a lot
about how the writerfilter works.

I am not sure what is the next step, but I am ready to contact!

Yours faithfully,
Balázs Sántha
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 3 commits - include/vcl vcl/inc vcl/Library_vcl.mk vcl/qa vcl/source

2021-03-31 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 0724adb06d7313d20c0fbcf12f2cecb4ef4d4191
Author: Tomaž Vajngerl 
AuthorDate: Wed Mar 31 19:13:17 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Mar 31 22:31:47 2021 +0900

vcl: move MapMode reading adn writing to TypeSerializer

remove usage of ReadMapMode and WriteMapMode and add tests

Change-Id: I40e1da8aea5c2171d9dbb6343fbf61912e5b3367

diff --git a/include/vcl/TypeSerializer.hxx b/include/vcl/TypeSerializer.hxx
index 7be2f54198e7..e85b25b1cfe3 100644
--- a/include/vcl/TypeSerializer.hxx
+++ b/include/vcl/TypeSerializer.hxx
@@ -50,6 +50,9 @@ public:
 
 void readGraphic(Graphic& rGraphic);
 void writeGraphic(const Graphic& rGraphic);
+
+void readMapMode(MapMode& rMapMode);
+void writeMapMode(MapMode const& rMapMode);
 };
 
 #endif
diff --git a/include/vcl/mapmod.hxx b/include/vcl/mapmod.hxx
index e6c96048c90c..9af61f8b7e69 100644
--- a/include/vcl/mapmod.hxx
+++ b/include/vcl/mapmod.hxx
@@ -59,20 +59,20 @@ public:
 MapMode&operator=( MapMode&& rMapMode );
 booloperator==( const MapMode& rMapMode ) const;
 booloperator!=( const MapMode& rMapMode ) const
-{ return !(MapMode::operator==( rMapMode )); }
+{
+return !(MapMode::operator==( rMapMode ));
+}
 boolIsDefault() const;
 
-friend SvStream& ReadMapMode( SvStream& rIStm, MapMode& rMapMode );
-friend SvStream& WriteMapMode( SvStream& rOStm, const MapMode& rMapMode );
-
 // tdf#117984 needs to be thread-safe due to being used e.g. in Bitmaps
 // vcl::ScopedBitmapAccess in parallelized 3D renderer
 typedef o3tl::cow_wrapper< ImplMapMode, o3tl::ThreadSafeRefCountingPolicy 
> ImplType;
 
+// If only the map unit is set.
+bool IsSimple() const;
+
 private:
 ImplTypempImplMapMode;
-
-SAL_DLLPRIVATE bool IsSimple() const;
 };
 
 template
diff --git a/vcl/qa/cppunit/TypeSerializerTest.cxx 
b/vcl/qa/cppunit/TypeSerializerTest.cxx
index f8de4e9ce3a2..f402373e6ca3 100644
--- a/vcl/qa/cppunit/TypeSerializerTest.cxx
+++ b/vcl/qa/cppunit/TypeSerializerTest.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -67,6 +68,7 @@ private:
 void testGraphic_Bitmap_NoGfxLink();
 void testGraphic_Animation();
 void testGraphic_GDIMetaFile();
+void testMapMode();
 
 CPPUNIT_TEST_SUITE(TypeSerializerTest);
 CPPUNIT_TEST(testGradient);
@@ -74,6 +76,7 @@ private:
 CPPUNIT_TEST(testGraphic_Bitmap_NoGfxLink);
 CPPUNIT_TEST(testGraphic_Animation);
 CPPUNIT_TEST(testGraphic_GDIMetaFile);
+CPPUNIT_TEST(testMapMode);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -345,6 +348,42 @@ void TypeSerializerTest::testGraphic_GDIMetaFile()
 }
 }
 
+void TypeSerializerTest::testMapMode()
+{
+{
+MapMode aMapMode(MapUnit::Map100thMM);
+
+SvMemoryStream aStream;
+TypeSerializer aSerializer(aStream);
+aSerializer.writeMapMode(aMapMode);
+aStream.Seek(STREAM_SEEK_TO_BEGIN);
+
+MapMode aReadMapMode;
+aSerializer.readMapMode(aReadMapMode);
+CPPUNIT_ASSERT_EQUAL(MapUnit::Map100thMM, aReadMapMode.GetMapUnit());
+CPPUNIT_ASSERT_EQUAL(true, aReadMapMode.IsSimple());
+}
+{
+MapMode aMapMode(MapUnit::MapTwip, Point(5, 10), Fraction(1, 2), 
Fraction(2, 3));
+
+SvMemoryStream aStream;
+TypeSerializer aSerializer(aStream);
+aSerializer.writeMapMode(aMapMode);
+aStream.Seek(STREAM_SEEK_TO_BEGIN);
+
+MapMode aReadMapMode;
+aSerializer.readMapMode(aReadMapMode);
+CPPUNIT_ASSERT_EQUAL(MapUnit::MapTwip, aReadMapMode.GetMapUnit());
+CPPUNIT_ASSERT_EQUAL(tools::Long(5), aReadMapMode.GetOrigin().X());
+CPPUNIT_ASSERT_EQUAL(tools::Long(10), aReadMapMode.GetOrigin().Y());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), 
aReadMapMode.GetScaleX().GetNumerator());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), 
aReadMapMode.GetScaleX().GetDenominator());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), 
aReadMapMode.GetScaleY().GetNumerator());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), 
aReadMapMode.GetScaleY().GetDenominator());
+CPPUNIT_ASSERT_EQUAL(false, aReadMapMode.IsSimple());
+}
+}
+
 } // namespace
 
 CPPUNIT_TEST_SUITE_REGISTRATION(TypeSerializerTest);
diff --git a/vcl/source/filter/graphicfilter2.cxx 
b/vcl/source/filter/graphicfilter2.cxx
index 2b66d2d29395..5666497ce08f 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -1062,10 +1062,9 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, 
bool bExtendedInfo )
 if( bExtendedInfo )
 {
 MapMode aMapMode;
-
 rStm.SeekRel( 0x06 );
-ReadMapMode( rStm, aMapMode );
 TypeSerializer aSerializer(rStm);
+aSerializer.readMapMode(a

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

2021-03-31 Thread Mike Kaganski (via logerrit)
 oox/source/drawingml/textbody.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6f176c90dee0963be15ff594b7ff120233795e6a
Author: Mike Kaganski 
AuthorDate: Wed Mar 31 14:17:03 2021 +0200
Commit: Mike Kaganski 
CommitDate: Wed Mar 31 15:31:31 2021 +0200

Use isEmpty instead of comparing getLength to 0

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

diff --git a/oox/source/drawingml/textbody.cxx 
b/oox/source/drawingml/textbody.cxx
index 1abe31db984e..4c5495e6c040 100644
--- a/oox/source/drawingml/textbody.cxx
+++ b/oox/source/drawingml/textbody.cxx
@@ -87,7 +87,7 @@ bool TextBody::isEmpty() const
 if ( aRuns.size() > 1 )
 return false;
 
-return aRuns[0]->getText().getLength() <= 0;
+return aRuns[0]->getText().isEmpty();
 }
 
 OUString TextBody::toString() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - include/xmloff xmlsecurity/source

2021-03-31 Thread Michael Stahl (via logerrit)
 include/xmloff/xmlnmspe.hxx  |3 
 xmlsecurity/source/helper/ooxmlsecparser.cxx | 1473 +++
 xmlsecurity/source/helper/ooxmlsecparser.hxx |   74 -
 3 files changed, 1314 insertions(+), 236 deletions(-)

New commits:
commit 68cdf97b54b00504b24acbb00f4b967794370a6c
Author: Michael Stahl 
AuthorDate: Tue Mar 30 17:37:31 2021 +0200
Commit: Michael Stahl 
CommitDate: Wed Mar 31 14:56:36 2021 +0200

xmlsecurity: replace OOXMLSecParser implementation

This is similar to 12b15be8f4f930a04d8056b9219ac969b42a9784 and following
commits, but OOXMLSecParser has some differences to XSecParser, such as
using a ds:Manifest, and requires a couple extra namespaces.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113381
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit cc1d19f7bbaefa5fb22ebd1344112755068b93c9)

Change-Id: I56e39d9609db8fcad50ca1632ff482c1f0a30ff5

diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx
index cc97a9c5aaa4..a7505a64190d 100644
--- a/include/xmloff/xmlnmspe.hxx
+++ b/include/xmloff/xmlnmspe.hxx
@@ -145,6 +145,9 @@ const sal_uInt16 XML_NAMESPACE_DSIG =201;
 const sal_uInt16 XML_NAMESPACE_DS =  202;
 const sal_uInt16 XML_NAMESPACE_XADES132 =203;
 const sal_uInt16 XML_NAMESPACE_XADES141 =204;
+// OOXML digital signature extension namespaces, also based on xmldsig-core
+const sal_uInt16 XML_NAMESPACE_MDSSI =   205;
+const sal_uInt16 XML_NAMESPACE_MSODIGSIG =   206;
 
 #endif // INCLUDED_XMLOFF_XMLNMSPE_HXX
 
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx 
b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index a25872fc057d..42f226f57d14 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -11,32 +11,1241 @@
 #include "ooxmlsecparser.hxx"
 #include 
 #include 
+
+#include 
+#include 
+
+#include 
+
 #include 
 
-using namespace com::sun::star;
+using namespace com::sun::star;
+
+class OOXMLSecParser::Context
+{
+protected:
+friend class OOXMLSecParser;
+OOXMLSecParser & m_rParser;
+private:
+std::unique_ptr m_pOldNamespaceMap;
+
+public:
+Context(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: m_rParser(rParser)
+, m_pOldNamespaceMap(std::move(pOldNamespaceMap))
+{
+}
+
+virtual ~Context() = default;
+
+virtual void StartElement(
+css::uno::Reference const& 
/*xAttrs*/)
+{
+}
+
+virtual void EndElement()
+{
+}
+
+virtual std::unique_ptr CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/);
+
+virtual void Characters(OUString const& /*rChars*/)
+{
+}
+};
+
+// it's possible that an unsupported element has an Id attribute and a
+// ds:Reference digesting it - probably this means XSecController needs to know
+// about it. (For known elements, the Id attribute is only processed according
+// to the schema.)
+class OOXMLSecParser::UnknownContext
+: public OOXMLSecParser::Context
+{
+public:
+UnknownContext(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+{
+}
+
+virtual void StartElement(
+css::uno::Reference const& xAttrs) 
override
+{
+m_rParser.HandleIdAttr(xAttrs);
+}
+};
+
+auto OOXMLSecParser::Context::CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/)
+-> std::unique_ptr
+{
+// default: create new base context
+return std::make_unique(m_rParser, 
std::move(pOldNamespaceMap));
+}
+
+/**
+note: anything in ds:Object should be trusted *only* if there is a ds:Reference
+  to it so it is signed (exception: the xades:EncapsulatedX509Certificate).
+  ds:SignedInfo precedes all ds:Object.
+
+  There may be multiple ds:Signature for purpose of counter-signatures
+  but the way XAdES describes these, only the ds:SignatureValue element
+  would be referenced, so requiring a ds:Reference for anything in
+  ds:Object shouldn't cause issues.
+ */
+class OOXMLSecParser::ReferencedContextImpl
+: public OOXMLSecParser::Context
+{
+protected:
+bool m_isReferenced;
+
+public:
+ReferencedContextImpl(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap,
+bool const isReferenced)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+, m_isReferenced(isReferenced)
+{
+}
+
+OUString 
CheckIdAttrReferenced(css::uno::Reference const& 
xAttrs)
+{
+

[Libreoffice-commits] core.git: include/xmloff xmloff/inc xmloff/Library_xo.mk xmloff/qa xmloff/source

2021-03-31 Thread Miklos Vajna (via logerrit)
 include/xmloff/xmltypes.hxx |1 
 xmloff/Library_xo.mk|1 
 xmloff/inc/PageMasterStyleMap.hxx   |2 
 xmloff/inc/XMLRtlGutterPropertyHandler.hxx  |   39 +++
 xmloff/qa/unit/data/rtl-gutter.fodt |   16 ++
 xmloff/qa/unit/style.cxx|   24 +
 xmloff/source/style/PageMasterPropHdlFactory.cxx|4 +
 xmloff/source/style/PageMasterStyleMap.cxx  |3 -
 xmloff/source/style/XMLRtlGutterPropertyHandler.cxx |   51 
 9 files changed, 140 insertions(+), 1 deletion(-)

New commits:
commit fac65bb9d831a854298d6cba09ad6159d15b8323
Author: Miklos Vajna 
AuthorDate: Wed Mar 31 13:59:38 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 14:56:49 2021 +0200

tdf#140343 sw page rtl gutter margin: add ODF import

See , the proposal is
to not map this to a new attribute of the 
XML element, rather only write writing mode on export and infer
RtlGutter from that writing mode in import.

This is similar to how FillBitmapOffsetX and FillBitmapOffsetY are two
UNO properties, but there is a single draw:tile-repeat-offset attribute
for them.

This has the benefit of simpler ODF markup, at the cost of more
complicated xmloff code.

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

diff --git a/include/xmloff/xmltypes.hxx b/include/xmloff/xmltypes.hxx
index 38c4b61a1085..625e3a5b9c68 100644
--- a/include/xmloff/xmltypes.hxx
+++ b/include/xmloff/xmltypes.hxx
@@ -292,6 +292,7 @@
 #define XML_TYPE_TEXT_RUBY_IS_ABOVE (XML_TEXT_TYPES_START + 126)
 #define XML_TYPE_GRAPHIC(XML_TEXT_TYPES_START + 127)
 #define XML_SW_TYPE_PRESPAGE_BACKSIZE   (XML_TEXT_TYPES_START + 128)
+#define XML_SW_TYPE_RTLGUTTER   (XML_TEXT_TYPES_START + 129)
 
 #endif // INCLUDED_XMLOFF_XMLTYPES_HXX
 
diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk
index 175bb834e37d..b33455b3c464 100644
--- a/xmloff/Library_xo.mk
+++ b/xmloff/Library_xo.mk
@@ -221,6 +221,7 @@ $(eval $(call gb_Library_add_exception_objects,xo,\
 xmloff/source/style/XMLBackgroundImageExport \
 xmloff/source/style/XMLBitmapLogicalSizePropertyHandler \
 xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler \
+xmloff/source/style/XMLRtlGutterPropertyHandler \
 xmloff/source/style/XMLClipPropertyHandler \
 xmloff/source/style/XMLConstantsPropertyHandler \
 xmloff/source/style/XMLElementPropertyContext \
diff --git a/xmloff/inc/PageMasterStyleMap.hxx 
b/xmloff/inc/PageMasterStyleMap.hxx
index a52b2e3aeb59..97f32ecae002 100644
--- a/xmloff/inc/PageMasterStyleMap.hxx
+++ b/xmloff/inc/PageMasterStyleMap.hxx
@@ -79,6 +79,8 @@
 #define CTF_PM_MARGINBOTTOM (XML_PM_CTF_START + 0x001C)
 #define CTF_PM_MARGINLEFT   (XML_PM_CTF_START + 0x001D)
 #define CTF_PM_MARGINRIGHT  (XML_PM_CTF_START + 0x001E)
+#define CTF_PM_WRITINGMODE  (XML_PM_CTF_START + 0x001F)
+#define CTF_PM_RTLGUTTER(XML_PM_CTF_START + 0x0020)
 
 #define CTF_PM_PAGEUSAGE(XML_PM_CTF_START + 0x0031)
 #define CTF_PM_GRAPHICPOSITION  (XML_PM_CTF_START + 0x0032)
diff --git a/xmloff/inc/XMLRtlGutterPropertyHandler.hxx 
b/xmloff/inc/XMLRtlGutterPropertyHandler.hxx
new file mode 100644
index ..513320e154bc
--- /dev/null
+++ b/xmloff/inc/XMLRtlGutterPropertyHandler.hxx
@@ -0,0 +1,39 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+
+/// Maps  to RtlGutter.
+class XMLRtlGutterPropertyHandler final : public XMLPropertyHandler
+{
+public:
+XMLRtlGutterPropertyHandler();
+
+~XMLRtlGutterPropertyHandler() override;
+
+bool importXML(const OUString& rStrImpValue, css::uno::Any& rValue,
+   const SvXMLUnitConverter& rUnitConverter) const override;
+
+bool exportXML(

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

2021-03-31 Thread Mike Kaganski (via logerrit)
 vcl/qa/cppunit/complextext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cf45c0f1826d93005826c71cd9baea504a4d9d6f
Author: Mike Kaganski 
AuthorDate: Wed Mar 31 09:43:01 2021 +0300
Commit: Xisco Fauli 
CommitDate: Wed Mar 31 14:56:02 2021 +0200

Fix the test in Windows RDP sessions

Without the fix, this is failing there with

  Test name: VclComplexTextTest::testArabic
  equality assertion failed
  - Expected: 71x14@(0,1)
  - Actual  : 70x14@(1,1)

See also commit 6f995da5a652d993ab253b3363188cd18e289728, that
tried to address the same issue (it was reverted later in commit
53539ce999cfe97378671a7186e38c32bdfc).

Change-Id: I708c22deb5f1f8a59e2e22cba14b298acaa81d5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113396
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113357
Reviewed-by: Michael Stahl 

diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index ad8f645b3b6f..4d4c112638e4 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -91,7 +91,7 @@ void VclComplexTextTest::testArabic()
 CPPUNIT_ASSERT_EQUAL(tools::Long(14), pOutDev->GetTextHeight());
 
 // exact bounding rectangle, not essentially the same as text width/height
-tools::Rectangle aBoundRect, aTestRect( 0, 1, 71, 15 );
+tools::Rectangle aBoundRect, aTestRect(isWindowsRDP() ? 1 : 0, 1, 71, 15);
 pOutDev->GetTextBoundRect(aBoundRect, aOneTwoThree);
 CPPUNIT_ASSERT_EQUAL(aTestRect, aBoundRect);
 
___
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' - include/unotest sw/qa unotest/source vcl/qa

2021-03-31 Thread Mike Kaganski (via logerrit)
 include/unotest/bootstrapfixturebase.hxx |1 
 sw/qa/extras/uiwriter/uiwriter3.cxx  |2 
 unotest/source/cpp/bootstrapfixturebase.cxx  |   13 +++
 vcl/qa/cppunit/BackendTest.cxx   |   88 +++
 vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx |2 
 5 files changed, 106 insertions(+)

New commits:
commit dd473f1d82f2533530534e22072a9cb976b01a4d
Author: Mike Kaganski 
AuthorDate: Tue Mar 30 18:36:08 2021 +0300
Commit: Xisco Fauli 
CommitDate: Wed Mar 31 14:55:46 2021 +0200

Exclude some tests in Windows RDP session

It seems that RDP may change (limit?) color space (even configured
to use 32-bit colors), and then some tests start failing like this:

  Test name: BackendTest::testDrawAlphaBitmapMirrored
  equality assertion failed
  - Expected: c[8000]
  - Actual  : c[8400]

Debugging ImplDrawBitmap in vcl/win/gdi/gdiimpl.cxx, and adding a
call to GetPixel immediately after the call to StretchDIBits, shows
that the resulting color on the device is different from the color
in the bitmap data: e.g., for original color {128, 0, 0} the result
is {132, 0, 0}.

Calling GetColorAdjustment shows that there's no color adjustments
set for the device, so I can't detect or modify the behavior this
way. So just disable the tests for now when running in RDP sessions.

Change-Id: Ie89d07f18f53e56bed6f7fa58432b8575b4d9f12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113388
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113355
Tested-by: Mike Kaganski 
(cherry picked from commit 95b51c5792a8d71b079eac42d6439abaa15e44e8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113403
Reviewed-by: Michael Stahl 

diff --git a/include/unotest/bootstrapfixturebase.hxx 
b/include/unotest/bootstrapfixturebase.hxx
index 85f270b02c2c..ac0e1166f8a6 100644
--- a/include/unotest/bootstrapfixturebase.hxx
+++ b/include/unotest/bootstrapfixturebase.hxx
@@ -66,6 +66,7 @@ public:
   virtual void setUp() override;
   virtual void tearDown() override;
 
+  bool isWindowsRDP() const;
 };
 
 }
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index e0623c817a91..f0444d3f3c7a 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -2099,6 +2099,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf135661)
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf133477)
 {
+if (isWindowsRDP())
+return;
 load(DATA_DIRECTORY, "tdf133477.fodt");
 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx 
b/unotest/source/cpp/bootstrapfixturebase.cxx
index 5c5b3bcc3a9c..5eb5b91dcaf0 100644
--- a/unotest/source/cpp/bootstrapfixturebase.cxx
+++ b/unotest/source/cpp/bootstrapfixturebase.cxx
@@ -13,6 +13,10 @@
 #include 
 #include 
 
+#if defined _WIN32
+#include 
+#endif
+
 using namespace ::com::sun::star;
 
 // NB. this constructor is called before any tests are run, once for each
@@ -32,4 +36,13 @@ void test::BootstrapFixtureBase::setUp()
 
 void test::BootstrapFixtureBase::tearDown() { 
StarBASIC::DetachAllDocBasicItems(); }
 
+bool test::BootstrapFixtureBase::isWindowsRDP() const
+{
+#if defined _WIN32
+return GetSystemMetrics(SM_REMOTESESSION);
+#else
+return false;
+#endif
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index 29d7268445e1..0f34dc65ecc1 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -95,6 +95,8 @@ public:
 
 void testDrawRectWithRectangle()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestRect aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -106,6 +108,8 @@ public:
 
 void testDrawRectWithPixel()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestPixel aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -117,6 +121,8 @@ public:
 
 void testDrawRectWithLine()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestLine aOutDevTest;
 Bitmap aBitmap = aOutDevTest.setupRectangle(false);
 auto eResult = 
vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
@@ -128,6 +134,8 @@ public:
 
 void testDrawRectWithPolygon()
 {
+if (isWindowsRDP())
+return;
 vcl::test::OutputDeviceTestPolygon aOutDevTest;

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

2021-03-31 Thread Michael Stahl (via logerrit)
 include/xmloff/xmlnmspe.hxx  |3 
 xmlsecurity/source/helper/ooxmlsecparser.cxx | 1473 +++
 xmlsecurity/source/helper/ooxmlsecparser.hxx |   74 -
 3 files changed, 1314 insertions(+), 236 deletions(-)

New commits:
commit cfb4cb733d6583f18d77c690e670076312beab1e
Author: Michael Stahl 
AuthorDate: Tue Mar 30 17:37:31 2021 +0200
Commit: Michael Stahl 
CommitDate: Wed Mar 31 14:54:34 2021 +0200

xmlsecurity: replace OOXMLSecParser implementation

This is similar to 12b15be8f4f930a04d8056b9219ac969b42a9784 and following
commits, but OOXMLSecParser has some differences to XSecParser, such as
using a ds:Manifest, and requires a couple extra namespaces.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113381
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit cc1d19f7bbaefa5fb22ebd1344112755068b93c9)

Change-Id: I56e39d9609db8fcad50ca1632ff482c1f0a30ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113409
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx
index cc97a9c5aaa4..a7505a64190d 100644
--- a/include/xmloff/xmlnmspe.hxx
+++ b/include/xmloff/xmlnmspe.hxx
@@ -145,6 +145,9 @@ const sal_uInt16 XML_NAMESPACE_DSIG =201;
 const sal_uInt16 XML_NAMESPACE_DS =  202;
 const sal_uInt16 XML_NAMESPACE_XADES132 =203;
 const sal_uInt16 XML_NAMESPACE_XADES141 =204;
+// OOXML digital signature extension namespaces, also based on xmldsig-core
+const sal_uInt16 XML_NAMESPACE_MDSSI =   205;
+const sal_uInt16 XML_NAMESPACE_MSODIGSIG =   206;
 
 #endif // INCLUDED_XMLOFF_XMLNMSPE_HXX
 
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx 
b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index a25872fc057d..42f226f57d14 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -11,32 +11,1241 @@
 #include "ooxmlsecparser.hxx"
 #include 
 #include 
+
+#include 
+#include 
+
+#include 
+
 #include 
 
-using namespace com::sun::star;
+using namespace com::sun::star;
+
+class OOXMLSecParser::Context
+{
+protected:
+friend class OOXMLSecParser;
+OOXMLSecParser & m_rParser;
+private:
+std::unique_ptr m_pOldNamespaceMap;
+
+public:
+Context(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: m_rParser(rParser)
+, m_pOldNamespaceMap(std::move(pOldNamespaceMap))
+{
+}
+
+virtual ~Context() = default;
+
+virtual void StartElement(
+css::uno::Reference const& 
/*xAttrs*/)
+{
+}
+
+virtual void EndElement()
+{
+}
+
+virtual std::unique_ptr CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/);
+
+virtual void Characters(OUString const& /*rChars*/)
+{
+}
+};
+
+// it's possible that an unsupported element has an Id attribute and a
+// ds:Reference digesting it - probably this means XSecController needs to know
+// about it. (For known elements, the Id attribute is only processed according
+// to the schema.)
+class OOXMLSecParser::UnknownContext
+: public OOXMLSecParser::Context
+{
+public:
+UnknownContext(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+{
+}
+
+virtual void StartElement(
+css::uno::Reference const& xAttrs) 
override
+{
+m_rParser.HandleIdAttr(xAttrs);
+}
+};
+
+auto OOXMLSecParser::Context::CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/)
+-> std::unique_ptr
+{
+// default: create new base context
+return std::make_unique(m_rParser, 
std::move(pOldNamespaceMap));
+}
+
+/**
+note: anything in ds:Object should be trusted *only* if there is a ds:Reference
+  to it so it is signed (exception: the xades:EncapsulatedX509Certificate).
+  ds:SignedInfo precedes all ds:Object.
+
+  There may be multiple ds:Signature for purpose of counter-signatures
+  but the way XAdES describes these, only the ds:SignatureValue element
+  would be referenced, so requiring a ds:Reference for anything in
+  ds:Object shouldn't cause issues.
+ */
+class OOXMLSecParser::ReferencedContextImpl
+: public OOXMLSecParser::Context
+{
+protected:
+bool m_isReferenced;
+
+public:
+ReferencedContextImpl(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap,
+bool const isReferenced)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+, m_isReferenced(isRef

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

2021-03-31 Thread Attila Bakos (NISZ) (via logerrit)
 sw/inc/pagedesc.hxx   |6 +
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx|5 -
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx|3 
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx  |6 -
 sw/qa/extras/uiwriter/uiwriter.cxx|4 
 sw/qa/uitest/data/TestHiddenHeadersFooters.docx   |binary
 sw/qa/uitest/writer_tests7/tdf141158.py   |   47 ++
 sw/source/core/doc/docdesc.cxx|   30 +-
 sw/source/core/doc/docfmt.cxx |   11 ++
 sw/source/core/layout/pagedesc.cxx|   96 --
 sw/source/core/unocore/unostyle.cxx   |   32 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   24 +
 12 files changed, 247 insertions(+), 17 deletions(-)

New commits:
commit b802ab694a8a7357d4657f3e11b571144fa7c7bf
Author: Attila Bakos (NISZ) 
AuthorDate: Fri Mar 12 14:33:08 2021 +0100
Commit: László Németh 
CommitDate: Wed Mar 31 14:44:27 2021 +0200

tdf#141158 DOCX: import discarded headers/footers

Before the inactive DOCX headers/footers lost during
import time. Now it can be restored by disabling
the options “Same content on left and right pages” and
“Same content on first page” on the Header and the
Footer panes of the Page style. This is for improving
the interoperability with other Office programs, e.g.
supporting DOCX text document templates better.

Follow-up of commit f5dc6b11d2218d94c9effe7a1ab418d0133da5e3
(tdf#140117 sw UI: keep headers/footers when inactive).

To start the py-UItest run:

$ make UITest_writer_tests7 
UITEST_TEST_NAME="tdf141158.TestTdf141158.test_tdf141158"

Note: In spite of this patch implements the
left/first/first_left page header/footer stash
at import time, the left one works correctly at now.
This is because the first pages have different
page styles so changing the right page style will
restore the hidden header/footer content.
For this problem further improvements are planned,
exactly in the filter part. Number of unit tests
had to be modified, because before these headers
and footers were dropped.

Co-developed-with: Daniel Arato (NISZ)

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

diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 0d29eb0ca6e3..4178361349d6 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -223,6 +223,12 @@ public:
 /// Used to restore hidden header/footer formats.
 const SwFrameFormat* GetStashedFrameFormat(bool bHeader, bool bLeft, bool 
bFirst) const;
 
+/// Checks if the pagedescriptor has a stashed format according to the 
parameters or not.
+bool HasStashedFormat(bool bHeader, bool bLeft, bool bFirst);
+
+/// Gives the feature of removing the stashed format by hand if it is 
neccessarry.
+void RemoveStashedFormat(bool bHeader, bool bLeft, bool bFirst);
+
 /// Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is 
not modified.
 inline void  SetUseOn( UseOnPage eNew );
 inline UseOnPage GetUseOn() const;
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index c33f99cb4322..ba6a6a6a98e2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -688,7 +688,9 @@ DECLARE_OOXMLEXPORT_TEST(testBnc875718, "bnc875718.docx")
 // is not SwXBodyText but rather SwXHeadFootText
 uno::Reference xTextFramesSupplier(mxComponent, 
uno::UNO_QUERY);
 uno::Reference 
xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
-for( int i = 0;
+// The sample bugdoc has 3 footer.xml and has a textframe in each. The 
first one is hidden
+// and it has no text in its anchored text range: it is anchored to body 
text. Ignoring...
+for( int i = 1;
  i < xIndexAccess->getCount();
  ++i )
 {
@@ -700,6 +702,7 @@ DECLARE_OOXMLEXPORT_TEST(testBnc875718, "bnc875718.docx")
 // Also check that the footer contents are not in the body text.
 uno::Reference textDocument(mxComponent, 
uno::UNO_QUERY);
 uno::Reference text = textDocument->getText();
+CPPUNIT_ASSERT(text); //Do not crash on empty content
 CPPUNIT_ASSERT_EQUAL( OUString( "Text" ), text->getString());
 }
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index cd3ca2f39e46..951a4d8650f2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -670,7 +670,8 @@ 
DECLARE_OOXMLEXPORT_TEST(testTdf130167_spilloverHeaderShape, "testTdf130167_spil
 uno::Reference xNameAccess(
 xTextGraphicObjectsSupplier->getGraphicObjects(), uno::UNO_QUERY);
 

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

2021-03-31 Thread Pranam Lashkari (via logerrit)
 sd/source/ui/unoidl/unomodel.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 3c49a3be592eb515bba100b4a17617136fabbcba
Author: Pranam Lashkari 
AuthorDate: Tue Mar 30 21:52:13 2021 +0530
Commit: Pranam Lashkari 
CommitDate: Wed Mar 31 14:38:06 2021 +0200

LOK: getPartInfo now returns master page count

master page count will be used when switching to master view
to know how many slide previews to be shown

Change-Id: I11735797d16538a9f667a85b90a86b1e6cf9b5aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113358
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari 

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 62df5ec84a62..c8812900cb93 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2274,11 +2274,14 @@ OUString SdXImpressDocument::getPartInfo(int nPart)
 
 const bool bIsVisible = pViewSh->IsVisible(nPart);
 const bool bIsSelected = pViewSh->IsSelected(nPart);
+const sal_Int16 nMasterPageCount= 
pViewSh->GetDoc()->GetMasterSdPageCount(pViewSh->GetPageKind());
 
 OUString aPartInfo = "{ \"visible\": \"" +
 OUString::number(static_cast(bIsVisible)) +
 "\", \"selected\": \"" +
 OUString::number(static_cast(bIsSelected)) +
+"\", \"masterPageCount\": \"" +
+OUString::number(nMasterPageCount) +
 "\" }";
 return aPartInfo;
 }
___
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' - include/xmloff xmlsecurity/source

2021-03-31 Thread Michael Stahl (via logerrit)
 include/xmloff/xmlnamespace.hxx  |3 
 xmlsecurity/source/helper/ooxmlsecparser.cxx | 1473 +++
 xmlsecurity/source/helper/ooxmlsecparser.hxx |   74 -
 3 files changed, 1314 insertions(+), 236 deletions(-)

New commits:
commit 542146ef51d21ef9d5eae64c1820a80b8b41fcad
Author: Michael Stahl 
AuthorDate: Tue Mar 30 17:37:31 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 14:13:21 2021 +0200

xmlsecurity: replace OOXMLSecParser implementation

This is similar to 12b15be8f4f930a04d8056b9219ac969b42a9784 and following
commits, but OOXMLSecParser has some differences to XSecParser, such as
using a ds:Manifest, and requires a couple extra namespaces.

Change-Id: I56e39d9609db8fcad50ca1632ff482c1f0a30ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113381
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit cc1d19f7bbaefa5fb22ebd1344112755068b93c9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113359

diff --git a/include/xmloff/xmlnamespace.hxx b/include/xmloff/xmlnamespace.hxx
index cabdcc7578e2..91ff2aae4cf3 100644
--- a/include/xmloff/xmlnamespace.hxx
+++ b/include/xmloff/xmlnamespace.hxx
@@ -76,6 +76,9 @@ constexpr sal_uInt16 XML_NAMESPACE_DSIG =39;
 constexpr sal_uInt16 XML_NAMESPACE_DS =  40;
 constexpr sal_uInt16 XML_NAMESPACE_XADES132 =41;
 constexpr sal_uInt16 XML_NAMESPACE_XADES141 =42;
+// OOXML digital signature extension namespaces, also based on xmldsig-core
+constexpr sal_uInt16 XML_NAMESPACE_MDSSI =   43;
+constexpr sal_uInt16 XML_NAMESPACE_MSODIGSIG =   44;
 
 // namespaces for ODF extended formats
 constexpr sal_uInt16 XML_NAMESPACE_EXT_BASE   = 50;
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx 
b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index a25872fc057d..149e323eb8f6 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -11,32 +11,1241 @@
 #include "ooxmlsecparser.hxx"
 #include 
 #include 
+
+#include 
+#include 
+
+#include 
+
 #include 
 
-using namespace com::sun::star;
+using namespace com::sun::star;
+
+class OOXMLSecParser::Context
+{
+protected:
+friend class OOXMLSecParser;
+OOXMLSecParser & m_rParser;
+private:
+std::unique_ptr m_pOldNamespaceMap;
+
+public:
+Context(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: m_rParser(rParser)
+, m_pOldNamespaceMap(std::move(pOldNamespaceMap))
+{
+}
+
+virtual ~Context() = default;
+
+virtual void StartElement(
+css::uno::Reference const& 
/*xAttrs*/)
+{
+}
+
+virtual void EndElement()
+{
+}
+
+virtual std::unique_ptr CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/);
+
+virtual void Characters(OUString const& /*rChars*/)
+{
+}
+};
+
+// it's possible that an unsupported element has an Id attribute and a
+// ds:Reference digesting it - probably this means XSecController needs to know
+// about it. (For known elements, the Id attribute is only processed according
+// to the schema.)
+class OOXMLSecParser::UnknownContext
+: public OOXMLSecParser::Context
+{
+public:
+UnknownContext(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+{
+}
+
+virtual void StartElement(
+css::uno::Reference const& xAttrs) 
override
+{
+m_rParser.HandleIdAttr(xAttrs);
+}
+};
+
+auto OOXMLSecParser::Context::CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/)
+-> std::unique_ptr
+{
+// default: create new base context
+return std::make_unique(m_rParser, 
std::move(pOldNamespaceMap));
+}
+
+/**
+note: anything in ds:Object should be trusted *only* if there is a ds:Reference
+  to it so it is signed (exception: the xades:EncapsulatedX509Certificate).
+  ds:SignedInfo precedes all ds:Object.
+
+  There may be multiple ds:Signature for purpose of counter-signatures
+  but the way XAdES describes these, only the ds:SignatureValue element
+  would be referenced, so requiring a ds:Reference for anything in
+  ds:Object shouldn't cause issues.
+ */
+class OOXMLSecParser::ReferencedContextImpl
+: public OOXMLSecParser::Context
+{
+protected:
+bool m_isReferenced;
+
+public:
+ReferencedContextImpl(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap,
+bool const isReferenced)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+, m_isR

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

2021-03-31 Thread Mike Kaganski (via logerrit)
 writerfilter/source/rtftok/rtfcontrolwords.cxx| 3740 +-
 writerfilter/source/rtftok/rtfcontrolwords.hxx| 3656 -
 writerfilter/source/rtftok/rtfdispatchdestination.cxx |  242 -
 writerfilter/source/rtftok/rtfdispatchflag.cxx|  475 +-
 writerfilter/source/rtftok/rtfdispatchsymbol.cxx  |   80 
 writerfilter/source/rtftok/rtfdispatchvalue.cxx   |  426 +-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx|  113 
 writerfilter/source/rtftok/rtflookahead.cxx   |4 
 writerfilter/source/rtftok/rtftokenizer.cxx   |   10 
 9 files changed, 4373 insertions(+), 4373 deletions(-)

New commits:
commit 910fb8999de2622cbbb63083777cf889bd798889
Author: Mike Kaganski 
AuthorDate: Wed Mar 31 13:41:47 2021 +0300
Commit: Mike Kaganski 
CommitDate: Wed Mar 31 13:58:37 2021 +0200

Make RTFKeyword and RTFControlType scoped enums

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

diff --git a/writerfilter/source/rtftok/rtfcontrolwords.cxx 
b/writerfilter/source/rtftok/rtfcontrolwords.cxx
index 38bc9d6dd442..3f5a0827bae4 100644
--- a/writerfilter/source/rtftok/rtfcontrolwords.cxx
+++ b/writerfilter/source/rtftok/rtfcontrolwords.cxx
@@ -14,1881 +14,1881 @@ namespace writerfilter::rtftok
 {
 RTFSymbol const aRTFControlWords[] = {
 // sKeyword nControlType nIndex
-{ "'", CONTROL_SYMBOL, RTF_HEXCHAR, 0 },
-{ "-", CONTROL_SYMBOL, RTF_OPTHYPH, 0 },
-{ "*", CONTROL_SYMBOL, RTF_IGNORE, 0 },
-{ ":", CONTROL_SYMBOL, RTF_SUBENTRY, 0 },
-{ "\\", CONTROL_SYMBOL, RTF_BACKSLASH, 0 },
-{ "\n", CONTROL_SYMBOL, RTF_PAR, 0 },
-{ "\r", CONTROL_SYMBOL, RTF_PAR, 0 },
-{ "\r\n", CONTROL_SYMBOL, RTF_PAR, 0 },
-{ "_", CONTROL_SYMBOL, RTF_NOBRKHYPH, 0 },
-{ "{", CONTROL_SYMBOL, RTF_LBRACE, 0 },
-{ "|", CONTROL_SYMBOL, RTF_FORMULA, 0 },
-{ "}", CONTROL_SYMBOL, RTF_RBRACE, 0 },
-{ "~", CONTROL_SYMBOL, RTF_NOBREAK, 0 },
-{ "ab", CONTROL_TOGGLE, RTF_AB, 1 },
-{ "absh", CONTROL_VALUE, RTF_ABSH, 0 },
-{ "abslock", CONTROL_FLAG, RTF_ABSLOCK, 0 },
-{ "absnoovrlp", CONTROL_TOGGLE, RTF_ABSNOOVRLP, 1 },
-{ "absw", CONTROL_VALUE, RTF_ABSW, 0 },
-{ "acaps", CONTROL_TOGGLE, RTF_ACAPS, 1 },
-{ "acccircle", CONTROL_TOGGLE, RTF_ACCCIRCLE, 1 },
-{ "acccomma", CONTROL_TOGGLE, RTF_ACCCOMMA, 1 },
-{ "accdot", CONTROL_TOGGLE, RTF_ACCDOT, 1 },
-{ "accnone", CONTROL_TOGGLE, RTF_ACCNONE, 1 },
-{ "accunderdot", CONTROL_TOGGLE, RTF_ACCUNDERDOT, 1 },
-{ "acf", CONTROL_VALUE, RTF_ACF, 0 },
-{ "adeff", CONTROL_VALUE, RTF_ADEFF, 0 },
-{ "additive", CONTROL_FLAG, RTF_ADDITIVE, 0 },
-{ "adeflang", CONTROL_VALUE, RTF_ADEFLANG, 0 },
-{ "adjustright", CONTROL_FLAG, RTF_ADJUSTRIGHT, 0 },
-{ "adn", CONTROL_VALUE, RTF_ADN, 6 },
-{ "aenddoc", CONTROL_FLAG, RTF_AENDDOC, 0 },
-{ "aendnotes", CONTROL_FLAG, RTF_AENDNOTES, 0 },
-{ "aexpnd", CONTROL_VALUE, RTF_AEXPND, 0 },
-{ "af", CONTROL_VALUE, RTF_AF, 0 },
-{ "afelev", CONTROL_FLAG, RTF_AFELEV, 0 },
-{ "afs", CONTROL_VALUE, RTF_AFS, 24 },
-{ "aftnbj", CONTROL_FLAG, RTF_AFTNBJ, 0 },
-{ "aftncn", CONTROL_DESTINATION, RTF_AFTNCN, 0 },
-{ "aftnnalc", CONTROL_FLAG, RTF_AFTNNALC, 0 },
-{ "aftnnar", CONTROL_FLAG, RTF_AFTNNAR, 0 },
-{ "aftnnauc", CONTROL_FLAG, RTF_AFTNNAUC, 0 },
-{ "aftnnchi", CONTROL_FLAG, RTF_AFTNNCHI, 0 },
-{ "aftnnchosung", CONTROL_FLAG, RTF_AFTNNCHOSUNG, 0 },
-{ "aftnncnum", CONTROL_FLAG, RTF_AFTNNCNUM, 0 },
-{ "aftnndbar", CONTROL_FLAG, RTF_AFTNNDBAR, 0 },
-{ "aftnndbnum", CONTROL_FLAG, RTF_AFTNNDBNUM, 0 },
-{ "aftnndbnumd", CONTROL_FLAG, RTF_AFTNNDBNUMD, 0 },
-{ "aftnndbnumk", CONTROL_FLAG, RTF_AFTNNDBNUMK, 0 },
-{ "aftnndbnumt", CONTROL_FLAG, RTF_AFTNNDBNUMT, 0 },
-{ "aftnnganada", CONTROL_FLAG, RTF_AFTNNGANADA, 0 },
-{ "aftnngbnum", CONTROL_FLAG, RTF_AFTNNGBNUM, 0 },
-{ "aftnngbnumd", CONTROL_FLAG, RTF_AFTNNGBNUMD, 0 },
-{ "aftnngbnumk", CONTROL_FLAG, RTF_AFTNNGBNUMK, 0 },
-{ "aftnngbnuml", CONTROL_FLAG, RTF_AFTNNGBNUML, 0 },
-{ "aftnnrlc", CONTROL_FLAG, RTF_AFTNNRLC, 0 },
-{ "aftnnruc", CONTROL_FLAG, RTF_AFTNNRUC, 0 },
-{ "aftnnzodiac", CONTROL_FLAG, RTF_AFTNNZODIAC, 0 },
-{ "aftnnzodiacd", CONTROL_FLAG, RTF_AFTNNZODIACD, 0 },
-{ "aftnnzodiacl", CONTROL_FLAG, RTF_AFTNNZODIACL, 0 },
-{ "aftnrestart", CONTROL_FLAG, RTF_AFTNRESTART, 0 },
-{ "aftnrstcont", CONTROL_FLAG, RTF_AFTNRSTCONT, 0 },
-{ "aftnsep", CONTROL_DESTINATION, RTF_AFTNSEP, 0 },
-{ "aftnsepc", CONTROL_DESTINATION, RTF_AFTNSEPC, 0 },
-{ "aftnstart", CONTROL_VALUE, RTF_AFTNSTART, 1 },
-{ "aftntj", CONTROL_FLAG, RTF_AFTNTJ, 0 },
-{ "ai", CONTROL_TOGGLE, RTF_AI, 1 },
-{ "alang", CONTROL_VALUE, RTF_ALANG, 0 },
-{ "allowfieldendsel", CONTROL_FLAG, RTF_ALLOWFIELDENDSEL, 0 },
-  

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

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

New commits:
commit bec78a8a3f2f6a8abdd69550f1e727bbc45afe8c
Author: Andras Timar 
AuthorDate: Wed Mar 31 11:36:01 2021 +0200
Commit: Andras Timar 
CommitDate: Wed Mar 31 11:36:01 2021 +0200

Bump version to 6.4-33

Change-Id: I61d80548a3630cfbfd07ab5d23eaeeeb57b4d8ee

diff --git a/configure.ac b/configure.ac
index ca20f45cd6bf..0c2e49f146ff 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],[6.4.10.32],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[6.4.10.33],[],[],[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: Changes to 'refs/tags/co-6.4-33'

2021-03-31 Thread Andras Timar (via logerrit)
Tag 'co-6.4-33' created by Andras Timar  at 
2021-03-31 10:39 +

co-6.4-33

Changes since cp-6.4-32-15:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/co-6.4-33'

2021-03-31 Thread Andras Timar (via logerrit)
Tag 'co-6.4-33' created by Andras Timar  at 
2021-03-31 10:39 +

co-6.4-33

Changes since cp-6.4-23:
Andras Timar (1):
  Translation update

---
 source/ar/cui/messages.po  |  130 
 source/ar/dictionaries/da_DK.po|   24 
 source/ar/officecfg/registry/data/org/openoffice/Office/UI.po  |   24 
 source/ar/svtools/messages.po  |   44 
 source/ar/svx/messages.po  |  502 -
 source/ar/sw/messages.po   |  405 
 source/as/cui/messages.po  |  106 
 source/as/dictionaries/da_DK.po|   18 
 source/as/officecfg/registry/data/org/openoffice/Office/UI.po  |   12 
 source/as/svtools/messages.po  |   42 
 source/as/svx/messages.po  |  472 
 source/as/sw/messages.po   |  385 
 source/ast/cui/messages.po |  108 
 source/ast/dictionaries/da_DK.po   |   18 
 source/ast/officecfg/registry/data/org/openoffice/Office/UI.po |   18 
 source/ast/svtools/messages.po |   42 
 source/ast/svx/messages.po |  485 -
 source/ast/sw/messages.po  |  387 
 source/bg/cui/messages.po  |  106 
 source/bg/dictionaries/da_DK.po|   24 
 source/bg/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/bg/svtools/messages.po  |   42 
 source/bg/svx/messages.po  |  465 
 source/bg/sw/messages.po   |  385 
 source/bn-IN/cui/messages.po   |  106 
 source/bn-IN/dictionaries/da_DK.po |   18 
 source/bn-IN/officecfg/registry/data/org/openoffice/Office/UI.po   |   12 
 source/bn-IN/svtools/messages.po   |   42 
 source/bn-IN/svx/messages.po   |  482 
 source/bn-IN/sw/messages.po|  386 
 source/br/cui/messages.po  |  106 
 source/br/dictionaries/da_DK.po|   18 
 source/br/officecfg/registry/data/org/openoffice/Office/UI.po  |   12 
 source/br/svtools/messages.po  |   42 
 source/br/svx/messages.po  |  487 -
 source/br/sw/messages.po   |  385 
 source/ca-valencia/cui/messages.po |  106 
 source/ca-valencia/dictionaries/da_DK.po   |   18 
 source/ca-valencia/officecfg/registry/data/org/openoffice/Office/UI.po |   12 
 source/ca-valencia/svtools/messages.po |   42 
 source/ca-valencia/svx/messages.po |  471 
 source/ca-valencia/sw/messages.po  |  385 
 source/ca/cui/messages.po  |  106 
 source/ca/dictionaries/da_DK.po|   24 
 source/ca/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/ca/svtools/messages.po  |   42 
 source/ca/svx/messages.po  |  471 
 source/ca/sw/messages.po   |  385 
 source/cs/cui/messages.po  |  106 
 source/cs/dictionaries/da_DK.po|   24 
 source/cs/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/cs/svtools/messages.po  |   42 
 source/cs/svx/messages.po  |  465 
 source/cs/sw/messages.po   |  385 
 source/cy/cui/messages.po  |  106 
 source/cy/dictionaries/da_DK.po|   24 
 source/cy/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/cy/svtools/messages.po  |   42 
 source/cy/svx/messages.po  |  467 
 source/cy/sw/messages.po   |  385 
 source/da/cui/messages.po 

[Libreoffice-commits] help.git: Changes to 'refs/tags/co-6.4-33'

2021-03-31 Thread Andras Timar (via logerrit)
Tag 'co-6.4-33' created by Andras Timar  at 
2021-03-31 10:39 +

co-6.4-33

Changes since cp-6.4-branch-point-11:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/co-6.4-33'

2021-03-31 Thread Andras Timar (via logerrit)
Tag 'co-6.4-33' created by Andras Timar  at 
2021-03-31 10:39 +

co-6.4-33

Changes since co-6.4-20:
Andras Timar (1):
  update Danish dictionary

---
 da_DK/README_da_DK.txt |4 
 da_DK/da_DK.aff| 3401 
 da_DK/da_DK.dic|288016 
+++--
 da_DK/description.xml  |9 
 4 files changed, 139245 insertions(+), 152185 deletions(-)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-31 Thread Balazs Varga (via logerrit)
 sw/source/ui/dbui/mmresultdialogs.cxx  |   67 ++---
 sw/source/uibase/dbui/mmconfigitem.cxx |   16 ---
 sw/source/uibase/inc/mmconfigitem.hxx  |8 +++
 3 files changed, 47 insertions(+), 44 deletions(-)

New commits:
commit ec44f87d5b99a3299322d0b79abc4c6808877865
Author: Balazs Varga 
AuthorDate: Mon Mar 22 13:34:37 2021 +0100
Commit: László Németh 
CommitDate: Wed Mar 31 12:24:22 2021 +0200

tdf#117212 sw mailmerge: merge only the selected range

All records were merged before saving or printing the
record range selected in “From 'X' To 'Y' of the
“Save Merged Documents” or “Print Merged Documents”
dialog windows (opened via the Mail merge toolbar).
This was a waste of time in the case of selecting
only a few records.

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

diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx 
b/sw/source/ui/dbui/mmresultdialogs.cxx
index ef10e4f321a9..2c9d89039dff 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -551,6 +551,15 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
weld::Button&, void)
 SwView* pView = ::GetActiveView();
 std::shared_ptr xConfigItem = 
pView->GetMailMergeConfigItem();
 assert(xConfigItem);
+
+sal_uInt32 nBegin = static_cast(m_xFromNF->get_value() - 1);
+sal_uInt32 nEnd = static_cast(m_xToNF->get_value());
+sal_uInt32 nMax = static_cast(m_xToNF->get_max());
+if (nEnd > nMax)
+nEnd = nMax;
+
+xConfigItem->SetBeginEnd(nBegin, nEnd);
+
 if (!xConfigItem->GetTargetView())
 SwDBManager::PerformMailMerge(pView);
 
@@ -594,18 +603,6 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
weld::Button&, void)
 }
 else
 {
-const sal_uInt32 nDocumentCount = 
xConfigItem->GetMergedDocumentCount();
-sal_uInt32 nBegin = 0;
-sal_uInt32 nEnd = nDocumentCount;
-
-if (!m_xSaveIndividualRB->get_active())
-{
-nBegin  = static_cast< sal_Int32 >(m_xFromNF->get_value() - 1);
-nEnd= static_cast< sal_Int32 >(m_xToNF->get_value());
-if(nEnd > nDocumentCount)
-nEnd = nDocumentCount;
-}
-
 OUString sTargetTempURL = URIHelper::SmartRel2Abs(
 INetURLObject(), utl::TempFile::CreateTempName(),
 URIHelper::GetMaybeFileHdl());
@@ -649,7 +646,7 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
weld::Button&, void)
 xSaveMonitor.reset();
 });
 
-for(sal_uInt32 nDoc = nBegin; nDoc < nEnd && !m_bCancelSaving; ++nDoc)
+for(sal_uInt32 nDoc = 0; nDoc < nEnd - nBegin && !m_bCancelSaving; 
++nDoc)
 {
 INetURLObject aURL(sPath);
 OUString sExtension = aURL.getExtension();
@@ -658,7 +655,7 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
weld::Button&, void)
 sExtension = pSfxFlt->GetWildcard().getGlob().getToken(1, '.');
 sPath += "." + sExtension;
 }
-OUString sStat = SwResId(STR_STATSTR_LETTER) + " " + 
OUString::number( nDoc );
+OUString sStat = SwResId(STR_STATSTR_LETTER) + " " + 
OUString::number(nBegin + nDoc);
 xSaveMonitor->m_xPrintInfo->set_label(sStat);
 
 //now extract a document from the target document
@@ -686,7 +683,7 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
weld::Button&, void)
 pTargetView->GetWrtShell().EndAction();
 //then save it
 OUString sOutPath = 
aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
-OUString sCounter = "_" + OUString::number(nDoc + 1);
+OUString sCounter = "_" + OUString::number(nBegin + nDoc + 1);
 sOutPath = sOutPath.replaceAt( sOutPath.getLength() - 
sExtension.getLength() - 1, 0, sCounter);
 
 while(true)
@@ -775,24 +772,21 @@ IMPL_LINK_NOARG(SwMMResultPrintDialog, PrintHdl_Impl, 
weld::Button&, void)
 SwView* pView = ::GetActiveView();
 std::shared_ptr xConfigItem = 
pView->GetMailMergeConfigItem();
 assert(xConfigItem);
+
+sal_uInt32 nBegin = static_cast(m_xFromNF->get_value() - 1);
+sal_uInt32 nEnd = static_cast(m_xToNF->get_value());
+sal_uInt32 nMax = static_cast(m_xToNF->get_max());
+if (nEnd > nMax)
+nEnd = nMax;
+
+xConfigItem->SetBeginEnd(nBegin, nEnd);
+
 if(!xConfigItem->GetTargetView())
 SwDBManager::PerformMailMerge(pView);
 
 SwView* pTargetView = xConfigItem->GetTargetView();
 assert(pTargetView);
 
-const sal_uInt32 nDocumentCount = xConfigItem->GetMergedDocumentCount();
-sal_uInt32 nBegin = 0;
-sal_uInt32 nEnd = nDocumentCount;
-
-if (!m_xPrintAllRB->get_active())
-{
-nBegin  = m_xFromN

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

2021-03-31 Thread Attila Bakos (NISZ) (via logerrit)
 sw/qa/extras/uiwriter/data3/tdf140828.docx |binary
 sw/qa/extras/uiwriter/uiwriter3.cxx|   32 +
 sw/source/core/doc/textboxhelper.cxx   |5 ++--
 sw/source/core/text/porfly.cxx |4 +++
 4 files changed, 39 insertions(+), 2 deletions(-)

New commits:
commit 9e90062dfc39b023c988d7982457dea2e0d1a923
Author: Attila Bakos (NISZ) 
AuthorDate: Tue Mar 9 16:32:27 2021 +0100
Commit: Xisco Fauli 
CommitDate: Wed Mar 31 12:06:28 2021 +0200

tdf#140828 sw textbox: fix AS_CHAR regression

Textboxes anchored as characters don't lose
their text frames after changing the anchor
"To character".

Regression from commit 493a916a3113e877835c9bc7c93faef0d29f9a33
(tdf#140158 tdf#138598 tdf#140598 sw: fix sync of AS_CHAR textboxes).

Change-Id: I0e6d88c9dcdeff515744bc4c201a5640eb810d1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112209
Tested-by: László Németh 
Reviewed-by: László Németh 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113321
Tested-by: Jenkins
Reviewed-by: Attila Bakos 

diff --git a/sw/qa/extras/uiwriter/data3/tdf140828.docx 
b/sw/qa/extras/uiwriter/data3/tdf140828.docx
new file mode 100755
index ..bfdabc5d77ea
Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf140828.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx 
b/sw/qa/extras/uiwriter/uiwriter3.cxx
index a2b8c8bc1c38..e0623c817a91 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -854,6 +855,37 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf76636_2)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xTextTable->getColumns()->getCount());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf140828)
+{
+load(DATA_DIRECTORY, "tdf140828.docx");
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+
+CPPUNIT_ASSERT_EQUAL(1, getShapes());
+uno::Reference xShp = getShape(1);
+CPPUNIT_ASSERT(xShp);
+
+uno::Reference ShpProps(xShp, uno::UNO_QUERY_THROW);
+dispatchCommand(mxComponent, ".uno:JumpToNextFrame", {});
+Scheduler::ProcessEventsToIdle();
+
+dispatchCommand(mxComponent, ".uno:SetAnchorAtChar", {});
+Scheduler::ProcessEventsToIdle();
+
+
CPPUNIT_ASSERT(ShpProps->getPropertyValue("AnchorType").get()
+   != 
text::TextContentAnchorType::TextContentAnchorType_AS_CHARACTER);
+
+uno::Reference 
xTxBx(SwTextBoxHelper::getUnoTextFrame(xShp));
+CPPUNIT_ASSERT(xTxBx);
+
+uno::Reference TxBxProps(xTxBx, uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_EQUAL(OUString("top left image"), 
xTxBx->getText()->getString());
+
+CPPUNIT_ASSERT_MESSAGE("Bad Relative Orientation and Position!",
+   
TxBxProps->getPropertyValue("HoriOrientRelation").get()
+   != text::RelOrientation::CHAR);
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132725)
 {
 load(DATA_DIRECTORY, "tdf132725.odt");
diff --git a/sw/source/core/doc/textboxhelper.cxx 
b/sw/source/core/doc/textboxhelper.cxx
index 5257d448bd55..6b9f87655d8d 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -165,8 +165,6 @@ void SwTextBoxHelper::create(SwFrameFormat* pShape, bool 
bCopyText)
 if (xShapePropertySet->getPropertyValue(UNO_NAME_TEXT_WRITINGMODE) >>= 
eMode)
 syncProperty(pShape, RES_FRAMEDIR, 0, uno::makeAny(sal_Int16(eMode)));
 
-// TODO: Text dialog attr setting to frame
-
 const SwFormatAnchor& rAnch = pShape->GetAnchor();
 if (!((rAnch.GetAnchorId() == RndStdIds::FLY_AT_PAGE && rAnch.GetPageNum() 
!= 0)
   || ((rAnch.GetAnchorId() == RndStdIds::FLY_AT_PARA
@@ -723,6 +721,9 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, 
sal_uInt16 nWID, sal_u
 }
 else // Otherwise copy the anchor type of the shape
 {
+// tdf#140828: Do not keep CHAR rel-orientation:
+
xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT_RELATION,
+   
uno::Any(text::RelOrientation::FRAME));
 xPropertySet->setPropertyValue(UNO_NAME_ANCHOR_TYPE, 
aValue);
 }
 // After anchoring the position must be set as well:
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index cafa70c48227..9426359156f1 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -351,9 +351,11 @@ void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, 
const Point &rBase,
 // Both rectangles are absolute, SwFormatHori/VertOrient's position
 // is relative to the print area of the anchor text 

[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-6.4-33'

2021-03-31 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-33' created by Andras Timar  at 
2021-03-31 09:36 +

cp-6.4-33

Changes since cp-6.4-32-15:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-6.4-33'

2021-03-31 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-33' created by Andras Timar  at 
2021-03-31 09:36 +

cp-6.4-33

Changes since cp-6.4-23:
Andras Timar (1):
  Translation update

---
 source/ar/cui/messages.po  |  130 
 source/ar/dictionaries/da_DK.po|   24 
 source/ar/officecfg/registry/data/org/openoffice/Office/UI.po  |   24 
 source/ar/svtools/messages.po  |   44 
 source/ar/svx/messages.po  |  502 -
 source/ar/sw/messages.po   |  405 
 source/as/cui/messages.po  |  106 
 source/as/dictionaries/da_DK.po|   18 
 source/as/officecfg/registry/data/org/openoffice/Office/UI.po  |   12 
 source/as/svtools/messages.po  |   42 
 source/as/svx/messages.po  |  472 
 source/as/sw/messages.po   |  385 
 source/ast/cui/messages.po |  108 
 source/ast/dictionaries/da_DK.po   |   18 
 source/ast/officecfg/registry/data/org/openoffice/Office/UI.po |   18 
 source/ast/svtools/messages.po |   42 
 source/ast/svx/messages.po |  485 -
 source/ast/sw/messages.po  |  387 
 source/bg/cui/messages.po  |  106 
 source/bg/dictionaries/da_DK.po|   24 
 source/bg/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/bg/svtools/messages.po  |   42 
 source/bg/svx/messages.po  |  465 
 source/bg/sw/messages.po   |  385 
 source/bn-IN/cui/messages.po   |  106 
 source/bn-IN/dictionaries/da_DK.po |   18 
 source/bn-IN/officecfg/registry/data/org/openoffice/Office/UI.po   |   12 
 source/bn-IN/svtools/messages.po   |   42 
 source/bn-IN/svx/messages.po   |  482 
 source/bn-IN/sw/messages.po|  386 
 source/br/cui/messages.po  |  106 
 source/br/dictionaries/da_DK.po|   18 
 source/br/officecfg/registry/data/org/openoffice/Office/UI.po  |   12 
 source/br/svtools/messages.po  |   42 
 source/br/svx/messages.po  |  487 -
 source/br/sw/messages.po   |  385 
 source/ca-valencia/cui/messages.po |  106 
 source/ca-valencia/dictionaries/da_DK.po   |   18 
 source/ca-valencia/officecfg/registry/data/org/openoffice/Office/UI.po |   12 
 source/ca-valencia/svtools/messages.po |   42 
 source/ca-valencia/svx/messages.po |  471 
 source/ca-valencia/sw/messages.po  |  385 
 source/ca/cui/messages.po  |  106 
 source/ca/dictionaries/da_DK.po|   24 
 source/ca/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/ca/svtools/messages.po  |   42 
 source/ca/svx/messages.po  |  471 
 source/ca/sw/messages.po   |  385 
 source/cs/cui/messages.po  |  106 
 source/cs/dictionaries/da_DK.po|   24 
 source/cs/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/cs/svtools/messages.po  |   42 
 source/cs/svx/messages.po  |  465 
 source/cs/sw/messages.po   |  385 
 source/cy/cui/messages.po  |  106 
 source/cy/dictionaries/da_DK.po|   24 
 source/cy/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/cy/svtools/messages.po  |   42 
 source/cy/svx/messages.po  |  467 
 source/cy/sw/messages.po   |  385 
 source/da/cui/messages.po 

[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-6.4-33'

2021-03-31 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-33' created by Andras Timar  at 
2021-03-31 09:36 +

cp-6.4-33

Changes since cp-6.4-branch-point-11:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-6.4-33'

2021-03-31 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-33' created by Andras Timar  at 
2021-03-31 09:36 +

cp-6.4-33

Changes since co-6.4-20:
Andras Timar (1):
  update Danish dictionary

---
 da_DK/README_da_DK.txt |4 
 da_DK/da_DK.aff| 3401 
 da_DK/da_DK.dic|288016 
+++--
 da_DK/description.xml  |9 
 4 files changed, 139245 insertions(+), 152185 deletions(-)
---
___
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 writerfilter/source

2021-03-31 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/data/rtl-gutter.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx|   18 ++
 sw/source/filter/ww8/attributeoutputbase.hxx  |3 +++
 sw/source/filter/ww8/docxattributeoutput.cxx  |   10 ++
 sw/source/filter/ww8/docxattributeoutput.hxx  |2 ++
 sw/source/filter/ww8/ww8atr.cxx   |3 +++
 writerfilter/source/dmapper/DomainMapper.cxx  |7 +++
 writerfilter/source/dmapper/PropertyIds.cxx   |3 +++
 writerfilter/source/dmapper/PropertyIds.hxx   |1 +
 9 files changed, 47 insertions(+)

New commits:
commit 3db477fd0e6cfc4ff77b3c911ca4ab14fd980932
Author: Miklos Vajna 
AuthorDate: Wed Mar 31 09:54:25 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 11:02:28 2021 +0200

tdf#140343 sw page rtl gutter margin: add DOCX filter

Map to  inside .

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

diff --git a/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx 
b/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx
new file mode 100644
index ..d6b28e5cbce2
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/rtl-gutter.docx 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index bda5911c1b16..afd0b94e5d0b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -197,6 +197,24 @@ CPPUNIT_TEST_FIXTURE(Test, testEffectExtentLineWidth)
 verify();
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testRtlGutter)
+{
+// Given a document with RTL gutter:
+load(mpTestDocumentPath, "rtl-gutter.docx");
+uno::Reference 
xStandard(getStyles("PageStyles")->getByName("Standard"),
+uno::UNO_QUERY);
+CPPUNIT_ASSERT(getProperty(xStandard, "RtlGutter"));
+
+// When saving back to DOCX:
+reload(mpFilter, "rtl-gutter.docx");
+
+// Then make sure the section's gutter is still RTL:
+xmlDocUniquePtr pXmlDoc = parseExport();
+// Without the accompanying fix in place, this test would have failed as 
the XML element was
+// missing.
+assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:rtlGutter", 1);
+}
+
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf140572_docDefault_superscript, 
"tdf140572_docDefault_superscript.docx")
 {
 // A round-trip was crashing.
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx 
b/sw/source/filter/ww8/attributeoutputbase.hxx
index cea47b8e3c60..d85d58237d60 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -640,6 +640,9 @@ protected:
 ww8::GridColsPtr GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t const 
& pTableTextNodeInfoInner );
 ww8::WidthsPtr   GetColumnWidths( ww8::WW8TableNodeInfoInner::Pointer_t 
const & pTableTextNodeInfoInner );
 
+/// RES_RTL_GUTTER
+virtual void SectionRtlGutter(const SfxBoolItem& /*rRtlGutter*/) {}
+
 public:
 AttributeOutputBase(const OUString& sBaseURL)
 : m_sBaseURL(sBaseURL)
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index cd67d87495bd..b64be1d084b3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6715,6 +6715,16 @@ void DocxAttributeOutput::SectionFormProtection( bool 
bProtected )
 m_pSerializer->singleElementNS(XML_w, XML_formProt, FSNS(XML_w, 
XML_val), "false");
 }
 
+void DocxAttributeOutput::SectionRtlGutter(const SfxBoolItem& rRtlGutter)
+{
+if (!rRtlGutter.GetValue())
+{
+return;
+}
+
+m_pSerializer->singleElementNS(XML_w, XML_rtlGutter);
+}
+
 void DocxAttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const 
SwLineNumberInfo& rLnNumInfo )
 {
 rtl::Reference pAttr = 
FastSerializerHelper::createAttrList();
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index 7a2826e81ea9..62ace93d55f0 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -681,6 +681,8 @@ protected:
 
 virtual void WriteBookmarkInActParagraph( const OUString& rName, sal_Int32 
nFirstRunPos, sal_Int32 nLastRunPos ) override;
 
+void SectionRtlGutter( const SfxBoolItem& rRtlGutter) override;
+
 /// Reference to the export, where to get the data from
 DocxExport &m_rExport;
 
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 985df4df45a2..2103490e9cc7 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5503,6 +5503,9 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& 
rHt )
 case RES_CHRATR_GRABBAG:
 CharGrabBag(static_cast(rHt));
 break;
+case RES_RTL_GUTTER:
+SectionRtlGutter(stat

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

2021-03-31 Thread Ashod Nakashian (via logerrit)
 vcl/source/filter/ipdf/pdfread.cxx |   18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 860ea6c6693608165cfde42656d6c48c3bde91eb
Author: Ashod Nakashian 
AuthorDate: Sun Mar 28 09:38:01 2021 -0400
Commit: Jan Holesovsky 
CommitDate: Wed Mar 31 10:59:11 2021 +0200

vcl: allow for overriding the default PDF rendering resolution

Change-Id: Ibd75c6dd71d93322bd77995547e735c2d4849602
Signed-off-by: Ashod Nakashian 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113255
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index 2fb7a11bb681..e4af2a0e865b 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -146,11 +146,27 @@ VectorGraphicDataArray 
createVectorGraphicDataArray(SvStream& rStream)
 
 namespace vcl
 {
+/// Get the default PDF rendering resolution in DPI.
+static double getDefaultPdfResolutionDpi()
+{
+// If an overriding default is set, use it.
+const char* envar = ::getenv("PDFIMPORT_RESOLUTION_DPI");
+if (envar)
+{
+const double dpi = atof(envar);
+if (dpi > 0)
+return dpi;
+}
+
+// Fallback to a sensible default.
+return 96.;
+}
+
 size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector& 
rBitmaps,
 const size_t nFirstPage, int nPages, const 
basegfx::B2DTuple* pSizeHint)
 {
 #if HAVE_FEATURE_PDFIUM
-const double fResolutionDPI = 96;
+static const double fResolutionDPI = getDefaultPdfResolutionDpi();
 auto pPdfium = vcl::pdf::PDFiumLibrary::get();
 
 // Load the buffer using pdfium.
___
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' - officecfg/registry

2021-03-31 Thread Thais Vieira (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |
2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1d64b7696453ef09150f39662c9beda09b6f964e
Author: Thais Vieira 
AuthorDate: Fri Sep 4 08:21:28 2020 -0300
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:47:25 2021 +0200

Loleaflet:fix menu entry

replacing the 'Select...' to 'Select Table'
to it be consistent with the pattern.

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 97970ec450a9..c27c39288cfe 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -2055,7 +2055,7 @@
   Select Table
 
 
-  ~Select...
+  ~Select Table
 
 
   Select Table
___
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' - sd/source

2021-03-31 Thread Pranam Lashkari (via logerrit)
 sd/source/ui/unoidl/unomodel.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 9180416ee296acad5bcd482569c6c53ecfff5b20
Author: Pranam Lashkari 
AuthorDate: Tue Mar 30 21:52:13 2021 +0530
Commit: Jan Holesovsky 
CommitDate: Wed Mar 31 10:45:43 2021 +0200

LOK: getPartInfo now returns master page count

master page count will be used when switching to master view
to know how many slide previews to be shown

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

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 21298e4da4af..5de97c06936f 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2274,11 +2274,14 @@ OUString SdXImpressDocument::getPartInfo(int nPart)
 
 const bool bIsVisible = pViewSh->IsVisible(nPart);
 const bool bIsSelected = pViewSh->IsSelected(nPart);
+const sal_Int16 nMasterPageCount= 
pViewSh->GetDoc()->GetMasterSdPageCount(pViewSh->GetPageKind());
 
 OUString aPartInfo = "{ \"visible\": \"" +
 OUString::number(static_cast(bIsVisible)) +
 "\", \"selected\": \"" +
 OUString::number(static_cast(bIsSelected)) +
+"\", \"masterPageCount\": \"" +
+OUString::number(nMasterPageCount) +
 "\" }";
 return aPartInfo;
 }
___
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' - 10 commits - connectivity/source icon-themes/karasa_jaga icon-themes/karasa_jaga_svg oox/source sc/source sd/qa sd/source sw/source

2021-03-31 Thread Caolán McNamara (via logerrit)
 connectivity/source/drivers/file/FStatement.cxx   |7 +
 connectivity/source/parse/sqliterator.cxx |   27 +-
 icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png|binary
 icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png |binary
 icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png   |binary
 icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png|binary
 icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg|2 
 icon-themes/karasa_jaga_svg/cmd/ar/sc_linenumberingdialog.svg |2 
 icon-themes/karasa_jaga_svg/cmd/sc_defaultnumbering.svg   |2 
 icon-themes/karasa_jaga_svg/cmd/sc_linenumberingdialog.svg|2 
 oox/source/drawingml/hyperlinkcontext.cxx |3 
 oox/source/drawingml/textrun.cxx  |4 
 sc/source/ui/condformat/condformatdlg.cxx |9 ++
 sc/source/ui/inc/condformatdlgentry.hxx   |1 
 sd/qa/unit/data/pptx/tdf137367.pptx   |binary
 sd/qa/unit/import-tests.cxx   |   41 ++
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx |   12 ++
 sd/source/ui/inc/AccessibleDocumentViewBase.hxx   |2 
 sw/source/core/edit/autofmt.cxx   |2 
 sw/source/uibase/utlui/glbltree.cxx   |2 
 vcl/source/window/menu.cxx|2 
 vcl/unx/gtk3/gtk3gtkinst.cxx  |3 
 22 files changed, 104 insertions(+), 19 deletions(-)

New commits:
commit ad9f58e419044f30f368bd9413bc918d70e7a74e
Author: Caolán McNamara 
AuthorDate: Tue Mar 30 12:11:42 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:45:52 2021 +0200

fix the endif placement for GTK_CHECK_VERSION

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f29c0c018ad3..773b20ac5b07 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -7783,8 +7783,8 @@ private:
 
 gdk_event_free(pKeyEvent);
 }
-#else
 else
+#endif
 {
 guint nButton;
 guint32 nTime;
@@ -7806,7 +7806,6 @@ private:
 
 gtk_menu_popup(m_pMenu, nullptr, nullptr, nullptr, nullptr, 
nButton, nTime);
 }
-#endif
 
 if (g_main_loop_is_running(pLoop))
 {
commit 3f0ba06495e5808ab1bd58de6abe79afffe59d7c
Author: Rizal Muttaqin 
AuthorDate: Tue Mar 30 11:49:16 2021 +0700
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:45:47 2021 +0200

KJ: Improve small numbering icons

Change-Id: I5e6aff983875c8144450b8c484cbc25e5eb465fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/11
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin 
(cherry picked from commit a247d2f896d7fcb30f35cf95f69e32534a475fba)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113287
Tested-by: Adolfo Jayme Barrientos 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png 
b/icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png
index 7247281c3ad1..6255d5be3a46 100644
Binary files a/icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png and 
b/icon-themes/karasa_jaga/cmd/ar/sc_defaultnumbering.png differ
diff --git a/icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png 
b/icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png
index bca545c56639..094ef7c30507 100644
Binary files a/icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png and 
b/icon-themes/karasa_jaga/cmd/ar/sc_linenumberingdialog.png differ
diff --git a/icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png 
b/icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png
index ca437a82c63e..6aed602d256b 100644
Binary files a/icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png and 
b/icon-themes/karasa_jaga/cmd/sc_defaultnumbering.png differ
diff --git a/icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png 
b/icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png
index 49bdb065819c..e06aff69b007 100644
Binary files a/icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png and 
b/icon-themes/karasa_jaga/cmd/sc_linenumberingdialog.png differ
diff --git a/icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg 
b/icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg
index aee94eb670f0..52386857dad5 100644
--- a/icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg
+++ b/icon-themes/karasa_jaga_svg/cmd/ar/sc_defaultnumbering.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No newline at end of file
+http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
\ No new

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 13 commits - filter/qa filter/source sd/qa

2021-03-31 Thread Szymon Kłos (via logerrit)
 filter/qa/unit/svg.cxx  |4 
 filter/source/svg/presentation_engine.js|  366 +---
 filter/source/svg/svgexport.cxx |  356 +--
 filter/source/svg/svgfilter.hxx |   18 +
 filter/source/svg/svgwriter.cxx |  122 +++-
 filter/source/svg/svgwriter.hxx |7 
 sd/qa/unit/SVGExportTests.cxx   |  223 ++
 sd/qa/unit/data/odp/slide-bitmap-background.odp |binary
 sd/qa/unit/data/odp/slide-custom-background.odp |binary
 sd/qa/unit/data/odp/slide-tile-background.odp   |binary
 sd/qa/unit/data/odp/text-fields.odp |binary
 11 files changed, 963 insertions(+), 133 deletions(-)

New commits:
commit 9b22ec7f858d8d453804121b107d7a221a312933
Author: Szymon Kłos 
AuthorDate: Wed Mar 17 15:57:21 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:43:30 2021 +0200

Polyfill presentation_engine.js for IE11

IE11 doesn't support:
Array.includes, String.startsWith and Math.trunc

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

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index 7f3cb48bcfbf..0babb0083cc8 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -31,6 +31,15 @@ var round = Math.round;
 var abs = Math.abs;
 var now = Date.now;
 
+/**
+ * polyfill for IE11
+ */
+if (!Math.trunc) {
+Math.trunc = function (v) {
+return v < 0 ? Math.ceil(v) : Math.floor(v);
+};
+}
+
 /**
  * set a timeout with a given scope
  * @param {Function} fn
@@ -5393,9 +5402,9 @@ function getTextFieldType ( elem )
 function isTextFieldByClassName ( sClassName )
 {
 return sClassName === aDateTimeClassName || sClassName === aFooterClassName
-|| sClassName === aHeaderClassName || sClassName.startsWith( 
aSlideNumberClassName )
-|| sClassName.startsWith( aDateClassName ) || sClassName.startsWith( 
aTimeClassName )
-|| sClassName.startsWith( aSlideNameClassName );
+|| sClassName === aHeaderClassName || sClassName.indexOf( 
aSlideNumberClassName ) == 0
+|| sClassName.indexOf( aDateClassName ) == 0 || sClassName.indexOf( 
aTimeClassName ) == 0
+|| sClassName.indexOf( aSlideNameClassName ) == 0;
 }
 
 /** Class MasterPage
@@ -5819,7 +5828,7 @@ MasterPageView.prototype.createElement = function()
 for( ; i < aBackgroundObjectSubGroupIdList.length; ++i )
 {
 sId = aBackgroundObjectSubGroupIdList[i];
-if( sId.startsWith( aSlideNumberClassName ) )
+if( sId.indexOf( aSlideNumberClassName ) == 0 )
 {
 // Slide Number Field
 // The cloned element is appended directly to the field group 
element
@@ -5873,9 +5882,9 @@ MasterPageView.prototype.createElement = function()
aTextFieldHandlerSet, 
sMasterSlideId );
 }
 }
-else if( sId.startsWith( aDateClassName )
-|| sId.startsWith( aTimeClassName )
-|| sId.startsWith( aSlideNameClassName ) )
+else if( sId.indexOf( aDateClassName ) == 0
+|| sId.indexOf( aTimeClassName ) == 0
+|| sId.indexOf( aSlideNameClassName ) == 0 )
 {
 this.initTextFieldHandler( sId, aPlaceholderShapeSet,
aTextFieldContentProviderSet, 
aDefsElement,
commit c2217ff6d0601d99a411438502d5dbd0be587052
Author: Marco Cecchetti 
AuthorDate: Fri Feb 19 16:04:07 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:42:35 2021 +0200

filter: svg: js engine: misplaced text: improving text field handling

Change-Id: I8b5f9a39b3cd3fcfdae0d088eae0a875cf9404ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111065
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111848
Tested-by: Jenkins
Reviewed-by: Marco Cecchetti 

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index 76bd4d41b12d..7f3cb48bcfbf 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -5589,68 +5589,99 @@ PlaceholderShape.prototype.isValid = function()
  */
 PlaceholderShape.prototype.init = function()
 {
-
 var aTextFieldElement = getElementByClassName( 
this.masterPage.backgroundObjects, this.className );
 if( aTextFieldElement )
 {
-var aPlaceholderElement = getElementByClassName( aTextFieldElement, 
'PlaceholderText' );
-if( aPlaceholderElement )
+var aTextElem = getElementByClassName( aTextFieldElement,

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

2021-03-31 Thread Szymon Kłos (via logerrit)
 sc/source/ui/view/viewdata.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 41b66bb6701cc8de67b1dd0d72a10f6b92372f30
Author: Szymon Kłos 
AuthorDate: Wed Mar 24 15:38:59 2021 +0100
Commit: Jan Holesovsky 
CommitDate: Wed Mar 31 10:43:22 2021 +0200

Avoid infinite loop in AddPixelsWhile when removing Sheet

When 2 sessions in online were used:
A was in chart editing mode in the last sheet
B removed last sheet

infinite loop occured as GetRowHeight returned 0 due
to invalid tab number.

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

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index a1ff8bc20051..b1470ad68b44 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -4044,7 +4044,12 @@ void ScViewData::AddPixelsWhile( long & rScrY, long 
nEndPixels, SCROW & rPosY,
 if (nHeightEndRow > nEndRow)
 nHeightEndRow = nEndRow;
 if (!nHeight)
-nRow = nHeightEndRow + 1;
+{
+if (ValidTab(nTabNo) && nTabNo <= pDoc->GetMaxTableNumber())
+nRow = nHeightEndRow + 1;
+else
+break;
+}
 else
 {
 SCROW nRows = nHeightEndRow - nRow + 1;
___
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' - 4 commits - accessibility/source chart2/source chart2/workbench connectivity/source cui/source dbaccess/source desktop/source editen

2021-03-31 Thread Marco Cecchetti (via logerrit)
 accessibility/source/extended/accessibleeditbrowseboxcell.cxx   |3 
 chart2/source/model/filter/XMLFilter.cxx|2 
 chart2/source/tools/WrappedPropertySet.cxx  |4 
 chart2/workbench/addin/sampleaddin.cxx  |2 
 connectivity/source/commontools/DateConversion.cxx  |2 
 connectivity/source/commontools/dbexception.cxx |3 
 connectivity/source/commontools/dbtools.cxx |8 
 connectivity/source/commontools/predicateinput.cxx  |2 
 connectivity/source/drivers/file/fcomp.cxx  |3 
 connectivity/source/drivers/hsqldb/HStorageAccess.cxx   |7 
 connectivity/source/drivers/hsqldb/HStorageMap.cxx  |2 
 connectivity/source/drivers/hsqldb/StorageFileAccess.cxx|2 
 connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx |7 
 connectivity/source/drivers/mork/MResultSet.cxx |3 
 connectivity/source/manager/mdrivermanager.cxx  |2 
 cui/source/dialogs/showcols.cxx |6 
 cui/source/options/optasian.cxx |7 
 cui/source/options/sdbcdriverenum.cxx   |3 
 dbaccess/source/core/dataaccess/ContentHelper.cxx   |3 
 dbaccess/source/core/dataaccess/documentdefinition.cxx  |4 
 dbaccess/source/filter/xml/dbloader2.cxx|4 
 dbaccess/source/filter/xml/xmlExport.cxx|2 
 dbaccess/source/filter/xml/xmlHierarchyCollection.cxx   |3 
 dbaccess/source/filter/xml/xmlQuery.cxx |3 
 dbaccess/source/filter/xml/xmlTable.cxx |5 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx  |2 
 dbaccess/source/ui/browser/sbagrid.cxx  |2 
 dbaccess/source/ui/control/tabletree.cxx|2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx   |3 
 dbaccess/source/ui/querydesign/TableWindow.cxx  |5 
 dbaccess/source/ui/relationdesign/RelationTableView.cxx |5 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx|4 
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |2 
 editeng/source/misc/hangulhanja.cxx |2 
 embeddedobj/source/commonembedding/miscobj.cxx  |3 
 filter/source/svg/presentation_engine.js|   22 ++
 filter/source/svg/svgexport.cxx |   82 
++
 filter/source/svg/svgwriter.cxx |   11 +
 filter/source/svg/svgwriter.hxx |1 
 forms/source/component/Button.cxx   |2 
 forms/source/component/ComboBox.cxx |2 
 forms/source/component/Currency.cxx |3 
 forms/source/component/DatabaseForm.cxx |4 
 forms/source/component/Grid.cxx |3 
 forms/source/component/ImageControl.cxx |2 
 forms/source/component/clickableimage.cxx   |3 
 forms/source/runtime/formoperations.cxx |7 
 forms/source/xforms/submission/submission_get.cxx   |3 
 forms/source/xforms/submission/submission_post.cxx  |3 
 forms/source/xforms/submission/submission_put.cxx   |3 
 fpicker/source/office/fpsmartcontent.cxx|3 
 linguistic/source/gciterator.cxx|2 
 oox/source/helper/binarystreambase.cxx  |5 
 oox/source/ppt/slidetransition.cxx  |5 
 package/source/zippackage/ZipPackageStream.cxx  |6 
 reportdesign/source/core/api/FixedLine.cxx  |3 
 reportdesign/source/core/api/ReportDefinition.cxx   |4 
 reportdesign/source/core/sdr/PropertyForward.cxx|2 
 reportdesign/source/core/sdr/RptObject.cxx  |2 
 reportdesign/source/filter/xml/xmlCell.cxx  |3 
 reportdesign/source/filter/xml/xmlComponent.cxx |3 
 reportdesign/source/filter/xml/xmlCondPrtExpr.cxx   |3 
 reportdesign/source/filter/xml/xmlFormatCondition.cxx   |3 
 reportdesign/source/filter/xml/xmlFormattedField.cxx|3 
 reportdesign/source/filter/xml/xmlFunction.cxx  |5 
 reportdesign/source/filter/xml/xmlGroup.cxx |5 
 reportdesign/source/filter/xml/xmlHelper.cxx|3 
 reportdesign/source/filter/xml/xmlImage.cxx |3 
 reportdesign/source/

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

2021-03-31 Thread Henry Castro (via logerrit)
 sfx2/source/sidebar/SidebarController.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d0c90bb1124a4a9f8335bcf8d02cd01ad13c8356
Author: Henry Castro 
AuthorDate: Mon Mar 29 09:18:07 2021 -0400
Commit: Jan Holesovsky 
CommitDate: Wed Mar 31 10:23:56 2021 +0200

lok: fix nullptr de-reference

Change-Id: I8a9a7444d66e5e6449a0215bde174253a41f09b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113317
Tested-by: Jenkins
Reviewed-by: Henry Castro 
(cherry picked from commit 949085b12a8a57b2257f4e59cc597e4c59b42f76)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113285
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index c132b9e506d0..d8975e1744dd 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -248,7 +248,8 @@ void SidebarController::disposeDecks()
(hide + 
"=false").c_str());
 }
 
-mpParentWindow->ReleaseLOKNotifier();
+if (mpParentWindow)
+mpParentWindow->ReleaseLOKNotifier();
 }
 
 mpCurrentDeck.clear();
___
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' - 7 commits - comphelper/source configure.ac officecfg/registry oox/source sc/source

2021-03-31 Thread Andras Timar (via logerrit)
 comphelper/source/misc/lok.cxx |2 +-
 configure.ac   |1 +
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |2 +-
 oox/source/drawingml/chart/datasourcecontext.cxx   |2 +-
 sc/source/ui/inc/mvtabdlg.hxx  |1 +
 sc/source/ui/miscdlgs/mvtabdlg.cxx |7 +++
 sc/source/ui/view/tabvwsh3.cxx |4 
 7 files changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 01842c4a5bb3c6c5af1cc026deb9bbae43a4b046
Author: Andras Timar 
AuthorDate: Fri Feb 26 16:05:12 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:07:40 2021 +0200

lok: mark calc document as modified when adjusting split-panes (2)

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

diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 094c8c47a8ed..a5b7e621efa1 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -1068,6 +1068,8 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 rOtherBind.Invalidate( SID_WINDOW_FIX );
 rOtherBind.Invalidate(nSlot);
 });
+if (!GetViewData().GetDocShell()->IsReadOnly())
+GetViewData().GetDocShell()->SetDocumentModified();
 }
 }
 else
commit c267c7e828e534a48f4182d68c4e124c13fda34a
Author: Michael Meeks 
AuthorDate: Thu Feb 25 21:44:40 2021 +
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:07:23 2021 +0200

lok: mark calc document as modified when adjusting split-panes.

Change-Id: I592ee4dc4317f27fae24141b2052475ef26e9fc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111599
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Dennis Francis 

diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 72e6a72707ab..094c8c47a8ed 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -1029,6 +1029,8 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 rOtherBind.Invalidate( SID_WINDOW_FIX_COL );
 rOtherBind.Invalidate( SID_WINDOW_FIX_ROW );
 });
+if (!GetViewData().GetDocShell()->IsReadOnly())
+GetViewData().GetDocShell()->SetDocumentModified();
 }
 }
 }
commit 5c3b57695b5ef8387a1f0e6e5faa31418781c565
Author: Andras Timar 
AuthorDate: Sun Feb 21 00:02:08 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:06:39 2021 +0200

fix variable name in SAL_INFO

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

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 82e5c7aed4f9..c2a44872755f 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -73,7 +73,7 @@ public:
 {
 if (maLocaleLanguageTag != rLocaleLanguageTag)
 {
-SAL_INFO("comphelper.lok", "Setting locale from " << 
maLanguageTag.getBcp47() << " to " << rLocaleLanguageTag.getBcp47());
+SAL_INFO("comphelper.lok", "Setting locale from " << 
maLocaleLanguageTag.getBcp47() << " to " << rLocaleLanguageTag.getBcp47());
 maLocaleLanguageTag = rLocaleLanguageTag;
 }
 }
commit 0ecb22821cb1ad350040d4a0350950deb1848b2a
Author: Andras Timar 
AuthorDate: Wed Feb 17 12:58:20 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:06:06 2021 +0200

On aarch64 platform deb package platform string should be arm64 actually

Change-Id: I0b4b04e4a6f5c474b3961e5223128e0c835b8c44

diff --git a/configure.ac b/configure.ac
index b47477b14daa..e38091b29615 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4839,6 +4839,7 @@ linux-gnu*)
 CPUNAME=AARCH64
 PLATFORMID=linux_aarch64
 RTL_ARCH=AARCH64
+EPM_FLAGS="-a arm64"
 ;;
 alpha)
 CPUNAME=AXP
commit a23417623bbfd60d133f184bd4ccbf68ec93f54a
Author: Andras Timar 
AuthorDate: Tue Feb 9 12:00:45 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Mar 31 10:05:36 2021 +0200

Fix chart label import, use the locale as MS Office does

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

diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx 

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

2021-03-31 Thread Miklos Vajna (via logerrit)
 sw/qa/core/layout/layout.cxx  |   25 +
 sw/source/core/layout/frmtool.cxx |8 ++--
 2 files changed, 31 insertions(+), 2 deletions(-)

New commits:
commit c088d26578d1be352efa49bd164a8217627648de
Author: Miklos Vajna 
AuthorDate: Wed Mar 31 08:03:43 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 09:53:16 2021 +0200

tdf#140343 sw page rtl gutter margin: add layout

We used to get the gutter margin on the left side and the right gutter
margin on the right side, which works for normal and mirrored layout.

Swap these two in RTL mode.

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

diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 7c37eec7fc7a..794752206035 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -357,6 +357,31 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, 
testGutterMirrorMargin)
 CPPUNIT_ASSERT_EQUAL(nGutterTwips, nOldRight - nNewRight);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testRtlGutterMargin)
+{
+// Given a document with a right margin:
+SwDoc* pDoc = createSwDoc();
+uno::Reference 
xStandard(getStyles("PageStyles")->getByName("Standard"),
+  uno::UNO_QUERY);
+SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+SwFrame* pPage = pLayout->GetLower();
+tools::Long nOldRight = pPage->getFramePrintArea().Right();
+
+// When setting enable RTL gutter mode and setting a gutter margin:
+xStandard->setPropertyValue("RtlGutter", uno::makeAny(true));
+sal_Int32 nGutterMm100 = 2000;
+xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100));
+
+// Then make sure the new right edge of the print area is decreased:
+tools::Long nNewRight = pPage->getFramePrintArea().Right();
+tools::Long nGutterTwips = convertMm100ToTwip(nGutterMm100);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1134
+// - Actual  : 0
+// i.e. the gutter was missing on the right side.
+CPPUNIT_ASSERT_EQUAL(nGutterTwips, nOldRight - nNewRight);
+}
+
 CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMarginPageBorder)
 {
 // FIXME this is 3369 on macOS -- calculate this number dynamically?
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index e1c7eee5148e..7abc46270bfa 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2271,9 +2271,11 @@ tools::Long SwBorderAttrs::CalcRight( const SwFrame* 
pCaller ) const
 DocumentSettingId::GUTTER_AT_TOP);
 if (!bGutterAtTop)
 {
+bool bRtlGutter = 
pPageFrame->GetAttrSet()->GetItem(RES_RTL_GUTTER)->GetValue();
+tools::Long nGutterMargin = bRtlGutter ? m_rLR->GetGutterMargin() 
: m_rLR->GetRightGutterMargin();
 // Decrease the print area: the right space is the sum of right 
and right gutter
 // margins.
-nRight += m_rLR->GetRightGutterMargin();
+nRight += nGutterMargin;
 }
 }
 
@@ -2349,8 +2351,10 @@ tools::Long SwBorderAttrs::CalcLeft( const SwFrame 
*pCaller ) const
 DocumentSettingId::GUTTER_AT_TOP);
 if (!bGutterAtTop)
 {
+bool bRtlGutter = 
pPageFrame->GetAttrSet()->GetItem(RES_RTL_GUTTER)->GetValue();
+tools::Long nGutterMargin = bRtlGutter ? 
m_rLR->GetRightGutterMargin() : m_rLR->GetGutterMargin();
 // Decrease the print area: the left space is the sum of left and 
gutter margins.
-nLeft += m_rLR->GetGutterMargin();
+nLeft += nGutterMargin;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-31 Thread Mike Kaganski (via logerrit)
 include/unotest/bootstrapfixturebase.hxx|2 +-
 unotest/source/cpp/bootstrapfixturebase.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a182e9ce5e0da3cc98603ed27819405812d7fab1
Author: Mike Kaganski 
AuthorDate: Wed Mar 31 09:52:24 2021 +0300
Commit: Mike Kaganski 
CommitDate: Wed Mar 31 09:50:24 2021 +0200

This should be a static method

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

diff --git a/include/unotest/bootstrapfixturebase.hxx 
b/include/unotest/bootstrapfixturebase.hxx
index ac0e1166f8a6..11650df8c4d5 100644
--- a/include/unotest/bootstrapfixturebase.hxx
+++ b/include/unotest/bootstrapfixturebase.hxx
@@ -66,7 +66,7 @@ public:
   virtual void setUp() override;
   virtual void tearDown() override;
 
-  bool isWindowsRDP() const;
+  static bool isWindowsRDP();
 };
 
 }
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx 
b/unotest/source/cpp/bootstrapfixturebase.cxx
index 5eb5b91dcaf0..a8affd272674 100644
--- a/unotest/source/cpp/bootstrapfixturebase.cxx
+++ b/unotest/source/cpp/bootstrapfixturebase.cxx
@@ -36,10 +36,10 @@ void test::BootstrapFixtureBase::setUp()
 
 void test::BootstrapFixtureBase::tearDown() { 
StarBASIC::DetachAllDocBasicItems(); }
 
-bool test::BootstrapFixtureBase::isWindowsRDP() const
+bool test::BootstrapFixtureBase::isWindowsRDP()
 {
 #if defined _WIN32
-return GetSystemMetrics(SM_REMOTESESSION);
+return GetSystemMetrics(SM_REMOTESESSION) != 0;
 #else
 return false;
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-03-31 Thread Adolfo Jayme Barrientos (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8062e6e6bb23b1fa94c66bd3ae46e2d5c2ba58ee
Author: Adolfo Jayme Barrientos 
AuthorDate: Wed Mar 31 01:44:54 2021 -0600
Commit: Gerrit Code Review 
CommitDate: Wed Mar 31 09:44:54 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to a9113079e1329ac1bcbf44c76b1419624567000a
  - Update spelling (remnants)

Change-Id: If5276323db6930782e249e902c5ad4c00334d51b

diff --git a/helpcontent2 b/helpcontent2
index 8ec0053e3f86..a9113079e132 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8ec0053e3f8610f06c7f7eae0680549a1c9fd896
+Subproject commit a9113079e1329ac1bcbf44c76b1419624567000a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-31 Thread Adolfo Jayme Barrientos (via logerrit)
 source/text/swriter/01/mm_emabod.xhp |4 ++--
 source/text/swriter/01/mm_emailmergeddoc.xhp |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a9113079e1329ac1bcbf44c76b1419624567000a
Author: Adolfo Jayme Barrientos 
AuthorDate: Tue Mar 30 14:38:55 2021 -0600
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Mar 31 01:44:28 2021 -0600

Update spelling (remnants)

Change-Id: If5276323db6930782e249e902c5ad4c00334d51b

diff --git a/source/text/swriter/01/mm_emabod.xhp 
b/source/text/swriter/01/mm_emabod.xhp
index 4c6b64c05..4b40546f8 100644
--- a/source/text/swriter/01/mm_emabod.xhp
+++ b/source/text/swriter/01/mm_emabod.xhp
@@ -22,7 +22,7 @@
 
 
 
-E-Mail Message
+Email Message
 /text/swriter/01/mm_emabod.xhp
 
 
@@ -32,7 +32,7 @@
 
 
 
-E-Mail 
Message
+Email 
Message
 Type the message and the salutation for files that you send as email 
attachments.
 
 This 
email should contain a salutation
diff --git a/source/text/swriter/01/mm_emailmergeddoc.xhp 
b/source/text/swriter/01/mm_emailmergeddoc.xhp
index 21917bbd6..2a505e5b4 100644
--- a/source/text/swriter/01/mm_emailmergeddoc.xhp
+++ b/source/text/swriter/01/mm_emailmergeddoc.xhp
@@ -57,7 +57,7 @@
 
 
 Properties
-Opens the E-Mail 
Message dialog where you can enter the email message for the mail merge 
files that are sent as attachments.
+Opens the Email 
Message dialog where you can enter the email message for the mail merge 
files that are sent as attachments.
 
 
 Name of 
the attachment
___
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' - vcl/qa

2021-03-31 Thread Mike Kaganski (via logerrit)
 vcl/qa/cppunit/complextext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f0824ab3fa5270d62194dd83aa848fded2d7d6f0
Author: Mike Kaganski 
AuthorDate: Wed Mar 31 09:43:01 2021 +0300
Commit: Mike Kaganski 
CommitDate: Wed Mar 31 09:38:21 2021 +0200

Fix the test in Windows RDP sessions

Without the fix, this is failing there with

  Test name: VclComplexTextTest::testArabic
  equality assertion failed
  - Expected: 71x14@(0,1)
  - Actual  : 70x14@(1,1)

See also commit 6f995da5a652d993ab253b3363188cd18e289728, that
tried to address the same issue (it was reverted later in commit
53539ce999cfe97378671a7186e38c32bdfc).

Change-Id: I708c22deb5f1f8a59e2e22cba14b298acaa81d5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113396
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 5c9ba1f47d00ed10960b59928befd68f6c020b15)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113356
Tested-by: Mike Kaganski 

diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index ad8f645b3b6f..4d4c112638e4 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -91,7 +91,7 @@ void VclComplexTextTest::testArabic()
 CPPUNIT_ASSERT_EQUAL(tools::Long(14), pOutDev->GetTextHeight());
 
 // exact bounding rectangle, not essentially the same as text width/height
-tools::Rectangle aBoundRect, aTestRect( 0, 1, 71, 15 );
+tools::Rectangle aBoundRect, aTestRect(isWindowsRDP() ? 1 : 0, 1, 71, 15);
 pOutDev->GetTextBoundRect(aBoundRect, aOneTwoThree);
 CPPUNIT_ASSERT_EQUAL(aTestRect, aBoundRect);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-31 Thread Mike Kaganski (via logerrit)
 vcl/qa/cppunit/complextext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5c9ba1f47d00ed10960b59928befd68f6c020b15
Author: Mike Kaganski 
AuthorDate: Wed Mar 31 09:43:01 2021 +0300
Commit: Mike Kaganski 
CommitDate: Wed Mar 31 09:37:04 2021 +0200

Fix the test in Windows RDP sessions

Without the fix, this is failing there with

  Test name: VclComplexTextTest::testArabic
  equality assertion failed
  - Expected: 71x14@(0,1)
  - Actual  : 70x14@(1,1)

See also commit 6f995da5a652d993ab253b3363188cd18e289728, that
tried to address the same issue (it was reverted later in commit
53539ce999cfe97378671a7186e38c32bdfc).

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

diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index dae468baadc7..5e830ba35439 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -86,7 +86,7 @@ void VclComplexTextTest::testArabic()
 CPPUNIT_ASSERT_EQUAL(tools::Long(14), pOutDev->GetTextHeight());
 
 // exact bounding rectangle, not essentially the same as text width/height
-tools::Rectangle aBoundRect, aTestRect( 0, 1, 71, 15 );
+tools::Rectangle aBoundRect, aTestRect(isWindowsRDP() ? 1 : 0, 1, 71, 15);
 pOutDev->GetTextBoundRect(aBoundRect, aOneTwoThree);
 CPPUNIT_ASSERT_EQUAL(aTestRect, aBoundRect);
 
___
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' - instsetoo_native/CustomTarget_install.mk postprocess/CustomTarget_signing.mk postprocess/signing solenv/bin

2021-03-31 Thread Andras Timar (via logerrit)
 instsetoo_native/CustomTarget_install.mk|2 +-
 postprocess/CustomTarget_signing.mk |2 +-
 postprocess/signing/signing.pl  |2 +-
 solenv/bin/modules/installer/windows/msp.pm |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 992acea490720ac00f6c6e5ab2edc9e29b8286e9
Author: Andras Timar 
AuthorDate: Thu Feb 11 08:27:23 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Mar 31 09:31:28 2021 +0200

try to use a different timestamp service

Change-Id: I0fdbe2871d74836d530a69532bf22c17f642c922

diff --git a/instsetoo_native/CustomTarget_install.mk 
b/instsetoo_native/CustomTarget_install.mk
index 318cb2221643..4c60da2814c7 100644
--- a/instsetoo_native/CustomTarget_install.mk
+++ b/instsetoo_native/CustomTarget_install.mk
@@ -133,7 +133,7 @@ endif # LIBO_TEST_INSTALL
touch $@
$(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),PRL)
 
-TIMESTAMPURL ?= "http://timestamp.globalsign.com/scripts/timestamp.dll";
+TIMESTAMPURL ?= "http://timestamp.digicert.com/";
 $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_signing.done: 
\
 $(if $(filter HELP,$(BUILD_TYPE)),$(call 
gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_helppack_signing.done)
 \
 $(if $(filter ODK,$(BUILD_TYPE)),$(call 
gb_CustomTarget_get_workdir,instsetoo_native/install)/msi_sdk_signing.done) \
diff --git a/postprocess/CustomTarget_signing.mk 
b/postprocess/CustomTarget_signing.mk
index 6fdd4950f4cb..85f3c0c60611 100644
--- a/postprocess/CustomTarget_signing.mk
+++ b/postprocess/CustomTarget_signing.mk
@@ -15,7 +15,7 @@ $(eval $(call 
gb_CustomTarget_register_targets,postprocess/signing,\
 ))
 
 # PFXFILE and PFXPASSWORD should be set in environment
-TIMESTAMPURL ?= "http://timestamp.globalsign.com/scripts/timestamp.dll";
+TIMESTAMPURL ?= "http://timestamp.digicert.com/";
 
 $(call gb_CustomTarget_get_workdir,postprocess/signing)/signing.done: \
$(SRCDIR)/postprocess/signing/signing.pl \
diff --git a/postprocess/signing/signing.pl b/postprocess/signing/signing.pl
index b42e5bb17e89..a443984a2a7b 100644
--- a/postprocess/signing/signing.pl
+++ b/postprocess/signing/signing.pl
@@ -242,7 +242,7 @@ sub usage   #09.07.2007 08:39
 print "\t -e filename\t\t\tFile which contains a list of files which don't 
have to be signed.\n";
 print "\t -f pfx_filename\t\t\"Personal Information Exchange\" file.\n";
 print "\t -p password\t\t\tPassword for \"Personal Information Exchange\" 
file.\n";
-print "\t -t timestamp\t\t\tTimestamp URL e.g. 
\"http://timestamp.verisign.com/scripts/timstamp.dll\"\n";;
+print "\t -t timestamp\t\t\tTimestamp URL e.g. 
\"http://timestamp.digicert.com/\"\n";;
 print "\t -l log_filename\t\tFile for logging.\n";
 print "\t -v\t\t\t\tVerbose.\n";
 }   ##usage
diff --git a/solenv/bin/modules/installer/windows/msp.pm 
b/solenv/bin/modules/installer/windows/msp.pm
index 1e76947df7b0..069b5dfeb0f6 100644
--- a/solenv/bin/modules/installer/windows/msp.pm
+++ b/solenv/bin/modules/installer/windows/msp.pm
@@ -1194,7 +1194,7 @@ sub create_msp_patch
 my $systemcall = "signtool.exe sign ";
 if ( defined($ENV{'PFXFILE'}) ) { $systemcall .= "-f $ENV{'PFXFILE'} 
"; }
 if ( defined($ENV{'PFXPASSWORD'}) ) { $systemcall .= "-p 
$ENV{'PFXPASSWORD'} "; }
-if ( defined($ENV{'TIMESTAMPURL'}) ) { $systemcall .= "-t 
$ENV{'TIMESTAMPURL'} "; } else { $systemcall .= "-t 
http://timestamp.globalsign.com/scripts/timestamp.dll "; }
+if ( defined($ENV{'TIMESTAMPURL'}) ) { $systemcall .= "-t 
$ENV{'TIMESTAMPURL'} "; } else { $systemcall .= "-t 
http://timestamp.digicert.com/ "; }
 $systemcall .= "-d \"" . $allvariables->{'PRODUCTNAME'} . " " . 
$allvariables->{'PRODUCTVERSION'} . " Patch " . 
$allvariables->{'WINDOWSPATCHLEVEL'} . "\" ";
 $systemcall .= $localmspfilename;
 installer::logger::print_message( "... code signing and timestamping 
with signtool.exe ...\n" );
___
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-03-31 Thread Noel (via logerrit)
 include/vcl/bitmap.hxx   |4 -
 include/vcl/bitmap/BitmapTypes.hxx   |4 -
 vcl/qa/cppunit/BitmapTest.cxx|   62 ---
 vcl/qa/cppunit/canvasbitmaptest.cxx  |1 
 vcl/qa/cppunit/svm/svmtest.cxx   |4 -
 vcl/source/bitmap/BitmapEmbossGreyFilter.cxx |2 
 vcl/source/bitmap/BitmapSobelGreyFilter.cxx  |2 
 vcl/source/bitmap/bitmap.cxx |   45 +++
 vcl/source/bitmap/bitmappaint.cxx|4 -
 vcl/source/gdi/pdfwriter_impl.cxx|5 --
 vcl/source/gdi/pdfwriter_impl2.cxx   |5 --
 vcl/source/helper/canvastools.cxx|1 
 12 files changed, 22 insertions(+), 117 deletions(-)

New commits:
commit a6c6f35ccc78e74cfa76397d649c1b6fc4baad29
Author: Noel 
AuthorDate: Mon Mar 29 14:23:16 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Mar 31 09:22:27 2021 +0200

drop 4bpp image formats

on a path to simplifying our internal bitmap stuff, aiming to
support a smaller set of image formats, but support them
in an accelerated fashion.

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

diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 1bfc484fee5b..eaec09ad7037 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -72,8 +72,6 @@ enum class BmpConversion
 {
 NNONE,
 N1BitThreshold,
-N4BitGreys,
-N4BitColors,
 N8BitGreys,
 N8BitColors,
 N24Bit,
@@ -526,7 +524,7 @@ public:
 const std::shared_ptr& ImplGetSalBitmap() const { return 
mxSalBmp; }
 SAL_DLLPRIVATE void ImplSetSalBitmap( const 
std::shared_ptr& xImpBmp );
 
-SAL_DLLPRIVATE bool ImplMakeGreyscales( sal_uInt16 nGreyscales );
+SAL_DLLPRIVATE bool ImplMakeGreyscales();
 
 public:
 
diff --git a/include/vcl/bitmap/BitmapTypes.hxx 
b/include/vcl/bitmap/BitmapTypes.hxx
index 866cf0b2950e..7ebf9fc8dafc 100644
--- a/include/vcl/bitmap/BitmapTypes.hxx
+++ b/include/vcl/bitmap/BitmapTypes.hxx
@@ -17,7 +17,6 @@ enum class PixelFormat
 {
 INVALID = 0,
 N1_BPP = 1,
-N4_BPP = 4,
 N8_BPP = 8,
 N24_BPP = 24,
 N32_BPP = 32
@@ -37,7 +36,8 @@ constexpr PixelFormat bitDepthToPixelFormat(sal_uInt16 
nBitDepth)
 case 1:
 return PixelFormat::N1_BPP;
 case 4:
-return PixelFormat::N4_BPP;
+assert(false);
+break;
 case 8:
 return PixelFormat::N8_BPP;
 case 24:
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 4a7cc5cc0477..655e76dc21fc 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -34,7 +34,6 @@ class BitmapTest : public CppUnit::TestFixture
 void testCreation();
 void testEmpty();
 void testMonochrome();
-void testN4Greyscale();
 void testN8Greyscale();
 void testConvert();
 void testCRC();
@@ -52,7 +51,6 @@ class BitmapTest : public CppUnit::TestFixture
 CPPUNIT_TEST(testEmpty);
 CPPUNIT_TEST(testMonochrome);
 CPPUNIT_TEST(testConvert);
-CPPUNIT_TEST(testN4Greyscale);
 CPPUNIT_TEST(testN8Greyscale);
 CPPUNIT_TEST(testCRC);
 CPPUNIT_TEST(testGreyPalette);
@@ -112,20 +110,6 @@ void BitmapTest::testCreation()
  aBmp.GetSizeBytes());
 }
 
-{
-Bitmap aBmp(Size(10, 10), vcl::PixelFormat::N4_BPP);
-Size aSize = aBmp.GetSizePixel();
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", 
static_cast(10), aSize.Width());
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", 
static_cast(10), aSize.Height());
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), 
aBmp.GetPrefSize());
-CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", 
static_cast(4),
- aBmp.GetBitCount());
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong color count", sal_Int64(16), 
aBmp.GetColorCount());
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong byte size", 
static_cast(50),
- aBmp.GetSizeBytes());
-}
-
 {
 Bitmap aBmp(Size(10, 10), vcl::PixelFormat::N8_BPP);
 Size aSize = aBmp.GetSizePixel();
@@ -260,48 +244,6 @@ void BitmapTest::testMonochrome()
  aBmpReadAccess.GetColor(3, 3));
 }
 
-void BitmapTest::testN4Greyscale()
-{
-Bitmap aBmp = createTestBitmap();
-BitmapPalette aGreyscalePalette = Bitmap::GetGreyPalette(16);
-
-aBmp.Convert(BmpConversion::N4BitGreys);
-BitmapReadAccess aBmpReadAccess(aBmp);
-
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Black pixel wrong 8-bit greyscale value", 
aGreyscalePalette[0],
- aBmpReadAccess.GetColor(0, 0));
-CPPUNIT_ASSERT_EQUAL_MESS

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

2021-03-31 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx   |3 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |   12 
 sw/source/filter/ww8/ww8atr.cxx  |   12 +++-
 3 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit 5c90f3d28de6262bb730bad106d4652e458054df
Author: Justin Luth 
AuthorDate: Wed Mar 24 15:49:47 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 09:08:25 2021 +0200

tdf#134385 doc/docxexport: maybe export false contextualspacing

Instead of LO 4.2's solution of never exporting false,
export if the inherited value would be true.
Otherwise there is no way to override an inherited value.

RTF doesn't have a "false" version of
\contextualspace, so I ignored that format.

Change-Id: I6d05eb9a5d3fbfbfca0fddd7eda0c230baa25c5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113064
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 743671e465b3..3a8530733c76 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -974,6 +974,9 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138899, 
"tdf138899.docx")
 xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
 // This was 6, not removed empty temporary paragraph at the end of the 
section
 assertXPath(pXmlDocument, "/w:document/w:body/w:p", 5);
+
+//tdf#134385: Paragraph property to "add space between paragraphs of the 
same style" was lost
+assertXPath(pXmlDocument, "//w:p[1]/w:pPr/w:contextualSpacing", "val", 
"false");
 }
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf122563, "tdf122563.docx")
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 7e67ffda5590..cd67d87495bd 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8928,6 +8928,18 @@ void DocxAttributeOutput::FormatULSpace( const 
SvxULSpaceItem& rULSpace )
 
 if (rULSpace.GetContext())
 m_pSerializer->singleElementNS(XML_w, XML_contextualSpacing);
+else
+{
+// Write out Contextual Spacing = false if it would have inherited 
a true.
+const SvxULSpaceItem* pInherited = nullptr;
+if (auto pNd = dynamic_cast(m_rExport.m_pOutFormatNode)) //paragraph
+pInherited = 
&static_cast(pNd->GetAnyFormatColl()).GetAttrSet().GetULSpace();
+else if (m_rExport.m_bStyDef && m_rExport.m_pCurrentStyle && 
m_rExport.m_pCurrentStyle->DerivedFrom()) //style
+pInherited = 
&m_rExport.m_pCurrentStyle->DerivedFrom()->GetULSpace();
+
+if (pInherited && pInherited->GetContext())
+m_pSerializer->singleElementNS(XML_w, XML_contextualSpacing, 
FSNS(XML_w, XML_val), "false");
+}
 }
 }
 
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 95b7bab8034b..985df4df45a2 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4157,7 +4157,17 @@ void WW8AttributeOutput::FormatULSpace( const 
SvxULSpaceItem& rUL )
 m_rWW8Export.InsUInt16( NS_sprm::PDyaAfter::val );
 m_rWW8Export.InsUInt16( rUL.GetLower() );
 // sprmPFContextualSpacing
-if (rUL.GetContext())
+
+// Write out Contextual Spacing = false if it would have inherited a 
true.
+const SvxULSpaceItem* pInherited = nullptr;
+if (!rUL.GetContext())
+{
+if (auto pNd = dynamic_cast(m_rWW8Export.m_pOutFormatNode)) //paragraph
+pInherited = 
&static_cast(pNd->GetAnyFormatColl()).GetAttrSet().GetULSpace();
+else if (m_rWW8Export.m_bStyDef && m_rWW8Export.m_pCurrentStyle && 
m_rWW8Export.m_pCurrentStyle->DerivedFrom()) //style
+pInherited = 
&m_rWW8Export.m_pCurrentStyle->DerivedFrom()->GetULSpace();
+}
+if (rUL.GetContext() || (pInherited && pInherited->GetContext()))
 {
 m_rWW8Export.InsUInt16(NS_sprm::PFContextualSpacing::val);
 m_rWW8Export.pO->push_back( 
static_cast(rUL.GetContext()) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-31 Thread Michael Stahl (via logerrit)
 include/xmloff/xmlnamespace.hxx  |3 
 xmlsecurity/source/helper/ooxmlsecparser.cxx | 1473 +++
 xmlsecurity/source/helper/ooxmlsecparser.hxx |   74 -
 3 files changed, 1314 insertions(+), 236 deletions(-)

New commits:
commit cc1d19f7bbaefa5fb22ebd1344112755068b93c9
Author: Michael Stahl 
AuthorDate: Tue Mar 30 17:37:31 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Mar 31 09:03:30 2021 +0200

xmlsecurity: replace OOXMLSecParser implementation

This is similar to 12b15be8f4f930a04d8056b9219ac969b42a9784 and following
commits, but OOXMLSecParser has some differences to XSecParser, such as
using a ds:Manifest, and requires a couple extra namespaces.

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

diff --git a/include/xmloff/xmlnamespace.hxx b/include/xmloff/xmlnamespace.hxx
index cabdcc7578e2..91ff2aae4cf3 100644
--- a/include/xmloff/xmlnamespace.hxx
+++ b/include/xmloff/xmlnamespace.hxx
@@ -76,6 +76,9 @@ constexpr sal_uInt16 XML_NAMESPACE_DSIG =39;
 constexpr sal_uInt16 XML_NAMESPACE_DS =  40;
 constexpr sal_uInt16 XML_NAMESPACE_XADES132 =41;
 constexpr sal_uInt16 XML_NAMESPACE_XADES141 =42;
+// OOXML digital signature extension namespaces, also based on xmldsig-core
+constexpr sal_uInt16 XML_NAMESPACE_MDSSI =   43;
+constexpr sal_uInt16 XML_NAMESPACE_MSODIGSIG =   44;
 
 // namespaces for ODF extended formats
 constexpr sal_uInt16 XML_NAMESPACE_EXT_BASE   = 50;
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx 
b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index a25872fc057d..149e323eb8f6 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -11,32 +11,1241 @@
 #include "ooxmlsecparser.hxx"
 #include 
 #include 
+
+#include 
+#include 
+
+#include 
+
 #include 
 
-using namespace com::sun::star;
+using namespace com::sun::star;
+
+class OOXMLSecParser::Context
+{
+protected:
+friend class OOXMLSecParser;
+OOXMLSecParser & m_rParser;
+private:
+std::unique_ptr m_pOldNamespaceMap;
+
+public:
+Context(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: m_rParser(rParser)
+, m_pOldNamespaceMap(std::move(pOldNamespaceMap))
+{
+}
+
+virtual ~Context() = default;
+
+virtual void StartElement(
+css::uno::Reference const& 
/*xAttrs*/)
+{
+}
+
+virtual void EndElement()
+{
+}
+
+virtual std::unique_ptr CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/);
+
+virtual void Characters(OUString const& /*rChars*/)
+{
+}
+};
+
+// it's possible that an unsupported element has an Id attribute and a
+// ds:Reference digesting it - probably this means XSecController needs to know
+// about it. (For known elements, the Id attribute is only processed according
+// to the schema.)
+class OOXMLSecParser::UnknownContext
+: public OOXMLSecParser::Context
+{
+public:
+UnknownContext(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+{
+}
+
+virtual void StartElement(
+css::uno::Reference const& xAttrs) 
override
+{
+m_rParser.HandleIdAttr(xAttrs);
+}
+};
+
+auto OOXMLSecParser::Context::CreateChildContext(
+std::unique_ptr pOldNamespaceMap,
+sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/)
+-> std::unique_ptr
+{
+// default: create new base context
+return std::make_unique(m_rParser, 
std::move(pOldNamespaceMap));
+}
+
+/**
+note: anything in ds:Object should be trusted *only* if there is a ds:Reference
+  to it so it is signed (exception: the xades:EncapsulatedX509Certificate).
+  ds:SignedInfo precedes all ds:Object.
+
+  There may be multiple ds:Signature for purpose of counter-signatures
+  but the way XAdES describes these, only the ds:SignatureValue element
+  would be referenced, so requiring a ds:Reference for anything in
+  ds:Object shouldn't cause issues.
+ */
+class OOXMLSecParser::ReferencedContextImpl
+: public OOXMLSecParser::Context
+{
+protected:
+bool m_isReferenced;
+
+public:
+ReferencedContextImpl(OOXMLSecParser & rParser,
+std::unique_ptr pOldNamespaceMap,
+bool const isReferenced)
+: OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+, m_isReferenced(isReferenced)
+{
+}
+
+OUString 
CheckIdAttrReferenced(css::uno::Reference const& 
xAttrs)
+{
+