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

2022-03-25 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/inc/conttree.hxx  |1 
 sw/source/uibase/utlui/content.cxx |   39 +
 sw/uiconfig/swriter/ui/navigatorcontextmenu.ui |9 +
 3 files changed, 49 insertions(+)

New commits:
commit b000d964fcc8849d10576bf3539bde7729db2eb1
Author: Jim Raykowski 
AuthorDate: Sat Feb 5 21:27:33 2022 -0900
Commit: Jim Raykowski 
CommitDate: Fri Mar 25 23:18:18 2022 +0100

tdf#142447 related: SwNavigator: Copy outlines

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

diff --git a/sw/source/uibase/inc/conttree.hxx 
b/sw/source/uibase/inc/conttree.hxx
index 2de7dc54f1e2..9f595def2825 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -158,6 +158,7 @@ class SwContentTree final : public SfxListener
 voidExecuteContextMenuAction(const OString& 
rSelectedPopupEntry);
 
 void DeleteOutlineSelections();
+void CopyOutlineSelections();
 
 size_t GetEntryCount() const;
 
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index c793f63740bc..619424701fb6 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1426,6 +1426,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
 
 bool bRemovePostItEntries = true;
 bool bRemoveIndexEntries = true;
+bool bRemoveCopyEntry = true;
 bool bRemoveEditEntry = true;
 bool bRemoveUnprotectEntry = true;
 bool bRemoveDeleteEntry = true;
@@ -1569,6 +1570,7 @@ IMPL_LINK(SwContentTree, CommandHdl, const CommandEvent&, 
rCEvt, bool)
 bRemoveSelectEntry = false;
 bRemoveChapterEntries = false;
 }
+bRemoveCopyEntry = false;
 }
 else if (!bReadonly && (bEditable || bDeletable))
 {
@@ -1704,7 +1706,11 @@ IMPL_LINK(SwContentTree, CommandHdl, const 
CommandEvent&, rCEvt, bool)
 bRemoveSendOutlineEntry)
 xPop->remove("separator1");
 
+if (bRemoveCopyEntry)
+xPop->remove("copy");
+
 if (bRemoveGotoEntry &&
+bRemoveCopyEntry &&
 bRemoveSelectEntry &&
 bRemoveDeleteEntry &&
 bRemoveChapterEntries &&
@@ -4053,6 +4059,8 @@ IMPL_LINK(SwContentTree, KeyInputHdl, const KeyEvent&, 
rEvent, bool)
 ExecCommand("chapterup", !aCode.IsShift());
 else if (aCode.GetCode() == KEY_DOWN)
 ExecCommand("chapterdown", !aCode.IsShift());
+else if (aCode.GetCode() == KEY_C)
+CopyOutlineSelections();
 else
 bConsumed = false;
 }
