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

2021-02-12 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/chart/tdf101894.py |   78 
 sc/qa/uitest/data/tdf101894.ods |binary
 2 files changed, 78 insertions(+)

New commits:
commit 3ec8981b4830d646ad73836d9819db4f8342b499
Author: Xisco Fauli 
AuthorDate: Fri Feb 12 17:48:00 2021 +0100
Commit: Xisco Fauli 
CommitDate: Sat Feb 13 00:30:33 2021 +0100

tdf#101894: sc: Add UItest

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

diff --git a/sc/qa/uitest/chart/tdf101894.py b/sc/qa/uitest/chart/tdf101894.py
new file mode 100644
index ..11399f0fe83d
--- /dev/null
+++ b/sc/qa/uitest/chart/tdf101894.py
@@ -0,0 +1,78 @@
+# -*- 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.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_url_for_data_file
+from uitest.uihelper.common import get_state_as_dict
+
+class tdf101894(UITestCase):
+
+  def test_tdf101894(self):
+calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf101894.ods"))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+
+document = self.ui_test.get_component()
+
+xChart = document.Sheets[0].Charts[0]
+xDataSeries = 
xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries
+
+self.assertEqual(4, len(xDataSeries))
+
+xOldSheetRanges = []
+for i in range(4):
+xRow = []
+xDS = xDataSeries[i].DataSequences
+
+self.assertEqual(2, len(xDS))
+xRow.append(xDS[0].Values.SourceRangeRepresentation)
+xRow.append(xDS[1].Values.SourceRangeRepresentation)
+xOldSheetRanges.append(xRow)
+
+# Rename the sheet first
+self.ui_test.execute_dialog_through_command(".uno:RenameTable")
+xDialog = self.xUITest.getTopFocusWindow()
+xname_entry = xDialog.getChild("name_entry")
+
+oldName = get_state_as_dict(xname_entry)['Text']
+xname_entry.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+xname_entry.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+xname_entry.executeAction("TYPE", mkPropertyValues({"TEXT":"NewName"}))
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+# Copy sheet and use the old name
+self.ui_test.execute_dialog_through_command(".uno:Move")
+xDialog = self.xUITest.getTopFocusWindow()
+newName = xDialog.getChild("newName")
+newName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+newName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+newName.executeAction("TYPE", mkPropertyValues({"TEXT": oldName}))
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+xChart = document.Sheets[0].Charts[0]
+xDataSeries = 
xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries
+
+self.assertEqual(4, len(xDataSeries))
+
+xNewSheetRanges = []
+for i in range(4):
+xRow = []
+xDS = xDataSeries[i].DataSequences
+
+self.assertEqual(2, len(xDS))
+xRow.append(xDS[0].Values.SourceRangeRepresentation)
+xRow.append(xDS[1].Values.SourceRangeRepresentation)
+xNewSheetRanges.append(xRow)
+
+self.assertEqual(xOldSheetRanges, xNewSheetRanges)
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf101894.ods b/sc/qa/uitest/data/tdf101894.ods
new file mode 100644
index ..70d8b3a0dd55
Binary files /dev/null and b/sc/qa/uitest/data/tdf101894.ods differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18nlangtag/source include/i18nlangtag svtools/inc

2021-02-12 Thread Eike Rathke (via logerrit)
 i18nlangtag/source/isolang/isolang.cxx |2 ++
 include/i18nlangtag/lang.h |2 ++
 svtools/inc/langtab.hrc|4 +++-
 3 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 9b6a84916a8f58f2c4db2c970eb2c366465c6472
Author: Eike Rathke 
AuthorDate: Fri Feb 12 21:27:40 2021 +0100
Commit: Eike Rathke 
CommitDate: Sat Feb 13 00:05:47 2021 +0100

Resolves: tdf#138839 Add Cabécar {cjp-CR} 0x06AA, Bribri {bzd-CR} 0x06AB

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

diff --git a/i18nlangtag/source/isolang/isolang.cxx 
b/i18nlangtag/source/isolang/isolang.cxx
index b1dc5dfe4b69..29b957a63976 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -690,6 +690,8 @@ IsoLanguageCountryEntry const aImplIsoLangEntries[] =
 { LANGUAGE_USER_SUNDANESE, "sun", "ID", k0},
 { LANGUAGE_USER_YAKA_DRCONGO,  "yaf", "CD", k0},
 { LANGUAGE_USER_ENGLISH_KENYA,  "en", "KE", k0},
+{ LANGUAGE_USER_CABECAR,   "cjp", "CR", k0},
+{ LANGUAGE_USER_BRIBRI,"bzd", "CR", k0},
 { LANGUAGE_MULTIPLE,   "mul", ""  , k0},// 
multiple languages, many languages are used
 { LANGUAGE_UNDETERMINED,   "und", ""  , k0},// 
undetermined language, language cannot be identified
 { LANGUAGE_NONE,   "zxx", ""  , k0},// added 
to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic 
information
diff --git a/include/i18nlangtag/lang.h b/include/i18nlangtag/lang.h
index 73f839eac9ee..ec264556 100644
--- a/include/i18nlangtag/lang.h
+++ b/include/i18nlangtag/lang.h
@@ -763,6 +763,8 @@ namespace o3tl
 #define LANGUAGE_USER_YAKA_DRCONGO  LanguageType(0x06A9)
 #define LANGUAGE_USER_ENGLISH_KENYA LanguageType(0xAC09)  /* 
makeLangID( 0x2B, getPrimaryLanguage( LANGUAGE_ENGLISH_UK)) */
 #define LANGUAGE_USER_PALI_THAI LanguageType(0x0A67)  /* 
makeLangID( 0x02, getPrimaryLanguage( LANGUAGE_USER_PALI_LATIN)) */
+#define LANGUAGE_USER_CABECAR   LanguageType(0x06AA)
+#define LANGUAGE_USER_BRIBRILanguageType(0x06AB)
 
 
 /* XXX Add new user defined LCIDs ^^^ there.
diff --git a/svtools/inc/langtab.hrc b/svtools/inc/langtab.hrc
index 49e0f8672945..280219f8e960 100644
--- a/svtools/inc/langtab.hrc
+++ b/svtools/inc/langtab.hrc
@@ -428,7 +428,9 @@ const std::pair 
STR_ARR_SVT_LANGUAGE_TABLE[] =
 { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Sundanese") , LANGUAGE_USER_SUNDANESE 
},
 { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "English (Hong Kong)") , 
LANGUAGE_ENGLISH_HONG_KONG_SAR },
 { NC_("STR_ARR_SVT_LANGUAGE_TABLE", "English (Kenya)") , 
LANGUAGE_USER_ENGLISH_KENYA },
-{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Pali Thai") , LANGUAGE_USER_PALI_THAI 
}
+{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Pali Thai") , LANGUAGE_USER_PALI_THAI 
},
+{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Cabécar") , LANGUAGE_USER_CABECAR },
+{ NC_("STR_ARR_SVT_LANGUAGE_TABLE", "Bribri") , LANGUAGE_USER_BRIBRI }
 };
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Andreas Heinisch (via logerrit)
 sc/source/ui/dbgui/tpsort.cxx   |3 ++-
 sc/source/ui/unoobj/datauno.cxx |5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 788c777c6cdf2254e8bba05321f4a9de309b15b5
Author: Andreas Heinisch 
AuthorDate: Fri Jan 8 18:05:16 2021 +0100
Commit: Andreas Heinisch 
CommitDate: Fri Feb 12 22:34:13 2021 +0100

tdf#105301 - increase the size of the sorting keys

During the import of a document, increase the number of shown sorting
keys to match the actual size accordingly.

Change-Id: I24ab596f47fadf33d0358f162d26b12c24615fa8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108987
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Andreas Heinisch 

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 4b37477b5c30..c0b84d022274 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -82,7 +82,8 @@ ScTabPageSortFields::ScTabPageSortFields(weld::Container* 
pPage, weld::DialogCon
rArgSet.Get( nWhichSort )).
 GetSortData() ),
 nFieldCount ( 0 ),
-nSortKeyCount   ( DEFSORT ),
+// show actual size of the sorting keys without limiting them to the 
default size
+nSortKeyCount(std::max(aSortData.GetSortKeyCount(), 
static_cast(DEFSORT))),
 bHasHeader  ( false ),
 bSortByRows ( false )
 
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 7d7876601709..8e8e54536037 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -321,7 +321,7 @@ void ScSortDescriptor::FillProperties( 
uno::Sequence& rSeq
 
 void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const 
uno::Sequence& rSeq )
 {
-sal_Int16 nSortSize = rParam.GetSortKeyCount();
+sal_Int32 nSortSize = static_cast(rParam.GetSortKeyCount());
 
 for (const beans::PropertyValue& rProp : rSeq)
 {
@@ -358,7 +358,8 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, 
const uno::Sequence static_cast( rParam.GetSortKeyCount() 
) )
 {
-nCount = nSortSize;
+// tdf#105301 - increase the size of the sorting keys
+nSortSize = nCount;
 rParam.maKeyState.resize(nCount);
 }
 const util::SortField* pFieldArray = aSeq.getConstArray();
___
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' - sw/source

2021-02-12 Thread Jim Raykowski (via logerrit)
 sw/source/core/frmedt/feshview.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit a7fc4a7f1be6842b0455a50f74d4869788e6018f
Author: Jim Raykowski 
AuthorDate: Mon Nov 16 08:09:11 2020 -0900
Commit: Aron Budea 
CommitDate: Fri Feb 12 22:28:59 2021 +0100

tdf#130629 Don't add object insert undo twice

Change-Id: I074afd4397b6fc4631bd00655de56b8a154d7dff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105955
Tested-by: Jenkins
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 
Reviewed-by: Jim Raykowski 
(cherry picked from commit 5110cca39cc55c8977b81f7b09873e626144b29b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105995
(cherry picked from commit 46d6effe3373a39938bde57b43dc45c4a30ce33f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110834
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 2cb024f5..8935aea0c62b 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -3154,7 +3154,12 @@ long SwFEShell::GetSectionWidth( SwFormat const & 
rFormat ) const
 }
 SdrPageView* pPageView = pDrawView->GetSdrPageView();
 SdrCreateView::SetupObjLayer(pPageView, pDrawView->GetActiveLayer(), 
pObj);
+// switch undo off or this combined with ImpEndCreate will cause two 
undos
+// see comment made in SwFEShell::EndCreate (we create our own 
undo-object!)
+const bool bUndo(GetDoc()->GetIDocumentUndoRedo().DoesUndo());
+GetDoc()->GetIDocumentUndoRedo().DoUndo(false);
 pDrawView->InsertObjectAtView(pObj, *pPageView);
+GetDoc()->GetIDocumentUndoRedo().DoUndo(bUndo);
 }
 ImpEndCreate();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Added some information about Qt Creator IDE integration to the wiki

2021-02-12 Thread Hossein Noorikhah
Hi,

On Thu, Feb 11, 2021 at 11:49 AM Michael Weghorn  wrote:

> I just double-checked it works for me with newly generated files and a
> fresh Qt Creator profile taking these steps:
>
> 1. make sure Qt Creator is not running
>
> 2. Generate the IDE integration files:
>
>  make qtcreator-ide-integration
>

I went through the sequence, and nothing has changed. It's a question for
me: why do we need a fresh Qt Creator profile? In very rare situations, I had to
clean up this profile. Also, I usually do not re-run ./autogen.sh because I
didn't have any changes in the libs/configurations, and I only pulled the latest
master from the git repository. This time, I re-ran autogen.sh again, and again
nothing has changed.

But, now I know what you're doing. I thought that only lo.pro is generated, but
now I see that lo.pro.user is also being generated. That didn't help me, because
the used Qt kit was not ok. I saw a manual Qt kit which is used for the
configuration. It was called 'Replacement for "Desktop"', so I removed it and
reconfigured the project using the appropriate kit. In this case, I
had to add the
previously discussed configurations manually.

To create a viable solution that lasts even when you re-configure the project, I
think it is needed to put all the configuration in .pro files, and not in
.pro.user files, because they can be removed/changed at any time.

And for the contents of lo.pro, I still get "." as the first
subdirectory. I have to
manually change it to "../core".

I think these manual tweaks are necessary, at least for now.

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


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-02-12 Thread Luboš Luňák (via logerrit)
 vcl/source/outdev/bitmap.cxx |   27 +++
 1 file changed, 3 insertions(+), 24 deletions(-)

New commits:
commit 27a4aea50a9efa5c839b0ae2de1f9f14a7782f11
Author: Luboš Luňák 
AuthorDate: Wed Feb 10 17:15:19 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 21:24:34 2021 +0100

always optimize bitmap transform to translate+scale if possible (tdf#138068)

Commit 828504974d70111e make OutputDevice::DrawTransformedBitmapEx()
always call DrawTransformBitmapExDirect() in preference to explicitly
converting to DrawBitmapEx() if the transformation wanted was at most
translate+scale, in the hopes that these days the backend implementations
work well enough. But it turns out only the Skia backend handles that
without loss of performance. So always do the conversion to DrawBitmapEx()
if possible. It's so simple that it possibly makes sense to always do
this, regardless of the backend.

Change-Id: I6eba68e672334c38433f53980f49400499f5d8e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110716
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 9d89d98d3349502b56da4bdd6ea287ac4cde9ce5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110781
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index dcb9a6b1d8d0..f8958a8f203a 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1241,28 +1241,6 @@ void OutputDevice::DrawTransformedBitmapEx(
 : nullptr);
 #endif
 
-// MM02 reorganize order: Prefer DrawTransformBitmapExDirect due
-// to this having evolved and is improved on quite some systems.
-// Check for exclusion parameters that may prevent using it
-static bool bAllowPreferDirectPaint(true);
-const bool bInvert(RasterOp::Invert == meRasterOp);
-const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | 
DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap ));
-const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile);
-
-if(bAllowPreferDirectPaint && bTryDirectPaint)
-{
-// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough 
here, it may
-// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned 
at
-// ImplGetDeviceTransformation declaration
-const basegfx::B2DHomMatrix 
aFullTransform(ImplGetDeviceTransformation() * rTransformation);
-
-if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx))
-{
-// we are done
-return;
-}
-}
-
 // decompose matrix to check rotation and shear
 basegfx::B2DVector aScale, aTranslate;
 double fRotate, fShearX;
@@ -1297,8 +1275,9 @@ void OutputDevice::DrawTransformedBitmapEx(
 return;
 }
 
-// MM02 bAllowPreferDirectPaint may have been false to allow
-// to specify order of executions, so give bTryDirectPaint a call
+const bool bInvert(RasterOp::Invert == meRasterOp);
+const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | 
DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap ));
+const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile);
 if(bTryDirectPaint)
 {
 // tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough 
here, it may
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: codemaker/Executable_cppumaker.mk codemaker/Executable_javamaker.mk idl/Executable_svidl.mk Makefile.in unoidl/Executable_unoidl-check.mk unoidl/Executable_unoidl-write

2021-02-12 Thread Caolán McNamara (via logerrit)
 Makefile.in   |2 +-
 codemaker/Executable_cppumaker.mk |5 -
 codemaker/Executable_javamaker.mk |5 -
 idl/Executable_svidl.mk   |5 -
 unoidl/Executable_unoidl-check.mk |5 -
 unoidl/Executable_unoidl-write.mk |5 -
 6 files changed, 21 insertions(+), 6 deletions(-)

New commits:
commit 28555fc345ac2ccdda0e4e0f3c812c646befe68b
Author: Caolán McNamara 
AuthorDate: Fri Feb 12 15:44:39 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 21:21:09 2021 +0100

fix fuzzer build

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

diff --git a/Makefile.in b/Makefile.in
index f56845c16a82..860240a8aa51 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -481,7 +481,7 @@ $(foreach ide,\
 eclipsecdt,\
 $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide
 
-fuzzers: StaticLibrary_dtoa Library_sal Library_salhelper Library_reg 
Library_store Library_unoidl codemaker Library_cppu Library_i18nlangtag 
Library_cppuhelper Library_comphelper StaticLibrary_ulingu 
StaticLibrary_findsofficepath Library_tl Library_basegfx Library_canvastools 
Library_cppcanvas Library_dbtools Library_deploymentmisc Library_editeng 
Library_i18nutil Library_localebe1 Library_sax Library_sofficeapp 
Library_ucbhelper Rdb_services udkapi offapi Library_gie Library_icg 
Library_reflection Library_invocadapt Library_bootstrap Library_introspection 
Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native 
more_fonts StaticLibrary_boost_locale StaticLibrary_fuzzerstubs 
StaticLibrary_fuzzer_core StaticLibrary_fuzzer_calc StaticLibrary_fuzzer_draw 
StaticLibrary_fuzzer_writer StaticLibrary_fuzzer_math Library_forui 
Library_binaryurp Library_io Library_invocation Library_namingservice 
Library_proxyfac Library_uuresolver Module_ure Library_wpftwriter Executable_ppt
 fuzzer Executable_cgmfuzzer Executable_ww2fuzzer Executable_ww6fuzzer 
Executable_ww8fuzzer Executable_qpwfuzzer Executable_slkfuzzer 
Executable_fodtfuzzer Executable_fodsfuzzer Executable_fodpfuzzer 
Executable_xlsfuzzer Executable_scrtffuzzer Executable_wksfuzzer 
Executable_diffuzzer Executable_docxfuzzer Executable_xlsxfuzzer 
Executable_pptxfuzzer Executable_htmlfuzzer Executable_rtffuzzer 
Executable_mmlfuzzer Executable_mtpfuzzer Executable_olefuzzer 
Executable_lwpfuzzer Executable_hwpfuzzer Executable_wmffuzzer 
Executable_dxffuzzer Executable_sftfuzzer Executable_svmfuzzer 
Executable_tiffuzzer Executable_epsfuzzer Executable_jpgfuzzer 
Executable_metfuzzer Executable_bmpfuzzer Executable_giffuzzer 
Executable_pngfuzzer Executable_602fuzzer Executable_tgafuzzer 
Executable_pcxfuzzer Executable_psdfuzzer Executable_ppmfuzzer 
Executable_pcdfuzzer Executable_rasfuzzer Executable_pctfuzzer 
Executable_xpmfuzzer Executable_xbmfuzzer
+fuzzers: StaticLibrary_dtoa StaticLibrary_zlib Library_sal Library_salhelper 
Library_reg Library_store Library_unoidl codemaker Library_cppu 
Library_i18nlangtag Library_cppuhelper Library_comphelper StaticLibrary_ulingu 
StaticLibrary_findsofficepath Library_tl Library_basegfx Library_canvastools 
Library_cppcanvas Library_dbtools Library_deploymentmisc Library_editeng 
Library_i18nutil Library_localebe1 Library_sax Library_sofficeapp 
Library_ucbhelper Rdb_services udkapi offapi Library_gie Library_icg 
Library_reflection Library_invocadapt Library_bootstrap Library_introspection 
Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native 
more_fonts StaticLibrary_boost_locale StaticLibrary_fuzzerstubs 
StaticLibrary_fuzzer_core StaticLibrary_fuzzer_calc StaticLibrary_fuzzer_draw 
StaticLibrary_fuzzer_writer StaticLibrary_fuzzer_math Library_forui 
Library_binaryurp Library_io Library_invocation Library_namingservice 
Library_proxyfac Library_uuresolver Module_ure Library_wpftwr
 iter Executable_pptfuzzer Executable_cgmfuzzer Executable_ww2fuzzer 
Executable_ww6fuzzer Executable_ww8fuzzer Executable_qpwfuzzer 
Executable_slkfuzzer Executable_fodtfuzzer Executable_fodsfuzzer 
Executable_fodpfuzzer Executable_xlsfuzzer Executable_scrtffuzzer 
Executable_wksfuzzer Executable_diffuzzer Executable_docxfuzzer 
Executable_xlsxfuzzer Executable_pptxfuzzer Executable_htmlfuzzer 
Executable_rtffuzzer Executable_mmlfuzzer Executable_mtpfuzzer 
Executable_olefuzzer Executable_lwpfuzzer Executable_hwpfuzzer 
Executable_wmffuzzer Executable_dxffuzzer Executable_sftfuzzer 
Executable_svmfuzzer Executable_tiffuzzer Executable_epsfuzzer 
Executable_jpgfuzzer Executable_metfuzzer Executable_bmpfuzzer 
Executable_giffuzzer Executable_pngfuzzer Executable_602fuzzer 
Executable_tgafuzzer Executable_pcxfuzzer Executable_psdfuzzer 
Executable_ppmfuzzer Executable_pcdfuzzer Executable_rasfuzzer 
Executable_pctfuzzer Executable_xpmfuzzer Executable_xbmfuzzer
 
 endif # MAKE_RESTARTS
 
diff --git a/codemaker/Executabl

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

2021-02-12 Thread Caolán McNamara (via logerrit)
 sd/source/ui/annotations/annotationwindow.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 3a981ad54f226723bc9749b52d62de0c536178f6
Author: Caolán McNamara 
AuthorDate: Fri Feb 12 14:45:24 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 21:20:15 2021 +0100

drop unnecessary include

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

diff --git a/sd/source/ui/annotations/annotationwindow.hxx 
b/sd/source/ui/annotations/annotationwindow.hxx
index c976322af652..79d3f73f6b91 100644
--- a/sd/source/ui/annotations/annotationwindow.hxx
+++ b/sd/source/ui/annotations/annotationwindow.hxx
@@ -19,7 +19,6 @@
 
 #pragma once
 
-#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/qa svx/source

2021-02-12 Thread Miklos Vajna (via logerrit)
 svx/qa/unit/unodraw.cxx |   33 +
 svx/source/unodraw/unoshtxt.cxx |   12 
 2 files changed, 33 insertions(+), 12 deletions(-)

New commits:
commit 043690eff82d5798774452a8364e1566b866a320
Author: Miklos Vajna 
AuthorDate: Fri Feb 12 17:22:57 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Feb 12 20:17:35 2021 +0100

svx: fix import of multiple paragraphs into title shapes

Title shapes try hard to have a single paragraph only, the Impress UI
inserts linebreaks instead of paragraphs breaks in
sd::FuText::KeyInput(), ever since commit
f47a9d9db3d06927380bb79b04bb6d4721a92d2b (initial import, 2000-09-18).
This matches the PowerPoint behavior. This is most visible when the
paragraph has a bullet associated with it.

Interestingly you can still put multiple paragraphs into title shapes
using paste special -> plain text.

In that case, it was inconsistent that we exported these multiple
paragraphs to ODP, but merged them to a single paragraph on import since
commit 0a783c1a041e2b74b7bf238d11ee2c303f6708f4 (#100190# don't allow
more then one paragraph on title text objects, 2002-06-25).

This results in loosing your bullets on save + open, both in the ODP and
PPTX cases, since removeActionLock() on the XShape triggers this tweak.
Also, PowerPoint does not do this merging on import. So fix the problem
by removing the import-time tweak but leave the UI unchanged.

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

diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx
index c0941034280e..21bb3200ba2c 100644
--- a/svx/qa/unit/unodraw.cxx
+++ b/svx/qa/unit/unodraw.cxx
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -175,6 +176,38 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
 // which has no shadow for cell text (only for cell borders and cell 
background).
 assertXPath(pDocument, "//shadow//sdrblocktext", /*nNumberOfNodes=*/0);
 }