@@ -4168,6 +4176,11 @@ IMPL_LINK(SwContentTree, QueryTooltipHdl, const 
weld::TreeIter&, rEntry, OUStrin
 
 void SwContentTree::ExecuteContextMenuAction(const OString& 
rSelectedPopupEntry)
 {
+if (rSelectedPopupEntry == "copy")
+{
+CopyOutlineSelections();
+return;
+}
 if (rSelectedPopupEntry == "collapseallcategories")
 {
 std::unique_ptr xEntry = m_xTreeView->make_iterator();
@@ -4870,6 +4883,32 @@ static void lcl_AssureStdModeAtShell(SwWrtShell* 
pWrtShell)
 pWrtShell->EnterStdMode();
 }
 
+void SwContentTree::CopyOutlineSelections()
+{
+m_pActiveShell->LockView(true);
+{
+MakeAllOutlineContentTemporarilyVisible a(m_pActiveShell->GetDoc());
+lcl_AssureStdModeAtShell(m_pActiveShell);
+m_pActiveShell->EnterAddMode();
+size_t nCount = m_xTreeView->get_selected_rows().size();
+m_xTreeView->selected_foreach([this, &nCount](weld::TreeIter& rEntry){
+SwOutlineNodes::size_type nOutlinePos = 
reinterpret_cast(
+
m_xTreeView->get_id(rEntry).toInt64())->GetOutlinePos();
+m_pActiveShell->SttSelect();
+m_pActiveShell->MakeOutlineSel(nOutlinePos, nOutlinePos,
+   
!m_xTreeView->get_row_expanded(rEntry), false);
+// don't move if this is the last selected outline or the cursor 
is at start of para
+if (--nCount && !m_pActiveShell->IsSttPara())
+m_pActiveShell->Right(CRSR_SKIP_CHARS, true, 1, false);
+m_pActiveShell->EndSelect();
+return false;
+});
+m_pActiveShell->LeaveAddMode();
+
m_pActiveShell->GetView().GetViewFrame()->GetBindings().Execute(SID_COPY);
+}
+m_pActiveShell->LockView(false);
+}
+
 void SwContentTree::GotoContent(const SwContent* pCnt)
 {
 m_nLastGotoContentWasOutlinePos = SwOutlineNodes::npos;
diff --git a/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui 
b/sw/uiconfig/swriter/ui/navigatorcontextmenu.ui
index e39368556fed..d7619e643fd0 100644
--- a/sw/uiconfig/s

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

2022-03-25 Thread Stephan Bergmann (via logerrit)
 sw/inc/calbck.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4540d0593eea920691849f0b9fc073f6106cefc4
Author: Stephan Bergmann 
AuthorDate: Sat Nov 27 16:47:16 2021 +0100
Commit: Andras Timar 
CommitDate: Fri Mar 25 22:41:04 2022 +0100

Library_msword needs sw::LegacyModifyHint RTTI now in UBSan build

...since 7d3aadce8d184f72e4785827ad706d27c31a2edb "ofz#41398 drop a para
scheduled for deletion if something else deletes it", causing e.g.
CppunitTest_chart2_export to fail with

> [_RUN_] Chart2ExportTest::testStockChart
[...]
> warn:sal.osl:1981149:1981149:sal/osl/unx/module.cxx:155: 
dlopen(/home/sbergman/lo/core/instdir/program/libmswordlo.so, 257): 
/home/sbergman/lo/core/instdir/program/libmswordlo.so: undefined symbol: 
_ZTIN2sw16LegacyModifyHintE
> warn:sfx.doc:1981149:1981149:sfx2/source/doc/sfxbasemodel.cxx:3147: 
Storing has failed, no error is set!
> unknown:0:Chart2ExportTest::testStockChart
>
> An uncaught exception of type com.sun.star.io.IOException
> - SfxBaseModel::impl_store 
 
failed: 0xc10(Error Area:Io Class:Write Code:16) 
/home/sbergman/lo/core/sfx2/source/doc/sfxbasemodel.cxx:3194 
/home/sbergman/lo/core/sfx2/source/doc/sfxbasemodel.cxx:1775

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

diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 7f2224671813..7d185d053710 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -69,7 +69,7 @@ namespace sw
 class ClientIteratorBase;
 class ListenerEntry;
 void ClientNotifyAttrChg(SwModify& rModify, const SwAttrSet& aSet, 
SwAttrSet& aOld, SwAttrSet& aNew);
-struct LegacyModifyHint final: SfxHint
+struct SAL_DLLPUBLIC_RTTI LegacyModifyHint final: SfxHint
 {
 LegacyModifyHint(const SfxPoolItem* pOld, const SfxPoolItem* pNew) : 
SfxHint(SfxHintId::SwLegacyModify), m_pOld(pOld), m_pNew(pNew) {};
 sal_uInt16 GetWhich() const { return m_pOld ? m_pOld->Which() : m_pNew 
? m_pNew->Which() : 0; };


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

2022-03-25 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint90.rtf |1 +
 sw/qa/extras/layout/layout.cxx|6 ++
 sw/source/core/layout/tabfrm.cxx  |   21 +++--
 3 files changed, 26 insertions(+), 2 deletions(-)

New commits:
commit 8910ab087c90972ce627591fb3206a9434aeac83
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 20:09:32 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 25 22:29:06 2022 +0100

forcepoint#90 fix crash on layout of specific rtf

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

diff --git a/sw/qa/extras/layout/data/forcepoint90.rtf 
b/sw/qa/extras/layout/data/forcepoint90.rtf
new file mode 100644
index ..82c26224292d
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint90.rtf
@@ -0,0 +1 @@

... etc. - the rest is truncated


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

2022-03-25 Thread Caolán McNamara (via logerrit)
 sw/qa/extras/layout/data/forcepoint89.html |binary
 sw/qa/extras/layout/layout.cxx |6 ++
 sw/source/core/layout/layact.cxx   |3 ++-
 3 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 448fa0bc518e0813b26e5d6c6178444b1264
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 12:10:32 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 25 22:02:59 2022 +0100

forcepoint#89 don't remove page with footnote continuation frame

in browse/html/web mode

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

diff --git a/sw/qa/extras/layout/data/forcepoint89.html 
b/sw/qa/extras/layout/data/forcepoint89.html
new file mode 100644
index ..7998a2b0b979
Binary files /dev/null and b/sw/qa/extras/layout/data/forcepoint89.html differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index d44cceac3eff..38ce7fa2a37b 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2497,6 +2497,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testN4LA0OHZ)
 createSwDoc(DATA_DIRECTORY, "LIBREOFFICE-N4LA0OHZ.rtf");
 }
 
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint89)
+{
+createSwWebDoc(DATA_DIRECTORY, "forcepoint89.html");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
 {
 SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118058.fodt");
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index c7a00139478a..558cbdff22f8 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -296,7 +296,8 @@ bool SwLayAction::RemoveEmptyBrowserPages()
 do
 {
 if ( (pPage->GetSortedObjs() && pPage->GetSortedObjs()->size()) ||
- pPage->ContainsContent() )
+ pPage->ContainsContent() ||
+ pPage->FindFootnoteCont() )
 pPage = static_cast(pPage->GetNext());
 else
 {


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 11 commits - include/connectivity include/ucbhelper include/vcl officecfg/registry readlicense_oo/license sc/qa sc/source sd/qa sd/

2022-03-25 Thread Andras Timar (via logerrit)
 include/connectivity/paramwrapper.hxx  |2 
 include/connectivity/sdbcx/VCollection.hxx |2 
 include/ucbhelper/interactionrequest.hxx   |6 
 include/vcl/IDialogRenderable.hxx  |2 
 include/vcl/customweld.hxx |1 
 include/vcl/metaact.hxx|8 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 
 readlicense_oo/license/CREDITS.fodt| 3847 ++---
 sc/qa/unit/data/ods/too-many-cols-rows.ods |binary
 sc/qa/unit/subsequent_filters_test2.cxx|   17 
 sc/source/filter/xml/xmlcelli.cxx  |6 
 sc/source/ui/view/spellcheckcontext.cxx|4 
 sd/qa/unit/data/pptx/deftabstop.pptx   |binary
 sd/qa/unit/import-tests2.cxx   |   14 
 sd/source/ui/docshell/docshel4.cxx |   12 
 sfx2/source/control/charwin.cxx|3 
 svl/source/passwordcontainer/passwordcontainer.cxx |   41 
 svl/source/passwordcontainer/passwordcontainer.hxx |6 
 sw/qa/core/data/rtf/fail/forcepoint-82.rtf |   28 
 sw/qa/extras/rtfexport/data/tdf111851.rtf  |   17 
 sw/qa/extras/rtfexport/rtfexport4.cxx  |   36 
 sw/source/ui/config/optpage.cxx|6 
 uui/source/iahndl-authentication.cxx   |5 
 writerfilter/source/dmapper/DomainMapperTableManager.cxx   |2 
 writerfilter/source/rtftok/rtfdispatchvalue.cxx|  136 
 25 files changed, 2206 insertions(+), 2001 deletions(-)

New commits:
commit cac6cd38944fd6375e1f1d754afe60e02b979956
Author: Andras Timar 
AuthorDate: Tue Jul 20 11:54:05 2021 +0200
Commit: Andras Timar 
CommitDate: Fri Mar 25 21:54:06 2022 +0100

these classes are used from non-merged libs

I found this bug with debug / ASAN build of LOKit. During startup:
program/libsclo.so: undefined symbol: _ZTIN3vcl23ILibreOfficeKitNotifierE
program/libfilelo.so: undefined symbol: 
_ZTIN12connectivity5sdbcx17IObjectCollectionE
etc.

Change-Id: I2eb80d0b3002f174deea0d8657cb0cdbdec5be8f

diff --git a/include/connectivity/paramwrapper.hxx 
b/include/connectivity/paramwrapper.hxx
index bf16e0851fcb..b862a619af85 100644
--- a/include/connectivity/paramwrapper.hxx
+++ b/include/connectivity/paramwrapper.hxx
@@ -49,7 +49,7 @@ namespace dbtools::param
 /** wraps a parameter column as got from an SQLQueryComposer, so that it 
has an additional
 property "Value", which is forwarded to an XParameters interface
 */
-class UNLESS_MERGELIBS(OOO_DLLPUBLIC_DBTOOLS) ParameterWrapper final : 
public ::cppu::OWeakObject
+class OOO_DLLPUBLIC_DBTOOLS ParameterWrapper final : public 
::cppu::OWeakObject
 ,public css::lang::XTypeProvider
 ,public ::comphelper::OMutexAndBroadcastHelper
 ,public ::cppu::OPropertySetHelper
diff --git a/include/connectivity/sdbcx/VCollection.hxx 
b/include/connectivity/sdbcx/VCollection.hxx
index ab0dd3bcc828..a2f8a821fa33 100644
--- a/include/connectivity/sdbcx/VCollection.hxx
+++ b/include/connectivity/sdbcx/VCollection.hxx
@@ -58,7 +58,7 @@ namespace connectivity::sdbcx
 
 typedef css::uno::Reference< css::beans::XPropertySet > ObjectType;
 
-class UNLESS_MERGELIBS(OOO_DLLPUBLIC_DBTOOLS) SAL_NO_VTABLE 
IObjectCollection
+class OOO_DLLPUBLIC_DBTOOLS SAL_NO_VTABLE IObjectCollection
 {
 public:
 virtual ~IObjectCollection();
diff --git a/include/ucbhelper/interactionrequest.hxx 
b/include/ucbhelper/interactionrequest.hxx
index 78fc31f7a23b..16e9eda38b96 100644
--- a/include/ucbhelper/interactionrequest.hxx
+++ b/include/ucbhelper/interactionrequest.hxx
@@ -222,7 +222,7 @@ public:
   * along with an interaction request to indicate the possibility to approve
   * the request.
   */
-class UNLESS_MERGELIBS(UCBHELPER_DLLPUBLIC) InteractionApprove final : public 
InteractionContinuation,
+class UCBHELPER_DLLPUBLIC InteractionApprove final : public 
InteractionContinuation,
public css::lang::XTypeProvider,
public css::task::XInteractionApprove
 {
@@ -255,7 +255,7 @@ public:
   * along with an interaction request to indicate the possibility to disapprove
   * the request.
   */
-class UNLESS_MERGELIBS(UCBHELPER_DLLPUBLIC) InteractionDisapprove final : 
public InteractionContinuation,
+class UCBHELPER_DLLPUBLIC InteractionDisapprove final : public 
InteractionContinuation,
   public css::lang::XTypeProvider,
   public css::task::XInteractionDisapprove
 {
@@ -288,7 +288,7 @@ public:
   * passed along with an authentication interacti

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

2022-03-25 Thread Mert Tumer (via logerrit)
 sw/source/ui/table/instable.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit a4e7cc2a12ca3ea90ec21de96aa038f2447b40f8
Author: Mert Tumer 
AuthorDate: Fri Mar 25 17:56:30 2022 +0300
Commit: Gökay ŞATIR 
CommitDate: Fri Mar 25 19:39:10 2022 +0100

make default selected table style to Default Table Style for only online

unfortunately when the table has a style 
sw/qa/uitest/writer_tests4/tdf115573.py fails
because tables that have pre-applied style resets the style of the elements 
in their cells
when a new row is inserted and the ui test above relies on that. For now 
this is LOK only

Signed-off-by: Mert Tumer 
Change-Id: I2f60376fc2d929498aef45259a5ef291922ccdcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132124
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Gökay ŞATIR 

diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 94e29d28665d..1a3bafb14dc2 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -149,8 +149,13 @@ void SwInsTableDlg::InitAutoTableFormat()
 // Change this min variable if you add autotable manually.
 minTableIndexInLb = 1;
 maxTableIndexInLb = minTableIndexInLb + 
static_cast(pTableTable->size());
-m_xLbFormat->select( minTableIndexInLb );
-tbIndex = lbIndexToTableIndex( minTableIndexInLb );
+// 1 means default table style
+// unfortunately when the table has a style 
sw/qa/uitest/writer_tests4/tdf115573.py fails
+// because tables that have pre-applied style resets the style of the 
elements in their cells
+// when a new row is inserted and the ui test above relies on that. For 
now this is LOK only
+lbIndex = comphelper::LibreOfficeKit::isActive() ? 1 : 0;
+m_xLbFormat->select( lbIndex );
+tbIndex = lbIndexToTableIndex(lbIndex);
 
 SelFormatHdl( *m_xLbFormat );
 }


Re: 回复:回复:回复:回复:回复:libreoffice-7.3.2 compile in arm system

2022-03-25 Thread Michael Weghorn

On 25/03/2022 12.34, gcxyw1314 wrote:

Are you talking about question 2?


I mean these questions:


Some questions to try to narrow the issue down:

Can you please try whether the same happens with the current git master branch instead of 7.3 (run 
"make distclean" first after switching branches), and if so, submit a more detailed error 
output to paste.debian.net, with the expiration date set to "never"?

What does your autogen.input look like? Or if you're not using that, what 
options are you passing to `./autogen.sh`?

This is on CentOS 7.7, aarch64 architecture, right?
Can you share the file `config.log` from your build directory?


But I am 
https://bug-attachments.documentfoundation.org/attachment.cgi?id=172646 No 
modification method was found above, so I compiled on 7.06 and didn't encounter 
this error,


Where does that patch come from? Is there a related Bugzilla issue it is 
attached to?



and:

Also, did the patch you mention change anything (or was the error just the same before)? 


OpenPGP_signature
Description: OpenPGP digital signature


[Libreoffice-commits] core.git: Branch 'feature/sparklines' - include/xmloff sc/CppunitTest_sc_sparkline_test.mk schema/libreoffice sc/inc sc/Library_sc.mk sc/qa sc/source xmloff/source

2022-03-25 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 6af8a63e62cd2f0c800f8dfc364355d19b10a1db
Author: Tomaž Vajngerl 
AuthorDate: Fri Mar 25 14:53:48 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sat Mar 26 01:41:36 2022 +0900

sc: sparkline import/export for ODF

Change-Id: I0d8293cdd35cc8c7afab98efac0a28a3613d122b

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 4f7cd7e148a4..dc7c930f0e2a 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -449,8 +449,16 @@ namespace xmloff::token {
 XML_CODEBASE,
 XML_COLLAPSE,
 XML_COLOR,
+XML_COLOR_AXIS,
+XML_COLOR_FIRST,
+XML_COLOR_HIGH,
 XML_COLOR_INVERSION,
+XML_COLOR_LAST,
+XML_COLOR_LOW,
+XML_COLOR_MARKERS,
 XML_COLOR_MODE,
+XML_COLOR_NEGATIVE,
+XML_COLOR_SERIES,
 XML_COLOR_SCALE,
 XML_COLOR_SCALE_ENTRY,
 XML_COLOR_TABLE,
@@ -593,6 +601,7 @@ namespace xmloff::token {
 XML_DATA_PILOT_TABLE,
 XML_DATA_PILOT_TABLES,
 XML_DATA_POINT,
+XML_DATA_RANGE,
 XML_DATA_STREAM_SOURCE,
 XML_DATA_STYLE,
 XML_DATA_STYLE_NAME,
@@ -609,6 +618,7 @@ namespace xmloff::token {
 XML_DATABASE_SOURCE_TABLE,
 XML_DATABASE_TABLE_NAME,
 XML_DATE,
+XML_DATE_AXIS,
 XML_DATE_IS,
 XML_DATE_ADJUST,
 XML_DATE_STYLE,
@@ -668,12 +678,15 @@ namespace xmloff::token {
 XML_DISPLAY_DETAILS,
 XML_DISPLAY_DUPLICATES,
 XML_DISPLAY_EMPTY,
+XML_DISPLAY_EMPTY_CELLS_AS,
 XML_DISPLAY_FILTER_BUTTONS,
 XML_DISPLAY_FORMULA,
+XML_DISPLAY_HIDDEN,
 XML_DISPLAY_LABEL,
 XML_DISPLAY_LEVELS,
 XML_DISPLAY_NAME,
 XML_DISPLAY_OUTLINE_LEVEL,
+XML_DISPLAY_X_AXIS,
 XML_DISSOLVE,
 XML_DISTANCE,
 XML_DISTANCE_AFTER_SEP,
@@ -1180,6 +1193,7 @@ namespace xmloff::token {
 XML_LINE_SKEW,
 XML_LINE_SPACING,
 XML_LINE_STYLE,
+XML_LINE_WIDTH,
 XML_LINEAR,
 XML_LINEARGRADIENT,
 XML_LINENUMBERING_CONFIGURATION,
@@ -1207,6 +1221,7 @@ namespace xmloff::token {
 XML_LOGARITHMIC,
 XML_LOGBASE,
 XML_LONG,
+XML_LOW,
 XML_LOWLIMIT,
 XML_LR_TB,
 XML_LT,
@@ -1220,6 +1235,8 @@ namespace xmloff::token {
 XML_MALIGNGROUP,
 XML_MALIGNMARK,
 XML_MANUAL,
+XML_MANUAL_MIN,
+XML_MANUAL_MAX,
 XML_MAP,
 XML_MARGIN_BOTTOM,
 XML_MARGIN_LEFT,
@@ -1227,6 +1244,7 @@ namespace xmloff::token {
 XML_MARGIN_TOP,
 XML_MARGINS,
 XML_MARKER,
+XML_MARKERS,
 XML_MARKER_END,
 XML_MARKER_END_CENTER,
 XML_MARKER_END_WIDTH,
@@ -1245,6 +1263,7 @@ namespace xmloff::token {
 XML_MATRIX_COVERED,
 XML_MATRIXROW,
 XML_MAX,
+XML_MAX_AXIS_TYPE,
 XML_MAX_EDGE,
 XML_MAX_HEIGHT,
 XML_MAX_LENGTH,
@@ -1270,6 +1289,7 @@ namespace xmloff::token {
 XML_MIDDLE,
 XML_MIME_TYPE,
 XML_MIN,
+XML_MIN_AXIS_TYPE,
 XML_MIN_DENOMINATOR_DIGITS,
 XML_MIN_EDGE,
 XML_MIN_EXPONENT_DIGITS,
@@ -1344,6 +1364,7 @@ namespace xmloff::token {
 XML_NAMED_RANGE,
 XML_NAVIGATION_MODE,
 XML_NAVY,
+XML_NEGATIVE,
 XML_NEGATIVE_COLOR,
 XML_NEQ,
 XML_NEW,
@@ -1605,6 +1626,7 @@ namespace xmloff::token {
 XML_RIGHT,
 XML_RIGHT_OUTSIDE,
 XML_RIGHT_TEXT,
+XML_RIGHT_TO_LEFT,
 XML_RIGHTARC,
 XML_RIGHTCIRCLE,
 XML_RING,
@@ -1759,6 +1781,10 @@ namespace xmloff::token {
 XML_SOURCE_RANGE_ADDRESS,
 XML_SOURCE_SERVICE,
 XML_SPACE_BEFORE,
+XML_SPARKLINE_GROUPS,
+XML_SPARKLINE_GROUP,
+XML_SPARKLINES,
+XML_SPARKLINE,
 XML_SPAN,
 XML_SPECULAR,
 XML_SPECULAR_COLOR,
diff --git a/sc/CppunitTest_sc_sparkline_test.mk 
b/sc/CppunitTest_sc_sparkline_test.mk
index 499eaaf4ea38..a3e8078a9b83 100644
--- a/sc/CppunitTest_sc_sparkline_test.mk
+++ b/sc/CppunitTest_sc_sparkline_test.mk
@@ -18,6 +18,12 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,sc_sparkline_test, \
 sc/qa/unit/SparklineTest \
 ))
 
+$(eval $(call gb_CppunitTest_use_externals,sc_sparkline_test, \
+boost_headers \
+mdds_headers \
+libxml2 \
+))
+
 $(eval $(call gb_CppunitTest_use_libraries,sc_sparkline_test, \
 basegfx \
 comphelper \
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 2c78147abf62..e97f6e04b4c2 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -293,6 +293,8 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/core/tool/webservicelink \
 sc/source/core/tool/zforauto \
 sc/source/filter/xml/datastreamimport \
+sc/source/filter/xml/SparklineGroupsE

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

2022-03-25 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx |   36 
 1 file changed, 36 insertions(+)

New commits:
commit 1d4c4e82f1704eb66fb130ae03ee9ad28ddb2067
Author: Xisco Fauli 
AuthorDate: Fri Mar 25 12:20:40 2022 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 25 17:42:01 2022 +0100

tdf#113541: sc_uicalc: Add unittest

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

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 90bafa91f64e..917ef6b2d9b9 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -380,6 +380,42 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf103994)
 CPPUNIT_ASSERT_EQUAL(1.0, pDoc->GetValue(ScAddress(1, 0, 0)));
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf113541)
+{
+mxComponent = loadFromDesktop("private:factory/scalc");
+ScModelObj* pModelObj = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pModelObj);
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+insertStringToCell(*pModelObj, "A1", "50");
+
+// Save the document
+utl::TempFile aTempFile = save(mxComponent, "calc8");
+
+// Open a new document
+mxComponent = loadFromDesktop("private:factory/scalc");
+pModelObj = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pModelObj);
+pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+// Change grammar to Excel A1
+pDoc->SetGrammar(formula::FormulaGrammar::GRAM_ENGLISH_XL_A1);
+
+// Insert the reference to the external document
+OUString aFormula = "=['" + aTempFile.GetURL() + "']Sheet1!A1";
+insertStringToCell(*pModelObj, "A1", aFormula.toUtf8().getStr());
+
+// Without the fix in place, this test would have failed with
+// - Expected: 50
+// - Actual  : Err:507
+CPPUNIT_ASSERT_EQUAL(OUString("50"), pDoc->GetString(ScAddress(0, 0, 0)));
+
+// Change grammar to default
+pDoc->SetGrammar(formula::FormulaGrammar::GRAM_ENGLISH);
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf126577)
 {
 mxComponent = loadFromDesktop("private:factory/scalc");


[Libreoffice-commits] core.git: Branch 'feature/sparklines' - 2 commits - include/xmloff oox/source sc/CppunitTest_sc_sparkline_test.mk schema/libreoffice sc/inc sc/Library_sc.mk sc/qa sc/source test/

2022-03-25 Thread Tomaž Vajngerl (via logerrit)
 include/xmloff/xmltoken.hxx |   26 
 oox/source/core/xmlfilterbase.cxx   |2 
 oox/source/token/namespaces-strict.txt  |1 
 oox/source/token/namespaces.hxx.tail|1 
 oox/source/token/namespaces.txt |1 
 oox/source/token/tokens.txt |1 
 sc/CppunitTest_sc_sparkline_test.mk |6 
 sc/Library_sc.mk|2 
 sc/inc/SparklineGroup.hxx   |   10 
 sc/qa/unit/SparklineImportExportTest.cxx|   87 ++-
 sc/source/filter/excel/excdoc.cxx   |1 
 sc/source/filter/excel/export/SparklineExt.cxx  |6 
 sc/source/filter/oox/SparklineFragment.cxx  |3 
 sc/source/filter/xml/SparklineGroupsExport.cxx  |  222 
 sc/source/filter/xml/SparklineGroupsExport.hxx  |   48 +
 sc/source/filter/xml/SparklineGroupsImportContext.cxx   |  332 
 sc/source/filter/xml/SparklineGroupsImportContext.hxx   |   61 ++
 sc/source/filter/xml/xmlexprt.cxx   |   15 
 sc/source/filter/xml/xmlexprt.hxx   |1 
 sc/source/filter/xml/xmltabi.cxx|5 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |  165 +
 test/source/xmltesttools.cxx|2 
 xmloff/source/core/xmltoken.cxx |   28 -
 xmloff/source/token/tokens.txt  |   26 
 24 files changed, 1044 insertions(+), 8 deletions(-)

New commits:
commit 88214d0f7d55e4b1ccced5f1ec0790d446da8ab6
Author: Tomaž Vajngerl 
AuthorDate: Fri Mar 25 14:53:48 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sat Mar 26 01:37:27 2022 +0900

sc: sparkline import/export for ODF

Change-Id: I0d8293cdd35cc8c7afab98efac0a28a3613d122b

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 4f7cd7e148a4..dc7c930f0e2a 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -449,8 +449,16 @@ namespace xmloff::token {
 XML_CODEBASE,
 XML_COLLAPSE,
 XML_COLOR,
+XML_COLOR_AXIS,
+XML_COLOR_FIRST,
+XML_COLOR_HIGH,
 XML_COLOR_INVERSION,
+XML_COLOR_LAST,
+XML_COLOR_LOW,
+XML_COLOR_MARKERS,
 XML_COLOR_MODE,
+XML_COLOR_NEGATIVE,
+XML_COLOR_SERIES,
 XML_COLOR_SCALE,
 XML_COLOR_SCALE_ENTRY,
 XML_COLOR_TABLE,
@@ -593,6 +601,7 @@ namespace xmloff::token {
 XML_DATA_PILOT_TABLE,
 XML_DATA_PILOT_TABLES,
 XML_DATA_POINT,
+XML_DATA_RANGE,
 XML_DATA_STREAM_SOURCE,
 XML_DATA_STYLE,
 XML_DATA_STYLE_NAME,
@@ -609,6 +618,7 @@ namespace xmloff::token {
 XML_DATABASE_SOURCE_TABLE,
 XML_DATABASE_TABLE_NAME,
 XML_DATE,
+XML_DATE_AXIS,
 XML_DATE_IS,
 XML_DATE_ADJUST,
 XML_DATE_STYLE,
@@ -668,12 +678,15 @@ namespace xmloff::token {
 XML_DISPLAY_DETAILS,
 XML_DISPLAY_DUPLICATES,
 XML_DISPLAY_EMPTY,
+XML_DISPLAY_EMPTY_CELLS_AS,
 XML_DISPLAY_FILTER_BUTTONS,
 XML_DISPLAY_FORMULA,
+XML_DISPLAY_HIDDEN,
 XML_DISPLAY_LABEL,
 XML_DISPLAY_LEVELS,
 XML_DISPLAY_NAME,
 XML_DISPLAY_OUTLINE_LEVEL,
+XML_DISPLAY_X_AXIS,
 XML_DISSOLVE,
 XML_DISTANCE,
 XML_DISTANCE_AFTER_SEP,
@@ -1180,6 +1193,7 @@ namespace xmloff::token {
 XML_LINE_SKEW,
 XML_LINE_SPACING,
 XML_LINE_STYLE,
+XML_LINE_WIDTH,
 XML_LINEAR,
 XML_LINEARGRADIENT,
 XML_LINENUMBERING_CONFIGURATION,
@@ -1207,6 +1221,7 @@ namespace xmloff::token {
 XML_LOGARITHMIC,
 XML_LOGBASE,
 XML_LONG,
+XML_LOW,
 XML_LOWLIMIT,
 XML_LR_TB,
 XML_LT,
@@ -1220,6 +1235,8 @@ namespace xmloff::token {
 XML_MALIGNGROUP,
 XML_MALIGNMARK,
 XML_MANUAL,
+XML_MANUAL_MIN,
+XML_MANUAL_MAX,
 XML_MAP,
 XML_MARGIN_BOTTOM,
 XML_MARGIN_LEFT,
@@ -1227,6 +1244,7 @@ namespace xmloff::token {
 XML_MARGIN_TOP,
 XML_MARGINS,
 XML_MARKER,
+XML_MARKERS,
 XML_MARKER_END,
 XML_MARKER_END_CENTER,
 XML_MARKER_END_WIDTH,
@@ -1245,6 +1263,7 @@ namespace xmloff::token {
 XML_MATRIX_COVERED,
 XML_MATRIXROW,
 XML_MAX,
+XML_MAX_AXIS_TYPE,
 XML_MAX_EDGE,
 XML_MAX_HEIGHT,
 XML_MAX_LENGTH,
@@ -1270,6 +1289,7 @@ namespace xmloff::token {
 XML_MIDDLE,
 XML_MIME_TYPE,
 XML_MIN,
+XML_MIN_AXIS_TYPE,
 XML_MIN_DENOMINATOR_DIGITS,
 XML_MIN_EDGE,
 

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

2022-03-25 Thread Caolán McNamara (via logerrit)
 sw/qa/inc/swmodeltestbase.hxx  |   17 -
 sw/qa/unit/swmodeltestbase.cxx |   24 +---
 2 files changed, 37 insertions(+), 4 deletions(-)

New commits:
commit bd769805180c9b0aadca5301e29161c2d84fbe64
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 14:01:47 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 25 16:35:55 2022 +0100

add support to explicitly test swriter/sweb layout

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

diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index 329a9a60b4d8..15980cdfda84 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -308,11 +308,20 @@ protected:
 
 void load(std::u16string_view pDir, const char* pName, const char* 
pPassword = nullptr)
 {
-return loadURL(m_directories.getURLFromSrc(pDir) + 
OUString::createFromAscii(pName), pName, pPassword);
+return loadURLWithComponent(m_directories.getURLFromSrc(pDir) + 
OUString::createFromAscii(pName),
+"com.sun.star.text.TextDocument", pName, 
pPassword);
+}
+
+void load_web(std::u16string_view pDir, const char* pName, const char* 
pPassword = nullptr)
+{
+return loadURLWithComponent(m_directories.getURLFromSrc(pDir) + 
OUString::createFromAscii(pName),
+"com.sun.star.text.WebDocument", pName, 
pPassword);
 }
 
 void setTestInteractionHandler(const char* pPassword, 
std::vector& rFilterOptions);
 
+void loadURLWithComponent(OUString const& rURL, OUString const& 
rComponent, const char* pName, const char* pPassword);
+
 void loadURL(OUString const& rURL, const char* pName, const char* 
pPassword = nullptr);
 
 void reload(const char* pFilter, const char* filename, const char* 
pPassword = nullptr);
@@ -367,6 +376,12 @@ protected:
  */
 SwDoc* createSwDoc(
 std::u16string_view rDataDirectory = std::u16string_view(), const 
char* pName = nullptr);
+
+/**
+ * As createSwDoc except a Web Document in Browse Mode
+ */
+SwDoc* createSwWebDoc(
+std::u16string_view rDataDirectory = std::u16string_view(), const 
char* pName = nullptr);
 };
 
 /**
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index e1b28153110f..ad4ff03d5479 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -480,7 +480,8 @@ void SwModelTestBase::setTestInteractionHandler(const char* 
pPassword,
 
 void SwModelTestBase::header() {}
 
-void SwModelTestBase::loadURL(OUString const& rURL, const char* pName, const 
char* pPassword)
+void SwModelTestBase::loadURLWithComponent(OUString const& rURL, OUString 
const& rComponent,
+   const char* pName, const char* 
pPassword)
 {
 if (mxComponent.is())
 mxComponent->dispose();
@@ -512,8 +513,8 @@ void SwModelTestBase::loadURL(OUString const& rURL, const 
char* pName, const cha
 if (pName)
 std::cout << pName << ":\n";
 mnStartTime = osl_getGlobalTimer();
-mxComponent = loadFromDesktop(rURL, "com.sun.star.text.TextDocument",
-  
comphelper::containerToSequence(aFilterOptions));
+mxComponent
+= loadFromDesktop(rURL, rComponent, 
comphelper::containerToSequence(aFilterOptions));
 
 if (pPassword)
 {
@@ -526,6 +527,11 @@ void SwModelTestBase::loadURL(OUString const& rURL, const 
char* pName, const cha
 calcLayout();
 }
 
+void SwModelTestBase::loadURL(OUString const& rURL, const char* pName, const 
char* pPassword)
+{
+loadURLWithComponent(rURL, "com.sun.star.text.TextDocument", pName, 
pPassword);
+}
+
 void SwModelTestBase::reload(const char* pFilter, const char* filename, const 
char* pPassword)
 {
 uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
@@ -729,4 +735,16 @@ SwDoc* SwModelTestBase::createSwDoc(std::u16string_view 
rDataDirectory, const ch
 return pTextDoc->GetDocShell()->GetDoc();
 }
 
+SwDoc* SwModelTestBase::createSwWebDoc(std::u16string_view rDataDirectory, 
const char* pName)
+{
+if (rDataDirectory.empty() || !pName)
+loadURL("private:factory/swriter/web", nullptr);
+else
+load_web(rDataDirectory, pName);
+
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+return pTextDoc->GetDocShell()->GetDoc();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: Changes to 'distro/lhm/libreoffice-7-3+backports'

2022-03-25 Thread Xisco Fauli (via logerrit)
New branch 'distro/lhm/libreoffice-7-3+backports' available with the following 
commits:


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/inc sw/qa sw/source

2022-03-25 Thread Miklos Vajna (via logerrit)
 sw/inc/formatlinebreak.hxx   |2 
 sw/inc/textlinebreak.hxx |5 +
 sw/inc/unomap.hxx|4 +
 sw/inc/unoprnms.hxx  |1 
 sw/qa/core/unocore/unocore.cxx   |3 +
 sw/source/core/txtnode/attrlinebreak.cxx |   30 +-
 sw/source/core/txtnode/thints.cxx|5 +
 sw/source/core/unocore/unolinebreak.cxx  |   85 ++-
 sw/source/core/unocore/unomap.cxx|5 +
 sw/source/core/unocore/unomap1.cxx   |   18 ++
 10 files changed, 140 insertions(+), 18 deletions(-)

New commits:
commit 5feb766541d8817cdab4af5da4c9c40b48771840
Author: Miklos Vajna 
AuthorDate: Wed Mar 2 09:38:14 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 25 15:46:53 2022 +0100

sw clearing breaks: add UNO API to insert this with custom clear / char 
props

- if (character) properties are specified when the text content itself
  is inserted, then format the anchor ("dummy") character like that

- add the ability to specify a clear type (none/left/right/all) on the
  line break object itself before insertion

(cherry picked from commit 1a240807f2c051ff9a63d713625404a024d7c221)

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

diff --git a/sw/inc/formatlinebreak.hxx b/sw/inc/formatlinebreak.hxx
index 9e26ab11351f..c3a2b0164f86 100644
--- a/sw/inc/formatlinebreak.hxx
+++ b/sw/inc/formatlinebreak.hxx
@@ -70,7 +70,7 @@ public:
 
 void InvalidateLineBreak();
 
-css::uno::Reference getAnchor(SwDoc& rDoc) const;
+css::uno::Reference GetAnchor() const;
 
 void SetTextLineBreak(SwTextLineBreak* pTextAttr) { m_pTextAttr = 
pTextAttr; }
 
diff --git a/sw/inc/textlinebreak.hxx b/sw/inc/textlinebreak.hxx
index c0853aa2bd56..33401972f60b 100644
--- a/sw/inc/textlinebreak.hxx
+++ b/sw/inc/textlinebreak.hxx
@@ -32,11 +32,16 @@ class SwFormatLineBreak;
  */
 class SW_DLLPUBLIC SwTextLineBreak final : public SwTextAttr
 {
+SwTextNode* m_pTextNode;
+
 public:
 SwTextLineBreak(SwFormatLineBreak& rAttr, sal_Int32 nStart);
 
 ~SwTextLineBreak() override;
 
+const SwTextNode& GetTextNode() const;
+void SetTextNode(SwTextNode* pNew);
+
 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
index c4c166032983..413adfaf7fc3 100644
--- a/sw/inc/unomap.hxx
+++ b/sw/inc/unomap.hxx
@@ -125,7 +125,8 @@ struct SfxItemPropertyMapEntry;
 #define PROPERTY_MAP_TABLE_STYLE100
 #define PROPERTY_MAP_CELL_STYLE 101
 #define PROPERTY_MAP_FIELDMARK  102
-#define PROPERTY_MAP_END103
+#define PROPERTY_MAP_LINEBREAK  103
+#define PROPERTY_MAP_END104
 
 //S&E
 #define WID_WORDS0
@@ -351,6 +352,7 @@ private:
 static const SfxItemPropertyMapEntry*  GetRedlinePropertyMap();
 static const SfxItemPropertyMapEntry*  GetRedlinePortionPropertyMap();
 static   SfxItemPropertyMapEntry*  GetTextDefaultPropertyMap();
+static const SfxItemPropertyMapEntry* GetLineBreakPropertyMap();
 };
 
 extern SwUnoPropertyMapProvider aSwMapProvider;
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 5d8684c47f53..c291742a1641 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -866,6 +866,7 @@
 
 #define UNO_NAME_RESOLVED "Resolved"
 #define UNO_NAME_ALLOW_OVERLAP "AllowOverlap"
+#define UNO_NAME_CLEAR "Clear"
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index ddf8d4bb5362..d8c9f9559bd9 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -227,6 +227,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLineBreakInsert)
 uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xLineBreak(
 xMSF->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+uno::Reference xLineBreakProps(xLineBreak, 
uno::UNO_QUERY);
+auto eClear = static_cast(SwLineBreakClear::ALL);
+xLineBreakProps->setPropertyValue("Clear", uno::makeAny(eClear));
 uno::Reference xText = xTextDocument->getText();
 uno::Reference xCursor = xText->createTextCursor();
 xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
diff --git a/sw/source/core/txtnode/attrlinebreak.cxx 
b/sw/source/core/txtnode/attrlinebreak.cxx
index f0f583ecc2df..00d1c275e3dd 100644
--- a/sw/source/core/txtnode/attrlinebreak.cxx
+++ b/sw/source/core/txtnode/attrlinebreak.cxx
@@ -27,6 +27,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace com::sun::star;
 
@@ -74,17 +76,21 @@ void SwFormatLineBreak::InvalidateLineB

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

2022-03-25 Thread Stephan Bergmann (via logerrit)
 framework/inc/uielement/menubarmanager.hxx|2 --
 framework/source/uielement/menubarmanager.cxx |   16 +---
 2 files changed, 5 insertions(+), 13 deletions(-)

New commits:
commit 47e6bf0109c686f71b48c550667af707705a777b
Author: Stephan Bergmann 
AuthorDate: Fri Mar 25 12:18:05 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 25 15:38:42 2022 +0100

Fold MenuBarManager::Destroy into its only call site

...mainly to demonstrate that its SolarMutexGuard was redundant and that
replacing it with DBG_TESTSOLARMUTEX() would be overkill

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

diff --git a/framework/inc/uielement/menubarmanager.hxx 
b/framework/inc/uielement/menubarmanager.hxx
index 079d127d4d83..710c788f2dcc 100644
--- a/framework/inc/uielement/menubarmanager.hxx
+++ b/framework/inc/uielement/menubarmanager.hxx
@@ -127,8 +127,6 @@ class MenuBarManager final :
 static bool MustBeHidden( PopupMenu* pPopupMenu, const 
css::uno::Reference< css::util::XURLTransformer >& rTransformer );
 OUString RetrieveLabelFromCommand(const OUString& rCmdURL);
 
-void Destroy();
-
 struct MenuItemHandler
 {
 MenuItemHandler( sal_uInt16 aItemId,
diff --git a/framework/source/uielement/menubarmanager.cxx 
b/framework/source/uielement/menubarmanager.cxx
index 49b4092f6d46..c363ccffb9b6 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -136,9 +136,12 @@ MenuBarManager::~MenuBarManager()
 SAL_WARN_IF( OWeakObject::m_refCount != 0, "fwk.uielement", "Who wants to 
delete an object with refcount > 0!" );
 }
 
-void MenuBarManager::Destroy()
+// XComponent
+void MenuBarManager::disposing(std::unique_lock& )
 {
-SolarMutexGuard aGuard;
+Reference< XComponent > xThis( this );
+
+SolarMutexGuard g;
 
 // stop asynchronous settings timer and
 // release deferred item container reference
@@ -152,15 +155,6 @@ void MenuBarManager::Destroy()
 {
 m_pVCLMenu.disposeAndClear();
 }
-}
-
-// XComponent
-void MenuBarManager::disposing(std::unique_lock& )
-{
-Reference< XComponent > xThis( this );
-
-SolarMutexGuard g;
-Destroy();
 
 if ( m_xDocImageManager.is() )
 {


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

2022-03-25 Thread Andras Timar (via logerrit)
 vcl/source/window/mouse.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit c9ccb88b99eeda1d227ff44587c09241e74d
Author: Andras Timar 
AuthorDate: Fri Mar 25 13:56:53 2022 +0100
Commit: Andras Timar 
CommitDate: Fri Mar 25 15:21:20 2022 +0100

fix error: unused variable

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

diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 0c77347f89f8..9b533b991a9e 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -769,6 +769,9 @@ Reference< css::datatransfer::dnd::XDragSource > 
Window::GetDragSource()
 pDragSourceAL[ 1 ] <<= pEnvData->aShellWindow;
 pDropTargetAL[ 0 ] <<= Application::GetDisplayConnection();
 pDropTargetAL[ 1 ] <<= pEnvData->aShellWindow;
+#else // LOKit
+(void)pDragSourceAL;
+(void)pDropTargetAL;
 #endif
 if( !aDragSourceSN.isEmpty() )
 mpWindowImpl->mpFrameData->mxDragSource.set(


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

2022-03-25 Thread Luboš Luňák (via logerrit)
 sc/inc/document.hxx   |   14 +++---
 sc/inc/table.hxx  |8 
 sc/qa/unit/ucalc.cxx  |   19 +++
 sc/source/core/data/document.cxx  |   12 ++--
 sc/source/core/data/table2.cxx|7 +++
 sc/source/filter/xml/xmlexprt.cxx |8 
 6 files changed, 43 insertions(+), 25 deletions(-)

New commits:
commit b8720d1e1f0842d52f1830c48ef7551b1868ae6f
Author: Luboš Luňák 
AuthorDate: Fri Mar 25 12:42:58 2022 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 25 15:20:58 2022 +0100

fix ScTable::GetLastChangedCol() for unallocated columns

Column flags and widths are stored separately from ScColumn data,
and so don't depend on allocated columns count.

Also rename the functions from the misleading generic name to what
they actually do.

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

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index cd7138b3e945..639166319366 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -2025,17 +2025,17 @@ public:
  */
 voidSyncColRowFlags();
 
-/// @return  the index of the last row with any set flags 
(auto-pagebreak is ignored).
+/// @return  the index of the last row with any set flags (auto-pagebreak 
is ignored).
 SC_DLLPUBLIC SCROW  GetLastFlaggedRow( SCTAB nTab ) const;
 
-/// @return  the index of the last changed column (flags 
and column width, auto pagebreak is ignored).
-SCCOL   GetLastChangedCol( SCTAB nTab ) const;
-/// @return  the index of the last changed row (flags and 
row height, auto pagebreak is ignored).
-SCROW   GetLastChangedRow( SCTAB nTab ) const;
+/// @return  the index of the last changed column (flags and column width, 
auto pagebreak is ignored).
+SCCOL   GetLastChangedColFlagsWidth( SCTAB nTab ) const;
+/// @return  the index of the last changed row (flags and row height, auto 
pagebreak is ignored).
+SCROW   GetLastChangedRowFlagsWidth( SCTAB nTab ) const;
 
-SCCOL   GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) 
const;
+SCCOL   GetNextDifferentChangedColFlagsWidth( SCTAB nTab, SCCOL 
nStart) const;
 
-SCROW   GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart) 
const;
+SCROW   GetNextDifferentChangedRowFlagsWidth( SCTAB nTab, SCROW 
nStart) const;
 
 // returns whether to export a Default style for this col or not
 // nDefault is set to one position in the current row where the Default 
style is
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 58fb6c4a45ad..a885067f5649 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -870,10 +870,10 @@ public:
 /// @return  the index of the last row with any set flags 
(auto-pagebreak is ignored).
 SCROW  GetLastFlaggedRow() const;
 
-/// @return  the index of the last changed column (flags and 
column width, auto pagebreak is ignored).
-SCCOL  GetLastChangedCol() const;
-/// @return  the index of the last changed row (flags and row 
height, auto pagebreak is ignored).
-SCROW  GetLastChangedRow() const;
+/// @return  the index of the last changed column (flags and column width, 
auto pagebreak is ignored).
+SCCOL  GetLastChangedColFlagsWidth() const;
+/// @return  the index of the last changed row (flags and row height, auto 
pagebreak is ignored).
+SCROW  GetLastChangedRowFlagsWidth() const;
 
 bool   IsDataFiltered(SCCOL nColStart, SCROW nRowStart, SCCOL nColEnd, 
SCROW nRowEnd) const;
 bool   IsDataFiltered(const ScRange& rRange) const;
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 895d5a96bf89..020e43c6dbde 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -117,6 +117,7 @@ public:
 void testValueIterator();
 void testHorizontalAttrIterator();
 void testIteratorsUnallocatedColumnsAttributes();
+void testLastChangedColFlagsWidth();
 
 /**
  * More direct test for cell broadcaster management, used to track formula
@@ -250,6 +251,7 @@ public:
 CPPUNIT_TEST(testValueIterator);
 CPPUNIT_TEST(testHorizontalAttrIterator);
 CPPUNIT_TEST(testIteratorsUnallocatedColumnsAttributes);
+CPPUNIT_TEST(testLastChangedColFlagsWidth);
 CPPUNIT_TEST(testCellBroadcaster);
 CPPUNIT_TEST(testFuncParam);
 CPPUNIT_TEST(testNamedRange);
@@ -1456,6 +1458,23 @@ void Test::testIteratorsUnallocatedColumnsAttributes()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testLastChangedColFlagsWidth()
+{
+m_pDoc->InsertTab(0, "Tab1");
+
+constexpr SCCOL firstChangedCol = 100;
+assert( firstChangedCol > INITIALCOLCOUNT );
+for( SCCOL col = fi

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

2022-03-25 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/singlevalfields.cxx|   13 ++---
 compilerplugins/clang/unnecessaryvirtual.cxx |   14 +-
 compilerplugins/clang/virtualdead.cxx|2 --
 3 files changed, 11 insertions(+), 18 deletions(-)

New commits:
commit ace70dae44eea914ea460cc2feb49202b61a20fc
Author: Noel Grandin 
AuthorDate: Fri Mar 25 13:59:18 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 25 14:35:24 2022 +0100

loplugins ignoreLocation() is unreliable with PCH

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

diff --git a/compilerplugins/clang/singlevalfields.cxx 
b/compilerplugins/clang/singlevalfields.cxx
index 81fa76da885e..3d966c9e9be3 100644
--- a/compilerplugins/clang/singlevalfields.cxx
+++ b/compilerplugins/clang/singlevalfields.cxx
@@ -180,8 +180,7 @@ bool SingleValFields::VisitFieldDecl( const FieldDecl* 
fieldDecl )
 {
 auto canonicalDecl = fieldDecl->getCanonicalDecl();
 
-if( ignoreLocation( canonicalDecl )
-|| isInUnoIncludeFile( 
compiler.getSourceManager().getSpellingLoc(canonicalDecl->getLocation())) )
+if( isInUnoIncludeFile( 
compiler.getSourceManager().getSpellingLoc(canonicalDecl->getLocation())) )
 return true;
 
 MyFieldInfo aInfo;
@@ -212,8 +211,7 @@ bool SingleValFields::VisitVarDecl( const VarDecl* varDecl )
 if (!canonicalDecl->getLocation().isValid())
 return true;
 
-if( ignoreLocation( canonicalDecl )
-|| isInUnoIncludeFile( 
compiler.getSourceManager().getSpellingLoc(canonicalDecl->getLocation())) )
+if( isInUnoIncludeFile( 
compiler.getSourceManager().getSpellingLoc(canonicalDecl->getLocation())) )
 return true;
 
 MyFieldInfo aInfo;
@@ -233,9 +231,6 @@ bool SingleValFields::VisitVarDecl( const VarDecl* varDecl )
 
 bool SingleValFields::VisitCXXConstructorDecl( const CXXConstructorDecl* decl )
 {
-if( ignoreLocation( decl ) )
-return true;
-
 // doesn't count as a write to fields because it's self->self
 if (decl->isCopyOrMoveConstructor())
 return true;
@@ -266,8 +261,6 @@ bool SingleValFields::VisitMemberExpr( const MemberExpr* 
memberExpr )
 const FieldDecl* fieldDecl = dyn_cast(decl);
 if (!fieldDecl)
 return true;
-if (ignoreLocation(memberExpr))
-return true;
 walkPotentialAssign(fieldDecl, memberExpr);
 return true;
 }
@@ -283,8 +276,6 @@ bool SingleValFields::VisitDeclRefExpr( const DeclRefExpr* 
declRefExpr )
 return true;
 if (!(varDecl->isStaticLocal() || varDecl->isStaticDataMember() || 
varDecl->hasGlobalStorage()))
 return true;
-if (ignoreLocation(declRefExpr))
-return true;
 walkPotentialAssign(varDecl, declRefExpr);
 return true;
 }
diff --git a/compilerplugins/clang/unnecessaryvirtual.cxx 
b/compilerplugins/clang/unnecessaryvirtual.cxx
index eb3df3b1524f..c3c73923b3ae 100644
--- a/compilerplugins/clang/unnecessaryvirtual.cxx
+++ b/compilerplugins/clang/unnecessaryvirtual.cxx
@@ -108,9 +108,6 @@ std::string niceName(const CXXMethodDecl* cxxMethodDecl)
 
 bool UnnecessaryVirtual::VisitCXXMethodDecl( const CXXMethodDecl* methodDecl )
 {
-if (ignoreLocation(methodDecl)) {
-return true;
-}
 if (!methodDecl->isVirtual() || methodDecl->isDeleted()) {
 return true;
 }
@@ -132,6 +129,8 @@ bool UnnecessaryVirtual::VisitCXXMethodDecl( const 
CXXMethodDecl* methodDecl )
 return true;
 
 methodDecl = methodDecl->getCanonicalDecl();
+if (!methodDecl)
+return true;
 std::string aNiceName = niceName(methodDecl);
 
 // for destructors, we need to check if any of the superclass' destructors 
are virtual
@@ -147,8 +146,11 @@ bool UnnecessaryVirtual::VisitCXXMethodDecl( const 
CXXMethodDecl* methodDecl )
 if (baseSpecifier->getType()->isRecordType())
 {
 const CXXRecordDecl* superclassCXXRecordDecl = 
baseSpecifier->getType()->getAsCXXRecordDecl();
-std::string aOverriddenNiceName = 
niceName(superclassCXXRecordDecl->getDestructor());
-overridingSet.insert(aOverriddenNiceName);
+if (superclassCXXRecordDecl->getDestructor())
+{
+std::string aOverriddenNiceName = 
niceName(superclassCXXRecordDecl->getDestructor());
+overridingSet.insert(aOverriddenNiceName);
+}
 }
 }
 return true;
@@ -174,6 +176,8 @@ bool UnnecessaryVirtual::VisitCXXMethodDecl( const 
CXXMethodDecl* methodDecl )
 
 void UnnecessaryVirtual::MarkRootOverridesNonEmpty( const CXXMethodDecl* 
methodDecl )
 {
+if (!methodDecl)
+return;
 if (methodDecl->size_overridden_methods() == 0) {
 nonEmptySet.insert(niceName(methodDecl));
 return;
diff --git a/compilerplugins/clang/virtualdead.cxx 
b/compilerplugins

[Libreoffice-commits] core.git: connectivity/Library_mysqlc.mk connectivity/source vcl/inc

2022-03-25 Thread Noel Grandin (via logerrit)
 connectivity/Library_mysqlc.mk   |1 
 connectivity/source/drivers/mysqlc/mysqlc_tables.cxx |   57 ---
 connectivity/source/drivers/mysqlc/mysqlc_tables.hxx |4 -
 connectivity/source/drivers/mysqlc/mysqlc_users.cxx  |   71 ---
 connectivity/source/drivers/mysqlc/mysqlc_users.hxx  |   47 
 connectivity/source/drivers/mysqlc/mysqlc_views.cxx  |7 -
 connectivity/source/drivers/mysqlc/mysqlc_views.hxx  |2 
 vcl/inc/opengl/x11/X11DeviceInfo.hxx |   25 --
 8 files changed, 214 deletions(-)

New commits:
commit 793fd21a4da5a442cc7130ae04628ffe3181ea6c
Author: Noel Grandin 
AuthorDate: Fri Mar 25 14:28:21 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 25 14:53:29 2022 +0100

loplugin:unusedmethods

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

diff --git a/connectivity/Library_mysqlc.mk b/connectivity/Library_mysqlc.mk
index af46fb9ba137..afc8f19b86cf 100644
--- a/connectivity/Library_mysqlc.mk
+++ b/connectivity/Library_mysqlc.mk
@@ -68,7 +68,6 @@ $(eval $(call gb_Library_add_exception_objects,mysqlc,\
connectivity/source/drivers/mysqlc/mysqlc_tables \
connectivity/source/drivers/mysqlc/mysqlc_types \
connectivity/source/drivers/mysqlc/mysqlc_user \
-   connectivity/source/drivers/mysqlc/mysqlc_users \
connectivity/source/drivers/mysqlc/mysqlc_view \
connectivity/source/drivers/mysqlc/mysqlc_views \
 ))
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx
index ee82134086e9..06218403f3fb 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_tables.cxx
@@ -87,63 +87,6 @@ connectivity::sdbcx::ObjectType 
connectivity::mysqlc::Tables::createObject(const
 return xRet;
 }
 
-OUString connectivity::mysqlc::Tables::createStandardColumnPart(
-const css::uno::Reference& xColProp,
-const css::uno::Reference& _xConnection)
-{
-css::uno::Reference xMetaData = 
_xConnection->getMetaData();
-
-::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
-
-bool bIsAutoIncrement = false;
-
xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISAUTOINCREMENT))
->>= bIsAutoIncrement;
-
-const OUString sQuoteString = xMetaData->getIdentifierQuoteString();
-OUStringBuffer aSql(
-::dbtools::quoteName(sQuoteString, 
::comphelper::getString(xColProp->getPropertyValue(
-   
rPropMap.getNameByIndex(PROPERTY_ID_NAME);
-
-// check if the user enter a specific string to create autoincrement values
-OUString sAutoIncrementValue;
-css::uno::Reference xPropInfo = 
xColProp->getPropertySetInfo();
-
-if (xPropInfo.is()
-&& 
xPropInfo->hasPropertyByName(rPropMap.getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION)))
-
xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_AUTOINCREMENTCREATION))
->>= sAutoIncrementValue;
-
-aSql.append(" ");
-
-aSql.append(dbtools::createStandardTypePart(xColProp, _xConnection));
-// Add character set for (VAR)BINARY (fix) types:
-// (VAR) BINARY is distinguished from other CHAR types by its character 
set.
-// Octets is a special character set for binary data.
-if (xPropInfo.is() && 
xPropInfo->hasPropertyByName(rPropMap.getNameByIndex(PROPERTY_ID_TYPE)))
-{
-sal_Int32 aType = 0;
-xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_TYPE)) 
>>= aType;
-if (aType == css::sdbc::DataType::BINARY || aType == 
css::sdbc::DataType::VARBINARY)
-{
-aSql.append(" ");
-aSql.append("CHARACTER SET OCTETS");
-}
-}
-
-if (bIsAutoIncrement && !sAutoIncrementValue.isEmpty())
-{
-aSql.append(" ");
-aSql.append(sAutoIncrementValue);
-}
-// AutoIncrement "IDENTITY" is implicitly "NOT NULL"
-else if (::comphelper::getINT32(
- 
xColProp->getPropertyValue(rPropMap.getNameByIndex(PROPERTY_ID_ISNULLABLE)))
- == css::sdbc::ColumnValue::NO_NULLS)
-aSql.append(" NOT NULL");
-
-return aSql.makeStringAndClear();
-}
-
 css::uno::Reference 
connectivity::mysqlc::Tables::createDescriptor()
 {
 // There is some internal magic so that the same class can be used as 
either
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_tables.hxx 
b/connectivity/source/drivers/mysqlc/mysqlc_tables.hxx
index 2ee2ab9b96da..2d3c4c74533d 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_tables.hxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_tables.hxx
@@ -24,10 +24,6 @@ class Tables : public ::connectivity::sdbcx::OCollection
 protected:
 css::uno::Reference m_xMetaData;
 
-static OUS

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

2022-03-25 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/lineinfo.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 21fb34bbb48393d6e631355f1124e5baa2759fcc
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 10:44:00 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 25 14:49:07 2022 +0100

ofz: Integer-overflow

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

diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx
index 1267623c0f19..490b1d920d5e 100644
--- a/vcl/source/gdi/lineinfo.cxx
+++ b/vcl/source/gdi/lineinfo.cxx
@@ -131,9 +131,9 @@ static void ReadLimitedDouble(SvStream& rIStm, double 
&fDest)
 {
 double fTmp(0.0);
 rIStm.ReadDouble(fTmp);
-if (fTmp < std::numeric_limits::min() || fTmp > 
std::numeric_limits::max())
+if (!std::isfinite(fTmp) || fTmp < std::numeric_limits::min() 
|| fTmp > std::numeric_limits::max())
 {
-SAL_WARN("vcl", "Parsing error: double too large: " << fTmp);
+SAL_WARN("vcl", "Parsing error: out of range double: " << fTmp);
 return;
 }
 fDest = fTmp;


[Libreoffice-commits] core.git: 2 commits - external/liborcus

2022-03-25 Thread Caolán McNamara (via logerrit)
 external/liborcus/UnpackedTarball_liborcus.mk |2 +
 external/liborcus/forcepoint-87.patch.1   |   27 
 external/liborcus/forcepoint-88.patch.1   |   42 ++
 3 files changed, 71 insertions(+)

New commits:
commit 87259aef31a0411ccc8cb045ceb1365c23e917e5
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 10:14:19 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 25 14:48:43 2022 +0100

forcepoint#88 temp std::string assigned to std::string_view

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

diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 948b92753539..562ab4e5fcd7 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/forcepoint-83.patch.1 \
external/liborcus/forcepoint-84.patch.1 \
external/liborcus/forcepoint-87.patch.1 \
+   external/liborcus/forcepoint-88.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/forcepoint-88.patch.1 
b/external/liborcus/forcepoint-88.patch.1
new file mode 100644
index ..19d96f4d8315
--- /dev/null
+++ b/external/liborcus/forcepoint-88.patch.1
@@ -0,0 +1,42 @@
+From 8c9537fe46b85acde0a7a183cee9066919c6b619 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= 
+Date: Fri, 25 Mar 2022 10:10:17 +
+Subject: [PATCH] forcepoint#88 assigned temp std::string return to string_view
+
+it's out of scope when used
+
+=ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffcaf91b111 at 
pc 0x00486ec4 bp 0x7ffcaf91aed0 sp 0x7ffcaf91a680
+READ of size 2 at 0x7ffcaf91b111 thread T0
+#0 0x486ec3 in __interceptor_memcpy.part.0 
(instdir/program/soffice.bin+0x486ec3)
+#1 0x7fa6c4471b77 in std::basic_streambuf 
>::xsputn(char const*, long) (/lib64/libstdc++.so.6+0x143b77)
+#2 0x7fa6c4463ae3 in std::basic_ostream >& 
std::__ostream_insert >(std::basic_ostream >&, char const*, long) (/lib64/libstdc++.so.6+0x135ae3)
+#3 0x7fa6b4027a26 in std::basic_ostream >& 
std::operator<< >(std::basic_ostream >&, std::basic_string_view 
>) 
/usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/string_view:669:14
+#4 0x7fa6b426792b in 
orcus::xml_element_printer::print_namespace(std::ostream&, char const*) const 
workdir/UnpackedTarball/liborcus/src/liborcus/xml_util.cpp:35:12
+#5 0x7fa6b4267c68 in 
orcus::xml_element_printer::print_element(std::ostream&, char const*, unsigned 
long) const workdir/UnpackedTarball/liborcus/src/liborcus/xml_util.cpp:46:5
+#6 0x7fa6b41c1956 in orcus::xml_context_base::print_element(std::ostream&, 
std::pair const&) const 
workdir/UnpackedTarball/liborcus/src/liborcus/xml_context_base.cpp:280:20
+---
+ src/liborcus/xml_util.cpp | 8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/liborcus/xml_util.cpp b/src/liborcus/xml_util.cpp
+index 906d321d..ff270d4a 100644
+--- a/src/liborcus/xml_util.cpp
 b/src/liborcus/xml_util.cpp
+@@ -29,10 +29,10 @@ void xml_element_printer::print_namespace(std::ostream& 
os, xmlns_id_t ns) const
+ if (mp_ns_cxt)
+ {
+ std::string_view alias = mp_ns_cxt->get_alias(ns);
+-if (alias.empty())
+-alias = mp_ns_cxt->get_short_name(ns);
+-
+-os << alias;
++if (!alias.empty())
++os << alias;
++else
++os << mp_ns_cxt->get_short_name(ns);
+ }
+ else
+ os << ns;
+-- 
+2.35.1
+
commit 32019baffa19a8f79cacf93d5dd5a95c7d416657
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 09:12:30 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 25 14:48:28 2022 +0100

forcepoint#87 Assertion 'mp_char <= mp_end' failed

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

diff --git a/external/liborcus/UnpackedTarball_liborcus.mk 
b/external/liborcus/UnpackedTarball_liborcus.mk
index 8f41fdbf9173..948b92753539 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/std-get-busted.patch.1 \
external/liborcus/forcepoint-83.patch.1 \
external/liborcus/forcepoint-84.patch.1 \
+   external/liborcus/forcepoint-87.patch.1 \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/liborcus/forcepoint-87.patch.1 
b/external/liborcus/forcepoint-87.patch.1
new file mode 100644
index ..c1a58dde59c4
--- /dev/null
+++ b/external/liborcus/forcepoint-87.patch.1
@@ -0,0 +1,27 @@
+From e4f3741197a3af6d434850d388483b5231

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

2022-03-25 Thread Noel Grandin (via logerrit)
 sw/source/ui/config/optpage.cxx  |6 --
 sw/source/uibase/inc/optpage.hxx |4 
 2 files changed, 10 deletions(-)

New commits:
commit 52a9e4f0361e63f744e14f47c7c09b9407320c72
Author: Noel Grandin 
AuthorDate: Fri Mar 25 14:17:22 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 25 14:47:20 2022 +0100

loplugin:unusedfields

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

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 374ba9c5bb2d..bfdbc877c869 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -507,9 +507,6 @@ SwStdFontTabPage::SwStdFontTabPage(weld::Container* pPage, 
weld::DialogControlle
 , m_bIdxDefault(false)
 , m_bSetIdxDefault(true)
 , m_bDisposePrinter(false)
-, m_bListHeightDefault(false)
-, m_bLabelHeightDefault(false)
-, m_bIndexHeightDefault(false)
 , m_nFontGroup(FONT_GROUP_DEFAULT)
 , m_sScriptWestern(SwResId(ST_SCRIPT_WESTERN))
 , m_sScriptAsian(SwResId(ST_SCRIPT_ASIAN))
@@ -847,7 +844,6 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
 
 const SvxFontHeightItem& rFontHeightList = static_cast(pColl->GetFormatAttr(nFontHeightWhich));
 nListHeight = static_cast(rFontHeightList.GetHeight());
-m_bListHeightDefault = SfxItemState::DEFAULT == 
pColl->GetAttrSet().GetItemState(nFontWhich, false);
 
 pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_LABEL);
 m_bLabelDefault = SfxItemState::DEFAULT == 
pColl->GetAttrSet().GetItemState(nFontWhich, false);
@@ -856,7 +852,6 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
 m_sShellLabel = sCapBackup = rFontCP.GetFamilyName();
 const SvxFontHeightItem& rFontHeightLabel = static_cast(pColl->GetFormatAttr(nFontHeightWhich));
 nLabelHeight = static_cast(rFontHeightLabel.GetHeight());
-m_bLabelHeightDefault = SfxItemState::DEFAULT == 
pColl->GetAttrSet().GetItemState(nFontWhich, false);
 
 pColl = m_pWrtShell->GetTextCollFromPool(RES_POOLCOLL_REGISTER_BASE);
 m_bIdxDefault = SfxItemState::DEFAULT == 
pColl->GetAttrSet().GetItemState(nFontWhich, false);
@@ -865,7 +860,6 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
 m_sShellIndex = sIdxBackup = rFontIDX.GetFamilyName();
 const SvxFontHeightItem& rFontHeightIndex = static_cast(pColl->GetFormatAttr(nFontHeightWhich));
 nIndexHeight = static_cast(rFontHeightIndex.GetHeight());
-m_bIndexHeightDefault = SfxItemState::DEFAULT == 
pColl->GetAttrSet().GetItemState(nFontWhich, false);
 }
 m_xStandardBox->set_entry_text(sStdBackup );
 m_xTitleBox->set_entry_text(sOutBackup );
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index 99e24ed7f487..7bb77695140f 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -143,10 +143,6 @@ class SwStdFontTabPage final : public SfxTabPage
 boolm_bSetIdxDefault  :1;
 boolm_bDisposePrinter :1;
 
-boolm_bListHeightDefault:1;
-boolm_bLabelHeightDefault   :1;
-boolm_bIndexHeightDefault :1;
-
 sal_uInt8 m_nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL]
 
 OUString m_sScriptWestern;


Re: Improve WriteCustomGeometry in oox export; review of patch

2022-03-25 Thread Miklos Vajna
Hi Regina,

On Thu, Mar 24, 2022 at 07:33:24PM +0100, Regina Henschel 
 wrote:
> The commit message is quite detailed. If something is still unclear, please
> send me a mail.

Not only that, but the various test files you added in the tests also
helped to understand the problem you solve. Thanks for that.

> BTW, Jenkins fails for a reason I don't know. But I want to first
> incorporate your suggestions before I start a next try with Jenkins.

It was just a one-off failure, it went away after a "resume".

Regards,

Miklos


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

2022-03-25 Thread Regina Henschel (via logerrit)
 include/oox/export/drawingml.hxx |   13 
 oox/qa/unit/data/tdf147978_endsubpath.odp|binary
 oox/qa/unit/data/tdf147978_enhancedPath_commandA.odp |binary
 oox/qa/unit/data/tdf147978_enhancedPath_commandHIJK.odp  |binary
 oox/qa/unit/data/tdf147978_enhancedPath_commandT.odp |binary
 oox/qa/unit/data/tdf147978_enhancedPath_commandXY.odp|binary
 oox/qa/unit/data/tdf147978_enhancedPath_subpath.pptx |binary
 oox/qa/unit/export.cxx   |  155 +
 oox/source/export/drawingml.cxx  |  919 
++
 oox/source/export/shapes.cxx |   31 
 sd/qa/unit/data/odp/tdf147978_enhancedPath_viewBox.odp   |binary
 sd/qa/unit/data/xml/tdf92001_0.xml   |   42 
 sd/qa/unit/export-tests-ooxml2.cxx   |   32 
 sd/qa/unit/export-tests-ooxml3.cxx   |   16 
 sw/qa/extras/ooxmlexport/data/tdf147978_enhancedPath_commandABVW.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx   |   16 
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx|   24 
 sw/source/filter/ww8/docxsdrexport.cxx   |   20 
 18 files changed, 861 insertions(+), 407 deletions(-)

New commits:
commit 2029b2f6dd0109c5892e5ac5640022b31fe42fd2
Author: Regina Henschel 
AuthorDate: Fri Mar 18 18:31:05 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 25 14:00:23 2022 +0100

tdf#147978 export subpaths individually in custGeom

...and implement export of all missing commands,
   use existing viewBox if suitable,
   use one EnhancedCustomShape2d
   move WriteCustomGeometryPoint to protected,
   make GetCustomGeometryPointValue local

The fix solves tdf#100390 too.

Without the fix the entire enhanced-path was exported as one element
. The command F was applied to the whole drawing but should
affect only the subpath. The implementation is changed so that each
subpath gets its own element  and command F acts only on its
subpath.

Support for export of handles and equations is still a long way off.
Thus there is no reason to tread shapes with and without handles
different. Shapes with handles had used method WritePolyPolygon, but
that is not able to handle subpaths. So have desided to use method
WriteCustomGeometry for all cases.

To get shapes exported regardless of path commands I have added the
export for the missing commands.

I have removed the no longer used method WritePolyPolygon.

The special treatment of shapes "moon" and "mso-spt89" (right up arrow)
in export is no longer needed. Related code parts are removed. The
unit test testFlipAndRotateCustomShape is adapted.

In case the method WriteCustomGeometry fails, the enhanced-path is
invalid. In that case an minimal custGeom is written in case of docx.

Shapes whose drawing does not touch all edges of the snap rectangle
were exported with wrong position and size of the drawing inside the
snap rectangle. That is fixed by using an existing ViewBox for the
OOXML path size. The old way of creating a path size from point
coordinates is only used if the shape has no suitable ViewBox.

The point values in unit test SdOOXMLExportTest2::testTdf111798 are
adapted to path size 21600 x 21600 and traverse direction of the points
is corrected. The resulting shape outline is still the same as before.

The expected xml is updated for file tdf92001.odp in
SdImportTest::testDocumentLayout. The resulting shape outline is the
same, because the shape touches the edges of the snap rectangle.

The case, that the shape outline does not touch a edge of the snap
rectangle is tested in SdOOXMLExportTest3::testEnhancedPathViewBox.

Still missing is the case, that ViewBox has other left,top than 0,0.
In that case all coordinates would have to be shifted because the path
size in OOXML has only width and height but not left,top. That will
not be included in this patch.

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

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index a128a812483c..b507a0e41b60 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class Graphic;
 class SdrObjCustomShape;
@@ -199,7 +200,8 @@ protected:
 
 void WriteGlowEffect(const css::uno::Reference& 
rXPropSet);
 void WriteSoftEdgeEffect(const 
css::uno::Refere

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

2022-03-25 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf147861_customField.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx   |   19 +++
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx|2 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|   25 ++-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx|4 ++
 5 files changed, 48 insertions(+), 2 deletions(-)

New commits:
commit c4cb1d1dd581a5f120d9cf8b1d4274ec38f3eabe
Author: Justin Luth 
AuthorDate: Sat Mar 12 11:11:01 2022 +0200
Commit: Miklos Vajna 
CommitDate: Fri Mar 25 13:48:12 2022 +0100

tdf#147861 writerfilter: use GetFieldResult, not current DocProperty

Import DOCX and RTF DocProperty fields as "fixed" if the displayed
text does not match the File - Properties - Custom variable's content.

Otherwise LO will automatically update the field and show the wrong
contents (because MS Word requires the user to manually refresh via F9).

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf147861_customField.docx 
b/sw/qa/extras/ooxmlexport/data/tdf147861_customField.docx
new file mode 100644
index ..70071fa7e8a3
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf147861_customField.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index a33da51048b8..bbc5ec25da07 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -18,6 +18,7 @@
 
 #include 
 #include 
+#include 
 
 constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/ooxmlexport/data/";
 
@@ -48,6 +49,24 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135164_cancelledNumbering, 
"tdf135164_cancelledN
 CPPUNIT_ASSERT_EQUAL(OUString("i"), getProperty(xPara, 
"ListLabelString"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf147861_customField, 
"tdf147861_customField.docx")
+{
+// These should each be specific values, not a shared DocProperty
+getParagraph(1, "CustomEditedTitle"); // edited
+// A couple of nulls at the end of the string thwarted all attemps at an 
"equals" comparison.
+CPPUNIT_ASSERT(getParagraph(2)->getString().startsWith(" INSERT Custom 
Title here"));
+getParagraph(3, "My Title"); // edited
+
+// Verify that these are fields, and not just plain text
+uno::Reference xTextFieldsSupplier(mxComponent, 
uno::UNO_QUERY);
+auto xFieldsAccess(xTextFieldsSupplier->getTextFields());
+uno::Reference 
xFields(xFieldsAccess->createEnumeration());
+uno::Reference xField(xFields->nextElement(), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("CustomEditedTitle"), 
xField->getPresentation(false));
+// The " (fixed)" part is unnecessary, but it must be consistent across a 
round-trip
+CPPUNIT_ASSERT_EQUAL(OUString("DocInformation:Title (fixed)"), 
xField->getPresentation(true));
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testTdf135906)
 {
 loadAndReload("tdf135906.docx");
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 3d0b23f9e71e..415138bc5e28 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -129,7 +129,7 @@ DECLARE_OOXMLEXPORT_TEST(testN751117, "n751117.docx")
 DECLARE_OOXMLEXPORT_TEST(testFdo74745, "fdo74745.docx")
 {
 uno::Reference paragraph = getParagraph(3);
-CPPUNIT_ASSERT_EQUAL(OUString("09/02/14"), paragraph->getString());
+CPPUNIT_ASSERT_EQUAL(OUString("09/02/2014"), paragraph->getString());
 }
 
 DECLARE_OOXMLEXPORT_TEST(testFdo81486, "fdo81486.docx")
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a4d59a8b7fdb..a3d6a4f69498 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4792,6 +4792,11 @@ void 
FieldContext::SetTextField(uno::Reference const& xTextFie
 m_xTextField = xTextField;
 }
 
+void FieldContext::CacheVariableValue(const uno::Any& rAny)
+{
+rAny >>= m_sVariableValue;
+}
+
 void FieldContext::AppendCommand(std::u16string_view rPart)
 {
 m_sCommand += rPart;
@@ -5425,6 +5430,9 @@ void DomainMapper_Impl::handleAuthor
 }
 }
 }
+else
+
pContext->CacheVariableValue(xUserDefinedProps->getPropertyValue(rFirstParam));
+
 OUString sServiceName("com.sun.star.text.TextField.");
 bool bIsCustomField = false;
 if(sFieldServiceName.isEmpty())
@@ -7044,7 +7052,22 @@ void DomainMapper_Impl::SetFieldResult(OUString const& 
rResult)
 getPropertyName(bHasContent && sValue.isEmpty()? 
PROP_CONTENT : PROP_CURRENT_PRESENTATION),
  uno::makeAny( rResult ));
 

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

2022-03-25 Thread Miklos Vajna (via logerrit)
 source/text/swriter/01/0401.xhp |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit f7fb73ebe42a4f7e5b00583aa38e7bcbd86911d7
Author: Miklos Vajna 
AuthorDate: Fri Mar 25 13:38:23 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 25 13:45:12 2022 +0100

sw clearing breaks: add help for this

Explain what the 3 non-default options do.

Change-Id: Ic94d09dd05dd6319f26120784e7bc6d1025f850c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132118
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/source/text/swriter/01/0401.xhp 
b/source/text/swriter/01/0401.xhp
index 3db8209a5..3c39f593f 100644
--- a/source/text/swriter/01/0401.xhp
+++ b/source/text/swriter/01/0401.xhp
@@ -44,6 +44,9 @@
 Line Break
 
 Ends the 
current line, and moves the text found to the right of the cursor to the next 
line, without creating a new paragraph.
+The restart 
location specifies if
+the next line will start immediately after the previous line, at the first 
unblocked line on the
+left, at the first unblocked line on the right or at the first full 
line.
 You can also insert a line break by 
pressing Shift+Enter.
 
 


[Libreoffice-commits] core.git: helpcontent2

2022-03-25 Thread Miklos Vajna (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1fdd27398006baa03c2e45b4ca2412b74ef7ee62
Author: Miklos Vajna 
AuthorDate: Fri Mar 25 13:45:13 2022 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Mar 25 13:45:13 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to f7fb73ebe42a4f7e5b00583aa38e7bcbd86911d7
  - tdf#145752 Correction to CompatibilityMode() help page

Change-Id: Ie7ca911d8d445c57ad94458711164bdb18be1f13
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/129946
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Alain Romedenne 

  - sw clearing breaks: add help for this

Explain what the 3 non-default options do.

Change-Id: Ic94d09dd05dd6319f26120784e7bc6d1025f850c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132118
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/helpcontent2 b/helpcontent2
index 6565914b3808..f7fb73ebe42a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6565914b3808f621a36ebe1fb3872a7fd54e5c15
+Subproject commit f7fb73ebe42a4f7e5b00583aa38e7bcbd86911d7


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/inc sw/Library_sw.mk sw/qa sw/source

2022-03-25 Thread Miklos Vajna (via logerrit)
 sw/Library_sw.mk |1 
 sw/inc/unocoll.hxx   |1 
 sw/qa/core/unocore/unocore.cxx   |   32 
 sw/source/core/bastyp/init.cxx   |2 
 sw/source/core/inc/unolinebreak.hxx  |   91 +++
 sw/source/core/txtnode/attrlinebreak.cxx |1 
 sw/source/core/txtnode/thints.cxx|5 
 sw/source/core/unocore/unocoll.cxx   |7 
 sw/source/core/unocore/unolinebreak.cxx  |  236 +++
 9 files changed, 374 insertions(+), 2 deletions(-)

New commits:
commit 461de6f712ebdc5a5a3f0e0563c50d92614f0760
Author: Miklos Vajna 
AuthorDate: Tue Mar 1 16:44:03 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 25 13:41:59 2022 +0100

sw clearing breaks: add UNO API to insert this

This only allows the clear=all break type, the others are not yet
handled.

(cherry picked from commit 5028e5670da25ec1e862789b744c32e6108b)

Conflicts:
sw/qa/core/unocore/unocore.cxx

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

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 0f594e203f59..ef3a27b74458 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -482,6 +482,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/core/unocore/unoframe \
 sw/source/core/unocore/unoftn \
 sw/source/core/unocore/unoidx \
+sw/source/core/unocore/unolinebreak \
 sw/source/core/unocore/unomap \
 sw/source/core/unocore/unomap1 \
 sw/source/core/unocore/unoobj \
diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
index ae16ab4ab7bc..821d50ab4a2c 100644
--- a/sw/inc/unocoll.hxx
+++ b/sw/inc/unocoll.hxx
@@ -176,6 +176,7 @@ enum class SwServiceType {
 VbaGlobals  = 113,
 StyleTable  = 114,
 StyleCell   = 115,
+LineBreak   = 116,
 
 Invalid = USHRT_MAX
 };
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index a480a082f975..ddf8d4bb5362 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -23,6 +23,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -215,6 +217,36 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testBrokenEmbeddedObject)
 
xEmbeddedObject->supportsService("com.sun.star.comp.embed.OCommonEmbeddedObject"));
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLineBreakInsert)
+{
+// Given an empty document:
+SwDoc* pDoc = createSwDoc();
+
+// When inserting a line-break with properties:
+uno::Reference xMSF(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xLineBreak(
+xMSF->createInstance("com.sun.star.text.LineBreak"), uno::UNO_QUERY);
+uno::Reference xText = xTextDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+xText->insertTextContent(xCursor, xLineBreak, /*bAbsorb=*/false);
+
+// Then make sure that both the line break and its matching text attribute 
is inserted:
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+SwTextNode* pTextNode = pDoc->GetNodes()[nIndex]->GetTextNode();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: "\n" (newline)
+// - Actual  : "" (empty string)
+// i.e. SwXLineBreak::attach() did not insert the newline + its text 
attribute.
+CPPUNIT_ASSERT_EQUAL(OUString("\n"), pTextNode->GetText());
+SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, 
RES_TXTATR_LINEBREAK);
+CPPUNIT_ASSERT(pAttr);
+auto pTextLineBreak = static_cast(pAttr);
+auto& rFormatLineBreak = 
static_cast(pTextLineBreak->GetAttr());
+CPPUNIT_ASSERT_EQUAL(SwLineBreakClear::ALL, rFormatLineBreak.GetValue());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index b6703dcd1d0d..87cb7dfa3127 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -319,7 +319,7 @@ SfxItemInfo aSlotTab[] =
 { 0, false },   // RES_TXTATR_FLYCNT
 { 0, false },   // RES_TXTATR_FTN
 { 0, false },   // RES_TXTATR_ANNOTATION
-{ 0, true },   // RES_TXTATR_LINEBREAK
+{ 0, false },   // RES_TXTATR_LINEBREAK
 { 0, true },   // RES_TXTATR_DUMMY1
 { 0, true },   // RES_TXTATR_DUMMY2
 
diff --git a/sw/source/core/inc/unolinebreak.hxx 
b/sw/sour

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/inc sw/Library_sw.mk sw/source

2022-03-25 Thread Miklos Vajna (via logerrit)
 sw/Library_sw.mk |1 
 sw/inc/formatlinebreak.hxx   |   96 +
 sw/inc/hintids.hxx   |3 
 sw/inc/textlinebreak.hxx |   45 +++
 sw/inc/txatbase.hxx  |8 ++
 sw/source/core/bastyp/init.cxx   |5 -
 sw/source/core/doc/dbgoutsw.cxx  |2 
 sw/source/core/txtnode/attrlinebreak.cxx |  118 +++
 sw/source/core/txtnode/thints.cxx|4 +
 sw/source/core/txtnode/txatbase.cxx  |4 +
 sw/source/filter/html/css1atr.cxx|2 
 sw/source/filter/html/htmlatr.cxx|2 
 12 files changed, 284 insertions(+), 6 deletions(-)

New commits:
commit 864e9258ce61842091d7b37ee0a7b1d54b906289
Author: Miklos Vajna 
AuthorDate: Mon Feb 28 10:59:49 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 25 13:41:45 2022 +0100

sw clearing breaks: add document model

This is meant to represent clearing breaks, as in HTML's  and DOCX's .

The new pool item is in the RES_TXTATR_NOEND section as this property
can be only specified on a single document model position: linebreak
characters.

(cherry picked from commit 24732bb12bfe0124d49733701226a34044c001a8)

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

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 70385f964c9b..0f594e203f59 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -425,6 +425,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/core/txtnode/atrftn \
 sw/source/core/txtnode/atrref \
 sw/source/core/txtnode/atrtox \
+sw/source/core/txtnode/attrlinebreak \
 sw/source/core/txtnode/chrfmt \
 sw/source/core/txtnode/fmtatr2 \
 sw/source/core/txtnode/fntcache \
diff --git a/sw/inc/formatlinebreak.hxx b/sw/inc/formatlinebreak.hxx
new file mode 100644
index ..9e26ab11351f
--- /dev/null
+++ b/sw/inc/formatlinebreak.hxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_INC_FORMATLINEBREAK_HXX
+#define INCLUDED_SW_INC_FORMATLINEBREAK_HXX
+
+#include "swdllapi.h"
+#include 
+#include "calbck.hxx"
+
+#include 
+#include 
+#include 
+
+class SwDoc;
+class SwTextLineBreak;
+
+/// Defines the location of a line break text wrapping restart.
+enum class SwLineBreakClear
+{
+NONE,
+LEFT,
+RIGHT,
+ALL,
+LAST = ALL
+};
+
+/// SfxPoolItem subclass that wraps an SwLineBreakClear.
+class SW_DLLPUBLIC SwFormatLineBreak final : public 
SfxEnumItem,
+ public sw::BroadcastingModify
+{
+/// The SwTextAttr that knows the position of the line break in the doc 
model.
+SwTextLineBreak* m_pTextAttr;
+
+css::uno::WeakReference m_wXLineBreak;
+
+SwFormatLineBreak& operator=(const SwFormatLineBreak& rLineBreak) = delete;
+
+SwFormatLineBreak(const SwFormatLineBreak&) = delete;
+
+public:
+SwFormatLineBreak(SwLineBreakClear eClear);
+virtual ~SwFormatLineBreak() override;
+
+/// See SfxPoolItem::operator ==().
+bool operator==(const SfxPoolItem&) const override;
+
+/// See SfxPoolItem::Clone().
+SwFormatLineBreak* Clone(SfxItemPool* pPool = nullptr) const override;
+
+/// See SwModify::SwClientNotify().
+void SwClientNotify(const SwModify&, const SfxHint&) override;
+
+sal_uInt16 GetValueCount() const override;
+
+void InvalidateLineBreak();
+
+css::uno::Reference getAnchor(SwDoc& rDoc) const;
+
+void SetTextLineBreak(SwTextLineBreak* pTextAttr) { m_pTextAttr = 
pTextAttr; }
+
+const SwTextLineBreak* GetTextLineBreak() const { return m_pTextAttr; }
+
+SwTextLineBreak* GetTextLineBreak() { return m_pTextAttr; }
+
+css::uno::WeakReference const& GetXTextContent() 
const
+{
+return m_wXLineBreak;
+}
+
+void SetXLineBreak(css::uno::Reference const& 
xLineBreak)
+{
+m_wXLineBreak = xLineBreak;
+   

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

2022-03-25 Thread Andreas Heinisch (via logerrit)
 connectivity/source/drivers/firebird/ResultSetMetaData.cxx |   12 -
 dbaccess/qa/unit/data/tdf132924.odb|binary
 dbaccess/qa/unit/firebird.cxx  |   28 +
 3 files changed, 37 insertions(+), 3 deletions(-)

New commits:
commit 4590048952a9e62124641c512dc2d19122f7fb2d
Author: Andreas Heinisch 
AuthorDate: Wed Mar 23 21:14:46 2022 +0100
Commit: Andreas Heinisch 
CommitDate: Fri Mar 25 13:37:57 2022 +0100

tdf#132924 - Firebird findColumn: return column alias if specified

The function findColumn in a Basic macro should also find aliases for
columns specified in an SQL query using a Firebird database.

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

diff --git a/connectivity/source/drivers/firebird/ResultSetMetaData.cxx 
b/connectivity/source/drivers/firebird/ResultSetMetaData.cxx
index 78d684a725a2..5653d29c4211 100644
--- a/connectivity/source/drivers/firebird/ResultSetMetaData.cxx
+++ b/connectivity/source/drivers/firebird/ResultSetMetaData.cxx
@@ -128,9 +128,15 @@ OUString SAL_CALL 
OResultSetMetaData::getSchemaName(sal_Int32)
 OUString SAL_CALL OResultSetMetaData::getColumnName(sal_Int32 column)
 {
 verifyValidColumn(column);
-OUString sRet(m_pSqlda->sqlvar[column-1].sqlname,
-m_pSqlda->sqlvar[column-1].sqlname_length,
-RTL_TEXTENCODING_UTF8);
+char* pColumnName = m_pSqlda->sqlvar[column - 1].sqlname;
+sal_Int32 nColumnNameLength = m_pSqlda->sqlvar[column - 1].sqlname_length;
+// tdf#132924 - return column alias if specified
+if (m_pSqlda->sqlvar[column - 1].aliasname_length > 0)
+{
+pColumnName = m_pSqlda->sqlvar[column - 1].aliasname;
+nColumnNameLength = m_pSqlda->sqlvar[column - 1].aliasname_length;
+}
+OUString sRet(pColumnName, nColumnNameLength, RTL_TEXTENCODING_UTF8);
 sanitizeIdentifier(sRet);
 return sRet;
 }
diff --git a/dbaccess/qa/unit/data/tdf132924.odb 
b/dbaccess/qa/unit/data/tdf132924.odb
new file mode 100644
index ..8cee7bcbabfd
Binary files /dev/null and b/dbaccess/qa/unit/data/tdf132924.odb differ
diff --git a/dbaccess/qa/unit/firebird.cxx b/dbaccess/qa/unit/firebird.cxx
index e67a4d10c097..7a8143810097 100644
--- a/dbaccess/qa/unit/firebird.cxx
+++ b/dbaccess/qa/unit/firebird.cxx
@@ -27,10 +27,12 @@ class FirebirdTest
 public:
 void testEmptyDBConnection();
 void testIntegerDatabase();
+void testTdf132924();
 
 CPPUNIT_TEST_SUITE(FirebirdTest);
 CPPUNIT_TEST(testEmptyDBConnection);
 CPPUNIT_TEST(testIntegerDatabase);
+CPPUNIT_TEST(testTdf132924);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -90,6 +92,32 @@ void FirebirdTest::testIntegerDatabase()
 closeDocument(uno::Reference(xDocument, uno::UNO_QUERY));
 }
 
+void FirebirdTest::testTdf132924()
+{
+uno::Reference xDocument = 
getDocumentForFileName(u"tdf132924.odb");
+uno::Reference xConnection = 
getConnectionForDocument(xDocument);
+
+uno::Reference xStatement = xConnection->createStatement();
+CPPUNIT_ASSERT(xStatement.is());
+
+uno::Reference xResultSet = xStatement->executeQuery("SELECT * 
FROM AliasTest");
+CPPUNIT_ASSERT(xResultSet.is());
+CPPUNIT_ASSERT(xResultSet->next());
+
+uno::Reference xRow(xResultSet, UNO_QUERY);
+CPPUNIT_ASSERT(xRow.is());
+uno::Reference xColumnLocate(xRow, UNO_QUERY);
+CPPUNIT_ASSERT(xColumnLocate.is());
+
+// Without the fix in place, this test would have failed with:
+// - Expected: 1
+// - Actual  : The column name 'TestId' is not valid
+CPPUNIT_ASSERT_EQUAL(sal_Int16(1), 
xRow->getShort(xColumnLocate->findColumn("TestId")));
+CPPUNIT_ASSERT_EQUAL(OUString("TestName"), 
xRow->getString(xColumnLocate->findColumn("TestName")));
+
+closeDocument(uno::Reference(xDocument, uno::UNO_QUERY));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(FirebirdTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();


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

2022-03-25 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/gdimtf.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit a07e91a5a76546863ccf71462446e8d16d07d21b
Author: Caolán McNamara 
AuthorDate: Fri Mar 25 11:07:30 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 25 13:18:33 2022 +0100

ofz#45963 Integer-overflow

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

diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 11950bbe44e7..3fa9ea3d24e3 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -462,6 +462,10 @@ void GDIMetaFile::Play(OutputDevice& rOut, const Point& 
rPos,
 if (aDestSize.Width() <= 0 || aDestSize.Height() <= 0)
 return;
 
+if (aDestSize.Width() > std::numeric_limits::max() ||
+aDestSize.Height() > std::numeric_limits::max())
+return;
+
 GDIMetaFile* pMtf = rOut.GetConnectMetaFile();
 
 if (ImplPlayWithRenderer(rOut, rPos, rSize))


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - configure.ac

2022-03-25 Thread Xisco Fauli (via logerrit)
 configure.ac |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a137a43f18803406a2cdecd2b715ed8f459bb972
Author: Xisco Fauli 
AuthorDate: Fri Mar 25 11:29:19 2022 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 25 13:05:08 2022 +0100

configure.ac: add missing MAC_OS_X_VERSION_MAX_ALLOWED for macOS SDK 12.3

Support for macOS SDK 12.3 was backported to libreoffice-7-3 in
1d875592eb4a2ca78b94c959f1acbc3552db608f "Accept macOS SDK 12.3"
but MAC_OS_X_VERSION_MAX_ALLOWED was missing in the commit
because it was removed in master after

b0ab07ba89c88006932c68e0ca08dffcd0a4621e
"Always set MAC_OS_X_VERSION_MAX_ALLOWED =
MAC_OS_X_VERSION_MIN_REQUIRED"

Change-Id: Ic7d8581bebad12bfe7f23b06c24d3b8ea2fdde43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132104
Reviewed-by: Stephan Bergmann 
Tested-by: Xisco Fauli 

diff --git a/configure.ac b/configure.ac
index d5c7cb76c917..f04806fc935f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3455,8 +3455,11 @@ if test $_os = Darwin; then
 12.1)
 MAC_OS_X_VERSION_MAX_ALLOWED="120100"
 ;;
+12.3)
+MAC_OS_X_VERSION_MAX_ALLOWED="120300"
+;;
 *)
-AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.12--12.1])
+AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.12--12.3])
 ;;
 esac
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 8 commits - cui/source sc/source sw/qa sw/source vcl/source writerfilter/source

2022-03-25 Thread Vasily Melenchuk (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |2 
 sc/source/ui/docshell/impex.cxx|   73 +++--
 sw/qa/extras/rtfexport/data/tdf104390.rtf  |6 ++
 sw/qa/extras/rtfexport/data/tdf118047.rtf  |   14 
 sw/qa/extras/rtfexport/data/tdf131234.rtf  |   12 
 sw/qa/extras/rtfexport/rtfexport5.cxx  |   47 
 sw/qa/extras/uiwriter/uiwriter3.cxx|   45 +++
 sw/source/core/frmedt/fetab.cxx|   22 +--
 sw/source/core/txtnode/fntcache.cxx|4 +
 vcl/source/gdi/pdfwriter_impl.cxx  |4 -
 writerfilter/source/rtftok/rtfdispatchflag.cxx |6 --
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   47 +---
 writerfilter/source/rtftok/rtfdocumentimpl.hxx |3 -
 writerfilter/source/rtftok/rtfsprm.cxx |   12 
 14 files changed, 223 insertions(+), 74 deletions(-)

New commits:
commit 4d2d9cf9c3165e2460466cc75e5a8453346610c8
Author: Vasily Melenchuk 
AuthorDate: Mon Mar 21 17:12:12 2022 +0300
Commit: Andras Timar 
CommitDate: Fri Mar 25 12:59:34 2022 +0100

tdf#104390: rtf import: init default font for entire state stack

If first document element is buried deep in destinations and thus
deep in state stack (m_aStates) initialization of default font
is very local and will be lost after closing these destinations.

So let's initialize entire states stack with default font if none
is provided istead of initialization just a top element.

Change-Id: I966c282f43b84baece909a4c3cd359cbcd317e63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131906
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit 24b5490cb0fd8de19415509fbf452874669106ad)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131864
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/rtfexport/data/tdf104390.rtf 
b/sw/qa/extras/rtfexport/data/tdf104390.rtf
new file mode 100644
index ..842e73e19a85
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf104390.rtf
@@ -0,0 +1,6 @@
+{\rtf1\deff0
+{\fonttbl
+{\f0 Courier New;}}
+\fs72
+Hello }}}{World!}}
+}
\ No newline at end of file
diff --git a/sw/qa/extras/rtfexport/rtfexport5.cxx 
b/sw/qa/extras/rtfexport/rtfexport5.cxx
index 36bf6c839b65..297635fce37e 100644
--- a/sw/qa/extras/rtfexport/rtfexport5.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport5.cxx
@@ -1339,6 +1339,21 @@ DECLARE_RTFEXPORT_TEST(testTdf118047, "tdf118047.rtf")
 CPPUNIT_ASSERT_MESSAGE("Header is too large", 1000 > nHeight);
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf104390, "tdf104390.rtf")
+{
+uno::Reference xPara = getParagraph(1);
+uno::Reference xRunEnumAccess(xPara, 
uno::UNO_QUERY);
+uno::Reference xRunEnum = 
xRunEnumAccess->createEnumeration();
+
+// Check font in first run
+uno::Reference xRun(xRunEnum->nextElement(), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(36.f, getProperty(xRun, "CharHeight"));
+CPPUNIT_ASSERT_EQUAL(OUString("Courier New"), getProperty(xRun, 
"CharFontName"));
+
+// Ensure there is only one run
+CPPUNIT_ASSERT_MESSAGE("Extra elements in paragraph", 
!xRunEnum->hasMoreElements());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 072430ebe15f..af4ba47158c3 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -397,16 +397,22 @@ void RTFDocumentImpl::checkFirstRun()
 assert(!m_bNeedSect || m_bFirstRunException);
 setNeedSect(true); // first call that succeeds
 
-// set the requested default font, if there are none
+// set the requested default font, if there are none for each state in 
stack
 RTFValue::Pointer_t pFont
 = getNestedAttribute(m_aDefaultState.getCharacterSprms(), 
NS_ooxml::LN_EG_RPrBase_rFonts,
  NS_ooxml::LN_CT_Fonts_ascii);
-RTFValue::Pointer_t pCurrentFont
-= getNestedAttribute(m_aStates.top().getCharacterSprms(), 
NS_ooxml::LN_EG_RPrBase_rFonts,
- NS_ooxml::LN_CT_Fonts_ascii);
-if (pFont && !pCurrentFont)
-putNestedAttribute(m_aStates.top().getCharacterSprms(), 
NS_ooxml::LN_EG_RPrBase_rFonts,
-   NS_ooxml::LN_CT_Fonts_ascii, pFont);
+if (!pFont)
+return;
+
+for (size_t i = 0; i < m_aStates.size(); i++)
+{
+RTFValue::Pointer_t pCurrentFont
+= getNestedAttribute(m_aStates[i].getCharacterSprms(), 
NS_ooxml::LN_EG_RPrBase_rFonts,
+ NS_ooxml::LN_CT_Fonts_ascii);
+if (!pCurrentFont)
+putNestedAttribute(m_aStates[i].getCharacterSprms(), 
NS_ooxml::LN_EG_RPrBase_rFonts,
+   NS_ooxml::LN_CT_Fonts_ascii, pFont);
+}
 }
 
 void RTFDocumentIm

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

2022-03-25 Thread Gülşah Köse (via logerrit)
 sd/qa/unit/data/pptx/deftabstop.pptx |binary
 sd/qa/unit/import-tests2.cxx |   14 ++
 sd/source/ui/docshell/docshel4.cxx   |   12 
 3 files changed, 26 insertions(+)

New commits:
commit 0d65d4c6b7272f4ca8e413e025db234e5c8c7722
Author: Gülşah Köse 
AuthorDate: Thu Mar 24 11:19:03 2022 +0300
Commit: Gülşah Köse 
CommitDate: Fri Mar 25 12:57:46 2022 +0100

tdf#96389 Use default tab stop value of MSO for pptx import.

Change-Id: Ib3dde68c672b44d8b60f121fb0e637942b5986b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131698
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132103

diff --git a/sd/qa/unit/data/pptx/deftabstop.pptx 
b/sd/qa/unit/data/pptx/deftabstop.pptx
new file mode 100644
index ..5cfe71794446
Binary files /dev/null and b/sd/qa/unit/data/pptx/deftabstop.pptx differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index b62573ec354b..3ecbec200c6e 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -172,6 +172,7 @@ public:
 void testTdf103347();
 void testHyperlinksOnShapes();
 void testTdf112209();
+void testDefaultTabStop();
 
 CPPUNIT_TEST_SUITE(SdImportTest2);
 
@@ -236,6 +237,7 @@ public:
 CPPUNIT_TEST(testTdf103347);
 CPPUNIT_TEST(testHyperlinksOnShapes);
 CPPUNIT_TEST(testTdf112209);
+CPPUNIT_TEST(testDefaultTabStop);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1934,6 +1936,18 @@ void SdImportTest2::testTdf112209()
 xDocShRef->DoClose();
 }
 
+void SdImportTest2::testDefaultTabStop()
+{
+sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/deftabstop.pptx"), 
PPTX);
+SdDrawDocument* pDoc = xDocShRef->GetDoc();
+sal_Int32 nDefTab = pDoc->GetDefaultTabulator();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2540), nDefTab);
+
+xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest2);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index 622d35c7f1eb..b57b06bce617 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -399,6 +399,18 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
 mpDoc->SetSummationOfParagraphs();
 }
 
+if (aFilterName == "Impress MS PowerPoint 2007 XML" ||
+aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay" ||
+aFilterName == "Impress MS PowerPoint 2007 XML VBA" ||
+aFilterName == "Impress Office Open XML")
+{
+// We need to be able to set the default tab size for each text object.
+// This is possible at the moment only for the whole document. See
+// TextParagraphPropertiesContext constructor. So default tab width
+// of the LibreOffice is 1270 but MSO is 2540 on general settings.
+mpDoc->SetDefaultTabulator( 2540 );
+}
+
 const bool bRet = SfxObjectShell::ImportFrom(rMedium, xInsertPosition);
 
 SfxItemSet* pSet = rMedium.GetItemSet();


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

2022-03-25 Thread Arnaud Versini (via logerrit)
 bridges/source/jni_uno/jni_info.cxx |   18 +-
 bridges/source/jni_uno/jni_info.h   |4 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 370b5dbe0d5e62c71b90c795f936dd7c9c240f36
Author: Arnaud Versini 
AuthorDate: Fri Mar 25 10:29:37 2022 +0100
Commit: Noel Grandin 
CommitDate: Fri Mar 25 12:35:12 2022 +0100

bridges : use std::mutex in java brige

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

diff --git a/bridges/source/jni_uno/jni_info.cxx 
b/bridges/source/jni_uno/jni_info.cxx
index 70839e168eb2..16a5a1ac4d5c 100644
--- a/bridges/source/jni_uno/jni_info.cxx
+++ b/bridges/source/jni_uno/jni_info.cxx
@@ -369,18 +369,18 @@ JNI_type_info const * JNI_info::create_type_info(
 
 // look up
 JNI_type_info * info;
-ClearableMutexGuard guard( m_mutex );
+std::unique_lock guard( m_mutex );
 JNI_type_info_holder & holder = m_type_map[ uno_name ];
 if (holder.m_info == nullptr) // new insertion
 {
 holder.m_info = new_info;
-guard.clear();
+guard.unlock();
 info = new_info;
 }
 else // inserted in the meantime
 {
 info = holder.m_info;
-guard.clear();
+guard.unlock();
 new_info->destroy( jni.get_jni_env() );
 }
 return info;
@@ -397,12 +397,12 @@ JNI_type_info const * JNI_info::get_type_info(
 
 OUString const & uno_name = OUString::unacquired( &td->pTypeName );
 JNI_type_info const * info;
-ClearableMutexGuard guard( m_mutex );
+std::unique_lock guard( m_mutex );
 
 t_str2type::const_iterator iFind( m_type_map.find( uno_name ) );
 if (iFind == m_type_map.end())
 {
-guard.clear();
+guard.unlock();
 info = create_type_info( jni, td );
 }
 else
@@ -424,11 +424,11 @@ JNI_type_info const * JNI_info::get_type_info(
 
 OUString const & uno_name = OUString::unacquired( &type->pTypeName );
 JNI_type_info const * info;
-ClearableMutexGuard guard( m_mutex );
+std::unique_lock guard( m_mutex );
 t_str2type::const_iterator iFind( m_type_map.find( uno_name ) );
 if (iFind == m_type_map.end())
 {
-guard.clear();
+guard.unlock();
 TypeDescr td( type );
 info = create_type_info( jni, td.get() );
 }
@@ -450,11 +450,11 @@ JNI_type_info const * JNI_info::get_type_info(
 }
 
 JNI_type_info const * info;
-ClearableMutexGuard guard( m_mutex );
+std::unique_lock guard( m_mutex );
 t_str2type::const_iterator iFind( m_type_map.find( uno_name ) );
 if (iFind == m_type_map.end())
 {
-guard.clear();
+guard.unlock();
 css::uno::TypeDescription td( uno_name );
 if (! td.is())
 {
diff --git a/bridges/source/jni_uno/jni_info.h 
b/bridges/source/jni_uno/jni_info.h
index ede5f1718316..7a18e553e400 100644
--- a/bridges/source/jni_uno/jni_info.h
+++ b/bridges/source/jni_uno/jni_info.h
@@ -25,7 +25,7 @@
 
 #include "jni_base.h"
 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -122,7 +122,7 @@ typedef std::unordered_map<
 
 class JNI_info
 {
-mutable ::osl::Mutexm_mutex;
+mutable std::mutex  m_mutex;
 mutable t_str2type  m_type_map;
 
 public:


Re: 回复:回复:回复:回复:libreoffice-7.3.2 compile in arm system

2022-03-25 Thread Michael Weghorn



On 25/03/2022 11.50, gcxyw1314 wrote:
  rebuilt it based on 7.06 
Modifying find-requires-x11.sh can be installed successfully


Thanks for testing, I've merged the change to master now:
https://git.libreoffice.org/core/+/d6ea4b8ffce91d7956cea0267c95ca69e208db24%5E%21
("Depend on 64-bit packages for aarch64 as well")

Backport for 7.3 pending here:
https://gerrit.libreoffice.org/c/core/+/132044


but building LibreOffice 7.3 和7.1 fails on aarch64 following:
https://paste.debian.net/1235553/


To narrow that issue down, please answer the remaining questions in my 
email of 11:37 today.


Also, did the patch you mention change anything (or was the error just 
the same before)?


[Libreoffice-commits] core.git: instsetoo_native/inc_openoffice

2022-03-25 Thread Michael Weghorn (via logerrit)
 instsetoo_native/inc_openoffice/unix/find-requires-x11.sh |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d6ea4b8ffce91d7956cea0267c95ca69e208db24
Author: Michael Weghorn 
AuthorDate: Fri Mar 25 08:37:37 2022 +0100
Commit: Michael Weghorn 
CommitDate: Fri Mar 25 12:06:37 2022 +0100

Depend on 64-bit packages for aarch64 as well

As Christian Lohmaier pointed out in [1]:

> When building packages using the epm method, the dependency gets added
> by instsetoo_native/inc_openoffice/unix/find-requires-x11.sh - and it
> looks like it should also add the ()(64bit) marker to the dependency
> when PLATFORMID is linux_aarch64 and not only for linux_x86_64
>
> check with rpm -q --provides libXinerama-1.1.3-2.1.el7.aarch64 whether
> it provides "libXinerama.so.1()(64bit)"

The reply of 2022-03-25T10:41 (public mailing list version
probably still pending in some moderator queue)
shows it does:

> [root@1 rpm2]# `rpm -q --provides
> > ^CbXinerama-1.1.3-2.1.el7.aarch64
> [root@1 rpm2]# rpm -q --provides libXinerama-1.1.3-2.1.el7.aarch64
> libXinerama = 1.1.3-2.1.el7
> libXinerama(aarch-64) = 1.1.3-2.1.el7
> libXinerama.so.1()(64bit)

[1] 
https://lists.freedesktop.org/archives/libreoffice/2022-March/088637.html

Change-Id: I1b9a4025399d82ac5f5e51ea5523417e3e6cf395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132094
Tested-by: Michael Weghorn 
Reviewed-by: Michael Weghorn 

diff --git a/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh 
b/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh
index 6808b3631d73..9fec571f5f99 100644
--- a/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh
+++ b/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh
@@ -18,7 +18,7 @@
 #
 
 cat > /dev/null
-[[ "${PLATFORMID}" == "linux_x86_64" ]] && mark64="()(64bit)"
+[[ "${PLATFORMID}" == "linux_x86_64" || "${PLATFORMID}" == "linux_aarch64" ]] 
&& mark64="()(64bit)"
 if [[ "${OS}" == "AIX" ]]; then
   echo "libfreetype.a(libfreetype.so.6${mark64})"
 else


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

2022-03-25 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/chart/tdf122011.py |   50 
 1 file changed, 50 insertions(+)

New commits:
commit bcdb92870bdfe6f44b0d571ded756ba59fe09b87
Author: Xisco Fauli 
AuthorDate: Fri Mar 25 10:27:31 2022 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 25 11:45:26 2022 +0100

tdf#122011: sc: Add UItest

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

diff --git a/sc/qa/uitest/chart/tdf122011.py b/sc/qa/uitest/chart/tdf122011.py
new file mode 100644
index ..af1e09940812
--- /dev/null
+++ b/sc/qa/uitest/chart/tdf122011.py
@@ -0,0 +1,50 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.calc import enter_text_to_cell
+
+class tdf122011(UITestCase):
+
+def test_tdf122011(self):
+
+with self.ui_test.create_doc_in_start_center("calc") as document:
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+
+# FIXME: tdf#148166
+enter_text_to_cell(gridwin, "A2", "4")
+
+# use an existing document
+xReference = "'" + get_url_for_data_file("tdf119954.ods") + 
"'#$Sheet1.$A$1"
+
+with 
self.ui_test.execute_dialog_through_command(".uno:InsertObjectChart", 
close_button="finish") as xChartDlg:
+xNextBtn = xChartDlg.getChild("next")
+xNextBtn.executeAction("CLICK", tuple())
+
+xRange = xChartDlg.getChild("ED_RANGE")
+xRange.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+xRange.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+xRange.executeAction("TYPE", mkPropertyValues({"TEXT": 
xReference}))
+
+# Without the fix in place, this test would have gotten stack 
here because the dialog is not closed
+# as the reference to an external file is incorrect
+
+xChart = document.Sheets[0].Charts[0]
+xDataSeries = 
xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries
+
+self.assertEqual(1, len(xDataSeries))
+
+xDS = xDataSeries[0].DataSequences
+
+self.assertEqual(1, len(xDS))
+self.assertEqual(xReference, 
xDS[0].Values.SourceRangeRepresentation)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


Re: 回复:回复:回复:libreoffice-7.3.2 compile in arm system

2022-03-25 Thread Michael Weghorn

On 25/03/2022 11.20, gcxyw1314 wrote:


I have rebuilt it based on 7.06 and it can be installed normally.

e rebuilt it based on 7.06 and it can be installed normally.


Is that with the change mentioned earlier applied, i.e. an answer to one 
question in the email I sent just now:


On 25/03/2022 11.37, Michael Weghorn wrote:

Thanks, that shows that the package actually provides
"libXinerama.so.1()(64bit)" on aarch64 and change
https://gerrit.libreoffice.org/c/core/+/132094 is needed.

This should solve issue 2).
Can you confirm that the installation works if you apply the above change before doing your 7.0 build? 





Re: 回复:回复:回复:libreoffice-7.3.2 compile in arm system

2022-03-25 Thread Michael Weghorn



Do I correctly understand the discussion so far that there are 2 
different issues that you are encountering on aarch64? (This thread 
jumps back and forth between the two a bit):


1) building LibreOffice 7.3 fails on aarch64
2) building LibreOffice 7.0 works, but installation of RPM packages fails

On 25/03/2022 10.41, gcxyw1314 wrote:


[root@1 rpm2]# `rpm -q --provides
 ^CbXinerama-1.1.3-2.1.el7.aarch64 

[root@1 rpm2]# rpm -q --provides libXinerama-1.1.3-2.1.el7.aarch64
libXinerama = 1.1.3-2.1.el7
libXinerama(aarch-64) = 1.1.3-2.1.el7
libXinerama.so.1()(64bit)


Thanks, that shows that the package actually provides
"libXinerama.so.1()(64bit)" on aarch64 and change
https://gerrit.libreoffice.org/c/core/+/132094 is needed.

This should solve issue 2).
Can you confirm that the installation works if you apply the above 
change before doing your 7.0 build?



When I built versions 7.3 and 7.1, I kept reporting

/home/logsaas/libreoffice-7-1/workdir/CxxObject/xmloff/source/core/xmlimp. o: 
In function `SvXMLImport::SetAutoStyles(SvXMLStylesContext*)':

xmlimp. cxx:(.text+0x8b90): undefined reference to `non-virtual thunk to 
cppu::WeakImplHelper::acquire()'


Now we're at issue 1). Some questions to try to narrow the issue down:

Can you please try whether the same happens with the current git master 
branch instead of 7.3 (run "make distclean" first after switching 
branches), and if so, submit a more detailed error output to 
paste.debian.net, with the expiration date set to "never"?


What does your autogen.input look like? Or if you're not using that, 
what options are you passing to `./autogen.sh`?


This is on CentOS 7.7, aarch64 architecture, right?
Can you share the file `config.log` from your build directory?


But I am 
https://bug-attachments.documentfoundation.org/attachment.cgi?id=172646 No 
modification method was found above, so I compiled on 7.06 and didn't encounter 
this error,


Where does that patch come from? Is there a related Bugzilla issue it is 
attached to?


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

2022-03-25 Thread Julien Nabet (via logerrit)
 chart2/source/controller/main/StatusBarCommandDispatch.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 70cda6eff03ea186bff65318ed8d4cbeff7cbc48
Author: Julien Nabet 
AuthorDate: Thu Mar 24 09:19:37 2022 +0100
Commit: Julien Nabet 
CommitDate: Fri Mar 25 11:33:54 2022 +0100

tdf#148157: assertion after set "Between tick marks", click outside the 
chart

See bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=179065

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

diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.cxx 
b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
index 1b867cb562f8..26fcc45b4a30 100644
--- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx
+++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
@@ -66,7 +66,7 @@ void StatusBarCommandDispatch::fireStatusEvent(
 bool bFireContext(  bFireAll || rURL == ".uno:Context" );
 bool bFireModified( bFireAll || rURL == ".uno:ModifiedStatus" );
 
-if( bFireContext )
+if( bFireContext && m_xChartModel.is())
 {
 uno::Any aArg;
 aArg <<= ObjectNameProvider::getSelectedObjectText( 
m_aSelectedOID.getObjectCID(), m_xChartModel );


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

2022-03-25 Thread Noel Grandin (via logerrit)
 sw/source/core/attr/format.cxx|4 ++--
 sw/source/core/crsr/crstrvl.cxx   |4 ++--
 sw/source/core/doc/docfmt.cxx |2 +-
 sw/source/core/text/atrstck.cxx   |8 
 sw/source/core/tox/ToxTabStopTokenHandler.cxx |2 +-
 sw/source/core/txtnode/ndtxt.cxx  |8 +++-
 sw/source/filter/ww8/docxattributeoutput.cxx  |7 +++
 sw/source/filter/ww8/rtfattributeoutput.cxx   |4 ++--
 sw/source/filter/ww8/wrtww8.hxx   |   14 +-
 sw/source/filter/ww8/ww8atr.cxx   |   15 +++
 sw/source/uibase/utlui/uitool.cxx |   11 +--
 11 files changed, 43 insertions(+), 36 deletions(-)

New commits:
commit 9ca53dfa9b6d1ccdf632bec23b45bb588021f1e9
Author: Noel Grandin 
AuthorDate: Fri Mar 25 11:21:03 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 25 11:21:10 2022 +0100

simplify some TypedWhichId code

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

diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 2ce4c9aa7dc6..bbb1cddd1576 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -440,10 +440,10 @@ SfxItemState 
SwFormat::GetBackgroundState(std::unique_ptr& rItem)
 return SfxItemState::DEFAULT;
 }
 
-const SfxPoolItem* pItem = nullptr;
+const SvxBrushItem* pItem = nullptr;
 SfxItemState eRet = m_aSet.GetItemState(RES_BACKGROUND, true, &pItem);
 if (pItem)
-rItem.reset(&pItem->Clone()->StaticWhichCast(RES_BACKGROUND));
+rItem.reset(pItem->Clone());
 return eRet;
 }
 
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 7934ad3bc5da..f1a0d4e742ac 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -2216,12 +2216,12 @@ bool SwCursorShell::SetShadowCursorPos( const Point& 
rPt, SwFillMode eFillMode )
 SfxItemSetFixed<
 RES_PARATR_ADJUST, RES_PARATR_ADJUST,
 RES_LR_SPACE, RES_LR_SPACE>  aSet( 
GetDoc()->GetAttrPool() );
-SvxLRSpaceItem 
aLR(pCNd->GetAttr(RES_LR_SPACE).StaticWhichCast(RES_LR_SPACE));
+SvxLRSpaceItem aLR(pCNd->GetAttr(RES_LR_SPACE));
 aLR.SetTextLeft( aFPos.nTabCnt );
 aLR.SetTextFirstLineOffset( 0 );
 aSet.Put( aLR );
 
-const SvxAdjustItem& rAdj = 
pCNd->GetAttr(RES_PARATR_ADJUST).StaticWhichCast(RES_PARATR_ADJUST);
+const SvxAdjustItem& rAdj = 
pCNd->GetAttr(RES_PARATR_ADJUST);
 if( SvxAdjust::Left != rAdj.GetAdjust() )
 aSet.Put( SvxAdjustItem( SvxAdjust::Left, 
RES_PARATR_ADJUST ) );
 
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 257e5707cff4..bbdd0b1ea6fb 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1658,7 +1658,7 @@ void SwDoc::MoveLeftMargin(const SwPaM& rPam, bool 
bRight, bool bModulus,
 if( pTNd )
 {
 pTNd = sw::GetParaPropsNode(*pLayout, aIdx);
-SvxLRSpaceItem 
aLS(pTNd->SwContentNode::GetAttr(RES_LR_SPACE).StaticWhichCast(RES_LR_SPACE));
+SvxLRSpaceItem aLS(pTNd->SwContentNode::GetAttr(RES_LR_SPACE));
 
 // #i93873# See also lcl_MergeListLevelIndentAsLRSpaceItem in 
thints.cxx
 if ( pTNd->AreListLevelIndentsApplicable() )
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index 8c64b1dd5f45..f5cb36cb03f6 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -526,7 +526,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const 
sal_uInt16 nAttr )
 
 if ( pTwoLineAttr )
 {
- const auto& rTwoLineItem = CharFormat::GetItem( *pTwoLineAttr, 
RES_CHRATR_TWO_LINES )->StaticWhichCast(RES_CHRATR_TWO_LINES);
+ const auto& rTwoLineItem = *CharFormat::GetItem( *pTwoLineAttr, 
RES_CHRATR_TWO_LINES );
  bTwoLineAct = rTwoLineItem.GetValue();
 }
 else
@@ -541,7 +541,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const 
sal_uInt16 nAttr )
 
 if ( pRotateAttr )
 {
-const auto& rRotateItem = CharFormat::GetItem( *pRotateAttr, 
RES_CHRATR_ROTATE )->StaticWhichCast(RES_CHRATR_ROTATE);
+const auto& rRotateItem = *CharFormat::GetItem( *pRotateAttr, 
RES_CHRATR_ROTATE );
 rFnt.SetVertical( rRotateItem.GetValue(), m_bVertLayout );
 }
 else
@@ -746,7 +746,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, 
SwFont& rFnt, bool bPush )
 
 if ( pTwoLineAttr )
 {
-const auto& rTwoLineItem = CharFormat::GetIte

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

2022-03-25 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/TextField.idl |6 ++
 sw/inc/fldbas.hxx  |4 
 sw/qa/core/unocore/unocore.cxx |   29 +
 sw/source/core/fields/fldbas.cxx   |   15 +++
 sw/source/core/fields/usrfld.cxx   |1 +
 sw/source/core/inc/unofldmid.h |1 +
 sw/source/core/unocore/unomap.cxx  |1 +
 sw/source/uibase/docvw/edtwin2.cxx |   12 
 8 files changed, 69 insertions(+)

New commits:
commit 7744b464ed0efe66b65bf8eb5c6fdf6cd5bc867b
Author: Miklos Vajna 
AuthorDate: Thu Mar 24 15:18:28 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 25 11:00:32 2022 +0100

sw fields: add Title uno property

The use-case is user fields, which are kind of variables in the
document. They have a name and a value, but the name might be only
readable to an extension or macro, not to the user. In this case, it
makes sense to have a way to specify a user-readable tooltip.

Be consistent with TextFrames which already have a Title property.

(cherry picked from commit 1acf8e3cfaf1ef92008e39514a32ace0d036e552)

Conflicts:
sw/inc/fldbas.hxx
sw/qa/core/unocore/unocore.cxx
sw/source/core/fields/fldbas.cxx
sw/source/core/unocore/unomap.cxx

Change-Id: I986792f5e55e0b96489347be482d640d155113cc

diff --git a/offapi/com/sun/star/text/TextField.idl 
b/offapi/com/sun/star/text/TextField.idl
index 38c58e9afb1e..5499792b8c41 100644
--- a/offapi/com/sun/star/text/TextField.idl
+++ b/offapi/com/sun/star/text/TextField.idl
@@ -66,6 +66,12 @@ published service TextField
  */
 [optional, property, readonly] boolean IsFieldDisplayed;
 
+/** Contains short title for the field, used to for tooltip purposes if 
it's non-empty.
+
+@since LibreOffice 7.4
+*/
+[optional, property] string Title;
+
 
 };
 
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 4f275e792fb9..08169564b0f9 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -299,6 +299,8 @@ private:
 boolm_bIsAutomaticLanguage;
 sal_uInt32  m_nFormat;  /// this can be either 
SvxNumType or SwChapterFormat depending on the subtype
 SwFieldType*m_pType;
+/// Used for tooltip purposes when it's not-empty.
+OUString m_aTitle;
 
 virtual OUStringExpandImpl(SwRootFrame const* pLayout) const = 0;
 virtual std::unique_ptr Copy() const = 0;
@@ -391,6 +393,8 @@ public:
 /// Is this field clickable?
 bool IsClickable() const;
 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
+OUString GetTitle() const { return m_aTitle; }
+void SetTitle(const OUString& rTitle) { m_aTitle = rTitle; }
 };
 
 inline SwFieldType* SwField::GetTyp() const
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index e5df225828ae..d86e28fcc170 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -165,6 +166,34 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testBrokenEmbeddedObject)
 
xEmbeddedObject->supportsService("com.sun.star.comp.embed.OCommonEmbeddedObject"));
 }
 
+CPPUNIT_TEST_FIXTURE(SwModelTestBase, testUserFieldTooltip)
+{
+// Given a document with a user field:
+loadURL("private:factory/swriter", nullptr);
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xField(
+xFactory->createInstance("com.sun.star.text.TextField.User"), 
uno::UNO_QUERY);
+uno::Reference xMaster(
+xFactory->createInstance("com.sun.star.text.FieldMaster.User"), 
uno::UNO_QUERY);
+xMaster->setPropertyValue("Name", uno::makeAny(OUString("a_user_field")));
+xField->attachTextFieldMaster(xMaster);
+xField->getTextFieldMaster()->setPropertyValue("Content", 
uno::makeAny(OUString("42")));
+uno::Reference xDocument(mxComponent, uno::UNO_QUERY);
+uno::Reference xText = xDocument->getText();
+xText->insertTextContent(xText->createTextCursor(), xField, 
/*bAbsorb=*/false);
+uno::Reference xFieldProps(xField, uno::UNO_QUERY);
+
+// When setting a tooltip on the field:
+OUString aExpected("first line\nsecond line");
+xFieldProps->setPropertyValue("Title", uno::makeAny(aExpected));
+
+// Then make sure that the tooltip we read back matches the one previously 
specified:
+// Without the accompanying fix in place, this test would have failed with:
+// - the property is of unexpected type or void: Title
+// i.e. reading of the tooltip was broken.
+CPPUNIT_ASSERT_EQUAL(aExpected, getProperty(xFieldProps, 
"Title"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 382880ecd8f4..5ba77adbc56b 100644
--- a/sw/source/core/fie

[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - 4 commits - dtrans/source fpicker/source include/o3tl include/sal include/systools offapi/com offapi/UnoApi_offapi.mk Repository.mk s

2022-03-25 Thread Samuel Mehrbrodt (via logerrit)
 Repository.mk   |1 
 dtrans/source/win32/dtobj/FmtFilter.cxx |   11 
 fpicker/source/win32/VistaFilePickerImpl.cxx|   13 
 fpicker/source/win32/VistaFilePickerImpl.hxx|4 
 include/o3tl/safeCoInitUninit.hxx   |   58 
 include/sal/log-areas.dox   |1 
 include/systools/win32/comtools.hxx |   74 -
 offapi/UnoApi_offapi.mk |7 
 offapi/com/sun/star/system/windows/JumpList.idl |   33 ++
 offapi/com/sun/star/system/windows/JumpListItem.idl |   45 +++
 offapi/com/sun/star/system/windows/XJumpList.idl|   88 ++
 shell/Library_jumplist.mk   |   37 ++
 shell/Module_shell.mk   |1 
 shell/source/win32/SysShExec.cxx|   16 -
 shell/source/win32/jumplist/JumpList.cxx|  290 
 shell/source/win32/jumplist/jumplist.component  |   17 +
 16 files changed, 663 insertions(+), 33 deletions(-)

New commits:
commit b54d0d262bbafbc08efd1cbc93af61b786f89821
Author: Samuel Mehrbrodt 
AuthorDate: Mon Mar 14 10:04:17 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Fri Mar 25 10:27:06 2022 +0100

Add UNO API for custom Jump Lists

Allows adding custom jump list categories to Windows Task Bar

Change-Id: I13b6c3ad5de386cf74e2b346f10889bc46a8ad4e

diff --git a/Repository.mk b/Repository.mk
index 639c0db413eb..49a46b454409 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -391,6 +391,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
hyphen \
 icg \
$(if $(ENABLE_JAVA),jdbc) \
+   jumplist \
$(if $(ENABLE_LDAP),ldapbe2) \
$(if $(filter WNT,$(OS)),WinUserInfoBe) \
localebe1 \
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 9a0c43587bc9..40575f96e69a 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -625,6 +625,7 @@ certain functionality.
 @li @c scripting
 @li @c scripting.provider
 @li @c shell
+@li @c shell.jumplist
 @li @c stoc
 @li @c store
 @li @c svg
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index c86e7d5a7800..aa85f3a525e9 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3621,6 +3621,13 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/system,\
XSimpleMailMessage2 \
XSystemShellExecute \
 ))
+
+$(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/system/windows,\
+   JumpList \
+   JumpListItem \
+   XJumpList \
+))
+
 $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/table,\
BorderLine \
BorderLine2 \
diff --git a/offapi/com/sun/star/system/windows/JumpList.idl 
b/offapi/com/sun/star/system/windows/JumpList.idl
new file mode 100755
index ..82becd522b69
--- /dev/null
+++ b/offapi/com/sun/star/system/windows/JumpList.idl
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_system_windows_JumpList_idl__
+#define __com_sun_star_system_windows_JumpList_idl__
+
+
+module com { module sun { module star { module system { module windows {
+
+
+interface XJumpList;
+
+/** Specifies a Jump List service. Allows to add custom commands to the 
Windows Jump List.
+
+@since LibreOffice 7.4
+
+@see com::sun::star::system::windows::XJumpList
+*/
+
+service JumpList : XJumpList;
+
+
+}; }; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/offapi/com/sun/star/system/windows/JumpListItem.idl 
b/offapi/com/sun/star/system/windows/JumpListItem.idl
new file mode 100755
index ..310e5551911a
--- /dev/null
+++ b/offapi/com/sun/star/system/windows/JumpListItem.idl
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_system_windows_JumpListItem_idl__
+#define __com_sun_star_system_windows_JumpListItem_idl__
+
+#include 
+#include 
+#include 
+
+
+module com { module sun { module star { module system { module windows {
+
+/** Specifies an item for com::sun::star::system::windows::XJumpList .
+
+@since LibreOffice 7.4
+*/
+
+struct JumpListItem
+{
+/** Item name. Appears in the JumpList. Has to be unique 

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

2022-03-25 Thread Noel Grandin (via logerrit)
 sc/inc/column.hxx|3 --
 sc/inc/document.hxx  |3 --
 sc/source/core/data/column3.cxx  |   46 ---
 sc/source/core/data/column4.cxx  |2 -
 sc/source/core/data/document.cxx |4 +--
 sc/source/core/data/table2.cxx   |2 -
 6 files changed, 7 insertions(+), 53 deletions(-)

New commits:
commit f8334fedbd92da41932ed5c4875fda9fdc19aaad
Author: Noel Grandin 
AuthorDate: Thu Mar 24 13:06:50 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 25 09:58:48 2022 +0100

loplugin:constantparam

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

diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 689f0c0ccbd0..f04d54aca739 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -721,8 +721,7 @@ public:
  std::vector* pNewSharedRows );
 
 void AttachFormulaCells( sc::StartListeningContext& rCxt, SCROW nRow1, 
SCROW nRow2 );
-void DetachFormulaCells( sc::EndListeningContext& rCxt, SCROW nRow1, SCROW 
nRow2,
- std::vector* pNewSharedRows );
+void DetachFormulaCells( sc::EndListeningContext& rCxt, SCROW nRow1, SCROW 
nRow2 );
 
 /**
  * Regroup formula cells for the entire column.
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index d5df933e1cfc..cd7138b3e945 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1210,8 +1210,7 @@ public:
   { 
mbFormulaGroupCxtBlockDiscard = block; }
 
 // Note that if pShared is set and a value is returned that way, the 
returned OUString is empty.
-SC_DLLPUBLIC OUString GetInputString( SCCOL nCol, 
SCROW nRow, SCTAB nTab,
-  const svl::SharedString** 
pShared = nullptr ) const;
+SC_DLLPUBLIC OUString GetInputString( SCCOL nCol, 
SCROW nRow, SCTAB nTab ) const;
 FormulaError  GetStringForFormula( const 
ScAddress& rPos, OUString& rString );
 SC_DLLPUBLIC double   GetValue( const ScAddress& rPos 
) const;
 SC_DLLPUBLIC double   GetValue( SCCOL nCol, SCROW 
nRow, SCTAB nTab ) const;
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 2f4b7a2c0774..4aa91b89d919 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -495,59 +495,15 @@ void ScColumn::AttachFormulaCells( 
sc::StartListeningContext& rCxt, SCROW nRow1,
 sc::ProcessFormula(it, maCells, nRow1, nRow2, aFunc);
 }
 
-void ScColumn::DetachFormulaCells( sc::EndListeningContext& rCxt, SCROW nRow1, 
SCROW nRow2,
-std::vector* pNewSharedRows )
+void ScColumn::DetachFormulaCells( sc::EndListeningContext& rCxt, SCROW nRow1, 
SCROW nRow2 )
 {
 sc::CellStoreType::position_type aPos = maCells.position(nRow1);
 sc::CellStoreType::iterator it = aPos.first;
 
-bool bLowerSplitOff = false;
-if (pNewSharedRows && !GetDoc().IsClipOrUndo())
-{
-const ScFormulaCell* pFC = 
sc::SharedFormulaUtil::getSharedTopFormulaCell(aPos);
-if (pFC)
-{
-const SCROW nTopRow = pFC->GetSharedTopRow();
-const SCROW nBotRow = nTopRow + pFC->GetSharedLength() - 1;
-// nTopRow <= nRow1 <= nBotRow, because otherwise pFC would not 
exist.
-if (nTopRow < nRow1)
-{
-// Upper part will be split off.
-pNewSharedRows->push_back(nTopRow);
-pNewSharedRows->push_back(nRow1 - 1);
-}
-if (nRow2 < nBotRow)
-{
-// Lower part will be split off.
-pNewSharedRows->push_back(nRow2 + 1);
-pNewSharedRows->push_back(nBotRow);
-bLowerSplitOff = true;
-}
-}
-}
-
 // Split formula grouping at the top and bottom boundaries.
 sc::SharedFormulaUtil::splitFormulaCellGroup(aPos, &rCxt);
 if (GetDoc().ValidRow(nRow2+1))
 {
-if (pNewSharedRows && !bLowerSplitOff && !GetDoc().IsClipOrUndo())
-{
-sc::CellStoreType::position_type aPos2 = 
maCells.position(aPos.first, nRow2);
-const ScFormulaCell* pFC = 
sc::SharedFormulaUtil::getSharedTopFormulaCell(aPos2);
-if (pFC)
-{
-const SCROW nTopRow = pFC->GetSharedTopRow();
-const SCROW nBotRow = nTopRow + pFC->GetSharedLength() - 1;
-// nRow1 < nTopRow <= nRow2 < nBotRow
-if (nRow2 < nBotRow)
-{
-// Lower part will be split off.
-pNewSharedRows->push_back(nRow2 + 1);
-pNewSharedRows->push_back(nBotRow);
-}
-}
-}
-
 aPos =

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

2022-03-25 Thread Noel Grandin (via logerrit)
 sc/source/core/tool/dbdata.cxx   |7 +++
 sc/source/ui/cctrl/checklistmenu.cxx |6 +++---
 sc/source/ui/inc/checklistmenu.hxx   |2 +-
 3 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 2a5ba6ff05d94065c37324b32fa463c7373a4755
Author: Noel Grandin 
AuthorDate: Thu Mar 24 12:48:42 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 25 09:58:22 2022 +0100

loplugin:constantparam

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

diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 3042404e0eaa..b62d3b76b8bf 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -1010,7 +1010,7 @@ public:
 };
 
 OUString lcl_IncrementNumberInNamedRange(ScDBCollection::NamedDBs& namedDBs,
- const OUString& sOldName, bool 
bIsUpperName)
+ const OUString& sOldName)
 {
 sal_Int32 nLastIndex = sOldName.lastIndexOf('_') + 1;
 sal_Int32 nOldNumber = 1;
@@ -1034,8 +1034,7 @@ OUString 
lcl_IncrementNumberInNamedRange(ScDBCollection::NamedDBs& namedDBs,
 do
 {
 sNewName = sOldName.subView(0, nLastIndex) + 
OUString::number(++nOldNumber);
-} while ((bIsUpperName ? namedDBs.findByUpperName(sNewName) : 
namedDBs.findByName(sNewName))
- != nullptr);
+} while (namedDBs.findByName(sNewName) != nullptr);
 return sNewName;
 }
 
@@ -1553,7 +1552,7 @@ void ScDBCollection::CopyToTable(SCTAB nOldPos, SCTAB 
nNewPos)
 return;
 
 OUString newName
-= lcl_IncrementNumberInNamedRange(getNamedDBs(), 
rxNamedDB->GetName(), false);
+= lcl_IncrementNumberInNamedRange(getNamedDBs(), 
rxNamedDB->GetName());
 std::unique_ptr pDataCopy = 
std::make_unique(newName, *rxNamedDB);
 pDataCopy->UpdateMoveTab(nOldPos, nNewPos);
 pDataCopy->SetIndex(0);
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index a3ecb34b5f7d..3e9420ecd05b 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -114,7 +114,7 @@ IMPL_LINK_NOARG(ScCheckListMenuControl, SelectHdl, 
weld::TreeView&, void)
 else
 nSelectedMenu = mxMenu->get_iter_index_in_parent(*mxScratchIter);
 
-setSelectedMenuItem(nSelectedMenu, true);
+setSelectedMenuItem(nSelectedMenu);
 }
 
 void ScCheckListMenuControl::addMenuItem(const OUString& rText, Action* 
pAction)
@@ -216,13 +216,13 @@ void ScCheckListMenuControl::executeMenuItem(size_t nPos)
 terminateAllPopupMenus();
 }
 
-void ScCheckListMenuControl::setSelectedMenuItem(size_t nPos, bool 
bSubMenuTimer)
+void ScCheckListMenuControl::setSelectedMenuItem(size_t nPos)
 {
 if (mnSelectedMenu == nPos)
 // nothing to do.
 return;
 
-selectMenuItem(nPos, bSubMenuTimer);
+selectMenuItem(nPos, /*bSubMenuTimer*/true);
 }
 
 void ScCheckListMenuControl::handleMenuTimeout(const SubMenuItemData* pTimer)
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index 55525bac96f0..eaad396bee1a 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -204,7 +204,7 @@ private:
 int GetCheckedEntryCount() const;
 void CheckAllChildren(const weld::TreeIter& rEntry, bool bCheck);
 
-void setSelectedMenuItem(size_t nPos, bool bSubMenuTimer);
+void setSelectedMenuItem(size_t nPos);
 
 std::unique_ptr FindEntry(const weld::TreeIter* pParent, 
std::u16string_view sNode);
 


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

2022-03-25 Thread Caolán McNamara (via logerrit)
 sw/qa/core/data/rtf/fail/forcepoint-82.rtf   |   28 +++
 writerfilter/source/dmapper/DomainMapperTableManager.cxx |2 +
 2 files changed, 30 insertions(+)

New commits:
commit 2cc8d314123353c5fb9ece2fefd82fb3bce25ec2
Author: Caolán McNamara 
AuthorDate: Wed Mar 23 10:45:15 2022 +
Commit: Xisco Fauli 
CommitDate: Fri Mar 25 09:58:03 2022 +0100

forcepoint#82 back() called on empty vector

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

diff --git a/sw/qa/core/data/rtf/fail/forcepoint-82.rtf 
b/sw/qa/core/data/rtf/fail/forcepoint-82.rtf
new file mode 100644
index ..54b1dee42c5b
--- /dev/null
+++ b/sw/qa/core/data/rtf/fail/forcepoint-82.rtf
@@ -0,0 +1,28 @@
+{\rtf1
+{\trowd
+\clbrdrl\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\cellx2000
+\pard
+Text 1
+\itap0
+\cell
+\row}
+\pard
+\par
+\itap0
+{\trowd
+\clbrdrl\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\cellx2000
+\pard
+Text 2
+\itap0
+\cell
+\row}
+\itap-1
+{\trowd
+\clbrdrl\brdrs\brdrw2147483649\clbrdrr\brdrs\brdrw9\clbrdrt\brdrs\brdrw10\cl󠁐brdrb\brdrs\brdrw185\cellx1000
+\nestro󠀩w}
+\itap0
+\cell
+\row}
+\itap0
+\par
+}
\ No newline at end of file
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx 
b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 3b927642348d..127f9b067c4d 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -387,6 +387,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
 
 DomainMapperTableManager::IntVectorPtr const & 
DomainMapperTableManager::getCurrentGrid( )
 {
+if (m_aTableGrid.empty())
+throw std::out_of_range("no current grid");
 return m_aTableGrid.back( );
 }
 


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

2022-03-25 Thread Noel Grandin (via logerrit)
 sc/source/ui/inc/content.hxx|2 +-
 sc/source/ui/navipi/content.cxx |5 +
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 891c7fbbf201b90ae65ca0a33e68b1f788cbb7ff
Author: Noel Grandin 
AuthorDate: Thu Mar 24 11:25:41 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 25 09:58:00 2022 +0100

loplugin:constantparam

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

diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 2a31d1d38056..9cd7e977319d 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -153,7 +153,7 @@ public:
 const OUString& GetHiddenTitle() const{ return aHiddenTitle; }
 
 /** Applies the navigator settings to the listbox. */
-void ApplyNavigatorSettings(bool bRestoreScrollPos = false, int nScrollPos 
= 0);
+void ApplyNavigatorSettings();
 /** Stores the current listbox state in the navigator settings. */
 void StoreNavigatorSettings();
 };
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index c6fa3fcc7eab..2c8336fd3662 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1548,7 +1548,7 @@ void ScContentTree::SelectEntryByName(const ScContentId 
nRoot, std::u16string_vi
 }
 }
 
-void ScContentTree::ApplyNavigatorSettings(bool bRestorePos, int nScrollPos)
+void ScContentTree::ApplyNavigatorSettings()
 {
 const ScNavigatorSettings* pSettings = 
ScNavigatorDlg::GetNavigatorSettings();
 if( !pSettings )
@@ -1589,9 +1589,6 @@ void ScContentTree::ApplyNavigatorSettings(bool 
bRestorePos, int nScrollPos)
 // select
 if( nRootSel == nEntry )
 {
-if (bRestorePos)
-m_xTreeView->vadjustment_set_value(nScrollPos);
-
 std::unique_ptr xEntry;
 if (bExp && (nChildSel != SC_CONTENT_NOCHILD))
 {


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

2022-03-25 Thread Miklos Vajna (via logerrit)
 sw/source/core/text/inftxt.cxx |   27 ++-
 1 file changed, 26 insertions(+), 1 deletion(-)

New commits:
commit eb53efed80302c4ca6409c6dbd023d8ba1eb8e47
Author: Miklos Vajna 
AuthorDate: Fri Mar 25 08:37:22 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 25 09:36:38 2022 +0100

sw clearing breaks: add clearing indicator during rendering

A left / right line around the break portion now allows seeing if the
clearing is none, left, right or all (somewhat familiar from Word).

No test for this, SwBreakPortion::Paint() is a NOP unless rendering on a
window, so the metafile-based rendering used for testing won't detect
the difference.

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

diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 6b1c68bf3313..7408e17f43c0 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -67,6 +67,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::linguistic2;
@@ -964,6 +965,13 @@ void SwTextPaintInfo::DrawLineBreak( const SwLinePortion 
&rPor ) const
 if( !OnWin() )
 return;
 
+SwLineBreakClear eClear = SwLineBreakClear::NONE;
+if (rPor.IsBreakPortion())
+{
+const auto& rBreakPortion = static_cast(rPor);
+eClear = rBreakPortion.GetClear();
+}
+
 sal_uInt16 nOldWidth = rPor.Width();
 const_cast(rPor).Width( LINE_BREAK_WIDTH );
 
@@ -976,7 +984,24 @@ void SwTextPaintInfo::DrawLineBreak( const SwLinePortion 
&rPor ) const
   CHAR_LINEBREAK_RTL : CHAR_LINEBREAK;
 const sal_uInt8 nOptions = 0;
 
-lcl_DrawSpecial( *this, rPor, aRect, NON_PRINTING_CHARACTER_COLOR, 
cChar, nOptions );
+SwRect aTextRect(aRect);
+if (eClear == SwLineBreakClear::LEFT || eClear == 
SwLineBreakClear::ALL)
+aTextRect.AddLeft(30);
+if (eClear == SwLineBreakClear::RIGHT || eClear == 
SwLineBreakClear::ALL)
+aTextRect.AddRight(-30);
+lcl_DrawSpecial( *this, rPor, aTextRect, NON_PRINTING_CHARACTER_COLOR, 
cChar, nOptions );
+
+if (eClear != SwLineBreakClear::NONE)
+{
+// Paint indicator if this clear is left/right/all.
+m_pOut->Push(vcl::PushFlags::LINECOLOR);
+m_pOut->SetLineColor(NON_PRINTING_CHARACTER_COLOR);
+if (eClear != SwLineBreakClear::RIGHT)
+m_pOut->DrawLine(aRect.BottomLeft(), aRect.TopLeft());
+if (eClear != SwLineBreakClear::LEFT)
+m_pOut->DrawLine(aRect.BottomRight(), aRect.TopRight());
+m_pOut->Pop();
+}
 }
 
 const_cast(rPor).Width( nOldWidth );


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

2022-03-25 Thread Arnaud Versini (via logerrit)
 binaryurp/source/bridge.cxx |   44 ++--
 binaryurp/source/bridge.hxx |3 ++-
 binaryurp/source/writer.cxx |9 -
 binaryurp/source/writer.hxx |4 ++--
 4 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 34df7e2cb95385d513e9c74cda5178e3a68d27df
Author: Arnaud Versini 
AuthorDate: Thu Mar 24 12:56:28 2022 +0100
Commit: Noel Grandin 
CommitDate: Fri Mar 25 09:20:48 2022 +0100

binaryurp: use more std::mutex

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

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 3299cd0ed519..050ebec7403c 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -207,7 +207,7 @@ void Bridge::start() {
 rtl::Reference r(new Reader(this));
 rtl::Reference w(new Writer(this));
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 assert(
 state_ == STATE_INITIAL && threadPool_ == nullptr && !writer_.is() 
&&
 !reader_.is());
@@ -237,7 +237,7 @@ void Bridge::terminate(bool final) {
 bool joinW;
 Listeners ls;
 {
-osl::ClearableMutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 switch (state_) {
 case STATE_INITIAL: // via ~Bridge -> dispose -> terminate
 case STATE_FINAL:
@@ -246,10 +246,10 @@ void Bridge::terminate(bool final) {
 break;
 case STATE_TERMINATED:
 if (final) {
-g.clear();
+g.unlock();
 terminated_.wait();
 {
-osl::MutexGuard g2(mutex_);
+std::lock_guard g2(mutex_);
 tp = threadPool_;
 threadPool_ = nullptr;
 if (reader_.is()) {
@@ -309,7 +309,7 @@ void Bridge::terminate(bool final) {
 uno_threadpool_dispose(tp);
 Stubs s;
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 s.swap(stubs_);
 }
 for (auto & stub : s)
@@ -340,7 +340,7 @@ void Bridge::terminate(bool final) {
 uno_threadpool_destroy(tp);
 }
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 if (final) {
 threadPool_ = nullptr;
 }
@@ -361,14 +361,14 @@ BinaryAny Bridge::mapCppToBinaryAny(css::uno::Any const & 
cppAny) {
 }
 
 uno_ThreadPool Bridge::getThreadPool() {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 checkDisposed();
 assert(threadPool_ != nullptr);
 return threadPool_;
 }
 
 rtl::Reference< Writer > Bridge::getWriter() {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 checkDisposed();
 assert(writer_.is());
 return writer_;
@@ -392,7 +392,7 @@ css::uno::UnoInterfaceReference 
Bridge::registerIncomingInterface(
 } else {
 obj.set(new Proxy(this, oid, type), SAL_NO_ACQUIRE);
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 assert(proxies_ < std::numeric_limits< std::size_t >::max());
 ++proxies_;
 }
@@ -419,7 +419,7 @@ OUString Bridge::registerOutgoingInterface(
 if (!Proxy::isProxy(this, object, &oid)) {
 binaryUno_.get()->pExtEnv->getObjectIdentifier(
 binaryUno_.get()->pExtEnv, &oid.pData, object.get());
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 Stubs::iterator i(stubs_.find(oid));
 Stub newStub;
 Stub * stub = i == stubs_.end() ? &newStub : &i->second;
@@ -458,7 +458,7 @@ css::uno::UnoInterfaceReference Bridge::findStub(
 OUString const & oid, css::uno::TypeDescription const & type)
 {
 assert(!oid.isEmpty() && type.is());
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 Stubs::iterator i(stubs_.find(oid));
 if (i != stubs_.end()) {
 Stub::iterator j(i->second.find(type));
@@ -484,7 +484,7 @@ void Bridge::releaseStub(
 css::uno::UnoInterfaceReference obj;
 bool unused;
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 Stubs::iterator i(stubs_.find(oid));
 if (i == stubs_.end()) {
 throw css::uno::RuntimeException("URP: release unknown stub");
@@ -538,7 +538,7 @@ void Bridge::freeProxy(Proxy & proxy) {
 }
 bool unused;
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 assert(proxies_ > 0);
 --proxies_;
 unused = becameUnused();
@@ -547,7 +547,7 @@ void Bridge::freeProxy(Proxy & proxy) {
 }
 
 void Bridge::incrementCalls(bool normalCall) noexcept {
-osl::MutexGuard g(mutex_);
+ 

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

2022-03-25 Thread Noel Grandin (via logerrit)
 sc/source/ui/inc/viewfunc.hxx  |2 +-
 sc/source/ui/view/viewfun3.cxx |   12 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 38b8ca62dd07f119ad78f738d706cb1a80e23517
Author: Noel Grandin 
AuthorDate: Thu Mar 24 11:24:43 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 25 09:15:26 2022 +0100

loplugin:constantparam

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

diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 80b9b090bcad..2b72ce50ff73 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -356,7 +356,7 @@ private:
 
 bool PasteMultiRangesFromClip(
 InsertDeleteFlags nFlags, ScDocument* pClipDoc,
-ScPasteFunc nFunction, bool bSkipEmptyCells, bool bIncludeFiltered,
+ScPasteFunc nFunction, bool bSkipEmptyCells,
 bool bTranspose, bool bAsLink, bool bAllowDialogs,
 InsCellCmd eMoveMode, InsertDeleteFlags nUndoFlags );
 
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 031a5b34b3cf..d2afed84d0b1 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -900,7 +900,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, 
ScDocument* pClipDoc,
 if (rClipParam.isMultiRange())
 {
 // Source data is multi-range.
-return PasteMultiRangesFromClip(nFlags, pClipDoc, nFunction, 
bSkipEmptyCells, false, bTranspose,
+return PasteMultiRangesFromClip(nFlags, pClipDoc, nFunction, 
bSkipEmptyCells, bTranspose,
 bAsLink, bAllowDialogs, eMoveMode, 
nUndoFlags);
 }
 
@@ -1464,7 +1464,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, 
ScDocument* pClipDoc,
 
 bool ScViewFunc::PasteMultiRangesFromClip(InsertDeleteFlags nFlags, 
ScDocument* pClipDoc,
   ScPasteFunc nFunction, bool 
bSkipEmptyCells,
-  bool bIncludeFiltered, bool 
bTranspose, bool bAsLink,
+  bool bTranspose, bool bAsLink,
   bool bAllowDialogs, InsCellCmd 
eMoveMode,
   InsertDeleteFlags nUndoFlags)
 {
@@ -1475,7 +1475,7 @@ bool 
ScViewFunc::PasteMultiRangesFromClip(InsertDeleteFlags nFlags, ScDocument*
 const ScAddress& rCurPos = rViewData.GetCurPos();
 ScClipParam& rClipParam = pClipDoc->GetClipParam();
 SCCOL nColSize = rClipParam.getPasteColSize();
-SCROW nRowSize = rClipParam.getPasteRowSize(*pClipDoc, bIncludeFiltered);
+SCROW nRowSize = rClipParam.getPasteRowSize(*pClipDoc, 
/*bIncludeFiltered*/false);
 
 if (bTranspose)
 {
@@ -1486,7 +1486,7 @@ bool 
ScViewFunc::PasteMultiRangesFromClip(InsertDeleteFlags nFlags, ScDocument*
 }
 
 ScDocumentUniquePtr pTransClip(new ScDocument(SCDOCMODE_CLIP));
-pClipDoc->TransposeClip(pTransClip.get(), nFlags, bAsLink, 
bIncludeFiltered);
+pClipDoc->TransposeClip(pTransClip.get(), nFlags, bAsLink, 
/*bIncludeFiltered*/false);
 pClipDoc = pTransClip.release();
 SCCOL nTempColSize = nColSize;
 nColSize = static_cast(nRowSize);
@@ -1577,7 +1577,7 @@ bool 
ScViewFunc::PasteMultiRangesFromClip(InsertDeleteFlags nFlags, ScDocument*
 if (bAsLink && bTranspose)
 nCopyFlags |= InsertDeleteFlags::FORMULA;
 rDoc.CopyMultiRangeFromClip(rCurPos, aMark, nCopyFlags, pClipDoc, true, 
bAsLink && !bTranspose,
-bIncludeFiltered, bSkipEmptyCells);
+/*bIncludeFiltered*/false, bSkipEmptyCells);
 
 if (pMixDoc)
 rDoc.MixDocument(aMarkedRange, nFunction, bSkipEmptyCells, *pMixDoc);
@@ -1588,7 +1588,7 @@ bool 
ScViewFunc::PasteMultiRangesFromClip(InsertDeleteFlags nFlags, ScDocument*
 {
 //  Paste the drawing objects after the row heights have been updated.
 rDoc.CopyMultiRangeFromClip(rCurPos, aMark, 
InsertDeleteFlags::OBJECTS, pClipDoc, true,
-false, bIncludeFiltered, true);
+false, /*bIncludeFiltered*/false, true);
 }
 
 if (bRowInfo)


Re: 回复:回复:libreoffice-7.3.2 compile in arm system

2022-03-25 Thread Michael Weghorn



On 25/03/2022 08.12, gcxyw1314 wrote:

help ,

Is it something to do with the version

[...]
发件人:Christian Lohmaier 
[...]

When building packages using the epm method, the dependency gets added
by instsetoo_native/inc_openoffice/unix/find-requires-x11.sh - and it
looks like it should also add the ()(64bit) marker to the dependency
when PLATFORMID is linux_aarch64 and not only for linux_x86_64

check with rpm -q --provides libXinerama-1.1.3-2.1.el7.aarch64 whether
it provides "libXinerama.so.1()(64bit)"



If I understand correctly, Christian's suggestion was to apply the 
following change if the output to the `rpm -q --provides 
libXinerama-1.1.3-2.1.el7.aarch64` command shows that the package 
provides "libXinerama.so.1()(64bit)":


https://gerrit.libreoffice.org/c/core/+/132094

Can you check whether it works if you rebuild with that change applied?


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - officecfg/registry svl/source uui/source

2022-03-25 Thread Caolán McNamara (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 +
 svl/source/passwordcontainer/passwordcontainer.cxx |   41 -
 svl/source/passwordcontainer/passwordcontainer.hxx |6 +
 uui/source/iahndl-authentication.cxx   |5 -
 4 files changed, 55 insertions(+), 3 deletions(-)

New commits:
commit 078a07a46a88b8ec22f65db7aba1eabb38a112e2
Author: Caolán McNamara 
AuthorDate: Mon Mar 21 20:58:34 2022 +
Commit: Stephan Bergmann 
CommitDate: Fri Mar 25 08:30:20 2022 +0100

make hash encoding match decoding

Seeing as old versions of the hash may be in the users config, add a
StorageVersion field to the office config Passwords section which
defaults to 0 to indicate the old hash is in use.

Try the old varient when StorageVersion is 0. When a new encoded master
password it set write StorageVersion of 1 to indicate a new hash is in
use and use the new style when StorageVersion is 1.

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

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index dac495521742..a7e5adf6a78f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -943,6 +943,12 @@
 
 false
   
+  
+
+  Specifies what version of encoding scheme the password 
container uses.
+
+0
+  
   
 
   Specifies if there is a valid master password.
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx 
b/svl/source/passwordcontainer/passwordcontainer.cxx
index 54fa34ce93f0..e8f521c28014 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 
 #include 
 
@@ -256,6 +257,24 @@ bool StorageItem::useStorage()
 }
 
 
+sal_Int32 StorageItem::getStorageVersion()
+{
+Sequence aNodeNames { "StorageVersion" };
+
+Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames );
+
+if( aPropertyValues.getLength() != aNodeNames.getLength() )
+{
+OSL_FAIL( "Problems during reading" );
+return 0;
+}
+
+sal_Int32 nResult = 0;
+aPropertyValues[0] >>= nResult;
+
+return nResult;
+}
+
 bool StorageItem::getEncodedMasterPassword( OUString& aResult )
 {
 if( hasEncoded )
@@ -288,7 +307,8 @@ void StorageItem::setEncodedMasterPassword( const OUString& 
aEncoded, bool bAcce
 bool bHasMaster = ( !aEncoded.isEmpty() || bAcceptEmpty );
 
 ConfigItem::SetModified();
-ConfigItem::PutProperties( { "HasMaster", "Master" }, { 
uno::Any(bHasMaster), uno::Any(aEncoded) } );
+ConfigItem::PutProperties( { "HasMaster", "Master", "StorageVersion" },
+   { uno::Any(bHasMaster), uno::Any(aEncoded), 
uno::Any(nCurrentStorageVersion) } );
 
 hasEncoded = bHasMaster;
 mEncoded = aEncoded;
@@ -772,6 +792,18 @@ OUString PasswordContainer::RequestPasswordFromUser( 
PasswordRequestMode aRMode,
 return aResult;
 }
 
+// Mangle the key to match an old bug
+static OUString ReencodeAsOldHash(const OUString& rPass)
+{
+OUStringBuffer aBuffer;
+for (int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ++ind)
+{
+unsigned char i = static_cast(rPass.copy(ind * 2, 
2).toUInt32(16));
+aBuffer.append(static_cast< sal_Unicode >('a' + (i >> 4)));
+aBuffer.append(static_cast< sal_Unicode >('a' + (i & 15)));
+}
+return aBuffer.makeStringAndClear();
+}
 
 OUString const & PasswordContainer::GetMasterPassword( const Reference< 
XInteractionHandler >& aHandler )
 {
@@ -810,6 +842,9 @@ OUString const & PasswordContainer::GetMasterPassword( 
const Reference< XInterac
 }
 else
 {
+if (m_xStorageFile->getStorageVersion() == 0)
+aPass = ReencodeAsOldHash(aPass);
+
 std::vector< OUString > aRM( DecodePasswords( 
aEncodedMP, aPass, aRMode ) );
 if( aRM.empty() || aPass != aRM[0] )
 {
@@ -1014,6 +1049,10 @@ sal_Bool SAL_CALL 
PasswordContainer::authorizateWithMasterPassword( const uno::R
 
 do {
 aPass = RequestPasswordFromUser( aRMode, xTmpHandler );
+
+if (m_xStorageFile->getStorageVersion() == 0)
+aPass = ReencodeAsOldHash(aPass);
+
 bResult = ( !aPass.isEmpty() && aPass == m_aMasterPassword 
);
 aRMode = PasswordRequestMode_PASSWORD_REENTER; // further 
questions with error notification
 } while( !bResult && !aPass.isEmp

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - officecfg/registry svl/source uui/source

2022-03-25 Thread Caolán McNamara (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |6 +
 svl/source/passwordcontainer/passwordcontainer.cxx |   40 -
 svl/source/passwordcontainer/passwordcontainer.hxx |6 +
 uui/source/iahndl-authentication.cxx   |5 -
 4 files changed, 54 insertions(+), 3 deletions(-)

New commits:
commit e890f54dbac57f3ab5acf4fbd31222095d3e8ab6
Author: Caolán McNamara 
AuthorDate: Mon Mar 21 20:58:34 2022 +
Commit: Stephan Bergmann 
CommitDate: Fri Mar 25 08:26:55 2022 +0100

make hash encoding match decoding

Seeing as old versions of the hash may be in the users config, add a
StorageVersion field to the office config Passwords section which
defaults to 0 to indicate the old hash is in use.

Try the old varient when StorageVersion is 0. When a new encoded master
password it set write StorageVersion of 1 to indicate a new hash is in
use and use the new style when StorageVersion is 1.

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

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 56954ead6ffb..a8bdbf95cd96 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -933,6 +933,12 @@
 
 false
   
+  
+
+  Specifies what version of encoding scheme the password 
container uses.
+
+0
+  
   
 
   Specifies if there is a valid master password.
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx 
b/svl/source/passwordcontainer/passwordcontainer.cxx
index 1181144ead22..f3b1132de7a5 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 
 #include 
 
@@ -254,6 +255,23 @@ bool StorageItem::useStorage()
 return aResult;
 }
 
+sal_Int32 StorageItem::getStorageVersion()
+{
+Sequence aNodeNames { "StorageVersion" };
+
+Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames );
+
+if( aPropertyValues.getLength() != aNodeNames.getLength() )
+{
+OSL_FAIL( "Problems during reading" );
+return 0;
+}
+
+sal_Int32 nResult = 0;
+aPropertyValues[0] >>= nResult;
+
+return nResult;
+}
 
 bool StorageItem::getEncodedMP( OUString& aResult )
 {
@@ -289,7 +307,8 @@ void StorageItem::setEncodedMP( const OUString& aEncoded, 
bool bAcceptEmpty )
 bool bHasMaster = ( !aEncoded.isEmpty() || bAcceptEmpty );
 
 ConfigItem::SetModified();
-ConfigItem::PutProperties( { "HasMaster", "Master" }, { 
uno::Any(bHasMaster), uno::Any(aEncoded) } );
+ConfigItem::PutProperties( { "HasMaster", "Master", "StorageVersion" },
+   { uno::Any(bHasMaster), uno::Any(aEncoded), 
uno::Any(nCurrentStorageVersion) } );
 
 hasEncoded = bHasMaster;
 mEncoded = aEncoded;
@@ -774,6 +793,18 @@ OUString PasswordContainer::RequestPasswordFromUser( 
PasswordRequestMode aRMode,
 return aResult;
 }
 
+// Mangle the key to match an old bug
+static OUString ReencodeAsOldHash(const OUString& rPass)
+{
+OUStringBuffer aBuffer;
+for (int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ++ind)
+{
+unsigned char i = static_cast(rPass.copy(ind * 2, 
2).toUInt32(16));
+aBuffer.append(static_cast< sal_Unicode >('a' + (i >> 4)));
+aBuffer.append(static_cast< sal_Unicode >('a' + (i & 15)));
+}
+return aBuffer.makeStringAndClear();
+}
 
 OUString const & PasswordContainer::GetMasterPassword( const Reference< 
XInteractionHandler >& aHandler )
 {
@@ -812,6 +843,9 @@ OUString const & PasswordContainer::GetMasterPassword( 
const Reference< XInterac
 }
 else
 {
+if (m_pStorageFile->getStorageVersion() == 0)
+aPass = ReencodeAsOldHash(aPass);
+
 std::vector< OUString > aRM( DecodePasswords( 
aEncodedMP, aPass, aRMode ) );
 if( aRM.empty() || aPass != aRM[0] )
 {
@@ -1016,6 +1050,10 @@ sal_Bool SAL_CALL 
PasswordContainer::authorizateWithMasterPassword( const uno::R
 
 do {
 aPass = RequestPasswordFromUser( aRMode, xTmpHandler );
+
+if (m_pStorageFile->getStorageVersion() == 0)
+aPass = ReencodeAsOldHash(aPass);
+
 bResult = ( !aPass.isEmpty() && aPass == m_aMasterPasswd );
 aRMode = PasswordRequestMode_PASSWORD_REENTER; // further 
questions with error notification
 } while( !bResult && !aPass.isEmpty() );
diff --git a/

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

2022-03-25 Thread Gülşah Köse (via logerrit)
 sd/qa/unit/data/pptx/deftabstop.pptx |binary
 sd/qa/unit/import-tests2.cxx |   14 ++
 sd/source/ui/docshell/docshel4.cxx   |   12 
 3 files changed, 26 insertions(+)

New commits:
commit 362fb6c7b13d5506c6bd9d1b7f113ec45544809d
Author: Gülşah Köse 
AuthorDate: Thu Mar 24 11:19:03 2022 +0300
Commit: Gülşah Köse 
CommitDate: Fri Mar 25 08:25:49 2022 +0100

tdf#96389 Use default tab stop value of MSO for pptx import.

Change-Id: Ib3dde68c672b44d8b60f121fb0e637942b5986b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131698
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/sd/qa/unit/data/pptx/deftabstop.pptx 
b/sd/qa/unit/data/pptx/deftabstop.pptx
new file mode 100644
index ..5cfe71794446
Binary files /dev/null and b/sd/qa/unit/data/pptx/deftabstop.pptx differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 2654e6f6290e..7a67debd38d9 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -129,6 +129,7 @@ public:
 void testHyperlinksOnShapes();
 void testTdf112209();
 void testTdf128596();
+void testDefaultTabStop();
 
 CPPUNIT_TEST_SUITE(SdImportTest2);
 
@@ -194,6 +195,7 @@ public:
 CPPUNIT_TEST(testHyperlinksOnShapes);
 CPPUNIT_TEST(testTdf112209);
 CPPUNIT_TEST(testTdf128596);
+CPPUNIT_TEST(testDefaultTabStop);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1907,6 +1909,18 @@ void SdImportTest2::testTdf128596()
 xDocShRef->DoClose();
 }
 
+void SdImportTest2::testDefaultTabStop()
+{
+sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/deftabstop.pptx"), 
PPTX);
+SdDrawDocument* pDoc = xDocShRef->GetDoc();
+sal_Int32 nDefTab = pDoc->GetDefaultTabulator();
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2540), nDefTab);
+
+xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest2);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/ui/docshell/docshel4.cxx 
b/sd/source/ui/docshell/docshel4.cxx
index bed18cbddf70..6150321ca33a 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -399,6 +399,18 @@ bool DrawDocShell::ImportFrom(SfxMedium &rMedium,
 mpDoc->SetSummationOfParagraphs();
 }
 
+if (aFilterName == "Impress MS PowerPoint 2007 XML" ||
+aFilterName == "Impress MS PowerPoint 2007 XML AutoPlay" ||
+aFilterName == "Impress MS PowerPoint 2007 XML VBA" ||
+aFilterName == "Impress Office Open XML")
+{
+// We need to be able to set the default tab size for each text object.
+// This is possible at the moment only for the whole document. See
+// TextParagraphPropertiesContext constructor. So default tab width
+// of the LibreOffice is 1270 but MSO is 2540 on general settings.
+mpDoc->SetDefaultTabulator( 2540 );
+}
+
 const bool bRet = SfxObjectShell::ImportFrom(rMedium, xInsertPosition);
 
 SfxItemSet* pSet = rMedium.GetItemSet();


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

2022-03-25 Thread Stephan Bergmann (via logerrit)
 framework/source/uielement/menubarmanager.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 6e135909d398a08105e2df4cae834e73f253b440
Author: Stephan Bergmann 
AuthorDate: Thu Mar 24 13:52:44 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Mar 25 08:21:14 2022 +0100

tdf#147668: Destroy still needs to do its work when called from disposing

Regression introduced with d4257daba1155ebccbfebea99bad0e4152ca9b08 "use
comphelper::WeakComponentImplHelper in MenuBarManager" changing

-if ( rBHelper.bDisposed )
+if ( m_bDisposed )

in MenuBarManager::Destroy, but where comphelper::WeakComponentImplHelper 
sets
m_bDisposed to true before calling disposing.

And Destroy is only called from disposing, so the check can just be removed.

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

diff --git a/framework/source/uielement/menubarmanager.cxx 
b/framework/source/uielement/menubarmanager.cxx
index 7b856a01d43d..49b4092f6d46 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -140,9 +140,6 @@ void MenuBarManager::Destroy()
 {
 SolarMutexGuard aGuard;
 
-if ( m_bDisposed )
-return;
-
 // stop asynchronous settings timer and
 // release deferred item container reference
 m_aAsyncSettingsTimer.Stop();


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

2022-03-25 Thread Miklos Vajna (via logerrit)
 sw/source/core/text/portxt.cxx |   11 +++
 sw/source/core/text/portxt.hxx |2 ++
 2 files changed, 13 insertions(+)

New commits:
commit 9fd5446c6f3281789ed21847f25cf56ce84dd395
Author: Miklos Vajna 
AuthorDate: Thu Mar 24 20:44:43 2022 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 25 08:02:48 2022 +0100

sw layout xml dump: handle hole portions

Show their blank width.

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

diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 219036aa834d..112eb26328b8 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -792,6 +792,17 @@ void SwHolePortion::HandlePortion( SwPortionHandler& rPH ) 
const
 rPH.Text( GetLen(), GetWhichPor() );
 }
 
+void SwHolePortion::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+(void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwHolePortion"));
+(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("blank-width"),
+  
BAD_CAST(OString::number(m_nBlankWidth).getStr()));
+
+SwLinePortion::dumpAsXml(pWriter);
+
+(void)xmlTextWriterEndElement(pWriter);
+}
+
 void SwFieldMarkPortion::Paint( const SwTextPaintInfo & /*rInf*/) const
 {
 // These shouldn't be painted!
diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
index ec44a2bafc76..297fca5e8525 100644
--- a/sw/source/core/text/portxt.hxx
+++ b/sw/source/core/text/portxt.hxx
@@ -73,6 +73,8 @@ public:
 
 // Accessibility: pass information about this portion to the PortionHandler
 virtual void HandlePortion( SwPortionHandler& rPH ) const override;
+
+void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 class SwFieldMarkPortion : public SwTextPortion