+
+CPPUNIT_TEST_FIXTURE(UnodrawTest, testTitleShapeBullets)
+{
+// Create a title shape with 2 paragraphs in it.
+mxComponent = loadFromDesktop("private:factory/simpress",
+  
"com.sun.star.presentation.PresentationDocument");
+uno::Reference xSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xDrawPages = xSupplier->getDrawPages();
+uno::Reference xDrawPage(xDrawPages->getByIndex(0), 
uno::UNO_QUERY);
+// A default document contains a title shape and a text shape on the first 
slide.
+uno::Reference xTitleShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xTitleShapeInfo(xTitleShape, 
uno::UNO_QUERY);
+
CPPUNIT_ASSERT(xTitleShapeInfo->supportsService("com.sun.star.presentation.TitleTextShape"));
+uno::Reference xTitleShapeText(xTitleShape, 
uno::UNO_QUERY);
+uno::Reference xText = xTitleShapeText->getText();
+uno::Reference xCursor = xText->createTextCursor();
+xText->insertString(xCursor, "foo", /*bAbsorb=*/false);
+xText->insertControlCharacter(xCursor, 
text::ControlCharacter::APPEND_PARAGRAPH,
+  /*bAbsorb=*/false);
+xText->insertString(xCursor, "bar", /*bAbsorb=*/false);
+
+// Check that the title shape has 2 paragraphs.
+uno::Reference xTextEA(xText, 
uno::UNO_QUERY);
+uno::Reference xTextE = 
xTextEA->createEnumeration();
+// Has a first paragraph.
+CPPUNIT_ASSERT(xTextE->hasMoreElements());
+xTextE->nextElement();
+// Has a second paragraph.
+// Without the accompanying fix in place, this test would have failed, 
because the 2 paragraphs
+// were merged together (e.g. 1 bullet instead of 2 bullets for bulleted 
paragraphs).
+CPPUNIT_ASSERT(xTextE->hasMoreElements());
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 7f2a8af49606..39cad52c073b 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -780,18 +780,6 @@ void SvxTextEditSourceImpl::UpdateData()
 {
 if( mpOutliner->GetParagraphCount() != 1 || 
mpOutliner->GetEditEngine().GetTextLen( 0 ) )
 {
-if( mpOutliner->GetParagraphCount() > 1 )
-{
-if (pTextObj->IsTextFrame() && pTextObj->GetTextKind() 
== OBJ_TITLETEXT)
-{
-while( mpOutliner->GetParagraphCount() > 1 )
-{
-ESelection aSel( 
0,mpOutliner->GetEditEngine().GetTextLen( 0 ), 1,0 );
-mpOutliner->QuickInsertLineBreak( aSel );
-}
-

[Libreoffice-commits] core.git: helpcontent2

2021-02-12 Thread Alain Romedenne (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8478c954814623441d62838743737063fec8e6c0
Author: Alain Romedenne 
AuthorDate: Fri Feb 12 18:42:16 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Feb 12 18:42:16 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to d5eb6397f3b58d19d442c85aa4243ace4914bb59
  - sf_session new help page

 - extra bookmark & link in sf_array
 - typo in py2bas
 - typo in sf-string

Change-Id: I508722de9b4cb1e55e203ba97b470b28f1ba03ae
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110678
Tested-by: Jenkins
Reviewed-by: Alain Romedenne 

diff --git a/helpcontent2 b/helpcontent2
index b7508b8c33b5..d5eb6397f3b5 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b7508b8c33b5cb1224373c619f03ebfd92bc3130
+Subproject commit d5eb6397f3b58d19d442c85aa4243ace4914bb59
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Alain Romedenne (via logerrit)
 AllLangHelp_sbasic.mk|1 
 source/text/sbasic/python/python_2_basic.xhp |2 
 source/text/sbasic/shared/03/lib_ScriptForge.xhp |2 
 source/text/sbasic/shared/03/sf_array.xhp|8 
 source/text/sbasic/shared/03/sf_session.xhp  |  490 +++
 source/text/sbasic/shared/03/sf_string.xhp   |2 
 6 files changed, 500 insertions(+), 5 deletions(-)

New commits:
commit d5eb6397f3b58d19d442c85aa4243ace4914bb59
Author: Alain Romedenne 
AuthorDate: Wed Feb 10 15:01:28 2021 +0100
Commit: Rafael Lima 
CommitDate: Fri Feb 12 18:42:16 2021 +0100

sf_session new help page

 - extra bookmark & link in sf_array
 - typo in py2bas
 - typo in sf-string

Change-Id: I508722de9b4cb1e55e203ba97b470b28f1ba03ae
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110678
Tested-by: Jenkins
Reviewed-by: Alain Romedenne 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index 3db5bbb4d..d87b5eb2b 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -85,6 +85,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/03/sf_exception \
 helpcontent2/source/text/sbasic/shared/03/sf_ui \
 helpcontent2/source/text/sbasic/shared/03/sf_document \
+helpcontent2/source/text/sbasic/shared/03/sf_session \
 helpcontent2/source/text/sbasic/shared/03/sf_string \
 helpcontent2/source/text/sbasic/shared/03/sf_timer \
 helpcontent2/source/text/sbasic/shared/03/lib_schedule \
diff --git a/source/text/sbasic/python/python_2_basic.xhp 
b/source/text/sbasic/python/python_2_basic.xhp
index b9978122c..5cd5308c0 100644
--- a/source/text/sbasic/python/python_2_basic.xhp
+++ b/source/text/sbasic/python/python_2_basic.xhp
@@ -27,7 +27,7 @@
   Xray calls interrupting Python script execution 
to help inspect variables.
  
  
- The %PRODUCTNAME 
Application Programming Interface (API) Scripting Framework supports 
inter-language script execution between Python and Basic, or other supported 
programming languages for that matter. Arguments can be passed back and fourth 
across calls, providing they represent primitives data types that both 
languages recognize, and assuming that the Scripting Framework converts them 
appropriately.
+ The %PRODUCTNAME 
Application Programming Interface (API) Scripting Framework supports 
inter-language script execution between Python and Basic, or other supported 
programming languages for that matter. Arguments can be passed back and fourth 
across calls, provided that they represent primitive data types that both 
languages recognize, and assuming that the Scripting Framework converts them 
appropriately.
  
  It is recommended to have knowledge of Python 
standard modules and %PRODUCTNAME API features prior to perform inter-language 
calls from Python to Basic, JavaScript or any other script engine.
   
diff --git a/source/text/sbasic/shared/03/lib_ScriptForge.xhp 
b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
index 21fefe9fd..c8f191265 100644
--- a/source/text/sbasic/shared/03/lib_ScriptForge.xhp
+++ b/source/text/sbasic/shared/03/lib_ScriptForge.xhp
@@ -85,7 +85,7 @@
 L10n class Service
 Platform Service
 Services class Service
-Session Service
+
 
 TextStream class Service
 
diff --git a/source/text/sbasic/shared/03/sf_array.xhp 
b/source/text/sbasic/shared/03/sf_array.xhp
index c4df6ba66..d4b65fb01 100644
--- a/source/text/sbasic/shared/03/sf_array.xhp
+++ b/source/text/sbasic/shared/03/sf_array.xhp
@@ -17,6 +17,10 @@
 
 
 
+   
+  Array service
+   
+
ScriptForge.Array 
service
Provides a collection of methods for manipulating and 
transforming arrays of one dimension (vectors) and arrays of two dimensions 
(matrices). This includes set operations, sorting, importing to and exporting 
from text files.
Arrays with more 
than two dimensions cannot be used with the methods in this service, the only 
exception being the CountDims method that accepts Arrays 
with any number of dimensions.
@@ -197,7 +201,7 @@
   Array service;ConvertToDictionary

ConvertToDictionary
- Store the content 
of a 2-columns array into a ScriptForge Dictionary object.
+ Store the content 
of a 2-columns array into a ScriptForge.Dictionary object.
   The key will be extracted from the first column, the item from the 
second.


@@ -904,7 +908,7 @@

   
   
-   
   
+  

 
 
diff --git a/source/text/sbasic/shared/03/sf_session.xhp 
b/source/text/sbasic/shared/03/sf_session.xhp
new file mode 100644
index 0..8c9aae2f0
--- /dev/null
+++ b/source/text/sbasic/shared/03/sf_session.xhp
@@ -0,0 +1,490 @@
+
+
+
+
+
+  
+ScriptForge.Session service
+/text/sbasic/shared/03/sf_session.xhp
+  
+
+
+
+
+   
+  Session service
+   
+
+ScriptForge.Sess

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

2021-02-12 Thread László Németh (via logerrit)
 dev/null  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx|6 -
 writerfilter/source/dmapper/DomainMapper.cxx  |   13 ++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |  100 +-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |7 +
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx   |7 -
 writerfilter/source/ooxml/OOXMLDocumentImpl.hxx   |1 
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |   24 +++-
 writerfilter/source/ooxml/OOXMLParserState.cxx|8 +
 writerfilter/source/ooxml/OOXMLParserState.hxx|4 
 10 files changed, 153 insertions(+), 17 deletions(-)

New commits:
commit 9b39ce0e66acfe812e1d50e530dc2ccdef3e1357
Author: László Németh 
AuthorDate: Wed Feb 10 00:12:52 2021 +0100
Commit: László Németh 
CommitDate: Fri Feb 12 18:27:31 2021 +0100

tdf#76260 DOCX import: fix slow footnote import

by parsing footnotes.xml only once instead
of parsing again and again for every footnotes.
This was a serious performance problem for
documents with hundreds of footnotes, where the
footnote import took minutes instead of seconds.

Note: switch off CHECK_NOTMERGED in a debug build
to measure realistic speed-up, e.g. with the
reported document: 2 min 36 sec -> 22 sec, and
not 1 min 40 sec, as with CHECK_NOTMERGED.

Revert commit 60dbe21f59a45889c433727d0862c9a4274d94d2
("tdf#88126: sw_ooxmlexport15: Add unittest"), because
it was a fragile table layout test, worked only by accident.

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf88126.docx 
b/sw/qa/extras/ooxmlexport/data/tdf88126.docx
deleted file mode 100644
index 9d4d2d5d0f8c..
Binary files a/sw/qa/extras/ooxmlexport/data/tdf88126.docx and /dev/null differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 574b925a07aa..31426770648a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -130,12 +130,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf137850_compat15ZOrder, 
"tdf137850_compat15ZOrder
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in the foreground", true, 
getProperty(xShape, "Opaque"));
 }
 
-DECLARE_OOXMLEXPORT_TEST(testTdf88126, "tdf88126.docx")
-{
-// Without the fix in place, this test would have hung
-CPPUNIT_ASSERT_EQUAL(11, getPages());
-}
-
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf118701, "tdf118701.docx")
 {
 // This was 6, related to moving inline images after the page breaks
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 9ea70164c96e..4f58670aefb5 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2276,7 +2276,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 case NS_ooxml::LN_EG_RPrBase_rStyle:
 {
 OUString sConvertedName( 
m_pImpl->GetStyleSheetTable()->ConvertStyleName( sStringValue, true ) );
-if (m_pImpl->CheckFootnoteStyle())
+if (m_pImpl->CheckFootnoteStyle() && m_pImpl->GetFootnoteContext())
 
m_pImpl->SetHasFootnoteStyle(m_pImpl->GetFootnoteContext()->GetFootnoteStyle() 
== sConvertedName);
 
 // First check if the style exists in the document.
@@ -3370,6 +3370,17 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, 
size_t len)
 
 if (len == 1)
 {
+// preload all footnotes in separated footnotes
+if (sText[0] == 0x5)
+{
+if (m_pImpl->GetFootnoteCount() > -1)
+{
+m_pImpl->PopFootOrEndnote(/*bIsFootnote=*/true);
+m_pImpl->PushFootOrEndnote(/*bIsFootnote=*/true);
+}
+m_pImpl->IncrementFootnoteCount();
+}
+
 // If the footnote contains a Footnote Reference Mark, it can't be a 
custom footnote
 // **
 // This code block is wrong, as it should also be in 
m_pImpl->IsInFootOrEndnote().
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c3cbbcb2a2b9..ebfe9d625bd2 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -45,6 +45,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -305,6 +307,7 @@ DomainMapper_Impl::DomainMapper_Impl(
 m_bHasFootnoteStyle(false),
 m_bCheckFootnoteStyle(false),
 m_eSkipFootnoteState(SkipFootnoteSeparator::OFF),
+m_nFootnotes(-1),
 m_bLineNumberingSet( false ),
 m_bIsInFootnotePrope

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

2021-02-12 Thread Mike Kaganski (via logerrit)
 sal/osl/unx/tempfile.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 3380163bc0fb9dab7f289cc36b0eeb0c9b3ddaa9
Author: Mike Kaganski 
AuthorDate: Fri Feb 12 14:40:13 2021 +0100
Commit: Mike Kaganski 
CommitDate: Fri Feb 12 18:20:30 2021 +0100

Make sure osl_getTempDirURL result doesn't end with / also on unx

This is consistent with what osl_getTempDirURL does on Windows
This is a blind attempt to fix a part of a failure reported on IRC:

  /lode/dev/core/sal/qa/osl/file/osl_File.cxx:486: Assertion
  Test name: osl_FileBase::getAbsoluteFileURL::getAbsoluteFileURL_001_1
  equality assertion failed
  - Expected: 
file:///var/folders/tj/jl7sh26124n4b94tm541m6xrgn/T//relative/file1
  - Actual  : 
file:///private/var/folders/tj/jl7sh26124n4b94tm541m6xrgn/T/relative/file1
  - Assumption is wrong: ResultURL is not equal to expected URL

That "//" in Expected might be because user's TMPDIR ends with /.

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

diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx
index 01247ae24fe3..b91d4b6e0ac7 100644
--- a/sal/osl/unx/tempfile.cxx
+++ b/sal/osl/unx/tempfile.cxx
@@ -50,7 +50,10 @@ oslFileError SAL_CALL osl_getTempDirURL( rtl_uString** 
pustrTempDir )
 if ( !pValue )
 pValue = "/tmp";
 
-rtl_string2UString( &ustrTempPath, pValue, strlen( pValue ), 
osl_getThreadTextEncoding(), OSTRING_TO_OUSTRING_CVTFLAGS );
+auto nLen = strlen(pValue);
+while (nLen && pValue[nLen - 1] == '/')
+--nLen;
+rtl_string2UString( &ustrTempPath, pValue, nLen, 
osl_getThreadTextEncoding(), OSTRING_TO_OUSTRING_CVTFLAGS );
 assert(ustrTempPath);
 error = osl_getFileURLFromSystemPath( ustrTempPath, pustrTempDir );
 rtl_uString_release( ustrTempPath );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Noel (via logerrit)
 compilerplugins/clang/refcounting.cxx  |   27 +++
 compilerplugins/clang/test/refcounting.cxx |6 ++
 2 files changed, 33 insertions(+)

New commits:
commit beeed387732f95501b06b5462d450517422b18ba
Author: Noel 
AuthorDate: Fri Feb 12 12:47:09 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 12 17:38:19 2021 +0100

loplugin:refcounting check for calling delete

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

diff --git a/compilerplugins/clang/refcounting.cxx 
b/compilerplugins/clang/refcounting.cxx
index df5805542fce..fa026877680b 100644
--- a/compilerplugins/clang/refcounting.cxx
+++ b/compilerplugins/clang/refcounting.cxx
@@ -56,6 +56,7 @@ public:
 bool VisitVarDecl(const VarDecl *);
 bool VisitFunctionDecl(const FunctionDecl *);
 bool VisitTypeLoc(clang::TypeLoc typeLoc);
+bool VisitCXXDeleteExpr(const CXXDeleteExpr *);
 
 // Creation of temporaries with one argument are represented by
 // CXXFunctionalCastExpr, while any other number of arguments are
@@ -489,6 +490,32 @@ bool RefCounting::VisitTypeLoc(clang::TypeLoc typeLoc)
 return true;
 }
 
+bool RefCounting::VisitCXXDeleteExpr(const CXXDeleteExpr * cxxDeleteExpr)
+{
+if (ignoreLocation(cxxDeleteExpr))
+return true;
+StringRef aFileName = getFilenameOfLocation(
+
compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(cxxDeleteExpr)));
+if (loplugin::isSamePathname(aFileName, SRCDIR 
"/cppuhelper/source/weak.cxx"))
+return true;
+
+if (!cxxDeleteExpr->getArgument())
+return true;
+auto argType = cxxDeleteExpr->getArgument()->getType();
+if (argType.isNull() || !argType->isPointerType())
+return true;
+auto pointeeType = argType->getPointeeType();
+if (containsOWeakObjectSubclass(pointeeType))
+{
+report(
+DiagnosticsEngine::Warning,
+"cppu::OWeakObject subclass %0 being deleted via delete, should be 
managed via rtl::Reference",
+compat::getBeginLoc(cxxDeleteExpr))
+<< pointeeType
+<< cxxDeleteExpr->getSourceRange();
+}
+return true;
+}
 bool RefCounting::VisitFieldDecl(const FieldDecl * fieldDecl) {
 if (ignoreLocation(fieldDecl)) {
 return true;
diff --git a/compilerplugins/clang/test/refcounting.cxx 
b/compilerplugins/clang/test/refcounting.cxx
index 7e42094407fb..69825e6fc47b 100644
--- a/compilerplugins/clang/test/refcounting.cxx
+++ b/compilerplugins/clang/test/refcounting.cxx
@@ -51,4 +51,10 @@ rtl::Reference foo2(); // no warning expected
 // expected-error@+1 {{cppu::OWeakObject subclass 'UnoObject' being managed 
via smart pointer, should be managed via rtl::Reference [loplugin:refcounting]}}
 void foo3(std::unique_ptr p);
 
+void test2(UnoObject* pUnoObject)
+{
+// expected-error@+1 {{cppu::OWeakObject subclass 'UnoObject' being 
deleted via delete, should be managed via rtl::Reference 
[loplugin:refcounting]}}
+delete pUnoObject;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl sd/source sd/uiconfig sd/UIConfig_simpress.mk solenv/sanitizers sw/source vcl/inc vcl/source vcl/unx

2021-02-12 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx   |2 
 sd/UIConfig_simpress.mk|2 
 sd/source/ui/annotations/annotationmanager.cxx |  150 ---
 sd/source/ui/annotations/annotationmanagerimpl.hxx |7 
 sd/source/ui/annotations/annotationtag.cxx |   60 -
 sd/source/ui/annotations/annotationtag.hxx |2 
 sd/source/ui/annotations/annotationwindow.cxx  |  860 +++--
 sd/source/ui/annotations/annotationwindow.hxx  |  158 ++-
 sd/uiconfig/simpress/ui/annotation.ui  |  164 
 sd/uiconfig/simpress/ui/annotationmenu.ui  |  117 --
 sd/uiconfig/simpress/ui/annotationtagmenu.ui   |   10 
 solenv/sanitizers/ui/modules/simpress.suppr|1 
 sw/source/uibase/docvw/AnnotationWin.cxx   |1 
 sw/source/uibase/docvw/AnnotationWin2.cxx  |8 
 vcl/inc/salvtables.hxx |2 
 vcl/source/app/salvtables.cxx  |   10 
 vcl/unx/gtk3/gtk3gtkinst.cxx   |6 
 17 files changed, 769 insertions(+), 791 deletions(-)

New commits:
commit a39a3f1ad1e5e39b09ce474c0f4c0f9f4e174bbe
Author: Caolán McNamara 
AuthorDate: Tue Feb 9 12:07:27 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 17:22:14 2021 +0100

weld impress annotation window

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index c33bd97a098a..29f20ffef966 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2220,7 +2220,7 @@ public:
 
 virtual void insert(int pos, const OUString& rId, const OUString& rStr,
 const OUString* pIconName, VirtualDevice* 
pImageSurface,
-const css::uno::Reference* 
pImage,
+const css::uno::Reference& 
rImage,
 TriState eCheckRadioFalse)
 = 0;
 
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index 92d12d7ecc5c..d6b96e034661 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -104,7 +104,7 @@ $(eval $(call 
gb_UIConfig_add_toolbarfiles,modules/simpress,\
 ))
 
 $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
-   sd/uiconfig/simpress/ui/annotationmenu \
+   sd/uiconfig/simpress/ui/annotation \
sd/uiconfig/simpress/ui/annotationtagmenu \
sd/uiconfig/simpress/ui/clientboxfragment \
sd/uiconfig/simpress/ui/currentmastermenu \
diff --git a/sd/source/ui/annotations/annotationmanager.cxx 
b/sd/source/ui/annotations/annotationmanager.cxx
index d72dba3d8181..7bb4a0857968 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -168,7 +168,6 @@ AnnotationManagerImpl::AnnotationManagerImpl( 
ViewShellBase& rViewShellBase )
 , mrBase( rViewShellBase )
 , mpDoc( rViewShellBase.GetDocument() )
 , mbShowAnnotations( true )
-, mbPopupMenuActive( false )
 , mnUpdateTagsEvent( nullptr )
 {
 SdOptions* pOptions = SD_MOD()->GetSdOptions(mpDoc->GetDocumentType());
@@ -1036,35 +1035,7 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
 }
 }
 
-namespace
-{
-sal_uInt16 IdentToSID(std::string_view rIdent)
-{
-if (rIdent == "reply")
-return SID_REPLYTO_POSTIT;
-else if (rIdent == "delete")
-return SID_DELETE_POSTIT;
-else if (rIdent == "deleteby")
-return SID_DELETEALLBYAUTHOR_POSTIT;
-else if (rIdent == "deleteall")
-return SID_DELETEALL_POSTIT;
-else if (rIdent == "copy")
-return SID_COPY;
-else if (rIdent == "paste")
-return SID_PASTE;
-else if (rIdent == "bold")
-return SID_ATTR_CHAR_WEIGHT;
-else if (rIdent == "italic")
-return SID_ATTR_CHAR_POSTURE;
-else if (rIdent == "underline")
-return SID_ATTR_CHAR_UNDERLINE;
-else if (rIdent == "strike")
-return SID_ATTR_CHAR_STRIKEOUT;
-return 0;
-}
-}
-
-void AnnotationManagerImpl::ExecuteAnnotationContextMenu( const Reference< 
XAnnotation >& xAnnotation, vcl::Window* pParent, const ::tools::Rectangle& 
rContextRect, bool bButtonMenu /* = false */ )
+void AnnotationManagerImpl::ExecuteAnnotationTagContextMenu(const 
Reference& xAnnotation, weld::Widget* pParent, const 
::tools::Rectangle& rContextRect)
 {
 SfxDispatcher* pDispatcher( getDispatcher( mrBase ) );
 if( !pDispatcher )
@@ -1072,141 +1043,50 @@ void 
AnnotationManagerImpl::ExecuteAnnotationContextMenu( const Reference< XAnno
 
 const bool bReadOnly = mrBase.GetDocShell()->IsReadOnly();
 
-AnnotationWindow* pAnnotationWindow = bButtonMenu ? nullptr : 
dynamic_cast< AnnotationWindow* >( pParent );
-
-if( bReadOnly && !pAnnotationWindow )
+if (bReadOnly

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

2021-02-12 Thread Caolán McNamara (via logerrit)
 vcl/source/window/menu.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1e3198931e6e230791e863272082c1d437975008
Author: Caolán McNamara 
AuthorDate: Fri Feb 12 12:46:48 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 17:21:48 2021 +0100

avoid auto-hiding disabled menu entries with cut/copy/paste idents too

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

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index aa7afb062f15..ea3f8e95ff3d 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1264,7 +1264,8 @@ bool Menu::ImplIsVisible( sal_uInt16 nPos ) const
 else if ( pData->eType != MenuItemType::SEPARATOR ) // separators 
handled above
 {
 // tdf#86850 Always display clipboard functions
-if ( pData->aCommandStr == ".uno:Cut" || pData->aCommandStr == 
".uno:Copy" || pData->aCommandStr == ".uno:Paste" )
+if ( pData->aCommandStr == ".uno:Cut" || pData->aCommandStr == 
".uno:Copy" || pData->aCommandStr == ".uno:Paste" ||
+ pData->sIdent == ".uno:Cut" || pData->sIdent == ".uno:Copy" 
|| pData->sIdent == ".uno:Paste" )
 bVisible = true;
 else
 // bVisible = pData->bEnabled && ( !pData->pSubMenu || 
pData->pSubMenu->HasValidEntries( true ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/docvw/SidebarTxtControl.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 59ae8c36cff087277a74807f112ad6bd9dc297c4
Author: Caolán McNamara 
AuthorDate: Fri Feb 12 12:19:36 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 17:21:25 2021 +0100

Release mouse on showing context menu

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

diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx 
b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index ee8f83f6b85d..3c5de1f2b8ee 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -404,6 +404,8 @@ bool SidebarTextControl::Command( const CommandEvent& rCEvt 
)
 
 if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
 {
+if (IsMouseCaptured())
+ReleaseMouse();
 if ( !mrSidebarWin.IsProtected() &&
  pEditView &&
  pEditView->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(), 
true ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Caolán McNamara (via logerrit)
 vcl/source/window/builder.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 3148503b2f32fa7cbdbddf61523af576e36e4ef5
Author: Caolán McNamara 
AuthorDate: Fri Feb 12 11:43:31 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 17:20:27 2021 +0100

don't split menu ids at ':'

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

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index bca2a7ae9cba..2717007b0318 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -3289,11 +3289,14 @@ void VclBuilder::handleMenuObject(Menu *pParent, 
xmlreader::XmlReader &reader)
 {
 name = reader.getAttributeValue(false);
 sID = OString(name.begin, name.length);
-sal_Int32 nDelim = sID.indexOf(':');
-if (nDelim != -1)
+if (m_bLegacy)
 {
-sCustomProperty = OUString::fromUtf8(sID.subView(nDelim+1));
-sID = sID.copy(0, nDelim);
+sal_Int32 nDelim = sID.indexOf(':');
+if (nDelim != -1)
+{
+sCustomProperty = 
OUString::fromUtf8(sID.subView(nDelim+1));
+sID = sID.copy(0, nDelim);
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Mike Kaganski (via logerrit)
 sal/qa/osl/file/osl_File_Const.h |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8ef533148bac3126294b7f1988c146b02ecee7bf
Author: Mike Kaganski 
AuthorDate: Fri Feb 12 15:12:57 2021 +0100
Commit: Mike Kaganski 
CommitDate: Fri Feb 12 17:01:39 2021 +0100

Make sure to resolve symlinks in temp path in path tests

This is a blind attempt to fix a part of a failure reported on IRC:

  /lode/dev/core/sal/qa/osl/file/osl_File.cxx:486: Assertion
  Test name: osl_FileBase::getAbsoluteFileURL::getAbsoluteFileURL_001_1
  equality assertion failed
  - Expected: 
file:///var/folders/tj/jl7sh26124n4b94tm541m6xrgn/T//relative/file1
  - Actual  : 
file:///private/var/folders/tj/jl7sh26124n4b94tm541m6xrgn/T/relative/file1
  - Assumption is wrong: ResultURL is not equal to expected URL

That "private/" in Expected might be because user's /var is a
symlink
to /private/var.

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

diff --git a/sal/qa/osl/file/osl_File_Const.h b/sal/qa/osl/file/osl_File_Const.h
index 5828fbec6694..beee8d6d62d5 100644
--- a/sal/qa/osl/file/osl_File_Const.h
+++ b/sal/qa/osl/file/osl_File_Const.h
@@ -34,6 +34,9 @@ static OUString getTempDirectoryURL_()
 OUString aDir;
 CPPUNIT_ASSERT_EQUAL_MESSAGE("couldn't get system temp URL",
 osl::FileBase::E_None, osl::FileBase::getTempDirURL(aDir));
+// This resolves symlinks in the temp path if any
+CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None,
+ osl::FileBase::getAbsoluteFileURL(aDir, aDir, aDir));
 return aDir;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/chart/tdf62057.py |   59 +
 sc/qa/uitest/data/tdf62057.ods |binary
 2 files changed, 59 insertions(+)

New commits:
commit 03152ee84c09dd76d359447f9d97d564a7bbe84b
Author: Xisco Fauli 
AuthorDate: Fri Feb 12 15:02:33 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 12 16:31:15 2021 +0100

tdf#62057: sc: Add UItest

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

diff --git a/sc/qa/uitest/chart/tdf62057.py b/sc/qa/uitest/chart/tdf62057.py
new file mode 100644
index ..93c5137dc16b
--- /dev/null
+++ b/sc/qa/uitest/chart/tdf62057.py
@@ -0,0 +1,59 @@
+# -*- 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.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_url_for_data_file
+
+class tdf62057(UITestCase):
+
+  def test_tdf62057(self):
+calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf62057.ods"))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+
+document = self.ui_test.get_component()
+
+xDataMatrix = []
+for column in range(1, 3):
+xColumn = []
+for row in range(0, 6):
+xColumn.append(round(get_cell_by_position(document, 0, column, 
row).getValue(), 5))
+xDataMatrix.append(xColumn)
+
+xRowDescriptions = []
+for row in range(0, 6):
+xRowDescriptions.append(get_cell_by_position(document, 0, 0, 
row).getString())
+
+gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
+
+self.xUITest.executeCommand(".uno:Copy")
+
+self.ui_test.close_doc()
+
+self.ui_test.load_empty_file("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+
+self.xUITest.executeCommand(".uno:Paste")
+
+xData = document.Sheets[0].Charts[0].getEmbeddedObject().Data
+
+xNewDataMatrix = []
+xNewDataMatrix.append([round(item[0], 5) for item in xData.Data])
+xNewDataMatrix.append([round(item[1], 5) for item in xData.Data])
+
+# Without the fix in place, this test would have failed with
+# AssertionError: Lists differ: ['10m', '11v', '12m', '13m', '14m', '15v'] 
!= ['55.3796', '35.0989']
+self.assertEqual(xRowDescriptions, list(xData.RowDescriptions))
+
+self.assertEqual(xDataMatrix, xNewDataMatrix)
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf62057.ods b/sc/qa/uitest/data/tdf62057.ods
new file mode 100644
index ..3945c41d0318
Binary files /dev/null and b/sc/qa/uitest/data/tdf62057.ods differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/chart/tdf107097.py |   65 
 sc/qa/uitest/data/tdf107097.ods |binary
 2 files changed, 65 insertions(+)

New commits:
commit 86b192965ee8d625092b723337f6a65bdf34dcb7
Author: Xisco Fauli 
AuthorDate: Fri Feb 12 12:09:28 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 12 15:57:14 2021 +0100

tdf#107097: sc: Add UItest

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

diff --git a/sc/qa/uitest/chart/tdf107097.py b/sc/qa/uitest/chart/tdf107097.py
new file mode 100644
index ..bbf697c5cd88
--- /dev/null
+++ b/sc/qa/uitest/chart/tdf107097.py
@@ -0,0 +1,65 @@
+# -*- 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.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_url_for_data_file
+
+# Test pivot chart is pasted correctly to a new document
+
+class tdf107097(UITestCase):
+
+  def test_tdf107097(self):
+calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf107097.ods"))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+
+document = self.ui_test.get_component()
+
+xFirstMatrix = []
+for row in range(6, 18):
+xRow = []
+for column in range(3, 7):
+xRow.append(get_cell_by_position(document, 1, column, 
row).getValue())
+xFirstMatrix.append(xRow)
+
+gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"}))
+
+self.xUITest.executeCommand(".uno:Copy")
+
+self.ui_test.close_doc()
+
+self.ui_test.load_empty_file("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+
+self.xUITest.executeCommand(".uno:Paste")
+
+xData = document.Sheets[0].Charts[0].getEmbeddedObject().Data
+
+xSecondMatrix = []
+for row in xData.Data:
+xRow = []
+for value in row:
+xRow.append(value)
+xSecondMatrix.append(xRow)
+
+self.assertEqual(xFirstMatrix, xSecondMatrix)
+
+aExpectedColumnDescriptions = ('Sum - Sales T1', 'Sum - Sales T2',
+'Sum - Sales T3', 'Sum - Sales T4')
+aExpectedRowDescriptions = ('DE Berlin A', 'DE Berlin B', 'DE Munich A',
+'DE Munich B', 'EN Glasgow A', 'EN Liverpool B', 'EN London A',
+'EN London B', 'FR Nantes A', 'FR Nantes B', 'FR Paris A', 'FR 
Paris B')
+
+self.assertEqual(aExpectedColumnDescriptions, xData.ColumnDescriptions)
+self.assertEqual(aExpectedRowDescriptions, xData.RowDescriptions)
+
+self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf107097.ods b/sc/qa/uitest/data/tdf107097.ods
new file mode 100644
index ..efa9f1c013f3
Binary files /dev/null and b/sc/qa/uitest/data/tdf107097.ods differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Caolán McNamara (via logerrit)
 sw/source/core/doc/docbm.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ccec133b9021b07d16cdec6b6ad860e0a62648af
Author: Caolán McNamara 
AuthorDate: Fri Feb 12 10:44:42 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 15:33:57 2021 +0100

cid#1472878 silence Unchecked dynamic_cast

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

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index a62c371377f4..7adb634b281b 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1537,9 +1537,10 @@ namespace sw::mark
 
 if (m_pLastActiveFieldmark)
 {
-if (m_pLastActiveFieldmark->GetFieldname() == ODF_FORMDROPDOWN)
+if (auto pDrowDown = m_pLastActiveFieldmark->GetFieldname() == 
ODF_FORMDROPDOWN ?
+
dynamic_cast<::sw::mark::DropDownFieldmark*>(m_pLastActiveFieldmark) :
+nullptr)
 {
-auto pDrowDown = 
dynamic_cast<::sw::mark::DropDownFieldmark*>(m_pLastActiveFieldmark);
 pDrowDown->SendLOKShowMessage(pViewShell);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Caolán McNamara (via logerrit)
 sc/inc/refdata.hxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit e60909e5d3d7f3d38c92237a7db6bbb267ef71a0
Author: Caolán McNamara 
AuthorDate: Fri Feb 12 10:46:58 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 15:33:40 2021 +0100

cid#1472119 Uninitialized scalar field

experiment to see what coverity does with this syntax

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

diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx
index 474a3ffe703a..7674794a9a80 100644
--- a/sc/inc/refdata.hxx
+++ b/sc/inc/refdata.hxx
@@ -124,12 +124,7 @@ struct ScComplexRefData
 {
 ScSingleRefData Ref1;
 ScSingleRefData Ref2;
-bool bTrimToData;
-
-ScComplexRefData() :
-bTrimToData(false)
-// coverity[uninit_member] - remainder intentionally not initialized
-{}
+bool bTrimToData = false;
 
 void InitFlags()
 { Ref1.InitFlags(); Ref2.InitFlags(); }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Noel (via logerrit)
 include/rtl/ref.hxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 138064713af2db8e797e3aa441657f6a7500cc46
Author: Noel 
AuthorDate: Fri Feb 12 12:48:54 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 12 14:33:02 2021 +0100

add conversion operator to rtl::Reference

to make it easier to convert to uno::Reference

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

diff --git a/include/rtl/ref.hxx b/include/rtl/ref.hxx
index 37cbad4da8c0..38dfe3769e81 100644
--- a/include/rtl/ref.hxx
+++ b/include/rtl/ref.hxx
@@ -31,6 +31,7 @@
 #include 
 #ifdef LIBO_INTERNAL_ONLY
 #include 
+#include "com/sun/star/uno/Reference.h"
 #endif
 
 #include "sal/types.h"
@@ -107,6 +108,17 @@ public:
 if (m_pBody)
 m_pBody->acquire();
 }
+
+/** Up-casting conversion operator to convert to css::uno::Interface
+
+Does not work for up-casts to ambiguous bases.
+*/
+template< class super_type,
+std::enable_if_t, int> = 
0 >
+inline operator css::uno::Reference() const
+{
+return css::uno::Reference(m_pBody);
+}
 #endif
 
 /** Destructor...
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/wasm' - README.wasm RepositoryModule_host.mk solenv/gbuild

2021-02-12 Thread Jan-Marek Glogowski (via logerrit)
 README.wasm |   24 ++--
 RepositoryModule_host.mk|6 --
 solenv/gbuild/LinkTarget.mk |2 +-
 3 files changed, 23 insertions(+), 9 deletions(-)

New commits:
commit a99c59a4c7ac9ec1f7bf172c13ea4168d1c55a61
Author: Jan-Marek Glogowski 
AuthorDate: Fri Feb 12 14:01:45 2021 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Fri Feb 12 14:01:45 2021 +0100

Strip some stuff from build

Change-Id: I8c2351a03ad65f4b82ee3fd2b4d64d6cf42d4592

diff --git a/README.wasm b/README.wasm
index 2dbe16010c8d..b27c863b99f3 100644
--- a/README.wasm
+++ b/README.wasm
@@ -135,6 +135,8 @@ conventions in WASM_EmscriptenInvoke. I didn't get a reply 
to that question for
 hours. Maybe I'll open an Emscripten issue, if we really have to implement
 this.
 
+WASM dynamic dispatch: 
https://fitzgeraldnick.com/2018/04/26/how-does-dynamic-dispatch-work-in-wasm.html
+
 
 = Workaround for eventual clang WASM compiler bug =
 
@@ -160,6 +162,26 @@ from "Jul 23 2018" which pre-dates the emscripten tag 
1.39.8 from 02/14/2020 by
   If you get linking errors that archive has no index.
 
 
+= Emscripten filesystem access with threads =
+
+This is closed, but not really fixed IMHO: 
https://github.com/emscripten-core/emscripten/issues/3922
+
+
+= Dynamic libraries / modules in emscripten =
+
+There is a good summary in https://bugreports.qt.io/browse/QTBUG-63925
+
+Summary: you can't use modules and threads.
+
+This is mentioned at the end of: 
https://github.com/emscripten-core/emscripten/wiki/Linking
+The usage of MAIN_MODULE and SIDE_MODULE has other problems, a major one IMHO 
is symbol resolution at runtime only.
+So this works really more like plugins in the sense of symbol resolution 
without dependencies / rpath.
+
+There is some clang-level dynamic-linking in progress (WASM dlload). The 
follwing link is already a bit old,
+but I found it a god summary of problems to expect:
+https://iandouglasscott.com/2019/07/18/experimenting-with-webassembly-dynamic-linking-with-clang/
+
+
 = Mixed information, links, problems, TODO =
 
 More info on Qt WASM emscripten pthreads: 
https://wiki.qt.io/Qt_for_WebAssembly#Multithreading_Support
@@ -210,8 +232,6 @@ This will be interesting: 
https://emscripten.org/docs/getting_started/FAQ.html#h
 This didn't help much yet: https://github.com/emscripten-ports
 
 Emscripten supports standalone WASI binaries: 
https://github.com/emscripten-core/emscripten/wiki/WebAssembly-Standalone
-WASM dynamic dispatch: 
https://fitzgeraldnick.com/2018/04/26/how-does-dynamic-dispatch-work-in-wasm.html
-WASM dlload: 
https://iandouglasscott.com/2019/07/18/experimenting-with-webassembly-dynamic-linking-with-clang/
 
 https://www.qt.io/qt-examples-for-webassembly
 http://qtandeverything.blogspot.com/2017/06/qt-for-web-assembly.html
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 20fdf05bc117..25a314e9785a 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
animations \
apple_remote \
$(call gb_Helper_optional,AVMEDIA,avmedia) \
-   basctl \
basegfx \
basic \
bean \
@@ -103,13 +102,8 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
sal \
salhelper \
sax \
-   sc \
-   scaddins \
-   sccomp \
$(call gb_Helper_optional,DESKTOP,scp2) \
scripting \
-   sd \
-   sdext \
$(call gb_Helper_optional,DESKTOP,setup_native) \
sfx2 \
shell \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index eab38bd528a4..404b394d4e0c 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -1609,7 +1609,7 @@ $(2) : $(call gb_LinkTarget_get_target,$(1))
touch -r $$< $$@; \
else \
rm -f $$<; \
-   echo "ERROR: aux-target missing, library deleted, please try 
running make again"; \
+   echo "ERROR: aux-target $$@ missing, library deleted, please 
try running make again"; \
false; \
fi
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Aditya Pratap Singh (via logerrit)
 i18npool/source/indexentry/indexentrysupplier_default.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 8ad6257d456c595a47669846fc3ef5337653bd03
Author: Aditya Pratap Singh 
AuthorDate: Mon Feb 1 21:57:25 2021 +0530
Commit: Mike Kaganski 
CommitDate: Fri Feb 12 14:01:45 2021 +0100

tdf#42982 Add descriptions to some runtime exceptions

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

diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx 
b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index 5e541f139708..d3f4acb83924 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -173,7 +173,8 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, 
std::u16string_view algor
 keyStr = LocaleDataImpl::get()->getIndexKeysByAlgorithm(LOCALE_EN,
 
LocaleDataImpl::get()->getDefaultIndexAlgorithm(LOCALE_EN));
 if (keyStr.isEmpty())
-throw RuntimeException();
+throw RuntimeException(
+"Index::makeIndexKeys: No index keys returned by algorithm");
 }
 
 sal_Int16 len = sal::static_int_cast( keyStr.getLength() );
@@ -192,7 +193,8 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, 
std::u16string_view algor
 switch(curr) {
 case u'-': {
 if (key_count <= 0 || i + 1 >= len)
-throw RuntimeException();
+throw RuntimeException("Index::makeIndexKeys: 
key_count<=0||"
+"'-' is the last char of 
KeyString");
 for (curr = keyStr[++i]; key_count < MAX_KEYS && 
keys[key_count-1].key < curr; key_count++) {
 keys[key_count].key = keys[key_count-1].key+1;
 keys[key_count].desc.clear();
@@ -217,13 +219,13 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, 
std::u16string_view algor
 [[fallthrough]];
 case u'(': {
 if (key_count <= 0)
-throw RuntimeException();
+throw RuntimeException("Index::makeIndexKeys: 
key_count<=0");
 
 sal_Int16 end = i+1;
 for (; end < len && keyStr[end] != close; end++) ;
 
 if (end >= len) // no found
-throw RuntimeException();
+throw RuntimeException("Index::makeIndexKeys: Closing 
bracket not found");
 if (close == ')')
 keys[key_count-1].desc = keyStr.copy(i+1, end-i-1);
 else {
@@ -261,12 +263,12 @@ void Index::init(const lang::Locale &rLocale, const 
OUString& algorithm)
 if (!scriptList.hasElements()) {
 scriptList = LocaleDataImpl::get()->getUnicodeScripts(LOCALE_EN);
 if (!scriptList.hasElements())
-throw RuntimeException();
+throw RuntimeException("Index::init: scriptList is empty");
 }
 
 table_count = sal::static_int_cast( scriptList.getLength() );
 if (table_count > MAX_TABLES)
-throw RuntimeException();
+throw RuntimeException("Index::init: Length of scriptList is too big");
 
 collator->loadCollatorAlgorithm(algorithm, rLocale, 
CollatorOptions::CollatorOptions_IGNORE_CASE_ACCENT);
 sal_Int16 j=0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9c2a5eaa0a45a4afbe819d6ea91ba1fd35b0aba0
Author: Caolán McNamara 
AuthorDate: Fri Feb 12 10:11:58 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 13:53:18 2021 +0100

when there is label and icon align label to left and don't expand icon

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 2a9e02308cd3..c5b47e5080e3 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8312,8 +8312,9 @@ public:
 {
 GtkBox *pBox = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6));
 GtkWidget *pLabel = 
gtk_label_new_with_mnemonic(MapToGtkAccelerator(rStr).getStr());
+gtk_label_set_xalign(GTK_LABEL(pLabel), 0.0);
 pItem = eCheckRadioFalse != TRISTATE_INDET ? 
gtk_check_menu_item_new() : gtk_menu_item_new();
-gtk_box_pack_start(pBox, pImage, true, true, 0);
+gtk_box_pack_start(pBox, pImage, false, true, 0);
 gtk_box_pack_start(pBox, pLabel, true, true, 0);
 gtk_container_add(GTK_CONTAINER(pItem), GTK_WIDGET(pBox));
 gtk_widget_show_all(pItem);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 6ec3623275e5a064e2057f0f1d58b5bd995b5a85
Author: Tomaž Vajngerl 
AuthorDate: Fri Feb 12 19:33:06 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 12 13:30:26 2021 +0100

devtools: simplify getObjectFromAny method

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 4d6d1bdad7bc..cbf5640abd5a 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -276,12 +276,7 @@ protected:
 
 uno::Reference getObjectFromAny()
 {
-uno::Reference xInterface;
-if (maAny.hasValue() && maAny.getValueType().getTypeClass() == 
uno::TypeClass_INTERFACE)
-{
-xInterface = uno::Reference(maAny, 
uno::UNO_QUERY);
-}
-return xInterface;
+return uno::Reference(maAny, uno::UNO_QUERY);
 }
 
 ObjectInspectorNodeInterface* createNodeObjectForAny(OUString const& 
rName, uno::Any& rAny);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   39 ++--
 1 file changed, 36 insertions(+), 3 deletions(-)

New commits:
commit d547d76c3bee10447de6fd90185212a177349386
Author: Tomaž Vajngerl 
AuthorDate: Fri Feb 12 19:00:19 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 12 13:29:55 2021 +0100

devtools: handle enum values and convert to enum names

Until now enum values were ignored, but now we show the converted
enum numeric values to enum names, whcih is easier to understand
than ust pure numberic values.

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index b00bbfc72c81..4d6d1bdad7bc 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -27,6 +27,9 @@
 #include 
 #include 
 #include 
+#include 
+
+#include 
 
 #include 
 #include 
@@ -35,11 +38,15 @@
 #include 
 
 #include 
+#include 
 
 using namespace css;
 
 namespace
 {
+constexpr OUStringLiteral constTypeDescriptionManagerSingletonName
+= u"/singletons/com.sun.star.reflection.theTypeDescriptionManager";
+
 uno::Reference
 TypeToIdlClass(const uno::Type& rType, const 
uno::Reference& xContext)
 {
@@ -56,12 +63,17 @@ TypeToIdlClass(const uno::Type& rType, const 
uno::Reference& xContext)
 {
+OUString aRetStr;
+
+// return early if we don't have any value
+if (!aValue.hasValue())
+return aRetStr;
+
 uno::Type aValType = aValue.getValueType();
 uno::TypeClass eType = aValType.getTypeClass();
 
-OUString aRetStr;
 switch (eType)
 {
 case uno::TypeClass_INTERFACE:
@@ -145,6 +157,27 @@ OUString AnyToString(const uno::Any& aValue)
 aRetStr = OUString::number(aNumber);
 break;
 }
+case uno::TypeClass_ENUM:
+{
+sal_Int32 nIntValue = 0;
+if (cppu::enum2int(nIntValue, aValue))
+{
+uno::Reference xManager;
+
xManager.set(xContext->getValueByName(constTypeDescriptionManagerSingletonName),
+ uno::UNO_QUERY);
+
+uno::Reference 
xTypeDescription;
+
xTypeDescription.set(xManager->getByHierarchicalName(aValType.getTypeName()),
+ uno::UNO_QUERY);
+
+uno::Sequence aValues = 
xTypeDescription->getEnumValues();
+sal_Int32 nValuesIndex
+= std::find(aValues.begin(), aValues.end(), nIntValue) - 
aValues.begin();
+uno::Sequence aNames = 
xTypeDescription->getEnumNames();
+aRetStr = aNames[nValuesIndex];
+}
+break;
+}
 
 default:
 break;
@@ -282,7 +315,7 @@ public:
 {
 if (maAny.hasValue())
 {
-OUString aValue = AnyToString(maAny);
+OUString aValue = AnyToString(maAny, mxContext);
 OUString aType = getAnyType(maAny, mxContext);
 
 return {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   18 ++
 1 file changed, 18 insertions(+)

New commits:
commit d8cc3e7c9cbdd2959cc7b1c529909c7e4dac6e35
Author: Tomaž Vajngerl 
AuthorDate: Fri Feb 12 18:53:34 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 12 13:29:23 2021 +0100

devtools: show values of unsigned types which were missing before

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index fd51a06ee3e8..b00bbfc72c81 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -127,6 +127,24 @@ OUString AnyToString(const uno::Any& aValue)
 aRetStr = OUString::number(aNumber);
 break;
 }
+case uno::TypeClass_UNSIGNED_SHORT:
+{
+auto aNumber = aValue.get();
+aRetStr = OUString::number(aNumber);
+break;
+}
+case uno::TypeClass_UNSIGNED_LONG:
+{
+auto aNumber = aValue.get();
+aRetStr = OUString::number(aNumber);
+break;
+}
+case uno::TypeClass_UNSIGNED_HYPER:
+{
+auto aNumber = aValue.get();
+aRetStr = OUString::number(aNumber);
+break;
+}
 
 default:
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - include/vcl vcl/source

2021-02-12 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit fe0a78bb9f0915860f351ed8fb6ef76eaaafc588
Author: Tomaž Vajngerl 
AuthorDate: Tue Feb 9 19:02:25 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 12 21:02:40 2021 +0900

vcl: split-up GraphicFilter::Import into per-format methods

Change-Id: Idb5f120f47b4374fc709413a615baa606cd9b165

diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 5b18654cb81b..1943e60cdd53 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -327,6 +327,25 @@ public:
 
 void preload();
 
+ErrCode readGIF(SvStream& rStream, Graphic& rGraphic, GfxLinkType& 
rLinkType);
+ErrCode readPNG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+std::unique_ptr & rpGraphicContent, 
sal_Int32& rGraphicContentSize);
+ErrCode readJPEG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+GraphicFilterImportFlags nImportFlags);
+ErrCode readSVG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+std::unique_ptr & rpGraphicContent, 
sal_Int32& rGraphicContentSize);
+ErrCode readXBM(SvStream & rStream, Graphic & rGraphic);
+ErrCode readXPM(SvStream & rStream, Graphic & rGraphic);
+
+ErrCode readWMF_EMF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+WmfExternal const* pExtHeader, VectorGraphicDataType 
eType);
+ErrCode readWMF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType, WmfExternal const* pExtHeader);
+ErrCode readEMF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType, WmfExternal const* pExtHeader);
+
+ErrCode readPDF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType);
+ErrCode readTIFF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType);
+ErrCode readWithTypeSerializer(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType, OUString aFilterName);
+
 private:
 OUStringaFilterPath;
 FilterConfigCache*  pConfig;
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index d6b1f9e5777a..3a2e38ec5b11 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1449,17 +1449,282 @@ void GraphicFilter::preload()
 }
 }
 
+ErrCode GraphicFilter::readGIF(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType)
+{
+if (ImportGIF(rStream, rGraphic))
+{
+rLinkType = GfxLinkType::NativeGif;
+return ERRCODE_NONE;
+}
+else
+return ERRCODE_GRFILTER_FILTERERROR;
+}
+
+ErrCode GraphicFilter::readPNG(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType, std::unique_ptr & rpGraphicContent,
+sal_Int32& rGraphicContentSize)
+{
+ErrCode aReturnCode = ERRCODE_NONE;
+
+vcl::PNGReader aPNGReader(rStream);
+{
+// check if this PNG contains a GIF chunk!
+const std::vector& rChunkData = 
aPNGReader.GetChunks();
+for (auto const& chunk : rChunkData)
+{
+// Microsoft Office is storing Animated GIFs in following chunk
+if (chunk.nType == PMGCHUNG_msOG)
+{
+sal_uInt32 nChunkSize = chunk.aData.size();
+
+if (nChunkSize > 11)
+{
+const std::vector& rData = chunk.aData;
+rGraphicContentSize = nChunkSize - 11;
+SvMemoryStream aIStrm(const_cast(&rData[11]), 
rGraphicContentSize, StreamMode::READ);
+rpGraphicContent.reset(new sal_uInt8[rGraphicContentSize]);
+sal_uInt64 aCurrentPosition = aIStrm.Tell();
+aIStrm.ReadBytes(rpGraphicContent.get(), 
rGraphicContentSize);
+aIStrm.Seek(aCurrentPosition);
+ImportGIF(aIStrm, rGraphic);
+rLinkType = GfxLinkType::NativeGif;
+return aReturnCode;
+}
+}
+}
+}
+
+// PNG has no GIF chunck
+BitmapEx aBitmapEx(aPNGReader.Read());
+if (!aBitmapEx.IsEmpty())
+{
+rGraphic = aBitmapEx;
+rLinkType = GfxLinkType::NativePng;
+}
+else
+aReturnCode = ERRCODE_GRFILTER_FILTERERROR;
+
+return aReturnCode;
+}
+
+ErrCode GraphicFilter::readJPEG(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType, GraphicFilterImportFlags nImportFlags)
+{
+ErrCode aReturnCode = ERRCODE_NONE;
+
+// set LOGSIZE flag always, if not explicitly disabled
+// (see #90508 and #106763)
+if (!(nImportFlags & GraphicFilterImportFlags::DontSetLogsizeForJpeg))
+{
+nImportFlags |= GraphicFilterImportFlags::SetLogsizeForJpeg;
+}
+
+sal_uInt64 nPosition = rStream.Tell();
+if (!ImportJPEG(rStream, rGraphic, nImportFlags | 
GraphicFilterImportFlags::OnlyCreateBitmap, nullptr))
+aReturn

New Defects reported by Coverity Scan for LibreOffice

2021-02-12 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
4 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1472878:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1472878:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/doc/docbm.cxx: 1543 in 
sw::mark::MarkManager::LOKUpdateActiveField(SfxViewShell *)()
1537 
1538 if (m_pLastActiveFieldmark)
1539 {
1540 if (m_pLastActiveFieldmark->GetFieldname() == 
ODF_FORMDROPDOWN)
1541 {
1542 auto pDrowDown = 
dynamic_cast<::sw::mark::DropDownFieldmark*>(m_pLastActiveFieldmark);
>>> CID 1472878:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pDrowDown" to "SendLOKShowMessage", which 
>>> dereferences it.
1543 pDrowDown->SendLOKShowMessage(pViewShell);
1544 }
1545 }
1546 else
1547 {
1548 // Check whether we have any drop down fieldmark at all.



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DFgQe_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiMeZoV7fVQ-2FlsfEFgEOjG7F-2FF3YN3UUiAPRwS98xuTiHAhHN1M52-2F3eyiu7-2FxMSSPT-2FrO8WLXZREeFRfxrEs7H0d4J-2F3vmJ-2Fh9gWMYScTsEvPeA-2BVW9MionRUNwPvrBCeizLMpvUnXiJSOiMTnPkR77xEX4YoW4vrf3E02DCd5qj37Zu-2F5CyR2s3213hBkvcH

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


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

2021-02-12 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/layout/data/tdf72727.odt |binary
 sw/qa/extras/layout/layout2.cxx   |   22 ++
 2 files changed, 22 insertions(+)

New commits:
commit 14c86d402243c0d2730ff38a1b8ac1a4456974de
Author: Xisco Fauli 
AuthorDate: Fri Feb 12 11:26:07 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 12 12:54:37 2021 +0100

tdf#72727: sw_layoutwriter: Add unittest

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

diff --git a/sw/qa/extras/layout/data/tdf72727.odt 
b/sw/qa/extras/layout/data/tdf72727.odt
new file mode 100644
index ..606ad690703e
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf72727.odt differ
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 806da69af6a1..de6c48d56783 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -810,6 +810,28 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf124796)
 "15");
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf72727)
+{
+SwDoc* pDoc = createDoc("tdf72727.odt");
+SwDocShell* pShell = pDoc->GetDocShell();
+
+// Dump the rendering of the first page as an XML file.
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+
+// Without the fix in place, this test would have failed with
+// - Expected: 1
+// - Actual  : Series1
+assertXPathContent(pXmlDoc, 
"/metafile/push/push/push/push[3]/push/push/push/textarray[1]/text",
+   "1");
+assertXPathContent(pXmlDoc, 
"/metafile/push/push/push/push[3]/push/push/push/textarray[2]/text",
+   "2");
+assertXPathContent(pXmlDoc, 
"/metafile/push/push/push/push[3]/push/push/push/textarray[3]/text",
+   "3");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf130969)
 {
 SwDoc* pDoc = createDoc("tdf130969.docx");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - include/vcl vcl/source

2021-02-12 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit e0cee7aecae51074da9028147d31438090198750
Author: Tomaž Vajngerl 
AuthorDate: Tue Feb 9 19:02:25 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 12 20:32:57 2021 +0900

vcl: split-up GraphicFilter::Import into per-format methods

Change-Id: Idb5f120f47b4374fc709413a615baa606cd9b165

diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 5b18654cb81b..d3f6152ebd5b 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -327,6 +327,23 @@ public:
 
 void preload();
 
+ErrCode readGIF(SvStream& rStream, Graphic& rGraphic, GfxLinkType& 
rLinkType);
+ErrCode readPNG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+std::unique_ptr & rpGraphicContent, 
sal_Int32& rGraphicContentSize);
+ErrCode readJPEG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+GraphicFilterImportFlags nImportFlags);
+ErrCode readSVG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+std::unique_ptr & rpGraphicContent, 
sal_Int32& rGraphicContentSize);
+ErrCode readXBM(SvStream & rStream, Graphic & rGraphic);
+ErrCode readXPM(SvStream & rStream, Graphic & rGraphic);
+
+ErrCode readWMF_EMF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+WmfExternal const* pExtHeader, VectorGraphicDataType 
eType);
+ErrCode readWMF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType, WmfExternal const* pExtHeader);
+ErrCode readEMF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType, WmfExternal const* pExtHeader);
+
+ErrCode readPDF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType);
+ErrCode readTIFF(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType);
 private:
 OUStringaFilterPath;
 FilterConfigCache*  pConfig;
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index d6b1f9e5777a..260638039e56 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1449,17 +1449,257 @@ void GraphicFilter::preload()
 }
 }
 
+ErrCode GraphicFilter::readGIF(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType)
+{
+if (ImportGIF(rStream, rGraphic))
+{
+rLinkType = GfxLinkType::NativeGif;
+return ERRCODE_NONE;
+}
+else
+return ERRCODE_GRFILTER_FILTERERROR;
+}
+
+ErrCode GraphicFilter::readPNG(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType, std::unique_ptr & rpGraphicContent,
+sal_Int32& rGraphicContentSize)
+{
+ErrCode aReturnCode = ERRCODE_NONE;
+
+vcl::PNGReader aPNGReader(rStream);
+{
+// check if this PNG contains a GIF chunk!
+const std::vector& rChunkData = 
aPNGReader.GetChunks();
+for (auto const& chunk : rChunkData)
+{
+// Microsoft Office is storing Animated GIFs in following chunk
+if (chunk.nType == PMGCHUNG_msOG)
+{
+sal_uInt32 nChunkSize = chunk.aData.size();
+
+if (nChunkSize > 11)
+{
+const std::vector& rData = chunk.aData;
+rGraphicContentSize = nChunkSize - 11;
+SvMemoryStream aIStrm(const_cast(&rData[11]), 
rGraphicContentSize, StreamMode::READ);
+rpGraphicContent.reset(new sal_uInt8[rGraphicContentSize]);
+sal_uInt64 aCurrentPosition = aIStrm.Tell();
+aIStrm.ReadBytes(rpGraphicContent.get(), 
rGraphicContentSize);
+aIStrm.Seek(aCurrentPosition);
+ImportGIF(aIStrm, rGraphic);
+rLinkType = GfxLinkType::NativeGif;
+return aReturnCode;
+}
+}
+}
+}
+
+// PNG has no GIF chunck
+BitmapEx aBitmapEx(aPNGReader.Read());
+if (!aBitmapEx.IsEmpty())
+{
+rGraphic = aBitmapEx;
+rLinkType = GfxLinkType::NativePng;
+}
+else
+aReturnCode = ERRCODE_GRFILTER_FILTERERROR;
+
+return aReturnCode;
+}
+
+ErrCode GraphicFilter::readJPEG(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType, GraphicFilterImportFlags nImportFlags)
+{
+ErrCode aReturnCode = ERRCODE_NONE;
+
+// set LOGSIZE flag always, if not explicitly disabled
+// (see #90508 and #106763)
+if (!(nImportFlags & GraphicFilterImportFlags::DontSetLogsizeForJpeg))
+{
+nImportFlags |= GraphicFilterImportFlags::SetLogsizeForJpeg;
+}
+
+sal_uInt64 nPosition = rStream.Tell();
+if (!ImportJPEG(rStream, rGraphic, nImportFlags | 
GraphicFilterImportFlags::OnlyCreateBitmap, nullptr))
+aReturnCode = ERRCODE_GRFILTER_FILTERERROR;
+else
+{
+Bitmap& rBitmap = 
const_cast(rGraphic.GetBitmapExRef().GetBitma

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

2021-02-12 Thread Mike Kaganski (via logerrit)
 comphelper/qa/unit/threadpooltest.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 60b0bb80b3aeb52477256152dcda9ec6e4dbb9fd
Author: Mike Kaganski 
AuthorDate: Fri Feb 12 10:55:42 2021 +0100
Commit: Mike Kaganski 
CommitDate: Fri Feb 12 11:45:25 2021 +0100

Fix threadpool test for --enable-debug

NDEBUG is obviously defined then, and doWork does not use
mThreadId and mCheckEqual, resulting in errors like
"private field 'mThread' is not used".

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

diff --git a/comphelper/qa/unit/threadpooltest.cxx 
b/comphelper/qa/unit/threadpooltest.cxx
index 695aca5b421a..890fdfe93f22 100644
--- a/comphelper/qa/unit/threadpooltest.cxx
+++ b/comphelper/qa/unit/threadpooltest.cxx
@@ -121,8 +121,8 @@ public:
 }
 virtual void doWork()
 {
-assert(mCheckEqual ? osl::Thread::getCurrentIdentifier() == mThreadId
-   : osl::Thread::getCurrentIdentifier() != mThreadId);
+CPPUNIT_ASSERT(mCheckEqual ? osl::Thread::getCurrentIdentifier() == 
mThreadId
+   : osl::Thread::getCurrentIdentifier() != 
mThreadId);
 }
 };
 } // namespace
___
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-1' - sfx2/CppunitTest_sfx2_doc.mk sfx2/Module_sfx2.mk sfx2/qa sfx2/source

2021-02-12 Thread Miklos Vajna (via logerrit)
 sfx2/CppunitTest_sfx2_doc.mk |   45 +++
 sfx2/Module_sfx2.mk  |1 
 sfx2/qa/cppunit/doc.cxx  |   81 +++
 sfx2/source/doc/objserv.cxx  |5 ++
 4 files changed, 132 insertions(+)

New commits:
commit cfb5013b0b8bd85536a053df4b17b6abd419718d
Author: Miklos Vajna 
AuthorDate: Wed Feb 10 21:05:29 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 11:39:59 2021 +0100

tdf#140280 sfx2: fix crash on double-clicking a no-sign shape in read-only 
mode

Don't assume that all shapes provide an InteropGrabBag UNO property,
check for it.

(cherry picked from commit c76e6307b6cf33bda0cfa12647ed0342aecc1b29)

Change-Id: I6347c54b0631c37154424babbfbd52f802af57d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110751
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 430ab72c2cf785cd99e3275d9b76349aa9d5352c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110686
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Xisco Fauli 
Tested-by: Caolán McNamara 

diff --git a/sfx2/CppunitTest_sfx2_doc.mk b/sfx2/CppunitTest_sfx2_doc.mk
new file mode 100644
index ..02b06dfd1b14
--- /dev/null
+++ b/sfx2/CppunitTest_sfx2_doc.mk
@@ -0,0 +1,45 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# 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/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sfx2_doc))
+
+$(eval $(call gb_CppunitTest_use_externals,sfx2_doc,\
+   boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sfx2_doc, \
+sfx2/qa/cppunit/doc \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sfx2_doc, \
+comphelper \
+cppu \
+sal \
+test \
+unotest \
+sfx \
+svl \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sfx2_doc))
+
+$(eval $(call gb_CppunitTest_use_ure,sfx2_doc))
+$(eval $(call gb_CppunitTest_use_vcl,sfx2_doc))
+
+$(eval $(call gb_CppunitTest_use_rdb,sfx2_doc,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sfx2_doc,\
+   officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sfx2_doc))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk
index d64b871c2a7f..dbab052e1a0d 100644
--- a/sfx2/Module_sfx2.mk
+++ b/sfx2/Module_sfx2.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_Module_add_check_targets,sfx2,\
 CppunitTest_sfx2_controlleritem \
 CppunitTest_sfx2_classification \
 CppunitTest_sfx2_view \
+CppunitTest_sfx2_doc \
 ))
 
 $(eval $(call gb_Module_add_subsequentcheck_targets,sfx2,\
diff --git a/sfx2/qa/cppunit/doc.cxx b/sfx2/qa/cppunit/doc.cxx
new file mode 100644
index ..01e8fd7f2000
--- /dev/null
+++ b/sfx2/qa/cppunit/doc.cxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+using namespace com::sun::star;
+
+namespace
+{
+/// Covers sfx2/source/doc/ fixes.
+class Test : public test::BootstrapFixture, public unotest::MacrosTest
+{
+private:
+uno::Reference mxComponent;
+
+public:
+void setUp() override;
+void tearDown() override;
+uno::Reference& getComponent() { return mxComponent; }
+};
+
+void Test::setUp()
+{
+test::BootstrapFixture::setUp();
+
+mxDesktop.set(frame::Desktop::create(mxComponentContext));
+}
+
+void Test::tearDown()
+{
+if (mxComponent.is())
+mxComponent->dispose();
+
+test::BootstrapFixture::tearDown();
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testNoGrabBagShape)
+{
+// Load a document and select the first shape.
+css::uno::Sequence aArgs{ 
comphelper::makePropertyValue("ReadOnly",
+   
true) };
+getComponent() = loadFromDesktop("private:factory/simpress", "", aArgs);
+uno::Reference xModel(getComponent(), uno::UNO_QUERY);
+uno::Reference xDrawPagesSupplier(xModel, 
uno::UNO_QUERY);
+uno::Reference xDrawPage(
+xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
+uno::Any aShape = xDrawPage->getByIndex(0);
+uno::Reference 
xController(xModel->getCurrentController(),
+ 

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

2021-02-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |  137 
 1 file changed, 32 insertions(+), 105 deletions(-)

New commits:
commit 89afca98f060be1f6a49c47cf7eaf123dd7ed4fa
Author: Tomaž Vajngerl 
AuthorDate: Thu Feb 11 21:14:36 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 12 11:21:27 2021 +0100

devtools: remove code duplication when creating child nodes

We essentially do the same thing in PropertyNode, StructNode and
SequenceNode when creating a child node. Remove the duplication
and move it into a common place (BasicValueNode) under
createNodeObjectForAny method.

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 8dbc389d2103..fd51a06ee3e8 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -233,6 +233,8 @@ protected:
 return xInterface;
 }
 
+ObjectInspectorNodeInterface* createNodeObjectForAny(OUString const& 
rName, uno::Any& rAny);
+
 public:
 BasicValueNode(OUString const& rName, uno::Any const& rAny,
uno::Reference const& xContext)
@@ -444,47 +446,12 @@ public:
 
 for (int i = 0; i < nLength; i++)
 {
-uno::Any aCurrentAny = xIdlArray->get(maAny, i);
+uno::Any aArrayValue = xIdlArray->get(maAny, i);
 uno::Reference xCurrent;
-if (aCurrentAny.hasValue())
-{
-switch (aCurrentAny.getValueType().getTypeClass())
-{
-case uno::TypeClass_INTERFACE:
-{
-auto xInterface
-= uno::Reference(aCurrentAny, 
uno::UNO_QUERY);
-lclAppendNodeToParent(
-pTree, rParent,
-new GenericPropertiesNode(OUString::number(i), 
aCurrentAny, mxContext));
-}
-break;
-
-case uno::TypeClass_SEQUENCE:
-{
-lclAppendNodeToParent(
-pTree, rParent,
-new SequenceNode(OUString::number(i), aCurrentAny, 
mxContext));
-}
-break;
-
-case uno::TypeClass_STRUCT:
-{
-lclAppendNodeToParent(
-pTree, rParent,
-new StructNode(OUString::number(i), aCurrentAny, 
mxContext));
-}
-break;
 
-default:
-{
-lclAppendNodeToParent(
-pTree, rParent,
-new BasicValueNode(OUString::number(i), 
aCurrentAny, mxContext));
-}
-break;
-}
-}
+auto* pObjectInspectorNode = 
createNodeObjectForAny(OUString::number(i), aArrayValue);
+if (pObjectInspectorNode)
+lclAppendNodeToParent(pTree, rParent, pObjectInspectorNode);
 }
 }
 
@@ -538,41 +505,9 @@ void 
GenericPropertiesNode::fillChildren(std::unique_ptr& pTree,
 {
 }
 
-switch (aCurrentAny.getValueType().getTypeClass())
-{
-case uno::TypeClass_INTERFACE:
-{
-auto xInterface = uno::Reference(aCurrentAny, 
uno::UNO_QUERY);
-if (xInterface.is())
-{
-lclAppendNodeToParent(
-pTree, rParent,
-new GenericPropertiesNode(xProperty.Name, aCurrentAny, 
mxContext));
-}
-}
-break;
-
-case uno::TypeClass_SEQUENCE:
-{
-lclAppendNodeToParent(pTree, rParent,
-  new SequenceNode(xProperty.Name, 
aCurrentAny, mxContext));
-}
-break;
-
-case uno::TypeClass_STRUCT:
-{
-lclAppendNodeToParent(pTree, rParent,
-  new StructNode(xProperty.Name, 
aCurrentAny, mxContext));
-}
-break;
-
-default:
-{
-lclAppendNodeToParent(pTree, rParent,
-  new BasicValueNode(xProperty.Name, 
aCurrentAny, mxContext));
-}
-break;
-}
+auto* pObjectInspectorNode = createNodeObjectForAny(xProperty.Name, 
aCurrentAny);
+if (pObjectInspectorNode)
+lclAppendNodeToParent(pTree, rParent, pObjectInspectorNode);
 }
 }
 
@@ -589,42 +524,34 @@ voi

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

2021-02-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   81 
 1 file changed, 81 insertions(+)

New commits:
commit d8cfa8473c9b163747eb9172832fdbcbf886bde8
Author: Tomaž Vajngerl 
AuthorDate: Thu Feb 11 16:50:19 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 12 11:21:03 2021 +0100

devtools: handle structs in object inspector

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 65ba40428d7b..8dbc389d2103 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -406,6 +406,21 @@ public:
 }
 };
 
+class StructNode : public BasicValueNode
+{
+public:
+StructNode(OUString const& rName, uno::Any const& rAny,
+   uno::Reference const& xContext)
+: BasicValueNode(rName, rAny, xContext)
+{
+}
+
+bool shouldShowExpander() override { return true; }
+
+void fillChildren(std::unique_ptr& pTree,
+  weld::TreeIter const& rParent) override;
+};
+
 class SequenceNode : public BasicValueNode
 {
 public:
@@ -453,6 +468,14 @@ public:
 }
 break;
 
+case uno::TypeClass_STRUCT:
+{
+lclAppendNodeToParent(
+pTree, rParent,
+new StructNode(OUString::number(i), aCurrentAny, 
mxContext));
+}
+break;
+
 default:
 {
 lclAppendNodeToParent(
@@ -536,6 +559,13 @@ void 
GenericPropertiesNode::fillChildren(std::unique_ptr& pTree,
 }
 break;
 
+case uno::TypeClass_STRUCT:
+{
+lclAppendNodeToParent(pTree, rParent,
+  new StructNode(xProperty.Name, 
aCurrentAny, mxContext));
+}
+break;
+
 default:
 {
 lclAppendNodeToParent(pTree, rParent,
@@ -546,6 +576,57 @@ void 
GenericPropertiesNode::fillChildren(std::unique_ptr& pTree,
 }
 }
 
+void StructNode::fillChildren(std::unique_ptr& pTree, 
weld::TreeIter const& rParent)
+{
+auto xReflection = reflection::theCoreReflection::get(mxContext);
+uno::Reference xClass
+= xReflection->forName(maAny.getValueType().getTypeName());
+
+const auto xFields = xClass->getFields();
+
+for (auto const& xField : xFields)
+{
+OUString aFieldName = xField->getName();
+uno::Any aFieldValue = xField->get(maAny);
+
+switch (aFieldValue.getValueType().getTypeClass())
+{
+case uno::TypeClass_INTERFACE:
+{
+auto xInterface = uno::Reference(aFieldValue, 
uno::UNO_QUERY);
+if (xInterface.is())
+{
+lclAppendNodeToParent(
+pTree, rParent,
+new GenericPropertiesNode(aFieldName, aFieldValue, 
mxContext));
+}
+}
+break;
+
+case uno::TypeClass_SEQUENCE:
+{
+lclAppendNodeToParent(pTree, rParent,
+  new SequenceNode(aFieldName, 
aFieldValue, mxContext));
+}
+break;
+
+case uno::TypeClass_STRUCT:
+{
+lclAppendNodeToParent(pTree, rParent,
+  new StructNode(aFieldName, aFieldValue, 
mxContext));
+}
+break;
+
+default:
+{
+lclAppendNodeToParent(pTree, rParent,
+  new BasicValueNode(aFieldName, 
aFieldValue, mxContext));
+}
+break;
+}
+}
+}
+
 } // end anonymous namespace
 
 ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Luboš Luňák (via logerrit)
 vcl/source/outdev/bitmap.cxx |   27 +++
 1 file changed, 3 insertions(+), 24 deletions(-)

New commits:
commit 9d89d98d3349502b56da4bdd6ea287ac4cde9ce5
Author: Luboš Luňák 
AuthorDate: Wed Feb 10 17:15:19 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Feb 12 11:18:09 2021 +0100

always optimize bitmap transform to translate+scale if possible (tdf#138068)

Commit 828504974d70111e make OutputDevice::DrawTransformedBitmapEx()
always call DrawTransformBitmapExDirect() in preference to explicitly
converting to DrawBitmapEx() if the transformation wanted was at most
translate+scale, in the hopes that these days the backend implementations
work well enough. But it turns out only the Skia backend handles that
without loss of performance. So always do the conversion to DrawBitmapEx()
if possible. It's so simple that it possibly makes sense to always do
this, regardless of the backend.

Change-Id: I6eba68e672334c38433f53980f49400499f5d8e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110716
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 88056ebb0a14..c69938b11878 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1249,28 +1249,6 @@ void OutputDevice::DrawTransformedBitmapEx(
 : nullptr);
 #endif
 
-// MM02 reorganize order: Prefer DrawTransformBitmapExDirect due
-// to this having evolved and is improved on quite some systems.
-// Check for exclusion parameters that may prevent using it
-static bool bAllowPreferDirectPaint(true);
-const bool bInvert(RasterOp::Invert == meRasterOp);
-const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | 
DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap ));
-const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile);
-
-if(bAllowPreferDirectPaint && bTryDirectPaint)
-{
-// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough 
here, it may
-// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned 
at
-// ImplGetDeviceTransformation declaration
-const basegfx::B2DHomMatrix 
aFullTransform(ImplGetDeviceTransformation() * rTransformation);
-
-if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx))
-{
-// we are done
-return;
-}
-}
-
 // decompose matrix to check rotation and shear
 basegfx::B2DVector aScale, aTranslate;
 double fRotate, fShearX;
@@ -1305,8 +1283,9 @@ void OutputDevice::DrawTransformedBitmapEx(
 return;
 }
 
-// MM02 bAllowPreferDirectPaint may have been false to allow
-// to specify order of executions, so give bTryDirectPaint a call
+const bool bInvert(RasterOp::Invert == meRasterOp);
+const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | 
DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap ));
+const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile);
 if(bTryDirectPaint)
 {
 // tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough 
here, it may
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Luboš Luňák (via logerrit)
 emfio/qa/cppunit/emf/EmfImportTest.cxx |   19 ++-
 1 file changed, 6 insertions(+), 13 deletions(-)

New commits:
commit f52c5bea7775ac07cfacc232f0979a03bbdf9aa7
Author: Luboš Luňák 
AuthorDate: Thu Feb 11 16:24:18 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Feb 12 11:01:52 2021 +0100

fix test for tdf#137413

The test tested for the topleft corner to be transparent and not black,
but the bitmap has a black outline, so the corner actually should be
black, unlike the rest of the bitmap. I have no idea how the test
could have possibly passed (and those #if tests indicate that it
correctly failed with most drawing backends). What apparently enabled
this to pass was commit 828504974d70111e, which made the drawing
use DrawTransformedBitmap() implementation in the VCL backends,
and the Cairo one apparently mishandles it. Reverting 828504974d70111e
made the test fail.
This commit fixes (and simplifies) the test.

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

diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx 
b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index 20e84ca86c4a..85450a2e67a3 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -26,7 +26,6 @@
 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -384,19 +383,13 @@ void Test::TestPdfInEmf()
 // height was only 5cm, so it looked blurry.
 CPPUNIT_ASSERT_EQUAL(14321.0, pVectorGraphicData->getSizeHint().getY());
 
-#if !defined(WNT) && !defined(MACOSX)
-// Hmm, manual testing on Windows looks OK.
-BitmapEx aBitmapEx = aGraphic.GetBitmapEx();
-AlphaMask aMask = aBitmapEx.GetAlpha();
-Bitmap::ScopedReadAccess pAccess(aMask);
-Color aColor(pAccess->GetPixel(0, 0));
 // Without the accompanying fix in place, this test would have failed with:
-// - Expected: 220
-// - Actual  : 0
-// i.e. the pixel at the top left corner was entirely opaque, while it 
should be mostly
-// transparent.
-CPPUNIT_ASSERT_EQUAL(static_cast(220), aColor.GetBlue());
-#endif
+// - Expected: 0
+// - Actual  : 255
+// i.e. the pixel in the center was entirely opaque, while it should be 
transparent.
+BitmapEx aBitmapEx = aGraphic.GetBitmapEx();
+Size size = aBitmapEx.GetSizePixel();
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
aBitmapEx.GetAlpha(size.Width() / 2, size.Height() / 2));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/layout/data/tdf40260.odt |binary
 sw/qa/extras/layout/layout2.cxx   |   18 ++
 2 files changed, 18 insertions(+)

New commits:
commit a5be4c219af373d038bc034d26c63c67e9803ce8
Author: Xisco Fauli 
AuthorDate: Fri Feb 12 09:47:28 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 12 10:39:36 2021 +0100

tdf#40260: sw_layoutwriter: Add unittest

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

diff --git a/sw/qa/extras/layout/data/tdf40260.odt 
b/sw/qa/extras/layout/data/tdf40260.odt
new file mode 100644
index ..3a9c23f547cf
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf40260.odt differ
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index d3c3f247f01a..806da69af6a1 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -826,6 +826,24 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf130969)
 pXmlDoc, 
"/metafile/push[1]/push[1]/push[1]/push[4]/push[1]/textarray[5]/text", 
"0.35781");
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf40260)
+{
+SwDoc* pDoc = createDoc("tdf40260.odt");
+SwDocShell* pShell = pDoc->GetDocShell();
+
+std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile();
+MetafileXmlDump dumper;
+xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+CPPUNIT_ASSERT(pXmlDoc);
+
+// Without the fix in place, this test would have failed with
+// - Expected: f(x) = 1.26510397865547E-06 x − 5.95245604996327E-12
+// - Actual  : f(x) = 0 x − 0
+assertXPathContent(
+pXmlDoc, 
"/metafile/push/push/push/push[3]/push/push/push/textarray[19]/text",
+"f(x) = 1.26510397865547E-06 x " + OUStringChar(u'\x2212') + " 
5.95245604996327E-12");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf129054)
 {
 SwDoc* pDoc = createDoc("tdf129054.docx");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-02-12 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af94ae7e2b28c370b8f16ef5c61708baabd2e842
Author: Seth Chaiklin 
AuthorDate: Fri Feb 12 10:21:15 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Feb 12 10:21:15 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to b7508b8c33b5cb1224373c619f03ebfd92bc3130
  - update Exceptions options in AutoCorrect dialog

  For "Correct TWo INitial CApitals" description
   * update label to Correct TWo INitial CApitals or sMALL iNITIAL
   + add "small initial" to description in relevant places

  For "AutoInclude" description
   + add missing space
   * move position of  to correct position

  * update to ,,

Change-Id: I2d5b3e2f41b9e3b209e716cd6b231840d2f94d24
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110774
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index 6a01bc7252b5..b7508b8c33b5 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6a01bc7252b5fb6a4fe5a45acf203cf736066210
+Subproject commit b7508b8c33b5cb1224373c619f03ebfd92bc3130
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Seth Chaiklin (via logerrit)
 source/text/shared/01/06040300.xhp |   21 ++---
 1 file changed, 10 insertions(+), 11 deletions(-)

New commits:
commit b7508b8c33b5cb1224373c619f03ebfd92bc3130
Author: Seth Chaiklin 
AuthorDate: Thu Feb 11 17:37:38 2021 +0100
Commit: Seth Chaiklin 
CommitDate: Fri Feb 12 10:21:15 2021 +0100

update Exceptions options in AutoCorrect dialog

  For "Correct TWo INitial CApitals" description
   * update label to Correct TWo INitial CApitals or sMALL iNITIAL
   + add "small initial" to description in relevant places

  For "AutoInclude" description
   + add missing space
   * move position of  to correct position

  * update to ,,

Change-Id: I2d5b3e2f41b9e3b209e716cd6b231840d2f94d24
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110774
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/source/text/shared/01/06040300.xhp 
b/source/text/shared/01/06040300.xhp
index 676266b12..f82ec6206 100644
--- a/source/text/shared/01/06040300.xhp
+++ b/source/text/shared/01/06040300.xhp
@@ -1,6 +1,5 @@
 
 
-
 
 
-
 
 
 Exceptions
@@ -30,7 +28,7 @@
 
 
 
-Exceptions
+Exceptions
 Specify the abbreviations or letter 
combinations that you do not want $[officename] to correct 
automatically.
 
 The exceptions 
that you define depend on the current language setting. If you want, you can 
change the language setting by selecting a different language in the 
Replacements and exceptions for language box.
@@ -39,28 +37,29 @@
 
 
 
-Replacements and exceptions for language:
+Replacements and exceptions for 
language:
 Select the language for which you want to 
create or edit the replacement rules. $[officename] first searches for 
exceptions that are defined for the language at the current cursor position in 
the document, and then searches the remaining languages.
 
 
-Abbreviations (no subsequent capital)
+Abbreviations (no subsequent 
capital)
 Type an abbreviation followed by a period, 
and then click New. This prevents $[officename] from automatically 
capitalizing the first letter of the word that comes after the period at the 
end of the abbreviation.
 
 Lists the abbreviations that are not 
automatically corrected. To remove an item from the list, select the 
item, and then click Delete.
 
-Words 
with TWo INitial CApitals
-Type the word or abbreviation that starts 
with two capital letters that you do not want $[officename] to change to one 
initial capital. For example, enter PC to prevent $[officename] from changing 
PC to Pc.
+Words with TWo INitial CApitals or 
sMALL iNITIAL
+Type the word or abbreviation that starts 
with two capital letters or a small initial that you do not want $[officename] 
to change to one initial capital. For example, enter PC to prevent 
$[officename] from changing PC to Pc. Enter eBook to prevent an automatic 
change to Ebook.
 
-Lists the words or abbreviations that 
start with two initial capitals that are not automatically corrected. All words 
which start with two capital letters are listed in the field. To remove 
an item from the list, select the item, and then click 
Delete.
+Lists the words or abbreviations that 
start with two initial capitals or small initial that are not automatically 
corrected. All words which start with two capital letters or small initial are 
listed in the field. To remove an item from the list, select the item, 
and then click Delete.
+
 
 
-New
+New
 Adds the current entry to the list of 
exceptions.
 
 
 
-AutoInclude
-Automatically adds abbreviations or 
words that start with two capital letters to the corresponding list of 
exceptions. This feature only works if the Correct TWo INitial 
CApitals option or the Capitalize first letter of every 
sentence option are selected in the [T] column onOptions 
tab of this dialog. 
+AutoInclude
+Automatically adds abbreviations or 
words that start with two capital letters to the corresponding list of 
exceptions. This feature only works if the Correct TWo INitial 
CApitals option or the Capitalize first letter of every 
sentence option are selected in the [T] column on the Options 
tab of this dialog. 
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Caolán McNamara (via logerrit)
 include/vcl/weld.hxx  |   11 ++-
 sfx2/source/sidebar/SidebarController.cxx |9 ++---
 vcl/inc/salvtables.hxx|1 +
 vcl/source/app/salvtables.cxx |   13 ++---
 vcl/unx/gtk3/gtk3gtkinst.cxx  |9 +
 5 files changed, 32 insertions(+), 11 deletions(-)

New commits:
commit 1a490b71feb2340ac4f58ff1bef983ef1115e2f3
Author: Caolán McNamara 
AuthorDate: Thu Feb 11 20:57:25 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 10:10:23 2021 +0100

allow using css::graphic::XGraphic to set menu image

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 7921948027a3..c33bd97a098a 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2220,6 +2220,7 @@ public:
 
 virtual void insert(int pos, const OUString& rId, const OUString& rStr,
 const OUString* pIconName, VirtualDevice* 
pImageSurface,
+const css::uno::Reference* 
pImage,
 TriState eCheckRadioFalse)
 = 0;
 
@@ -2232,23 +2233,23 @@ public:
 
 void append(const OUString& rId, const OUString& rStr)
 {
-insert(-1, rId, rStr, nullptr, nullptr, TRISTATE_INDET);
+insert(-1, rId, rStr, nullptr, nullptr, nullptr, TRISTATE_INDET);
 }
 void append_check(const OUString& rId, const OUString& rStr)
 {
-insert(-1, rId, rStr, nullptr, nullptr, TRISTATE_TRUE);
+insert(-1, rId, rStr, nullptr, nullptr, nullptr, TRISTATE_TRUE);
 }
 void append_radio(const OUString& rId, const OUString& rStr)
 {
-insert(-1, rId, rStr, nullptr, nullptr, TRISTATE_FALSE);
+insert(-1, rId, rStr, nullptr, nullptr, nullptr, TRISTATE_FALSE);
 }
 void append(const OUString& rId, const OUString& rStr, const OUString& 
rImage)
 {
-insert(-1, rId, rStr, &rImage, nullptr, TRISTATE_INDET);
+insert(-1, rId, rStr, &rImage, nullptr, nullptr, TRISTATE_INDET);
 }
 void append(const OUString& rId, const OUString& rStr, VirtualDevice& 
rImage)
 {
-insert(-1, rId, rStr, nullptr, &rImage, TRISTATE_INDET);
+insert(-1, rId, rStr, nullptr, &rImage, nullptr, TRISTATE_INDET);
 }
 
 // return the number of toplevel nodes
diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 2af18b6d7558..ae12e361a6ba 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -1069,7 +1069,8 @@ void SidebarController::PopulatePopupMenus(weld::Menu& 
rMenu, weld::Menu& rCusto
 for (const auto& rItem : rMenuData)
 {
 OString sIdent("select" + OString::number(nIndex));
-rMenu.insert(nIndex, OUString::fromUtf8(sIdent), rItem.msDisplayName, 
nullptr, nullptr, TRISTATE_FALSE);
+rMenu.insert(nIndex, OUString::fromUtf8(sIdent), rItem.msDisplayName,
+ nullptr, nullptr, nullptr, TRISTATE_FALSE);
 rMenu.set_active(sIdent, rItem.mbIsCurrentDeck);
 rMenu.set_sensitive(sIdent, rItem.mbIsEnabled && rItem.mbIsActive);
 
@@ -1079,13 +1080,15 @@ void SidebarController::PopulatePopupMenus(weld::Menu& 
rMenu, weld::Menu& rCusto
 {
 // Don't allow the currently visible deck to be disabled.
 OString sSubIdent("nocustomize" + OString::number(nIndex));
-rCustomizationMenu.insert(nIndex, 
OUString::fromUtf8(sSubIdent), rItem.msDisplayName, nullptr, nullptr, 
TRISTATE_FALSE);
+rCustomizationMenu.insert(nIndex, 
OUString::fromUtf8(sSubIdent), rItem.msDisplayName,
+  nullptr, nullptr, nullptr, 
TRISTATE_FALSE);
 rCustomizationMenu.set_active(sSubIdent, true);
 }
 else
 {
 OString sSubIdent("customize" + OString::number(nIndex));
-rCustomizationMenu.insert(nIndex, 
OUString::fromUtf8(sSubIdent), rItem.msDisplayName, nullptr, nullptr, 
TRISTATE_TRUE);
+rCustomizationMenu.insert(nIndex, 
OUString::fromUtf8(sSubIdent), rItem.msDisplayName,
+  nullptr, nullptr, nullptr, 
TRISTATE_TRUE);
 rCustomizationMenu.set_active(sSubIdent, rItem.mbIsEnabled && 
rItem.mbIsActive);
 }
 }
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index a3941ff51e67..2416aa6ab696 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -153,6 +153,7 @@ public:
 virtual void clear() override;
 virtual void insert(int pos, const OUString& rId, const OUString& rStr,
 const OUString* pIconName, VirtualDevice* 
pImageSurface,
+const css::un

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

2021-02-12 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/app/AppDetailView.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit c08ec94ae04656e5178a704445080fe6887aac5a
Author: Caolán McNamara 
AuthorDate: Thu Feb 11 15:27:08 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 10:09:50 2021 +0100

ignore row-activated with no active cursor position

to reproduce: under gen launch base wizard, "open an existing database
file", and use the "open" button, double click a .odb.

base launches on the 2nd button down, on mouse *release* base has
appeared and has a treeview under the mouse which gets button up and
triggers "onSelected" with the unexpected no-row selected case

https: 
//crashreport.libreoffice.org/stats/crash_details/a6282ff5-d0aa-4beb-9b44-6c5fd2ca0130
Change-Id: Ic4a5fa9fc8c9c6bb0e33c165559eda966b83e3ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110768
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/app/AppDetailView.cxx 
b/dbaccess/source/ui/app/AppDetailView.cxx
index 8570db552fe1..eba80dbfb4ec 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -70,11 +70,12 @@ void OTasksWindow::updateHelpText()
 IMPL_LINK(OTasksWindow, onSelected, weld::TreeView&, rTreeView, bool)
 {
 m_nCursorIndex = rTreeView.get_cursor_index();
-assert(m_nCursorIndex != -1 && "OTasksWindow::onSelected: invalid entry!");
-URL aCommand;
-aCommand.Complete = 
reinterpret_cast(rTreeView.get_id(m_nCursorIndex).toUInt64())->sUNOCommand;
-
getDetailView()->getBorderWin().getView()->getAppController().executeChecked( 
aCommand, Sequence< PropertyValue >() );
-
+if (m_nCursorIndex != -1)
+{
+URL aCommand;
+aCommand.Complete = 
reinterpret_cast(rTreeView.get_id(m_nCursorIndex).toUInt64())->sUNOCommand;
+
getDetailView()->getBorderWin().getView()->getAppController().executeChecked( 
aCommand, Sequence< PropertyValue >() );
+}
 return true;
 }
 
___
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' - xmloff/source

2021-02-12 Thread Ouyang Leyan (via logerrit)
 xmloff/source/chart/SchXMLExport.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit b493ee37f3347b442a28ccff272ed373149041b6
Author: Ouyang Leyan 
AuthorDate: Wed Dec 16 22:13:58 2020 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 12 09:34:23 2021 +0100

tdf#136011 convert numbers in categories to string during chart export

When converting a Calc chart to a chart with an internal data source,
multi-level categories consisting only in numbers are exported as
double and not string. However, labels could only be generated from
string values so the labels were lost in the converted chart. This
commit allows labels to be generated from double values.

Change-Id: I1cc1059f5157b782beb3eefccda5257b1bc2ca29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107858
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 4a9d257bec7964c0b611b2d422b7842fc5ee38e0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110775
Reviewed-by: Xisco Fauli 

diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index 4c526f9b8236..b33ebb1ac054 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1550,7 +1550,11 @@ static void lcl_exportComplexLabel( const Sequence< 
uno::Any >& rComplexLabel, S
 OUString aString;
 if( !(rElem >>= aString) )
 {
-//todo?
+double aNum;
+if (rElem >>= aNum)
+{
+aString = OUString::number(aNum);
+}
 }
 SchXMLTools::exportText( rExport, aString, false /*bConvertTabsLFs*/ );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-12 Thread Miklos Vajna (via logerrit)
 include/vcl/filter/PDFiumLibrary.hxx |   23 ++--
 vcl/source/pdf/PDFiumLibrary.cxx |   40 ---
 2 files changed, 39 insertions(+), 24 deletions(-)

New commits:
commit 7ff14c0f79d8400ec2fe29350b0d9bc0cd51f957
Author: Miklos Vajna 
AuthorDate: Thu Feb 11 20:40:26 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Feb 12 09:06:03 2021 +0100

pdfium: eliminate FPDF_TEXTPAGE from the public header

All usage goes via the PDFiumTextPage interface now.

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

diff --git a/include/vcl/filter/PDFiumLibrary.hxx 
b/include/vcl/filter/PDFiumLibrary.hxx
index 5908f01e4ab0..eea1be960291 100644
--- a/include/vcl/filter/PDFiumLibrary.hxx
+++ b/include/vcl/filter/PDFiumLibrary.hxx
@@ -161,27 +161,18 @@ public:
 virtual int getSearchCount() = 0;
 };
 
-class VCL_DLLPUBLIC PDFiumTextPage final
+class VCL_DLLPUBLIC PDFiumTextPage
 {
-private:
-FPDF_TEXTPAGE mpTextPage;
-
-PDFiumTextPage(const PDFiumTextPage&) = delete;
-PDFiumTextPage& operator=(const PDFiumTextPage&) = delete;
-
 public:
-PDFiumTextPage(FPDF_TEXTPAGE pTextPage);
-~PDFiumTextPage();
-
-FPDF_TEXTPAGE getPointer() { return mpTextPage; }
+virtual ~PDFiumTextPage() = default;
 
-int countChars();
-unsigned int getUnicode(int index);
-std::unique_ptr findStart(const OUString& rFindWhat, 
PDFFindFlags nFlags,
-  sal_Int32 nStartIndex);
+virtual int countChars() = 0;
+virtual unsigned int getUnicode(int index) = 0;
+virtual std::unique_ptr
+findStart(const OUString& rFindWhat, PDFFindFlags nFlags, sal_Int32 
nStartIndex) = 0;
 
 /// Returned rect is no longer upside down and is in mm100.
-basegfx::B2DRectangle getCharBox(int nIndex, double fPageHeight);
+virtual basegfx::B2DRectangle getCharBox(int nIndex, double fPageHeight) = 
0;
 };
 
 class VCL_DLLPUBLIC PDFiumPage final
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index c14a73ddd469..275b5f5e21be 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -268,6 +268,29 @@ public:
 int getSearchResultIndex() override;
 int getSearchCount() override;
 };
+
+class PDFiumTextPageImpl final : public PDFiumTextPage
+{
+private:
+FPDF_TEXTPAGE mpTextPage;
+
+PDFiumTextPageImpl(const PDFiumTextPageImpl&) = delete;
+PDFiumTextPageImpl& operator=(const PDFiumTextPageImpl&) = delete;
+
+public:
+PDFiumTextPageImpl(FPDF_TEXTPAGE pTextPage);
+~PDFiumTextPageImpl();
+
+FPDF_TEXTPAGE getPointer() { return mpTextPage; }
+
+int countChars() override;
+unsigned int getUnicode(int index) override;
+std::unique_ptr findStart(const OUString& rFindWhat, 
PDFFindFlags nFlags,
+  sal_Int32 nStartIndex) 
override;
+
+/// Returned rect is no longer upside down and is in mm100.
+basegfx::B2DRectangle getCharBox(int nIndex, double fPageHeight) override;
+};
 }
 
 OUString convertPdfDateToISO8601(OUString const& rInput)
@@ -597,7 +620,7 @@ std::unique_ptr PDFiumPage::getTextPage()
 FPDF_TEXTPAGE pTextPage = FPDFText_LoadPage(mpPage);
 if (pTextPage)
 {
-pPDFiumTextPage = std::make_unique(pTextPage);
+pPDFiumTextPage = std::make_unique(pTextPage);
 }
 return pPDFiumTextPage;
 }
@@ -616,10 +639,11 @@ 
PDFiumPageObjectImpl::PDFiumPageObjectImpl(FPDF_PAGEOBJECT pPageObject)
 {
 }
 
-OUString PDFiumPageObjectImpl::getText(std::unique_ptr const& 
pTextPage)
+OUString PDFiumPageObjectImpl::getText(std::unique_ptr const& 
rTextPage)
 {
 OUString sReturnText;
 
+auto pTextPage = static_cast(rTextPage.get());
 int nBytes = FPDFTextObj_GetText(mpPageObject, pTextPage->getPointer(), 
nullptr, 0);
 assert(nBytes % 2 == 0);
 nBytes /= 2;
@@ -1108,20 +1132,20 @@ std::unique_ptr 
PDFiumAnnotationImpl::getObject(int nIndex)
 return pPDFiumPageObject;
 }
 
-PDFiumTextPage::PDFiumTextPage(FPDF_TEXTPAGE pTextPage)
+PDFiumTextPageImpl::PDFiumTextPageImpl(FPDF_TEXTPAGE pTextPage)
 : mpTextPage(pTextPage)
 {
 }
 
-PDFiumTextPage::~PDFiumTextPage()
+PDFiumTextPageImpl::~PDFiumTextPageImpl()
 {
 if (mpTextPage)
 FPDFText_ClosePage(mpTextPage);
 }
 
-int PDFiumTextPage::countChars() { return FPDFText_CountChars(mpTextPage); }
+int PDFiumTextPageImpl::countChars() { return FPDFText_CountChars(mpTextPage); 
}
 
-basegfx::B2DRectangle PDFiumTextPage::getCharBox(int nIndex, double 
fPageHeight)
+basegfx::B2DRectangle PDFiumTextPageImpl::getCharBox(int nIndex, double 
fPageHeight)
 {
 double left = 0.0;
 double right = 0.0;
@@ -1141,13 +1165,13 @@ basegfx::B2DRectangle PDFiumTextPage::getCharBox(int 
nIndex, double fPageHeight)
 return basegfx::B2DRectangle();
 }